Message ID | 20241120085345.24638-2-wsa+renesas@sang-engineering.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | a31c8261238d0ffabdb7dd454ef6648a239ab98e |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor | expand |
Hi Wolfram Sang, Thanks for the work. > -----Original Message----- > From: Wolfram Sang <wsa+renesas@sang-engineering.com> > Sent: 20 November 2024 08:50 > Subject: [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor > > Enable I2C1 for the carrier board and the connected power monitor ISL28022. Limit the bus speed to the > maximum the power monitor supports. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > --- > > i2c1 gets enabled in the current SoM-DTSI as well, but to be safe regarding other SoM DTSIs to come, I > opted for explicitly enabling it in the carrier board as well. > > I picked the 'average-samples' value using my gut feeling. If someone has a reason to pick a better > one, I am all for it. > > arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg3s- > smarc.dtsi > index 7945d44e6ee1..5e4bfaeafd20 100644 > --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi > +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi > @@ -73,6 +73,19 @@ &i2c0 { > clock-frequency = <1000000>; > }; > > +&i2c1 { > + status = "okay"; > + > + clock-frequency = <400000>; > + > + power-monitor@44 { > + compatible = "renesas,isl28022"; > + reg = <0x44>; > + shunt-resistor-micro-ohms = <8000>; > + renesas,average-samples = <32>; > + }; > +}; How do we test this interface in linux? So far we use windows app to monitor the current. Cheers, Biju > + > &pinctrl { > key-1-gpio-hog { > gpio-hog; > -- > 2.45.2 >
> How do we test this interface in linux? So far we use windows app to monitor the current.
It exposes values in sysfs. Check 'Documentation/hwmon/isl28022.rst'
> How do we test this interface in linux? So far we use windows app to monitor the current.
BTW, the driver is in Linus' tree only as of today.
Hi Wolfram, On Wed, Nov 20, 2024 at 10:13 AM Wolfram Sang <wsa+renesas@sang-engineering.com> wrote: > > How do we test this interface in linux? So far we use windows app to monitor the current. > > It exposes values in sysfs. Check 'Documentation/hwmon/isl28022.rst' It's a pity this driver is a hwmon driver instead of an iio driver. Else you could use iio-monitor, even over the network. I used that before with the max9611 on Salvator-XS. Gr{oetje,eeting}s, Geert
Hi Wolfram, > -----Original Message----- > From: Wolfram Sang <wsa+renesas@sang-engineering.com> > Sent: 20 November 2024 09:14 > Subject: Re: [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor > > > > How do we test this interface in linux? So far we use windows app to monitor the current. > > BTW, the driver is in Linus' tree only as of today. Thanks for letting me know. Currently, over USB we display the current monitor values to see the sensor is working. Now, we could use sysfs instead to check. Cheers, Biju.
On Wed, Nov 20, 2024 at 9:54 AM Wolfram Sang <wsa+renesas@sang-engineering.com> wrote: > Enable I2C1 for the carrier board and the connected power monitor > ISL28022. Limit the bus speed to the maximum the power monitor supports. > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> i.e. will queue in renesas-devel for v6.14. Gr{oetje,eeting}s, Geert
diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi index 7945d44e6ee1..5e4bfaeafd20 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi @@ -73,6 +73,19 @@ &i2c0 { clock-frequency = <1000000>; }; +&i2c1 { + status = "okay"; + + clock-frequency = <400000>; + + power-monitor@44 { + compatible = "renesas,isl28022"; + reg = <0x44>; + shunt-resistor-micro-ohms = <8000>; + renesas,average-samples = <32>; + }; +}; + &pinctrl { key-1-gpio-hog { gpio-hog;
Enable I2C1 for the carrier board and the connected power monitor ISL28022. Limit the bus speed to the maximum the power monitor supports. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- i2c1 gets enabled in the current SoM-DTSI as well, but to be safe regarding other SoM DTSIs to come, I opted for explicitly enabling it in the carrier board as well. I picked the 'average-samples' value using my gut feeling. If someone has a reason to pick a better one, I am all for it. arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)