All of lore.kernel.org
 help / color / mirror / Atom feed
From: Caleb Connolly <kc@postmarketos.org>
To: Arnaud Ferraris <arnaud.ferraris@collabora.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: kernel@collabora.com
Subject: Re: [PATCH] arm64: dts: rockchip: fix input enable pinconf on rk3399
Date: Thu, 15 Dec 2022 20:42:02 +0000	[thread overview]
Message-ID: <78769cf4-84cc-5195-57b8-823d9fc33794@postmarketos.org> (raw)
In-Reply-To: <20221215101947.254896-1-arnaud.ferraris@collabora.com>



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 <arnaud.ferraris@collabora.com>

Reviewed-by: Caleb Connolly <kc@postmarketos.org>

> ---
>   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)

_______________________________________________
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: Caleb Connolly <kc@postmarketos.org>
To: Arnaud Ferraris <arnaud.ferraris@collabora.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: kernel@collabora.com
Subject: Re: [PATCH] arm64: dts: rockchip: fix input enable pinconf on rk3399
Date: Thu, 15 Dec 2022 20:42:02 +0000	[thread overview]
Message-ID: <78769cf4-84cc-5195-57b8-823d9fc33794@postmarketos.org> (raw)
In-Reply-To: <20221215101947.254896-1-arnaud.ferraris@collabora.com>



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 <arnaud.ferraris@collabora.com>

Reviewed-by: Caleb Connolly <kc@postmarketos.org>

> ---
>   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)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Caleb Connolly <kc@postmarketos.org>
To: Arnaud Ferraris <arnaud.ferraris@collabora.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: kernel@collabora.com
Subject: Re: [PATCH] arm64: dts: rockchip: fix input enable pinconf on rk3399
Date: Thu, 15 Dec 2022 20:42:02 +0000	[thread overview]
Message-ID: <78769cf4-84cc-5195-57b8-823d9fc33794@postmarketos.org> (raw)
In-Reply-To: <20221215101947.254896-1-arnaud.ferraris@collabora.com>



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 <arnaud.ferraris@collabora.com>

Reviewed-by: Caleb Connolly <kc@postmarketos.org>

> ---
>   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)

  reply	other threads:[~2022-12-15 20:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 10:19 [PATCH] arm64: dts: rockchip: fix input enable pinconf on rk3399 Arnaud Ferraris
2022-12-15 10:19 ` Arnaud Ferraris
2022-12-15 10:19 ` Arnaud Ferraris
2022-12-15 20:42 ` Caleb Connolly [this message]
2022-12-15 20:42   ` Caleb Connolly
2022-12-15 20:42   ` Caleb Connolly
2023-01-11 10:48 ` Heiko Stuebner
2023-01-11 10:48   ` Heiko Stuebner
2023-01-11 10:48   ` Heiko Stuebner

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=78769cf4-84cc-5195-57b8-823d9fc33794@postmarketos.org \
    --to=kc@postmarketos.org \
    --cc=arnaud.ferraris@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@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: link
Be 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.