[PATCH 8/9] arm64: dts: mediatek: mt8183-kukui: Fix pull-down/up-adv values

Chen-Yu Tsai wenst at chromium.org
Tue Aug 5 23:38:47 PDT 2025


On Fri, Aug 1, 2025 at 7:18 PM Julien Massot
<julien.massot at collabora.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 at collabora.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
>



More information about the Linux-mediatek mailing list