From 8198924fb7bd1d8b26f9e148bafeecc51a249e5e Mon Sep 17 00:00:00 2001 From: Valentine Barshak Date: Wed, 26 Jun 2019 00:11:17 +0300 Subject: [PATCH 129/211] arm64: dts: renesas: eagle: Add video input support This adds support of MAX9286 GMSL chip connected to the CSI40. Up to 4 video stream channels are routed to VIN[0-3] devices. Signed-off-by: Valentine Barshak --- arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 274 +++++++++++++++++++++++++ 1 file changed, 274 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts b/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts index 800643b..a70337b 100644 --- a/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts +++ b/arch/arm64/boot/dts/renesas/r8a77970-eagle.dts @@ -8,6 +8,7 @@ /dts-v1/; #include "r8a77970.dtsi" +#include / { model = "Renesas Eagle board based on r8a77970"; @@ -108,6 +109,40 @@ }; }; +&csi40 { + status = "okay"; + + virtual,channel { + csi2_vc0 { + data,type = "ycbcr422"; + receive,vc = <0>; + }; + csi2_vc1 { + data,type = "ycbcr422"; + receive,vc = <1>; + }; + csi2_vc2 { + data,type = "ycbcr422"; + receive,vc = <2>; + }; + csi2_vc3 { + data,type = "ycbcr422"; + receive,vc = <3>; + }; + }; + + port { + #address-cells = <1>; + #size-cells = <0>; + + csi40_ep: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + csi-rate = <300>; + }; + }; +}; + &extal_clk { clock-frequency = <16666666>; }; @@ -163,6 +198,128 @@ }; }; +&i2c3 { + pinctrl-0 = <&i2c3_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; + + ov106xx@0 { + compatible = "ovti,ov106xx"; + reg = <0x60>; + + port@0 { + ov106xx_in0: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&vin0ep0>; + }; + }; + port@1 { + ov106xx_max9286_des0ep0: endpoint@0 { + remote-endpoint = <&max9286_des0ep0>; + }; + }; + }; + + ov106xx@1 { + compatible = "ovti,ov106xx"; + reg = <0x61>; + + port@0 { + ov106xx_in1: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&vin1ep0>; + }; + }; + port@1 { + ov106xx_max9286_des0ep1: endpoint@0 { + remote-endpoint = <&max9286_des0ep1>; + }; + }; + }; + + ov106xx@2 { + compatible = "ovti,ov106xx"; + reg = <0x62>; + + port@0 { + ov106xx_in2: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&vin2ep0>; + }; + }; + port@1 { + ov106xx_max9286_des0ep2: endpoint@0 { + remote-endpoint = <&max9286_des0ep2>; + }; + }; + }; + + ov106xx@3 { + compatible = "ovti,ov106xx"; + reg = <0x63>; + + port@0 { + ov106xx_in3: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&vin3ep0>; + }; + }; + port@1 { + ov106xx_des0ep3: endpoint { + remote-endpoint = <&max9286_des0ep3>; + }; + }; + }; + + max9286@0 { + compatible = "maxim,max9286"; + reg = <0x48>; + gpios = <&io_expander 0 GPIO_ACTIVE_LOW>; /* MAX9286 PWDN */ + maxim,gpio0 = <0>; + maxim,sensor_delay = <100>; + maxim,links = <4>; + maxim,lanes = <4>; + maxim,resetb-gpio = <1>; + maxim,fsync-mode = "automatic"; + maxim,timeout = <100>; + + port@0 { + max9286_des0ep0: endpoint@0 { + max9271-addr = <0x50>; + dvp-order = <1>; + remote-endpoint = <&ov106xx_in0>; + }; + max9286_des0ep1: endpoint@1 { + max9271-addr = <0x51>; + dvp-order = <1>; + remote-endpoint = <&ov106xx_in1>; + }; + max9286_des0ep2: endpoint@2 { + max9271-addr = <0x52>; + dvp-order = <1>; + remote-endpoint = <&ov106xx_in2>; + }; + max9286_des0ep3: endpoint@3 { + max9271-addr = <0x53>; + dvp-order = <1>; + remote-endpoint = <&ov106xx_in3>; + }; + }; + port@1 { + max9286_csi0ep0: endpoint { + csi-rate = <700>; + remote-endpoint = <&csi40_ep>; + }; + }; + }; +}; + &pfc { avb_pins: avb0 { groups = "avb0_mdio", "avb0_rgmii", "avb0_txcrefclk"; @@ -179,6 +336,11 @@ function = "i2c0"; }; + i2c3_pins: i2c3 { + groups = "i2c3_a"; + function = "i2c3"; + }; + scif0_pins: scif0 { groups = "scif0_data"; function = "scif0"; @@ -215,3 +377,115 @@ }; }; }; + +&vin0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + vin0ep0: endpoint { + csi,select = "csi40"; + virtual,channel = <0>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&ov106xx_in0>; + }; + }; + port@1 { + csi0ep0: endpoint { + remote-endpoint = <&csi40_ep>; + }; + }; + port@2 { + vin0_max9286_des0ep0: endpoint@0 { + remote-endpoint = <&max9286_des0ep0>; + }; + }; + }; +}; + +&vin1 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + vin1ep0: endpoint { + csi,select = "csi40"; + virtual,channel = <1>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&ov106xx_in1>; + }; + }; + port@1 { + csi0ep1: endpoint { + remote-endpoint = <&csi40_ep>; + }; + }; + port@2 { + vin1_max9286_des0ep1: endpoint@0 { + remote-endpoint = <&max9286_des0ep1>; + }; + }; + }; +}; + +&vin2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + vin2ep0: endpoint { + csi,select = "csi40"; + virtual,channel = <2>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&ov106xx_in2>; + }; + }; + port@1 { + csi0ep2: endpoint { + remote-endpoint = <&csi40_ep>; + }; + }; + port@2 { + vin2_max9286_des0ep2: endpoint@0 { + remote-endpoint = <&max9286_des0ep2>; + }; + }; + }; +}; + +&vin3 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + vin3ep0: endpoint { + csi,select = "csi40"; + virtual,channel = <3>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&ov106xx_in3>; + }; + }; + port@1 { + csi0ep3: endpoint { + remote-endpoint = <&csi40_ep>; + }; + }; + port@2 { + vin3_max9286_des0ep3: endpoint@0 { + remote-endpoint = <&max9286_des0ep3>; + }; + }; + }; +}; -- 2.7.4