[PATCH v2] arm64: dts: allwinner: h6: orangepi-3: Add eMMC node

50 views
Skip to first unread message

Jernej Skrabec

unread,
Feb 10, 2020, 12:40:18 PM2/10/20
to mri...@kernel.org, we...@csie.org, rob...@kernel.org, mark.r...@arm.com, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, linux...@googlegroups.com
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....@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

Stefan Monnier

unread,
Feb 10, 2020, 12:46:12 PM2/10/20
to linux...@googlegroups.com, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Question:

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

Is it just me or would this kind of explanation be better placed inside
the .dts file?


Stefan

Jernej Škrabec

unread,
Feb 11, 2020, 2:10:02 AM2/11/20
to Maxime Ripard, we...@csie.org, rob...@kernel.org, mark.r...@arm.com, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, linux...@googlegroups.com
Hi!

Dne torek, 11. februar 2020 ob 07:51:41 CET je Maxime Ripard napisal(a):
> 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


Ondřej Jirman

unread,
Feb 12, 2020, 7:25:14 AM2/12/20
to Jernej Skrabec, mri...@kernel.org, we...@csie.org, rob...@kernel.org, mark.r...@arm.com, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, linux...@googlegroups.com
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 <meg...@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.
> --
> 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...@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.
Reply all
Reply to author
Forward
0 new messages