Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 2 | /* |
| 3 | * Copyright 2022 Toradex |
| 4 | */ |
| 5 | |
| 6 | #include <dt-bindings/leds/common.h> |
| 7 | |
| 8 | / { |
| 9 | aliases { |
| 10 | rtc0 = &rtc_i2c; |
| 11 | rtc1 = &rtc; |
| 12 | }; |
| 13 | |
| 14 | leds { |
| 15 | compatible = "gpio-leds"; |
| 16 | pinctrl-names = "default"; |
| 17 | pinctrl-0 = <&pinctrl_leds_ixora>; |
| 18 | |
| 19 | /* LED_4_GREEN / MXM3_188 */ |
| 20 | led-1 { |
| 21 | color = <LED_COLOR_ID_GREEN>; |
| 22 | default-state = "off"; |
| 23 | function = LED_FUNCTION_STATUS; |
| 24 | gpios = <&lsio_gpio5 27 GPIO_ACTIVE_HIGH>; |
| 25 | }; |
| 26 | |
| 27 | /* LED_4_RED / MXM3_178 */ |
| 28 | led-2 { |
| 29 | color = <LED_COLOR_ID_RED>; |
| 30 | default-state = "off"; |
| 31 | function = LED_FUNCTION_STATUS; |
| 32 | gpios = <&lsio_gpio5 29 GPIO_ACTIVE_HIGH>; |
| 33 | }; |
| 34 | |
| 35 | /* LED_5_GREEN / MXM3_152 */ |
| 36 | led-3 { |
| 37 | color = <LED_COLOR_ID_GREEN>; |
| 38 | default-state = "off"; |
| 39 | function = LED_FUNCTION_STATUS; |
| 40 | gpios = <&lsio_gpio5 20 GPIO_ACTIVE_HIGH>; |
| 41 | }; |
| 42 | |
| 43 | /* LED_5_RED / MXM3_156 */ |
| 44 | led-4 { |
| 45 | color = <LED_COLOR_ID_RED>; |
| 46 | default-state = "off"; |
| 47 | function = LED_FUNCTION_STATUS; |
| 48 | gpios = <&lsio_gpio5 21 GPIO_ACTIVE_HIGH>; |
| 49 | }; |
| 50 | }; |
| 51 | |
| 52 | reg_usb_host_vbus: regulator-usb-host-vbus { |
| 53 | regulator-name = "VCC_USBH(2|4)"; |
| 54 | }; |
| 55 | }; |
| 56 | |
| 57 | &adc0 { |
| 58 | status = "okay"; |
| 59 | }; |
| 60 | |
| 61 | &adc1 { |
| 62 | status = "okay"; |
| 63 | }; |
| 64 | |
| 65 | /* TODO: Audio Mixer */ |
| 66 | |
| 67 | /* TODO: Asynchronous Sample Rate Converter (ASRC) */ |
| 68 | |
| 69 | /* TODO: Display Controller */ |
| 70 | |
| 71 | /* TODO: DPU */ |
| 72 | |
| 73 | /* Apalis ETH1 */ |
| 74 | &fec1 { |
| 75 | status = "okay"; |
| 76 | }; |
| 77 | |
| 78 | /* Apalis CAN1 */ |
| 79 | &flexcan1 { |
| 80 | status = "okay"; |
| 81 | }; |
| 82 | |
| 83 | /* Apalis CAN2 */ |
| 84 | &flexcan2 { |
| 85 | status = "okay"; |
| 86 | }; |
| 87 | |
| 88 | /* TODO: GPU */ |
| 89 | |
| 90 | /* Apalis I2C1 */ |
| 91 | &i2c2 { |
| 92 | status = "okay"; |
| 93 | |
| 94 | /* M41T0M6 real time clock on carrier board */ |
| 95 | rtc_i2c: rtc@68 { |
| 96 | status = "okay"; |
| 97 | }; |
| 98 | }; |
| 99 | |
| 100 | /* Apalis I2C3 (CAM) */ |
| 101 | &i2c3 { |
| 102 | status = "okay"; |
| 103 | }; |
| 104 | |
| 105 | &iomuxc { |
| 106 | pinctrl-0 = <&pinctrl_cam1_gpios>, <&pinctrl_dap1_gpios>, |
| 107 | <&pinctrl_esai0_gpios>, <&pinctrl_fec2_gpios>, |
| 108 | <&pinctrl_gpio3>, <&pinctrl_gpio4>, <&pinctrl_gpio_usbh_oc_n>, |
| 109 | <&pinctrl_lpuart1ctrl>, <&pinctrl_lvds0_i2c0_gpio>, |
| 110 | <&pinctrl_lvds1_i2c0_gpios>, <&pinctrl_mipi_dsi_0_1_en>, |
| 111 | <&pinctrl_mipi_dsi1_gpios>, <&pinctrl_mlb_gpios>, |
| 112 | <&pinctrl_qspi1a_gpios>, <&pinctrl_sata1_act>, |
| 113 | <&pinctrl_sim0_gpios>, <&pinctrl_uart24_forceoff>, |
| 114 | <&pinctrl_usdhc1_gpios>; |
| 115 | |
| 116 | pinctrl_leds_ixora: ledsixoragrp { |
| 117 | fsl,pins = <IMX8QM_USDHC2_DATA1_LSIO_GPIO5_IO27 0x06000061>, /* LED_4_GREEN */ |
| 118 | <IMX8QM_USDHC2_DATA3_LSIO_GPIO5_IO29 0x06000061>, /* LED_4_RED */ |
| 119 | <IMX8QM_USDHC1_DATA5_LSIO_GPIO5_IO20 0x06000061>, /* LED_5_GREEN */ |
| 120 | <IMX8QM_USDHC1_DATA6_LSIO_GPIO5_IO21 0x06000061>; /* LED_5_RED */ |
| 121 | }; |
| 122 | |
| 123 | pinctrl_uart24_forceoff: uart24forceoffgrp { |
| 124 | fsl,pins = <IMX8QM_USDHC2_CMD_LSIO_GPIO5_IO25 0x00000021>; |
| 125 | }; |
| 126 | }; |
| 127 | |
| 128 | /* Apalis SPI1 */ |
| 129 | &lpspi0 { |
| 130 | status = "okay"; |
| 131 | }; |
| 132 | |
| 133 | /* Apalis SPI2 */ |
| 134 | &lpspi2 { |
| 135 | status = "okay"; |
| 136 | }; |
| 137 | |
| 138 | /* Apalis UART3 */ |
| 139 | &lpuart0 { |
| 140 | status = "okay"; |
| 141 | }; |
| 142 | |
| 143 | /* Apalis UART1 */ |
| 144 | &lpuart1 { |
| 145 | status = "okay"; |
| 146 | }; |
| 147 | |
| 148 | /* Apalis UART4 */ |
| 149 | &lpuart2 { |
| 150 | status = "okay"; |
| 151 | }; |
| 152 | |
| 153 | /* Apalis UART2 */ |
| 154 | &lpuart3 { |
| 155 | status = "okay"; |
| 156 | }; |
| 157 | |
| 158 | &lsio_gpio5 { |
| 159 | gpio-line-names = "gpio5-00", "gpio5-01", "gpio5-02", "gpio5-03", |
| 160 | "gpio5-04", "gpio5-05", "gpio5-06", "gpio5-07", |
| 161 | "gpio5-08", "gpio5-09", "gpio5-10", "gpio5-11", |
| 162 | "gpio5-12", "gpio5-13", "gpio5-14", "gpio5-15", |
| 163 | "gpio5-16", "gpio5-17", "gpio5-18", "gpio5-19", |
| 164 | "LED-5-GREEN", "LED-5-RED", "gpio5-22", "gpio5-23", |
| 165 | "gpio5-24", "UART24-FORCEOFF", "gpio5-26", |
| 166 | "LED-4-GREEN", "gpio5-28", "LED-4-RED", "gpio5-30", |
| 167 | "gpio5-31"; |
| 168 | }; |
| 169 | |
| 170 | /* Apalis PWM3, MXM3 pin 6 */ |
| 171 | &lsio_pwm0 { |
| 172 | status = "okay"; |
| 173 | }; |
| 174 | |
| 175 | /* Apalis PWM4, MXM3 pin 8 */ |
| 176 | &lsio_pwm1 { |
| 177 | status = "okay"; |
| 178 | }; |
| 179 | |
| 180 | /* Apalis PWM1, MXM3 pin 2 */ |
| 181 | &lsio_pwm2 { |
| 182 | status = "okay"; |
| 183 | }; |
| 184 | |
| 185 | /* Apalis PWM2, MXM3 pin 4 */ |
| 186 | &lsio_pwm3 { |
| 187 | status = "okay"; |
| 188 | }; |
| 189 | |
| 190 | /* TODO: Apalis PCIE1 */ |
| 191 | |
| 192 | /* TODO: Apalis BKL1_PWM */ |
| 193 | |
| 194 | /* TODO: Apalis DAP1 */ |
| 195 | |
| 196 | /* TODO: Apalis Analogue Audio */ |
| 197 | |
| 198 | /* TODO: Apalis SATA1 */ |
| 199 | |
| 200 | /* TODO: Apalis SPDIF1 */ |
| 201 | |
| 202 | /* TODO: Apalis USBH2, Apalis USBH3 and on-module Wi-Fi via on-module HSIC Hub */ |
| 203 | |
| 204 | /* Apalis USBO1 */ |
| 205 | &usbotg1 { |
| 206 | status = "okay"; |
| 207 | }; |
| 208 | |
| 209 | /* TODO: Apalis USBH4 SuperSpeed */ |
| 210 | |
| 211 | /* Apalis MMC1 */ |
| 212 | &usdhc2 { |
| 213 | pinctrl-0 = <&pinctrl_usdhc2_4bit>, <&pinctrl_mmc1_cd>; |
| 214 | pinctrl-1 = <&pinctrl_usdhc2_4bit_100mhz>, <&pinctrl_mmc1_cd>; |
| 215 | pinctrl-2 = <&pinctrl_usdhc2_4bit_200mhz>, <&pinctrl_mmc1_cd>; |
| 216 | pinctrl-3 = <&pinctrl_usdhc2_4bit_sleep>, <&pinctrl_mmc1_cd_sleep>; |
| 217 | bus-width = <4>; |
| 218 | status = "okay"; |
| 219 | }; |