linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: allwinner: h6: orangepi-3: Add eMMC node
@ 2020-02-10 17:40 Jernej Skrabec
  2020-02-11  6:51 ` Maxime Ripard
  2020-02-12 12:25 ` [linux-sunxi] " Ondřej Jirman
  0 siblings, 2 replies; 5+ messages in thread
From: Jernej Skrabec @ 2020-02-10 17:40 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, mark.rutland, devicetree, linux-arm-kernel,
	linux-kernel, linux-sunxi

OrangePi 3 can optionally have 8 GiB eMMC (soldered on board). Because
those pins are dedicated to eMMC exclusively, node can be added for both
variants (with and without eMMC). Kernel will then scan bus for presence
of eMMC and act accordingly.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
Changes since v1:
- don't make separate DT just for -emmc variant - add node to existing
  orangepi 3 DT

 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index c311eee52a35..1e0abd9d047f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -144,6 +144,15 @@ brcm: sdio-wifi@1 {
 	};
 };
 
+&mmc2 {
+	vmmc-supply = <&reg_cldo1>;
+	vqmmc-supply = <&reg_bldo2>;
+	cap-mmc-hw-reset;
+	non-removable;
+	bus-width = <8>;
+	status = "okay";
+};
+
 &ohci0 {
 	status = "okay";
 };
-- 
2.25.0


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

* Re: [PATCH v2] arm64: dts: allwinner: h6: orangepi-3: Add eMMC node
  2020-02-10 17:40 [PATCH v2] arm64: dts: allwinner: h6: orangepi-3: Add eMMC node Jernej Skrabec
@ 2020-02-11  6:51 ` Maxime Ripard
  2020-02-11  7:09   ` Jernej Škrabec
  2020-02-12 12:25 ` [linux-sunxi] " Ondřej Jirman
  1 sibling, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2020-02-11  6:51 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: wens, robh+dt, mark.rutland, devicetree, linux-arm-kernel,
	linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]

On Mon, Feb 10, 2020 at 06:40:07PM +0100, Jernej Skrabec wrote:
> OrangePi 3 can optionally have 8 GiB eMMC (soldered on board). Because
> those pins are dedicated to eMMC exclusively, node can be added for both
> variants (with and without eMMC). Kernel will then scan bus for presence
> of eMMC and act accordingly.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
> Changes since v1:
> - don't make separate DT just for -emmc variant - add node to existing
>   orangepi 3 DT
>
>  arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> index c311eee52a35..1e0abd9d047f 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> @@ -144,6 +144,15 @@ brcm: sdio-wifi@1 {
>  	};
>  };
>
> +&mmc2 {
> +	vmmc-supply = <&reg_cldo1>;
> +	vqmmc-supply = <&reg_bldo2>;
> +	cap-mmc-hw-reset;
> +	non-removable;

Given that non-removable is documented as "Non-removable slot (like
eMMC); assume always present.", we should probably get rid of that
property?

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2] arm64: dts: allwinner: h6: orangepi-3: Add eMMC node
  2020-02-11  6:51 ` Maxime Ripard
@ 2020-02-11  7:09   ` Jernej Škrabec
  2020-02-11  8:35     ` Maxime Ripard
  0 siblings, 1 reply; 5+ messages in thread
From: Jernej Škrabec @ 2020-02-11  7:09 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: wens, robh+dt, mark.rutland, devicetree, linux-arm-kernel,
	linux-kernel, linux-sunxi

Hi!

Dne torek, 11. februar 2020 ob 07:51:41 CET je Maxime Ripard napisal(a):
> On Mon, Feb 10, 2020 at 06:40:07PM +0100, Jernej Skrabec wrote:
> > OrangePi 3 can optionally have 8 GiB eMMC (soldered on board). Because
> > those pins are dedicated to eMMC exclusively, node can be added for both
> > variants (with and without eMMC). Kernel will then scan bus for presence
> > of eMMC and act accordingly.
> > 
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > ---
> > Changes since v1:
> > - don't make separate DT just for -emmc variant - add node to existing
> > 
> >   orangepi 3 DT
> >  
> >  arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts index
> > c311eee52a35..1e0abd9d047f 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> > @@ -144,6 +144,15 @@ brcm: sdio-wifi@1 {
> > 
> >  	};
> >  
> >  };
> > 
> > +&mmc2 {
> > +	vmmc-supply = <&reg_cldo1>;
> > +	vqmmc-supply = <&reg_bldo2>;
> > +	cap-mmc-hw-reset;
> > +	non-removable;
> 
> Given that non-removable is documented as "Non-removable slot (like
> eMMC); assume always present.", we should probably get rid of that
> property?

