Skip to contentSkip to conversation

improve support for the Tronsmart Vega S95 devices

RFC New Martin Blumenstingl 3 participants 18 messages Jun 25, 2016 – Sep 7, 2016

Subsystems (2)
lore
Share & tools
lore

Martin Blumenstingl

author reviewer
#0 lore raw

This series enables the following functionality:
- ethernet support
- enable uart_A (serial1) to which the bluetooth device is attached (currently not usable yet because the clocks for the WIFI + BT combo chip are not set up yet)
- SD-card support

Please note that this is an RFC because it was only tested on a *CLONE* of the "Tronsmart Vega S95 Meta". According to the .dts of my device and all Tronsmart Vega S95 devices everything which was enabled in this series should be identical across all devices.

author reviewer
#1 lore raw

PATCH 1/3 ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices

All of these have a Realtek Gbit RGMII PHY.

---
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +6 -0
index 54bb7c7..e36b509 100644
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ethmac {
+	status = "okay";
+	pinctrl-0 = <&eth_pins>;
+	pinctrl-names = "default";
+};
Signature · 1 line
2.9.0
#2 lore raw

PATCH 1/3 ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices

Am 25.06.2016 um 18:34 schrieb Martin Blumenstingl:

Quoted 12 lines

All of these have a Realtek Gbit RGMII PHY.

---
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +0 -0
index 54bb7c7..e36b509 100644

arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi line 68

Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +6 -0
@@ -60,3 +60,9 @@
 	pinctrl-names = "default";
 
 };
+
+&ethmac {
+	status = "okay";
+	pinctrl-0 = <&eth_pins>;
+	pinctrl-names = "default";
+};

Detected okay on Vega S95 Telos,

Thanks,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
author reviewer
#3 lore raw

PATCH 2/3 ARM64: dts: amlogic: enable uart_A on all Tronsmart Vega S95 devices

In reply to Martin Blumenstingl

An UART bluetooth device is attached to this serial port.

---
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +7 -0
index e36b509..b003729 100644
@@ -47,6 +47,7 @@
 
 	aliases {
 		serial0 = &uart_AO;
+		serial1 = &uart_A;
 	};
 
 	chosen {
@@ -54,6 +55,12 @@
 	};
 };
 
