arm64: tegra: Add power-sensors for Tegra234 boards
authorJon Hunter <jonathanh@nvidia.com>
Fri, 29 Sep 2023 10:36:50 +0000 (11:36 +0100)
committerThierry Reding <treding@nvidia.com>
Fri, 13 Oct 2023 12:34:31 +0000 (14:34 +0200)
Populate the ina219 and ina3221 power-sensors for the various Tegra234
boards. These sensors are located on the Tegra234 module boards and the
configuration of some sensors is common across the different Tegra234
modules. Therefore, add any common sensor configurations to appropriate
device tree source file so it can be re-used across modules.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm64/boot/dts/nvidia/tegra234-p3701-0008.dtsi
arch/arm64/boot/dts/nvidia/tegra234-p3701.dtsi
arch/arm64/boot/dts/nvidia/tegra234-p3767.dtsi

index 62c4fdad0b600bd6e71ecbf2e42bf8c1a510b25c..553fa4ba1cd48a99dbf7c4a497608663ed527d19 100644 (file)
                        status = "okay";
                };
 
+               i2c@c250000 {
+                       power-sensor@41 {
+                               compatible = "ti,ina3221";
+                               reg = <0x41>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               input@0 {
+                                       reg = <0x0>;
+                                       label = "CVB_ATX_12V";
+                                       shunt-resistor-micro-ohms = <2000>;
+                               };
+
+                               input@1 {
+                                       reg = <0x1>;
+                                       label = "CVB_ATX_3V3";
+                                       shunt-resistor-micro-ohms = <2000>;
+                               };
+
+                               input@2 {
+                                       reg = <0x2>;
+                                       label = "CVB_ATX_5V";
+                                       shunt-resistor-micro-ohms = <2000>;
+                               };
+                       };
+
+                       power-sensor@44 {
+                               compatible = "ti,ina219";
+                               reg = <0x44>;
+                               shunt-resistor = <2000>;
+                       };
+               };
+
                rtc@c2a0000 {
                        status = "okay";
                };
index 5e7797df50c2a5353de4031400b9cdb88debd4c6..db6ef711674ab50ed58e97fb18e2facd0bdfce38 100644 (file)
                                status = "okay";
                        };
                };
+
+               i2c@c240000 {
+                       status = "okay";
+
+                       power-sensor@40 {
+                               compatible = "ti,ina3221";
+                               reg = <0x40>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               input@0 {
+                                       reg = <0x0>;
+                                       label = "VDD_GPU_SOC";
+                                       shunt-resistor-micro-ohms = <2000>;
+                               };
+
+                               input@1 {
+                                       reg = <0x1>;
+                                       label = "VDD_CPU_CV";
+                                       shunt-resistor-micro-ohms = <2000>;
+                               };
+
+                               input@2 {
+                                       reg = <0x2>;
+                                       label = "VIN_SYS_5V0";
+                                       shunt-resistor-micro-ohms = <2000>;
+                                       ti,summation-disable;
+                               };
+                       };
+
+                       power-sensor@41 {
+                               compatible = "ti,ina3221";
+                               reg = <0x41>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               input@0 {
+                                       reg = <0x0>;
+                                       status = "disabled";
+                               };
+
+                               input@1 {
+                                       reg = <0x1>;
+                                       label = "VDDQ_VDD2_1V8AO";
+                                       shunt-resistor-micro-ohms = <2000>;
+                               };
+
+                               input@2 {
+                                       reg = <0x2>;
+                                       status = "disabled";
+                               };
+                       };
+               };
        };
 };
index fe08e131b7b9ef0e70a2b0f2e1493f64b1c0c8fe..59c14ded5e9fac10023e76078d99efec25e00b24 100644 (file)
                        avdd-usb-supply = <&vdd_3v3_ao>;
                };
 
+               i2c@c240000 {
+                       status = "okay";
+
+                       power-sensor@40 {
+                               compatible = "ti,ina3221";
+                               reg = <0x40>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               input@0 {
+                                       reg = <0x0>;
+                                       label = "VDD_IN";
+                                       shunt-resistor-micro-ohms = <5000>;
+                               };
+
+                               input@1 {
+                                       reg = <0x1>;
+                                       label = "VDD_CPU_GPU_CV";
+                                       shunt-resistor-micro-ohms = <5000>;
+                               };
+
+                               input@2 {
+                                       reg = <0x2>;
+                                       label = "VDD_SOC";
+                                       shunt-resistor-micro-ohms = <5000>;
+                               };
+                       };
+               };
+
                rtc@c2a0000 {
                        status = "okay";
                };