Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | ||||
3 | * Copyright 2022 Gateworks Corporation | ||||
4 | */ | ||||
5 | |||||
6 | #include "imx8mp-u-boot.dtsi" | ||||
7 | |||||
8 | / { | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 9 | wdt-reboot { |
10 | compatible = "wdt-reboot"; | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 11 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 12 | wdt = <&wdog1>; |
13 | }; | ||||
14 | }; | ||||
15 | |||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 16 | ðphy0 { |
17 | reset-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>; | ||||
18 | reset-delay-us = <1000>; | ||||
19 | reset-post-delay-us = <300000>; | ||||
20 | }; | ||||
21 | |||||
22 | &fec { | ||||
23 | phy-reset-gpios = <&gpio4 29 GPIO_ACTIVE_LOW>; | ||||
24 | phy-reset-duration = <15>; | ||||
25 | phy-reset-post-delay = <100>; | ||||
26 | }; | ||||
27 | |||||
28 | &gpio1 { | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 29 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 30 | |
31 | dio0_hog { | ||||
32 | gpio-hog; | ||||
33 | input; | ||||
34 | gpios = <9 GPIO_ACTIVE_LOW>; | ||||
35 | line-name = "dio0"; | ||||
36 | }; | ||||
37 | |||||
38 | dio1_hog { | ||||
39 | gpio-hog; | ||||
40 | input; | ||||
41 | gpios = <11 GPIO_ACTIVE_LOW>; | ||||
42 | line-name = "dio1"; | ||||
43 | }; | ||||
44 | }; | ||||
45 | |||||
46 | &gpio2 { | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 47 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 48 | |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 49 | m2_pin20 { |
50 | gpio-hog; | ||||
51 | input; | ||||
52 | gpios = <6 GPIO_ACTIVE_HIGH>; | ||||
53 | line-name = "m2_pin20"; | ||||
54 | }; | ||||
55 | |||||
56 | m2_pin22 { | ||||
57 | gpio-hog; | ||||
58 | input; | ||||
59 | gpios = <11 GPIO_ACTIVE_HIGH>; | ||||
60 | line-name = "m2_pin22"; | ||||
61 | }; | ||||
62 | |||||
63 | tpm_rst_hog { | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 64 | gpio-hog; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 65 | output-high; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 66 | gpios = <12 GPIO_ACTIVE_HIGH>; |
67 | line-name = "tpm_rst#"; | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 68 | }; |
69 | |||||
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 70 | pcie1_wdis_hog { |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 71 | gpio-hog; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 72 | output-high; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 73 | gpios = <13 GPIO_ACTIVE_HIGH>; |
74 | line-name = "pcie1_wdis#"; | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 75 | }; |
76 | |||||
77 | pcie3_wdis_hog { | ||||
78 | gpio-hog; | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 79 | output-high; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 80 | gpios = <14 GPIO_ACTIVE_HIGH>; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 81 | line-name = "pcie3_wdis#"; |
82 | }; | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 83 | |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 84 | pcie2_wdis_hog { |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 85 | gpio-hog; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 86 | output-high; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 87 | gpios = <18 GPIO_ACTIVE_HIGH>; |
88 | line-name = "pcie2_wdis#"; | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 89 | }; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 90 | }; |
91 | |||||
92 | &gpio3 { | ||||
93 | bootph-pre-ram; | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 94 | |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 95 | m2_rst { |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 96 | gpio-hog; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 97 | output-low; |
Tim Harvey | feb2267 | 2022-09-08 13:42:01 -0700 | [diff] [blame] | 98 | gpios = <6 GPIO_ACTIVE_HIGH>; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 99 | line-name = "m2_rst"; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 100 | }; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 101 | }; |
102 | |||||
103 | &gpio4 { | ||||
104 | bootph-pre-ram; | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 105 | |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 106 | m2_off { |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 107 | gpio-hog; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 108 | output-high; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 109 | gpios = <2 GPIO_ACTIVE_HIGH>; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 110 | line-name = "m2_off#"; |
111 | }; | ||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 112 | |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 113 | m2_wdis { |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 114 | gpio-hog; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 115 | output-high; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 116 | gpios = <18 GPIO_ACTIVE_HIGH>; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 117 | line-name = "m2_wdis#"; |
118 | }; | ||||
119 | |||||
Tim Harvey | eb7878b | 2022-09-08 13:41:08 -0700 | [diff] [blame] | 120 | rs485_en { |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 121 | gpio-hog; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 122 | output-low; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 123 | gpios = <31 GPIO_ACTIVE_HIGH>; |
Tim Harvey | eb7878b | 2022-09-08 13:41:08 -0700 | [diff] [blame] | 124 | line-name = "rs485_en"; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 125 | }; |
126 | }; | ||||
127 | |||||
128 | &gpio5 { | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 129 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 130 | |
Tim Harvey | eb7878b | 2022-09-08 13:41:08 -0700 | [diff] [blame] | 131 | rs485_half { |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 132 | gpio-hog; |
Tim Harvey | eb7878b | 2022-09-08 13:41:08 -0700 | [diff] [blame] | 133 | output-low; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 134 | gpios = <0 GPIO_ACTIVE_HIGH>; |
Tim Harvey | eb7878b | 2022-09-08 13:41:08 -0700 | [diff] [blame] | 135 | line-name = "rs485_hd"; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 136 | }; |
137 | |||||
Tim Harvey | eb7878b | 2022-09-08 13:41:08 -0700 | [diff] [blame] | 138 | rs485_term { |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 139 | gpio-hog; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 140 | output-low; |
Tim Harvey | ffe9e3c | 2023-08-15 15:01:15 -0700 | [diff] [blame] | 141 | gpios = <1 GPIO_ACTIVE_HIGH>; |
Tim Harvey | eb7878b | 2022-09-08 13:41:08 -0700 | [diff] [blame] | 142 | line-name = "rs485_term"; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 143 | }; |
144 | }; | ||||
145 | |||||
146 | &i2c1 { | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 147 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 148 | }; |
149 | |||||
150 | &i2c2 { | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 151 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 152 | }; |
153 | |||||
154 | &i2c3 { | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 155 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 156 | }; |
157 | |||||
158 | &pinctrl_i2c1 { | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 159 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 160 | }; |
161 | |||||
162 | &pinctrl_wdog { | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 163 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 164 | }; |
165 | |||||
Tim Harvey | 4475450 | 2022-09-09 14:42:11 -0700 | [diff] [blame] | 166 | &switch { |
167 | ports { | ||||
168 | #address-cells = <1>; | ||||
169 | #size-cells = <0>; | ||||
170 | |||||
171 | lan1: port@0 { | ||||
172 | phy-handle = <&sw_phy0>; | ||||
173 | }; | ||||
174 | |||||
175 | lan2: port@1 { | ||||
176 | phy-handle = <&sw_phy1>; | ||||
177 | }; | ||||
178 | |||||
179 | lan3: port@2 { | ||||
180 | phy-handle = <&sw_phy2>; | ||||
181 | }; | ||||
182 | |||||
183 | lan4: port@3 { | ||||
184 | phy-handle = <&sw_phy3>; | ||||
185 | }; | ||||
186 | |||||
187 | lan5: port@4 { | ||||
188 | phy-handle = <&sw_phy4>; | ||||
189 | }; | ||||
190 | }; | ||||
191 | |||||
192 | mdios { | ||||
193 | #address-cells = <1>; | ||||
194 | #size-cells = <0>; | ||||
195 | |||||
196 | mdio@0 { | ||||
197 | reg = <0>; | ||||
198 | compatible = "microchip,ksz-mdio"; | ||||
199 | #address-cells = <1>; | ||||
200 | #size-cells = <0>; | ||||
201 | |||||
202 | sw_phy0: ethernet-phy@0 { | ||||
203 | reg = <0x0>; | ||||
204 | }; | ||||
205 | |||||
206 | sw_phy1: ethernet-phy@1 { | ||||
207 | reg = <0x1>; | ||||
208 | }; | ||||
209 | |||||
210 | sw_phy2: ethernet-phy@2 { | ||||
211 | reg = <0x2>; | ||||
212 | }; | ||||
213 | |||||
214 | sw_phy3: ethernet-phy@3 { | ||||
215 | reg = <0x3>; | ||||
216 | }; | ||||
217 | |||||
218 | sw_phy4: ethernet-phy@4 { | ||||
219 | reg = <0x4>; | ||||
220 | }; | ||||
221 | }; | ||||
222 | }; | ||||
223 | }; | ||||
224 | |||||
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 225 | &usdhc2 { |
226 | assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_400M>; | ||||
227 | assigned-clock-rates = <400000000>; | ||||
228 | assigned-clocks = <&clk IMX8MP_CLK_USDHC2>; | ||||
229 | sd-uhs-ddr50; | ||||
230 | sd-uhs-sdr104; | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 231 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 232 | }; |
233 | |||||
234 | &usdhc3 { | ||||
235 | assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_400M>; | ||||
236 | assigned-clock-rates = <400000000>; | ||||
237 | assigned-clocks = <&clk IMX8MP_CLK_USDHC3>; | ||||
238 | mmc-hs400-1_8v; | ||||
239 | mmc-hs400-enhanced-strobe; | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 240 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 241 | }; |
242 | |||||
243 | &wdog1 { | ||||
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 244 | bootph-pre-ram; |
Tim Harvey | 0f5717f | 2022-04-13 11:31:09 -0700 | [diff] [blame] | 245 | }; |
Tim Harvey | 12f4fee | 2024-06-19 14:44:04 -0700 | [diff] [blame] | 246 | |
247 | /* gpio-usb-con not supported yet in U-Boot so make this a host for now */ | ||||
248 | &usb_dwc3_0 { | ||||
249 | dr_mode = "host"; | ||||
250 | }; |