dts: bindings: add support for the flash driver name

So far, DT did not support the flash driver name.
Any flash-controller should have the appropriate
flash driver that should be identified by its name.

This path adds generic support for extract the description
from the flash-controller node,
adds implementation of this property for all nrf5x targets.


Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
Andrzej Puzdrowski 2018-01-22 14:48:38 +01:00 committed by Kumar Gala
commit ff7dfc4fb4
21 changed files with 118 additions and 8 deletions

View file

@ -26,7 +26,7 @@
/* For IMG_MANAGER */
#if defined(CONFIG_SOC_FLASH_NRF5)
#define FLASH_DRIVER_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME
#define FLASH_DRIVER_NAME FLASH_DEV_NAME
#endif
#endif /* _NORDICSEMI_NRF52_SOC_H_ */

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF52_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF51_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF51_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF51_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF51_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF51_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF51_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF52_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF52_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF52_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF52_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF52_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -2,3 +2,6 @@
#define CONFIG_UART_NRF5_IRQ_PRI NORDIC_NRF_UART_40002000_IRQ_0_PRIORITY
#define CONFIG_UART_NRF5_BAUD_RATE NORDIC_NRF_UART_40002000_CURRENT_SPEED
#define CONFIG_UART_NRF5_NAME NORDIC_NRF_UART_40002000_LABEL
#define CONFIG_SOC_FLASH_NRF5_DEV_NAME NRF_NRF51_FLASH_CONTROLLER_4001E000_LABEL
#define FLASH_DEV_NAME CONFIG_SOC_FLASH_NRF5_DEV_NAME

View file

@ -131,13 +131,6 @@ config SOC_FLASH_NRF5
help
Enables Nordic Semiconductor nRF5X flash driver.
config SOC_FLASH_NRF5_DEV_NAME
string "Nordic nRF5X flash device name"
depends on SOC_FLASH_NRF5
default "NRF5_FLASH"
help
Specify the device name for the flash driver.
config SOC_FLASH_NRF5_RADIO_SYNC
bool "Nordic nRF5x flash driver synchronized with radio"
depends on SOC_FLASH_NRF5 && BT_CTLR

View file

@ -20,6 +20,8 @@
#address-cells = <1>;
#size-cells = <1>;
label="NRF5_FLASH_DRV_NAME";
flash0: flash@0 {
compatible = "soc-nv-flash";
label = "NRF5_FLASH";

View file

@ -20,6 +20,8 @@
#address-cells = <1>;
#size-cells = <1>;
label="NRF5_FLASH_DRV_NAME";
flash0: flash@0 {
compatible = "soc-nv-flash";
label = "NRF5_FLASH";

View file

@ -20,6 +20,8 @@
#address-cells = <1>;
#size-cells = <1>;
label="NRF5_FLASH_DRV_NAME";
flash0: flash@0 {
compatible = "soc-nv-flash";
label = "NRF5_FLASH";

View file

@ -0,0 +1,34 @@
---
title: flash controller Base Structure
id: soc-nv-flash-controller
version: 0.1
description: >
This binding gives the base structures for all flash controller devices
properties:
label:
type: string
category: required
description: Human readable string describing the device (used by Zephyr for API name)
generation: define
reg:
type: array
description: mmio register space
generation: define
category: required
interrupts:
type: array
category: optional
description: required interrupts
generation: define
interrupt-names:
type: stringlist
category: optional
description: names of required interrupts
generation: define
...

View file

@ -0,0 +1,19 @@
---
title: Nordic NVMC
id: nordic,nrf51-flash-controller
version: 0.1
description: >
This binding gives a base representation of the Nordic NVMC
inherits:
!include flash-controller.yaml
properties:
compatible:
type: string
category: required
description: compatible strings
constraint: "nrf,nrf51-flash-controller"
...

View file

@ -0,0 +1,19 @@
---
title: Nordic NVMC
id: nordic,nrf52-flash-controller
version: 0.1
description: >
This binding gives a base representation of the Nordic NVMC
inherits:
!include flash-controller.yaml
properties:
compatible:
type: string
category: required
description: compatible strings
constraint: "nrf,nrf52-flash-controller"
...