Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1278205 > unrolled thread

[PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality

Started byJisheng Zhang <jszhang@marvell.com>
First post2015-11-26 14:20 +0100
Last post2015-11-30 14:50 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality Jisheng Zhang <jszhang@marvell.com> - 2015-11-26 14:20 +0100
    Re: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully  functionality Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - 2015-11-28 12:30 +0100
      Re: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully  functionality Jisheng Zhang <jszhang@marvell.com> - 2015-11-30 14:50 +0100

#1278205 — [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality

FromJisheng Zhang <jszhang@marvell.com>
Date2015-11-26 14:20 +0100
Subject[PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
Message-ID<qz4CR-5DC-7@gated-at.bofh.it>
The sdhci1 on Marvell BG2Q DMP board is used as sdcard interface, we
have gpios for card detection, write-protect, vqmmc and vmmc.

This patch adds pinmux for this sdcard interface, then adds regulators
for vmmc and vqmmc, lastly adds cd-gpios, wp-gpios properties.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
 arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 43 ++++++++++++++++++++++++++++--
 1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
index cdcf89b..1fdc1d7 100644
--- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
+++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
@@ -84,12 +84,51 @@
 			gpio = <&portb 12 GPIO_ACTIVE_HIGH>;
 			enable-active-high;
 		};
+
+		reg_sdio1_vmmc: regulator@3 {
+			compatible = "regulator-fixed";
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-name = "sdio1_vmmc";
+			enable-active-high;
+			regulator-boot-on;
+			gpio = <&portb 21 GPIO_ACTIVE_HIGH>;
+		};
+
+		reg_sdio1_vqmmc: regulator@4 {
+			compatible = "regulator-gpio";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <3300000>;
+			regulator-name = "sdio1_vqmmc";
+			regulator-type = "voltage";
+			enable-active-high;
+			gpios = <&portb 16 GPIO_ACTIVE_HIGH>;
+			states = <3300000 0x1
+				  1800000 0x0>;
+		};
+	};
+};
+
+&soc_pinctrl {
+	sd1gpio_pmux: sd1pwr-pmux {
+		groups = "G23", "G32";
+		function = "gpio";
+	};
+
+	sd1_pmux: sd1-pmux {
+		groups = "G31";
+		function = "sd1";
 	};
 };
 
 &sdhci1 {
-	broken-cd;
-	sdhci,wp-inverted;
+	vmmc-supply = <&reg_sdio1_vmmc>;
+	vqmmc-supply = <&reg_sdio1_vqmmc>;
+	cd-inverted;
+	cd-gpios = <&portc 30 GPIO_ACTIVE_HIGH>;
+	wp-gpios = <&portd 0 GPIO_ACTIVE_HIGH>;
+	pinctrl-0 = <&sd1gpio_pmux>, <&sd1_pmux>;
+	pinctrl-names = "default";
 	status = "okay";
 };
 
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1279131 — Re: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality

FromSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Date2015-11-28 12:30 +0100
SubjectRe: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
Message-ID<qzLRv-8fy-1@gated-at.bofh.it>
In reply to#1278205
On 26.11.2015 14:13, Jisheng Zhang wrote:
> The sdhci1 on Marvell BG2Q DMP board is used as sdcard interface, we
> have gpios for card detection, write-protect, vqmmc and vmmc.
> 
> This patch adds pinmux for this sdcard interface, then adds regulators
> for vmmc and vqmmc, lastly adds cd-gpios, wp-gpios properties.
> 
> Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> ---
>  arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 43 ++++++++++++++++++++++++++++--
>  1 file changed, 41 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> index cdcf89b..1fdc1d7 100644
> --- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> +++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> @@ -84,12 +84,51 @@
>  			gpio = <&portb 12 GPIO_ACTIVE_HIGH>;
>  			enable-active-high;
>  		};
> +
> +		reg_sdio1_vmmc: regulator@3 {
> +			compatible = "regulator-fixed";
> +			regulator-min-microvolt = <3300000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-name = "sdio1_vmmc";
> +			enable-active-high;
> +			regulator-boot-on;
> +			gpio = <&portb 21 GPIO_ACTIVE_HIGH>;
> +		};
> +
> +		reg_sdio1_vqmmc: regulator@4 {
> +			compatible = "regulator-gpio";
> +			regulator-min-microvolt = <1800000>;
> +			regulator-max-microvolt = <3300000>;
> +			regulator-name = "sdio1_vqmmc";
> +			regulator-type = "voltage";
> +			enable-active-high;
> +			gpios = <&portb 16 GPIO_ACTIVE_HIGH>;
> +			states = <3300000 0x1
> +				  1800000 0x0>;
> +		};
> +	};
> +};
> +
> +&soc_pinctrl {
> +	sd1gpio_pmux: sd1pwr-pmux {
> +		groups = "G23", "G32";
> +		function = "gpio";
> +	};
> +
> +	sd1_pmux: sd1-pmux {
> +		groups = "G31";
> +		function = "sd1";

Jisheng,

while having the sd1gpio_pmux in the board file, I think the
sd1_pmux is best kept in the SoC.dtsi.

>  	};
>  };
>  
>  &sdhci1 {
> -	broken-cd;
> -	sdhci,wp-inverted;
> +	vmmc-supply = <&reg_sdio1_vmmc>;
> +	vqmmc-supply = <&reg_sdio1_vqmmc>;
> +	cd-inverted;
> +	cd-gpios = <&portc 30 GPIO_ACTIVE_HIGH>;

How about removing cd-inverted and make cd-gpio GPIO_ACTIVE_LOW
instead?

Sebastian

> +	wp-gpios = <&portd 0 GPIO_ACTIVE_HIGH>;
> +	pinctrl-0 = <&sd1gpio_pmux>, <&sd1_pmux>;
> +	pinctrl-names = "default";
>  	status = "okay";
>  };
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1279875 — Re: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality

FromJisheng Zhang <jszhang@marvell.com>
Date2015-11-30 14:50 +0100
SubjectRe: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
Message-ID<qAx07-4hY-21@gated-at.bofh.it>
In reply to#1279131
On Sat, 28 Nov 2015 12:20:01 +0100
Sebastian Hesselbarth  wrote:

> On 26.11.2015 14:13, Jisheng Zhang wrote:
> > The sdhci1 on Marvell BG2Q DMP board is used as sdcard interface, we
> > have gpios for card detection, write-protect, vqmmc and vmmc.
> > 
> > This patch adds pinmux for this sdcard interface, then adds regulators
> > for vmmc and vqmmc, lastly adds cd-gpios, wp-gpios properties.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> > ---
> >  arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 43 ++++++++++++++++++++++++++++--
> >  1 file changed, 41 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> > index cdcf89b..1fdc1d7 100644
> > --- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> > +++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> > @@ -84,12 +84,51 @@
> >  			gpio = <&portb 12 GPIO_ACTIVE_HIGH>;
> >  			enable-active-high;
> >  		};
> > +
> > +		reg_sdio1_vmmc: regulator@3 {
> > +			compatible = "regulator-fixed";
> > +			regulator-min-microvolt = <3300000>;
> > +			regulator-max-microvolt = <3300000>;
> > +			regulator-name = "sdio1_vmmc";
> > +			enable-active-high;
> > +			regulator-boot-on;
> > +			gpio = <&portb 21 GPIO_ACTIVE_HIGH>;
> > +		};
> > +
> > +		reg_sdio1_vqmmc: regulator@4 {
> > +			compatible = "regulator-gpio";
> > +			regulator-min-microvolt = <1800000>;
> > +			regulator-max-microvolt = <3300000>;
> > +			regulator-name = "sdio1_vqmmc";
> > +			regulator-type = "voltage";
> > +			enable-active-high;
> > +			gpios = <&portb 16 GPIO_ACTIVE_HIGH>;
> > +			states = <3300000 0x1
> > +				  1800000 0x0>;
> > +		};
> > +	};
> > +};
> > +
> > +&soc_pinctrl {
> > +	sd1gpio_pmux: sd1pwr-pmux {
> > +		groups = "G23", "G32";
> > +		function = "gpio";
> > +	};
> > +
> > +	sd1_pmux: sd1-pmux {
> > +		groups = "G31";
> > +		function = "sd1";  
> 
> Jisheng,
> 
> while having the sd1gpio_pmux in the board file, I think the
> sd1_pmux is best kept in the SoC.dtsi.

Indeed, there's no other usage with sd1's pinmux. will do in v2

> 
> >  	};
> >  };
> >  
> >  &sdhci1 {
> > -	broken-cd;
> > -	sdhci,wp-inverted;
> > +	vmmc-supply = <&reg_sdio1_vmmc>;
> > +	vqmmc-supply = <&reg_sdio1_vqmmc>;
> > +	cd-inverted;
> > +	cd-gpios = <&portc 30 GPIO_ACTIVE_HIGH>;  
> 
> How about removing cd-inverted and make cd-gpio GPIO_ACTIVE_LOW
> instead?

Good idea! Will do in v2.

Thanks for your review,
Jisheng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web