From f331cc5c093a8428bcf9552fd710b105c8f45476 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 28 Sep 2018 14:56:13 -0500 Subject: [PATCH] dts: atmel: Add missing GPIO properties The gpio controllers on SAM4S, SAME70, and SAMD were missing properties related to GPIO pin generation. Add the missing details into the yaml and dts files to allow boards to specific gpio pins. Signed-off-by: Kumar Gala --- dts/arm/atmel/sam4s.dtsi | 7 +++++++ dts/arm/atmel/samd.dtsi | 5 +++++ dts/arm/atmel/same70.dtsi | 11 +++++++++++ dts/bindings/gpio/atmel,sam-gpio.yaml | 5 +++++ dts/bindings/gpio/atmel,sam0-gpio.yaml | 5 +++++ 5 files changed, 33 insertions(+) diff --git a/dts/arm/atmel/sam4s.dtsi b/dts/arm/atmel/sam4s.dtsi index 5608abb9ac0..7b30cb25cb7 100644 --- a/dts/arm/atmel/sam4s.dtsi +++ b/dts/arm/atmel/sam4s.dtsi @@ -6,6 +6,7 @@ #include #include +#include / { cpus { @@ -92,6 +93,8 @@ interrupts = <11 1>; peripheral-id = <11>; label = "PORTA"; + gpio-controller; + #gpio-cells = <2>; }; portb: gpio@400E1000 { @@ -100,6 +103,8 @@ interrupts = <12 1>; peripheral-id = <12>; label = "PORTB"; + gpio-controller; + #gpio-cells = <2>; }; portc: gpio@400E1200 { @@ -108,6 +113,8 @@ interrupts = <13 1>; peripheral-id = <13>; label = "PORTC"; + gpio-controller; + #gpio-cells = <2>; }; }; }; diff --git a/dts/arm/atmel/samd.dtsi b/dts/arm/atmel/samd.dtsi index dc5425e15d1..58bf7275de9 100644 --- a/dts/arm/atmel/samd.dtsi +++ b/dts/arm/atmel/samd.dtsi @@ -5,6 +5,7 @@ */ #include +#include / { cpus { @@ -113,12 +114,16 @@ compatible = "atmel,sam0-gpio"; reg = <0x41004400 0x80>; label = "PORTA"; + gpio-controller; + #gpio-cells = <2>; }; portb: gpio@41004480 { compatible = "atmel,sam0-gpio"; reg = <0x41004480 0x80>; label = "PORTB"; + gpio-controller; + #gpio-cells = <2>; }; usb0: usb@41005000 { diff --git a/dts/arm/atmel/same70.dtsi b/dts/arm/atmel/same70.dtsi index b64aa76b58d..e86cccb47ed 100644 --- a/dts/arm/atmel/same70.dtsi +++ b/dts/arm/atmel/same70.dtsi @@ -7,6 +7,7 @@ #include #include +#include / { cpus { @@ -163,6 +164,8 @@ interrupts = <10 1>; peripheral-id = <10>; label = "PORTA"; + gpio-controller; + #gpio-cells = <2>; }; portb: gpio@400E1000 { @@ -171,6 +174,8 @@ interrupts = <11 1>; peripheral-id = <11>; label = "PORTB"; + gpio-controller; + #gpio-cells = <2>; }; portc: gpio@400E1200 { @@ -179,6 +184,8 @@ interrupts = <12 1>; peripheral-id = <12>; label = "PORTC"; + gpio-controller; + #gpio-cells = <2>; }; portd: gpio@400E1400 { @@ -187,6 +194,8 @@ interrupts = <16 1>; peripheral-id = <16>; label = "PORTD"; + gpio-controller; + #gpio-cells = <2>; }; porte: gpio@400E1600 { @@ -195,6 +204,8 @@ interrupts = <17 1>; peripheral-id = <17>; label = "PORTE"; + gpio-controller; + #gpio-cells = <2>; }; }; }; diff --git a/dts/bindings/gpio/atmel,sam-gpio.yaml b/dts/bindings/gpio/atmel,sam-gpio.yaml index ee433bd4d2c..78c5011bba5 100644 --- a/dts/bindings/gpio/atmel,sam-gpio.yaml +++ b/dts/bindings/gpio/atmel,sam-gpio.yaml @@ -37,3 +37,8 @@ properties: description: peripheral ID generation: define category: required + +"#cells": + - pin + - flags +... diff --git a/dts/bindings/gpio/atmel,sam0-gpio.yaml b/dts/bindings/gpio/atmel,sam0-gpio.yaml index 90235b63c71..3d2a7439f8b 100644 --- a/dts/bindings/gpio/atmel,sam0-gpio.yaml +++ b/dts/bindings/gpio/atmel,sam0-gpio.yaml @@ -25,3 +25,8 @@ properties: category: required description: Human readable string describing the device (used by Zephyr for API name) generation: define + +"#cells": + - pin + - flags +...