devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: allwinner: h6: Introduce OrangePi 3 eMMC board
@ 2020-01-15 19:42 Jernej Skrabec
  2020-01-15 19:42 ` [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC Jernej Skrabec
  2020-01-15 19:42 ` [PATCH 2/2] arm64: dts: allwinner: h6: Introduce OrangePi 3 eMMC variant Jernej Skrabec
  0 siblings, 2 replies; 8+ messages in thread
From: Jernej Skrabec @ 2020-01-15 19:42 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, mark.rutland, linux-arm-kernel, devicetree, linux-kernel

OrangePi 3 board has multiple variants. Two of them come with 8 GiB eMMC
soldered on them.

This series introduces new DT file for OrangePi 3 with eMMC.

Please take a look.

Best regards,
Jernej

Jernej Skrabec (2):
  dt-bindings: arm: sunxi: add OrangePi 3 with eMMC
  arm64: dts: allwinner: h6: Introduce OrangePi 3 eMMC variant

 .../devicetree/bindings/arm/sunxi.yaml        |  5 +++++
 arch/arm64/boot/dts/allwinner/Makefile        |  1 +
 .../allwinner/sun50i-h6-orangepi-3-emmc.dts   | 22 +++++++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-emmc.dts

-- 
2.24.1


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

* [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC
  2020-01-15 19:42 [PATCH 0/2] arm64: dts: allwinner: h6: Introduce OrangePi 3 eMMC board Jernej Skrabec
@ 2020-01-15 19:42 ` Jernej Skrabec
  2020-01-15 21:57   ` Rob Herring
  2020-01-15 19:42 ` [PATCH 2/2] arm64: dts: allwinner: h6: Introduce OrangePi 3 eMMC variant Jernej Skrabec
  1 sibling, 1 reply; 8+ messages in thread
From: Jernej Skrabec @ 2020-01-15 19:42 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, mark.rutland, linux-arm-kernel, devicetree, linux-kernel

OrangePi 3 can optionally have eMMC. Add a compatible for it.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index 327ce6730823..c1e447915c59 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -763,6 +763,11 @@ properties:
           - const: xunlong,orangepi-3
           - const: allwinner,sun50i-h6
 
+      - description: Xunlong OrangePi 3 (with eMMC)
+        items:
+          - const: xunlong,orangepi-3-emmc
+          - const: allwinner,sun50i-h6
+
       - description: Xunlong OrangePi Lite
         items:
           - const: xunlong,orangepi-lite
-- 
2.24.1


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

* [PATCH 2/2] arm64: dts: allwinner: h6: Introduce OrangePi 3 eMMC variant
  2020-01-15 19:42 [PATCH 0/2] arm64: dts: allwinner: h6: Introduce OrangePi 3 eMMC board Jernej Skrabec
  2020-01-15 19:42 ` [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC Jernej Skrabec
@ 2020-01-15 19:42 ` Jernej Skrabec
  1 sibling, 0 replies; 8+ messages in thread
From: Jernej Skrabec @ 2020-01-15 19:42 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, mark.rutland, linux-arm-kernel, devicetree, linux-kernel

OrangePi 3 can optionally have 8 GiB eMMC (soldered on board). Add new
DT file for it.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm64/boot/dts/allwinner/Makefile        |  1 +
 .../allwinner/sun50i-h6-orangepi-3-emmc.dts   | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-emmc.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index cf4f78617c3f..5fe8db1290b6 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -25,6 +25,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-beelink-gs1.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-3.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-3-emmc.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-lite2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-emmc.dts
new file mode 100644
index 000000000000..278f1b55935f
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3-emmc.dts
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2020 Jernej Skrabec <jernej.skrabec@siol.net>
+
+#include "sun50i-h6-orangepi-3.dts"
+
+/ {
+	model = "OrangePi 3 eMMC";
+	compatible = "xunlong,orangepi-3-emmc", "allwinner,sun50i-h6";
+};
+
+&mmc2 {
+	vmmc-supply = <&reg_cldo1>;
+	vqmmc-supply = <&reg_bldo2>;
+	non-removable;
+	cap-mmc-hw-reset;
+	bus-width = <8>;
+	status = "okay";
+};
+
+&pio {
+	vcc-pc-supply = <&reg_bldo2>;
+};
-- 
2.24.1


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

* Re: [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC
  2020-01-15 19:42 ` [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC Jernej Skrabec
@ 2020-01-15 21:57   ` Rob Herring
  2020-01-15 23:10     ` Jernej Škrabec
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2020-01-15 21:57 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: Maxime Ripard, Chen-Yu Tsai, Mark Rutland,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	devicetree, linux-kernel

On Wed, Jan 15, 2020 at 1:42 PM Jernej Skrabec <jernej.skrabec@siol.net> wrote:
>
> OrangePi 3 can optionally have eMMC. Add a compatible for it.

Is this just a population option or a different board layout? If the
former, I don't think you need a new compatible, just add/enable a
node for the eMMC.

Rob

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

* Re: [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC
  2020-01-15 21:57   ` Rob Herring
@ 2020-01-15 23:10     ` Jernej Škrabec
  2020-01-16 12:29       ` Maxime Ripard
  0 siblings, 1 reply; 8+ messages in thread
From: Jernej Škrabec @ 2020-01-15 23:10 UTC (permalink / raw)
  To: Rob Herring
  Cc: Maxime Ripard, Chen-Yu Tsai, Mark Rutland,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	devicetree, linux-kernel

Hi!

Dne sreda, 15. januar 2020 ob 22:57:31 CET je Rob Herring napisal(a):
> On Wed, Jan 15, 2020 at 1:42 PM Jernej Skrabec <jernej.skrabec@siol.net> 
wrote:
> > OrangePi 3 can optionally have eMMC. Add a compatible for it.
> 
> Is this just a population option or a different board layout? If the
> former, I don't think you need a new compatible, just add/enable a
> node for the eMMC.

I have only board with eMMC but I imagine it's the former. Even so, current 
approach with Allwinner boards is to have two different board DT files, one for 
each variant. This can be seen from Documentation/devicetree/bindings/arm/
sunxi.yaml which has a lot of compatibles ending with "-emmc". I guess reason 
for that is to avoid having MMC controller being powered on for no reason.

Best regards,
Jernej





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

* Re: [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC
  2020-01-15 23:10     ` Jernej Škrabec
@ 2020-01-16 12:29       ` Maxime Ripard
  2020-01-16 16:33         ` Jernej Škrabec
  0 siblings, 1 reply; 8+ messages in thread
From: Maxime Ripard @ 2020-01-16 12:29 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: Rob Herring, Chen-Yu Tsai, Mark Rutland,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	devicetree, linux-kernel

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

On Thu, Jan 16, 2020 at 12:10:58AM +0100, Jernej Škrabec wrote:
> Hi!
>
> Dne sreda, 15. januar 2020 ob 22:57:31 CET je Rob Herring napisal(a):
> > On Wed, Jan 15, 2020 at 1:42 PM Jernej Skrabec <jernej.skrabec@siol.net>
> wrote:
> > > OrangePi 3 can optionally have eMMC. Add a compatible for it.
> >
> > Is this just a population option or a different board layout? If the
> > former, I don't think you need a new compatible, just add/enable a
> > node for the eMMC.
>
> I have only board with eMMC but I imagine it's the former. Even so, current
> approach with Allwinner boards is to have two different board DT files, one for
> each variant. This can be seen from Documentation/devicetree/bindings/arm/
> sunxi.yaml which has a lot of compatibles ending with "-emmc". I guess reason
> for that is to avoid having MMC controller being powered on for no reason.

The main reason for that is that those populating options can be
conflicting. For example, last week we discussed an issue about the
eMMC being on the same pin set than an SPI flash, both options being
available.

The solution Andre suggested then was to let the eMMC be disabled, and
have the bootloader probe the emmc, and if found, enable
it. Otherwise, it means that you have a SPI flash (and enable it).

I guess a similar solution would apply here.

Maxime

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

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

* Re: [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC
  2020-01-16 12:29       ` Maxime Ripard
@ 2020-01-16 16:33         ` Jernej Škrabec
  2020-01-17 18:25           ` Maxime Ripard
  0 siblings, 1 reply; 8+ messages in thread
From: Jernej Škrabec @ 2020-01-16 16:33 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, Chen-Yu Tsai, Mark Rutland,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	devicetree, linux-kernel

Dne četrtek, 16. januar 2020 ob 13:29:44 CET je Maxime Ripard napisal(a):
> On Thu, Jan 16, 2020 at 12:10:58AM +0100, Jernej Škrabec wrote:
> > Hi!
> > 
> > Dne sreda, 15. januar 2020 ob 22:57:31 CET je Rob Herring napisal(a):
> > > On Wed, Jan 15, 2020 at 1:42 PM Jernej Skrabec <jernej.skrabec@siol.net>
> > 
> > wrote:
> > > > OrangePi 3 can optionally have eMMC. Add a compatible for it.
> > > 
> > > Is this just a population option or a different board layout? If the
> > > former, I don't think you need a new compatible, just add/enable a
> > > node for the eMMC.
> > 
> > I have only board with eMMC but I imagine it's the former. Even so,
> > current
> > approach with Allwinner boards is to have two different board DT files,
> > one for each variant. This can be seen from
> > Documentation/devicetree/bindings/arm/ sunxi.yaml which has a lot of
> > compatibles ending with "-emmc". I guess reason for that is to avoid
> > having MMC controller being powered on for no reason.
> The main reason for that is that those populating options can be
> conflicting. For example, last week we discussed an issue about the
> eMMC being on the same pin set than an SPI flash, both options being
> available.
> 
> The solution Andre suggested then was to let the eMMC be disabled, and
> have the bootloader probe the emmc, and if found, enable
> it. Otherwise, it means that you have a SPI flash (and enable it).
> 
> I guess a similar solution would apply here.

From what I can tell from schematic, pins are dedicated for eMMC.

So what solution do you suggest? Put eMMC node in original OrangePi 3 DT and 
set status to disabled?

Best regards,
Jernej




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

* Re: [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC
  2020-01-16 16:33         ` Jernej Škrabec
@ 2020-01-17 18:25           ` Maxime Ripard
  0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2020-01-17 18:25 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: Rob Herring, Chen-Yu Tsai, Mark Rutland,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	devicetree, linux-kernel

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

Hi,

On Thu, Jan 16, 2020 at 05:33:45PM +0100, Jernej Škrabec wrote:
> Dne četrtek, 16. januar 2020 ob 13:29:44 CET je Maxime Ripard napisal(a):
> > On Thu, Jan 16, 2020 at 12:10:58AM +0100, Jernej Škrabec wrote:
> > > Hi!
> > >
> > > Dne sreda, 15. januar 2020 ob 22:57:31 CET je Rob Herring napisal(a):
> > > > On Wed, Jan 15, 2020 at 1:42 PM Jernej Skrabec <jernej.skrabec@siol.net>
> > >
> > > wrote:
> > > > > OrangePi 3 can optionally have eMMC. Add a compatible for it.
> > > >
> > > > Is this just a population option or a different board layout? If the
> > > > former, I don't think you need a new compatible, just add/enable a
> > > > node for the eMMC.
> > >
> > > I have only board with eMMC but I imagine it's the former. Even so,
> > > current
> > > approach with Allwinner boards is to have two different board DT files,
> > > one for each variant. This can be seen from
> > > Documentation/devicetree/bindings/arm/ sunxi.yaml which has a lot of
> > > compatibles ending with "-emmc". I guess reason for that is to avoid
> > > having MMC controller being powered on for no reason.
> > The main reason for that is that those populating options can be
> > conflicting. For example, last week we discussed an issue about the
> > eMMC being on the same pin set than an SPI flash, both options being
> > available.
> >
> > The solution Andre suggested then was to let the eMMC be disabled, and
> > have the bootloader probe the emmc, and if found, enable
> > it. Otherwise, it means that you have a SPI flash (and enable it).
> >
> > I guess a similar solution would apply here.
>
> From what I can tell from schematic, pins are dedicated for eMMC.
>
> So what solution do you suggest? Put eMMC node in original OrangePi 3 DT and
> set status to disabled?

If it's always dedicated to eMMC, but the eMMC is not always there, I
guess we could remove the non-removable property from the eMMC
mode. IIRC, without it (and without CD GPIO), it will fall-back to
polling the card and will be able to detect it if it's there (and not
use it if it's not).

Maxime

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

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

end of thread, other threads:[~2020-01-17 18:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 19:42 [PATCH 0/2] arm64: dts: allwinner: h6: Introduce OrangePi 3 eMMC board Jernej Skrabec
2020-01-15 19:42 ` [PATCH 1/2] dt-bindings: arm: sunxi: add OrangePi 3 with eMMC Jernej Skrabec
2020-01-15 21:57   ` Rob Herring
2020-01-15 23:10     ` Jernej Škrabec
2020-01-16 12:29       ` Maxime Ripard
2020-01-16 16:33         ` Jernej Škrabec
2020-01-17 18:25           ` Maxime Ripard
2020-01-15 19:42 ` [PATCH 2/2] arm64: dts: allwinner: h6: Introduce OrangePi 3 eMMC variant Jernej Skrabec

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