* [PATCH 0/5] ARM: dts: rcar2: Configure pull up for GPIO keys
@ 2021-04-30 13:10 Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 1/5] ARM: dts: koelsch: Rename sw2 to keyboard Geert Uytterhoeven
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2021-04-30 13:10 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven
Hi all,
This patches series follows up on the work started with "[PATCH] ARM:
dts: koelsch: Configure pull-up for SOFT_SW GPIO keys"[1], and
explicitly configures pull-ups for pins used for GPIO keys without
external pull-up resistors on R-Car Gen2 boards, preceded by a small
cleanup. Currently GPIO keys rely on the initial states of these pins,
which fortunately match the expectations, but it is better to be
explicit.
To actually make a difference, this depends on "[PATCH 00/12] pinctrl:
renesas: Add more bias pinconf support"[2]. Note that it is safe to
apply this series before [2] has landed, as pinctrl_bind_pins() does not
consider -ENOTSUPP a fatal error.
It would be great if people with access to the hardware could do similar
tests like I did on Koelsch[3].
I hope to queue this in renesas-devel for v5.14.
Thanks for your comments!
[1] https://lore.kernel.org/r/20210303132941.3938516-1-geert+renesas@glider.be/
[2] https://lore.kernel.org/r/cover.1619785375.git.geert+renesas@glider.be/
[3] https://lore.kernel.org/r/20210303132619.3938128-1-geert+renesas@glider.be
Geert Uytterhoeven (5):
ARM: dts: koelsch: Rename sw2 to keyboard
ARM: dts: lager: Configure pull-up for SOFT_SW GPIO keys
ARM: dts: blanche: Configure pull-up for SOFT_SW and SW25 GPIO keys
ARM: dts: gose: Configure pull-up for SOFT_SW GPIO keys
ARM: dts: silk: Configure pull-up for SOFT_SW GPIO keys
arch/arm/boot/dts/r8a7790-lager.dts | 8 ++++++++
arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++--
arch/arm/boot/dts/r8a7792-blanche.dts | 8 ++++++++
arch/arm/boot/dts/r8a7793-gose.dts | 10 +++++++++-
arch/arm/boot/dts/r8a7794-silk.dts | 10 +++++++++-
5 files changed, 36 insertions(+), 4 deletions(-)
--
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] ARM: dts: koelsch: Rename sw2 to keyboard
2021-04-30 13:10 [PATCH 0/5] ARM: dts: rcar2: Configure pull up for GPIO keys Geert Uytterhoeven
@ 2021-04-30 13:10 ` Geert Uytterhoeven
2021-05-01 7:10 ` Niklas Söderlund
2021-04-30 13:10 ` [PATCH 2/5] ARM: dts: lager: Configure pull-up for SOFT_SW GPIO keys Geert Uytterhoeven
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2021-04-30 13:10 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven
Rename "sw2_pins" and "sw2" to "keyboard_pins" resp. "keyboard", to
comply with generic name recommendations.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index 61e881bbbf6ee5aa..2a8b6fd9095cceba 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -81,7 +81,7 @@ lbsc {
keyboard {
compatible = "gpio-keys";
- pinctrl-0 = <&sw2_pins>;
+ pinctrl-0 = <&keyboard_pins>;
pinctrl-names = "default";
key-1 {
@@ -622,7 +622,7 @@ sound_clk_pins: sound_clk {
function = "audio_clk";
};
- sw2_pins: sw2 {
+ keyboard_pins: keyboard {
pins = "GP_5_0", "GP_5_1", "GP_5_2", "GP_5_3";
bias-pull-up;
};
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] ARM: dts: lager: Configure pull-up for SOFT_SW GPIO keys
2021-04-30 13:10 [PATCH 0/5] ARM: dts: rcar2: Configure pull up for GPIO keys Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 1/5] ARM: dts: koelsch: Rename sw2 to keyboard Geert Uytterhoeven
@ 2021-04-30 13:10 ` Geert Uytterhoeven
2021-05-25 7:17 ` Wolfram Sang
2021-04-30 13:10 ` [PATCH 3/5] ARM: dts: blanche: Configure pull-up for SOFT_SW and SW25 " Geert Uytterhoeven
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2021-04-30 13:10 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven
The GPIO pins connected to the 4 Software Switches (SW2) do not have
external pull-up resistors, but rely on internal pull-ups being enabled.
Fortunately this is satisfied by the initial state of these pins.
Make this explicit by enabling bias-pull-up, to remove the dependency on
initial state and/or boot loader configuration.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a7790-lager.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 2dad0742d2ba159b..fa6d986b5d4632cf 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -81,6 +81,9 @@ lbsc {
keyboard {
compatible = "gpio-keys";
+ pinctrl-0 = <&keyboard_pins>;
+ pinctrl-names = "default";
+
one {
linux,code = <KEY_1>;
label = "SW2-1";
@@ -659,6 +662,11 @@ sound_clk_pins: sound_clk {
groups = "audio_clk_a";
function = "audio_clk";
};
+
+ keyboard_pins: keyboard {
+ pins = "GP_1_14", "GP_1_24", "GP_1_26", "GP_1_28";
+ bias-pull-up;
+ };
};
ðer {
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] ARM: dts: blanche: Configure pull-up for SOFT_SW and SW25 GPIO keys
2021-04-30 13:10 [PATCH 0/5] ARM: dts: rcar2: Configure pull up for GPIO keys Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 1/5] ARM: dts: koelsch: Rename sw2 to keyboard Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 2/5] ARM: dts: lager: Configure pull-up for SOFT_SW GPIO keys Geert Uytterhoeven
@ 2021-04-30 13:10 ` Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 4/5] ARM: dts: gose: Configure pull-up for SOFT_SW " Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 5/5] ARM: dts: silk: " Geert Uytterhoeven
4 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2021-04-30 13:10 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven
The GPIO pins connected to the 4 Software Switches (SW2) and the second
Tact Switch (SW25) do not have external pull-up resistors, but rely on
internal pull-ups being enabled. Fortunately this is satisfied by the
initial state of these pins.
Make this explicit by enabling bias-pull-up, to remove the dependency on
initial state and/or boot loader configuration.
Note that the GPIO pin connected to the first Tact Switch (SW24) does
have an external pull-up resistor.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a7792-blanche.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7792-blanche.dts b/arch/arm/boot/dts/r8a7792-blanche.dts
index c100ae903a46bb1c..62aa9f61321bea74 100644
--- a/arch/arm/boot/dts/r8a7792-blanche.dts
+++ b/arch/arm/boot/dts/r8a7792-blanche.dts
@@ -112,6 +112,9 @@ x2_clk: x2 {
keyboard {
compatible = "gpio-keys";
+ pinctrl-0 = <&keyboard_pins>;
+ pinctrl-names = "default";
+
key-1 {
linux,code = <KEY_1>;
label = "SW2-1";
@@ -235,6 +238,11 @@ du1_pins: du1 {
function = "du1";
};
+ keyboard_pins: keyboard {
+ pins = "GP_3_10", "GP_3_11", "GP_3_12", "GP_3_15", "GP_11_02";
+ bias-pull-up;
+ };
+
pmic_irq_pins: pmicirq {
groups = "intc_irq2";
function = "intc";
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] ARM: dts: gose: Configure pull-up for SOFT_SW GPIO keys
2021-04-30 13:10 [PATCH 0/5] ARM: dts: rcar2: Configure pull up for GPIO keys Geert Uytterhoeven
` (2 preceding siblings ...)
2021-04-30 13:10 ` [PATCH 3/5] ARM: dts: blanche: Configure pull-up for SOFT_SW and SW25 " Geert Uytterhoeven
@ 2021-04-30 13:10 ` Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 5/5] ARM: dts: silk: " Geert Uytterhoeven
4 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2021-04-30 13:10 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven
The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW2) do
not have external pull-up resistors, but rely on internal pull-ups being
enabled. Fortunately this is satisfied by the initial state of these
pins.
Make this explicit by enabling bias-pull-up, to remove the dependency on
initial state and/or boot loader configuration.
While at it, rename the surrounding device node from "gpio-keys" to
"keyboard", to comply with generic node name recommendations.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a7793-gose.dts | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
index 87fa57a99399b73d..479e0fdf0c37311e 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -64,9 +64,12 @@ memory@40000000 {
reg = <0 0x40000000 0 0x40000000>;
};
- gpio-keys {
+ keyboard {
compatible = "gpio-keys";
+ pinctrl-0 = <&keyboard_pins>;
+ pinctrl-names = "default";
+
key-1 {
gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
linux,code = <KEY_1>;
@@ -567,6 +570,11 @@ sound_clk_pins: sound_clk {
function = "audio_clk";
};
+ keyboard_pins: keyboard {
+ pins = "GP_5_0", "GP_5_1", "GP_5_2", "GP_5_3";
+ bias-pull-up;
+ };
+
vin0_pins: vin0 {
groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
function = "vin0";
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] ARM: dts: silk: Configure pull-up for SOFT_SW GPIO keys
2021-04-30 13:10 [PATCH 0/5] ARM: dts: rcar2: Configure pull up for GPIO keys Geert Uytterhoeven
` (3 preceding siblings ...)
2021-04-30 13:10 ` [PATCH 4/5] ARM: dts: gose: Configure pull-up for SOFT_SW " Geert Uytterhoeven
@ 2021-04-30 13:10 ` Geert Uytterhoeven
4 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2021-04-30 13:10 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-renesas-soc, linux-arm-kernel, Geert Uytterhoeven
The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW12) do
not have external pull-up resistors, but rely on internal pull-ups being
enabled. Fortunately this is satisfied by the initial state of these
pins.
Make this explicit by enabling bias-pull-up, to remove the dependency on
initial state and/or boot loader configuration.
While at it, rename the surrounding device node from "gpio-keys" to
"keyboard", to comply with generic node name recommendations.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a7794-silk.dts | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/r8a7794-silk.dts b/arch/arm/boot/dts/r8a7794-silk.dts
index eb89a27a6ed0c9aa..cafa3046daa4baf4 100644
--- a/arch/arm/boot/dts/r8a7794-silk.dts
+++ b/arch/arm/boot/dts/r8a7794-silk.dts
@@ -45,9 +45,12 @@ memory@40000000 {
reg = <0 0x40000000 0 0x40000000>;
};
- gpio-keys {
+ keyboard {
compatible = "gpio-keys";
+ pinctrl-0 = <&keyboard_pins>;
+ pinctrl-names = "default";
+
key-3 {
gpios = <&gpio5 10 GPIO_ACTIVE_LOW>;
linux,code = <KEY_3>;
@@ -358,6 +361,11 @@ du1_pins: du1 {
function = "du1";
};
+ keyboard_pins: keyboard {
+ pins = "GP_3_9", "GP_3_10", "GP_3_11", "GP_3_12";
+ bias-pull-up;
+ };
+
ssi_pins: sound {
groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
function = "ssi";
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/5] ARM: dts: koelsch: Rename sw2 to keyboard
2021-04-30 13:10 ` [PATCH 1/5] ARM: dts: koelsch: Rename sw2 to keyboard Geert Uytterhoeven
@ 2021-05-01 7:10 ` Niklas Söderlund
0 siblings, 0 replies; 8+ messages in thread
From: Niklas Söderlund @ 2021-05-01 7:10 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-arm-kernel
Hi Geert,
Thanks for your work.
On 2021-04-30 15:10:51 +0200, Geert Uytterhoeven wrote:
> Rename "sw2_pins" and "sw2" to "keyboard_pins" resp. "keyboard", to
> comply with generic name recommendations.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
> index 61e881bbbf6ee5aa..2a8b6fd9095cceba 100644
> --- a/arch/arm/boot/dts/r8a7791-koelsch.dts
> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
> @@ -81,7 +81,7 @@ lbsc {
> keyboard {
> compatible = "gpio-keys";
>
> - pinctrl-0 = <&sw2_pins>;
> + pinctrl-0 = <&keyboard_pins>;
> pinctrl-names = "default";
>
> key-1 {
> @@ -622,7 +622,7 @@ sound_clk_pins: sound_clk {
> function = "audio_clk";
> };
>
> - sw2_pins: sw2 {
> + keyboard_pins: keyboard {
> pins = "GP_5_0", "GP_5_1", "GP_5_2", "GP_5_3";
> bias-pull-up;
> };
> --
> 2.25.1
>
--
Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/5] ARM: dts: lager: Configure pull-up for SOFT_SW GPIO keys
2021-04-30 13:10 ` [PATCH 2/5] ARM: dts: lager: Configure pull-up for SOFT_SW GPIO keys Geert Uytterhoeven
@ 2021-05-25 7:17 ` Wolfram Sang
0 siblings, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2021-05-25 7:17 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
On Fri, Apr 30, 2021 at 03:10:52PM +0200, Geert Uytterhoeven wrote:
> The GPIO pins connected to the 4 Software Switches (SW2) do not have
> external pull-up resistors, but rely on internal pull-ups being enabled.
> Fortunately this is satisfied by the initial state of these pins.
>
> Make this explicit by enabling bias-pull-up, to remove the dependency on
> initial state and/or boot loader configuration.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Works fine on my Lager board:
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-05-25 7:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 13:10 [PATCH 0/5] ARM: dts: rcar2: Configure pull up for GPIO keys Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 1/5] ARM: dts: koelsch: Rename sw2 to keyboard Geert Uytterhoeven
2021-05-01 7:10 ` Niklas Söderlund
2021-04-30 13:10 ` [PATCH 2/5] ARM: dts: lager: Configure pull-up for SOFT_SW GPIO keys Geert Uytterhoeven
2021-05-25 7:17 ` Wolfram Sang
2021-04-30 13:10 ` [PATCH 3/5] ARM: dts: blanche: Configure pull-up for SOFT_SW and SW25 " Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 4/5] ARM: dts: gose: Configure pull-up for SOFT_SW " Geert Uytterhoeven
2021-04-30 13:10 ` [PATCH 5/5] ARM: dts: silk: " Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).