Skip to contentSkip to conversation

arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC

PATCH Superseded Jernej Skrabec 2 participants 4 messages Jul 21, 2021 – Jul 22, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jernej Skrabec

author maintainer
#0 lore raw

cover arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC

Tanix TX6 box has a 32 GB eMMC module. With changes in this series, I get following figures with hdparm -tT:

/dev/mmcblk2:
Timing cached reads: 1638 MB in 2.00 seconds = 818.44 MB/sec
Timing buffered disk reads: 376 MB in 3.01 seconds = 124.74 MB/sec

First patch only sets proper power supplies to GPIO banks and second adds eMMC support.

Please take a look.

Best regards,
Jernej Skrabec

Jernej Skrabec (2):
arm64: dts: allwinner: h6: tanix-tx6: Add PIO power supplies
arm64: dts: allwinner: h6: tanix-tx6: enable emmc

 .../dts/allwinner/sun50i-h6-tanix-tx6.dts     | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
Signature · 1 line
2.32.0
author maintainer
#1 lore raw

PATCH 1/2 arm64: dts: allwinner: h6: tanix-tx6: Add PIO power supplies

While there is no publicly available schematic of this board, it's not hard to determine voltage of GPIO port C, D and G (only ones which can be set).

Port C and G are used for MMC/SDIO communication, so they use 1.8 V power supply. It's not clear if port D is even used, but if it is, it's pretty safe to assume it uses 3.3 V power supply. Value read from PIO Group Withstand Voltage Mode Select register from within pre-installed Android agrees with that assesment.

---
 .../boot/dts/allwinner/sun50i-h6-tanix-tx6.dts      | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts +13 -0
index be81330db14f..a1dd8f472cc8 100644
@@ -32,6 +32,13 @@ hdmi_con_in: endpoint {
 		};
 	};
 
+	reg_vcc1v8: vcc1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
 	reg_vcc3v3: vcc3v3 {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3";
@@ -99,6 +106,12 @@ &ohci3 {
 	status = "okay";
 };
 
+&pio {
+	vcc-pc-supply = <&reg_vcc1v8>;
+	vcc-pd-supply = <&reg_vcc3v3>;
+	vcc-pg-supply = <&reg_vcc1v8>;
+};
+
 &r_ir {
 	linux,rc-map-name = "rc-tanix-tx5max";
 	status = "okay";
Signature · 1 line
2.32.0
#2 lore raw

Re: [PATCH 1/2] arm64: dts: allwinner: h6: tanix-tx6: Add PIO power supplies

Hi,

Quoted 20 lines · Jernej Skrabec

While there is no publicly available schematic of this board, it's not hard to determine voltage of GPIO port C, D and G (only ones which can be set).

Port C and G are used for MMC/SDIO communication, so they use 1.8 V power supply. It's not clear if port D is even used, but if it is, it's pretty safe to assume it uses 3.3 V power supply. Value read from PIO Group Withstand Voltage Mode Select register from within pre-installed Android agrees with that assesment.

---
 .../boot/dts/allwinner/sun50i-h6-tanix-tx6.dts      | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts +0 -0
index be81330db14f..a1dd8f472cc8 100644

arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts hdmi_con_in: endpoint { · line 41

Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts +7 -0
@@ -32,6 +32,13 @@ hdmi_con_in: endpoint {
 		};
 	};
 
+	reg_vcc1v8: vcc1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+

I appreciate that the other 3.3V regulator has the same issue, but the node name must reflect the class of the device. Maybe regulator-vcc1v8?

Maxime

author maintainer
#3 lore raw

PATCH 2/2 arm64: dts: allwinner: h6: tanix-tx6: enable emmc

In reply to Jernej Skrabec

Tanix TX6 has 32 GiB eMMC. Add a node for it.

---
 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts +10 -0
index a1dd8f472cc8..c23b7c37406b 100644
@@ -98,6 +98,16 @@ &mmc0 {
 	status = "okay";
 };
 
+&mmc2 {
+	vmmc-supply = <&reg_vcc3v3>;
+	vqmmc-supply = <&reg_vcc1v8>;
+	bus-width = <8>;
+	non-removable;
+	cap-mmc-hw-reset;
+	mmc-hs200-1_8v;
+	status = "okay";
+};
+
 &ohci0 {
 	status = "okay";
 };
Signature · 1 line
2.32.0