arm64: zynqmp: Enable iio-hwmon for ina226 on m-a2197-01
authorMichal Simek <michal.simek@xilinx.com>
Mon, 26 Aug 2019 09:09:54 +0000 (11:09 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 24 Oct 2019 11:37:01 +0000 (13:37 +0200)
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@xilinx.com>
arch/arm/dts/zynqmp-m-a2197-01-revA.dts

index 4215b08bec8b6e63f94f9386035589358fb3c4eb..bfa86afddb28c47bdad8d7f76169f727e4af343e 100644 (file)
                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 {
                        reg = <1>;
                        vcc_aux: ina226@42 { /* u86 */
                                compatible = "ti,ina226";
+                               #io-channel-cells = <1>;
                                reg = <0x42>;
                                shunt-resistor = <5000>;
                        };
                        vcc_ram: ina226@43 { /* u81 */
                                compatible = "ti,ina226";
+                               #io-channel-cells = <1>;
                                reg = <0x43>;
                                shunt-resistor = <5000>;
                        };
                        vcc1v1_lp4: ina226@46 { /* u96 */
                                compatible = "ti,ina226";
+                               #io-channel-cells = <1>;
                                reg = <0x46>;
                                shunt-resistor = <5000>;
                        };
                        vcc1v2_lp4: ina226@47 { /* u98 */
                                compatible = "ti,ina226";
+                               #io-channel-cells = <1>;
                                reg = <0x47>;
                                shunt-resistor = <5000>;
                        };
                        vdd1_1v8_lp4: ina226@48 { /* u100 */
                                compatible = "ti,ina226";
+                               #io-channel-cells = <1>;
                                reg = <0x48>;
                                shunt-resistor = <5000>;
                        };
                        vcc0v6_lp4: ina226@49 { /* u101 */
                                compatible = "ti,ina226";
+                               #io-channel-cells = <1>;
                                reg = <0x49>;
                                shunt-resistor = <5000>;
                        };