RG35XX Add Additional Hardware Support
Subsystems (2)
cover RG35XX Add Additional Hardware Support
From: Chris Morgan <[email protected]>
Add support for MMC2 and the second LED on the RG35XX series. Additionally, enable the CPUSLDO regulator to be "always on" to resolve bootloader issues during reboot, and add support for the USB host port on the RG35XX-H.
Chris Morgan (4):
arm64: dts: allwinner: h700: Add MMC2 for Anbernic RG35XX
arm64: dts: allwinner: h700: Set cpusldo to always-on for RG35XX
arm64: dts: allwinner: h700: Add LED1 for Anbernic RG35XX
arm64: dts: allwinner: h700: Add USB Host for RG35XX-H
.../sun50i-h700-anbernic-rg35xx-2024.dts | 44 +++++++++++++++++-- .../sun50i-h700-anbernic-rg35xx-h.dts | 23 ++++++++++ 2 files changed, 64 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/4 arm64: dts: allwinner: h700: Add MMC2 for Anbernic RG35XX
From: Chris Morgan <[email protected]>
Add support for the second MMC slot on the Anbernic RG35XX series. The second MMC card is connected to MMC2 (WiFi if present is MMC1). The MMC logic is powered by cldo3 via the power domain to which it is connected, and also has an external 3.3v GPIO controlled regulator required for functionality.
--- .../sun50i-h700-anbernic-rg35xx-2024.dts | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +25 -2
@@ -18,6 +18,9 @@ / { compatible = "anbernic,rg35xx-2024", "allwinner,sun50i-h700"; aliases { + mmc0 = &mmc0; + mmc1 = &mmc2; + mmc2 = &mmc1; serial0 = &uart0; };
@@ -175,6 +178,15 @@ reg_vcc5v: regulator-vcc5v { /* USB-C power input */ regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; + + reg_vcc3v3_mmc2: regulator-vcc3v3-mmc2 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */ + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3-mmc2"; + }; }; &cpu0 {
@@ -186,10 +198,21 @@ &ehci0 { }; &mmc0 { - vmmc-supply = <®_cldo3>; - disable-wp; + bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + disable-wp; + no-1-8-v; + vmmc-supply = <®_cldo3>; + status = "okay"; +}; + +&mmc2 { bus-width = <4>; + cd-gpios = <&pio 4 22 GPIO_ACTIVE_LOW>; /* PE22 */ + disable-wp; + no-1-8-v; + vmmc-supply = <®_vcc3v3_mmc2>; + vqmmc-supply = <®_cldo3>; status = "okay"; };
Signature · 1 line
2.43.0
Jernej Škrabec
maintainerRe: [PATCH 1/4] arm64: dts: allwinner: h700: Add MMC2 for Anbernic RG35XX
Hi Chris,
sorry it took so long.
Dne petek, 18. oktober 2024 ob 18:06:14 Srednjeevropski standardni čas je Chris Morgan napisal(a):
Quoted 18 lines
From: Chris Morgan <[email protected]>
Add support for the second MMC slot on the Anbernic RG35XX series. The second MMC card is connected to MMC2 (WiFi if present is MMC1). The MMC logic is powered by cldo3 via the power domain to which it is connected, and also has an external 3.3v GPIO controlled regulator required for functionality.
Signed-off-by Chris Morgan <[email protected]>--- .../sun50i-h700-anbernic-rg35xx-2024.dts | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +0
-0
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts / { · line 23
Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +3
-0@@ -18,6 +18,9 @@ / { compatible = "anbernic,rg35xx-2024", "allwinner,sun50i-h700"; aliases { + mmc0 = &mmc0; + mmc1 = &mmc2; + mmc2 = &mmc1;
Please drop those. As a rule, we don't have it in any DT, since there are more universal to identify root partition than a relying on device order.
Quoted 20 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +9
-0serial0 = &uart0; };@@ -175,6 +178,15 @@ reg_vcc5v: regulator-vcc5v { /* USB-C power input */ regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; + + reg_vcc3v3_mmc2: regulator-vcc3v3-mmc2 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */ + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3-mmc2"; + }; }; &cpu0 {
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts &ehci0 { · line 204
Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +3
-2@@ -186,10 +198,21 @@ &ehci0 { }; &mmc0 { - vmmc-supply = <®_cldo3>; - disable-wp; + bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + disable-wp; + no-1-8-v;
Please leave properties in same order to minimize patch size. From what I can see, only above property is added, which is not needed anyway.
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts &ehci0 { · line 215
Quoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +10
-0+ vmmc-supply = <®_cldo3>; + status = "okay"; +}; + +&mmc2 { bus-width = <4>; + cd-gpios = <&pio 4 22 GPIO_ACTIVE_LOW>; /* PE22 */ + disable-wp; + no-1-8-v; + vmmc-supply = <®_vcc3v3_mmc2>; + vqmmc-supply = <®_cldo3>;
Is this another SD card slot or eMMC? You configured it as it would be SD card, but mmc2 slots are usually used for eMMC, which needs different configuration.
Best regards,
Jernej
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +0
-0status = "okay"; };
Re: [PATCH 1/4] arm64: dts: allwinner: h700: Add MMC2 for Anbernic RG35XX
Quoted 25 lines · Jernej Škrabec
Hi Chris,
sorry it took so long.
Dne petek, 18. oktober 2024 ob 18:06:14 Srednjeevropski standardni čas je Chris Morgan napisal(a):
Quoted 20 lines
From: Chris Morgan <[email protected]>
Add support for the second MMC slot on the Anbernic RG35XX series. The second MMC card is connected to MMC2 (WiFi if present is MMC1). The MMC logic is powered by cldo3 via the power domain to which it is connected, and also has an external 3.3v GPIO controlled regulator required for functionality.
Signed-off-by Chris Morgan <[email protected]>--- .../sun50i-h700-anbernic-rg35xx-2024.dts | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +0
-0@@ -18,6 +18,9 @@ / { compatible = "anbernic,rg35xx-2024", "allwinner,sun50i-h700";
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts / { · line 23
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +3
-0aliases { + mmc0 = &mmc0; + mmc1 = &mmc2; + mmc2 = &mmc1;Please drop those. As a rule, we don't have it in any DT, since there are more universal to identify root partition than a relying on device order.
Would it be okay at least to keep the mmc2 alias mapped to physical device mmc1? Confusingly enough, this device is such that mmc0 is the first mmc card, mmc1 is the SDIO wifi card (not always present depending on device), and mmc2 is the second mmc card. That way the WiFi at least when present is always predictably at the mmc2 alias.
Quoted 23 lines
Quoted 23 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +9
-0serial0 = &uart0; };@@ -175,6 +178,15 @@ reg_vcc5v: regulator-vcc5v { /* USB-C power input */ regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; + + reg_vcc3v3_mmc2: regulator-vcc3v3-mmc2 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */ + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3-mmc2"; + }; }; &cpu0 {@@ -186,10 +198,21 @@ &ehci0 { };
Quoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts &ehci0 { · line 204
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +3
-2&mmc0 { - vmmc-supply = <®_cldo3>; - disable-wp; + bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + disable-wp; + no-1-8-v;Please leave properties in same order to minimize patch size. From what I can see, only above property is added, which is not needed anyway.
Acknowledged. I just figured I'd alphabetize them, but you're right it's a bit anal.
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +5
-0+ vmmc-supply = <®_cldo3>; + status = "okay"; +}; + +&mmc2 { bus-width = <4>;
Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts &ehci0 { · line 215
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +5
-0+ cd-gpios = <&pio 4 22 GPIO_ACTIVE_LOW>; /* PE22 */ + disable-wp; + no-1-8-v; + vmmc-supply = <®_vcc3v3_mmc2>; + vqmmc-supply = <®_cldo3>;Is this another SD card slot or eMMC? You configured it as it would be SD card, but mmc2 slots are usually used for eMMC, which needs different configuration.
Physical bus mmc0 is the TF1 slot, physical bus mmc2 is the TF2 slot, and physical bus mmc1 is the SDIO wifi card (which is present on most but not all devices in the 35xx series).
Quoted 11 lines
Best regards,
JernejQuoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +0
-0status = "okay"; };
Please let me know about setting alias mmc2, thank you. Chris
Jernej Škrabec
maintainerRe: [PATCH 1/4] arm64: dts: allwinner: h700: Add MMC2 for Anbernic RG35XX
Dne ponedeljek, 24. februar 2025 ob 19:17:42 Srednjeevropski standardni čas je Chris Morgan napisal(a):
Quoted 34 lines · Jernej Škrabec
Quoted 25 lines
Hi Chris,
sorry it took so long.
Dne petek, 18. oktober 2024 ob 18:06:14 Srednjeevropski standardni čas je Chris Morgan napisal(a):
Quoted 20 lines
From: Chris Morgan <[email protected]>
Add support for the second MMC slot on the Anbernic RG35XX series. The second MMC card is connected to MMC2 (WiFi if present is MMC1). The MMC logic is powered by cldo3 via the power domain to which it is connected, and also has an external 3.3v GPIO controlled regulator required for functionality.
Signed-off-by Chris Morgan <[email protected]>--- .../sun50i-h700-anbernic-rg35xx-2024.dts | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +0
-0@@ -18,6 +18,9 @@ / { compatible = "anbernic,rg35xx-2024", "allwinner,sun50i-h700";Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts / { · line 23
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +3
-0aliases { + mmc0 = &mmc0; + mmc1 = &mmc2; + mmc2 = &mmc1;Please drop those. As a rule, we don't have it in any DT, since there are more universal to identify root partition than a relying on device order.
Quoted 5 lines
Would it be okay at least to keep the mmc2 alias mapped to physical device mmc1? Confusingly enough, this device is such that mmc0 is the first mmc card, mmc1 is the SDIO wifi card (not always present depending on device), and mmc2 is the second mmc card. That way the WiFi at least when present is always predictably at the mmc2 alias.
This is standard for all Allwinner SoCs:
mmc0 -> SD card
mmc1 -> SDIO, more or less only wifi modules
mmc2 -> eMMC or SD card
Such ordering is due to mmc controller capabilities. And no, no exceptions for labels.
Quoted 56 lines
Quoted 25 lines
Quoted 25 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +9
-0serial0 = &uart0; };@@ -175,6 +178,15 @@ reg_vcc5v: regulator-vcc5v { /* USB-C power input */ regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; + + reg_vcc3v3_mmc2: regulator-vcc3v3-mmc2 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */ + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3-mmc2"; + }; }; &cpu0 {@@ -186,10 +198,21 @@ &ehci0 { };Quoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts &ehci0 { · line 204
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +3
-2&mmc0 { - vmmc-supply = <®_cldo3>; - disable-wp; + bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + disable-wp; + no-1-8-v;Please leave properties in same order to minimize patch size. From what I can see, only above property is added, which is not needed anyway.
Acknowledged. I just figured I'd alphabetize them, but you're right it's a bit anal.
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +5
-0+ vmmc-supply = <®_cldo3>; + status = "okay"; +}; + +&mmc2 { bus-width = <4>;Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts &ehci0 { · line 215
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +5
-0+ cd-gpios = <&pio 4 22 GPIO_ACTIVE_LOW>; /* PE22 */ + disable-wp; + no-1-8-v; + vmmc-supply = <®_vcc3v3_mmc2>; + vqmmc-supply = <®_cldo3>;Is this another SD card slot or eMMC? You configured it as it would be SD card, but mmc2 slots are usually used for eMMC, which needs different configuration.
Quoted 3 lines
Physical bus mmc0 is the TF1 slot, physical bus mmc2 is the TF2 slot, and physical bus mmc1 is the SDIO wifi card (which is present on most but not all devices in the 35xx series).
Interesting, 2 SD card slots and no eMMC. That's a first for me.
Best regards,
Jernej
Quoted 12 lines
Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts &ehci0 { · line 218
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +0
-0status = "okay"; };Please let me know about setting alias mmc2, thank you. Chris
Re: [PATCH 1/4] arm64: dts: allwinner: h700: Add MMC2 for Anbernic RG35XX
In reply to Chris MorganQuoted 34 lines · On Mon, 24 Feb 2025 12:17:42 -0600 Chris Morgan <[email protected]> wrote:
Quoted 25 lines · Jernej Škrabec
Hi Chris,
sorry it took so long.
Dne petek, 18. oktober 2024 ob 18:06:14 Srednjeevropski standardni čas je Chris Morgan napisal(a):
Quoted 20 lines
From: Chris Morgan <[email protected]>
Add support for the second MMC slot on the Anbernic RG35XX series. The second MMC card is connected to MMC2 (WiFi if present is MMC1). The MMC logic is powered by cldo3 via the power domain to which it is connected, and also has an external 3.3v GPIO controlled regulator required for functionality.
Signed-off-by Chris Morgan <[email protected]>--- .../sun50i-h700-anbernic-rg35xx-2024.dts | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +0
-0@@ -18,6 +18,9 @@ / { compatible = "anbernic,rg35xx-2024", "allwinner,sun50i-h700";Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts / { · line 23
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +3
-0aliases { + mmc0 = &mmc0; + mmc1 = &mmc2; + mmc2 = &mmc1;Please drop those. As a rule, we don't have it in any DT, since there are more universal to identify root partition than a relying on device order.
Quoted 5 lines
Would it be okay at least to keep the mmc2 alias mapped to physical device mmc1?
Confusingly enough, this device is such that mmc0 is the first mmc card, mmc1 is the SDIO wifi card (not always present depending on device), and mmc2 is the second mmc card.
As Jernej mentioned, this is due to subtle hardware limitations in the Allwinner SoC. I think SDIO and/or the SDIO IRQs only work on MMC1, and MMC2 is typically the only one with 8 data lines.
So this order is actually expected.
Quoted 2 lines
That way the WiFi at least
when present is always predictably at the mmc2 alias.
Why would you want that, exactly? I do understand the desire to have fixed names for the storage devices, but for the WiFi? Doesn't the networking device get named independently from the MMC device number?
And, FYI: if you really want the aliases, just pull this DT into U-Boot,
and use U-Boot's DT copy when booting the kernel, as U-Boot's build system
adds those MMC aliases automatically (since it's somewhat required for U-Boot's own operation):
Quoted 70 lines
Quoted 23 lines
Quoted 23 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +9
-0serial0 = &uart0; };@@ -175,6 +178,15 @@ reg_vcc5v: regulator-vcc5v { /* USB-C power input */ regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; + + reg_vcc3v3_mmc2: regulator-vcc3v3-mmc2 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */ + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc3v3-mmc2"; + }; }; &cpu0 {@@ -186,10 +198,21 @@ &ehci0 { };Quoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts &ehci0 { · line 204
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +3
-2&mmc0 { - vmmc-supply = <®_cldo3>; - disable-wp; + bus-width = <4>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + disable-wp; + no-1-8-v;Please leave properties in same order to minimize patch size. From what I can see, only above property is added, which is not needed anyway.
Acknowledged. I just figured I'd alphabetize them, but you're right it's a bit anal.
Quoted 6 lines
Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +5
-0+ vmmc-supply = <®_cldo3>; + status = "okay"; +}; + +&mmc2 { bus-width = <4>;Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts &ehci0 { · line 215
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +5
-0+ cd-gpios = <&pio 4 22 GPIO_ACTIVE_LOW>; /* PE22 */ + disable-wp; + no-1-8-v; + vmmc-supply = <®_vcc3v3_mmc2>; + vqmmc-supply = <®_cldo3>;Is this another SD card slot or eMMC? You configured it as it would be SD card, but mmc2 slots are usually used for eMMC, which needs different configuration.
Physical bus mmc0 is the TF1 slot, physical bus mmc2 is the TF2 slot, and physical bus mmc1 is the SDIO wifi card (which is present on most but not all devices in the 35xx series).
Quoted 11 lines
Best regards,
JernejQuoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +0
-0status = "okay"; };
Quoted 3 lines
Please let me know about setting alias mmc2, thank you. Chris
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
PATCH 2/4 arm64: dts: allwinner: h700: Set cpusldo to always-on for RG35XX
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
Set the cpusldo regulator for the AXP717 to "regulator-always-on". Its current functionality is still unknown as there are no schematics available, however it was observed that upon reboot if this regulator was disabled GPIO detection logic in the bootloader was inconsistent. Keep the regulator powered on for now until it can be defined correctly.
--- .../allwinner/sun50i-h700-anbernic-rg35xx-2024.dts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +10 -1
@@ -342,8 +342,17 @@ reg_boost: boost { regulator-name = "boost"; }; + /* + * Regulator function is unknown, but reading + * GPIO values in bootloader is inconsistent + * on reboot if this is disabled. Setting to + * default value from regulator OTP mem. + */ reg_cpusldo: cpusldo { - /* unused */ + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; }; };
Signature · 1 line
2.43.0
Re: [PATCH 2/4] arm64: dts: allwinner: h700: Set cpusldo to always-on for RG35XX
Dne petek, 18. oktober 2024 ob 18:06:15 Srednjeevropski standardni čas je Chris Morgan napisal(a):
Quoted 10 lines
From: Chris Morgan <[email protected]>
Set the cpusldo regulator for the AXP717 to "regulator-always-on". Its current functionality is still unknown as there are no schematics available, however it was observed that upon reboot if this regulator was disabled GPIO detection logic in the bootloader was inconsistent. Keep the regulator powered on for now until it can be defined correctly.
Signed-off-by Chris Morgan <[email protected]>
Best regards,
Jernej
PATCH 3/4 arm64: dts: allwinner: h700: Add LED1 for Anbernic RG35XX
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
Add the second LED (red) to the Anbernic RG35XX series. The RG35XX has 3 LEDs: an orange one that is controlled directly by the PMIC; and a green and red one that are controlled by GPIOs.
--- .../boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts +6 -0
@@ -170,6 +170,12 @@ led-0 { gpios = <&pio 8 12 GPIO_ACTIVE_HIGH>; /* PI12 */ default-state = "on"; }; + + led-1 { + function = LED_FUNCTION_STATUS; + color = <LED_COLOR_ID_GREEN>; + gpios = <&pio 8 11 GPIO_ACTIVE_HIGH>; /* PI11 */ + }; }; reg_vcc5v: regulator-vcc5v { /* USB-C power input */
Signature · 1 line
2.43.0
Re: [PATCH 3/4] arm64: dts: allwinner: h700: Add LED1 for Anbernic RG35XX
Dne petek, 18. oktober 2024 ob 18:06:16 Srednjeevropski standardni čas je Chris Morgan napisal(a):
Quoted 7 lines
From: Chris Morgan <[email protected]>
Add the second LED (red) to the Anbernic RG35XX series. The RG35XX has 3 LEDs: an orange one that is controlled directly by the PMIC; and a green and red one that are controlled by GPIOs.
Signed-off-by Chris Morgan <[email protected]>
Best regards,
Jernej
PATCH 4/4 arm64: dts: allwinner: h700: Add USB Host for RG35XX-H
In reply to Chris MorganFrom: Chris Morgan <[email protected]>
The RG35XX-H has a USB host port in addition to the USB OTG port used for charging. The host port receives its power from two distinct GPIO controlled regulators.
--- .../sun50i-h700-anbernic-rg35xx-h.dts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-h.dts +23 -0
@@ -71,6 +71,25 @@ gpio_mux: mux-controller { <&pio 8 2 GPIO_ACTIVE_LOW>; #mux-control-cells = <0>; }; + + reg_vcc3v8_usb: regulator-vcc3v8-usb { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pio 4 5 GPIO_ACTIVE_HIGH>; /* PE5 */ + regulator-min-microvolt = <3800000>; + regulator-max-microvolt = <3800000>; + regulator-name = "vcc3v8-usb"; + }; + + reg_vcc5v0_usb: regulator-vcc5v0-usb { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pio 8 7 GPIO_ACTIVE_HIGH>; /* PI7 */ + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-name = "vcc5v0-usb"; + vin-supply = <®_vcc3v8_usb>; + }; }; &gpadc {
@@ -113,3 +132,7 @@ joy_mux_pin: joy-mux-pin { function = "gpio_out"; }; }; + +&usbphy { + usb1_vbus-supply = <®_vcc5v0_usb>; +};
Signature · 1 line
2.43.0
Re: [PATCH 4/4] arm64: dts: allwinner: h700: Add USB Host for RG35XX-H
Dne petek, 18. oktober 2024 ob 18:06:17 Srednjeevropski standardni čas je Chris Morgan napisal(a):
Quoted 7 lines
From: Chris Morgan <[email protected]>
The RG35XX-H has a USB host port in addition to the USB OTG port used for charging. The host port receives its power from two distinct GPIO controlled regulators.
Signed-off-by Chris Morgan <[email protected]>
Best regards,
Jernej
Chen-Yu Tsai
AppliedRe: (subset) [PATCH 0/4] RG35XX Add Additional Hardware Support
In reply to Chris MorganQuoted 8 lines · Chris Morgan
From: Chris Morgan <[email protected]>
Add support for MMC2 and the second LED on the RG35XX series. Additionally, enable the CPUSLDO regulator to be "always on" to resolve bootloader issues during reboot, and add support for the USB host port on the RG35XX-H.
[...]
Applied to dt-for-6.15 in [email protected]:linux-sunxi/linux-sunxi.git, thanks!
[4/4] arm64: dts: allwinner: h700: Add USB Host for RG35XX-H
commit: 81009e49ddc8a1e27d414dbf9ff1837d1753b257
Best regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>