Tom Rini | 6bb92fc | 2024-05-20 09:54:58 -0600 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 2 | /* |
| 3 | * Copyright 2024 Toradex |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "imx6q-apalis-eval.dtsi" |
| 9 | |
| 10 | / { |
| 11 | model = "Toradex Apalis iMX6Q/D Module on Apalis Evaluation Board v1.2"; |
| 12 | compatible = "toradex,apalis_imx6q-eval-v1.2", "toradex,apalis_imx6q", |
| 13 | "fsl,imx6q"; |
| 14 | |
| 15 | reg_3v3_mmc: regulator-3v3-mmc { |
| 16 | compatible = "regulator-fixed"; |
| 17 | enable-active-high; |
| 18 | gpio = <&gpio2 0 GPIO_ACTIVE_HIGH>; |
| 19 | off-on-delay-us = <100000>; |
| 20 | pinctrl-names = "default"; |
| 21 | pinctrl-0 = <&pinctrl_enable_3v3_mmc>; |
| 22 | regulator-max-microvolt = <3300000>; |
| 23 | regulator-min-microvolt = <3300000>; |
| 24 | regulator-name = "3.3V_MMC"; |
| 25 | startup-delay-us = <10000>; |
| 26 | }; |
| 27 | |
| 28 | reg_3v3_sd: regulator-3v3-sd { |
| 29 | compatible = "regulator-fixed"; |
| 30 | enable-active-high; |
| 31 | gpio = <&gpio2 1 GPIO_ACTIVE_HIGH>; |
| 32 | off-on-delay-us = <100000>; |
| 33 | pinctrl-names = "default"; |
| 34 | pinctrl-0 = <&pinctrl_enable_3v3_sd>; |
| 35 | regulator-max-microvolt = <3300000>; |
| 36 | regulator-min-microvolt = <3300000>; |
| 37 | regulator-name = "3.3V_SD"; |
| 38 | startup-delay-us = <10000>; |
| 39 | }; |
| 40 | |
| 41 | reg_can1: regulator-can1 { |
| 42 | compatible = "regulator-fixed"; |
| 43 | enable-active-high; |
| 44 | gpio = <&gpio2 3 GPIO_ACTIVE_HIGH>; |
| 45 | pinctrl-names = "default"; |
| 46 | pinctrl-0 = <&pinctrl_enable_can1_power>; |
| 47 | regulator-name = "5V_SW_CAN1"; |
| 48 | startup-delay-us = <10000>; |
| 49 | }; |
| 50 | |
| 51 | reg_can2: regulator-can2 { |
| 52 | compatible = "regulator-fixed"; |
| 53 | enable-active-high; |
| 54 | gpio = <&gpio2 2 GPIO_ACTIVE_HIGH>; |
| 55 | pinctrl-names = "default"; |
| 56 | pinctrl-0 = <&pinctrl_enable_can2_power>; |
| 57 | regulator-name = "5V_SW_CAN2"; |
| 58 | startup-delay-us = <10000>; |
| 59 | }; |
| 60 | |
| 61 | sound-carrier { |
| 62 | compatible = "simple-audio-card"; |
| 63 | simple-audio-card,bitclock-master = <&codec_dai>; |
| 64 | simple-audio-card,format = "i2s"; |
| 65 | simple-audio-card,frame-master = <&codec_dai>; |
| 66 | simple-audio-card,name = "apalis-nau8822"; |
| 67 | simple-audio-card,routing = |
| 68 | "Headphones", "LHP", |
| 69 | "Headphones", "RHP", |
| 70 | "Speaker", "LSPK", |
| 71 | "Speaker", "RSPK", |
| 72 | "Line Out", "AUXOUT1", |
| 73 | "Line Out", "AUXOUT2", |
| 74 | "LAUX", "Line In", |
| 75 | "RAUX", "Line In", |
| 76 | "LMICP", "Mic In", |
| 77 | "RMICP", "Mic In"; |
| 78 | simple-audio-card,widgets = |
| 79 | "Headphones", "Headphones", |
| 80 | "Line Out", "Line Out", |
| 81 | "Speaker", "Speaker", |
| 82 | "Microphone", "Mic In", |
| 83 | "Line", "Line In"; |
| 84 | |
| 85 | codec_dai: simple-audio-card,codec { |
| 86 | sound-dai = <&nau8822_1a>; |
| 87 | system-clock-frequency = <12288000>; |
| 88 | }; |
| 89 | |
| 90 | simple-audio-card,cpu { |
| 91 | sound-dai = <&ssi2>; |
| 92 | }; |
| 93 | }; |
| 94 | }; |
| 95 | |
| 96 | &can1 { |
| 97 | xceiver-supply = <®_can1>; |
| 98 | status = "okay"; |
| 99 | }; |
| 100 | |
| 101 | &can2 { |
| 102 | xceiver-supply = <®_can2>; |
| 103 | status = "okay"; |
| 104 | }; |
| 105 | |
| 106 | /* I2C1_SDA/SCL on MXM3 209/211 */ |
| 107 | &i2c1 { |
| 108 | /* Audio Codec */ |
| 109 | nau8822_1a: audio-codec@1a { |
| 110 | compatible = "nuvoton,nau8822"; |
| 111 | reg = <0x1a>; |
| 112 | pinctrl-names = "default"; |
| 113 | pinctrl-0 = <&pinctrl_nau8822>; |
| 114 | #sound-dai-cells = <0>; |
| 115 | }; |
| 116 | |
| 117 | /* Current measurement into module VCC */ |
| 118 | hwmon@40 { |
| 119 | compatible = "ti,ina219"; |
| 120 | reg = <0x40>; |
| 121 | shunt-resistor = <5000>; |
| 122 | }; |
| 123 | |
| 124 | /* Temperature Sensor */ |
| 125 | temperature-sensor@4f { |
| 126 | compatible = "ti,tmp75c"; |
| 127 | reg = <0x4f>; |
| 128 | }; |
| 129 | |
| 130 | /* EEPROM */ |
| 131 | eeprom@57 { |
| 132 | compatible = "st,24c02", "atmel,24c02"; |
| 133 | reg = <0x57>; |
| 134 | pagesize = <16>; |
| 135 | size = <256>; |
| 136 | }; |
| 137 | }; |
| 138 | |
| 139 | &pcie { |
| 140 | status = "okay"; |
| 141 | }; |
| 142 | |
| 143 | &ssi2 { |
| 144 | status = "okay"; |
| 145 | }; |
| 146 | |
| 147 | /* MMC1 */ |
| 148 | &usdhc1 { |
| 149 | bus-width = <4>; |
| 150 | pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_mmc_cd>; |
| 151 | vmmc-supply = <®_3v3_mmc>; |
| 152 | status = "okay"; |
| 153 | }; |
| 154 | |
| 155 | /* SD1 */ |
| 156 | &usdhc2 { |
| 157 | cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>; |
| 158 | pinctrl-0 = <&pinctrl_usdhc2 &pinctrl_sd_cd>; |
| 159 | vmmc-supply = <®_3v3_sd>; |
| 160 | status = "okay"; |
| 161 | }; |
| 162 | |
| 163 | &iomuxc { |
| 164 | pinctrl_enable_3v3_mmc: enable3v3mmcgrp { |
| 165 | fsl,pins = < |
| 166 | /* MMC1_PWR_CTRL */ |
| 167 | MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x1b0b0 |
| 168 | >; |
| 169 | }; |
| 170 | |
| 171 | pinctrl_enable_3v3_sd: enable3v3sdgrp { |
| 172 | fsl,pins = < |
| 173 | /* SD1_PWR_CTRL */ |
| 174 | MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0 |
| 175 | >; |
| 176 | }; |
| 177 | |
| 178 | pinctrl_enable_can1_power: enablecan1powergrp { |
| 179 | fsl,pins = < |
| 180 | /* CAN1_PWR_EN */ |
| 181 | MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x1b0b0 |
| 182 | >; |
| 183 | }; |
| 184 | |
| 185 | pinctrl_enable_can2_power: enablecan2powergrp { |
| 186 | fsl,pins = < |
| 187 | /* CAN2_PWR_EN */ |
| 188 | MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0 |
| 189 | >; |
| 190 | }; |
| 191 | |
| 192 | pinctrl_nau8822: nau8822grp { |
| 193 | fsl,pins = < |
| 194 | MX6QDL_PAD_DISP0_DAT16__AUD5_TXC 0x130b0 |
| 195 | MX6QDL_PAD_DISP0_DAT17__AUD5_TXD 0x130b0 |
| 196 | MX6QDL_PAD_DISP0_DAT18__AUD5_TXFS 0x130b0 |
| 197 | MX6QDL_PAD_DISP0_DAT19__AUD5_RXD 0x130b0 |
| 198 | >; |
| 199 | }; |
| 200 | }; |