Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1785662rwi; Thu, 3 Nov 2022 09:03:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5caU38pw/b0bFpJvIHonbN7ENAZgte6KqTyt9XkZEMK7Q2P3VI2eD1+iZtgamIYFP32qPT X-Received: by 2002:a17:906:fc6:b0:72f:d080:416 with SMTP id c6-20020a1709060fc600b0072fd0800416mr29403284ejk.1.1667491417644; Thu, 03 Nov 2022 09:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667491417; cv=none; d=google.com; s=arc-20160816; b=jwEtg74QmUvuSs7orO9tFQD9gA9Min7F1pRjpPsE/3Zfevlpyc3nMX2HR7Vp4LoJkR M5kkW4mE3Pw/jy8PHe5O4CaxgQ1Q4K5VYb6MIONXHFdiDU8hqj4wr6/Ch5qs/3JYVLLB PS68sqabcEv82LcQ7x+N2nERFfxmSiNH/DFIqdDGfWROXM5XHfVxdxhu8etVX5FUOhmO zKDK6OHXtqdGe8wtbyKFI55f72pVK1cEQwYkVaFMDTTPUxLv/cPjXIbyJgphKkhNktTS 2r+UmxRgAwf9WnnYWA6QYduk8NIHlcZqDL8gUwZg5I96Go51tnIQFenzWwC5nuGXVKPr DlCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:mime-version :in-reply-to:references:user-agent:from:dkim-signature; bh=zMIGCst1E5FAAxeJFJkmLvsSRBUT4nIQSQ8HrU7lElk=; b=KYtaH4f+1T6eaD5UgHZ9YBDjzqA77EkjR4Knw3dcdRepL7ugpsAPobZ4rm54qnJBv5 eHpwOOQ2BjQnQwvTJrEmH59mVo90K55UHq0nUV8vWYyAuuEMoiKnbHpz5npw2litx6rJ M7SDEKqrMMZLC5SMK7T+Mh/9wMbmyjkG2KWrugQC1670UeNW7EEjAmvAxsQ58uMsEcpz 6Zo26ekeImOm1bxT8YwvNILc4/xSDDQm7dFaB5ZzDycNSe1aBdkBi/VhmOSVZE6e259F bdzoIPCR9yMJ+2GQO+uuYJMRi3fGOZ/lLOUgLaPSAL6gEis0Ti1me1NXdggtGHo73WG8 aCqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=rZTm6D+9; 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 ds15-20020a170907724f00b007adbe7695a5si1770903ejc.935.2022.11.03.09.02.55; Thu, 03 Nov 2022 09:03:37 -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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=rZTm6D+9; 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 S232066AbiKCPRV (ORCPT + 97 others); Thu, 3 Nov 2022 11:17:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232095AbiKCPRR (ORCPT ); Thu, 3 Nov 2022 11:17:17 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E26D115A07 for ; Thu, 3 Nov 2022 08:17:14 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id c25so2607195ljr.8 for ; Thu, 03 Nov 2022 08:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:in-reply-to:references :user-agent:from:from:to:cc:subject:date:message-id:reply-to; bh=zMIGCst1E5FAAxeJFJkmLvsSRBUT4nIQSQ8HrU7lElk=; b=rZTm6D+9wrr5NMuKjwiyWM/wANopi9ZBzu+73zoUUZamwmI9Wp1UzGtz65L39GFHAa ueN7YEavrKgyI2y8dRywfut2DmpqibYASxNuU+tvkXv+Oln6l8X6l2nEK98yxEQ7V4nd J+rZ0Hak05nfWne9YZlsX55S4u595qwJQedfruyy6tNqlM1i9Ywl/FBwVAwyNoY9lQPp gX7HORQRsf/9BuXI79WfTsK9eGWdJR3jrluEvwGrMAZVX/Oax6aUCNS3NzzRwpXZ1uB4 glfYuougZSTiZboChZk0uBDNn5MF3w553wd7r6Pj9ik7+rZhkFqftPo9135dN/dMroOT c2Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:in-reply-to:references :user-agent:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zMIGCst1E5FAAxeJFJkmLvsSRBUT4nIQSQ8HrU7lElk=; b=AhT07MffbkemZQ9k27Ny92gvymBpOLighcOzwOLNozADur7mpM+8jm8JljxJ2BQJMo GetBv4ZwHxNf6vUSCjeCRnsqLzB7b8ybgl4iaEark+G0aqF9eY4xNCJ83XHyzm+eMolf G9jbc4Mqd/NF69vrYOUQPyLqrj2KuQdrp/to8mUAsIjJl9WtOB2HS34+vec+Te0ONw1q crOsedQvVJRvWYHxAGclbjzWOv6bW9lZR4SfGMCI/jiEmo5URUcaDkL7M/facMB4sPy3 YDGtzx7ZASQjEFgIZOltE4wHiAlGwxXR64UNdZXWUOIsc8eHHSwpmO/8M3y13862cvU8 GpRA== X-Gm-Message-State: ACrzQf0Q3t0n7HBP8C7VlCIr49FJvOVhS41f0bsPQlHb7CPMhGOmYT17 j5M5OqErlSSLSyS7qTJ9dwz9TFxZi2eyfhLmCiNb9w== X-Received: by 2002:a2e:2e0c:0:b0:277:75bb:429e with SMTP id u12-20020a2e2e0c000000b0027775bb429emr3705962lju.314.1667488632950; Thu, 03 Nov 2022 08:17:12 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 3 Nov 2022 08:17:12 -0700 From: Guillaume Ranquet User-Agent: meli 0.7.2 References: <20220919-v2-0-8419dcf4f09d@baylibre.com> <20220919-v2-2-8419dcf4f09d@baylibre.com> <6bb3ab49-1c12-6863-a49a-2fd1f34de561@linaro.org> In-Reply-To: <6bb3ab49-1c12-6863-a49a-2fd1f34de561@linaro.org> MIME-Version: 1.0 Date: Thu, 3 Nov 2022 08:17:12 -0700 Message-ID: Subject: Re: [PATCH v2 02/12] dt-bindings: display: mediatek: add MT8195 hdmi bindings To: Krzysztof Kozlowski , Daniel Vetter , Chun-Kuang Hu , Chunfeng Yun , David Airlie , Philipp Zabel , Jitao shi , CK Hu , Rob Herring , Krzysztof Kozlowski , Vinod Koul , Kishon Vijay Abraham I , Matthias Brugger Cc: stuart.lee@mediatek.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , linux-kernel@vger.kernel.org, mac.shen@mediatek.com, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On Thu, 03 Nov 2022 13:45, Krzysztof Kozlowski wrote: >On 02/11/2022 09:31, Guillaume Ranquet wrote: >> On Fri, 14 Oct 2022 18:08, Krzysztof Kozlowski >> wrote: >>> On 14/10/2022 11:15, Guillaume Ranquet wrote: >>>> Add mt8195 SoC bindings for hdmi and hdmi-ddc >>>> >>>> Signed-off-by: Guillaume Ranquet >>>> --- >>>> .../bindings/display/mediatek/mediatek,hdmi.yaml | 67 +++++++++++++++++----- >>>> .../display/mediatek/mediatek,mt8195-hdmi-ddc.yaml | 51 ++++++++++++++++ >>>> 2 files changed, 104 insertions(+), 14 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml >>>> index bdaf0b51e68c..955026cd7ca5 100644 >>>> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml >>>> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml >>>> @@ -21,26 +21,21 @@ properties: >>>> - mediatek,mt7623-hdmi >>>> - mediatek,mt8167-hdmi >>>> - mediatek,mt8173-hdmi >>>> + - mediatek,mt8195-hdmi >>>> >>>> reg: >>>> maxItems: 1 >>>> >>>> - interrupts: >>>> - maxItems: 1 >>>> - >>> >>> This change is not really explained in commit msg... >>> >>>> clocks: >>>> - items: >>>> - - description: Pixel Clock >>>> - - description: HDMI PLL >>>> - - description: Bit Clock >>>> - - description: S/PDIF Clock >>>> + minItems: 4 >>>> + maxItems: 4 >>>> >>>> clock-names: >>>> - items: >>>> - - const: pixel >>>> - - const: pll >>>> - - const: bclk >>>> - - const: spdif >>>> + minItems: 4 >>>> + maxItems: 4 >>>> + >>>> + interrupts: >>>> + maxItems: 1 >>>> >>>> phys: >>>> maxItems: 1 >>>> @@ -58,6 +53,9 @@ properties: >>>> description: | >>>> phandle link and register offset to the system configuration registers. >>>> >>>> + power-domains: >>>> + maxItems: 1 >>>> + >>>> ports: >>>> $ref: /schemas/graph.yaml#/properties/ports >>>> >>>> @@ -86,9 +84,50 @@ required: >>>> - clock-names >>>> - phys >>>> - phy-names >>>> - - mediatek,syscon-hdmi >>>> - ports >>>> >>>> +allOf: >>>> + - if: >>>> + properties: >>>> + compatible: >>>> + contains: >>>> + const: mediatek,mt8195-hdmi >>>> + then: >>>> + properties: >>>> + clocks: >>>> + items: >>>> + - description: APB >>>> + - description: HDCP >>>> + - description: HDCP 24M >>>> + - description: Split HDMI >>>> + clock-names: >>>> + items: >>>> + - const: hdmi_apb_sel >>>> + - const: hdcp_sel >>>> + - const: hdcp24_sel >>>> + - const: split_hdmi >>>> + >>>> + required: >>>> + - power-domains >>>> + else: >>>> + properties: >>>> + clocks: >>>> + items: >>>> + - description: Pixel Clock >>>> + - description: HDMI PLL >>>> + - description: Bit Clock >>>> + - description: S/PDIF Clock >>>> + >>>> + clock-names: >>>> + items: >>>> + - const: pixel >>>> + - const: pll >>>> + - const: bclk >>>> + - const: spdif >>>> + >>>> + required: >>>> + - mediatek,syscon-hdmi >>>> + >>>> additionalProperties: false >>>> >>>> examples: >>>> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml >>>> new file mode 100644 >>>> index 000000000000..0fe0a2a2f17f >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml >>>> @@ -0,0 +1,51 @@ >>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>>> +%YAML 1.2 >>>> +--- >>>> +$id: http://devicetree.org/schemas/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml# >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>> + >>>> +title: Mediatek HDMI DDC for mt8195 >>>> + >>>> +maintainers: >>>> + - CK Hu >>>> + - Jitao shi >>>> + >>>> +description: | >>>> + The HDMI DDC i2c controller is used to interface with the HDMI DDC pins. >>>> + >>>> +properties: >>>> + compatible: >>>> + enum: >>>> + - mediatek,mt8195-hdmi-ddc >>> >>> I think I wrote it - you already have bindings for HDMI DDC. I doubt >>> that these are different and it looks like you model the bindings >>> according to your driver. That's not the way. >> >> Hi Krzysztof, >> >> I've made a separate binding as this new IP is integrated into the >> HDMI hw block. >> The difference it makes is that the hw is slightly simpler to describe >> as the IP doesn't >> have it's own range of registers or an interrupt line. >> >> I can use the "legacy mediatek mtk ddc binding" if I modify it to have >> the reg and >> interrupt properties not being required for mt8195. > >OK, it is reasonable - such stuff should be in commit msg, so we won't >keep asking. > I'll sum this up in the commit msg for V3 then. >> >> Would that work better for you? >> >>> >>>> + >>>> + clocks: >>>> + maxItems: 1 >>>> + >>>> + clock-names: >>>> + items: >>>> + - const: ddc >>>> + >>>> + mediatek,hdmi: >>>> + $ref: /schemas/types.yaml#/definitions/phandle >>>> + description: >>>> + A phandle to the mt8195 hdmi controller >>>> + >>>> +required: >>>> + - compatible >>>> + - clocks >>>> + - clock-names >>>> + >>>> +additionalProperties: false >>>> + >>>> +examples: >>>> + - | >>>> + #include >>>> + #include >>>> + hdmiddc0: ddc_i2c { >>> >>> Node names should be generic - ddc. >>> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation >>> >>> No underscores in node names. >>> >>> Additionally I2C devices have addresses on the bus. Why this one doesn't? >>> >> >> This is an i2c adapter, not a device. >> And as it lives inside the HDMI hw block, I've omitted using an address here. >> >> Is this valid? or should this be expressed differently? > >What is an I2C adapter? Did you mean I2C controller (master)? Yes, a controller. This is an I2C controller connected to the HDMI connector, it is used to exchange data on the Display Data Channel with the display (such as EDID). Thx, Guillaume. > >Best regards, >Krzysztof >