Re: [PATCH 4/4] ARM: dts: keystone-k2g-evm: Add gpio nodes

2017-07-18 Thread Keerthy


On Wednesday 19 July 2017 12:43 AM, Suman Anna wrote:
> Hi Keerthy,
> 
> On 07/18/2017 05:57 AM, Keerthy wrote:
>> keystone-k2g has 2 instances of gpio. The first one has all the 144 GPIOs
> 
> Please use 66AK2G for keystone-k2g.

Okay

> 
>> functional( 9 banks with 16 gpios = 144). The second instance has
>> only the GPIO0:GPIO67 functional and rest are marked reserved.
>>
>> Signed-off-by: Keerthy 
>> ---
>>  arch/arm/boot/dts/keystone-k2g.dtsi | 42 
>> +
>>  1 file changed, 42 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi 
>> b/arch/arm/boot/dts/keystone-k2g.dtsi
>> index bf4d1fa..58ac3db 100644
>> --- a/arch/arm/boot/dts/keystone-k2g.dtsi
>> +++ b/arch/arm/boot/dts/keystone-k2g.dtsi
>> @@ -15,6 +15,7 @@
>>  
>>  #include 
>>  #include 
>> +#include 
>>  
>>  / {
>>  compatible = "ti,k2g","ti,keystone";
>> @@ -168,5 +169,46 @@
>>  #reset-cells = <2>;
>>  };
>>  };
>> +
>> +gpio0: gpio@2603000 {
>> +compatible = "ti,keystone-k2g-gpio";
>> +reg = <0x02603000 0x100>;
>> +gpio-controller;
>> +#gpio-cells = <2>;
>> +
>> +interrupts = ,
>> +,
>> +,
>> +,
>> +,
>> +,
>> +,
>> +,
>> +;
>> +interrupt-controller;
>> +#interrupt-cells = <2>;
>> +ti,ngpio = <144>;
>> +ti,davinci-gpio-unbanked = <0>;
>> +clocks = <_clks 0x001b 0x0>;
>> +clock-names = "gpio";
> 
> I don't see the clocks and clock-names documented in the binding.
> Looking at davinci_gpio_irq_setup(), these are required, and a specific
> clock name is what the driver is looking for. And you have different
> semantics for this on K2G and non-K2G SoCs. Davinci platforms are using
> non-DT clocks, so their DT nodes didn't have them.

I will document the same.

> 
> regards
> Suman
> 
>> +};
>> +
>> +gpio1: gpio@260a000 {
>> +compatible = "ti,keystone-k2g-gpio";
>> +reg = <0x0260a000 0x100>;
>> +gpio-controller;
>> +#gpio-cells = <2>;
>> +interrupts = ,
>> +,
>> +,
>> +,
>> +;
>> +interrupt-controller;
>> +#interrupt-cells = <2>;
>> +ti,ngpio = <68>;
>> +ti,davinci-gpio-unbanked = <0>;
>> +clocks = <_clks 0x001c 0x0>;
>> +clock-names = "gpio";
>> +};
>>  };
>>  };
>>
> 


Re: [PATCH 4/4] ARM: dts: keystone-k2g-evm: Add gpio nodes

2017-07-18 Thread Keerthy


On Wednesday 19 July 2017 12:43 AM, Suman Anna wrote:
> Hi Keerthy,
> 
> On 07/18/2017 05:57 AM, Keerthy wrote:
>> keystone-k2g has 2 instances of gpio. The first one has all the 144 GPIOs
> 
> Please use 66AK2G for keystone-k2g.

Okay

> 
>> functional( 9 banks with 16 gpios = 144). The second instance has
>> only the GPIO0:GPIO67 functional and rest are marked reserved.
>>
>> Signed-off-by: Keerthy 
>> ---
>>  arch/arm/boot/dts/keystone-k2g.dtsi | 42 
>> +
>>  1 file changed, 42 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi 
>> b/arch/arm/boot/dts/keystone-k2g.dtsi
>> index bf4d1fa..58ac3db 100644
>> --- a/arch/arm/boot/dts/keystone-k2g.dtsi
>> +++ b/arch/arm/boot/dts/keystone-k2g.dtsi
>> @@ -15,6 +15,7 @@
>>  
>>  #include 
>>  #include 
>> +#include 
>>  
>>  / {
>>  compatible = "ti,k2g","ti,keystone";
>> @@ -168,5 +169,46 @@
>>  #reset-cells = <2>;
>>  };
>>  };
>> +
>> +gpio0: gpio@2603000 {
>> +compatible = "ti,keystone-k2g-gpio";
>> +reg = <0x02603000 0x100>;
>> +gpio-controller;
>> +#gpio-cells = <2>;
>> +
>> +interrupts = ,
>> +,
>> +,
>> +,
>> +,
>> +,
>> +,
>> +,
>> +;
>> +interrupt-controller;
>> +#interrupt-cells = <2>;
>> +ti,ngpio = <144>;
>> +ti,davinci-gpio-unbanked = <0>;
>> +clocks = <_clks 0x001b 0x0>;
>> +clock-names = "gpio";
> 
> I don't see the clocks and clock-names documented in the binding.
> Looking at davinci_gpio_irq_setup(), these are required, and a specific
> clock name is what the driver is looking for. And you have different
> semantics for this on K2G and non-K2G SoCs. Davinci platforms are using
> non-DT clocks, so their DT nodes didn't have them.

I will document the same.

> 
> regards
> Suman
> 
>> +};
>> +
>> +gpio1: gpio@260a000 {
>> +compatible = "ti,keystone-k2g-gpio";
>> +reg = <0x0260a000 0x100>;
>> +gpio-controller;
>> +#gpio-cells = <2>;
>> +interrupts = ,
>> +,
>> +,
>> +,
>> +;
>> +interrupt-controller;
>> +#interrupt-cells = <2>;
>> +ti,ngpio = <68>;
>> +ti,davinci-gpio-unbanked = <0>;
>> +clocks = <_clks 0x001c 0x0>;
>> +clock-names = "gpio";
>> +};
>>  };
>>  };
>>
> 


