linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add OV7725 nodes
@ 2020-11-20 15:13 Lad Prabhakar
  2020-11-24  9:04 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Lad Prabhakar @ 2020-11-20 15:13 UTC (permalink / raw)
  To: Geert Uytterhoeven, Magnus Damm, Rob Herring
  Cc: linux-renesas-soc, devicetree, linux-kernel, Biju Das, Prabhakar,
	Lad Prabhakar

Add the ov7725 endpoint nodes to the camera daughter board. The ov7725
sensors can be populated on I2C{0,1,2,3} buses.

By default the VIN{0,1,2,3} are tied to OV5640{0,1,2,3} endpoints
respectively in the camera DB dts hence the remote-endpoint property in
OV7725{0,1,2,3} endpoints is commented out.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
---
Hi All,

This patch is based on top of [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/
    renesas-devel.git/log/?h=renesas-arm-dt-for-v5.11

Cheers,
Prabhakar
---
 .../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts    | 93 +++++++++++++++++++
 1 file changed, 93 insertions(+)

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 98c3fbd89fa6..d1386bf7bdbe 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
@@ -108,6 +108,29 @@
 			};
 		};
 	};
+
+	ov7725@21 {
+		compatible = "ovti,ov7725";
+		reg = <0x21>;
+		clocks = <&mclk_cam1>;
+
+		port {
+			ov7725_0: endpoint {
+				bus-width = <8>;
+				bus-type = <6>;
+				/*
+				 * uncomment remote-endpoint property to
+				 * tie ov7725_0 to vin0ep also make
+				 * sure to comment/remove remote-endpoint
+				 * property from ov5640_0 endpoint and
+				 * replace remote-endpoint property in
+				 * vin0ep node with
+				 * remote-endpoint = <&ov7725_0>;
+				 */
+				/* remote-endpoint = <&vin0ep>; */
+			};
+		};
+	};
 };
 
 &i2c1 {
@@ -133,6 +156,29 @@
 			};
 		};
 	};
+
+	ov7725@21 {
+		compatible = "ovti,ov7725";
+		reg = <0x21>;
+		clocks = <&mclk_cam2>;
+
+		port {
+			ov7725_1: endpoint {
+				bus-width = <8>;
+				bus-type = <6>;
+				/*
+				 * uncomment remote-endpoint property to
+				 * tie ov7725_1 to vin1ep also make
+				 * sure to comment/remove remote-endpoint
+				 * property from ov5640_1 endpoint and
+				 * replace remote-endpoint property in
+				 * vin1ep node with
+				 * remote-endpoint = <&ov7725_1>;
+				 */
+				/* remote-endpoint = <&vin1ep>; */
+			};
+		};
+	};
 };
 
 &i2c2 {
@@ -152,6 +198,30 @@
 			};
 		};
 	};
+
+	ov7725@21 {
+		status = "disabled";
+		compatible = "ovti,ov7725";
+		reg = <0x21>;
+		clocks = <&mclk_cam3>;
+
+		port {
+			ov7725_2: endpoint {
+				bus-width = <8>;
+				bus-type = <6>;
+				/*
+				 * uncomment remote-endpoint property to
+				 * tie ov7725_2 to vin2ep also make
+				 * sure to comment/remove remote-endpoint
+				 * property from ov5640_2 endpoint and
+				 * replace remote-endpoint property in
+				 * vin2ep node with
+				 * remote-endpoint = <&ov7725_2>;
+				 */
+				/* remote-endpoint = <&vin2ep>; */
+			};
+		};
+	};
 };
 
 &i2c3 {
@@ -177,6 +247,29 @@
 			};
 		};
 	};
+
+	ov7725@21 {
+		compatible = "ovti,ov7725";
+		reg = <0x21>;
+		clocks = <&mclk_cam4>;
+
+		port {
+			ov7725_3: endpoint {
+				bus-width = <8>;
+				bus-type = <6>;
+				/*
+				 * uncomment remote-endpoint property to
+				 * tie ov7725_3 to vin3ep also make
+				 * sure to comment/remove remote-endpoint
+				 * property from ov5640_3 endpoint and
+				 * replace remote-endpoint property in
+				 * vin3ep node with
+				 * remote-endpoint = <&ov7725_3>;
+				 */
+				/* remote-endpoint = <&vin3ep>; */
+			};
+		};
+	};
 };
 
 &pfc {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add OV7725 nodes
  2020-11-20 15:13 [PATCH] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add OV7725 nodes Lad Prabhakar
@ 2020-11-24  9:04 ` Geert Uytterhoeven
  2020-11-24 13:51   ` Lad, Prabhakar
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2020-11-24  9:04 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Magnus Damm, Rob Herring, Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, Biju Das, Prabhakar

Hi Prabhakar,

On Fri, Nov 20, 2020 at 4:13 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> Add the ov7725 endpoint nodes to the camera daughter board. The ov7725
> sensors can be populated on I2C{0,1,2,3} buses.
>
> By default the VIN{0,1,2,3} are tied to OV5640{0,1,2,3} endpoints
> respectively in the camera DB dts hence the remote-endpoint property in
> OV7725{0,1,2,3} endpoints is commented out.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>

Thanks for your patch!

The camera definitions look mostly OK to me.

IIUIC, these are 4 plug-in cameras, that can be used instead of the
(currently described) 4 other OV5640-based plug-in cameras?
In addition, the user can mix and match them, in the 4 available
slots (J11-J14), which would require editing the DTS?

Wouldn't it be easier to have separate DTS files for the OV7725 and
OV5640 cameras, and #include them from r8a7742-iwg21d-q7-dbcm-ca.dts?

    /* 8bit CMOS Camera 1 (J13) */
    #define MCLK_CAM    &mclk_cam1
    #define ...
    /* Comment the below according to connected cameras */
    #include "ov5640.dts"
    //#include "ov7725.dts"
    #undef MCLK_CAM
    #undef ...

    [...]

> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts

> @@ -152,6 +198,30 @@
>                         };
>                 };
>         };
> +
> +       ov7725@21 {
> +               status = "disabled";

This one is disabled, the three others aren't?

> +               compatible = "ovti,ov7725";
> +               reg = <0x21>;
> +               clocks = <&mclk_cam3>;
> +
> +               port {
> +                       ov7725_2: endpoint {
> +                               bus-width = <8>;
> +                               bus-type = <6>;
> +                               /*
> +                                * uncomment remote-endpoint property to
> +                                * tie ov7725_2 to vin2ep also make
> +                                * sure to comment/remove remote-endpoint
> +                                * property from ov5640_2 endpoint and
> +                                * replace remote-endpoint property in
> +                                * vin2ep node with
> +                                * remote-endpoint = <&ov7725_2>;
> +                                */
> +                               /* remote-endpoint = <&vin2ep>; */
> +                       };
> +               };
> +       };
>  };

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] 3+ messages in thread

