1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6/dts-v1/;
7#include "rk3399-sapphire-excavator-edp.dtsi"
8
9/ {
10	model = "Rockchip RK3399 Excavator Board edp avb (Android)";
11	compatible = "rockchip,android", "rockchip,rk3399-excavator-edp-avb", "rockchip,rk3399";
12	chosen: chosen {
13	bootargs = "earlycon=uart8250,mmio32,0xff1a0000 console=ttyFIQ0 androidboot.baseband=N/A androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init initrd=0x62000001,0x00800000 coherent_pool=1m";
14	};
15
16	ext_cam_clk: external-camera-clock {
17		compatible = "fixed-clock";
18		clock-frequency = <27000000>;
19		clock-output-names = "CLK_CAMERA_27MHZ";
20		#clock-cells = <0>;
21	};
22};
23
24&i2c1 {
25	status = "okay";
26
27	/delete-node/ tc358749x@0f;
28
29	tc35874x: tc35874x@0f {
30		status = "disabled";
31		reg = <0x0f>;
32		compatible = "toshiba,tc358749";
33		clocks = <&ext_cam_clk>;
34		clock-names = "refclk";
35		reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
36		/* interrupt-parent = <&gpio2>; */
37		/* interrupts = <12 IRQ_TYPE_LEVEL_HIGH>; */
38		pinctrl-names = "default";
39		pinctrl-0 = <&tc35874x_gpios>;
40		rockchip,camera-module-index = <0>;
41		rockchip,camera-module-facing = "back";
42		rockchip,camera-module-name = "TC358749XBG";
43		rockchip,camera-module-lens-name = "NC";
44
45		port {
46			hdmiin_out0: endpoint {
47				remote-endpoint = <&hdmi_to_mipi_in>;
48				data-lanes = <1 2 3 4>;
49				clock-noncontinuous;
50				link-frequencies =
51					/bits/ 64 <297000000>;
52			};
53		};
54	};
55};
56
57&mipi_dphy_rx0 {
58	status = "okay";
59
60	ports {
61		#address-cells = <1>;
62		#size-cells = <0>;
63
64		port@0 {
65			reg = <0>;
66			#address-cells = <1>;
67			#size-cells = <0>;
68
69			mipi_in_ucam0: endpoint@1 {
70				reg = <1>;
71				remote-endpoint = <&ucam_out0>;
72				data-lanes = <1 2>;
73			};
74
75			hdmi_to_mipi_in: endpoint@2 {
76				reg = <2>;
77				remote-endpoint = <&hdmiin_out0>;
78				data-lanes = <1 2 3 4>;
79			};
80		};
81
82		port@1 {
83			reg = <1>;
84			#address-cells = <1>;
85			#size-cells = <0>;
86
87			dphy_rx0_out: endpoint@0 {
88				reg = <0>;
89				remote-endpoint = <&isp0_mipi_in>;
90			};
91		};
92	};
93};
94
95&mipi_dphy_tx1rx1 {
96	status = "disabled";
97};
98
99&pinctrl {
100	hdmiin {
101		tc35874x_gpios: tc35874x_gpios {
102			rockchip,pins =
103				/* PWREN_3.3 */
104				<2 RK_PA5 RK_FUNC_GPIO &pcfg_output_high>,
105				/* PWREN_1.2 */
106				<2 RK_PA6 RK_FUNC_GPIO &pcfg_output_high>,
107				/* HDMIIN_RST */
108				<2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>,
109				/* HDMIIN_STBY */
110				<2 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>,
111				/* MIPI_RST */
112				<2 RK_PB1 RK_FUNC_GPIO &pcfg_output_high>,
113				/* CSI_CTL */
114				<2 RK_PB2 RK_FUNC_GPIO &pcfg_output_low>,
115				/* HDMIIN_INT */
116				<2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
117		};
118	};
119};
120
121&rkisp1_0 {
122	status = "okay";
123};
124
125&rkisp1_1 {
126	status = "disabled";
127};
128
129