15067f459SPeter Geis// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
25067f459SPeter Geis/*
35067f459SPeter Geis * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
45067f459SPeter Geis */
55067f459SPeter Geis
65067f459SPeter Geis#include "rk356x.dtsi"
75067f459SPeter Geis
85067f459SPeter Geis/ {
95067f459SPeter Geis	compatible = "rockchip,rk3568";
105067f459SPeter Geis
1116c0f95dSFrank Wunderlich	sata0: sata@fc000000 {
1216c0f95dSFrank Wunderlich		compatible = "rockchip,rk3568-dwc-ahci", "snps,dwc-ahci";
1316c0f95dSFrank Wunderlich		reg = <0 0xfc000000 0 0x1000>;
1416c0f95dSFrank Wunderlich		clocks = <&cru ACLK_SATA0>, <&cru CLK_SATA0_PMALIVE>,
1516c0f95dSFrank Wunderlich			 <&cru CLK_SATA0_RXOOB>;
1616c0f95dSFrank Wunderlich		clock-names = "sata", "pmalive", "rxoob";
1716c0f95dSFrank Wunderlich		interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
1816c0f95dSFrank Wunderlich		phys = <&combphy0 PHY_TYPE_SATA>;
1916c0f95dSFrank Wunderlich		phy-names = "sata-phy";
2016c0f95dSFrank Wunderlich		ports-implemented = <0x1>;
2116c0f95dSFrank Wunderlich		power-domains = <&power RK3568_PD_PIPE>;
2216c0f95dSFrank Wunderlich		status = "disabled";
2316c0f95dSFrank Wunderlich	};
2416c0f95dSFrank Wunderlich
253cc8cd2dSYifeng Zhao	pipe_phy_grf0: syscon@fdc70000 {
263cc8cd2dSYifeng Zhao		compatible = "rockchip,rk3568-pipe-phy-grf", "syscon";
273cc8cd2dSYifeng Zhao		reg = <0x0 0xfdc70000 0x0 0x1000>;
283cc8cd2dSYifeng Zhao	};
293cc8cd2dSYifeng Zhao
305067f459SPeter Geis	qos_pcie3x1: qos@fe190080 {
315067f459SPeter Geis		compatible = "rockchip,rk3568-qos", "syscon";
325067f459SPeter Geis		reg = <0x0 0xfe190080 0x0 0x20>;
335067f459SPeter Geis	};
345067f459SPeter Geis
355067f459SPeter Geis	qos_pcie3x2: qos@fe190100 {
365067f459SPeter Geis		compatible = "rockchip,rk3568-qos", "syscon";
375067f459SPeter Geis		reg = <0x0 0xfe190100 0x0 0x20>;
385067f459SPeter Geis	};
395067f459SPeter Geis
405067f459SPeter Geis	qos_sata0: qos@fe190200 {
415067f459SPeter Geis		compatible = "rockchip,rk3568-qos", "syscon";
425067f459SPeter Geis		reg = <0x0 0xfe190200 0x0 0x20>;
435067f459SPeter Geis	};
44b8d41e50SMichael Riesch
45*faedfa5bSFrank Wunderlich	pcie30_phy_grf: syscon@fdcb8000 {
46*faedfa5bSFrank Wunderlich		compatible = "rockchip,rk3568-pcie3-phy-grf", "syscon";
47*faedfa5bSFrank Wunderlich		reg = <0x0 0xfdcb8000 0x0 0x10000>;
48*faedfa5bSFrank Wunderlich	};
49*faedfa5bSFrank Wunderlich
50*faedfa5bSFrank Wunderlich	pcie30phy: phy@fe8c0000 {
51*faedfa5bSFrank Wunderlich		compatible = "rockchip,rk3568-pcie3-phy";
52*faedfa5bSFrank Wunderlich		reg = <0x0 0xfe8c0000 0x0 0x20000>;
53*faedfa5bSFrank Wunderlich		#phy-cells = <0>;
54*faedfa5bSFrank Wunderlich		clocks = <&pmucru CLK_PCIE30PHY_REF_M>, <&pmucru CLK_PCIE30PHY_REF_N>,
55*faedfa5bSFrank Wunderlich			 <&cru PCLK_PCIE30PHY>;
56*faedfa5bSFrank Wunderlich		clock-names = "refclk_m", "refclk_n", "pclk";
57*faedfa5bSFrank Wunderlich		resets = <&cru SRST_PCIE30PHY>;
58*faedfa5bSFrank Wunderlich		reset-names = "phy";
59*faedfa5bSFrank Wunderlich		rockchip,phy-grf = <&pcie30_phy_grf>;
60*faedfa5bSFrank Wunderlich		status = "disabled";
61*faedfa5bSFrank Wunderlich	};
62*faedfa5bSFrank Wunderlich
63*faedfa5bSFrank Wunderlich	pcie3x1: pcie@fe270000 {
64*faedfa5bSFrank Wunderlich		compatible = "rockchip,rk3568-pcie";
65*faedfa5bSFrank Wunderlich		#address-cells = <3>;
66*faedfa5bSFrank Wunderlich		#size-cells = <2>;
67*faedfa5bSFrank Wunderlich		bus-range = <0x0 0xf>;
68*faedfa5bSFrank Wunderlich		clocks = <&cru ACLK_PCIE30X1_MST>, <&cru ACLK_PCIE30X1_SLV>,
69*faedfa5bSFrank Wunderlich			 <&cru ACLK_PCIE30X1_DBI>, <&cru PCLK_PCIE30X1>,
70*faedfa5bSFrank Wunderlich			 <&cru CLK_PCIE30X1_AUX_NDFT>;
71*faedfa5bSFrank Wunderlich		clock-names = "aclk_mst", "aclk_slv",
72*faedfa5bSFrank Wunderlich			      "aclk_dbi", "pclk", "aux";
73*faedfa5bSFrank Wunderlich		device_type = "pci";
74*faedfa5bSFrank Wunderlich		interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
75*faedfa5bSFrank Wunderlich			     <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
76*faedfa5bSFrank Wunderlich			     <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
77*faedfa5bSFrank Wunderlich			     <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
78*faedfa5bSFrank Wunderlich			     <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
79*faedfa5bSFrank Wunderlich		interrupt-names = "sys", "pmc", "msg", "legacy", "err";
80*faedfa5bSFrank Wunderlich		#interrupt-cells = <1>;
81*faedfa5bSFrank Wunderlich		interrupt-map-mask = <0 0 0 7>;
82*faedfa5bSFrank Wunderlich		interrupt-map = <0 0 0 1 &pcie3x1_intc 0>,
83*faedfa5bSFrank Wunderlich				<0 0 0 2 &pcie3x1_intc 1>,
84*faedfa5bSFrank Wunderlich				<0 0 0 3 &pcie3x1_intc 2>,
85*faedfa5bSFrank Wunderlich				<0 0 0 4 &pcie3x1_intc 3>;
86*faedfa5bSFrank Wunderlich		linux,pci-domain = <1>;
87*faedfa5bSFrank Wunderlich		num-ib-windows = <6>;
88*faedfa5bSFrank Wunderlich		num-ob-windows = <2>;
89*faedfa5bSFrank Wunderlich		max-link-speed = <3>;
90*faedfa5bSFrank Wunderlich		msi-map = <0x0 &gic 0x1000 0x1000>;
91*faedfa5bSFrank Wunderlich		num-lanes = <1>;
92*faedfa5bSFrank Wunderlich		phys = <&pcie30phy>;
93*faedfa5bSFrank Wunderlich		phy-names = "pcie-phy";
94*faedfa5bSFrank Wunderlich		power-domains = <&power RK3568_PD_PIPE>;
95*faedfa5bSFrank Wunderlich		reg = <0x3 0xc0400000 0x0 0x00400000>,
96*faedfa5bSFrank Wunderlich		      <0x0 0xfe270000 0x0 0x00010000>,
97*faedfa5bSFrank Wunderlich		      <0x3 0x7f000000 0x0 0x01000000>;
98*faedfa5bSFrank Wunderlich		ranges = <0x01000000 0x0 0x3ef00000 0x3 0x7ef00000 0x0 0x00100000>,
99*faedfa5bSFrank Wunderlich			 <0x02000000 0x0 0x00000000 0x3 0x40000000 0x0 0x3ef00000>;
100*faedfa5bSFrank Wunderlich		reg-names = "dbi", "apb", "config";
101*faedfa5bSFrank Wunderlich		resets = <&cru SRST_PCIE30X1_POWERUP>;
102*faedfa5bSFrank Wunderlich		reset-names = "pipe";
103*faedfa5bSFrank Wunderlich		/* bifurcation; lane1 when using 1+1 */
104*faedfa5bSFrank Wunderlich		status = "disabled";
105*faedfa5bSFrank Wunderlich
106*faedfa5bSFrank Wunderlich		pcie3x1_intc: legacy-interrupt-controller {
107*faedfa5bSFrank Wunderlich			interrupt-controller;
108*faedfa5bSFrank Wunderlich			#address-cells = <0>;
109*faedfa5bSFrank Wunderlich			#interrupt-cells = <1>;
110*faedfa5bSFrank Wunderlich			interrupt-parent = <&gic>;
111*faedfa5bSFrank Wunderlich			interrupts = <GIC_SPI 157 IRQ_TYPE_EDGE_RISING>;
112*faedfa5bSFrank Wunderlich		};
113*faedfa5bSFrank Wunderlich	};
114*faedfa5bSFrank Wunderlich
115*faedfa5bSFrank Wunderlich	pcie3x2: pcie@fe280000 {
116*faedfa5bSFrank Wunderlich		compatible = "rockchip,rk3568-pcie";
117*faedfa5bSFrank Wunderlich		#address-cells = <3>;
118*faedfa5bSFrank Wunderlich		#size-cells = <2>;
119*faedfa5bSFrank Wunderlich		bus-range = <0x0 0xf>;
120*faedfa5bSFrank Wunderlich		clocks = <&cru ACLK_PCIE30X2_MST>, <&cru ACLK_PCIE30X2_SLV>,
121*faedfa5bSFrank Wunderlich			 <&cru ACLK_PCIE30X2_DBI>, <&cru PCLK_PCIE30X2>,
122*faedfa5bSFrank Wunderlich			 <&cru CLK_PCIE30X2_AUX_NDFT>;
123*faedfa5bSFrank Wunderlich		clock-names = "aclk_mst", "aclk_slv",
124*faedfa5bSFrank Wunderlich			      "aclk_dbi", "pclk", "aux";
125*faedfa5bSFrank Wunderlich		device_type = "pci";
126*faedfa5bSFrank Wunderlich		interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>,
127*faedfa5bSFrank Wunderlich			     <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>,
128*faedfa5bSFrank Wunderlich			     <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
129*faedfa5bSFrank Wunderlich			     <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
130*faedfa5bSFrank Wunderlich			     <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
131*faedfa5bSFrank Wunderlich		interrupt-names = "sys", "pmc", "msg", "legacy", "err";
132*faedfa5bSFrank Wunderlich		#interrupt-cells = <1>;
133*faedfa5bSFrank Wunderlich		interrupt-map-mask = <0 0 0 7>;
134*faedfa5bSFrank Wunderlich		interrupt-map = <0 0 0 1 &pcie3x2_intc 0>,
135*faedfa5bSFrank Wunderlich				<0 0 0 2 &pcie3x2_intc 1>,
136*faedfa5bSFrank Wunderlich				<0 0 0 3 &pcie3x2_intc 2>,
137*faedfa5bSFrank Wunderlich				<0 0 0 4 &pcie3x2_intc 3>;
138*faedfa5bSFrank Wunderlich		linux,pci-domain = <2>;
139*faedfa5bSFrank Wunderlich		num-ib-windows = <6>;
140*faedfa5bSFrank Wunderlich		num-ob-windows = <2>;
141*faedfa5bSFrank Wunderlich		max-link-speed = <3>;
142*faedfa5bSFrank Wunderlich		msi-map = <0x0 &gic 0x2000 0x1000>;
143*faedfa5bSFrank Wunderlich		num-lanes = <2>;
144*faedfa5bSFrank Wunderlich		phys = <&pcie30phy>;
145*faedfa5bSFrank Wunderlich		phy-names = "pcie-phy";
146*faedfa5bSFrank Wunderlich		power-domains = <&power RK3568_PD_PIPE>;
147*faedfa5bSFrank Wunderlich		reg = <0x3 0xc0800000 0x0 0x00400000>,
148*faedfa5bSFrank Wunderlich		      <0x0 0xfe280000 0x0 0x00010000>,
149*faedfa5bSFrank Wunderlich		      <0x3 0xbf000000 0x0 0x01000000>;
150*faedfa5bSFrank Wunderlich		ranges = <0x01000000 0x0 0x3ef00000 0x3 0xbef00000 0x0 0x00100000>,
151*faedfa5bSFrank Wunderlich			 <0x02000000 0x0 0x00000000 0x3 0x80000000 0x0 0x3ef00000>;
152*faedfa5bSFrank Wunderlich		reg-names = "dbi", "apb", "config";
153*faedfa5bSFrank Wunderlich		resets = <&cru SRST_PCIE30X2_POWERUP>;
154*faedfa5bSFrank Wunderlich		reset-names = "pipe";
155*faedfa5bSFrank Wunderlich		/* bifurcation; lane0 when using 1+1 */
156*faedfa5bSFrank Wunderlich		status = "disabled";
157*faedfa5bSFrank Wunderlich
158*faedfa5bSFrank Wunderlich		pcie3x2_intc: legacy-interrupt-controller {
159*faedfa5bSFrank Wunderlich			interrupt-controller;
160*faedfa5bSFrank Wunderlich			#address-cells = <0>;
161*faedfa5bSFrank Wunderlich			#interrupt-cells = <1>;
162*faedfa5bSFrank Wunderlich			interrupt-parent = <&gic>;
163*faedfa5bSFrank Wunderlich			interrupts = <GIC_SPI 162 IRQ_TYPE_EDGE_RISING>;
164*faedfa5bSFrank Wunderlich		};
165*faedfa5bSFrank Wunderlich	};
166*faedfa5bSFrank Wunderlich
167b8d41e50SMichael Riesch	gmac0: ethernet@fe2a0000 {
168b8d41e50SMichael Riesch		compatible = "rockchip,rk3568-gmac", "snps,dwmac-4.20a";
169b8d41e50SMichael Riesch		reg = <0x0 0xfe2a0000 0x0 0x10000>;
170b8d41e50SMichael Riesch		interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
171b8d41e50SMichael Riesch			     <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
172b8d41e50SMichael Riesch		interrupt-names = "macirq", "eth_wake_irq";
173b8d41e50SMichael Riesch		clocks = <&cru SCLK_GMAC0>, <&cru SCLK_GMAC0_RX_TX>,
174b8d41e50SMichael Riesch			 <&cru SCLK_GMAC0_RX_TX>, <&cru CLK_MAC0_REFOUT>,
175b8d41e50SMichael Riesch			 <&cru ACLK_GMAC0>, <&cru PCLK_GMAC0>,
17685a8bccfSFrank Wunderlich			 <&cru SCLK_GMAC0_RX_TX>, <&cru CLK_GMAC0_PTP_REF>;
177b8d41e50SMichael Riesch		clock-names = "stmmaceth", "mac_clk_rx",
178b8d41e50SMichael Riesch			      "mac_clk_tx", "clk_mac_refout",
179b8d41e50SMichael Riesch			      "aclk_mac", "pclk_mac",
18085a8bccfSFrank Wunderlich			      "clk_mac_speed", "ptp_ref";
181b8d41e50SMichael Riesch		resets = <&cru SRST_A_GMAC0>;
182b8d41e50SMichael Riesch		reset-names = "stmmaceth";
183b8d41e50SMichael Riesch		rockchip,grf = <&grf>;
184b8d41e50SMichael Riesch		snps,axi-config = <&gmac0_stmmac_axi_setup>;
185b8d41e50SMichael Riesch		snps,mixed-burst;
186b8d41e50SMichael Riesch		snps,mtl-rx-config = <&gmac0_mtl_rx_setup>;
187b8d41e50SMichael Riesch		snps,mtl-tx-config = <&gmac0_mtl_tx_setup>;
188b8d41e50SMichael Riesch		snps,tso;
189b8d41e50SMichael Riesch		status = "disabled";
190b8d41e50SMichael Riesch
191b8d41e50SMichael Riesch		mdio0: mdio {
192b8d41e50SMichael Riesch			compatible = "snps,dwmac-mdio";
193b8d41e50SMichael Riesch			#address-cells = <0x1>;
194b8d41e50SMichael Riesch			#size-cells = <0x0>;
195b8d41e50SMichael Riesch		};
196b8d41e50SMichael Riesch
197b8d41e50SMichael Riesch		gmac0_stmmac_axi_setup: stmmac-axi-config {
198b8d41e50SMichael Riesch			snps,blen = <0 0 0 0 16 8 4>;
199b8d41e50SMichael Riesch			snps,rd_osr_lmt = <8>;
200b8d41e50SMichael Riesch			snps,wr_osr_lmt = <4>;
201b8d41e50SMichael Riesch		};
202b8d41e50SMichael Riesch
203b8d41e50SMichael Riesch		gmac0_mtl_rx_setup: rx-queues-config {
204b8d41e50SMichael Riesch			snps,rx-queues-to-use = <1>;
205b8d41e50SMichael Riesch			queue0 {};
206b8d41e50SMichael Riesch		};
207b8d41e50SMichael Riesch
208b8d41e50SMichael Riesch		gmac0_mtl_tx_setup: tx-queues-config {
209b8d41e50SMichael Riesch			snps,tx-queues-to-use = <1>;
210b8d41e50SMichael Riesch			queue0 {};
211b8d41e50SMichael Riesch		};
212b8d41e50SMichael Riesch	};
2133cc8cd2dSYifeng Zhao
2143cc8cd2dSYifeng Zhao	combphy0: phy@fe820000 {
2153cc8cd2dSYifeng Zhao		compatible = "rockchip,rk3568-naneng-combphy";
2163cc8cd2dSYifeng Zhao		reg = <0x0 0xfe820000 0x0 0x100>;
2173cc8cd2dSYifeng Zhao		clocks = <&pmucru CLK_PCIEPHY0_REF>,
2183cc8cd2dSYifeng Zhao			 <&cru PCLK_PIPEPHY0>,
2193cc8cd2dSYifeng Zhao			 <&cru PCLK_PIPE>;
2203cc8cd2dSYifeng Zhao		clock-names = "ref", "apb", "pipe";
2213cc8cd2dSYifeng Zhao		assigned-clocks = <&pmucru CLK_PCIEPHY0_REF>;
2223cc8cd2dSYifeng Zhao		assigned-clock-rates = <100000000>;
2233cc8cd2dSYifeng Zhao		resets = <&cru SRST_PIPEPHY0>;
2243cc8cd2dSYifeng Zhao		rockchip,pipe-grf = <&pipegrf>;
2253cc8cd2dSYifeng Zhao		rockchip,pipe-phy-grf = <&pipe_phy_grf0>;
2263cc8cd2dSYifeng Zhao		#phy-cells = <1>;
2273cc8cd2dSYifeng Zhao		status = "disabled";
2283cc8cd2dSYifeng Zhao	};
2295067f459SPeter Geis};
2305067f459SPeter Geis
2315067f459SPeter Geis&cpu0_opp_table {
2325067f459SPeter Geis	opp-1992000000 {
2335067f459SPeter Geis		opp-hz = /bits/ 64 <1992000000>;
2345067f459SPeter Geis		opp-microvolt = <1150000 1150000 1150000>;
2355067f459SPeter Geis	};
2365067f459SPeter Geis};
2375067f459SPeter Geis
2389f4c480fSPeter Geis&pipegrf {
2399f4c480fSPeter Geis	compatible = "rockchip,rk3568-pipe-grf", "syscon";
2409f4c480fSPeter Geis};
2419f4c480fSPeter Geis
2425067f459SPeter Geis&power {
2435067f459SPeter Geis	power-domain@RK3568_PD_PIPE {
2445067f459SPeter Geis		reg = <RK3568_PD_PIPE>;
2455067f459SPeter Geis		clocks = <&cru PCLK_PIPE>;
2465067f459SPeter Geis		pm_qos = <&qos_pcie2x1>,
2475067f459SPeter Geis			 <&qos_pcie3x1>,
2485067f459SPeter Geis			 <&qos_pcie3x2>,
2495067f459SPeter Geis			 <&qos_sata0>,
2505067f459SPeter Geis			 <&qos_sata1>,
2515067f459SPeter Geis			 <&qos_sata2>,
2525067f459SPeter Geis			 <&qos_usb3_0>,
2535067f459SPeter Geis			 <&qos_usb3_1>;
2545067f459SPeter Geis		#power-domain-cells = <0>;
2555067f459SPeter Geis	};
2565067f459SPeter Geis};
2579f4c480fSPeter Geis
2589f4c480fSPeter Geis&usb_host0_xhci {
2599f4c480fSPeter Geis	phys = <&usb2phy0_otg>, <&combphy0 PHY_TYPE_USB3>;
2609f4c480fSPeter Geis	phy-names = "usb2-phy", "usb3-phy";
2619f4c480fSPeter Geis};
2629d6c6d97SSascha Hauer
2639d6c6d97SSascha Hauer&vop {
2649d6c6d97SSascha Hauer	compatible = "rockchip,rk3568-vop";
2659d6c6d97SSascha Hauer};
266