blob: a90794d8108a3b6a81842cd0226aaed5a01c736a [file] [log] [blame]
Tim Harvey0f5717f2022-04-13 11:31:09 -07001// 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 Harvey0f5717f2022-04-13 11:31:09 -07009 wdt-reboot {
10 compatible = "wdt-reboot";
Simon Glassd3a98cb2023-02-13 08:56:33 -070011 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -070012 wdt = <&wdog1>;
13 };
14};
15
Tim Harvey0f5717f2022-04-13 11:31:09 -070016&ethphy0 {
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 Glassd3a98cb2023-02-13 08:56:33 -070029 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -070030
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 Glassd3a98cb2023-02-13 08:56:33 -070047 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -070048
Tim Harveyffe9e3c2023-08-15 15:01:15 -070049 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 Harvey0f5717f2022-04-13 11:31:09 -070064 gpio-hog;
Tim Harvey0f5717f2022-04-13 11:31:09 -070065 output-high;
Tim Harveyffe9e3c2023-08-15 15:01:15 -070066 gpios = <12 GPIO_ACTIVE_HIGH>;
67 line-name = "tpm_rst#";
Tim Harvey0f5717f2022-04-13 11:31:09 -070068 };
69
Tim Harveyffe9e3c2023-08-15 15:01:15 -070070 pcie1_wdis_hog {
Tim Harvey0f5717f2022-04-13 11:31:09 -070071 gpio-hog;
Tim Harvey0f5717f2022-04-13 11:31:09 -070072 output-high;
Tim Harveyffe9e3c2023-08-15 15:01:15 -070073 gpios = <13 GPIO_ACTIVE_HIGH>;
74 line-name = "pcie1_wdis#";
Tim Harvey0f5717f2022-04-13 11:31:09 -070075 };
76
77 pcie3_wdis_hog {
78 gpio-hog;
Tim Harvey0f5717f2022-04-13 11:31:09 -070079 output-high;
Tim Harveyffe9e3c2023-08-15 15:01:15 -070080 gpios = <14 GPIO_ACTIVE_HIGH>;
Tim Harvey0f5717f2022-04-13 11:31:09 -070081 line-name = "pcie3_wdis#";
82 };
Tim Harvey0f5717f2022-04-13 11:31:09 -070083
Tim Harveyffe9e3c2023-08-15 15:01:15 -070084 pcie2_wdis_hog {
Tim Harvey0f5717f2022-04-13 11:31:09 -070085 gpio-hog;
Tim Harvey0f5717f2022-04-13 11:31:09 -070086 output-high;
Tim Harveyffe9e3c2023-08-15 15:01:15 -070087 gpios = <18 GPIO_ACTIVE_HIGH>;
88 line-name = "pcie2_wdis#";
Tim Harvey0f5717f2022-04-13 11:31:09 -070089 };
Tim Harveyffe9e3c2023-08-15 15:01:15 -070090};
91
92&gpio3 {
93 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -070094
Tim Harveyffe9e3c2023-08-15 15:01:15 -070095 m2_rst {
Tim Harvey0f5717f2022-04-13 11:31:09 -070096 gpio-hog;
Tim Harveyffe9e3c2023-08-15 15:01:15 -070097 output-low;
Tim Harveyfeb22672022-09-08 13:42:01 -070098 gpios = <6 GPIO_ACTIVE_HIGH>;
Tim Harveyffe9e3c2023-08-15 15:01:15 -070099 line-name = "m2_rst";
Tim Harvey0f5717f2022-04-13 11:31:09 -0700100 };
Tim Harveyffe9e3c2023-08-15 15:01:15 -0700101};
102
103&gpio4 {
104 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700105
Tim Harveyffe9e3c2023-08-15 15:01:15 -0700106 m2_off {
Tim Harvey0f5717f2022-04-13 11:31:09 -0700107 gpio-hog;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700108 output-high;
Tim Harveyffe9e3c2023-08-15 15:01:15 -0700109 gpios = <2 GPIO_ACTIVE_HIGH>;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700110 line-name = "m2_off#";
111 };
Tim Harvey0f5717f2022-04-13 11:31:09 -0700112
Tim Harveyffe9e3c2023-08-15 15:01:15 -0700113 m2_wdis {
Tim Harvey0f5717f2022-04-13 11:31:09 -0700114 gpio-hog;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700115 output-high;
Tim Harveyffe9e3c2023-08-15 15:01:15 -0700116 gpios = <18 GPIO_ACTIVE_HIGH>;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700117 line-name = "m2_wdis#";
118 };
119
Tim Harveyeb7878b2022-09-08 13:41:08 -0700120 rs485_en {
Tim Harvey0f5717f2022-04-13 11:31:09 -0700121 gpio-hog;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700122 output-low;
Tim Harveyffe9e3c2023-08-15 15:01:15 -0700123 gpios = <31 GPIO_ACTIVE_HIGH>;
Tim Harveyeb7878b2022-09-08 13:41:08 -0700124 line-name = "rs485_en";
Tim Harvey0f5717f2022-04-13 11:31:09 -0700125 };
126};
127
128&gpio5 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700129 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700130
Tim Harveyeb7878b2022-09-08 13:41:08 -0700131 rs485_half {
Tim Harvey0f5717f2022-04-13 11:31:09 -0700132 gpio-hog;
Tim Harveyeb7878b2022-09-08 13:41:08 -0700133 output-low;
Tim Harveyffe9e3c2023-08-15 15:01:15 -0700134 gpios = <0 GPIO_ACTIVE_HIGH>;
Tim Harveyeb7878b2022-09-08 13:41:08 -0700135 line-name = "rs485_hd";
Tim Harvey0f5717f2022-04-13 11:31:09 -0700136 };
137
Tim Harveyeb7878b2022-09-08 13:41:08 -0700138 rs485_term {
Tim Harvey0f5717f2022-04-13 11:31:09 -0700139 gpio-hog;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700140 output-low;
Tim Harveyffe9e3c2023-08-15 15:01:15 -0700141 gpios = <1 GPIO_ACTIVE_HIGH>;
Tim Harveyeb7878b2022-09-08 13:41:08 -0700142 line-name = "rs485_term";
Tim Harvey0f5717f2022-04-13 11:31:09 -0700143 };
144};
145
146&i2c1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700147 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700148};
149
150&i2c2 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700151 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700152};
153
154&i2c3 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700155 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700156};
157
158&pinctrl_i2c1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700159 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700160};
161
162&pinctrl_wdog {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700163 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700164};
165
Tim Harvey44754502022-09-09 14:42:11 -0700166&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 Harvey0f5717f2022-04-13 11:31:09 -0700225&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 Glassd3a98cb2023-02-13 08:56:33 -0700231 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700232};
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 Glassd3a98cb2023-02-13 08:56:33 -0700240 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700241};
242
243&wdog1 {
Simon Glassd3a98cb2023-02-13 08:56:33 -0700244 bootph-pre-ram;
Tim Harvey0f5717f2022-04-13 11:31:09 -0700245};
Tim Harvey12f4fee2024-06-19 14:44:04 -0700246
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};