All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: dts: rockchip: Add more properties for emmc on px5-evb
@ 2016-09-22  4:02 Shawn Lin
       [not found] ` <1474516939-22001-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Shawn Lin @ 2016-09-22  4:02 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Andy Yan, Shawn Lin, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

The emmc on px5-evb can support hs200, so let's add mmc-hs200-1_8v.
And in order to speed up the boot time, we could add no-sdio and
no-sd to simplify the initialization.

Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---

 arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
index 78c9d72..3e0b522 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
@@ -89,6 +89,9 @@
 	keep-power-in-suspend;
 	non-removable;
 	num-slots = <1>;
+	mmc-hs200-1_8v;
+	no-sdio;
+	no-sd;
 	pinctrl-names = "default";
 	pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
 	vmmc-supply = <&vcc_io>;
-- 
2.3.7

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

* [PATCH 2/3] arm64: dts: rockchip: add sdmmc support for px5-evb
       [not found] ` <1474516939-22001-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-09-22  4:02   ` Shawn Lin
       [not found]     ` <1474516939-22001-2-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  2016-09-22  4:02   ` [PATCH 3/3] arm64: dts: rockchip: remove always-on and boot-on from vcc_sd Shawn Lin
  2016-10-14 17:20   ` [PATCH 1/3] arm64: dts: rockchip: Add more properties for emmc on px5-evb Heiko Stuebner
  2 siblings, 1 reply; 7+ messages in thread
From: Shawn Lin @ 2016-09-22  4:02 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Andy Yan, Shawn Lin, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

px5-evb has one sdmmc slot, so we could support sdmmc.

Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---

 arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
index 3e0b522..f59049b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
@@ -98,6 +98,25 @@
 	vqmmc-supply = <&vcc18_flash>;
 };
 
+&sdmmc {
+	status = "okay";
+	bus-width = <4>;
+	cap-mmc-highspeed;
+	cap-sd-highspeed;
+	card-detect-delay = <200>;
+	rockchip,default-sample-phase = <90>;
+	num-slots = <1>;
+	no-emmc;
+	no-sdio;
+	sd-uhs-sdr12;
+	sd-uhs-sdr25;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_bus4>, <&sdmmc_cd>;
+	vmmc-supply = <&vcc_sd>;
+	vqmmc-supply = <&vccio_sd>;
+};
+
+
 &i2c0 {
 	status = "okay";
 
-- 
2.3.7

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

* [PATCH 3/3] arm64: dts: rockchip: remove always-on and boot-on from vcc_sd
       [not found] ` <1474516939-22001-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  2016-09-22  4:02   ` [PATCH 2/3] arm64: dts: rockchip: add sdmmc support for px5-evb Shawn Lin
@ 2016-09-22  4:02   ` Shawn Lin
       [not found]     ` <1474516939-22001-3-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  2016-10-14 17:20   ` [PATCH 1/3] arm64: dts: rockchip: Add more properties for emmc on px5-evb Heiko Stuebner
  2 siblings, 1 reply; 7+ messages in thread
From: Shawn Lin @ 2016-09-22  4:02 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Andy Yan, Shawn Lin, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Please don't add these for vcc_sd, and mmc-core/driver will control
it. Otherwise, it will waste energy even without sdmmc in slot.

Moreover, it will causes a bug:
If we insert/remove sd card, we could see
[9.337271] mmc0: new ultra high speed SDR25 SDHC card at address 0007
[9.345144] mmcblk0: mmc0:0007 SD32G 29.3 GiB

This is okay for normal sd insert/remove test, but when I debug some
issues for sdmmc, I did unbind/bind test. And there is a interesting
phenomenon when we bind the driver again:
[58.314069] mmc0: new high speed SDHC card at address 0007
[58.320282] mmcblk0: mmc0:0007 SD32G 29.3 GiB

So the sd card could just support high speed without power cycle
since the vcc_sd is always on, which makes the sd card fail to
reinit its internal ocr mask.

Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---

 arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts        | 2 --
 arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts | 2 --
 arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts        | 2 --
 3 files changed, 6 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
index 46cdddf..353314c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
@@ -258,8 +258,6 @@
 			};
 
 			vcc_sd: SWITCH_REG1 {
-				regulator-always-on;
-				regulator-boot-on;
 				regulator-name = "vcc_sd";
 			};
 
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
index 5797933..13b7f1ed 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
@@ -152,8 +152,6 @@
 		gpio = <&gpio3 11 GPIO_ACTIVE_LOW>;
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <3300000>;
-		regulator-always-on;
-		regulator-boot-on;
 		vin-supply = <&vcc_io>;
 	};
 
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
index f59049b..8c47b01 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
@@ -236,8 +236,6 @@
 			};
 
 			vcc_sd: SWITCH_REG1 {
-				regulator-always-on;
-				regulator-boot-on;
 				regulator-name = "vcc_sd";
 			};
 
-- 
2.3.7

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

* Re: [PATCH 3/3] arm64: dts: rockchip: remove always-on and boot-on from vcc_sd
       [not found]     ` <1474516939-22001-3-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-10-09 13:42       ` Shawn Lin
  2016-10-14 17:18       ` Heiko Stuebner
  1 sibling, 0 replies; 7+ messages in thread
From: Shawn Lin @ 2016-10-09 13:42 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Andy Yan, shawn.lin-TNX95d0MmH7DzftRWevZcw,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Heiko,

Ping... :)

