diff mbox

[2/3] arm: dts: phy3250: add SD fixed regulator

Message ID 1450567932-22994-3-git-send-email-vz@mleia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vladimir Zapolskiy Dec. 19, 2015, 11:32 p.m. UTC
The change adds fixed voltage regulator for SD controller, ARM MMCI
controller driver uses it to control card power management.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
 arch/arm/boot/dts/phy3250.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Russell King - ARM Linux Dec. 19, 2015, 11:48 p.m. UTC | #1
On Sun, Dec 20, 2015 at 01:32:11AM +0200, Vladimir Zapolskiy wrote:
> @@ -162,6 +171,7 @@
>  				cd-gpios = <&gpio 3 1 0>;
>  				cd-inverted;
>  				bus-width = <4>;
> +				vqmmc-supply = <&sd_reg>;

This looks wrong.  ios->power_mode controls the _card_ power (which is
vmmc-supply), not the signalling power (which is vqmmc-supply):

- vmmc-supply            : phandle to the regulator device tree node, mentioned
                           as the VCC/VDD supply in the eMMC/SD specs.

- vqmmc-supply           : phandle to the regulator device tree node, mentioned
                           as the VCCQ/VDD_IO supply in the eMMC/SD specs.
Sergei Shtylyov Dec. 21, 2015, 12:43 p.m. UTC | #2
Hello.

On 12/20/2015 2:32 AM, Vladimir Zapolskiy wrote:

> The change adds fixed voltage regulator for SD controller, ARM MMCI
> controller driver uses it to control card power management.
>
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> ---
>   arch/arm/boot/dts/phy3250.dts | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/boot/dts/phy3250.dts b/arch/arm/boot/dts/phy3250.dts
> index 34e15fd..5465b9e 100644
> --- a/arch/arm/boot/dts/phy3250.dts
> +++ b/arch/arm/boot/dts/phy3250.dts
> @@ -45,6 +45,15 @@
>   			enable-active-high;
>   			regulator-boot-on;
>   		};
> +
> +		sd_reg: fixed-regulator@2 {

    Please just "regulator@2", to comply with the ePAPR standard.

[...]

MBR, Sergei
Sergei Shtylyov Dec. 21, 2015, 5:04 p.m. UTC | #3
On 12/21/2015 07:58 PM, Vladimir Zapolskiy wrote:

>>> The change adds fixed voltage regulator for SD controller, ARM MMCI
>>> controller driver uses it to control card power management.
>>>
>>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
>>> ---
>>>    arch/arm/boot/dts/phy3250.dts | 10 ++++++++++
>>>    1 file changed, 10 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/phy3250.dts b/arch/arm/boot/dts/phy3250.dts
>>> index 34e15fd..5465b9e 100644
>>> --- a/arch/arm/boot/dts/phy3250.dts
>>> +++ b/arch/arm/boot/dts/phy3250.dts
>>> @@ -45,6 +45,15 @@
>>>    			enable-active-high;
>>>    			regulator-boot-on;
>>>    		};
>>> +
>>> +		sd_reg: fixed-regulator@2 {
>>
>>      Please just "regulator@2", to comply with the ePAPR standard.
>
> thanks for review, just for my information, do I understand correctly
> that you reference to "Generic Names Recommendation" ?

    Sure, AKA 2.2.2. :-)

> I have no objection to generalize device tree node name as you
> suggested, will do it.

    TIA.

> With best wishes,
> Vladimir

MBR, Sergei
diff mbox

Patch

diff --git a/arch/arm/boot/dts/phy3250.dts b/arch/arm/boot/dts/phy3250.dts
index 34e15fd..5465b9e 100644
--- a/arch/arm/boot/dts/phy3250.dts
+++ b/arch/arm/boot/dts/phy3250.dts
@@ -45,6 +45,15 @@ 
 			enable-active-high;
 			regulator-boot-on;
 		};
+
+		sd_reg: fixed-regulator@2 {
+			compatible = "regulator-fixed";
+			regulator-name = "sd_reg";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			gpio = <&gpio 5 5 0>;
+			enable-active-high;
+		};
 	};
 
 	ahb {
@@ -162,6 +171,7 @@ 
 				cd-gpios = <&gpio 3 1 0>;
 				cd-inverted;
 				bus-width = <4>;
+				vqmmc-supply = <&sd_reg>;
 				status = "okay";
 			};
 		};