From: Sebastian Reichel <sebastian.reichel@collabora.com> To: Heiko Stuebner <heiko@sntech.de> Cc: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, linux-gpio@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Jianqun Xu <jay.xu@rock-chips.com>, kernel@collabora.com, Sebastian Reichel <sebastian.reichel@collabora.com> Subject: [PATCH 2/2] gpio: rockchip: add support for rk3588 Date: Thu, 23 Jun 2022 18:08:01 +0200 [thread overview] Message-ID: <20220623160801.240779-3-sebastian.reichel@collabora.com> (raw) In-Reply-To: <20220623160801.240779-1-sebastian.reichel@collabora.com> From: Jianqun Xu <jay.xu@rock-chips.com> Add V2.1 rockchip gpio controller type, which is part of the RK3588 SoC. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> --- drivers/gpio/gpio-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index e342a6dc4c6c..f91e876fd969 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -27,6 +27,7 @@ #define GPIO_TYPE_V1 (0) /* GPIO Version ID reserved */ #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 = { .port_dr = 0x00, @@ -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); /* 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_type = GPIO_TYPE_V2; bank->db_clk = of_clk_get(bank->of_node, 1); -- 2.35.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Reichel <sebastian.reichel@collabora.com> To: Heiko Stuebner <heiko@sntech.de> Cc: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, linux-gpio@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Jianqun Xu <jay.xu@rock-chips.com>, kernel@collabora.com, Sebastian Reichel <sebastian.reichel@collabora.com> Subject: [PATCH 2/2] gpio: rockchip: add support for rk3588 Date: Thu, 23 Jun 2022 18:08:01 +0200 [thread overview] Message-ID: <20220623160801.240779-3-sebastian.reichel@collabora.com> (raw) In-Reply-To: <20220623160801.240779-1-sebastian.reichel@collabora.com> From: Jianqun Xu <jay.xu@rock-chips.com> Add V2.1 rockchip gpio controller type, which is part of the RK3588 SoC. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> --- drivers/gpio/gpio-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index e342a6dc4c6c..f91e876fd969 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -27,6 +27,7 @@ #define GPIO_TYPE_V1 (0) /* GPIO Version ID reserved */ #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 = { .port_dr = 0x00, @@ -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); /* 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_type = GPIO_TYPE_V2; bank->db_clk = of_clk_get(bank->of_node, 1); -- 2.35.1
next prev parent reply other threads:[~2022-06-23 16:08 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-23 16:07 [PATCH 0/2] RK3588 GPIO Support Sebastian Reichel 2022-06-23 16:07 ` Sebastian Reichel 2022-06-23 16:08 ` [PATCH 1/2] dt-bindings: gpio: rockchip: add gpio-ranges Sebastian Reichel 2022-06-23 16:08 ` Sebastian Reichel 2022-06-24 16:34 ` Heiko Stuebner 2022-06-24 16:34 ` Heiko Stuebner 2022-06-28 13:58 ` Linus Walleij 2022-06-28 13:58 ` Linus Walleij 2022-06-23 16:08 ` Sebastian Reichel [this message] 2022-06-23 16:08 ` [PATCH 2/2] gpio: rockchip: add support for rk3588 Sebastian Reichel 2022-06-24 16:34 ` Heiko Stuebner 2022-06-24 16:34 ` Heiko Stuebner 2022-07-01 10:32 ` [PATCH 0/2] RK3588 GPIO Support Bartosz Golaszewski 2022-07-01 10:32 ` Bartosz Golaszewski
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220623160801.240779-3-sebastian.reichel@collabora.com \ --to=sebastian.reichel@collabora.com \ --cc=brgl@bgdev.pl \ --cc=devicetree@vger.kernel.org \ --cc=heiko@sntech.de \ --cc=jay.xu@rock-chips.com \ --cc=kernel@collabora.com \ --cc=krzk+dt@kernel.org \ --cc=linus.walleij@linaro.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=robh+dt@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.