Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2446404rwb; Sun, 4 Sep 2022 16:31:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR7d5b9ATVhdq/k6DUxPa1FBhWkzlwfqBKCc/C7av+dn0nVwqDqZRrQbhuz0Q+Daf99euGDl X-Received: by 2002:a17:90b:1e4d:b0:1fd:e8b3:6699 with SMTP id pi13-20020a17090b1e4d00b001fde8b36699mr16961824pjb.172.1662334300839; Sun, 04 Sep 2022 16:31:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662334300; cv=none; d=google.com; s=arc-20160816; b=bNKkJcaocmtSHoxelKimL56I5sWN9Y4WXLGzj9Bs+D/i4hnWTxKTPEW9bX+Mtv1LWE 01KoGJP0Y9EZDEuXLt4My7S2neTlQc/yhK7GlckqhGqkJGVH5v4w0+OhKgS3XNl6CYTL bgj7cTpPOzSSr7aGDz1CzndJNXQqXtZ/JBx1XL0TlcBONGFnLi/7qW88DbVl17IDW81S TmPDZL0S7En5jrZj5oKIk5CktQfkxfYFChG7COXizy/tbaPAlGnb7De+fMtZzqMEW5+z Hbx4fARnTJhhAprNxQ06e40XVKUEFt7f8pR1gblmSOTnkmBedGHEi7esNVONRNwItvnO NzoA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UdfCZ52bPf6kms1UZqhEsUetw0dSnD3mQGkg8S5ogzo=; b=Gi+YWW7ZVJiX/XyCFtc8TOH/zxoU7mNWS3ZiqxHV8Mq8ThQ9zZUjPQHYLSAT79jr1w HN8XzG7iCwD2sSyfJXlpLR61R2XiPZd5Te2NGPdhXjDJOPjnaRj6hDJdGtaVPI4CVzZ9 v6wDkwVwCIkbLy0LB9tr+5CBQaPSNsCzbwOwX3ZWTkFdbQsC6ahw5OQJ9pj5XFJ5nLVr UcoJI4L9vxKDRv5u3YdqCh2AaKWhZZ1u164MZaI+CmYHZXNAvJuaO5EUyRgPZQVDu/eN IL2d7pnXK6NpAh+p//+tDsmOYg+o6Fq2GvugjPeu01Mq6L9Ijp/ugz3TW/a2JyYkfs4K xHTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=EHdxmti4; 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 pg7-20020a17090b1e0700b002006b010ec1si1030096pjb.163.2022.09.04.16.31.29; Sun, 04 Sep 2022 16:31:40 -0700 (PDT) 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=EHdxmti4; 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 S234724AbiIDWgP (ORCPT + 99 others); Sun, 4 Sep 2022 18:36:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231989AbiIDWgO (ORCPT ); Sun, 4 Sep 2022 18:36:14 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A00B326138; Sun, 4 Sep 2022 15:36:09 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F62B6BC; Mon, 5 Sep 2022 00:36:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1662330967; bh=tC8edg18APeJ5A7lmZCWV3tJ5z6EbUjWKD+4WsZ5GL8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EHdxmti4uhTPNLDCnSuFAi7XGEcm3J67H/1vEhrc5NjL5PpH2sHossX3IYYy7Sw58 8vlwv07r8lhQ+KmKfwrSbireAIG8A0hDB2NqLjlYXArjiKGuyfovUY/QPy+9VNI8TF g+2ecumJwvT5qChsEFV5YJtUSE7SilGqGGQkjG6w= Date: Mon, 5 Sep 2022 01:35:53 +0300 From: Laurent Pinchart To: Marco Felsch Cc: mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, kishon@ti.com, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, jacopo@jmondi.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-media@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH 3/4] media: dt-bindings: add bindings for Toshiba TC358746 Message-ID: References: <20220818143307.967150-1-m.felsch@pengutronix.de> <20220818143307.967150-4-m.felsch@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220818143307.967150-4-m.felsch@pengutronix.de> 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 Hi Marco, Thank you for the patch. On Thu, Aug 18, 2022 at 04:33:06PM +0200, Marco Felsch wrote: > Add the bindings for the Toshiba TC358746 Parallel <-> MIPI-CSI bridge > driver. > > Signed-off-by: Marco Felsch > --- > .../bindings/media/i2c/toshiba,tc358746.yaml | 157 ++++++++++++++++++ > 1 file changed, 157 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml > > diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml > new file mode 100644 > index 000000000000..9783cca363c6 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/i2c/toshiba,tc358746.yaml > @@ -0,0 +1,157 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/i2c/toshiba,tc358746.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Toshiba TC358746 Parallel to MIPI CSI2 Bridge > + > +maintainers: > + - Marco Felsch > + > +description: |- > + The Toshiba TC358746 converts a parallel video stream into a MIPI CSI-2 > + stream. The direction can be either parallel-in -> csi-out or csi-in -> > + parallel-out The chip is programmable trough I2C and SPI but the SPI > + interface is only supported in parallel-in -> csi-out mode. > + > + Note that the current device tree bindings only support the > + parallel-in -> csi-out path. > + > +properties: > + compatible: > + const: toshiba,tc358746 > + > + reg: > + maxItems: 1 > + > + clocks: > + description: > + The phandle to the reference clock source. This corresponds to the > + hardware pin REFCLK. > + maxItems: 1 > + > + clock-names: > + const: refclk As there's a single clock, should we omit the clock name ? > + > +# The bridge can act as clock provider for the sensor. To enable this support > +# #clock-cells must be specified. Attention if this feature is used than the s/than/then/ > +# mclk rate must be at least: (2 * link-frequency) / 8 > +# `------------------ยด ^ > +# internal PLL rate smallest possible mclk-div Could this be captured in the description of the property instead of a comment ? > + "#clock-cells": > + const: 0 > + > + clock-output-names: > + description: > + The clock name of the MCLK output, the default name is tc358746-mclk. > + maxItems: 1 > + > + vddc-supply: > + description: Digital core voltage supply, 1.2 volts > + > + vddio-supply: > + description: Digital I/O voltage supply, 1.8 volts > + > + vddmipi-supply: > + description: MIPI CSI phy voltage supply, 1.2 volts > + > + reset-gpios: > + description: > + The phandle and specifier for the GPIO that controls the chip reset. > + This corresponds to the hardware pin RESX which is physically active low. > + maxItems: 1 > + > + ports: > + $ref: /schemas/graph.yaml#/properties/ports > + properties: > + port@0: > + $ref: /schemas/graph.yaml#/properties/port > + description: Input port Are the H/V sync signal polarities fixed, or should they be specified here ? Does the chip support external sync only, or also BT.656 ? In the latter case this needs a bus-type. > + > + port@1: > + $ref: /schemas/graph.yaml#/$defs/port-base > + description: Output port > + > + properties: > + endpoint: > + $ref: /schemas/media/video-interfaces.yaml# > + unevaluatedProperties: false > + > + properties: > + data-lanes: > + minItems: 1 > + maxItems: 4 > + > + clock-noncontinuous: true > + link-frequencies: true > + > + required: > + - data-lanes > + - link-frequencies > + > + required: > + - port@0 > + - port@1 > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - vddc-supply > + - vddio-supply > + - vddmipi-supply > + - ports > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + csi-bridge@e { > + compatible = "toshiba,tc358746"; > + reg = <0xe>; > + > + clocks = <&refclk>; > + clock-names = "refclk"; > + > + reset-gpios = <&gpio 2 GPIO_ACTIVE_LOW>; > + > + vddc-supply = <&v1_2d>; > + vddio-supply = <&v1_8d>; > + vddmipi-supply = <&v1_2d>; > + > + /* sensor mclk provider */ > + #clock-cells = <0>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + /* Input */ > + port@0 { > + reg = <0>; > + tc358746_in: endpoint { > + remote-endpoint = <&sensor_out>; > + }; Wrong indentation here. > + }; > + > + /* Output */ > + port@1 { > + reg = <1>; > + tc358746_out: endpoint { > + remote-endpoint = <&mipi_csi2_in>; > + data-lanes = <1 2>; > + clock-noncontinuous; > + link-frequencies = /bits/ 64 <216000000>; > + }; > + }; > + }; > + }; > + }; -- Regards, Laurent Pinchart