From: Mihai Sain Date: Tue, 11 Feb 2025 14:33:02 +0000 (+0200) Subject: ARM: dts: microchip: sama7d65_curiosity: Add power monitor support X-Git-Tag: v6.15-rc1~159^2~13^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e60cf9d46dfdd6bc65f1eeeb4af725623fbe94c;p=thirdparty%2Fkernel%2Flinux.git ARM: dts: microchip: sama7d65_curiosity: Add power monitor support Add PAC1934 support in order to monitor the board power consumption. Device is connected on flexcom10 in twi mode. [root@SAMA7D65 ~]$ awk -f pac1934.awk VDD3V3 current: 146.173 mA, voltage: 3302.73 mV VDDIODDR current: 62.1356 mA, voltage: 1353.96 mV VDDCORE current: 242.248 mA, voltage: 1204.36 mV VDDCPU current: 213.565 mA, voltage: 1303.05 mV Signed-off-by: Mihai Sain Link: https://lore.kernel.org/r/20250211143302.4102-3-mihai.sain@microchip.com [claudiu.beznea: kept pinctrl nodes alphanumerically sorted in the pinctrl container] Signed-off-by: Claudiu Beznea --- diff --git a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts index 0f86360fb733a..545cfcc57e300 100644 --- a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts +++ b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts @@ -43,11 +43,63 @@ status = "okay"; }; +&flx10 { + atmel,flexcom-mode = ; + status = "okay"; +}; + +&i2c10 { + dmas = <0>, <0>; + i2c-analog-filter; + i2c-digital-filter; + i2c-digital-filter-width-ns = <35>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c10_default>; + status = "okay"; + + power-monitor@10 { + compatible = "microchip,pac1934"; + reg = <0x10>; + #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"; + }; + }; +}; + &main_xtal { clock-frequency = <24000000>; }; &pioa { + pinctrl_i2c10_default: i2c10-default{ + pinmux = , + ; + bias-pull-up; + }; + pinctrl_sdmmc1_default: sdmmc1-default { cmd-data { pinmux = ,