232-1-dt-sun7i-add-wifi-to-cubietruck.patch 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. From 3e7fc7d394db0783996519f2d5affde5152a628e Mon Sep 17 00:00:00 2001
  2. From: Chen-Yu Tsai <wens@csie.org>
  3. Date: Thu, 26 Dec 2013 17:14:33 +0800
  4. Subject: [PATCH] ARM: dts: sun7i: add WiFi module to Cubietruck DTS
  5. The CubieTruck has an AMPAK AP6210 WiFi+Bluetooth module. The WiFi
  6. part is a BCM43362 IC connected to MMC2 in the A20 SoC via SDIO.
  7. The IC also takes a 32.768 KHz low power clock input, and a power
  8. enable signal via GPIO.
  9. The WiFi module supports out-of-band interrupt signaling via GPIO,
  10. but this is not supported in this patch.
  11. ---
  12. arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 47 ++++++++++++++++++++++++++++++
  13. 1 file changed, 47 insertions(+)
  14. --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
  15. +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
  16. @@ -28,6 +28,23 @@
  17. status = "okay";
  18. };
  19. + mmc3: mmc@01c12000 {
  20. + pinctrl-names = "default", "default";
  21. + pinctrl-0 = <&mmc3_pins_a>;
  22. + pinctrl-1 = <&wifi_host_wake_pin>;
  23. + vmmc-supply = <&reg_vmmc3>;
  24. + non-removable;
  25. + status = "okay";
  26. +
  27. + brcmf: bcrmf@0 {
  28. + /* out of band interrupt not working */
  29. + /* compatible = "broadcom,bcm43362"; */
  30. + interrupt-parent = <&pio>;
  31. + interrupts = <10 2>; /* EINT10 */
  32. + status = "okay";
  33. + };
  34. + };
  35. +
  36. usbphy: phy@01c13400 {
  37. usb1_vbus-supply = <&reg_usb1_vbus>;
  38. usb2_vbus-supply = <&reg_usb2_vbus>;
  39. @@ -56,6 +73,18 @@
  40. };
  41. pinctrl@01c20800 {
  42. + mmc3_pins_a: mmc3@0 {
  43. + /* AP6210 requires pull-up */
  44. + allwinner,pull = <1>;
  45. + };
  46. +
  47. + vmmc3_pin_cubietruck: vmmc3_pin@0 {
  48. + allwinner,pins = "PH9";
  49. + allwinner,function = "gpio_out";
  50. + allwinner,drive = <0>;
  51. + allwinner,pull = <0>;
  52. + };
  53. +
  54. ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
  55. allwinner,pins = "PH12";
  56. allwinner,function = "gpio_out";
  57. @@ -99,6 +128,13 @@
  58. /include/ "x-powers-axp209.dtsi"
  59. };
  60. +
  61. + wifi_host_wake_pin: wifi_host_wake_pin@0 {
  62. + allwinner,pins = "PH10";
  63. + allwinner,function = "gpio_in";
  64. + allwinner,drive = <0>;
  65. + allwinner,pull = <0>;
  66. + };
  67. };
  68. i2c0: i2c@01c2ac00 {
  69. @@ -189,4 +225,15 @@
  70. reg_usb2_vbus: usb2-vbus {
  71. status = "okay";
  72. };
  73. +
  74. + reg_vmmc3: vmmc3 {
  75. + compatible = "regulator-fixed";
  76. + pinctrl-names = "default";
  77. + pinctrl-0 = <&vmmc3_pin_cubietruck>;
  78. + regulator-name = "vmmc3";
  79. + regulator-min-microvolt = <3300000>;
  80. + regulator-max-microvolt = <3300000>;
  81. + enable-active-high;
  82. + gpio = <&pio 7 9 0>;
  83. + };
  84. };