From: Huang, Tao Date: Mon, 20 Feb 2017 07:49:03 +0000 (+0800) Subject: arm64: dts: rk3399: rename android to android-6.0 X-Git-Tag: firefly_0821_release~591 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e7dfb803ed5fd7d586a5c14859487a5420d19614;p=firefly-linux-kernel-4.4.55.git arm64: dts: rk3399: rename android to android-6.0 Except dts of VR. The md5sum is identical after rename, so this commit is safe. Change-Id: I9ec324355ae67bbe2bb626090402ae797de13d92 Signed-off-by: Huang, Tao --- diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index f1044591ec73..8c69677edf09 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -3,34 +3,34 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3366-fpga.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3366-tb.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-tb-sheep.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-808-android.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-rev1.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-808-android-6.0.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-rev1-android-6.0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-rev1-disvr.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-rev2.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-rev2-android-6.0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-rev2-disvr.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-rev1-next.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-box-rev2-next.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-disvr-android.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev1-android.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev1-android-6.0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev1-android-next.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev1-cros.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev2-android.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev2-android-6.0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev2-android-next.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev2-cros.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev3-android.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev3-android-edp.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev3-android-6.0.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev3-android-6.0-edp.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev3-android-edp-next.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb-rev3-cros.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-fpga.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-gru.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin-r0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin-r1.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-mid-818-android.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-mid-818-android-6.0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-mid-818-android-next.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rv1-android.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-box.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-box-android-6.0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-disvr.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp-android-6.0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp-next.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-linux.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-tve1205g.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3399-android-6.0.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-android-6.0.dtsi new file mode 100644 index 000000000000..b2b6ddd4796c --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-android-6.0.dtsi @@ -0,0 +1,576 @@ +/* + * 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. + */ +#include +#include +#include "rk3399-vop-clk-set.dtsi" + +/ { + compatible = "rockchip,android", "rockchip,rk3399"; + + aliases { + lcdc0 = &vopb_rk_fb; + lcdc1 = &vopl_rk_fb; + }; + + chosen { + bootargs = "earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1"; + }; + + ramoops_mem: ramoops_mem { + reg = <0x0 0x110000 0x0 0xf0000>; + reg-names = "ramoops_mem"; + }; + + ramoops { + compatible = "ramoops"; + record-size = <0x0 0x20000>; + console-size = <0x0 0x80000>; + ftrace-size = <0x0 0x00000>; + pmsg-size = <0x0 0x50000>; + memory-region = <&ramoops_mem>; + }; + + fiq_debugger: fiq-debugger { + compatible = "rockchip,fiq-debugger"; + rockchip,serial-id = <2>; + rockchip,signal-irq = <182>; + rockchip,wake-irq = <0>; + rockchip,irq-mode-enable = <1>; /* If enable uart uses irq instead of fiq */ + rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ + pinctrl-names = "default"; + pinctrl-0 = <&uart2c_xfer>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* global autoconfigured region for contiguous allocations */ + linux,cma { + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x8000000>; + linux,cma-default; + }; + /* reg = <0x0 0x0 0x0 0x0> will be updated by uboot */ + rockchip_logo: rockchip-logo@00000000 { + compatible = "rockchip,fb-logo"; + reg = <0x0 0x0 0x0 0x0>; + }; + }; + + ion { + compatible = "rockchip,ion"; + #address-cells = <1>; + #size-cells = <0>; + + cma-heap { + reg = <0x00000000 0x02000000>; + }; + + system-heap { + }; + }; + + rk_key: rockchip-key { + compatible = "rockchip,key"; + status = "okay"; + + io-channels = <&saradc 1>; + + vol-up-key { + linux,code = <115>; + label = "volume up"; + rockchip,adc_value = <1>; + }; + + vol-down-key { + linux,code = <114>; + label = "volume down"; + rockchip,adc_value = <170>; + }; + + power-key { + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + linux,code = <116>; + label = "power"; + gpio-key,wakeup; + }; + + menu-key { + linux,code = <59>; + label = "menu"; + rockchip,adc_value = <746>; + }; + + home-key { + linux,code = <102>; + label = "home"; + rockchip,adc_value = <355>; + }; + + back-key { + linux,code = <158>; + label = "back"; + rockchip,adc_value = <560>; + }; + + camera-key { + linux,code = <212>; + label = "camera"; + rockchip,adc_value = <450>; + }; + }; + + cdn_dp_fb: dp-fb@fec00000 { + status = "disabled"; + compatible = "rockchip,rk3399-cdn-dp-fb"; + reg = <0x0 0xfec00000 0x0 0x100000>; + interrupts = ; + clocks = <&cru SCLK_DP_CORE>, <&cru PCLK_DP_CTRL>, + <&cru SCLK_SPDIF_REC_DPTX>, <&cru PCLK_VIO_GRF>; + clock-names = "core-clk", "pclk", "spdif", "grf"; + assigned-clocks = <&cru SCLK_DP_CORE>; + assigned-clock-rates = <100000000>; + power-domains = <&power RK3399_PD_HDCP>; + phys = <&tcphy0_dp>, <&tcphy1_dp>; + resets = <&cru SRST_DPTX_SPDIF_REC>, <&cru SRST_P_UPHY0_DPTX>, + <&cru SRST_P_UPHY0_APB>, <&cru SRST_DP_CORE>; + reset-names = "spdif", "dptx", "apb", "core"; + rockchip,grf = <&grf>; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + + cdn_dp_sound: cdn-dp-sound { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,name = "rockchip,cdn-dp-fb"; + simple-audio-card,widgets = "Headphone", "Out Jack", + "Line", "In Jack"; + + simple-audio-card,dai-link@0 { + format = "i2s"; + mclk-fs = <256>; + + cpu { + sound-dai = <&i2s2>; + }; + + codec { + sound-dai = <&cdn_dp_fb 0>; + }; + }; + }; + + iep: iep@ff670000 { + compatible = "rockchip,iep"; + iommu_enabled = <1>; + reg = <0x0 0xff670000 0x0 0x800>; + interrupts = ; + clocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>; + clock-names = "aclk_iep", "hclk_iep"; + power-domains = <&power RK3399_PD_IEP>; + version = <2>; + }; + + iep_mmu: iep-mmu { + dbgname = "iep"; + compatible = "rockchip,iep_mmu"; + reg = <0x0 0xff670800 0x0 0x40>; + interrupts = ; + interrupt-names = "iep_mmu"; + }; + + rga: rga@ff680000 { + compatible = "rockchip,rga2"; + dev_mode = <1>; + reg = <0x0 0xff680000 0x0 0x1000>; + interrupts = ; + clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA_CORE>; + clock-names = "aclk_rga", "hclk_rga", "clk_rga"; + power-domains = <&power RK3399_PD_RGA>; + status = "okay"; + }; + + fb: fb { + status = "okay"; + compatible = "rockchip,rk-fb"; + rockchip,disp-mode = ; + rockchip,uboot-logo-on = <1>; + memory-region = <&rockchip_logo>; + }; + + rk_screen: screen { + status = "okay"; + compatible = "rockchip,screen"; + }; + + vopb_rk_fb: vop-rk-fb@ff900000 { + status = "disabled"; + compatible = "rockchip,rk3399-lcdc"; + rockchip,prop = ; + reg = <0x0 0xff900000 0x0 0x3efc>; + interrupts = ; + clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>; + clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc"; + resets = <&cru SRST_A_VOP0>, <&cru SRST_H_VOP0>, <&cru SRST_D_VOP0>; + reset-names = "axi", "ahb", "dclk"; + rockchip,grf = <&grf>; + rockchip,pwr18 = <0>; + rockchip,iommu-enabled = <1>; + power-domains = <&power RK3399_PD_VOPB>; + devfreq = <&dmc>; + }; + + vopb_mmu_rk_fb: vopb-mmu { + status = "okay"; + dbgname = "vop"; + compatible = "rockchip,vopb_mmu"; + reg = <0x0 0xff903f00 0x0 0x100>; + interrupts = ; + interrupt-names = "vopb_mmu"; + }; + + vopl_rk_fb: vop-rk-fb@ff8f0000 { + status = "disabled"; + compatible = "rockchip,rk3399-lcdc"; + rockchip,prop = ; + reg = <0x0 0xff8f0000 0x0 0x3efc>; + interrupts = ; + clocks = <&cru ACLK_VOP1>, <&cru DCLK_VOP1>, <&cru HCLK_VOP1>; + clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc"; + resets = <&cru SRST_A_VOP1>, <&cru SRST_H_VOP1>, <&cru SRST_D_VOP1>; + reset-names = "axi", "ahb", "dclk"; + rockchip,grf = <&grf>; + rockchip,pwr18 = <0>; + rockchip,iommu-enabled = <1>; + power-domains = <&power RK3399_PD_VOPL>; + devfreq = <&dmc>; + }; + + vopl_mmu_rk_fb: vopl-mmu { + status = "okay"; + dbgname = "vop"; + compatible = "rockchip,vopl_mmu"; + reg = <0x0 0xff8f3f00 0x0 0x100>; + interrupts = ; + interrupt-names = "vopl_mmu"; + }; + + cif_isp0: cif_isp@ff910000 { + compatible = "rockchip,rk3399-cif-isp"; + rockchip,grf = <&grf>; + reg = <0x0 0xff910000 0x0 0x10000>, <0x0 0xff968000 0x0 0x8000>; + reg-names = "register", "dsihost-register"; + clocks = + <&cru SCLK_CIF_OUT>, <&cru SCLK_CIF_OUT>, + <&cru SCLK_DPHY_TX1RX1_CFG>, <&cru SCLK_MIPIDPHY_REF>, + <&cru ACLK_ISP0_NOC>, <&cru ACLK_ISP0_WRAPPER>, + <&cru HCLK_ISP0_NOC>, <&cru HCLK_ISP0_WRAPPER>, + <&cru SCLK_ISP0>, <&cru SCLK_DPHY_RX0_CFG>; + clock-names = + "clk_cif_out", "clk_cif_pll", + "pclk_dphytxrx", "pclk_dphy_ref", + "aclk_isp0_noc", "aclk_isp0_wrapper", + "hclk_isp0_noc", "hclk_isp0_wrapper", + "clk_isp0", "pclk_dphyrx"; + interrupts = ; + interrupt-names = "cif_isp10_irq"; + power-domains = <&power RK3399_PD_ISP0>; + status = "disabled"; + }; + + isp0: isp@ff910000 { + compatible = "rockchip,rk3399-isp", "rockchip,isp"; + reg = <0x0 0xff910000 0x0 0x10000>; + interrupts = ; + clocks = + <&cru SCLK_CIF_OUT>, <&cru SCLK_CIF_OUT>, + <&cru SCLK_DPHY_TX1RX1_CFG>, <&cru SCLK_MIPIDPHY_REF>, + <&cru ACLK_ISP0_NOC>, <&cru ACLK_ISP0_WRAPPER>, + <&cru HCLK_ISP0_NOC>, <&cru HCLK_ISP0_WRAPPER>, + <&cru SCLK_ISP0>, <&cru SCLK_DPHY_RX0_CFG>; + clock-names = + "clk_cif_out", "clk_cif_pll", + "pclk_dphytxrx", "pclk_dphy_ref", + "aclk_isp0_noc", "aclk_isp0_wrapper", + "hclk_isp0_noc", "hclk_isp0_wrapper", + "clk_isp0", "pclk_dphyrx"; + pinctrl-names = + "cif_clkout","isp_dvp8bit0", "isp_mipi_fl", + "isp_mipi_fl_prefl", "isp_flash_as_gpio", + "isp_flash_as_trigger_out"; + pinctrl-0 = <&cif_clkout>; + pinctrl-1 = <&isp_dvp_d0d7>; + pinctrl-2 = <&cif_clkout>; + pinctrl-3 = <&isp_prelight>; + pinctrl-4 = <&isp_flash_trigger_as_gpio>; + pinctrl-5 = <&isp_flash_trigger>; + rockchip,isp,mipiphy = <2>; + rockchip,isp,cifphy = <1>; + rockchip,isp,dsiphy,reg = <0xff968000 0x8000>; + rockchip,grf = <&grf>; + rockchip,cru = <&cru>; + rockchip,gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; + rockchip,isp,iommu-enable = <1>; + power-domains = <&power RK3399_PD_ISP0>; + status = "disabled"; + }; + + isp0_mmu { + dbgname = "isp0"; + compatible = "rockchip,isp0_mmu"; + reg = <0x0 0xff914000 0x0 0x100>, + <0x0 0xff915000 0x0 0x100>; + interrupts = ; + interrupt-names = "isp0_mmu"; + }; + + isp1: isp@ff920000 { + compatible = "rockchip,rk3399-isp", "rockchip,isp"; + reg = <0x0 0xff920000 0x0 0x10000>; + interrupts = ; + clocks = + <&cru ACLK_ISP1_NOC>, <&cru ACLK_ISP1_WRAPPER>, + <&cru HCLK_ISP1_NOC>, <&cru HCLK_ISP1_WRAPPER>, + <&cru SCLK_ISP1>, <&cru SCLK_CIF_OUT>, + <&cru SCLK_CIF_OUT>, <&cru SCLK_DPHY_TX1RX1_CFG>, + <&cru SCLK_MIPIDPHY_REF>, <&cru PCLK_ISP1_WRAPPER>, + <&cru SCLK_DPHY_RX0_CFG>, <&cru PCLK_MIPI_DSI1>, + <&cru SCLK_MIPIDPHY_CFG>; + clock-names = + "aclk_isp1_noc", "aclk_isp1_wrapper", + "hclk_isp1_noc", "hclk_isp1_wrapper", + "clk_isp1", "clk_cif_out", + "clk_cif_pll", "pclk_dphytxrx", + "pclk_dphy_ref", "pclk_isp1", + "pclk_dphyrx", "pclk_mipi_dsi", + "mipi_dphy_cfg"; + pinctrl-names = + "cif_clkout","isp_dvp8bit0", "isp_mipi_fl", + "isp_mipi_fl_prefl", "isp_flash_as_gpio", + "isp_flash_as_trigger_out"; + pinctrl-0 = <&cif_clkout>; + pinctrl-1 = <&isp_dvp_d0d7>; + pinctrl-2 = <&cif_clkout>; + pinctrl-3 = <&isp_prelight>; + pinctrl-4 = <&isp_flash_trigger_as_gpio>; + pinctrl-5 = <&isp_flash_trigger>; + rockchip,isp,mipiphy = <2>; + rockchip,isp,cifphy = <1>; + rockchip,isp,dsiphy,reg = <0xff968000 0x8000>; + rockchip,grf = <&grf>; + rockchip,cru = <&cru>; + rockchip,gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; + rockchip,isp,iommu-enable = <1>; + power-domains = <&power RK3399_PD_ISP1>; + status = "disabled"; + }; + + isp1_mmu { + dbgname = "isp1"; + compatible = "rockchip,isp1_mmu"; + reg = <0x0 0xff924000 0x0 0x100>, + <0x0 0xff925000 0x0 0x100>; + interrupts = ; + interrupt-names = "isp1_mmu"; + }; + + hdmi_rk_fb: hdmi-rk-fb@ff940000 { + status = "disabled"; + compatible = "rockchip,rk3399-hdmi"; + reg = <0x0 0xff940000 0x0 0x20000>; + interrupts = , + ; + clocks = <&cru PCLK_HDMI_CTRL>, + <&cru HCLK_HDCP>, + <&cru SCLK_HDMI_CEC>, + <&cru PLL_VPLL>, + <&cru SCLK_HDMI_SFR>; + clock-names = "pclk_hdmi", + "hdcp_clk_hdmi", + "cec_clk_hdmi", + "dclk_hdmi_phy", + "sclk_hdmi_sfr"; + resets = <&cru SRST_HDMI_CTRL>; + reset-names = "hdmi"; + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&hdmi_i2c_xfer &hdmi_cec>; + pinctrl-1 = <&i2c3_gpio>; + rockchip,grf = <&grf>; + power-domains = <&power RK3399_PD_HDCP>; + }; + + mipi0_rk_fb: mipi-rk-fb@ff960000 { + compatible = "rockchip,rk3399-dsi"; + rockchip,prop = <0>; + rockchip,grf = <&grf>; + reg = <0x0 0xff960000 0x0 0x8000>; + interrupts = ; + clocks = <&cru SCLK_MIPIDPHY_REF>, <&cru PCLK_MIPI_DSI0>, <&cru SCLK_MIPIDPHY_CFG>; + clock-names = "clk_mipi_24m", "pclk_mipi_dsi", "mipi_dphy_cfg"; + power-domains = <&power RK3399_PD_VIO>; + status = "disabled"; + }; + + mipi1_rk_fb: mipi-rk-fb@ff968000 { + compatible = "rockchip,rk3399-dsi"; + rockchip,prop = <1>; + rockchip,grf = <&grf>; + reg = <0x0 0xff968000 0x0 0x8000>; + interrupts = ; + clocks = <&cru SCLK_MIPIDPHY_REF>, <&cru PCLK_MIPI_DSI1>, <&cru SCLK_MIPIDPHY_CFG>; + clock-names = "clk_mipi_24m", "pclk_mipi_dsi", "mipi_dphy_cfg"; + power-domains = <&power RK3399_PD_VIO>; + status = "disabled"; + }; + + edp_rk_fb: edp-rk-fb@ff970000 { + compatible = "rockchip,rk3399-edp-fb"; + reg = <0x0 0xff970000 0x0 0x8000>; + rockchip,grf = <&grf>; + interrupts = ; + clocks = <&cru PCLK_EDP>, <&cru PCLK_EDP_CTRL>, <&cru PCLK_VIO_GRF>; + clock-names = "clk_edp", "pclk_edp", "clk_grf"; + resets = <&cru SRST_P_EDP_CTRL>; + reset-names = "edp_apb"; + status = "disabled"; + power-domains = <&power RK3399_PD_EDP>; + }; +}; + +&vpu { + status = "okay"; + /delete-property/ iommus; + /* 0 means ion, 1 means drm */ + allocator = <0>; +}; + +&vpu_mmu { + dbgname = "vpu"; + compatible = "rockchip,vpu_mmu"; +}; + +&rkvdec { + status = "okay"; + /delete-property/ iommus; + /* 0 means ion, 1 means drm */ + allocator = <0>; +}; + +&vdec_mmu { + dbgname = "vdec"; + compatible = "rockchip,vdec_mmu"; +}; + +&pinctrl { + isp { + cif_clkout: cif-clkout { + rockchip,pins = + /*cif_clkout*/ + <2 11 RK_FUNC_3 &pcfg_pull_none>; + }; + + isp_dvp_d0d7: isp-dvp-d0d7 { + rockchip,pins = + /*cif_data0*/ + <2 0 RK_FUNC_3 &pcfg_pull_none>, + /*cif_data1*/ + <2 1 RK_FUNC_3 &pcfg_pull_none>, + /*cif_data2*/ + <2 2 RK_FUNC_3 &pcfg_pull_none>, + /*cif_data3*/ + <2 3 RK_FUNC_3 &pcfg_pull_none>, + /*cif_data4*/ + <2 4 RK_FUNC_3 &pcfg_pull_none>, + /*cif_data5*/ + <2 5 RK_FUNC_3 &pcfg_pull_none>, + /*cif_data6*/ + <2 6 RK_FUNC_3 &pcfg_pull_none>, + /*cif_data7*/ + <2 7 RK_FUNC_3 &pcfg_pull_none>, + /*cif_sync*/ + <2 8 RK_FUNC_3 &pcfg_pull_none>, + /*cif_href*/ + <2 9 RK_FUNC_3 &pcfg_pull_none>, + /*cif_clkin*/ + <2 10 RK_FUNC_3 &pcfg_pull_none>; + }; + + isp_shutter: isp-shutter { + rockchip,pins = + /*SHUTTEREN*/ + <1 1 RK_FUNC_1 &pcfg_pull_none>, + /*SHUTTERTRIG*/ + <1 0 RK_FUNC_1 &pcfg_pull_none>; + }; + + isp_flash_trigger: isp-flash-trigger { + /*ISP_FLASHTRIGOU*/ + rockchip,pins = <1 3 RK_FUNC_1 &pcfg_pull_none>; + }; + + isp_prelight: isp-prelight { + /*ISP_PRELIGHTTRIG*/ + rockchip,pins = <1 4 RK_FUNC_1 &pcfg_pull_none>; + }; + + isp_flash_trigger_as_gpio: isp_flash_trigger_as_gpio { + /*ISP_FLASHTRIGOU*/ + rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + cam_pins { + cam0_default_pins: cam0-default-pins { + rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>, + <2 11 RK_FUNC_3 &pcfg_pull_none>; + }; + cam0_sleep_pins: cam0-sleep-pins { + rockchip,pins = <4 27 RK_FUNC_3 &pcfg_pull_none>, + <2 11 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-android.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-android.dtsi deleted file mode 100644 index b2b6ddd4796c..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-android.dtsi +++ /dev/null @@ -1,576 +0,0 @@ -/* - * 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. - */ -#include -#include -#include "rk3399-vop-clk-set.dtsi" - -/ { - compatible = "rockchip,android", "rockchip,rk3399"; - - aliases { - lcdc0 = &vopb_rk_fb; - lcdc1 = &vopl_rk_fb; - }; - - chosen { - bootargs = "earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1"; - }; - - ramoops_mem: ramoops_mem { - reg = <0x0 0x110000 0x0 0xf0000>; - reg-names = "ramoops_mem"; - }; - - ramoops { - compatible = "ramoops"; - record-size = <0x0 0x20000>; - console-size = <0x0 0x80000>; - ftrace-size = <0x0 0x00000>; - pmsg-size = <0x0 0x50000>; - memory-region = <&ramoops_mem>; - }; - - fiq_debugger: fiq-debugger { - compatible = "rockchip,fiq-debugger"; - rockchip,serial-id = <2>; - rockchip,signal-irq = <182>; - rockchip,wake-irq = <0>; - rockchip,irq-mode-enable = <1>; /* If enable uart uses irq instead of fiq */ - rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ - pinctrl-names = "default"; - pinctrl-0 = <&uart2c_xfer>; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - /* global autoconfigured region for contiguous allocations */ - linux,cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x8000000>; - linux,cma-default; - }; - /* reg = <0x0 0x0 0x0 0x0> will be updated by uboot */ - rockchip_logo: rockchip-logo@00000000 { - compatible = "rockchip,fb-logo"; - reg = <0x0 0x0 0x0 0x0>; - }; - }; - - ion { - compatible = "rockchip,ion"; - #address-cells = <1>; - #size-cells = <0>; - - cma-heap { - reg = <0x00000000 0x02000000>; - }; - - system-heap { - }; - }; - - rk_key: rockchip-key { - compatible = "rockchip,key"; - status = "okay"; - - io-channels = <&saradc 1>; - - vol-up-key { - linux,code = <115>; - label = "volume up"; - rockchip,adc_value = <1>; - }; - - vol-down-key { - linux,code = <114>; - label = "volume down"; - rockchip,adc_value = <170>; - }; - - power-key { - gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; - linux,code = <116>; - label = "power"; - gpio-key,wakeup; - }; - - menu-key { - linux,code = <59>; - label = "menu"; - rockchip,adc_value = <746>; - }; - - home-key { - linux,code = <102>; - label = "home"; - rockchip,adc_value = <355>; - }; - - back-key { - linux,code = <158>; - label = "back"; - rockchip,adc_value = <560>; - }; - - camera-key { - linux,code = <212>; - label = "camera"; - rockchip,adc_value = <450>; - }; - }; - - cdn_dp_fb: dp-fb@fec00000 { - status = "disabled"; - compatible = "rockchip,rk3399-cdn-dp-fb"; - reg = <0x0 0xfec00000 0x0 0x100000>; - interrupts = ; - clocks = <&cru SCLK_DP_CORE>, <&cru PCLK_DP_CTRL>, - <&cru SCLK_SPDIF_REC_DPTX>, <&cru PCLK_VIO_GRF>; - clock-names = "core-clk", "pclk", "spdif", "grf"; - assigned-clocks = <&cru SCLK_DP_CORE>; - assigned-clock-rates = <100000000>; - power-domains = <&power RK3399_PD_HDCP>; - phys = <&tcphy0_dp>, <&tcphy1_dp>; - resets = <&cru SRST_DPTX_SPDIF_REC>, <&cru SRST_P_UPHY0_DPTX>, - <&cru SRST_P_UPHY0_APB>, <&cru SRST_DP_CORE>; - reset-names = "spdif", "dptx", "apb", "core"; - rockchip,grf = <&grf>; - #address-cells = <1>; - #size-cells = <0>; - #sound-dai-cells = <1>; - }; - - cdn_dp_sound: cdn-dp-sound { - status = "disabled"; - compatible = "simple-audio-card"; - simple-audio-card,name = "rockchip,cdn-dp-fb"; - simple-audio-card,widgets = "Headphone", "Out Jack", - "Line", "In Jack"; - - simple-audio-card,dai-link@0 { - format = "i2s"; - mclk-fs = <256>; - - cpu { - sound-dai = <&i2s2>; - }; - - codec { - sound-dai = <&cdn_dp_fb 0>; - }; - }; - }; - - iep: iep@ff670000 { - compatible = "rockchip,iep"; - iommu_enabled = <1>; - reg = <0x0 0xff670000 0x0 0x800>; - interrupts = ; - clocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>; - clock-names = "aclk_iep", "hclk_iep"; - power-domains = <&power RK3399_PD_IEP>; - version = <2>; - }; - - iep_mmu: iep-mmu { - dbgname = "iep"; - compatible = "rockchip,iep_mmu"; - reg = <0x0 0xff670800 0x0 0x40>; - interrupts = ; - interrupt-names = "iep_mmu"; - }; - - rga: rga@ff680000 { - compatible = "rockchip,rga2"; - dev_mode = <1>; - reg = <0x0 0xff680000 0x0 0x1000>; - interrupts = ; - clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA_CORE>; - clock-names = "aclk_rga", "hclk_rga", "clk_rga"; - power-domains = <&power RK3399_PD_RGA>; - status = "okay"; - }; - - fb: fb { - status = "okay"; - compatible = "rockchip,rk-fb"; - rockchip,disp-mode = ; - rockchip,uboot-logo-on = <1>; - memory-region = <&rockchip_logo>; - }; - - rk_screen: screen { - status = "okay"; - compatible = "rockchip,screen"; - }; - - vopb_rk_fb: vop-rk-fb@ff900000 { - status = "disabled"; - compatible = "rockchip,rk3399-lcdc"; - rockchip,prop = ; - reg = <0x0 0xff900000 0x0 0x3efc>; - interrupts = ; - clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>; - clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc"; - resets = <&cru SRST_A_VOP0>, <&cru SRST_H_VOP0>, <&cru SRST_D_VOP0>; - reset-names = "axi", "ahb", "dclk"; - rockchip,grf = <&grf>; - rockchip,pwr18 = <0>; - rockchip,iommu-enabled = <1>; - power-domains = <&power RK3399_PD_VOPB>; - devfreq = <&dmc>; - }; - - vopb_mmu_rk_fb: vopb-mmu { - status = "okay"; - dbgname = "vop"; - compatible = "rockchip,vopb_mmu"; - reg = <0x0 0xff903f00 0x0 0x100>; - interrupts = ; - interrupt-names = "vopb_mmu"; - }; - - vopl_rk_fb: vop-rk-fb@ff8f0000 { - status = "disabled"; - compatible = "rockchip,rk3399-lcdc"; - rockchip,prop = ; - reg = <0x0 0xff8f0000 0x0 0x3efc>; - interrupts = ; - clocks = <&cru ACLK_VOP1>, <&cru DCLK_VOP1>, <&cru HCLK_VOP1>; - clock-names = "aclk_lcdc", "dclk_lcdc", "hclk_lcdc"; - resets = <&cru SRST_A_VOP1>, <&cru SRST_H_VOP1>, <&cru SRST_D_VOP1>; - reset-names = "axi", "ahb", "dclk"; - rockchip,grf = <&grf>; - rockchip,pwr18 = <0>; - rockchip,iommu-enabled = <1>; - power-domains = <&power RK3399_PD_VOPL>; - devfreq = <&dmc>; - }; - - vopl_mmu_rk_fb: vopl-mmu { - status = "okay"; - dbgname = "vop"; - compatible = "rockchip,vopl_mmu"; - reg = <0x0 0xff8f3f00 0x0 0x100>; - interrupts = ; - interrupt-names = "vopl_mmu"; - }; - - cif_isp0: cif_isp@ff910000 { - compatible = "rockchip,rk3399-cif-isp"; - rockchip,grf = <&grf>; - reg = <0x0 0xff910000 0x0 0x10000>, <0x0 0xff968000 0x0 0x8000>; - reg-names = "register", "dsihost-register"; - clocks = - <&cru SCLK_CIF_OUT>, <&cru SCLK_CIF_OUT>, - <&cru SCLK_DPHY_TX1RX1_CFG>, <&cru SCLK_MIPIDPHY_REF>, - <&cru ACLK_ISP0_NOC>, <&cru ACLK_ISP0_WRAPPER>, - <&cru HCLK_ISP0_NOC>, <&cru HCLK_ISP0_WRAPPER>, - <&cru SCLK_ISP0>, <&cru SCLK_DPHY_RX0_CFG>; - clock-names = - "clk_cif_out", "clk_cif_pll", - "pclk_dphytxrx", "pclk_dphy_ref", - "aclk_isp0_noc", "aclk_isp0_wrapper", - "hclk_isp0_noc", "hclk_isp0_wrapper", - "clk_isp0", "pclk_dphyrx"; - interrupts = ; - interrupt-names = "cif_isp10_irq"; - power-domains = <&power RK3399_PD_ISP0>; - status = "disabled"; - }; - - isp0: isp@ff910000 { - compatible = "rockchip,rk3399-isp", "rockchip,isp"; - reg = <0x0 0xff910000 0x0 0x10000>; - interrupts = ; - clocks = - <&cru SCLK_CIF_OUT>, <&cru SCLK_CIF_OUT>, - <&cru SCLK_DPHY_TX1RX1_CFG>, <&cru SCLK_MIPIDPHY_REF>, - <&cru ACLK_ISP0_NOC>, <&cru ACLK_ISP0_WRAPPER>, - <&cru HCLK_ISP0_NOC>, <&cru HCLK_ISP0_WRAPPER>, - <&cru SCLK_ISP0>, <&cru SCLK_DPHY_RX0_CFG>; - clock-names = - "clk_cif_out", "clk_cif_pll", - "pclk_dphytxrx", "pclk_dphy_ref", - "aclk_isp0_noc", "aclk_isp0_wrapper", - "hclk_isp0_noc", "hclk_isp0_wrapper", - "clk_isp0", "pclk_dphyrx"; - pinctrl-names = - "cif_clkout","isp_dvp8bit0", "isp_mipi_fl", - "isp_mipi_fl_prefl", "isp_flash_as_gpio", - "isp_flash_as_trigger_out"; - pinctrl-0 = <&cif_clkout>; - pinctrl-1 = <&isp_dvp_d0d7>; - pinctrl-2 = <&cif_clkout>; - pinctrl-3 = <&isp_prelight>; - pinctrl-4 = <&isp_flash_trigger_as_gpio>; - pinctrl-5 = <&isp_flash_trigger>; - rockchip,isp,mipiphy = <2>; - rockchip,isp,cifphy = <1>; - rockchip,isp,dsiphy,reg = <0xff968000 0x8000>; - rockchip,grf = <&grf>; - rockchip,cru = <&cru>; - rockchip,gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; - rockchip,isp,iommu-enable = <1>; - power-domains = <&power RK3399_PD_ISP0>; - status = "disabled"; - }; - - isp0_mmu { - dbgname = "isp0"; - compatible = "rockchip,isp0_mmu"; - reg = <0x0 0xff914000 0x0 0x100>, - <0x0 0xff915000 0x0 0x100>; - interrupts = ; - interrupt-names = "isp0_mmu"; - }; - - isp1: isp@ff920000 { - compatible = "rockchip,rk3399-isp", "rockchip,isp"; - reg = <0x0 0xff920000 0x0 0x10000>; - interrupts = ; - clocks = - <&cru ACLK_ISP1_NOC>, <&cru ACLK_ISP1_WRAPPER>, - <&cru HCLK_ISP1_NOC>, <&cru HCLK_ISP1_WRAPPER>, - <&cru SCLK_ISP1>, <&cru SCLK_CIF_OUT>, - <&cru SCLK_CIF_OUT>, <&cru SCLK_DPHY_TX1RX1_CFG>, - <&cru SCLK_MIPIDPHY_REF>, <&cru PCLK_ISP1_WRAPPER>, - <&cru SCLK_DPHY_RX0_CFG>, <&cru PCLK_MIPI_DSI1>, - <&cru SCLK_MIPIDPHY_CFG>; - clock-names = - "aclk_isp1_noc", "aclk_isp1_wrapper", - "hclk_isp1_noc", "hclk_isp1_wrapper", - "clk_isp1", "clk_cif_out", - "clk_cif_pll", "pclk_dphytxrx", - "pclk_dphy_ref", "pclk_isp1", - "pclk_dphyrx", "pclk_mipi_dsi", - "mipi_dphy_cfg"; - pinctrl-names = - "cif_clkout","isp_dvp8bit0", "isp_mipi_fl", - "isp_mipi_fl_prefl", "isp_flash_as_gpio", - "isp_flash_as_trigger_out"; - pinctrl-0 = <&cif_clkout>; - pinctrl-1 = <&isp_dvp_d0d7>; - pinctrl-2 = <&cif_clkout>; - pinctrl-3 = <&isp_prelight>; - pinctrl-4 = <&isp_flash_trigger_as_gpio>; - pinctrl-5 = <&isp_flash_trigger>; - rockchip,isp,mipiphy = <2>; - rockchip,isp,cifphy = <1>; - rockchip,isp,dsiphy,reg = <0xff968000 0x8000>; - rockchip,grf = <&grf>; - rockchip,cru = <&cru>; - rockchip,gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; - rockchip,isp,iommu-enable = <1>; - power-domains = <&power RK3399_PD_ISP1>; - status = "disabled"; - }; - - isp1_mmu { - dbgname = "isp1"; - compatible = "rockchip,isp1_mmu"; - reg = <0x0 0xff924000 0x0 0x100>, - <0x0 0xff925000 0x0 0x100>; - interrupts = ; - interrupt-names = "isp1_mmu"; - }; - - hdmi_rk_fb: hdmi-rk-fb@ff940000 { - status = "disabled"; - compatible = "rockchip,rk3399-hdmi"; - reg = <0x0 0xff940000 0x0 0x20000>; - interrupts = , - ; - clocks = <&cru PCLK_HDMI_CTRL>, - <&cru HCLK_HDCP>, - <&cru SCLK_HDMI_CEC>, - <&cru PLL_VPLL>, - <&cru SCLK_HDMI_SFR>; - clock-names = "pclk_hdmi", - "hdcp_clk_hdmi", - "cec_clk_hdmi", - "dclk_hdmi_phy", - "sclk_hdmi_sfr"; - resets = <&cru SRST_HDMI_CTRL>; - reset-names = "hdmi"; - pinctrl-names = "default", "gpio"; - pinctrl-0 = <&hdmi_i2c_xfer &hdmi_cec>; - pinctrl-1 = <&i2c3_gpio>; - rockchip,grf = <&grf>; - power-domains = <&power RK3399_PD_HDCP>; - }; - - mipi0_rk_fb: mipi-rk-fb@ff960000 { - compatible = "rockchip,rk3399-dsi"; - rockchip,prop = <0>; - rockchip,grf = <&grf>; - reg = <0x0 0xff960000 0x0 0x8000>; - interrupts = ; - clocks = <&cru SCLK_MIPIDPHY_REF>, <&cru PCLK_MIPI_DSI0>, <&cru SCLK_MIPIDPHY_CFG>; - clock-names = "clk_mipi_24m", "pclk_mipi_dsi", "mipi_dphy_cfg"; - power-domains = <&power RK3399_PD_VIO>; - status = "disabled"; - }; - - mipi1_rk_fb: mipi-rk-fb@ff968000 { - compatible = "rockchip,rk3399-dsi"; - rockchip,prop = <1>; - rockchip,grf = <&grf>; - reg = <0x0 0xff968000 0x0 0x8000>; - interrupts = ; - clocks = <&cru SCLK_MIPIDPHY_REF>, <&cru PCLK_MIPI_DSI1>, <&cru SCLK_MIPIDPHY_CFG>; - clock-names = "clk_mipi_24m", "pclk_mipi_dsi", "mipi_dphy_cfg"; - power-domains = <&power RK3399_PD_VIO>; - status = "disabled"; - }; - - edp_rk_fb: edp-rk-fb@ff970000 { - compatible = "rockchip,rk3399-edp-fb"; - reg = <0x0 0xff970000 0x0 0x8000>; - rockchip,grf = <&grf>; - interrupts = ; - clocks = <&cru PCLK_EDP>, <&cru PCLK_EDP_CTRL>, <&cru PCLK_VIO_GRF>; - clock-names = "clk_edp", "pclk_edp", "clk_grf"; - resets = <&cru SRST_P_EDP_CTRL>; - reset-names = "edp_apb"; - status = "disabled"; - power-domains = <&power RK3399_PD_EDP>; - }; -}; - -&vpu { - status = "okay"; - /delete-property/ iommus; - /* 0 means ion, 1 means drm */ - allocator = <0>; -}; - -&vpu_mmu { - dbgname = "vpu"; - compatible = "rockchip,vpu_mmu"; -}; - -&rkvdec { - status = "okay"; - /delete-property/ iommus; - /* 0 means ion, 1 means drm */ - allocator = <0>; -}; - -&vdec_mmu { - dbgname = "vdec"; - compatible = "rockchip,vdec_mmu"; -}; - -&pinctrl { - isp { - cif_clkout: cif-clkout { - rockchip,pins = - /*cif_clkout*/ - <2 11 RK_FUNC_3 &pcfg_pull_none>; - }; - - isp_dvp_d0d7: isp-dvp-d0d7 { - rockchip,pins = - /*cif_data0*/ - <2 0 RK_FUNC_3 &pcfg_pull_none>, - /*cif_data1*/ - <2 1 RK_FUNC_3 &pcfg_pull_none>, - /*cif_data2*/ - <2 2 RK_FUNC_3 &pcfg_pull_none>, - /*cif_data3*/ - <2 3 RK_FUNC_3 &pcfg_pull_none>, - /*cif_data4*/ - <2 4 RK_FUNC_3 &pcfg_pull_none>, - /*cif_data5*/ - <2 5 RK_FUNC_3 &pcfg_pull_none>, - /*cif_data6*/ - <2 6 RK_FUNC_3 &pcfg_pull_none>, - /*cif_data7*/ - <2 7 RK_FUNC_3 &pcfg_pull_none>, - /*cif_sync*/ - <2 8 RK_FUNC_3 &pcfg_pull_none>, - /*cif_href*/ - <2 9 RK_FUNC_3 &pcfg_pull_none>, - /*cif_clkin*/ - <2 10 RK_FUNC_3 &pcfg_pull_none>; - }; - - isp_shutter: isp-shutter { - rockchip,pins = - /*SHUTTEREN*/ - <1 1 RK_FUNC_1 &pcfg_pull_none>, - /*SHUTTERTRIG*/ - <1 0 RK_FUNC_1 &pcfg_pull_none>; - }; - - isp_flash_trigger: isp-flash-trigger { - /*ISP_FLASHTRIGOU*/ - rockchip,pins = <1 3 RK_FUNC_1 &pcfg_pull_none>; - }; - - isp_prelight: isp-prelight { - /*ISP_PRELIGHTTRIG*/ - rockchip,pins = <1 4 RK_FUNC_1 &pcfg_pull_none>; - }; - - isp_flash_trigger_as_gpio: isp_flash_trigger_as_gpio { - /*ISP_FLASHTRIGOU*/ - rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - cam_pins { - cam0_default_pins: cam0-default-pins { - rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>, - <2 11 RK_FUNC_3 &pcfg_pull_none>; - }; - cam0_sleep_pins: cam0-sleep-pins { - rockchip,pins = <4 27 RK_FUNC_3 &pcfg_pull_none>, - <2 11 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box-808-android-6.0.dts b/arch/arm64/boot/dts/rockchip/rk3399-box-808-android-6.0.dts new file mode 100644 index 000000000000..47cdb21c4d39 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-box-808-android-6.0.dts @@ -0,0 +1,791 @@ +/* + * 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 +#include +#include "rk3399.dtsi" +#include "rk3399-android-6.0.dtsi" + +/ { + model = "Rockchip RK3399 Box Board v1 (Android)"; + compatible = "rockchip,rk3399"; + + 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>; + }; + + vcc5v0_host: vcc5v0-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&host_vbus_drv>; + regulator-name = "vcc5v0_host"; + regulator-always-on; + }; + + vdd_center: vdd-center { + compatible = "pwm-regulator"; + pwms = <&pwm2 0 25000 0>; + regulator-name = "vdd_center"; + 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>; + }; + + clkin_gmac: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "clkin_gmac"; + #clock-cells = <0>; + }; + + spdif-sound { + status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,name = "ROCKCHIP,SPDIF"; + simple-audio-card,cpu { + sound-dai = <&spdif>; + }; + simple-audio-card,codec { + sound-dai = <&spdif_out>; + }; + }; + + spdif_out: spdif-out { + status = "okay"; + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + }; + + hdmi_sound: hdmi-sound { + status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,name = "rockchip,hdmi"; + simple-audio-card,cpu { + sound-dai = <&i2s2>; + }; + simple-audio-card,codec { + sound-dai = <&dw_hdmi_audio>; + }; + }; + + dw_hdmi_audio: dw-hdmi-audio { + status = "okay"; + compatible = "rockchip,dw-hdmi-audio"; + #sound-dai-cells = <0>; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; + + /* + * On the module itself this is one of these (depending + * on the actual card populated): + * - SDIO_RESET_L_WL_REG_ON + * - PDN (power down when low) + */ + reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + wireless-wlan { + compatible = "wlan-platdata"; + rockchip,grf = <&grf>; + wifi_chip_type = "ap6354"; + sdio_vref = <1800>; + WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + wireless-bluetooth { + compatible = "bluetooth-platdata"; + /* wifi-bt-power-toggle; */ + uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; + pinctrl-names = "default", "rts_gpio"; + pinctrl-0 = <&uart0_rts>; + pinctrl-1 = <&uart0_gpios>; + /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */ + BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; + BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; + BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; +}; + +&io_domains { + status = "okay"; + + bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */ + audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */ + sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */ + gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */ +}; + +&sdmmc { + clock-frequency = <150000000>; + clock-freq-min-max = <400000 150000000>; + supports-sd; + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + num-slots = <1>; + sd-uhs-sdr104; + vqmmc-supply = <&vcc_sd>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; + status = "okay"; +}; + +&sdio0 { + clock-frequency = <140000000>; + clock-freq-min-max = <200000 140000000>; + supports-sdio; + bus-width = <4>; + disable-wp; + cap-sd-highspeed; + cap-sdio-irq; + keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + num-slots = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; + sd-uhs-sdr104; + status = "okay"; +}; + +&emmc_phy { + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + mmc-hs400-1_8v; + supports-emmc; + non-removable; + mmc-hs400-enhanced-strobe; + status = "okay"; +}; + +&i2s0 { + status = "okay"; + rockchip,i2s-broken-burst-len; + rockchip,playback-channels = <8>; + rockchip,capture-channels = <8>; + #sound-dai-cells = <0>; +}; + +&i2s2 { + #sound-dai-cells = <0>; +}; + +&spdif { + pinctrl-0 = <&spdif_bus_1>; + status = "okay"; + #sound-dai-cells = <0>; +}; + +&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"; + 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; + regulator-initial-state = <3>; + vin-supply = <&vcc_sys>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_gpu: syr828@41 { + compatible = "silergy,syr828"; + reg = <0x41>; + regulator-compatible = "fan53555-reg"; + regulator-name = "vdd_gpu"; + regulator-min-microvolt = <735000>; + regulator-max-microvolt = <1400000>; + 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; + }; + }; + + rk808: pmic@1b { + compatible = "rockchip,rk808"; + reg = <0x1b>; + interrupt-parent = <&gpio1>; + interrupts = <21 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; + rockchip,system-power-controller; + wakeup-source; + #clock-cells = <1>; + clock-output-names = "xin32k", "rk808-clkout2"; + + vcc1-supply = <&vcc_sys>; + vcc2-supply = <&vcc_sys>; + vcc3-supply = <&vcc_sys>; + vcc4-supply = <&vcc_sys>; + vcc6-supply = <&vcc_sys>; + vcc7-supply = <&vcc_sys>; + vcc8-supply = <&vcc3v3_sys>; + vcc9-supply = <&vcc_sys>; + vcc10-supply = <&vcc_sys>; + vcc11-supply = <&vcc_sys>; + vcc12-supply = <&vcc3v3_sys>; + vddio-supply = <&vcc_1v8>; + + regulators { + vdd_log: DCDC_REG1 { + regulator-name = "vdd_log"; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vdd_cpu_l: DCDC_REG2 { + regulator-name = "vdd_cpu_l"; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + regulator-always-on; + regulator-boot-on; + 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-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc1v8_dvp: LDO_REG1 { + regulator-name = "vcc1v8_dvp"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc3v0_tp: LDO_REG2 { + regulator-name = "vcc3v0_tp"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc1v8_pll: LDO_REG3 { + regulator-name = "vcc1v8_pll"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc_sd: LDO_REG4 { + regulator-name = "vcc_sd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc3v0_sd: LDO_REG5 { + regulator-name = "vcc3v0_sd"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3000000>; + }; + }; + + vcc_1v5: LDO_REG6 { + regulator-name = "vcc_1v5"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1500000>; + }; + }; + + vcc_0v9a: LDO_REG7 { + regulator-name = "vcc_0v9a"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vcc_3v0: LDO_REG8 { + regulator-name = "vcc_3v0"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3000000>; + }; + }; + + vcc3v3_s3: SWITCH_REG1 { + regulator-name = "vcc3v3_s3"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc3v3_s0: SWITCH_REG2 { + regulator-name = "vcc3v3_s0"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + }; + }; +}; + +&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>; +}; + +&rga { + status = "okay"; +}; + +&tsadc { + /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-mode = <1>; + /* tshut polarity 0:LOW 1:HIGH */ + rockchip,hw-tshut-polarity = <1>; + status = "okay"; +}; + +&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>; + status = "okay"; +}; + +&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 { + dr_mode = "otg"; + status = "okay"; +}; + +&usbdrd3_1 { + status = "okay"; +}; + +&usbdrd_dwc3_1 { + dr_mode = "host"; + status = "okay"; +}; + +&pwm2 { + status = "okay"; +}; + +&pwm3 { + status = "disabled"; + + interrupts = ; + compatible = "rockchip,remotectl-pwm"; + remote_pwm_id = <3>; + handle_cpu_id = <0>; + + ir_key1 { + rockchip,usercode = <0x4040>; + rockchip,key_table = + <0xf2 KEY_REPLY>, + <0xba KEY_BACK>, + <0xf4 KEY_UP>, + <0xf1 KEY_DOWN>, + <0xef KEY_LEFT>, + <0xee KEY_RIGHT>, + <0xbd KEY_HOME>, + <0xea KEY_VOLUMEUP>, + <0xe3 KEY_VOLUMEDOWN>, + <0xe2 KEY_SEARCH>, + <0xb2 KEY_POWER>, + <0xbc KEY_MUTE>, + <0xec KEY_MENU>, + <0xbf 0x190>, + <0xe0 0x191>, + <0xe1 0x192>, + <0xe9 183>, + <0xe6 248>, + <0xe8 185>, + <0xe7 186>, + <0xf0 388>, + <0xbe 0x175>; + }; + + ir_key2 { + rockchip,usercode = <0xff00>; + rockchip,key_table = + <0xf9 KEY_HOME>, + <0xbf KEY_BACK>, + <0xfb KEY_MENU>, + <0xaa KEY_REPLY>, + <0xb9 KEY_UP>, + <0xe9 KEY_DOWN>, + <0xb8 KEY_LEFT>, + <0xea KEY_RIGHT>, + <0xeb KEY_VOLUMEDOWN>, + <0xef KEY_VOLUMEUP>, + <0xf7 KEY_MUTE>, + <0xe7 KEY_POWER>, + <0xfc KEY_POWER>, + <0xa9 KEY_VOLUMEDOWN>, + <0xa8 KEY_VOLUMEDOWN>, + <0xe0 KEY_VOLUMEDOWN>, + <0xa5 KEY_VOLUMEDOWN>, + <0xab 183>, + <0xb7 388>, + <0xf8 184>, + <0xaf 185>, + <0xed KEY_VOLUMEDOWN>, + <0xee 186>, + <0xb3 KEY_VOLUMEDOWN>, + <0xf1 KEY_VOLUMEDOWN>, + <0xf2 KEY_VOLUMEDOWN>, + <0xf3 KEY_SEARCH>, + <0xb4 KEY_VOLUMEDOWN>, + <0xbe KEY_SEARCH>; + }; + + ir_key3 { + rockchip,usercode = <0x1dcc>; + rockchip,key_table = + <0xee KEY_REPLY>, + <0xf0 KEY_BACK>, + <0xf8 KEY_UP>, + <0xbb KEY_DOWN>, + <0xef KEY_LEFT>, + <0xed KEY_RIGHT>, + <0xfc KEY_HOME>, + <0xf1 KEY_VOLUMEUP>, + <0xfd KEY_VOLUMEDOWN>, + <0xb7 KEY_SEARCH>, + <0xff KEY_POWER>, + <0xf3 KEY_MUTE>, + <0xbf KEY_MENU>, + <0xf9 0x191>, + <0xf5 0x192>, + <0xb3 388>, + <0xbe KEY_1>, + <0xba KEY_2>, + <0xb2 KEY_3>, + <0xbd KEY_4>, + <0xf9 KEY_5>, + <0xb1 KEY_6>, + <0xfc KEY_7>, + <0xf8 KEY_8>, + <0xb0 KEY_9>, + <0xb6 KEY_0>, + <0xb5 KEY_BACKSPACE>; + }; +}; + +&gmac { + phy-supply = <&vcc_phy>; + phy-mode = "rgmii"; + clock_in_out = "input"; + snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 10000 50000>; + assigned-clocks = <&cru SCLK_RMII_SRC>; + assigned-clock-parents = <&clkin_gmac>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + tx_delay = <0x28>; + rx_delay = <0x11>; + status = "okay"; +}; + +&saradc { + status = "okay"; +}; + +&pinctrl { + sdio-pwrseq { + wifi_enable_h: wifi-enable-h { + rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + wireless-bluetooth { + uart0_gpios: uart0-gpios { + rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = + <1 21 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb2 { + host_vbus_drv: host-vbus-drv { + rockchip,pins = + <4 25 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&rk_screen { + #include +}; + +&vopb_rk_fb { + status = "okay"; +}; + +&fb { + rockchip,disp-mode = ; + rockchip,disp-policy = ; +}; + +&hdmi_rk_fb { + status = "okay"; + rockchip,hdmi_video_source = ; +}; + +&i2s2 { + status = "okay"; +}; + +&pmu_io_domains { + status = "okay"; + pmu1830-supply = <&vcc_1v8>; +}; + diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box-808-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-box-808-android.dts deleted file mode 100644 index dc5644e85a6f..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-box-808-android.dts +++ /dev/null @@ -1,791 +0,0 @@ -/* - * 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 -#include -#include "rk3399.dtsi" -#include "rk3399-android.dtsi" - -/ { - model = "Rockchip RK3399 Box Board v1 (Android)"; - compatible = "rockchip,rk3399"; - - 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>; - }; - - vcc5v0_host: vcc5v0-host-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&host_vbus_drv>; - regulator-name = "vcc5v0_host"; - regulator-always-on; - }; - - vdd_center: vdd-center { - compatible = "pwm-regulator"; - pwms = <&pwm2 0 25000 0>; - regulator-name = "vdd_center"; - 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>; - }; - - clkin_gmac: external-gmac-clock { - compatible = "fixed-clock"; - clock-frequency = <125000000>; - clock-output-names = "clkin_gmac"; - #clock-cells = <0>; - }; - - spdif-sound { - status = "okay"; - compatible = "simple-audio-card"; - simple-audio-card,name = "ROCKCHIP,SPDIF"; - simple-audio-card,cpu { - sound-dai = <&spdif>; - }; - simple-audio-card,codec { - sound-dai = <&spdif_out>; - }; - }; - - spdif_out: spdif-out { - status = "okay"; - compatible = "linux,spdif-dit"; - #sound-dai-cells = <0>; - }; - - hdmi_sound: hdmi-sound { - status = "okay"; - compatible = "simple-audio-card"; - simple-audio-card,format = "i2s"; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,name = "rockchip,hdmi"; - simple-audio-card,cpu { - sound-dai = <&i2s2>; - }; - simple-audio-card,codec { - sound-dai = <&dw_hdmi_audio>; - }; - }; - - dw_hdmi_audio: dw-hdmi-audio { - status = "okay"; - compatible = "rockchip,dw-hdmi-audio"; - #sound-dai-cells = <0>; - }; - - sdio_pwrseq: sdio-pwrseq { - compatible = "mmc-pwrseq-simple"; - clocks = <&rk808 1>; - clock-names = "ext_clock"; - pinctrl-names = "default"; - pinctrl-0 = <&wifi_enable_h>; - - /* - * On the module itself this is one of these (depending - * on the actual card populated): - * - SDIO_RESET_L_WL_REG_ON - * - PDN (power down when low) - */ - reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - }; - - wireless-wlan { - compatible = "wlan-platdata"; - rockchip,grf = <&grf>; - wifi_chip_type = "ap6354"; - sdio_vref = <1800>; - WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; - - wireless-bluetooth { - compatible = "bluetooth-platdata"; - /* wifi-bt-power-toggle; */ - uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; - pinctrl-names = "default", "rts_gpio"; - pinctrl-0 = <&uart0_rts>; - pinctrl-1 = <&uart0_gpios>; - /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */ - BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; - BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; - BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; -}; - -&io_domains { - status = "okay"; - - bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */ - audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */ - sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */ - gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */ -}; - -&sdmmc { - clock-frequency = <150000000>; - clock-freq-min-max = <400000 150000000>; - supports-sd; - bus-width = <4>; - cap-mmc-highspeed; - cap-sd-highspeed; - disable-wp; - num-slots = <1>; - sd-uhs-sdr104; - vqmmc-supply = <&vcc_sd>; - pinctrl-names = "default"; - pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; - status = "okay"; -}; - -&sdio0 { - clock-frequency = <140000000>; - clock-freq-min-max = <200000 140000000>; - supports-sdio; - bus-width = <4>; - disable-wp; - cap-sd-highspeed; - cap-sdio-irq; - keep-power-in-suspend; - mmc-pwrseq = <&sdio_pwrseq>; - non-removable; - num-slots = <1>; - pinctrl-names = "default"; - pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; - sd-uhs-sdr104; - status = "okay"; -}; - -&emmc_phy { - status = "okay"; -}; - -&sdhci { - bus-width = <8>; - mmc-hs400-1_8v; - supports-emmc; - non-removable; - mmc-hs400-enhanced-strobe; - status = "okay"; -}; - -&i2s0 { - status = "okay"; - rockchip,i2s-broken-burst-len; - rockchip,playback-channels = <8>; - rockchip,capture-channels = <8>; - #sound-dai-cells = <0>; -}; - -&i2s2 { - #sound-dai-cells = <0>; -}; - -&spdif { - pinctrl-0 = <&spdif_bus_1>; - status = "okay"; - #sound-dai-cells = <0>; -}; - -&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"; - 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; - regulator-initial-state = <3>; - vin-supply = <&vcc_sys>; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdd_gpu: syr828@41 { - compatible = "silergy,syr828"; - reg = <0x41>; - regulator-compatible = "fan53555-reg"; - regulator-name = "vdd_gpu"; - regulator-min-microvolt = <735000>; - regulator-max-microvolt = <1400000>; - 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; - }; - }; - - rk808: pmic@1b { - compatible = "rockchip,rk808"; - reg = <0x1b>; - interrupt-parent = <&gpio1>; - interrupts = <21 IRQ_TYPE_LEVEL_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int_l>; - rockchip,system-power-controller; - wakeup-source; - #clock-cells = <1>; - clock-output-names = "xin32k", "rk808-clkout2"; - - vcc1-supply = <&vcc_sys>; - vcc2-supply = <&vcc_sys>; - vcc3-supply = <&vcc_sys>; - vcc4-supply = <&vcc_sys>; - vcc6-supply = <&vcc_sys>; - vcc7-supply = <&vcc_sys>; - vcc8-supply = <&vcc3v3_sys>; - vcc9-supply = <&vcc_sys>; - vcc10-supply = <&vcc_sys>; - vcc11-supply = <&vcc_sys>; - vcc12-supply = <&vcc3v3_sys>; - vddio-supply = <&vcc_1v8>; - - regulators { - vdd_log: DCDC_REG1 { - regulator-name = "vdd_log"; - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <900000>; - }; - }; - - vdd_cpu_l: DCDC_REG2 { - regulator-name = "vdd_cpu_l"; - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - 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-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc1v8_dvp: LDO_REG1 { - regulator-name = "vcc1v8_dvp"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc3v0_tp: LDO_REG2 { - regulator-name = "vcc3v0_tp"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc1v8_pll: LDO_REG3 { - regulator-name = "vcc1v8_pll"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc_sd: LDO_REG4 { - regulator-name = "vcc_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc3v0_sd: LDO_REG5 { - regulator-name = "vcc3v0_sd"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc_1v5: LDO_REG6 { - regulator-name = "vcc_1v5"; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1500000>; - }; - }; - - vcc_0v9a: LDO_REG7 { - regulator-name = "vcc_0v9a"; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <900000>; - }; - }; - - vcc_3v0: LDO_REG8 { - regulator-name = "vcc_3v0"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc3v3_s3: SWITCH_REG1 { - regulator-name = "vcc3v3_s3"; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vcc3v3_s0: SWITCH_REG2 { - regulator-name = "vcc3v3_s0"; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - }; - }; -}; - -&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>; -}; - -&rga { - status = "okay"; -}; - -&tsadc { - /* tshut mode 0:CRU 1:GPIO */ - rockchip,hw-tshut-mode = <1>; - /* tshut polarity 0:LOW 1:HIGH */ - rockchip,hw-tshut-polarity = <1>; - status = "okay"; -}; - -&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>; - status = "okay"; -}; - -&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 { - dr_mode = "otg"; - status = "okay"; -}; - -&usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - dr_mode = "host"; - status = "okay"; -}; - -&pwm2 { - status = "okay"; -}; - -&pwm3 { - status = "disabled"; - - interrupts = ; - compatible = "rockchip,remotectl-pwm"; - remote_pwm_id = <3>; - handle_cpu_id = <0>; - - ir_key1 { - rockchip,usercode = <0x4040>; - rockchip,key_table = - <0xf2 KEY_REPLY>, - <0xba KEY_BACK>, - <0xf4 KEY_UP>, - <0xf1 KEY_DOWN>, - <0xef KEY_LEFT>, - <0xee KEY_RIGHT>, - <0xbd KEY_HOME>, - <0xea KEY_VOLUMEUP>, - <0xe3 KEY_VOLUMEDOWN>, - <0xe2 KEY_SEARCH>, - <0xb2 KEY_POWER>, - <0xbc KEY_MUTE>, - <0xec KEY_MENU>, - <0xbf 0x190>, - <0xe0 0x191>, - <0xe1 0x192>, - <0xe9 183>, - <0xe6 248>, - <0xe8 185>, - <0xe7 186>, - <0xf0 388>, - <0xbe 0x175>; - }; - - ir_key2 { - rockchip,usercode = <0xff00>; - rockchip,key_table = - <0xf9 KEY_HOME>, - <0xbf KEY_BACK>, - <0xfb KEY_MENU>, - <0xaa KEY_REPLY>, - <0xb9 KEY_UP>, - <0xe9 KEY_DOWN>, - <0xb8 KEY_LEFT>, - <0xea KEY_RIGHT>, - <0xeb KEY_VOLUMEDOWN>, - <0xef KEY_VOLUMEUP>, - <0xf7 KEY_MUTE>, - <0xe7 KEY_POWER>, - <0xfc KEY_POWER>, - <0xa9 KEY_VOLUMEDOWN>, - <0xa8 KEY_VOLUMEDOWN>, - <0xe0 KEY_VOLUMEDOWN>, - <0xa5 KEY_VOLUMEDOWN>, - <0xab 183>, - <0xb7 388>, - <0xf8 184>, - <0xaf 185>, - <0xed KEY_VOLUMEDOWN>, - <0xee 186>, - <0xb3 KEY_VOLUMEDOWN>, - <0xf1 KEY_VOLUMEDOWN>, - <0xf2 KEY_VOLUMEDOWN>, - <0xf3 KEY_SEARCH>, - <0xb4 KEY_VOLUMEDOWN>, - <0xbe KEY_SEARCH>; - }; - - ir_key3 { - rockchip,usercode = <0x1dcc>; - rockchip,key_table = - <0xee KEY_REPLY>, - <0xf0 KEY_BACK>, - <0xf8 KEY_UP>, - <0xbb KEY_DOWN>, - <0xef KEY_LEFT>, - <0xed KEY_RIGHT>, - <0xfc KEY_HOME>, - <0xf1 KEY_VOLUMEUP>, - <0xfd KEY_VOLUMEDOWN>, - <0xb7 KEY_SEARCH>, - <0xff KEY_POWER>, - <0xf3 KEY_MUTE>, - <0xbf KEY_MENU>, - <0xf9 0x191>, - <0xf5 0x192>, - <0xb3 388>, - <0xbe KEY_1>, - <0xba KEY_2>, - <0xb2 KEY_3>, - <0xbd KEY_4>, - <0xf9 KEY_5>, - <0xb1 KEY_6>, - <0xfc KEY_7>, - <0xf8 KEY_8>, - <0xb0 KEY_9>, - <0xb6 KEY_0>, - <0xb5 KEY_BACKSPACE>; - }; -}; - -&gmac { - phy-supply = <&vcc_phy>; - phy-mode = "rgmii"; - clock_in_out = "input"; - snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>; - snps,reset-active-low; - snps,reset-delays-us = <0 10000 50000>; - assigned-clocks = <&cru SCLK_RMII_SRC>; - assigned-clock-parents = <&clkin_gmac>; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii_pins>; - tx_delay = <0x28>; - rx_delay = <0x11>; - status = "okay"; -}; - -&saradc { - status = "okay"; -}; - -&pinctrl { - sdio-pwrseq { - wifi_enable_h: wifi-enable-h { - rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - wireless-bluetooth { - uart0_gpios: uart0-gpios { - rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - pmic_int_l: pmic-int-l { - rockchip,pins = - <1 21 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - usb2 { - host_vbus_drv: host-vbus-drv { - rockchip,pins = - <4 25 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; -}; - -&rk_screen { - #include -}; - -&vopb_rk_fb { - status = "okay"; -}; - -&fb { - rockchip,disp-mode = ; - rockchip,disp-policy = ; -}; - -&hdmi_rk_fb { - status = "okay"; - rockchip,hdmi_video_source = ; -}; - -&i2s2 { - status = "okay"; -}; - -&pmu_io_domains { - status = "okay"; - pmu1830-supply = <&vcc_1v8>; -}; - diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box-android-6.0.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-box-android-6.0.dtsi new file mode 100644 index 000000000000..caabb097cacb --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-box-android-6.0.dtsi @@ -0,0 +1,902 @@ +/* + * 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. + */ +#include +#include +#include "rk3399.dtsi" +#include "rk3399-android-6.0.dtsi" +#include "rk3399-opp.dtsi" + +/ { + compatible = "rockchip,rk3399-box","rockchip,rk3399"; + + 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>; + }; + + vcc5v0_host: vcc5v0-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&host_vbus_drv>; + regulator-name = "vcc5v0_host"; + regulator-always-on; + }; + + vdd_log: vdd-log { + compatible = "pwm-regulator"; + pwms = <&pwm2 0 25000 0>; + 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>; + }; + + clkin_gmac: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "clkin_gmac"; + #clock-cells = <0>; + }; + + spdif-sound { + status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,name = "ROCKCHIP,SPDIF"; + simple-audio-card,cpu { + sound-dai = <&spdif>; + }; + simple-audio-card,codec { + sound-dai = <&spdif_out>; + }; + }; + + spdif_out: spdif-out { + status = "okay"; + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + }; + + hdmi_sound: hdmi-sound { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,name = "rockchip,hdmi"; + simple-audio-card,cpu { + sound-dai = <&i2s2>; + }; + simple-audio-card,codec { + sound-dai = <&dw_hdmi_audio>; + }; + }; + + dw_hdmi_audio: dw-hdmi-audio { + status = "okay"; + compatible = "rockchip,dw-hdmi-audio"; + #sound-dai-cells = <0>; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; + + /* + * On the module itself this is one of these (depending + * on the actual card populated): + * - SDIO_RESET_L_WL_REG_ON + * - PDN (power down when low) + */ + reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + wireless-wlan { + compatible = "wlan-platdata"; + rockchip,grf = <&grf>; + wifi_chip_type = "ap6354"; + sdio_vref = <1800>; + WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + wireless-bluetooth { + compatible = "bluetooth-platdata"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + /* wifi-bt-power-toggle; */ + uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; + pinctrl-names = "default", "rts_gpio"; + pinctrl-0 = <&uart0_rts>; + pinctrl-1 = <&uart0_gpios>; + /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */ + BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; + BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; + BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + test-power { + status = "okay"; + }; +}; + +&sdmmc { + clock-frequency = <100000000>; + clock-freq-min-max = <100000 100000000>; + supports-sd; + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + num-slots = <1>; + //sd-uhs-sdr104; + vqmmc-supply = <&vcc_sd>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; + card-detect-delay = <800>; + status = "okay"; +}; + +&sdio0 { + clock-frequency = <100000000>; + clock-freq-min-max = <200000 100000000>; + supports-sdio; + bus-width = <4>; + disable-wp; + cap-sd-highspeed; + cap-sdio-irq; + keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + num-slots = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; + sd-uhs-sdr104; + status = "okay"; +}; + +&emmc_phy { + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + mmc-hs400-1_8v; + supports-emmc; + non-removable; + mmc-hs400-enhanced-strobe; + status = "okay"; +}; + +&i2s0 { + status = "okay"; + rockchip,i2s-broken-burst-len; + rockchip,playback-channels = <8>; + rockchip,capture-channels = <8>; + #sound-dai-cells = <0>; +}; + +&i2s2 { + #sound-dai-cells = <0>; +}; + +&spdif { + pinctrl-0 = <&spdif_bus_1>; + status = "okay"; + #sound-dai-cells = <0>; +}; + +&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-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-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; + }; + }; + + rk808: pmic@1b { + compatible = "rockchip,rk808"; + reg = <0x1b>; + interrupt-parent = <&gpio1>; + interrupts = <21 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; + rockchip,system-power-controller; + wakeup-source; + #clock-cells = <1>; + clock-output-names = "xin32k", "rk808-clkout2"; + + vcc1-supply = <&vcc_sys>; + vcc2-supply = <&vcc_sys>; + vcc3-supply = <&vcc_sys>; + vcc4-supply = <&vcc_sys>; + vcc6-supply = <&vcc_sys>; + vcc7-supply = <&vcc_sys>; + vcc8-supply = <&vcc3v3_sys>; + vcc9-supply = <&vcc_sys>; + vcc10-supply = <&vcc_sys>; + vcc11-supply = <&vcc_sys>; + vcc12-supply = <&vcc3v3_sys>; + vddio-supply = <&vcc_1v8>; + + regulators { + vdd_center: DCDC_REG1 { + regulator-name = "vdd_center"; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_cpu_l: DCDC_REG2 { + regulator-name = "vdd_cpu_l"; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + regulator-always-on; + regulator-boot-on; + 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-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc1v8_dvp: LDO_REG1 { + regulator-name = "vcc1v8_dvp"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcca1v8_hdmi: LDO_REG2 { + regulator-name = "vcca1v8_hdmi"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcca_1v8: LDO_REG3 { + regulator-name = "vcca_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc_sd: LDO_REG4 { + regulator-name = "vcc_sd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc3v0_sd: LDO_REG5 { + regulator-name = "vcc3v0_sd"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3000000>; + }; + }; + + vcc_1v5: LDO_REG6 { + regulator-name = "vcc_1v5"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1500000>; + }; + }; + + vcca0v9_hdmi: LDO_REG7 { + regulator-name = "vcca0v9_hdmi"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vcc_3v0: LDO_REG8 { + regulator-name = "vcc_3v0"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3000000>; + }; + }; + + vcc3v3_s3: SWITCH_REG1 { + regulator-name = "vcc3v3_s3"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc3v3_s0: SWITCH_REG2 { + regulator-name = "vcc3v3_s0"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + }; + }; +}; + +&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>; +}; + +&rga { + status = "okay"; +}; + +&threshold { + temperature = <85000>; +}; + +&target { + temperature = <100000>; +}; + +&soc_crit { + temperature = <105000>; +}; + +&tcphy0 { + extcon = <&fusb0>; + status = "okay"; +}; + +&tcphy1 { + status = "okay"; +}; + +&tsadc { + /* 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>; + status = "okay"; +}; + +&u2phy0 { + status = "okay"; + extcon = <&fusb0>; + + 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>; + status = "okay"; +}; + +&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 { + extcon = <&fusb0>; + status = "okay"; +}; + +&usbdrd_dwc3_0 { + dr_mode = "otg"; + status = "okay"; +}; + +&usbdrd3_1 { + status = "okay"; +}; + +&usbdrd_dwc3_1 { + dr_mode = "host"; + status = "okay"; +}; + +&pwm2 { + status = "okay"; +}; + +&pwm3 { + status = "okay"; + + interrupts = ; + compatible = "rockchip,remotectl-pwm"; + remote_pwm_id = <3>; + handle_cpu_id = <0>; + + ir_key1 { + rockchip,usercode = <0x4040>; + rockchip,key_table = + <0xf2 KEY_REPLY>, + <0xba KEY_BACK>, + <0xf4 KEY_UP>, + <0xf1 KEY_DOWN>, + <0xef KEY_LEFT>, + <0xee KEY_RIGHT>, + <0xbd KEY_HOME>, + <0xea KEY_VOLUMEUP>, + <0xe3 KEY_VOLUMEDOWN>, + <0xe2 KEY_SEARCH>, + <0xb2 KEY_POWER>, + <0xbc KEY_MUTE>, + <0xec KEY_MENU>, + <0xbf 0x190>, + <0xe0 0x191>, + <0xe1 0x192>, + <0xe9 183>, + <0xe6 248>, + <0xe8 185>, + <0xe7 186>, + <0xf0 388>, + <0xbe 0x175>; + }; + + ir_key2 { + rockchip,usercode = <0xff00>; + rockchip,key_table = + <0xf9 KEY_HOME>, + <0xbf KEY_BACK>, + <0xfb KEY_MENU>, + <0xaa KEY_REPLY>, + <0xb9 KEY_UP>, + <0xe9 KEY_DOWN>, + <0xb8 KEY_LEFT>, + <0xea KEY_RIGHT>, + <0xeb KEY_VOLUMEDOWN>, + <0xef KEY_VOLUMEUP>, + <0xf7 KEY_MUTE>, + <0xe7 KEY_POWER>, + <0xfc KEY_POWER>, + <0xa9 KEY_VOLUMEDOWN>, + <0xa8 KEY_VOLUMEDOWN>, + <0xe0 KEY_VOLUMEDOWN>, + <0xa5 KEY_VOLUMEDOWN>, + <0xab 183>, + <0xb7 388>, + <0xe8 388>, + <0xf8 184>, + <0xaf 185>, + <0xed KEY_VOLUMEDOWN>, + <0xee 186>, + <0xb3 KEY_VOLUMEDOWN>, + <0xf1 KEY_VOLUMEDOWN>, + <0xf2 KEY_VOLUMEDOWN>, + <0xf3 KEY_SEARCH>, + <0xb4 KEY_VOLUMEDOWN>, + <0xbe KEY_SEARCH>; + }; + + ir_key3 { + rockchip,usercode = <0x1dcc>; + rockchip,key_table = + <0xee KEY_REPLY>, + <0xf0 KEY_BACK>, + <0xf8 KEY_UP>, + <0xbb KEY_DOWN>, + <0xef KEY_LEFT>, + <0xed KEY_RIGHT>, + <0xfc KEY_HOME>, + <0xf1 KEY_VOLUMEUP>, + <0xfd KEY_VOLUMEDOWN>, + <0xb7 KEY_SEARCH>, + <0xff KEY_POWER>, + <0xf3 KEY_MUTE>, + <0xbf KEY_MENU>, + <0xf9 0x191>, + <0xf5 0x192>, + <0xb3 388>, + <0xbe KEY_1>, + <0xba KEY_2>, + <0xb2 KEY_3>, + <0xbd KEY_4>, + <0xf9 KEY_5>, + <0xb1 KEY_6>, + <0xfc KEY_7>, + <0xf8 KEY_8>, + <0xb0 KEY_9>, + <0xb6 KEY_0>, + <0xb5 KEY_BACKSPACE>; + }; +}; + +&gmac { + phy-supply = <&vcc_phy>; + phy-mode = "rgmii"; + clock_in_out = "input"; + snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 10000 50000>; + assigned-clocks = <&cru SCLK_RMII_SRC>; + assigned-clock-parents = <&clkin_gmac>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&rgmii_pins>; + pinctrl-1 = <&rgmii_sleep_pins>; + tx_delay = <0x28>; + rx_delay = <0x11>; + status = "okay"; +}; + +&saradc { + status = "okay"; +}; + +&rk_screen { + #include +}; + +&disp_timings { + native-mode = <&timing1>; /* 1080p */ +}; + +&vopb_rk_fb { + status = "okay"; +}; + +&vopl_rk_fb { + status = "okay"; +}; + +&fb { + rockchip,disp-policy = ; +}; + +&hdmi_rk_fb { + status = "okay"; + rockchip,hdmi_video_source = ; + rockchip,phy_table = + <165000000 0 0 17 18 18 18>, + <340000000 0 2 17 14 14 14>, + <594000000 0 2 17 9 9 9>; +}; + +&cdn_dp_sound { + status = "okay"; +}; + +&cdn_dp_fb { + status = "okay"; + extcon = <&fusb0>; + phys = <&tcphy0_dp>; + dp_vop_sel = ; +}; + +&i2s2 { + status = "okay"; +}; + +&io_domains { + status = "okay"; + + bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */ + audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */ + sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */ + gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */ +}; + +&pinctrl { + sdio-pwrseq { + wifi_enable_h: wifi-enable-h { + rockchip,pins = + <0 10 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + wireless-bluetooth { + uart0_gpios: uart0-gpios { + rockchip,pins = + <2 19 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + usb2 { + host_vbus_drv: host-vbus-drv { + rockchip,pins = + <4 25 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = + <1 21 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>; + }; + }; + + gmac { + rgmii_sleep_pins: rgmii-sleep-pins { + rockchip,pins = + <3 15 RK_FUNC_GPIO &pcfg_output_low>; + }; + }; +}; + +&pvtm { + status = "okay"; +}; + +&pmu_pvtm { + status = "okay"; +}; + +&pmu_io_domains { + status = "okay"; + pmu1830-supply = <&vcc_1v8>; +}; + +&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>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box-rev1-android-6.0.dts b/arch/arm64/boot/dts/rockchip/rk3399-box-rev1-android-6.0.dts new file mode 100644 index 000000000000..89f53d059eb1 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-box-rev1-android-6.0.dts @@ -0,0 +1,121 @@ +/* + * 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 "rk3399-box-android-6.0.dtsi" + +/ { + model = "Rockchip RK3399 Board rev1 (BOX)"; + compatible = "rockchip-box-rev1","rockchip,rk3399-box"; +}; + +&pinctrl { + sdio0 { + sdio0_bus1: sdio0-bus1 { + rockchip,pins = + <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>; + }; + + sdio0_bus4: sdio0-bus4 { + rockchip,pins = + <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>, + <2 21 RK_FUNC_1 &pcfg_pull_up_20ma>, + <2 22 RK_FUNC_1 &pcfg_pull_up_20ma>, + <2 23 RK_FUNC_1 &pcfg_pull_up_20ma>; + }; + + sdio0_cmd: sdio0-cmd { + rockchip,pins = + <2 24 RK_FUNC_1 &pcfg_pull_up_20ma>; + }; + + sdio0_clk: sdio0-clk { + rockchip,pins = + <2 25 RK_FUNC_1 &pcfg_pull_none_20ma>; + }; + }; + + sdmmc { + sdmmc_bus1: sdmmc-bus1 { + rockchip,pins = + <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>; + }; + + sdmmc_bus4: sdmmc-bus4 { + rockchip,pins = + <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>, + <4 9 RK_FUNC_1 &pcfg_pull_up_8ma>, + <4 10 RK_FUNC_1 &pcfg_pull_up_8ma>, + <4 11 RK_FUNC_1 &pcfg_pull_up_8ma>; + }; + + sdmmc_clk: sdmmc-clk { + rockchip,pins = + <4 12 RK_FUNC_1 &pcfg_pull_none_18ma>; + }; + + sdmmc_cmd: sdmmc-cmd { + rockchip,pins = + <4 13 RK_FUNC_1 &pcfg_pull_up_8ma>; + }; + }; + + fusb30x { + fusb0_int: fusb0-int { + rockchip,pins = + <1 2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&i2c4 { + status = "okay"; + fusb0: fusb30x@22 { + compatible = "fairchild,fusb302"; + reg = <0x22>; + pinctrl-names = "default"; + pinctrl-0 = <&fusb0_int>; + vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; + int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box-rev1-disvr.dts b/arch/arm64/boot/dts/rockchip/rk3399-box-rev1-disvr.dts index 02fb90e87817..e98d091827e0 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-box-rev1-disvr.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-box-rev1-disvr.dts @@ -41,7 +41,7 @@ */ /dts-v1/; -#include "rk3399-box.dtsi" +#include "rk3399-box-android-6.0.dtsi" / { model = "Rockchip RK3399 Board rev1 (BOX)"; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box-rev1.dts b/arch/arm64/boot/dts/rockchip/rk3399-box-rev1.dts deleted file mode 100644 index 60b2e9fe5c20..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-box-rev1.dts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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 "rk3399-box.dtsi" - -/ { - model = "Rockchip RK3399 Board rev1 (BOX)"; - compatible = "rockchip-box-rev1","rockchip,rk3399-box"; -}; - -&pinctrl { - sdio0 { - sdio0_bus1: sdio0-bus1 { - rockchip,pins = - <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>; - }; - - sdio0_bus4: sdio0-bus4 { - rockchip,pins = - <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>, - <2 21 RK_FUNC_1 &pcfg_pull_up_20ma>, - <2 22 RK_FUNC_1 &pcfg_pull_up_20ma>, - <2 23 RK_FUNC_1 &pcfg_pull_up_20ma>; - }; - - sdio0_cmd: sdio0-cmd { - rockchip,pins = - <2 24 RK_FUNC_1 &pcfg_pull_up_20ma>; - }; - - sdio0_clk: sdio0-clk { - rockchip,pins = - <2 25 RK_FUNC_1 &pcfg_pull_none_20ma>; - }; - }; - - sdmmc { - sdmmc_bus1: sdmmc-bus1 { - rockchip,pins = - <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>; - }; - - sdmmc_bus4: sdmmc-bus4 { - rockchip,pins = - <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>, - <4 9 RK_FUNC_1 &pcfg_pull_up_8ma>, - <4 10 RK_FUNC_1 &pcfg_pull_up_8ma>, - <4 11 RK_FUNC_1 &pcfg_pull_up_8ma>; - }; - - sdmmc_clk: sdmmc-clk { - rockchip,pins = - <4 12 RK_FUNC_1 &pcfg_pull_none_18ma>; - }; - - sdmmc_cmd: sdmmc-cmd { - rockchip,pins = - <4 13 RK_FUNC_1 &pcfg_pull_up_8ma>; - }; - }; - - fusb30x { - fusb0_int: fusb0-int { - rockchip,pins = - <1 2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; - -&i2c4 { - status = "okay"; - fusb0: fusb30x@22 { - compatible = "fairchild,fusb302"; - reg = <0x22>; - pinctrl-names = "default"; - pinctrl-0 = <&fusb0_int>; - vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; - int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box-rev2-android-6.0.dts b/arch/arm64/boot/dts/rockchip/rk3399-box-rev2-android-6.0.dts new file mode 100644 index 000000000000..b57536d949a3 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-box-rev2-android-6.0.dts @@ -0,0 +1,139 @@ +/* + * 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 "rk3399-box-android-6.0.dtsi" + +/ { + model = "Rockchip RK3399 Board rev2 (BOX)"; + compatible = "rockchip-box-rev2","rockchip,rk3399-box"; +}; + +&pinctrl { + sdio0 { + sdio0_bus1: sdio0-bus1 { + rockchip,pins = + <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>; + }; + + sdio0_bus4: sdio0-bus4 { + rockchip,pins = + <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>, + <2 21 RK_FUNC_1 &pcfg_pull_up_20ma>, + <2 22 RK_FUNC_1 &pcfg_pull_up_20ma>, + <2 23 RK_FUNC_1 &pcfg_pull_up_20ma>; + }; + + sdio0_cmd: sdio0-cmd { + rockchip,pins = + <2 24 RK_FUNC_1 &pcfg_pull_up_20ma>; + }; + + sdio0_clk: sdio0-clk { + rockchip,pins = + <2 25 RK_FUNC_1 &pcfg_pull_none_20ma>; + }; + }; + + sdmmc { + sdmmc_bus1: sdmmc-bus1 { + rockchip,pins = + <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>; + }; + + sdmmc_bus4: sdmmc-bus4 { + rockchip,pins = + <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>, + <4 9 RK_FUNC_1 &pcfg_pull_up_8ma>, + <4 10 RK_FUNC_1 &pcfg_pull_up_8ma>, + <4 11 RK_FUNC_1 &pcfg_pull_up_8ma>; + }; + + sdmmc_clk: sdmmc-clk { + rockchip,pins = + <4 12 RK_FUNC_1 &pcfg_pull_none_18ma>; + }; + + sdmmc_cmd: sdmmc-cmd { + rockchip,pins = + <4 13 RK_FUNC_1 &pcfg_pull_up_8ma>; + }; + }; + + fusb30x { + fusb0_int: fusb0-int { + rockchip,pins = + <1 2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + pmic { + vsel1_gpio: vsel1-gpio { + rockchip,pins = + <1 18 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&i2c4 { + status = "okay"; + fusb0: fusb30x@22 { + compatible = "fairchild,fusb302"; + reg = <0x22>; + pinctrl-names = "default"; + pinctrl-0 = <&fusb0_int>; + vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; + int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; +}; + +&vdd_cpu_b { + vsel-gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>; + fcs,suspend-voltage-selector = <0>; +}; + +&rockchip_suspend { + rockchip,power-ctrl = + <&gpio1 18 GPIO_ACTIVE_LOW>, + <&gpio1 14 GPIO_ACTIVE_HIGH>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box-rev2-disvr.dts b/arch/arm64/boot/dts/rockchip/rk3399-box-rev2-disvr.dts index 2148de7bf04b..523ad9e01043 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-box-rev2-disvr.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-box-rev2-disvr.dts @@ -41,7 +41,7 @@ */ /dts-v1/; -#include "rk3399-box.dtsi" +#include "rk3399-box-android-6.0.dtsi" / { model = "Rockchip RK3399 Board rev2 (BOX)"; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box-rev2.dts b/arch/arm64/boot/dts/rockchip/rk3399-box-rev2.dts deleted file mode 100644 index b8e0f821183d..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-box-rev2.dts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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 "rk3399-box.dtsi" - -/ { - model = "Rockchip RK3399 Board rev2 (BOX)"; - compatible = "rockchip-box-rev2","rockchip,rk3399-box"; -}; - -&pinctrl { - sdio0 { - sdio0_bus1: sdio0-bus1 { - rockchip,pins = - <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>; - }; - - sdio0_bus4: sdio0-bus4 { - rockchip,pins = - <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>, - <2 21 RK_FUNC_1 &pcfg_pull_up_20ma>, - <2 22 RK_FUNC_1 &pcfg_pull_up_20ma>, - <2 23 RK_FUNC_1 &pcfg_pull_up_20ma>; - }; - - sdio0_cmd: sdio0-cmd { - rockchip,pins = - <2 24 RK_FUNC_1 &pcfg_pull_up_20ma>; - }; - - sdio0_clk: sdio0-clk { - rockchip,pins = - <2 25 RK_FUNC_1 &pcfg_pull_none_20ma>; - }; - }; - - sdmmc { - sdmmc_bus1: sdmmc-bus1 { - rockchip,pins = - <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>; - }; - - sdmmc_bus4: sdmmc-bus4 { - rockchip,pins = - <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>, - <4 9 RK_FUNC_1 &pcfg_pull_up_8ma>, - <4 10 RK_FUNC_1 &pcfg_pull_up_8ma>, - <4 11 RK_FUNC_1 &pcfg_pull_up_8ma>; - }; - - sdmmc_clk: sdmmc-clk { - rockchip,pins = - <4 12 RK_FUNC_1 &pcfg_pull_none_18ma>; - }; - - sdmmc_cmd: sdmmc-cmd { - rockchip,pins = - <4 13 RK_FUNC_1 &pcfg_pull_up_8ma>; - }; - }; - - fusb30x { - fusb0_int: fusb0-int { - rockchip,pins = - <1 2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - pmic { - vsel1_gpio: vsel1-gpio { - rockchip,pins = - <1 18 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; - -&i2c4 { - status = "okay"; - fusb0: fusb30x@22 { - compatible = "fairchild,fusb302"; - reg = <0x22>; - pinctrl-names = "default"; - pinctrl-0 = <&fusb0_int>; - vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; - int-n-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; -}; - -&vdd_cpu_b { - vsel-gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>; - fcs,suspend-voltage-selector = <0>; -}; - -&rockchip_suspend { - rockchip,power-ctrl = - <&gpio1 18 GPIO_ACTIVE_LOW>, - <&gpio1 14 GPIO_ACTIVE_HIGH>; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-box.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-box.dtsi deleted file mode 100644 index d14e77f8e621..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-box.dtsi +++ /dev/null @@ -1,902 +0,0 @@ -/* - * 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. - */ -#include -#include -#include "rk3399.dtsi" -#include "rk3399-android.dtsi" -#include "rk3399-opp.dtsi" - -/ { - compatible = "rockchip,rk3399-box","rockchip,rk3399"; - - 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>; - }; - - vcc5v0_host: vcc5v0-host-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&host_vbus_drv>; - regulator-name = "vcc5v0_host"; - regulator-always-on; - }; - - vdd_log: vdd-log { - compatible = "pwm-regulator"; - pwms = <&pwm2 0 25000 0>; - 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>; - }; - - clkin_gmac: external-gmac-clock { - compatible = "fixed-clock"; - clock-frequency = <125000000>; - clock-output-names = "clkin_gmac"; - #clock-cells = <0>; - }; - - spdif-sound { - status = "okay"; - compatible = "simple-audio-card"; - simple-audio-card,name = "ROCKCHIP,SPDIF"; - simple-audio-card,cpu { - sound-dai = <&spdif>; - }; - simple-audio-card,codec { - sound-dai = <&spdif_out>; - }; - }; - - spdif_out: spdif-out { - status = "okay"; - compatible = "linux,spdif-dit"; - #sound-dai-cells = <0>; - }; - - hdmi_sound: hdmi-sound { - status = "disabled"; - compatible = "simple-audio-card"; - simple-audio-card,format = "i2s"; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,name = "rockchip,hdmi"; - simple-audio-card,cpu { - sound-dai = <&i2s2>; - }; - simple-audio-card,codec { - sound-dai = <&dw_hdmi_audio>; - }; - }; - - dw_hdmi_audio: dw-hdmi-audio { - status = "okay"; - compatible = "rockchip,dw-hdmi-audio"; - #sound-dai-cells = <0>; - }; - - sdio_pwrseq: sdio-pwrseq { - compatible = "mmc-pwrseq-simple"; - clocks = <&rk808 1>; - clock-names = "ext_clock"; - pinctrl-names = "default"; - pinctrl-0 = <&wifi_enable_h>; - - /* - * On the module itself this is one of these (depending - * on the actual card populated): - * - SDIO_RESET_L_WL_REG_ON - * - PDN (power down when low) - */ - reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - }; - - wireless-wlan { - compatible = "wlan-platdata"; - rockchip,grf = <&grf>; - wifi_chip_type = "ap6354"; - sdio_vref = <1800>; - WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; - - wireless-bluetooth { - compatible = "bluetooth-platdata"; - clocks = <&rk808 1>; - clock-names = "ext_clock"; - /* wifi-bt-power-toggle; */ - uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; - pinctrl-names = "default", "rts_gpio"; - pinctrl-0 = <&uart0_rts>; - pinctrl-1 = <&uart0_gpios>; - /* BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; */ - BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; - BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; - BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; - - test-power { - status = "okay"; - }; -}; - -&sdmmc { - clock-frequency = <100000000>; - clock-freq-min-max = <100000 100000000>; - supports-sd; - bus-width = <4>; - cap-mmc-highspeed; - cap-sd-highspeed; - disable-wp; - num-slots = <1>; - //sd-uhs-sdr104; - vqmmc-supply = <&vcc_sd>; - pinctrl-names = "default"; - pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; - card-detect-delay = <800>; - status = "okay"; -}; - -&sdio0 { - clock-frequency = <100000000>; - clock-freq-min-max = <200000 100000000>; - supports-sdio; - bus-width = <4>; - disable-wp; - cap-sd-highspeed; - cap-sdio-irq; - keep-power-in-suspend; - mmc-pwrseq = <&sdio_pwrseq>; - non-removable; - num-slots = <1>; - pinctrl-names = "default"; - pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; - sd-uhs-sdr104; - status = "okay"; -}; - -&emmc_phy { - status = "okay"; -}; - -&sdhci { - bus-width = <8>; - mmc-hs400-1_8v; - supports-emmc; - non-removable; - mmc-hs400-enhanced-strobe; - status = "okay"; -}; - -&i2s0 { - status = "okay"; - rockchip,i2s-broken-burst-len; - rockchip,playback-channels = <8>; - rockchip,capture-channels = <8>; - #sound-dai-cells = <0>; -}; - -&i2s2 { - #sound-dai-cells = <0>; -}; - -&spdif { - pinctrl-0 = <&spdif_bus_1>; - status = "okay"; - #sound-dai-cells = <0>; -}; - -&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-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-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; - }; - }; - - rk808: pmic@1b { - compatible = "rockchip,rk808"; - reg = <0x1b>; - interrupt-parent = <&gpio1>; - interrupts = <21 IRQ_TYPE_LEVEL_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int_l>; - rockchip,system-power-controller; - wakeup-source; - #clock-cells = <1>; - clock-output-names = "xin32k", "rk808-clkout2"; - - vcc1-supply = <&vcc_sys>; - vcc2-supply = <&vcc_sys>; - vcc3-supply = <&vcc_sys>; - vcc4-supply = <&vcc_sys>; - vcc6-supply = <&vcc_sys>; - vcc7-supply = <&vcc_sys>; - vcc8-supply = <&vcc3v3_sys>; - vcc9-supply = <&vcc_sys>; - vcc10-supply = <&vcc_sys>; - vcc11-supply = <&vcc_sys>; - vcc12-supply = <&vcc3v3_sys>; - vddio-supply = <&vcc_1v8>; - - regulators { - vdd_center: DCDC_REG1 { - regulator-name = "vdd_center"; - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdd_cpu_l: DCDC_REG2 { - regulator-name = "vdd_cpu_l"; - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-always-on; - regulator-boot-on; - 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-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc1v8_dvp: LDO_REG1 { - regulator-name = "vcc1v8_dvp"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcca1v8_hdmi: LDO_REG2 { - regulator-name = "vcca1v8_hdmi"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcca_1v8: LDO_REG3 { - regulator-name = "vcca_1v8"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc_sd: LDO_REG4 { - regulator-name = "vcc_sd"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc3v0_sd: LDO_REG5 { - regulator-name = "vcc3v0_sd"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc_1v5: LDO_REG6 { - regulator-name = "vcc_1v5"; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1500000>; - }; - }; - - vcca0v9_hdmi: LDO_REG7 { - regulator-name = "vcca0v9_hdmi"; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <900000>; - }; - }; - - vcc_3v0: LDO_REG8 { - regulator-name = "vcc_3v0"; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc3v3_s3: SWITCH_REG1 { - regulator-name = "vcc3v3_s3"; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vcc3v3_s0: SWITCH_REG2 { - regulator-name = "vcc3v3_s0"; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - }; - }; -}; - -&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>; -}; - -&rga { - status = "okay"; -}; - -&threshold { - temperature = <85000>; -}; - -&target { - temperature = <100000>; -}; - -&soc_crit { - temperature = <105000>; -}; - -&tcphy0 { - extcon = <&fusb0>; - status = "okay"; -}; - -&tcphy1 { - status = "okay"; -}; - -&tsadc { - /* 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>; - status = "okay"; -}; - -&u2phy0 { - status = "okay"; - extcon = <&fusb0>; - - 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>; - status = "okay"; -}; - -&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 { - extcon = <&fusb0>; - status = "okay"; -}; - -&usbdrd_dwc3_0 { - dr_mode = "otg"; - status = "okay"; -}; - -&usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - dr_mode = "host"; - status = "okay"; -}; - -&pwm2 { - status = "okay"; -}; - -&pwm3 { - status = "okay"; - - interrupts = ; - compatible = "rockchip,remotectl-pwm"; - remote_pwm_id = <3>; - handle_cpu_id = <0>; - - ir_key1 { - rockchip,usercode = <0x4040>; - rockchip,key_table = - <0xf2 KEY_REPLY>, - <0xba KEY_BACK>, - <0xf4 KEY_UP>, - <0xf1 KEY_DOWN>, - <0xef KEY_LEFT>, - <0xee KEY_RIGHT>, - <0xbd KEY_HOME>, - <0xea KEY_VOLUMEUP>, - <0xe3 KEY_VOLUMEDOWN>, - <0xe2 KEY_SEARCH>, - <0xb2 KEY_POWER>, - <0xbc KEY_MUTE>, - <0xec KEY_MENU>, - <0xbf 0x190>, - <0xe0 0x191>, - <0xe1 0x192>, - <0xe9 183>, - <0xe6 248>, - <0xe8 185>, - <0xe7 186>, - <0xf0 388>, - <0xbe 0x175>; - }; - - ir_key2 { - rockchip,usercode = <0xff00>; - rockchip,key_table = - <0xf9 KEY_HOME>, - <0xbf KEY_BACK>, - <0xfb KEY_MENU>, - <0xaa KEY_REPLY>, - <0xb9 KEY_UP>, - <0xe9 KEY_DOWN>, - <0xb8 KEY_LEFT>, - <0xea KEY_RIGHT>, - <0xeb KEY_VOLUMEDOWN>, - <0xef KEY_VOLUMEUP>, - <0xf7 KEY_MUTE>, - <0xe7 KEY_POWER>, - <0xfc KEY_POWER>, - <0xa9 KEY_VOLUMEDOWN>, - <0xa8 KEY_VOLUMEDOWN>, - <0xe0 KEY_VOLUMEDOWN>, - <0xa5 KEY_VOLUMEDOWN>, - <0xab 183>, - <0xb7 388>, - <0xe8 388>, - <0xf8 184>, - <0xaf 185>, - <0xed KEY_VOLUMEDOWN>, - <0xee 186>, - <0xb3 KEY_VOLUMEDOWN>, - <0xf1 KEY_VOLUMEDOWN>, - <0xf2 KEY_VOLUMEDOWN>, - <0xf3 KEY_SEARCH>, - <0xb4 KEY_VOLUMEDOWN>, - <0xbe KEY_SEARCH>; - }; - - ir_key3 { - rockchip,usercode = <0x1dcc>; - rockchip,key_table = - <0xee KEY_REPLY>, - <0xf0 KEY_BACK>, - <0xf8 KEY_UP>, - <0xbb KEY_DOWN>, - <0xef KEY_LEFT>, - <0xed KEY_RIGHT>, - <0xfc KEY_HOME>, - <0xf1 KEY_VOLUMEUP>, - <0xfd KEY_VOLUMEDOWN>, - <0xb7 KEY_SEARCH>, - <0xff KEY_POWER>, - <0xf3 KEY_MUTE>, - <0xbf KEY_MENU>, - <0xf9 0x191>, - <0xf5 0x192>, - <0xb3 388>, - <0xbe KEY_1>, - <0xba KEY_2>, - <0xb2 KEY_3>, - <0xbd KEY_4>, - <0xf9 KEY_5>, - <0xb1 KEY_6>, - <0xfc KEY_7>, - <0xf8 KEY_8>, - <0xb0 KEY_9>, - <0xb6 KEY_0>, - <0xb5 KEY_BACKSPACE>; - }; -}; - -&gmac { - phy-supply = <&vcc_phy>; - phy-mode = "rgmii"; - clock_in_out = "input"; - snps,reset-gpio = <&gpio3 15 GPIO_ACTIVE_LOW>; - snps,reset-active-low; - snps,reset-delays-us = <0 10000 50000>; - assigned-clocks = <&cru SCLK_RMII_SRC>; - assigned-clock-parents = <&clkin_gmac>; - pinctrl-names = "default", "sleep"; - pinctrl-0 = <&rgmii_pins>; - pinctrl-1 = <&rgmii_sleep_pins>; - tx_delay = <0x28>; - rx_delay = <0x11>; - status = "okay"; -}; - -&saradc { - status = "okay"; -}; - -&rk_screen { - #include -}; - -&disp_timings { - native-mode = <&timing1>; /* 1080p */ -}; - -&vopb_rk_fb { - status = "okay"; -}; - -&vopl_rk_fb { - status = "okay"; -}; - -&fb { - rockchip,disp-policy = ; -}; - -&hdmi_rk_fb { - status = "okay"; - rockchip,hdmi_video_source = ; - rockchip,phy_table = - <165000000 0 0 17 18 18 18>, - <340000000 0 2 17 14 14 14>, - <594000000 0 2 17 9 9 9>; -}; - -&cdn_dp_sound { - status = "okay"; -}; - -&cdn_dp_fb { - status = "okay"; - extcon = <&fusb0>; - phys = <&tcphy0_dp>; - dp_vop_sel = ; -}; - -&i2s2 { - status = "okay"; -}; - -&io_domains { - status = "okay"; - - bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */ - audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */ - sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */ - gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */ -}; - -&pinctrl { - sdio-pwrseq { - wifi_enable_h: wifi-enable-h { - rockchip,pins = - <0 10 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - wireless-bluetooth { - uart0_gpios: uart0-gpios { - rockchip,pins = - <2 19 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - usb2 { - host_vbus_drv: host-vbus-drv { - rockchip,pins = - <4 25 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - pmic_int_l: pmic-int-l { - rockchip,pins = - <1 21 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>; - }; - }; - - gmac { - rgmii_sleep_pins: rgmii-sleep-pins { - rockchip,pins = - <3 15 RK_FUNC_GPIO &pcfg_output_low>; - }; - }; -}; - -&pvtm { - status = "okay"; -}; - -&pmu_pvtm { - status = "okay"; -}; - -&pmu_io_domains { - status = "okay"; - pmu1830-supply = <&vcc_1v8>; -}; - -&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>; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-disvr-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-disvr-android.dts index 92664659e237..9e406cbd6202 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-disvr-android.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-disvr-android.dts @@ -44,7 +44,7 @@ #include #include #include "rk3399.dtsi" -#include "rk3399-android.dtsi" +#include "rk3399-android-6.0.dtsi" #include "rk3399-opp.dtsi" / { diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev1-android-6.0.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev1-android-6.0.dts new file mode 100644 index 000000000000..9152bf1a4036 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev1-android-6.0.dts @@ -0,0 +1,132 @@ +/* + * 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 "rk3399-evb-rev1.dtsi" +#include "rk3399-android-6.0.dtsi" + +/ { + model = "Rockchip RK3399 Evaluation Board v1 (Android)"; + compatible = "rockchip,android", "rockchip,rk3399-evb-rev1", "rockchip,rk3399"; +}; + +&rk_screen { + #include +}; + +&vopb_rk_fb { + status = "okay"; + power_ctr: power_ctr { + rockchip,debug = <0>; + lcd_en: lcd-en { + rockchip,power_type = ; + gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; + rockchip,delay = <10>; + }; + + /*lcd_cs: lcd-cs { + rockchip,power_type = ; + gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;//GPIO_C5 = 21 + rockchip,delay = <10>; + };*/ + + /*lcd_rst: lcd-rst { + rockchip,power_type = ; + gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>; + rockchip,delay = <5>; + };*/ + }; +}; + +&vopl_rk_fb { + status = "okay"; +}; + +&mipi0_rk_fb { + status = "okay"; +}; + +&hdmi_rk_fb { + status = "okay"; + rockchip,hdmi_video_source = ; +}; + +&i2s2 { + status = "okay"; +}; + +&dw_hdmi_audio { + status = "okay"; +}; + +&hdmi_sound { + status = "okay"; +}; + +&spdif { + status = "okay"; +}; + +&spdif_out { + status = "okay"; +}; + +&spdif_sound { + status = "okay"; +}; + +&i2c0 { + status = "okay"; +}; + +&i2c1 { + status = "okay"; +}; + +&isp0 { + status = "okay"; +}; + +&isp1 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev1-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev1-android.dts deleted file mode 100644 index 6c6b2ad3eb53..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev1-android.dts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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 "rk3399-evb-rev1.dtsi" -#include "rk3399-android.dtsi" - -/ { - model = "Rockchip RK3399 Evaluation Board v1 (Android)"; - compatible = "rockchip,android", "rockchip,rk3399-evb-rev1", "rockchip,rk3399"; -}; - -&rk_screen { - #include -}; - -&vopb_rk_fb { - status = "okay"; - power_ctr: power_ctr { - rockchip,debug = <0>; - lcd_en: lcd-en { - rockchip,power_type = ; - gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; - rockchip,delay = <10>; - }; - - /*lcd_cs: lcd-cs { - rockchip,power_type = ; - gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;//GPIO_C5 = 21 - rockchip,delay = <10>; - };*/ - - /*lcd_rst: lcd-rst { - rockchip,power_type = ; - gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>; - rockchip,delay = <5>; - };*/ - }; -}; - -&vopl_rk_fb { - status = "okay"; -}; - -&mipi0_rk_fb { - status = "okay"; -}; - -&hdmi_rk_fb { - status = "okay"; - rockchip,hdmi_video_source = ; -}; - -&i2s2 { - status = "okay"; -}; - -&dw_hdmi_audio { - status = "okay"; -}; - -&hdmi_sound { - status = "okay"; -}; - -&spdif { - status = "okay"; -}; - -&spdif_out { - status = "okay"; -}; - -&spdif_sound { - status = "okay"; -}; - -&i2c0 { - status = "okay"; -}; - -&i2c1 { - status = "okay"; -}; - -&isp0 { - status = "okay"; -}; - -&isp1 { - status = "okay"; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2-android-6.0.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2-android-6.0.dts new file mode 100644 index 000000000000..8b2106b7907b --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2-android-6.0.dts @@ -0,0 +1,178 @@ +/* + * 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 "rk3399-evb-rev2.dtsi" +#include "rk3399-android-6.0.dtsi" + +/ { + model = "Rockchip RK3399 Evaluation Board v2 (Android)"; + compatible = "rockchip,android", "rockchip,rk3399-evb-rev2", "rockchip,rk3399"; +}; + +&rk_screen { + #include +}; + +&vopb_rk_fb { + status = "okay"; + power_ctr: power_ctr { + rockchip,debug = <0>; + lcd_en: lcd-en { + rockchip,power_type = ; + gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; + rockchip,delay = <10>; + }; + + /*lcd_cs: lcd-cs { + rockchip,power_type = ; + gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;//GPIO_C5 = 21 + rockchip,delay = <10>; + };*/ + + /*lcd_rst: lcd-rst { + rockchip,power_type = ; + gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>; + rockchip,delay = <5>; + };*/ + }; +}; + +&vopl_rk_fb { + status = "okay"; +}; + +&mipi0_rk_fb { + status = "okay"; +}; + +&hdmi_rk_fb { + status = "okay"; + rockchip,hdmi_video_source = ; +}; + +&i2s2 { + status = "okay"; +}; + +&dw_hdmi_audio { + status = "okay"; +}; + +&hdmi_sound { + status = "okay"; +}; + +&spdif { + status = "okay"; +}; + +&spdif_out { + status = "okay"; +}; + +&spdif_sound { + status = "okay"; +}; + +&i2c0 { + status = "okay"; +}; + +&i2c1 { + status = "okay"; + camera0: camera-module@10 { + status = "okay"; + compatible = "omnivision,ov8858-v4l2-i2c-subdev"; + reg = < 0x10 >; + device_type = "v4l2-i2c-subdev"; + + clocks = <&cru SCLK_CIF_OUT>; + clock-names = "clk_cif_out"; + + pinctrl-names = "rockchip,camera_default", "rockchip,camera_sleep"; + pinctrl-0 = <&cam0_default_pins>; + pinctrl-1 = <&cam0_sleep_pins>; + + rockchip,pd-gpio = <&gpio2 12 GPIO_ACTIVE_LOW>; + /* + rockchip,pwr-gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>; + rockchip,rst-gpio = <&gpio2 15 GPIO_ACTIVE_HIGH>; + */ + rockchip,camera-module-mclk-name = "clk_cif_out"; + /* + rockchip,camera-module-regulator-names = "avdd", "dovdd", "dvdd"; + rockchip,camera-module-regulator-voltages = <2800000 1800000 1500000>; + */ + + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "cmk-cb0695-fv1"; + rockchip,camera-module-len-name = "lg9569a2"; + rockchip,camera-module-fov-h = "66.0"; + rockchip,camera-module-fov-v = "50.1"; + rockchip,camera-module-orientation = <0>; + rockchip,camera-module-iq-flip = <0>; + rockchip,camera-module-iq-mirror = <0>; + rockchip,camera-module-flip = <0>; + rockchip,camera-module-mirror = <0>; + + /* resolution.w, resolution.h, defrect.left, defrect.top, defrect.w, defrect.h */ + rockchip,camera-module-defrect0 = <3264 2448 0 0 3264 2448>; + rockchip,camera-module-flash-support = <0>; + rockchip,camera-module-mipi-dphy-index = <0>; + }; +}; + +&isp0 { + status = "okay"; +}; + +&isp1 { + status = "okay"; +}; + +&cif_isp0 { + status = "okay"; + rockchip,camera-modules-attached = <&camera0>; +}; + diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2-android.dts deleted file mode 100644 index 2ab480c37f97..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev2-android.dts +++ /dev/null @@ -1,178 +0,0 @@ -/* - * 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 "rk3399-evb-rev2.dtsi" -#include "rk3399-android.dtsi" - -/ { - model = "Rockchip RK3399 Evaluation Board v2 (Android)"; - compatible = "rockchip,android", "rockchip,rk3399-evb-rev2", "rockchip,rk3399"; -}; - -&rk_screen { - #include -}; - -&vopb_rk_fb { - status = "okay"; - power_ctr: power_ctr { - rockchip,debug = <0>; - lcd_en: lcd-en { - rockchip,power_type = ; - gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; - rockchip,delay = <10>; - }; - - /*lcd_cs: lcd-cs { - rockchip,power_type = ; - gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;//GPIO_C5 = 21 - rockchip,delay = <10>; - };*/ - - /*lcd_rst: lcd-rst { - rockchip,power_type = ; - gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>; - rockchip,delay = <5>; - };*/ - }; -}; - -&vopl_rk_fb { - status = "okay"; -}; - -&mipi0_rk_fb { - status = "okay"; -}; - -&hdmi_rk_fb { - status = "okay"; - rockchip,hdmi_video_source = ; -}; - -&i2s2 { - status = "okay"; -}; - -&dw_hdmi_audio { - status = "okay"; -}; - -&hdmi_sound { - status = "okay"; -}; - -&spdif { - status = "okay"; -}; - -&spdif_out { - status = "okay"; -}; - -&spdif_sound { - status = "okay"; -}; - -&i2c0 { - status = "okay"; -}; - -&i2c1 { - status = "okay"; - camera0: camera-module@10 { - status = "okay"; - compatible = "omnivision,ov8858-v4l2-i2c-subdev"; - reg = < 0x10 >; - device_type = "v4l2-i2c-subdev"; - - clocks = <&cru SCLK_CIF_OUT>; - clock-names = "clk_cif_out"; - - pinctrl-names = "rockchip,camera_default", "rockchip,camera_sleep"; - pinctrl-0 = <&cam0_default_pins>; - pinctrl-1 = <&cam0_sleep_pins>; - - rockchip,pd-gpio = <&gpio2 12 GPIO_ACTIVE_LOW>; - /* - rockchip,pwr-gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>; - rockchip,rst-gpio = <&gpio2 15 GPIO_ACTIVE_HIGH>; - */ - rockchip,camera-module-mclk-name = "clk_cif_out"; - /* - rockchip,camera-module-regulator-names = "avdd", "dovdd", "dvdd"; - rockchip,camera-module-regulator-voltages = <2800000 1800000 1500000>; - */ - - rockchip,camera-module-facing = "back"; - rockchip,camera-module-name = "cmk-cb0695-fv1"; - rockchip,camera-module-len-name = "lg9569a2"; - rockchip,camera-module-fov-h = "66.0"; - rockchip,camera-module-fov-v = "50.1"; - rockchip,camera-module-orientation = <0>; - rockchip,camera-module-iq-flip = <0>; - rockchip,camera-module-iq-mirror = <0>; - rockchip,camera-module-flip = <0>; - rockchip,camera-module-mirror = <0>; - - /* resolution.w, resolution.h, defrect.left, defrect.top, defrect.w, defrect.h */ - rockchip,camera-module-defrect0 = <3264 2448 0 0 3264 2448>; - rockchip,camera-module-flash-support = <0>; - rockchip,camera-module-mipi-dphy-index = <0>; - }; -}; - -&isp0 { - status = "okay"; -}; - -&isp1 { - status = "okay"; -}; - -&cif_isp0 { - status = "okay"; - rockchip,camera-modules-attached = <&camera0>; -}; - diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android-6.0-edp.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android-6.0-edp.dts new file mode 100644 index 000000000000..c234fc7afc50 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android-6.0-edp.dts @@ -0,0 +1,131 @@ +/* + * 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 "rk3399-evb-rev3.dtsi" +#include "rk3399-android-6.0.dtsi" + +/ { + model = "Rockchip RK3399 Evaluation Board v3 edp (Android)"; + compatible = "rockchip,android", "rockchip,rk3399-evb-rev3", "rockchip,rk3399"; +}; + +&rk_screen { + #include +}; + +&vopb_rk_fb { + status = "okay"; + power_ctr: power_ctr { + rockchip,debug = <0>; + lcd_en: lcd-en { + rockchip,power_type = ; + gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; + rockchip,delay = <10>; + }; + + /*lcd_cs: lcd-cs { + rockchip,power_type = ; + gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;//GPIO_C5 = 21 + rockchip,delay = <10>; + };*/ + + /*lcd_rst: lcd-rst { + rockchip,power_type = ; + gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>; + rockchip,delay = <5>; + };*/ + }; +}; + +&vopl_rk_fb { + status = "okay"; +}; + +&edp_rk_fb { + status = "okay"; +}; + +&hdmi_rk_fb { + status = "okay"; + rockchip,hdmi_video_source = ; +}; + +&i2s2 { + status = "okay"; +}; + +&dw_hdmi_audio { + status = "okay"; +}; + +&hdmi_sound { + status = "okay"; +}; + +&spdif { + status = "okay"; +}; + +&spdif_out { + status = "okay"; +}; + +&spdif_sound { + status = "okay"; +}; + +>9xx { + status = "disabled"; +}; + +&i2c4 { + gsl3673: gsl3673@40 { + compatible = "GSL,GSL3673"; + reg = <0x40>; + screen_max_x = <1536>; + screen_max_y = <2048>; + irq_gpio_number = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>; + rst_gpio_number = <&gpio4 22 GPIO_ACTIVE_HIGH>; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android-6.0.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android-6.0.dts new file mode 100644 index 000000000000..42050cb40ccb --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android-6.0.dts @@ -0,0 +1,168 @@ +/* + * 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 "rk3399-evb-rev3.dtsi" +#include "rk3399-android-6.0.dtsi" + +/ { + model = "Rockchip RK3399 Evaluation Board v3 (Android)"; + compatible = "rockchip,android", "rockchip,rk3399-evb-rev3", "rockchip,rk3399"; +}; + +&rk_screen { + #include +}; + +&vopb_rk_fb { + status = "okay"; + power_ctr: power_ctr { + rockchip,debug = <0>; + lcd_en: lcd-en { + rockchip,power_type = ; + gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; + rockchip,delay = <10>; + }; + + /*lcd_cs: lcd-cs { + rockchip,power_type = ; + gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;//GPIO_C5 = 21 + rockchip,delay = <10>; + };*/ + + /*lcd_rst: lcd-rst { + rockchip,power_type = ; + gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>; + rockchip,delay = <5>; + };*/ + }; +}; + +&vopl_rk_fb { + status = "okay"; +}; + +&mipi0_rk_fb { + status = "okay"; +}; + +&hdmi_rk_fb { + status = "okay"; + rockchip,hdmi_video_source = ; +}; + +&i2s2 { + status = "okay"; +}; + +&dw_hdmi_audio { + status = "okay"; +}; + +&hdmi_sound { + status = "okay"; +}; + +&spdif { + status = "okay"; +}; + +&spdif_out { + status = "okay"; +}; + +&spdif_sound { + status = "okay"; +}; + +&i2c0 { + status = "okay"; +}; + +&i2c1 { + status = "okay"; + camera0: camera-module@10 { + status = "okay"; + compatible = "omnivision,ov8858-v4l2-i2c-subdev"; + reg = < 0x10 >; + device_type = "v4l2-i2c-subdev"; + + clocks = <&cru SCLK_CIF_OUT>; + clock-names = "clk_cif_out"; + + pinctrl-names = "rockchip,camera_default", "rockchip,camera_sleep"; + pinctrl-0 = <&cam0_default_pins>; + pinctrl-1 = <&cam0_sleep_pins>; + + rockchip,pd-gpio = <&gpio2 12 GPIO_ACTIVE_LOW>; + rockchip,camera-module-mclk-name = "clk_cif_out"; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "cmk-cb0695-fv1"; + rockchip,camera-module-len-name = "lg9569a2"; + rockchip,camera-module-fov-h = "66.0"; + rockchip,camera-module-fov-v = "50.1"; + rockchip,camera-module-orientation = <0>; + rockchip,camera-module-iq-flip = <0>; + rockchip,camera-module-iq-mirror = <0>; + rockchip,camera-module-flip = <0>; + rockchip,camera-module-mirror = <0>; + + /* resolution.w, resolution.h, defrect.left, defrect.top, defrect.w, defrect.h */ + rockchip,camera-module-defrect0 = <3264 2448 0 0 3264 2448>; + rockchip,camera-module-flash-support = <0>; + rockchip,camera-module-mipi-dphy-index = <0>; + }; +}; +/* +&isp0 { + status = "okay"; +}; + +&isp1 { + status = "okay"; +}; + +&cif_isp0 { + status = "okay"; + rockchip,camera-modules-attached = <&camera0>; +};*/ diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android-edp.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android-edp.dts deleted file mode 100644 index a8e053ace757..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android-edp.dts +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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 "rk3399-evb-rev3.dtsi" -#include "rk3399-android.dtsi" - -/ { - model = "Rockchip RK3399 Evaluation Board v3 edp (Android)"; - compatible = "rockchip,android", "rockchip,rk3399-evb-rev3", "rockchip,rk3399"; -}; - -&rk_screen { - #include -}; - -&vopb_rk_fb { - status = "okay"; - power_ctr: power_ctr { - rockchip,debug = <0>; - lcd_en: lcd-en { - rockchip,power_type = ; - gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; - rockchip,delay = <10>; - }; - - /*lcd_cs: lcd-cs { - rockchip,power_type = ; - gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;//GPIO_C5 = 21 - rockchip,delay = <10>; - };*/ - - /*lcd_rst: lcd-rst { - rockchip,power_type = ; - gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>; - rockchip,delay = <5>; - };*/ - }; -}; - -&vopl_rk_fb { - status = "okay"; -}; - -&edp_rk_fb { - status = "okay"; -}; - -&hdmi_rk_fb { - status = "okay"; - rockchip,hdmi_video_source = ; -}; - -&i2s2 { - status = "okay"; -}; - -&dw_hdmi_audio { - status = "okay"; -}; - -&hdmi_sound { - status = "okay"; -}; - -&spdif { - status = "okay"; -}; - -&spdif_out { - status = "okay"; -}; - -&spdif_sound { - status = "okay"; -}; - ->9xx { - status = "disabled"; -}; - -&i2c4 { - gsl3673: gsl3673@40 { - compatible = "GSL,GSL3673"; - reg = <0x40>; - screen_max_x = <1536>; - screen_max_y = <2048>; - irq_gpio_number = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>; - rst_gpio_number = <&gpio4 22 GPIO_ACTIVE_HIGH>; - }; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android.dts deleted file mode 100644 index c0e513819c59..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-evb-rev3-android.dts +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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 "rk3399-evb-rev3.dtsi" -#include "rk3399-android.dtsi" - -/ { - model = "Rockchip RK3399 Evaluation Board v3 (Android)"; - compatible = "rockchip,android", "rockchip,rk3399-evb-rev3", "rockchip,rk3399"; -}; - -&rk_screen { - #include -}; - -&vopb_rk_fb { - status = "okay"; - power_ctr: power_ctr { - rockchip,debug = <0>; - lcd_en: lcd-en { - rockchip,power_type = ; - gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; - rockchip,delay = <10>; - }; - - /*lcd_cs: lcd-cs { - rockchip,power_type = ; - gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;//GPIO_C5 = 21 - rockchip,delay = <10>; - };*/ - - /*lcd_rst: lcd-rst { - rockchip,power_type = ; - gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>; - rockchip,delay = <5>; - };*/ - }; -}; - -&vopl_rk_fb { - status = "okay"; -}; - -&mipi0_rk_fb { - status = "okay"; -}; - -&hdmi_rk_fb { - status = "okay"; - rockchip,hdmi_video_source = ; -}; - -&i2s2 { - status = "okay"; -}; - -&dw_hdmi_audio { - status = "okay"; -}; - -&hdmi_sound { - status = "okay"; -}; - -&spdif { - status = "okay"; -}; - -&spdif_out { - status = "okay"; -}; - -&spdif_sound { - status = "okay"; -}; - -&i2c0 { - status = "okay"; -}; - -&i2c1 { - status = "okay"; - camera0: camera-module@10 { - status = "okay"; - compatible = "omnivision,ov8858-v4l2-i2c-subdev"; - reg = < 0x10 >; - device_type = "v4l2-i2c-subdev"; - - clocks = <&cru SCLK_CIF_OUT>; - clock-names = "clk_cif_out"; - - pinctrl-names = "rockchip,camera_default", "rockchip,camera_sleep"; - pinctrl-0 = <&cam0_default_pins>; - pinctrl-1 = <&cam0_sleep_pins>; - - rockchip,pd-gpio = <&gpio2 12 GPIO_ACTIVE_LOW>; - rockchip,camera-module-mclk-name = "clk_cif_out"; - rockchip,camera-module-facing = "back"; - rockchip,camera-module-name = "cmk-cb0695-fv1"; - rockchip,camera-module-len-name = "lg9569a2"; - rockchip,camera-module-fov-h = "66.0"; - rockchip,camera-module-fov-v = "50.1"; - rockchip,camera-module-orientation = <0>; - rockchip,camera-module-iq-flip = <0>; - rockchip,camera-module-iq-mirror = <0>; - rockchip,camera-module-flip = <0>; - rockchip,camera-module-mirror = <0>; - - /* resolution.w, resolution.h, defrect.left, defrect.top, defrect.w, defrect.h */ - rockchip,camera-module-defrect0 = <3264 2448 0 0 3264 2448>; - rockchip,camera-module-flash-support = <0>; - rockchip,camera-module-mipi-dphy-index = <0>; - }; -}; -/* -&isp0 { - status = "okay"; -}; - -&isp1 { - status = "okay"; -}; - -&cif_isp0 { - status = "okay"; - rockchip,camera-modules-attached = <&camera0>; -};*/ diff --git a/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android-6.0.dts b/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android-6.0.dts new file mode 100644 index 000000000000..9c234e5af3bf --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android-6.0.dts @@ -0,0 +1,1022 @@ +/* + * 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 "rk3399.dtsi" +#include "rk3399-android-6.0.dtsi" +#include "rk3399-opp.dtsi" +#include +#include + +/ { + compatible = "rockchip,rk3399-mid", "rockchip,rk3399"; + + hall_sensor: hall-mh248 { + compatible = "hall-mh248"; + pinctrl-names = "default"; + pinctrl-0 = <&mh248_irq_gpio>; + irq-gpio = <&gpio1 2 IRQ_TYPE_EDGE_BOTH>; + hall-active = <1>; + status = "okay"; + }; + + vcc_sys: vcc-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3900000>; + regulator-max-microvolt = <3900000>; + }; + + 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>; + }; + + vcc5v0_host: vcc5v0-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&host_vbus_drv>; + regulator-name = "vcc5v0_host"; + regulator-always-on; + }; + + vdd_log: vdd-log { + compatible = "pwm-regulator"; + pwms = <&pwm2 0 25000 0>; + rockchip,pwm_id= <2>; + rockchip,pwm_voltage = <900000>; + regulator-name = "vdd_log"; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + regulator-boot-on; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&vop0_pwm 0 25000 PWM_POLARITY_INVERTED>; + brightness-levels = < + 0 1 51 52 52 53 53 54 + 54 55 55 56 56 57 57 58 + 58 59 59 60 61 61 62 63 + 63 64 65 65 66 67 67 68 + 69 69 70 71 71 72 73 73 + 74 75 75 76 77 77 78 79 + 79 80 80 81 81 82 83 83 + 84 85 86 86 87 88 89 89 + 90 91 92 92 93 94 95 95 + 96 97 98 98 99 100 101 101 + 102 103 104 104 105 106 107 107 + 108 109 110 110 111 112 113 113 + 114 115 116 116 117 118 119 119 + 120 121 122 122 123 124 125 125 + 126 127 128 128 129 130 131 131 + 132 133 134 134 135 136 137 137 + 138 139 140 140 141 142 143 143 + 144 145 146 146 147 148 149 149 + 150 151 152 152 153 154 155 155 + 156 157 158 158 159 160 161 161 + 162 163 164 164 165 166 167 167 + 168 169 170 170 171 172 173 173 + 174 175 176 176 177 178 179 179 + 180 181 182 182 183 184 185 185 + 186 187 188 188 189 190 191 191 + 216 217 218 218 219 220 221 221 + 222 223 224 224 225 226 227 227 + 228 229 230 230 231 232 233 233 + 234 235 236 236 237 238 239 239 + 240 241 242 242 243 244 245 245 + 246 247 248 248 249 250 251 251 + 252 253 254 254 255 255 255 255>; + default-brightness-level = <200>; + enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; + }; + + vcc_phy: vcc-phy-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc_phy"; + regulator-always-on; + regulator-boot-on; + }; + + es8316-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "rockchip,es8316-codec"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Mic Jack", "MICBIAS1", + "IN1P", "Mic Jack", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR"; + simple-audio-card,cpu { + sound-dai = <&i2s0>; + }; + simple-audio-card,codec { + sound-dai = <&es8316>; + }; + }; + + spdif-sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "rockchip,spdif"; + simple-audio-card,cpu { + sound-dai = <&spdif>; + }; + simple-audio-card,codec { + sound-dai = <&spdif_out>; + }; + }; + + spdif_out: spdif-out { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk818 1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; + + /* + * On the module itself this is one of these (depending + * on the actual card populated): + * - SDIO_RESET_L_WL_REG_ON + * - PDN (power down when low) + */ + reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */ + }; + + wireless-wlan { + compatible = "wlan-platdata"; + rockchip,grf = <&grf>; + wifi_chip_type = "ap6354"; + sdio_vref = <1800>; + WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */ + status = "okay"; + }; + + wireless-bluetooth { + compatible = "bluetooth-platdata"; + clocks = <&rk818 1>; + clock-names = "ext_clock"; + //wifi-bt-power-toggle; + uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */ + pinctrl-names = "default", "rts_gpio"; + pinctrl-0 = <&uart0_rts>; + pinctrl-1 = <&uart0_gpios>; + //BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */ + BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */ + BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */ + BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */ + status = "okay"; + }; + + uboot-charge { + compatible = "rockchip,uboot-charge"; + rockchip,uboot-charge-on = <0>; + rockchip,android-charge-on = <1>; + }; + + vibrator { + compatible = "rk-vibrator-gpio"; + vibrator-gpio = <&gpio4 30 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + + rk_headset { + compatible = "rockchip_headset"; + headset_gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&hp_det>; + io-channels = <&saradc 2>; + }; +}; + +&rk_key { + compatible = "rockchip,key"; + status = "okay"; + + io-channels = <&saradc 1>; + + vol-up-key { + linux,code = <114>; + label = "volume up"; + rockchip,adc_value = <1>; + }; + + vol-down-key { + linux,code = <115>; + label = "volume down"; + rockchip,adc_value = <170>; + }; + + power-key { + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + linux,code = <116>; + label = "power"; + gpio-key,wakeup; + }; + + menu-key { + linux,code = <59>; + label = "menu"; + rockchip,adc_value = <746>; + }; + + home-key { + linux,code = <102>; + label = "home"; + rockchip,adc_value = <355>; + }; + + back-key { + linux,code = <158>; + label = "back"; + rockchip,adc_value = <560>; + }; + + camera-key { + linux,code = <212>; + label = "camera"; + rockchip,adc_value = <450>; + }; +}; + +&sdmmc { + clock-frequency = <50000000>; + clock-freq-min-max = <400000 150000000>; + supports-sd; + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + num-slots = <1>; + //sd-uhs-sdr104; + vqmmc-supply = <&vcc_sd>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; + status = "okay"; +}; + +&sdio0 { + clock-frequency = <150000000>; + clock-freq-min-max = <200000 150000000>; + supports-sdio; + bus-width = <4>; + disable-wp; + cap-sd-highspeed; + cap-sdio-irq; + keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + num-slots = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; + sd-uhs-sdr104; + status = "okay"; +}; + +&emmc_phy { + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + mmc-hs400-1_8v; + supports-emmc; + non-removable; + keep-power-in-suspend; + mmc-hs400-enhanced-strobe; + status = "okay"; +}; + +&i2s0 { + status = "okay"; + rockchip,i2s-broken-burst-len; + rockchip,playback-channels = <8>; + rockchip,capture-channels = <8>; + #sound-dai-cells = <0>; +}; + +&i2s2 { + #sound-dai-cells = <0>; +}; + +&io_domains { + status = "okay"; + + bt656-supply = <&vcc1v8_dvp>; + audio-supply = <&vcca1v8_codec>; + sdmmc-supply = <&vcc_sd>; + gpio1830-supply = <&vcc_3v0>; +}; + +&spdif { + status = "okay"; + #sound-dai-cells = <0>; +}; + +&i2c0 { + status = "okay"; + i2c-scl-rising-time-ns = <180>; + i2c-scl-falling-time-ns = <30>; + clock-frequency = <400000>; + + vdd_cpu_b: syr837@40 { + compatible = "silergy,syr827"; + reg = <0x40>; + vin-supply = <&vcc_sys>; + regulator-compatible = "fan53555-reg"; + 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-initial-state = <3>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_gpu: syr828@41 { + compatible = "silergy,syr828"; + status = "okay"; + reg = <0x41>; + vin-supply = <&vcc_sys>; + regulator-compatible = "fan53555-reg"; + pinctrl-0 = <&vsel2_gpio>; + vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; + regulator-name = "vdd_gpu"; + regulator-min-microvolt = <735000>; + regulator-max-microvolt = <1400000>; + regulator-ramp-delay = <1000>; + fcs,suspend-voltage-selector = <1>; + regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + rk818: pmic@1c { + compatible = "rockchip,rk818"; + status = "okay"; + reg = <0x1c>; + clock-output-names = "xin32k", "wifibt_32kin"; + interrupt-parent = <&gpio1>; + interrupts = <21 IRQ_TYPE_LEVEL_LOW>; + 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; + extcon = <&fusb0>; + #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 = <3300000>; + regulator-name = "vcc_sd"; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc3v3_s0: SWITCH_REG { + regulator-always-on; + regulator-boot-on; + regulator-name = "vcc3v3_s0"; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + }; + + 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>; + }; + }; +}; + +&i2c1 { + status = "okay"; + i2c-scl-rising-time-ns = <140>; + i2c-scl-falling-time-ns = <30>; + + es8316: es8316@10 { + #sound-dai-cells = <0>; + compatible = "everest,es8316"; + reg = <0x11>; + clocks = <&cru SCLK_I2S_8CH_OUT>; + clock-names = "mclk"; + spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; + }; +}; + +&i2c4 { + status = "okay"; + i2c-scl-rising-time-ns = <345>; + i2c-scl-falling-time-ns = <11>; + clock-frequency = <400000>; + + lsm330_accel@1e { + status = "okay"; + compatible = "lsm330_acc"; + pinctrl-names = "default"; + pinctrl-0 = <&lsm330a_irq_gpio>; + reg = <0x1e>; + irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>; + type = ; + irq_enable = <1>; + poll_delay_ms = <30>; + power-off-in-suspend = <1>; + layout = <4>; + }; + + lsm330_gyro@6a { + status = "okay"; + compatible = "lsm330_gyro"; + pinctrl-names = "default"; + pinctrl-0 = <&lsm330g_irq_gpio>; + reg = <0x6a>; + irq-gpio = <&gpio1 20 IRQ_TYPE_EDGE_RISING>; + type = ; + irq_enable = <0>; + power-off-in-suspend = <1>; + poll_delay_ms = <30>; + }; + + mpu6500@68 { + status = "disabled"; + compatible = "invensense,mpu6500"; + pinctrl-names = "default"; + pinctrl-0 = <&mpu6500_irq_gpio>; + reg = <0x68>; + irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>; + mpu-int_config = <0x10>; + mpu-level_shifter = <0>; + mpu-orientation = <1 0 0 0 1 0 0 0 1>; + orientation-x= <1>; + orientation-y= <1>; + orientation-z= <0>; + support-hw-poweroff = <1>; + mpu-debug = <1>; + }; + + sensor@0d { + status = "okay"; + compatible = "ak8963"; + pinctrl-names = "default"; + pinctrl-0 = <&ak8963_irq_gpio>; + reg = <0x0d>; + type = ; + irq-gpio = <&gpio2 28 IRQ_TYPE_EDGE_RISING>; + irq_enable = <0>; + poll_delay_ms = <30>; + layout = <3>; + }; + + sensor@10 { + status = "okay"; + compatible = "capella,light_cm3218"; + pinctrl-names = "default"; + pinctrl-0 = <&cm3218_irq_gpio>; + reg = <0x10>; + type = ; + irq-gpio = <&gpio4 24 IRQ_TYPE_EDGE_FALLING>; + irq_enable = <1>; + poll_delay_ms = <30>; + }; + + fusb0: fusb30x@22 { + compatible = "fairchild,fusb302"; + reg = <0x22>; + pinctrl-names = "default"; + pinctrl-0 = <&fusb0_int>; + int-n-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; +}; + +&i2c5 { + status = "okay"; + i2c-scl-rising-time-ns = <150>; + i2c-scl-falling-time-ns = <30>; + clock-frequency = <400000>; + + gt9xx: gt9xx@14 { + compatible = "goodix,gt9xx"; + reg = <0x14>; + touch-gpio = <&gpio3 12 IRQ_TYPE_LEVEL_LOW>; + reset-gpio = <&gpio3 13 GPIO_ACTIVE_HIGH>; + max-x = <1536>; + max-y = <2048>; + tp-size = <970>; + tp-supply = <&vcc3v0_tp>; + }; +}; + +&isp0 { + status = "okay"; +}; + +&isp1 { + status = "okay"; +}; + +&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>; +}; + +&rga { + status = "okay"; +}; + +&spi1 { + status = "disabled"; + max-freq = <50000000>; + mpu6500@0 { + status = "disabled"; + compatible = "inv-spi,mpu6500"; + pinctrl-names = "default"; + pinctrl-0 = <&mpu6500_irq_gpio>; + irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpha; + spi-cpol; + mpu-int_config = <0x00>; + mpu-level_shifter = <0>; + mpu-orientation = <1 0 0 0 1 0 0 0 1>; + orientation-x= <1>; + orientation-y= <0>; + orientation-z= <1>; + support-hw-poweroff = <1>; + mpu-debug = <1>; + }; +}; + +&tcphy0 { + extcon = <&fusb0>; + status = "okay"; +}; + +&tsadc { + rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ + status = "okay"; +}; + +&u2phy0 { + status = "okay"; + extcon = <&fusb0>; + + u2phy0_otg: otg-port { + status = "okay"; + }; + + u2phy0_host: host-port { + phy-supply = <&vcc5v0_host>; + status = "okay"; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_xfer &uart0_cts>; + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usbdrd3_0 { + extcon = <&fusb0>; + status = "okay"; +}; + +&usbdrd_dwc3_0 { + status = "okay"; +}; + +&vop0_pwm { + assigned-clocks = <&cru SCLK_VOP0_PWM>; + assigned-clock-rates = <50000000>; + status = "okay"; +}; + +&pwm2 { + status = "okay"; +}; + +&saradc { + status = "okay"; +}; + +&pinctrl { + sdio-pwrseq { + wifi_enable_h: wifi-enable-h { + rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + wireless-bluetooth { + uart0_gpios: uart0-gpios { + rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = + <1 21 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + pmic_dvs2: pmic-dvs2 { + rockchip,pins = + <1 18 RK_FUNC_GPIO &pcfg_pull_down>; + }; + 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>; + }; + }; + + hallsensor { + mh248_irq_gpio: mh248-irq-gpio { + rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + headphone { + hp_det: hp-det { + rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + lcdpwr-enable { + lcdpwr_enable_h: lcdpwr-enable-h { + rockchip,pins = <3 8 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + lsm330_a { + lsm330a_irq_gpio: lsm330a-irq-gpio { + rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + lsm330_g { + lsm330g_irq_gpio: lsm330g-irq-gpio { + rockchip,pins = <1 20 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + mpu6500 { + mpu6500_irq_gpio: mpu6500-irq-gpio { + rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + ak8963 { + ak8963_irq_gpio: ak8963-irq-gpio { + rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + cm3218 { + cm3218_irq_gpio: cm3218-irq-gpio { + rockchip,pins = <4 24 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb2 { + host_vbus_drv: host-vbus-drv { + rockchip,pins = + <4 25 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + fusb30x { + fusb0_int: fusb0-int { + rockchip,pins = + <1 1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&rk_screen { + #include +}; + +&cdn_dp_sound { + status = "okay"; +}; + +&cdn_dp_fb { + status = "okay"; + extcon = <&fusb0>; + phys = <&tcphy0_dp>; + dp_vop_sel = ; +}; + +&vopb_rk_fb { + status = "okay"; + rockchip,cabc_mode = <1>; + power_ctr: power_ctr { + rockchip,debug = <0>; + + lcd_en: lcd-en { + rockchip,power_type = ; + pinctrl-names = "default"; + pinctrl-0 = <&lcdpwr_enable_h>; + gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>; + rockchip,delay = <10>; + }; + }; +}; + +&vopl_rk_fb { + status = "okay"; +}; + +&edp_rk_fb { + status = "okay"; +}; + +&pvtm { + status = "okay"; +}; + +&pmu_pvtm { + status = "okay"; +}; + +&pmu_io_domains { + status = "okay"; + pmu1830-supply = <&vcc_1v8>; +}; + diff --git a/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android.dts deleted file mode 100644 index cbf8286b48d9..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-mid-818-android.dts +++ /dev/null @@ -1,1022 +0,0 @@ -/* - * 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 "rk3399.dtsi" -#include "rk3399-android.dtsi" -#include "rk3399-opp.dtsi" -#include -#include - -/ { - compatible = "rockchip,rk3399-mid", "rockchip,rk3399"; - - hall_sensor: hall-mh248 { - compatible = "hall-mh248"; - pinctrl-names = "default"; - pinctrl-0 = <&mh248_irq_gpio>; - irq-gpio = <&gpio1 2 IRQ_TYPE_EDGE_BOTH>; - hall-active = <1>; - status = "okay"; - }; - - vcc_sys: vcc-sys { - compatible = "regulator-fixed"; - regulator-name = "vcc_sys"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3900000>; - regulator-max-microvolt = <3900000>; - }; - - 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>; - }; - - vcc5v0_host: vcc5v0-host-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&host_vbus_drv>; - regulator-name = "vcc5v0_host"; - regulator-always-on; - }; - - vdd_log: vdd-log { - compatible = "pwm-regulator"; - pwms = <&pwm2 0 25000 0>; - rockchip,pwm_id= <2>; - rockchip,pwm_voltage = <900000>; - regulator-name = "vdd_log"; - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <1350000>; - regulator-always-on; - regulator-boot-on; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - pwms = <&vop0_pwm 0 25000 PWM_POLARITY_INVERTED>; - brightness-levels = < - 0 1 51 52 52 53 53 54 - 54 55 55 56 56 57 57 58 - 58 59 59 60 61 61 62 63 - 63 64 65 65 66 67 67 68 - 69 69 70 71 71 72 73 73 - 74 75 75 76 77 77 78 79 - 79 80 80 81 81 82 83 83 - 84 85 86 86 87 88 89 89 - 90 91 92 92 93 94 95 95 - 96 97 98 98 99 100 101 101 - 102 103 104 104 105 106 107 107 - 108 109 110 110 111 112 113 113 - 114 115 116 116 117 118 119 119 - 120 121 122 122 123 124 125 125 - 126 127 128 128 129 130 131 131 - 132 133 134 134 135 136 137 137 - 138 139 140 140 141 142 143 143 - 144 145 146 146 147 148 149 149 - 150 151 152 152 153 154 155 155 - 156 157 158 158 159 160 161 161 - 162 163 164 164 165 166 167 167 - 168 169 170 170 171 172 173 173 - 174 175 176 176 177 178 179 179 - 180 181 182 182 183 184 185 185 - 186 187 188 188 189 190 191 191 - 216 217 218 218 219 220 221 221 - 222 223 224 224 225 226 227 227 - 228 229 230 230 231 232 233 233 - 234 235 236 236 237 238 239 239 - 240 241 242 242 243 244 245 245 - 246 247 248 248 249 250 251 251 - 252 253 254 254 255 255 255 255>; - default-brightness-level = <200>; - enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; - }; - - vcc_phy: vcc-phy-regulator { - compatible = "regulator-fixed"; - regulator-name = "vcc_phy"; - regulator-always-on; - regulator-boot-on; - }; - - es8316-sound { - compatible = "simple-audio-card"; - simple-audio-card,format = "i2s"; - simple-audio-card,name = "rockchip,es8316-codec"; - simple-audio-card,mclk-fs = <256>; - simple-audio-card,widgets = - "Microphone", "Mic Jack", - "Headphone", "Headphone Jack"; - simple-audio-card,routing = - "Mic Jack", "MICBIAS1", - "IN1P", "Mic Jack", - "Headphone Jack", "HPOL", - "Headphone Jack", "HPOR"; - simple-audio-card,cpu { - sound-dai = <&i2s0>; - }; - simple-audio-card,codec { - sound-dai = <&es8316>; - }; - }; - - spdif-sound { - compatible = "simple-audio-card"; - simple-audio-card,name = "rockchip,spdif"; - simple-audio-card,cpu { - sound-dai = <&spdif>; - }; - simple-audio-card,codec { - sound-dai = <&spdif_out>; - }; - }; - - spdif_out: spdif-out { - compatible = "linux,spdif-dit"; - #sound-dai-cells = <0>; - }; - - sdio_pwrseq: sdio-pwrseq { - compatible = "mmc-pwrseq-simple"; - clocks = <&rk818 1>; - clock-names = "ext_clock"; - pinctrl-names = "default"; - pinctrl-0 = <&wifi_enable_h>; - - /* - * On the module itself this is one of these (depending - * on the actual card populated): - * - SDIO_RESET_L_WL_REG_ON - * - PDN (power down when low) - */ - reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */ - }; - - wireless-wlan { - compatible = "wlan-platdata"; - rockchip,grf = <&grf>; - wifi_chip_type = "ap6354"; - sdio_vref = <1800>; - WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */ - status = "okay"; - }; - - wireless-bluetooth { - compatible = "bluetooth-platdata"; - clocks = <&rk818 1>; - clock-names = "ext_clock"; - //wifi-bt-power-toggle; - uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */ - pinctrl-names = "default", "rts_gpio"; - pinctrl-0 = <&uart0_rts>; - pinctrl-1 = <&uart0_gpios>; - //BT,power_gpio = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */ - BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */ - BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */ - BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */ - status = "okay"; - }; - - uboot-charge { - compatible = "rockchip,uboot-charge"; - rockchip,uboot-charge-on = <0>; - rockchip,android-charge-on = <1>; - }; - - vibrator { - compatible = "rk-vibrator-gpio"; - vibrator-gpio = <&gpio4 30 GPIO_ACTIVE_LOW>; - status = "okay"; - }; - - rk_headset { - compatible = "rockchip_headset"; - headset_gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&hp_det>; - io-channels = <&saradc 2>; - }; -}; - -&rk_key { - compatible = "rockchip,key"; - status = "okay"; - - io-channels = <&saradc 1>; - - vol-up-key { - linux,code = <114>; - label = "volume up"; - rockchip,adc_value = <1>; - }; - - vol-down-key { - linux,code = <115>; - label = "volume down"; - rockchip,adc_value = <170>; - }; - - power-key { - gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; - linux,code = <116>; - label = "power"; - gpio-key,wakeup; - }; - - menu-key { - linux,code = <59>; - label = "menu"; - rockchip,adc_value = <746>; - }; - - home-key { - linux,code = <102>; - label = "home"; - rockchip,adc_value = <355>; - }; - - back-key { - linux,code = <158>; - label = "back"; - rockchip,adc_value = <560>; - }; - - camera-key { - linux,code = <212>; - label = "camera"; - rockchip,adc_value = <450>; - }; -}; - -&sdmmc { - clock-frequency = <50000000>; - clock-freq-min-max = <400000 150000000>; - supports-sd; - bus-width = <4>; - cap-mmc-highspeed; - cap-sd-highspeed; - disable-wp; - num-slots = <1>; - //sd-uhs-sdr104; - vqmmc-supply = <&vcc_sd>; - pinctrl-names = "default"; - pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; - status = "okay"; -}; - -&sdio0 { - clock-frequency = <150000000>; - clock-freq-min-max = <200000 150000000>; - supports-sdio; - bus-width = <4>; - disable-wp; - cap-sd-highspeed; - cap-sdio-irq; - keep-power-in-suspend; - mmc-pwrseq = <&sdio_pwrseq>; - non-removable; - num-slots = <1>; - pinctrl-names = "default"; - pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; - sd-uhs-sdr104; - status = "okay"; -}; - -&emmc_phy { - status = "okay"; -}; - -&sdhci { - bus-width = <8>; - mmc-hs400-1_8v; - supports-emmc; - non-removable; - keep-power-in-suspend; - mmc-hs400-enhanced-strobe; - status = "okay"; -}; - -&i2s0 { - status = "okay"; - rockchip,i2s-broken-burst-len; - rockchip,playback-channels = <8>; - rockchip,capture-channels = <8>; - #sound-dai-cells = <0>; -}; - -&i2s2 { - #sound-dai-cells = <0>; -}; - -&io_domains { - status = "okay"; - - bt656-supply = <&vcc1v8_dvp>; - audio-supply = <&vcca1v8_codec>; - sdmmc-supply = <&vcc_sd>; - gpio1830-supply = <&vcc_3v0>; -}; - -&spdif { - status = "okay"; - #sound-dai-cells = <0>; -}; - -&i2c0 { - status = "okay"; - i2c-scl-rising-time-ns = <180>; - i2c-scl-falling-time-ns = <30>; - clock-frequency = <400000>; - - vdd_cpu_b: syr837@40 { - compatible = "silergy,syr827"; - reg = <0x40>; - vin-supply = <&vcc_sys>; - regulator-compatible = "fan53555-reg"; - 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-initial-state = <3>; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdd_gpu: syr828@41 { - compatible = "silergy,syr828"; - status = "okay"; - reg = <0x41>; - vin-supply = <&vcc_sys>; - regulator-compatible = "fan53555-reg"; - pinctrl-0 = <&vsel2_gpio>; - vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; - regulator-name = "vdd_gpu"; - regulator-min-microvolt = <735000>; - regulator-max-microvolt = <1400000>; - regulator-ramp-delay = <1000>; - fcs,suspend-voltage-selector = <1>; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - rk818: pmic@1c { - compatible = "rockchip,rk818"; - status = "okay"; - reg = <0x1c>; - clock-output-names = "xin32k", "wifibt_32kin"; - interrupt-parent = <&gpio1>; - interrupts = <21 IRQ_TYPE_LEVEL_LOW>; - 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; - extcon = <&fusb0>; - #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 = <3300000>; - regulator-name = "vcc_sd"; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3300000>; - }; - }; - - vcc3v3_s0: SWITCH_REG { - regulator-always-on; - regulator-boot-on; - regulator-name = "vcc3v3_s0"; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - }; - - 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>; - }; - }; -}; - -&i2c1 { - status = "okay"; - i2c-scl-rising-time-ns = <140>; - i2c-scl-falling-time-ns = <30>; - - es8316: es8316@10 { - #sound-dai-cells = <0>; - compatible = "everest,es8316"; - reg = <0x11>; - clocks = <&cru SCLK_I2S_8CH_OUT>; - clock-names = "mclk"; - spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; - }; -}; - -&i2c4 { - status = "okay"; - i2c-scl-rising-time-ns = <345>; - i2c-scl-falling-time-ns = <11>; - clock-frequency = <400000>; - - lsm330_accel@1e { - status = "okay"; - compatible = "lsm330_acc"; - pinctrl-names = "default"; - pinctrl-0 = <&lsm330a_irq_gpio>; - reg = <0x1e>; - irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>; - type = ; - irq_enable = <1>; - poll_delay_ms = <30>; - power-off-in-suspend = <1>; - layout = <4>; - }; - - lsm330_gyro@6a { - status = "okay"; - compatible = "lsm330_gyro"; - pinctrl-names = "default"; - pinctrl-0 = <&lsm330g_irq_gpio>; - reg = <0x6a>; - irq-gpio = <&gpio1 20 IRQ_TYPE_EDGE_RISING>; - type = ; - irq_enable = <0>; - power-off-in-suspend = <1>; - poll_delay_ms = <30>; - }; - - mpu6500@68 { - status = "disabled"; - compatible = "invensense,mpu6500"; - pinctrl-names = "default"; - pinctrl-0 = <&mpu6500_irq_gpio>; - reg = <0x68>; - irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>; - mpu-int_config = <0x10>; - mpu-level_shifter = <0>; - mpu-orientation = <1 0 0 0 1 0 0 0 1>; - orientation-x= <1>; - orientation-y= <1>; - orientation-z= <0>; - support-hw-poweroff = <1>; - mpu-debug = <1>; - }; - - sensor@0d { - status = "okay"; - compatible = "ak8963"; - pinctrl-names = "default"; - pinctrl-0 = <&ak8963_irq_gpio>; - reg = <0x0d>; - type = ; - irq-gpio = <&gpio2 28 IRQ_TYPE_EDGE_RISING>; - irq_enable = <0>; - poll_delay_ms = <30>; - layout = <3>; - }; - - sensor@10 { - status = "okay"; - compatible = "capella,light_cm3218"; - pinctrl-names = "default"; - pinctrl-0 = <&cm3218_irq_gpio>; - reg = <0x10>; - type = ; - irq-gpio = <&gpio4 24 IRQ_TYPE_EDGE_FALLING>; - irq_enable = <1>; - poll_delay_ms = <30>; - }; - - fusb0: fusb30x@22 { - compatible = "fairchild,fusb302"; - reg = <0x22>; - pinctrl-names = "default"; - pinctrl-0 = <&fusb0_int>; - int-n-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; -}; - -&i2c5 { - status = "okay"; - i2c-scl-rising-time-ns = <150>; - i2c-scl-falling-time-ns = <30>; - clock-frequency = <400000>; - - gt9xx: gt9xx@14 { - compatible = "goodix,gt9xx"; - reg = <0x14>; - touch-gpio = <&gpio3 12 IRQ_TYPE_LEVEL_LOW>; - reset-gpio = <&gpio3 13 GPIO_ACTIVE_HIGH>; - max-x = <1536>; - max-y = <2048>; - tp-size = <970>; - tp-supply = <&vcc3v0_tp>; - }; -}; - -&isp0 { - status = "okay"; -}; - -&isp1 { - status = "okay"; -}; - -&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>; -}; - -&rga { - status = "okay"; -}; - -&spi1 { - status = "disabled"; - max-freq = <50000000>; - mpu6500@0 { - status = "disabled"; - compatible = "inv-spi,mpu6500"; - pinctrl-names = "default"; - pinctrl-0 = <&mpu6500_irq_gpio>; - irq-gpio = <&gpio2 27 IRQ_TYPE_EDGE_RISING>; - reg = <0>; - spi-max-frequency = <1000000>; - spi-cpha; - spi-cpol; - mpu-int_config = <0x00>; - mpu-level_shifter = <0>; - mpu-orientation = <1 0 0 0 1 0 0 0 1>; - orientation-x= <1>; - orientation-y= <0>; - orientation-z= <1>; - support-hw-poweroff = <1>; - mpu-debug = <1>; - }; -}; - -&tcphy0 { - extcon = <&fusb0>; - status = "okay"; -}; - -&tsadc { - rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ - rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ - status = "okay"; -}; - -&u2phy0 { - status = "okay"; - extcon = <&fusb0>; - - u2phy0_otg: otg-port { - status = "okay"; - }; - - u2phy0_host: host-port { - phy-supply = <&vcc5v0_host>; - status = "okay"; - }; -}; - -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_xfer &uart0_cts>; - status = "okay"; -}; - -&uart2 { - status = "okay"; -}; - -&usb_host0_ehci { - status = "okay"; -}; - -&usb_host0_ohci { - status = "okay"; -}; - -&usbdrd3_0 { - extcon = <&fusb0>; - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; -}; - -&vop0_pwm { - assigned-clocks = <&cru SCLK_VOP0_PWM>; - assigned-clock-rates = <50000000>; - status = "okay"; -}; - -&pwm2 { - status = "okay"; -}; - -&saradc { - status = "okay"; -}; - -&pinctrl { - sdio-pwrseq { - wifi_enable_h: wifi-enable-h { - rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - wireless-bluetooth { - uart0_gpios: uart0-gpios { - rockchip,pins = <2 19 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - pmic_int_l: pmic-int-l { - rockchip,pins = - <1 21 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - pmic_dvs2: pmic-dvs2 { - rockchip,pins = - <1 18 RK_FUNC_GPIO &pcfg_pull_down>; - }; - 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>; - }; - }; - - hallsensor { - mh248_irq_gpio: mh248-irq-gpio { - rockchip,pins = <1 2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - headphone { - hp_det: hp-det { - rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - lcdpwr-enable { - lcdpwr_enable_h: lcdpwr-enable-h { - rockchip,pins = <3 8 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - lsm330_a { - lsm330a_irq_gpio: lsm330a-irq-gpio { - rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - lsm330_g { - lsm330g_irq_gpio: lsm330g-irq-gpio { - rockchip,pins = <1 20 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - mpu6500 { - mpu6500_irq_gpio: mpu6500-irq-gpio { - rockchip,pins = <2 27 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - ak8963 { - ak8963_irq_gpio: ak8963-irq-gpio { - rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - cm3218 { - cm3218_irq_gpio: cm3218-irq-gpio { - rockchip,pins = <4 24 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - usb2 { - host_vbus_drv: host-vbus-drv { - rockchip,pins = - <4 25 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - fusb30x { - fusb0_int: fusb0-int { - rockchip,pins = - <1 1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; - -&rk_screen { - #include -}; - -&cdn_dp_sound { - status = "okay"; -}; - -&cdn_dp_fb { - status = "okay"; - extcon = <&fusb0>; - phys = <&tcphy0_dp>; - dp_vop_sel = ; -}; - -&vopb_rk_fb { - status = "okay"; - rockchip,cabc_mode = <1>; - power_ctr: power_ctr { - rockchip,debug = <0>; - - lcd_en: lcd-en { - rockchip,power_type = ; - pinctrl-names = "default"; - pinctrl-0 = <&lcdpwr_enable_h>; - gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>; - rockchip,delay = <10>; - }; - }; -}; - -&vopl_rk_fb { - status = "okay"; -}; - -&edp_rk_fb { - status = "okay"; -}; - -&pvtm { - status = "okay"; -}; - -&pmu_pvtm { - status = "okay"; -}; - -&pmu_io_domains { - status = "okay"; - pmu1830-supply = <&vcc_1v8>; -}; - diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rv1-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-rv1-android.dts index cc72207d2cea..0461ba3e82db 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rv1-android.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-rv1-android.dts @@ -44,7 +44,7 @@ #include #include #include "rk3399.dtsi" -#include "rk3399-android.dtsi" +#include "rk3399-android-6.0.dtsi" #include "rk3399-opp.dtsi" / { diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-box-android-6.0.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-box-android-6.0.dts new file mode 100644 index 000000000000..d2d79b1eb16d --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-box-android-6.0.dts @@ -0,0 +1,186 @@ +/* + * 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 +#include "rk3399-excavator-sapphire.dtsi" +#include "rk3399-android-6.0.dtsi" + +/ { + compatible = "rockchip,rk3399-excavator-box", "rockchip,rk3399"; + + test-power { + status = "okay"; + }; +}; + +&rk_screen { + #include +}; + +&disp_timings { + native-mode = <&timing1>; /* 1080p */ +}; + +&dw_hdmi_audio { + status = "okay"; +}; + +&fb { + rockchip,disp-mode = ; + rockchip,disp-policy = ; +}; + +&hdmi_rk_fb { + status = "okay"; + rockchip,hdmi_video_source = ; +}; + +&hdmi_sound { + status = "okay"; +}; + +&pwm3 { + status = "okay"; + interrupts = ; + compatible = "rockchip,remotectl-pwm"; + remote_pwm_id = <3>; + handle_cpu_id = <0>; + + ir_key1 { + rockchip,usercode = <0x4040>; + rockchip,key_table = + <0xf2 KEY_REPLY>, + <0xba KEY_BACK>, + <0xf4 KEY_UP>, + <0xf1 KEY_DOWN>, + <0xef KEY_LEFT>, + <0xee KEY_RIGHT>, + <0xbd KEY_HOME>, + <0xea KEY_VOLUMEUP>, + <0xe3 KEY_VOLUMEDOWN>, + <0xe2 KEY_SEARCH>, + <0xb2 KEY_POWER>, + <0xbc KEY_MUTE>, + <0xec KEY_MENU>, + <0xbf 0x190>, + <0xe0 0x191>, + <0xe1 0x192>, + <0xe9 183>, + <0xe6 248>, + <0xe8 185>, + <0xe7 186>, + <0xf0 388>, + <0xbe 0x175>; + }; + + ir_key2 { + rockchip,usercode = <0xff00>; + rockchip,key_table = + <0xf9 KEY_HOME>, + <0xbf KEY_BACK>, + <0xfb KEY_MENU>, + <0xaa KEY_REPLY>, + <0xb9 KEY_UP>, + <0xe9 KEY_DOWN>, + <0xb8 KEY_LEFT>, + <0xea KEY_RIGHT>, + <0xeb KEY_VOLUMEDOWN>, + <0xef KEY_VOLUMEUP>, + <0xf7 KEY_MUTE>, + <0xe7 KEY_POWER>, + <0xfc KEY_POWER>, + <0xa9 KEY_VOLUMEDOWN>, + <0xa8 KEY_VOLUMEDOWN>, + <0xe0 KEY_VOLUMEDOWN>, + <0xa5 KEY_VOLUMEDOWN>, + <0xab 183>, + <0xb7 388>, + <0xf8 184>, + <0xaf 185>, + <0xed KEY_VOLUMEDOWN>, + <0xee 186>, + <0xb3 KEY_VOLUMEDOWN>, + <0xf1 KEY_VOLUMEDOWN>, + <0xf2 KEY_VOLUMEDOWN>, + <0xf3 KEY_SEARCH>, + <0xb4 KEY_VOLUMEDOWN>, + <0xbe KEY_SEARCH>; + }; + + ir_key3 { + rockchip,usercode = <0x1dcc>; + rockchip,key_table = + <0xee KEY_REPLY>, + <0xf0 KEY_BACK>, + <0xf8 KEY_UP>, + <0xbb KEY_DOWN>, + <0xef KEY_LEFT>, + <0xed KEY_RIGHT>, + <0xfc KEY_HOME>, + <0xf1 KEY_VOLUMEUP>, + <0xfd KEY_VOLUMEDOWN>, + <0xb7 KEY_SEARCH>, + <0xff KEY_POWER>, + <0xf3 KEY_MUTE>, + <0xbf KEY_MENU>, + <0xf9 0x191>, + <0xf5 0x192>, + <0xb3 388>, + <0xbe KEY_1>, + <0xba KEY_2>, + <0xb2 KEY_3>, + <0xbd KEY_4>, + <0xf9 KEY_5>, + <0xb1 KEY_6>, + <0xfc KEY_7>, + <0xf8 KEY_8>, + <0xb0 KEY_9>, + <0xb6 KEY_0>, + <0xb5 KEY_BACKSPACE>; + }; +}; + +&vopb_rk_fb { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-box.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-box.dts deleted file mode 100644 index ec08bf870e99..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-box.dts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * 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 -#include "rk3399-excavator-sapphire.dtsi" -#include "rk3399-android.dtsi" - -/ { - compatible = "rockchip,rk3399-excavator-box", "rockchip,rk3399"; - - test-power { - status = "okay"; - }; -}; - -&rk_screen { - #include -}; - -&disp_timings { - native-mode = <&timing1>; /* 1080p */ -}; - -&dw_hdmi_audio { - status = "okay"; -}; - -&fb { - rockchip,disp-mode = ; - rockchip,disp-policy = ; -}; - -&hdmi_rk_fb { - status = "okay"; - rockchip,hdmi_video_source = ; -}; - -&hdmi_sound { - status = "okay"; -}; - -&pwm3 { - status = "okay"; - interrupts = ; - compatible = "rockchip,remotectl-pwm"; - remote_pwm_id = <3>; - handle_cpu_id = <0>; - - ir_key1 { - rockchip,usercode = <0x4040>; - rockchip,key_table = - <0xf2 KEY_REPLY>, - <0xba KEY_BACK>, - <0xf4 KEY_UP>, - <0xf1 KEY_DOWN>, - <0xef KEY_LEFT>, - <0xee KEY_RIGHT>, - <0xbd KEY_HOME>, - <0xea KEY_VOLUMEUP>, - <0xe3 KEY_VOLUMEDOWN>, - <0xe2 KEY_SEARCH>, - <0xb2 KEY_POWER>, - <0xbc KEY_MUTE>, - <0xec KEY_MENU>, - <0xbf 0x190>, - <0xe0 0x191>, - <0xe1 0x192>, - <0xe9 183>, - <0xe6 248>, - <0xe8 185>, - <0xe7 186>, - <0xf0 388>, - <0xbe 0x175>; - }; - - ir_key2 { - rockchip,usercode = <0xff00>; - rockchip,key_table = - <0xf9 KEY_HOME>, - <0xbf KEY_BACK>, - <0xfb KEY_MENU>, - <0xaa KEY_REPLY>, - <0xb9 KEY_UP>, - <0xe9 KEY_DOWN>, - <0xb8 KEY_LEFT>, - <0xea KEY_RIGHT>, - <0xeb KEY_VOLUMEDOWN>, - <0xef KEY_VOLUMEUP>, - <0xf7 KEY_MUTE>, - <0xe7 KEY_POWER>, - <0xfc KEY_POWER>, - <0xa9 KEY_VOLUMEDOWN>, - <0xa8 KEY_VOLUMEDOWN>, - <0xe0 KEY_VOLUMEDOWN>, - <0xa5 KEY_VOLUMEDOWN>, - <0xab 183>, - <0xb7 388>, - <0xf8 184>, - <0xaf 185>, - <0xed KEY_VOLUMEDOWN>, - <0xee 186>, - <0xb3 KEY_VOLUMEDOWN>, - <0xf1 KEY_VOLUMEDOWN>, - <0xf2 KEY_VOLUMEDOWN>, - <0xf3 KEY_SEARCH>, - <0xb4 KEY_VOLUMEDOWN>, - <0xbe KEY_SEARCH>; - }; - - ir_key3 { - rockchip,usercode = <0x1dcc>; - rockchip,key_table = - <0xee KEY_REPLY>, - <0xf0 KEY_BACK>, - <0xf8 KEY_UP>, - <0xbb KEY_DOWN>, - <0xef KEY_LEFT>, - <0xed KEY_RIGHT>, - <0xfc KEY_HOME>, - <0xf1 KEY_VOLUMEUP>, - <0xfd KEY_VOLUMEDOWN>, - <0xb7 KEY_SEARCH>, - <0xff KEY_POWER>, - <0xf3 KEY_MUTE>, - <0xbf KEY_MENU>, - <0xf9 0x191>, - <0xf5 0x192>, - <0xb3 388>, - <0xbe KEY_1>, - <0xba KEY_2>, - <0xb2 KEY_3>, - <0xbd KEY_4>, - <0xf9 KEY_5>, - <0xb1 KEY_6>, - <0xfc KEY_7>, - <0xf8 KEY_8>, - <0xb0 KEY_9>, - <0xb6 KEY_0>, - <0xb5 KEY_BACKSPACE>; - }; -}; - -&vopb_rk_fb { - status = "okay"; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-disvr.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-disvr.dts index ba077312a269..c3ba9a067e2a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-disvr.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-disvr.dts @@ -44,7 +44,7 @@ #include #include "rk3399-excavator-sapphire.dtsi" -#include "rk3399-android.dtsi" +#include "rk3399-android-6.0.dtsi" / { compatible = "rockchip,rk3399-excavator-edp", "rockchip,rk3399"; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-android-6.0.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-android-6.0.dts new file mode 100644 index 000000000000..0d0375b40bb5 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-android-6.0.dts @@ -0,0 +1,258 @@ +/* + * 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 +#include "rk3399-excavator-sapphire.dtsi" +#include "rk3399-android-6.0.dtsi" + +/ { + compatible = "rockchip,rk3399-excavator-edp", "rockchip,rk3399"; + + test-power { + status = "okay"; + }; + + rt5651-sound { + status = "okay"; + }; +}; + +&backlight { + status = "okay"; +}; + +&cdn_dp_fb { + status = "okay"; + extcon = <&fusb0>; + dp_vop_sel = ; +}; + +&cdn_dp_sound { + status = "okay"; +}; + +&edp_rk_fb { + status = "okay"; +}; + +&hdmi_rk_fb { + status = "okay"; + rockchip,hdmi_video_source = ; +}; + +&hdmi_sound { + status = "okay"; +}; + +&pcie_phy { + status = "okay"; +}; + +&pcie0 { + ep-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; + num-lanes = <4>; + pinctrl-names = "default"; + pinctrl-0 = <&pcie_clkreqn>; + status = "okay"; +}; + +&rt5651 { + status = "okay"; +}; + +&i2c0 { + status = "okay"; +}; + +&i2c1 { + status = "okay"; + + gsl3673: gsl3673@40 { + compatible = "GSL,GSL3673"; + reg = <0x40>; + screen_max_x = <1536>; + screen_max_y = <2048>; + irq_gpio_number = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>; + rst_gpio_number = <&gpio4 22 GPIO_ACTIVE_HIGH>; + }; +}; + +&pwm0 { + status = "okay"; +}; + +&pwm3 { + status = "okay"; + interrupts = ; + compatible = "rockchip,remotectl-pwm"; + remote_pwm_id = <3>; + handle_cpu_id = <0>; + + ir_key1 { + rockchip,usercode = <0x4040>; + rockchip,key_table = + <0xf2 KEY_REPLY>, + <0xba KEY_BACK>, + <0xf4 KEY_UP>, + <0xf1 KEY_DOWN>, + <0xef KEY_LEFT>, + <0xee KEY_RIGHT>, + <0xbd KEY_HOME>, + <0xea KEY_VOLUMEUP>, + <0xe3 KEY_VOLUMEDOWN>, + <0xe2 KEY_SEARCH>, + <0xb2 KEY_POWER>, + <0xbc KEY_MUTE>, + <0xec KEY_MENU>, + <0xbf 0x190>, + <0xe0 0x191>, + <0xe1 0x192>, + <0xe9 183>, + <0xe6 248>, + <0xe8 185>, + <0xe7 186>, + <0xf0 388>, + <0xbe 0x175>; + }; + + ir_key2 { + rockchip,usercode = <0xff00>; + rockchip,key_table = + <0xf9 KEY_HOME>, + <0xbf KEY_BACK>, + <0xfb KEY_MENU>, + <0xaa KEY_REPLY>, + <0xb9 KEY_UP>, + <0xe9 KEY_DOWN>, + <0xb8 KEY_LEFT>, + <0xea KEY_RIGHT>, + <0xeb KEY_VOLUMEDOWN>, + <0xef KEY_VOLUMEUP>, + <0xf7 KEY_MUTE>, + <0xe7 KEY_POWER>, + <0xfc KEY_POWER>, + <0xa9 KEY_VOLUMEDOWN>, + <0xa8 KEY_VOLUMEDOWN>, + <0xe0 KEY_VOLUMEDOWN>, + <0xa5 KEY_VOLUMEDOWN>, + <0xab 183>, + <0xb7 388>, + <0xf8 184>, + <0xaf 185>, + <0xed KEY_VOLUMEDOWN>, + <0xee 186>, + <0xb3 KEY_VOLUMEDOWN>, + <0xf1 KEY_VOLUMEDOWN>, + <0xf2 KEY_VOLUMEDOWN>, + <0xf3 KEY_SEARCH>, + <0xb4 KEY_VOLUMEDOWN>, + <0xbe KEY_SEARCH>; + }; + + ir_key3 { + rockchip,usercode = <0x1dcc>; + rockchip,key_table = + <0xee KEY_REPLY>, + <0xf0 KEY_BACK>, + <0xf8 KEY_UP>, + <0xbb KEY_DOWN>, + <0xef KEY_LEFT>, + <0xed KEY_RIGHT>, + <0xfc KEY_HOME>, + <0xf1 KEY_VOLUMEUP>, + <0xfd KEY_VOLUMEDOWN>, + <0xb7 KEY_SEARCH>, + <0xff KEY_POWER>, + <0xf3 KEY_MUTE>, + <0xbf KEY_MENU>, + <0xf9 0x191>, + <0xf5 0x192>, + <0xb3 388>, + <0xbe KEY_1>, + <0xba KEY_2>, + <0xb2 KEY_3>, + <0xbd KEY_4>, + <0xf9 KEY_5>, + <0xb1 KEY_6>, + <0xfc KEY_7>, + <0xf8 KEY_8>, + <0xb0 KEY_9>, + <0xb6 KEY_0>, + <0xb5 KEY_BACKSPACE>; + }; +}; + +&rk_screen { + #include +}; + +&vopb_rk_fb { + status = "okay"; + power_ctr: power_ctr { + rockchip,debug = <0>; + lcd_en: lcd-en { + rockchip,power_type = ; + gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; + rockchip,delay = <10>; + }; + + /* + lcd_cs: lcd-cs { + rockchip,power_type = ; + gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; + rockchip,delay = <10>; + }; + */ + + lcd_rst: lcd-rst { + rockchip,power_type = ; + gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; + rockchip,delay = <5>; + }; + }; +}; + +&vopl_rk_fb { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts deleted file mode 100644 index 8aadb7f65b9a..000000000000 --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts +++ /dev/null @@ -1,258 +0,0 @@ -/* - * 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 -#include "rk3399-excavator-sapphire.dtsi" -#include "rk3399-android.dtsi" - -/ { - compatible = "rockchip,rk3399-excavator-edp", "rockchip,rk3399"; - - test-power { - status = "okay"; - }; - - rt5651-sound { - status = "okay"; - }; -}; - -&backlight { - status = "okay"; -}; - -&cdn_dp_fb { - status = "okay"; - extcon = <&fusb0>; - dp_vop_sel = ; -}; - -&cdn_dp_sound { - status = "okay"; -}; - -&edp_rk_fb { - status = "okay"; -}; - -&hdmi_rk_fb { - status = "okay"; - rockchip,hdmi_video_source = ; -}; - -&hdmi_sound { - status = "okay"; -}; - -&pcie_phy { - status = "okay"; -}; - -&pcie0 { - ep-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; - num-lanes = <4>; - pinctrl-names = "default"; - pinctrl-0 = <&pcie_clkreqn>; - status = "okay"; -}; - -&rt5651 { - status = "okay"; -}; - -&i2c0 { - status = "okay"; -}; - -&i2c1 { - status = "okay"; - - gsl3673: gsl3673@40 { - compatible = "GSL,GSL3673"; - reg = <0x40>; - screen_max_x = <1536>; - screen_max_y = <2048>; - irq_gpio_number = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>; - rst_gpio_number = <&gpio4 22 GPIO_ACTIVE_HIGH>; - }; -}; - -&pwm0 { - status = "okay"; -}; - -&pwm3 { - status = "okay"; - interrupts = ; - compatible = "rockchip,remotectl-pwm"; - remote_pwm_id = <3>; - handle_cpu_id = <0>; - - ir_key1 { - rockchip,usercode = <0x4040>; - rockchip,key_table = - <0xf2 KEY_REPLY>, - <0xba KEY_BACK>, - <0xf4 KEY_UP>, - <0xf1 KEY_DOWN>, - <0xef KEY_LEFT>, - <0xee KEY_RIGHT>, - <0xbd KEY_HOME>, - <0xea KEY_VOLUMEUP>, - <0xe3 KEY_VOLUMEDOWN>, - <0xe2 KEY_SEARCH>, - <0xb2 KEY_POWER>, - <0xbc KEY_MUTE>, - <0xec KEY_MENU>, - <0xbf 0x190>, - <0xe0 0x191>, - <0xe1 0x192>, - <0xe9 183>, - <0xe6 248>, - <0xe8 185>, - <0xe7 186>, - <0xf0 388>, - <0xbe 0x175>; - }; - - ir_key2 { - rockchip,usercode = <0xff00>; - rockchip,key_table = - <0xf9 KEY_HOME>, - <0xbf KEY_BACK>, - <0xfb KEY_MENU>, - <0xaa KEY_REPLY>, - <0xb9 KEY_UP>, - <0xe9 KEY_DOWN>, - <0xb8 KEY_LEFT>, - <0xea KEY_RIGHT>, - <0xeb KEY_VOLUMEDOWN>, - <0xef KEY_VOLUMEUP>, - <0xf7 KEY_MUTE>, - <0xe7 KEY_POWER>, - <0xfc KEY_POWER>, - <0xa9 KEY_VOLUMEDOWN>, - <0xa8 KEY_VOLUMEDOWN>, - <0xe0 KEY_VOLUMEDOWN>, - <0xa5 KEY_VOLUMEDOWN>, - <0xab 183>, - <0xb7 388>, - <0xf8 184>, - <0xaf 185>, - <0xed KEY_VOLUMEDOWN>, - <0xee 186>, - <0xb3 KEY_VOLUMEDOWN>, - <0xf1 KEY_VOLUMEDOWN>, - <0xf2 KEY_VOLUMEDOWN>, - <0xf3 KEY_SEARCH>, - <0xb4 KEY_VOLUMEDOWN>, - <0xbe KEY_SEARCH>; - }; - - ir_key3 { - rockchip,usercode = <0x1dcc>; - rockchip,key_table = - <0xee KEY_REPLY>, - <0xf0 KEY_BACK>, - <0xf8 KEY_UP>, - <0xbb KEY_DOWN>, - <0xef KEY_LEFT>, - <0xed KEY_RIGHT>, - <0xfc KEY_HOME>, - <0xf1 KEY_VOLUMEUP>, - <0xfd KEY_VOLUMEDOWN>, - <0xb7 KEY_SEARCH>, - <0xff KEY_POWER>, - <0xf3 KEY_MUTE>, - <0xbf KEY_MENU>, - <0xf9 0x191>, - <0xf5 0x192>, - <0xb3 388>, - <0xbe KEY_1>, - <0xba KEY_2>, - <0xb2 KEY_3>, - <0xbd KEY_4>, - <0xf9 KEY_5>, - <0xb1 KEY_6>, - <0xfc KEY_7>, - <0xf8 KEY_8>, - <0xb0 KEY_9>, - <0xb6 KEY_0>, - <0xb5 KEY_BACKSPACE>; - }; -}; - -&rk_screen { - #include -}; - -&vopb_rk_fb { - status = "okay"; - power_ctr: power_ctr { - rockchip,debug = <0>; - lcd_en: lcd-en { - rockchip,power_type = ; - gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; - rockchip,delay = <10>; - }; - - /* - lcd_cs: lcd-cs { - rockchip,power_type = ; - gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; - rockchip,delay = <10>; - }; - */ - - lcd_rst: lcd-rst { - rockchip,power_type = ; - gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; - rockchip,delay = <5>; - }; - }; -}; - -&vopl_rk_fb { - status = "okay"; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts b/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts index 4472baa0115a..f1b7e64f3ce7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-vr-android.dts @@ -44,7 +44,7 @@ #include #include #include "rk3399.dtsi" -#include "rk3399-android.dtsi" +#include "rk3399-android-6.0.dtsi" #include "rk3399-opp.dtsi" / {