.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 OR MIT |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2015 Endless Mobile, Inc. |
---|
3 | 4 | * Author: Carlo Caione <carlo@endlessm.com> |
---|
4 | | - * |
---|
5 | | - * This file is dual-licensed: you can use it either under the terms |
---|
6 | | - * of the GPL or the X11 license, at your option. Note that this dual |
---|
7 | | - * licensing only applies to this file, and not this project as a |
---|
8 | | - * whole. |
---|
9 | | - * |
---|
10 | | - * a) This library is free software; you can redistribute it and/or |
---|
11 | | - * modify it under the terms of the GNU General Public License as |
---|
12 | | - * published by the Free Software Foundation; either version 2 of the |
---|
13 | | - * License, or (at your option) any later version. |
---|
14 | | - * |
---|
15 | | - * This library is distributed in the hope that it will be useful, |
---|
16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
18 | | - * GNU General Public License for more details. |
---|
19 | | - * |
---|
20 | | - * You should have received a copy of the GNU General Public License |
---|
21 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
22 | | - * |
---|
23 | | - * Or, alternatively, |
---|
24 | | - * |
---|
25 | | - * b) Permission is hereby granted, free of charge, to any person |
---|
26 | | - * obtaining a copy of this software and associated documentation |
---|
27 | | - * files (the "Software"), to deal in the Software without |
---|
28 | | - * restriction, including without limitation the rights to use, |
---|
29 | | - * copy, modify, merge, publish, distribute, sublicense, and/or |
---|
30 | | - * sell copies of the Software, and to permit persons to whom the |
---|
31 | | - * Software is furnished to do so, subject to the following |
---|
32 | | - * conditions: |
---|
33 | | - * |
---|
34 | | - * The above copyright notice and this permission notice shall be |
---|
35 | | - * included in all copies or substantial portions of the Software. |
---|
36 | | - * |
---|
37 | | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
---|
38 | | - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
---|
39 | | - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
---|
40 | | - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
---|
41 | | - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
---|
42 | | - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
---|
43 | | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
---|
44 | | - * OTHER DEALINGS IN THE SOFTWARE. |
---|
45 | 5 | */ |
---|
46 | 6 | |
---|
47 | 7 | /dts-v1/; |
---|
.. | .. |
---|
55 | 15 | aliases { |
---|
56 | 16 | serial0 = &uart_AO; |
---|
57 | 17 | mmc0 = &sd_card_slot; |
---|
| 18 | + mmc1 = &sdhc; |
---|
| 19 | + }; |
---|
| 20 | + |
---|
| 21 | + chosen { |
---|
| 22 | + stdout-path = "serial0:115200n8"; |
---|
58 | 23 | }; |
---|
59 | 24 | |
---|
60 | 25 | memory { |
---|
| 26 | + device_type = "memory"; |
---|
61 | 27 | reg = <0x40000000 0x40000000>; |
---|
| 28 | + }; |
---|
| 29 | + |
---|
| 30 | + emmc_pwrseq: emmc-pwrseq { |
---|
| 31 | + compatible = "mmc-pwrseq-emmc"; |
---|
| 32 | + reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; |
---|
62 | 33 | }; |
---|
63 | 34 | |
---|
64 | 35 | leds { |
---|
.. | .. |
---|
71 | 42 | }; |
---|
72 | 43 | }; |
---|
73 | 44 | |
---|
| 45 | + p5v0: regulator-p5v0 { |
---|
| 46 | + compatible = "regulator-fixed"; |
---|
| 47 | + |
---|
| 48 | + regulator-name = "P5V0"; |
---|
| 49 | + regulator-min-microvolt = <5000000>; |
---|
| 50 | + regulator-max-microvolt = <5000000>; |
---|
| 51 | + }; |
---|
| 52 | + |
---|
74 | 53 | tflash_vdd: regulator-tflash_vdd { |
---|
75 | 54 | /* |
---|
76 | 55 | * signal name from schematics: TFLASH_VDD_EN |
---|
.. | .. |
---|
80 | 59 | regulator-name = "TFLASH_VDD"; |
---|
81 | 60 | regulator-min-microvolt = <3300000>; |
---|
82 | 61 | regulator-max-microvolt = <3300000>; |
---|
| 62 | + |
---|
| 63 | + vin-supply = <&vcc_3v3>; |
---|
83 | 64 | |
---|
84 | 65 | gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>; |
---|
85 | 66 | enable-active-high; |
---|
.. | .. |
---|
92 | 73 | regulator-min-microvolt = <1800000>; |
---|
93 | 74 | regulator-max-microvolt = <3300000>; |
---|
94 | 75 | |
---|
| 76 | + vin-supply = <&vcc_3v3>; |
---|
| 77 | + |
---|
95 | 78 | /* |
---|
96 | 79 | * signal name from schematics: TF_3V3N_1V8_EN |
---|
97 | 80 | */ |
---|
.. | .. |
---|
101 | 84 | states = <3300000 0 |
---|
102 | 85 | 1800000 1>; |
---|
103 | 86 | }; |
---|
| 87 | + |
---|
| 88 | + iio-hwmon { |
---|
| 89 | + compatible = "iio-hwmon"; |
---|
| 90 | + io-channels = <&saradc 8>; |
---|
| 91 | + }; |
---|
| 92 | + |
---|
| 93 | + rtc32k_xtal: rtc32k-xtal-clk { |
---|
| 94 | + /* X3 in the schematics */ |
---|
| 95 | + compatible = "fixed-clock"; |
---|
| 96 | + clock-frequency = <32768>; |
---|
| 97 | + clock-output-names = "RTC32K"; |
---|
| 98 | + #clock-cells = <0>; |
---|
| 99 | + }; |
---|
| 100 | + |
---|
| 101 | + vcc_1v8: regulator-vcc-1v8 { |
---|
| 102 | + /* |
---|
| 103 | + * RICHTEK RT9179 configured for a fixed output voltage of |
---|
| 104 | + * 1.8V. This supplies not only VCC1V8 but also IOREF_1V8 and |
---|
| 105 | + * VDD1V8 according to the schematics. |
---|
| 106 | + */ |
---|
| 107 | + compatible = "regulator-fixed"; |
---|
| 108 | + |
---|
| 109 | + regulator-name = "VCC1V8"; |
---|
| 110 | + regulator-min-microvolt = <1800000>; |
---|
| 111 | + regulator-max-microvolt = <1800000>; |
---|
| 112 | + |
---|
| 113 | + vin-supply = <&p5v0>; |
---|
| 114 | + }; |
---|
| 115 | + |
---|
| 116 | + vcc_3v3: regulator-vcc-3v3 { |
---|
| 117 | + /* |
---|
| 118 | + * Monolithic Power Systems MP2161 configured for a fixed |
---|
| 119 | + * output voltage of 3.3V. This supplies not only VCC3V3 but |
---|
| 120 | + * also VDD3V3 and VDDIO_AO3V3 according to the schematics. |
---|
| 121 | + */ |
---|
| 122 | + compatible = "regulator-fixed"; |
---|
| 123 | + |
---|
| 124 | + regulator-name = "VCC3V3"; |
---|
| 125 | + regulator-min-microvolt = <3300000>; |
---|
| 126 | + regulator-max-microvolt = <3300000>; |
---|
| 127 | + |
---|
| 128 | + vin-supply = <&p5v0>; |
---|
| 129 | + }; |
---|
| 130 | + |
---|
| 131 | + vcck: regulator-vcck { |
---|
| 132 | + /* Monolithic Power Systems MP2161 */ |
---|
| 133 | + compatible = "pwm-regulator"; |
---|
| 134 | + |
---|
| 135 | + regulator-name = "VCCK"; |
---|
| 136 | + regulator-min-microvolt = <860000>; |
---|
| 137 | + regulator-max-microvolt = <1140000>; |
---|
| 138 | + |
---|
| 139 | + pwm-supply = <&p5v0>; |
---|
| 140 | + |
---|
| 141 | + pwms = <&pwm_cd 0 12218 0>; |
---|
| 142 | + pwm-dutycycle-range = <91 0>; |
---|
| 143 | + |
---|
| 144 | + regulator-boot-on; |
---|
| 145 | + regulator-always-on; |
---|
| 146 | + }; |
---|
| 147 | + |
---|
| 148 | + vddc_ddr: regulator-vddc-ddr { |
---|
| 149 | + /* |
---|
| 150 | + * Monolithic Power Systems MP2161 configured for a fixed |
---|
| 151 | + * output voltage of 1.5V. This supplies not only DDR_VDDC but |
---|
| 152 | + * also DDR3_1V5 according to the schematics. |
---|
| 153 | + */ |
---|
| 154 | + compatible = "regulator-fixed"; |
---|
| 155 | + |
---|
| 156 | + regulator-name = "DDR_VDDC"; |
---|
| 157 | + regulator-min-microvolt = <1500000>; |
---|
| 158 | + regulator-max-microvolt = <1500000>; |
---|
| 159 | + |
---|
| 160 | + vin-supply = <&p5v0>; |
---|
| 161 | + }; |
---|
| 162 | + |
---|
| 163 | + vddee: regulator-vddee { |
---|
| 164 | + /* Monolithic Power Systems MP2161 */ |
---|
| 165 | + compatible = "pwm-regulator"; |
---|
| 166 | + |
---|
| 167 | + regulator-name = "VDDEE"; |
---|
| 168 | + regulator-min-microvolt = <860000>; |
---|
| 169 | + regulator-max-microvolt = <1140000>; |
---|
| 170 | + |
---|
| 171 | + pwm-supply = <&p5v0>; |
---|
| 172 | + |
---|
| 173 | + pwms = <&pwm_cd 1 12218 0>; |
---|
| 174 | + pwm-dutycycle-range = <91 0>; |
---|
| 175 | + |
---|
| 176 | + regulator-boot-on; |
---|
| 177 | + regulator-always-on; |
---|
| 178 | + }; |
---|
| 179 | + |
---|
| 180 | + vdd_rtc: regulator-vdd-rtc { |
---|
| 181 | + /* |
---|
| 182 | + * Torex Semiconductor XC6215 configured for a fixed output of |
---|
| 183 | + * 0.9V. |
---|
| 184 | + */ |
---|
| 185 | + compatible = "regulator-fixed"; |
---|
| 186 | + |
---|
| 187 | + regulator-name = "VDD_RTC"; |
---|
| 188 | + regulator-min-microvolt = <900000>; |
---|
| 189 | + regulator-max-microvolt = <900000>; |
---|
| 190 | + |
---|
| 191 | + vin-supply = <&vcc_3v3>; |
---|
| 192 | + }; |
---|
| 193 | +}; |
---|
| 194 | + |
---|
| 195 | +&cpu0 { |
---|
| 196 | + cpu-supply = <&vcck>; |
---|
| 197 | +}; |
---|
| 198 | + |
---|
| 199 | +&efuse { |
---|
| 200 | + ethernet_mac_address: mac@1b4 { |
---|
| 201 | + reg = <0x1b4 0x6>; |
---|
| 202 | + }; |
---|
104 | 203 | }; |
---|
105 | 204 | |
---|
106 | 205 | ðmac { |
---|
107 | 206 | status = "okay"; |
---|
108 | 207 | |
---|
109 | | - snps,reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>; |
---|
110 | | - snps,reset-active-low; |
---|
111 | | - snps,reset-delays-us = <0 10000 30000>; |
---|
112 | | - |
---|
113 | 208 | pinctrl-0 = <ð_rgmii_pins>; |
---|
114 | 209 | pinctrl-names = "default"; |
---|
115 | 210 | |
---|
116 | | - phy-mode = "rgmii"; |
---|
117 | 211 | phy-handle = <ð_phy>; |
---|
118 | | - amlogic,tx-delay-ns = <4>; |
---|
| 212 | + phy-mode = "rgmii-id"; |
---|
| 213 | + |
---|
| 214 | + nvmem-cells = <ðernet_mac_address>; |
---|
| 215 | + nvmem-cell-names = "mac-address"; |
---|
119 | 216 | |
---|
120 | 217 | mdio { |
---|
121 | 218 | compatible = "snps,dwmac-mdio"; |
---|
.. | .. |
---|
125 | 222 | /* Realtek RTL8211F (0x001cc916) */ |
---|
126 | 223 | eth_phy: ethernet-phy@0 { |
---|
127 | 224 | reg = <0>; |
---|
| 225 | + |
---|
| 226 | + reset-assert-us = <10000>; |
---|
| 227 | + reset-deassert-us = <80000>; |
---|
| 228 | + reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; |
---|
| 229 | + |
---|
128 | 230 | interrupt-parent = <&gpio_intc>; |
---|
129 | 231 | /* GPIOH_3 */ |
---|
130 | 232 | interrupts = <17 IRQ_TYPE_LEVEL_LOW>; |
---|
.. | .. |
---|
132 | 234 | }; |
---|
133 | 235 | }; |
---|
134 | 236 | |
---|
| 237 | +&gpio { |
---|
| 238 | + gpio-line-names = /* Bank GPIOX */ |
---|
| 239 | + "J2 Header Pin 35", "J2 Header Pin 36", |
---|
| 240 | + "J2 Header Pin 32", "J2 Header Pin 31", |
---|
| 241 | + "J2 Header Pin 29", "J2 Header Pin 18", |
---|
| 242 | + "J2 Header Pin 22", "J2 Header Pin 16", |
---|
| 243 | + "J2 Header Pin 23", "J2 Header Pin 21", |
---|
| 244 | + "J2 Header Pin 19", "J2 Header Pin 33", |
---|
| 245 | + "J2 Header Pin 8", "J2 Header Pin 10", |
---|
| 246 | + "J2 Header Pin 15", "J2 Header Pin 13", |
---|
| 247 | + "J2 Header Pin 24", "J2 Header Pin 26", |
---|
| 248 | + /* Bank GPIOY */ |
---|
| 249 | + "Revision (upper)", "Revision (lower)", |
---|
| 250 | + "J2 Header Pin 7", "", "J2 Header Pin 12", |
---|
| 251 | + "J2 Header Pin 11", "", "", "", |
---|
| 252 | + "TFLASH_VDD_EN", "", "", |
---|
| 253 | + /* Bank GPIODV */ |
---|
| 254 | + "VCCK_PWM (PWM_C)", "I2CA_SDA", "I2CA_SCL", |
---|
| 255 | + "I2CB_SDA", "I2CB_SCL", "VDDEE_PWM (PWM_D)", |
---|
| 256 | + "", |
---|
| 257 | + /* Bank GPIOH */ |
---|
| 258 | + "HDMI_HPD", "HDMI_I2C_SDA", "HDMI_I2C_SCL", |
---|
| 259 | + "ETH_PHY_INTR", "ETH_PHY_NRST", "ETH_TXD1", |
---|
| 260 | + "ETH_TXD0", "ETH_TXD3", "ETH_TXD2", |
---|
| 261 | + "ETH_RGMII_TX_CLK", |
---|
| 262 | + /* Bank CARD */ |
---|
| 263 | + "SD_DATA1 (SDB_D1)", "SD_DATA0 (SDB_D0)", |
---|
| 264 | + "SD_CLK", "SD_CMD", "SD_DATA3 (SDB_D3)", |
---|
| 265 | + "SD_DATA2 (SDB_D2)", "SD_CDN (SD_DET_N)", |
---|
| 266 | + /* Bank BOOT */ |
---|
| 267 | + "SDC_D0 (EMMC)", "SDC_D1 (EMMC)", |
---|
| 268 | + "SDC_D2 (EMMC)", "SDC_D3 (EMMC)", |
---|
| 269 | + "SDC_D4 (EMMC)", "SDC_D5 (EMMC)", |
---|
| 270 | + "SDC_D6 (EMMC)", "SDC_D7 (EMMC)", |
---|
| 271 | + "SDC_CLK (EMMC)", "SDC_RSTn (EMMC)", |
---|
| 272 | + "SDC_CMD (EMMC)", "BOOT_SEL", "", "", "", |
---|
| 273 | + "", "", "", "", |
---|
| 274 | + /* Bank DIF */ |
---|
| 275 | + "ETH_RXD1", "ETH_RXD0", "ETH_RX_DV", |
---|
| 276 | + "RGMII_RX_CLK", "ETH_RXD3", "ETH_RXD2", |
---|
| 277 | + "ETH_TXEN", "ETH_PHY_REF_CLK_25MOUT", |
---|
| 278 | + "ETH_MDC", "ETH_MDIO"; |
---|
| 279 | +}; |
---|
| 280 | + |
---|
135 | 281 | &gpio_ao { |
---|
| 282 | + gpio-line-names = "UART TX", "UART RX", "", |
---|
| 283 | + "TF_3V3N_1V8_EN", "USB_HUB_RST_N", |
---|
| 284 | + "USB_OTG_PWREN", "J7 Header Pin 2", |
---|
| 285 | + "IR_IN", "J7 Header Pin 4", |
---|
| 286 | + "J7 Header Pin 6", "J7 Header Pin 5", |
---|
| 287 | + "J7 Header Pin 7", "HDMI_CEC", |
---|
| 288 | + "SYS_LED", "", ""; |
---|
| 289 | + |
---|
136 | 290 | /* |
---|
137 | 291 | * WARNING: The USB Hub on the Odroid-C1/C1+ needs a reset signal |
---|
138 | 292 | * to be turned high in order to be detected by the USB Controller. |
---|
.. | .. |
---|
151 | 305 | status = "okay"; |
---|
152 | 306 | pinctrl-0 = <&ir_recv_pins>; |
---|
153 | 307 | pinctrl-names = "default"; |
---|
| 308 | +}; |
---|
| 309 | + |
---|
| 310 | +&mali { |
---|
| 311 | + mali-supply = <&vddee>; |
---|
| 312 | +}; |
---|
| 313 | + |
---|
| 314 | +&saradc { |
---|
| 315 | + status = "okay"; |
---|
| 316 | + vref-supply = <&vcc_1v8>; |
---|
| 317 | +}; |
---|
| 318 | + |
---|
| 319 | +&sdhc { |
---|
| 320 | + status = "okay"; |
---|
| 321 | + |
---|
| 322 | + pinctrl-0 = <&sdxc_c_pins>; |
---|
| 323 | + pinctrl-names = "default"; |
---|
| 324 | + |
---|
| 325 | + bus-width = <8>; |
---|
| 326 | + max-frequency = <100000000>; |
---|
| 327 | + |
---|
| 328 | + disable-wp; |
---|
| 329 | + cap-mmc-highspeed; |
---|
| 330 | + mmc-hs200-1_8v; |
---|
| 331 | + no-sdio; |
---|
| 332 | + |
---|
| 333 | + mmc-pwrseq = <&emmc_pwrseq>; |
---|
| 334 | + |
---|
| 335 | + vmmc-supply = <&vcc_3v3>; |
---|
| 336 | + vqmmc-supply = <&vcc_1v8>; |
---|
154 | 337 | }; |
---|
155 | 338 | |
---|
156 | 339 | &sdio { |
---|
.. | .. |
---|
178 | 361 | }; |
---|
179 | 362 | }; |
---|
180 | 363 | |
---|
| 364 | +&pwm_cd { |
---|
| 365 | + status = "okay"; |
---|
| 366 | + pinctrl-0 = <&pwm_c1_pins>, <&pwm_d_pins>; |
---|
| 367 | + pinctrl-names = "default"; |
---|
| 368 | + clocks = <&xtal>, <&xtal>; |
---|
| 369 | + clock-names = "clkin0", "clkin1"; |
---|
| 370 | +}; |
---|
| 371 | + |
---|
| 372 | +&rtc { |
---|
| 373 | + /* needs to be enabled manually when a battery is connected */ |
---|
| 374 | + clocks = <&rtc32k_xtal>; |
---|
| 375 | + vdd-supply = <&vdd_rtc>; |
---|
| 376 | +}; |
---|
| 377 | + |
---|
181 | 378 | &uart_AO { |
---|
182 | 379 | status = "okay"; |
---|
183 | 380 | pinctrl-0 = <&uart_ao_a_pins>; |
---|