arm64: dts: allwinner: a64: Add WiFi/BT header on Pine64
Subsystems (2)
PATCH 1/3 arm64: dts: allwinner: a64: Add WiFi/BT header on Pine64
This adds all the pin mappings on the WiFi/BT header on the original Pine64. They're disabled by default as the modules don't ship by default. This includes, where they haven't been already, UART1 for BT and mmc1 for WiFi.
--- .../boot/dts/allwinner/sun50i-a64-pine64.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +17 -0
@@ -35,6 +35,11 @@ hdmi_con_in: endpoint { }; }; }; + + wifi_pwrseq: pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ + }; }; &codec {
@@ -124,6 +129,17 @@ &mmc0 { status = "okay"; }; +/* On Wifi/BT connector */ +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + vmmc-supply = <®_dldo4>; + vqmmc-supply = <®_eldo1>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; +}; + &ohci0 { status = "okay"; };
@@ -286,6 +302,7 @@ &uart0 { &uart1 { pinctrl-names = "default"; pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + uart-has-rtscts; status = "disabled"; };
Signature · 1 line
2.46.0
PATCH 2/3 arm64: dts: allwinner: a64: Add WiFi/BT header on SoPine
This adds all the pin mappings on the WiFi/BT header on the SoPine baseboard/A64-LTS. They're disabled by default as the modules don't ship by default. This includes, where they haven't been already, UART1 for BT and mmc1 for WiFi.
--- .../allwinner/sun50i-a64-sopine-baseboard.dts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts +24 -0
@@ -42,6 +42,11 @@ reg_vcc1v8: vcc1v8 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; + + wifi_pwrseq: pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ + }; }; &ac_power_supply {
@@ -103,6 +108,17 @@ ext_rgmii_phy: ethernet-phy@1 { }; }; +/* On Wifi/BT connector */ +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + vmmc-supply = <®_dldo4>; + vqmmc-supply = <®_eldo1>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; +}; + &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_pins>;
@@ -175,6 +191,14 @@ &uart0 { status = "okay"; }; +/* On Wifi/BT connector, with RTS/CTS */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + uart-has-rtscts; + status = "disabled"; +}; + /* On Pi-2 connector */ &uart2 { pinctrl-names = "default";
Signature · 1 line
2.46.0
PATCH 3/3 arm64: dts: allwinner: a64: Add WiFi/BT on Pine64
In reply to Peter RobinsonEnable the rtl8723bs WiFi/BT modules on the Pine64.
--- .../boot/dts/allwinner/sun50i-a64-pine64.dts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +16 -1
@@ -138,6 +138,14 @@ &mmc1 { mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; + status = "okay"; + + rtl8723bs: wifi@1 { + reg = <1>; + interrupt-parent = <&r_pio>; + interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ + interrupt-names = "host-wake"; + }; }; &ohci0 {
@@ -303,7 +311,14 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; uart-has-rtscts; - status = "disabled"; + status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ + enable-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ + host-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */ + }; }; /* On Pi-2 connector */
Signature · 1 line
2.46.0
Re: [PATCH 3/3] arm64: dts: allwinner: a64: Add WiFi/BT on Pine64
Quoted 1 line · 在 2024-09-01星期日的 13:21 +0100,Peter Robinson写道:
Enable the rtl8723bs WiFi/BT modules on the Pine64.
I think the maintainer previously prefer to enable these modules with DT overlays.
Quoted 46 lines
Signed-off-by Peter Robinson <[email protected]>---
.../boot/dts/allwinner/sun50i-a64-pine64.dts | 17
++++++++++++++++-1 file changed, 16 insertions(+), 1 deletion(-)arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +8
-0@@ -138,6 +138,14 @@ &mmc1 { mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; + status = "okay"; + + rtl8723bs: wifi@1 { + reg = <1>; + interrupt-parent = <&r_pio>; + interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ + interrupt-names = "host-wake"; + }; };
&ohci0 {arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +5
-1@@ -303,7 +311,14 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; uart-has-rtscts; - status = "disabled"; + status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /*PL6 */
+ enable-gpios = <&r_pio0 4GPIO_ACTIVE_HIGH>; /* PL4 */
+ host-wake-gpios = <&r_pio0 5GPIO_ACTIVE_HIGH>; /* PL5 */
+ };
};
/* On Pi-2 connector */
Re: [PATCH 3/3] arm64: dts: allwinner: a64: Add WiFi/BT on Pine64
Hi,
Quoted 5 lines · Icenowy Zheng
Quoted 1 line · 在 2024-09-01星期日的 13:21 +0100,Peter Robinson写道:
Enable the rtl8723bs WiFi/BT modules on the Pine64.
I think the maintainer previously prefer to enable these modules with DT overlays.
Yes, we cannot have this enabled unconditionally, especially since this is explicitly given as the reason for the first two patches. So either this would just stay on the list, for reference, (maybe marked as DON'T MERGE), or, better: we indeed rewrite this as an overlay.
I will give the series a test once I am back with my beloved boards.
Cheers,
Andre
Quoted 48 lines
Quoted 47 lines
Signed-off-by Peter Robinson <[email protected]>--- .../boot/dts/allwinner/sun50i-a64-pine64.dts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +13
-1@@ -138,6 +138,14 @@ &mmc1 { mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; + status = "okay"; + + rtl8723bs: wifi@1 { + reg = <1>; + interrupt-parent = <&r_pio>; + interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ + interrupt-names = "host-wake"; + }; }; &ohci0 {@@ -303,7 +311,14 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; uart-has-rtscts; - status = "disabled"; + status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /*PL6 */
+ enable-gpios = <&r_pio0 4GPIO_ACTIVE_HIGH>; /* PL4 */
+ host-wake-gpios = <&r_pio0 5GPIO_ACTIVE_HIGH>; /* PL5 */
+ };
};/* On Pi-2 connector */
Re: [PATCH 3/3] arm64: dts: allwinner: a64: Add WiFi/BT on Pine64
Quoted 7 lines · Andre Przywara
Hi,
Quoted 3 lines · Icenowy Zheng
Quoted 1 line · 在 2024-09-01星期日的 13:21 +0100,Peter Robinson写道:
Enable the rtl8723bs WiFi/BT modules on the Pine64.
Quoted 7 lines
Quoted 2 lines
I think the maintainer previously prefer to enable these modules with DT overlays.
Yes, we cannot have this enabled unconditionally, especially since this is explicitly given as the reason for the first two patches. So either this would just stay on the list, for reference, (maybe marked as DON'T MERGE), or, better: we indeed rewrite this as an overlay.
Yes, that's why it was separate, I wasn't sure how to label it TBH.
Quoted 1 line
I will give the series a test once I am back with my beloved boards.
Thanks.
Quoted 51 lines
Cheers,
AndreQuoted 48 lines
Quoted 47 lines
Signed-off-by Peter Robinson <[email protected]>--- .../boot/dts/allwinner/sun50i-a64-pine64.dts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +13
-1@@ -138,6 +138,14 @@ &mmc1 { mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; non-removable; + status = "okay"; + + rtl8723bs: wifi@1 { + reg = <1>; + interrupt-parent = <&r_pio>; + interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ + interrupt-names = "host-wake"; + }; }; &ohci0 {@@ -303,7 +311,14 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; uart-has-rtscts; - status = "disabled"; + status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /*PL6 */
+ enable-gpios = <&r_pio0 4GPIO_ACTIVE_HIGH>; /* PL4
*/
+ host-wake-gpios = <&r_pio0 5GPIO_ACTIVE_HIGH>; /*
PL5 */
+ };
};/* On Pi-2 connector */