Dobrica Pavlinušić 77bcc2e63b ina219 device tree overlay (#1)
shunt-resistor is 10 times bigger than default values, and this
corresponds to cheap ebay modules with ina219, but if your current
readings are off, you will have to modify it
2017-10-26 13:35:00 +03:00
2017-10-26 13:35:00 +03:00
2017-10-25 13:09:35 +03:00
2017-05-17 20:26:42 +03:00
2017-03-10 17:13:46 +03:00
2017-06-07 15:32:38 +03:00

Device Tree overlays for sunxi devices

📙 End user documentation

💬 Forum thread for issues and suggestions

Technical info

Requirements
  • mainline u-boot 2017.03 or newer with CONFIG_OF_LIBFDT_OVERLAY enabled
  • latest version of appropriate boot script
  • existing armbianEnv.txt with correct overlay_prefix value
  • Device Tree compiler with overlays support for compiling the overlays

Notes:

  • Older u-boot versions require this patch to fix endiannes of values obtained with fdt get value command
Implementation details

Boot script reads /boot/armbianEnv.txt which may contain following environment variables:

  • overlay_prefix
  • overlays
  • user_overlays
  • overlay specific parameters

Overlay files referenced by overlays and user_overlays variables are loaded and applied using fdt apply command. After applying all overlays a SoC specific fixup script is executed to process overlay specific parameters.

Limitations
  • U-boot fdt command does not support "tuples" values which limits implementing things like GPIO SPI chip selects with variable GPIO pins that require this type of values:
cs-gpios = <0>, <&pio 0 1 0>, <&pio 7 7 0>; /* Native, PA1, PH7 */
  • U-boot does not support overlay parameters, so changing values is implemented via executing a "fixup" script after all overlays were applied. This script uses environment variables loaded from /boot/armbianEnv.txt to change the live tree using fdt command.

  • Since SoCs have multiple controllers of the same type (I2C, SPI) that can be exposed in different combinations on different boards, slave devices (I2C, I2S, SPI, ...) are provided not as ready to use overlays but as examples that require minimal editing to match the used configuration.

Description