Re: [PATCH 4/4] ARM: dts: keystone-k2g-evm: Add gpio nodes

2017-07-18 Thread Suman Anna
Hi Keerthy,

On 07/18/2017 05:57 AM, Keerthy wrote:
> keystone-k2g has 2 instances of gpio. The first one has all the 144 GPIOs

Please use 66AK2G for keystone-k2g.

> functional( 9 banks with 16 gpios = 144). The second instance has
> only the GPIO0:GPIO67 functional and rest are marked reserved.
> 
> Signed-off-by: Keerthy 
> ---
>  arch/arm/boot/dts/keystone-k2g.dtsi | 42 
> +
>  1 file changed, 42 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi 
> b/arch/arm/boot/dts/keystone-k2g.dtsi
> index bf4d1fa..58ac3db 100644
> --- a/arch/arm/boot/dts/keystone-k2g.dtsi
> +++ b/arch/arm/boot/dts/keystone-k2g.dtsi
> @@ -15,6 +15,7 @@
>  
>  #include 
>  #include 
> +#include 
>  
>  / {
>   compatible = "ti,k2g","ti,keystone";
> @@ -168,5 +169,46 @@
>   #reset-cells = <2>;
>   };
>   };
> +
> + gpio0: gpio@2603000 {
> + compatible = "ti,keystone-k2g-gpio";
> + reg = <0x02603000 0x100>;
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupts = ,
> + ,
> + ,
> + ,
> + ,
> + ,
> + ,
> + ,
> + ;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + ti,ngpio = <144>;
> + ti,davinci-gpio-unbanked = <0>;
> + clocks = <_clks 0x001b 0x0>;
> + clock-names = "gpio";

I don't see the clocks and clock-names documented in the binding.
Looking at davinci_gpio_irq_setup(), these are required, and a specific
clock name is what the driver is looking for. And you have different
semantics for this on K2G and non-K2G SoCs. Davinci platforms are using
non-DT clocks, so their DT nodes didn't have them.

regards
Suman

> + };
> +
> + gpio1: gpio@260a000 {
> + compatible = "ti,keystone-k2g-gpio";
> + reg = <0x0260a000 0x100>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupts = ,
> + ,
> + ,
> + ,
> + ;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + ti,ngpio = <68>;
> + ti,davinci-gpio-unbanked = <0>;
> + clocks = <_clks 0x001c 0x0>;
> + clock-names = "gpio";
> + };
>   };
>  };
> 



Re: [PATCH 4/4] ARM: dts: keystone-k2g-evm: Add gpio nodes

2017-07-18 Thread Suman Anna
Hi Keerthy,

On 07/18/2017 05:57 AM, Keerthy wrote:
> keystone-k2g has 2 instances of gpio. The first one has all the 144 GPIOs

Please use 66AK2G for keystone-k2g.

