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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D150DC433DF for ; Mon, 19 Oct 2020 19:27:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59FA222260 for ; Mon, 19 Oct 2020 19:27:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ayFfmURn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730845AbgJST12 (ORCPT ); Mon, 19 Oct 2020 15:27:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730021AbgJST12 (ORCPT ); Mon, 19 Oct 2020 15:27:28 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EABA3C0613CE for ; Mon, 19 Oct 2020 12:27:26 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id x16so1422617ljh.2 for ; Mon, 19 Oct 2020 12:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MbpPIoPzTpMpNm1nC5xfdtc0dU2BeKn/AYB4IBKnH4g=; b=ayFfmURnpiUCCBhURRXNsWakezv/PyUrpMyAVQ4638TzOxFw8XxEhjedRoM+UanEEH GL+mqAHg53prCECXVrHNs69s00f3k6eXPOLsfNBbpIPH2V/V7p5BoJVKInrUd0gf84mh AudndqJCfYHFqVLkiOZ6FU0m3wQsVAZawLToQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MbpPIoPzTpMpNm1nC5xfdtc0dU2BeKn/AYB4IBKnH4g=; b=Z+KX3qolaw9+8Iwxpp/PRFwF4752CdmW2N/l+4o/BytMmAxGzeBsJxCuN4LAh/4ISm kgrhIsEcg6MI3VsCpG826buE1vH667Sl6MyL/rbq27g/QGvN1+BXMNUn7dZUzKYd8PQI GKPe22b6xB9UBblX4BJb4IyW+ohO8q+efe1FdOpcH/3deXteFAQceSlPQimSI7lo6O1Z ew3ISR6Mo6XQf64aqLpf1RLkLVzdnTy9rV1j6Pg4Vmy6XqJXEAXyuHCAjhJgv/0qdVMZ gk+r4HtT1XNbkfPJNU62HzBa4MhdGBYEQAika8c6JKlsuolAEEGLF1ZFV3VQwXifvqZW U2eA== X-Gm-Message-State: AOAM533xPT6KrzxiFyjunKApKM1POsshmW4nMQDZPRw1be2eC4U2buVG UeMiXO6LEA9doH3oJzcRpqlZVIukisx5UaSA X-Google-Smtp-Source: ABdhPJy4ViiNf10PhzXTr9k6IOjTK8m+MNY7JB/8wsEdqc5Nx/GmEy+usL0uWxzKoMhnZw9l/xdfvw== X-Received: by 2002:a05:651c:216:: with SMTP id y22mr570963ljn.350.1603135645065; Mon, 19 Oct 2020 12:27:25 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id c7sm148284ljk.59.2020.10.19.12.27.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Oct 2020 12:27:24 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id c21so1349315ljn.13 for ; Mon, 19 Oct 2020 12:27:24 -0700 (PDT) X-Received: by 2002:adf:ab05:: with SMTP id q5mr829770wrc.32.1603135226373; Mon, 19 Oct 2020 12:20:26 -0700 (PDT) MIME-Version: 1.0 References: <20201013130503.2412-1-dongchun.zhu@mediatek.com> <20201013130503.2412-2-dongchun.zhu@mediatek.com> <20201013161938.GE13341@paasikivi.fi.intel.com> <1602641418.4733.80.camel@mhfsdcap03> <20201014083139.GG13341@paasikivi.fi.intel.com> <20201019082759.GL13341@paasikivi.fi.intel.com> In-Reply-To: <20201019082759.GL13341@paasikivi.fi.intel.com> From: Tomasz Figa Date: Mon, 19 Oct 2020 21:20:15 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v15 1/2] media: dt-bindings: media: i2c: Document OV02A10 bindings To: Sakari Ailus Cc: Dongchun Zhu , Mauro Carvalho Chehab , Andy Shevchenko , Rob Herring , Mark Rutland , Nicolas Boichat , Matthias Brugger , Cao Bing Bu , srv_heupstream , "moderated list:ARM/Mediatek SoC support" , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Sj Huang , Linux Media Mailing List , linux-devicetree , Louis Kuo , =?UTF-8?B?U2hlbmduYW4gV2FuZyAo546L5Zyj55S3KQ==?= Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Oct 19, 2020 at 10:28 AM Sakari Ailus wrote: > > On Wed, Oct 14, 2020 at 01:48:00PM +0200, Tomasz Figa wrote: > > On Wed, Oct 14, 2020 at 10:31 AM Sakari Ailus > > wrote: > > > > > > On Wed, Oct 14, 2020 at 10:10:18AM +0800, Dongchun Zhu wrote: > > > > Hello Sakari, > > > > > > > > Thanks for your timely review. > > > > > > > > On Tue, 2020-10-13 at 19:19 +0300, Sakari Ailus wrote: > > > > > Hi Dongchun, > > > > > > > > > > On Tue, Oct 13, 2020 at 09:05:02PM +0800, Dongchun Zhu wrote: > > > > > > Add YAML device tree binding for OV02A10 CMOS image sensor, and the > > > > > > relevant MAINTAINERS entries. > > > > > > > > > > > > Signed-off-by: Dongchun Zhu > > > > > > --- > > > > > > .../bindings/media/i2c/ovti,ov02a10.yaml | 162 +++++++++++++++++++++ > > > > > > MAINTAINERS | 7 + > > > > > > 2 files changed, 169 insertions(+) > > > > > > create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov02a10.yaml > > > > > > > > > > > > > > [snip]... > > > > > > > > > > + ovti,mipi-clock-voltage: > > > > > > + description: > > > > > > + An array of 2-tuples items, and each item consists of link frequency and > > > > > > + MIPI clock voltage unit like . Clock voltage unit is > > > > > > + dependent upon link speed, indicating MIPI transmission speed select that > > > > > > + controls D-PHY timing setting by adjusting MIPI clock voltage to improve > > > > > > + the clock driver capability. > > > > > > + $ref: "/schemas/types.yaml#/definitions/uint32-array" > > > > > > + minItems: 2 > > > > > > + default: [390000, 4] > > > > > > > > > > Why do you have the link frequency here as well? > > > > > > > > > > In principle this does belong to the endpoint as link frequencies are > > > > > specific to that, but I don't mind; there's just a single port anyway. > > > > > > > > > > > > > This is an optional property which we model as an array of > > > clock voltage> pairs. An example to have all link speeds up to 390MHz > > > > use the value 4 for current driver. If one wants to select different > > > > voltage for different link, they could do so as well. > > > > > > If you think you'd need that, then you need to put this to the endpoint. > > > > The mipi-clock-voltage property is not a property of the endpoint. The > > link frequency there does not set the link frequency - it only > > specifies which link frequency the given voltage should be used for. > > If it is not bound to the endpoint --- that specifies the properties of the > link --- then you could just put it to the driver, couldn't you? > > But earlier on, we established that this is specific to a given board, or a > given link. Endpoints are used to describe connections that a device may > have to other devices. Therefore their properties are different. > > The graph bindings allow for several endpoints on a single physical port, > some may be disabled in that case. This is admittedly mostly done with > CSI-2 receivers. > > Either way, putting this property to the device may affect how DT source is > arranged for boards that have this device. Any similar configuration on > other devices with multiple transmitters or receivers would be in endpoints > anyway --- because they have to, so I don't see why bindings for this > device should be different. > > If you put it to endpoint, the driver also doesn't need to match the link > frequencies in kHz and Hz between the two properties, but just use the same > index for both. I agree in general, but I think in this case this is a device-specific property and the sensor only has 1 CSI-2 interface, so maybe it doesn't really matter? Specifying frequency, voltage pairs is a common practice in other bindings, such as the OPP bindings, by the way. That said, if you insist, I'm fine with this being moved to the endpoint node too. Best regards, Tomasz