* [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor
@ 2024-11-20 8:49 Wolfram Sang
2024-11-20 9:10 ` Biju Das
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Wolfram Sang @ 2024-11-20 8:49 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Geert Uytterhoeven, Magnus Damm, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree
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>;
+ };
+};
+
&pinctrl {
key-1-gpio-hog {
gpio-hog;
--
2.45.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor
2024-11-20 8:49 [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor Wolfram Sang
@ 2024-11-20 9:10 ` Biju Das
2024-11-20 9:13 ` Wolfram Sang
2024-11-20 9:13 ` Wolfram Sang
2024-11-27 14:15 ` Geert Uytterhoeven
2024-12-04 16:30 ` Claudiu Beznea
2 siblings, 2 replies; 8+ messages in thread
From: Biju Das @ 2024-11-20 9:10 UTC (permalink / raw)
To: Wolfram Sang, linux-renesas-soc@vger.kernel.org
Cc: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree@vger.kernel.org
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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor
2024-11-20 9:10 ` Biju Das
@ 2024-11-20 9:13 ` Wolfram Sang
2024-11-20 9:16 ` Geert Uytterhoeven
2024-11-20 9:13 ` Wolfram Sang
1 sibling, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2024-11-20 9:13 UTC (permalink / raw)
To: Biju Das
Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven,
Magnus Damm, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
> 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'
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor
2024-11-20 9:10 ` Biju Das
2024-11-20 9:13 ` Wolfram Sang
@ 2024-11-20 9:13 ` Wolfram Sang
2024-11-20 9:24 ` Biju Das
1 sibling, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2024-11-20 9:13 UTC (permalink / raw)
To: Biju Das
Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven,
Magnus Damm, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 147 bytes --]
> 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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor
2024-11-20 9:13 ` Wolfram Sang
@ 2024-11-20 9:16 ` Geert Uytterhoeven
0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2024-11-20 9:16 UTC (permalink / raw)
To: Wolfram Sang, Biju Das, linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree@vger.kernel.org
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
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor
2024-11-20 9:13 ` Wolfram Sang
@ 2024-11-20 9:24 ` Biju Das
0 siblings, 0 replies; 8+ messages in thread
From: Biju Das @ 2024-11-20 9:24 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven,
Magnus Damm, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
devicetree@vger.kernel.org
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor
2024-11-20 8:49 [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor Wolfram Sang
2024-11-20 9:10 ` Biju Das
@ 2024-11-27 14:15 ` Geert Uytterhoeven
2024-12-04 16:30 ` Claudiu Beznea
2 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2024-11-27 14:15 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree
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
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor
2024-11-20 8:49 [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor Wolfram Sang
2024-11-20 9:10 ` Biju Das
2024-11-27 14:15 ` Geert Uytterhoeven
@ 2024-12-04 16:30 ` Claudiu Beznea
2 siblings, 0 replies; 8+ messages in thread
From: Claudiu Beznea @ 2024-12-04 16:30 UTC (permalink / raw)
To: Wolfram Sang, linux-renesas-soc
Cc: Geert Uytterhoeven, Magnus Damm, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, devicetree
Hi, Wolfram,
On 20.11.2024 10:49, Wolfram Sang 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>
> ---
>
> 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>;
This could be moved before status to comply with [1]. I can take care of it
later as I failed to follow [1] for i2c0 as well.
Other than this:
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
I gave it a try on RZ/G3S:
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Thank you,
Claudiu
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/dts-coding-style.rst#n112
> +
> + power-monitor@44 {
> + compatible = "renesas,isl28022";
> + reg = <0x44>;
> + shunt-resistor-micro-ohms = <8000>;
> + renesas,average-samples = <32>;
> + };
> +};
> +
> &pinctrl {
> key-1-gpio-hog {
> gpio-hog;
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-12-04 16:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-20 8:49 [PATCH] arm64: dts: renesas: rzg3s-smarc: Enable I2C1 and connected power monitor Wolfram Sang
2024-11-20 9:10 ` Biju Das
2024-11-20 9:13 ` Wolfram Sang
2024-11-20 9:16 ` Geert Uytterhoeven
2024-11-20 9:13 ` Wolfram Sang
2024-11-20 9:24 ` Biju Das
2024-11-27 14:15 ` Geert Uytterhoeven
2024-12-04 16:30 ` Claudiu Beznea
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.