Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
litesom:devicetree [2017/02/11 20:45] filug [Available device tree files] |
litesom:devicetree [2017/06/08 07:32] filug [More examples] |
||
---|---|---|---|
Line 107: | Line 107: | ||
</ | </ | ||
< | < | ||
- | Since [[: | + | Since [[: |
</ | </ | ||
Line 290: | Line 290: | ||
object " | object " | ||
object " | object " | ||
- | object " | + | object " |
- | object " | + | object " |
imx6ul <|-- litesom | imx6ul <|-- litesom | ||
litesom <|-- custom1 | litesom <|-- custom1 | ||
Line 311: | Line 311: | ||
===== More examples ===== | ===== More examples ===== | ||
- | On the following pages you can find more examples about //device tree// | + | On the following pages you can find more examples about //device tree// |
- | + | | |
- | ==== end ==== | + | * [[litesom:devicetree:eth|Network interface]], |
- | + | * [[litesom:devicetree:can|CAN inteface]], | |
- | + | * [[litesom:devicetree:spi|SPI Interface]], | |
- | ---- | + | |
- | + | ||
- | FIXME change TX to RX | + | |
- | + | ||
- | Each define name is build with the following syntax ''< | + | |
- | + | ||
- | | ALT function | + | |
- | | ALT0 mux port: UART1_TX | + | |
- | | | MX6UL_PAD_UART1_TX_DATA__UART1_DTE_RX | + | |
- | | ALT1 mux port: ENET1_RDATA02 | MX6UL_PAD_UART1_TX_DATA__ENET1_RDATA02 | + | |
- | | ALT2 mux port: I2C3_SCL | + | |
- | | ALT3 mux port: CSI_DATA02 | + | |
- | | ALT4 mux port: GPT1_COMPARE1 | MX6UL_PAD_UART1_TX_DATA__GPT1_COMPARE1 | + | |
- | | ALT5 mux port: GPIO1_IO16 | + | |
- | | ALT8 mux port: SPDIF_OUT | + | |
- | + | ||
- | Based on all defines from [[https:// | + | |
- | + | ||
- | + | ||
- | + | ||
- | ---- | + | |
- | + | ||
- | + | ||
- | To configure '' | + | |
- | + | ||
- | | + | |
- | + | ||
- | + | ||
- | '' | + | |
- | + | ||
- | '' | + | |
- | + | ||
- | * ALT0 — Select mux mode: ALT0 mux port: UART1_TX of instance: uart1, | + | |
- | * ALT1 — Select mux mode: ALT1 mux port: ENET1_RDATA02 of instance: enet1, | + | |
- | * ALT2 — Select mux mode: ALT2 mux port: I2C3_SCL of instance: i2c3, | + | |
- | * ALT3 — Select mux mode: ALT3 mux port: CSI_DATA02 of instance: csi, | + | |
- | * ALT4 — Select mux mode: ALT4 mux port: GPT1_COMPARE1 of instance: gpt1, | + | |
- | * ALT5 — Select mux mode: ALT5 mux port: GPIO1_IO16 of instance: gpio1, | + | |
- | * ALT8 — Select mux mode: ALT8 mux port: SPDIF_OUT of instance: spdif. | + | |
- | + | ||
- | On [[litesom:liteboard]] we are using this pin as '' | + | |
- | + | ||
- | <columns 100% 50% - -> | + | |
- | < | + | |
- | / { | + | |
- | chosen { | + | |
- | stdout-path = & | + | |
- | }; | + | |
- | }; | + | |
- | + | ||
- | &iomuxc { | + | |
- | pinctrl_uart1: | + | |
- | fsl,pins = < | + | |
- | MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX | + | |
- | MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX | + | |
- | >; | + | |
- | }; | + | |
- | } | + | |
- | + | ||
- | &uart1 { | + | |
- | pinctrl-names = " | + | |
- | pinctrl-0 = <& | + | |
- | status = " | + | |
- | }; | + | |
- | </ | + | |
- | < | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | </ | + | |
- | + | ||
- | [[https:// | + | |
- | + | ||
- | < | + | |
- | #define MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x0084 0x0310 0x0000 0 0 | + | |
- | #define MX6UL_PAD_UART1_TX_DATA__UART1_DTE_RX 0x0084 0x0310 0x0624 0 2 | + | |
- | #define MX6UL_PAD_UART1_TX_DATA__ENET1_RDATA02 0x0084 0x0310 0x0000 1 0 | + | |
- | #define MX6UL_PAD_UART1_TX_DATA__I2C3_SCL 0x0084 0x0310 0x05b4 2 0 | + | |
- | #define MX6UL_PAD_UART1_TX_DATA__CSI_DATA02 0x0084 0x0310 0x04c4 3 1 | + | |
- | #define MX6UL_PAD_UART1_TX_DATA__GPT1_COMPARE1 0x0084 0x0310 0x0000 4 0 | + | |
- | #define MX6UL_PAD_UART1_TX_DATA__GPIO1_IO16 0x0084 0x0310 0x0000 5 0 | + | |
- | #define MX6UL_PAD_UART1_TX_DATA__SPDIF_OUT 0x0084 0x0310 0x0000 8 0 | + | |
- | </ | + | |
- | + | ||
- | * 0x0084 - address of '' | + | |
- | * 0x0310 - address of '' | + | |
- | * 0x0000 - address of '' | + | |
- | * 0 | + | |
- | * 0 | + | |
- | + | ||
- | FIXME change TX to RX | + | |
- | + | ||
- | Each define name is build with the following syntax ''< | + | |
- | + | ||
- | | ALT function | + | |
- | | ALT0 mux port: UART1_TX | + | |
- | | | MX6UL_PAD_UART1_TX_DATA__UART1_DTE_RX | + | |
- | | ALT1 mux port: ENET1_RDATA02 | MX6UL_PAD_UART1_TX_DATA__ENET1_RDATA02 | + | |
- | | ALT2 mux port: I2C3_SCL | + | |
- | | ALT3 mux port: CSI_DATA02 | + | |
- | | ALT4 mux port: GPT1_COMPARE1 | MX6UL_PAD_UART1_TX_DATA__GPT1_COMPARE1 | + | |
- | | ALT5 mux port: GPIO1_IO16 | + | |
- | | ALT8 mux port: SPDIF_OUT | + | |
- | + | ||
- | Based on all defines from [[https:// | + | |
- | + | ||
- | + | ||
- | + | ||
- | [[https:// | + | |
- | + | ||
- | [[https:// | + | |
- | + | ||
- | ===== liteSOM device tree ===== | + | |
- | + | ||
- | [[https:// | + | |
- | + | ||
- | ===== liteboard device tree ===== | + | |
- | + | ||
- | For [[litesom:liteboard]] based project you can use [[https:// | + | |
- | + | ||
- | ===== Custom project device tree ===== | + | |
- | + | ||
- | <columns 100% 40% - -> | + | |
- | < | + | |
- | object " | + | |
- | object " | + | |
- | object " | + | |
- | object " | + | |
- | object " | + | |
- | imx6ul <|-- litesom | + | |
- | litesom <|-- custom1 | + | |
- | litesom <|-- liteboard | + | |
- | liteboard <|-- custom2 | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | + | ||
- | Of course you can include [[https:// | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | < | + | |
- | <col xs=" | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | package foo << | + | |
- | object " | + | |
- | object " | + | |
- | } | + | |
- | + | ||
- | object " | + | |
- | imx6ul <|-- litesom | + | |
- | litesom <|-- custom | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | <col xs=" | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | object " | + | |
- | object " | + | |
- | object " | + | |
- | object " | + | |
- | + | ||
- | imx6ul <|-- litesom | + | |
- | litesom <|-- liteboard | + | |
- | liteboard <|-- custom | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | < | + | |
- | object " | + | |
- | object " | + | |
- | object " | + | |
- | imx6ul <|-- litesom | + | |
- | litesom <|-- project | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | object " | + | |
- | object " | + | |
- | object " | + | |
- | object " | + | |
- | + | ||
- | imx6ul <|-- litesom | + | |
- | litesom <|-- liteboard | + | |
- | liteboard <|-- project | + | |
- | </ | + | |
- | + | ||
- | < | + | |
- | + | ||
- | In our case we are including < | + | |
- | + | ||
- | Based on [https:// | + | |
- | + | ||
- | For example you can check out [https:// | + |