Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3074831pxb; Fri, 4 Feb 2022 00:09:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrwhkMpGnoPsFcTBio0F/kVpk8SuhiP3ipSO4KQQCzFu18FlnUUNKG4FV6WcAdxNluwjeZ X-Received: by 2002:a63:86c8:: with SMTP id x191mr1515616pgd.248.1643962154908; Fri, 04 Feb 2022 00:09:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643962154; cv=none; d=google.com; s=arc-20160816; b=cSyWGwhpexsrhcrvYugpqWC4+25bPFmQb8KIk8Qg0BfzTClU063jKhZk7G2G9y1rn4 QTHOQjkqFm1UyeZzkLYgkdLOHtay7GUYcdeWnbRpgHHJ0i9y69Pw/jQd6S8Y2gnGlbhr rfpLaxwbtSrvk79uNGzmyfRQEa3koR1om2slMmNOQGOgh8TNbP08WMGJXs+es7g23KA8 nvqLqSZOn0DRJAzybojm2tMU+MNKh6+fiHkcvg/iL3zFhwFLlL+btIZPI6ee77fr+7cc m9NpReiysvWoDdyI6XqyxGH3zBq+Loc3TlO7HxEszl+/iU3jkUXCnI26cI8Nu0hkTVaw +wWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=39nITGEEkxyDe7KsfYc/cIwByq7wmETGeKSdplllr9Y=; b=hwSEDpxh8Nj08lxQ0wfVSptJq3x8TJG23zOEaZpoc4jFqN4PFguiIQkWX1Hms+tnvw Qe2UziCpolvVauH9NvRZdxc97LbY3TArq7x9gIyC3Y43otJlN52hxwMYm1Egacx76lfT 6r40GO+NdwukDHrRhc/0ixpfeBRDO34rZAyCM2TqLWp3ZP15vavfggqPAIMvvxXp7Yy2 0rjNOpfxOg11onfhkhvxCiKf+UjNomFzamn8LWwJhyaF+I0eVDlH8TYHaSoc4/LKMrBf 48hW/eNHCtHyadsNit6QS2ruMt43DG13VAw9zFTP6VXE5bpSTZob1rthE46yLgVOrppX qymg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=PbzZp0FW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g184si1150007pgc.286.2022.02.04.00.09.02; Fri, 04 Feb 2022 00:09:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=PbzZp0FW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356664AbiBDCnF (ORCPT + 99 others); Thu, 3 Feb 2022 21:43:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbiBDCnC (ORCPT ); Thu, 3 Feb 2022 21:43:02 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C11BEC061714; Thu, 3 Feb 2022 18:43:02 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C419B472; Fri, 4 Feb 2022 03:42:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1643942580; bh=0ZU9+PU+RLMnbfCx5GO4SHCpwrlVZ8Gy4RJmr7f64sI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PbzZp0FWWADNGqYU2WhqKo1CKUHUBBQ1hc+6kkrpYg9QCM00OFXKuzv3lzyz2jJes 3Te8rgh2xTTuyl/gxldI/yGYRNkzvjW8qPSkz/r+Qa7THrwvB0odHymuQUxyJFkvev hjnek+DfCXHRcNqzkXUfXXaHF8b4P/ppiVVqaQFk= Date: Fri, 4 Feb 2022 04:42:35 +0200 From: Laurent Pinchart To: Jean-Michel Hautbois Cc: 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, nsaenz@kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: Re: [RFC PATCH v4 03/12] dt-bindings: media: Add bindings for bcm2835-unicam Message-ID: References: <20220203175009.558868-1-jeanmichel.hautbois@ideasonboard.com> <20220203175009.558868-4-jeanmichel.hautbois@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220203175009.558868-4-jeanmichel.hautbois@ideasonboard.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jean-Michel, Thank you for the patch. On Thu, Feb 03, 2022 at 06:50:00PM +0100, Jean-Michel Hautbois wrote: > Introduce the dt-bindings documentation for bcm2835 CCP2/CSI2 Unicam > camera interface. Also add a MAINTAINERS entry for it. You can drop the last sentence now that the MAINTAINERS entry has been moved out. > Signed-off-by: Dave Stevenson > Signed-off-by: Naushir Patuck > Signed-off-by: Jean-Michel Hautbois > > --- > 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 | 110 ++++++++++++++++++ > 1 file changed, 110 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml > > diff --git a/Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml b/Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml > new file mode 100644 > index 000000000000..0725a0267c60 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml > @@ -0,0 +1,110 @@ > +# 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 block, > + 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 starting by csi then "[...] device tree nodes whose name starts with 'csi' then [...]" > + it will stop the firmware accessing the block, and it can then > + safely be used via the device tree binding. > + > +properties: > + compatible: > + const: brcm,bcm2835-unicam > + > + reg: > + items: > + - description: Unicam block. > + - description: Clock Manager Image (CMI) block. As Stefan pointed out, you need reg-names: items: - const: main - const: cmi Alternatives for main could be core or unicam. Dave, do you have a preference ? > + > + interrupts: > + maxItems: 1 > + > + clocks: > + items: > + - description: Clock to drive the LP state machine of Unicam. > + - description: Clock for the vpu (core clock). s/vpu/VPU/ > + > + clock-names: > + items: > + - const: lp > + - const: vpu > + > + power-domains: > + items: > + - description: Unicam power domain > + > + brcm,num-data-lanes: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [ 2, 4 ] > + description: Number of data lanes on the csi bus I'd write description: | Number of CSI-2 data lanes supported by this Unicam instance. The number of data lanes actively used is specified with the data-lanes endpoint property. > + > + port: > + additionalProperties: false Shouldn't this be unevaluatedProperties ? I would also put it after the $ref line. > + $ref: /schemas/graph.yaml#/$defs/port-base > + > + properties: > + endpoint: > + $ref: /schemas/media/video-interfaces.yaml# > + unevaluatedProperties: false > + > + properties: > + data-lanes: true > + link-frequencies: true link-frequencies is specified on the sensor side, not here. You can drop it. > + > + required: > + - data-lanes > + - link-frequencies > + > + required: > + - endpoint > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + - power-domains > + - brcm,num-data-lanes > + - port > + > +additionalProperties: False > + > +examples: > + - | > + #include > + #include > + #include > + csi1: csi@7e801000 { > + compatible = "brcm,bcm2835-unicam"; > + reg = <0x7e801000 0x800>, > + <0x7e802004 0x4>; > + interrupts = ; > + clocks = <&clocks BCM2835_CLOCK_CAM1>, > + <&firmware_clocks 4>; > + clock-names = "lp", "vpu"; > + power-domains = <&power RPI_POWER_DOMAIN_UNICAM1>; > + brcm,num-data-lanes = <2>; > + port { > + csi1_ep: endpoint { Wrong indentation. > + remote-endpoint = <&imx219_0>; > + data-lanes = <1 2>; > + link-frequencies = /bits/ 64 <456000000>; Drop link-frequencies here too. With these small issues fixed, Reviewed-by: Laurent Pinchart > + }; > + }; > + }; > +... -- Regards, Laurent Pinchart