devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
@ 2015-11-26 13:13 Jisheng Zhang
       [not found] ` <1448543588-1021-1-git-send-email-jszhang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jisheng Zhang @ 2015-11-26 13:13 UTC (permalink / raw)
  To: sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8,
	mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jisheng Zhang

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-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
---
 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 devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
       [not found] ` <1448543588-1021-1-git-send-email-jszhang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
@ 2015-11-28 11:20   ` Sebastian Hesselbarth
  2015-11-30 13:07     ` Jisheng Zhang
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Hesselbarth @ 2015-11-28 11:20 UTC (permalink / raw)
  To: Jisheng Zhang, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
	galak-sgV2jX0FEOL9JmXXK+q4OQ, linux-lFZ/pmaqli7XmaaqVzeoHQ
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> ---
>  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 devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
  2015-11-28 11:20   ` Sebastian Hesselbarth
@ 2015-11-30 13:07     ` Jisheng Zhang
  0 siblings, 0 replies; 5+ messages in thread
From: Jisheng Zhang @ 2015-11-30 13:07 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak, linux,
	linux-arm-kernel, devicetree, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
@ 2015-11-30 13:54 Jisheng Zhang
  2015-12-06  9:28 ` Sebastian Hesselbarth
  0 siblings, 1 reply; 5+ messages in thread
From: Jisheng Zhang @ 2015-11-30 13:54 UTC (permalink / raw)
  To: sebastian.hesselbarth, robh+dt, pawel.moll, mark.rutland,
	ijc+devicetree, galak, linux
  Cc: linux-arm-kernel, devicetree, linux-kernel, Jisheng Zhang

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>
---
since v1:
 - move sd1_pmux to soc dtsi
 - remove cd-inverted and make cd-gpio GPIO_ACTIVE_LOW

 arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 37 ++++++++++++++++++++++++++++--
 arch/arm/boot/dts/berlin2q.dtsi            |  5 ++++
 2 files changed, 40 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..33b2875 100644
--- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
+++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
@@ -84,12 +84,45 @@
 			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";
 	};
 };
 
 &sdhci1 {
-	broken-cd;
-	sdhci,wp-inverted;
+	vmmc-supply = <&reg_sdio1_vmmc>;
+	vqmmc-supply = <&reg_sdio1_vqmmc>;
+	cd-gpios = <&portc 30 GPIO_ACTIVE_LOW>;
+	wp-gpios = <&portd 0 GPIO_ACTIVE_HIGH>;
+	pinctrl-0 = <&sd1gpio_pmux>, <&sd1_pmux>;
+	pinctrl-names = "default";
 	status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
index 8ea177f..73a9362 100644
--- a/arch/arm/boot/dts/berlin2q.dtsi
+++ b/arch/arm/boot/dts/berlin2q.dtsi
@@ -417,6 +417,11 @@
 			soc_pinctrl: pin-controller {
 				compatible = "marvell,berlin2q-soc-pinctrl";
 
+				sd1_pmux: sd1-pmux {
+					groups = "G31";
+					function = "sd1";
+				};
+
 				twsi0_pmux: twsi0-pmux {
 					groups = "G6";
 					function = "twsi0";
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
  2015-11-30 13:54 Jisheng Zhang
@ 2015-12-06  9:28 ` Sebastian Hesselbarth
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Hesselbarth @ 2015-12-06  9:28 UTC (permalink / raw)
  To: Jisheng Zhang, robh+dt, pawel.moll, mark.rutland, ijc+devicetree,
	galak, linux
  Cc: linux-arm-kernel, devicetree, linux-kernel

On 30.11.2015 14:54, 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>

Applied to berlin/dt.

> ---
> since v1:

Please also increment the patch subject version next time.

Thanks!

Sebastian

>  - move sd1_pmux to soc dtsi
>  - remove cd-inverted and make cd-gpio GPIO_ACTIVE_LOW
> 
>  arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 37 ++++++++++++++++++++++++++++--
>  arch/arm/boot/dts/berlin2q.dtsi            |  5 ++++
>  2 files changed, 40 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..33b2875 100644
> --- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> +++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> @@ -84,12 +84,45 @@
>  			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";
>  	};
>  };
>  
>  &sdhci1 {
> -	broken-cd;
> -	sdhci,wp-inverted;
> +	vmmc-supply = <&reg_sdio1_vmmc>;
> +	vqmmc-supply = <&reg_sdio1_vqmmc>;
> +	cd-gpios = <&portc 30 GPIO_ACTIVE_LOW>;
> +	wp-gpios = <&portd 0 GPIO_ACTIVE_HIGH>;
> +	pinctrl-0 = <&sd1gpio_pmux>, <&sd1_pmux>;
> +	pinctrl-names = "default";
>  	status = "okay";
>  };
>  
> diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
> index 8ea177f..73a9362 100644
> --- a/arch/arm/boot/dts/berlin2q.dtsi
> +++ b/arch/arm/boot/dts/berlin2q.dtsi
> @@ -417,6 +417,11 @@
>  			soc_pinctrl: pin-controller {
>  				compatible = "marvell,berlin2q-soc-pinctrl";
>  
> +				sd1_pmux: sd1-pmux {
> +					groups = "G31";
> +					function = "sd1";
> +				};
> +
>  				twsi0_pmux: twsi0-pmux {
>  					groups = "G6";
>  					function = "twsi0";
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-06  9:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26 13:13 [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality Jisheng Zhang
     [not found] ` <1448543588-1021-1-git-send-email-jszhang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-11-28 11:20   ` Sebastian Hesselbarth
2015-11-30 13:07     ` Jisheng Zhang
  -- strict thread matches above, loose matches on Subject: below --
2015-11-30 13:54 Jisheng Zhang
2015-12-06  9:28 ` Sebastian Hesselbarth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).