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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB923C433EF for ; Mon, 21 Feb 2022 10:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JQCAgeh/dGzc5snN+T8Pw0o3BsVdTeT56orAZiWgLjc=; b=cWgWjxXG62oANKGqeAzA1k5a+w eAQlP+Uqi+DHAN1r0VLb9yVH5PaOu6M/FKuRIY9MOjxJp4slRgQ0FAbAfiwdwKst91Q4nJeAFV9Ix EY/uh4m04w/1+vWE82TpO7ny/0q4baetaX8o9ZnmC4Cd9aMe4csOgXwF5H6Dd4HsKN+K790XwnMmr CE+6Lwpc7GqYTfrzYbIOa588bqLWx8oaUuv431ayqPJOUDxbtxat8D3BFFVFY6OUwafe3L6J6PY7K x4EuqpbYIOPTmm5lQ7P4OJqW2I9EDD5g2gM2ZiKn34WnoqSlp8eFKQvLFGA9mQUaNpRV/bVftpmXz 7+H6H/kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM6CK-0054Cm-1k; Mon, 21 Feb 2022 10:45:40 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nM5XE-004kfv-Mq; Mon, 21 Feb 2022 10:03:14 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id E57DB58025E; Mon, 21 Feb 2022 05:03:11 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 21 Feb 2022 05:03:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=MewriESTXRMbblpSYnQ8yYADa3NnoEjRQEC2H3 lKSUI=; b=Mt768FWMLUOeF8jeTm7nkj7ASdVW7s67U6Im0Wy00c2rytVEY+2t8W plTGafbs/POLzovhcntJtXs25qHVz/XcFfimvNGPiD84N33FRLEHQnXPHu8y9RM/ 62unKA84+3IGrcJEgQR7urG8gi8N6Btu/vc8WtRwCIB5JG3XuZKjVkLQcaXk4sId u2RPC3YU/KWIkMuJygRm6ogYbDUo6qXqVkzxgB6VYUC8ZfOlBZz0f4wQ06Dplrhr 7l/pyobImZL6lWzDe/CbdcPjGrIl77Tft0nS4Szn6M62y081r+L15ny6+G2R/LEN KpmKYGGVHxHW+x0KfWi2kfOXntvVShFg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=MewriESTXRMbblpSY nQ8yYADa3NnoEjRQEC2H3lKSUI=; b=PWnPDsKkAXzzlVLbReqFM4ev0+D84Wmj8 UXO8s4hvhDp2973lI485LLrFleqMu5Z2xSEMtWpepGxvtUDkC5NYDYKzEvAA2R1u +IDGx4LP70DhXKLJZRrhVPFKCHXq+U0oJmA/zEQDePTOtoT4M4lCXDSu54Bp47C/ JA4gRxORqlB66YrgQRNOhVr4Jvl9XxgvDHoK98Lp9e3S2QIfJvBCG+uRyNBIpulU 64c/a4Fq9zRPOXrTNEJdKLYcadHfD5pyWYMO35o771FiIaLYYzbsAsQIyz6Zh007 UqcSl5oSzox4tIE1TJFkI5Kw17EIRC/wRewu3LeKwkuD9lrc+b73A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeeigddutdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeffteetveeijeetuefhffegkeetgffhieelheehtdduudethffhjedtvddtudel vdenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordht vggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 05:03:10 -0500 (EST) Date: Mon, 21 Feb 2022 11:03:09 +0100 From: Maxime Ripard To: Laurent Pinchart Cc: Stefan Wahren , Jean-Michel Hautbois , dave.stevenson@raspberrypi.com, devicetree@vger.kernel.org, kernel-list@raspberrypi.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, lukasz@jany.st, mchehab@kernel.org, naush@raspberrypi.com, robh@kernel.org, tomi.valkeinen@ideasonboard.com, bcm-kernel-feedback-list@broadcom.com, Florian Fainelli Subject: Re: [PATCH v5 03/11] dt-bindings: media: Add bindings for bcm2835-unicam Message-ID: <20220221100309.ytcy6bxijwztyhsd@houat> References: <20220208155027.891055-1-jeanmichel.hautbois@ideasonboard.com> <20220208155027.891055-4-jeanmichel.hautbois@ideasonboard.com> <20220214093954.5y4jbqcddmwhgxr5@houat> <7ba0d8e7-72b9-d139-f29f-45a803ca2fdb@i2se.com> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_020312_884366_2116EA83 X-CRM114-Status: GOOD ( 41.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7106311116071847860==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7106311116071847860== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hgycafmcvwvkmfnm" Content-Disposition: inline --hgycafmcvwvkmfnm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 21, 2022 at 09:10:27AM +0200, Laurent Pinchart wrote: > Hi Stefan, >=20 > On Mon, Feb 14, 2022 at 12:32:59PM +0100, Stefan Wahren wrote: > > Am 14.02.22 um 10:54 schrieb Laurent Pinchart: > > > On Mon, Feb 14, 2022 at 10:39:54AM +0100, Maxime Ripard wrote: > > >> On Sun, Feb 13, 2022 at 04:48:45PM +0100, Stefan Wahren wrote: > > >>> as someone with a little more insight to the clocks, i like to know= your > > >>> opinion about the bcm2835-unicam binding. > > >>> > > >>> Am 08.02.22 um 16:50 schrieb Jean-Michel Hautbois: > > >>>> Introduce the dt-bindings documentation for bcm2835 CCP2/CSI2 Unic= am > > >>>> camera interface. > > >>>> > > >>>> Signed-off-by: Dave Stevenson > > >>>> Signed-off-by: Naushir Patuck > > >>>> Signed-off-by: Jean-Michel Hautbois > > >>>> Reviewed-by: Laurent Pinchart > > >>>> > > >>>> --- > > >>>> v4: > > >>>> - make MAINTAINERS its own patch > > >>>> - describe the reg and clocks correctly > > >>>> - use a vendor entry for the number of data lanes > > >>>> --- > > >>>> .../bindings/media/brcm,bcm2835-unicam.yaml | 117 +++++++++++++= +++++ > > >>>> 1 file changed, 117 insertions(+) > > >>>> create mode 100644 Documentation/devicetree/bindings/media/brcm,b= cm2835-unicam.yaml > > >>>> > > >>>> diff --git a/Documentation/devicetree/bindings/media/brcm,bcm2835-= unicam.yaml b/Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.y= aml > > >>>> new file mode 100644 > > >>>> index 000000000000..1938ace23b3d > > >>>> --- /dev/null > > >>>> +++ b/Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.= yaml > > >>>> @@ -0,0 +1,117 @@ > > >>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > >>>> +%YAML 1.2 > > >>>> +--- > > >>>> +$id: http://devicetree.org/schemas/media/brcm,bcm2835-unicam.yaml# > > >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# > > >>>> + > > >>>> +title: Broadcom BCM283x Camera Interface (Unicam) > > >>>> + > > >>>> +maintainers: > > >>>> + - Raspberry Pi Kernel Maintenance > > >>>> + > > >>>> +description: |- > > >>>> + The Unicam block on BCM283x SoCs is the receiver for either > > >>>> + CSI-2 or CCP2 data from image sensors or similar devices. > > >>>> + > > >>>> + The main platform using this SoC is the Raspberry Pi family of = boards. On > > >>>> + the Pi the VideoCore firmware can also control this hardware bl= ock, and > > >>>> + driving it from two different processors will cause issues. To= avoid this, > > >>>> + the firmware checks the device tree configuration during boot. = If it finds > > >>>> + device tree nodes whose name starts with 'csi' then it will sto= p the firmware > > >>>> + accessing the block, and it can then safely be used via the dev= ice tree > > >>>> + binding. > > >>>> + > > >>>> +properties: > > >>>> + compatible: > > >>>> + const: brcm,bcm2835-unicam > > >>>> + > > >>>> + reg: > > >>>> + items: > > >>>> + - description: Unicam block. > > >>>> + - description: Clock Manager Image (CMI) block. > > >>>> + > > >>>> + reg-names: > > >>>> + items: > > >>>> + - const: unicam > > >>>> + - const: cmi > > >>>> + > > >>>> + interrupts: > > >>>> + maxItems: 1 > > >>>> + > > >>>> + clocks: > > >>>> + items: > > >>>> + - description: Clock to drive the LP state machine of Unica= m. > > >>>> + - description: Clock for the VPU (core clock). > > >>>> + > > >>>> + clock-names: > > >>>> + items: > > >>>> + - const: lp > > >>>> + - const: vpu > > >>>> + > > >>> > > >>> according to this patch [1], the unicam driver only needs the VPU c= lock > > >>> reference just to enforce a minimum of 250 MHz. The firmware clock > > >>> binding and its driver is specific to the bcm2711, but the Unicam IP > > >>> exists since bcm2835. > > >>> > > >>> So do you think the clock part is correct or should be the VPU clock > > >>> optional? > > >> > > >> I think we should keep it mandatory. Indeed, that clock is shared wi= th > > >> the HVS that will change its rate on a regular basis, so even just > > >> enforcing that 250MHz while it's on without a clock handle will be > > >> fairly hard. > > >> > > >> Also, those are the constraints we have now, but having the clock ha= ndle > > >> all the time will allow us to add any constraint we might need in the > > >> future. > > >> > > >> And BCM2711 or not, the clock has probably always been there. > > > > > > Furthermore, regardless of what the driver needs, Unicam operates with > > > the VPU clock, so I think it makes sense to reference it in the device > > > tree. > >=20 > > okay, as a result we need a DTS patch for bcm2835-rpi.dtsi to enable the > > firmware clocks and its driver in this series. >=20 > Can't we do that on top, enabling Unicam support for bcm2711 only first > ? I have no idea how to deal with firmware clocks on bcm2825, and I'm > not sure Jean-Michel even has a hardware platform to test it. The RPi kernel uses the firmware clocks driver for all the platforms, so it shouldn't be too bad. Maxime --hgycafmcvwvkmfnm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYhNjXQAKCRDj7w1vZxhR xXONAQCmnUupgwvTeLp0tAkmJV3ctRhLRSUsMMeJCaHqExxavAEAlN3LD5YUbQlJ ZP3zjKZ/YFbcFLVUD8Dzpvqr5E0xaAg= =C2uD -----END PGP SIGNATURE----- --hgycafmcvwvkmfnm-- --===============7106311116071847860== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7106311116071847860==--