be97548
From patchwork Wed Sep 26 06:24:57 2018
be97548
Content-Type: text/plain; charset="utf-8"
be97548
MIME-Version: 1.0
be97548
Content-Transfer-Encoding: 7bit
be97548
X-Patchwork-Submitter: Akash Gajjar <Akash_Gajjar@mentor.com>
be97548
X-Patchwork-Id: 10615319
be97548
Return-Path: 
be97548
 <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org>
be97548
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
be97548
 [172.30.200.125])
be97548
	by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 472D715A6
be97548
	for <patchwork-linux-arm@patchwork.kernel.org>;
be97548
 Wed, 26 Sep 2018 06:28:11 +0000 (UTC)
be97548
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
be97548
	by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32E3C29509
be97548
	for <patchwork-linux-arm@patchwork.kernel.org>;
be97548
 Wed, 26 Sep 2018 06:28:11 +0000 (UTC)
be97548
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
be97548
	id 22E0729725; Wed, 26 Sep 2018 06:28:11 +0000 (UTC)
be97548
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
be97548
	pdx-wl-mail.web.codeaurora.org
be97548
X-Spam-Level: 
be97548
X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED,
be97548
	DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable
be97548
	version=3.3.1
be97548
Received: from bombadil.infradead.org (bombadil.infradead.org
be97548
 [198.137.202.133])
be97548
	(using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits))
be97548
	(No client certificate requested)
be97548
	by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6DA2029509
be97548
	for <patchwork-linux-arm@patchwork.kernel.org>;
be97548
 Wed, 26 Sep 2018 06:28:07 +0000 (UTC)
be97548
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
be97548
	d=lists.infradead.org; s=bombadil.20170209; h=Sender:
be97548
	Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:
be97548
	List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:
be97548
	Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description:
be97548
	Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
be97548
	List-Owner; bh=ddeyiUGvmwlUUw+9+6b4C/EKK7hZfyuXiqxwUJxsL9c=; b=W5ngixHWjBQvJa
be97548
	A+8sOKC/eNNvzP9hWMMd1XjlYIlxbqdjCEHokv7m2UTFbuqcHnvGWaf3dF3tCv5rKPYRu+oI5TUmi
be97548
	yzvQbYRAOxJ9F1GTL8KRlR2wKDwk9ytfVlxNms7Hgfl7CYfSX7f6Ln72YNbBw/BbwV/VZBt72Fr0G
be97548
	4kJMqoZxeKjTcxj0NaVoEAYpXfJLCpX5AdXUrLIdRsbeN84NALKpd1RgllsdUk3dymUtIhc9rhX1y
be97548
	tjMoSWDdcEf0dTxjGtFOXL+vIA8/mF6J/fJx12VSPsT/CrbMM54M/AqBvfmOVgYP8rPk/SZgHGTZV
be97548
	uouz21HtNs50aqxpQk5g==;
be97548
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
be97548
	by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux))
be97548
	id 1g53Iq-0000AF-2i; Wed, 26 Sep 2018 06:28:04 +0000
be97548
Received: from relay1.mentorg.com ([192.94.38.131])
be97548
 by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
be97548
 id 1g53I7-00007i-6r; Wed, 26 Sep 2018 06:27:21 +0000
be97548
Received: from nat-ies.mentorg.com ([192.94.31.2]
be97548
 helo=SVR-IES-MBX-04.mgc.mentorg.com)
be97548
 by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256)
be97548
 id 1g53HN-0006hO-OV from Akash_Gajjar@mentor.com ;
be97548
 Tue, 25 Sep 2018 23:26:34 -0700
be97548
Received: from eyas.local (137.202.0.90) by SVR-IES-MBX-04.mgc.mentorg.com
be97548
 (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep
be97548
 2018 07:26:26 +0100
be97548
From: Akash Gajjar <Akash_Gajjar@mentor.com>
be97548
To: <heiko@sntech.de>
be97548
Subject: [PATCH v3] arm64: dts: rockchip: add initial dts support for
be97548
 Rockpro64
be97548
Date: Wed, 26 Sep 2018 11:54:57 +0530
be97548
Message-ID: <1537943105-21247-1-git-send-email-Akash_Gajjar@mentor.com>
be97548
X-Mailer: git-send-email 1.9.1
be97548
In-Reply-To: <Akash_Gajjar@mentor.com>
be97548
References: <Akash_Gajjar@mentor.com>
be97548
MIME-Version: 1.0
be97548
X-Originating-IP: [137.202.0.90]
be97548
X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To
be97548
 SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4)
