summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2014-02-23 12:16:48 +0530
committerLaxman Dewangan <ldewangan@nvidia.com>2014-02-26 09:31:45 -0800
commit1701f90cbf6085b67e4f3235951ecba5676227ae (patch)
treeec906f7f934db8efafdc4752d1169da50fd365d0 /arch
parent4f0ffbe3673f03b5fa585ceec343ade3b37b132f (diff)
ARM: tegra: move powermon to DT for Ardbeg
Move all power monitor device registration for Ardbeg to DT. Following are change: - Add dtsi file for Ardbeg power mon. - Add the dtsi file from the Ardbeg top level dtsi file. - Delete the board powermon dts file. bug 1369958 Change-Id: Idadf3a2247c479b0d4024548d274cc8efa18c79e Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/374139
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/tegra124-ardbeg-e1735-a03-powerconfig.dts18
-rw-r--r--arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a00.dtsi256
-rw-r--r--arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a01.dtsi273
-rw-r--r--arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a00.dtsi256
-rw-r--r--arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a01.dtsi272
-rw-r--r--arch/arm/mach-tegra/Makefile1
-rw-r--r--arch/arm/mach-tegra/board-ardbeg-powermon.c903
-rw-r--r--arch/arm/mach-tegra/board-ardbeg.c16
-rw-r--r--arch/arm/mach-tegra/board-ardbeg.h9
-rwxr-xr-xarch/arm64/mach-tegra/Makefile2
-rw-r--r--arch/arm64/mach-tegra/board-ardbeg64-powermon.c2
-rw-r--r--arch/arm64/mach-tegra/board-t132ref-powermon.c2
13 files changed, 1049 insertions, 962 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index d7180fc5a700..0f02441dc7fd 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -213,6 +213,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
tegra124-ardbeg-e1735-a03-00.dtb \
tegra124-ardbeg-e1733.dtb \
tegra124-ardbeg-e1733-a03-00.dtb \
+ tegra124-ardbeg-e1735-a03-powerconfig.dtb \
tegra124-laguna.dtb \
tegra124-laguna-pm358.dtb \
tegra124-norrin.dtb \
diff --git a/arch/arm/boot/dts/tegra124-ardbeg-e1735-a03-powerconfig.dts b/arch/arm/boot/dts/tegra124-ardbeg-e1735-a03-powerconfig.dts
new file mode 100644
index 000000000000..4d6730c5a017
--- /dev/null
+++ b/arch/arm/boot/dts/tegra124-ardbeg-e1735-a03-powerconfig.dts
@@ -0,0 +1,18 @@
+#include "tegra124-ardbeg-e1735-a03-00.dts"
+/ {
+ i2c@7000c400 {
+ pca9546@71 {
+ i2c@1 {
+ ina230@43{
+ .resistor = <10>;
+ };
+ ina230@45{
+ .resistor = <10>;
+ };
+ ina230@49{
+ .resistor = <10>;
+ };
+ };
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a00.dtsi b/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a00.dtsi
index 995e1c2bcbb5..336484e50922 100644
--- a/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a00.dtsi
+++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a00.dtsi
@@ -16,13 +16,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/ {
- aliases {
- i2c6 = &pca9546_i2c0;
- i2c7 = &pca9546_i2c1;
- i2c8 = &pca9546_i2c2;
- i2c9 = &pca9546_i2c3;
- };
-
i2c@7000c400 {
pca9546@71 {
compatible = "nxp,pca9546";
@@ -32,21 +25,270 @@
pca9546_i2c0: i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "__VDD_BAT";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1366>;
+ ti,power-lsb = <2577>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "__VDD_SYS_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1AC5>;
+ ti,power-lsb = <1867>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@42{
+ compatible = "ti,ina230x";
+ reg = <0x42>;
+ ti,rail-name = "__VDD_SYS_BUCKSOC";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <20>;
+ ti,calibration-data = <0x2802>;
+ ti,power-lsb = <624>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@43{
+ compatible = "ti,ina230x";
+ reg = <0x43>;
+ ti,rail-name = "__VDD_SYS_BUCKGPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1F38>;
+ ti,power-lsb = <1601>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c1: i2c@1 {
reg = <1>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "VDD_SYS_BAT";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x1366>;
+ ti,power-lsb = <2577>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "VDD_RTC_LDO5";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <78>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@42{
+ compatible = "ti,ina230x";
+ reg = <0x42>;
+ ti,rail-name = "VDD_3V3A_SMPS1_2";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x4759>;
+ ti,power-lsb = <1401>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@43{
+ compatible = "ti,ina230x";
+ reg = <0x43>;
+ ti,rail-name = "VDD_SOC_SMPS1_2";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <3906>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@44{
+ compatible = "ti,ina230x";
+ reg = <0x44>;
+ ti,rail-name = "VDD_SYS_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x1AC5>;
+ ti,power-lsb = <1867>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@45{
+ compatible = "ti,ina230x";
+ reg = <0x45>;
+ ti,rail-name = "VDD_CPU_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x2ECF>;
+ ti,power-lsb = <10681>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@46{
+ compatible = "ti,ina230x";
+ reg = <0x46>;
+ ti,rail-name = "VDD_1V8A_SMPS3";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x5BA7>;
+ ti,power-lsb = <545>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@47{
+ compatible = "ti,ina230x";
+ reg = <0x47>;
+ ti,rail-name = "VDD_1V8B_SMPS9";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x50B4>;
+ ti,power-lsb = <309>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@48{
+ compatible = "ti,ina230x";
+ reg = <0x48>;
+ ti,rail-name = "VDD_GPU_BUCKGPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x369C>;
+ ti,power-lsb = <9155>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@49{
+ compatible = "ti,ina230x";
+ reg = <0x49>;
+ ti,rail-name = "VDD_1V35_SMPS6";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <3906>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4b{
+ compatible = "ti,ina230x";
+ reg = <0x4b>;
+ ti,rail-name = "unused_rail";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x4759>;
+ ti,power-lsb = <1401>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4c{
+ compatible = "ti,ina230x";
+ reg = <0x4c>;
+ ti,rail-name = "VDD_3V3B_SMPS9";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x3269>;
+ ti,power-lsb = <198>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4e{
+ compatible = "ti,ina230x";
+ reg = <0x4e>;
+ ti,rail-name = "VDD_LCD_1V8B_DIS";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <39>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4f{
+ compatible = "ti,ina230x";
+ reg = <0x4f>;
+ ti,rail-name = "VDD_1V05_SMPS8";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <130>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c2: i2c@2 {
reg = <2>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@49{
+ compatible = "ti,ina230x";
+ reg = <0x49>;
+ ti,rail-name = "VDD_SYS_BL";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x1A29>;
+ ti,power-lsb = <637>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4c{
+ compatible = "ti,ina230x";
+ reg = <0x4c>;
+ ti,rail-name = "AVDD_1V05_LDO2";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <390>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c3: i2c@3 {
reg = <3>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a01.dtsi b/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a01.dtsi
index 995e1c2bcbb5..bd301a03b0f8 100644
--- a/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a01.dtsi
+++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-ardbeg-powermon-e1780-1000-a01.dtsi
@@ -16,13 +16,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/ {
- aliases {
- i2c6 = &pca9546_i2c0;
- i2c7 = &pca9546_i2c1;
- i2c8 = &pca9546_i2c2;
- i2c9 = &pca9546_i2c3;
- };
-
i2c@7000c400 {
pca9546@71 {
compatible = "nxp,pca9546";
@@ -32,21 +25,287 @@
pca9546_i2c0: i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "__VDD_BAT";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1366>;
+ ti,power-lsb = <2577>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "__VDD_SYS_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1AC5>;
+ ti,power-lsb = <1867>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@42{
+ compatible = "ti,ina230x";
+ reg = <0x42>;
+ ti,rail-name = "__VDD_SYS_BUCKSOC";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <20>;
+ ti,calibration-data = <0x2802>;
+ ti,power-lsb = <624>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@43{
+ compatible = "ti,ina230x";
+ reg = <0x43>;
+ ti,rail-name = "__VDD_SYS_BUCKGPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1F38>;
+ ti,power-lsb = <1601>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c1: i2c@1 {
reg = <1>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "VDD_SYS_BAT";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1366>;
+ ti,power-lsb = <2577>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "VDD_RTC_LDO3";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <50>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <78>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@42{
+ compatible = "ti,ina230x";
+ reg = <0x42>;
+ ti,rail-name = "VDD_SYS_BUCKSOC";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <30>;
+ ti,calibration-data = <0x1AAC>;
+ ti,power-lsb = <624>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@43{
+ compatible = "ti,ina230x";
+ reg = <0x43>;
+ ti,rail-name = "VDD_SOC_SD1";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <1>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <3906>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@44{
+ compatible = "ti,ina230x";
+ reg = <0x44>;
+ ti,rail-name = "VDD_SYS_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1AC5>;
+ ti,power-lsb = <1867>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@45{
+ compatible = "ti,ina230x";
+ reg = <0x45>;
+ ti,rail-name = "VDD_CPU_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <1>;
+ ti,calibration-data = <0x2ECF>;
+ ti,power-lsb = <10681>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@46{
+ compatible = "ti,ina230x";
+ reg = <0x46>;
+ ti,rail-name = "VDD_1V8_SD5";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x45F0>;
+ ti,power-lsb = <714>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@47{
+ compatible = "ti,ina230x";
+ reg = <0x47>;
+ ti,rail-name = "VDD_3V3A_LDO1_6";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <200>;
+ ti,calibration-data = <0x3A83>;
+ ti,power-lsb = <42>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@48{
+ compatible = "ti,ina230x";
+ reg = <0x48>;
+ ti,rail-name = "VDD_DIS_3V3_LCD";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <390>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@49{
+ compatible = "ti,ina230x";
+ reg = <0x49>;
+ ti,rail-name = "VDD_1V35_SD2";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <1>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <3906>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4b{
+ compatible = "ti,ina230x";
+ reg = <0x4b>;
+ ti,rail-name = "VDD_SYS_BUCKGPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1F38>;
+ ti,power-lsb = <1601>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4e{
+ compatible = "ti,ina230x";
+ reg = <0x4e>;
+ ti,rail-name = "VDD_LCD_1V8B_DIS";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <100>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <39>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4f{
+ compatible = "ti,ina230x";
+ reg = <0x4f>;
+ ti,rail-name = "VDD_1V05_LDO0";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <30>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <130>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c2: i2c@2 {
reg = <2>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "VDD_1V05_SD4";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <390>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "VDD_1V8A_LDO2_5_7";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <20>;
+ ti,calibration-data = <0x5A04>;
+ ti,power-lsb = <277>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@49{
+ compatible = "ti,ina230x";
+ reg = <0x49>;
+ ti,rail-name = "VDD_SYS_BL";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <50>;
+ ti,calibration-data = <0x2468>;
+ ti,power-lsb = <274>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c3: i2c@3 {
reg = <3>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a00.dtsi b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a00.dtsi
index 995e1c2bcbb5..ecda03c63a59 100644
--- a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a00.dtsi
+++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a00.dtsi
@@ -16,13 +16,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/ {
- aliases {
- i2c6 = &pca9546_i2c0;
- i2c7 = &pca9546_i2c1;
- i2c8 = &pca9546_i2c2;
- i2c9 = &pca9546_i2c3;
- };
-
i2c@7000c400 {
pca9546@71 {
compatible = "nxp,pca9546";
@@ -32,21 +25,270 @@
pca9546_i2c0: i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "__VDD_BAT";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <5>;
+ ti,calibration-data = <0x1FF7>;
+ ti,power-lsb = <3128>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "__VDD_SYS_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1AC5>;
+ ti,power-lsb = <1867>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@42{
+ compatible = "ti,ina230x";
+ reg = <0x42>;
+ ti,rail-name = "__VDD_SYS_BUCKSOC";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x2ED7>;
+ ti,power-lsb = <1067>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@43{
+ compatible = "ti,ina230x";
+ reg = <0x43>;
+ ti,rail-name = "__VDD_SYS_BUCKGPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1F38>;
+ ti,power-lsb = <1601>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c1: i2c@1 {
reg = <1>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "VDD_SYS_BAT";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x1366>;
+ ti,power-lsb = <2577>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "VDD_RTC_LDO5";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <78>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@42{
+ compatible = "ti,ina230x";
+ reg = <0x42>;
+ ti,rail-name = "VDD_3V3A_SMPS1_2";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x4759>;
+ ti,power-lsb = <1401>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@43{
+ compatible = "ti,ina230x";
+ reg = <0x43>;
+ ti,rail-name = "VDD_SOC_SMPS1_2";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <3906>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@44{
+ compatible = "ti,ina230x";
+ reg = <0x44>;
+ ti,rail-name = "VDD_SYS_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x1AC5>;
+ ti,power-lsb = <1867>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@45{
+ compatible = "ti,ina230x";
+ reg = <0x45>;
+ ti,rail-name = "VDD_CPU_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x2ECF>;
+ ti,power-lsb = <10681>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@46{
+ compatible = "ti,ina230x";
+ reg = <0x46>;
+ ti,rail-name = "VDD_1V8A_SMPS3";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x5BA7>;
+ ti,power-lsb = <545>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@47{
+ compatible = "ti,ina230x";
+ reg = <0x47>;
+ ti,rail-name = "VDD_1V8B_SMPS9";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x50B4>;
+ ti,power-lsb = <309>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@48{
+ compatible = "ti,ina230x";
+ reg = <0x48>;
+ ti,rail-name = "VDD_GPU_BUCKGPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x369C>;
+ ti,power-lsb = <9155>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@49{
+ compatible = "ti,ina230x";
+ reg = <0x49>;
+ ti,rail-name = "VDD_1V35_SMPS6";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <3906>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4b{
+ compatible = "ti,ina230x";
+ reg = <0x4b>;
+ ti,rail-name = "unused_rail";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x4759>;
+ ti,power-lsb = <1401>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4c{
+ compatible = "ti,ina230x";
+ reg = <0x4c>;
+ ti,rail-name = "VDD_3V3B_SMPS9";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x3269>;
+ ti,power-lsb = <198>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4e{
+ compatible = "ti,ina230x";
+ reg = <0x4e>;
+ ti,rail-name = "VDD_LCD_1V8B_DIS";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <39>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4f{
+ compatible = "ti,ina230x";
+ reg = <0x4f>;
+ ti,rail-name = "VDD_1V05_SMPS8";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <130>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c2: i2c@2 {
reg = <2>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@49{
+ compatible = "ti,ina230x";
+ reg = <0x49>;
+ ti,rail-name = "VDD_SYS_BL";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x1A29>;
+ ti,power-lsb = <637>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4c{
+ compatible = "ti,ina230x";
+ reg = <0x4c>;
+ ti,rail-name = "AVDD_1V05_LDO2";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <390>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c3: i2c@3 {
reg = <3>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
};
};
};
diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a01.dtsi b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a01.dtsi
index 995e1c2bcbb5..9d093ad66050 100644
--- a/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a01.dtsi
+++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-tn8-powermon-e1780-1100-a01.dtsi
@@ -16,13 +16,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/ {
- aliases {
- i2c6 = &pca9546_i2c0;
- i2c7 = &pca9546_i2c1;
- i2c8 = &pca9546_i2c2;
- i2c9 = &pca9546_i2c3;
- };
-
i2c@7000c400 {
pca9546@71 {
compatible = "nxp,pca9546";
@@ -32,21 +25,286 @@
pca9546_i2c0: i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "__VDD_BAT";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <5>;
+ ti,calibration-data = <0x1FF7>;
+ ti,power-lsb = <3128>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "__VDD_SYS_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1AC5>;
+ ti,power-lsb = <1867>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@42{
+ compatible = "ti,ina230x";
+ reg = <0x42>;
+ ti,rail-name = "__VDD_SYS_BUCKSOC";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x2ED7>;
+ ti,power-lsb = <1067>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@43{
+ compatible = "ti,ina230x";
+ reg = <0x43>;
+ ti,rail-name = "__VDD_SYS_BUCKGPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1F38>;
+ ti,power-lsb = <1601>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c1: i2c@1 {
reg = <1>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "VDD_SYS_BAT";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <3>;
+ ti,calibration-data = <0x3547>;
+ ti,power-lsb = <3128>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "VDD_RTC_LDO3";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <50>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <78>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@42{
+ compatible = "ti,ina230x";
+ reg = <0x42>;
+ ti,rail-name = "VDD_SYS_BUCKSOC";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x2ED7>;
+ ti,power-lsb = <1067>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@43{
+ compatible = "ti,ina230x";
+ reg = <0x43>;
+ ti,rail-name = "VDD_SOC_SD1";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <1>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <3906>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@44{
+ compatible = "ti,ina230x";
+ reg = <0x44>;
+ ti,rail-name = "VDD_SYS_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1AC5>;
+ ti,power-lsb = <1867>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@45{
+ compatible = "ti,ina230x";
+ reg = <0x45>;
+ ti,rail-name = "VDD_CPU_BUCKCPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <1>;
+ ti,calibration-data = <0x2ECF>;
+ ti,power-lsb = <10681>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@46{
+ compatible = "ti,ina230x";
+ reg = <0x46>;
+ ti,rail-name = "VDD_1V8_SD5";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x45F0>;
+ ti,power-lsb = <714>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@47{
+ compatible = "ti,ina230x";
+ reg = <0x47>;
+ ti,rail-name = "VDD_3V3A_LDO1_6";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <390>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@48{
+ compatible = "ti,ina230x";
+ reg = <0x48>;
+ ti,rail-name = "VDD_DIS_3V3_LCD";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <390>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@49{
+ compatible = "ti,ina230x";
+ reg = <0x49>;
+ ti,rail-name = "VDD_1V35_SD2";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <1>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <3906>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4b{
+ compatible = "ti,ina230x";
+ reg = <0x4b>;
+ ti,rail-name = "VDD_SYS_BUCKGPU";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x1F38>;
+ ti,power-lsb = <1601>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4e{
+ compatible = "ti,ina230x";
+ reg = <0x4e>;
+ ti,rail-name = "VDD_LCD_1V8B_DIS";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <100>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <39>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@4f{
+ compatible = "ti,ina230x";
+ reg = <0x4f>;
+ ti,rail-name = "VDD_1V05_LDO0";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <30>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <130>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c2: i2c@2 {
reg = <2>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ina230@40{
+ compatible = "ti,ina230x";
+ reg = <0x40>;
+ ti,rail-name = "VDD_1V05_SD4";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <390>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@41{
+ compatible = "ti,ina230x";
+ reg = <0x41>;
+ ti,rail-name = "VDD_1V8A_LDO2_5_7";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <10>;
+ ti,calibration-data = <0x7FFF>;
+ ti,power-lsb = <390>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
+
+ ina230@49{
+ compatible = "ti,ina230x";
+ reg = <0x49>;
+ ti,rail-name = "VDD_SYS_BL";
+ ti,continuous-config = <0x0407>;
+ ti,trigger-config = <0x0403>;
+ ti,resistor = <50>;
+ ti,calibration-data = <0x2468>;
+ ti,power-lsb = <274>;
+ ti,divisor = <25>;
+ ti,precision-multiplier = <1000>;
+ };
};
pca9546_i2c3: i2c@3 {
reg = <3>;
i2c-mux,deselect-on-exit;
+ #address-cells = <1>;
+ #size-cells = <0>;
};
};
};
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
index e543dacd9180..806776d92c5d 100644
--- a/arch/arm/mach-tegra/Makefile
+++ b/arch/arm/mach-tegra/Makefile
@@ -234,7 +234,6 @@ obj-${CONFIG_MACH_ARDBEG} += board-tn8-power.o
obj-${CONFIG_MACH_ARDBEG} += board-norrin-power.o
obj-${CONFIG_MACH_ARDBEG} += board-norrin-kbc.o
obj-${CONFIG_MACH_ARDBEG} += board-norrin-memory.o
-obj-${CONFIG_MACH_ARDBEG} += board-ardbeg-powermon.o
obj-${CONFIG_MACH_ARDBEG} += panel-a-1080p-11-6.o
obj-${CONFIG_MACH_ARDBEG} += panel-a-1200-800-8-0.o
obj-${CONFIG_MACH_ARDBEG} += panel-s-wqxga-10-1.o
diff --git a/arch/arm/mach-tegra/board-ardbeg-powermon.c b/arch/arm/mach-tegra/board-ardbeg-powermon.c
deleted file mode 100644
index f6f67131f9d7..000000000000
--- a/arch/arm/mach-tegra/board-ardbeg-powermon.c
+++ /dev/null
@@ -1,903 +0,0 @@
-/*
- * arch/arm/mach-tegra/board-ardbeg-powermon.c
- *
- * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include <linux/i2c.h>
-#include <linux/platform_data/ina230.h>
-
-#include "board.h"
-#include "board-ardbeg.h"
-#include "tegra-board-id.h"
-
-#define PRECISION_MULTIPLIER_ARDBEG 1000
-#define ARDBEG_POWER_REWORKED_CONFIG 0x10
-#define VDD_SOC_SD1_REWORKED 10
-#define VDD_CPU_BUCKCPU_REWORKED 10
-#define VDD_1V35_SD2_REWORKED 10
-
-#define AVG_SAMPLES (2 << 9) /* 16 samples */
-
-/* AVG is specified from platform data */
-#define INA230_CONT_CONFIG (AVG_SAMPLES | INA230_VBUS_CT | \
- INA230_VSH_CT | INA230_CONT_MODE)
-#define INA230_TRIG_CONFIG (AVG_SAMPLES | INA230_VBUS_CT | \
- INA230_VSH_CT | INA230_TRIG_MODE)
-
-/* rails on i2c2_0 */
-enum {
- VDD_BAT_0,
- VDD_SYS_BUCKCPU_0,
- VDD_SYS_BUCKSOC_0,
- VDD_SYS_BUCKGPU_0,
-};
-
-/* following rails are present on Ardbeg */
-/* rails on i2c2_1 */
-enum {
- VDD_SYS_BAT,
- VDD_RTC_LDO5,
- VDD_3V3A_SMPS1_2,
- VDD_SOC_SMPS1_2,
- VDD_SYS_BUCKCPU,
- VDD_CPU_BUCKCPU,
- VDD_1V8A_SMPS3,
- VDD_1V8B_SMPS9,
- VDD_GPU_BUCKGPU,
- VDD_1V35_SMPS6,
- VDD_3V3A_SMPS1_2_2,
- VDD_3V3B_SMPS9,
- VDD_LCD_1V8B_DIS,
- VDD_1V05_SMPS8,
-};
-
-/* rails on i2c2_2 */
-enum {
- VDD_SYS_BL,
- AVDD_1V05_LDO2,
-};
-
-/* following rails are present on Ardbeg A01 and onward boards */
-/* rails on i2c2_1 */
-enum {
- ARDBEG_A01_VDD_SYS_BAT,
- ARDBEG_A01_VDD_RTC_LDO3,
- ARDBEG_A01_VDD_SYS_BUCKSOC,
- ARDBEG_A01_VDD_SOC_SD1,
- ARDBEG_A01_VDD_SYS_BUCKCPU,
- ARDBEG_A01_VDD_CPU_BUCKCPU,
- ARDBEG_A01_VDD_1V8_SD5,
- ARDBEG_A01_VDD_3V3A_LDO1_6,
- ARDBEG_A01_VDD_DIS_3V3_LCD,
- ARDBEG_A01_VDD_1V35_SD2,
- ARDBEG_A01_VDD_SYS_BUCKGPU,
- ARDBEG_A01_VDD_LCD_1V8B_DIS,
- ARDBEG_A01_VDD_1V05_LDO0,
-};
-
-/* rails on i2c2_2 */
-enum {
- ARDBEG_A01_VDD_1V05_SD4,
- ARDBEG_A01_VDD_1V8A_LDO2_5_7,
- ARDBEG_A01_VDD_SYS_BL,
-};
-
-static struct ina230_platform_data power_mon_info_0[] = {
- /* E1780-A02 (Shield ERS) */
- [VDD_BAT_0] = {
- .calibration_data = 0x1366,
- .power_lsb = 2.577527185 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "__VDD_BAT",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 10,
- },
- [VDD_SYS_BUCKCPU_0] = {
- .calibration_data = 0x1AC5,
- .power_lsb = 1.867795126 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "__VDD_SYS_BUCKCPU",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 10,
- },
- [VDD_SYS_BUCKSOC_0] = {
- .calibration_data = 0x2802,
- .power_lsb = 0.624877954 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "__VDD_SYS_BUCKSOC",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 20,
- },
- [VDD_SYS_BUCKGPU_0] = {
- .calibration_data = 0x1F38,
- .power_lsb = 1.601601602 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "__VDD_SYS_BUCKGPU",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 10,
- },
-};
-
-/* following are power monitor parameters for Ardbeg */
-static struct ina230_platform_data power_mon_info_1[] = {
- [VDD_SYS_BAT] = {
- .calibration_data = 0x1366,
- .power_lsb = 2.577527185 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SYS_BAT",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_RTC_LDO5] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 0.078127384 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_RTC_LDO5",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_3V3A_SMPS1_2] = {
- .calibration_data = 0x4759,
- .power_lsb = 1.401587736 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_3V3A_SMPS1_2",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_SOC_SMPS1_2] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 3.906369213 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SOC_SMPS1_2",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_SYS_BUCKCPU] = {
- .calibration_data = 0x1AC5,
- .power_lsb = 1.867795126 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SYS_BUCKCPU",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_CPU_BUCKCPU] = {
- .calibration_data = 0x2ECF,
- .power_lsb = 10.68179922 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_CPU_BUCKCPU",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_1V8A_SMPS3] = {
- .calibration_data = 0x5BA7,
- .power_lsb = 0.545539786 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_1V8A_SMPS3",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_1V8B_SMPS9] = {
- .calibration_data = 0x50B4,
- .power_lsb = 0.309777348 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_1V8B_SMPS9",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_GPU_BUCKGPU] = {
- .calibration_data = 0x369C,
- .power_lsb = 9.155937053 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_GPU_BUCKGPU",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_1V35_SMPS6] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 3.906369213 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_1V35_SMPS6",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- /* following rail is duplicate of VDD_3V3A_SMPS1_2 hence mark unused */
- [VDD_3V3A_SMPS1_2_2] = {
- .calibration_data = 0x4759,
- .power_lsb = 1.401587736 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "unused_rail",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_3V3B_SMPS9] = {
- .calibration_data = 0x3269,
- .power_lsb = 0.198372724 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_3V3B_SMPS9",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_LCD_1V8B_DIS] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 0.039063692 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_LCD_1V8B_DIS",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [VDD_1V05_SMPS8] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 0.130212307 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_1V05_SMPS8",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-};
-
-static struct ina230_platform_data power_mon_info_2[] = {
- [VDD_SYS_BL] = {
- .calibration_data = 0x1A29,
- .power_lsb = 0.63710119 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SYS_BL",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-
- [AVDD_1V05_LDO2] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 0.390636921 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "AVDD_1V05_LDO2",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- },
-};
-
-/* following are power monitor parameters for Ardbeg A01*/
-static struct ina230_platform_data ardbeg_A01_power_mon_info_1[] = {
- [ARDBEG_A01_VDD_SYS_BAT] = {
- .calibration_data = 0x1366,
- .power_lsb = 2.577527185 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SYS_BAT",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 10,
- },
-
- [ARDBEG_A01_VDD_RTC_LDO3] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 0.078127384 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_RTC_LDO3",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 50,
- },
-
- [ARDBEG_A01_VDD_SYS_BUCKSOC] = {
- .calibration_data = 0x1AAC,
- .power_lsb = 0.624877954 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SYS_BUCKSOC",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 30,
- },
-
- [ARDBEG_A01_VDD_SOC_SD1] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 3.906369213 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SOC_SD1",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 1,
- },
-
- [ARDBEG_A01_VDD_SYS_BUCKCPU] = {
- .calibration_data = 0x1AC5,
- .power_lsb = 1.867795126 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SYS_BUCKCPU",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 10,
- },
-
- [ARDBEG_A01_VDD_CPU_BUCKCPU] = {
- .calibration_data = 0x2ECF,
- .power_lsb = 10.68179922 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_CPU_BUCKCPU",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 1,
- },
-
- [ARDBEG_A01_VDD_1V8_SD5] = {
- .calibration_data = 0x45F0,
- .power_lsb = 0.714924039 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_1V8_SD5",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 10,
- },
-
- [ARDBEG_A01_VDD_3V3A_LDO1_6] = {
- .calibration_data = 0x3A83,
- .power_lsb = 0.042726484 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_3V3A_LDO1_6",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 200,
- },
-
- [ARDBEG_A01_VDD_DIS_3V3_LCD] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 0.390636921 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_DIS_3V3_LCD",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 10,
- },
-
- [ARDBEG_A01_VDD_1V35_SD2] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 3.906369213 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_1V35_SD2",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 1,
- },
-
- [ARDBEG_A01_VDD_SYS_BUCKGPU] = {
- .calibration_data = 0x1F38,
- .power_lsb = 1.601601602 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SYS_BUCKGPU",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 10,
- },
-
- [ARDBEG_A01_VDD_LCD_1V8B_DIS] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 0.039063692 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_LCD_1V8B_DIS",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 100,
- },
-
- [ARDBEG_A01_VDD_1V05_LDO0] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 0.130212307 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_1V05_LDO0",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 30,
- },
-};
-
-static struct ina230_platform_data ardbeg_A01_power_mon_info_2[] = {
- [ARDBEG_A01_VDD_1V05_SD4] = {
- .calibration_data = 0x7FFF,
- .power_lsb = 0.390636921 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_1V05_SD4",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 10,
- },
-
- [ARDBEG_A01_VDD_1V8A_LDO2_5_7] = {
- .calibration_data = 0x5A04,
- .power_lsb = 0.277729561 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_1V8A_LDO2_5_7",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 20,
- },
-
- [ARDBEG_A01_VDD_SYS_BL] = {
- .calibration_data = 0x2468,
- .power_lsb = 0.274678112 * PRECISION_MULTIPLIER_ARDBEG,
- .rail_name = "VDD_SYS_BL",
- .trig_conf = INA230_TRIG_CONFIG,
- .cont_conf = INA230_CONT_CONFIG,
- .divisor = 25,
- .precision_multiplier = PRECISION_MULTIPLIER_ARDBEG,
- .resistor = 50,
- },
-};
-
-/* i2c addresses of rails present on Ardbeg */
-/* addresses on i2c2_0 */
-enum {
- INA_I2C_2_0_ADDR_40,
- INA_I2C_2_0_ADDR_41,
- INA_I2C_2_0_ADDR_42,
- INA_I2C_2_0_ADDR_43,
-};
-
-/* addresses on i2c2_1 */
-enum {
- INA_I2C_2_1_ADDR_40,
- INA_I2C_2_1_ADDR_41,
- INA_I2C_2_1_ADDR_42,
- INA_I2C_2_1_ADDR_43,
- INA_I2C_2_1_ADDR_44,
- INA_I2C_2_1_ADDR_45,
- INA_I2C_2_1_ADDR_46,
- INA_I2C_2_1_ADDR_47,
- INA_I2C_2_1_ADDR_48,
- INA_I2C_2_1_ADDR_49,
- INA_I2C_2_1_ADDR_4B,
- INA_I2C_2_1_ADDR_4C,
- INA_I2C_2_1_ADDR_4E,
- INA_I2C_2_1_ADDR_4F,
-};
-
-/* addresses on i2c2_2 */
-enum {
- INA_I2C_2_2_ADDR_49,
- INA_I2C_2_2_ADDR_4C,
-};
-
-/* i2c addresses of rails present on Ardbeg A01*/
-/* addresses on i2c2_1 */
-enum {
- ARDBEG_A01_INA_I2C_2_1_ADDR_40,
- ARDBEG_A01_INA_I2C_2_1_ADDR_41,
- ARDBEG_A01_INA_I2C_2_1_ADDR_42,
- ARDBEG_A01_INA_I2C_2_1_ADDR_43,
- ARDBEG_A01_INA_I2C_2_1_ADDR_44,
- ARDBEG_A01_INA_I2C_2_1_ADDR_45,
- ARDBEG_A01_INA_I2C_2_1_ADDR_46,
- ARDBEG_A01_INA_I2C_2_1_ADDR_47,
- ARDBEG_A01_INA_I2C_2_1_ADDR_48,
- ARDBEG_A01_INA_I2C_2_1_ADDR_49,
- ARDBEG_A01_INA_I2C_2_1_ADDR_4B,
- ARDBEG_A01_INA_I2C_2_1_ADDR_4E,
- ARDBEG_A01_INA_I2C_2_1_ADDR_4F,
-};
-
-/* addresses on i2c2_2 */
-enum {
- ARDBEG_A01_INA_I2C_2_2_ADDR_40,
- ARDBEG_A01_INA_I2C_2_2_ADDR_41,
- ARDBEG_A01_INA_I2C_2_2_ADDR_49,
-};
-
-/* following is the i2c board info for Ardbeg */
-static struct i2c_board_info ardbeg_i2c2_0_ina230_board_info[] = {
- [INA_I2C_2_0_ADDR_40] = {
- I2C_BOARD_INFO("ina230", 0x40),
- .platform_data = &power_mon_info_0[VDD_BAT_0],
- .irq = -1,
- },
-
- [INA_I2C_2_0_ADDR_41] = {
- I2C_BOARD_INFO("ina230", 0x41),
- .platform_data = &power_mon_info_0[VDD_SYS_BUCKCPU_0],
- .irq = -1,
- },
-
- [INA_I2C_2_0_ADDR_42] = {
- I2C_BOARD_INFO("ina230", 0x42),
- .platform_data = &power_mon_info_0[VDD_SYS_BUCKSOC_0],
- .irq = -1,
- },
-
- [INA_I2C_2_0_ADDR_43] = {
- I2C_BOARD_INFO("ina230", 0x43),
- .platform_data = &power_mon_info_0[VDD_SYS_BUCKGPU_0],
- .irq = -1,
- },
-};
-
-static struct i2c_board_info ardbeg_i2c2_1_ina230_board_info[] = {
- [INA_I2C_2_1_ADDR_40] = {
- I2C_BOARD_INFO("ina230", 0x40),
- .platform_data = &power_mon_info_1[VDD_SYS_BAT],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_41] = {
- I2C_BOARD_INFO("ina230", 0x41),
- .platform_data = &power_mon_info_1[VDD_RTC_LDO5],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_42] = {
- I2C_BOARD_INFO("ina230", 0x42),
- .platform_data = &power_mon_info_1[VDD_3V3A_SMPS1_2],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_43] = {
- I2C_BOARD_INFO("ina230", 0x43),
- .platform_data = &power_mon_info_1[VDD_SOC_SMPS1_2],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_44] = {
- I2C_BOARD_INFO("ina230", 0x44),
- .platform_data = &power_mon_info_1[VDD_SYS_BUCKCPU],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_45] = {
- I2C_BOARD_INFO("ina230", 0x45),
- .platform_data = &power_mon_info_1[VDD_CPU_BUCKCPU],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_46] = {
- I2C_BOARD_INFO("ina230", 0x46),
- .platform_data = &power_mon_info_1[VDD_1V8A_SMPS3],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_47] = {
- I2C_BOARD_INFO("ina230", 0x47),
- .platform_data = &power_mon_info_1[VDD_1V8B_SMPS9],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_48] = {
- I2C_BOARD_INFO("ina230", 0x48),
- .platform_data = &power_mon_info_1[VDD_GPU_BUCKGPU],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_49] = {
- I2C_BOARD_INFO("ina230", 0x49),
- .platform_data = &power_mon_info_1[VDD_1V35_SMPS6],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_4B] = {
- I2C_BOARD_INFO("ina230", 0x4B),
- .platform_data = &power_mon_info_1[VDD_3V3A_SMPS1_2_2],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_4C] = {
- I2C_BOARD_INFO("ina230", 0x4C),
- .platform_data = &power_mon_info_1[VDD_3V3B_SMPS9],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_4E] = {
- I2C_BOARD_INFO("ina230", 0x4E),
- .platform_data = &power_mon_info_1[VDD_LCD_1V8B_DIS],
- .irq = -1,
- },
-
- [INA_I2C_2_1_ADDR_4F] = {
- I2C_BOARD_INFO("ina230", 0x4F),
- .platform_data = &power_mon_info_1[VDD_1V05_SMPS8],
- .irq = -1,
- },
-};
-
-static struct i2c_board_info ardbeg_i2c2_2_ina230_board_info[] = {
- [INA_I2C_2_2_ADDR_49] = {
- I2C_BOARD_INFO("ina230", 0x49),
- .platform_data = &power_mon_info_2[VDD_SYS_BL],
- .irq = -1,
- },
-
- [INA_I2C_2_2_ADDR_4C] = {
- I2C_BOARD_INFO("ina230", 0x4C),
- .platform_data = &power_mon_info_2[AVDD_1V05_LDO2],
- .irq = -1,
- },
-
-};
-
-/* following is the i2c board info for Ardbeg A01 */
-static struct i2c_board_info ardbeg_A01_i2c2_1_ina230_board_info[] = {
- [ARDBEG_A01_INA_I2C_2_1_ADDR_40] = {
- I2C_BOARD_INFO("ina230", 0x40),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BAT],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_41] = {
- I2C_BOARD_INFO("ina230", 0x41),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_RTC_LDO3],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_42] = {
- I2C_BOARD_INFO("ina230", 0x42),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BUCKSOC],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_43] = {
- I2C_BOARD_INFO("ina230", 0x43),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SOC_SD1],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_44] = {
- I2C_BOARD_INFO("ina230", 0x44),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BUCKCPU],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_45] = {
- I2C_BOARD_INFO("ina230", 0x45),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_CPU_BUCKCPU],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_46] = {
- I2C_BOARD_INFO("ina230", 0x46),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_1V8_SD5],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_47] = {
- I2C_BOARD_INFO("ina230", 0x47),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_3V3A_LDO1_6],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_48] = {
- I2C_BOARD_INFO("ina230", 0x48),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_DIS_3V3_LCD],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_49] = {
- I2C_BOARD_INFO("ina230", 0x49),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_1V35_SD2],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_4B] = {
- I2C_BOARD_INFO("ina230", 0x4B),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BUCKGPU],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_4E] = {
- I2C_BOARD_INFO("ina230", 0x4E),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_LCD_1V8B_DIS],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_1_ADDR_4F] = {
- I2C_BOARD_INFO("ina230", 0x4F),
- .platform_data =
- &ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_1V05_LDO0],
- .irq = -1,
- },
-};
-
-static struct i2c_board_info ardbeg_A01_i2c2_2_ina230_board_info[] = {
- [ARDBEG_A01_INA_I2C_2_2_ADDR_40] = {
- I2C_BOARD_INFO("ina230", 0x40),
- .platform_data =
- &ardbeg_A01_power_mon_info_2[ARDBEG_A01_VDD_1V05_SD4],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_2_ADDR_41] = {
- I2C_BOARD_INFO("ina230", 0x41),
- .platform_data =
- &ardbeg_A01_power_mon_info_2[ARDBEG_A01_VDD_1V8A_LDO2_5_7],
- .irq = -1,
- },
-
- [ARDBEG_A01_INA_I2C_2_2_ADDR_49] = {
- I2C_BOARD_INFO("ina230", 0x49),
- .platform_data =
- &ardbeg_A01_power_mon_info_2[ARDBEG_A01_VDD_SYS_BL],
- .irq = -1,
- },
-};
-
-static void __init register_devices_ardbeg_A01(void)
-{
- i2c_register_board_info(PCA954x_I2C_BUS1,
- ardbeg_A01_i2c2_1_ina230_board_info,
- ARRAY_SIZE(ardbeg_A01_i2c2_1_ina230_board_info));
-
- i2c_register_board_info(PCA954x_I2C_BUS2,
- ardbeg_A01_i2c2_2_ina230_board_info,
- ARRAY_SIZE(ardbeg_A01_i2c2_2_ina230_board_info));
-}
-
-static void __init register_devices_ardbeg(void)
-{
- i2c_register_board_info(PCA954x_I2C_BUS1,
- ardbeg_i2c2_1_ina230_board_info,
- ARRAY_SIZE(ardbeg_i2c2_1_ina230_board_info));
-
- i2c_register_board_info(PCA954x_I2C_BUS2,
- ardbeg_i2c2_2_ina230_board_info,
- ARRAY_SIZE(ardbeg_i2c2_2_ina230_board_info));
-}
-
-static void modify_reworked_rail_data(void)
-{
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_1V35_SD2].resistor
- = VDD_1V35_SD2_REWORKED;
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_CPU_BUCKCPU].resistor
- = VDD_CPU_BUCKCPU_REWORKED;
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SOC_SD1].resistor
- = VDD_SOC_SD1_REWORKED;
-}
-
-static void modify_tn8_rail_data(void)
-{
- /* E1780-A02 TN8 w/ E1736-A00 PMU*/
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BAT]
- .calibration_data = 0x3547;
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BAT]
- .power_lsb = 3.128284087 * PRECISION_MULTIPLIER_ARDBEG;
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BAT]
- .resistor = 3;
-
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BUCKSOC]
- .calibration_data = 0x2ED7;
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BUCKSOC]
- .power_lsb = 1.067467267 * PRECISION_MULTIPLIER_ARDBEG;
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_SYS_BUCKSOC]
- .resistor = 10;
-
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_3V3A_LDO1_6]
- .calibration_data = 0x7FFF;
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_3V3A_LDO1_6]
- .power_lsb = 0.390636921 * PRECISION_MULTIPLIER_ARDBEG;
- ardbeg_A01_power_mon_info_1[ARDBEG_A01_VDD_3V3A_LDO1_6]
- .resistor = 10;
-
- ardbeg_A01_power_mon_info_2[ARDBEG_A01_VDD_1V8A_LDO2_5_7]
- .calibration_data = 0x7FFF;
- ardbeg_A01_power_mon_info_2[ARDBEG_A01_VDD_1V8A_LDO2_5_7]
- .power_lsb = 0.390636921 * PRECISION_MULTIPLIER_ARDBEG;
- ardbeg_A01_power_mon_info_2[ARDBEG_A01_VDD_1V8A_LDO2_5_7]
- .resistor = 10;
-
- power_mon_info_0[VDD_BAT_0]
- .calibration_data = 0x1FF7;
- power_mon_info_0[VDD_BAT_0]
- .power_lsb = 3.128437004 * PRECISION_MULTIPLIER_ARDBEG;
- power_mon_info_0[VDD_BAT_0]
- .resistor = 5;
-
- power_mon_info_0[VDD_SYS_BUCKSOC_0]
- .calibration_data = 0x2ED7;
- power_mon_info_0[VDD_SYS_BUCKSOC_0]
- .power_lsb = 1.067467267 * PRECISION_MULTIPLIER_ARDBEG;
- power_mon_info_0[VDD_SYS_BUCKSOC_0]
- .resistor = 10;
-}
-
-int __init ardbeg_pmon_init(void)
-{
- /*
- * Get power_config of board and check whether
- * board is power reworked or not.
- * In case board is reworked, modify rail data
- * for which rework was done.
- */
- u8 power_config;
- struct board_info bi;
- power_config = get_power_config();
- if (power_config & ARDBEG_POWER_REWORKED_CONFIG)
- modify_reworked_rail_data();
-
- tegra_get_board_info(&bi);
-
- if (bi.sku == 1100)
- modify_tn8_rail_data();
-
- i2c_register_board_info(PCA954x_I2C_BUS0,
- ardbeg_i2c2_0_ina230_board_info,
- ARRAY_SIZE(ardbeg_i2c2_0_ina230_board_info));
-
- if (bi.fab >= BOARD_FAB_A01)
- register_devices_ardbeg_A01();
- else if ((bi.board_id != BOARD_E1784) &&
- (bi.board_id != BOARD_E1922) &&
- (bi.board_id != BOARD_E1923))
- register_devices_ardbeg();
-
- return 0;
-}
-
diff --git a/arch/arm/mach-tegra/board-ardbeg.c b/arch/arm/mach-tegra/board-ardbeg.c
index e0aeeeaf245b..fb5cc144ee90 100644
--- a/arch/arm/mach-tegra/board-ardbeg.c
+++ b/arch/arm/mach-tegra/board-ardbeg.c
@@ -1251,21 +1251,7 @@ static void __init tegra_ardbeg_late_init(void)
isomgr_init();
ardbeg_touch_init();
ardbeg_panel_init();
- switch (board_info.board_id) {
- case BOARD_PM358:
- /* power mon is in DT */
- break;
- case BOARD_PM359:
- ; /* powermon is not present in Laguna ERS-S */
- break;
- case BOARD_E1784:
- case BOARD_P1761:
- /* power mon is in DT */
- break;
- default:
- ardbeg_pmon_init();
- break;
- }
+
/* put PEX pads into DPD mode to save additional power */
tegra_io_dpd_enable(&pexbias_io);
tegra_io_dpd_enable(&pexclk1_io);
diff --git a/arch/arm/mach-tegra/board-ardbeg.h b/arch/arm/mach-tegra/board-ardbeg.h
index 1a5b0c329d91..a09232c0ee45 100644
--- a/arch/arm/mach-tegra/board-ardbeg.h
+++ b/arch/arm/mach-tegra/board-ardbeg.h
@@ -35,7 +35,6 @@ void arbdeg_sata_clk_gate(void);
int ardbeg_sensors_init(void);
int ardbeg_regulator_init(void);
int ardbeg_suspend_init(void);
-int ardbeg_pmon_init(void);
int ardbeg_rail_alignment_init(void);
int ardbeg_soctherm_init(void);
int ardbeg_edp_init(void);
@@ -62,14 +61,6 @@ void shield_sysedp_batmon_init(void);
#define TEGRA_SOC_OC_IRQ_BASE TEGRA_NR_IRQS
#define TEGRA_SOC_OC_NUM_IRQ TEGRA_SOC_OC_IRQ_MAX
-/* PCA954x I2C bus expander bus addresses */
-#define PCA954x_I2C_BUS_BASE 6
-#define PCA954x_I2C_BUS0 (PCA954x_I2C_BUS_BASE + 0)
-#define PCA954x_I2C_BUS1 (PCA954x_I2C_BUS_BASE + 1)
-#define PCA954x_I2C_BUS2 (PCA954x_I2C_BUS_BASE + 2)
-#define PCA954x_I2C_BUS3 (PCA954x_I2C_BUS_BASE + 3)
-
-
#define PALMAS_TEGRA_GPIO_BASE TEGRA_NR_GPIOS
#define PALMAS_TEGRA_IRQ_BASE (TEGRA_SOC_OC_IRQ_BASE + TEGRA_SOC_OC_NUM_IRQ)
#define AS3722_GPIO_BASE TEGRA_NR_GPIOS
diff --git a/arch/arm64/mach-tegra/Makefile b/arch/arm64/mach-tegra/Makefile
index 68d0ea8bcdc1..80fe196fa906 100755
--- a/arch/arm64/mach-tegra/Makefile
+++ b/arch/arm64/mach-tegra/Makefile
@@ -17,7 +17,6 @@ obj-${CONFIG_MACH_EXUMA} += board-exuma.o
obj-${CONFIG_MACH_EXUMA} += board-exuma-panel.o
obj-${CONFIG_MACH_EXUMA} += board-ardbeg64-memory.o
obj-${CONFIG_MACH_EXUMA} += board-ardbeg64-power.o
-obj-${CONFIG_MACH_EXUMA} += board-ardbeg64-powermon.o
obj-${CONFIG_MACH_EXUMA} += board-ardbeg64-sdhci.o
obj-${CONFIG_MACH_EXUMA} += board-ardbeg64-sensors.o
obj-${CONFIG_MACH_EXUMA} += board-ardbeg64-sysedp.o
@@ -36,7 +35,6 @@ obj-${CONFIG_MACH_T132REF} += board-t132ref-norrin-power.o
obj-${CONFIG_MACH_T132REF} += board-t132ref-norrin-memory.o
obj-${CONFIG_MACH_T132REF} += board-t132ref-panel.o
obj-${CONFIG_MACH_T132REF} += board-t132ref-power.o
-obj-${CONFIG_MACH_T132REF} += board-t132ref-powermon.o
obj-${CONFIG_MACH_T132REF} += board-t132ref-sata.o
obj-${CONFIG_MACH_T132REF} += board-t132ref-sdhci.o
obj-${CONFIG_MACH_T132REF} += board-t132ref-tn8-power.o
diff --git a/arch/arm64/mach-tegra/board-ardbeg64-powermon.c b/arch/arm64/mach-tegra/board-ardbeg64-powermon.c
deleted file mode 100644
index c34861b4706a..000000000000
--- a/arch/arm64/mach-tegra/board-ardbeg64-powermon.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FIXME: temporary */
-#include "../../arm/mach-tegra/board-ardbeg-powermon.c"
diff --git a/arch/arm64/mach-tegra/board-t132ref-powermon.c b/arch/arm64/mach-tegra/board-t132ref-powermon.c
deleted file mode 100644
index c34861b4706a..000000000000
--- a/arch/arm64/mach-tegra/board-t132ref-powermon.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* FIXME: temporary */
-#include "../../arm/mach-tegra/board-ardbeg-powermon.c"