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