Message ID | 20220919-v3-2-a803f2660127@baylibre.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp429217wru; Fri, 4 Nov 2022 07:15:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4tHBMaAH7WtPwNYqAVIbaBe2n5W+gpZCpeRnXVvxJsJhX3f0/rd09wV8lX2lchZ2riVwvw X-Received: by 2002:a17:902:ecd0:b0:187:791:ae9f with SMTP id a16-20020a170902ecd000b001870791ae9fmr33762965plh.32.1667571317777; Fri, 04 Nov 2022 07:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667571317; cv=none; d=google.com; s=arc-20160816; b=sxe+Ye8C0PJgeYORIXntAOQaSP+UdEO5XjJ9iRhLVZX0sl1pn3cHOhcTYLZz2Kw6r9 +XpebDbQGQMfoHPB0uNCoVS4BH06Q5cEOXjVXOQwhvgmXFFYguHndYNy1WEkSWeTLuSG iXOagQY/804n9ngdrD1Npug/PcUuYCVu/DHiywqYSuXGx5VCBSU4NDCtccpNG39dRmxF L96cqM2yeqNBU9gV5Hp+EV2h+557ziP53YTqeR84IG+/8Jhnk2mjLD95MORpYxbJFKMQ k6bAPfzPDndwzCpiVaHJxnCGqlk3l2cYLybkEzdW1R+4B4jnqcsV/57bivsJ8ITc7elk SIFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=0q8teUzKNgtMplj7gJB0893Qj4aOvidpeEgoISBJV9A=; b=HMIdOK4Rupepmd3Egdx05+rF33pJzcvzwqwt2DvRVNlCG9wGLEmRTxxSTDCJ2UO69G hU6jIG1LyOCt1hDD2ftnnutjjjrWKxkOLWAgQPGPDucrLeItLnwYAwOKVD/9608tTlgz iZ5/PVcMoyJOIBNEMdCyCm4T0l/7zqsFQkVkJ2I3uA20wFeA8BgAvC2liUo//Iu23LFl v2nYFE9CmZ0INkEC8SD0mtK2OoeFoSLM6XnmaUOOU6AgMToRUtLgBy4QmoyRVOVbzj/T CbMPMA9IKRmNInW0adj1sUci93BD5bVzU3b9hGbInl9OZYJfFVbSxSmteZX2pkg7PWrL w6yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=HbgG0kEc; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l184-20020a6391c1000000b0046f42e65a9dsi4892754pge.10.2022.11.04.07.15.00; Fri, 04 Nov 2022 07:15:17 -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=HbgG0kEc; 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 S231346AbiKDOOT (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 4 Nov 2022 10:14:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbiKDOON (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Nov 2022 10:14:13 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 520E12181 for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 07:14:12 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id c3-20020a1c3503000000b003bd21e3dd7aso5519535wma.1 for <linux-kernel@vger.kernel.org>; Fri, 04 Nov 2022 07:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0q8teUzKNgtMplj7gJB0893Qj4aOvidpeEgoISBJV9A=; b=HbgG0kEc9BSFFor9gq+tpXzxHNCwNuoUwyoRQJS3dAQ/YrwqgnlWsZBAByoQIqb6Vk gJUPZDgjUPBPg3+T6MBSV8PQfXTUSUIM4CzjU4SHkU+3GE1u//QcHRVHosAe2JRaXwP+ hcLANi0iFlOZvFthWT/YobhcxIdk0I58sahY3LRXxAA2wYCEkbgMNWrDjQxfpSgNWqW1 oQoJC8ZDz3YWbOvGZSJphyP82fyRKeqv/Hb5X/umrnOUImlxScHuYt6sVZQYgDXsJ0BT /ZrTVbzpBluQ7aJRYR0vxYqgDnD2XuC6leAqlmiD+dE3AJMxlcvNyByDHdrI1KETPNdT 13zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0q8teUzKNgtMplj7gJB0893Qj4aOvidpeEgoISBJV9A=; b=ymnfaUyIqh/NZqAhd27IP3OI2jNMoTdzi5blm27jNZFyqyaQroZgF/ZYRrS3JC5xoN tLrFXdxEi311+KsSe3jVAeyrhioDCpepXJdJHhRho29rzK5BCEgDYKa0yko6nDlldcAk PgTLZYXyelgJzEdZKbKwj+ysM7p35eY6CIn3kBBN/Le3olXolsPhOzQMzXELGYF1Ja30 bKiXoJTpHjMgb1XlLZiIsVD13RToKlucGz6RGW8sXfH6iaJjUOsqypzpT64ZKrqwOgr5 rGjhS2bsdyyOqV3kGJVupSnLwukX5Pe27XoLCru2IMDtdYwjcI3GDaAsIGoPnqGS1hNz YWog== X-Gm-Message-State: ACrzQf13gJ7Z1qRhbb1ZkAB99f4jyJP/pdjlYO8oOmBfQJa1fYCbgF30 uz75EtkTyQ0avp9l087jfr7PxA== X-Received: by 2002:a05:600c:384f:b0:3c6:fb0d:4369 with SMTP id s15-20020a05600c384f00b003c6fb0d4369mr23498820wmr.18.1667571250782; Fri, 04 Nov 2022 07:14:10 -0700 (PDT) Received: from [127.0.0.1] (2a02-8440-6440-7fff-3074-96af-9642-0003.rev.sfr.net. [2a02:8440:6440:7fff:3074:96af:9642:3]) by smtp.gmail.com with ESMTPSA id bj9-20020a0560001e0900b002365cd93d05sm3594512wrb.102.2022.11.04.07.14.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 07:14:10 -0700 (PDT) From: Guillaume Ranquet <granquet@baylibre.com> Date: Fri, 04 Nov 2022 15:09:48 +0100 Subject: [PATCH v3 02/12] dt-bindings: display: mediatek: add MT8195 hdmi bindings MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20220919-v3-2-a803f2660127@baylibre.com> References: <20220919-v3-0-a803f2660127@baylibre.com> In-Reply-To: <20220919-v3-0-a803f2660127@baylibre.com> To: Rob Herring <robh+dt@kernel.org>, Chun-Kuang Hu <chunkuang.hu@kernel.org>, Chunfeng Yun <chunfeng.yun@mediatek.com>, Jitao shi <jitao.shi@mediatek.com>, Matthias Brugger <matthias.bgg@gmail.com>, Vinod Koul <vkoul@kernel.org>, CK Hu <ck.hu@mediatek.com>, Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Philipp Zabel <p.zabel@pengutronix.de>, Kishon Vijay Abraham I <kishon@ti.com> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, linux-arm-kernel@lists.infradead.org, stuart.lee@mediatek.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, Guillaume Ranquet <granquet@baylibre.com>, mac.shen@mediatek.com, linux-phy@lists.infradead.org X-Mailer: b4 0.11.0-dev 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748575262391714978?= X-GMAIL-MSGID: =?utf-8?q?1748575262391714978?= |
Series |
Add MT8195 HDMI support
|
|
Commit Message
Guillaume Ranquet
Nov. 4, 2022, 2:09 p.m. UTC
Add mt8195 SoC bindings for hdmi and hdmi-ddc
On mt8195 the ddc i2c controller is part of the hdmi IP block and thus has no
specific register range, power domain or interrupt, making it simpler
than its the legacy "mediatek,hdmi-ddc" binding.
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
---
.../bindings/display/mediatek/mediatek,hdmi.yaml | 61 ++++++++++++++++++----
.../display/mediatek/mediatek,mt8195-hdmi-ddc.yaml | 51 ++++++++++++++++++
2 files changed, 101 insertions(+), 11 deletions(-)
Comments
On 04/11/2022 15:09, Guillaume Ranquet wrote: > Add mt8195 SoC bindings for hdmi and hdmi-ddc > > On mt8195 the ddc i2c controller is part of the hdmi IP block and thus has no > specific register range, power domain or interrupt, making it simpler > than its the legacy "mediatek,hdmi-ddc" binding. > > Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> > --- > .../bindings/display/mediatek/mediatek,hdmi.yaml | 61 ++++++++++++++++++---- > .../display/mediatek/mediatek,mt8195-hdmi-ddc.yaml | 51 ++++++++++++++++++ > 2 files changed, 101 insertions(+), 11 deletions(-) > > diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml > index bdaf0b51e68c..9710b7b6e9bf 100644 > --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml > +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml > @@ -21,6 +21,7 @@ properties: > - mediatek,mt7623-hdmi > - mediatek,mt8167-hdmi > - mediatek,mt8173-hdmi > + - mediatek,mt8195-hdmi > > reg: > maxItems: 1 > @@ -29,18 +30,12 @@ properties: > maxItems: 1 > > clocks: > - items: > - - description: Pixel Clock > - - description: HDMI PLL > - - description: Bit Clock > - - description: S/PDIF Clock > + minItems: 4 Drop minItems, it's not needed when equal to maxItems. > + maxItems: 4 > > clock-names: > - items: > - - const: pixel > - - const: pll > - - const: bclk > - - const: spdif > + minItems: 4 Drop minItems, it's not needed when equal to maxItems. > + maxItems: 4 > > 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..2dc273689584 > --- /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 <ck.hu@mediatek.com> > + - Jitao shi <jitao.shi@mediatek.com> > + > +description: | > + The HDMI DDC i2c controller is used to interface with the HDMI DDC pins. > + > +properties: > + compatible: > + enum: > + - mediatek,mt8195-hdmi-ddc > + > + clocks: > + maxItems: 1 > + > + clock-names: > + items: > + - const: ddc Unless you expect it to grow, I propose to drop clock-names. It's not useful when the name is the same as name of hardware. Best regards, Krzysztof
On Mon, 07 Nov 2022 11:02, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: >On 04/11/2022 15:09, Guillaume Ranquet wrote: >> Add mt8195 SoC bindings for hdmi and hdmi-ddc >> >> On mt8195 the ddc i2c controller is part of the hdmi IP block and thus has no >> specific register range, power domain or interrupt, making it simpler >> than its the legacy "mediatek,hdmi-ddc" binding. >> >> Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> >> --- >> .../bindings/display/mediatek/mediatek,hdmi.yaml | 61 ++++++++++++++++++---- >> .../display/mediatek/mediatek,mt8195-hdmi-ddc.yaml | 51 ++++++++++++++++++ >> 2 files changed, 101 insertions(+), 11 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml >> index bdaf0b51e68c..9710b7b6e9bf 100644 >> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml >> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml >> @@ -21,6 +21,7 @@ properties: >> - mediatek,mt7623-hdmi >> - mediatek,mt8167-hdmi >> - mediatek,mt8173-hdmi >> + - mediatek,mt8195-hdmi >> >> reg: >> maxItems: 1 >> @@ -29,18 +30,12 @@ properties: >> maxItems: 1 >> >> clocks: >> - items: >> - - description: Pixel Clock >> - - description: HDMI PLL >> - - description: Bit Clock >> - - description: S/PDIF Clock >> + minItems: 4 > >Drop minItems, it's not needed when equal to maxItems. > >> + maxItems: 4 >> >> clock-names: >> - items: >> - - const: pixel >> - - const: pll >> - - const: bclk >> - - const: spdif >> + minItems: 4 > >Drop minItems, it's not needed when equal to maxItems. > > >> + maxItems: 4 >> >> 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..2dc273689584 >> --- /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 <ck.hu@mediatek.com> >> + - Jitao shi <jitao.shi@mediatek.com> >> + >> +description: | >> + The HDMI DDC i2c controller is used to interface with the HDMI DDC pins. >> + >> +properties: >> + compatible: >> + enum: >> + - mediatek,mt8195-hdmi-ddc >> + >> + clocks: >> + maxItems: 1 >> + >> + clock-names: >> + items: >> + - const: ddc > >Unless you expect it to grow, I propose to drop clock-names. It's not >useful when the name is the same as name of hardware. > >Best regards, >Krzysztof > Thx for your suggestions, I'll apply them in v4. Thx, Guillaume.
Hi, Guillaume: On Fri, 2022-11-04 at 15:09 +0100, Guillaume Ranquet wrote: > Add mt8195 SoC bindings for hdmi and hdmi-ddc > > On mt8195 the ddc i2c controller is part of the hdmi IP block and > thus has no > specific register range, power domain or interrupt, making it simpler > than its the legacy "mediatek,hdmi-ddc" binding. > > Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> > --- > [snip] > 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..2dc273689584 > --- /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: > https://urldefense.com/v3/__http://devicetree.org/schemas/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WfpOlq57w$ > > +$schema: > https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WdSGOSxzw$ > > + > +title: Mediatek HDMI DDC for mt8195 > + > +maintainers: > + - CK Hu <ck.hu@mediatek.com> > + - Jitao shi <jitao.shi@mediatek.com> > + > +description: | > + The HDMI DDC i2c controller is used to interface with the HDMI DDC > pins. > + > +properties: > + compatible: > + enum: > + - mediatek,mt8195-hdmi-ddc > + > + 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 <dt-bindings/interrupt-controller/arm-gic.h> > + #include <dt-bindings/interrupt-controller/irq.h> > + hdmiddc0: i2c { > + compatible = "mediatek,mt8195-hdmi-ddc"; > + mediatek,hdmi = <&hdmi0>; > + clocks = <&clk26m>; > + clock-names = "ddc"; > + }; I think we should not have a virtual device. This ddc is part of mt8195-hdmi device, so just keep mt8195-hdmi, and let mt8195-hdmi driver to probe the sub driver of ddc driver. Regards, CK > + > +... >
On Mon, 26 Dec 2022 06:18, CK Hu (胡俊光) <ck.hu@mediatek.com> wrote: >Hi, Guillaume: > >On Fri, 2022-11-04 at 15:09 +0100, Guillaume Ranquet wrote: >> Add mt8195 SoC bindings for hdmi and hdmi-ddc >> >> On mt8195 the ddc i2c controller is part of the hdmi IP block and >> thus has no >> specific register range, power domain or interrupt, making it simpler >> than its the legacy "mediatek,hdmi-ddc" binding. >> >> Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> >> --- >> > >[snip] > >> 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..2dc273689584 >> --- /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: >> https://urldefense.com/v3/__http://devicetree.org/schemas/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WfpOlq57w$ >> >> +$schema: >> https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WdSGOSxzw$ >> >> + >> +title: Mediatek HDMI DDC for mt8195 >> + >> +maintainers: >> + - CK Hu <ck.hu@mediatek.com> >> + - Jitao shi <jitao.shi@mediatek.com> >> + >> +description: | >> + The HDMI DDC i2c controller is used to interface with the HDMI DDC >> pins. >> + >> +properties: >> + compatible: >> + enum: >> + - mediatek,mt8195-hdmi-ddc >> + >> + 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 <dt-bindings/interrupt-controller/arm-gic.h> >> + #include <dt-bindings/interrupt-controller/irq.h> >> + hdmiddc0: i2c { >> + compatible = "mediatek,mt8195-hdmi-ddc"; >> + mediatek,hdmi = <&hdmi0>; >> + clocks = <&clk26m>; >> + clock-names = "ddc"; >> + }; > >I think we should not have a virtual device. This ddc is part of >mt8195-hdmi device, so just keep mt8195-hdmi, and let mt8195-hdmi >driver to probe the sub driver of ddc driver. > >Regards, >CK Hi CK, Thx for your input. Though I would strongly prefer to keep the ddc as a separate "virtual device". It aligns better with the goal of reusing as much code as possible from the HDMI V1 IP, which is something you have been advocating since V1 of this patch quite some time ago and has shaped this patch. To me we are in a state that is clean and avoids branching in the hdmi common code. Would you reconsider and allow the use of that virtual device? Thx, Guillaume. > >> + >> +... >>
Il 02/01/23 14:38, Guillaume Ranquet ha scritto: > On Mon, 26 Dec 2022 06:18, CK Hu (胡俊光) <ck.hu@mediatek.com> wrote: >> Hi, Guillaume: >> >> On Fri, 2022-11-04 at 15:09 +0100, Guillaume Ranquet wrote: >>> Add mt8195 SoC bindings for hdmi and hdmi-ddc >>> >>> On mt8195 the ddc i2c controller is part of the hdmi IP block and >>> thus has no >>> specific register range, power domain or interrupt, making it simpler >>> than its the legacy "mediatek,hdmi-ddc" binding. >>> >>> Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> >>> --- >>> >> >> [snip] >> >>> 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..2dc273689584 >>> --- /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: >>> https://urldefense.com/v3/__http://devicetree.org/schemas/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WfpOlq57w$ >>> >>> +$schema: >>> https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WdSGOSxzw$ >>> >>> + >>> +title: Mediatek HDMI DDC for mt8195 >>> + >>> +maintainers: >>> + - CK Hu <ck.hu@mediatek.com> >>> + - Jitao shi <jitao.shi@mediatek.com> >>> + >>> +description: | >>> + The HDMI DDC i2c controller is used to interface with the HDMI DDC >>> pins. >>> + >>> +properties: >>> + compatible: >>> + enum: >>> + - mediatek,mt8195-hdmi-ddc >>> + >>> + 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 <dt-bindings/interrupt-controller/arm-gic.h> >>> + #include <dt-bindings/interrupt-controller/irq.h> >>> + hdmiddc0: i2c { >>> + compatible = "mediatek,mt8195-hdmi-ddc"; >>> + mediatek,hdmi = <&hdmi0>; >>> + clocks = <&clk26m>; >>> + clock-names = "ddc"; >>> + }; >> >> I think we should not have a virtual device. This ddc is part of >> mt8195-hdmi device, so just keep mt8195-hdmi, and let mt8195-hdmi >> driver to probe the sub driver of ddc driver. >> >> Regards, >> CK > > Hi CK, > > Thx for your input. > Though I would strongly prefer to keep the ddc as a separate "virtual device". > > It aligns better with the goal of reusing as much code as possible > from the HDMI V1 IP, > which is something you have been advocating since V1 of this patch > quite some time ago > and has shaped this patch. > > To me we are in a state that is clean and avoids branching in the hdmi > common code. > Would you reconsider and allow the use of that virtual device? > > Thx, > Guillaume. > You can as well keep the DDC as a separated driver, but register in the HDMI v1 and v2 driver at probe time. Doing that, you won't need any devicetree node specific to any virtual device :-) Cheers, Angelo
On Mon, 02 Jan 2023 15:14, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: >Il 02/01/23 14:38, Guillaume Ranquet ha scritto: >> On Mon, 26 Dec 2022 06:18, CK Hu (胡俊光) <ck.hu@mediatek.com> wrote: >>> Hi, Guillaume: >>> >>> On Fri, 2022-11-04 at 15:09 +0100, Guillaume Ranquet wrote: >>>> Add mt8195 SoC bindings for hdmi and hdmi-ddc >>>> >>>> On mt8195 the ddc i2c controller is part of the hdmi IP block and >>>> thus has no >>>> specific register range, power domain or interrupt, making it simpler >>>> than its the legacy "mediatek,hdmi-ddc" binding. >>>> >>>> Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> >>>> --- >>>> >>> >>> [snip] >>> >>>> 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..2dc273689584 >>>> --- /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: >>>> https://urldefense.com/v3/__http://devicetree.org/schemas/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WfpOlq57w$ >>>> >>>> +$schema: >>>> https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WdSGOSxzw$ >>>> >>>> + >>>> +title: Mediatek HDMI DDC for mt8195 >>>> + >>>> +maintainers: >>>> + - CK Hu <ck.hu@mediatek.com> >>>> + - Jitao shi <jitao.shi@mediatek.com> >>>> + >>>> +description: | >>>> + The HDMI DDC i2c controller is used to interface with the HDMI DDC >>>> pins. >>>> + >>>> +properties: >>>> + compatible: >>>> + enum: >>>> + - mediatek,mt8195-hdmi-ddc >>>> + >>>> + 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 <dt-bindings/interrupt-controller/arm-gic.h> >>>> + #include <dt-bindings/interrupt-controller/irq.h> >>>> + hdmiddc0: i2c { >>>> + compatible = "mediatek,mt8195-hdmi-ddc"; >>>> + mediatek,hdmi = <&hdmi0>; >>>> + clocks = <&clk26m>; >>>> + clock-names = "ddc"; >>>> + }; >>> >>> I think we should not have a virtual device. This ddc is part of >>> mt8195-hdmi device, so just keep mt8195-hdmi, and let mt8195-hdmi >>> driver to probe the sub driver of ddc driver. >>> >>> Regards, >>> CK >> >> Hi CK, >> >> Thx for your input. >> Though I would strongly prefer to keep the ddc as a separate "virtual device". >> >> It aligns better with the goal of reusing as much code as possible >> from the HDMI V1 IP, >> which is something you have been advocating since V1 of this patch >> quite some time ago >> and has shaped this patch. >> >> To me we are in a state that is clean and avoids branching in the hdmi >> common code. >> Would you reconsider and allow the use of that virtual device? >> >> Thx, >> Guillaume. >> > >You can as well keep the DDC as a separated driver, but register in the HDMI v1 and >v2 driver at probe time. > >Doing that, you won't need any devicetree node specific to any virtual device :-) > >Cheers, >Angelo > > Sure, but does it make any sense for HDMI v1? As the ddc in v1 is a real device which (in theory) can be reused by other IPs. I would see either v1 and v2 ddc exposed as a devicetree node (which is what I favor). Or v1 as a devicetree node and v2 probed directly from the hdmi code base. Thx, Guillaume.
Il 02/01/23 16:19, Guillaume Ranquet ha scritto: > On Mon, 02 Jan 2023 15:14, AngeloGioacchino Del Regno > <angelogioacchino.delregno@collabora.com> wrote: >> Il 02/01/23 14:38, Guillaume Ranquet ha scritto: >>> On Mon, 26 Dec 2022 06:18, CK Hu (胡俊光) <ck.hu@mediatek.com> wrote: >>>> Hi, Guillaume: >>>> >>>> On Fri, 2022-11-04 at 15:09 +0100, Guillaume Ranquet wrote: >>>>> Add mt8195 SoC bindings for hdmi and hdmi-ddc >>>>> >>>>> On mt8195 the ddc i2c controller is part of the hdmi IP block and >>>>> thus has no >>>>> specific register range, power domain or interrupt, making it simpler >>>>> than its the legacy "mediatek,hdmi-ddc" binding. >>>>> >>>>> Signed-off-by: Guillaume Ranquet <granquet@baylibre.com> >>>>> --- >>>>> >>>> >>>> [snip] >>>> >>>>> 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..2dc273689584 >>>>> --- /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: >>>>> https://urldefense.com/v3/__http://devicetree.org/schemas/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WfpOlq57w$ >>>>> >>>>> +$schema: >>>>> https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!wwVQuq5lzW0lvUFUkVXPWT8cIu96xdkn4tMams1E55qyxEZmgV1i0WdSGOSxzw$ >>>>> >>>>> + >>>>> +title: Mediatek HDMI DDC for mt8195 >>>>> + >>>>> +maintainers: >>>>> + - CK Hu <ck.hu@mediatek.com> >>>>> + - Jitao shi <jitao.shi@mediatek.com> >>>>> + >>>>> +description: | >>>>> + The HDMI DDC i2c controller is used to interface with the HDMI DDC >>>>> pins. >>>>> + >>>>> +properties: >>>>> + compatible: >>>>> + enum: >>>>> + - mediatek,mt8195-hdmi-ddc >>>>> + >>>>> + 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 <dt-bindings/interrupt-controller/arm-gic.h> >>>>> + #include <dt-bindings/interrupt-controller/irq.h> >>>>> + hdmiddc0: i2c { >>>>> + compatible = "mediatek,mt8195-hdmi-ddc"; >>>>> + mediatek,hdmi = <&hdmi0>; >>>>> + clocks = <&clk26m>; >>>>> + clock-names = "ddc"; >>>>> + }; >>>> >>>> I think we should not have a virtual device. This ddc is part of >>>> mt8195-hdmi device, so just keep mt8195-hdmi, and let mt8195-hdmi >>>> driver to probe the sub driver of ddc driver. >>>> >>>> Regards, >>>> CK >>> >>> Hi CK, >>> >>> Thx for your input. >>> Though I would strongly prefer to keep the ddc as a separate "virtual device". >>> >>> It aligns better with the goal of reusing as much code as possible >>> from the HDMI V1 IP, >>> which is something you have been advocating since V1 of this patch >>> quite some time ago >>> and has shaped this patch. >>> >>> To me we are in a state that is clean and avoids branching in the hdmi >>> common code. >>> Would you reconsider and allow the use of that virtual device? >>> >>> Thx, >>> Guillaume. >>> >> >> You can as well keep the DDC as a separated driver, but register in the HDMI v1 and >> v2 driver at probe time. >> >> Doing that, you won't need any devicetree node specific to any virtual device :-) >> >> Cheers, >> Angelo >> >> > > Sure, but does it make any sense for HDMI v1? > As the ddc in v1 is a real device which (in theory) can be reused by other IPs. > > I would see either v1 and v2 ddc exposed as a devicetree node (which > is what I favor). > Or v1 as a devicetree node and v2 probed directly from the hdmi code base. > The last option looks sensible, since v1 has an external ddc, but on v2 it's integrated. v1 -> dt probe v2 -> driver probe > Thx, > Guillaume.
diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml index bdaf0b51e68c..9710b7b6e9bf 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml @@ -21,6 +21,7 @@ properties: - mediatek,mt7623-hdmi - mediatek,mt8167-hdmi - mediatek,mt8173-hdmi + - mediatek,mt8195-hdmi reg: maxItems: 1 @@ -29,18 +30,12 @@ properties: maxItems: 1 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 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..2dc273689584 --- /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 <ck.hu@mediatek.com> + - Jitao shi <jitao.shi@mediatek.com> + +description: | + The HDMI DDC i2c controller is used to interface with the HDMI DDC pins. + +properties: + compatible: + enum: + - mediatek,mt8195-hdmi-ddc + + 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 <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + hdmiddc0: i2c { + compatible = "mediatek,mt8195-hdmi-ddc"; + mediatek,hdmi = <&hdmi0>; + clocks = <&clk26m>; + clock-names = "ddc"; + }; + +...