Linux-libre 5.7.6-gnu
[librecmc/linux-libre.git] / drivers / staging / pi433 / Documentation / devicetree / pi433.txt
1 * Smarthome-Wolf Pi433 - a 433MHz radio module/shield for Raspberry Pi (see www.pi433.de)
2
3 Required properties:
4 - compatible: must be "Smarthome-Wolf,pi433"
5 - reg: chip select of SPI Interface
6 - DIOx-gpio must be dedicated to the GPIO, connected with DIOx of the RFM69 module
7
8
9 Example:
10
11 With the following lines in gpio-section, the gpio pins, connected with pi433 are
12 reserved/declared.
13
14 &gpio{
15         [...]
16
17         pi433_pins: pi433_pins {
18                 brcm,pins = <7 25 24>;
19                 brcm,function = <0 0 0>; // in in in
20         };
21
22         [...]
23 }
24
25 With the following lines in spi section, the device pi433 is declared.
26 It consists of the three gpio pins and an spi interface (here chip select 0)
27
28 &spi0{
29         [...]
30
31         pi433: pi433@0 {
32                 compatible = "Smarthome-Wolf,pi433";
33                 reg = <0>; /* CE 0 */
34                 #address-cells = <1>;
35                 #size-cells = <0>;
36                 spi-max-frequency = <10000000>;
37
38                 pinctrl-0 = <&pi433_pins>;
39                 DIO0-gpio = <&gpio 24 0>;
40                 DIO1-gpio = <&gpio 25 0>;
41                 DIO2-gpio = <&gpio  7 0>;
42         };
43 }
44
45
46
47 For Raspbian users only
48 =======================
49 Since Raspbian supports device tree overlays, you may use an overlay instead
50 of editing your boards device tree.
51 To use the overlay, you need to compile the file pi433-overlay.dts which can
52 be found alongside this documentation.
53 The file needs to be compiled - either manually or by integration in your kernel
54 source tree. For a manual compile, you may use a command line like the following:
55 'linux/scripts/dtc/dtc -@ -I dts -O dtb -o pi433.dtbo pi433-overlay.dts'
56
57 For compiling inside of the kernel tree, you need to copy pi433-overlay.dts to
58 arch/arm/boot/dts/overlays and you need to add the file to the list of files
59 in the Makefile over there. Execute 'make dtbs' in kernel tree root to make the
60 kernel make files compile the device tree overlay for you.
61
62