Add bluetooth support for Orange Pi 3
Subsystems (2)
cover Add bluetooth support for Orange Pi 3
From: Ondrej Jirman <[email protected]>
(Re-send for Maxime, with already applied patches dropped. Nothing new.)
This series implements bluetooth support for Xunlong Orange Pi 3 board.
The board uses AP6256 WiFi/BT 5.0 chip.
Summary of changes:
- add more delay to let initialize the chip
- let the kernel detect firmware file path
- add new compatible and update dt-bindings
- update Orange Pi 3 / H6 DTS
Please take a look.
thank you and regards,
Ondrej Jirman
Ondrej Jirman (2):
arm64: dts: allwinner: h6: Add pin configs for uart1
arm64: dts: allwinner: orange-pi-3: Enable UART1 / Bluetooth
.../dts/allwinner/sun50i-h6-orangepi-3.dts | 19 +++++++++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 ++++++++++
Signature · 1 line
2.23.0
PATCH RESEND 1/2 arm64: dts: allwinner: h6: Add pin configs for uart1
From: Ondrej Jirman <[email protected]>
Orange Pi 3 uses UART1 for bluetooth. Add pinconfigs so that we can use them.
--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +10 -0
@@ -298,6 +298,16 @@ pins = "PH0", "PH1"; function = "uart0"; }; + + uart1_pins: uart1-pins { + pins = "PG6", "PG7"; + function = "uart1"; + }; + + uart1_rts_cts_pins: uart1-rts-cts-pins { + pins = "PG8", "PG9"; + function = "uart1"; + }; }; gic: interrupt-controller@3021000 {
Signature · 1 line
2.23.0
PATCH RESEND 2/2 arm64: dts: allwinner: orange-pi-3: Enable UART1 / Bluetooth
In reply to [email protected]From: Ondrej Jirman <[email protected]>
The board contains AP6256 WiFi/BT module that has its bluetooth part connected to SoC's UART1 port. Enable this port, and add node for the bluetooth device.
Bluetooth part is named bcm4345c5.
You'll need a BCM4345C5.hcd firmware file that can be found in the Xulongs's repository for H6:
https://github.com/orangepi-xunlong/OrangePiH6_external/tree/master/ap6256
The driver expects the firmware at the following path relative to the firmware directory:
brcm/BCM4345C5.hcd
--- .../dts/allwinner/sun50i-h6-orangepi-3.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +19 -0
@@ -15,6 +15,7 @@ aliases { serial0 = &uart0; + serial1 = &uart1; }; chosen {
@@ -271,6 +272,24 @@ status = "okay"; }; +/* There's the BT part of the AP6256 connected to that UART */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm4345c5"; + clocks = <&rtc 1>; + clock-names = "lpo"; + device-wakeup-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */ + host-wakeup-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */ + shutdown-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */ + max-speed = <1500000>; + }; +}; + &usb2otg { /* * This board doesn't have a controllable VBUS even though it
Signature · 1 line
2.23.0
Maxime Ripard
AppliedQuoted 8 lines · On Mon, Oct 07, 2019 at 10:31:50PM +0200, [email protected] wrote:
From: Ondrej Jirman <[email protected]>
(Re-send for Maxime, with already applied patches dropped. Nothing new.)
This series implements bluetooth support for Xunlong Orange Pi 3 board.
The board uses AP6256 WiFi/BT 5.0 chip.
Quoted 8 lines
Summary of changes:
- add more delay to let initialize the chip
- let the kernel detect firmware file path
- add new compatible and update dt-bindings
- update Orange Pi 3 / H6 DTSPlease take a look.
Applied both, thanks!
Maxime