On Mon, Apr 28, 2025 at 9:32 AM Neil Armstrong
<neil.armstrong@xxxxxxxxxx> wrote:
For SD/eMMC, SPI and UART we have pull up/down enabled in meson-gxl.dtsi.
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.
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