0201-Add-overlay-and-enable-support-for-QCA7000-board.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. From ff63e16281a582d4ead28c797b10167515fd9898 Mon Sep 17 00:00:00 2001
  2. From: Michael Heimpold <michael.heimpold@i2se.com>
  3. Date: Fri, 29 Jan 2016 12:00:37 +0100
  4. Subject: [PATCH 201/381] Add overlay and enable support for QCA7000 board
  5. This adds a device tree overlay for the QCA7000 which can be used
  6. when attaching an I2SE's PLC Stamp micro EVK to the Raspberry Pi.
  7. This Evaluation Board embeds a QCA7000 chip, a Homeplug Green PHY
  8. powerline chip from Qualcomm/Atheros for the Internet of Things.
  9. This patch also enables the required QCA7000 driver module
  10. in the default configurations.
  11. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
  12. Signed-off-by: Michael Heimpold <michael.heimpold@i2se.com>
  13. ---
  14. arch/arm/boot/dts/overlays/Makefile | 1 +
  15. arch/arm/boot/dts/overlays/README | 8 ++++
  16. arch/arm/boot/dts/overlays/qca7000-overlay.dts | 52 ++++++++++++++++++++++++++
  17. arch/arm/configs/bcm2709_defconfig | 1 +
  18. arch/arm/configs/bcmrpi_defconfig | 1 +
  19. 5 files changed, 63 insertions(+)
  20. create mode 100644 arch/arm/boot/dts/overlays/qca7000-overlay.dts
  21. --- a/arch/arm/boot/dts/overlays/Makefile
  22. +++ b/arch/arm/boot/dts/overlays/Makefile
  23. @@ -48,6 +48,7 @@ dtbo-$(RPI_DT_OVERLAYS) += pitft28-resis
  24. dtbo-$(RPI_DT_OVERLAYS) += pps-gpio.dtbo
  25. dtbo-$(RPI_DT_OVERLAYS) += pwm.dtbo
  26. dtbo-$(RPI_DT_OVERLAYS) += pwm-2chan.dtbo
  27. +dtbo-$(RPI_DT_OVERLAYS) += qca7000.dtbo
  28. dtbo-$(RPI_DT_OVERLAYS) += raspidac3.dtbo
  29. dtbo-$(RPI_DT_OVERLAYS) += rpi-backlight.dtbo
  30. dtbo-$(RPI_DT_OVERLAYS) += rpi-dac.dtbo
  31. --- a/arch/arm/boot/dts/overlays/README
  32. +++ b/arch/arm/boot/dts/overlays/README
  33. @@ -625,6 +625,14 @@ Params: pin Output p
  34. clock PWM clock frequency (informational)
  35. +Name: qca7000
  36. +Info: I2SE's Evaluation Board for PLC Stamp micro
  37. +Load: dtoverlay=qca7000,<param>=<val>
  38. +Params: int_pin GPIO pin for interrupt signal (default 23)
  39. +
  40. + speed SPI bus speed (default 12 MHz)
  41. +
  42. +
  43. Name: raspidac3
  44. Info: Configures the RaspiDAV Rev.3x audio card
  45. Load: dtoverlay=raspidac3
  46. --- /dev/null
  47. +++ b/arch/arm/boot/dts/overlays/qca7000-overlay.dts
  48. @@ -0,0 +1,52 @@
  49. +// Overlay for the Qualcomm Atheros QCA7000 on I2SE's PLC Stamp micro EVK
  50. +// Visit: https://www.i2se.com/product/plc-stamp-micro-evk for details
  51. +
  52. +/dts-v1/;
  53. +/plugin/;
  54. +
  55. +/ {
  56. + compatible = "brcm,bcm2708";
  57. +
  58. + fragment@0 {
  59. + target = <&spi0>;
  60. + __overlay__ {
  61. + /* needed to avoid dtc warning */
  62. + #address-cells = <1>;
  63. + #size-cells = <0>;
  64. +
  65. + status = "okay";
  66. +
  67. + spidev@0 {
  68. + status = "disabled";
  69. + };
  70. +
  71. + eth1: qca7000@0 {
  72. + compatible = "qca,qca7000";
  73. + reg = <0>; /* CE0 */
  74. + pinctrl-names = "default";
  75. + pinctrl-0 = <&eth1_pins>;
  76. + interrupt-parent = <&gpio>;
  77. + interrupts = <23 0x1>; /* rising edge */
  78. + spi-max-frequency = <12000000>;
  79. + status = "okay";
  80. + };
  81. + };
  82. + };
  83. +
  84. + fragment@1 {
  85. + target = <&gpio>;
  86. + __overlay__ {
  87. + eth1_pins: eth1_pins {
  88. + brcm,pins = <23>;
  89. + brcm,function = <0>; /* in */
  90. + brcm,pull = <0>; /* none */
  91. + };
  92. + };
  93. + };
  94. +
  95. + __overrides__ {
  96. + int_pin = <&eth1>, "interrupts:0",
  97. + <&eth1_pins>, "brcm,pins:0";
  98. + speed = <&eth1>, "spi-max-frequency:0";
  99. + };
  100. +};
  101. --- a/arch/arm/configs/bcm2709_defconfig
  102. +++ b/arch/arm/configs/bcm2709_defconfig
  103. @@ -446,6 +446,7 @@ CONFIG_NETCONSOLE=m
  104. CONFIG_TUN=m
  105. CONFIG_VETH=m
  106. CONFIG_ENC28J60=m
  107. +CONFIG_QCA7000=m
  108. CONFIG_MDIO_BITBANG=m
  109. CONFIG_PPP=m
  110. CONFIG_PPP_BSDCOMP=m
  111. --- a/arch/arm/configs/bcmrpi_defconfig
  112. +++ b/arch/arm/configs/bcmrpi_defconfig
  113. @@ -439,6 +439,7 @@ CONFIG_NETCONSOLE=m
  114. CONFIG_TUN=m
  115. CONFIG_VETH=m
  116. CONFIG_ENC28J60=m
  117. +CONFIG_QCA7000=m
  118. CONFIG_MDIO_BITBANG=m
  119. CONFIG_PPP=m
  120. CONFIG_PPP_BSDCOMP=m