From 8e2e12b95aa673bc778dff711ebe5a845582cc6c Mon Sep 17 00:00:00 2001 From: Hu Kejun Date: Mon, 3 Jun 2019 10:58:42 +0800 Subject: [PATCH] arm64: dts: rockchip: add rk3399-sapphire-excavator-edp-avb-rk1608 Change-Id: I3563aab4d0b3cc5e0d37ea9872f26cc860192682 Signed-off-by: Hu Kejun --- arch/arm64/boot/dts/rockchip/Makefile | 1 + ...3399-sapphire-excavator-edp-avb-rk1608.dts | 51 +++ .../rk3399-sapphire-excavator-edp-rk1608.dtsi | 416 ++++++++++++++++++ 3 files changed, 468 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb-rk1608.dts create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-rk1608.dtsi diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 25f9cced592b..b878c2377174 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -104,6 +104,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-disvr.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp-android-6.0.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp-avb.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-edp-avb-rk1608.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-linux.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator-linux-for-rk1808-cascade.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-tve1030g.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb-rk1608.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb-rk1608.dts new file mode 100644 index 000000000000..b2549b9f000f --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-avb-rk1608.dts @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd + */ + +/dts-v1/; +#include "rk3399-sapphire-excavator-edp-rk1608.dtsi" + +/ { + model = "Rockchip RK3399 Excavator Board edp avb (Android)"; + compatible = "rockchip,android", "rockchip,rk3399-excavator-edp-avb", "rockchip,rk3399"; + chosen { + bootargs = "earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 console=ttyFIQ0 androidboot.baseband=N/A androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init initrd=0x62000001,0x00800000 coherent_pool=1m"; + }; + +}; +&firmware_android { + compatible = "android,firmware"; + boot_devices = "fe330000.sdhci"; + vbmeta { + compatible = "android,vbmeta"; + parts = "vbmeta,boot,system,vendor,dtbo"; + }; + fstab { + compatible = "android,fstab"; + vendor { + compatible = "android,vendor"; + dev = "/dev/block/by-name/vendor"; + type = "ext4"; + mnt_flags = "ro,barrier=1,inode_readahead_blks=8"; + fsmgr_flags = "wait,avb"; + }; + }; +}; + +&mipi_dphy_rx0 { + status = "okay"; +}; + +&mipi_dphy_tx1rx1 { + status = "disabled"; +}; + +&rkisp1_0 { + status = "okay"; +}; + +&rkisp1_1 { + status = "disabled"; +}; + diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-rk1608.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-rk1608.dtsi new file mode 100644 index 000000000000..e898a9da2041 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp-rk1608.dtsi @@ -0,0 +1,416 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd. + */ + +/dts-v1/; + +#include "rk3399-excavator-sapphire.dtsi" +#include "rk3399-android.dtsi" +#include "rk3399-vop-clk-set.dtsi" + +#define LINK_FREQ 375000000 + +/ { + vcc_lcd: vcc-lcd { + compatible = "regulator-fixed"; + regulator-name = "vcc_lcd"; + gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>; + startup-delay-us = <20000>; + enable-active-high; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + vin-supply = <&vcc5v0_sys>; + }; + + panel: panel { + compatible = "simple-panel"; + backlight = <&backlight>; + power-supply = <&vcc_lcd>; + enable-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>; + prepare-delay-ms = <20>; + enable-delay-ms = <20>; + + display-timings { + native-mode = <&timing0>; + + timing0: timing0 { + clock-frequency = <200000000>; + hactive = <1536>; + vactive = <2048>; + hfront-porch = <12>; + hsync-len = <16>; + hback-porch = <48>; + vfront-porch = <8>; + vsync-len = <4>; + vback-porch = <8>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + }; + + ports { + panel_in: endpoint { + remote-endpoint = <&edp_out>; + }; + }; + }; + + test-power { + status = "okay"; + }; + + rt5651-sound { + status = "disabled"; + }; + + hdmiin-sound { + compatible = "rockchip,rockchip-rt5651-tc358749x-sound"; + rockchip,cpu = <&i2s0>; + rockchip,codec = <&rt5651 &rt5651 &tc358749x>; + status = "okay"; + }; + + mipidphy0: mipidphy0 { + compatible = "rockchip,rk1608-dphy"; + status = "okay"; + rockchip,grf = <&grf>; + id = <0>; + cam_nums = <1>; + in_mipi = <0>; + out_mipi = <0>; + link-freqs = /bits/ 64 ; + sensor_i2c_bus = <6>; + sensor_i2c_addr = <0x1A>; + sensor-name = "JASDAR"; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "PREISP"; + rockchip,camera-module-lens-name = "PREISP"; + + format-config-0 { + data_type = <0x1e>; + mipi_lane = <4>; + field = <1>; + colorspace = <8>; + code = ; + width = <2560>; + height= <1440>; + + hactive = <5120>; + vactive = <1440>; + htotal = <5800>; + vtotal = <1800>; + inch0-info = <2560 720 0x1e 0x2a 0x0F>; + inch1-info = <2560 720 0x5e 0x2a 0x0F>; + inch2-info = <2560 720 0x9e 0x2a 0x0F>; + inch3-info = <2560 720 0xde 0x2a 0x0F>; + outch0-info = <5120 1440 0x1e 0x2a 1>; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + rk1608_dphy0_in: endpoint { + remote-endpoint = <&rk1608_out0>; + }; + }; + port@1 { + rk1608_dphy_out: endpoint { + remote-endpoint = <&mipi_in_cam>; + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + clock-noncontinuous; + link-frequencies = + /bits/ 64 ; + }; + }; + }; + }; +}; + +&backlight { + status = "okay"; + enable-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; +}; + +&edp { + status = "okay"; + force-hpd; + + ports { + port@1 { + reg = <1>; + + edp_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; +}; + +&edp_in_vopl { + status = "disabled"; +}; + +&hdmi { + status = "okay"; +}; + +&hdmi_in_vopb { + status = "disabled"; +}; + +&rt5651 { + status = "okay"; +}; + +&cdn_dp { + status = "okay"; + extcon = <&fusb0>; + phys = <&tcphy0_dp>; +}; + +&hdmi_dp_sound { + status = "okay"; +}; + +&dp_in_vopb { + status = "disabled"; +}; + +&i2s2 { + status = "okay"; +}; + +&spi5 { + status = "okay"; + max-freq = <50000000>; + pinctrl-names = "default"; + pinctrl-0 = <&spi5_clk &spi5_tx &spi5_rx &spi5_cs0>; + + spi_rk1608@00 { + compatible = "rockchip,rk1608"; + status = "okay"; + reg = <0>; + spi-max-frequency = <12500000>; + spi-min-frequency = <06250000>; + + clocks = <&cru SCLK_CIF_OUT>; + clock-names = "mclk"; + + firmware-names = "preisp_4in1.rkl"; + + reset-gpios = <&gpio2 RK_PD0 GPIO_ACTIVE_HIGH>; + irq-gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&preisp_irq_gpios &preisp_reset_gpios>; + + power-domains = <&power RK3399_PD_SDIOAUDIO>; + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + #address-cells = <1>; + #size-cells = <0>; + + reg = <0>; + rk1608_out0: endpoint@0 { + reg = <0>; + remote-endpoint = <&rk1608_dphy0_in>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + + reg = <1>; + rk1608_in0: endpoint@0 { + reg = <0>; + remote-endpoint = <&cam_out>; + }; + }; + }; + }; +}; + +&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>; + }; + + tc358749x: tc358749x@0f { + compatible = "toshiba,tc358749x"; + reg = <0x0f>; + power-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; + power18-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>; + power33-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; + csi-ctl-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; + stanby-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>; + int-gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&hdmiin_gpios>; + status = "disabled"; + }; + + jaguar1: jaguar1@30 { + compatible = "jaguar1-v4l2"; + status = "okay"; + reg = <0x30>; + clocks = <&cru SCLK_CIF_OUT>; + clock-names = "xvclk"; + pd-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; // conflict with csi-ctl-gpios + rst-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "jaguar1"; + rockchip,camera-module-lens-name = "jaguar1"; + port { + cam_out: endpoint { + remote-endpoint = <&rk1608_in0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&i2c6 { + cw2015@62 { + status = "disabled"; + compatible = "cw201x"; + reg = <0x62>; + bat_config_info = <0x15 0x42 0x60 0x59 0x52 0x58 0x4D 0x48 + 0x48 0x44 0x44 0x46 0x49 0x48 0x32 0x24 + 0x20 0x17 0x13 0x0F 0x19 0x3E 0x51 0x45 + 0x08 0x76 0x0B 0x85 0x0E 0x1C 0x2E 0x3E + 0x4D 0x52 0x52 0x57 0x3D 0x1B 0x6A 0x2D + 0x25 0x43 0x52 0x87 0x8F 0x91 0x94 0x52 + 0x82 0x8C 0x92 0x96 0xFF 0x7B 0xBB 0xCB + 0x2F 0x7D 0x72 0xA5 0xB5 0xC1 0x46 0xAE>; + monitor_sec = <5>; + virtual_power = <0>; + }; +}; + +&isp0_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&mipi_dphy_rx0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_in_cam: endpoint@1 { + reg = <1>; + remote-endpoint = <&rk1608_dphy_out>; + data-lanes = <1 2 3 4>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + dphy_rx0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&isp0_mipi_in>; + }; + }; + }; +}; + +&vopb { + assigned-clocks = <&cru DCLK_VOP0_DIV>; + assigned-clock-parents = <&cru PLL_CPLL>; +}; + +&vopl { + assigned-clocks = <&cru DCLK_VOP1_DIV>; + assigned-clock-parents = <&cru PLL_VPLL>; +}; + +&pcie_phy { + status = "okay"; +}; + +&pcie0 { + status = "okay"; +}; + +&rkisp1_0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_mipi_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&dphy_rx0_out>; + }; + }; +}; + +&route_edp { + status = "okay"; +}; + +&pinctrl { + lcd-panel { + lcd_panel_reset: lcd-panel-reset { + rockchip,pins = <4 30 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + hdmiin { + hdmiin_gpios: hdmiin_gpios { + rockchip,pins = + <2 5 RK_FUNC_GPIO &pcfg_pull_none>, + <2 6 RK_FUNC_GPIO &pcfg_pull_none>, + <2 7 RK_FUNC_GPIO &pcfg_pull_none>, + <2 8 RK_FUNC_GPIO &pcfg_pull_none>, + <2 9 RK_FUNC_GPIO &pcfg_pull_none>, + <2 12 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + preisp_reset_gpios { + preisp_reset_gpios: preisp_reset_gpios { + rockchip,pins = <2 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + preisp_irq_gpios { + preisp_irq_gpios: preisp_irq_gpios { + rockchip,pins = <2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; +