> functional( 9 banks with 16 gpios = 144). The second instance has
> only the GPIO0:GPIO67 functional and rest are marked reserved.
> 
> Signed-off-by: Keerthy 
> ---
>  arch/arm/boot/dts/keystone-k2g.dtsi | 42 
> +
>  1 file changed, 42 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi 
> b/arch/arm/boot/dts/keystone-k2g.dtsi
> index bf4d1fa..58ac3db 100644
> --- a/arch/arm/boot/dts/keystone-k2g.dtsi
> +++ b/arch/arm/boot/dts/keystone-k2g.dtsi
> @@ -15,6 +15,7 @@
>  
>  #include 
>  #include 
> +#include 
>  
>  / {
>   compatible = "ti,k2g","ti,keystone";
> @@ -168,5 +169,46 @@
>   #reset-cells = <2>;
>   };
>   };
> +
> + gpio0: gpio@2603000 {
> + compatible = "ti,keystone-k2g-gpio";
> + reg = <0x02603000 0x100>;
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupts = ,
> + ,
> + ,
> + ,
> + ,
> + ,
> + ,
> + ,
> + ;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + ti,ngpio = <144>;
> + ti,davinci-gpio-unbanked = <0>;
> + clocks = <_clks 0x001b 0x0>;
> + clock-names = "gpio";

I don't see the clocks and clock-names documented in the binding.
Looking at davinci_gpio_irq_setup(), these are required, and a specific
clock name is what the driver is looking for. And you have different
semantics for this on K2G and non-K2G SoCs. Davinci platforms are using
non-DT clocks, so their DT nodes didn't have them.

regards
Suman

> + };
> +
> + gpio1: gpio@260a000 {
> + compatible = "ti,keystone-k2g-gpio";
> + reg = <0x0260a000 0x100>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupts = ,
> + ,
> + ,
> + ,
> + ;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + ti,ngpio = <68>;
> + ti,davinci-gpio-unbanked = <0>;
> + clocks = <_clks 0x001c 0x0>;
> + clock-names = "gpio";
> + };
>   };
>  };
> 



[PATCH 4/4] ARM: dts: keystone-k2g-evm: Add gpio nodes

2017-07-18 Thread Keerthy
keystone-k2g has 2 instances of gpio. The first one has all the 144 GPIOs
functional( 9 banks with 16 gpios = 144). The second instance has
only the GPIO0:GPIO67 functional and rest are marked reserved.

Signed-off-by: Keerthy 
---
 arch/arm/boot/dts/keystone-k2g.dtsi | 42 +
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi 
b/arch/arm/boot/dts/keystone-k2g.dtsi
index bf4d1fa..58ac3db 100644
--- a/arch/arm/boot/dts/keystone-k2g.dtsi
+++ b/arch/arm/boot/dts/keystone-k2g.dtsi
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 
 / {
compatible = "ti,k2g","ti,keystone";
@@ -168,5 +169,46 @@
#reset-cells = <2>;
};
};
+
+   gpio0: gpio@2603000 {
+   compatible = "ti,keystone-k2g-gpio";
+   reg = <0x02603000 0x100>;
+   gpio-controller;
+   #gpio-cells = <2>;
+
+   interrupts = ,
+   ,
+   ,
+   ,
+   ,
+   ,
+   ,
+   ,
+   ;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   ti,ngpio = <144>;
+   ti,davinci-gpio-unbanked = <0>;
+   clocks = <_clks 0x001b 0x0>;
+   clock-names = "gpio";
+   };
+
+   gpio1: gpio@260a000 {
+   compatible = "ti,keystone-k2g-gpio";
+   reg = <0x0260a000 0x100>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupts = ,
+   ,
+   ,
+   ,
+   ;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   ti,ngpio = <68>;
+   ti,davinci-gpio-unbanked = <0>;
+   clocks = <_clks 0x001c 0x0>;
+   clock-names = "gpio";
+   };
};
 };
-- 
1.9.1



[PATCH 4/4] ARM: dts: keystone-k2g-evm: Add gpio nodes

2017-07-18 Thread Keerthy
keystone-k2g has 2 instances of gpio. The first one has all the 144 GPIOs
functional( 9 banks with 16 gpios = 144). The second instance has
only the GPIO0:GPIO67 functional and rest are marked reserved.

Signed-off-by: Keerthy 
---
 arch/arm/boot/dts/keystone-k2g.dtsi | 42 +
 1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi 
b/arch/arm/boot/dts/keystone-k2g.dtsi
index bf4d1fa..58ac3db 100644
--- a/arch/arm/boot/dts/keystone-k2g.dtsi
+++ b/arch/arm/boot/dts/keystone-k2g.dtsi
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 
 / {
compatible = "ti,k2g","ti,keystone";
@@ -168,5 +169,46 @@
#reset-cells = <2>;
};
};
+
+   gpio0: gpio@2603000 {
+   compatible = "ti,keystone-k2g-gpio";
+   reg = <0x02603000 0x100>;
+   gpio-controller;
+   #gpio-cells = <2>;
+
+   interrupts = ,
+   ,
+   ,
+   ,
+   ,
+   ,
+   ,
+   ,
+   ;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   ti,ngpio = <144>;
+   ti,davinci-gpio-unbanked = <0>;
+   clocks = <_clks 0x001b 0x0>;
+   clock-names = "gpio";
+   };
+
+   gpio1: gpio@260a000 {
+   compatible = "ti,keystone-k2g-gpio";
+   reg = <0x0260a000 0x100>;
+   gpio-controller;
+   #gpio-cells = <2>;
+   interrupts = ,
+   ,
+   ,
+   ,
+   ;
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   ti,ngpio = <68>;
+   ti,davinci-gpio-unbanked = <0>;
+   clocks = <_clks 0x001c 0x0>;
+   clock-names = "gpio";
+   };
};
 };
-- 
1.9.1