18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
48c2ecf20Sopenharmony_ci */
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#include <dt-bindings/pwm/pwm.h>
78c2ecf20Sopenharmony_ci#include "rk3399.dtsi"
88c2ecf20Sopenharmony_ci#include "rk3399-opp.dtsi"
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci/ {
118c2ecf20Sopenharmony_ci	leds {
128c2ecf20Sopenharmony_ci		compatible = "gpio-leds";
138c2ecf20Sopenharmony_ci		pinctrl-names = "default";
148c2ecf20Sopenharmony_ci		pinctrl-0 = <&module_led_pin>;
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci		module_led: led-0 {
178c2ecf20Sopenharmony_ci			label = "module_led";
188c2ecf20Sopenharmony_ci			gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;
198c2ecf20Sopenharmony_ci			linux,default-trigger = "heartbeat";
208c2ecf20Sopenharmony_ci			panic-indicator;
218c2ecf20Sopenharmony_ci		};
228c2ecf20Sopenharmony_ci	};
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci	/*
258c2ecf20Sopenharmony_ci	 * Overwrite the opp-table for CPUB as this board uses a different
268c2ecf20Sopenharmony_ci	 * regulator (FAN53555) that only allows 10mV steps and therefore
278c2ecf20Sopenharmony_ci	 * can't reach the operation point target voltages from rk3399-opp.dtsi
288c2ecf20Sopenharmony_ci	 */
298c2ecf20Sopenharmony_ci	/delete-node/ opp-table1;
308c2ecf20Sopenharmony_ci	cluster1_opp: opp-table1 {
318c2ecf20Sopenharmony_ci		compatible = "operating-points-v2";
328c2ecf20Sopenharmony_ci		opp-shared;
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci		opp00 {
358c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <408000000>;
368c2ecf20Sopenharmony_ci			opp-microvolt = <800000>;
378c2ecf20Sopenharmony_ci			clock-latency-ns = <40000>;
388c2ecf20Sopenharmony_ci		};
398c2ecf20Sopenharmony_ci		opp01 {
408c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <600000000>;
418c2ecf20Sopenharmony_ci			opp-microvolt = <800000>;
428c2ecf20Sopenharmony_ci		};
438c2ecf20Sopenharmony_ci		opp02 {
448c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <816000000>;
458c2ecf20Sopenharmony_ci			opp-microvolt = <830000>;
468c2ecf20Sopenharmony_ci			opp-suspend;
478c2ecf20Sopenharmony_ci		};
488c2ecf20Sopenharmony_ci		opp03 {
498c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1008000000>;
508c2ecf20Sopenharmony_ci			opp-microvolt = <880000>;
518c2ecf20Sopenharmony_ci		};
528c2ecf20Sopenharmony_ci		opp04 {
538c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1200000000>;
548c2ecf20Sopenharmony_ci			opp-microvolt = <950000>;
558c2ecf20Sopenharmony_ci		};
568c2ecf20Sopenharmony_ci		opp05 {
578c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1416000000>;
588c2ecf20Sopenharmony_ci			opp-microvolt = <1030000>;
598c2ecf20Sopenharmony_ci		};
608c2ecf20Sopenharmony_ci		opp06 {
618c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1608000000>;
628c2ecf20Sopenharmony_ci			opp-microvolt = <1100000>;
638c2ecf20Sopenharmony_ci		};
648c2ecf20Sopenharmony_ci		opp07 {
658c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1800000000>;
668c2ecf20Sopenharmony_ci			opp-microvolt = <1200000>;
678c2ecf20Sopenharmony_ci		};
688c2ecf20Sopenharmony_ci		opp08 {
698c2ecf20Sopenharmony_ci			opp-hz = /bits/ 64 <1992000000>;
708c2ecf20Sopenharmony_ci			opp-microvolt = <1230000>;
718c2ecf20Sopenharmony_ci			turbo-mode;
728c2ecf20Sopenharmony_ci		};
738c2ecf20Sopenharmony_ci	};
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci	clkin_gmac: external-gmac-clock {
768c2ecf20Sopenharmony_ci		compatible = "fixed-clock";
778c2ecf20Sopenharmony_ci		clock-frequency = <125000000>;
788c2ecf20Sopenharmony_ci		clock-output-names = "clkin_gmac";
798c2ecf20Sopenharmony_ci		#clock-cells = <0>;
808c2ecf20Sopenharmony_ci	};
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci	vcc1v2_phy: vcc1v2-phy {
838c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
848c2ecf20Sopenharmony_ci		regulator-name = "vcc1v2_phy";
858c2ecf20Sopenharmony_ci		regulator-always-on;
868c2ecf20Sopenharmony_ci		regulator-boot-on;
878c2ecf20Sopenharmony_ci		regulator-min-microvolt = <1200000>;
888c2ecf20Sopenharmony_ci		regulator-max-microvolt = <1200000>;
898c2ecf20Sopenharmony_ci		vin-supply = <&vcc5v0_sys>;
908c2ecf20Sopenharmony_ci	};
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci	vcc3v3_sys: vcc3v3-sys {
938c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
948c2ecf20Sopenharmony_ci		regulator-name = "vcc3v3_sys";
958c2ecf20Sopenharmony_ci		regulator-always-on;
968c2ecf20Sopenharmony_ci		regulator-boot-on;
978c2ecf20Sopenharmony_ci		regulator-min-microvolt = <3300000>;
988c2ecf20Sopenharmony_ci		regulator-max-microvolt = <3300000>;
998c2ecf20Sopenharmony_ci		vin-supply = <&vcc5v0_sys>;
1008c2ecf20Sopenharmony_ci	};
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci	vcc5v0_host: vcc5v0-host-regulator {
1038c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
1048c2ecf20Sopenharmony_ci		gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
1058c2ecf20Sopenharmony_ci		pinctrl-names = "default";
1068c2ecf20Sopenharmony_ci		pinctrl-0 = <&vcc5v0_host_en>;
1078c2ecf20Sopenharmony_ci		regulator-name = "vcc5v0_host";
1088c2ecf20Sopenharmony_ci		regulator-always-on;
1098c2ecf20Sopenharmony_ci		vin-supply = <&vcc5v0_sys>;
1108c2ecf20Sopenharmony_ci	};
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci	vcc5v0_sys: vcc5v0-sys {
1138c2ecf20Sopenharmony_ci		compatible = "regulator-fixed";
1148c2ecf20Sopenharmony_ci		regulator-name = "vcc5v0_sys";
1158c2ecf20Sopenharmony_ci		regulator-always-on;
1168c2ecf20Sopenharmony_ci		regulator-boot-on;
1178c2ecf20Sopenharmony_ci		regulator-min-microvolt = <5000000>;
1188c2ecf20Sopenharmony_ci		regulator-max-microvolt = <5000000>;
1198c2ecf20Sopenharmony_ci	};
1208c2ecf20Sopenharmony_ci};
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ci&cpu_b0 {
1238c2ecf20Sopenharmony_ci	cpu-supply = <&vdd_cpu_b>;
1248c2ecf20Sopenharmony_ci};
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_ci&cpu_b1 {
1278c2ecf20Sopenharmony_ci	cpu-supply = <&vdd_cpu_b>;
1288c2ecf20Sopenharmony_ci};
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ci&cpu_l0 {
1318c2ecf20Sopenharmony_ci	cpu-supply = <&vdd_cpu_l>;
1328c2ecf20Sopenharmony_ci};
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_ci&cpu_l1 {
1358c2ecf20Sopenharmony_ci	cpu-supply = <&vdd_cpu_l>;
1368c2ecf20Sopenharmony_ci};
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_ci&cpu_l2 {
1398c2ecf20Sopenharmony_ci	cpu-supply = <&vdd_cpu_l>;
1408c2ecf20Sopenharmony_ci};
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ci&cpu_l3 {
1438c2ecf20Sopenharmony_ci	cpu-supply = <&vdd_cpu_l>;
1448c2ecf20Sopenharmony_ci};
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ci&emmc_phy {
1478c2ecf20Sopenharmony_ci	status = "okay";
1488c2ecf20Sopenharmony_ci	drive-impedance-ohm = <33>;
1498c2ecf20Sopenharmony_ci};
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ci&gmac {
1528c2ecf20Sopenharmony_ci	assigned-clocks = <&cru SCLK_RMII_SRC>;
1538c2ecf20Sopenharmony_ci	assigned-clock-parents = <&clkin_gmac>;
1548c2ecf20Sopenharmony_ci	clock_in_out = "input";
1558c2ecf20Sopenharmony_ci	phy-supply = <&vcc1v2_phy>;
1568c2ecf20Sopenharmony_ci	phy-mode = "rgmii";
1578c2ecf20Sopenharmony_ci	pinctrl-names = "default";
1588c2ecf20Sopenharmony_ci	pinctrl-0 = <&rgmii_pins>;
1598c2ecf20Sopenharmony_ci	snps,reset-gpio = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
1608c2ecf20Sopenharmony_ci	snps,reset-active-low;
1618c2ecf20Sopenharmony_ci	snps,reset-delays-us = <0 10000 50000>;
1628c2ecf20Sopenharmony_ci	tx_delay = <0x10>;
1638c2ecf20Sopenharmony_ci	rx_delay = <0x10>;
1648c2ecf20Sopenharmony_ci	status = "okay";
1658c2ecf20Sopenharmony_ci};
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci&gpu {
1688c2ecf20Sopenharmony_ci	mali-supply = <&vdd_gpu>;
1698c2ecf20Sopenharmony_ci	status = "okay";
1708c2ecf20Sopenharmony_ci};
1718c2ecf20Sopenharmony_ci
1728c2ecf20Sopenharmony_ci&i2c0 {
1738c2ecf20Sopenharmony_ci	status = "okay";
1748c2ecf20Sopenharmony_ci	i2c-scl-rising-time-ns = <168>;
1758c2ecf20Sopenharmony_ci	i2c-scl-falling-time-ns = <4>;
1768c2ecf20Sopenharmony_ci	clock-frequency = <400000>;
1778c2ecf20Sopenharmony_ci
1788c2ecf20Sopenharmony_ci	rk808: pmic@1b {
1798c2ecf20Sopenharmony_ci		compatible = "rockchip,rk808";
1808c2ecf20Sopenharmony_ci		reg = <0x1b>;
1818c2ecf20Sopenharmony_ci		interrupt-parent = <&gpio1>;
1828c2ecf20Sopenharmony_ci		interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
1838c2ecf20Sopenharmony_ci		#clock-cells = <1>;
1848c2ecf20Sopenharmony_ci		clock-output-names = "xin32k", "rk808-clkout2";
1858c2ecf20Sopenharmony_ci		pinctrl-names = "default";
1868c2ecf20Sopenharmony_ci		pinctrl-0 = <&pmic_int_l>;
1878c2ecf20Sopenharmony_ci		rockchip,system-power-controller;
1888c2ecf20Sopenharmony_ci		wakeup-source;
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_ci		vcc1-supply = <&vcc5v0_sys>;
1918c2ecf20Sopenharmony_ci		vcc2-supply = <&vcc5v0_sys>;
1928c2ecf20Sopenharmony_ci		vcc3-supply = <&vcc5v0_sys>;
1938c2ecf20Sopenharmony_ci		vcc4-supply = <&vcc5v0_sys>;
1948c2ecf20Sopenharmony_ci		vcc6-supply = <&vcc5v0_sys>;
1958c2ecf20Sopenharmony_ci		vcc7-supply = <&vcc5v0_sys>;
1968c2ecf20Sopenharmony_ci		vcc8-supply = <&vcc3v3_sys>;
1978c2ecf20Sopenharmony_ci		vcc9-supply = <&vcc5v0_sys>;
1988c2ecf20Sopenharmony_ci		vcc10-supply = <&vcc5v0_sys>;
1998c2ecf20Sopenharmony_ci		vcc11-supply = <&vcc5v0_sys>;
2008c2ecf20Sopenharmony_ci		vcc12-supply = <&vcc3v3_sys>;
2018c2ecf20Sopenharmony_ci		vddio-supply = <&vcc1v8_pmu>;
2028c2ecf20Sopenharmony_ci
2038c2ecf20Sopenharmony_ci		regulators {
2048c2ecf20Sopenharmony_ci			vdd_center: DCDC_REG1 {
2058c2ecf20Sopenharmony_ci				regulator-name = "vdd_center";
2068c2ecf20Sopenharmony_ci				regulator-min-microvolt = <750000>;
2078c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1350000>;
2088c2ecf20Sopenharmony_ci				regulator-ramp-delay = <6001>;
2098c2ecf20Sopenharmony_ci				regulator-always-on;
2108c2ecf20Sopenharmony_ci				regulator-boot-on;
2118c2ecf20Sopenharmony_ci				regulator-state-mem {
2128c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
2138c2ecf20Sopenharmony_ci				};
2148c2ecf20Sopenharmony_ci			};
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_ci			vdd_cpu_l: DCDC_REG2 {
2178c2ecf20Sopenharmony_ci				regulator-name = "vdd_cpu_l";
2188c2ecf20Sopenharmony_ci				regulator-min-microvolt = <750000>;
2198c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1350000>;
2208c2ecf20Sopenharmony_ci				regulator-ramp-delay = <6001>;
2218c2ecf20Sopenharmony_ci				regulator-always-on;
2228c2ecf20Sopenharmony_ci				regulator-boot-on;
2238c2ecf20Sopenharmony_ci				regulator-state-mem {
2248c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
2258c2ecf20Sopenharmony_ci				};
2268c2ecf20Sopenharmony_ci			};
2278c2ecf20Sopenharmony_ci
2288c2ecf20Sopenharmony_ci			vcc_ddr: DCDC_REG3 {
2298c2ecf20Sopenharmony_ci				regulator-name = "vcc_ddr";
2308c2ecf20Sopenharmony_ci				regulator-always-on;
2318c2ecf20Sopenharmony_ci				regulator-boot-on;
2328c2ecf20Sopenharmony_ci				regulator-state-mem {
2338c2ecf20Sopenharmony_ci					regulator-on-in-suspend;
2348c2ecf20Sopenharmony_ci				};
2358c2ecf20Sopenharmony_ci			};
2368c2ecf20Sopenharmony_ci
2378c2ecf20Sopenharmony_ci			vcc_1v8: DCDC_REG4 {
2388c2ecf20Sopenharmony_ci				regulator-name = "vcc_1v8";
2398c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1800000>;
2408c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1800000>;
2418c2ecf20Sopenharmony_ci				regulator-always-on;
2428c2ecf20Sopenharmony_ci				regulator-boot-on;
2438c2ecf20Sopenharmony_ci				regulator-state-mem {
2448c2ecf20Sopenharmony_ci					regulator-on-in-suspend;
2458c2ecf20Sopenharmony_ci					regulator-suspend-microvolt = <1800000>;
2468c2ecf20Sopenharmony_ci				};
2478c2ecf20Sopenharmony_ci			};
2488c2ecf20Sopenharmony_ci
2498c2ecf20Sopenharmony_ci			vcc_ldo1: LDO_REG1 {
2508c2ecf20Sopenharmony_ci				regulator-name = "vcc_ldo1";
2518c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1800000>;
2528c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1800000>;
2538c2ecf20Sopenharmony_ci				regulator-boot-on;
2548c2ecf20Sopenharmony_ci				regulator-state-mem {
2558c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
2568c2ecf20Sopenharmony_ci				};
2578c2ecf20Sopenharmony_ci			};
2588c2ecf20Sopenharmony_ci
2598c2ecf20Sopenharmony_ci			vcc1v8_hdmi: LDO_REG2 {
2608c2ecf20Sopenharmony_ci				regulator-name = "vcc1v8_hdmi";
2618c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1800000>;
2628c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1800000>;
2638c2ecf20Sopenharmony_ci				regulator-always-on;
2648c2ecf20Sopenharmony_ci				regulator-boot-on;
2658c2ecf20Sopenharmony_ci				regulator-state-mem {
2668c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
2678c2ecf20Sopenharmony_ci				};
2688c2ecf20Sopenharmony_ci			};
2698c2ecf20Sopenharmony_ci
2708c2ecf20Sopenharmony_ci			vcc1v8_pmu: LDO_REG3 {
2718c2ecf20Sopenharmony_ci				regulator-name = "vcc1v8_pmu";
2728c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1800000>;
2738c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1800000>;
2748c2ecf20Sopenharmony_ci				regulator-always-on;
2758c2ecf20Sopenharmony_ci				regulator-boot-on;
2768c2ecf20Sopenharmony_ci				regulator-state-mem {
2778c2ecf20Sopenharmony_ci					regulator-on-in-suspend;
2788c2ecf20Sopenharmony_ci					regulator-suspend-microvolt = <1800000>;
2798c2ecf20Sopenharmony_ci				};
2808c2ecf20Sopenharmony_ci			};
2818c2ecf20Sopenharmony_ci
2828c2ecf20Sopenharmony_ci			vcc_sd: LDO_REG4 {
2838c2ecf20Sopenharmony_ci				regulator-name = "vcc_sd";
2848c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1800000>;
2858c2ecf20Sopenharmony_ci				regulator-max-microvolt = <3000000>;
2868c2ecf20Sopenharmony_ci				regulator-always-on;
2878c2ecf20Sopenharmony_ci				regulator-boot-on;
2888c2ecf20Sopenharmony_ci				regulator-state-mem {
2898c2ecf20Sopenharmony_ci					regulator-on-in-suspend;
2908c2ecf20Sopenharmony_ci					regulator-suspend-microvolt = <3000000>;
2918c2ecf20Sopenharmony_ci				};
2928c2ecf20Sopenharmony_ci			};
2938c2ecf20Sopenharmony_ci
2948c2ecf20Sopenharmony_ci			vcc_ldo5: LDO_REG5 {
2958c2ecf20Sopenharmony_ci				regulator-name = "vcc_ldo5";
2968c2ecf20Sopenharmony_ci				regulator-min-microvolt = <3000000>;
2978c2ecf20Sopenharmony_ci				regulator-max-microvolt = <3000000>;
2988c2ecf20Sopenharmony_ci				regulator-boot-on;
2998c2ecf20Sopenharmony_ci				regulator-state-mem {
3008c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
3018c2ecf20Sopenharmony_ci				};
3028c2ecf20Sopenharmony_ci			};
3038c2ecf20Sopenharmony_ci
3048c2ecf20Sopenharmony_ci			vcc_ldo6: LDO_REG6 {
3058c2ecf20Sopenharmony_ci				regulator-name = "vcc_ldo6";
3068c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1500000>;
3078c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1500000>;
3088c2ecf20Sopenharmony_ci				regulator-boot-on;
3098c2ecf20Sopenharmony_ci				regulator-state-mem {
3108c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
3118c2ecf20Sopenharmony_ci				};
3128c2ecf20Sopenharmony_ci			};
3138c2ecf20Sopenharmony_ci
3148c2ecf20Sopenharmony_ci			vcc0v9_hdmi: LDO_REG7 {
3158c2ecf20Sopenharmony_ci				regulator-name = "vcc0v9_hdmi";
3168c2ecf20Sopenharmony_ci				regulator-min-microvolt = <900000>;
3178c2ecf20Sopenharmony_ci				regulator-max-microvolt = <900000>;
3188c2ecf20Sopenharmony_ci				regulator-always-on;
3198c2ecf20Sopenharmony_ci				regulator-boot-on;
3208c2ecf20Sopenharmony_ci				regulator-state-mem {
3218c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
3228c2ecf20Sopenharmony_ci				};
3238c2ecf20Sopenharmony_ci			};
3248c2ecf20Sopenharmony_ci
3258c2ecf20Sopenharmony_ci			vcc_efuse: LDO_REG8 {
3268c2ecf20Sopenharmony_ci				regulator-name = "vcc_efuse";
3278c2ecf20Sopenharmony_ci				regulator-min-microvolt = <1800000>;
3288c2ecf20Sopenharmony_ci				regulator-max-microvolt = <1800000>;
3298c2ecf20Sopenharmony_ci				regulator-always-on;
3308c2ecf20Sopenharmony_ci				regulator-boot-on;
3318c2ecf20Sopenharmony_ci				regulator-state-mem {
3328c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
3338c2ecf20Sopenharmony_ci				};
3348c2ecf20Sopenharmony_ci			};
3358c2ecf20Sopenharmony_ci
3368c2ecf20Sopenharmony_ci			vcc3v3_s3: SWITCH_REG1 {
3378c2ecf20Sopenharmony_ci				regulator-name = "vcc3v3_s3";
3388c2ecf20Sopenharmony_ci				regulator-always-on;
3398c2ecf20Sopenharmony_ci				regulator-boot-on;
3408c2ecf20Sopenharmony_ci				regulator-state-mem {
3418c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
3428c2ecf20Sopenharmony_ci				};
3438c2ecf20Sopenharmony_ci			};
3448c2ecf20Sopenharmony_ci
3458c2ecf20Sopenharmony_ci			vcc3v3_s0: SWITCH_REG2 {
3468c2ecf20Sopenharmony_ci				regulator-name = "vcc3v3_s0";
3478c2ecf20Sopenharmony_ci				regulator-always-on;
3488c2ecf20Sopenharmony_ci				regulator-boot-on;
3498c2ecf20Sopenharmony_ci				regulator-state-mem {
3508c2ecf20Sopenharmony_ci					regulator-off-in-suspend;
3518c2ecf20Sopenharmony_ci				};
3528c2ecf20Sopenharmony_ci			};
3538c2ecf20Sopenharmony_ci		};
3548c2ecf20Sopenharmony_ci	};
3558c2ecf20Sopenharmony_ci
3568c2ecf20Sopenharmony_ci	vdd_gpu: regulator@60 {
3578c2ecf20Sopenharmony_ci		compatible = "fcs,fan53555";
3588c2ecf20Sopenharmony_ci		reg = <0x60>;
3598c2ecf20Sopenharmony_ci		fcs,suspend-voltage-selector = <1>;
3608c2ecf20Sopenharmony_ci		regulator-name = "vdd_gpu";
3618c2ecf20Sopenharmony_ci		regulator-min-microvolt = <600000>;
3628c2ecf20Sopenharmony_ci		regulator-max-microvolt = <1230000>;
3638c2ecf20Sopenharmony_ci		regulator-ramp-delay = <1000>;
3648c2ecf20Sopenharmony_ci		regulator-always-on;
3658c2ecf20Sopenharmony_ci		regulator-boot-on;
3668c2ecf20Sopenharmony_ci		vin-supply = <&vcc5v0_sys>;
3678c2ecf20Sopenharmony_ci	};
3688c2ecf20Sopenharmony_ci};
3698c2ecf20Sopenharmony_ci
3708c2ecf20Sopenharmony_ci&i2c7 {
3718c2ecf20Sopenharmony_ci	status = "okay";
3728c2ecf20Sopenharmony_ci	clock-frequency = <400000>;
3738c2ecf20Sopenharmony_ci
3748c2ecf20Sopenharmony_ci	fan: fan@18 {
3758c2ecf20Sopenharmony_ci		compatible = "ti,amc6821";
3768c2ecf20Sopenharmony_ci		reg = <0x18>;
3778c2ecf20Sopenharmony_ci		#cooling-cells = <2>;
3788c2ecf20Sopenharmony_ci	};
3798c2ecf20Sopenharmony_ci
3808c2ecf20Sopenharmony_ci	rtc_twi: rtc@6f {
3818c2ecf20Sopenharmony_ci		compatible = "isil,isl1208";
3828c2ecf20Sopenharmony_ci		reg = <0x6f>;
3838c2ecf20Sopenharmony_ci	};
3848c2ecf20Sopenharmony_ci};
3858c2ecf20Sopenharmony_ci
3868c2ecf20Sopenharmony_ci&i2c8 {
3878c2ecf20Sopenharmony_ci	status = "okay";
3888c2ecf20Sopenharmony_ci	clock-frequency = <400000>;
3898c2ecf20Sopenharmony_ci
3908c2ecf20Sopenharmony_ci	vdd_cpu_b: regulator@60 {
3918c2ecf20Sopenharmony_ci		compatible = "fcs,fan53555";
3928c2ecf20Sopenharmony_ci		reg = <0x60>;
3938c2ecf20Sopenharmony_ci		vin-supply = <&vcc5v0_sys>;
3948c2ecf20Sopenharmony_ci		regulator-name = "vdd_cpu_b";
3958c2ecf20Sopenharmony_ci		regulator-min-microvolt = <600000>;
3968c2ecf20Sopenharmony_ci		regulator-max-microvolt = <1230000>;
3978c2ecf20Sopenharmony_ci		regulator-ramp-delay = <1000>;
3988c2ecf20Sopenharmony_ci		fcs,suspend-voltage-selector = <1>;
3998c2ecf20Sopenharmony_ci		regulator-always-on;
4008c2ecf20Sopenharmony_ci		regulator-boot-on;
4018c2ecf20Sopenharmony_ci	};
4028c2ecf20Sopenharmony_ci};
4038c2ecf20Sopenharmony_ci
4048c2ecf20Sopenharmony_ci&i2s0 {
4058c2ecf20Sopenharmony_ci	pinctrl-0 = <&i2s0_2ch_bus>;
4068c2ecf20Sopenharmony_ci	rockchip,playback-channels = <2>;
4078c2ecf20Sopenharmony_ci	rockchip,capture-channels = <2>;
4088c2ecf20Sopenharmony_ci	status = "okay";
4098c2ecf20Sopenharmony_ci};
4108c2ecf20Sopenharmony_ci
4118c2ecf20Sopenharmony_ci/*
4128c2ecf20Sopenharmony_ci * As Q7 does not specify neither a global nor a RX clock for I2S these
4138c2ecf20Sopenharmony_ci * signals are not used. Furthermore I2S0_LRCK_RX is used as GPIO.
4148c2ecf20Sopenharmony_ci * Therefore we have to redefine the i2s0_2ch_bus definition to prevent
4158c2ecf20Sopenharmony_ci * conflicts.
4168c2ecf20Sopenharmony_ci */
4178c2ecf20Sopenharmony_ci&i2s0_2ch_bus {
4188c2ecf20Sopenharmony_ci	rockchip,pins =
4198c2ecf20Sopenharmony_ci		<3 RK_PD0 1 &pcfg_pull_none>,
4208c2ecf20Sopenharmony_ci		<3 RK_PD2 1 &pcfg_pull_none>,
4218c2ecf20Sopenharmony_ci		<3 RK_PD3 1 &pcfg_pull_none>,
4228c2ecf20Sopenharmony_ci		<3 RK_PD7 1 &pcfg_pull_none>;
4238c2ecf20Sopenharmony_ci};
4248c2ecf20Sopenharmony_ci
4258c2ecf20Sopenharmony_ci&io_domains {
4268c2ecf20Sopenharmony_ci	status = "okay";
4278c2ecf20Sopenharmony_ci	bt656-supply = <&vcc_1v8>;
4288c2ecf20Sopenharmony_ci	audio-supply = <&vcc_1v8>;
4298c2ecf20Sopenharmony_ci	sdmmc-supply = <&vcc_sd>;
4308c2ecf20Sopenharmony_ci	gpio1830-supply = <&vcc_1v8>;
4318c2ecf20Sopenharmony_ci};
4328c2ecf20Sopenharmony_ci
4338c2ecf20Sopenharmony_ci&pmu_io_domains {
4348c2ecf20Sopenharmony_ci	status = "okay";
4358c2ecf20Sopenharmony_ci	pmu1830-supply = <&vcc_1v8>;
4368c2ecf20Sopenharmony_ci};
4378c2ecf20Sopenharmony_ci
4388c2ecf20Sopenharmony_ci&pwm2 {
4398c2ecf20Sopenharmony_ci	status = "okay";
4408c2ecf20Sopenharmony_ci};
4418c2ecf20Sopenharmony_ci
4428c2ecf20Sopenharmony_ci&pinctrl {
4438c2ecf20Sopenharmony_ci	i2c8 {
4448c2ecf20Sopenharmony_ci		i2c8_xfer_a: i2c8-xfer {
4458c2ecf20Sopenharmony_ci			rockchip,pins =
4468c2ecf20Sopenharmony_ci			  <1 RK_PC4 1 &pcfg_pull_up>,
4478c2ecf20Sopenharmony_ci			  <1 RK_PC5 1 &pcfg_pull_up>;
4488c2ecf20Sopenharmony_ci		};
4498c2ecf20Sopenharmony_ci	};
4508c2ecf20Sopenharmony_ci
4518c2ecf20Sopenharmony_ci	leds {
4528c2ecf20Sopenharmony_ci		module_led_pin: module-led-pin {
4538c2ecf20Sopenharmony_ci			rockchip,pins =
4548c2ecf20Sopenharmony_ci			  <2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
4558c2ecf20Sopenharmony_ci		};
4568c2ecf20Sopenharmony_ci	};
4578c2ecf20Sopenharmony_ci
4588c2ecf20Sopenharmony_ci	pmic {
4598c2ecf20Sopenharmony_ci		pmic_int_l: pmic-int-l {
4608c2ecf20Sopenharmony_ci			rockchip,pins =
4618c2ecf20Sopenharmony_ci			  <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
4628c2ecf20Sopenharmony_ci		};
4638c2ecf20Sopenharmony_ci	};
4648c2ecf20Sopenharmony_ci
4658c2ecf20Sopenharmony_ci	usb2 {
4668c2ecf20Sopenharmony_ci		vcc5v0_host_en: vcc5v0-host-en {
4678c2ecf20Sopenharmony_ci			rockchip,pins =
4688c2ecf20Sopenharmony_ci			  <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
4698c2ecf20Sopenharmony_ci		};
4708c2ecf20Sopenharmony_ci	};
4718c2ecf20Sopenharmony_ci};
4728c2ecf20Sopenharmony_ci
4738c2ecf20Sopenharmony_ci&sdhci {
4748c2ecf20Sopenharmony_ci	/*
4758c2ecf20Sopenharmony_ci	 * Signal integrity isn't great at 200MHz but 100MHz has proven stable
4768c2ecf20Sopenharmony_ci	 * enough.
4778c2ecf20Sopenharmony_ci	 */
4788c2ecf20Sopenharmony_ci	max-frequency = <100000000>;
4798c2ecf20Sopenharmony_ci
4808c2ecf20Sopenharmony_ci	bus-width = <8>;
4818c2ecf20Sopenharmony_ci	mmc-hs400-1_8v;
4828c2ecf20Sopenharmony_ci	mmc-hs400-enhanced-strobe;
4838c2ecf20Sopenharmony_ci	non-removable;
4848c2ecf20Sopenharmony_ci	status = "okay";
4858c2ecf20Sopenharmony_ci};
4868c2ecf20Sopenharmony_ci
4878c2ecf20Sopenharmony_ci&sdmmc {
4888c2ecf20Sopenharmony_ci	vqmmc-supply = <&vcc_sd>;
4898c2ecf20Sopenharmony_ci};
4908c2ecf20Sopenharmony_ci
4918c2ecf20Sopenharmony_ci&spi1 {
4928c2ecf20Sopenharmony_ci	status = "okay";
4938c2ecf20Sopenharmony_ci
4948c2ecf20Sopenharmony_ci	norflash: flash@0 {
4958c2ecf20Sopenharmony_ci		compatible = "jedec,spi-nor";
4968c2ecf20Sopenharmony_ci		reg = <0>;
4978c2ecf20Sopenharmony_ci		spi-max-frequency = <50000000>;
4988c2ecf20Sopenharmony_ci	};
4998c2ecf20Sopenharmony_ci};
5008c2ecf20Sopenharmony_ci
5018c2ecf20Sopenharmony_ci&tcphy1 {
5028c2ecf20Sopenharmony_ci	status = "okay";
5038c2ecf20Sopenharmony_ci};
5048c2ecf20Sopenharmony_ci
5058c2ecf20Sopenharmony_ci&tsadc {
5068c2ecf20Sopenharmony_ci	rockchip,hw-tshut-mode = <1>;
5078c2ecf20Sopenharmony_ci	rockchip,hw-tshut-polarity = <1>;
5088c2ecf20Sopenharmony_ci	status = "okay";
5098c2ecf20Sopenharmony_ci};
5108c2ecf20Sopenharmony_ci
5118c2ecf20Sopenharmony_ci&u2phy1 {
5128c2ecf20Sopenharmony_ci	status = "okay";
5138c2ecf20Sopenharmony_ci
5148c2ecf20Sopenharmony_ci	u2phy1_otg: otg-port {
5158c2ecf20Sopenharmony_ci		status = "okay";
5168c2ecf20Sopenharmony_ci	};
5178c2ecf20Sopenharmony_ci
5188c2ecf20Sopenharmony_ci	u2phy1_host: host-port {
5198c2ecf20Sopenharmony_ci		phy-supply = <&vcc5v0_host>;
5208c2ecf20Sopenharmony_ci		status = "okay";
5218c2ecf20Sopenharmony_ci	};
5228c2ecf20Sopenharmony_ci};
5238c2ecf20Sopenharmony_ci
5248c2ecf20Sopenharmony_ci&usbdrd3_1 {
5258c2ecf20Sopenharmony_ci	status = "okay";
5268c2ecf20Sopenharmony_ci};
5278c2ecf20Sopenharmony_ci
5288c2ecf20Sopenharmony_ci&usbdrd_dwc3_1 {
5298c2ecf20Sopenharmony_ci	status = "okay";
5308c2ecf20Sopenharmony_ci	dr_mode = "host";
5318c2ecf20Sopenharmony_ci};
5328c2ecf20Sopenharmony_ci
5338c2ecf20Sopenharmony_ci&usb_host1_ehci {
5348c2ecf20Sopenharmony_ci	status = "okay";
5358c2ecf20Sopenharmony_ci};
5368c2ecf20Sopenharmony_ci
5378c2ecf20Sopenharmony_ci&usb_host1_ohci {
5388c2ecf20Sopenharmony_ci	status = "okay";
5398c2ecf20Sopenharmony_ci};
540