be97548
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
be97548
X-CRM114-CacheID: sfid-20180925_232719_296426_D3C01020 
be97548
X-CRM114-Status: GOOD (  21.87  )
be97548
X-BeenThere: linux-arm-kernel@lists.infradead.org
be97548
X-Mailman-Version: 2.1.21
be97548
Precedence: list
be97548
List-Id: <linux-arm-kernel.lists.infradead.org>
be97548
List-Unsubscribe: 
be97548
 <http://lists.infradead.org/mailman/options/linux-arm-kernel>,
be97548
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
be97548
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
be97548
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
be97548
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
be97548
List-Subscribe: 
be97548
 <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
be97548
 <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
be97548
Cc: Mark Rutland <mark.rutland@arm.com>,
be97548
 Shohei Maruyama <cheat.sc.linux@outlook.com>, Arnd Bergmann <arnd@arndb.de>,
be97548
 devicetree@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
be97548
 Shawn Lin <shawn.lin@rock-chips.com>, linux-kernel@vger.kernel.org,
be97548
 Masahiro Yamada <yamada.masahiro@socionext.com>,
be97548
 linux-rockchip@lists.infradead.org, Rob Herring <robh+dt@kernel.org>,
be97548
 Klaus Goger <klaus.goger@theobroma-systems.com>,
be97548
 Philippe Ombredanne <pombredanne@nexb.com>,
be97548
 Enric Balletbo i Serra <enric.balletbo@collabora.com>,
be97548
 Pragnesh_patel@mentor.com, Deepak_das@mentor.com,
be97548
 Levin Du <djw@t-chip.com.cn>,
be97548
 Ezequiel Garcia <ezequiel@collabora.com>, Pierre-Hugues Husson <phh@phh.me>,
be97548
 linux-arm-kernel@lists.infradead.org
be97548
Content-Type: text/plain; charset="us-ascii"
be97548
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
be97548
Errors-To: 
be97548
 linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
be97548
X-Virus-Scanned: ClamAV using ClamSMTP
be97548
be97548
Rockpro64 is a rockchip RK3399 based board from pine64.org.
be97548
This patch adds basic device node support for Rockpro64 board and make it able
be97548
to bring up.
be97548
be97548
Peripheral Works
be97548
- Sdcard
be97548
- USB 2.0, 3.0
be97548
- Leds
be97548
- Ethernet
be97548
- Debug console
be97548
be97548
Not working:
be97548
- USB Type-C
be97548
be97548
Signed-off-by: Akash Gajjar <Akash_Gajjar@mentor.com>
be97548
Acked-by: Deepak Das <Deepak_Das@mentor.com>
be97548
---
be97548
changes for v2
be97548
- Added support for usb 2.0, 3.0
be97548
- Added fusb302 node and its regulator support
be97548
- Cleanup pinctrl node
be97548
- Remove backlight, pcie, sound codec node inherited from firefly-rk3399 dts
be97548
changes for v3
be97548
- Added copyright properly
be97548
- Typo correction in commit message
be97548
be97548
 Documentation/devicetree/bindings/arm/rockchip.txt |   4 +
be97548
 arch/arm64/boot/dts/rockchip/Makefile              |   1 +
be97548
 arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts  | 692 +++++++++++++++++++++
be97548
 3 files changed, 697 insertions(+)
be97548
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
be97548
be97548
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
be97548
index acfd3c7..ac95183 100644
be97548
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
be97548
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
be97548
@@ -160,6 +160,10 @@ Rockchip platforms device tree bindings
be97548
     Required root node properties:
be97548
     - compatible = "pine64,rock64", "rockchip,rk3328";
be97548
 
be97548
+- Pine64 RockPro64 board:
be97548
+    Required root node properties:
be97548
+    - compatible = "pine64,rockpro64", "rockchip,rk3399";
be97548
+
be97548
 - Rockchip PX3 Evaluation board:
be97548
     Required root node properties:
be97548
       - compatible = "rockchip,px3-evb", "rockchip,px3", "rockchip,rk3188";
