* [PATCH 0/2] Add power monitor support on sam9x75-curiosity board
@ 2024-11-22 8:05 Mihai Sain
2024-11-22 8:05 ` [PATCH 1/2] ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi Mihai Sain
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Mihai Sain @ 2024-11-22 8:05 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, nicolas.ferre, alexandre.belloni,
claudiu.beznea, devicetree, linux-arm-kernel, linux-kernel
Cc: Mihai Sain
This patch series adds power monitor support and moves i2c address/size to dtsi.
[root@SAM9X75 ~]$ lsiio
Device 001: pac1934
Device 000: f804c000.adc
Trigger 000: f804c000.adc-dev0-external_rising
[root@SAM9X75 ~]$ awk -f pac1934.awk
VDD3V3 current: 15.7075 mA, voltage: 3298.34 mV
VDDOUT4 current: 8.436 mA, voltage: 1205.08 mV
VDDCORE current: 121.237 mA, voltage: 1250 mV
VDDIODDR current: 34.3125 mA, voltage: 1354.49 mV
Mihai Sain (2):
ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi
ARM: dts: microchip: sam9x75_curiosity: Add power monitor support
.../dts/microchip/at91-sam9x75_curiosity.dts | 54 ++++++++++++++++++-
arch/arm/boot/dts/microchip/sam9x7.dtsi | 26 +++++++++
2 files changed, 78 insertions(+), 2 deletions(-)
base-commit: 28eb75e178d389d325f1666e422bc13bbbb9804c
--
2.47.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi
2024-11-22 8:05 [PATCH 0/2] Add power monitor support on sam9x75-curiosity board Mihai Sain
@ 2024-11-22 8:05 ` Mihai Sain
2024-12-02 8:08 ` Claudiu Beznea
2024-11-22 8:05 ` [PATCH 2/2] ARM: dts: microchip: sam9x75_curiosity: Add power monitor support Mihai Sain
2024-12-08 15:49 ` [PATCH 0/2] Add power monitor support on sam9x75-curiosity board Claudiu Beznea
2 siblings, 1 reply; 9+ messages in thread
From: Mihai Sain @ 2024-11-22 8:05 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, nicolas.ferre, alexandre.belloni,
claudiu.beznea, devicetree, linux-arm-kernel, linux-kernel
Cc: Mihai Sain
Since these properties are common for all i2c subnodes,
move them to SoC dtsi from board dts.
Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
.../dts/microchip/at91-sam9x75_curiosity.dts | 2 --
arch/arm/boot/dts/microchip/sam9x7.dtsi | 26 +++++++++++++++++++
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
index 87b6ea97590b..d453800f8e35 100644
--- a/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
+++ b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
@@ -88,8 +88,6 @@ &flx6 {
};
&i2c6 {
- #address-cells = <1>;
- #size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flx6_default>;
i2c-analog-filter;
diff --git a/arch/arm/boot/dts/microchip/sam9x7.dtsi b/arch/arm/boot/dts/microchip/sam9x7.dtsi
index beb1f34b38d3..aedba0a8318f 100644
--- a/arch/arm/boot/dts/microchip/sam9x7.dtsi
+++ b/arch/arm/boot/dts/microchip/sam9x7.dtsi
@@ -151,6 +151,8 @@ i2c4: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -220,6 +222,8 @@ i2c5: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -312,6 +316,8 @@ i2c11: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 32>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -362,6 +368,8 @@ i2c12: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 33>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -533,6 +541,8 @@ i2c6: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -583,6 +593,8 @@ i2c7: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 10>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -633,6 +645,8 @@ i2c8: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -702,6 +716,8 @@ i2c0: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -771,6 +787,8 @@ i2c1: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 6>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -840,6 +858,8 @@ i2c2: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 7>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -909,6 +929,8 @@ i2c3: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 8>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -984,6 +1006,8 @@ i2c9: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 15>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
@@ -1034,6 +1058,8 @@ i2c10: i2c@600 {
compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
reg = <0x600 0x200>;
interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
+ #address-cells = <1>;
+ #size-cells = <0>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 16>;
dmas = <&dma0
(AT91_XDMAC_DT_MEM_IF(0) |
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] ARM: dts: microchip: sam9x75_curiosity: Add power monitor support
2024-11-22 8:05 [PATCH 0/2] Add power monitor support on sam9x75-curiosity board Mihai Sain
2024-11-22 8:05 ` [PATCH 1/2] ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi Mihai Sain
@ 2024-11-22 8:05 ` Mihai Sain
2024-12-02 8:14 ` Claudiu Beznea
2024-12-08 15:49 ` [PATCH 0/2] Add power monitor support on sam9x75-curiosity board Claudiu Beznea
2 siblings, 1 reply; 9+ messages in thread
From: Mihai Sain @ 2024-11-22 8:05 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, nicolas.ferre, alexandre.belloni,
claudiu.beznea, devicetree, linux-arm-kernel, linux-kernel
Cc: Mihai Sain
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>
---
.../dts/microchip/at91-sam9x75_curiosity.dts | 52 +++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
index d453800f8e35..76d7a756e08c 100644
--- a/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
+++ b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
@@ -198,6 +198,52 @@ regulator-state-standby {
};
};
+&flx7 {
+ atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
+ status = "okay";
+};
+
+&i2c7 {
+ dmas = <0>, <0>;
+ i2c-analog-filter;
+ i2c-digital-filter;
+ i2c-digital-filter-width-ns = <35>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_flx7_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 = <10000>;
+ label = "VDD3V3";
+ };
+
+ channel@2 {
+ reg = <0x2>;
+ shunt-resistor-micro-ohms = <10000>;
+ label = "VDDOUT4";
+ };
+
+ channel@3 {
+ reg = <0x3>;
+ shunt-resistor-micro-ohms = <10000>;
+ label = "VDDCORE";
+ };
+
+ channel@4 {
+ reg = <0x4>;
+ shunt-resistor-micro-ohms = <10000>;
+ label = "VDDIODDR";
+ };
+ };
+};
+
&i2s {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2s_default>;
@@ -231,6 +277,12 @@ pinctrl_flx6_default: flx6-default {
<AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
<AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
};
+
+ pinctrl_flx7_default: flx7-default {
+ atmel,pins =
+ <AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>,
+ <AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>;
+ };
};
gpio-keys {
--
2.47.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi
2024-11-22 8:05 ` [PATCH 1/2] ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi Mihai Sain
@ 2024-12-02 8:08 ` Claudiu Beznea
0 siblings, 0 replies; 9+ messages in thread
From: Claudiu Beznea @ 2024-12-02 8:08 UTC (permalink / raw)
To: Mihai Sain, robh, krzk+dt, conor+dt, nicolas.ferre,
alexandre.belloni, devicetree, linux-arm-kernel, linux-kernel
Hi, Mihai,
On 22.11.2024 10:05, Mihai Sain wrote:
> Since these properties are common for all i2c subnodes,
> move them to SoC dtsi from board dts.
>
> Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
> ---
> .../dts/microchip/at91-sam9x75_curiosity.dts | 2 --
> arch/arm/boot/dts/microchip/sam9x7.dtsi | 26 +++++++++++++++++++
> 2 files changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
> index 87b6ea97590b..d453800f8e35 100644
> --- a/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
> +++ b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
> @@ -88,8 +88,6 @@ &flx6 {
> };
>
> &i2c6 {
> - #address-cells = <1>;
> - #size-cells = <0>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_flx6_default>;
> i2c-analog-filter;
> diff --git a/arch/arm/boot/dts/microchip/sam9x7.dtsi b/arch/arm/boot/dts/microchip/sam9x7.dtsi
> index beb1f34b38d3..aedba0a8318f 100644
> --- a/arch/arm/boot/dts/microchip/sam9x7.dtsi
> +++ b/arch/arm/boot/dts/microchip/sam9x7.dtsi
> @@ -151,6 +151,8 @@ i2c4: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <13 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 13>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -220,6 +222,8 @@ i2c5: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <14 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 14>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -312,6 +316,8 @@ i2c11: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <32 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 32>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -362,6 +368,8 @@ i2c12: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <33 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 33>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -533,6 +541,8 @@ i2c6: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <9 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 9>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -583,6 +593,8 @@ i2c7: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <10 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 10>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -633,6 +645,8 @@ i2c8: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <11 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 11>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -702,6 +716,8 @@ i2c0: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <5 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -771,6 +787,8 @@ i2c1: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <6 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 6>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -840,6 +858,8 @@ i2c2: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <7 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 7>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -909,6 +929,8 @@ i2c3: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <8 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 8>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -984,6 +1006,8 @@ i2c9: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <15 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 15>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
> @@ -1034,6 +1058,8 @@ i2c10: i2c@600 {
> compatible = "microchip,sam9x7-i2c", "microchip,sam9x60-i2c";
> reg = <0x600 0x200>;
> interrupts = <16 IRQ_TYPE_LEVEL_HIGH 7>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> clocks = <&pmc PMC_TYPE_PERIPHERAL 16>;
> dmas = <&dma0
> (AT91_XDMAC_DT_MEM_IF(0) |
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] ARM: dts: microchip: sam9x75_curiosity: Add power monitor support
2024-11-22 8:05 ` [PATCH 2/2] ARM: dts: microchip: sam9x75_curiosity: Add power monitor support Mihai Sain
@ 2024-12-02 8:14 ` Claudiu Beznea
2024-12-02 8:32 ` Mihai.Sain
0 siblings, 1 reply; 9+ messages in thread
From: Claudiu Beznea @ 2024-12-02 8:14 UTC (permalink / raw)
To: Mihai Sain, robh, krzk+dt, conor+dt, nicolas.ferre,
alexandre.belloni, devicetree, linux-arm-kernel, linux-kernel
Hi, Mihai,
On 22.11.2024 10:05, Mihai Sain wrote:
> 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>
> ---
> .../dts/microchip/at91-sam9x75_curiosity.dts | 52 +++++++++++++++++++
> 1 file changed, 52 insertions(+)
>
> diff --git a/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
> index d453800f8e35..76d7a756e08c 100644
> --- a/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
> +++ b/arch/arm/boot/dts/microchip/at91-sam9x75_curiosity.dts
> @@ -198,6 +198,52 @@ regulator-state-standby {
> };
> };
>
> +&flx7 {
> + atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
> + status = "okay";
> +};
> +
> +&i2c7 {
> + dmas = <0>, <0>;
> + i2c-analog-filter;
> + i2c-digital-filter;
> + i2c-digital-filter-width-ns = <35>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_flx7_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 = <10000>;
> + label = "VDD3V3";
> + };
> +
> + channel@2 {
> + reg = <0x2>;
> + shunt-resistor-micro-ohms = <10000>;
> + label = "VDDOUT4";
On the schematics at [1] this seems to be named DCDC4. Is there a mistake
on [1] or this patch needs adjustments? If so, I can do it while applying.
Thank you,
Claudiu
[1]
https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/UserGuides/SAM9X75-Curiosity-User-Guide-DS60001859.pdf
> + };
> +
> + channel@3 {
> + reg = <0x3>;
> + shunt-resistor-micro-ohms = <10000>;
> + label = "VDDCORE";
> + };
> +
> + channel@4 {
> + reg = <0x4>;
> + shunt-resistor-micro-ohms = <10000>;
> + label = "VDDIODDR";
> + };
> + };
> +};
> +
> &i2s {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_i2s_default>;
> @@ -231,6 +277,12 @@ pinctrl_flx6_default: flx6-default {
> <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
> <AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
> };
> +
> + pinctrl_flx7_default: flx7-default {
> + atmel,pins =
> + <AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>,
> + <AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_PULL_UP>;
> + };
> };
>
> gpio-keys {
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 2/2] ARM: dts: microchip: sam9x75_curiosity: Add power monitor support
2024-12-02 8:14 ` Claudiu Beznea
@ 2024-12-02 8:32 ` Mihai.Sain
2024-12-03 8:37 ` Claudiu Beznea
0 siblings, 1 reply; 9+ messages in thread
From: Mihai.Sain @ 2024-12-02 8:32 UTC (permalink / raw)
To: claudiu.beznea, robh, krzk+dt, conor+dt, Nicolas.Ferre,
alexandre.belloni, devicetree, linux-arm-kernel, linux-kernel
Hi Claudiu,
> > + channel@2 {
> > + reg = <0x2>;
> > + shunt-resistor-micro-ohms = <10000>;
> > + label = "VDDOUT4";
>
> On the schematics at [1] this seems to be named DCDC4. Is there a mistake on
> [1] or this patch needs adjustments? If so, I can do it while applying.
I just wanted to use a more friendly name for buck4, since this regulator is not used.
>
> Thank you,
> Claudiu
>
> [1]
> https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocumen
> ts/UserGuides/SAM9X75-Curiosity-User-Guide-DS60001859.pdf
>
Regards,
Mihai
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] ARM: dts: microchip: sam9x75_curiosity: Add power monitor support
2024-12-02 8:32 ` Mihai.Sain
@ 2024-12-03 8:37 ` Claudiu Beznea
2024-12-03 8:47 ` Mihai.Sain
0 siblings, 1 reply; 9+ messages in thread
From: Claudiu Beznea @ 2024-12-03 8:37 UTC (permalink / raw)
To: Mihai.Sain, robh, krzk+dt, conor+dt, Nicolas.Ferre,
alexandre.belloni, devicetree, linux-arm-kernel, linux-kernel
Hi, Mihai,
On 02.12.2024 10:32, Mihai.Sain@microchip.com wrote:
> Hi Claudiu,
>
>>> + channel@2 {
>>> + reg = <0x2>;
>>> + shunt-resistor-micro-ohms = <10000>;
>>> + label = "VDDOUT4";
>>
>> On the schematics at [1] this seems to be named DCDC4. Is there a mistake on
>> [1] or this patch needs adjustments? If so, I can do it while applying.
>
> I just wanted to use a more friendly name for buck4, since this regulator is not used.
For consistency with the rest of the channel names and the fact that we
describe the HW though device tree, I would keep the schematics naming
("DCDC4" in this case). No need to re-send, I can adjust while applying.
Just let me know if all good with you, too.
Thank you,
Claudiu
>
>>
>> Thank you,
>> Claudiu
>>
>> [1]
>> https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocumen
>> ts/UserGuides/SAM9X75-Curiosity-User-Guide-DS60001859.pdf
>>
>
> Regards,
> Mihai
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 2/2] ARM: dts: microchip: sam9x75_curiosity: Add power monitor support
2024-12-03 8:37 ` Claudiu Beznea
@ 2024-12-03 8:47 ` Mihai.Sain
0 siblings, 0 replies; 9+ messages in thread
From: Mihai.Sain @ 2024-12-03 8:47 UTC (permalink / raw)
To: claudiu.beznea, robh, krzk+dt, conor+dt, Nicolas.Ferre,
alexandre.belloni, devicetree, linux-arm-kernel, linux-kernel
> Hi, Mihai,
>
> On 02.12.2024 10:32, Mihai.Sain@microchip.com wrote:
> > Hi Claudiu,
> >
> >>> + channel@2 {
> >>> + reg = <0x2>;
> >>> + shunt-resistor-micro-ohms = <10000>;
> >>> + label = "VDDOUT4";
> >>
> >> On the schematics at [1] this seems to be named DCDC4. Is there a mistake on
> >> [1] or this patch needs adjustments? If so, I can do it while applying.
> >
> > I just wanted to use a more friendly name for buck4, since this regulator is
> not used.
>
> For consistency with the rest of the channel names and the fact that we
> describe the HW though device tree, I would keep the schematics naming
> ("DCDC4" in this case). No need to re-send, I can adjust while applying.
> Just let me know if all good with you, too.
Yes.
I agree we should use the schematics naming for buck4.
>
> Thank you,
> Claudiu
>
> >
> >>
> >> Thank you,
> >> Claudiu
> >>
> >> [1]
> >>
> https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocumen
> >> ts/UserGuides/SAM9X75-Curiosity-User-Guide-DS60001859.pdf
> >>
> >
> > Regards,
> > Mihai
Regards,
Mihai
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] Add power monitor support on sam9x75-curiosity board
2024-11-22 8:05 [PATCH 0/2] Add power monitor support on sam9x75-curiosity board Mihai Sain
2024-11-22 8:05 ` [PATCH 1/2] ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi Mihai Sain
2024-11-22 8:05 ` [PATCH 2/2] ARM: dts: microchip: sam9x75_curiosity: Add power monitor support Mihai Sain
@ 2024-12-08 15:49 ` Claudiu Beznea
2 siblings, 0 replies; 9+ messages in thread
From: Claudiu Beznea @ 2024-12-08 15:49 UTC (permalink / raw)
To: Mihai Sain, robh, krzk+dt, conor+dt, nicolas.ferre,
alexandre.belloni, devicetree, linux-arm-kernel, linux-kernel
On 22.11.2024 10:05, Mihai Sain wrote:
> Mihai Sain (2):
> ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi
> ARM: dts: microchip: sam9x75_curiosity: Add power monitor support
Applied to at91-dt, thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-12-08 15:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-22 8:05 [PATCH 0/2] Add power monitor support on sam9x75-curiosity board Mihai Sain
2024-11-22 8:05 ` [PATCH 1/2] ARM: dts: microchip: sam9x7: Move i2c address/size to dtsi Mihai Sain
2024-12-02 8:08 ` Claudiu Beznea
2024-11-22 8:05 ` [PATCH 2/2] ARM: dts: microchip: sam9x75_curiosity: Add power monitor support Mihai Sain
2024-12-02 8:14 ` Claudiu Beznea
2024-12-02 8:32 ` Mihai.Sain
2024-12-03 8:37 ` Claudiu Beznea
2024-12-03 8:47 ` Mihai.Sain
2024-12-08 15:49 ` [PATCH 0/2] Add power monitor support on sam9x75-curiosity board Claudiu Beznea
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox