[3/3] arm64: dts: Add gpio_intc node for Amlogic-T7 SoCs

Message ID 20230913080924.3336391-4-huqiang.qin@amlogic.com
State New
Headers
Series Add GPIO interrupt support for Amlogic-T7 SoCs |

Commit Message

Huqiang Qin Sept. 13, 2023, 8:09 a.m. UTC
  Add GPIO interrupt controller device.

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
  

Comments

Neil Armstrong Sept. 14, 2023, 8:26 a.m. UTC | #1
On 13/09/2023 10:09, Huqiang Qin wrote:
> Add GPIO interrupt controller device.
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
> ---
>   arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> index dae3465bd39b..21b2436c47e2 100644
> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> @@ -155,6 +155,16 @@ watchdog@2100 {
>   				clocks = <&xtal>;
>   			};
>   
> +			gpio_intc: interrupt-controller@4080 {
> +				compatible = "amlogic,t7-gpio-intc",
> +					     "amlogic,meson-gpio-intc";
> +				reg = <0x0 0x4080 0x0 0x20>;
> +				interrupt-controller;
> +				#interrupt-cells = <2>;
> +				amlogic,channel-interrupts =
> +					<10 11 12 13 14 15 16 17 18 19 20 21>;
> +			};
> +
>   			uart_a: serial@78000 {
>   				compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
>   				reg = <0x0 0x78000 0x0 0x18>;

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
  
Lucas Tanure Sept. 27, 2023, 6:07 a.m. UTC | #2
On 14-09-2023 09:26, neil.armstrong@linaro.org wrote:
> On 13/09/2023 10:09, Huqiang Qin wrote:
>> Add GPIO interrupt controller device.
>>
>> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
>> ---
>>   arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi 
>> b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
>> index dae3465bd39b..21b2436c47e2 100644
>> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
>> @@ -155,6 +155,16 @@ watchdog@2100 {
>>                   clocks = <&xtal>;
>>               };
>> +            gpio_intc: interrupt-controller@4080 {
>> +                compatible = "amlogic,t7-gpio-intc",
>> +                         "amlogic,meson-gpio-intc";
>> +                reg = <0x0 0x4080 0x0 0x20>;
>> +                interrupt-controller;
>> +                #interrupt-cells = <2>;
>> +                amlogic,channel-interrupts =
>> +                    <10 11 12 13 14 15 16 17 18 19 20 21>;
>> +            };
>> +
>>               uart_a: serial@78000 {
>>                   compatible = "amlogic,t7-uart", 
>> "amlogic,meson-s4-uart";
>>                   reg = <0x0 0x78000 0x0 0x18>;
> 
> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
I re-tested this today with Vim4 and works fine.
By works I mean, vim4 is able to boot without panics but drops to 
emergency shell as expected.

Tested-by: Lucas Tanure <tanure@linux.com>
  

Patch

diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index dae3465bd39b..21b2436c47e2 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -155,6 +155,16 @@  watchdog@2100 {
 				clocks = <&xtal>;
 			};
 
+			gpio_intc: interrupt-controller@4080 {
+				compatible = "amlogic,t7-gpio-intc",
+					     "amlogic,meson-gpio-intc";
+				reg = <0x0 0x4080 0x0 0x20>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+				amlogic,channel-interrupts =
+					<10 11 12 13 14 15 16 17 18 19 20 21>;
+			};
+
 			uart_a: serial@78000 {
 				compatible = "amlogic,t7-uart", "amlogic,meson-s4-uart";
 				reg = <0x0 0x78000 0x0 0x18>;