1 // SPDX-License-Identifier: GPL-2.0
3 * Device Tree Source for the iWave-RZ/G1H Qseven board development
4 * platform with camera daughter board
6 * Copyright (C) 2020 Renesas Electronics Corp.
11 #include <dt-bindings/media/video-interfaces.h>
13 #include "r8a7742-iwg21d-q7.dts"
16 model = "iWave Systems RZ/G1H Qseven development platform with camera add-on";
17 compatible = "iwave,g21d", "iwave,g21m", "renesas,r8a7742";
27 mclk_cam1: mclk-cam1 {
28 compatible = "fixed-clock";
30 clock-frequency = <26000000>;
33 mclk_cam2: mclk-cam2 {
34 compatible = "fixed-clock";
36 clock-frequency = <26000000>;
39 mclk_cam3: mclk-cam3 {
40 compatible = "fixed-clock";
42 clock-frequency = <26000000>;
45 mclk_cam4: mclk-cam4 {
46 compatible = "fixed-clock";
48 clock-frequency = <26000000>;
52 compatible = "regulator-fixed";
53 regulator-name = "1P8V";
54 regulator-min-microvolt = <1800000>;
55 regulator-max-microvolt = <1800000>;
60 compatible = "regulator-fixed";
61 regulator-name = "2P8V";
62 regulator-min-microvolt = <2800000>;
63 regulator-max-microvolt = <2800000>;
69 /* Pins shared with VIN0, keep status disabled */
74 pinctrl-0 = <&can0_pins>;
75 pinctrl-names = "default";
80 pinctrl-0 = <ðer_pins>;
81 pinctrl-names = "default";
84 renesas,ether-link-active-low;
87 phy1: ethernet-phy@1 {
88 compatible = "ethernet-phy-id0022.1560",
89 "ethernet-phy-ieee802.3-c22";
91 micrel,led-mode = <1>;
96 /* Disable hogging GP0_18 to output LOW */
97 /delete-node/ qspi-en-hog;
99 /* Hog GP0_18 to output HIGH to enable VIN2 */
102 gpios = <18 GPIO_ACTIVE_HIGH>;
104 line-name = "VIN2_EN";
109 pinctrl-0 = <&hscif0_pins>;
110 pinctrl-names = "default";
116 pinctrl-0 = <&i2c1_pins>;
117 pinctrl-names = "default";
119 /* status set to "okay" when needed by camera configuration below */
120 clock-frequency = <400000>;
124 pinctrl-0 = <&i2c3_pins>;
125 pinctrl-names = "default";
127 /* status set to "okay" when needed by camera configuration below */
128 clock-frequency = <400000>;
133 groups = "can0_data_d";
138 groups = "eth_mdio", "eth_rmii";
142 hscif0_pins: hscif0 {
143 groups = "hscif0_data", "hscif0_ctrl";
158 groups = "scif0_data";
163 groups = "scif1_data";
167 scifb1_pins: scifb1 {
168 groups = "scifb1_data";
172 vin0_8bit_pins: vin0 {
173 groups = "vin0_data8", "vin0_clk", "vin0_sync";
177 vin1_8bit_pins: vin1 {
178 groups = "vin1_data8_b", "vin1_clk_b", "vin1_sync_b";
183 groups = "vin2_g8", "vin2_clk";
188 groups = "vin3_data8", "vin3_clk", "vin3_sync";
194 /* Pins shared with VIN2, keep status disabled */
199 pinctrl-0 = <&scif0_pins>;
200 pinctrl-names = "default";
205 pinctrl-0 = <&scif1_pins>;
206 pinctrl-names = "default";
211 pinctrl-0 = <&scifb1_pins>;
212 pinctrl-names = "default";
215 rts-gpios = <&gpio4 21 GPIO_ACTIVE_LOW>;
216 cts-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
220 * Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints
222 * (un)comment the #include statements to change configuration
225 /* 8bit CMOS Camera 1 (J13) */
226 #define CAM_PARENT_I2C i2c0
227 #define MCLK_CAM mclk_cam1
228 #define CAM_EP cam0ep
229 #define VIN_EP vin0ep
231 #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
232 //#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
237 * Set SW2 switch on the SOM to 'ON'
238 * Set SW1 switch on camera board to 'OFF' as we are using 8bit mode
241 pinctrl-0 = <&vin0_8bit_pins>;
242 pinctrl-names = "default";
246 remote-endpoint = <&cam0ep>;
248 bus-type = <MEDIA_BUS_TYPE_BT656>;
252 #endif /* CAM_ENABLED */
254 #undef CAM_PARENT_I2C
259 /* 8bit CMOS Camera 2 (J14) */
260 #define CAM_PARENT_I2C i2c1
261 #define MCLK_CAM mclk_cam2
262 #define CAM_EP cam1ep
263 #define VIN_EP vin1ep
265 #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
266 //#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
270 /* Set SW1 switch on the SOM to 'ON' */
272 pinctrl-0 = <&vin1_8bit_pins>;
273 pinctrl-names = "default";
277 remote-endpoint = <&cam1ep>;
279 bus-type = <MEDIA_BUS_TYPE_BT656>;
284 #endif /* CAM_ENABLED */
286 #undef CAM_PARENT_I2C
291 /* 8bit CMOS Camera 3 (J12) */
292 #define CAM_PARENT_I2C i2c2
293 #define MCLK_CAM mclk_cam3
294 #define CAM_EP cam2ep
295 #define VIN_EP vin2ep
297 #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
298 //#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
303 pinctrl-0 = <&vin2_pins>;
304 pinctrl-names = "default";
308 remote-endpoint = <&cam2ep>;
311 bus-type = <MEDIA_BUS_TYPE_BT656>;
315 #endif /* CAM_ENABLED */
317 #undef CAM_PARENT_I2C
322 /* 8bit CMOS Camera 4 (J11) */
323 #define CAM_PARENT_I2C i2c3
324 #define MCLK_CAM mclk_cam4
325 #define CAM_EP cam3ep
326 #define VIN_EP vin3ep
328 #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
329 //#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
334 pinctrl-0 = <&vin3_pins>;
335 pinctrl-names = "default";
339 remote-endpoint = <&cam3ep>;
341 bus-type = <MEDIA_BUS_TYPE_BT656>;
345 #endif /* CAM_ENABLED */
347 #undef CAM_PARENT_I2C