lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGXv+5EHk=f62+KiLo-aWMcd0-q+_59kno+uOW5rdYaq5q+5tQ@mail.gmail.com>
Date: Wed, 6 Aug 2025 14:38:47 +0800
From: Chen-Yu Tsai <wenst@...omium.org>
To: Julien Massot <julien.massot@...labora.com>
Cc: kernel@...labora.com, Michael Turquette <mturquette@...libre.com>, 
	Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Matthias Brugger <matthias.bgg@...il.com>, 
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Ikjoon Jang <ikjn@...omium.org>, 
	Enric Balletbo i Serra <eballetbo@...nel.org>, Weiyi Lu <weiyi.lu@...iatek.com>, 
	Eugen Hristev <eugen.hristev@...aro.org>, Liam Girdwood <lgirdwood@...il.com>, 
	Mark Brown <broonie@...nel.org>, Julien Massot <jmassot@...labora.com>, 
	Sean Wang <sean.wang@...nel.org>, Linus Walleij <linus.walleij@...aro.org>, 
	linux-clk@...r.kernel.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
	linux-mediatek@...ts.infradead.org, linux-sound@...r.kernel.org, 
	linux-gpio@...r.kernel.org
Subject: Re: [PATCH 8/9] arm64: dts: mediatek: mt8183-kukui: Fix
 pull-down/up-adv values

On Fri, Aug 1, 2025 at 7:18 PM Julien Massot
<julien.massot@...labora.com> wrote:
>
> The properties `mediatek,pull-up-adv` and `mediatek,pull-down-adv`
> were using incorrect values like `<10>` and `<01>`. These values
> are parsed as decimal (10 and 1 respectively), not binary.
>
> However, the driver interprets these as bitfields:
>   - BIT(0): R0
>   - BIT(1): R1
>
> So valid values are:
>   - 0 => no pull
>   - 1 => enable R0
>   - 2 => enable R1
>   - 3 => enable R0 + R1
>
> Using `<10>` is invalid as it exceeds the accepted range.
> It was likely intended as binary `0b10` (i.e., `2`),
> to enable R1 only.
>
> This patch replaces incorrect values with the correct ones
> and removes the leading zero from `<01>` to avoid confusion
> with bitfield notation.
>
> Signed-off-by: Julien Massot <julien.massot@...labora.com>
> ---
>  arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> index 400c61d1103561db6ee0fb2d2e1c157529d03206..02bdfdb8e53c87dba0ba0024e0c69fcee825552b 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> @@ -574,19 +574,19 @@ pins-cmd-dat {
>                                  <PINMUX_GPIO122__FUNC_MSDC0_CMD>;
>                         input-enable;
>                         drive-strength = <MTK_DRIVE_14mA>;
> -                       mediatek,pull-up-adv = <01>;
> +                       mediatek,pull-up-adv = <1>;

I suggest we just convert them to the standard bias-* properties:

        bias-pull-up = <MTK_PUPD_SET_R1R0_01>;

>                 };
>
>                 pins-clk {
>                         pinmux = <PINMUX_GPIO124__FUNC_MSDC0_CLK>;
>                         drive-strength = <MTK_DRIVE_14mA>;
> -                       mediatek,pull-down-adv = <10>;
> +                       mediatek,pull-down-adv = <2>;

        bias-pull-down = <MTK_PUPD_SET_R1R0_10>;

and so on.

ChenYu

>                 };
>
>                 pins-rst {
>                         pinmux = <PINMUX_GPIO133__FUNC_MSDC0_RSTB>;
>                         drive-strength = <MTK_DRIVE_14mA>;
> -                       mediatek,pull-down-adv = <01>;
> +                       mediatek,pull-down-adv = <1>;
>                 };
>         };
>
> @@ -603,25 +603,25 @@ pins-cmd-dat {
>                                  <PINMUX_GPIO122__FUNC_MSDC0_CMD>;
>                         input-enable;
>                         drive-strength = <MTK_DRIVE_14mA>;
> -                       mediatek,pull-up-adv = <01>;
> +                       mediatek,pull-up-adv = <1>;
>                 };
>
>                 pins-clk {
>                         pinmux = <PINMUX_GPIO124__FUNC_MSDC0_CLK>;
>                         drive-strength = <MTK_DRIVE_14mA>;
> -                       mediatek,pull-down-adv = <10>;
> +                       mediatek,pull-down-adv = <2>;
>                 };
>
>                 pins-ds {
>                         pinmux = <PINMUX_GPIO131__FUNC_MSDC0_DSL>;
>                         drive-strength = <MTK_DRIVE_14mA>;
> -                       mediatek,pull-down-adv = <10>;
> +                       mediatek,pull-down-adv = <2>;
>                 };
>
>                 pins-rst {
>                         pinmux = <PINMUX_GPIO133__FUNC_MSDC0_RSTB>;
>                         drive-strength = <MTK_DRIVE_14mA>;
> -                       mediatek,pull-up-adv = <01>;
> +                       mediatek,pull-up-adv = <1>;
>                 };
>         };
>
> @@ -633,13 +633,13 @@ pins-cmd-dat {
>                                  <PINMUX_GPIO33__FUNC_MSDC1_DAT2>,
>                                  <PINMUX_GPIO30__FUNC_MSDC1_DAT3>;
>                         input-enable;
> -                       mediatek,pull-up-adv = <10>;
> +                       mediatek,pull-up-adv = <2>;
>                 };
>
>                 pins-clk {
>                         pinmux = <PINMUX_GPIO29__FUNC_MSDC1_CLK>;
>                         input-enable;
> -                       mediatek,pull-down-adv = <10>;
> +                       mediatek,pull-down-adv = <2>;
>                 };
>         };
>
> @@ -652,13 +652,13 @@ pins-cmd-dat {
>                                  <PINMUX_GPIO30__FUNC_MSDC1_DAT3>;
>                         drive-strength = <6>;
>                         input-enable;
> -                       mediatek,pull-up-adv = <10>;
> +                       mediatek,pull-up-adv = <2>;
>                 };
>
>                 pins-clk {
>                         pinmux = <PINMUX_GPIO29__FUNC_MSDC1_CLK>;
>                         drive-strength = <8>;
> -                       mediatek,pull-down-adv = <10>;
> +                       mediatek,pull-down-adv = <2>;
>                         input-enable;
>                 };
>         };
>
> --
> 2.50.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