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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CF1DC3DA7A for ; Mon, 2 Jan 2023 14:15:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SZx1Tr0h4/SCKDBA/Xm/h9chO4Ox6TWTPXpqHCdXfHk=; b=cTRruG5FyhcviJiAwZAlF5KPl5 hhvC0CKpyKQWq3r8myhf4QmmFw/SkxWjLizVmzNLHWxJHmeLdTAYtSFPxsV1crfbQQebbJzZjdCUn mCmrKwDXK0OXqAY5Ck8sWIvS746nC8zyuZD6JC1NGfCgdtZGakzEmELI5N16/SDTdh+hbN2D5IU8G 1Bf5LMStkFyvJASpIi8eegMwXa5B6zZNNj1QN5Csz3kJLz4MHtmncWsDzT7wG1rcsyshZp4ugSvrR Dbi86vAm0ZvP6Q8APTjo7v9lkZK6MMdAli8D9aTl6LpzDzhD2Eo6fNpv0d1pZC8bXPAqvLuwGhtlx 59Ya7HHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCLbT-00BjTX-Nl; Mon, 02 Jan 2023 14:15:51 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCLaO-00Bj4x-M1; Mon, 02 Jan 2023 14:14:50 +0000 Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 0C4BC660036F; Mon, 2 Jan 2023 14:14:42 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1672668883; bh=KWofe4Ce3M/Z6MdezBB9cv+MoFevPlM9NxEfSRWWBKA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=B2tnzaFmBPW9eb1lm0Bvxs+jKedjx+VFazMTAfbf8W9bZwnH03CfodnQNZaIeySKp bSSpu9DS8xqW7Dtx4QSGFYGah8/nt992fuyejDrc2jspfCr7g1O7ck78zDGtCOlUA4 Bgs6Kv+Sj5VMeqDYQailcnGXz97COiO1wsV4AxTeKizWPJrIEvUFUMVcOILQl2424E lv9wndKuIeFf3OdNLYNk3d05x+lpDW0H2aSrH8wIHsmLKQYGU6s3sNZpn9I6ZLYXQn WGPPttaVHML8D67T00cO/74PI7Wok64VMSJ8fYRdAfX+t90WnsTOHGHe0v6jV5lQ1d LQPYD1YMKEpXg== Message-ID: <187044b3-b154-256a-c107-3dc9de57d60b@collabora.com> Date: Mon, 2 Jan 2023 15:14:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v3 02/12] dt-bindings: display: mediatek: add MT8195 hdmi bindings Content-Language: en-US To: Guillaume Ranquet , CK Hu , "robh+dt@kernel.org" , "kishon@ti.com" , Chunfeng Yun , "chunkuang.hu@kernel.org" , Jitao Shi , "daniel@ffwll.ch" , "matthias.bgg@gmail.com" , "p.zabel@pengutronix.de" , "airlied@gmail.com" , "rzysztof.kozlowski+dt@linaro.org" , "koul@kernel.org" Cc: "linux-kernel@vger.kernel.org" , "inux-mediatek@lists.infradead.org" , Mac Shen , "evicetree@vger.kernel.org" , "rzysztof.kozlowski@linaro.org" , Stuart Lee , "ri-devel@lists.freedesktop.org" , "inux-arm-kernel@lists.infradead.org" , "linux-phy@lists.infradead.org" References: <20220919-v3-0-a803f2660127@baylibre.com> <20220919-v3-2-a803f2660127@baylibre.com> <7da1e73a0cca6867a060d5b69d45e8d4dfc89748.camel@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230102_061445_193385_F40C411C X-CRM114-Status: GOOD ( 21.95 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Il 02/01/23 14:38, Guillaume Ranquet ha scritto: > On Mon, 26 Dec 2022 06:18, CK Hu (胡俊光) 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 >>> --- >>> >> >> [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 >>> + - 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 >>> + >>> + 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: 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