202-dt-sun7i-add-bluetooth-to-cubietruck.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. From c6e2b7dad39a7887f935458d1c8de84db06243e1 Mon Sep 17 00:00:00 2001
  2. From: Chen-Yu Tsai <wens@csie.org>
  3. Date: Thu, 26 Dec 2013 17:15:47 +0800
  4. Subject: [PATCH] ARM: dts: sun7i: add bluetooth module to CubieTruck DTS
  5. The CubieTruck has an AMPAK AP6210 WiFi+Bluetooth module. The
  6. Bluetooth part is a BCM20710 IC connected to UART2 in the A20
  7. SoC. The IC also takes a 32.768 KHz low power clock input, a power
  8. enable signal and a wake signal via GPIO.
  9. The Bluetooth module supports out-of-band interrupt signaling via
  10. GPIO, but this is not supported in this patch.
  11. ---
  12. arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 36 ++++++++++++++++++++++++++++++
  13. 1 file changed, 36 insertions(+)
  14. --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
  15. +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
  16. @@ -88,6 +88,20 @@
  17. interrupts = <10 8>; /* PH10 / EINT10 */
  18. interrupt-names = "host-wake";
  19. };
  20. +
  21. + bt_pwr_pin: bt_pwr_pin@0 {
  22. + allwinner,pins = "PH18";
  23. + allwinner,function = "gpio_out";
  24. + allwinner,drive = <0>;
  25. + allwinner,pull = <0>;
  26. + };
  27. +
  28. + bt_wake_pin: bt_wake_pin@0 {
  29. + allwinner,pins = "PH24";
  30. + allwinner,function = "gpio_out";
  31. + allwinner,drive = <0>;
  32. + allwinner,pull = <0>;
  33. + };
  34. };
  35. usbphy: phy@01c13400 {
  36. @@ -171,6 +185,12 @@
  37. status = "okay";
  38. };
  39. + uart2: serial@01c28800 {
  40. + pinctrl-names = "default";
  41. + pinctrl-0 = <&uart2_pins_a>;
  42. + status = "okay";
  43. + };
  44. +
  45. i2c0: i2c@01c2ac00 {
  46. pinctrl-names = "default";
  47. pinctrl-0 = <&i2c0_pins_a>;
  48. @@ -264,6 +284,22 @@
  49. enable-active-high;
  50. gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>;
  51. };
  52. +
  53. + rfkill-switches {
  54. + compatible = "simple-bus";
  55. + pinctrl-names = "default";
  56. +
  57. + rfkill_bt {
  58. + compatible = "rfkill-gpio";
  59. + pinctrl-0 = <&bt_pwr_pin>, <&clk_out_a_pins_a>;
  60. + rfkill-name = "bt";
  61. + rfkill-type = <2>;
  62. + bt_shutdown-gpios = <0>, <&pio 7 18 0>; /* PH18 */
  63. + bt_reset-gpios = <&pio 7 24 0>; /* PH24 */
  64. + clocks = <&clk_out_a>;
  65. + clock-frequency = <32768>;
  66. + };
  67. + };
  68. };
  69. #include "axp209.dtsi"