====== GSoC 2024: Device tree bindings ====== [[:gsoc:google-summer-code-2024|Main GSoC Linux Foundation page: How to apply, deadlines, other workgroups, ...]] ====== Device tree ====== Device tree is a tree structured data describes devices on a board. This is used by operating system's kernel in order to manage a computer hardware components including cpus, buses and external peripherals. ===== Device tree bindings ===== A device tree bindings file offers information about the properties supported by Linux kernel device tree blob. Location for this documents is under ''Documentation/devicetree/bindings/''. ==== Proposal 1: Convert device tree bindings to DT schema ==== 1 contributor medium-size (175hours) Level of difficulty: Intermediate Historically device tree bindings were written in plain ''.txt'' files. These files serve only as documentation but they cannot really be used to validate the syntax used in device tree files. In order to improve validation of dts files, Linux kernel switched to writing device tree bindings using [[ https://www.kernel.org/doc/Documentation/devicetree/writing-schema.rst | json-schema]]. The goal of the project is to convert as much ''.txt'' files into ''.yaml'' json-schema files. '' $ linux/Documentation/devicetree/bindings$ find . -name '*.txt' | wc -l 1795 '' You can have a look at this [[https://lore.kernel.org/lkml/20230211134755.86061-1-krzysztof.kozlowski@linaro.org/T/ | example ]] of a conversion patch looks like. Before writing your proposal you need to: - Watch this [[https://www.youtube.com/watch?v=JrwZ4xLBU38|presentation]] from Krzysztof and get a feel of the work should be done in the project. - Write an email to project Mentor announcing your intention to work on the proposal. - Create a small patch that converts a device tree binding ''.txt'' file to ''yaml'' How to create a small patch? - clone the Linux kernel tree: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/ - look inside ''Documentation/devicetree/bindings'' * start with small and simple ''.txt'' file and convert it to yaml * discuss with your mentor about your chosen file and after that start working on the patch - Watch again the [[https://www.youtube.com/watch?v=JrwZ4xLBU38|presentation]] and read about how to create your first [[ http://nickdesaulniers.github.io/blog/2017/05/16/submitting-your-first-patch-to-the-linux-kernel-and-responding-to-feedback/ | patch ]]. - Review patch your mentor by email first and after that send it to community - Always verify your patch before submitting for review * make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/trivial-devices.yaml * make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/trivial-devices.yaml * make DT_CHECKER_FLAGS=-m dt_binding_check Desired knowledge: C, shell scripting, make, git Code license: GPL-2.0-only OR BSD-2-Clause The project is considered successful if the code is accepted into mainline Linux kernel tree. Mentor: Daniel Baluta