All of lore.kernel.org
 help / color / mirror / Atom feed
From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
Date: Sat, 28 Nov 2015 12:20:01 +0100	[thread overview]
Message-ID: <56598DE1.9010209@gmail.com> (raw)
In-Reply-To: <1448543588-1021-1-git-send-email-jszhang@marvell.com>

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 at 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 at 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";
>  };
>  
> 

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jisheng Zhang <jszhang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
Date: Sat, 28 Nov 2015 12:20:01 +0100	[thread overview]
Message-ID: <56598DE1.9010209@gmail.com> (raw)
In-Reply-To: <1448543588-1021-1-git-send-email-jszhang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Jisheng Zhang <jszhang@marvell.com>,
	robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	linux@arm.linux.org.uk
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality
Date: Sat, 28 Nov 2015 12:20:01 +0100	[thread overview]
Message-ID: <56598DE1.9010209@gmail.com> (raw)
In-Reply-To: <1448543588-1021-1-git-send-email-jszhang@marvell.com>

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";
>  };
>  
> 


  reply	other threads:[~2015-11-28 11:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 13:13 [PATCH] arm: dts: berlin2q-marvell-dmp: add sdhci1 fully functionality Jisheng Zhang
2015-11-26 13:13 ` Jisheng Zhang
2015-11-26 13:13 ` Jisheng Zhang
2015-11-28 11:20 ` Sebastian Hesselbarth [this message]
2015-11-28 11:20   ` Sebastian Hesselbarth
2015-11-28 11:20   ` Sebastian Hesselbarth
2015-11-30 13:07   ` Jisheng Zhang
2015-11-30 13:07     ` Jisheng Zhang
2015-11-30 13:07     ` Jisheng Zhang
  -- strict thread matches above, loose matches on Subject: below --
2015-11-30 13:54 Jisheng Zhang
2015-11-30 13:54 ` Jisheng Zhang
2015-11-30 13:54 ` Jisheng Zhang
2015-12-06  9:28 ` Sebastian Hesselbarth
2015-12-06  9:28   ` Sebastian Hesselbarth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56598DE1.9010209@gmail.com \
    --to=sebastian.hesselbarth@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.