Category:Dtb

From ElectroDragon Wiki

Example

Dts example.png
/{                                  //根节点
    node1{                          //node1是节点名,是/的子节点
        key=value;                  //node1的属性
        ...
        node2{                      //node2是node1的子节点
            key=value;              //node2的属性
            ...
        }
    }                               //node1的描述到此为止
    node3{
        key=value;
        ...
    }
}


Check

  • /sys/firmware/devicetree


DTS

Config device tree file

  • Config device tree file , no need change default: nano arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
for SPI Flash, add node
&spi0 {
       status ="okay";
       mx25l25635e:mx25l25635e@0 {
               compatible = "jedec,spi-nor";
               reg = <0x0>;
               spi-max-frequency = <50000000>;
               #address-cells = <1>;
               #size-cells = <1>;
       };
};

Compile

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 INSTALL_MOD_PATH=out modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 INSTALL_MOD_PATH=out modules_install

Or

kernel -> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
devie three compiler -> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs


DTS

  • make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4

Peripheral Use

  • UART
  • PWM
  • IIC
  • Codec
  • Ethernet


REF

This category currently contains no pages or media.