Skip to content

Commit

Permalink
overlays: Add overlay for Si446x Transceiver SPI
Browse files Browse the repository at this point in the history
See: #4430

Signed-off-by: Sunip K. Mukherjee <[email protected]>
  • Loading branch information
sunipkm authored and popcornmix committed Sep 15, 2021
1 parent f34dd16 commit 9a2d697
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 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 @@ -176,6 +176,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
seeed-can-fd-hat-v1.dtbo \
seeed-can-fd-hat-v2.dtbo \
sh1106-spi.dtbo \
si446x-spi0.dtbo \
smi.dtbo \
smi-dev.dtbo \
smi-nand.dtbo \
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -2733,6 +2733,16 @@ Params: speed SPI bus speed (default 4000000)
height Display height (32 or 64; default 64)


Name: si446x-spi0
Info: Overlay for Si446x UHF Transceiver via SPI using si446x driver.
The driver is currently out-of-tree at
https://github.com/sunipkmukherjee/silabs.git
Load: dtoverlay=si446x-spi0,<param>=<val>
Params: speed SPI bus speed (default 4000000)
int_pin GPIO pin for interrupts (default 17)
reset_pin GPIO pin for RESET (default 27)


Name: smi
Info: Enables the Secondary Memory Interface peripheral. Uses GPIOs 2-25!
Load: dtoverlay=smi
Expand Down
53 changes: 53 additions & 0 deletions arch/arm/boot/dts/overlays/si446x-spi0-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Overlay for the SiLabs Si446X Controller - SPI0
// Default Interrupt Pin: 17
// Default SDN Pin: 27
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835";

fragment@0 {
target = <&spi0>;
__overlay__ {
// needed to avoid dtc warning
#address-cells = <1>;
#size-cells = <0>;

status = "okay";

uhf0: si446x@0{
compatible = "silabs,si446x";
reg = <0>; // CE0
pinctrl-names = "default";
pinctrl-0 = <&uhf0_pins>;
interrupt-parent = <&gpio>;
interrupts = <17 0x2>; // falling edge
spi-max-frequency = <4000000>;
sdn_pin = <27>;
irq_pin = <17>;
status = "okay";
};
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
uhf0_pins: uhf0_pins {
brcm,pins = <17 27>;
brcm,function = <0 1>; // in, out
brcm,pull = <2 0>; // high, none
};
};
};

__overrides__ {
int_pin = <&uhf0>, "interrupts:0",
<&uhf0>, "irq_pin:0",
<&uhf0_pins>, "brcm,pins:0";
reset_pin = <&uhf0>, "sdn_pin:0",
<&uhf0_pins>, "brcm,pins:4";
speed = <&uhf0>, "spi-max-frequency:0";
};
};

0 comments on commit 9a2d697

Please sign in to comment.