[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250903113700.3079626-2-primoz.fiser@norik.com>
Date: Wed, 3 Sep 2025 13:37:00 +0200
From: Primoz Fiser <primoz.fiser@...ik.com>
To: Peter Rosin <peda@...ntia.se>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sa <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>
Cc: linux-iio@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
upstream@...ts.phytec.de
Subject: [PATCH 2/2] 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 <primoz.fiser@...ik.com>
---
arch/arm64/boot/dts/freescale/imx93-phyboard-nash.dts | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash.dts b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash.dts
index 71a0e9f270af..d05645f25bba 100644
--- a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash.dts
@@ -27,8 +27,9 @@ chosen {
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>;
@@ -44,6 +45,11 @@ flexcan1_tc: can-phy0 {
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>;
--
2.34.1
Powered by blists - more mailing lists