All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: "Magnus Damm" <magnus.damm@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: Re: [PATCH v2] arm64: dts: renesas: r8a774c0-cat874: Add support for AISTARVISION MIPI Adapter V2.1
Date: Wed, 1 Apr 2020 11:42:29 +0200	[thread overview]
Message-ID: <CAMuHMdXhi_1rxpB3zXO+KwtY+36dh+_O8NqVfyLs5mU1+Vy6Og@mail.gmail.com> (raw)
In-Reply-To: <1584886352-4132-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi Prabhakar,

On Sun, Mar 22, 2020 at 3:13 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> This patch adds support for AISTARVISION MIPI Adapter V2.1 board connected
> to G2E board. Common file aistarvision-mipi-adapter-2.1.dtsi is created
> which have the camera endpoint nodes for imx219 and ov5645 so that this can
> be re-used with other G2x platforms.
>
> r8a774c0-ek874-mipi-2.1.dts file enables the required VIN/CSI nodes and by
> default ties ov5645 camera endpoint to CSI2.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
>  Changes for v2:
>  * Dropped #{address,size}-cells
>  * Dropped unit address and reg for port

Thanks for the update!

> --- /dev/null
> +++ b/arch/arm64/boot/dts/renesas/r8a774c0-ek874-mipi-2.1.dts
> @@ -0,0 +1,75 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Device Tree Source for the Silicon Linux RZ/G2E 96board platform (CAT874)
> + * connected with aistarvision-mipi-v2-adapter board
> + *
> + * Copyright (C) 2020 Renesas Electronics Corp.
> + */
> +
> +/dts-v1/;
> +#include "r8a774c0-ek874.dts"
> +#define MIPI_PARENT_I2C i2c3
> +#include "aistarvision-mipi-adapter-2.1.dtsi"
> +
> +/ {
> +       model = "Silicon Linux RZ/G2E evaluation kit EK874 (CAT874 + CAT875) with aistarvision-mipi-v2-adapter board";
> +       compatible = "si-linux,cat875", "si-linux,cat874", "renesas,r8a774c0";
> +};
> +
> +&i2c3 {
> +       status = "okay";
> +};
> +
> +&vin4 {
> +       status = "okay";
> +};
> +
> +&vin5 {
> +       status = "okay";
> +};
> +
> +&csi40 {
> +       status = "okay";
> +
> +       ports {
> +               port {
> +                       csi40_in: endpoint {
> +                               clock-lanes = <0>;
> +                               data-lanes = <1 2>;
> +                               remote-endpoint = <&ov5645_ep>;
> +                       };
> +               };
> +       };
> +};
> +
> +&ov5645 {
> +       enable-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
> +       reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
> +
> +       clocks = <&cpg CPG_MOD 716>;

I'm still a bit puzzled here.

CPG_MOD 716 is the CSI40 module clock, which runs at 25 MHz, and is
presumably output to the CSI0_CLKP/N pair? Or is its rate controlled
by the CSI driver?
On the MIPI board[*], that signal becomes MIPI1_CP/N.
However, the MIPI board also has a "Clock Source Selection" header,
which allows you to choose one of:
  1. The fixed 24 MHz crystal, which is apparently used for the imx219
     camera, as described by imx219_clk above, and matches the wanted
     clock rate specified below?
  2. CSI1_CLK,
  3. CSI2_CLK.
The last two become CLK0/1 on the CAT874 board, which are driven by
TPU0TO0/1.

Which setting do you use for the ov5645 camera?

> +       clock-frequency = <24000000>;

After your patch for the ov5645 driver, this should be replaced by
assigned-clock-rates?

The rest looks good to me, but I'm not a multi-media/camera expert.

[*] https://github.com/Kevin-WSCU/96Boards-Camera

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

  reply	other threads:[~2020-04-01  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-22 14:12 [PATCH v2] arm64: dts: renesas: r8a774c0-cat874: Add support for AISTARVISION MIPI Adapter V2.1 Lad Prabhakar
2020-04-01  9:42 ` Geert Uytterhoeven [this message]
2020-04-01 17:37   ` Lad, Prabhakar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdXhi_1rxpB3zXO+KwtY+36dh+_O8NqVfyLs5mU1+Vy6Og@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.