ARM Sunxi Platform Development
 help / color / Atom feed
* [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC
@ 2021-07-22 16:12 Jernej Skrabec
  2021-07-22 16:12 ` [PATCH v2 1/3] arm64: dts: allwinner: h6: tanix-tx6: Fix regulator node names Jernej Skrabec
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jernej Skrabec @ 2021-07-22 16:12 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, jernej.skrabec, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel

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 fixes regulator node names. Second patch sets proper power
supplies to GPIO banks and third adds eMMC support.

Please take a look.

Best regards,
Jernej Skrabec

Changes from v1:
- added patch 1 (fixing regulator node names with "regulator-" prefix)
- fixed regulator node name in patch 2 (adding "regulator-" prefix)

Jernej Skrabec (3):
  arm64: dts: allwinner: h6: tanix-tx6: Fix regulator node names
  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     | 27 +++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

-- 
2.32.0


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

* [PATCH v2 1/3] arm64: dts: allwinner: h6: tanix-tx6: Fix regulator node names
  2021-07-22 16:12 [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC Jernej Skrabec
@ 2021-07-22 16:12 ` Jernej Skrabec
  2021-07-22 16:12 ` [PATCH v2 2/3] arm64: dts: allwinner: h6: tanix-tx6: Add PIO power supplies Jernej Skrabec
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jernej Skrabec @ 2021-07-22 16:12 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, jernej.skrabec, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel

Regulator node names don't reflect class of the device. Fix that by
prefixing names with "regulator-".

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
index be81330db14f..02641191682e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
@@ -32,14 +32,14 @@ hdmi_con_in: endpoint {
 		};
 	};
 
-	reg_vcc3v3: vcc3v3 {
+	reg_vcc3v3: regulator-vcc3v3 {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
 	};
 
-	reg_vdd_cpu_gpu: vdd-cpu-gpu {
+	reg_vdd_cpu_gpu: regulator-vdd-cpu-gpu {
 		compatible = "regulator-fixed";
 		regulator-name = "vdd-cpu-gpu";
 		regulator-min-microvolt = <1135000>;
-- 
2.32.0


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

* [PATCH v2 2/3] arm64: dts: allwinner: h6: tanix-tx6: Add PIO power supplies
  2021-07-22 16:12 [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC Jernej Skrabec
  2021-07-22 16:12 ` [PATCH v2 1/3] arm64: dts: allwinner: h6: tanix-tx6: Fix regulator node names Jernej Skrabec
@ 2021-07-22 16:12 ` Jernej Skrabec
  2021-07-22 16:12 ` [PATCH v2 3/3] arm64: dts: allwinner: h6: tanix-tx6: enable emmc Jernej Skrabec
  2021-07-26  7:12 ` [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC Maxime Ripard
  3 siblings, 0 replies; 5+ messages in thread
From: Jernej Skrabec @ 2021-07-22 16:12 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, jernej.skrabec, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel

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.

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 .../boot/dts/allwinner/sun50i-h6-tanix-tx6.dts      | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
index 02641191682e..cf9721ca6370 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
@@ -32,6 +32,13 @@ hdmi_con_in: endpoint {
 		};
 	};
 
+	reg_vcc1v8: regulator-vcc1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
 	reg_vcc3v3: regulator-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";
-- 
2.32.0


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

* [PATCH v2 3/3] arm64: dts: allwinner: h6: tanix-tx6: enable emmc
  2021-07-22 16:12 [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC Jernej Skrabec
  2021-07-22 16:12 ` [PATCH v2 1/3] arm64: dts: allwinner: h6: tanix-tx6: Fix regulator node names Jernej Skrabec
  2021-07-22 16:12 ` [PATCH v2 2/3] arm64: dts: allwinner: h6: tanix-tx6: Add PIO power supplies Jernej Skrabec
@ 2021-07-22 16:12 ` Jernej Skrabec
  2021-07-26  7:12 ` [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC Maxime Ripard
  3 siblings, 0 replies; 5+ messages in thread
From: Jernej Skrabec @ 2021-07-22 16:12 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, jernej.skrabec, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel

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

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
index cf9721ca6370..8f2a80f128de 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
@@ -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";
 };
-- 
2.32.0


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

* Re: [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC
  2021-07-22 16:12 [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC Jernej Skrabec
                   ` (2 preceding siblings ...)
  2021-07-22 16:12 ` [PATCH v2 3/3] arm64: dts: allwinner: h6: tanix-tx6: enable emmc Jernej Skrabec
@ 2021-07-26  7:12 ` Maxime Ripard
  3 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2021-07-26  7:12 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: wens, robh+dt, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel


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

On Thu, Jul 22, 2021 at 06:12:17PM +0200, Jernej Skrabec wrote:
> 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 fixes regulator node names. Second patch sets proper power
> supplies to GPIO banks and third adds eMMC support.
> 
> Please take a look.

Applied all three, thanks

Maxime

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

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 16:12 [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC Jernej Skrabec
2021-07-22 16:12 ` [PATCH v2 1/3] arm64: dts: allwinner: h6: tanix-tx6: Fix regulator node names Jernej Skrabec
2021-07-22 16:12 ` [PATCH v2 2/3] arm64: dts: allwinner: h6: tanix-tx6: Add PIO power supplies Jernej Skrabec
2021-07-22 16:12 ` [PATCH v2 3/3] arm64: dts: allwinner: h6: tanix-tx6: enable emmc Jernej Skrabec
2021-07-26  7:12 ` [PATCH v2 0/3] arm64: dts: allwinner: h6: tanix-tx6: Enable eMMC Maxime Ripard

ARM Sunxi Platform Development

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-sunxi/0 linux-sunxi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sunxi linux-sunxi/ https://lore.kernel.org/linux-sunxi \
		linux-sunxi@lists.linux.dev
	public-inbox-index linux-sunxi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/dev.linux.lists.linux-sunxi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git