19c8c52f7SJianxin Pan// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
29c8c52f7SJianxin Pan/*
39c8c52f7SJianxin Pan * Copyright (c) 2018 Amlogic, Inc. All rights reserved.
49c8c52f7SJianxin Pan */
59c8c52f7SJianxin Pan
69baf7d6bSNeil Armstrong#include <dt-bindings/phy/phy.h>
79c8c52f7SJianxin Pan#include <dt-bindings/gpio/gpio.h>
8965c827aSJerome Brunet#include <dt-bindings/clock/g12a-clkc.h>
9820873cfSNeil Armstrong#include <dt-bindings/clock/g12a-aoclkc.h>
109c8c52f7SJianxin Pan#include <dt-bindings/interrupt-controller/irq.h>
119c8c52f7SJianxin Pan#include <dt-bindings/interrupt-controller/arm-gic.h>
129baf7d6bSNeil Armstrong#include <dt-bindings/reset/amlogic,meson-g12a-reset.h>
139c8c52f7SJianxin Pan
149c8c52f7SJianxin Pan/ {
159c8c52f7SJianxin Pan	compatible = "amlogic,g12a";
169c8c52f7SJianxin Pan
179c8c52f7SJianxin Pan	interrupt-parent = <&gic>;
189c8c52f7SJianxin Pan	#address-cells = <2>;
199c8c52f7SJianxin Pan	#size-cells = <2>;
209c8c52f7SJianxin Pan
219c8c52f7SJianxin Pan	cpus {
229c8c52f7SJianxin Pan		#address-cells = <0x2>;
239c8c52f7SJianxin Pan		#size-cells = <0x0>;
249c8c52f7SJianxin Pan
259c8c52f7SJianxin Pan		cpu0: cpu@0 {
269c8c52f7SJianxin Pan			device_type = "cpu";
2731af04cdSRob Herring			compatible = "arm,cortex-a53";
289c8c52f7SJianxin Pan			reg = <0x0 0x0>;
299c8c52f7SJianxin Pan			enable-method = "psci";
309c8c52f7SJianxin Pan			next-level-cache = <&l2>;
319c8c52f7SJianxin Pan		};
329c8c52f7SJianxin Pan
339c8c52f7SJianxin Pan		cpu1: cpu@1 {
349c8c52f7SJianxin Pan			device_type = "cpu";
3531af04cdSRob Herring			compatible = "arm,cortex-a53";
369c8c52f7SJianxin Pan			reg = <0x0 0x1>;
379c8c52f7SJianxin Pan			enable-method = "psci";
389c8c52f7SJianxin Pan			next-level-cache = <&l2>;
399c8c52f7SJianxin Pan		};
409c8c52f7SJianxin Pan
419c8c52f7SJianxin Pan		cpu2: cpu@2 {
429c8c52f7SJianxin Pan			device_type = "cpu";
4331af04cdSRob Herring			compatible = "arm,cortex-a53";
449c8c52f7SJianxin Pan			reg = <0x0 0x2>;
459c8c52f7SJianxin Pan			enable-method = "psci";
469c8c52f7SJianxin Pan			next-level-cache = <&l2>;
479c8c52f7SJianxin Pan		};
489c8c52f7SJianxin Pan
499c8c52f7SJianxin Pan		cpu3: cpu@3 {
509c8c52f7SJianxin Pan			device_type = "cpu";
5131af04cdSRob Herring			compatible = "arm,cortex-a53";
529c8c52f7SJianxin Pan			reg = <0x0 0x3>;
539c8c52f7SJianxin Pan			enable-method = "psci";
549c8c52f7SJianxin Pan			next-level-cache = <&l2>;
559c8c52f7SJianxin Pan		};
569c8c52f7SJianxin Pan
579c8c52f7SJianxin Pan		l2: l2-cache0 {
589c8c52f7SJianxin Pan			compatible = "cache";
599c8c52f7SJianxin Pan		};
609c8c52f7SJianxin Pan	};
619c8c52f7SJianxin Pan
62965c827aSJerome Brunet	efuse: efuse {
63965c827aSJerome Brunet		compatible = "amlogic,meson-gxbb-efuse";
64965c827aSJerome Brunet		clocks = <&clkc CLKID_EFUSE>;
65965c827aSJerome Brunet		#address-cells = <1>;
66965c827aSJerome Brunet		#size-cells = <1>;
67965c827aSJerome Brunet		read-only;
68965c827aSJerome Brunet	};
69965c827aSJerome Brunet
709c8c52f7SJianxin Pan	psci {
719c8c52f7SJianxin Pan		compatible = "arm,psci-1.0";
729c8c52f7SJianxin Pan		method = "smc";
739c8c52f7SJianxin Pan	};
749c8c52f7SJianxin Pan
759c8c52f7SJianxin Pan	reserved-memory {
769c8c52f7SJianxin Pan		#address-cells = <2>;
779c8c52f7SJianxin Pan		#size-cells = <2>;
789c8c52f7SJianxin Pan		ranges;
799c8c52f7SJianxin Pan
809c8c52f7SJianxin Pan		/* 3 MiB reserved for ARM Trusted Firmware (BL31) */
819c8c52f7SJianxin Pan		secmon_reserved: secmon@5000000 {
829c8c52f7SJianxin Pan			reg = <0x0 0x05000000 0x0 0x300000>;
839c8c52f7SJianxin Pan			no-map;
849c8c52f7SJianxin Pan		};
85e2cffeb3SNeil Armstrong
86e2cffeb3SNeil Armstrong		linux,cma {
87e2cffeb3SNeil Armstrong			compatible = "shared-dma-pool";
88e2cffeb3SNeil Armstrong			reusable;
89e2cffeb3SNeil Armstrong			size = <0x0 0x10000000>;
90e2cffeb3SNeil Armstrong			alignment = <0x0 0x400000>;
91e2cffeb3SNeil Armstrong			linux,cma-default;
92e2cffeb3SNeil Armstrong		};
939c8c52f7SJianxin Pan	};
949c8c52f7SJianxin Pan
95bd395152SJerome Brunet	sm: secure-monitor {
96bd395152SJerome Brunet		compatible = "amlogic,meson-gxbb-sm";
97bd395152SJerome Brunet	};
98bd395152SJerome Brunet
999c8c52f7SJianxin Pan	soc {
1009c8c52f7SJianxin Pan		compatible = "simple-bus";
1019c8c52f7SJianxin Pan		#address-cells = <2>;
1029c8c52f7SJianxin Pan		#size-cells = <2>;
1039c8c52f7SJianxin Pan		ranges;
1049c8c52f7SJianxin Pan
105503f5fedSJerome Brunet		apb: bus@ff600000 {
1069c8c52f7SJianxin Pan			compatible = "simple-bus";
107503f5fedSJerome Brunet			reg = <0x0 0xff600000 0x0 0x200000>;
1089c8c52f7SJianxin Pan			#address-cells = <2>;
1099c8c52f7SJianxin Pan			#size-cells = <2>;
110503f5fedSJerome Brunet			ranges = <0x0 0x0 0x0 0xff600000 0x0 0x200000>;
111503f5fedSJerome Brunet
112083feecdSNeil Armstrong			hdmi_tx: hdmi-tx@0 {
113083feecdSNeil Armstrong				compatible = "amlogic,meson-g12a-dw-hdmi";
114083feecdSNeil Armstrong				reg = <0x0 0x0 0x0 0x10000>;
115083feecdSNeil Armstrong				interrupts = <GIC_SPI 57 IRQ_TYPE_EDGE_RISING>;
116083feecdSNeil Armstrong				resets = <&reset RESET_HDMITX_CAPB3>,
117083feecdSNeil Armstrong					 <&reset RESET_HDMITX_PHY>,
118083feecdSNeil Armstrong					 <&reset RESET_HDMITX>;
119083feecdSNeil Armstrong				reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy";
120083feecdSNeil Armstrong				clocks = <&clkc CLKID_HDMI>,
121083feecdSNeil Armstrong					 <&clkc CLKID_HTX_PCLK>,
122083feecdSNeil Armstrong					 <&clkc CLKID_VPU_INTR>;
123083feecdSNeil Armstrong				clock-names = "isfr", "iahb", "venci";
124083feecdSNeil Armstrong				#address-cells = <1>;
125083feecdSNeil Armstrong				#size-cells = <0>;
126083feecdSNeil Armstrong				status = "disabled";
127083feecdSNeil Armstrong
128083feecdSNeil Armstrong				/* VPU VENC Input */
129083feecdSNeil Armstrong				hdmi_tx_venc_port: port@0 {
130083feecdSNeil Armstrong					reg = <0>;
131083feecdSNeil Armstrong
132083feecdSNeil Armstrong					hdmi_tx_in: endpoint {
133083feecdSNeil Armstrong						remote-endpoint = <&hdmi_tx_out>;
134083feecdSNeil Armstrong					};
135083feecdSNeil Armstrong				};
136083feecdSNeil Armstrong
137083feecdSNeil Armstrong				/* TMDS Output */
138083feecdSNeil Armstrong				hdmi_tx_tmds_port: port@1 {
139083feecdSNeil Armstrong					reg = <1>;
140083feecdSNeil Armstrong				};
141083feecdSNeil Armstrong			};
142083feecdSNeil Armstrong
143503f5fedSJerome Brunet			periphs: bus@34400 {
144503f5fedSJerome Brunet				compatible = "simple-bus";
145503f5fedSJerome Brunet				reg = <0x0 0x34400 0x0 0x400>;
146503f5fedSJerome Brunet				#address-cells = <2>;
147503f5fedSJerome Brunet				#size-cells = <2>;
148503f5fedSJerome Brunet				ranges = <0x0 0x0 0x0 0x34400 0x0 0x400>;
14911a7bea1SJerome Brunet
15011a7bea1SJerome Brunet				periphs_pinctrl: pinctrl@40 {
15111a7bea1SJerome Brunet					compatible = "amlogic,meson-g12a-periphs-pinctrl";
15211a7bea1SJerome Brunet					#address-cells = <2>;
15311a7bea1SJerome Brunet					#size-cells = <2>;
15411a7bea1SJerome Brunet					ranges;
15511a7bea1SJerome Brunet
15611a7bea1SJerome Brunet					gpio: bank@40 {
15711a7bea1SJerome Brunet						reg = <0x0 0x40  0x0 0x4c>,
15811a7bea1SJerome Brunet						      <0x0 0xe8  0x0 0x18>,
15911a7bea1SJerome Brunet						      <0x0 0x120 0x0 0x18>,
16011a7bea1SJerome Brunet						      <0x0 0x2c0 0x0 0x40>,
16111a7bea1SJerome Brunet						      <0x0 0x340 0x0 0x1c>;
16211a7bea1SJerome Brunet						reg-names = "gpio",
16311a7bea1SJerome Brunet							    "pull",
16411a7bea1SJerome Brunet							    "pull-enable",
16511a7bea1SJerome Brunet							    "mux",
16611a7bea1SJerome Brunet							    "ds";
16711a7bea1SJerome Brunet						gpio-controller;
16811a7bea1SJerome Brunet						#gpio-cells = <2>;
16911a7bea1SJerome Brunet						gpio-ranges = <&periphs_pinctrl 0 0 86>;
17011a7bea1SJerome Brunet					};
171ff4f8b6cSNeil Armstrong
172083feecdSNeil Armstrong					hdmitx_ddc_pins: hdmitx_ddc {
173083feecdSNeil Armstrong						mux {
174083feecdSNeil Armstrong							groups = "hdmitx_sda",
175083feecdSNeil Armstrong								 "hdmitx_sck";
176083feecdSNeil Armstrong							function = "hdmitx";
177083feecdSNeil Armstrong							bias-disable;
178083feecdSNeil Armstrong						};
179083feecdSNeil Armstrong					};
180083feecdSNeil Armstrong
181083feecdSNeil Armstrong					hdmitx_hpd_pins: hdmitx_hpd {
182083feecdSNeil Armstrong						mux {
183083feecdSNeil Armstrong							groups = "hdmitx_hpd_in";
184083feecdSNeil Armstrong							function = "hdmitx";
185083feecdSNeil Armstrong							bias-disable;
186083feecdSNeil Armstrong						};
187083feecdSNeil Armstrong					};
188083feecdSNeil Armstrong
189ff4f8b6cSNeil Armstrong					uart_a_pins: uart-a {
190ff4f8b6cSNeil Armstrong						mux {
191ff4f8b6cSNeil Armstrong							groups = "uart_a_tx",
192ff4f8b6cSNeil Armstrong								 "uart_a_rx";
193ff4f8b6cSNeil Armstrong							function = "uart_a";
194ff4f8b6cSNeil Armstrong							bias-disable;
195ff4f8b6cSNeil Armstrong						};
196ff4f8b6cSNeil Armstrong					};
197ff4f8b6cSNeil Armstrong
198ff4f8b6cSNeil Armstrong					uart_a_cts_rts_pins: uart-a-cts-rts {
199ff4f8b6cSNeil Armstrong						mux {
200ff4f8b6cSNeil Armstrong							groups = "uart_a_cts",
201ff4f8b6cSNeil Armstrong								 "uart_a_rts";
202ff4f8b6cSNeil Armstrong							function = "uart_a";
203ff4f8b6cSNeil Armstrong							bias-disable;
204ff4f8b6cSNeil Armstrong						};
205ff4f8b6cSNeil Armstrong					};
206ff4f8b6cSNeil Armstrong
207ff4f8b6cSNeil Armstrong					uart_b_pins: uart-b {
208ff4f8b6cSNeil Armstrong						mux {
209ff4f8b6cSNeil Armstrong							groups = "uart_b_tx",
210ff4f8b6cSNeil Armstrong								 "uart_b_rx";
211ff4f8b6cSNeil Armstrong							function = "uart_b";
212ff4f8b6cSNeil Armstrong							bias-disable;
213ff4f8b6cSNeil Armstrong						};
214ff4f8b6cSNeil Armstrong					};
215ff4f8b6cSNeil Armstrong
216ff4f8b6cSNeil Armstrong					uart_c_pins: uart-c {
217ff4f8b6cSNeil Armstrong						mux {
218ff4f8b6cSNeil Armstrong							groups = "uart_c_tx",
219ff4f8b6cSNeil Armstrong								 "uart_c_rx";
220ff4f8b6cSNeil Armstrong							function = "uart_c";
221ff4f8b6cSNeil Armstrong							bias-disable;
222ff4f8b6cSNeil Armstrong						};
223ff4f8b6cSNeil Armstrong					};
224ff4f8b6cSNeil Armstrong
225ff4f8b6cSNeil Armstrong					uart_c_cts_rts_pins: uart-c-cts-rts {
226ff4f8b6cSNeil Armstrong						mux {
227ff4f8b6cSNeil Armstrong							groups = "uart_c_cts",
228ff4f8b6cSNeil Armstrong								 "uart_c_rts";
229ff4f8b6cSNeil Armstrong							function = "uart_c";
230ff4f8b6cSNeil Armstrong							bias-disable;
231ff4f8b6cSNeil Armstrong						};
232ff4f8b6cSNeil Armstrong					};
23311a7bea1SJerome Brunet				};
2349c8c52f7SJianxin Pan			};
2359c8c52f7SJianxin Pan
2369baf7d6bSNeil Armstrong			usb2_phy0: phy@36000 {
2379baf7d6bSNeil Armstrong				compatible = "amlogic,g12a-usb2-phy";
2389baf7d6bSNeil Armstrong				reg = <0x0 0x36000 0x0 0x2000>;
2399baf7d6bSNeil Armstrong				clocks = <&xtal>;
2409baf7d6bSNeil Armstrong				clock-names = "xtal";
2419baf7d6bSNeil Armstrong				resets = <&reset RESET_USB_PHY20>;
2429baf7d6bSNeil Armstrong				reset-names = "phy";
2439baf7d6bSNeil Armstrong				#phy-cells = <0>;
2449baf7d6bSNeil Armstrong			};
2459baf7d6bSNeil Armstrong
246083feecdSNeil Armstrong			dmc: bus@38000 {
247083feecdSNeil Armstrong				compatible = "simple-bus";
248083feecdSNeil Armstrong				reg = <0x0 0x38000 0x0 0x400>;
249083feecdSNeil Armstrong				#address-cells = <2>;
250083feecdSNeil Armstrong				#size-cells = <2>;
251083feecdSNeil Armstrong				ranges = <0x0 0x0 0x0 0x38000 0x0 0x400>;
252083feecdSNeil Armstrong
253083feecdSNeil Armstrong				canvas: video-lut@48 {
254083feecdSNeil Armstrong					compatible = "amlogic,canvas";
255083feecdSNeil Armstrong					reg = <0x0 0x48 0x0 0x14>;
256083feecdSNeil Armstrong				};
257083feecdSNeil Armstrong			};
258083feecdSNeil Armstrong
2599baf7d6bSNeil Armstrong			usb2_phy1: phy@3a000 {
2609baf7d6bSNeil Armstrong				compatible = "amlogic,g12a-usb2-phy";
2619baf7d6bSNeil Armstrong				reg = <0x0 0x3a000 0x0 0x2000>;
2629baf7d6bSNeil Armstrong				clocks = <&xtal>;
2639baf7d6bSNeil Armstrong				clock-names = "xtal";
2649baf7d6bSNeil Armstrong				resets = <&reset RESET_USB_PHY21>;
2659baf7d6bSNeil Armstrong				reset-names = "phy";
2669baf7d6bSNeil Armstrong				#phy-cells = <0>;
2679baf7d6bSNeil Armstrong			};
2689baf7d6bSNeil Armstrong
269503f5fedSJerome Brunet			hiu: bus@3c000 {
2709c8c52f7SJianxin Pan				compatible = "simple-bus";
271503f5fedSJerome Brunet				reg = <0x0 0x3c000 0x0 0x1400>;
2729c8c52f7SJianxin Pan				#address-cells = <2>;
2739c8c52f7SJianxin Pan				#size-cells = <2>;
274503f5fedSJerome Brunet				ranges = <0x0 0x0 0x0 0x3c000 0x0 0x1400>;
275785fb434SJerome Brunet
276785fb434SJerome Brunet				hhi: system-controller@0 {
277785fb434SJerome Brunet					compatible = "amlogic,meson-gx-hhi-sysctrl",
278785fb434SJerome Brunet						     "simple-mfd", "syscon";
279785fb434SJerome Brunet					reg = <0 0 0 0x400>;
280785fb434SJerome Brunet
281785fb434SJerome Brunet					clkc: clock-controller {
282785fb434SJerome Brunet						compatible = "amlogic,g12a-clkc";
283785fb434SJerome Brunet						#clock-cells = <1>;
284785fb434SJerome Brunet						clocks = <&xtal>;
285785fb434SJerome Brunet						clock-names = "xtal";
286785fb434SJerome Brunet					};
287785fb434SJerome Brunet				};
288503f5fedSJerome Brunet			};
2899baf7d6bSNeil Armstrong
2909baf7d6bSNeil Armstrong			usb3_pcie_phy: phy@46000 {
2919baf7d6bSNeil Armstrong				compatible = "amlogic,g12a-usb3-pcie-phy";
2929baf7d6bSNeil Armstrong				reg = <0x0 0x46000 0x0 0x2000>;
2939baf7d6bSNeil Armstrong				clocks = <&clkc CLKID_PCIE_PLL>;
2949baf7d6bSNeil Armstrong				clock-names = "ref_clk";
2959baf7d6bSNeil Armstrong				resets = <&reset RESET_PCIE_PHY>;
2969baf7d6bSNeil Armstrong				reset-names = "phy";
2979baf7d6bSNeil Armstrong				assigned-clocks = <&clkc CLKID_PCIE_PLL>;
2989baf7d6bSNeil Armstrong				assigned-clock-rates = <100000000>;
2999baf7d6bSNeil Armstrong				#phy-cells = <1>;
3009baf7d6bSNeil Armstrong			};
3019c8c52f7SJianxin Pan		};
3029c8c52f7SJianxin Pan
3039c8c52f7SJianxin Pan		aobus: bus@ff800000 {
3049c8c52f7SJianxin Pan			compatible = "simple-bus";
3059c8c52f7SJianxin Pan			reg = <0x0 0xff800000 0x0 0x100000>;
3069c8c52f7SJianxin Pan			#address-cells = <2>;
3079c8c52f7SJianxin Pan			#size-cells = <2>;
3089c8c52f7SJianxin Pan			ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
3099c8c52f7SJianxin Pan
310b019f4a4SNeil Armstrong			rti: sys-ctrl@0 {
311b019f4a4SNeil Armstrong				compatible = "amlogic,meson-gx-ao-sysctrl",
312b019f4a4SNeil Armstrong					     "simple-mfd", "syscon";
313b019f4a4SNeil Armstrong				reg = <0x0 0x0 0x0 0x100>;
314b019f4a4SNeil Armstrong				#address-cells = <2>;
315b019f4a4SNeil Armstrong				#size-cells = <2>;
316b019f4a4SNeil Armstrong				ranges = <0x0 0x0 0x0 0x0 0x0 0x100>;
317b019f4a4SNeil Armstrong
318b019f4a4SNeil Armstrong				clkc_AO: clock-controller {
319b019f4a4SNeil Armstrong					compatible = "amlogic,meson-g12a-aoclkc";
320b019f4a4SNeil Armstrong					#clock-cells = <1>;
321b019f4a4SNeil Armstrong					#reset-cells = <1>;
322b019f4a4SNeil Armstrong					clocks = <&xtal>, <&clkc CLKID_CLK81>;
323b019f4a4SNeil Armstrong					clock-names = "xtal", "mpeg-clk";
324b019f4a4SNeil Armstrong				};
32511a7bea1SJerome Brunet
326083feecdSNeil Armstrong				pwrc_vpu: power-controller-vpu {
327083feecdSNeil Armstrong					compatible = "amlogic,meson-g12a-pwrc-vpu";
328083feecdSNeil Armstrong					#power-domain-cells = <0>;
329083feecdSNeil Armstrong					amlogic,hhi-sysctrl = <&hhi>;
330083feecdSNeil Armstrong					resets = <&reset RESET_VIU>,
331083feecdSNeil Armstrong						 <&reset RESET_VENC>,
332083feecdSNeil Armstrong						 <&reset RESET_VCBUS>,
333083feecdSNeil Armstrong						 <&reset RESET_BT656>,
334083feecdSNeil Armstrong						 <&reset RESET_RDMA>,
335083feecdSNeil Armstrong						 <&reset RESET_VENCI>,
336083feecdSNeil Armstrong						 <&reset RESET_VENCP>,
337083feecdSNeil Armstrong						 <&reset RESET_VDAC>,
338083feecdSNeil Armstrong						 <&reset RESET_VDI6>,
339083feecdSNeil Armstrong						 <&reset RESET_VENCL>,
340083feecdSNeil Armstrong						 <&reset RESET_VID_LOCK>;
341083feecdSNeil Armstrong					clocks = <&clkc CLKID_VPU>,
342083feecdSNeil Armstrong						 <&clkc CLKID_VAPB>;
343083feecdSNeil Armstrong					clock-names = "vpu", "vapb";
344083feecdSNeil Armstrong					/*
345083feecdSNeil Armstrong					 * VPU clocking is provided by two identical clock paths
346083feecdSNeil Armstrong					 * VPU_0 and VPU_1 muxed to a single clock by a glitch
347083feecdSNeil Armstrong					 * free mux to safely change frequency while running.
348083feecdSNeil Armstrong					 * Same for VAPB but with a final gate after the glitch free mux.
349083feecdSNeil Armstrong					 */
350083feecdSNeil Armstrong					assigned-clocks = <&clkc CLKID_VPU_0_SEL>,
351083feecdSNeil Armstrong							  <&clkc CLKID_VPU_0>,
352083feecdSNeil Armstrong							  <&clkc CLKID_VPU>, /* Glitch free mux */
353083feecdSNeil Armstrong							  <&clkc CLKID_VAPB_0_SEL>,
354083feecdSNeil Armstrong							  <&clkc CLKID_VAPB_0>,
355083feecdSNeil Armstrong							  <&clkc CLKID_VAPB_SEL>; /* Glitch free mux */
356083feecdSNeil Armstrong					assigned-clock-parents = <&clkc CLKID_FCLK_DIV3>,
357083feecdSNeil Armstrong								 <0>, /* Do Nothing */
358083feecdSNeil Armstrong								 <&clkc CLKID_VPU_0>,
359083feecdSNeil Armstrong								 <&clkc CLKID_FCLK_DIV4>,
360083feecdSNeil Armstrong								 <0>, /* Do Nothing */
361083feecdSNeil Armstrong								 <&clkc CLKID_VAPB_0>;
362083feecdSNeil Armstrong					assigned-clock-rates = <0>, /* Do Nothing */
363083feecdSNeil Armstrong							       <666666666>,
364083feecdSNeil Armstrong							       <0>, /* Do Nothing */
365083feecdSNeil Armstrong							       <0>, /* Do Nothing */
366083feecdSNeil Armstrong							       <250000000>,
367083feecdSNeil Armstrong							       <0>; /* Do Nothing */
368083feecdSNeil Armstrong				};
369083feecdSNeil Armstrong
37011a7bea1SJerome Brunet				ao_pinctrl: pinctrl@14 {
37111a7bea1SJerome Brunet					compatible = "amlogic,meson-g12a-aobus-pinctrl";
37211a7bea1SJerome Brunet					#address-cells = <2>;
37311a7bea1SJerome Brunet					#size-cells = <2>;
37411a7bea1SJerome Brunet					ranges;
37511a7bea1SJerome Brunet
37611a7bea1SJerome Brunet					gpio_ao: bank@14 {
37711a7bea1SJerome Brunet						reg = <0x0 0x14 0x0 0x8>,
37811a7bea1SJerome Brunet						      <0x0 0x1c 0x0 0x8>,
37911a7bea1SJerome Brunet						      <0x0 0x24 0x0 0x14>;
38011a7bea1SJerome Brunet						reg-names = "mux",
38111a7bea1SJerome Brunet							    "ds",
38211a7bea1SJerome Brunet							    "gpio";
38311a7bea1SJerome Brunet						gpio-controller;
38411a7bea1SJerome Brunet						#gpio-cells = <2>;
38511a7bea1SJerome Brunet						gpio-ranges = <&ao_pinctrl 0 0 15>;
38611a7bea1SJerome Brunet					};
387e92546c2SJerome Brunet
388e92546c2SJerome Brunet					uart_ao_a_pins: uart-a-ao {
389e92546c2SJerome Brunet						mux {
390e92546c2SJerome Brunet							groups = "uart_ao_a_tx",
391e92546c2SJerome Brunet								 "uart_ao_a_rx";
392e92546c2SJerome Brunet							function = "uart_ao_a";
393e92546c2SJerome Brunet							bias-disable;
394e92546c2SJerome Brunet						};
395e92546c2SJerome Brunet					};
396e92546c2SJerome Brunet
397e92546c2SJerome Brunet					uart_ao_a_cts_rts_pins: uart-ao-a-cts-rts {
398e92546c2SJerome Brunet						mux {
399e92546c2SJerome Brunet							groups = "uart_ao_a_cts",
400e92546c2SJerome Brunet								 "uart_ao_a_rts";
401e92546c2SJerome Brunet							function = "uart_ao_a";
402e92546c2SJerome Brunet							bias-disable;
403e92546c2SJerome Brunet						};
404e92546c2SJerome Brunet					};
40511a7bea1SJerome Brunet				};
406b019f4a4SNeil Armstrong			};
407b019f4a4SNeil Armstrong
4080fa724c5SNeil Armstrong			sec_AO: ao-secure@140 {
4090fa724c5SNeil Armstrong				compatible = "amlogic,meson-gx-ao-secure", "syscon";
4100fa724c5SNeil Armstrong				reg = <0x0 0x140 0x0 0x140>;
4110fa724c5SNeil Armstrong				amlogic,has-chip-id;
4120fa724c5SNeil Armstrong			};
4130fa724c5SNeil Armstrong
4149c8c52f7SJianxin Pan			uart_AO: serial@3000 {
415503f5fedSJerome Brunet				compatible = "amlogic,meson-gx-uart",
416503f5fedSJerome Brunet					     "amlogic,meson-ao-uart";
4179c8c52f7SJianxin Pan				reg = <0x0 0x3000 0x0 0x18>;
4189c8c52f7SJianxin Pan				interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
4199c8c52f7SJianxin Pan				clocks = <&xtal>, <&xtal>, <&xtal>;
4209c8c52f7SJianxin Pan				clock-names = "xtal", "pclk", "baud";
4219c8c52f7SJianxin Pan				status = "disabled";
4229c8c52f7SJianxin Pan			};
4239c8c52f7SJianxin Pan
4249c8c52f7SJianxin Pan			uart_AO_B: serial@4000 {
425503f5fedSJerome Brunet				compatible = "amlogic,meson-gx-uart",
426503f5fedSJerome Brunet					     "amlogic,meson-ao-uart";
4279c8c52f7SJianxin Pan				reg = <0x0 0x4000 0x0 0x18>;
4289c8c52f7SJianxin Pan				interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
4299c8c52f7SJianxin Pan				clocks = <&xtal>, <&xtal>, <&xtal>;
4309c8c52f7SJianxin Pan				clock-names = "xtal", "pclk", "baud";
4319c8c52f7SJianxin Pan				status = "disabled";
4329c8c52f7SJianxin Pan			};
433820873cfSNeil Armstrong
434820873cfSNeil Armstrong			saradc: adc@9000 {
435820873cfSNeil Armstrong				compatible = "amlogic,meson-g12a-saradc",
436820873cfSNeil Armstrong					     "amlogic,meson-saradc";
437820873cfSNeil Armstrong				reg = <0x0 0x9000 0x0 0x48>;
438820873cfSNeil Armstrong				#io-channel-cells = <1>;
439820873cfSNeil Armstrong				interrupts = <GIC_SPI 200 IRQ_TYPE_EDGE_RISING>;
440820873cfSNeil Armstrong				clocks = <&xtal>,
441820873cfSNeil Armstrong					 <&clkc_AO CLKID_AO_SAR_ADC>,
442820873cfSNeil Armstrong					 <&clkc_AO CLKID_AO_SAR_ADC_CLK>,
443820873cfSNeil Armstrong					 <&clkc_AO CLKID_AO_SAR_ADC_SEL>;
444820873cfSNeil Armstrong				clock-names = "clkin", "core", "adc_clk", "adc_sel";
445820873cfSNeil Armstrong				status = "disabled";
446820873cfSNeil Armstrong			};
4479c8c52f7SJianxin Pan		};
4489c8c52f7SJianxin Pan
449083feecdSNeil Armstrong		vpu: vpu@ff900000 {
450083feecdSNeil Armstrong			compatible = "amlogic,meson-g12a-vpu";
451083feecdSNeil Armstrong			reg = <0x0 0xff900000 0x0 0x100000>,
452083feecdSNeil Armstrong			      <0x0 0xff63c000 0x0 0x1000>;
453083feecdSNeil Armstrong			reg-names = "vpu", "hhi";
454083feecdSNeil Armstrong			interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
455083feecdSNeil Armstrong			#address-cells = <1>;
456083feecdSNeil Armstrong			#size-cells = <0>;
457083feecdSNeil Armstrong			amlogic,canvas = <&canvas>;
458083feecdSNeil Armstrong			power-domains = <&pwrc_vpu>;
459083feecdSNeil Armstrong
460083feecdSNeil Armstrong			/* CVBS VDAC output port */
461083feecdSNeil Armstrong			cvbs_vdac_port: port@0 {
462083feecdSNeil Armstrong				reg = <0>;
463083feecdSNeil Armstrong			};
464083feecdSNeil Armstrong
465083feecdSNeil Armstrong			/* HDMI-TX output port */
466083feecdSNeil Armstrong			hdmi_tx_port: port@1 {
467083feecdSNeil Armstrong				reg = <1>;
468083feecdSNeil Armstrong
469083feecdSNeil Armstrong				hdmi_tx_out: endpoint {
470083feecdSNeil Armstrong					remote-endpoint = <&hdmi_tx_in>;
471083feecdSNeil Armstrong				};
472083feecdSNeil Armstrong			};
473083feecdSNeil Armstrong		};
474083feecdSNeil Armstrong
4759c8c52f7SJianxin Pan		gic: interrupt-controller@ffc01000 {
4769c8c52f7SJianxin Pan			compatible = "arm,gic-400";
4779c8c52f7SJianxin Pan			reg = <0x0 0xffc01000 0 0x1000>,
4789c8c52f7SJianxin Pan			      <0x0 0xffc02000 0 0x2000>,
4799c8c52f7SJianxin Pan			      <0x0 0xffc04000 0 0x2000>,
4809c8c52f7SJianxin Pan			      <0x0 0xffc06000 0 0x2000>;
4819c8c52f7SJianxin Pan			interrupt-controller;
4829c8c52f7SJianxin Pan			interrupts = <GIC_PPI 9
4839c8c52f7SJianxin Pan				(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
4849c8c52f7SJianxin Pan			#interrupt-cells = <3>;
4859c8c52f7SJianxin Pan			#address-cells = <0>;
4869c8c52f7SJianxin Pan		};
4879c8c52f7SJianxin Pan
4889c8c52f7SJianxin Pan		cbus: bus@ffd00000 {
4899c8c52f7SJianxin Pan			compatible = "simple-bus";
490503f5fedSJerome Brunet			reg = <0x0 0xffd00000 0x0 0x100000>;
4919c8c52f7SJianxin Pan			#address-cells = <2>;
4929c8c52f7SJianxin Pan			#size-cells = <2>;
493503f5fedSJerome Brunet			ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x100000>;
4949c8c52f7SJianxin Pan
4957ab41c47SJerome Brunet			reset: reset-controller@1004 {
4967ab41c47SJerome Brunet				compatible = "amlogic,meson-g12a-reset",
4977ab41c47SJerome Brunet					     "amlogic,meson-axg-reset";
4987ab41c47SJerome Brunet				reg = <0x0 0x1004 0x0 0x9c>;
4997ab41c47SJerome Brunet				#reset-cells = <1>;
5007ab41c47SJerome Brunet			};
5017ab41c47SJerome Brunet
50260d4fdb8SJerome Brunet			clk_msr: clock-measure@18000 {
50360d4fdb8SJerome Brunet				compatible = "amlogic,meson-g12a-clk-measure";
50460d4fdb8SJerome Brunet				reg = <0x0 0x18000 0x0 0x10>;
50560d4fdb8SJerome Brunet			};
506ff4f8b6cSNeil Armstrong
507ff4f8b6cSNeil Armstrong			uart_C: serial@22000 {
508ff4f8b6cSNeil Armstrong				compatible = "amlogic,meson-gx-uart";
509ff4f8b6cSNeil Armstrong				reg = <0x0 0x22000 0x0 0x18>;
510ff4f8b6cSNeil Armstrong				interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>;
511ff4f8b6cSNeil Armstrong				clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>;
512ff4f8b6cSNeil Armstrong				clock-names = "xtal", "pclk", "baud";
513ff4f8b6cSNeil Armstrong				status = "disabled";
514ff4f8b6cSNeil Armstrong			};
515ff4f8b6cSNeil Armstrong
516ff4f8b6cSNeil Armstrong			uart_B: serial@23000 {
517ff4f8b6cSNeil Armstrong				compatible = "amlogic,meson-gx-uart";
518ff4f8b6cSNeil Armstrong				reg = <0x0 0x23000 0x0 0x18>;
519ff4f8b6cSNeil Armstrong				interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
520ff4f8b6cSNeil Armstrong				clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
521ff4f8b6cSNeil Armstrong				clock-names = "xtal", "pclk", "baud";
522ff4f8b6cSNeil Armstrong				status = "disabled";
523ff4f8b6cSNeil Armstrong			};
524ff4f8b6cSNeil Armstrong
525ff4f8b6cSNeil Armstrong			uart_A: serial@24000 {
526ff4f8b6cSNeil Armstrong				compatible = "amlogic,meson-gx-uart";
527ff4f8b6cSNeil Armstrong				reg = <0x0 0x24000 0x0 0x18>;
528ff4f8b6cSNeil Armstrong				interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
529ff4f8b6cSNeil Armstrong				clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
530ff4f8b6cSNeil Armstrong				clock-names = "xtal", "pclk", "baud";
531ff4f8b6cSNeil Armstrong				status = "disabled";
532ff4f8b6cSNeil Armstrong			};
5339c8c52f7SJianxin Pan		};
5349baf7d6bSNeil Armstrong
5359baf7d6bSNeil Armstrong		usb: usb@ffe09000 {
5369baf7d6bSNeil Armstrong			status = "disabled";
5379baf7d6bSNeil Armstrong			compatible = "amlogic,meson-g12a-usb-ctrl";
5389baf7d6bSNeil Armstrong			reg = <0x0 0xffe09000 0x0 0xa0>;
5399baf7d6bSNeil Armstrong			interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
5409baf7d6bSNeil Armstrong			#address-cells = <2>;
5419baf7d6bSNeil Armstrong			#size-cells = <2>;
5429baf7d6bSNeil Armstrong			ranges;
5439baf7d6bSNeil Armstrong
5449baf7d6bSNeil Armstrong			clocks = <&clkc CLKID_USB>;
5459baf7d6bSNeil Armstrong			resets = <&reset RESET_USB>;
5469baf7d6bSNeil Armstrong
5479baf7d6bSNeil Armstrong			dr_mode = "otg";
5489baf7d6bSNeil Armstrong
5499baf7d6bSNeil Armstrong			phys = <&usb2_phy0>, <&usb2_phy1>,
5509baf7d6bSNeil Armstrong			       <&usb3_pcie_phy PHY_TYPE_USB3>;
5519baf7d6bSNeil Armstrong			phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0";
5529baf7d6bSNeil Armstrong
5539baf7d6bSNeil Armstrong			dwc2: usb@ff400000 {
5549baf7d6bSNeil Armstrong				compatible = "amlogic,meson-g12a-usb", "snps,dwc2";
5559baf7d6bSNeil Armstrong				reg = <0x0 0xff400000 0x0 0x40000>;
5569baf7d6bSNeil Armstrong				interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
5579baf7d6bSNeil Armstrong				clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
5589baf7d6bSNeil Armstrong				clock-names = "ddr";
5599baf7d6bSNeil Armstrong				phys = <&usb2_phy1>;
5609baf7d6bSNeil Armstrong				dr_mode = "peripheral";
5619baf7d6bSNeil Armstrong				g-rx-fifo-size = <192>;
5629baf7d6bSNeil Armstrong				g-np-tx-fifo-size = <128>;
5639baf7d6bSNeil Armstrong				g-tx-fifo-size = <128 128 16 16 16>;
5649baf7d6bSNeil Armstrong			};
5659baf7d6bSNeil Armstrong
5669baf7d6bSNeil Armstrong			dwc3: usb@ff500000 {
5679baf7d6bSNeil Armstrong				compatible = "snps,dwc3";
5689baf7d6bSNeil Armstrong				reg = <0x0 0xff500000 0x0 0x100000>;
5699baf7d6bSNeil Armstrong				interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
5709baf7d6bSNeil Armstrong				dr_mode = "host";
5719baf7d6bSNeil Armstrong				snps,dis_u2_susphy_quirk;
5729baf7d6bSNeil Armstrong				snps,quirk-frame-length-adjustment;
5739baf7d6bSNeil Armstrong			};
5749baf7d6bSNeil Armstrong		};
5752607fd08SNeil Armstrong
5762607fd08SNeil Armstrong		mali: gpu@ffe40000 {
5772607fd08SNeil Armstrong			compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost";
5782607fd08SNeil Armstrong			reg = <0x0 0xffe40000 0x0 0x40000>;
5792607fd08SNeil Armstrong			interrupt-parent = <&gic>;
5802607fd08SNeil Armstrong			interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
5812607fd08SNeil Armstrong				     <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
5822607fd08SNeil Armstrong				     <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
5832607fd08SNeil Armstrong			interrupt-names = "gpu", "mmu", "job";
5842607fd08SNeil Armstrong			clocks = <&clkc CLKID_MALI>;
5852607fd08SNeil Armstrong			resets = <&reset RESET_DVALIN_CAPB3>, <&reset RESET_DVALIN>;
5862607fd08SNeil Armstrong
5872607fd08SNeil Armstrong			/*
5882607fd08SNeil Armstrong			 * Mali clocking is provided by two identical clock paths
5892607fd08SNeil Armstrong			 * MALI_0 and MALI_1 muxed to a single clock by a glitch
5902607fd08SNeil Armstrong			 * free mux to safely change frequency while running.
5912607fd08SNeil Armstrong			 */
5922607fd08SNeil Armstrong			assigned-clocks = <&clkc CLKID_MALI_0_SEL>,
5932607fd08SNeil Armstrong					  <&clkc CLKID_MALI_0>,
5942607fd08SNeil Armstrong					  <&clkc CLKID_MALI>; /* Glitch free mux */
5952607fd08SNeil Armstrong			assigned-clock-parents = <&clkc CLKID_FCLK_DIV2P5>,
5962607fd08SNeil Armstrong						 <0>, /* Do Nothing */
5972607fd08SNeil Armstrong						 <&clkc CLKID_MALI_0>;
5982607fd08SNeil Armstrong			assigned-clock-rates = <0>, /* Do Nothing */
5992607fd08SNeil Armstrong					       <800000000>,
6002607fd08SNeil Armstrong					       <0>; /* Do Nothing */
6012607fd08SNeil Armstrong		};
6029c8c52f7SJianxin Pan	};
6039c8c52f7SJianxin Pan
6049c8c52f7SJianxin Pan	timer {
6059c8c52f7SJianxin Pan		compatible = "arm,armv8-timer";
6069c8c52f7SJianxin Pan		interrupts = <GIC_PPI 13
6079c8c52f7SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
6089c8c52f7SJianxin Pan			     <GIC_PPI 14
6099c8c52f7SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
6109c8c52f7SJianxin Pan			     <GIC_PPI 11
6119c8c52f7SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
6129c8c52f7SJianxin Pan			     <GIC_PPI 10
6139c8c52f7SJianxin Pan			(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
6149c8c52f7SJianxin Pan	};
6159c8c52f7SJianxin Pan
6169c8c52f7SJianxin Pan	xtal: xtal-clk {
6179c8c52f7SJianxin Pan		compatible = "fixed-clock";
6189c8c52f7SJianxin Pan		clock-frequency = <24000000>;
6199c8c52f7SJianxin Pan		clock-output-names = "xtal";
6209c8c52f7SJianxin Pan		#clock-cells = <0>;
6219c8c52f7SJianxin Pan	};
6229c8c52f7SJianxin Pan
6239c8c52f7SJianxin Pan};
624