Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1500302pxb; Tue, 8 Feb 2022 20:14:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2tGvPPPInuNILmc0Ohwk0xwRi+tjKXTYyOzRW9sUMA11AHujkh0UTu3VzlwrYPaBrw1Cj X-Received: by 2002:a17:907:1689:: with SMTP id hc9mr317455ejc.348.1644380091857; Tue, 08 Feb 2022 20:14:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644380091; cv=none; d=google.com; s=arc-20160816; b=HWg1HPIquQGSMA1PO9v+a1q7ylYOdv1otX29BnVCLD4wjYBfmeLC+QZiQ5cQXZmxQP RFKWpO/qtMFBq9lCUFnjunJKq178OdqMdxRJJ5Xf2t9SOmnPqcRMn6hTfCu8BtoQbmZF WtQ4NzAxm08arlBP709m4REJIzWJkuqZQbJG8U+W8LA4ymkbLadEUQptV6nU9Xjx9CnQ v9lNZ7GZNGNF8OcWDfopSpYDLNWOaIF7gBuCarvCN+vxG531PWbGd+FulxGzzoSP+moI XCm+cmIneCLy2rKmbIVH6bzP+e6VIzI6NFR7o205Enajd3Oe4FDurPkhFw3dNxLoHm4y CBrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yUPViDAaAusOcV73IMGOIKVIsvLPI6owmEQQYHlhseQ=; b=ZJ8x0jNXkwRbf4VlV00pC15wCNFXkjnzl1WUi5W/I7OYp2VxiKBTJNQFFjCqgyoOr1 noTJWCrgTY04kUTWjBGq+hPCK3m4xTkR/i/K7gQoGqlp9S7o4c9YCcNEzgppOsFu8f/m TOSa/TuN73GFLma3nO0HBNRcIwNp8Uj5NOsyBdl3hvj/gEO6vLUETaXGMhPEOYqt0jG/ F4Sbe3eZFnr1vpVQpNGrXIfGaMClV52rxZl/DebkgnNCfMnAXxz8t+HRfRavLsWAqPFl H9tOFoGf5WsVhVx68YaGJF288stfA1CEScSgmkFzli2VoDrYvF+f+ElwpzBjooqzt/wV Necg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=sDTSMOzI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si13213414edf.622.2022.02.08.20.14.27; Tue, 08 Feb 2022 20:14:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=sDTSMOzI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382349AbiBHPu7 (ORCPT + 99 others); Tue, 8 Feb 2022 10:50:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382134AbiBHPul (ORCPT ); Tue, 8 Feb 2022 10:50:41 -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 ABD61C061579; Tue, 8 Feb 2022 07:50:40 -0800 (PST) Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:b99c:2ebe:5dcf:6513]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A16CED6E; Tue, 8 Feb 2022 16:50:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1644335435; bh=97hniGzwKWiHJFNxwtzy/v/4jABjUo8/9jHZ1tj9w2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sDTSMOzI1d4YKzAXNuG8DweA4CKMoyy5QiSVXuprFMwVODPrti766yXKnv5P/5dtK 9io8XxHpBOfwh8Fpb2tej8pYLmk9FJkW7oYVCvUm+0mlOUDs4ZVODCizIHxRZ1AG5n DTixRZjhRSvGGMCBFAP0O27skq5+4roWxKrV5ru8= From: Jean-Michel Hautbois To: jeanmichel.hautbois@ideasonboard.com Cc: dave.stevenson@raspberrypi.com, devicetree@vger.kernel.org, kernel-list@raspberrypi.com, laurent.pinchart@ideasonboard.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, stefan.wahren@i2se.com Subject: [PATCH v5 03/11] dt-bindings: media: Add bindings for bcm2835-unicam Date: Tue, 8 Feb 2022 16:50:19 +0100 Message-Id: <20220208155027.891055-4-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220208155027.891055-1-jeanmichel.hautbois@ideasonboard.com> References: <20220208155027.891055-1-jeanmichel.hautbois@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce the dt-bindings documentation for bcm2835 CCP2/CSI2 Unicam 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,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..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 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 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. + + reg-names: + items: + - const: unicam + - const: cmi + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Clock to drive the LP state machine of Unicam. + - description: Clock for the VPU (core clock). + + 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 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: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: true + + required: + - data-lanes + + required: + - endpoint + +required: + - compatible + - reg + - reg-names + - 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>; + reg-names = "unicam", "cmi"; + 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 { + remote-endpoint = <&imx219_0>; + data-lanes = <1 2>; + }; + }; + }; +... -- 2.32.0