[U-Boot] [PATCH 08/27] arm64: zynqmp: Enable iio-hwmon for ina226 on m-a2197-01
Michal Simek
michal.simek at xilinx.com
Mon Oct 14 10:16:11 UTC 2019
ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---
arch/arm/dts/zynqmp-m-a2197-01-revA.dts | 31 +++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm/dts/zynqmp-m-a2197-01-revA.dts b/arch/arm/dts/zynqmp-m-a2197-01-revA.dts
index 4215b08bec8b..bfa86afddb28 100644
--- a/arch/arm/dts/zynqmp-m-a2197-01-revA.dts
+++ b/arch/arm/dts/zynqmp-m-a2197-01-revA.dts
@@ -43,6 +43,31 @@
device_type = "memory";
reg = <0x0 0x0 0x0 0x80000000>; /* FIXME don't know how big memory is there */
};
+
+ ina226-vcc-aux {
+ compatible = "iio-hwmon";
+ io-channels = <&vcc_aux 0>, <&vcc_aux 1>, <&vcc_aux 2>, <&vcc_aux 3>;
+ };
+ ina226-vcc-ram {
+ compatible = "iio-hwmon";
+ io-channels = <&vcc_ram 0>, <&vcc_ram 1>, <&vcc_ram 2>, <&vcc_ram 3>;
+ };
+ ina226-vcc1v1-lp4 {
+ compatible = "iio-hwmon";
+ io-channels = <&vcc1v1_lp4 0>, <&vcc1v1_lp4 1>, <&vcc1v1_lp4 2>, <&vcc1v1_lp4 3>;
+ };
+ ina226-vcc1v2-lp4 {
+ compatible = "iio-hwmon";
+ io-channels = <&vcc1v2_lp4 0>, <&vcc1v2_lp4 1>, <&vcc1v2_lp4 2>, <&vcc1v2_lp4 3>;
+ };
+ ina226-vdd1-1v8-lp4 {
+ compatible = "iio-hwmon";
+ io-channels = <&vdd1_1v8_lp4 0>, <&vdd1_1v8_lp4 1>, <&vdd1_1v8_lp4 2>, <&vdd1_1v8_lp4 3>;
+ };
+ ina226-vcc0v6-lp4 {
+ compatible = "iio-hwmon";
+ io-channels = <&vcc0v6_lp4 0>, <&vcc0v6_lp4 1>, <&vcc0v6_lp4 2>, <&vcc0v6_lp4 3>;
+ };
};
&qspi {
@@ -183,31 +208,37 @@
reg = <1>;
vcc_aux: ina226 at 42 { /* u86 */
compatible = "ti,ina226";
+ #io-channel-cells = <1>;
reg = <0x42>;
shunt-resistor = <5000>;
};
vcc_ram: ina226 at 43 { /* u81 */
compatible = "ti,ina226";
+ #io-channel-cells = <1>;
reg = <0x43>;
shunt-resistor = <5000>;
};
vcc1v1_lp4: ina226 at 46 { /* u96 */
compatible = "ti,ina226";
+ #io-channel-cells = <1>;
reg = <0x46>;
shunt-resistor = <5000>;
};
vcc1v2_lp4: ina226 at 47 { /* u98 */
compatible = "ti,ina226";
+ #io-channel-cells = <1>;
reg = <0x47>;
shunt-resistor = <5000>;
};
vdd1_1v8_lp4: ina226 at 48 { /* u100 */
compatible = "ti,ina226";
+ #io-channel-cells = <1>;
reg = <0x48>;
shunt-resistor = <5000>;
};
vcc0v6_lp4: ina226 at 49 { /* u101 */
compatible = "ti,ina226";
+ #io-channel-cells = <1>;
reg = <0x49>;
shunt-resistor = <5000>;
};
--
2.17.1
More information about the U-Boot
mailing list