[PATCH 5/6] ARM: dts: microchip: sama7d65: Add MCP16502 to sama7d65 curiosity

Ryan.Wanner@microchip.com posted 6 patches 10 months, 1 week ago
There is a newer version of this series
[PATCH 5/6] ARM: dts: microchip: sama7d65: Add MCP16502 to sama7d65 curiosity
Posted by Ryan.Wanner@microchip.com 10 months, 1 week ago
From: Ryan Wanner <Ryan.Wanner@microchip.com>

Add MCP16502 to the sama7d65_curiosity board to control voltages in the
MPU. The device is connected to twi 10 interface

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
---
 .../dts/microchip/at91-sama7d65_curiosity.dts | 135 ++++++++++++++++++
 1 file changed, 135 insertions(+)

diff --git a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
index 441370dbb4c2..81abc387112d 100644
--- a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
+++ b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
@@ -30,6 +30,15 @@ memory@60000000 {
 		device_type = "memory";
 		reg = <0x60000000 0x40000000>;
 	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "5V_MAIN";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+
 };
 
 &dma0 {
@@ -99,6 +108,132 @@ channel@4 {
 			label = "VDDCPU";
 		};
 	};
+
+	pmic@5b {
+		compatible = "microchip,mcp16502";
+		reg = <0x5b>;
+		lvin-supply = <&reg_5v>;
+		pvin1-supply = <&reg_5v>;
+		pvin2-supply = <&reg_5v>;
+		pvin3-supply = <&reg_5v>;
+		pvin4-supply = <&reg_5v>;
+		status = "okay";
+
+		regulators {
+			vdd_3v3: VDD_IO {
+				regulator-name = "VDD_IO";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-initial-mode = <2>;
+				regulator-allowed-modes = <2>, <4>;
+				regulator-always-on;
+
+				regulator-state-standby {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <3300000>;
+					regulator-mode = <4>;
+				};
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+					regulator-mode = <4>;
+				};
+			};
+
+			vddioddr: VDD_DDR {
+				regulator-name = "VDD_DDR";
+				regulator-min-microvolt = <1350000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-initial-mode = <2>;
+				regulator-allowed-modes = <2>, <4>;
+				regulator-always-on;
+
+				regulator-state-standby {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1350000>;
+					regulator-mode = <4>;
+				};
+
+				regulator-state-mem {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1350000>;
+					regulator-mode = <4>;
+				};
+			};
+
+			vddcore: VDD_CORE {
+				regulator-name = "VDD_CORE";
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1050000>;
+				regulator-initial-mode = <2>;
+				regulator-allowed-modes = <2>, <4>;
+				regulator-always-on;
+
+				regulator-state-standby {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1050000>;
+					regulator-mode = <4>;
+				};
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+					regulator-mode = <4>;
+				};
+			};
+
+			vddcpu: VDD_OTHER {
+				regulator-name = "VDD_OTHER";
+				regulator-min-microvolt = <1050000>;
+				regulator-max-microvolt = <1250000>;
+				regulator-initial-mode = <2>;
+				regulator-allowed-modes = <2>, <4>;
+				regulator-ramp-delay = <3125>;
+				regulator-always-on;
+
+				regulator-state-standby {
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1050000>;
+					regulator-mode = <4>;
+				};
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+					regulator-mode = <4>;
+				};
+			};
+
+			vldo1: LDO1 {
+				regulator-name = "LDO1";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+
+				regulator-state-standby {
+					regulator-suspend-microvolt = <1800000>;
+					regulator-on-in-suspend;
+				};
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+
+			vldo2: LDO2 {
+				regulator-name = "LDO2";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3700000>;
+
+				regulator-state-standby {
+					regulator-suspend-microvolt = <1800000>;
+					regulator-on-in-suspend;
+				};
+
+				regulator-state-mem {
+					regulator-off-in-suspend;
+				};
+			};
+		};
+	};
 };
 
 &main_xtal {
-- 
2.43.0
Re: [PATCH 5/6] ARM: dts: microchip: sama7d65: Add MCP16502 to sama7d65 curiosity
Posted by Claudiu Beznea 10 months ago
Hi, Ryan,

On 01.04.2025 19:13, Ryan.Wanner@microchip.com wrote:
> From: Ryan Wanner <Ryan.Wanner@microchip.com>
> 
> Add MCP16502 to the sama7d65_curiosity board to control voltages in the
> MPU. The device is connected to twi 10 interface
> 
> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
> ---
>  .../dts/microchip/at91-sama7d65_curiosity.dts | 135 ++++++++++++++++++
>  1 file changed, 135 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
> index 441370dbb4c2..81abc387112d 100644
> --- a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
> +++ b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
> @@ -30,6 +30,15 @@ memory@60000000 {
>  		device_type = "memory";
>  		reg = <0x60000000 0x40000000>;
>  	};
> +
> +	reg_5v: regulator-5v {
> +		compatible = "regulator-fixed";
> +		regulator-name = "5V_MAIN";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		regulator-always-on;
> +	};
> +
>  };
>  
>  &dma0 {
> @@ -99,6 +108,132 @@ channel@4 {
>  			label = "VDDCPU";
>  		};
>  	};
> +
> +	pmic@5b {
> +		compatible = "microchip,mcp16502";
> +		reg = <0x5b>;
> +		lvin-supply = <&reg_5v>;
> +		pvin1-supply = <&reg_5v>;
> +		pvin2-supply = <&reg_5v>;
> +		pvin3-supply = <&reg_5v>;
> +		pvin4-supply = <&reg_5v>;
> +		status = "okay";
> +
> +		regulators {
> +			vdd_3v3: VDD_IO {
> +				regulator-name = "VDD_IO";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-initial-mode = <2>;
> +				regulator-allowed-modes = <2>, <4>;
> +				regulator-always-on;
> +
> +				regulator-state-standby {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <3300000>;
> +					regulator-mode = <4>;
> +				};
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +					regulator-mode = <4>;
> +				};
> +			};
> +
> +			vddioddr: VDD_DDR {
> +				regulator-name = "VDD_DDR";
> +				regulator-min-microvolt = <1350000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-initial-mode = <2>;
> +				regulator-allowed-modes = <2>, <4>;
> +				regulator-always-on;
> +
> +				regulator-state-standby {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <1350000>;
> +					regulator-mode = <4>;
> +				};
> +
> +				regulator-state-mem {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <1350000>;
> +					regulator-mode = <4>;
> +				};
> +			};
> +
> +			vddcore: VDD_CORE {
> +				regulator-name = "VDD_CORE";
> +				regulator-min-microvolt = <1050000>;
> +				regulator-max-microvolt = <1050000>;
> +				regulator-initial-mode = <2>;
> +				regulator-allowed-modes = <2>, <4>;
> +				regulator-always-on;
> +
> +				regulator-state-standby {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <1050000>;
> +					regulator-mode = <4>;
> +				};
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +					regulator-mode = <4>;
> +				};
> +			};
> +
> +			vddcpu: VDD_OTHER {
> +				regulator-name = "VDD_OTHER";
> +				regulator-min-microvolt = <1050000>;
> +				regulator-max-microvolt = <1250000>;
> +				regulator-initial-mode = <2>;
> +				regulator-allowed-modes = <2>, <4>;
> +				regulator-ramp-delay = <3125>;
> +				regulator-always-on;
> +
> +				regulator-state-standby {
> +					regulator-on-in-suspend;
> +					regulator-suspend-microvolt = <1050000>;
> +					regulator-mode = <4>;
> +				};
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +					regulator-mode = <4>;
> +				};
> +			};
> +
> +			vldo1: LDO1 {
> +				regulator-name = "LDO1";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-always-on;
> +
> +				regulator-state-standby {
> +					regulator-suspend-microvolt = <1800000>;
> +					regulator-on-in-suspend;
> +				};
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +
> +			vldo2: LDO2 {
> +				regulator-name = "LDO2";
> +				regulator-min-microvolt = <1200000>;
> +				regulator-max-microvolt = <3700000>;
> +
> +				regulator-state-standby {
> +					regulator-suspend-microvolt = <1800000>;

I can't find the schematics for this board. Is there a reason for keeping
this @1.8V in suspend?

Thank you,
Claudiu

> +					regulator-on-in-suspend;
> +				};
> +
> +				regulator-state-mem {
> +					regulator-off-in-suspend;
> +				};
> +			};
> +		};
> +	};
>  };
>  
>  &main_xtal {
Re: [PATCH 5/6] ARM: dts: microchip: sama7d65: Add MCP16502 to sama7d65 curiosity
Posted by Ryan.Wanner@microchip.com 9 months, 4 weeks ago
Hi Claudiu,

On 4/11/25 07:30, Claudiu Beznea wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Hi, Ryan,
> 
> On 01.04.2025 19:13, Ryan.Wanner@microchip.com wrote:
>> From: Ryan Wanner <Ryan.Wanner@microchip.com>
>>
>> Add MCP16502 to the sama7d65_curiosity board to control voltages in the
>> MPU. The device is connected to twi 10 interface
>>
>> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
>> ---
>>  .../dts/microchip/at91-sama7d65_curiosity.dts | 135 ++++++++++++++++++
>>  1 file changed, 135 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
>> index 441370dbb4c2..81abc387112d 100644
>> --- a/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
>> +++ b/arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dts
>> @@ -30,6 +30,15 @@ memory@60000000 {
>>               device_type = "memory";
>>               reg = <0x60000000 0x40000000>;
>>       };
>> +
>> +     reg_5v: regulator-5v {
>> +             compatible = "regulator-fixed";
>> +             regulator-name = "5V_MAIN";
>> +             regulator-min-microvolt = <5000000>;
>> +             regulator-max-microvolt = <5000000>;
>> +             regulator-always-on;
>> +     };
>> +
>>  };
>>
>>  &dma0 {
>> @@ -99,6 +108,132 @@ channel@4 {
>>                       label = "VDDCPU";
>>               };
>>       };
>> +
>> +     pmic@5b {
>> +             compatible = "microchip,mcp16502";
>> +             reg = <0x5b>;
>> +             lvin-supply = <&reg_5v>;
>> +             pvin1-supply = <&reg_5v>;
>> +             pvin2-supply = <&reg_5v>;
>> +             pvin3-supply = <&reg_5v>;
>> +             pvin4-supply = <&reg_5v>;
>> +             status = "okay";
>> +
>> +             regulators {
>> +                     vdd_3v3: VDD_IO {
>> +                             regulator-name = "VDD_IO";
>> +                             regulator-min-microvolt = <3300000>;
>> +                             regulator-max-microvolt = <3300000>;
>> +                             regulator-initial-mode = <2>;
>> +                             regulator-allowed-modes = <2>, <4>;
>> +                             regulator-always-on;
>> +
>> +                             regulator-state-standby {
>> +                                     regulator-on-in-suspend;
>> +                                     regulator-suspend-microvolt = <3300000>;
>> +                                     regulator-mode = <4>;
>> +                             };
>> +
>> +                             regulator-state-mem {
>> +                                     regulator-off-in-suspend;
>> +                                     regulator-mode = <4>;
>> +                             };
>> +                     };
>> +
>> +                     vddioddr: VDD_DDR {
>> +                             regulator-name = "VDD_DDR";
>> +                             regulator-min-microvolt = <1350000>;
>> +                             regulator-max-microvolt = <1350000>;
>> +                             regulator-initial-mode = <2>;
>> +                             regulator-allowed-modes = <2>, <4>;
>> +                             regulator-always-on;
>> +
>> +                             regulator-state-standby {
>> +                                     regulator-on-in-suspend;
>> +                                     regulator-suspend-microvolt = <1350000>;
>> +                                     regulator-mode = <4>;
>> +                             };
>> +
>> +                             regulator-state-mem {
>> +                                     regulator-on-in-suspend;
>> +                                     regulator-suspend-microvolt = <1350000>;
>> +                                     regulator-mode = <4>;
>> +                             };
>> +                     };
>> +
>> +                     vddcore: VDD_CORE {
>> +                             regulator-name = "VDD_CORE";
>> +                             regulator-min-microvolt = <1050000>;
>> +                             regulator-max-microvolt = <1050000>;
>> +                             regulator-initial-mode = <2>;
>> +                             regulator-allowed-modes = <2>, <4>;
>> +                             regulator-always-on;
>> +
>> +                             regulator-state-standby {
>> +                                     regulator-on-in-suspend;
>> +                                     regulator-suspend-microvolt = <1050000>;
>> +                                     regulator-mode = <4>;
>> +                             };
>> +
>> +                             regulator-state-mem {
>> +                                     regulator-off-in-suspend;
>> +                                     regulator-mode = <4>;
>> +                             };
>> +                     };
>> +
>> +                     vddcpu: VDD_OTHER {
>> +                             regulator-name = "VDD_OTHER";
>> +                             regulator-min-microvolt = <1050000>;
>> +                             regulator-max-microvolt = <1250000>;
>> +                             regulator-initial-mode = <2>;
>> +                             regulator-allowed-modes = <2>, <4>;
>> +                             regulator-ramp-delay = <3125>;
>> +                             regulator-always-on;
>> +
>> +                             regulator-state-standby {
>> +                                     regulator-on-in-suspend;
>> +                                     regulator-suspend-microvolt = <1050000>;
>> +                                     regulator-mode = <4>;
>> +                             };
>> +
>> +                             regulator-state-mem {
>> +                                     regulator-off-in-suspend;
>> +                                     regulator-mode = <4>;
>> +                             };
>> +                     };
>> +
>> +                     vldo1: LDO1 {
>> +                             regulator-name = "LDO1";
>> +                             regulator-min-microvolt = <1800000>;
>> +                             regulator-max-microvolt = <1800000>;
>> +                             regulator-always-on;
>> +
>> +                             regulator-state-standby {
>> +                                     regulator-suspend-microvolt = <1800000>;
>> +                                     regulator-on-in-suspend;
>> +                             };
>> +
>> +                             regulator-state-mem {
>> +                                     regulator-off-in-suspend;
>> +                             };
>> +                     };
>> +
>> +                     vldo2: LDO2 {
>> +                             regulator-name = "LDO2";
>> +                             regulator-min-microvolt = <1200000>;
>> +                             regulator-max-microvolt = <3700000>;
>> +
>> +                             regulator-state-standby {
>> +                                     regulator-suspend-microvolt = <1800000>;
> 
> I can't find the schematics for this board. Is there a reason for keeping
> this @1.8V in suspend?

Sorry this was an error on my part, there is no reason to have this
@1.8V in suspend mode.

Best,
Ryan
> 
> Thank you,
> Claudiu
> 
>> +                                     regulator-on-in-suspend;
>> +                             };
>> +
>> +                             regulator-state-mem {
>> +                                     regulator-off-in-suspend;
>> +                             };
>> +                     };
>> +             };
>> +     };
>>  };
>>
>>  &main_xtal {
> 

Re: [PATCH 5/6] ARM: dts: microchip: sama7d65: Add MCP16502 to sama7d65 curiosity
Posted by Claudiu Beznea 9 months, 2 weeks ago
Hi, Ryan,

On 14.04.2025 18:38, Ryan.Wanner@microchip.com wrote:
>>> +                     vldo2: LDO2 {
>>> +                             regulator-name = "LDO2";
>>> +                             regulator-min-microvolt = <1200000>;
>>> +                             regulator-max-microvolt = <3700000>;
>>> +
>>> +                             regulator-state-standby {
>>> +                                     regulator-suspend-microvolt = <1800000>;
>> I can't find the schematics for this board. Is there a reason for keeping
>> this @1.8V in suspend?
> Sorry this was an error on my part, there is no reason to have this
> @1.8V in suspend mode.

OK, I'll drop it while applying, thank you!