Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2990409rwd; Fri, 9 Jun 2023 22:43:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4qhiGyZK/u95KLAGW0JtmKDz361rJxO6ytLH/uzOOprKOsI0LKa5ZfFMUExkP8IKfIavQS X-Received: by 2002:a05:6a20:2d29:b0:10c:8e0f:7b1b with SMTP id g41-20020a056a202d2900b0010c8e0f7b1bmr2985340pzl.59.1686375817318; Fri, 09 Jun 2023 22:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686375817; cv=none; d=google.com; s=arc-20160816; b=MyWuTylIxA4Px3lXIyaYqr02t8ls483ByZCDPYI7uusbUK1RKVedGrnEtsZkWSJqL2 xsxQz+y2vjAD1tYEHzgh7i+J5hPQfGems6c2vce/DP/WRfi4BD61xdIgJCMWRBR33dV8 z1nJQUH3WlQtDL+PxQAfwcuMJ4au1gHfZwl9LjGjPL1hUPBDyBeVMGcc7x52f6tfbY5Q XnG6OSL0zDXoNDSYykON9sydSWG+DCAWxgVFdqQPzXuE7gEv9Fn6wiV0KBYFc+HxtSjS +jQtBpuIP3LIpjdQJ0wQMSzr7+yBAZ4r4u7SYoC6pQE4OgUn/CXbMjpdf/QirujMpzjo idVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KQSclBfsUIUWfzrPiDscoVC+iNrQGheacHuSg69c3KY=; b=jtBSIUKUeHg+eG/XbqVUspb8ylrfLz6fCTBStDtgrIE+xVh6hpUtejKknaLBLgG0Nn 3VgcZfYbq+YULBYDRF0ZbKUCqWcAZAvNF587rvyzLUCufTuDdUu+490Dw0SYcjRX1mNp Wo9tzHLrlNH50DU7v+iiQ0mNt36CVNdIEu5WR/EsY/9AuP+7JhRqmuVsCjGMokJURcjy GvGxprDYcKwuP8urwCA6zbD5JUao4LfUZAytUq1OeSLonUxiGJI6RqrLGUVz53ghLVob huKCR89fVRYrubO11C8OMhrh/lx/zDmsllkvkSklW67QQX81S2fq2EGZ0OosJ9SlldD3 rZ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pst8WmIt; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b005481915c0cfsi3444419pgq.1.2023.06.09.22.43.13; Fri, 09 Jun 2023 22:43: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=@kernel.org header.s=k20201202 header.b=Pst8WmIt; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233717AbjFJEQ0 (ORCPT + 99 others); Sat, 10 Jun 2023 00:16:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233399AbjFJEQX (ORCPT ); Sat, 10 Jun 2023 00:16:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C68730F8; Fri, 9 Jun 2023 21:16:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EE71961EED; Sat, 10 Jun 2023 04:16:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57157C433A1; Sat, 10 Jun 2023 04:16:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686370581; bh=1X2OMYrZ6xQ16W4+zpul0HF3stiu96+45CBEnse6yHo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Pst8WmItaIN7FwghP7AsO+C1bWWyzk3aspuYQ0B8chEZKuRz45L/3jzMf/v0SlAlT /2apEPlkxFgZQ65wOe7ALrZ0FMJ/sI9w8aa6Zl3m0E3YRlgNV3QUUGhlyv9axf/mUi mr5Nf5Y71IP/bIhWmK5nsyQkFI2LhMXdt18DNYIKfEAiVlkpluLySWVHBpRf+BNE58 5lfLEdapLADvnkqBwesmPfjZOC+SaDS5K182y2lax91kytxtQPUAzweHm4DcRa5YvZ 3zygk24liBk0y2QCFsQItgqisgUiq7ne0Z9kV8LKItSQWrpa2S8tBu34Taf+4pgDxq 5tO3OEoj5FISw== Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2b1fe3a1a73so26880581fa.1; Fri, 09 Jun 2023 21:16:21 -0700 (PDT) X-Gm-Message-State: AC+VfDyZzQOyAq1jx0D6SIJpxmVBv3Q19KCaJ5xnFCy02cyawnGudCxC GWIqfbJYE5LyhsfpCQv7P6Zj7PJ/fpzOsvLK2w== X-Received: by 2002:ac2:5b1c:0:b0:4f1:3d9f:1b53 with SMTP id v28-20020ac25b1c000000b004f13d9f1b53mr1629565lfn.50.1686370579139; Fri, 09 Jun 2023 21:16:19 -0700 (PDT) MIME-Version: 1.0 References: <20220919-v4-0-687f09a06dd9@baylibre.com> <20220919-v4-1-687f09a06dd9@baylibre.com> <20230608210504.GA3436215-robh@kernel.org> In-Reply-To: From: Chun-Kuang Hu Date: Sat, 10 Jun 2023 12:16:07 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 1/8] dt-bindings: display: mediatek: add MT8195 hdmi bindings To: Guillaume Ranquet Cc: Rob Herring , 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" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Hi, Guillaume: Guillaume Ranquet =E6=96=BC 2023=E5=B9=B46=E6=9C=88= 9=E6=97=A5 =E9=80=B1=E4=BA=94 =E4=B8=8B=E5=8D=8811:50=E5=AF=AB=E9=81=93=EF= =BC=9A > > 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/mediat= ek,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 re= gisters. > >> > >> + 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? For all the mediatek hdmi device, input mediatek internal video signal, and output hdmi signal, so I'm curious about how mt8195-hdmi device is different with other mediatek hdmi device. I think pixel clock is an important clock which is related to resolution and fps. So I think every hdmi device should have a clock which related to pixel clock. I does not find it in mt8195 device. Is one of the clock the parent clock of pixel clock or one of the clock is pixel clock but you give it another naming? Please conduct with mediatek stuff and give us these information, so we have information to judge mt8195-hdmi is different with other mediatek hdmi device or similar to. For other three clocks, I still need these information. Regards, Chun-Kuang. > > >> + > >> + required: > >> + - mediatek,syscon-hdmi > >> + > >> additionalProperties: false > >> > >> examples: > >> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediat= ek,mt8195-hdmi-ddc.yaml b/Documentation/devicetree/bindings/display/mediate= k/mediatek,mt8195-hdmi-ddc.yaml > >> new file mode 100644 > >> index 000000000000..84c096835b47 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,mt81= 95-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-h= dmi-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 =3D "mediatek,mt8195-hdmi-ddc"; > >> + mediatek,hdmi =3D <&hdmi0>; > >> + clocks =3D <&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