在 2016/9/22 12:02, Shawn Lin 写道:
> Please don't add these for vcc_sd, and mmc-core/driver will control
> it. Otherwise, it will waste energy even without sdmmc in slot.
>
> Moreover, it will causes a bug:
> If we insert/remove sd card, we could see
> [9.337271] mmc0: new ultra high speed SDR25 SDHC card at address 0007
> [9.345144] mmcblk0: mmc0:0007 SD32G 29.3 GiB
>
> This is okay for normal sd insert/remove test, but when I debug some
> issues for sdmmc, I did unbind/bind test. And there is a interesting
> phenomenon when we bind the driver again:
> [58.314069] mmc0: new high speed SDHC card at address 0007
> [58.320282] mmcblk0: mmc0:0007 SD32G 29.3 GiB
>
> So the sd card could just support high speed without power cycle
> since the vcc_sd is always on, which makes the sd card fail to
> reinit its internal ocr mask.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> ---
>
>  arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts        | 2 --
>  arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts | 2 --
>  arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts        | 2 --
>  3 files changed, 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
> index 46cdddf..353314c 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
> @@ -258,8 +258,6 @@
>  			};
>
>  			vcc_sd: SWITCH_REG1 {
> -				regulator-always-on;
> -				regulator-boot-on;
>  				regulator-name = "vcc_sd";
>  			};
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
> index 5797933..13b7f1ed 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
> @@ -152,8 +152,6 @@
>  		gpio = <&gpio3 11 GPIO_ACTIVE_LOW>;
>  		regulator-min-microvolt = <1800000>;
>  		regulator-max-microvolt = <3300000>;
> -		regulator-always-on;
> -		regulator-boot-on;
>  		vin-supply = <&vcc_io>;
>  	};
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
> index f59049b..8c47b01 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
> @@ -236,8 +236,6 @@
>  			};
>
>  			vcc_sd: SWITCH_REG1 {
> -				regulator-always-on;
> -				regulator-boot-on;
>  				regulator-name = "vcc_sd";
>  			};
>
>


-- 
Best Regards
Shawn Lin


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 3/3] arm64: dts: rockchip: remove always-on and boot-on from vcc_sd
       [not found]     ` <1474516939-22001-3-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  2016-10-09 13:42       ` Shawn Lin