+&uart_A {
+	status = "okay";
+	pinctrl-0 = <&uart_a_pins>;
+	pinctrl-names = "default";
+};
+
 &uart_AO {
 	status = "okay";
 	pinctrl-0 = <&uart_ao_a_pins>;
Signature · 1 line
2.9.0
author reviewer
#4 lore raw

PATCH 3/3 ARM64: dts: amlogic: enable sd_emmc_b on all Tronsmart Vega S95 devices

In reply to Martin Blumenstingl

sd_emmc_b is routed to the SD-card. Unlike p20x there is no GPIO regulator, meaning it only supports 3.3V (which seems to be hard-wired).

---
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +27 -0
index b003729..3a77829 100644
@@ -53,6 +53,17 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	mmc_iv: fixed-regulator {
+		compatible = "regulator-fixed";
+
+		regulator-name = "mmc-supply";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &uart_A {
@@ -73,3 +84,19 @@
 	pinctrl-0 = <&eth_pins>;
 	pinctrl-names = "default";
 };
+
+&sd_emmc_b {
+	status = "okay";
+	pinctrl-0 = <&sdcard_pins>;
+	pinctrl-names = "default";
+
+	bus-width = <4>;
+	cap-sd-highspeed;
+	max-frequency = <100000000>;
+
+	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+	cd-inverted;
+
+	vmmc-supply = <&mmc_iv>;
+	voltage-ranges = <3300 3300>;
+};
Signature · 1 line
2.9.0
#5 lore raw

PATCH 3/3 ARM64: dts: amlogic: enable sd_emmc_b on all Tronsmart Vega S95 devices

Am 25.06.2016 um 18:34 schrieb Martin Blumenstingl:

Quoted 31 lines

sd_emmc_b is routed to the SD-card. Unlike p20x there is no GPIO regulator, meaning it only supports 3.3V (which seems to be hard-wired).

---
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +11 -0
index b003729..3a77829 100644
@@ -53,6 +53,17 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	mmc_iv: fixed-regulator {
+		compatible = "regulator-fixed";
+
+		regulator-name = "mmc-supply";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &uart_A {

arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi line 88

Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +2 -0
@@ -73,3 +84,19 @@
 	pinctrl-0 = <&eth_pins>;
 	pinctrl-names = "default";
 };
+
+&sd_emmc_b {

[snip]

This does not build on next-20160707 - what branch is this based on?

Thanks,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
#6 lore raw

PATCH 3/3 ARM64: dts: amlogic: enable sd_emmc_b on all Tronsmart Vega S95 devices

Am 08.07.2016 um 02:49 schrieb Andreas F?rber:

Quoted 39 lines

Am 25.06.2016 um 18:34 schrieb Martin Blumenstingl:

Quoted 36 lines

sd_emmc_b is routed to the SD-card. Unlike p20x there is no GPIO regulator, meaning it only supports 3.3V (which seems to be hard-wired).

---
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +13 -0
index b003729..3a77829 100644
@@ -53,6 +53,17 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	mmc_iv: fixed-regulator {
+		compatible = "regulator-fixed";
+
+		regulator-name = "mmc-supply";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &uart_A {
@@ -73,3 +84,19 @@
 	pinctrl-0 = <&eth_pins>;
 	pinctrl-names = "default";
 };
+
+&sd_emmc_b {

[snip]

Quoted 1 line

This does not build on next-20160707 - what branch is this based on?

Apparently linux-amlogic.git v4.7/integ.

Thanks again,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
maintainer
#7 lore raw
In reply to Martin Blumenstingl
Quoted 11 lines · Martin Blumenstingl

This series enables the following functionality:
- ethernet support
- enable uart_A (serial1) to which the bluetooth device is attached (currently not usable yet because the clocks for the WIFI + BT combo chip are not set up yet)
- SD-card support

Please note that this is an RFC because it was only tested on a *CLONE* of the "Tronsmart Vega S95 Meta". According to the .dts of my device and all Tronsmart Vega S95 devices everything which was enabled in this series should be identical across all devices.

I'll let Andreas (or anyone else with a this board) verify if this series works on the Vega S95 Meta.)

Kevin

author reviewer
#8 lore raw

cover eMMC, SD-card and ethernet support for Vega S95 boards

In reply to Martin Blumenstingl

This adds support for the internal eMMC, the SD-card slot and ethernet on all Tronsmart S95 Vega boards.
There are some S95 Vega Meta clones out there where the bootloader does not configure the ethernet registers correctly, leading to non-working ethernet. This will be fixed in a separate series. Boards which are not suffering from broken bootloaders have fully working ethernet.

Changes since the RFC:
- added eMMC support
- renamed fixed 3V3 regulator so it can be re-used for eMMC

Martin Blumenstingl (3):
ARM64: dts: amlogic: SD card support for all Tronsmart Vega S95
devices
ARM64: dts: amlogic: eMMC support for all Tronsmart Vega S95 devices
ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices

 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      | 67 ++++++++++++++++++++++
 1 file changed, 67 insertions(+)
Signature · 1 line
2.9.3
author reviewer
#9 lore raw

PATCH 1/3 ARM64: dts: amlogic: SD card support for all Tronsmart Vega S95 devices

sd_emmc_b is routed to the SD-card. Unlike p20x there is no GPIO regulator, meaning it only supports 3.3V (which seems to be hard-wired).

---
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +26 -0
index 54bb7c7..4572ce2 100644
@@ -52,6 +52,16 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	vcc_3v3: regulator at 0 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		regulator-always-on;
+	};
 };
 
 &uart_AO {
@@ -60,3 +70,19 @@
 	pinctrl-names = "default";
 
 };
+
+&sd_emmc_b {
+	status = "okay";
+	pinctrl-0 = <&sdcard_pins>;
+	pinctrl-names = "default";
+
+	bus-width = <4>;
+	cap-sd-highspeed;
+	max-frequency = <100000000>;
+
+	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+	cd-inverted;
+
+	vmmc-supply = <&vcc_3v3>;
+	voltage-ranges = <3300 3300>;
+};
Signature · 1 line
2.9.3
author reviewer
#10 lore raw

PATCH 2/3 ARM64: dts: amlogic: eMMC support for all Tronsmart Vega S95 devices

In reply to Martin Blumenstingl

This adds eMMC support for all Tronsmart Vega S95 devices using sd_emmc_c. This is implemented similar to the p20x boards (meaning it uses fixed regulators).

---
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +35 -0
index 4572ce2..af2e38e 100644
@@ -62,6 +62,21 @@
 
 		regulator-always-on;
 	};
+
+	vcc_1v8: regulator at 1 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+
+		regulator-always-on;
+	};
+
+	emmc_pwrseq: emmc-pwrseq {
+		compatible = "mmc-pwrseq-emmc";
+		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
+	};
 };
 
 &uart_AO {
@@ -86,3 +101,23 @@
 	vmmc-supply = <&vcc_3v3>;
 	voltage-ranges = <3300 3300>;
 };
+
+&sd_emmc_c {
+	status = "okay";
+	pinctrl-0 = <&emmc_pins>;
+	pinctrl-names = "default";
+
+	bus-width = <8>;
+	cap-sd-highspeed;
+	cap-mmc-highspeed;
+	max-frequency = <200000000>;
+	non-removable;
+	disable-wp;
+	mmc-ddr-1_8v;
+	mmc-hs200-1_8v;
+
+	mmc-pwrseq = <&emmc_pwrseq>;
+	voltage-ranges = <1800 3300>;
+	vmmc-supply = <&vcc_3v3>;
+	vmmcq-sumpply = <&vcc_1v8>;
+};
Signature · 1 line
2.9.3
author reviewer
#11 lore raw

PATCH 3/3 ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices

In reply to Martin Blumenstingl

All of these have a Realtek Gbit RGMII PHY.

---
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +6 -0
index af2e38e..5f50109 100644
@@ -86,6 +86,12 @@
 
 };
 
