Skip to content

Commit

Permalink
BCM270X_DT: Add at86rf233 overlay
Browse files Browse the repository at this point in the history
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
  • Loading branch information
Phil Elwell authored and ksacilotto committed Jan 7, 2018
1 parent 829bdf0 commit 6ecd4b6
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 4 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 17 additions & 4 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand All @@ -170,6 +171,18 @@ Params: cs SPI bus Chip Select (default 1)
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
Expand Down
54 changes: 54 additions & 0 deletions arch/arm/boot/dts/overlays/at86rf233-overlay.dts
Original file line number Diff line number Diff line change
@@ -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";
};
};

0 comments on commit 6ecd4b6

Please sign in to comment.