| * Smarthome-Wolf Pi433 - a 433MHz radio module/shield for Raspberry Pi (see www.pi433.de) |
| |
| Required properties: |
| - compatible: must be "Smarthome-Wolf,pi433" |
| - reg: chip select of SPI Interface |
| - DIOx-gpio must be dedicated to the GPIO, connected with DIOx of the RFM69 module |
| |
| |
| Example: |
| |
| With the following lines in gpio-section, the gpio pins, connected with pi433 are |
| reserved/declared. |
| |
| &gpio{ |
| [...] |
| |
| pi433_pins: pi433_pins { |
| brcm,pins = <7 25 24>; |
| brcm,function = <0 0 0>; // in in in |
| }; |
| |
| [...] |
| } |
| |
| With the following lines in spi section, the device pi433 is declared. |
| It consists of the three gpio pins and an spi interface (here chip select 0) |
| |
| &spi0{ |
| [...] |
| |
| pi433: pi433@0 { |
| compatible = "Smarthome-Wolf,pi433"; |
| reg = <0>; /* CE 0 */ |
| #address-cells = <1>; |
| #size-cells = <0>; |
| spi-max-frequency = <10000000>; |
| |
| pinctrl-0 = <&pi433_pins>; |
| DIO0-gpio = <&gpio 24 0>; |
| DIO1-gpio = <&gpio 25 0>; |
| DIO2-gpio = <&gpio 7 0>; |
| }; |
| } |
| |
| |
| |
| For Raspbian users only |
| ======================= |
| Since Raspbian supports device tree overlays, you may use and overlay, instead |
| of editing your boards device tree. |
| For using the overlay, you need to compile the file pi433-overlay.dts you can |
| find aside to this documentation. |
| The file needs to be compiled - either manually or by integration in your kernel |
| source tree. For a manual compile, you may use a command line like the following: |
| 'linux/scripts/dtc/dtc -@ -I dts -O dtb -o pi433.dtbo pi433-overlay.dts' |
| |
| For compiling inside of the kernel tree, you need to copy pi433-overlay.dts to |
| arch/arm/boot/dts/overlays and you need to add the file to the list of files |
| in the Makefile over there. Execute 'make dtbs' in kernel tree root to make the |
| kernel make files compile the device tree overlay for you. |
| |
| |