Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp332948rdb; Thu, 30 Nov 2023 06:09:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5AXmgHKIudnzvRECSlNpoTmbZpH8QJ//v0dFpPFrtfVM41MrOfQfIfwDW6y9Zll8+CrK3 X-Received: by 2002:a05:6870:d614:b0:1fa:831:2899 with SMTP id a20-20020a056870d61400b001fa08312899mr26464119oaq.18.1701353395280; Thu, 30 Nov 2023 06:09:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701353395; cv=none; d=google.com; s=arc-20160816; b=y0HsI/+4QjLXDsYDO/GDar2Oeue7tqoRo+1kUiyv2yxe8alVjH9aKNeurv1H0ax346 1eLBnM8bJpUaaMtF5rIU1I8diEKIWU+Vlac10VY6iQRo0PGm3XkY2MmqIpEYmjLVlC+b yi655IgmsMxIhs00XZ/z8OA099LVSBV6uvSyj0ZiX9j6v/7zQyq0RdauFO7itpS994ro wE1qMli7NkCmVIg+eWbYz0BCa7dpxyj/Yj69DRf8815I5tbzXhJDNhdUgGevQ30x5DSZ /eHUexUgqV/RGxr/wSSP7Exgl8VbXHRz10HW32+48x4KscMw0PZEDXwKECP7XqBevPl2 mWrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=15OD46o/toT3zkM6qRemt6EuQTh1edNBEQbpx7wiFdE=; fh=LAKobpycdVkjZQ+uocQfAy0FO5DZX3/bYuwTTNUULzM=; b=uajsRlWHScjmBmL5rJq27qwgt3JOf1/O/3OST8r18mxGjOTVBdVnQgEsrWxgEx964Z /xRDqK8ZlaTw3wpmLxxqNVL4gNZj1yxy4bgKCGTrGLFYBdhJQWF/in7qZuisgpON+//M ZhP5QlQ0RJPeHNQ4T+cz/3W+mZxbGWrCls+oviVi3At6HDwFYPTGhau4wHUSgtvhnZ9v NS12uFY/Yy8MAwhZWCj7qQnZmYzc52e4WfQU/BuCRyn6VB3PICLSLSZnKH9NzaBpE+Du SVU4rI15RTByrAowSBoJ0JtIF8mto3wrUOxQoOyyy4ziDslxR++M7ULhsLq/Qacsm3+k kWIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CQ3XwtGf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id l11-20020a056870d3cb00b001fa1e7c9560si426067oag.202.2023.11.30.06.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 06:09:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CQ3XwtGf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D790E8025C5C; Thu, 30 Nov 2023 06:09:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345848AbjK3OJ1 (ORCPT + 99 others); Thu, 30 Nov 2023 09:09:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345568AbjK3OJR (ORCPT ); Thu, 30 Nov 2023 09:09:17 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BF5AD5C; Thu, 30 Nov 2023 06:09:21 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5c19a328797so775635a12.3; Thu, 30 Nov 2023 06:09:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701353361; x=1701958161; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=15OD46o/toT3zkM6qRemt6EuQTh1edNBEQbpx7wiFdE=; b=CQ3XwtGfOFWYV1boz8yUfellSZWLC/y8lTjPIqJWyNK2Fsk6TplEQk4a1dCglgiFqL Ey7waLuP43PgtIeasG3+15x44AkWFShtQFl61AUO5a0KD0MiDCUBWEt6+Albpucgj+P4 yQ6IlCcyJvODF6dkNa6hVgawUwuJO/tvV8FWvt0gaecjprEXGN1txDnMpzUkrRqgxG5b iSnL3cEOvsTfbVhirH1hJPg/MTftKBHbDJFCjULOtaSZtEHg1biNG1GLLLgN8CM+eubf 7S/rMehbM/RiMsIuFDINw5ptPTzv/UboY4+JOeAUJnoTrCFOkVm6bBz0ly93kIyxLDq6 DBIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701353361; x=1701958161; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=15OD46o/toT3zkM6qRemt6EuQTh1edNBEQbpx7wiFdE=; b=wESCro4jizsQfY5I6y5557qd05gDLnQLfwYzwCrFpcEPFGFfuTooF8QLw0AEoW6U+y y0B5Yxu4Lt8Pl4LB7wTaNJAbmrUYPbYVuxsQtjm7lNRKWkSojYwLRXxMGosCPA8Os1L8 9cgpGMHiJIMLAn4t+xVQHmNCkXDHblLmyUQ8yOhWgvUsF2vvAHXphcN9cpJCa+95UmX9 Rrbnv1wbYeQAki80Nz1tGfi6Jex1rvVctddjk/4c1o6/eUbT4zIzJObSuVD4MW4jslkJ 4N6VebqECPApyQaMB/OnKk/le5UwwIc+38pr4ja+BcFLkgtP4vaVxu0aF1rXu3sEelqv kBWA== X-Gm-Message-State: AOJu0YzJBlmzK2SmzdJZCBFNvbmq32uQCZhcLX8e1zZbl6tCluhY4rx8 ulfxVRKK0n3qtjQHPazV//VvkRBqep0RY4a94g0= X-Received: by 2002:a17:90b:314c:b0:285:a18a:4a27 with SMTP id ip12-20020a17090b314c00b00285a18a4a27mr16105052pjb.41.1701353360574; Thu, 30 Nov 2023 06:09:20 -0800 (PST) MIME-Version: 1.0 References: <20231129093113.255161-1-paul.elder@ideasonboard.com> <7122934.GXAFRqVoOG@steina-w> <20231129151637.GG24293@pendragon.ideasonboard.com> <5734628.DvuYhMxLoT@steina-w> <170135295658.1400840.15195708825865805741@ping.linuxembedded.co.uk> In-Reply-To: <170135295658.1400840.15195708825865805741@ping.linuxembedded.co.uk> From: Adam Ford Date: Thu, 30 Nov 2023 08:09:09 -0600 Message-ID: Subject: Re: [PATCH 2/2] arm64: dts: imx8mp: Add overlays for ISP instances To: Kieran Bingham Cc: Alexander Stein , Pantelis Antoniou , Laurent Pinchart , linux-media@vger.kernel.org, devicetree@vger.kernel.org, Paul Elder , tomi.valkeinen@ideasonboard.com, umang.jain@ideasonboard.com, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Tim Harvey , Philippe Schenker , Marek Vasut , Gregor Herburger , Marcel Ziswiler , open list , "ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 06:09:44 -0800 (PST) On Thu, Nov 30, 2023 at 8:02=E2=80=AFAM Kieran Bingham wrote: > > + Pantellis > > Quoting Adam Ford (2023-11-30 13:48:58) > > On Thu, Nov 30, 2023 at 3:51=E2=80=AFAM Alexander Stein > > wrote: > > > > > > Hi Laurent, > > > > > > Am Mittwoch, 29. November 2023, 16:16:37 CET schrieb Laurent Pinchart= : > > > > Hi Alexander, > > > > > > > > On Wed, Nov 29, 2023 at 11:20:07AM +0100, Alexander Stein wrote: > > > > > Am Mittwoch, 29. November 2023, 10:31:13 CET schrieb Paul Elder: > > > > > > From: Laurent Pinchart > > > > > > > > > > > > Add two overlay to enable each ISP instance. The ISP is wired d= irectly > > > > > > to the CSIS for now, bypassing the ISI completely. > > > > > > > > > > I'm not sure if this is worth adding in a separate overlay. > > > > > > > > The trouble is that, at this point, selection between the ISP and t= he > > > > ISI can only be performed through DT :-S That's why this is impleme= nted > > > > as an overlay. > > > > > > I feel a better place would be the overlay which actually adds the se= nsor. > > > This knows best whether ISI or ISP should be used. > > > > > > > > > Signed-off-by: Laurent Pinchart > > > > > > Signed-off-by: Paul Elder > > > > > > --- > > > > > > > > > > > > arch/arm64/boot/dts/freescale/Makefile | 2 ++ > > > > > > .../arm64/boot/dts/freescale/imx8mp-isp1.dtso | 36 +++++++++++= ++++++++ > > > > > > .../arm64/boot/dts/freescale/imx8mp-isp2.dtso | 36 +++++++++++= ++++++++ > > > > > > 3 files changed, 74 insertions(+) > > > > > > create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-isp1.d= tso > > > > > > create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-isp2.d= tso > > > > > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/Makefile > > > > > > b/arch/arm64/boot/dts/freescale/Makefile index > > > > > > 300049037eb0..f97dfac11189 > > > > > > 100644 > > > > > > --- a/arch/arm64/boot/dts/freescale/Makefile > > > > > > +++ b/arch/arm64/boot/dts/freescale/Makefile > > > > > > @@ -113,6 +113,8 @@ dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-dhcom-pd= k2.dtb > > > > > > > > > > > > dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-dhcom-pdk3.dtb > > > > > > dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-evk.dtb > > > > > > dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-icore-mx8mp-edimm2.2.dtb > > > > > > > > > > > > +dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-isp1.dtbo > > > > > > +dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-isp2.dtbo > > > > > > > > > > > > dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-msc-sm2s-ep1.dtb > > > > > > dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-phyboard-pollux-rdk.dtb > > > > > > dtb-$(CONFIG_ARCH_MXC) +=3D imx8mp-tqma8mpql-mba8mpxl.dtb > > > > > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso > > > > > > b/arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso new file mode = 100644 > > > > > > index 000000000000..cf394ed224ab > > > > > > --- /dev/null > > > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso > > > > > > @@ -0,0 +1,36 @@ > > > > > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > > > > > +/* > > > > > > + * Copyright 2022 Ideas on Board Oy > > > > > > + */ > > > > > > + > > > > > > +/dts-v1/; > > > > > > +/plugin/; > > > > > > + > > > > > > +#include > > > > > > + > > > > > > +&isi_0 { > > > > > > + status =3D "disabled"; > > > > > > > > > > ISI is disabled by default. What is your intention here? > > > > > > > > It could be enabled by an overlay for a camera module. Ideally we w= ant > > > > to be able to enable both the ISI and ISP at runtime, but that's no= t > > > > possible yet and will require a very large amount of work. > > > > > > Again IMHO this is part of sensor setup, in a very specific overlay. = To put it > > > into different words: I barely see the gain of this small overlay. > > > > > > Runtime switching would require a combined media controller including= both ISI > > > and ISP, no? > > > > > > Best regards, > > > Alexander > > > > > > > > > + > > > > > > + ports { > > > > > > + port@0 { > > > > > > + /delete-node/ endpoint; > > > > > > > > > > This doesn't work in overlays. See [1]. Otherwise the OF graph co= nnections > > > > > look fine to me. I'm using the same in my local overlay. > > > > > > > > Interesting, I wasn't aware of that. Maybe we should fix it :-) > > > > When I did my camera implementation, I thought it was simpler to: > > > > /delete-node/ &isi_in_0; > > > > it's a one-line change. > > > > I would suggest we just drop the overlay and make users who have the > > cameras integrate the cameras and the isp routing into their > > respective overlays. > > > > I use these to factor out common parts between multiple cameras that can > be connected to multiple ports. > > I can connect any of (Physically available to me right now) > IMX219, IMX477, IMX708, GC2145, OV5640(7?) IMX335, IMX283, IMX519, Arduc= am64MP > > to either of: > > Debix-SOM-A Port CSI-1 > Debix-SOM-A Port CSI-2 > > And I can connect those same cameras to two ports of a Pi5. So now > that's 27 overlays to manage the 9 cameras I have /on my desk/ to > connect to this board. > > Uh Oh - sorry I can also connect them to a Debix Model A ... oh no ... I > need to stop thinking about what I can connect them to. I have rockchip > boards they'll work on too! > > This explosion of overlays could be ... hard to manage. With /a lot/ of > repetition of the same data. > That makes sense, I didn't think of it that way. > > I'm not opposed to dropping these intermediate helper overlays, but I'd > be interested to know if anyone has ideas on how we could define > 'connectors' and then abstract the cameras / overlays that can be moved > between different compatible ports. > > The [RFC 0/3] Portable Device Tree Connector [0] might be interesting to > resurrect. Did that go anywhere? > > [0] https://lore.kernel.org/all/1464986273-12039-1-git-send-email-panteli= s.antoniou@konsulko.com/ > > -- > Kieran > > > adam > > > > > > > > > [1] > > > > > https://lore.kernel.org/all/CAMuHMdWu4KZbBkvEofUV2wuA1g2S=3DXHHM3= RUN1cNrcZB > > > > > khsPZA@mail.gmail.com/> > > > > > > + }; > > > > > > + }; > > > > > > +}; > > > > > > + > > > > > > +&isp_0 { > > > > > > + status =3D "okay"; > > > > > > + > > > > > > + ports { > > > > > > + port@1 { > > > > > > + isp0_in: endpoint { > > > > > > + bus-type =3D ; > > > > > > + remote-endpoint =3D <&mipi_csi_0_out>= ; > > > > > > + }; > > > > > > + }; > > > > > > + }; > > > > > > +}; > > > > > > + > > > > > > +&mipi_csi_0_out { > > > > > > + remote-endpoint =3D <&isp0_in>; > > > > > > +}; > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso > > > > > > b/arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso new file mode = 100644 > > > > > > index 000000000000..14e2e7b2617f > > > > > > --- /dev/null > > > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso > > > > > > @@ -0,0 +1,36 @@ > > > > > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > > > > > +/* > > > > > > + * Copyright 2022 Ideas on Board Oy > > > > > > + */ > > > > > > + > > > > > > +/dts-v1/; > > > > > > +/plugin/; > > > > > > + > > > > > > +#include > > > > > > + > > > > > > +&isi_0 { > > > > > > + status =3D "disabled"; > > > > > > + > > > > > > + ports { > > > > > > + port@1 { > > > > > > + /delete-node/ endpoint; > > > > > > + }; > > > > > > + }; > > > > > > +}; > > > > > > + > > > > > > +&isp_1 { > > > > > > + status =3D "okay"; > > > > > > + > > > > > > + ports { > > > > > > + port@1 { > > > > > > + isp1_in: endpoint { > > > > > > + bus-type =3D ; > > > > > > + remote-endpoint =3D <&mipi_csi_1_out>= ; > > > > > > + }; > > > > > > + }; > > > > > > + }; > > > > > > +}; > > > > > > + > > > > > > +&mipi_csi_1_out { > > > > > > + remote-endpoint =3D <&isp1_in>; > > > > > > +}; > > > > > > > > > -- > > > TQ-Systems GmbH | M=C3=BChlstra=C3=9Fe 2, Gut Delling | 82229 Seefeld= , Germany > > > Amtsgericht M=C3=BCnchen, HRB 105018 > > > Gesch=C3=A4ftsf=C3=BChrer: Detlef Schneider, R=C3=BCdiger Stahl, Stef= an Schneider > > > http://www.tq-group.com/ > > > > > > > > >