+&ethmac {
+	status = "okay";
+	pinctrl-0 = <&eth_pins>;
+	pinctrl-names = "default";
+};
+
 &sd_emmc_b {
 	status = "okay";
 	pinctrl-0 = <&sdcard_pins>;
Signature · 1 line
2.9.3
author reviewer
#12 lore raw

v2 cover eMMC, SD-card and ethernet support for Vega S95 boards

In reply to Martin Blumenstingl

This adds support for the internal eMMC, the SD-card slot and ethernet on all Tronsmart S95 Vega boards.
There are some S95 Vega Meta clones out there where the bootloader does not configure the ethernet registers correctly, leading to non-working ethernet. This will be fixed in a separate series. Boards which are not suffering from broken bootloaders have fully working ethernet.

Changes since v1:
- rebased after latest updates which added the IR decoder to meson-gxbb-vega-s95.dtsi

Changes since the RFC:
- added eMMC support
- renamed fixed 3V3 regulator so it can be re-used for eMMC

Martin Blumenstingl (3):
ARM64: dts: amlogic: SD card support for all Tronsmart Vega S95
devices
ARM64: dts: amlogic: eMMC support for all Tronsmart Vega S95 devices
ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices

 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      | 67 ++++++++++++++++++++++
 1 file changed, 67 insertions(+)
Signature · 1 line
2.9.3
author reviewer
#13 lore raw

PATCH v2 1/3 ARM64: dts: amlogic: SD card support for all Tronsmart Vega S95 devices

sd_emmc_b is routed to the SD-card. Unlike p20x there is no GPIO regulator, meaning it only supports 3.3V (which seems to be hard-wired).

---
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +26 -0
index 560770e..e9ead47 100644
@@ -52,6 +52,16 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	vcc_3v3: regulator at 0 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		regulator-always-on;
+	};
 };
 
 &uart_AO {
@@ -66,3 +76,19 @@
 	pinctrl-0 = <&remote_input_ao_pins>;
 	pinctrl-names = "default";
 };
+
+&sd_emmc_b {
+	status = "okay";
+	pinctrl-0 = <&sdcard_pins>;
+	pinctrl-names = "default";
+
+	bus-width = <4>;
+	cap-sd-highspeed;
+	max-frequency = <100000000>;
+
+	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+	cd-inverted;
+
+	vmmc-supply = <&vcc_3v3>;
+	voltage-ranges = <3300 3300>;
+};
Signature · 1 line
2.9.3
author reviewer
#14 lore raw

PATCH v2 2/3 ARM64: dts: amlogic: eMMC support for all Tronsmart Vega S95 devices

In reply to Martin Blumenstingl

This adds eMMC support for all Tronsmart Vega S95 devices using sd_emmc_c. This is implemented similar to the p20x boards (meaning it uses fixed regulators).

