forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dts: posix: Add DTS support for POSIX architecture
Added device tree support for POSIX architecture based boards. Signed-off-by: Jan Van Winkel <[email protected]>
- Loading branch information
1 parent
951a82d
commit 7a246c3
Showing
10 changed files
with
134 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright (c) 2019 Jan Van Winkel ([email protected]) | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#define DT_FLASH_DEV_NAME DT_ZEPHYR_NATIVE_POSIX_FLASH_CONTROLLER_0_LABEL | ||
#define DT_UART_0_DEV_NAME DT_ZEPHYR_NATIVE_POSIX_UART_1_LABEL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright (c) 2019 Jan Van Winkel ([email protected]) | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <posix/posix.dtsi> | ||
|
||
/ { | ||
model = "Native POSIX Board"; | ||
compatible = "zephyr,posix"; | ||
|
||
chosen { | ||
zephyr,console = &uart0; | ||
zephyr,shell-uart = &uart0; | ||
zephyr,uart-mcumgr = &uart0; | ||
zephyr,flash = &flash0; | ||
}; | ||
|
||
|
||
flash-controller@0 { | ||
compatible = "zephyr,native-posix-flash-controller"; | ||
reg = <0x00000000 DT_SIZE_K(2048)>; | ||
|
||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
label = "flash_ctrl"; | ||
|
||
flash0: flash@0 { | ||
status = "ok"; | ||
compatible = "soc-nv-flash"; | ||
label = "flash"; | ||
erase-block-size = <1>; | ||
write-block-size = <1>; | ||
reg = <0x00000000 DT_SIZE_K(2048)>; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
boot_partition: partition@0 { | ||
label = "mcuboot"; | ||
reg = <0x000000000 0x0000C000>; | ||
}; | ||
slot0_partition: partition@c000 { | ||
label = "image-0"; | ||
reg = <0x0000C000 0x000069000>; | ||
}; | ||
slot1_partition: partition@75000 { | ||
label = "image-1"; | ||
reg = <0x00075000 0x000069000>; | ||
}; | ||
scratch_partition: partition@de000 { | ||
label = "image-scratch"; | ||
reg = <0x000de000 0x0001e000>; | ||
}; | ||
storage_partition: partition@fc000 { | ||
label = "storage"; | ||
reg = <0x000fc000 0x00004000>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
uart0: uart@1 { | ||
status = "ok"; | ||
compatible = "zephyr,native-posix-uart"; | ||
reg = <1 0>; | ||
label = "UART_0"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
dts/bindings/flash_controller/zephyr,native-posix-flash-controller.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: Native POSIX Flash Controller | ||
version: 0.1 | ||
|
||
description: > | ||
This binding gives a base representation of the Native POSIX flash | ||
controller | ||
inherits: | ||
!include flash-controller.yaml | ||
|
||
properties: | ||
compatible: | ||
constraint: "zephyr,native-posix-flash-controller" | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# | ||
# Copyright (c) 2019, Jan Van Winkel ([email protected]) | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
--- | ||
title: Native POSIX UART | ||
version: 0.1 | ||
|
||
description: > | ||
This binding gives a base representation of the Native POSIX UART | ||
inherits: | ||
!include uart.yaml | ||
|
||
properties: | ||
compatible: | ||
constraint: "zephyr,native-posix-uart" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright (c) 2019 Jan Van Winkel ([email protected]) | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "skeleton.dtsi" | ||
#include <mem.h> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters