0110-BCM270X_DT-Add-at86rf233-overlay.patch 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. From 7a9f95c67cbfc0975e1109b904ad03e061fb6877 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Mon, 5 Oct 2015 10:47:45 +0100
  4. Subject: [PATCH 110/381] BCM270X_DT: Add at86rf233 overlay
  5. Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.
  6. See: https://github.com/raspberrypi/linux/issues/1151
  7. ---
  8. arch/arm/boot/dts/overlays/Makefile | 1 +
  9. arch/arm/boot/dts/overlays/README | 21 +++++++--
  10. arch/arm/boot/dts/overlays/at86rf233-overlay.dts | 54 ++++++++++++++++++++++++
  11. 3 files changed, 72 insertions(+), 4 deletions(-)
  12. create mode 100644 arch/arm/boot/dts/overlays/at86rf233-overlay.dts
  13. --- a/arch/arm/boot/dts/overlays/Makefile
  14. +++ b/arch/arm/boot/dts/overlays/Makefile
  15. @@ -13,6 +13,7 @@ ifeq ($(CONFIG_ARCH_BCM2835),y)
  16. endif
  17. dtb-$(RPI_DT_OVERLAYS) += ads7846-overlay.dtb
  18. +dtb-$(RPI_DT_OVERLAYS) += at86rf233-overlay.dtb
  19. dtb-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor-overlay.dtb
  20. dtb-$(RPI_DT_OVERLAYS) += dht11-overlay.dtb
  21. dtb-$(RPI_DT_OVERLAYS) += enc28j60-overlay.dtb
  22. --- a/arch/arm/boot/dts/overlays/README
  23. +++ b/arch/arm/boot/dts/overlays/README
  24. @@ -69,13 +69,14 @@ DT parameters:
  25. Parameters always have default values, although in some cases (e.g. "w1-gpio")
  26. it is necessary to provided multiple overlays in order to get the desired
  27. -behaviour. See the list of overlays below for a description of the parameters and their defaults.
  28. +behaviour. See the list of overlays below for a description of the parameters
  29. +and their defaults.
  30. The Overlay and Parameter Reference
  31. ===================================
  32. -N.B. When editing this file, please preserve the indentation levels to make it simple to parse
  33. -programmatically. NO HARD TABS.
  34. +N.B. When editing this file, please preserve the indentation levels to make it
  35. +simple to parse programmatically. NO HARD TABS.
  36. Name: <The base DTB>
  37. @@ -149,7 +150,7 @@ Name: ads7846
  38. Info: ADS7846 Touch controller
  39. Load: dtoverlay=ads7846,<param>=<val>
  40. Params: cs SPI bus Chip Select (default 1)
  41. - speed SPI bus speed (default 2Mhz, max 3.25MHz)
  42. + speed SPI bus speed (default 2MHz, max 3.25MHz)
  43. penirq GPIO used for PENIRQ. REQUIRED
  44. penirq_pull Set GPIO pull (default 0=none, 2=pullup)
  45. swapxy Swap x and y axis
  46. @@ -170,6 +171,18 @@ Params: cs SPI bus
  47. www.kernel.org/doc/Documentation/devicetree/bindings/input/ads7846.txt
  48. +Name: at86rf233
  49. +Info: Configures the Atmel AT86RF233 802.15.4 low-power WPAN transceiver,
  50. + connected to spi0.0
  51. +Load: dtoverlay=at86rf233,<param>=<val>
  52. +Params: interrupt GPIO used for INT (default 23)
  53. + reset GPIO used for Reset (default 24)
  54. + sleep GPIO used for Sleep (default 25)
  55. + speed SPI bus speed in Hz (default 6000000)
  56. + trim Fine tuning of the internal capacitance
  57. + arrays (0=+0pF, 15=+4.5pF, default 15)
  58. +
  59. +
  60. Name: bmp085_i2c-sensor
  61. Info: Configures the BMP085/BMP180 digital barometric pressure and temperature
  62. sensors from Bosch Sensortec
  63. --- /dev/null
  64. +++ b/arch/arm/boot/dts/overlays/at86rf233-overlay.dts
  65. @@ -0,0 +1,54 @@
  66. +/dts-v1/;
  67. +/plugin/;
  68. +
  69. +/* Overlay for Atmel AT86RF233 IEEE 802.15.4 WPAN transceiver on spi0.0 */
  70. +
  71. +/ {
  72. + compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
  73. +
  74. + fragment@0 {
  75. + target = <&spi0>;
  76. + __overlay__ {
  77. + #address-cells = <1>;
  78. + #size-cells = <0>;
  79. +
  80. + status = "okay";
  81. +
  82. + spidev@0{
  83. + status = "disabled";
  84. + };
  85. +
  86. + lowpan0: at86rf233@0 {
  87. + compatible = "atmel,at86rf233";
  88. + reg = <0>;
  89. + interrupt-parent = <&gpio>;
  90. + interrupts = <23 4>; /* active high */
  91. + reset-gpio = <&gpio 24 1>;
  92. + sleep-gpio = <&gpio 25 1>;
  93. + spi-max-frequency = <6000000>;
  94. + xtal-trim = /bits/ 8 <0xf>;
  95. + };
  96. + };
  97. + };
  98. +
  99. + fragment@1 {
  100. + target = <&gpio>;
  101. + __overlay__ {
  102. + lowpan0_pins: lowpan0_pins {
  103. + brcm,pins = <23 24 25>;
  104. + brcm,function = <0 1 1>; /* in out out */
  105. + };
  106. + };
  107. + };
  108. +
  109. + __overrides__ {
  110. + interrupt = <&lowpan0>, "interrupts:0",
  111. + <&lowpan0_pins>, "brcm,pins:0";
  112. + reset = <&lowpan0>, "reset-gpio:4",
  113. + <&lowpan0_pins>, "brcm,pins:4";
  114. + sleep = <&lowpan0>, "sleep-gpio:4",
  115. + <&lowpan0_pins>, "brcm,pins:8";
  116. + speed = <&lowpan0>, "spi-max-frequency:0";
  117. + trim = <&lowpan0>, "xtal-trim.0";
  118. + };
  119. +};