2022-12-15 10:51:45

by Arnaud Ferraris

[permalink] [raw]
Subject: [PATCH] arm64: dts: rockchip: fix input enable pinconf on rk3399

When the input enable pinconf was introduced, a default drive-strength
value of 2 was set for the pull up/down configs. However, this parameter
is unneeded when configuring the pin as input, and having a single
hardcoded value here is actually harmful: GPIOs on the RK3399 have
various same drive-strength capabilities depending on the bank and port
they belong to.

As an example, trying to configure the GPIO4_PD3 pin as an input with
pull-up enabled fails with the following output:

[ 10.706542] rockchip-pinctrl pinctrl: unsupported driver strength 2
[ 10.713661] rockchip-pinctrl pinctrl: pin_config_set op failed for pin 155

(acceptable drive-strength values for this pin being 3, 6, 9 and 12)

Let's drop the drive-strength property from all input pinconfs in order
to solve this issue.

Fixes: ec48c3e82ca3 ("arm64: dts: rockchip: add an input enable pinconf to rk3399")
Signed-off-by: Arnaud Ferraris <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 92c2207e686c..59858f2dc8b9 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -2221,13 +2221,11 @@ pcfg_input_enable: pcfg-input-enable {
pcfg_input_pull_up: pcfg-input-pull-up {
input-enable;
bias-pull-up;
- drive-strength = <2>;
};

pcfg_input_pull_down: pcfg-input-pull-down {
input-enable;
bias-pull-down;
- drive-strength = <2>;
};

clock {
--
2.35.1


2022-12-15 21:14:57

by Caleb Connolly

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: rockchip: fix input enable pinconf on rk3399



On 15/12/2022 10:19, Arnaud Ferraris wrote:
> When the input enable pinconf was introduced, a default drive-strength
> value of 2 was set for the pull up/down configs. However, this parameter
> is unneeded when configuring the pin as input, and having a single
> hardcoded value here is actually harmful: GPIOs on the RK3399 have
> various same drive-strength capabilities depending on the bank and port
> they belong to.
>
> As an example, trying to configure the GPIO4_PD3 pin as an input with
> pull-up enabled fails with the following output:
>
> [ 10.706542] rockchip-pinctrl pinctrl: unsupported driver strength 2
> [ 10.713661] rockchip-pinctrl pinctrl: pin_config_set op failed for pin 155
>
> (acceptable drive-strength values for this pin being 3, 6, 9 and 12)
>
> Let's drop the drive-strength property from all input pinconfs in order
> to solve this issue.
>
> Fixes: ec48c3e82ca3 ("arm64: dts: rockchip: add an input enable pinconf to rk3399")
> Signed-off-by: Arnaud Ferraris <[email protected]>

Reviewed-by: Caleb Connolly <[email protected]>

> ---
> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index 92c2207e686c..59858f2dc8b9 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -2221,13 +2221,11 @@ pcfg_input_enable: pcfg-input-enable {
> pcfg_input_pull_up: pcfg-input-pull-up {
> input-enable;
> bias-pull-up;
> - drive-strength = <2>;
> };
>
> pcfg_input_pull_down: pcfg-input-pull-down {
> input-enable;
> bias-pull-down;
> - drive-strength = <2>;
> };
>
> clock {

--
Kind Regards,
Caleb (they/them)

2023-01-11 10:57:09

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: rockchip: fix input enable pinconf on rk3399

On Thu, 15 Dec 2022 11:19:47 +0100, Arnaud Ferraris wrote:
> When the input enable pinconf was introduced, a default drive-strength
> value of 2 was set for the pull up/down configs. However, this parameter
> is unneeded when configuring the pin as input, and having a single
> hardcoded value here is actually harmful: GPIOs on the RK3399 have
> various same drive-strength capabilities depending on the bank and port
> they belong to.
>
> [...]

Applied, thanks!

[1/1] arm64: dts: rockchip: fix input enable pinconf on rk3399
commit: 6f515b663d49a14fb63f8c5d0a2a4ae53d44790a

Best regards,
--
Heiko Stuebner <[email protected]>