I checked mmc core code and this property means that bus will be scanned only 
once. In this form, node doesn't tell what kind of device is connected, so 
core has to scan it no matter if "non-removable" property is present or not. I 
maybe missed something though, so it would be great if someone can check it 
again.

Best regards,
Jernej



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

* Re: [PATCH v2] arm64: dts: allwinner: h6: orangepi-3: Add eMMC node
  2020-02-11  7:09   ` Jernej Škrabec
@ 2020-02-11  8:35     ` Maxime Ripard
  0 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2020-02-11  8:35 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: wens, robh+dt, mark.rutland, devicetree, linux-arm-kernel,
	linux-kernel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1973 bytes --]

On Tue, Feb 11, 2020 at 08:09:57AM +0100, Jernej Škrabec wrote:
> Hi!
>
> Dne torek, 11. februar 2020 ob 07:51:41 CET je Maxime Ripard napisal(a):
> > On Mon, Feb 10, 2020 at 06:40:07PM +0100, Jernej Skrabec wrote:
> > > OrangePi 3 can optionally have 8 GiB eMMC (soldered on board). Because
> > > those pins are dedicated to eMMC exclusively, node can be added for both
> > > variants (with and without eMMC). Kernel will then scan bus for presence
> > > of eMMC and act accordingly.
> > >
> > > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > > ---
> > > Changes since v1:
> > > - don't make separate DT just for -emmc variant - add node to existing
> > >
> > >   orangepi 3 DT
> > >
> > >  arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 9 +++++++++
> > >  1 file changed, 9 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> > > b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts index
> > > c311eee52a35..1e0abd9d047f 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> > > @@ -144,6 +144,15 @@ brcm: sdio-wifi@1 {
> > >
> > >  	};
> > >
> > >  };
> > >
> > > +&mmc2 {
> > > +	vmmc-supply = <&reg_cldo1>;
> > > +	vqmmc-supply = <&reg_bldo2>;
> > > +	cap-mmc-hw-reset;
> > > +	non-removable;
> >
> > Given that non-removable is documented as "Non-removable slot (like
> > eMMC); assume always present.", we should probably get rid of that
> > property?
>
> I checked mmc core code and this property means that bus will be scanned only
> once. In this form, node doesn't tell what kind of device is connected, so
> core has to scan it no matter if "non-removable" property is present or not. I
> maybe missed something though, so it would be great if someone can check it
> again.

It looks like it does indeed :)

I've applied that patch, thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [linux-sunxi] [PATCH v2] arm64: dts: allwinner: h6: orangepi-3: Add eMMC node
  2020-02-10 17:40 [PATCH v2] arm64: dts: allwinner: h6: orangepi-3: Add eMMC node Jernej Skrabec
  2020-02-11  6:51 ` Maxime Ripard
@ 2020-02-12 12:25 ` Ondřej Jirman
  1 sibling, 0 replies; 5+ messages in thread
From: Ondřej Jirman @ 2020-02-12 12:25 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: mripard, wens, robh+dt, mark.rutland, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

Hi,

On Mon, Feb 10, 2020 at 06:40:07PM +0100, Jernej Skrabec wrote:
> OrangePi 3 can optionally have 8 GiB eMMC (soldered on board). Because
> those pins are dedicated to eMMC exclusively, node can be added for both
> variants (with and without eMMC). Kernel will then scan bus for presence
> of eMMC and act accordingly.

Tested-by: Ondrej Jirman <megous@megous.com> (on a variant without eMMC)

It didn't magically add extra 8GiB of storage, but it didn't break anything
either. :)

regards,
	o.

> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
> Changes since v1:
> - don't make separate DT just for -emmc variant - add node to existing
>   orangepi 3 DT
> 
>  arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> index c311eee52a35..1e0abd9d047f 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
> @@ -144,6 +144,15 @@ brcm: sdio-wifi@1 {
>  	};
>  };
>  
> +&mmc2 {
> +	vmmc-supply = <&reg_cldo1>;
> +	vqmmc-supply = <&reg_bldo2>;
> +	cap-mmc-hw-reset;
> +	non-removable;
> +	bus-width = <8>;
> +	status = "okay";
> +};
> +
>  &ohci0 {
>  	status = "okay";
>  };
> -- 
> 2.25.0
> 
> -- 
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200210174007.118575-1-jernej.skrabec%40siol.net.

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

end of thread, other threads:[~2020-02-12 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 17:40 [PATCH v2] arm64: dts: allwinner: h6: orangepi-3: Add eMMC node Jernej Skrabec
2020-02-11  6:51 ` Maxime Ripard
2020-02-11  7:09   ` Jernej Škrabec
2020-02-11  8:35     ` Maxime Ripard
2020-02-12 12:25 ` [linux-sunxi] " Ondřej Jirman

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).