summarylogtreecommitdiffstats
path: root/0019-Add-ROCK-4-Core-IO-Board-Fuhai.patch
diff options
context:
space:
mode:
Diffstat (limited to '0019-Add-ROCK-4-Core-IO-Board-Fuhai.patch')
-rw-r--r--0019-Add-ROCK-4-Core-IO-Board-Fuhai.patch1193
1 files changed, 1193 insertions, 0 deletions
diff --git a/0019-Add-ROCK-4-Core-IO-Board-Fuhai.patch b/0019-Add-ROCK-4-Core-IO-Board-Fuhai.patch
new file mode 100644
index 000000000000..567360ca1e58
--- /dev/null
+++ b/0019-Add-ROCK-4-Core-IO-Board-Fuhai.patch
@@ -0,0 +1,1193 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: ZHANG Yuntan <yt@radxa.com>
+Date: Wed, 14 Dec 2022 12:13:47 +0800
+Subject: [PATCH] Add ROCK 4 Core IO Board (Fuhai)
+
+---
+ arch/arm64/boot/dts/rockchip/Makefile | 1 +
+ .../dts/rockchip/rk3399-rock-4-core-io.dts | 562 +++++++++++++++++
+ .../boot/dts/rockchip/rk3399-rock-4-core.dtsi | 591 ++++++++++++++++++
+ 3 files changed, 1154 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rock-4-core-io.dts
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rock-4-core.dtsi
+
+diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
+index fb4270f89050..436836c2e76e 100644
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -72,6 +72,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc-mezzanine.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-4-core-io.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-4se.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4a-plus.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4b-plus.dtb
+diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-4-core-io.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock-4-core-io.dts
+new file mode 100644
+index 000000000000..a2c27b569ec7
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-4-core-io.dts
+@@ -0,0 +1,562 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++/*
++ * Copyright (c) 2019 Akash Gajjar <Akash_Gajjar@mentor.com>
++ * Copyright (c) 2019 Pragnesh Patel <Pragnesh_Patel@mentor.com>
++ */
++
++/dts-v1/;
++#include <dt-bindings/input/linux-event-codes.h>
++#include <dt-bindings/pwm/pwm.h>
++#include "rk3399-rock-4-core.dtsi"
++
++/ {
++ model = "Radxa ROCK 4 Core IO Board";
++ compatible = "radxa,rock-4-core-io", "rockchip,rk3399";
++
++ clkin_gmac: external-gmac-clock {
++ compatible = "fixed-clock";
++ clock-frequency = <125000000>;
++ clock-output-names = "clkin_gmac";
++ #clock-cells = <0>;
++ };
++
++ hdmi_sound: hdmi-sound {
++ status = "okay";
++ compatible = "rockchip,hdmi";
++ rockchip,mclk-fs = <256>;
++ rockchip,card-name = "rockchip-hdmi0";
++ rockchip,cpu = <&i2s2>;
++ rockchip,codec = <&hdmi>;
++ rockchip,jack-det;
++ };
++
++ sdio_pwrseq: sdio-pwrseq {
++ compatible = "mmc-pwrseq-simple";
++ clocks = <&rk818 1>;
++ clock-names = "ext_clock";
++ pinctrl-names = "default";
++ pinctrl-0 = <&wifi_enable_h>;
++ reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
++ };
++
++ es8316_sound: es8316-sound {
++ status = "okay";
++ compatible = "simple-audio-card";
++ simple-audio-card,format = "i2s";
++ simple-audio-card,mclk-fs = <256>;
++ simple-audio-card,name = "rockchip-es8316";
++ simple-audio-card,dai-link@0 {
++ format = "i2s";
++ cpu {
++ sound-dai = <&i2s0>;
++ };
++ codec {
++ sound-dai = <&es8316>;
++ };
++ };
++ };
++
++ rk_headset: rk-headset {
++ status = "okay";
++ compatible = "rockchip_headset";
++ headset_gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&hp_det>;
++ io-channels = <&saradc 2>;
++ };
++
++ vcc5v0_sys: vcc5v0-sys {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc5v0_sys";
++ regulator-min-microvolt = <5000000>;
++ regulator-max-microvolt = <5000000>;
++ regulator-always-on;
++ regulator-boot-on;
++ vin-supply = <&vcc12v_dcin>;
++ };
++
++ vcc12v_dcin: dc-12v {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc12v_dcin";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <12000000>;
++ regulator-max-microvolt = <12000000>;
++ };
++
++ vcc_0v9: vcc-0v9 {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc_0v9";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <900000>;
++ regulator-max-microvolt = <900000>;
++ vin-supply = <&vcc3v3_sys>;
++ };
++
++ vcc3v3_pcie: vcc3v3-pcie-regulator {
++ compatible = "regulator-fixed";
++ enable-active-high;
++ gpio = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pcie_pwr_en>;
++ regulator-name = "vcc3v3_pcie";
++ regulator-always-on;
++ regulator-boot-on;
++ vin-supply = <&vcc5v0_sys>;
++ };
++
++ vcc3v3_sys: vcc3v3-sys {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc3v3_sys";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ vin-supply = <&vcc5v0_sys>;
++ };
++
++ vcc5v0_host: vcc5v0-host-regulator {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc5v0_host";
++ regulator-always-on;
++ vin-supply = <&vcc5v0_sys>;
++ };
++
++ vcc5v0_typec: vcc5v0-typec-regulator {
++ compatible = "regulator-fixed";
++ enable-active-high;
++ gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&vcc5v0_typec_en>;
++ regulator-name = "vcc5v0_typec";
++ regulator-always-on;
++ vin-supply = <&vcc5v0_sys>;
++ };
++
++ vcc_lan: vcc3v3-phy-regulator {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc_lan";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ vdd_log: vdd-log {
++ compatible = "pwm-regulator";
++ pwms = <&pwm2 0 25000 1>;
++ regulator-name = "vdd_log";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <800000>;
++ regulator-max-microvolt = <1400000>;
++ vin-supply = <&vcc5v0_sys>;
++ };
++
++ leds {
++ compatible = "gpio-leds";
++ pinctrl-names = "default";
++ pinctrl-0 = <&power_led_gpio>, <&status_led_gpio>;
++
++ power-status {
++ label = "power";
++ gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
++ linux,default-trigger = "default-on";
++ status = "disabled";
++ };
++
++ system-status {
++ label = "status";
++ gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
++ linux,default-trigger = "heartbeat";
++ };
++ };
++
++ camera_pwdn_gpio: camera-pwdn-gpio {
++ status = "disabled";
++ compatible = "regulator-fixed";
++ regulator-name = "camera_pwdn_gpio";
++ regulator-always-on;
++ regulator-boot-on;
++ enable-active-high;
++ gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&cam_pwdn_gpio>;
++ };
++
++ clk_cam_24m: external-camera-clock-24m {
++ status = "disabled";
++ compatible = "fixed-clock";
++ clock-frequency = <24000000>;
++ clock-output-names = "clk_cam_24m";
++ #clock-cells = <0>;
++ };
++};
++
++&i2c4 {
++ status = "okay";
++};
++
++&fusb0 {
++ status = "okay";
++};
++
++&gmac {
++ assigned-clocks = <&cru SCLK_RMII_SRC>;
++ assigned-clock-parents = <&clkin_gmac>;
++ clock_in_out = "input";
++ phy-supply = <&vcc_lan>;
++ phy-mode = "rgmii";
++ pinctrl-names = "default";
++ pinctrl-0 = <&rgmii_pins>;
++ snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
++ snps,reset-active-low;
++ snps,reset-delays-us = <0 10000 50000>;
++ tx_delay = <0x28>;
++ rx_delay = <0x11>;
++ status = "okay";
++};
++
++&hdmi {
++ pinctrl-names = "default";
++ pinctrl-0 = <&hdmi_i2c_xfer>, <&hdmi_cec>;
++ #address-cells = <1>;
++ #size-cells = <0>;
++ #sound-dai-cells = <0>;
++ status = "okay";
++};
++
++&hdmi_in_vopl {
++ status = "disabled";
++};
++
++&route_hdmi {
++ connect = <&vopb_out_hdmi>;
++ status = "okay";
++};
++
++&hdmi_sound {
++ status = "okay";
++};
++
++&i2c1 {
++ i2c-scl-rising-time-ns = <300>;
++ i2c-scl-falling-time-ns = <15>;
++ status = "okay";
++
++ es8316: es8316@11 {
++ compatible = "everest,es8316";
++ reg = <0x11>;
++ clocks = <&cru SCLK_I2S_8CH_OUT>;
++ clock-names = "mclk";
++ pinctrl-names = "default";
++ pinctrl-0 = <&i2s_8ch_mclk>;
++ #sound-dai-cells = <0>;
++ };
++};
++
++&i2s0 {
++ status = "okay";
++ rockchip,playback-channels = <2>;
++ rockchip,capture-channels = <2>;
++ #sound-dai-cells = <0>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&i2s0_8ch_bus>;
++};
++
++&i2s2 {
++ #sound-dai-cells = <0>;
++ status = "okay";
++};
++
++&pcie_phy {
++ status = "okay";
++};
++
++&pcie0 {
++ ep-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>;
++ max-link-speed = <2>;
++ num-lanes = <4>;
++ pinctrl-0 = <&pcie_clkreqnb_cpm>;
++ pinctrl-names = "default";
++ vpcie0v9-supply = <&vcc_0v9>;
++ vpcie1v8-supply = <&vcc_1v8>;
++ vpcie3v3-supply = <&vcc3v3_pcie>;
++ status = "okay";
++};
++
++&pinctrl {
++ bt {
++ bt_enable_h: bt-enable-h {
++ rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++
++ bt_host_wake_l: bt-host-wake-l {
++ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++
++ bt_wake_l: bt-wake-l {
++ rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++ };
++
++ pcie {
++ pcie_pwr_en: pcie-pwr-en {
++ rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++ };
++
++ sdio0 {
++ sdio0_bus4: sdio0-bus4 {
++ rockchip,pins = <2 RK_PC4 1 &pcfg_pull_up_20ma>,
++ <2 RK_PC5 1 &pcfg_pull_up_20ma>,
++ <2 RK_PC6 1 &pcfg_pull_up_20ma>,
++ <2 RK_PC7 1 &pcfg_pull_up_20ma>;
++ };
++
++ sdio0_cmd: sdio0-cmd {
++ rockchip,pins = <2 RK_PD0 1 &pcfg_pull_up_20ma>;
++ };
++
++ sdio0_clk: sdio0-clk {
++ rockchip,pins = <2 RK_PD1 1 &pcfg_pull_none_20ma>;
++ };
++ };
++
++ leds {
++ power_led_gpio: power_led_gpio {
++ rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++
++ status_led_gpio: status_led_gpio {
++ rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++ };
++
++ usb-typec {
++ vcc5v0_typec_en: vcc5v0-typec-en {
++ rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
++ };
++ };
++
++ wifi {
++ wifi_enable_h: wifi-enable-h {
++ rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++
++ wifi_host_wake_l: wifi-host-wake-l {
++ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
++ };
++ };
++
++ i2s0 {
++ i2s0_8ch_bus: i2s0-8ch-bus {
++ rockchip,pins =
++ <3 RK_PD0 1 &pcfg_pull_none>,
++ <3 RK_PD1 1 &pcfg_pull_none>,
++ <3 RK_PD2 1 &pcfg_pull_none>,
++ <3 RK_PD3 1 &pcfg_pull_none>,
++ <3 RK_PD7 1 &pcfg_pull_none>;
++ };
++
++ i2s_8ch_mclk: i2s-8ch-mclk {
++ rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
++ };
++ };
++
++ headphone {
++ hp_det: hp-det {
++ rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
++ };
++ };
++
++ camera {
++ cam_pwdn_gpio: cam-pwdn-gpio {
++ rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
++ };
++ };
++};
++
++&pwm2 {
++ status = "okay";
++};
++
++&saradc {
++ status = "okay";
++
++ vref-supply = <&vcc_1v8>;
++};
++
++&sdio0 {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ bus-width = <4>;
++ clock-frequency = <50000000>;
++ cap-sdio-irq;
++ cap-sd-highspeed;
++ keep-power-in-suspend;
++ mmc-pwrseq = <&sdio_pwrseq>;
++ non-removable;
++ pinctrl-names = "default";
++ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
++ sd-uhs-sdr104;
++};
++
++&tcphy0 {
++ status = "okay";
++};
++
++&tcphy1 {
++ status = "okay";
++};
++
++&tsadc {
++ status = "okay";
++
++ /* tshut mode 0:CRU 1:GPIO */
++ rockchip,hw-tshut-mode = <1>;
++ /* tshut polarity 0:LOW 1:HIGH */
++ rockchip,hw-tshut-polarity = <1>;
++};
++
++&u2phy0 {
++ status = "okay";
++
++ u2phy0_otg: otg-port {
++ status = "okay";
++ };
++
++ u2phy0_host: host-port {
++ phy-supply = <&vcc5v0_host>;
++ status = "okay";
++ };
++};
++
++&u2phy1 {
++ status = "okay";
++
++ u2phy1_otg: otg-port {
++ status = "okay";
++ };
++
++ u2phy1_host: host-port {
++ phy-supply = <&vcc5v0_host>;
++ status = "okay";
++ };
++};
++
++&uart0 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
++};
++
++&uart2 {
++ status = "okay";
++};
++
++&usb_host0_ehci {
++ status = "okay";
++};
++
++&usb_host0_ohci {
++ status = "okay";
++};
++
++&usb_host1_ehci {
++ status = "okay";
++};
++
++&usb_host1_ohci {
++ status = "okay";
++};
++
++&usbdrd3_0 {
++ status = "okay";
++};
++
++&usbdrd_dwc3_0 {
++ status = "okay";
++ dr_mode = "otg";
++};
++
++&usbdrd3_1 {
++ status = "okay";
++};
++
++&usbdrd_dwc3_1 {
++ status = "okay";
++ dr_mode = "host";
++};
++
++&display_subsystem {
++ status = "okay";
++};
++
++&vopb {
++ status = "okay";
++ assigned-clocks = <&cru DCLK_VOP0_DIV>;
++ assigned-clock-parents = <&cru PLL_CPLL>;
++};
++
++&vopb_mmu {
++ status = "okay";
++};
++
++&vopl {
++ status = "okay";
++ assigned-clocks = <&cru DCLK_VOP1_DIV>;
++ assigned-clock-parents = <&cru PLL_VPLL>;
++};
++
++&vopl_mmu {
++ status = "okay";
++};
++
++&mipi_dphy_rx0 {
++ status = "okay";
++
++ ports {
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ port@0 {
++ reg = <0>;
++ #address-cells = <1>;
++ #size-cells = <0>;
++ };
++
++ port@1 {
++ reg = <1>;
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ dphy_rx0_out: endpoint@0 {
++ reg = <0>;
++ remote-endpoint = <&isp0_mipi_in>;
++ };
++ };
++ };
++};
++
++&isp0_mmu {
++ status = "okay";
++};
++
++&rkisp1_0 {
++ status = "okay";
++
++ port {
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ isp0_mipi_in: endpoint@0 {
++ reg = <0>;
++ remote-endpoint = <&dphy_rx0_out>;
++ };
++ };
++};
+diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-4-core.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock-4-core.dtsi
+new file mode 100644
+index 000000000000..daa480da841b
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-4-core.dtsi
+@@ -0,0 +1,591 @@
++/*
++ * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ * a) This file is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This file is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * Or, alternatively,
++ *
++ * b) Permission is hereby granted, free of charge, to any person
++ * obtaining a copy of this software and associated documentation
++ * files (the "Software"), to deal in the Software without
++ * restriction, including without limitation the rights to use,
++ * copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following
++ * conditions:
++ *
++ * The above copyright notice and this permission notice shall be
++ * included in all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ * OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++#include <dt-bindings/input/linux-event-codes.h>
++#include <dt-bindings/pwm/pwm.h>
++#include <dt-bindings/input/input.h>
++#include "rk3399.dtsi"
++#include "rk3399-linux.dtsi"
++#include "rk3399-opp.dtsi"
++#include "rk3399-vop-clk-set.dtsi"
++
++/ {
++ aliases {
++ mmc0 = &sdmmc;
++ mmc1 = &sdhci;
++ mmc2 = &sdio0;
++ };
++
++ vcc1v8_s0: vcc1v8-s0 {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc1v8_s0";
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <1800000>;
++ regulator-always-on;
++ };
++
++ vcc_sys: vcc-sys {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc_sys";
++ regulator-min-microvolt = <5000000>;
++ regulator-max-microvolt = <5000000>;
++ regulator-always-on;
++ };
++
++ vcc_phy: vcc-phy-regulator {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc_phy";
++ regulator-always-on;
++ regulator-boot-on;
++ };
++
++ vcc3v3_sys: vcc3v3-sys {
++ compatible = "regulator-fixed";
++ regulator-name = "vcc3v3_sys";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-always-on;
++ vin-supply = <&vcc_sys>;
++ };
++
++ vdd_log: vdd-log {
++ compatible = "pwm-regulator";
++ pwms = <&pwm2 0 25000 1>;
++ regulator-name = "vdd_log";
++ regulator-min-microvolt = <800000>;
++ regulator-max-microvolt = <1400000>;
++ regulator-always-on;
++ regulator-boot-on;
++
++ /* for rockchip boot on */
++ rockchip,pwm_id= <2>;
++ rockchip,pwm_voltage = <900000>;
++
++ vin-supply = <&vcc_sys>;
++ };
++};
++
++&emmc_phy {
++ status = "okay";
++};
++
++&sdhci {
++ bus-width = <8>;
++ mmc-hs400-1_8v;
++ supports-emmc;
++ non-removable;
++ mmc-hs400-enhanced-strobe;
++ status = "okay";
++};
++
++&i2c0 {
++ status = "okay";
++ i2c-scl-rising-time-ns = <168>;
++ i2c-scl-falling-time-ns = <4>;
++ clock-frequency = <400000>;
++
++ vdd_cpu_b: syr827@40 {
++ compatible = "silergy,syr827";
++ reg = <0x40>;
++ regulator-compatible = "fan53555-reg";
++ pinctrl-names = "default";
++ pinctrl-0 = <&vsel1_gpio>;
++ vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
++ regulator-name = "vdd_cpu_b";
++ regulator-min-microvolt = <712500>;
++ regulator-max-microvolt = <1500000>;
++ regulator-ramp-delay = <1000>;
++ fcs,suspend-voltage-selector = <1>;
++ regulator-always-on;
++ regulator-boot-on;
++ vin-supply = <&vcc_sys>;
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ vdd_gpu: syr828@41 {
++ compatible = "silergy,syr828";
++ reg = <0x41>;
++ regulator-compatible = "fan53555-reg";
++ pinctrl-names = "default";
++ pinctrl-0 = <&vsel2_gpio>;
++ vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
++ regulator-name = "vdd_gpu";
++ regulator-min-microvolt = <712500>;
++ regulator-max-microvolt = <1500000>;
++ regulator-ramp-delay = <1000>;
++ fcs,suspend-voltage-selector = <1>;
++ regulator-always-on;
++ regulator-boot-on;
++ vin-supply = <&vcc_sys>;
++ regulator-initial-mode = <1>; /* 1:force PWM 2:auto */
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ rk818: pmic@1c {
++ compatible = "rockchip,rk818";
++ status = "okay";
++ reg = <0x1c>;
++ clock-output-names = "rk818-clkout1", "wifibt_32kin";
++ interrupt-parent = <&gpio1>;
++ interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
++ extcon = <&fusb0>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&pmic_int_l>;
++ rockchip,system-power-controller;
++ rk818,support_dc_chg = <1>;/*1: dc chg; 0:usb chg*/
++ wakeup-source;
++ #clock-cells = <1>;
++
++ vcc1-supply = <&vcc_sys>;
++ vcc2-supply = <&vcc_sys>;
++ vcc3-supply = <&vcc_sys>;
++ vcc4-supply = <&vcc_sys>;
++ vcc6-supply = <&vcc_sys>;
++ vcc7-supply = <&vcc3v3_sys>;
++ vcc8-supply = <&vcc_sys>;
++ vcc9-supply = <&vcc3v3_sys>;
++
++ regulators {
++ vdd_cpu_l: DCDC_REG1 {
++ regulator-name = "vdd_cpu_l";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <750000>;
++ regulator-max-microvolt = <1350000>;
++ regulator-ramp-delay = <6001>;
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ vdd_center: DCDC_REG2 {
++ regulator-name = "vdd_center";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <800000>;
++ regulator-max-microvolt = <1350000>;
++ regulator-ramp-delay = <6001>;
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ vcc_ddr: DCDC_REG3 {
++ regulator-name = "vcc_ddr";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-state-mem {
++ regulator-on-in-suspend;
++ };
++ };
++
++ vcc_1v8: DCDC_REG4 {
++ regulator-name = "vcc_1v8";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <1800000>;
++ regulator-state-mem {
++ regulator-on-in-suspend;
++ regulator-suspend-microvolt = <1800000>;
++ };
++ };
++
++ vcca3v0_codec: LDO_REG1 {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <3000000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "vcca3v0_codec";
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ vcc3v0_tp: LDO_REG2 {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <3000000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "vcc3v0_tp";
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ vcca1v8_codec: LDO_REG3 {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <1800000>;
++ regulator-name = "vcca1v8_codec";
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ vcc_power_on: LDO_REG4 {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-name = "vcc_power_on";
++ regulator-state-mem {
++ regulator-on-in-suspend;
++ regulator-suspend-microvolt = <3300000>;
++ };
++ };
++
++ vcc_3v0: LDO_REG5 {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <3000000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "vcc_3v0";
++ regulator-state-mem {
++ regulator-on-in-suspend;
++ regulator-suspend-microvolt = <3000000>;
++ };
++ };
++
++ vcc_1v5: LDO_REG6 {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <1500000>;
++ regulator-max-microvolt = <1500000>;
++ regulator-name = "vcc_1v5";
++ regulator-state-mem {
++ regulator-on-in-suspend;
++ regulator-suspend-microvolt = <1500000>;
++ };
++ };
++
++ vcc1v8_dvp: LDO_REG7 {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <1800000>;
++ regulator-name = "vcc1v8_dvp";
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ vcc3v3_s3: LDO_REG8 {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-name = "vcc3v3_s3";
++ regulator-state-mem {
++ regulator-off-in-suspend;
++ };
++ };
++
++ vcc_sd: LDO_REG9 {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <3000000>;
++ regulator-name = "vcc_sd";
++ regulator-state-mem {
++ regulator-on-in-suspend;
++ regulator-suspend-microvolt = <3000000>;
++ };
++ };
++
++ vcc3v3_s0: SWITCH_REG {
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-name = "vcc3v3_s0";
++ regulator-state-mem {
++ regulator-on-in-suspend;
++ };
++ };
++
++ boost_otg: DCDC_BOOST {
++ regulator-name = "boost_otg";
++ regulator-always-on;
++ regulator-boot-on;
++ regulator-min-microvolt = <5000000>;
++ regulator-max-microvolt = <5000000>;
++ regulator-state-mem {
++ regulator-on-in-suspend;
++ regulator-suspend-microvolt = <5000000>;
++ };
++ };
++
++ otg_switch: OTG_SWITCH {
++ regulator-name = "otg_switch";
++ };
++ };
++
++ battery {
++ compatible = "rk818-battery";
++ ocv_table = <3400 3675 3689 3716 3740 3756 3768 3780
++ 3793 3807 3827 3853 3896 3937 3974 4007 4066
++ 4110 4161 4217 4308>;
++ design_capacity = <7916>;
++ design_qmax = <8708>;
++ bat_res = <65>;
++ max_input_current = <3000>;
++ max_chrg_current = <3000>;
++ max_chrg_voltage = <4350>;
++ sleep_enter_current = <300>;
++ sleep_exit_current = <300>;
++ power_off_thresd = <3400>;
++ zero_algorithm_vol = <3950>;
++ fb_temperature = <105>;
++ sample_res = <20>;
++ max_soc_offset = <60>;
++ energy_mode = <0>;
++ monitor_sec = <5>;
++ virtual_power = <0>;
++ power_dc2otg = <0>;
++ };
++ };
++};
++
++&i2c4 {
++ status = "disabled";
++
++ fusb0: fusb30x@22 {
++ compatible = "fairchild,fusb302";
++ reg = <0x22>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&fusb0_int>;
++ int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
++ vbus-5v-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
++ status = "disabled";
++ };
++};
++
++&cpu_l0 {
++ cpu-supply = <&vdd_cpu_l>;
++};
++
++&cpu_l1 {
++ cpu-supply = <&vdd_cpu_l>;
++};
++
++&cpu_l2 {
++ cpu-supply = <&vdd_cpu_l>;
++};
++
++&cpu_l3 {
++ cpu-supply = <&vdd_cpu_l>;
++};
++
++&cpu_b0 {
++ cpu-supply = <&vdd_cpu_b>;
++};
++
++&cpu_b1 {
++ cpu-supply = <&vdd_cpu_b>;
++};
++
++&gpu {
++ status = "okay";
++ mali-supply = <&vdd_gpu>;
++};
++
++&threshold {
++ temperature = <85000>;
++};
++
++&target {
++ temperature = <100000>;
++};
++
++&soc_crit {
++ temperature = <105000>;
++};
++
++&tsadc {
++ status = "okay";
++ /* tshut mode 0:CRU 1:GPIO */
++ rockchip,hw-tshut-mode = <1>;
++ /* tshut polarity 0:LOW 1:HIGH */
++ rockchip,hw-tshut-polarity = <1>;
++ rockchip,hw-tshut-temp = <110000>;
++};
++
++&saradc {
++ status = "okay";
++};
++
++&pwm2 {
++ status = "okay";
++};
++
++&io_domains {
++ status = "okay";
++
++ bt656-supply = <&vcc_3v0>; /* bt656_gpio2ab_ms */
++ audio-supply = <&vcc_1v8>; /* audio_gpio3d4a_ms */
++ sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
++ gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
++};
++
++&spi1 {
++ status = "disabled";
++ max-freq = <10000000>;
++
++ spiflash: spi-flash@0 {
++ #address-cells = <0x1>;
++ #size-cells = <1>;
++ compatible = "jedec,spi-nor";
++ reg = <0x0>;
++ status = "disabled";
++ spi-max-frequency = <10000000>;
++
++ partitions {
++ compatible = "fixed-partitions";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ loader@0 {
++ label = "loader";
++ reg = <0x0 0x400000>;
++ };
++ };
++ };
++};
++
++&pinctrl {
++ pmic {
++ pmic_int_l: pmic-int-l {
++ rockchip,pins =
++ <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
++ };
++
++ vsel1_gpio: vsel1-gpio {
++ rockchip,pins =
++ <1 17 RK_FUNC_GPIO &pcfg_pull_down>;
++ };
++
++ vsel2_gpio: vsel2-gpio {
++ rockchip,pins =
++ <1 14 RK_FUNC_GPIO &pcfg_pull_down>;
++ };
++ };
++
++ fusb30x {
++ fusb0_int: fusb0-int {
++ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
++ };
++ };
++};
++
++&pvtm {
++ status = "okay";
++};
++
++&pmu_pvtm {
++ status = "okay";
++};
++
++&pmu_io_domains {
++ status = "okay";
++ pmu1830-supply = <&vcc_1v8>;
++};
++
++&sdmmc {
++ clock-frequency = <150000000>;
++ clock-freq-min-max = <100000 150000000>;
++ no-sdio;
++ no-mmc;
++ bus-width = <4>;
++ cap-mmc-highspeed;
++ cap-sd-highspeed;
++ disable-wp;
++ sd-uhs-sdr104;
++ num-slots = <1>;
++ pinctrl-names = "default";
++ pinctrl-0 = <&sdmmc_clk &sdmmc_cd &sdmmc_cmd &sdmmc_bus4>;
++ vqmmc-supply = <&vcc_sd>;
++ status = "okay";
++};
++
++&sdhci {
++ max-frequency = <150000000>;
++ bus-width = <8>;
++ mmc-hs400-1_8v;
++ mmc-hs400-enhanced-strobe;
++ non-removable;
++ status = "okay";
++};
++
++
++&rockchip_suspend {
++ status = "okay";
++ rockchip,sleep-debug-en = <0>;
++ rockchip,sleep-mode-config = <
++ (0
++ | RKPM_SLP_ARMPD
++ | RKPM_SLP_PERILPPD
++ | RKPM_SLP_DDR_RET
++ | RKPM_SLP_PLLPD
++ | RKPM_SLP_CENTER_PD
++ | RKPM_SLP_AP_PWROFF
++ )
++ >;
++ rockchip,wakeup-config = <
++ (0
++ | RKPM_GPIO_WKUP_EN
++ | RKPM_PWM_WKUP_EN
++ )
++ >;
++ rockchip,pwm-regulator-config = <
++ (0
++ | PWM2_REGULATOR_EN
++ )
++ >;
++ rockchip,power-ctrl =
++ <&gpio1 17 GPIO_ACTIVE_HIGH>,
++ <&gpio1 14 GPIO_ACTIVE_HIGH>;
++};
+--
+2.39.0
+