Commit cc165ba4 authored by Jianqun Xu's avatar Jianqun Xu Committed by Bartosz Golaszewski

gpio: rockchip: add support for rk3588

Add V2.1 rockchip gpio controller type, which is part of the
RK3588 SoC.
Signed-off-by: default avatarJianqun Xu <jay.xu@rock-chips.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
parent 036e9cf3
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#define GPIO_TYPE_V1 (0) /* GPIO Version ID reserved */ #define GPIO_TYPE_V1 (0) /* GPIO Version ID reserved */
#define GPIO_TYPE_V2 (0x01000C2B) /* GPIO Version ID 0x01000C2B */ #define GPIO_TYPE_V2 (0x01000C2B) /* GPIO Version ID 0x01000C2B */
#define GPIO_TYPE_V2_1 (0x0101157C) /* GPIO Version ID 0x0101157C */
static const struct rockchip_gpio_regs gpio_regs_v1 = { static const struct rockchip_gpio_regs gpio_regs_v1 = {
.port_dr = 0x00, .port_dr = 0x00,
...@@ -664,7 +665,7 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank) ...@@ -664,7 +665,7 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)
id = readl(bank->reg_base + gpio_regs_v2.version_id); id = readl(bank->reg_base + gpio_regs_v2.version_id);
/* If not gpio v2, that is default to v1. */ /* If not gpio v2, that is default to v1. */
if (id == GPIO_TYPE_V2) { if (id == GPIO_TYPE_V2 || id == GPIO_TYPE_V2_1) {
bank->gpio_regs = &gpio_regs_v2; bank->gpio_regs = &gpio_regs_v2;
bank->gpio_type = GPIO_TYPE_V2; bank->gpio_type = GPIO_TYPE_V2;
bank->db_clk = of_clk_get(bank->of_node, 1); bank->db_clk = of_clk_get(bank->of_node, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment