From a9c92ffd9ae0b5cf3369ae7928b93d023e993a9c Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Thu, 13 Jul 2017 12:51:32 -0500 Subject: [PATCH] dts: i2c: Add missing #address-cell & #size-cell properties The I2C controller nodes are the root of the I2C bus for that controller and thus may have children nodes that represent the I2C devices on that controller. Thus we need to specify the #address-cell & #size-cell properties. Signed-off-by: Kumar Gala --- dts/arm/st/stm32f103Xb.dtsi | 4 ++++ dts/arm/st/stm32f4.dtsi | 6 ++++++ dts/arm/st/stm32l475.dtsi | 6 ++++++ dts/common/yaml/i2c.yaml | 8 ++++++++ 4 files changed, 24 insertions(+) diff --git a/dts/arm/st/stm32f103Xb.dtsi b/dts/arm/st/stm32f103Xb.dtsi index 9471bafe75..740ca88f22 100644 --- a/dts/arm/st/stm32f103Xb.dtsi +++ b/dts/arm/st/stm32f103Xb.dtsi @@ -46,6 +46,8 @@ i2c1: i2c@40005400 { compatible = "st,stm32-i2c-v1"; + #address-cells = <1>; + #size-cells = <0>; reg = <0x40005400 0x400>; interrupts = <31 0>, <32 0>; interrupt-names = "event", "error"; @@ -55,6 +57,8 @@ i2c2: i2c@40005800 { compatible = "st,stm32-i2c-v1"; + #address-cells = <1>; + #size-cells = <0>; reg = <0x40005800 0x400>; interrupts = <33 0>, <34 0>; interrupt-names = "event", "error"; diff --git a/dts/arm/st/stm32f4.dtsi b/dts/arm/st/stm32f4.dtsi index d269a481c9..1988a4825c 100644 --- a/dts/arm/st/stm32f4.dtsi +++ b/dts/arm/st/stm32f4.dtsi @@ -43,6 +43,8 @@ i2c1: i2c@40005400 { compatible = "st,stm32-i2c-v1"; + #address-cells = <1>; + #size-cells = <0>; reg = <0x40005400 0x400>; interrupts = <31 0>, <32 0>; interrupt-names = "event", "error"; @@ -52,6 +54,8 @@ i2c2: i2c@40005800 { compatible = "st,stm32-i2c-v1"; + #address-cells = <1>; + #size-cells = <0>; reg = <0x40005800 0x400>; interrupts = <33 0>, <34 0>; interrupt-names = "event", "error"; @@ -61,6 +65,8 @@ i2c3: i2c@40005C00 { compatible = "st,stm32-i2c-v1"; + #address-cells = <1>; + #size-cells = <0>; reg = <0x40005C00 0x400>; interrupts = <72 0>, <73 0>; interrupt-names = "event", "error"; diff --git a/dts/arm/st/stm32l475.dtsi b/dts/arm/st/stm32l475.dtsi index de9eb75401..49a1cb92b8 100644 --- a/dts/arm/st/stm32l475.dtsi +++ b/dts/arm/st/stm32l475.dtsi @@ -59,6 +59,8 @@ i2c1: i2c@40005400 { compatible = "st,stm32-i2c-v2"; + #address-cells = <1>; + #size-cells = <0>; reg = <0x40005400 0x400>; interrupts = <31 0>, <32 0>; interrupt-names = "event", "error"; @@ -68,6 +70,8 @@ i2c2: i2c@40005800 { compatible = "st,stm32-i2c-v2"; + #address-cells = <1>; + #size-cells = <0>; reg = <0x40005800 0x400>; interrupts = <33 0>, <34 0>; interrupt-names = "event", "error"; @@ -77,6 +81,8 @@ i2c3: i2c@40005C00 { compatible = "st,stm32-i2c-v2"; + #address-cells = <1>; + #size-cells = <0>; reg = <0x40005C00 0x400>; interrupts = <72 0>, <73 0>; interrupt-names = "event", "error"; diff --git a/dts/common/yaml/i2c.yaml b/dts/common/yaml/i2c.yaml index 8f6ae26a38..480631338a 100644 --- a/dts/common/yaml/i2c.yaml +++ b/dts/common/yaml/i2c.yaml @@ -7,6 +7,14 @@ description: > This binding gives the base structures for all I2C devices properties: + - #address-cells: + type: int + category: required + description: should be 1. + - #size-cells: + type: int + category: required + description: should be 0. - clock-frequency : type: int category: optional