From: Primoz Fiser Date: Fri, 5 Sep 2025 06:55:03 +0000 (+0200) Subject: arm64: dts: freescale: imx93-phyboard-nash: Current sense via iio-hwmon X-Git-Tag: v6.18-rc1~147^2~20^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=463714763fd1887a6538470132ba51a1a04e8ec2;p=thirdparty%2Fkernel%2Flinux.git arm64: dts: freescale: imx93-phyboard-nash: Current sense via iio-hwmon Commit 21179eae56de ("arm64: dts: freescale: imx93-phyboard-nash: Add current sense amplifier") added information about the current sensing circuitry found on the board. Now, lets provide current sense reading also via IIO-hwmon subsystem. This way, SoM current can be read directly via sysfs property more conveniently for the customers. No need for them to manually apply scaling factor calculations anymore. Signed-off-by: Primoz Fiser Signed-off-by: Shawn Guo --- diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash.dts b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash.dts index 3f9efa32cddc8..5599e296919f4 100644 --- a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash.dts +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash.dts @@ -48,8 +48,9 @@ stdout-path = &lpuart1; }; - current-sense { + curr_sens: current-sense { compatible = "current-sense-amplifier"; + #io-channel-cells = <0>; io-channels = <&adc1 1>; sense-gain-div = <2>; sense-gain-mult = <50>; @@ -65,6 +66,11 @@ standby-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>; }; + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&curr_sens 0>; + }; + reg_usdhc2_vmmc: regulator-usdhc2 { compatible = "regulator-fixed"; gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;