Skip to content

Commit

Permalink
TinkerBoard: enable bluetooth
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwiboo committed Jun 18, 2017
1 parent 99bfab8 commit e4af07d
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projects/Rockchip/devices/TinkerBoard/README.md
Expand Up @@ -26,7 +26,7 @@ This is an experimental project for the ASUS Tinker Board
* [x] scale video correctly
* [x] fix memory leak
* [x] WiFi
* [ ] Bluetooth
* [x] Bluetooth
* [ ] ~~CEC~~

**Known Issues/Limitations**
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,14 @@
[Unit]
Description=Load rtl8723b_bt firmware on /dev/ttyS0
Wants=bluetooth.service
Before=bluetooth.service
After=dev-ttyS0.device

[Service]
Type=simple
ExecStartPre=/usr/sbin/rfkill unblock bluetooth
ExecStart=/usr/bin/rtk_hciattach -n -s 115200 ttyS0 rtk_h5
ExecStopPost=/usr/sbin/rfkill block bluetooth

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion projects/Rockchip/devices/TinkerBoard/options
Expand Up @@ -117,7 +117,7 @@
# for a list of additinoal drivers see packages/linux-drivers
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
ADDITIONAL_DRIVERS=""
ADDITIONAL_DRIVERS="rfkill"

# Start boot partition at 16MiB, same as https://github.com/rockchip-linux/build images
SYSTEM_PART_START=32768
@@ -0,0 +1,83 @@
From 7350120a3fdcd2d84ee3441eccabb41630b40984 Mon Sep 17 00:00:00 2001
From: Jonas Karlman <jonas@kwiboo.se>
Date: Sun, 18 Jun 2017 16:56:35 +0200
Subject: [PATCH] rk3288-miniarm: enable bluetooth

---
arch/arm/boot/dts/rk3288-miniarm.dts | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288-miniarm.dts b/arch/arm/boot/dts/rk3288-miniarm.dts
index 98a4d3d215d4..908bd503aaa9 100644
--- a/arch/arm/boot/dts/rk3288-miniarm.dts
+++ b/arch/arm/boot/dts/rk3288-miniarm.dts
@@ -49,6 +49,18 @@
reg = <0x0 0x80000000>;
};

+ wireless-bluetooth {
+ compatible = "bluetooth-platdata";
+ uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default","rts_gpio";
+ pinctrl-0 = <&uart0_rts>;
+ pinctrl-1 = <&uart0_gpios>;
+ BT,reset_gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
+ BT,wake_gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
+ BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
wireless-wlan {
compatible = "wlan-platdata";
rockchip,grf = <&grf>;
@@ -70,7 +82,7 @@
clocks = <&rk808 1>;
clock-names = "ext_clock";
pinctrl-names = "default";
- pinctrl-0 = <&wifi_enable_h>;
+ pinctrl-0 = <&chip_enable_h>, <&wifi_enable_h>;

/*
* On the module itself this is one of these (depending
@@ -78,7 +90,7 @@
* - SDIO_RESET_L_WL_REG_ON
* - PDN (power down when low)
*/
- reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>, <&gpio4 27 GPIO_ACTIVE_LOW>;
};

gpio-keys {
@@ -471,6 +483,8 @@
};

&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>;
status = "okay";
};

@@ -581,6 +595,9 @@
wifi_enable_h: wifi-enable-h {
rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
};
+ chip_enable_h: chip-enable-h {
+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
};

sdmmc {
@@ -617,4 +634,10 @@
rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ wireless-bluetooth {
+ uart0_gpios: uart0-gpios {
+ rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};
--
2.13.0

0 comments on commit e4af07d

Please sign in to comment.