be97548
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
be97548
index b0092d9..03d523a 100644
be97548
--- a/arch/arm64/boot/dts/rockchip/Makefile
be97548
+++ b/arch/arm64/boot/dts/rockchip/Makefile
be97548
@@ -15,5 +15,6 @@
be97548
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
be97548
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
be97548
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960.dtb
be97548
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rockpro64.dtb
be97548
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
be97548
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
be97548
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
be97548
new file mode 100644
be97548
index 0000000..1d35f54
be97548
--- /dev/null
be97548
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
be97548
@@ -0,0 +1,692 @@
be97548
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
be97548
+/*
be97548
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
be97548
+ * Copyright (c) 2018 Akash Gajjar <Akash_Gajjar@mentor.com>
be97548
+ */
be97548
+
be97548
+/dts-v1/;
be97548
+#include <dt-bindings/input/linux-event-codes.h>
be97548
+#include <dt-bindings/pwm/pwm.h>
be97548
+#include "rk3399.dtsi"
be97548
+#include "rk3399-opp.dtsi"
be97548
+
be97548
+/ {
be97548
+	model = "Pine64 RockPro64";
be97548
+	compatible = "pine64,rockpro64", "rockchip,rk3399";
be97548
+
be97548
+	chosen {
be97548
+		stdout-path = "serial2:1500000n8";
be97548
+	};
be97548
+
be97548
+	clkin_gmac: external-gmac-clock {
be97548
+		compatible = "fixed-clock";
be97548
+		clock-frequency = <125000000>;
be97548
+		clock-output-names = "clkin_gmac";
be97548
+		#clock-cells = <0>;
be97548
+	};
be97548
+
be97548
+	dc_12v: dc-12v {
be97548
+		compatible = "regulator-fixed";
be97548
+		regulator-name = "dc_12v";
be97548
+		regulator-always-on;
be97548
+		regulator-boot-on;
be97548
+		regulator-min-microvolt = <12000000>;
be97548
+		regulator-max-microvolt = <12000000>;
be97548
+	};
be97548
+
be97548
+	gpio-keys {
be97548
+		compatible = "gpio-keys";
be97548
+		autorepeat;
be97548
+		pinctrl-names = "default";
be97548
+		pinctrl-0 = <&pwrbtn>;
be97548
+
be97548
+		power {
be97548
+			debounce-interval = <100>;
be97548
+			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
be97548
+			label = "GPIO Key Power";
be97548
+			linux,code = <KEY_POWER>;
be97548
+			wakeup-source;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	leds {
be97548
+		compatible = "gpio-leds";
be97548
+		pinctrl-names = "default";
be97548
+		pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>;
be97548
+
be97548
+		work-led {
be97548
+			label = "work";
be97548
+			default-state = "on";
be97548
+			gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
be97548
+		};
be97548
+
be97548
+		diy-led {
be97548
+			label = "diy";
be97548
+			default-state = "off";
be97548
+			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	sdio_pwrseq: sdio-pwrseq {
be97548
+		compatible = "mmc-pwrseq-simple";
be97548
+		clocks = <&rk808 1>;
be97548
+		clock-names = "ext_clock";
be97548
+		pinctrl-names = "default";
be97548
+		pinctrl-0 = <&wifi_enable_h>;
be97548
+
be97548
+		/*
be97548
+		 * On the module itself this is one of these (depending
be97548
+		 * on the actual card populated):
be97548
+		 * - SDIO_RESET_L_WL_REG_ON
be97548
+		 * - PDN (power down when low)
be97548
+		 */
be97548
+		reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
be97548
+	};
be97548
+
be97548
+	/* switched by pmic_sleep */
be97548
+	vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
be97548
+		compatible = "regulator-fixed";
be97548
+		regulator-name = "vcc1v8_s3";
be97548
+		regulator-always-on;
be97548
+		regulator-boot-on;
be97548
+		regulator-min-microvolt = <1800000>;
be97548
+		regulator-max-microvolt = <1800000>;
be97548
+		vin-supply = <&vcc_1v8>;
be97548
+	};
be97548
+
be97548
+	vcc3v3_pcie: vcc3v3-pcie-regulator {
be97548
+		compatible = "regulator-fixed";
be97548
+		enable-active-high;
be97548
+		gpio = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
be97548
+		pinctrl-names = "default";
be97548
+		pinctrl-0 = <&pcie_pwr_en>;
be97548
+		regulator-name = "vcc3v3_pcie";
be97548
+		regulator-always-on;
be97548
+		regulator-boot-on;
be97548
+		vin-supply = <&dc_12v>;
be97548
+	};
be97548
+
be97548
+	vcc3v3_sys: vcc3v3-sys {
be97548
+		compatible = "regulator-fixed";
be97548
+		regulator-name = "vcc3v3_sys";
be97548
+		regulator-always-on;
be97548
+		regulator-boot-on;
be97548
+		regulator-min-microvolt = <3300000>;
be97548
+		regulator-max-microvolt = <3300000>;
be97548
+		vin-supply = <&vcc_sys>;
be97548
+	};
be97548
+
be97548
+	/* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
be97548
+	vcc5v0_host: vcc5v0-host-regulator {
be97548
+		compatible = "regulator-fixed";
be97548
+		enable-active-high;
be97548
+		gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
be97548
+		pinctrl-names = "default";
be97548
+		pinctrl-0 = <&vcc5v0_host_en>;
be97548
+		regulator-name = "vcc5v0_host";
be97548
+		regulator-always-on;
be97548
+		vin-supply = <&vcc_sys>;
be97548
+	};
be97548
+
be97548
+	vcc5v0_typec: vcc5v0-typec-regulator {
be97548
+		compatible = "regulator-fixed";
be97548
+		enable-active-high;
be97548
+		gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
be97548
+		pinctrl-names = "default";
be97548
+		pinctrl-0 = <&vcc5v0_typec_en>;
be97548
+		regulator-name = "vcc5v0_typec";
be97548
+		regulator-always-on;
be97548
+		vin-supply = <&vcc_sys>;
be97548
+	};
be97548
+
be97548
+	vcc_sys: vcc-sys {
be97548
+		compatible = "regulator-fixed";
be97548
+		regulator-name = "vcc_sys";
be97548
+		regulator-always-on;
be97548
+		regulator-boot-on;
be97548
+		regulator-min-microvolt = <5000000>;
be97548
+		regulator-max-microvolt = <5000000>;
be97548
+		vin-supply = <&dc_12v>;
be97548
+	};
be97548
+
be97548
+	vdd_log: vdd-log {
be97548
+		compatible = "pwm-regulator";
be97548
+		pwms = <&pwm2 0 25000 1>;
be97548
+		regulator-name = "vdd_log";
be97548
+		regulator-always-on;
be97548
+		regulator-boot-on;
be97548
+		regulator-min-microvolt = <800000>;
be97548
+		regulator-max-microvolt = <1400000>;
be97548
+		vin-supply = <&vcc_sys>;
be97548
+	};
be97548
+};
be97548
+
be97548
+&cpu_l0 {
be97548
+	cpu-supply = <&vdd_cpu_l>;
be97548
+};
be97548
+
be97548
+&cpu_l1 {
be97548
+	cpu-supply = <&vdd_cpu_l>;
be97548
+};
be97548
+
be97548
+&cpu_l2 {
be97548
+	cpu-supply = <&vdd_cpu_l>;
be97548
+};
be97548
+
be97548
+&cpu_l3 {
be97548
+	cpu-supply = <&vdd_cpu_l>;
be97548
+};
be97548
+
be97548
+&cpu_b0 {
be97548
+	cpu-supply = <&vdd_cpu_b>;
be97548
+};
be97548
+
be97548
+&cpu_b1 {
be97548
+	cpu-supply = <&vdd_cpu_b>;
be97548
+};
be97548
+
be97548
+&emmc_phy {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&gmac {
be97548
+	assigned-clocks = <&cru SCLK_RMII_SRC>;
be97548
+	assigned-clock-parents = <&clkin_gmac>;
be97548
+	clock_in_out = "input";
be97548
+	phy-supply = <&vcc_lan>;
be97548
+	phy-mode = "rgmii";
be97548
+	pinctrl-names = "default";
be97548
+	pinctrl-0 = <&rgmii_pins>;
be97548
+	snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
be97548
+	snps,reset-active-low;
be97548
+	snps,reset-delays-us = <0 10000 50000>;
be97548
+	tx_delay = <0x28>;
be97548
+	rx_delay = <0x11>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&i2c0 {
be97548
+	clock-frequency = <400000>;
be97548
+	i2c-scl-rising-time-ns = <168>;
be97548
+	i2c-scl-falling-time-ns = <4>;
be97548
+	status = "okay";
be97548
+
be97548
+	rk808: pmic@1b {
be97548
+		compatible = "rockchip,rk808";
be97548
+		reg = <0x1b>;
be97548
+		interrupt-parent = <&gpio1>;
be97548
+		interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
be97548
+		#clock-cells = <1>;
be97548
+		clock-output-names = "xin32k", "rk808-clkout2";
be97548
+		pinctrl-names = "default";
be97548
+		pinctrl-0 = <&pmic_int_l>;
be97548
+		rockchip,system-power-controller;
be97548
+		wakeup-source;
be97548
+
be97548
+		vcc1-supply = <&vcc_sys>;
be97548
+		vcc2-supply = <&vcc_sys>;
be97548
+		vcc3-supply = <&vcc_sys>;
be97548
+		vcc4-supply = <&vcc_sys>;
be97548
+		vcc6-supply = <&vcc_sys>;
be97548
+		vcc7-supply = <&vcc_sys>;
be97548
+		vcc8-supply = <&vcc3v3_sys>;
be97548
+		vcc9-supply = <&vcc_sys>;
be97548
+		vcc10-supply = <&vcc_sys>;
be97548
+		vcc11-supply = <&vcc_sys>;
be97548
+		vcc12-supply = <&vcc3v3_sys>;
be97548
+		vddio-supply = <&vcc1v8_pmu>;
be97548
+
be97548
+		regulators {
be97548
+			vdd_center: DCDC_REG1 {
be97548
+				regulator-name = "vdd_center";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <750000>;
be97548
+				regulator-max-microvolt = <1350000>;
be97548
+				regulator-ramp-delay = <6001>;
be97548
+				regulator-state-mem {
be97548
+					regulator-off-in-suspend;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vdd_cpu_l: DCDC_REG2 {
be97548
+				regulator-name = "vdd_cpu_l";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <750000>;
be97548
+				regulator-max-microvolt = <1350000>;
be97548
+				regulator-ramp-delay = <6001>;
be97548
+				regulator-state-mem {
be97548
+					regulator-off-in-suspend;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc_ddr: DCDC_REG3 {
be97548
+				regulator-name = "vcc_ddr";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-state-mem {
be97548
+					regulator-on-in-suspend;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc_1v8: DCDC_REG4 {
be97548
+				regulator-name = "vcc_1v8";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <1800000>;
be97548
+				regulator-max-microvolt = <1800000>;
be97548
+				regulator-state-mem {
be97548
+					regulator-on-in-suspend;
be97548
+					regulator-suspend-microvolt = <1800000>;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc1v8_dvp: LDO_REG1 {
be97548
+				regulator-name = "vcc1v8_dvp";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <1800000>;
be97548
+				regulator-max-microvolt = <1800000>;
be97548
+				regulator-state-mem {
be97548
+					regulator-off-in-suspend;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc2v8_dvp: LDO_REG2 {
be97548
+				regulator-name = "vcc2v8_dvp";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <2800000>;
be97548
+				regulator-max-microvolt = <2800000>;
be97548
+				regulator-state-mem {
be97548
+					regulator-off-in-suspend;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc1v8_pmu: LDO_REG3 {
be97548
+				regulator-name = "vcc1v8_pmu";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <1800000>;
be97548
+				regulator-max-microvolt = <1800000>;
be97548
+				regulator-state-mem {
be97548
+					regulator-on-in-suspend;
be97548
+					regulator-suspend-microvolt = <1800000>;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc_sdio: LDO_REG4 {
be97548
+				regulator-name = "vcc_sdio";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <1800000>;
be97548
+				regulator-max-microvolt = <3000000>;
be97548
+				regulator-state-mem {
be97548
+					regulator-on-in-suspend;
be97548
+					regulator-suspend-microvolt = <3000000>;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcca3v0_codec: LDO_REG5 {
be97548
+				regulator-name = "vcca3v0_codec";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <3000000>;
be97548
+				regulator-max-microvolt = <3000000>;
be97548
+				regulator-state-mem {
be97548
+					regulator-off-in-suspend;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc_1v5: LDO_REG6 {
be97548
+				regulator-name = "vcc_1v5";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <1500000>;
be97548
+				regulator-max-microvolt = <1500000>;
be97548
+				regulator-state-mem {
be97548
+					regulator-on-in-suspend;
be97548
+					regulator-suspend-microvolt = <1500000>;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcca1v8_codec: LDO_REG7 {
be97548
+				regulator-name = "vcca1v8_codec";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <1800000>;
be97548
+				regulator-max-microvolt = <1800000>;
be97548
+				regulator-state-mem {
be97548
+					regulator-off-in-suspend;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc_3v0: LDO_REG8 {
be97548
+				regulator-name = "vcc_3v0";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-min-microvolt = <3000000>;
be97548
+				regulator-max-microvolt = <3000000>;
be97548
+				regulator-state-mem {
be97548
+					regulator-on-in-suspend;
be97548
+					regulator-suspend-microvolt = <3000000>;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc3v3_s3: vcc_lan: SWITCH_REG1 {
be97548
+				regulator-name = "vcc3v3_s3";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-state-mem {
be97548
+					regulator-off-in-suspend;
be97548
+				};
be97548
+			};
be97548
+
be97548
+			vcc3v3_s0: SWITCH_REG2 {
be97548
+				regulator-name = "vcc3v3_s0";
be97548
+				regulator-always-on;
be97548
+				regulator-boot-on;
be97548
+				regulator-state-mem {
be97548
+					regulator-off-in-suspend;
be97548
+				};
be97548
+			};
be97548
+		};
be97548
+	};
be97548
+
be97548
+	vdd_cpu_b: regulator@40 {
be97548
+		compatible = "silergy,syr827";
be97548
+		reg = <0x40>;
be97548
+		fcs,suspend-voltage-selector = <0>;
be97548
+		regulator-name = "vdd_cpu_b";
be97548
+		regulator-min-microvolt = <712500>;
be97548
+		regulator-max-microvolt = <1500000>;
be97548
+		regulator-ramp-delay = <1000>;
be97548
+		regulator-always-on;
be97548
+		regulator-boot-on;
be97548
+		vin-supply = <&vcc_sys>;
be97548
+
be97548
+		regulator-state-mem {
be97548
+			regulator-off-in-suspend;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	vdd_gpu: regulator@41 {
be97548
+		compatible = "silergy,syr828";
be97548
+		reg = <0x41>;
be97548
+		fcs,suspend-voltage-selector = <1>;
be97548
+		regulator-name = "vdd_gpu";
be97548
+		regulator-min-microvolt = <712500>;
be97548
+		regulator-max-microvolt = <1500000>;
be97548
+		regulator-ramp-delay = <1000>;
be97548
+		regulator-always-on;
be97548
+		regulator-boot-on;
be97548
+		vin-supply = <&vcc_sys>;
be97548
+
be97548
+		regulator-state-mem {
be97548
+			regulator-off-in-suspend;
be97548
+		};
be97548
+	};
be97548
+};
be97548
+
be97548
+&i2c1 {
be97548
+	i2c-scl-rising-time-ns = <300>;
be97548
+	i2c-scl-falling-time-ns = <15>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&i2c3 {
be97548
+	i2c-scl-rising-time-ns = <450>;
be97548
+	i2c-scl-falling-time-ns = <15>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&i2c4 {
be97548
+	i2c-scl-rising-time-ns = <600>;
be97548
+	i2c-scl-falling-time-ns = <20>;
be97548
+	status = "okay";
be97548
+
be97548
+	fusb0: typec-portc@22 {
be97548
+		compatible = "fcs,fusb302";
be97548
+		reg = <0x22>;
be97548
+		interrupt-parent = <&gpio1>;
be97548
+		interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
be97548
+		pinctrl-names = "default";
be97548
+		pinctrl-0 = <&fusb0_int>;
be97548
+		vbus-supply = <&vcc5v0_typec>;
be97548
+		status = "okay";
be97548
+	};
be97548
+};
be97548
+
be97548
+&i2s0 {
be97548
+	rockchip,playback-channels = <8>;
be97548
+	rockchip,capture-channels = <8>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&i2s1 {
be97548
+	rockchip,playback-channels = <2>;
be97548
+	rockchip,capture-channels = <2>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&i2s2 {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&io_domains {
be97548
+	status = "okay";
be97548
+
be97548
+	bt656-supply = <&vcc1v8_dvp>;
be97548
+	audio-supply = <&vcca1v8_codec>;
be97548
+	sdmmc-supply = <&vcc_sdio>;
be97548
+	gpio1830-supply = <&vcc_3v0>;
be97548
+};
be97548
+
be97548
+&pmu_io_domains {
be97548
+	pmu1830-supply = <&vcc_3v0>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&pinctrl {
be97548
+	buttons {
be97548
+		pwrbtn: pwrbtn {
be97548
+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	fusb302x {
be97548
+		fusb0_int: fusb0-int {
be97548
+			rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	leds {
be97548
+		work_led_gpio: work_led-gpio {
be97548
+			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
be97548
+		};
be97548
+
be97548
+		diy_led_gpio: diy_led-gpio {
be97548
+			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	lcd-panel {
be97548
+		lcd_panel_reset: lcd-panel-reset {
be97548
+			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	pcie {
be97548
+		pcie_pwr_en: pcie-pwr-en {
be97548
+			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	pmic {
be97548
+		pmic_int_l: pmic-int-l {
be97548
+			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
be97548
+		};
be97548
+
be97548
+		vsel1_gpio: vsel1-gpio {
be97548
+			rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
be97548
+		};
be97548
+
be97548
+		vsel2_gpio: vsel2-gpio {
be97548
+			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	sdio-pwrseq {
be97548
+		wifi_enable_h: wifi-enable-h {
be97548
+			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	usb-typec {
be97548
+		vcc5v0_typec_en: vcc5v0_typec_en {
be97548
+			rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
be97548
+		};
be97548
+	};
be97548
+
be97548
+	usb2 {
be97548
+		vcc5v0_host_en: vcc5v0-host-en {
be97548
+			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
be97548
+		};
be97548
+	};
be97548
+};
be97548
+
be97548
+&pwm0 {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&pwm2 {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&saradc {
be97548
+	vref-supply = <&vcca1v8_s3>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&sdmmc {
be97548
+	bus-width = <4>;
be97548
+	cap-mmc-highspeed;
be97548
+	cap-sd-highspeed;
be97548
+	cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
be97548
+	disable-wp;
be97548
+	max-frequency = <150000000>;
be97548
+	pinctrl-names = "default";
be97548
+	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&sdhci {
be97548
+	bus-width = <8>;
be97548
+	mmc-hs400-1_8v;
be97548
+	mmc-hs400-enhanced-strobe;
be97548
+	non-removable;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&tcphy0 {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&tcphy1 {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&tsadc {
be97548
+	/* tshut mode 0:CRU 1:GPIO */
be97548
+	rockchip,hw-tshut-mode = <1>;
be97548
+	/* tshut polarity 0:LOW 1:HIGH */
be97548
+	rockchip,hw-tshut-polarity = <1>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&u2phy0 {
be97548
+	status = "okay";
be97548
+
be97548
+	u2phy0_otg: otg-port {
be97548
+		status = "okay";
be97548
+	};
be97548
+
be97548
+	u2phy0_host: host-port {
be97548
+		phy-supply = <&vcc5v0_host>;
be97548
+		status = "okay";
be97548
+	};
be97548
+};
be97548
+
be97548
+&u2phy1 {
be97548
+	status = "okay";
be97548
+
be97548
+	u2phy1_otg: otg-port {
be97548
+		status = "okay";
be97548
+	};
be97548
+
be97548
+	u2phy1_host: host-port {
be97548
+		phy-supply = <&vcc5v0_host>;
be97548
+		status = "okay";
be97548
+	};
be97548
+};
be97548
+
be97548
+&uart0 {
be97548
+	pinctrl-names = "default";
be97548
+	pinctrl-0 = <&uart0_xfer &uart0_cts>;
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&uart2 {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&usb_host0_ehci {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&usb_host0_ohci {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&usb_host1_ehci {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&usb_host1_ohci {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&usbdrd3_0 {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&usbdrd_dwc3_0 {
be97548
+	status = "okay";
be97548
+	dr_mode = "otg";
be97548
+};
be97548
+
be97548
+&usbdrd3_1 {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&usbdrd_dwc3_1 {
be97548
+	status = "okay";
be97548
+	dr_mode = "host";
be97548
+};
be97548
+
be97548
+&vopb {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&vopb_mmu {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&vopl {
be97548
+	status = "okay";
be97548
+};
be97548
+
be97548
+&vopl_mmu {
be97548
+	status = "okay";
be97548
+};