Message ID | 20241111023412.3466161-4-ye.zhang@rock-chips.com |
---|---|
State | New |
Headers | show |
Series | gpio: rockchip: Update the GPIO driver | expand |
On Mon, Nov 11, 2024 at 10:34:11AM +0800, Ye Zhang wrote: > Support the next version GPIO controller on SoCs like rk3576. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Hi, On Mon, Nov 11, 2024 at 10:34:11AM +0800, Ye Zhang wrote: > Support the next version GPIO controller on SoCs like rk3576. > > Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com> > --- Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> This is needed for 6.13, which introduces RK3576 support and currently (linux-next) tries to use the GPIO controller in V1 mode. -- Sebastian > drivers/gpio/gpio-rockchip.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c > index f05b92e0e977..b7a43e492965 100644 > --- a/drivers/gpio/gpio-rockchip.c > +++ b/drivers/gpio/gpio-rockchip.c > @@ -35,6 +35,7 @@ > #define GPIO_TYPE_V1 (0) /* GPIO Version ID reserved */ > #define GPIO_TYPE_V2 (0x01000C2B) > #define GPIO_TYPE_V2_1 (0x0101157C) > +#define GPIO_TYPE_V2_2 (0x010219C8) > > static const struct rockchip_gpio_regs gpio_regs_v1 = { > .port_dr = 0x00, > @@ -674,6 +675,7 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank) > break; > case GPIO_TYPE_V2: > case GPIO_TYPE_V2_1: > + case GPIO_TYPE_V2_2: > bank->gpio_regs = &gpio_regs_v2; > bank->gpio_type = GPIO_TYPE_V2; > bank->db_clk = of_clk_get(bank->of_node, 1); > -- > 2.34.1 > >
On Mon, Nov 11, 2024 at 3:34 AM Ye Zhang <ye.zhang@rock-chips.com> wrote: > Support the next version GPIO controller on SoCs like rk3576. > > Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index f05b92e0e977..b7a43e492965 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -35,6 +35,7 @@ #define GPIO_TYPE_V1 (0) /* GPIO Version ID reserved */ #define GPIO_TYPE_V2 (0x01000C2B) #define GPIO_TYPE_V2_1 (0x0101157C) +#define GPIO_TYPE_V2_2 (0x010219C8) static const struct rockchip_gpio_regs gpio_regs_v1 = { .port_dr = 0x00, @@ -674,6 +675,7 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank) break; case GPIO_TYPE_V2: case GPIO_TYPE_V2_1: + case GPIO_TYPE_V2_2: bank->gpio_regs = &gpio_regs_v2; bank->gpio_type = GPIO_TYPE_V2; bank->db_clk = of_clk_get(bank->of_node, 1);
Support the next version GPIO controller on SoCs like rk3576. Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com> --- drivers/gpio/gpio-rockchip.c | 2 ++ 1 file changed, 2 insertions(+)