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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. @@ -103,6 +103,20 @@
  17. allwinner,drive = <0>;
  18. allwinner,pull = <0>;
  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. pwm: pwm@01c20e00 {
  36. @@ -123,6 +137,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. @@ -214,4 +234,20 @@
  49. enable-active-high;
  50. gpio = <&pio 7 9 0>;
  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. };