Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2804623rwd; Mon, 29 May 2023 00:45:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4x6HGe/HlcQFKTcmFmHsazGg/T6Nkff6ruDDxxwalvjDgjGbUtXvalPxtt7u0HZOfImKNQ X-Received: by 2002:a17:903:41c5:b0:1ad:edbd:8547 with SMTP id u5-20020a17090341c500b001adedbd8547mr11641967ple.15.1685346311233; Mon, 29 May 2023 00:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685346311; cv=none; d=google.com; s=arc-20160816; b=E2h/H8NaQowe7u/XaNlJtkJBS9pmeLXDyUuGm1eVD8ZF8A2lKsy5PL8Pe81d7v6Bp9 wtBRp4ZUX7GIa4koA3g80qV/qILED1hDIMaGC01HFX3ou6B3KvJXyuOXnI4GKSAOl7wg 69ugE1xm47k4Ff9X9I/GWopfmpIz2sriLkRRtj5c1cblo62f87fVbj5/q6hfO0xV4CKp o9XlWw90FDFZNYhUrGRyN7VRfx4lFuFaaBB6ZDmTgQTdTDC+0k0Hg/aAfeYBnlet1x9n hILKrrPrpNc36yD/5IGcByDjKsuDg2+LbKvTh1dUn/H6zRK21hzD5HOHom2UUOkdNwkI Up6A== 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=O8AKvRuhZAAgYNyvkCPO3RgEAGqxsbL29QI7a0NawxI=; b=xr+thq+HkQkFJFVqw/WPgb2hAy10mmtxfxUJUxGusA7EJDMab9ocqhKnxvEs4oXgeU b67CjYEaGA+yH3MyzbsAGZRzaU92L4HNggKHi/ZJm97wDWAvln4+TgjMMiENtxHMaoNK IM9Lb074WrBv6Y4Ii7JWT3e0Hf8zqrhAe52iq/7buFjrCYhgQpZxU+Y4FlZ4LDOl1Rez LQBUR/PHC1LGrFdwUkNcoWTpmNAqaH6bp8mEhyBHTNpX20ex8sZ2BseyynHt1HdyusN1 rgI1LW0DkHigx4WmuPzc5TjLPASENYLarAspMQ5U1WMCCr21J7l5cjyJBE3J+H4nvG3Y BpEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SRAUjFhp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b1-20020a170902d50100b001a98c0d3a9esi6191325plg.557.2023.05.29.00.44.56; Mon, 29 May 2023 00:45:11 -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 header.i=@gmail.com header.s=20221208 header.b=SRAUjFhp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231543AbjE2Hlp (ORCPT + 99 others); Mon, 29 May 2023 03:41:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231530AbjE2Hlb (ORCPT ); Mon, 29 May 2023 03:41:31 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 095A9CA; Mon, 29 May 2023 00:41:28 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-96fbe7fbdd4so556242666b.3; Mon, 29 May 2023 00:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685346086; x=1687938086; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=O8AKvRuhZAAgYNyvkCPO3RgEAGqxsbL29QI7a0NawxI=; b=SRAUjFhpvWuvUifRrQRqGVrKGO5yvn6LaaTV8aJEWsJTTvyWSY7tpf197/cU0jtRnJ QajMF2nccPHD/s1LFH7ZYBuNqR9clIRKEYNwH07Nqey8UGuGZQHgXWNdgRbRMku3416M qAsw3OaKeYpm6Y8pYuCFy22p2iO8rV99jMhflL13CVI0exYWZXInu559voiCga6UCDN2 xRriw8uO7lYtdoaVYCANVsYerA4+gJ0uBuVJSXt82K0SnkeEDzYINZKwT4Nffi8Av5mW 7as0cZeeFz0Gz8fhK1pM+2ZL4OIGzI01ucg0CYhppnwpZV2DXggpKg/y80tX6UI1dvrv iPyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685346086; x=1687938086; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=O8AKvRuhZAAgYNyvkCPO3RgEAGqxsbL29QI7a0NawxI=; b=coyE+CjPXANA99FDVulJf6BAdkfCScSUOXTlzWHmxdWygNfE2kdq0ITfupsTPWsSOV G0XdTBUrWoAAp0+P8jTaptjAylM+XQxjP6qWf2x+1wFVD9/NF7So74GBDhU5V4dUz1lh 6vFCl8weUk3v4bz6OqPq12DqK8DMkHs8/xfZxYj7Cycb8+WSxzO/E9eXcsva3nyc55fy I4/wvWvddYf08N9hWS7lnusRtw2bstX6BaFApU9w2yK4+AcwNBqlwSdOq0J6n0Ez666L f1Zi+fDNVOfuZaZNsAi2GGhJzvcgQZYWwpfZ6kNYR8rmxd8eFCr0wlZWQaNUQmDDpaBN CKXA== X-Gm-Message-State: AC+VfDyFJKodrkCxVuGIsDSr19Ua3PniUDrbZz80scf5ZER92ca0sZ60 3WIDHwpZSI197QC7J5OzVp4= X-Received: by 2002:a17:906:4fca:b0:94e:cefc:8df0 with SMTP id i10-20020a1709064fca00b0094ecefc8df0mr9460648ejw.61.1685346086140; Mon, 29 May 2023 00:41:26 -0700 (PDT) Received: from tom-HP-ZBook-Fury-15-G7-Mobile-Workstation (net-188-217-50-121.cust.vodafonedsl.it. [188.217.50.121]) by smtp.gmail.com with ESMTPSA id d5-20020a170906640500b0094ef923a6ccsm5569778ejm.219.2023.05.29.00.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 00:41:25 -0700 (PDT) Date: Mon, 29 May 2023 09:41:23 +0200 From: Tommaso Merciai To: Sakari Ailus Cc: jacopo.mondi@ideasonboard.com, laurent.pinchart@ideasonboard.com, martin.hecht@avnet.eu, linuxfancy@googlegroups.com, Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Hans Verkuil , Marco Felsch , Gerald Loacker , Krzysztof =?utf-8?Q?Ha=C5=82asa?= , Shawn Tu , Linus Walleij , Benjamin Mugnier , Mikhail Rudenko , Nicholas Roth , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] media: dt-bindings: alvium: add document YAML binding Message-ID: References: <20230526173955.797226-1-tomm.merciai@gmail.com> <20230526173955.797226-2-tomm.merciai@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 Sakari, On Sun, May 28, 2023 at 09:16:05PM +0000, Sakari Ailus wrote: > Hi Tommaso, > > On Fri, May 26, 2023 at 07:39:43PM +0200, Tommaso Merciai wrote: > > Add documentation of device tree in YAML schema for the ALVIUM > > Camera from Allied Vision Inc. > > > > References: > > - https://www.alliedvision.com/en/products/embedded-vision-solutions > > > > Signed-off-by: Tommaso Merciai > > --- > > Changes since v1: > > - Fixed build error as suggested by RHerring bot > > > > .../media/i2c/alliedvision,alvium.yaml | 115 ++++++++++++++++++ > > 1 file changed, 115 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/media/i2c/alliedvision,alvium.yaml > > > > diff --git a/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium.yaml b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium.yaml > > new file mode 100644 > > index 000000000000..81e9e560c99d > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium.yaml > > @@ -0,0 +1,115 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Alliedvision Alvium Camera > > + > > +maintainers: > > + - Tommaso Merciai > > + - Martin Hecht > > + > > +allOf: > > + - $ref: /schemas/media/video-interface-devices.yaml# > > + > > +properties: > > + compatible: > > + const: alliedvision,alvium > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + description: XCLK Input Clock > > + > > + clock-names: > > + const: xclk > > I'd also drop this as you have a single clock only: it's redundant. Then you suggest also to drop devm_clk_get(dev, "xclk"); into the driver code and use devm_clk_get(&pdev->dev, NULL); right? > > > + > > + powerdown-gpios: > > + maxItems: 1 > > + description: > > > + Reference to the GPIO connected to the powerdown pin, if any. > > + > > + reset-gpios: > > + maxItems: 1 > > + description: > > > + Reference to the GPIO connected to the reset pin, if any. > > + > > + streamon-delay: > > + maxItems: 1 > > + description: > > > + Delay before camera start capturing frames in us. > > + > > + rotation: > > + enum: > > + - 0 > > + - 180 > > + > > + port: > > + description: Digital Output Port > > + $ref: /schemas/graph.yaml#/$defs/port-base > > + additionalProperties: false > > + > > + properties: > > + endpoint: > > + $ref: /schemas/media/video-interfaces.yaml# > > + unevaluatedProperties: false > > + > > + properties: > > + clock-lanes: > > + const: 0 > > The driver can know this, no need to have it in DT, i.e. please drop it. Oks. > > > + data-lanes: > > + minItems: 1 > > + maxItems: 4 > > + link-frequencies: true > > + > > + required: > > + - data-lanes > > + - link-frequencies > > + > > +required: > > + - compatible > > + - reg > > + - clocks > > + - clock-names > > + - port > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include > > + #include > > + > > + i2c { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + camera: alvium@3c { > > + compatible = "alliedvision,alvium"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>; > > + reg = <0x3c>; > > + clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; > > + clock-names = "xclk"; > > + assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>; > > + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; > > + assigned-clock-rates = <24000000>; > > + streamon-delay = <20>; > > + powerdown-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>; > > + reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; > > + status = "okay"; > > + > > + port { > > + alvium_out: endpoint { > > + remote-endpoint = <&mipi_csi_0_in>; > > + data-lanes = <1 2 3 4>; > > + link-frequencies = /bits/ 64 <681250000>; > > + clock-lanes = <0>; > > + }; > > + }; > > + }; > > + }; > > + > > +... Thanks, Tommaso > > -- > Kind regards, > > Sakari Ailus