---
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi      | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +35 -0
index e9ead47..4573bac 100644
@@ -62,6 +62,21 @@
 
 		regulator-always-on;
 	};
+
+	vcc_1v8: regulator at 1 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+
+		regulator-always-on;
+	};
+
+	emmc_pwrseq: emmc-pwrseq {
+		compatible = "mmc-pwrseq-emmc";
+		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
+	};
 };
 
 &uart_AO {
@@ -92,3 +107,23 @@
 	vmmc-supply = <&vcc_3v3>;
 	voltage-ranges = <3300 3300>;
 };
+
+&sd_emmc_c {
+	status = "okay";
+	pinctrl-0 = <&emmc_pins>;
+	pinctrl-names = "default";
+
+	bus-width = <8>;
+	cap-sd-highspeed;
+	cap-mmc-highspeed;
+	max-frequency = <200000000>;
+	non-removable;
+	disable-wp;
+	mmc-ddr-1_8v;
+	mmc-hs200-1_8v;
+
+	mmc-pwrseq = <&emmc_pwrseq>;
+	voltage-ranges = <1800 3300>;
+	vmmc-supply = <&vcc_3v3>;
+	vmmcq-sumpply = <&vcc_1v8>;
+};
Signature · 1 line
2.9.3
author reviewer
#15 lore raw

PATCH v2 3/3 ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices

In reply to Martin Blumenstingl

All of these have a Realtek Gbit RGMII PHY.

---
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +6 -0
index 4573bac..463185d 100644
@@ -92,6 +92,12 @@
 	pinctrl-names = "default";
 };
 
+&ethmac {
+	status = "okay";
+	pinctrl-0 = <&eth_pins>;
+	pinctrl-names = "default";
+};
+
 &sd_emmc_b {
 	status = "okay";
 	pinctrl-0 = <&sdcard_pins>;
Signature · 1 line
2.9.3
maintainer Applied
#16 lore raw

v2 cover eMMC, SD-card and ethernet support for Vega S95 boards

In reply to Martin Blumenstingl

Hi Marrtin,

Quoted 16 lines · Martin Blumenstingl

This adds support for the internal eMMC, the SD-card slot and ethernet on all Tronsmart S95 Vega boards.
There are some S95 Vega Meta clones out there where the bootloader does not configure the ethernet registers correctly, leading to non-working ethernet. This will be fixed in a separate series. Boards which are not suffering from broken bootloaders have fully working ethernet.

Changes since v1:
- rebased after latest updates which added the IR decoder to meson-gxbb-vega-s95.dtsi

Changes since the RFC:
- added eMMC support
- renamed fixed 3V3 regulator so it can be re-used for eMMC

Quoted 5 lines

Martin Blumenstingl (3):
ARM64: dts: amlogic: SD card support for all Tronsmart Vega S95
devices
ARM64: dts: amlogic: eMMC support for all Tronsmart Vega S95 devices
ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices

I've applied the ethernet one, but I'm going to wait on the SD/eMMC patches until the driver is finalized for the other one.

Thanks,

Kevin

maintainer
#17 lore raw

v2 cover eMMC, SD-card and ethernet support for Vega S95 boards

Quoted 20 lines · Kevin Hilman

Hi Marrtin,

Quoted 16 lines · Martin Blumenstingl

This adds support for the internal eMMC, the SD-card slot and ethernet on all Tronsmart S95 Vega boards.
There are some S95 Vega Meta clones out there where the bootloader does not configure the ethernet registers correctly, leading to non-working ethernet. This will be fixed in a separate series. Boards which are not suffering from broken bootloaders have fully working ethernet.

Changes since v1:
- rebased after latest updates which added the IR decoder to meson-gxbb-vega-s95.dtsi

Changes since the RFC:
- added eMMC support
- renamed fixed 3V3 regulator so it can be re-used for eMMC

Quoted 8 lines
Quoted 5 lines

Martin Blumenstingl (3):
ARM64: dts: amlogic: SD card support for all Tronsmart Vega S95
devices
ARM64: dts: amlogic: eMMC support for all Tronsmart Vega S95 devices
ARM64: dts: amlogic: enable ethernet on all Tronsmart Vega S95 devices

I've applied the ethernet one, but I'm going to wait on the SD/eMMC patches until the driver is finalized for the other one.

Oops, I replied on the wrong thread, but just to be clear, I applied v2 of the ethernet patch, though it doesn't make too much difference in this case.

Kevin