@ 2016-10-14 17:18       ` Heiko Stuebner
  1 sibling, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2016-10-14 17:18 UTC (permalink / raw)
  To: Shawn Lin; +Cc: Andy Yan, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hi Shawn,

Am Donnerstag, 22. September 2016, 12:02:19 CEST schrieb Shawn Lin:
> Please don't add these for vcc_sd, and mmc-core/driver will control
> it. Otherwise, it will waste energy even without sdmmc in slot.
> 
> Moreover, it will causes a bug:
> If we insert/remove sd card, we could see
> [9.337271] mmc0: new ultra high speed SDR25 SDHC card at address 0007
> [9.345144] mmcblk0: mmc0:0007 SD32G 29.3 GiB
> 
> This is okay for normal sd insert/remove test, but when I debug some
> issues for sdmmc, I did unbind/bind test. And there is a interesting
> phenomenon when we bind the driver again:
> [58.314069] mmc0: new high speed SDHC card at address 0007
> [58.320282] mmcblk0: mmc0:0007 SD32G 29.3 GiB
> 
> So the sd card could just support high speed without power cycle
> since the vcc_sd is always on, which makes the sd card fail to
> reinit its internal ocr mask.
> 
> Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

>  arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts        | 2 --
>  arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts | 2 --

I've applied the geekbox + r68 parts of the patch as fix for 4.9 ...

>  arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts        | 2 --

and merged the px5-evb-part with the core patch adding the px5-evb,
so that we don't introduce known regressions unecessarily.


Thanks for fixing this
Heiko

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

* Re: [PATCH 1/3] arm64: dts: rockchip: Add more properties for emmc on px5-evb
       [not found] ` <1474516939-22001-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  2016-09-22  4:02   ` [PATCH 2/3] arm64: dts: rockchip: add sdmmc support for px5-evb Shawn Lin
  2016-09-22  4:02   ` [PATCH 3/3] arm64: dts: rockchip: remove always-on and boot-on from vcc_sd Shawn Lin
@ 2016-10-14 17:20   ` Heiko Stuebner
  2 siblings, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2016-10-14 17:20 UTC (permalink / raw)
  To: Shawn Lin; +Cc: Andy Yan, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Am Donnerstag, 22. September 2016, 12:02:17 CEST schrieb Shawn Lin:
> The emmc on px5-evb can support hs200, so let's add mmc-hs200-1_8v.
> And in order to speed up the boot time, we could add no-sdio and
> no-sd to simplify the initialization.
> 
> Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

applied after restoring the alphabetical ordering. Please try to keep that in 
mind in future patches :-)


Thanks
Heiko

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

* Re: [PATCH 2/3] arm64: dts: rockchip: add sdmmc support for px5-evb
       [not found]     ` <1474516939-22001-2-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-10-14 17:29       ` Heiko Stuebner
  0 siblings, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2016-10-14 17:29 UTC (permalink / raw)
  To: Shawn Lin; +Cc: Andy Yan, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Am Donnerstag, 22. September 2016, 12:02:18 CEST schrieb Shawn Lin:
> px5-evb has one sdmmc slot, so we could support sdmmc.
> 
> Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

applied for 4.10 with the changes described below. Please keep them in mind 
for future patches :-) .


>  arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
> b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts index 3e0b522..f59049b
> 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
> @@ -98,6 +98,25 @@
>  	vqmmc-supply = <&vcc18_flash>;
>  };
> 
> +&sdmmc {

moved sdmmc node to its alphabetical correct position

> +	status = "okay";
> +	bus-width = <4>;
> +	cap-mmc-highspeed;
> +	cap-sd-highspeed;
> +	card-detect-delay = <200>;
> +	rockchip,default-sample-phase = <90>;
> +	num-slots = <1>;

restored alphabetical ordering

> +	no-emmc;
> +	no-sdio;
> +	sd-uhs-sdr12;
> +	sd-uhs-sdr25;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_bus4>, <&sdmmc_cd>;
> +	vmmc-supply = <&vcc_sd>;
> +	vqmmc-supply = <&vccio_sd>;
> +};
> +
> +

removed 2nd blank line

>  &i2c0 {
>  	status = "okay";


Heiko

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

end of thread, other threads:[~2016-10-14 17:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22  4:02 [PATCH 1/3] arm64: dts: rockchip: Add more properties for emmc on px5-evb Shawn Lin
     [not found] ` <1474516939-22001-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-09-22  4:02   ` [PATCH 2/3] arm64: dts: rockchip: add sdmmc support for px5-evb Shawn Lin
     [not found]     ` <1474516939-22001-2-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-10-14 17:29       ` Heiko Stuebner
2016-09-22  4:02   ` [PATCH 3/3] arm64: dts: rockchip: remove always-on and boot-on from vcc_sd Shawn Lin
     [not found]     ` <1474516939-22001-3-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-10-09 13:42       ` Shawn Lin
2016-10-14 17:18       ` Heiko Stuebner
2016-10-14 17:20   ` [PATCH 1/3] arm64: dts: rockchip: Add more properties for emmc on px5-evb Heiko Stuebner

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.