* Re: [PATCH] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add OV7725 nodes
  2020-11-24  9:04 ` Geert Uytterhoeven
@ 2020-11-24 13:51   ` Lad, Prabhakar
  0 siblings, 0 replies; 3+ messages in thread
From: Lad, Prabhakar @ 2020-11-24 13:51 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Lad Prabhakar, Magnus Damm, Rob Herring, Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, Biju Das

Hi Geert,

Thank you for the review.

On Tue, Nov 24, 2020 at 9:04 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Fri, Nov 20, 2020 at 4:13 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> > Add the ov7725 endpoint nodes to the camera daughter board. The ov7725
> > sensors can be populated on I2C{0,1,2,3} buses.
> >
> > By default the VIN{0,1,2,3} are tied to OV5640{0,1,2,3} endpoints
> > respectively in the camera DB dts hence the remote-endpoint property in
> > OV7725{0,1,2,3} endpoints is commented out.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
>
> Thanks for your patch!
>
> The camera definitions look mostly OK to me.
>
> IIUIC, these are 4 plug-in cameras, that can be used instead of the
> (currently described) 4 other OV5640-based plug-in cameras?
> In addition, the user can mix and match them, in the 4 available
> slots (J11-J14), which would require editing the DTS?
>
> Wouldn't it be easier to have separate DTS files for the OV7725 and
> OV5640 cameras, and #include them from r8a7742-iwg21d-q7-dbcm-ca.dts?
>
Good point, will move the vin and ov5640 nodes to
r8a7742-iwg21d-q7-dbcm-ov5640.dtsi and similarly add vin and ov7725
nodes to r8a7742-iwg21d-q7-dbcm-ov7725.dtsi and by default shall
include r8a7742-iwg21d-q7-dbcm-ov5640.dtsi in
r8a7742-iwg21d-q7-dbcm-ca.dts file.(Will keep the mclk_camx and
pimuxes in r8a7742-iwg21d-q7-dbcm-ca.dts file)

>     /* 8bit CMOS Camera 1 (J13) */
>     #define MCLK_CAM    &mclk_cam1
>     #define ...
>     /* Comment the below according to connected cameras */
>     #include "ov5640.dts"
>     //#include "ov7725.dts"
>     #undef MCLK_CAM
>     #undef ...
>
>     [...]
>
> > --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
> > +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts
>
> > @@ -152,6 +198,30 @@
> >                         };
> >                 };
> >         };
> > +
> > +       ov7725@21 {
> > +               status = "disabled";
>
> This one is disabled, the three others aren't?
>
my bad should have dropped this.

Cheers,
Prabhakar


> > +               compatible = "ovti,ov7725";
> > +               reg = <0x21>;
> > +               clocks = <&mclk_cam3>;
> > +
> > +               port {
> > +                       ov7725_2: endpoint {
> > +                               bus-width = <8>;
> > +                               bus-type = <6>;
> > +                               /*
> > +                                * uncomment remote-endpoint property to
> > +                                * tie ov7725_2 to vin2ep also make
> > +                                * sure to comment/remove remote-endpoint
> > +                                * property from ov5640_2 endpoint and
> > +                                * replace remote-endpoint property in
> > +                                * vin2ep node with
> > +                                * remote-endpoint = <&ov7725_2>;
> > +                                */
> > +                               /* remote-endpoint = <&vin2ep>; */
> > +                       };
> > +               };
> > +       };
> >  };
>
> 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] 3+ messages in thread

end of thread, other threads:[~2020-11-24 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 15:13 [PATCH] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add OV7725 nodes Lad Prabhakar
2020-11-24  9:04 ` Geert Uytterhoeven
2020-11-24 13:51   ` Lad, Prabhakar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).