[PATCH v2 2/4] pinctrl: sunxi: h6-r: Add s_rsb pin functions

25 views
Skip to first unread message

Samuel Holland

unread,
Jan 3, 2021, 5:00:14 AM1/3/21
to Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Rob Herring, Michael Turquette, Stephen Boyd, Linus Walleij, Philipp Zabel, Andre Przywara, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linu...@vger.kernel.org, linux...@vger.kernel.org, linux-...@vger.kernel.org, linux...@googlegroups.com, Samuel Holland
As there is an RSB controller in the H6 SoC, there should be some pin
configuration for it. While no such configuration is documented, the
"s_i2c" pins are suspiciously on the "alternate" function 3, with no
primary function 2 given. This suggests the primary function for these
pins is actually RSB, and that is indeed the case.

Add the "s_rsb" pin functions so the RSB controller can be used.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c
index 4557e18d5989..c7d90c44e87a 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h6-r.c
@@ -24,11 +24,13 @@ static const struct sunxi_desc_pin sun50i_h6_r_pins[] = {
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 0),
SUNXI_FUNCTION(0x0, "gpio_in"),
SUNXI_FUNCTION(0x1, "gpio_out"),
+ SUNXI_FUNCTION(0x2, "s_rsb"), /* SCK */
SUNXI_FUNCTION(0x3, "s_i2c"), /* SCK */
SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)), /* PL_EINT0 */
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 1),
SUNXI_FUNCTION(0x0, "gpio_in"),
SUNXI_FUNCTION(0x1, "gpio_out"),
+ SUNXI_FUNCTION(0x2, "s_rsb"), /* SDA */
SUNXI_FUNCTION(0x3, "s_i2c"), /* SDA */
SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)), /* PL_EINT1 */
SUNXI_PIN(SUNXI_PINCTRL_PIN(L, 2),
--
2.26.2

Chen-Yu Tsai

unread,
Jan 3, 2021, 9:20:02 AM1/3/21
to Samuel Holland, Maxime Ripard, Jernej Skrabec, Rob Herring, Michael Turquette, Stephen Boyd, Linus Walleij, Philipp Zabel, Andre Przywara, devicetree, linux-arm-kernel, linux-clk, open list:GPIO SUBSYSTEM, linux-kernel, linux-sunxi
On Sun, Jan 3, 2021 at 6:00 PM Samuel Holland <sam...@sholland.org> wrote:
>
> As there is an RSB controller in the H6 SoC, there should be some pin
> configuration for it. While no such configuration is documented, the
> "s_i2c" pins are suspiciously on the "alternate" function 3, with no
> primary function 2 given. This suggests the primary function for these
> pins is actually RSB, and that is indeed the case.
>
> Add the "s_rsb" pin functions so the RSB controller can be used.
>
> Signed-off-by: Samuel Holland <sam...@sholland.org>

Acked-by: Chen-Yu Tsai <we...@csie.org>

Linus Walleij

unread,
Jan 5, 2021, 5:35:29 PM1/5/21
to Samuel Holland, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Rob Herring, Michael Turquette, Stephen Boyd, Philipp Zabel, Andre Przywara, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Linux ARM, linux-clk, open list:GPIO SUBSYSTEM, linux-...@vger.kernel.org, linux-sunxi
On Sun, Jan 3, 2021 at 11:00 AM Samuel Holland <sam...@sholland.org> wrote:

> As there is an RSB controller in the H6 SoC, there should be some pin
> configuration for it. While no such configuration is documented, the
> "s_i2c" pins are suspiciously on the "alternate" function 3, with no
> primary function 2 given. This suggests the primary function for these
> pins is actually RSB, and that is indeed the case.
>
> Add the "s_rsb" pin functions so the RSB controller can be used.
>
> Signed-off-by: Samuel Holland <sam...@sholland.org>

Is it OK if I just apply this patch to the pinctrl tree?

Yours,
Linus Walleij

Chen-Yu Tsai

unread,
Jan 5, 2021, 9:40:21 PM1/5/21
to Linus Walleij, Samuel Holland, Maxime Ripard, Jernej Skrabec, Rob Herring, Michael Turquette, Stephen Boyd, Philipp Zabel, Andre Przywara, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Linux ARM, linux-clk, open list:GPIO SUBSYSTEM, linux-...@vger.kernel.org, linux-sunxi
Please do.

Thanks
ChenYu

Linus Walleij

unread,
Jan 6, 2021, 3:10:46 PM1/6/21
to Samuel Holland, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Rob Herring, Michael Turquette, Stephen Boyd, Philipp Zabel, Andre Przywara, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Linux ARM, linux-clk, open list:GPIO SUBSYSTEM, linux-...@vger.kernel.org, linux-sunxi
On Sun, Jan 3, 2021 at 11:00 AM Samuel Holland <sam...@sholland.org> wrote:

> As there is an RSB controller in the H6 SoC, there should be some pin
> configuration for it. While no such configuration is documented, the
> "s_i2c" pins are suspiciously on the "alternate" function 3, with no
> primary function 2 given. This suggests the primary function for these
> pins is actually RSB, and that is indeed the case.
>
> Add the "s_rsb" pin functions so the RSB controller can be used.
>
> Signed-off-by: Samuel Holland <sam...@sholland.org>

This patch applied to the pinctrl tree.

Yours,
Linus Walleij
Reply all
Reply to author
Forward
0 new messages