* [PATCH v5 0/2] ARM: dts: r8a7742-iwg21d-q7-dbcm: Add support for ov7725 sensors
@ 2021-01-22 11:34 ` Geert Uytterhoeven
0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 11:34 UTC (permalink / raw)
To: Prabhakar, Magnus Damm, Rob Herring
Cc: Biju Das, Jacopo Mondi, linux-renesas-soc, linux-arm-kernel,
devicetree, Geert Uytterhoeven
Hi Prabhakar,
This is an alternative version of your v3[1], decribing only a single
camera in each .dtsi file, to be included multiple times.
Changes compared to v4:
- Only enable i2c buses when needed.
I plan to queue this in renesas-devel for-v5.12.
Thanks for your comments!
[1] https://lore.kernel.org/linux-devicetree/20201126103053.29881-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
Lad Prabhakar (2):
ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes
ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725
sensors
.../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 159 +++++++++---------
.../r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi | 32 ++++
.../r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 29 ++++
3 files changed, 140 insertions(+), 80 deletions(-)
create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
--
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v5 0/2] ARM: dts: r8a7742-iwg21d-q7-dbcm: Add support for ov7725 sensors
@ 2021-01-22 11:34 ` Geert Uytterhoeven
0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 11:34 UTC (permalink / raw)
To: Prabhakar, Magnus Damm, Rob Herring
Cc: devicetree, Jacopo Mondi, Geert Uytterhoeven, linux-renesas-soc,
Biju Das, linux-arm-kernel
Hi Prabhakar,
This is an alternative version of your v3[1], decribing only a single
camera in each .dtsi file, to be included multiple times.
Changes compared to v4:
- Only enable i2c buses when needed.
I plan to queue this in renesas-devel for-v5.12.
Thanks for your comments!
[1] https://lore.kernel.org/linux-devicetree/20201126103053.29881-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
Lad Prabhakar (2):
ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes
ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725
sensors
.../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 159 +++++++++---------
.../r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi | 32 ++++
.../r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 29 ++++
3 files changed, 140 insertions(+), 80 deletions(-)
create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
--
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v5 1/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes
2021-01-22 11:34 ` Geert Uytterhoeven
@ 2021-01-22 11:34 ` Geert Uytterhoeven
-1 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 11:34 UTC (permalink / raw)
To: Prabhakar, Magnus Damm, Rob Herring
Cc: Biju Das, Jacopo Mondi, linux-renesas-soc, linux-arm-kernel,
devicetree, Lad Prabhakar, Geert Uytterhoeven
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
The camera daughter board can also be connected to 8-bit ov7725 sensors,
so in preparation for configurable option to choose depending on the
camera's connected separate out the ov5640 nodes in a dtsi file.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
[geert: describe a single camera in the .dtsi, include multiple times]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v5:
- Only enable i2c buses when needed,
v4:
- Describe a single camera in the .dtsi file,
- Include the .dtsi multiple times.
---
.../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 155 +++++++++---------
.../r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi | 32 ++++
2 files changed, 107 insertions(+), 80 deletions(-)
create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
index 98c3fbd89fa6c5c7..bc8280b2ac47e3ec 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
@@ -91,92 +91,20 @@ &hscif0 {
status = "okay";
};
-&i2c0 {
- ov5640@3c {
- compatible = "ovti,ov5640";
- reg = <0x3c>;
- clocks = <&mclk_cam1>;
- clock-names = "xclk";
-
- port {
- ov5640_0: endpoint {
- bus-width = <8>;
- data-shift = <2>;
- bus-type = <6>;
- pclk-sample = <1>;
- remote-endpoint = <&vin0ep>;
- };
- };
- };
-};
-
&i2c1 {
pinctrl-0 = <&i2c1_pins>;
pinctrl-names = "default";
- status = "okay";
+ /* status set to "okay" when needed by camera configuration below */
clock-frequency = <400000>;
-
- ov5640@3c {
- compatible = "ovti,ov5640";
- reg = <0x3c>;
- clocks = <&mclk_cam2>;
- clock-names = "xclk";
-
- port {
- ov5640_1: endpoint {
- bus-width = <8>;
- data-shift = <2>;
- bus-type = <6>;
- pclk-sample = <1>;
- remote-endpoint = <&vin1ep>;
- };
- };
- };
-};
-
-&i2c2 {
- ov5640@3c {
- compatible = "ovti,ov5640";
- reg = <0x3c>;
- clocks = <&mclk_cam3>;
- clock-names = "xclk";
-
- port {
- ov5640_2: endpoint {
- bus-width = <8>;
- data-shift = <2>;
- bus-type = <6>;
- pclk-sample = <1>;
- remote-endpoint = <&vin2ep>;
- };
- };
- };
};
&i2c3 {
pinctrl-0 = <&i2c3_pins>;
pinctrl-names = "default";
- status = "okay";
+ /* status set to "okay" when needed by camera configuration below */
clock-frequency = <400000>;
-
- ov5640@3c {
- compatible = "ovti,ov5640";
- reg = <0x3c>;
- clocks = <&mclk_cam4>;
- clock-names = "xclk";
-
- port {
- ov5640_3: endpoint {
- bus-width = <8>;
- data-shift = <2>;
- bus-type = <6>;
- pclk-sample = <1>;
- remote-endpoint = <&vin3ep>;
- };
- };
- };
};
&pfc {
@@ -267,6 +195,21 @@ &scifb1 {
cts-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
};
+/*
+ * Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints
+ *
+ * Uncomment the #include statements to change configuration
+ */
+
+/* 8bit CMOS Camera 1 (J13) */
+#define CAM_PARENT_I2C i2c0
+#define MCLK_CAM mclk_cam1
+#define CAM_EP cam0ep
+#define VIN_EP vin0ep
+#undef CAM_ENABLED
+#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+
+#ifdef CAM_ENABLED
&vin0 {
/*
* Set SW2 switch on the SOM to 'ON'
@@ -278,13 +221,28 @@ &vin0 {
port {
vin0ep: endpoint {
- remote-endpoint = <&ov5640_0>;
+ remote-endpoint = <&cam0ep>;
bus-width = <8>;
bus-type = <6>;
};
};
};
-
+#endif /* CAM_ENABLED */
+
+#undef CAM_PARENT_I2C
+#undef MCLK_CAM
+#undef CAM_EP
+#undef VIN_EP
+
+/* 8bit CMOS Camera 2 (J14) */
+#define CAM_PARENT_I2C i2c1
+#define MCLK_CAM mclk_cam2
+#define CAM_EP cam1ep
+#define VIN_EP vin1ep
+#undef CAM_ENABLED
+#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+
+#ifdef CAM_ENABLED
&vin1 {
/* Set SW1 switch on the SOM to 'ON' */
status = "okay";
@@ -293,13 +251,29 @@ &vin1 {
port {
vin1ep: endpoint {
- remote-endpoint = <&ov5640_1>;
+ remote-endpoint = <&cam1ep>;
bus-width = <8>;
bus-type = <6>;
};
};
};
+#endif /* CAM_ENABLED */
+
+#undef CAM_PARENT_I2C
+#undef MCLK_CAM
+#undef CAM_EP
+#undef VIN_EP
+
+/* 8bit CMOS Camera 3 (J12) */
+#define CAM_PARENT_I2C i2c2
+#define MCLK_CAM mclk_cam3
+#define CAM_EP cam2ep
+#define VIN_EP vin2ep
+#undef CAM_ENABLED
+#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+
+#ifdef CAM_ENABLED
&vin2 {
status = "okay";
pinctrl-0 = <&vin2_pins>;
@@ -307,14 +281,29 @@ &vin2 {
port {
vin2ep: endpoint {
- remote-endpoint = <&ov5640_2>;
+ remote-endpoint = <&cam2ep>;
bus-width = <8>;
data-shift = <8>;
bus-type = <6>;
};
};
};
-
+#endif /* CAM_ENABLED */
+
+#undef CAM_PARENT_I2C
+#undef MCLK_CAM
+#undef CAM_EP
+#undef VIN_EP
+
+/* 8bit CMOS Camera 4 (J11) */
+#define CAM_PARENT_I2C i2c3
+#define MCLK_CAM mclk_cam4
+#define CAM_EP cam3ep
+#define VIN_EP vin3ep
+#undef CAM_ENABLED
+#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+
+#ifdef CAM_ENABLED
&vin3 {
status = "okay";
pinctrl-0 = <&vin3_pins>;
@@ -322,9 +311,15 @@ &vin3 {
port {
vin3ep: endpoint {
- remote-endpoint = <&ov5640_3>;
+ remote-endpoint = <&cam3ep>;
bus-width = <8>;
bus-type = <6>;
};
};
};
+#endif /* CAM_ENABLED */
+
+#undef CAM_PARENT_I2C
+#undef MCLK_CAM
+#undef CAM_EP
+#undef VIN_EP
diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
new file mode 100644
index 0000000000000000..70c72ba4fe724a70
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * This include file ties a VIN interface with a single ov5640 sensor on
+ * the iWave-RZ/G1H Qseven board development platform connected with the
+ * camera daughter board.
+ *
+ * Copyright (C) 2020 Renesas Electronics Corp.
+ */
+
+#define CAM_ENABLED 1
+
+&CAM_PARENT_I2C {
+ status = "okay";
+
+ ov5640@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ clocks = <&MCLK_CAM>;
+ clock-names = "xclk";
+ status = "okay";
+
+ port {
+ CAM_EP: endpoint {
+ bus-width = <8>;
+ data-shift = <2>;
+ bus-type = <6>;
+ pclk-sample = <1>;
+ remote-endpoint = <&VIN_EP>;
+ };
+ };
+ };
+};
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v5 1/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes
@ 2021-01-22 11:34 ` Geert Uytterhoeven
0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 11:34 UTC (permalink / raw)
To: Prabhakar, Magnus Damm, Rob Herring
Cc: devicetree, Jacopo Mondi, Geert Uytterhoeven, Lad Prabhakar,
linux-renesas-soc, Biju Das, linux-arm-kernel
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
The camera daughter board can also be connected to 8-bit ov7725 sensors,
so in preparation for configurable option to choose depending on the
camera's connected separate out the ov5640 nodes in a dtsi file.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
[geert: describe a single camera in the .dtsi, include multiple times]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v5:
- Only enable i2c buses when needed,
v4:
- Describe a single camera in the .dtsi file,
- Include the .dtsi multiple times.
---
.../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 155 +++++++++---------
.../r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi | 32 ++++
2 files changed, 107 insertions(+), 80 deletions(-)
create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
index 98c3fbd89fa6c5c7..bc8280b2ac47e3ec 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
@@ -91,92 +91,20 @@ &hscif0 {
status = "okay";
};
-&i2c0 {
- ov5640@3c {
- compatible = "ovti,ov5640";
- reg = <0x3c>;
- clocks = <&mclk_cam1>;
- clock-names = "xclk";
-
- port {
- ov5640_0: endpoint {
- bus-width = <8>;
- data-shift = <2>;
- bus-type = <6>;
- pclk-sample = <1>;
- remote-endpoint = <&vin0ep>;
- };
- };
- };
-};
-
&i2c1 {
pinctrl-0 = <&i2c1_pins>;
pinctrl-names = "default";
- status = "okay";
+ /* status set to "okay" when needed by camera configuration below */
clock-frequency = <400000>;
-
- ov5640@3c {
- compatible = "ovti,ov5640";
- reg = <0x3c>;
- clocks = <&mclk_cam2>;
- clock-names = "xclk";
-
- port {
- ov5640_1: endpoint {
- bus-width = <8>;
- data-shift = <2>;
- bus-type = <6>;
- pclk-sample = <1>;
- remote-endpoint = <&vin1ep>;
- };
- };
- };
-};
-
-&i2c2 {
- ov5640@3c {
- compatible = "ovti,ov5640";
- reg = <0x3c>;
- clocks = <&mclk_cam3>;
- clock-names = "xclk";
-
- port {
- ov5640_2: endpoint {
- bus-width = <8>;
- data-shift = <2>;
- bus-type = <6>;
- pclk-sample = <1>;
- remote-endpoint = <&vin2ep>;
- };
- };
- };
};
&i2c3 {
pinctrl-0 = <&i2c3_pins>;
pinctrl-names = "default";
- status = "okay";
+ /* status set to "okay" when needed by camera configuration below */
clock-frequency = <400000>;
-
- ov5640@3c {
- compatible = "ovti,ov5640";
- reg = <0x3c>;
- clocks = <&mclk_cam4>;
- clock-names = "xclk";
-
- port {
- ov5640_3: endpoint {
- bus-width = <8>;
- data-shift = <2>;
- bus-type = <6>;
- pclk-sample = <1>;
- remote-endpoint = <&vin3ep>;
- };
- };
- };
};
&pfc {
@@ -267,6 +195,21 @@ &scifb1 {
cts-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
};
+/*
+ * Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints
+ *
+ * Uncomment the #include statements to change configuration
+ */
+
+/* 8bit CMOS Camera 1 (J13) */
+#define CAM_PARENT_I2C i2c0
+#define MCLK_CAM mclk_cam1
+#define CAM_EP cam0ep
+#define VIN_EP vin0ep
+#undef CAM_ENABLED
+#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+
+#ifdef CAM_ENABLED
&vin0 {
/*
* Set SW2 switch on the SOM to 'ON'
@@ -278,13 +221,28 @@ &vin0 {
port {
vin0ep: endpoint {
- remote-endpoint = <&ov5640_0>;
+ remote-endpoint = <&cam0ep>;
bus-width = <8>;
bus-type = <6>;
};
};
};
-
+#endif /* CAM_ENABLED */
+
+#undef CAM_PARENT_I2C
+#undef MCLK_CAM
+#undef CAM_EP
+#undef VIN_EP
+
+/* 8bit CMOS Camera 2 (J14) */
+#define CAM_PARENT_I2C i2c1
+#define MCLK_CAM mclk_cam2
+#define CAM_EP cam1ep
+#define VIN_EP vin1ep
+#undef CAM_ENABLED
+#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+
+#ifdef CAM_ENABLED
&vin1 {
/* Set SW1 switch on the SOM to 'ON' */
status = "okay";
@@ -293,13 +251,29 @@ &vin1 {
port {
vin1ep: endpoint {
- remote-endpoint = <&ov5640_1>;
+ remote-endpoint = <&cam1ep>;
bus-width = <8>;
bus-type = <6>;
};
};
};
+#endif /* CAM_ENABLED */
+
+#undef CAM_PARENT_I2C
+#undef MCLK_CAM
+#undef CAM_EP
+#undef VIN_EP
+
+/* 8bit CMOS Camera 3 (J12) */
+#define CAM_PARENT_I2C i2c2
+#define MCLK_CAM mclk_cam3
+#define CAM_EP cam2ep
+#define VIN_EP vin2ep
+#undef CAM_ENABLED
+#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+
+#ifdef CAM_ENABLED
&vin2 {
status = "okay";
pinctrl-0 = <&vin2_pins>;
@@ -307,14 +281,29 @@ &vin2 {
port {
vin2ep: endpoint {
- remote-endpoint = <&ov5640_2>;
+ remote-endpoint = <&cam2ep>;
bus-width = <8>;
data-shift = <8>;
bus-type = <6>;
};
};
};
-
+#endif /* CAM_ENABLED */
+
+#undef CAM_PARENT_I2C
+#undef MCLK_CAM
+#undef CAM_EP
+#undef VIN_EP
+
+/* 8bit CMOS Camera 4 (J11) */
+#define CAM_PARENT_I2C i2c3
+#define MCLK_CAM mclk_cam4
+#define CAM_EP cam3ep
+#define VIN_EP vin3ep
+#undef CAM_ENABLED
+#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+
+#ifdef CAM_ENABLED
&vin3 {
status = "okay";
pinctrl-0 = <&vin3_pins>;
@@ -322,9 +311,15 @@ &vin3 {
port {
vin3ep: endpoint {
- remote-endpoint = <&ov5640_3>;
+ remote-endpoint = <&cam3ep>;
bus-width = <8>;
bus-type = <6>;
};
};
};
+#endif /* CAM_ENABLED */
+
+#undef CAM_PARENT_I2C
+#undef MCLK_CAM
+#undef CAM_EP
+#undef VIN_EP
diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
new file mode 100644
index 0000000000000000..70c72ba4fe724a70
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * This include file ties a VIN interface with a single ov5640 sensor on
+ * the iWave-RZ/G1H Qseven board development platform connected with the
+ * camera daughter board.
+ *
+ * Copyright (C) 2020 Renesas Electronics Corp.
+ */
+
+#define CAM_ENABLED 1
+
+&CAM_PARENT_I2C {
+ status = "okay";
+
+ ov5640@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ clocks = <&MCLK_CAM>;
+ clock-names = "xclk";
+ status = "okay";
+
+ port {
+ CAM_EP: endpoint {
+ bus-width = <8>;
+ data-shift = <2>;
+ bus-type = <6>;
+ pclk-sample = <1>;
+ remote-endpoint = <&VIN_EP>;
+ };
+ };
+ };
+};
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v5 2/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors
2021-01-22 11:34 ` Geert Uytterhoeven
@ 2021-01-22 11:34 ` Geert Uytterhoeven
-1 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 11:34 UTC (permalink / raw)
To: Prabhakar, Magnus Damm, Rob Herring
Cc: Biju Das, Jacopo Mondi, linux-renesas-soc, linux-arm-kernel,
devicetree, Lad Prabhakar, Geert Uytterhoeven
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
The 8-bit ov7725 sensors can also be connected to the camera daughter
board.
This patch creates a separate dtsi file to describe an ov7725 sensor,
and includes it multiple times in r8a7742-iwg21d-q7-dbcm-ca.dts. The
user can (un)comment #include statements depending on the cameras
connected.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
[geert: describe a single camera in the .dtsi, include multiple times]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v5:
- Enable parent i2c bus when needed,
v4:
- Describe a single camera in the .dtsi file,
- Include the .dtsi multiple times.
---
.../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 6 +++-
.../r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 29 +++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
index bc8280b2ac47e3ec..2bcb229844abc5c2 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
@@ -198,7 +198,7 @@ &scifb1 {
/*
* Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints
*
- * Uncomment the #include statements to change configuration
+ * (un)comment the #include statements to change configuration
*/
/* 8bit CMOS Camera 1 (J13) */
@@ -208,6 +208,7 @@ &scifb1 {
#define VIN_EP vin0ep
#undef CAM_ENABLED
#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
#ifdef CAM_ENABLED
&vin0 {
@@ -241,6 +242,7 @@ vin0ep: endpoint {
#define VIN_EP vin1ep
#undef CAM_ENABLED
#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
#ifdef CAM_ENABLED
&vin1 {
@@ -272,6 +274,7 @@ vin1ep: endpoint {
#define VIN_EP vin2ep
#undef CAM_ENABLED
#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
#ifdef CAM_ENABLED
&vin2 {
@@ -302,6 +305,7 @@ vin2ep: endpoint {
#define VIN_EP vin3ep
#undef CAM_ENABLED
#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
#ifdef CAM_ENABLED
&vin3 {
diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
new file mode 100644
index 0000000000000000..f5e77f0242516720
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * This include file ties a VIN interface with a single ov7725 sensor on
+ * the iWave-RZ/G1H Qseven board development platform connected with the
+ * camera daughter board.
+ *
+ * Copyright (C) 2020 Renesas Electronics Corp.
+ */
+
+#define CAM_ENABLED 1
+
+&CAM_PARENT_I2C {
+ status = "okay";
+
+ ov7725@21 {
+ compatible = "ovti,ov7725";
+ reg = <0x21>;
+ clocks = <&MCLK_CAM>;
+ status = "okay";
+
+ port {
+ CAM_EP: endpoint {
+ bus-width = <8>;
+ bus-type = <6>;
+ remote-endpoint = <&VIN_EP>;
+ };
+ };
+ };
+};
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v5 2/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors
@ 2021-01-22 11:34 ` Geert Uytterhoeven
0 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2021-01-22 11:34 UTC (permalink / raw)
To: Prabhakar, Magnus Damm, Rob Herring
Cc: devicetree, Jacopo Mondi, Geert Uytterhoeven, Lad Prabhakar,
linux-renesas-soc, Biju Das, linux-arm-kernel
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
The 8-bit ov7725 sensors can also be connected to the camera daughter
board.
This patch creates a separate dtsi file to describe an ov7725 sensor,
and includes it multiple times in r8a7742-iwg21d-q7-dbcm-ca.dts. The
user can (un)comment #include statements depending on the cameras
connected.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
[geert: describe a single camera in the .dtsi, include multiple times]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v5:
- Enable parent i2c bus when needed,
v4:
- Describe a single camera in the .dtsi file,
- Include the .dtsi multiple times.
---
.../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 6 +++-
.../r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 29 +++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
index bc8280b2ac47e3ec..2bcb229844abc5c2 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
@@ -198,7 +198,7 @@ &scifb1 {
/*
* Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints
*
- * Uncomment the #include statements to change configuration
+ * (un)comment the #include statements to change configuration
*/
/* 8bit CMOS Camera 1 (J13) */
@@ -208,6 +208,7 @@ &scifb1 {
#define VIN_EP vin0ep
#undef CAM_ENABLED
#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
#ifdef CAM_ENABLED
&vin0 {
@@ -241,6 +242,7 @@ vin0ep: endpoint {
#define VIN_EP vin1ep
#undef CAM_ENABLED
#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
#ifdef CAM_ENABLED
&vin1 {
@@ -272,6 +274,7 @@ vin1ep: endpoint {
#define VIN_EP vin2ep
#undef CAM_ENABLED
#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
#ifdef CAM_ENABLED
&vin2 {
@@ -302,6 +305,7 @@ vin2ep: endpoint {
#define VIN_EP vin3ep
#undef CAM_ENABLED
#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
+//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
#ifdef CAM_ENABLED
&vin3 {
diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
new file mode 100644
index 0000000000000000..f5e77f0242516720
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * This include file ties a VIN interface with a single ov7725 sensor on
+ * the iWave-RZ/G1H Qseven board development platform connected with the
+ * camera daughter board.
+ *
+ * Copyright (C) 2020 Renesas Electronics Corp.
+ */
+
+#define CAM_ENABLED 1
+
+&CAM_PARENT_I2C {
+ status = "okay";
+
+ ov7725@21 {
+ compatible = "ovti,ov7725";
+ reg = <0x21>;
+ clocks = <&MCLK_CAM>;
+ status = "okay";
+
+ port {
+ CAM_EP: endpoint {
+ bus-width = <8>;
+ bus-type = <6>;
+ remote-endpoint = <&VIN_EP>;
+ };
+ };
+ };
+};
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH v5 1/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes
2021-01-22 11:34 ` Geert Uytterhoeven
@ 2021-02-21 20:43 ` Prabhakar Mahadev Lad
-1 siblings, 0 replies; 10+ messages in thread
From: Prabhakar Mahadev Lad @ 2021-02-21 20:43 UTC (permalink / raw)
To: Geert Uytterhoeven, Prabhakar, Magnus Damm, Rob Herring
Cc: Biju Das, Jacopo Mondi, linux-renesas-soc, linux-arm-kernel, devicetree
Hi Geert,
Thank you for the patch.
> -----Original Message-----
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> Sent: 22 January 2021 11:34
> To: Prabhakar <prabhakar.csengg@gmail.com>; Magnus Damm <magnus.damm@gmail.com>; Rob Herring
> <robh+dt@kernel.org>
> Cc: Biju Das <biju.das.jz@bp.renesas.com>; Jacopo Mondi <jacopo@jmondi.org>; linux-renesas-
> soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org; Prabhakar
> Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; Geert Uytterhoeven <geert+renesas@glider.be>
> Subject: [PATCH v5 1/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes
>
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> The camera daughter board can also be connected to 8-bit ov7725 sensors,
> so in preparation for configurable option to choose depending on the
> camera's connected separate out the ov5640 nodes in a dtsi file.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> [geert: describe a single camera in the .dtsi, include multiple times]
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v5:
> - Only enable i2c buses when needed,
>
> v4:
> - Describe a single camera in the .dtsi file,
> - Include the .dtsi multiple times.
> ---
> .../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 155 +++++++++---------
> .../r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi | 32 ++++
> 2 files changed, 107 insertions(+), 80 deletions(-)
> create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-
> dbcm-ca.dts
> index 98c3fbd89fa6c5c7..bc8280b2ac47e3ec 100644
> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> @@ -91,92 +91,20 @@ &hscif0 {
> status = "okay";
> };
>
> -&i2c0 {
> - ov5640@3c {
> - compatible = "ovti,ov5640";
> - reg = <0x3c>;
> - clocks = <&mclk_cam1>;
> - clock-names = "xclk";
> -
> - port {
> - ov5640_0: endpoint {
> - bus-width = <8>;
> - data-shift = <2>;
> - bus-type = <6>;
> - pclk-sample = <1>;
> - remote-endpoint = <&vin0ep>;
> - };
> - };
> - };
> -};
> -
> &i2c1 {
> pinctrl-0 = <&i2c1_pins>;
> pinctrl-names = "default";
>
> - status = "okay";
> + /* status set to "okay" when needed by camera configuration below */
> clock-frequency = <400000>;
> -
> - ov5640@3c {
> - compatible = "ovti,ov5640";
> - reg = <0x3c>;
> - clocks = <&mclk_cam2>;
> - clock-names = "xclk";
> -
> - port {
> - ov5640_1: endpoint {
> - bus-width = <8>;
> - data-shift = <2>;
> - bus-type = <6>;
> - pclk-sample = <1>;
> - remote-endpoint = <&vin1ep>;
> - };
> - };
> - };
> -};
> -
> -&i2c2 {
> - ov5640@3c {
> - compatible = "ovti,ov5640";
> - reg = <0x3c>;
> - clocks = <&mclk_cam3>;
> - clock-names = "xclk";
> -
> - port {
> - ov5640_2: endpoint {
> - bus-width = <8>;
> - data-shift = <2>;
> - bus-type = <6>;
> - pclk-sample = <1>;
> - remote-endpoint = <&vin2ep>;
> - };
> - };
> - };
> };
>
> &i2c3 {
> pinctrl-0 = <&i2c3_pins>;
> pinctrl-names = "default";
>
> - status = "okay";
> + /* status set to "okay" when needed by camera configuration below */
> clock-frequency = <400000>;
> -
> - ov5640@3c {
> - compatible = "ovti,ov5640";
> - reg = <0x3c>;
> - clocks = <&mclk_cam4>;
> - clock-names = "xclk";
> -
> - port {
> - ov5640_3: endpoint {
> - bus-width = <8>;
> - data-shift = <2>;
> - bus-type = <6>;
> - pclk-sample = <1>;
> - remote-endpoint = <&vin3ep>;
> - };
> - };
> - };
> };
>
> &pfc {
> @@ -267,6 +195,21 @@ &scifb1 {
> cts-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
> };
>
> +/*
> + * Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints
> + *
> + * Uncomment the #include statements to change configuration
> + */
> +
> +/* 8bit CMOS Camera 1 (J13) */
> +#define CAM_PARENT_I2C i2c0
> +#define MCLK_CAM mclk_cam1
> +#define CAM_EP cam0ep
> +#define VIN_EP vin0ep
> +#undef CAM_ENABLED
> +#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +
> +#ifdef CAM_ENABLED
> &vin0 {
> /*
> * Set SW2 switch on the SOM to 'ON'
> @@ -278,13 +221,28 @@ &vin0 {
>
> port {
> vin0ep: endpoint {
> - remote-endpoint = <&ov5640_0>;
> + remote-endpoint = <&cam0ep>;
> bus-width = <8>;
> bus-type = <6>;
> };
> };
> };
> -
> +#endif /* CAM_ENABLED */
> +
> +#undef CAM_PARENT_I2C
> +#undef MCLK_CAM
> +#undef CAM_EP
> +#undef VIN_EP
> +
> +/* 8bit CMOS Camera 2 (J14) */
> +#define CAM_PARENT_I2C i2c1
> +#define MCLK_CAM mclk_cam2
> +#define CAM_EP cam1ep
> +#define VIN_EP vin1ep
> +#undef CAM_ENABLED
> +#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +
> +#ifdef CAM_ENABLED
> &vin1 {
> /* Set SW1 switch on the SOM to 'ON' */
> status = "okay";
> @@ -293,13 +251,29 @@ &vin1 {
>
> port {
> vin1ep: endpoint {
> - remote-endpoint = <&ov5640_1>;
> + remote-endpoint = <&cam1ep>;
> bus-width = <8>;
> bus-type = <6>;
> };
> };
> };
>
> +#endif /* CAM_ENABLED */
> +
> +#undef CAM_PARENT_I2C
> +#undef MCLK_CAM
> +#undef CAM_EP
> +#undef VIN_EP
> +
> +/* 8bit CMOS Camera 3 (J12) */
> +#define CAM_PARENT_I2C i2c2
> +#define MCLK_CAM mclk_cam3
> +#define CAM_EP cam2ep
> +#define VIN_EP vin2ep
> +#undef CAM_ENABLED
> +#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +
> +#ifdef CAM_ENABLED
> &vin2 {
> status = "okay";
> pinctrl-0 = <&vin2_pins>;
> @@ -307,14 +281,29 @@ &vin2 {
>
> port {
> vin2ep: endpoint {
> - remote-endpoint = <&ov5640_2>;
> + remote-endpoint = <&cam2ep>;
> bus-width = <8>;
> data-shift = <8>;
> bus-type = <6>;
> };
> };
> };
> -
> +#endif /* CAM_ENABLED */
> +
> +#undef CAM_PARENT_I2C
> +#undef MCLK_CAM
> +#undef CAM_EP
> +#undef VIN_EP
> +
> +/* 8bit CMOS Camera 4 (J11) */
> +#define CAM_PARENT_I2C i2c3
> +#define MCLK_CAM mclk_cam4
> +#define CAM_EP cam3ep
> +#define VIN_EP vin3ep
> +#undef CAM_ENABLED
> +#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +
> +#ifdef CAM_ENABLED
> &vin3 {
> status = "okay";
> pinctrl-0 = <&vin3_pins>;
> @@ -322,9 +311,15 @@ &vin3 {
>
> port {
> vin3ep: endpoint {
> - remote-endpoint = <&ov5640_3>;
> + remote-endpoint = <&cam3ep>;
> bus-width = <8>;
> bus-type = <6>;
> };
> };
> };
> +#endif /* CAM_ENABLED */
> +
> +#undef CAM_PARENT_I2C
> +#undef MCLK_CAM
> +#undef CAM_EP
> +#undef VIN_EP
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi b/arch/arm/boot/dts/r8a7742-
> iwg21d-q7-dbcm-ov5640-single.dtsi
> new file mode 100644
> index 0000000000000000..70c72ba4fe724a70
> --- /dev/null
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
> @@ -0,0 +1,32 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * This include file ties a VIN interface with a single ov5640 sensor on
> + * the iWave-RZ/G1H Qseven board development platform connected with the
> + * camera daughter board.
> + *
> + * Copyright (C) 2020 Renesas Electronics Corp.
> + */
> +
> +#define CAM_ENABLED 1
> +
> +&CAM_PARENT_I2C {
> + status = "okay";
> +
> + ov5640@3c {
> + compatible = "ovti,ov5640";
> + reg = <0x3c>;
> + clocks = <&MCLK_CAM>;
> + clock-names = "xclk";
> + status = "okay";
> +
> + port {
> + CAM_EP: endpoint {
> + bus-width = <8>;
> + data-shift = <2>;
> + bus-type = <6>;
> + pclk-sample = <1>;
> + remote-endpoint = <&VIN_EP>;
> + };
> + };
> + };
> +};
> --
> 2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v5 1/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes
@ 2021-02-21 20:43 ` Prabhakar Mahadev Lad
0 siblings, 0 replies; 10+ messages in thread
From: Prabhakar Mahadev Lad @ 2021-02-21 20:43 UTC (permalink / raw)
To: Geert Uytterhoeven, Prabhakar, Magnus Damm, Rob Herring
Cc: Biju Das, linux-renesas-soc, Jacopo Mondi, linux-arm-kernel, devicetree
Hi Geert,
Thank you for the patch.
> -----Original Message-----
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> Sent: 22 January 2021 11:34
> To: Prabhakar <prabhakar.csengg@gmail.com>; Magnus Damm <magnus.damm@gmail.com>; Rob Herring
> <robh+dt@kernel.org>
> Cc: Biju Das <biju.das.jz@bp.renesas.com>; Jacopo Mondi <jacopo@jmondi.org>; linux-renesas-
> soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org; Prabhakar
> Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; Geert Uytterhoeven <geert+renesas@glider.be>
> Subject: [PATCH v5 1/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes
>
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> The camera daughter board can also be connected to 8-bit ov7725 sensors,
> so in preparation for configurable option to choose depending on the
> camera's connected separate out the ov5640 nodes in a dtsi file.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> [geert: describe a single camera in the .dtsi, include multiple times]
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v5:
> - Only enable i2c buses when needed,
>
> v4:
> - Describe a single camera in the .dtsi file,
> - Include the .dtsi multiple times.
> ---
> .../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 155 +++++++++---------
> .../r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi | 32 ++++
> 2 files changed, 107 insertions(+), 80 deletions(-)
> create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-
> dbcm-ca.dts
> index 98c3fbd89fa6c5c7..bc8280b2ac47e3ec 100644
> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> @@ -91,92 +91,20 @@ &hscif0 {
> status = "okay";
> };
>
> -&i2c0 {
> - ov5640@3c {
> - compatible = "ovti,ov5640";
> - reg = <0x3c>;
> - clocks = <&mclk_cam1>;
> - clock-names = "xclk";
> -
> - port {
> - ov5640_0: endpoint {
> - bus-width = <8>;
> - data-shift = <2>;
> - bus-type = <6>;
> - pclk-sample = <1>;
> - remote-endpoint = <&vin0ep>;
> - };
> - };
> - };
> -};
> -
> &i2c1 {
> pinctrl-0 = <&i2c1_pins>;
> pinctrl-names = "default";
>
> - status = "okay";
> + /* status set to "okay" when needed by camera configuration below */
> clock-frequency = <400000>;
> -
> - ov5640@3c {
> - compatible = "ovti,ov5640";
> - reg = <0x3c>;
> - clocks = <&mclk_cam2>;
> - clock-names = "xclk";
> -
> - port {
> - ov5640_1: endpoint {
> - bus-width = <8>;
> - data-shift = <2>;
> - bus-type = <6>;
> - pclk-sample = <1>;
> - remote-endpoint = <&vin1ep>;
> - };
> - };
> - };
> -};
> -
> -&i2c2 {
> - ov5640@3c {
> - compatible = "ovti,ov5640";
> - reg = <0x3c>;
> - clocks = <&mclk_cam3>;
> - clock-names = "xclk";
> -
> - port {
> - ov5640_2: endpoint {
> - bus-width = <8>;
> - data-shift = <2>;
> - bus-type = <6>;
> - pclk-sample = <1>;
> - remote-endpoint = <&vin2ep>;
> - };
> - };
> - };
> };
>
> &i2c3 {
> pinctrl-0 = <&i2c3_pins>;
> pinctrl-names = "default";
>
> - status = "okay";
> + /* status set to "okay" when needed by camera configuration below */
> clock-frequency = <400000>;
> -
> - ov5640@3c {
> - compatible = "ovti,ov5640";
> - reg = <0x3c>;
> - clocks = <&mclk_cam4>;
> - clock-names = "xclk";
> -
> - port {
> - ov5640_3: endpoint {
> - bus-width = <8>;
> - data-shift = <2>;
> - bus-type = <6>;
> - pclk-sample = <1>;
> - remote-endpoint = <&vin3ep>;
> - };
> - };
> - };
> };
>
> &pfc {
> @@ -267,6 +195,21 @@ &scifb1 {
> cts-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
> };
>
> +/*
> + * Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints
> + *
> + * Uncomment the #include statements to change configuration
> + */
> +
> +/* 8bit CMOS Camera 1 (J13) */
> +#define CAM_PARENT_I2C i2c0
> +#define MCLK_CAM mclk_cam1
> +#define CAM_EP cam0ep
> +#define VIN_EP vin0ep
> +#undef CAM_ENABLED
> +#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +
> +#ifdef CAM_ENABLED
> &vin0 {
> /*
> * Set SW2 switch on the SOM to 'ON'
> @@ -278,13 +221,28 @@ &vin0 {
>
> port {
> vin0ep: endpoint {
> - remote-endpoint = <&ov5640_0>;
> + remote-endpoint = <&cam0ep>;
> bus-width = <8>;
> bus-type = <6>;
> };
> };
> };
> -
> +#endif /* CAM_ENABLED */
> +
> +#undef CAM_PARENT_I2C
> +#undef MCLK_CAM
> +#undef CAM_EP
> +#undef VIN_EP
> +
> +/* 8bit CMOS Camera 2 (J14) */
> +#define CAM_PARENT_I2C i2c1
> +#define MCLK_CAM mclk_cam2
> +#define CAM_EP cam1ep
> +#define VIN_EP vin1ep
> +#undef CAM_ENABLED
> +#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +
> +#ifdef CAM_ENABLED
> &vin1 {
> /* Set SW1 switch on the SOM to 'ON' */
> status = "okay";
> @@ -293,13 +251,29 @@ &vin1 {
>
> port {
> vin1ep: endpoint {
> - remote-endpoint = <&ov5640_1>;
> + remote-endpoint = <&cam1ep>;
> bus-width = <8>;
> bus-type = <6>;
> };
> };
> };
>
> +#endif /* CAM_ENABLED */
> +
> +#undef CAM_PARENT_I2C
> +#undef MCLK_CAM
> +#undef CAM_EP
> +#undef VIN_EP
> +
> +/* 8bit CMOS Camera 3 (J12) */
> +#define CAM_PARENT_I2C i2c2
> +#define MCLK_CAM mclk_cam3
> +#define CAM_EP cam2ep
> +#define VIN_EP vin2ep
> +#undef CAM_ENABLED
> +#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +
> +#ifdef CAM_ENABLED
> &vin2 {
> status = "okay";
> pinctrl-0 = <&vin2_pins>;
> @@ -307,14 +281,29 @@ &vin2 {
>
> port {
> vin2ep: endpoint {
> - remote-endpoint = <&ov5640_2>;
> + remote-endpoint = <&cam2ep>;
> bus-width = <8>;
> data-shift = <8>;
> bus-type = <6>;
> };
> };
> };
> -
> +#endif /* CAM_ENABLED */
> +
> +#undef CAM_PARENT_I2C
> +#undef MCLK_CAM
> +#undef CAM_EP
> +#undef VIN_EP
> +
> +/* 8bit CMOS Camera 4 (J11) */
> +#define CAM_PARENT_I2C i2c3
> +#define MCLK_CAM mclk_cam4
> +#define CAM_EP cam3ep
> +#define VIN_EP vin3ep
> +#undef CAM_ENABLED
> +#include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +
> +#ifdef CAM_ENABLED
> &vin3 {
> status = "okay";
> pinctrl-0 = <&vin3_pins>;
> @@ -322,9 +311,15 @@ &vin3 {
>
> port {
> vin3ep: endpoint {
> - remote-endpoint = <&ov5640_3>;
> + remote-endpoint = <&cam3ep>;
> bus-width = <8>;
> bus-type = <6>;
> };
> };
> };
> +#endif /* CAM_ENABLED */
> +
> +#undef CAM_PARENT_I2C
> +#undef MCLK_CAM
> +#undef CAM_EP
> +#undef VIN_EP
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi b/arch/arm/boot/dts/r8a7742-
> iwg21d-q7-dbcm-ov5640-single.dtsi
> new file mode 100644
> index 0000000000000000..70c72ba4fe724a70
> --- /dev/null
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi
> @@ -0,0 +1,32 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * This include file ties a VIN interface with a single ov5640 sensor on
> + * the iWave-RZ/G1H Qseven board development platform connected with the
> + * camera daughter board.
> + *
> + * Copyright (C) 2020 Renesas Electronics Corp.
> + */
> +
> +#define CAM_ENABLED 1
> +
> +&CAM_PARENT_I2C {
> + status = "okay";
> +
> + ov5640@3c {
> + compatible = "ovti,ov5640";
> + reg = <0x3c>;
> + clocks = <&MCLK_CAM>;
> + clock-names = "xclk";
> + status = "okay";
> +
> + port {
> + CAM_EP: endpoint {
> + bus-width = <8>;
> + data-shift = <2>;
> + bus-type = <6>;
> + pclk-sample = <1>;
> + remote-endpoint = <&VIN_EP>;
> + };
> + };
> + };
> +};
> --
> 2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v5 2/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors
2021-01-22 11:34 ` Geert Uytterhoeven
@ 2021-02-21 20:47 ` Prabhakar Mahadev Lad
-1 siblings, 0 replies; 10+ messages in thread
From: Prabhakar Mahadev Lad @ 2021-02-21 20:47 UTC (permalink / raw)
To: Geert Uytterhoeven, Prabhakar, Magnus Damm, Rob Herring
Cc: Biju Das, Jacopo Mondi, linux-renesas-soc, linux-arm-kernel, devicetree
Hi Geert,
Thank you for the patch.
> -----Original Message-----
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> Sent: 22 January 2021 11:34
> To: Prabhakar <prabhakar.csengg@gmail.com>; Magnus Damm <magnus.damm@gmail.com>; Rob Herring
> <robh+dt@kernel.org>
> Cc: Biju Das <biju.das.jz@bp.renesas.com>; Jacopo Mondi <jacopo@jmondi.org>; linux-renesas-
> soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org; Prabhakar
> Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; Geert Uytterhoeven <geert+renesas@glider.be>
> Subject: [PATCH v5 2/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors
>
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> The 8-bit ov7725 sensors can also be connected to the camera daughter
> board.
>
> This patch creates a separate dtsi file to describe an ov7725 sensor,
> and includes it multiple times in r8a7742-iwg21d-q7-dbcm-ca.dts. The
> user can (un)comment #include statements depending on the cameras
> connected.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> [geert: describe a single camera in the .dtsi, include multiple times]
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v5:
> - Enable parent i2c bus when needed,
>
> v4:
> - Describe a single camera in the .dtsi file,
> - Include the .dtsi multiple times.
> ---
> .../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 6 +++-
> .../r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 29 +++++++++++++++++++
> 2 files changed, 34 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-
> dbcm-ca.dts
> index bc8280b2ac47e3ec..2bcb229844abc5c2 100644
> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> @@ -198,7 +198,7 @@ &scifb1 {
> /*
> * Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints
> *
> - * Uncomment the #include statements to change configuration
> + * (un)comment the #include statements to change configuration
> */
>
> /* 8bit CMOS Camera 1 (J13) */
> @@ -208,6 +208,7 @@ &scifb1 {
> #define VIN_EP vin0ep
> #undef CAM_ENABLED
> #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
>
> #ifdef CAM_ENABLED
> &vin0 {
> @@ -241,6 +242,7 @@ vin0ep: endpoint {
> #define VIN_EP vin1ep
> #undef CAM_ENABLED
> #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
>
> #ifdef CAM_ENABLED
> &vin1 {
> @@ -272,6 +274,7 @@ vin1ep: endpoint {
> #define VIN_EP vin2ep
> #undef CAM_ENABLED
> #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
>
> #ifdef CAM_ENABLED
> &vin2 {
> @@ -302,6 +305,7 @@ vin2ep: endpoint {
> #define VIN_EP vin3ep
> #undef CAM_ENABLED
> #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
>
> #ifdef CAM_ENABLED
> &vin3 {
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi b/arch/arm/boot/dts/r8a7742-
> iwg21d-q7-dbcm-ov7725-single.dtsi
> new file mode 100644
> index 0000000000000000..f5e77f0242516720
> --- /dev/null
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
> @@ -0,0 +1,29 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * This include file ties a VIN interface with a single ov7725 sensor on
> + * the iWave-RZ/G1H Qseven board development platform connected with the
> + * camera daughter board.
> + *
> + * Copyright (C) 2020 Renesas Electronics Corp.
> + */
> +
> +#define CAM_ENABLED 1
> +
> +&CAM_PARENT_I2C {
> + status = "okay";
> +
> + ov7725@21 {
> + compatible = "ovti,ov7725";
> + reg = <0x21>;
> + clocks = <&MCLK_CAM>;
> + status = "okay";
> +
> + port {
> + CAM_EP: endpoint {
> + bus-width = <8>;
> + bus-type = <6>;
> + remote-endpoint = <&VIN_EP>;
> + };
> + };
> + };
> +};
> --
> 2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v5 2/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors
@ 2021-02-21 20:47 ` Prabhakar Mahadev Lad
0 siblings, 0 replies; 10+ messages in thread
From: Prabhakar Mahadev Lad @ 2021-02-21 20:47 UTC (permalink / raw)
To: Geert Uytterhoeven, Prabhakar, Magnus Damm, Rob Herring
Cc: Biju Das, linux-renesas-soc, Jacopo Mondi, linux-arm-kernel, devicetree
Hi Geert,
Thank you for the patch.
> -----Original Message-----
> From: Geert Uytterhoeven <geert+renesas@glider.be>
> Sent: 22 January 2021 11:34
> To: Prabhakar <prabhakar.csengg@gmail.com>; Magnus Damm <magnus.damm@gmail.com>; Rob Herring
> <robh+dt@kernel.org>
> Cc: Biju Das <biju.das.jz@bp.renesas.com>; Jacopo Mondi <jacopo@jmondi.org>; linux-renesas-
> soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org; Prabhakar
> Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>; Geert Uytterhoeven <geert+renesas@glider.be>
> Subject: [PATCH v5 2/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors
>
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> The 8-bit ov7725 sensors can also be connected to the camera daughter
> board.
>
> This patch creates a separate dtsi file to describe an ov7725 sensor,
> and includes it multiple times in r8a7742-iwg21d-q7-dbcm-ca.dts. The
> user can (un)comment #include statements depending on the cameras
> connected.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
> [geert: describe a single camera in the .dtsi, include multiple times]
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v5:
> - Enable parent i2c bus when needed,
>
> v4:
> - Describe a single camera in the .dtsi file,
> - Include the .dtsi multiple times.
> ---
> .../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 6 +++-
> .../r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 29 +++++++++++++++++++
> 2 files changed, 34 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-
> dbcm-ca.dts
> index bc8280b2ac47e3ec..2bcb229844abc5c2 100644
> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> @@ -198,7 +198,7 @@ &scifb1 {
> /*
> * Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints
> *
> - * Uncomment the #include statements to change configuration
> + * (un)comment the #include statements to change configuration
> */
>
> /* 8bit CMOS Camera 1 (J13) */
> @@ -208,6 +208,7 @@ &scifb1 {
> #define VIN_EP vin0ep
> #undef CAM_ENABLED
> #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
>
> #ifdef CAM_ENABLED
> &vin0 {
> @@ -241,6 +242,7 @@ vin0ep: endpoint {
> #define VIN_EP vin1ep
> #undef CAM_ENABLED
> #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
>
> #ifdef CAM_ENABLED
> &vin1 {
> @@ -272,6 +274,7 @@ vin1ep: endpoint {
> #define VIN_EP vin2ep
> #undef CAM_ENABLED
> #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
>
> #ifdef CAM_ENABLED
> &vin2 {
> @@ -302,6 +305,7 @@ vin2ep: endpoint {
> #define VIN_EP vin3ep
> #undef CAM_ENABLED
> #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi"
> +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi"
>
> #ifdef CAM_ENABLED
> &vin3 {
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi b/arch/arm/boot/dts/r8a7742-
> iwg21d-q7-dbcm-ov7725-single.dtsi
> new file mode 100644
> index 0000000000000000..f5e77f0242516720
> --- /dev/null
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi
> @@ -0,0 +1,29 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * This include file ties a VIN interface with a single ov7725 sensor on
> + * the iWave-RZ/G1H Qseven board development platform connected with the
> + * camera daughter board.
> + *
> + * Copyright (C) 2020 Renesas Electronics Corp.
> + */
> +
> +#define CAM_ENABLED 1
> +
> +&CAM_PARENT_I2C {
> + status = "okay";
> +
> + ov7725@21 {
> + compatible = "ovti,ov7725";
> + reg = <0x21>;
> + clocks = <&MCLK_CAM>;
> + status = "okay";
> +
> + port {
> + CAM_EP: endpoint {
> + bus-width = <8>;
> + bus-type = <6>;
> + remote-endpoint = <&VIN_EP>;
> + };
> + };
> + };
> +};
> --
> 2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-02-21 20:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 11:34 [PATCH v5 0/2] ARM: dts: r8a7742-iwg21d-q7-dbcm: Add support for ov7725 sensors Geert Uytterhoeven
2021-01-22 11:34 ` Geert Uytterhoeven
2021-01-22 11:34 ` [PATCH v5 1/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes Geert Uytterhoeven
2021-01-22 11:34 ` Geert Uytterhoeven
2021-02-21 20:43 ` Prabhakar Mahadev Lad
2021-02-21 20:43 ` Prabhakar Mahadev Lad
2021-01-22 11:34 ` [PATCH v5 2/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors Geert Uytterhoeven
2021-01-22 11:34 ` Geert Uytterhoeven
2021-02-21 20:47 ` Prabhakar Mahadev Lad
2021-02-21 20:47 ` Prabhakar Mahadev Lad
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.