From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41E8CC00A89 for ; Fri, 30 Oct 2020 22:46:18 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E13A1221EB for ; Fri, 30 Oct 2020 22:46:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GlmNc91Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E13A1221EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bWuKAp3A3aWKkn54lqv4Ac8KrtobCXizUCi1K3fcvpY=; b=GlmNc91QrnnUHBygO57X/eJ8Q hrCMDIxKbxBxyggVwLGpw2ovsfJnRoYumL19WgpPvw9yQ2F9GDVPSeg9fq0QbU1OHgbvrRpj/gTBN e2CDNqN557JBwMk0hflLle3I8L9ZfFONyq4bgy8clgEEvXt1klMc1yvTZY0utFquNI/QGyixhbDtZ 5/0FwUHG8xFZT1je4bAtNN9VhLwtMTne6KWr4ToT+2s62VbCqsO69TkNvrbPhAweJTWMSmdjpMeQ5 hCyLC7jLeXKWkdOOjMoYpOBcR/u6NhPY0QC1DkBw8Q89XYlR4VbroWtTc6IIeUiZgYTch6sGcBt2o mz5GIt4EA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYd8X-00064M-Mt; Fri, 30 Oct 2020 22:44:45 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYd8U-00063K-Fk for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 22:44:43 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id 327E91F45F45 Subject: Re: [PATCH 00/14] Allwinner MIPI CSI-2 support for A31/V3s/A83T To: Paul Kocialkowski , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linux-sunxi@googlegroups.com References: <20201023174546.504028-1-paul.kocialkowski@bootlin.com> From: Helen Koike Message-ID: Date: Fri, 30 Oct 2020 19:44:28 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: <20201023174546.504028-1-paul.kocialkowski@bootlin.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201030_184442_769813_2F0924E3 X-CRM114-Status: GOOD ( 29.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Philipp Zabel , Thomas Petazzoni , Greg Kroah-Hartman , Vinod Koul , Maxime Ripard , Kishon Vijay Abraham I , Hans Verkuil , Chen-Yu Tsai , Rob Herring , Hans Verkuil , Yong Deng , Sakari Ailus , Mauro Carvalho Chehab , kevin.lhopital@hotmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Paul, I have some comments through the series, I hope this helps. On 10/23/20 2:45 PM, Paul Kocialkowski wrote: > This series introduces support for MIPI CSI-2, with the A31 controller that is > found on most SoCs (A31, V3s and probably V5) as well as the A83T-specific > controller. While the former uses the same MIPI D-PHY that is already supported > for DSI, the latter embeds its own D-PHY. > > In order to distinguish the use of the D-PHY between Rx mode (for MIPI CSI-2) > and Tx mode (for MIPI DSI), a submode is introduced for D-PHY in the PHY API. > This allows adding Rx support in the A31 D-PHY driver. > > A few changes and fixes are applied to the A31 CSI controller driver, in order > to support the MIPI CSI-2 use-case. > > Follows is the V4L2 device topology representing the interactions between > the MIPI CSI-2 sensor, the MIPI CSI-2 controller (which controls the D-PHY) > and the CSI controller: > - entity 1: sun6i-csi (1 pad, 1 link) > type Node subtype V4L flags 0 > device node name /dev/video0 > pad0: Sink > <- "sun6i-mipi-csi2":1 [ENABLED,IMMUTABLE] > > - entity 5: sun6i-mipi-csi2 (2 pads, 2 links) > type V4L2 subdev subtype Unknown flags 0 > pad0: Sink > <- "ov5648 0-0036":0 [ENABLED,IMMUTABLE] > pad1: Source > -> "sun6i-csi":0 [ENABLED,IMMUTABLE] > > - entity 8: ov5648 0-0036 (1 pad, 1 link) > type V4L2 subdev subtype Sensor flags 0 > device node name /dev/v4l-subdev0 Question: I noticed is that sun6i-mipi-csi2 doesn't expose a node under /dev/, but the sensor exposes it. Probably because it uses V4L2_SUBDEV_FL_HAS_DEVNODE and sun6i-csi() calls v4l2_device_register_subdev_nodes(). I find this weird from a userspace pov, since usually we don't mix manual and auto propagation of the configs, so I started wondering if sun6i-csi driver should be calling v4l2_device_register_subdev_nodes() in the first place. Also, sun6i-csi doesn't seem to be used by any board dts (it's declared on the dtsi, but I didn't find any dts enabling it), so I wonder if it would be a bad thing if we update it. > pad0: Source > [fmt:SBGGR8_1X8/640x480@1/30 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range] > -> "sun6i-mipi-csi2":0 [ENABLED,IMMUTABLE] If I understand correctly, this is very similar to ipu3: sensor->bus->dma_engine in the case of ipu3-cio2: sensor->ipu3-csi2->ipu3-cio2 in this case: ov5648->sun6i-mipi-csi2->sun6i-csi On thing that is confusing me is the name csi2 with csi (that makes me think of csi vesun6i-csirsion one, which is not the case), I would rename it to sun6i-video (or maybe it is just me who gets confused). I know this driver is already upstream and not part of this series, but on the other hand it doesn't seem to be used. On another note, I always wonder if we should expose the bus in the topology, I'm not sure if it provides any useful API or information for userspace, and you could have a cleaner code (maybe code could be under phy subsystem). But at the same time, it seems this is a pattern on v4l2. I'd like to hear what others think on the above. Regards, Helen > > Happy reviewing! > > Paul Kocialkowski (14): > phy: Distinguish between Rx and Tx for MIPI D-PHY with submodes > phy: allwinner: phy-sun6i-mipi-dphy: Support D-PHY Rx mode for MIPI > CSI-2 > media: sun6i-csi: Support an optional dedicated memory pool > media: sun6i-csi: Fix the image storage bpp for 10/12-bit Bayer > formats > media: sun6i-csi: Only configure the interface data width for parallel > media: sun6i-csi: Support feeding from the MIPI CSI-2 controller > dt-bindings: media: i2c: Add A31 MIPI CSI-2 bindings documentation > media: sunxi: Add support for the A31 MIPI CSI-2 controller > ARM: dts: sun8i: v3s: Add CSI0 camera interface node > ARM: dts: sun8i: v3s: Add MIPI D-PHY and MIPI CSI-2 interface nodes > dt-bindings: media: i2c: Add A83T MIPI CSI-2 bindings documentation > media: sunxi: Add support for the A83T MIPI CSI-2 controller > ARM: dts: sun8i: a83t: Add MIPI CSI-2 controller node > media: sunxi: sun8i-a83t-mipi-csi2: Avoid using the (unsolicited) > interrupt > > .../media/allwinner,sun6i-a31-mipi-csi2.yaml | 168 +++++ > .../media/allwinner,sun8i-a83t-mipi-csi2.yaml | 158 +++++ > arch/arm/boot/dts/sun8i-a83t.dtsi | 26 + > arch/arm/boot/dts/sun8i-v3s.dtsi | 62 ++ > drivers/media/platform/sunxi/Kconfig | 2 + > drivers/media/platform/sunxi/Makefile | 2 + > .../platform/sunxi/sun6i-csi/sun6i_csi.c | 54 +- > .../platform/sunxi/sun6i-csi/sun6i_csi.h | 20 +- > .../platform/sunxi/sun6i-mipi-csi2/Kconfig | 11 + > .../platform/sunxi/sun6i-mipi-csi2/Makefile | 4 + > .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c | 635 +++++++++++++++++ > .../sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.h | 116 +++ > .../sunxi/sun8i-a83t-mipi-csi2/Kconfig | 11 + > .../sunxi/sun8i-a83t-mipi-csi2/Makefile | 4 + > .../sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.c | 92 +++ > .../sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.h | 39 ++ > .../sun8i_a83t_mipi_csi2.c | 660 ++++++++++++++++++ > .../sun8i_a83t_mipi_csi2.h | 196 ++++++ > drivers/phy/allwinner/phy-sun6i-mipi-dphy.c | 164 ++++- > drivers/staging/media/rkisp1/rkisp1-isp.c | 3 +- > include/linux/phy/phy-mipi-dphy.h | 13 + > 21 files changed, 2408 insertions(+), 32 deletions(-) > create mode 100644 Documentation/devicetree/bindings/media/allwinner,sun6i-a31-mipi-csi2.yaml > create mode 100644 Documentation/devicetree/bindings/media/allwinner,sun8i-a83t-mipi-csi2.yaml > create mode 100644 drivers/media/platform/sunxi/sun6i-mipi-csi2/Kconfig > create mode 100644 drivers/media/platform/sunxi/sun6i-mipi-csi2/Makefile > create mode 100644 drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c > create mode 100644 drivers/media/platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.h > create mode 100644 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Kconfig > create mode 100644 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/Makefile > create mode 100644 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.c > create mode 100644 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_dphy.h > create mode 100644 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c > create mode 100644 drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.h > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel