Coder Social home page Coder Social logo

karabek / sunxi-dt-overlays Goto Github PK

View Code? Open in Web Editor NEW

This project forked from armbian/sunxi-dt-overlays

0.0 0.0 0.0 166 KB

Device Tree overlays for sunxi devices running Armbian images with mainline kernel

License: GNU General Public License v3.0

sunxi-dt-overlays's Introduction

Device Tree overlays for sunxi devices

Version

As of now overlays in this repository should work with the kernel version 5.0.x. They may need changes/adjustments to work on older versions and eventually they will be updated to newer kernel versions.

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.

sunxi-dt-overlays's People

Contributors

zador-blood-stained avatar martinayotte avatar dpavlin avatar selfbg avatar waterbywind avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.