diff mbox series

[2/2] arm: dts: a37x0: enable sd card support on espressobin

Message ID 20200819141940.15650-3-pali@kernel.org
State Accepted
Commit 96fa3c4fda5cad85b05b086bed3855d4037d1639
Delegated to: Stefan Roese
Headers show
Series arm: mvebu: Espressobin: Add support for SD card | expand

Commit Message

Pali Rohár Aug. 19, 2020, 2:19 p.m. UTC
From: Wilson Ding <dingwei@marvell.com>

Enabled SDIO slot 0 (south bridge) for SD card on
Espressobin board.

Change-Id: I51a2debf9fba276b9c4a2bc6da91328d47f443e3
Signed-off-by: Wilson Ding <dingwei@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/60945
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Reviewed-by: Igal Liberman <igall@marvell.com>
[pali: Define cd-gpios and enable CONFIG_DM_REGULATOR_GPIO]
Signed-off-by: Pali Rohár <pali@kernel.org>
---
 arch/arm/dts/armada-3720-espressobin.dts    | 20 ++++++++++++++++++++
 configs/mvebu_espressobin-88f3720_defconfig |  1 +
 2 files changed, 21 insertions(+)

Comments

Kostya Porotchkin Aug. 19, 2020, 5:57 p.m. UTC | #1
> -----Original Message-----
> From: Pali Rohár <pali@kernel.org>
> Sent: Wednesday, August 19, 2020 17:20
> To: Peng Fan <peng.fan@nxp.com>; Kostya Porotchkin
> <kostap@marvell.com>; Stefan Roese <sr@denx.de>
> Cc: u-boot@lists.denx.de
> Subject: [EXT] [PATCH 2/2] arm: dts: a37x0: enable sd card support on
> espressobin
> 
> External Email
> 
> ----------------------------------------------------------------------
> From: Wilson Ding <dingwei@marvell.com>
> 
> Enabled SDIO slot 0 (south bridge) for SD card on Espressobin board.
> 
> Change-Id: I51a2debf9fba276b9c4a2bc6da91328d47f443e3
> Signed-off-by: Wilson Ding <dingwei@marvell.com>
> Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
> Reviewed-on: http://vgitil04.il.marvell.com:8080/60945
> Tested-by: iSoC Platform CI <ykjenk@marvell.com>
> Reviewed-by: Igal Liberman <igall@marvell.com>
> [pali: Define cd-gpios and enable CONFIG_DM_REGULATOR_GPIO]
> Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
> ---
>  arch/arm/dts/armada-3720-espressobin.dts    | 20 ++++++++++++++++++++
>  configs/mvebu_espressobin-88f3720_defconfig |  1 +
>  2 files changed, 21 insertions(+)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts
> b/arch/arm/dts/armada-3720-espressobin.dts
> index f10a953ec5..92eddca6c0 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -67,6 +67,17 @@
>  		device_type = "memory";
>  		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
>  	};
> +
> +	vcc_sd_reg0: regulator@0 {
> +		compatible = "regulator-gpio";
> +		regulator-name = "vcc_sd0";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-type = "voltage";
> +		states = <1800000 0x1
> +			  3300000 0x0>;
> +		gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>;
> +	};
>  };
> 
>  &comphy {
> @@ -110,6 +121,15 @@
>  	status = "okay";
>  };
> 
> +&sdhci0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&sdio_pins>;
> +	bus-width = <4>;
> +	cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
> +	vqmmc-supply = <&vcc_sd_reg0>;
> +	status = "okay";
> +};
> +
>  &spi0 {
>  	status = "okay";
>  	pinctrl-names = "default";
> diff --git a/configs/mvebu_espressobin-88f3720_defconfig
> b/configs/mvebu_espressobin-88f3720_defconfig
> index 495faf43a3..933592af88 100644
> --- a/configs/mvebu_espressobin-88f3720_defconfig
> +++ b/configs/mvebu_espressobin-88f3720_defconfig
> @@ -81,3 +81,4 @@ CONFIG_USB_ETHER_SMSC95XX=y  CONFIG_SHA1=y
> CONFIG_SHA256=y  CONFIG_MVNETA=y
> +CONFIG_DM_REGULATOR_GPIO=y
> --
> 2.20.1
Stefan Roese Aug. 20, 2020, 4:58 a.m. UTC | #2
On 19.08.20 16:19, Pali Rohár wrote:
> From: Wilson Ding <dingwei@marvell.com>
> 
> Enabled SDIO slot 0 (south bridge) for SD card on
> Espressobin board.
> 
> Change-Id: I51a2debf9fba276b9c4a2bc6da91328d47f443e3
> Signed-off-by: Wilson Ding <dingwei@marvell.com>
> Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
> Reviewed-on: http://vgitil04.il.marvell.com:8080/60945
> Tested-by: iSoC Platform CI <ykjenk@marvell.com>
> Reviewed-by: Igal Liberman <igall@marvell.com>
> [pali: Define cd-gpios and enable CONFIG_DM_REGULATOR_GPIO]
> Signed-off-by: Pali Rohár <pali@kernel.org>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   arch/arm/dts/armada-3720-espressobin.dts    | 20 ++++++++++++++++++++
>   configs/mvebu_espressobin-88f3720_defconfig |  1 +
>   2 files changed, 21 insertions(+)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> index f10a953ec5..92eddca6c0 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -67,6 +67,17 @@
>   		device_type = "memory";
>   		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
>   	};
> +
> +	vcc_sd_reg0: regulator@0 {
> +		compatible = "regulator-gpio";
> +		regulator-name = "vcc_sd0";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-type = "voltage";
> +		states = <1800000 0x1
> +			  3300000 0x0>;
> +		gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>;
> +	};
>   };
>   
>   &comphy {
> @@ -110,6 +121,15 @@
>   	status = "okay";
>   };
>   
> +&sdhci0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&sdio_pins>;
> +	bus-width = <4>;
> +	cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
> +	vqmmc-supply = <&vcc_sd_reg0>;
> +	status = "okay";
> +};
> +
>   &spi0 {
>   	status = "okay";
>   	pinctrl-names = "default";
> diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig
> index 495faf43a3..933592af88 100644
> --- a/configs/mvebu_espressobin-88f3720_defconfig
> +++ b/configs/mvebu_espressobin-88f3720_defconfig
> @@ -81,3 +81,4 @@ CONFIG_USB_ETHER_SMSC95XX=y
>   CONFIG_SHA1=y
>   CONFIG_SHA256=y
>   CONFIG_MVNETA=y
> +CONFIG_DM_REGULATOR_GPIO=y
> 


Viele Grüße,
Stefan
Andre Heider Aug. 27, 2020, 4:28 p.m. UTC | #3
On 19/08/2020 16:19, Pali Rohár wrote:
> From: Wilson Ding <dingwei@marvell.com>
> 
> Enabled SDIO slot 0 (south bridge) for SD card on
> Espressobin board.
> 
> Change-Id: I51a2debf9fba276b9c4a2bc6da91328d47f443e3
> Signed-off-by: Wilson Ding <dingwei@marvell.com>
> Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
> Reviewed-on: http://vgitil04.il.marvell.com:8080/60945
> Tested-by: iSoC Platform CI <ykjenk@marvell.com>
> Reviewed-by: Igal Liberman <igall@marvell.com>
> [pali: Define cd-gpios and enable CONFIG_DM_REGULATOR_GPIO]
> Signed-off-by: Pali Rohár <pali@kernel.org>

Tested-by: Andre Heider <a.heider@gmail.com>
Stefan Roese Aug. 31, 2020, 1:04 p.m. UTC | #4
On 19.08.20 16:19, Pali Rohár wrote:
> From: Wilson Ding <dingwei@marvell.com>
> 
> Enabled SDIO slot 0 (south bridge) for SD card on
> Espressobin board.
> 
> Change-Id: I51a2debf9fba276b9c4a2bc6da91328d47f443e3
> Signed-off-by: Wilson Ding <dingwei@marvell.com>
> Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
> Reviewed-on: http://vgitil04.il.marvell.com:8080/60945
> Tested-by: iSoC Platform CI <ykjenk@marvell.com>
> Reviewed-by: Igal Liberman <igall@marvell.com>
> [pali: Define cd-gpios and enable CONFIG_DM_REGULATOR_GPIO]
> Signed-off-by: Pali Rohár <pali@kernel.org>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   arch/arm/dts/armada-3720-espressobin.dts    | 20 ++++++++++++++++++++
>   configs/mvebu_espressobin-88f3720_defconfig |  1 +
>   2 files changed, 21 insertions(+)
> 
> diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
> index f10a953ec5..92eddca6c0 100644
> --- a/arch/arm/dts/armada-3720-espressobin.dts
> +++ b/arch/arm/dts/armada-3720-espressobin.dts
> @@ -67,6 +67,17 @@
>   		device_type = "memory";
>   		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
>   	};
> +
> +	vcc_sd_reg0: regulator@0 {
> +		compatible = "regulator-gpio";
> +		regulator-name = "vcc_sd0";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <3300000>;
> +		regulator-type = "voltage";
> +		states = <1800000 0x1
> +			  3300000 0x0>;
> +		gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>;
> +	};
>   };
>   
>   &comphy {
> @@ -110,6 +121,15 @@
>   	status = "okay";
>   };
>   
> +&sdhci0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&sdio_pins>;
> +	bus-width = <4>;
> +	cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
> +	vqmmc-supply = <&vcc_sd_reg0>;
> +	status = "okay";
> +};
> +
>   &spi0 {
>   	status = "okay";
>   	pinctrl-names = "default";
> diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig
> index 495faf43a3..933592af88 100644
> --- a/configs/mvebu_espressobin-88f3720_defconfig
> +++ b/configs/mvebu_espressobin-88f3720_defconfig
> @@ -81,3 +81,4 @@ CONFIG_USB_ETHER_SMSC95XX=y
>   CONFIG_SHA1=y
>   CONFIG_SHA256=y
>   CONFIG_MVNETA=y
> +CONFIG_DM_REGULATOR_GPIO=y
> 


Viele Grüße,
Stefan
diff mbox series

Patch

diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
index f10a953ec5..92eddca6c0 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dts
@@ -67,6 +67,17 @@ 
 		device_type = "memory";
 		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
 	};
+
+	vcc_sd_reg0: regulator@0 {
+		compatible = "regulator-gpio";
+		regulator-name = "vcc_sd0";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-type = "voltage";
+		states = <1800000 0x1
+			  3300000 0x0>;
+		gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &comphy {
@@ -110,6 +121,15 @@ 
 	status = "okay";
 };
 
+&sdhci0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio_pins>;
+	bus-width = <4>;
+	cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
+	vqmmc-supply = <&vcc_sd_reg0>;
+	status = "okay";
+};
+
 &spi0 {
 	status = "okay";
 	pinctrl-names = "default";
diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig
index 495faf43a3..933592af88 100644
--- a/configs/mvebu_espressobin-88f3720_defconfig
+++ b/configs/mvebu_espressobin-88f3720_defconfig
@@ -81,3 +81,4 @@  CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_SHA1=y
 CONFIG_SHA256=y
 CONFIG_MVNETA=y
+CONFIG_DM_REGULATOR_GPIO=y