Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2305601rwd; Fri, 9 Jun 2023 09:17:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4dO+nV6O7GWpBULan5VdP8/LHTjBxYgBW4r6k0QfvM80UacYlSyON8rrsZrOnS9OdolHec X-Received: by 2002:a17:902:850a:b0:1ab:d89:5ef6 with SMTP id bj10-20020a170902850a00b001ab0d895ef6mr1220062plb.68.1686327447286; Fri, 09 Jun 2023 09:17:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686327447; cv=none; d=google.com; s=arc-20160816; b=KOaQNwUjJRWFhc0A00PGCp0zK2tNs0pgKRoMrbIslOL3XMuQPrFnK1tDNn13eT1WbY ALiG0Ac1Hw0rOjMYMa7Qc/5FGuXeAL3Jt513/N/AMFFL+XAuGO80ZI9u5Lxsf4zVI/We 9kdOU00a2m5AkwCUEuf12e3Mh3n+NXjeL5kunA3zYlREJL8A4ueXU+Tgpxn8qtFQPVi7 tOVW0OYbGsMeL2ztOeCWS2flliuMXezBeQaDJQiGreWoaPAx6kvp0P9jKK5q1K5n8ZZH f45DcLfvMzV9VhUTvUFWbfTPisSCIbIpuFpKaNlnp0A1x/hV15PXqzwf9ynv8KSld0Yk Y51A== 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=yrgoKXBwHUX7WEq9UMaUcmVG2l73/fiJgyEmMbnqlYc=; b=AC+XXrziUgpOc5As73Ek5IoP6d6XPwwSVKL9xGeTJoFYGMG25ewL4UNzmopxGMXYpF uvpoODUnvS6YVRFNo+dzrjV1z7JduyuvCxOMt0zZu+OHXYiYf2jj2PTaKVn8P4Spfsn1 oYni+MxXgmQ0QCJrv92GK+iLT5pFb1F2+LyGzv2I3FYBLSNKsuVnpT5nKxTswOnYilZQ RqEahrmSPtBiPJ9YIMWzB+TEl9YMgdU13xrCLCuLtsDWyWeXpySL4f4ouFu4RhPOImw/ sgLgHpgMbKkr8L050yXnKp7swPVRdX2lA+8ol0Y/crLQ76EzTgEE3kWThb09ZFwGt00s SnoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=wumVhPyi; 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 kr7-20020a170903080700b001b06fa86affsi2751767plb.123.2023.06.09.09.17.12; Fri, 09 Jun 2023 09:17:27 -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.20221208.gappssmtp.com header.s=20221208 header.b=wumVhPyi; 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 S231725AbjFIPuK (ORCPT + 99 others); Fri, 9 Jun 2023 11:50:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241887AbjFIPuI (ORCPT ); Fri, 9 Jun 2023 11:50:08 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28E623A96 for ; Fri, 9 Jun 2023 08:49:58 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1a15ce37b39so833669fac.1 for ; Fri, 09 Jun 2023 08:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1686325796; x=1688917796; 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=yrgoKXBwHUX7WEq9UMaUcmVG2l73/fiJgyEmMbnqlYc=; b=wumVhPyiGuTYNfJupdHd62oH9GAZ2PCLmUDDwKDcX/P3q7ZJiv7dip83Lt1lbaCuHM MigaIh4WrBk9OKrbyKNNNXa0kd/dwOrpTT9ewxlQGzS5PVLgpxmnzvdjmt7gq9owAdIF 9No7pVaKOYTtteE7AuLn0IsS5+Xu5qlHWkUdHDiQeLZDF5LdwKv8BkJDPevN5830rw6d u8klF0jeWIRK2Mn54o9QDGIG5w7G6IFXIYMMQlFrZNpO61n39uEAV1uE+vjS4IG+auji 0O0mdkM1esVd84qo3mkpBegd7uuXID4I2Ay5go7S5hNkWWY7wITiJ9+OCtJRZXy0VjBp g4rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686325796; x=1688917796; 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=yrgoKXBwHUX7WEq9UMaUcmVG2l73/fiJgyEmMbnqlYc=; b=jRem82+qaxo0SMmdMKjmp8pPAtwfvCSHayKeJPGuPLLuF4p1HlwlcWydOnwMpACeRQ HY4HyWBnjvckR87yknZjL/L27/bB7H6zCBSmKXgb2ApIDjqtuHLci3csOVadjcvvr9Gr u6BU6Q0PBQjikHPuj5KffSwDxfWjcwltSDSjDVPbR6J60t0LOYRSH0O8kwejujqtu3pB sOkbB6EhNRF4JHNlWjx+2DpBIeJ8a+4W5N3GUetCauaJnB52ErH/awDXYHd3N/JzEAR+ cU5cFUSiE1D7RiMkeCWJyfVO/nhXk2rOaFg9GEgAITG4FiLmctK63iHzlVYT2kCER1+x m7cg== X-Gm-Message-State: AC+VfDyimlWgLOnb1Xd1EOT7cISRyl0O82wcVnJDcikwMo76QvA33QNa S9KeShU6rIC80fNspqGX1MuoRwximeboTWBR7V9H9Q== X-Received: by 2002:a05:6870:988c:b0:1a1:d1c1:f69b with SMTP id eg12-20020a056870988c00b001a1d1c1f69bmr1331796oab.55.1686325796513; Fri, 09 Jun 2023 08:49:56 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 9 Jun 2023 08:49:55 -0700 From: Guillaume Ranquet User-Agent: meli 0.7.2 References: <20220919-v4-0-687f09a06dd9@baylibre.com> <20220919-v4-1-687f09a06dd9@baylibre.com> <20230608210504.GA3436215-robh@kernel.org> In-Reply-To: <20230608210504.GA3436215-robh@kernel.org> MIME-Version: 1.0 Date: Fri, 9 Jun 2023 08:49:55 -0700 Message-ID: Subject: Re: [PATCH v4 1/8] dt-bindings: display: mediatek: add MT8195 hdmi bindings To: Rob Herring Cc: Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Krzysztof Kozlowski , Matthias Brugger , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , CK Hu , Jitao shi , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Krzysztof Kozlowski , AngeloGioacchino Del Regno , mac.shen@mediatek.com, stuart.lee@mediatek.com 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, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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, 08 Jun 2023 23:05, Rob Herring wrote: >On Mon, May 29, 2023 at 04:30:58PM +0200, 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 the legacy "mediatek,hdmi-ddc" binding. >> >> Signed-off-by: Guillaume Ranquet >> --- >> .../bindings/display/mediatek/mediatek,hdmi.yaml | 59 ++++++++++++++++++---- >> .../display/mediatek/mediatek,mt8195-hdmi-ddc.yaml | 45 +++++++++++++++++ >> 2 files changed, 93 insertions(+), 11 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml >> index b90b6d18a828..4f62e6b94048 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,10 @@ properties: >> maxItems: 1 >> >> clocks: >> - items: >> - - description: Pixel Clock >> - - description: HDMI PLL >> - - description: Bit Clock >> - - description: S/PDIF Clock >> + maxItems: 4 >> >> clock-names: >> - items: >> - - const: pixel >> - - const: pll >> - - const: bclk >> - - const: spdif >> + maxItems: 4 >> >> phys: >> maxItems: 1 >> @@ -58,6 +51,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 +82,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 > >I don't understand how the same h/w block can have completely different >clocks. If not the same h/w or evolution of the same h/w, then do a >separate schema. > Hi Rob, I'm not entirely sure what's the best approach here. The IPs are different enough to warrant a separate schema IMHO. Though CK asked me to merge both IPs together (for both schema and code). CK might want to chime in and advocate his point of view? >> + >> + 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..84c096835b47 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml >> @@ -0,0 +1,45 @@ >> +# 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 >> + >> + clocks: >> + maxItems: 1 >> + >> + mediatek,hdmi: >> + $ref: /schemas/types.yaml#/definitions/phandle >> + description: >> + A phandle to the mt8195 hdmi controller >> + >> +required: >> + - compatible >> + - clocks >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include >> + #include >> + hdmiddc0: i2c { >> + compatible = "mediatek,mt8195-hdmi-ddc"; >> + mediatek,hdmi = <&hdmi0>; >> + clocks = <&clk26m>; > >How does one access this h/w device? There is nothing described to >access it. > The device is embedded into the HDMI block and thus uses the mediatek,hdmi phandle to access its sets of registers in the middle of the mediatek,hdmi register range. Hope this clarifies things, Guillaume. >Rob