[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBinCBiVQqeYTmR3sj++E8CqQXSMsOzhafAV0JNgDVR9OU7ZA@mail.gmail.com>
Date: Sun, 4 May 2025 23:03:56 +0200
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: neil.armstrong@...aro.org
Cc: Da Xue <da@...re.computer>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Kevin Hilman <khilman@...libre.com>, Jerome Brunet <jbrunet@...libre.com>, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-amlogic@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64: dts: amlogic: gxl: set i2c bias to pull-up
On Mon, Apr 28, 2025 at 9:32 AM Neil Armstrong
<neil.armstrong@...aro.org> wrote:
>
> On 25/04/2025 22:31, Da Xue wrote:
> > GXL I2C pins need internal pull-up enabled to operate if there
> > is no external resistor. The pull-up is 60kohms per the datasheet.
> >
> > We should set the bias when i2c pinmux is enabled.
>
> So, yes in some cases when the on-board pull-up is missing, the on-pad
> pull-up is required, but the whole idea was to only add the pull-up property
> when needed.
>
> So I know the real motivation is again about the 40pin headers, where
> some applications don't add a pull-up and still want to have i2c working.
For SD/eMMC, SPI and UART we have pull up/down enabled in meson-gxl.dtsi.
I can't recall if I have asked this before: what's the rule (of thumb)
for having bias-pull-up/down vs. bias-disable in .dtsi files?
In the past I had to track down incorrect bias.
It gets especially tricky when we don't have schematics and there's no
u-boot sources available from the vendor (I know, the latter shouldn't
be possible - but that's the world we live in unfortunately).
It means that we can end up with one of four cases for the bias settings:
- there's an actual resistor on the PCB (pulling the pin up/down)
- hardware (SoC) default for the pin
- vendor u-boot configures bias for the pin (but we don't know because
we don't have the sources)
- vendor Linux configures bias for the pin (at least we can dump the
.dtb and hope that the bias setting is in there)
That's why I lean towards having sane defaults in the SoC.dtsi (it
seems that rockchip does the same?).
Best regards,
Martin
Powered by blists - more mailing lists