For more information about Linux device tree overlays on the Raspberry Pi, see https://www.raspberrypi.org/documentation/configuration/device-tree.md.
The device tree overlay enables the following hardware on the Pi-puck board:
- System LEDs
- Shutdown button (optional)
- UART/Bluetooth modifications (optional)
- I2C switch
- On-board I2C bus
- ADC
- Battery level inputs
- External ADC channels (optional on kernel < 5.4)
- ADC
- e-puck I2C bus
- Sensor board I2C buses (x6)
- On-board I2C bus
- Software I2C (optional)
- Audio output
- I2S microphone input
A compiled copy of the device tree overlay (pi-puck.dtbo
) is included . To recompile, use the following:
dtc -@ -I dts -O dtb -W no-unit_address_vs_reg -o pi-puck.dtbo pi-puck.dts
The .dtbo
file should then be copied to /boot/overlays/
on the Raspberry Pi.
To enable the overlay and other GPIO options necessary for booting the Pi-puck, copy pi-puck-config.txt
to /boot/
on the Raspberry Pi, and add the following to the end of /boot/config.txt
:
[all]
include pi-puck-config.txt
The device tree overlay allows certain features to be enabled, disabled or customised through parameters specified in pi-puck-config.txt
.
shutdown_key_disable
disables using the aux on button as a Linux power key at a kernel level, allowing for scripts to use this button instead.shutdown_key_debounce
sets up the debounce interval for the power button, effectively allowing a delay before shutdown is triggered (default1000
, value in milliseconds).bluetooth_disable
disables Raspberry Pi Bluetooth and instead switches the Pi-puck UART to the PL011 controller. This is the same as usingdtoverlay=pi3-disable-bt
- see Raspberry Pi UART documentation.ain2
/ain3
orain2_soft_i2c
/ain3_soft_i2c
enables the external AIN2/AIN3 inputs to the ADC (on kernel < 5.4) (use_soft_i2c
variants if also usingsoft_i2c
).ain2_gain
/ain3_gain
sets the gain for the AIN2/AIN3 channels of the ADC (on kernel < 5.4) (see ads1015 documentation for values) (default2
).ain2_datarate
/ain3_datarate
sets the data rate for the AIN2/AIN3 channels of the ADC (on kernel < 5.4) (see ads1015 documentation for values) (default4
).soft_i2c
disables the hardware I2C controller and enables a software I2C driver in its place. This can be useful for certain I2C devices that have timing issues, but causes additional CPU load when using I2C communication.soft_i2c_gpio_delay_us
specifies the delay between GPIO operations (see i2c-gpio documentation) (default2
).