Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: microchip: sam9x75_curiosity: Add power monitor support

Add PAC1934 support in order to monitor the board power consumption.
Device is connected on flexcom7 in twi mode.

[root@SAM9X75 ~]$ awk -f pac1934.awk
VDD3V3 current: 10.675 mA, voltage: 3295.41 mV
VDDOUT4 current: 5.7625 mA, voltage: 1196.78 mV
VDDCORE current: 115.442 mA, voltage: 1243.65 mV
VDDIODDR current: 29.585 mA, voltage: 1345.21 mV

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
Link: https://lore.kernel.org/r/20241122080523.3941-3-mihai.sain@microchip.com
[claudiu.beznea: s/VDDOUT4/DCDC4 to comply with schematics]
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>

authored by

Mihai Sain and committed by
Claudiu Beznea
36591b7d 18dd1252

+52
+52
arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
··· 198 198 }; 199 199 }; 200 200 201 + &flx7 { 202 + atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>; 203 + status = "okay"; 204 + }; 205 + 206 + &i2c7 { 207 + dmas = <0>, <0>; 208 + i2c-analog-filter; 209 + i2c-digital-filter; 210 + i2c-digital-filter-width-ns = <35>; 211 + pinctrl-names = "default"; 212 + pinctrl-0 = <&pinctrl_flx7_default>; 213 + status = "okay"; 214 + 215 + power-monitor@10 { 216 + compatible = "microchip,pac1934"; 217 + reg = <0x10>; 218 + #address-cells = <1>; 219 + #size-cells = <0>; 220 + 221 + channel@1 { 222 + reg = <0x1>; 223 + shunt-resistor-micro-ohms = <10000>; 224 + label = "VDD3V3"; 225 + }; 226 + 227 + channel@2 { 228 + reg = <0x2>; 229 + shunt-resistor-micro-ohms = <10000>; 230 + label = "DCDC4"; 231 + }; 232 + 233 + channel@3 { 234 + reg = <0x3>; 235 + shunt-resistor-micro-ohms = <10000>; 236 + label = "VDDCORE"; 237 + }; 238 + 239 + channel@4 { 240 + reg = <0x4>; 241 + shunt-resistor-micro-ohms = <10000>; 242 + label = "VDDIODDR"; 243 + }; 244 + }; 245 + }; 246 + 201 247 &i2s { 202 248 pinctrl-names = "default"; 203 249 pinctrl-0 = <&pinctrl_i2s_default>; ··· 276 230 atmel,pins = 277 231 <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>, 278 232 <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; 233 + }; 234 + 235 + pinctrl_flx7_default: flx7-default { 236 + atmel,pins = 237 + <AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>, 238 + <AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>; 279 239 }; 280 240 }; 281 241