xref: /freebsd/sys/contrib/device-tree/src/arm/nxp/imx/imx7d.dtsi (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR MIT
2*f126890aSEmmanuel Vadot//
3*f126890aSEmmanuel Vadot// Copyright 2015 Freescale Semiconductor, Inc.
4*f126890aSEmmanuel Vadot// Copyright 2016 Toradex AG
5*f126890aSEmmanuel Vadot
6*f126890aSEmmanuel Vadot#include "imx7s.dtsi"
7*f126890aSEmmanuel Vadot#include <dt-bindings/reset/imx7-reset.h>
8*f126890aSEmmanuel Vadot
9*f126890aSEmmanuel Vadot/ {
10*f126890aSEmmanuel Vadot	aliases {
11*f126890aSEmmanuel Vadot		usb0 = &usbotg1;
12*f126890aSEmmanuel Vadot		usb1 = &usbotg2;
13*f126890aSEmmanuel Vadot		usb2 = &usbh;
14*f126890aSEmmanuel Vadot	};
15*f126890aSEmmanuel Vadot
16*f126890aSEmmanuel Vadot	cpus {
17*f126890aSEmmanuel Vadot		cpu0: cpu@0 {
18*f126890aSEmmanuel Vadot			clock-frequency = <996000000>;
19*f126890aSEmmanuel Vadot			operating-points-v2 = <&cpu0_opp_table>;
20*f126890aSEmmanuel Vadot			#cooling-cells = <2>;
21*f126890aSEmmanuel Vadot			nvmem-cells = <&fuse_grade>;
22*f126890aSEmmanuel Vadot			nvmem-cell-names = "speed_grade";
23*f126890aSEmmanuel Vadot		};
24*f126890aSEmmanuel Vadot
25*f126890aSEmmanuel Vadot		cpu1: cpu@1 {
26*f126890aSEmmanuel Vadot			compatible = "arm,cortex-a7";
27*f126890aSEmmanuel Vadot			device_type = "cpu";
28*f126890aSEmmanuel Vadot			reg = <1>;
29*f126890aSEmmanuel Vadot			clock-frequency = <996000000>;
30*f126890aSEmmanuel Vadot			operating-points-v2 = <&cpu0_opp_table>;
31*f126890aSEmmanuel Vadot			#cooling-cells = <2>;
32*f126890aSEmmanuel Vadot			cpu-idle-states = <&cpu_sleep_wait>;
33*f126890aSEmmanuel Vadot		};
34*f126890aSEmmanuel Vadot	};
35*f126890aSEmmanuel Vadot
36*f126890aSEmmanuel Vadot	timer {
37*f126890aSEmmanuel Vadot		compatible = "arm,armv7-timer";
38*f126890aSEmmanuel Vadot		interrupt-parent = <&intc>;
39*f126890aSEmmanuel Vadot		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
40*f126890aSEmmanuel Vadot			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
41*f126890aSEmmanuel Vadot			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
42*f126890aSEmmanuel Vadot			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
43*f126890aSEmmanuel Vadot	};
44*f126890aSEmmanuel Vadot
45*f126890aSEmmanuel Vadot	cpu0_opp_table: opp-table {
46*f126890aSEmmanuel Vadot		compatible = "operating-points-v2";
47*f126890aSEmmanuel Vadot		opp-shared;
48*f126890aSEmmanuel Vadot
49*f126890aSEmmanuel Vadot		opp-792000000 {
50*f126890aSEmmanuel Vadot			opp-hz = /bits/ 64 <792000000>;
51*f126890aSEmmanuel Vadot			opp-microvolt = <1000000>;
52*f126890aSEmmanuel Vadot			clock-latency-ns = <150000>;
53*f126890aSEmmanuel Vadot			opp-supported-hw = <0xd>, <0x7>;
54*f126890aSEmmanuel Vadot			opp-suspend;
55*f126890aSEmmanuel Vadot		};
56*f126890aSEmmanuel Vadot
57*f126890aSEmmanuel Vadot		opp-996000000 {
58*f126890aSEmmanuel Vadot			opp-hz = /bits/ 64 <996000000>;
59*f126890aSEmmanuel Vadot			opp-microvolt = <1100000>;
60*f126890aSEmmanuel Vadot			clock-latency-ns = <150000>;
61*f126890aSEmmanuel Vadot			opp-supported-hw = <0xc>, <0x7>;
62*f126890aSEmmanuel Vadot			opp-suspend;
63*f126890aSEmmanuel Vadot		};
64*f126890aSEmmanuel Vadot
65*f126890aSEmmanuel Vadot		opp-1200000000 {
66*f126890aSEmmanuel Vadot			opp-hz = /bits/ 64 <1200000000>;
67*f126890aSEmmanuel Vadot			opp-microvolt = <1225000>;
68*f126890aSEmmanuel Vadot			clock-latency-ns = <150000>;
69*f126890aSEmmanuel Vadot			opp-supported-hw = <0x8>, <0x3>;
70*f126890aSEmmanuel Vadot			opp-suspend;
71*f126890aSEmmanuel Vadot		};
72*f126890aSEmmanuel Vadot	};
73*f126890aSEmmanuel Vadot
74*f126890aSEmmanuel Vadot	usbphynop2: usbphynop2 {
75*f126890aSEmmanuel Vadot		compatible = "usb-nop-xceiv";
76*f126890aSEmmanuel Vadot		clocks = <&clks IMX7D_USB_PHY2_CLK>;
77*f126890aSEmmanuel Vadot		clock-names = "main_clk";
78*f126890aSEmmanuel Vadot		#phy-cells = <0>;
79*f126890aSEmmanuel Vadot	};
80*f126890aSEmmanuel Vadot
81*f126890aSEmmanuel Vadot	soc: soc {
82*f126890aSEmmanuel Vadot		etm@3007d000 {
83*f126890aSEmmanuel Vadot			compatible = "arm,coresight-etm3x", "arm,primecell";
84*f126890aSEmmanuel Vadot			reg = <0x3007d000 0x1000>;
85*f126890aSEmmanuel Vadot
86*f126890aSEmmanuel Vadot			/*
87*f126890aSEmmanuel Vadot			 * System will hang if added nosmp in kernel command line
88*f126890aSEmmanuel Vadot			 * without arm,primecell-periphid because amba bus try to
89*f126890aSEmmanuel Vadot			 * read id and core1 power off at this time.
90*f126890aSEmmanuel Vadot			 */
91*f126890aSEmmanuel Vadot			arm,primecell-periphid = <0xbb956>;
92*f126890aSEmmanuel Vadot			cpu = <&cpu1>;
93*f126890aSEmmanuel Vadot			clocks = <&clks IMX7D_MAIN_AXI_ROOT_CLK>;
94*f126890aSEmmanuel Vadot			clock-names = "apb_pclk";
95*f126890aSEmmanuel Vadot
96*f126890aSEmmanuel Vadot			out-ports {
97*f126890aSEmmanuel Vadot				port {
98*f126890aSEmmanuel Vadot					etm1_out_port: endpoint {
99*f126890aSEmmanuel Vadot						remote-endpoint = <&ca_funnel_in_port1>;
100*f126890aSEmmanuel Vadot					};
101*f126890aSEmmanuel Vadot				};
102*f126890aSEmmanuel Vadot			};
103*f126890aSEmmanuel Vadot		};
104*f126890aSEmmanuel Vadot
105*f126890aSEmmanuel Vadot		intc: interrupt-controller@31001000 {
106*f126890aSEmmanuel Vadot			compatible = "arm,cortex-a7-gic";
107*f126890aSEmmanuel Vadot			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
108*f126890aSEmmanuel Vadot			#interrupt-cells = <3>;
109*f126890aSEmmanuel Vadot			interrupt-controller;
110*f126890aSEmmanuel Vadot			interrupt-parent = <&intc>;
111*f126890aSEmmanuel Vadot			reg = <0x31001000 0x1000>,
112*f126890aSEmmanuel Vadot			      <0x31002000 0x2000>,
113*f126890aSEmmanuel Vadot			      <0x31004000 0x2000>,
114*f126890aSEmmanuel Vadot			      <0x31006000 0x2000>;
115*f126890aSEmmanuel Vadot		};
116*f126890aSEmmanuel Vadot
117*f126890aSEmmanuel Vadot		pcie: pcie@33800000 {
118*f126890aSEmmanuel Vadot			compatible = "fsl,imx7d-pcie";
119*f126890aSEmmanuel Vadot			reg = <0x33800000 0x4000>,
120*f126890aSEmmanuel Vadot			      <0x4ff00000 0x80000>;
121*f126890aSEmmanuel Vadot			reg-names = "dbi", "config";
122*f126890aSEmmanuel Vadot			#address-cells = <3>;
123*f126890aSEmmanuel Vadot			#size-cells = <2>;
124*f126890aSEmmanuel Vadot			device_type = "pci";
125*f126890aSEmmanuel Vadot			bus-range = <0x00 0xff>;
126*f126890aSEmmanuel Vadot			ranges = <0x81000000 0 0          0x4ff80000 0 0x00010000>, /* downstream I/O */
127*f126890aSEmmanuel Vadot				 <0x82000000 0 0x40000000 0x40000000 0 0x0ff00000>; /* non-prefetchable memory */
128*f126890aSEmmanuel Vadot			num-lanes = <1>;
129*f126890aSEmmanuel Vadot			interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
130*f126890aSEmmanuel Vadot			interrupt-names = "msi";
131*f126890aSEmmanuel Vadot			#interrupt-cells = <1>;
132*f126890aSEmmanuel Vadot			interrupt-map-mask = <0 0 0 0x7>;
133*f126890aSEmmanuel Vadot			/*
134*f126890aSEmmanuel Vadot			 * Reference manual lists pci irqs incorrectly
135*f126890aSEmmanuel Vadot			 * Real hardware ordering is same as imx6: D+MSI, C, B, A
136*f126890aSEmmanuel Vadot			 */
137*f126890aSEmmanuel Vadot			interrupt-map = <0 0 0 1 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
138*f126890aSEmmanuel Vadot					<0 0 0 2 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
139*f126890aSEmmanuel Vadot					<0 0 0 3 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
140*f126890aSEmmanuel Vadot					<0 0 0 4 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
141*f126890aSEmmanuel Vadot			clocks = <&clks IMX7D_PCIE_CTRL_ROOT_CLK>,
142*f126890aSEmmanuel Vadot				 <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>,
143*f126890aSEmmanuel Vadot				 <&clks IMX7D_PCIE_PHY_ROOT_CLK>;
144*f126890aSEmmanuel Vadot			clock-names = "pcie", "pcie_bus", "pcie_phy";
145*f126890aSEmmanuel Vadot			assigned-clocks = <&clks IMX7D_PCIE_CTRL_ROOT_SRC>,
146*f126890aSEmmanuel Vadot					  <&clks IMX7D_PCIE_PHY_ROOT_SRC>;
147*f126890aSEmmanuel Vadot			assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_250M_CLK>,
148*f126890aSEmmanuel Vadot						 <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
149*f126890aSEmmanuel Vadot
150*f126890aSEmmanuel Vadot			fsl,max-link-speed = <2>;
151*f126890aSEmmanuel Vadot			power-domains = <&pgc_pcie_phy>;
152*f126890aSEmmanuel Vadot			resets = <&src IMX7_RESET_PCIEPHY>,
153*f126890aSEmmanuel Vadot				 <&src IMX7_RESET_PCIE_CTRL_APPS_EN>,
154*f126890aSEmmanuel Vadot				 <&src IMX7_RESET_PCIE_CTRL_APPS_TURNOFF>;
155*f126890aSEmmanuel Vadot			reset-names = "pciephy", "apps", "turnoff";
156*f126890aSEmmanuel Vadot			fsl,imx7d-pcie-phy = <&pcie_phy>;
157*f126890aSEmmanuel Vadot			status = "disabled";
158*f126890aSEmmanuel Vadot		};
159*f126890aSEmmanuel Vadot	};
160*f126890aSEmmanuel Vadot};
161*f126890aSEmmanuel Vadot
162*f126890aSEmmanuel Vadot&aips2 {
163*f126890aSEmmanuel Vadot	pcie_phy: pcie-phy@306d0000 {
164*f126890aSEmmanuel Vadot		  compatible = "fsl,imx7d-pcie-phy";
165*f126890aSEmmanuel Vadot		  reg = <0x306d0000 0x10000>;
166*f126890aSEmmanuel Vadot		  status = "disabled";
167*f126890aSEmmanuel Vadot	};
168*f126890aSEmmanuel Vadot
169*f126890aSEmmanuel Vadot	pxp: pxp@30700000 {
170*f126890aSEmmanuel Vadot		compatible = "fsl,imx7d-pxp";
171*f126890aSEmmanuel Vadot		reg = <0x30700000 0x10000>;
172*f126890aSEmmanuel Vadot		interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
173*f126890aSEmmanuel Vadot			     <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
174*f126890aSEmmanuel Vadot		clocks = <&clks IMX7D_PXP_CLK>;
175*f126890aSEmmanuel Vadot		clock-names = "axi";
176*f126890aSEmmanuel Vadot	};
177*f126890aSEmmanuel Vadot};
178*f126890aSEmmanuel Vadot
179*f126890aSEmmanuel Vadot&aips3 {
180*f126890aSEmmanuel Vadot	usbotg2: usb@30b20000 {
181*f126890aSEmmanuel Vadot		compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
182*f126890aSEmmanuel Vadot		reg = <0x30b20000 0x200>;
183*f126890aSEmmanuel Vadot		interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
184*f126890aSEmmanuel Vadot		clocks = <&clks IMX7D_USB_CTRL_CLK>;
185*f126890aSEmmanuel Vadot		fsl,usbphy = <&usbphynop2>;
186*f126890aSEmmanuel Vadot		fsl,usbmisc = <&usbmisc2 0>;
187*f126890aSEmmanuel Vadot		phy-clkgate-delay-us = <400>;
188*f126890aSEmmanuel Vadot		status = "disabled";
189*f126890aSEmmanuel Vadot	};
190*f126890aSEmmanuel Vadot
191*f126890aSEmmanuel Vadot	usbmisc2: usbmisc@30b20200 {
192*f126890aSEmmanuel Vadot		#index-cells = <1>;
193*f126890aSEmmanuel Vadot		compatible = "fsl,imx7d-usbmisc", "fsl,imx6q-usbmisc";
194*f126890aSEmmanuel Vadot		reg = <0x30b20200 0x200>;
195*f126890aSEmmanuel Vadot	};
196*f126890aSEmmanuel Vadot
197*f126890aSEmmanuel Vadot	fec2: ethernet@30bf0000 {
198*f126890aSEmmanuel Vadot		compatible = "fsl,imx7d-fec", "fsl,imx6sx-fec";
199*f126890aSEmmanuel Vadot		reg = <0x30bf0000 0x10000>;
200*f126890aSEmmanuel Vadot		interrupt-names = "int0", "int1", "int2", "pps";
201*f126890aSEmmanuel Vadot		interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
202*f126890aSEmmanuel Vadot			<GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
203*f126890aSEmmanuel Vadot			<GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
204*f126890aSEmmanuel Vadot			<GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
205*f126890aSEmmanuel Vadot		clocks = <&clks IMX7D_ENET2_IPG_ROOT_CLK>,
206*f126890aSEmmanuel Vadot			<&clks IMX7D_ENET_AXI_ROOT_CLK>,
207*f126890aSEmmanuel Vadot			<&clks IMX7D_ENET2_TIME_ROOT_CLK>,
208*f126890aSEmmanuel Vadot			<&clks IMX7D_PLL_ENET_MAIN_125M_CLK>,
209*f126890aSEmmanuel Vadot			<&clks IMX7D_ENET_PHY_REF_ROOT_CLK>;
210*f126890aSEmmanuel Vadot		clock-names = "ipg", "ahb", "ptp",
211*f126890aSEmmanuel Vadot			"enet_clk_ref", "enet_out";
212*f126890aSEmmanuel Vadot		fsl,num-tx-queues = <3>;
213*f126890aSEmmanuel Vadot		fsl,num-rx-queues = <3>;
214*f126890aSEmmanuel Vadot		fsl,stop-mode = <&gpr 0x10 4>;
215*f126890aSEmmanuel Vadot		status = "disabled";
216*f126890aSEmmanuel Vadot	};
217*f126890aSEmmanuel Vadot};
218*f126890aSEmmanuel Vadot
219*f126890aSEmmanuel Vadot&ca_funnel_in_ports {
220*f126890aSEmmanuel Vadot	port@1 {
221*f126890aSEmmanuel Vadot		reg = <1>;
222*f126890aSEmmanuel Vadot		ca_funnel_in_port1: endpoint {
223*f126890aSEmmanuel Vadot			remote-endpoint = <&etm1_out_port>;
224*f126890aSEmmanuel Vadot		};
225*f126890aSEmmanuel Vadot	};
226*f126890aSEmmanuel Vadot};
227