From nobody Sun Feb 8 13:39:20 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD659EB64DC for ; Fri, 30 Jun 2023 17:36:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232186AbjF3Rgb (ORCPT ); Fri, 30 Jun 2023 13:36:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232888AbjF3RgM (ORCPT ); Fri, 30 Jun 2023 13:36:12 -0400 X-Greylist: delayed 302 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 30 Jun 2023 10:35:52 PDT Received: from mail-108-mta41.mxroute.com (mail-108-mta41.mxroute.com [136.175.108.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8EFA1FD7 for ; Fri, 30 Jun 2023 10:35:52 -0700 (PDT) Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta41.mxroute.com (ZoneMTA) with ESMTPSA id 1890d5b7fc5000ca8f.008 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 30 Jun 2023 17:30:47 +0000 X-Zone-Loop: 95185a3a1165bc83ba035e25b7aa484d6550abf04817 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ocfox.me; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:Cc:To: From:Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=ugBil1DLRKJJ4mLEjQnGBnY2y+FhF43Dgs6JhQMjFXU=; b=E TcHwIJbQZFmdzNw/Au2iE7a+e1MENDMig+y5DsJjM12deQaBUJDDZinR4jxrF4pXyHDNimlxQz1UJ VELfca2GQXRUJTtGNeGGhGSllc9jiz8LLcrCe9LSt9Yf4cTABeZtbTyEzX1Zysg+5desDe43TJ05p Dvt2nEH6/qUOYARX59988/mQgapjv2aKRKGydgGBjSLzhoMgW1bFdebmIt+GApL4cLCKPMcw4tfOH kiXUity+L77W6b+LGjqN8eT4c9lrnGUkM19Fm2kAAUt/nJk5IGUYWdITfZyg0aDPpkuYF/WaiDUZS k1CwKv9WozMvRnd4Rd5LQM1F5R9lzNcnw==; From: ocfox To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: ocfox Subject: [PATCH] arm64: dts: rockchip: add support for Rongpin king3399 board Date: Sat, 1 Jul 2023 01:27:52 +0800 Message-ID: <20230630173010.272469-1-i@ocfox.me> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authenticated-Id: i@ocfox.me Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" king3399 is a bord from Rongpin, you can find detail about it here: (http://www.rpdzkj.com/copy_2_1703937_175104_2536441.html) This patch add basic node for the board and make it able to bring up. Works: - USB, type-C port - Ethernet - WiFi/BT - HDMI - eMMC - PCIe - sd-card Not test for other peripheral: - AUDIO - MIC - SIM - MIPI Signed-off-by: ocfox --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3399-king3399.dts | 1077 +++++++++++++++++ 2 files changed, 1078 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-king3399.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/ro= ckchip/Makefile index b7fb908eb92d..73ebee6ef430 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -42,6 +42,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) +=3D rk3399-hugsun-x99.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) +=3D rk3399-khadas-edge.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) +=3D rk3399-khadas-edge-captain.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) +=3D rk3399-khadas-edge-v.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) +=3D rk3399-king3399.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) +=3D rk3399-kobol-helios64.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) +=3D rk3399-leez-p710.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) +=3D rk3399-nanopc-t4.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3399-king3399.dts b/arch/arm64/= boot/dts/rockchip/rk3399-king3399.dts new file mode 100644 index 000000000000..5d68add63d59 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-king3399.dts @@ -0,0 +1,1077 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd. + * + * Copyright (c) 2023 ocfox + */ + +/dts-v1/; +#include +#include +#include +#include "rk3399.dtsi" +#include "rk3399-opp.dtsi" + +/ { + model =3D "KING3399 RK3399 Board"; + compatible =3D "rockchip,king3399", "rockchip,rk3399"; + + aliases { + mmc0 =3D &sdio0; + mmc1 =3D &sdmmc; + mmc2 =3D &sdhci; + }; + + chosen { + stdout-path =3D "serial2:1500000n8"; + }; + + clkin_gmac: external-gmac-clock { + compatible =3D "fixed-clock"; + clock-frequency =3D <125000000>; + clock-output-names =3D "clkin_gmac"; + #clock-cells =3D <0>; + }; + + adc-keys { + compatible =3D "adc-keys"; + io-channels =3D <&saradc 1>; + io-channel-names =3D "buttons"; + keyup-threshold-microvolt =3D <1800000>; + poll-interval =3D <100>; + + button-up { + label =3D "Volume Up"; + linux,code =3D ; + press-threshold-microvolt =3D <100000>; + }; + + button-down { + label =3D "Volume Down"; + linux,code =3D ; + press-threshold-microvolt =3D <300000>; + }; + + back { + label =3D "Back"; + linux,code =3D ; + press-threshold-microvolt =3D <985000>; + }; + }; + + keys: gpio-keys { + compatible =3D "gpio-keys"; // poweroff not sure + autorepeat; + + power { + debounce-interval =3D <100>; + gpios =3D <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; + label =3D "GPIO Power"; + linux,code =3D ; + linux,input-type =3D <1>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pwr_btn>; + wakeup-source; + }; + }; + + ir-receiver { + compatible =3D "gpio-ir-receiver"; + gpios =3D <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>; // bsp + pinctrl-names =3D "default"; + pinctrl-0 =3D <&ir_int>; + }; + + backlight: backlight { + status =3D "disabled"; + compatible =3D "pwm-backlight"; + brightness-levels =3D < + 0 1 2 3 4 5 6 7 + 8 9 10 11 12 13 14 15 + 16 17 18 19 20 21 22 23 + 24 25 26 27 28 29 30 31 + 32 33 34 35 36 37 38 39 + 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 + 56 57 58 59 60 61 62 63 + 64 65 66 67 68 69 70 71 + 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 + 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 + 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 + 120 121 122 123 124 125 126 127 + 128 129 130 131 132 133 134 135 + 136 137 138 139 140 141 142 143 + 144 145 146 147 148 149 150 151 + 152 153 154 155 156 157 158 159 + 160 161 162 163 164 165 166 167 + 168 169 170 171 172 173 174 175 + 176 177 178 179 180 181 182 183 + 184 185 186 187 188 189 190 191 + 192 193 194 195 196 197 198 199 + 200 201 202 203 204 205 206 207 + 208 209 210 211 212 213 214 215 + 216 217 218 219 220 221 222 223 + 224 225 226 227 228 229 230 231 + 232 233 234 235 236 237 238 239 + 240 241 242 243 244 245 246 247 + 248 249 250 251 252 253 254 255>; + default-brightness-level =3D <200>; + enable-gpios =3D <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; + pwms =3D <&pwm0 0 25000 0>; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible =3D "mmc-pwrseq-simple"; + clocks =3D <&rk808 1>; + clock-names =3D "ext_clock"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&wifi_reg_on_h>; + + reset-gpios =3D <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; + }; + + /* switched by pmic_sleep */ + vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 { + compatible =3D "regulator-fixed"; + regulator-name =3D "vcc1v8_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + vin-supply =3D <&vcc_1v8>; + }; + + vcc3v0_sd: vcc3v0-sd { + compatible =3D "regulator-fixed"; + enable-active-high; + gpio =3D <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; // bsp + pinctrl-names =3D "default"; + pinctrl-0 =3D <&sdmmc0_pwr_h>; + regulator-boot-on; + regulator-max-microvolt =3D <3000000>; + regulator-min-microvolt =3D <3000000>; + regulator-name =3D "vcc3v0_sd"; + vin-supply =3D <&vcc5v0_sys>; + }; + + vcc3v3_sys: vcc3v3-sys { + compatible =3D "regulator-fixed"; + regulator-name =3D "vcc3v3_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + vin-supply =3D <&vcc5v0_sys>; + }; + + // 4G Module + vcc3v3_gsm: vcc3v3-gsm { + compatible =3D "regulator-fixed"; + enable-active-high; + gpio =3D <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>; // bsp + pinctrl-names =3D "default"; + pinctrl-0 =3D <&vcc3v3_gsm_en>; + regulator-name =3D "vcc3v3_gsm"; + // regulator-always-on; + vin-supply =3D <&dc_12v>; + }; + + // vdd 5v: USB 2&3, USB Hub, Type-C, HDMI, MIPI, IR + vcc5v0_host: vcc5v0-host-regulator { + compatible =3D "regulator-fixed"; + enable-active-high; + regulator-boot-on; + gpio =3D <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; // bsp + pinctrl-names =3D "default"; + pinctrl-0 =3D <&vcc5v0_host_en>; + regulator-name =3D "vcc5v0_host"; + // regulator-always-on; + vin-supply =3D <&vcc5v0_sys>; + }; + + vcc5v0_typec0: vbus-typec-regulator { + compatible =3D "regulator-fixed"; + enable-active-high; + gpio =3D <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; // bsp + pinctrl-names =3D "default"; + pinctrl-0 =3D <&vcc5v0_typec_en>; + regulator-name =3D "vcc5v0_typec0"; + vin-supply =3D <&vcc5v0_sys>; + }; + + vcc_sys: vcc5v0_sys: vcc5v0-sys { // bsp + compatible =3D "regulator-fixed"; + regulator-name =3D "vcc5v0_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + vin-supply =3D <&dc_12v>; + }; + + + dc_12v: vdd_12v: dc-12v { // dc_12v vdd_12V + compatible =3D "regulator-fixed"; + regulator-name =3D "dc_12v"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <12000000>; + regulator-max-microvolt =3D <12000000>; + }; + + rt5651-sound { // verify + status =3D "okay"; + compatible =3D "simple-audio-card"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&hp_det>; + + simple-audio-card,name =3D "realtek,rt5651-codec"; + simple-audio-card,format =3D "i2s"; + simple-audio-card,mclk-fs =3D <256>; + simple-audio-card,hp-det-gpio =3D <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; + simple-audio-card,aux-devs =3D <&speaker_amp>; + simple-audio-card,pin-switches =3D "Speaker"; + simple-audio-card,widgets =3D + "Microphone", "Mic Jack", + "Headphone", "Headphones", + "Speaker", "Speaker"; + simple-audio-card,routing =3D + "Mic Jack", "micbias1", + "Headphones", "HPOL", + "Headphones", "HPOR", + "Speaker Amplifier INL", "HPOL", + "Speaker Amplifier INR", "HPOR", + "Speaker", "Speaker Amplifier OUTL", + "Speaker", "Speaker Amplifier OUTR"; + simple-audio-card,cpu { + sound-dai =3D <&i2s0>; + }; + simple-audio-card,codec { + sound-dai =3D <&rt5651>; + }; + }; + + speaker_amp: speaker-amplifier { // verify + compatible =3D "simple-audio-amplifier"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spk_ctl>; + enable-gpios =3D <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; + sound-name-prefix =3D "Speaker Amplifier"; + vcc-supply =3D <&vcc5v0_sys>; + }; + + leds { + compatible =3D "gpio-leds"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&breathe_led_pin>; + + breathe_led: led-breathe-led { // bsp // vdd_12V + label =3D "breathe_led"; + linux,default-trigger =3D "heartbeat"; + default-state =3D "off"; + gpios =3D <&gpio4 RK_PD0 GPIO_ACTIVE_LOW>; + }; + }; + + fan0: gpio-fan { // verify // vcc5v0_sys + #cooling-cells =3D <2>; + compatible =3D "gpio-fan"; + gpio-fan,speed-map =3D <0 0 3000 1>; + gpios =3D <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; + status =3D "okay"; + }; + + gpio-restart { + compatible =3D "gpio-restart"; + gpios =3D <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&hub_rst>; + priority =3D <200>; + active-delay =3D <100>; + inactive-delay =3D <10>; + wait-delay =3D <100>; + }; + +}; + +&cpu_l0 { + cpu-supply =3D <&vdd_cpu_l>; +}; + +&cpu_l1 { + cpu-supply =3D <&vdd_cpu_l>; +}; + +&cpu_l2 { + cpu-supply =3D <&vdd_cpu_l>; +}; + +&cpu_l3 { + cpu-supply =3D <&vdd_cpu_l>; +}; + +&cpu_b0 { + cpu-supply =3D <&vdd_cpu_b>; +}; + +&cpu_b1 { + cpu-supply =3D <&vdd_cpu_b>; +}; + +&cpu_thermal { // verify + trips { + cpu_hot: cpu_hot { + hysteresis =3D <10000>; + temperature =3D <55000>; + type =3D "active"; + }; + }; + + cooling-maps { + map2 { + cooling-device =3D + <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + trip =3D <&cpu_hot>; + }; + }; +}; + +&emmc_phy { + status =3D "okay"; +}; + +&gmac { + assigned-clocks =3D <&cru SCLK_RMII_SRC>; + assigned-clock-parents =3D <&clkin_gmac>; + clock_in_out =3D "input"; + phy-supply =3D <&vcc3v3_s3>; + phy-mode =3D "rgmii"; + phy-handle =3D <&rtl8211e>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&rgmii_pins>, <&phy_intb>, <&phy_rstb>; + tx_delay =3D <0x28>; + rx_delay =3D <0x11>; + status =3D "okay"; + + mdio { + compatible =3D "snps,dwmac-mdio"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + rtl8211e: ethernet-phy@1 { + reg =3D <1>; + interrupt-parent =3D <&gpio3>; + interrupts =3D ; + reset-assert-us =3D <10000>; + reset-deassert-us =3D <30000>; + reset-gpios =3D <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gpu { + mali-supply =3D <&vdd_gpu>; + status =3D "okay"; +}; + +&hdmi { + ddc-i2c-bus =3D <&i2c3>; + status =3D "okay"; +}; + +&hdmi_sound { + status =3D "okay"; +}; + +&i2s0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2s_8ch_mclk_pin>, <&i2s0_2ch_bus>; + #sound-dai-cells =3D <0>; + rockchip,capture-channels =3D <8>; + rockchip,playback-channels =3D <8>; + status =3D "okay"; +}; + +&i2s2 { + #sound-dai-cells =3D <0>; + status =3D "okay"; +}; + +&i2c0 { + clock-frequency =3D <400000>; + i2c-scl-rising-time-ns =3D <168>; + i2c-scl-falling-time-ns =3D <4>; + status =3D "okay"; + + rk808: pmic@1b { // bsp checked + compatible =3D "rockchip,rk808"; + reg =3D <0x1b>; + interrupt-parent =3D <&gpio1>; + interrupts =3D ; + #clock-cells =3D <1>; + clock-output-names =3D "rk808-clkout1", "rk808-clkout2"; // bsp + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pmic_int_l &pmic_dvs2>; + rockchip,system-power-controller; + wakeup-source; + + vcc1-supply =3D <&vcc5v0_sys>; + vcc2-supply =3D <&vcc5v0_sys>; + vcc3-supply =3D <&vcc5v0_sys>; + vcc4-supply =3D <&vcc5v0_sys>; + vcc6-supply =3D <&vcc5v0_sys>; + vcc7-supply =3D <&vcc5v0_sys>; + vcc8-supply =3D <&vcc3v3_sys>; + vcc9-supply =3D <&vcc5v0_sys>; + vcc10-supply =3D <&vcc5v0_sys>; + vcc11-supply =3D <&vcc5v0_sys>; + vcc12-supply =3D <&vcc3v3_sys>; + vddio-supply =3D <&vcc1v8_pmu>; + + regulators { + vdd_center: DCDC_REG1 { + regulator-name =3D "vdd_center"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <750000>; + regulator-max-microvolt =3D <1350000>; + regulator-ramp-delay =3D <6001>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_cpu_l: DCDC_REG2 { + regulator-name =3D "vdd_cpu_l"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <750000>; + regulator-max-microvolt =3D <1350000>; + regulator-ramp-delay =3D <6001>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-name =3D "vcc_ddr"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc_1v8: DCDC_REG4 { + regulator-name =3D "vcc_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt =3D <1800000>; + }; + }; + + vcc1v8_dvp: LDO_REG1 { + regulator-name =3D "vcc1v8_dvp"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v0_tp: LDO_REG2 { + regulator-name =3D "vcc3v0_tp"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <3000000>; + regulator-max-microvolt =3D <3000000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc1v8_pmu: LDO_REG3 { + regulator-name =3D "vcc1v8_pmu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt =3D <1800000>; + }; + }; + + vcc_sdio: LDO_REG4 { + regulator-name =3D "vcc_sdio"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <3300000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt =3D <3000000>; + }; + }; + + vcca3v0_codec: LDO_REG5 { + regulator-name =3D "vcca3v0_codec"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <3000000>; + regulator-max-microvolt =3D <3000000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v5: LDO_REG6 { + regulator-name =3D "vcc_1v5"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <1500000>; + regulator-max-microvolt =3D <1500000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt =3D <1500000>; + }; + }; + + vcca1v8_codec: LDO_REG7 { + regulator-name =3D "vcca1v8_codec"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_3v0: LDO_REG8 { + regulator-name =3D "vcc_3v0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <3000000>; + regulator-max-microvolt =3D <3000000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt =3D <3000000>; + }; + }; + + vcc3v3_s3: vcc_lan: SWITCH_REG1 { + regulator-name =3D "vcc3v3_s3"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_s0: SWITCH_REG2 { + regulator-name =3D "vcc3v3_s0"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; + + vdd_cpu_b: regulator@40 { // bsp checked + compatible =3D "silergy,syr827"; + reg =3D <0x40>; + fcs,suspend-voltage-selector =3D <1>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&cpu_b_sleep>; + regulator-name =3D "vdd_cpu_b"; + regulator-min-microvolt =3D <712500>; + regulator-max-microvolt =3D <1500000>; + regulator-ramp-delay =3D <1000>; + regulator-always-on; + regulator-boot-on; + vin-supply =3D <&vcc5v0_sys>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_gpu: regulator@41 { // bsp checked + compatible =3D "silergy,syr828"; + reg =3D <0x41>; + fcs,suspend-voltage-selector =3D <1>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&gpu_sleep>; + regulator-name =3D "vdd_gpu"; + regulator-min-microvolt =3D <712500>; + regulator-max-microvolt =3D <1500000>; + regulator-ramp-delay =3D <1000>; + regulator-always-on; + regulator-boot-on; + vin-supply =3D <&vcc5v0_sys>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; +}; + +&i2c1 { + i2c-scl-rising-time-ns =3D <300>; + i2c-scl-falling-time-ns =3D <15>; + status =3D "okay"; + + rt5651: rt5651@1a { + #sound-dai-cells =3D <0>; + compatible =3D "realtek,rt5651"; + reg =3D <0x1a>; + clocks =3D <&cru SCLK_I2S_8CH_OUT>; + clock-names =3D "mclk"; + status =3D "okay"; + }; +}; + +&i2c2 { + status =3D "okay"; +}; + +// Used for HDMI +&i2c3 { + i2c-scl-rising-time-ns =3D <450>; + i2c-scl-falling-time-ns =3D <15>; + status =3D "okay"; +}; + +// Type-C +// Accelerometer +// Touch Screen +&i2c4 { + clock-frequency =3D <400000>; + i2c-scl-rising-time-ns =3D <450>; + i2c-scl-falling-time-ns =3D <15>; + status =3D "okay"; + + fusb302@22 { // bsp checked + compatible =3D "fcs,fusb302"; + reg =3D <0x22>; + interrupt-parent =3D <&gpio1>; + interrupts =3D ; // bsp + pinctrl-names =3D "default"; + pinctrl-0 =3D <&chg_cc_int_l>; + vbus-supply =3D <&vcc5v0_typec0>; + + typec_con: connector { + compatible =3D "usb-c-connector"; + data-role =3D "host"; + label =3D "USB-C"; + op-sink-microwatt =3D <1000000>; + power-role =3D "dual"; + sink-pdos =3D + ; + source-pdos =3D + ; + try-power-role =3D "sink"; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + typec_hs: endpoint { + remote-endpoint =3D <&u2phy0_typec_hs>; + }; + }; + port@1 { + reg =3D <1>; + typec_ss: endpoint { + remote-endpoint =3D <&tcphy0_typec_ss>; + }; + }; + port@2 { + reg =3D <2>; + typec_dp: endpoint { + remote-endpoint =3D <&tcphy0_typec_dp>; + }; + }; + }; + }; + }; + + mma8452: mma8452@1d { + compatible =3D "fsl,mma8452"; + reg =3D <0x1d>; + interrupt-parent =3D <&gpio1>; + interrupts =3D ; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&gsensor_int>; + }; +}; + +&io_domains { // bsp checked + status =3D "okay"; + bt656-supply =3D <&vcc_1v8>; + audio-supply =3D <&vcca1v8_codec>; + sdmmc-supply =3D <&vcc_sdio>; + gpio1830-supply =3D <&vcc_3v0>; +}; + +&pmu_io_domains { // bsp checked + status =3D "okay"; + pmu1830-supply =3D <&vcc_1v8>; +}; + +&hdmi { // bsp + ddc-i2c-bus =3D <&i2c3>; + status =3D "okay"; +}; + +&pinctrl { + buttons { + pwr_btn: pwr-btn { + rockchip,pins =3D <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + ir { + ir_int: ir-int { + rockchip,pins =3D <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; // bsp + }; + }; + + gmac { + phy_intb: phy-intb { + rockchip,pins =3D <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; // verify + }; + + phy_rstb: phy-rstb { + rockchip,pins =3D <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; // verify + }; + }; + + pmic { + cpu_b_sleep: cpu-b-sleep { + rockchip,pins =3D <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; // verify + }; + + gpu_sleep: gpu-sleep { + rockchip,pins =3D <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; // verify + }; + + pmic_int_l: pmic-int-l { + rockchip,pins =3D <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; // verify + }; + + pmic_dvs2: pmic-dvs2 { + rockchip,pins =3D <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; + + sd { + sdmmc0_pwr_h: sdmmc0-pwr-h { + rockchip,pins =3D <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; // bsp + }; + }; + + usb2 { + vcc5v0_host_en: vcc5v0-host-en { + rockchip,pins =3D <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; // bsp + }; + + vcc5v0_typec_en: vcc5v0-typec-en { + rockchip,pins =3D <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; // bsp + }; + + hub_rst: hub-rst { + rockchip,pins =3D <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + sdio-pwrseq { + wifi_reg_on_h: wifi-reg-on-h { + rockchip,pins =3D <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; // checked + }; + }; + + wifi { + wifi_host_wake_l: wifi-host-wake-l { + rockchip,pins =3D <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; // checked + }; + }; + + bluetooth { + bt_reg_on_h: bt-enable-h { + rockchip,pins =3D <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; // checked + }; + + bt_host_wake_l: bt-host-wake-l { + rockchip,pins =3D <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; // checked + }; + + bt_wake_l: bt-wake-l { + rockchip,pins =3D <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; // checked + }; + }; + + fusb302 { + chg_cc_int_l: chg-cc-int-l { + rockchip,pins =3D <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; // bsp + }; + }; + + leds { + breathe_led_pin: breathe-led-pin { + rockchip,pins =3D <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; // bsp + }; + }; + + gsm { + vcc3v3_gsm_en: vcc3v3-gsm-en { + rockchip,pins =3D <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; // bsp + }; + }; + + headphone { + hp_det: hp-det { + rockchip,pins =3D <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>; // verify + }; + spk_ctl: spk-ctl { + rockchip,pins =3D <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>; // verify + }; + }; + + mma8452 { + gsensor_int: gsensor-int { + rockchip,pins =3D <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>; // bsp + }; + }; + + i2s0 { + i2s_8ch_mclk_pin: i2s-8ch-mclk-pin { + rockchip,pins =3D <4 RK_PA0 1 &pcfg_pull_none>; // verify + }; + }; +}; + +&pwm0 { + status =3D "okay"; +}; + +&pwm2 { + status =3D "okay"; +}; + +&saradc { + vref-supply =3D <&vcca1v8_s3>; + status =3D "okay"; +}; + +&sdhci { + bus-width =3D <8>; + mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + // keep-power-in-suspend; + non-removable; + status =3D "okay"; +}; + +&sdio0 { + bus-width =3D <4>; + cap-sd-highspeed; + cap-sdio-irq; + clock-frequency =3D <50000000>; + disable-wp; + keep-power-in-suspend; + max-frequency =3D <50000000>; + mmc-pwrseq =3D <&sdio_pwrseq>; + non-removable; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; + sd-uhs-sdr104; + #address-cells =3D <1>; + #size-cells =3D <0>; + status =3D "okay"; + + brcmf: wifi@1 { + reg =3D <1>; + compatible =3D "brcm,bcm43455-fmac"; + interrupt-parent =3D <&gpio0>; + interrupts =3D ; // bsp verify + interrupt-names =3D "host-wake"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&wifi_host_wake_l>; + }; +}; + +&sdmmc { + bus-width =3D <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + cd-gpios =3D <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; // checked + clock-frequency =3D <150000000>; + disable-wp; + max-frequency =3D <150000000>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; + vmmc-supply =3D <&vcc3v0_sd>; + vqmmc-supply =3D <&vcc_sdio>; + status =3D "okay"; +}; + +&tcphy0 { // verify + status =3D "okay"; +}; + +&tcphy0_dp { // verify + port { + tcphy0_typec_dp: endpoint { + remote-endpoint =3D <&typec_dp>; + }; + }; +}; + +&tcphy0_usb3 { // verify + port { + tcphy0_typec_ss: endpoint { + remote-endpoint =3D <&typec_ss>; + }; + }; +}; + +&tcphy1 { // verify + status =3D "okay"; +}; + +&tsadc { + /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-mode =3D <1>; + /* tshut polarity 0:LOW 1:HIGH */ + rockchip,hw-tshut-polarity =3D <1>; + status =3D "okay"; +}; + +&u2phy0 { + status =3D "okay"; + + u2phy0_otg: otg-port { + phy-supply =3D <&vcc5v0_typec0>; + status =3D "okay"; + }; + + u2phy0_host: host-port { + phy-supply =3D <&vcc5v0_host>; + status =3D "okay"; + }; + + port { + u2phy0_typec_hs: endpoint { + remote-endpoint =3D <&typec_hs>; + }; + }; +}; + +&u2phy1 { + status =3D "okay"; + + u2phy1_otg: otg-port { + status =3D "okay"; + }; + + u2phy1_host: host-port { + phy-supply =3D <&vcc5v0_host>; + status =3D "okay"; + }; +}; + +&uart0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&uart0_xfer &uart0_cts &uart0_rts>; + status =3D "okay"; + + bluetooth { + compatible =3D "brcm,bcm43438-bt"; + clocks =3D <&rk808 1>; + clock-names =3D "lpo"; + device-wakeup-gpios =3D <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios =3D <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; + shutdown-gpios =3D <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&bt_host_wake_l &bt_wake_l &bt_reg_on_h>; + vbat-supply =3D <&vcc5v0_sys>; + vddio-supply =3D <&vcc_1v8>; + }; +}; + +&uart2 { + status =3D "okay"; +}; + +&uart4 { + status =3D "okay"; +}; + +&spi1 { + status =3D "disabled"; +}; + +&usb_host0_ehci { + status =3D "okay"; +}; + +&usb_host0_ohci { + status =3D "okay"; +}; + +&usb_host1_ehci { + status =3D "okay"; +}; + +&usb_host1_ohci { + status =3D "okay"; +}; + +&usbdrd3_0 { + status =3D "okay"; +}; + +&usbdrd_dwc3_0 { + status =3D "okay"; + dr_mode =3D "host"; +}; + +&usbdrd3_1 { + status =3D "okay"; +}; + +&usbdrd_dwc3_1 { + status =3D "okay"; + dr_mode =3D "host"; +}; + +&vopb { + status =3D "okay"; +}; + +&vopb_mmu { + status =3D "okay"; +}; + +&vopl { + status =3D "okay"; +}; + +&vopl_mmu { + status =3D "okay"; +}; --=20 2.41.0