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_3v3_vmmc: regulator-3v3-vmmc { |
| 53 | compatible = "regulator-fixed"; |
| 54 | pinctrl-names = "default"; |
| 55 | pinctrl-0 = <&pinctrl_enable_3v3_vmmc>; |
| 56 | /* MMC1_PWR_CTRL */ |
| 57 | gpio = <&lsio_gpio5 19 GPIO_ACTIVE_HIGH>; |
| 58 | enable-active-high; |
| 59 | regulator-max-microvolt = <3300000>; |
| 60 | regulator-min-microvolt = <3300000>; |
| 61 | regulator-name = "3v3_vmmc"; |
| 62 | }; |
| 63 | |
| 64 | reg_can1_supply: regulator-can1-supply { |
| 65 | compatible = "regulator-fixed"; |
| 66 | pinctrl-names = "default"; |
| 67 | pinctrl-0 = <&pinctrl_enable_can1_power>; |
| 68 | gpio = <&lsio_gpio5 22 GPIO_ACTIVE_HIGH>; |
| 69 | enable-active-high; |
| 70 | regulator-name = "can1_supply"; |
Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame] | 71 | startup-delay-us = <1000>; |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 72 | }; |
| 73 | |
| 74 | reg_can2_supply: regulator-can2-supply { |
| 75 | compatible = "regulator-fixed"; |
| 76 | pinctrl-names = "default"; |
| 77 | pinctrl-0 = <&pinctrl_sata1_act>; |
| 78 | gpio = <&lsio_gpio2 8 GPIO_ACTIVE_HIGH>; |
| 79 | enable-active-high; |
| 80 | regulator-name = "can2_supply"; |
Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame] | 81 | startup-delay-us = <1000>; |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 82 | }; |
| 83 | |
| 84 | reg_usb_host_vbus: regulator-usb-host-vbus { |
| 85 | regulator-name = "VCC_USBH(2|4)"; |
| 86 | }; |
| 87 | }; |
| 88 | |
| 89 | &adc0 { |
| 90 | status = "okay"; |
| 91 | }; |
| 92 | |
| 93 | &adc1 { |
| 94 | status = "okay"; |
| 95 | }; |
| 96 | |
| 97 | /* TODO: Audio Mixer */ |
| 98 | |
| 99 | /* TODO: Asynchronous Sample Rate Converter (ASRC) */ |
| 100 | |
| 101 | /* TODO: Display Controller */ |
| 102 | |
| 103 | /* TODO: DPU */ |
| 104 | |
| 105 | /* Apalis ETH1 */ |
| 106 | &fec1 { |
| 107 | status = "okay"; |
| 108 | }; |
| 109 | |
| 110 | /* Apalis CAN1 */ |
| 111 | &flexcan1 { |
| 112 | xceiver-supply = <®_can1_supply>; |
| 113 | status = "okay"; |
| 114 | }; |
| 115 | |
| 116 | /* Apalis CAN2 */ |
| 117 | &flexcan2 { |
| 118 | xceiver-supply = <®_can2_supply>; |
| 119 | status = "okay"; |
| 120 | }; |
| 121 | |
| 122 | /* TODO: GPU */ |
| 123 | |
| 124 | /* Apalis I2C1 */ |
| 125 | &i2c2 { |
| 126 | status = "okay"; |
| 127 | |
| 128 | eeprom: eeprom@50 { |
| 129 | compatible = "atmel,24c02"; |
| 130 | reg = <0x50>; |
| 131 | pagesize = <16>; |
| 132 | }; |
| 133 | |
| 134 | /* M41T0M6 real time clock on carrier board */ |
| 135 | rtc_i2c: rtc@68 { |
| 136 | status = "okay"; |
| 137 | }; |
| 138 | }; |
| 139 | |
| 140 | /* Apalis I2C3 (CAM) */ |
| 141 | &i2c3 { |
| 142 | status = "okay"; |
| 143 | }; |
| 144 | |
| 145 | &iomuxc { |
| 146 | pinctrl-0 = <&pinctrl_cam1_gpios>, <&pinctrl_dap1_gpios>, |
| 147 | <&pinctrl_esai0_gpios>, <&pinctrl_fec2_gpios>, |
| 148 | <&pinctrl_gpio3>, <&pinctrl_gpio4>, <&pinctrl_gpio_usbh_oc_n>, |
| 149 | <&pinctrl_lpuart1ctrl>, <&pinctrl_lvds0_i2c0_gpio>, |
| 150 | <&pinctrl_lvds1_i2c0_gpios>, <&pinctrl_mipi_dsi_0_1_en>, |
| 151 | <&pinctrl_mipi_dsi1_gpios>, <&pinctrl_mlb_gpios>, |
| 152 | <&pinctrl_qspi1a_gpios>, <&pinctrl_sim0_gpios>, |
| 153 | <&pinctrl_uart24_forceoff>, <&pinctrl_usdhc1_gpios>; |
| 154 | |
| 155 | /* PMIC MMC1 power-switch */ |
| 156 | pinctrl_enable_3v3_vmmc: enable3v3vmmcgrp { |
| 157 | fsl,pins = <IMX8QM_USDHC1_DATA4_LSIO_GPIO5_IO19 0x00000021>; /* MXM3_148, PMIC */ |
| 158 | }; |
| 159 | |
| 160 | /* FlexCAN PMIC */ |
| 161 | pinctrl_enable_can1_power: enablecan1powergrp { |
| 162 | fsl,pins = <IMX8QM_USDHC1_DATA7_LSIO_GPIO5_IO22 0x00000021>; /* MXM3_158, PMIC */ |
| 163 | }; |
| 164 | |
| 165 | pinctrl_leds_ixora: ledsixoragrp { |
| 166 | fsl,pins = <IMX8QM_USDHC2_DATA1_LSIO_GPIO5_IO27 0x06000061>, /* LED_4_GREEN */ |
| 167 | <IMX8QM_USDHC2_DATA3_LSIO_GPIO5_IO29 0x06000061>, /* LED_4_RED */ |
| 168 | <IMX8QM_USDHC1_DATA5_LSIO_GPIO5_IO20 0x06000061>, /* LED_5_GREEN */ |
| 169 | <IMX8QM_USDHC1_DATA6_LSIO_GPIO5_IO21 0x06000061>; /* LED_5_RED */ |
| 170 | }; |
| 171 | |
| 172 | pinctrl_uart24_forceoff: uart24forceoffgrp { |
| 173 | fsl,pins = <IMX8QM_USDHC2_CMD_LSIO_GPIO5_IO25 0x00000021>; |
| 174 | }; |
| 175 | }; |
| 176 | |
| 177 | /* Apalis SPI1 */ |
| 178 | &lpspi0 { |
| 179 | status = "okay"; |
| 180 | }; |
| 181 | |
| 182 | /* Apalis SPI2 */ |
| 183 | &lpspi2 { |
| 184 | status = "okay"; |
| 185 | }; |
| 186 | |
| 187 | /* Apalis UART3 */ |
| 188 | &lpuart0 { |
| 189 | status = "okay"; |
| 190 | }; |
| 191 | |
| 192 | /* Apalis UART1 */ |
| 193 | &lpuart1 { |
| 194 | status = "okay"; |
| 195 | }; |
| 196 | |
| 197 | /* Apalis UART4 */ |
| 198 | &lpuart2 { |
| 199 | status = "okay"; |
| 200 | }; |
| 201 | |
| 202 | /* Apalis UART2 */ |
| 203 | &lpuart3 { |
| 204 | status = "okay"; |
| 205 | }; |
| 206 | |
| 207 | &lsio_gpio5 { |
| 208 | gpio-line-names = "gpio5-00", "gpio5-01", "gpio5-02", "gpio5-03", |
| 209 | "gpio5-04", "gpio5-05", "gpio5-06", "gpio5-07", |
| 210 | "gpio5-08", "gpio5-09", "gpio5-10", "gpio5-11", |
| 211 | "gpio5-12", "gpio5-13", "gpio5-14", "gpio5-15", |
| 212 | "gpio5-16", "gpio5-17", "gpio5-18", "gpio5-19", |
| 213 | "LED-5-GREEN", "LED-5-RED", "gpio5-22", "gpio5-23", |
| 214 | "gpio5-24", "UART24-FORCEOFF", "gpio5-26", |
| 215 | "LED-4-GREEN", "gpio5-28", "LED-4-RED", "gpio5-30", |
| 216 | "gpio5-31"; |
| 217 | }; |
| 218 | |
| 219 | /* Apalis PWM3, MXM3 pin 6 */ |
| 220 | &lsio_pwm0 { |
| 221 | status = "okay"; |
| 222 | }; |
| 223 | |
| 224 | /* Apalis PWM4, MXM3 pin 8 */ |
| 225 | &lsio_pwm1 { |
| 226 | status = "okay"; |
| 227 | }; |
| 228 | |
| 229 | /* Apalis PWM1, MXM3 pin 2 */ |
| 230 | &lsio_pwm2 { |
| 231 | status = "okay"; |
| 232 | }; |
| 233 | |
| 234 | /* Apalis PWM2, MXM3 pin 4 */ |
| 235 | &lsio_pwm3 { |
| 236 | status = "okay"; |
| 237 | }; |
| 238 | |
| 239 | /* TODO: Apalis PCIE1 */ |
| 240 | |
| 241 | /* TODO: Apalis BKL1_PWM */ |
| 242 | |
| 243 | /* TODO: Apalis DAP1 */ |
| 244 | |
| 245 | /* TODO: Apalis Analogue Audio */ |
| 246 | |
| 247 | /* TODO: Apalis SATA1 */ |
| 248 | |
| 249 | /* TODO: Apalis SPDIF1 */ |
| 250 | |
| 251 | /* TODO: Apalis USBH2, Apalis USBH3 and on-module Wi-Fi via on-module HSIC Hub */ |
| 252 | |
| 253 | /* Apalis USBO1 */ |
| 254 | &usbotg1 { |
| 255 | status = "okay"; |
| 256 | }; |
| 257 | |
| 258 | /* TODO: Apalis USBH4 SuperSpeed */ |
| 259 | |
| 260 | /* Apalis MMC1 */ |
| 261 | &usdhc2 { |
| 262 | pinctrl-0 = <&pinctrl_usdhc2_4bit>, <&pinctrl_mmc1_cd>; |
| 263 | pinctrl-1 = <&pinctrl_usdhc2_4bit_100mhz>, <&pinctrl_mmc1_cd>; |
| 264 | pinctrl-2 = <&pinctrl_usdhc2_4bit_200mhz>, <&pinctrl_mmc1_cd>; |
| 265 | pinctrl-3 = <&pinctrl_usdhc2_4bit_sleep>, <&pinctrl_mmc1_cd_sleep>; |
| 266 | bus-width = <4>; |
| 267 | cap-power-off-card; |
| 268 | /delete-property/ no-1-8-v; |
| 269 | vmmc-supply = <®_3v3_vmmc>; |
| 270 | status = "okay"; |
| 271 | }; |