[PATCH] arm64: dts: amlogic: gxl: set i2c bias to pull-up

neil.armstrong at linaro.org neil.armstrong at linaro.org
Mon May 5 05:27:09 PDT 2025


On 04/05/2025 23:03, Martin Blumenstingl wrote:
> On Mon, Apr 28, 2025 at 9:32 AM Neil Armstrong
> <neil.armstrong at linaro.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?).

Right, but in this case the biases needed for i2c is rather easy to figure out,
and the very weak 60kohms on the pad won't affect i2c if a proper PU is on
the PCB. So I'll pick this one, and yeah a similar one should be needed
for G12/SM1 and newer SoCs.

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>

Neil

> 
> 
> Best regards,
> Martin




More information about the linux-amlogic mailing list