[2/3] irqchip: Add support for Amlogic-T7 SoCs

Message ID 20230913080924.3336391-3-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
  The Amlogic-T7 SoCs support 12 GPIO IRQ lines compared with previous
serial chips and have something different, details are as below.

IRQ Number:
- 156      1 pin  on bank TESTN
- 155:148  8 pins on bank H
- 147:129 19 pins on bank Y
- 128:115 14 pins on bank M
- 114:91  24 pins on bank T
- 90:77   14 pins on bank Z
- 76:70    7 pins on bank E
- 69:57   13 pins on bank D
- 56:40   17 pins on bank W
- 39:20   20 pins on bank X
- 19:13    7 pins on bank C
- 12:0    13 pins on bank B

Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
---
 drivers/irqchip/irq-meson-gpio.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Neil Armstrong Sept. 14, 2023, 8:26 a.m. UTC | #1
On 13/09/2023 10:09, Huqiang Qin wrote:
> The Amlogic-T7 SoCs support 12 GPIO IRQ lines compared with previous
> serial chips and have something different, details are as below.
> 
> IRQ Number:
> - 156      1 pin  on bank TESTN
> - 155:148  8 pins on bank H
> - 147:129 19 pins on bank Y
> - 128:115 14 pins on bank M
> - 114:91  24 pins on bank T
> - 90:77   14 pins on bank Z
> - 76:70    7 pins on bank E
> - 69:57   13 pins on bank D
> - 56:40   17 pins on bank W
> - 39:20   20 pins on bank X
> - 19:13    7 pins on bank C
> - 12:0    13 pins on bank B
> 
> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
> ---
>   drivers/irqchip/irq-meson-gpio.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
> index f88df39f4129..9a1791908598 100644
> --- a/drivers/irqchip/irq-meson-gpio.c
> +++ b/drivers/irqchip/irq-meson-gpio.c
> @@ -154,6 +154,10 @@ static const struct meson_gpio_irq_params c3_params = {
>   	INIT_MESON_S4_COMMON_DATA(55)
>   };
>   
> +static const struct meson_gpio_irq_params t7_params = {
> +	INIT_MESON_S4_COMMON_DATA(157)
> +};
> +
>   static const struct of_device_id meson_irq_gpio_matches[] __maybe_unused = {
>   	{ .compatible = "amlogic,meson8-gpio-intc", .data = &meson8_params },
>   	{ .compatible = "amlogic,meson8b-gpio-intc", .data = &meson8b_params },
> @@ -165,6 +169,7 @@ static const struct of_device_id meson_irq_gpio_matches[] __maybe_unused = {
>   	{ .compatible = "amlogic,meson-a1-gpio-intc", .data = &a1_params },
>   	{ .compatible = "amlogic,meson-s4-gpio-intc", .data = &s4_params },
>   	{ .compatible = "amlogic,c3-gpio-intc", .data = &c3_params },
> +	{ .compatible = "amlogic,t7-gpio-intc", .data = &t7_params },
>   	{ }
>   };
>   

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:
>> The Amlogic-T7 SoCs support 12 GPIO IRQ lines compared with previous
>> serial chips and have something different, details are as below.
>>
>> IRQ Number:
>> - 156      1 pin  on bank TESTN
>> - 155:148  8 pins on bank H
>> - 147:129 19 pins on bank Y
>> - 128:115 14 pins on bank M
>> - 114:91  24 pins on bank T
>> - 90:77   14 pins on bank Z
>> - 76:70    7 pins on bank E
>> - 69:57   13 pins on bank D
>> - 56:40   17 pins on bank W
>> - 39:20   20 pins on bank X
>> - 19:13    7 pins on bank C
>> - 12:0    13 pins on bank B
>>
>> Signed-off-by: Huqiang Qin <huqiang.qin@amlogic.com>
>> ---
>>   drivers/irqchip/irq-meson-gpio.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/irqchip/irq-meson-gpio.c 
>> b/drivers/irqchip/irq-meson-gpio.c
>> index f88df39f4129..9a1791908598 100644
>> --- a/drivers/irqchip/irq-meson-gpio.c
>> +++ b/drivers/irqchip/irq-meson-gpio.c
>> @@ -154,6 +154,10 @@ static const struct meson_gpio_irq_params 
>> c3_params = {
>>       INIT_MESON_S4_COMMON_DATA(55)
>>   };
>> +static const struct meson_gpio_irq_params t7_params = {
>> +    INIT_MESON_S4_COMMON_DATA(157)
>> +};
>> +
>>   static const struct of_device_id meson_irq_gpio_matches[] 
>> __maybe_unused = {
>>       { .compatible = "amlogic,meson8-gpio-intc", .data = 
>> &meson8_params },
>>       { .compatible = "amlogic,meson8b-gpio-intc", .data = 
>> &meson8b_params },
>> @@ -165,6 +169,7 @@ static const struct of_device_id 
>> meson_irq_gpio_matches[] __maybe_unused = {
>>       { .compatible = "amlogic,meson-a1-gpio-intc", .data = &a1_params },
>>       { .compatible = "amlogic,meson-s4-gpio-intc", .data = &s4_params },
>>       { .compatible = "amlogic,c3-gpio-intc", .data = &c3_params },
>> +    { .compatible = "amlogic,t7-gpio-intc", .data = &t7_params },
>>       { }
>>   };
> 
> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.orgTested-by: Lucas Tanure <tanure@linux.com>
  

Patch

diff --git a/drivers/irqchip/irq-meson-gpio.c b/drivers/irqchip/irq-meson-gpio.c
index f88df39f4129..9a1791908598 100644
--- a/drivers/irqchip/irq-meson-gpio.c
+++ b/drivers/irqchip/irq-meson-gpio.c
@@ -154,6 +154,10 @@  static const struct meson_gpio_irq_params c3_params = {
 	INIT_MESON_S4_COMMON_DATA(55)
 };
 
+static const struct meson_gpio_irq_params t7_params = {
+	INIT_MESON_S4_COMMON_DATA(157)
+};
+
 static const struct of_device_id meson_irq_gpio_matches[] __maybe_unused = {
 	{ .compatible = "amlogic,meson8-gpio-intc", .data = &meson8_params },
 	{ .compatible = "amlogic,meson8b-gpio-intc", .data = &meson8b_params },
@@ -165,6 +169,7 @@  static const struct of_device_id meson_irq_gpio_matches[] __maybe_unused = {
 	{ .compatible = "amlogic,meson-a1-gpio-intc", .data = &a1_params },
 	{ .compatible = "amlogic,meson-s4-gpio-intc", .data = &s4_params },
 	{ .compatible = "amlogic,c3-gpio-intc", .data = &c3_params },
+	{ .compatible = "amlogic,t7-gpio-intc", .data = &t7_params },
 	{ }
 };