HCL:Chistera Pi

Jump to: navigation, search

The SnootLab Chistera Pi is a Raspberry Pi B+ header compatible Hat.

Technical data

  • HopeRF RFM95W LoRa module (SPI CS0)
    • Semtech SX1276 LoRa transceiver
  • HopeRF RFM22B module (SPI CS1)
    • Silicon Labs Si443x ISM transceiver

Setup

Raspberry Pi 3

The quickest way is to write a U-Boot script.

First load the .dtb:

load mmc 0:2 $fdt_addr_r boot/dtb/broadcom/$fdtfile
fdt addr $fdt_addr_r

Note: With U-Boot v2017.03 and later it is just boot/dtb/$fdtfile.

Enable SPI nodes, add a pinctrl node and add spidev nodes:

setenv gpio /soc/gpio@7e200000
setenv spi0 /soc/spi@7e204000
setenv spi1 /soc/spi@7e215080

fdt set /aliases spi0 "${spi0}"
fdt set /aliases spi1 "${spi1}"

fdt mknode ${gpio} spi0
fdt set ${gpio}/spi0 brcm,pins "<7 8 9 10 11>"
fdt set ${gpio}/spi0 brcm,function "<4>"
fdt set ${gpio}/spi0 phandle "<0x424202>"

fdt set ${spi0} status okay
fdt set ${spi0} pinctrl-names "default"
fdt set ${spi0} pinctrl-0 "<0x424202>"

# RFM95W
fdt mknode ${spi0} spidev@0
fdt set ${spi0}/spidev@0 compatible "spidev"
fdt set ${spi0}/spidev@0 reg "<0>"
fdt set ${spi0}/spidev@0 spi-max-frequency "<500000>"

# RFM22B
fdt mknode ${spi0} spidev@1
fdt set ${spi0}/spidev@1 compatible "spidev"
fdt set ${spi0}/spidev@1 reg "<1>"
fdt set ${spi0}/spidev@1 spi-max-frequency "<500000>"

Finally boot:

load mmc 0:1 $kernel_addr_r EFI/BOOT/bootaa64.efi
bootefi $kernel_addr_r $fdt_addr_r

Note that when using spidev as above you may see scary kernel warnings. Just ignore them.

As alternative to spidev, an experimental SPI driver for "semtech,sx1276" is available.

Raspberry Pi 2

TBD

Raspberry Pi

TBD

See also