Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| proper_device_tree_design [2018/11/18 10:28] – created rpjday | proper_device_tree_design [2018/11/18 10:46] (current) – [imx6ul-tx6ul-mainboard.dts] rpjday | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| * '' | * '' | ||
| + | ===== Proper use of .dtsi files ===== | ||
| + | There is **//no reason//** to make local copies of kernel-supplied '' | ||
| + | |||
| + | * ''/ | ||
| + | * ''/ | ||
| + | |||
| + | This functionality was introduced into the Linux kernel file '' | ||
| + | |||
| + | < | ||
| + | commit cd296721a9645f9f28800a072490fa15458d1fb7 | ||
| + | Author: Stephen Warren < | ||
| + | Date: Fri Sep 28 21:25:59 2012 +0000 | ||
| + | |||
| + | dtc: import latest upstream dtc | ||
| + | | ||
| + | This updates scripts/dtc to commit 317a5d9 "dtc: zero out new label | ||
| + | objects" | ||
| + | | ||
| + | This adds features such as: | ||
| + | * /bits/ syntax for cell data. | ||
| + | * Math expressions within cell data. | ||
| + | * The ability to delete properties or nodes. | ||
| + | * Support for #line directives in the input file, which allows the use of | ||
| + | cpp on *.dts. | ||
| + | * -i command-line option (/include/ path) | ||
| + | * -W/-E command-line options for error/ | ||
| + | * Removal of spew to STDOUT containing the filename being compiled. | ||
| + | * Many additions to the libfdt API. | ||
| + | | ||
| + | Signed-off-by: | ||
| + | Acked-by: Jon Loeliger < | ||
| + | Signed-off-by: | ||
| + | </ | ||
| + | |||
| + | Examples can be seen [[https:// | ||
| + | |||
| + | ===== Examples of / | ||
| + | |||
| + | ==== imx6dl-tx6s-8034.dts ==== | ||
| + | |||
| + | < | ||
| + | #include " | ||
| + | #include " | ||
| + | |||
| + | / { | ||
| + | model = "Ka-Ro electronics TX6S-8034 Module"; | ||
| + | compatible = " | ||
| + | |||
| + | aliases { | ||
| + | display = & | ||
| + | ipu1 = &ipu1; | ||
| + | }; | ||
| + | |||
| + | cpus { | ||
| + | / | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | ==== imx6q-utilite-pro.dts ==== | ||
| + | |||
| + | < | ||
| + | #include < | ||
| + | #include " | ||
| + | |||
| + | / { | ||
| + | model = " | ||
| + | compatible = " | ||
| + | | ||
| + | ... | ||
| + | |||
| + | }; | ||
| + | |||
| + | /* | ||
| + | * A single IPU is not able to drive both display interfaces available on the | ||
| + | * Utilite Pro at high resolution due to its bandwidth limitation. Since the | ||
| + | * tfp410 encoder is wired up to IPU1, sever the link between IPU1 and the | ||
| + | * SoC-internal Designware HDMI encoder forcing the latter to be connected to | ||
| + | * IPU2 instead of IPU1. | ||
| + | */ | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== Examples of / | ||
| + | |||
| + | ==== imx6qp.dtsi ==== | ||
| + | |||
| + | < | ||
| + | #include " | ||
| + | |||
| + | / { | ||
| + | soc { | ||
| + | | ||
| + | ... | ||
| + | | ||
| + | }; | ||
| + | |||
| + | &fec { | ||
| + | / | ||
| + | interrupts = <0 118 IRQ_TYPE_LEVEL_HIGH>, | ||
| + | <0 119 IRQ_TYPE_LEVEL_HIGH>; | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | ==== imx6ul-tx6ul-mainboard.dts ==== | ||
| + | |||
| + | < | ||
| + | #include " | ||
| + | #include " | ||
| + | |||
| + | / { | ||
| + | model = "Ka-Ro electronics TXUL-0010 Module on TXUL Mainboard"; | ||
| + | compatible = " | ||
| + | |||
| + | aliases { | ||
| + | lcdif_24bit_pins_a = & | ||
| + | mmc0 = & | ||
| + | / | ||
| + | serial2 = &uart3; | ||
| + | serial4 = &uart5; | ||
| + | }; | ||
| + | / | ||
| + | }; | ||
| + | |||
| + | ... | ||
| + | |||
| + | &usdhc1 { | ||
| + | pinctrl-0 = <& | ||
| + | non-removable; | ||
| + | / | ||
| + | cap-sdio-irq; | ||
| + | }; | ||
| + | |||
| + | &uart1 { | ||
| + | pinctrl-0 = <& | ||
| + | / | ||
| + | }; | ||
| + | |||
| + | &uart2 { | ||
| + | pinctrl-0 = <& | ||
| + | / | ||
| + | status = " | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | ==== imx6ulz.dtsi ==== | ||
| + | |||
| + | < | ||
| + | #include " | ||
| + | |||
| + | / { | ||
| + | aliases { | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | }; | ||
| + | }; | ||
| + | |||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||