linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Hsin-Yi Wang <hsinyi@chromium.org>
To: Enric Balletbo Serra <eballetbo@gmail.com>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
	 Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Fabien Parent <fparent@baylibre.com>,
	 "moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	linux-gpio@vger.kernel.org,
	 Devicetree List <devicetree@vger.kernel.org>,
	Zhiyong Tao <zhiyong.tao@mediatek.com>
Subject: Re: arm64: dts: mt8183: Incorrect mediatek,pull-*-adv values
Date: Tue, 27 Jul 2021 19:06:00 +0800	[thread overview]
Message-ID: <CAJMQK-j_SFVOA7KcZpGaE+mS3WZf3fe9CaXw4pHPND_UWUU6Kg@mail.gmail.com> (raw)
In-Reply-To: <CAFqH_51Sg0h+CC9whUAgpp80OxDsB461NYSdKQvGxho_VF8oJg@mail.gmail.com>

On Mon, Jul 26, 2021 at 5:48 PM Enric Balletbo Serra
<eballetbo@gmail.com> wrote:
>
> Hi Chen-Yu and Hsin-Yi,
>
>
> Missatge de Chen-Yu Tsai <wenst@chromium.org> del dia dl., 26 de jul.
> 2021 a les 10:58:
> >
> > On Mon, Jul 26, 2021 at 4:50 PM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
> > >
> > > On Mon, Jul 26, 2021 at 4:20 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I was looking at MTK pinctrl stuff upstream, and it seems there are a few
> > > > `mediatek,pull-*-adv` entries that have invalid values:
> > > >
> > > > arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi:
> > > > mediatek,pull-down-adv = <10>;
>
> The confusion comes probably because the binding says that this value
> is valid, see
>
>    Documentation/devicetree/bindings/pinctrl/pinctrl-mt8183.txt
>
> it'd be nice to convert that binding and the others to yaml format and
> remove the possibility to specify it in binary format.
>
>   Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
>   Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
>   Documentation/devicetree/bindings/pinctrl/pinctrl-mt6797.txt
>
> Should be pretty easy as there is already an example:
> Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
>

Hi Enric,

I've sent a patch for converting these into yaml here:
https://lore.kernel.org/patchwork/patch/1468449/

Thanks

> Thanks,
>   Enric
>
> > > > arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi:
> > > > mediatek,pull-down-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi:
> > > > mediatek,pull-down-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi:
> > > > mediatek,pull-up-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi:
> > > > mediatek,pull-down-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi:
> > > > mediatek,pull-up-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi:
> > > > mediatek,pull-down-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts:
> > > >  mediatek,pull-down-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts:
> > > >  mediatek,pull-down-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts:
> > > >  mediatek,pull-down-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts:
> > > >  mediatek,pull-up-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts:
> > > >  mediatek,pull-down-adv = <10>;
> > > > arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts:
> > > >  mediatek,pull-up-adv = <10>;
> > > >
> > > > According to the bindings, the values should 0~3. <10> is probably a
> > > > incorrect attempt at using binary representation, which is wrong. This
> > > > probably leads to the pull-up/down getting disabled or ignored.
> > > >
> > > > Cound people still working on these two devices take a look?
> > > >
> > > Thanks for pointing this out. It's an incorrect value but 10=0b1010 so
> > > the result is same as 2, since the driver test the value by checking
> > > the last 2 bit. We should still fix this in dts.
> >
>
> I see that the are
>
>
>
> > That probably explains why no one noticed.

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

      reply	other threads:[~2021-07-27 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26  8:20 arm64: dts: mt8183: Incorrect mediatek,pull-*-adv values Chen-Yu Tsai
2021-07-26  8:50 ` Hsin-Yi Wang
2021-07-26  8:58   ` Chen-Yu Tsai
2021-07-26  9:48     ` Enric Balletbo Serra
2021-07-27 11:06       ` Hsin-Yi Wang [this message]

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=CAJMQK-j_SFVOA7KcZpGaE+mS3WZf3fe9CaXw4pHPND_UWUU6Kg@mail.gmail.com \
    --to=hsinyi@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eballetbo@gmail.com \
    --cc=enric.balletbo@collabora.com \
    --cc=fparent@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=wenst@chromium.org \
    --cc=zhiyong.tao@mediatek.com \
    /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 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).