[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACdvmAi9v=DFqSOjWdeAabNC1QECs0U3yHM4LZ=Gtthn-pUMNA@mail.gmail.com>
Date: Mon, 28 Apr 2025 22:08:38 -0400
From: Da Xue <da@...sconfused.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>,
Martin Blumenstingl <martin.blumenstingl@...glemail.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 3:50 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.
>
> So my question is: why can't the pull-up property be added in overlays ?
The issue is the property types. I wish the bias was bias = <PULL_UP>
instead of bias-disabled, bias-pull-up, bias-pull-down since we have
to hack a bunch of /delete-property/ in the overlays. A lot of the
merging tools ignore /delete-property/. This is a convenience patch
which may cause push-pull times to change by an insignificant amount.
We have been carrying this patch out-of-tree for 5+ years without
issues. I have not seen any design on GXL that had a PU for I2C.
Externally, I've seen threads of people asking why I2C does not work
on other boards.
>
> Neil
>
> >
> > Signed-off-by: Da Xue <da@...re.computer>
> > ---
> > arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
> > index 2dc2fdaecf9f..aed8dbfbb64d 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
> > @@ -214,7 +214,7 @@ mux {
> > groups = "i2c_sck_ao",
> > "i2c_sda_ao";
> > function = "i2c_ao";
> > - bias-disable;
> > + bias-pull-up;
> > };
> > };
> >
> > @@ -576,7 +576,7 @@ mux {
> > groups = "i2c_sck_a",
> > "i2c_sda_a";
> > function = "i2c_a";
> > - bias-disable;
> > + bias-pull-up;
> > };
> > };
> >
> > @@ -585,7 +585,7 @@ mux {
> > groups = "i2c_sck_b",
> > "i2c_sda_b";
> > function = "i2c_b";
> > - bias-disable;
> > + bias-pull-up;
> > };
> > };
> >
> > @@ -594,7 +594,7 @@ mux {
> > groups = "i2c_sck_c",
> > "i2c_sda_c";
> > function = "i2c_c";
> > - bias-disable;
> > + bias-pull-up;
> > };
> > };
> >
> > @@ -603,7 +603,7 @@ mux {
> > groups = "i2c_sck_c_dv19",
> > "i2c_sda_c_dv18";
> > function = "i2c_c";
> > - bias-disable;
> > + bias-pull-up;
> > };
> > };
> >
>
>
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
Powered by blists - more mailing lists