Add power monitor support on Microchip boards
Subsystems (3)
cover Add power monitor support on Microchip boards
This patch series adds power monitor support using PAC1934 on Microchip boards.
[root@sama7g5 ~]$ lsiio
Device 001: pac1934
Device 000: e1000000.adc
[root@sama7g5 ~]$ awk -f pac1934.awk VDD3V3 current: 161.747 mA, voltage: 3300.29 mV VDDIODDR current: 72.616 mA, voltage: 1346.68 mV VDDCORE current: 249.84 mA, voltage: 1204.59 mV VDDCPU current: 68.4628 mA, voltage: 1301.27 mV
Mihai Sain (5):
ARM: dts: microchip: sam9x60ek: Add power monitor support
ARM: dts: microchip: sama5d2_icp: Add power monitor support
ARM: dts: microchip: sama7g54_curiosity: Add power monitor support
ARM: dts: microchip: sama7g5ek: Add power monitor support
ARM: configs: at91: enable PAC1934 driver as module
.../arm/boot/dts/microchip/at91-sam9x60ek.dts | 31 +++++++++++++++++++ .../boot/dts/microchip/at91-sama5d2_icp.dts | 31 +++++++++++++++++++ .../dts/microchip/at91-sama7g54_curiosity.dts | 31 +++++++++++++++++++ .../arm/boot/dts/microchip/at91-sama7g5ek.dts | 31 +++++++++++++++++++ arch/arm/configs/at91_dt_defconfig | 1 + arch/arm/configs/sama5_defconfig | 1 + arch/arm/configs/sama7_defconfig | 1 + 7 files changed, 127 insertions(+)
base-commit: de5cb0dcb74c294ec527eddfe5094acfdb21ff21
Signature · 1 line
2.46.1
PATCH 1/5 ARM: dts: microchip: sam9x60ek: Add power monitor support
Add PAC1934 support in order to monitor the board power consumption.
--- .../arm/boot/dts/microchip/at91-sam9x60ek.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+)
arch/arm/boot/dts/microchip/at91-sam9x60ek.dts +31 -0
@@ -260,6 +260,37 @@ i2c6: i2c@600 { i2c-digital-filter-width-ns = <35>; status = "okay"; + power-monitor@17 { + compatible = "microchip,pac1934"; + reg = <0x17>; + #address-cells = <1>; + #size-cells = <0>; + + channel@1 { + reg = <0x1>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDIOM"; + }; + + channel@2 { + reg = <0x2>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDCORE"; + }; + + channel@3 { + reg = <0x3>; + shunt-resistor-micro-ohms = <10000>; + label = "VDD3V3_MPU"; + }; + + channel@4 { + reg = <0x4>; + shunt-resistor-micro-ohms = <10000>; + label = "VDD3V3"; + }; + }; + gpio_exp: mcp23008@20 { compatible = "microchip,mcp23008"; reg = <0x20>;
Signature · 1 line
2.46.1
PATCH 2/5 ARM: dts: microchip: sama5d2_icp: Add power monitor support
In reply to Mihai SainAdd PAC1934 support in order to monitor the board power consumption.
--- .../boot/dts/microchip/at91-sama5d2_icp.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+)
arch/arm/boot/dts/microchip/at91-sama5d2_icp.dts +31 -0
@@ -195,6 +195,37 @@ i2c6: i2c@600 { i2c-digital-filter-width-ns = <35>; status = "okay"; + power-monitor@10 { + compatible = "microchip,pac1934"; + reg = <0x10>; + #address-cells = <1>; + #size-cells = <0>; + + channel@1 { + reg = <0x1>; + shunt-resistor-micro-ohms = <10000>; + label = "VDD3V3_1"; + }; + + channel@2 { + reg = <0x2>; + shunt-resistor-micro-ohms = <10000>; + label = "VDD3V3_2"; + }; + + channel@3 { + reg = <0x3>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDCORE"; + }; + + channel@4 { + reg = <0x4>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDIODDR"; + }; + }; + mcp16502@5b { compatible = "microchip,mcp16502"; reg = <0x5b>;
Signature · 1 line
2.46.1
PATCH 3/5 ARM: dts: microchip: sama7g54_curiosity: Add power monitor support
In reply to Mihai SainAdd PAC1934 support in order to monitor the board power consumption.
--- .../dts/microchip/at91-sama7g54_curiosity.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+)
arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dts +31 -0
@@ -186,6 +186,37 @@ i2c10: i2c@600 { i2c-digital-filter-width-ns = <35>; status = "okay"; + power-monitor@1f { + compatible = "microchip,pac1934"; + reg = <0x1f>; + #address-cells = <1>; + #size-cells = <0>; + + channel@1 { + reg = <0x1>; + shunt-resistor-micro-ohms = <47000>; + label = "VDD3V3"; + }; + + channel@2 { + reg = <0x2>; + shunt-resistor-micro-ohms = <47000>; + label = "VDDIODDR"; + }; + + channel@3 { + reg = <0x3>; + shunt-resistor-micro-ohms = <47000>; + label = "VDDCORE"; + }; + + channel@4 { + reg = <0x4>; + shunt-resistor-micro-ohms = <47000>; + label = "VDDCPU"; + }; + }; + eeprom@51 { compatible = "atmel,24c02"; reg = <0x51>;
Signature · 1 line
2.46.1
PATCH 4/5 ARM: dts: microchip: sama7g5ek: Add power monitor support
In reply to Mihai SainAdd PAC1934 support in order to monitor the board power consumption.
--- .../arm/boot/dts/microchip/at91-sama7g5ek.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+)
arch/arm/boot/dts/microchip/at91-sama7g5ek.dts +31 -0
@@ -244,6 +244,37 @@ i2c1: i2c@600 { i2c-digital-filter-width-ns = <35>; status = "okay"; + power-monitor@10 { + compatible = "microchip,pac1934"; + reg = <0x10>; + #address-cells = <1>; + #size-cells = <0>; + + channel@1 { + reg = <0x1>; + shunt-resistor-micro-ohms = <10000>; + label = "VDD3V3"; + }; + + channel@2 { + reg = <0x2>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDIODDR"; + }; + + channel@3 { + reg = <0x3>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDCORE"; + }; + + channel@4 { + reg = <0x4>; + shunt-resistor-micro-ohms = <10000>; + label = "VDDCPU"; + }; + }; + mcp16502@5b { compatible = "microchip,mcp16502"; reg = <0x5b>;
Signature · 1 line
2.46.1
PATCH 5/5 ARM: configs: at91: enable PAC1934 driver as module
In reply to Mihai SainEnable PAC1934 driver and build as module.
--- arch/arm/configs/at91_dt_defconfig | 1 + arch/arm/configs/sama5_defconfig | 1 + arch/arm/configs/sama7_defconfig | 1 + 3 files changed, 3 insertions(+)
arch/arm/configs/at91_dt_defconfig +1 -0
@@ -201,6 +201,7 @@ CONFIG_AT_XDMAC=y CONFIG_IIO=y CONFIG_AT91_ADC=y CONFIG_AT91_SAMA5D2_ADC=y +CONFIG_PAC1934=m CONFIG_PWM=y CONFIG_PWM_ATMEL=y CONFIG_PWM_ATMEL_HLCDC_PWM=y
arch/arm/configs/sama5_defconfig +1 -0
@@ -212,6 +212,7 @@ CONFIG_VIDEO_HANTRO=m CONFIG_IIO=y CONFIG_AT91_ADC=y CONFIG_AT91_SAMA5D2_ADC=y +CONFIG_PAC1934=m CONFIG_ENVELOPE_DETECTOR=m CONFIG_DPOT_DAC=m CONFIG_MCP4531=m
arch/arm/configs/sama7_defconfig +1 -0
@@ -193,6 +193,7 @@ CONFIG_STAGING=y CONFIG_IIO=y CONFIG_IIO_SW_TRIGGER=y CONFIG_AT91_SAMA5D2_ADC=y +CONFIG_PAC1934=m CONFIG_PWM=y CONFIG_PWM_ATMEL=y CONFIG_MCHP_EIC=y
Signature · 1 line
2.46.1
Quoted 6 lines · Mihai Sain
Mihai Sain (5):
ARM: dts: microchip: sam9x60ek: Add power monitor support
ARM: dts: microchip:sama5d2_icp: Add power monitor support
ARM: dts: microchip:sama7g54_curiosity: Add power monitor support
ARM: dts: microchip: sama7g5ek: Add power monitor support
ARM: configs: at91: enable PAC1934 driver as module
Applied to at91-dt, thanks!