From patchwork Mon Apr 12 09:39:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12197429 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B27BC433B4 for ; Mon, 12 Apr 2021 09:41:20 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B849C61241 for ; Mon, 12 Apr 2021 09:41:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B849C61241 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7Brqw7bMZkPedBfuaJG/IXp9aVL4a1pXhwahzrKiDgg=; b=dltCnZ/zeGmnce/270xBvAsbI oZjHwCCemy9pFPRX60gziEzXxhYHKPmaKfscbzi0lfYtDmXHOuMiz2QVxRfPBLZe+lzmbaUr6eNm9 txrQ6zQ6FwttjtIUGz576cQ6m6zWRQRcry5K5WE7XU9bPYQ8Y2KaBDYFN/vx0brvGXI99Vtv//rJj 1y0fCx7qIUS5k9oyhavYf/CdU7VpFVvRAw0lAzte9dS/f4nHhkq9Wcc29NSX2hdpTReErrB9qVpcy t7eLaUTlpSCt+d4Ka/+cXWAtLzZPvHkHDlIpBpwsut2AGaUblZuX7mOH4ga5ocQMO23/qQZXzmSo/ JY+P0/h4A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVt48-006JpK-A4; Mon, 12 Apr 2021 09:41:08 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2i-006JWU-G7 for linux-mediatek@desiato.infradead.org; Mon, 12 Apr 2021 09:39:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=+eQLUSDxC/KAAM8PQeZDYoC/OzSAmtGzEqBzK7vKIGE=; b=messs8LZ/bumPq33pDdYGz/i1t h1jEuhbFyeBIXpNYxyWz4eeNJ+CHKVbLcW3IW3h5boNsF6xfpOKY94vEavcWOChvJeFf2oGPJHnrV 67HGJKaFyhWSWItVwS9yuONPNJoi1JEWVB/oaXKXlTtlulr1wDDtRJAVks0pwg2x8sOWANeTnoEQc WIB3ltn3u1u1LwZX07ImbC0qd9LNQxvTY5mQlxgdVoDZe3Oc2QTSIF/oAmBQtJxei38Vmlkek4pTC XcAfHmUYUjMxWPtWQUT+BfIzERT4OcftRDU0EQYRMpFlp8PUznKfL3lOyxt7iRLPGxJei3EtFWmbG YKnBKuEA==; Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2e-0064tu-B6 for linux-mediatek@lists.infradead.org; Mon, 12 Apr 2021 09:39:39 +0000 Received: by mail-wr1-x434.google.com with SMTP id p6so5467929wrn.9 for ; Mon, 12 Apr 2021 02:39:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+eQLUSDxC/KAAM8PQeZDYoC/OzSAmtGzEqBzK7vKIGE=; b=S6fzpl/s75vVv8GaAqf5ZTN4LDh0y9MH26OLlgagJ+bvjjFRGI6Itb0hTRBU7SsSZu w6MqOhpJgnLiJ+nJm5qcsEhdx0rRVDTaA9ojT6RbFPQC3AzCZegNQKaFNYTQ3GUfuRCk F/dk7wbDIL/zk0f9Ny1L5+kFc7E1cfrPgThGJUTIyg8mVI7WWSASDsB5bz7TyLBcOhX4 aksWcwICfKfZFm69wh2qpyqlow7djgoVE/FGdbtP+WEERJO6aulOTlfuxgnoA/N8FtEJ 5M7XJAEHG7bBcP87chiEiY2nvgDTOJ38Ulxz5y9L5NyvOWvlIKRjkZaztfy3xiUQg0zl hz7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+eQLUSDxC/KAAM8PQeZDYoC/OzSAmtGzEqBzK7vKIGE=; b=rJhDnMvRGOpNJOqeXOsvv8ddoBDxWbOwXoSaF+Sqc7AgWLQAbrrI7IVG+a10bkbvEg p4wK5rrCnK6oge+JYFk5Ba8ygrKxYQrI54rqMWZYA3c+zwpzKOB5qpp1O7dtClyOzIq3 4ulVPWdKH9KTuHLonJGSEOhMka0JCHmYUfhlMhU9eGZ/K4j+oi2a4Vh9VpKmjwBB7aon MabHqxAjK88/0DUP4C3jmdsp+v3mIwlgv01gf8td6l2o5aeM3bBSmkdw+5gFxMhAPYTp 0vMqxgSYkhDOzIgDo9b+Oz2Du0asqGYbSiodNJccoifQ9bVcblQNFjaS6XNFoxpdUgwJ CShA== X-Gm-Message-State: AOAM532+GF53zICaAG9SPVlotojwDADBS6Y4Y6B7vRS5XElHbRFBEzx/ NadojEOOLcfT2U55u6t21T/EdQ== X-Google-Smtp-Source: ABdhPJwGo6b1fl6GiM30UBzNo5HI0PPshN6/qFRKQ5/fXShS8QTcPCs67HSa/l6X+PPuI/HtUH4a8Q== X-Received: by 2002:adf:f990:: with SMTP id f16mr1883862wrr.312.1618220374703; Mon, 12 Apr 2021 02:39:34 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:90c:e290:4c21:b00e:ff79:bf20]) by smtp.gmail.com with ESMTPSA id r22sm14405902wmh.11.2021.04.12.02.39.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 02:39:34 -0700 (PDT) From: Neil Armstrong To: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, matthias.bgg@gmail.com, devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH v2 1/5] dt-bindings: display: mediatek, hdmi: Convert to use graph schema Date: Mon, 12 Apr 2021 11:39:24 +0200 Message-Id: <20210412093928.3321194-2-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210412093928.3321194-1-narmstrong@baylibre.com> References: <20210412093928.3321194-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_023936_393708_BACF638C X-CRM114-Status: GOOD ( 21.16 ) 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 Update the mediatek,dpi binding to use the graph schema. Signed-off-by: Neil Armstrong --- .../display/mediatek/mediatek,cec.yaml | 51 +++++++ .../display/mediatek/mediatek,hdmi-ddc.yaml | 57 ++++++++ .../display/mediatek/mediatek,hdmi.txt | 136 ------------------ .../display/mediatek/mediatek,hdmi.yaml | 131 +++++++++++++++++ 4 files changed, 239 insertions(+), 136 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,cec.yaml create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml delete mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.txt create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,cec.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,cec.yaml new file mode 100644 index 000000000000..408e7dfce409 --- /dev/null +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,cec.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,cec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek HDMI CEC Controller Device Tree Bindings + +maintainers: + - CK Hu + - Jitao shi + +description: | + The HDMI CEC controller handles hotplug detection and CEC communication. + +properties: + compatible: + enum: + - mediatek,mt7623-hdmi + - mediatek,mt8173-hdmi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +additionalProperties: false + +examples: + - | + #include + #include + #include + cec: cec@10013000 { + compatible = "mediatek,mt8173-cec"; + reg = <0x10013000 0xbc>; + interrupts = ; + clocks = <&infracfg CLK_INFRA_CEC>; + }; + +... diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml new file mode 100644 index 000000000000..c15b3470d652 --- /dev/null +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/mediatek/mediatek,hdmi-ddc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek HDMI DDC Device Tree Bindings + +maintainers: + - CK Hu + - Jitao shi + +description: | + The HDMI DDC i2c controller is used to interface with the HDMI DDC pins. + +properties: + compatible: + enum: + - mediatek,mt7623-hdmi + - mediatek,mt8173-hdmi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: ddc-i2c + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + hdmi_ddc0: i2c@11012000 { + compatible = "mediatek,mt8173-hdmi-ddc"; + reg = <0x11012000 0x1c>; + interrupts = ; + clocks = <&pericfg CLK_PERI_I2C5>; + clock-names = "ddc-i2c"; + }; + +... diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.txt b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.txt deleted file mode 100644 index b284ca51b913..000000000000 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.txt +++ /dev/null @@ -1,136 +0,0 @@ -Mediatek HDMI Encoder -===================== - -The Mediatek HDMI encoder can generate HDMI 1.4a or MHL 2.0 signals from -its parallel input. - -Required properties: -- compatible: Should be "mediatek,-hdmi". -- the supported chips are mt2701, mt7623 and mt8173 -- reg: Physical base address and length of the controller's registers -- interrupts: The interrupt signal from the function block. -- clocks: device clocks - See Documentation/devicetree/bindings/clock/clock-bindings.txt for details. -- clock-names: must contain "pixel", "pll", "bclk", and "spdif". -- phys: phandle link to the HDMI PHY node. - See Documentation/devicetree/bindings/phy/phy-bindings.txt for details. -- phy-names: must contain "hdmi" -- mediatek,syscon-hdmi: phandle link and register offset to the system - configuration registers. For mt8173 this must be offset 0x900 into the - MMSYS_CONFIG region: <&mmsys 0x900>. -- ports: A node containing input and output port nodes with endpoint - definitions as documented in Documentation/devicetree/bindings/graph.txt. -- port@0: The input port in the ports node should be connected to a DPI output - port. -- port@1: The output port in the ports node should be connected to the input - port of a connector node that contains a ddc-i2c-bus property, or to the - input port of an attached bridge chip, such as a SlimPort transmitter. - -HDMI CEC -======== - -The HDMI CEC controller handles hotplug detection and CEC communication. - -Required properties: -- compatible: Should be "mediatek,-cec" -- the supported chips are mt7623 and mt8173 -- reg: Physical base address and length of the controller's registers -- interrupts: The interrupt signal from the function block. -- clocks: device clock - -HDMI DDC -======== - -The HDMI DDC i2c controller is used to interface with the HDMI DDC pins. -The Mediatek's I2C controller is used to interface with I2C devices. - -Required properties: -- compatible: Should be "mediatek,-hdmi-ddc" -- the supported chips are mt7623 and mt8173 -- reg: Physical base address and length of the controller's registers -- clocks: device clock -- clock-names: Should be "ddc-i2c". - -HDMI PHY -======== -See phy/mediatek,hdmi-phy.yaml - -Example: - -cec: cec@10013000 { - compatible = "mediatek,mt8173-cec"; - reg = <0 0x10013000 0 0xbc>; - interrupts = ; - clocks = <&infracfg CLK_INFRA_CEC>; -}; - -hdmi_phy: hdmi-phy@10209100 { - compatible = "mediatek,mt8173-hdmi-phy"; - reg = <0 0x10209100 0 0x24>; - clocks = <&apmixedsys CLK_APMIXED_HDMI_REF>; - clock-names = "pll_ref"; - clock-output-names = "hdmitx_dig_cts"; - mediatek,ibias = <0xa>; - mediatek,ibias_up = <0x1c>; - #clock-cells = <0>; - #phy-cells = <0>; -}; - -hdmi_ddc0: i2c@11012000 { - compatible = "mediatek,mt8173-hdmi-ddc"; - reg = <0 0x11012000 0 0x1c>; - interrupts = ; - clocks = <&pericfg CLK_PERI_I2C5>; - clock-names = "ddc-i2c"; -}; - -hdmi0: hdmi@14025000 { - compatible = "mediatek,mt8173-hdmi"; - reg = <0 0x14025000 0 0x400>; - interrupts = ; - clocks = <&mmsys CLK_MM_HDMI_PIXEL>, - <&mmsys CLK_MM_HDMI_PLLCK>, - <&mmsys CLK_MM_HDMI_AUDIO>, - <&mmsys CLK_MM_HDMI_SPDIF>; - clock-names = "pixel", "pll", "bclk", "spdif"; - pinctrl-names = "default"; - pinctrl-0 = <&hdmi_pin>; - phys = <&hdmi_phy>; - phy-names = "hdmi"; - mediatek,syscon-hdmi = <&mmsys 0x900>; - assigned-clocks = <&topckgen CLK_TOP_HDMI_SEL>; - assigned-clock-parents = <&hdmi_phy>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - hdmi0_in: endpoint { - remote-endpoint = <&dpi0_out>; - }; - }; - - port@1 { - reg = <1>; - - hdmi0_out: endpoint { - remote-endpoint = <&hdmi_con_in>; - }; - }; - }; -}; - -connector { - compatible = "hdmi-connector"; - type = "a"; - ddc-i2c-bus = <&hdmiddc0>; - - port { - hdmi_con_in: endpoint { - remote-endpoint = <&hdmi0_out>; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml new file mode 100644 index 000000000000..9c125d7c8934 --- /dev/null +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml @@ -0,0 +1,131 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/mediatek/mediatek,hdmi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek HDMI Encoder Device Tree Bindings + +maintainers: + - CK Hu + - Jitao shi + +description: | + The Mediatek HDMI encoder can generate HDMI 1.4a or MHL 2.0 signals from + its parallel input. + +properties: + compatible: + enum: + - mediatek,mt2701-hdmi + - mediatek,mt7623-hdmi + - mediatek,mt8173-hdmi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + 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 + + phys: + maxItems: 1 + + phy-names: + items: + - const: hdmi + + mediatek,syscon-hdmi: + $ref: '/schemas/types.yaml#/definitions/phandle' + minItems: 2 + description: | + phandle link and register offset to the system configuration registers. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: | + Input port node. This port should be connected to a DPI output port. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: | + Output port node. This port should be connected to the input port of a connector + node that contains a ddc-i2c-bus property, or to the input port of an attached + bridge chip, such as a SlimPort transmitter. + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - phys + - phy-names + - mediatek,syscon-hdmi + - ports + +additionalProperties: false + +examples: + - | + #include + #include + #include + hdmi0: hdmi@14025000 { + reg = <0x14025000 0x400>; + interrupts = ; + clocks = <&mmsys CLK_MM_HDMI_PIXEL>, + <&mmsys CLK_MM_HDMI_PLLCK>, + <&mmsys CLK_MM_HDMI_AUDIO>, + <&mmsys CLK_MM_HDMI_SPDIF>; + clock-names = "pixel", "pll", "bclk", "spdif"; + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_pin>; + phys = <&hdmi_phy>; + phy-names = "hdmi"; + mediatek,syscon-hdmi = <&mmsys 0x900>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + hdmi0_in: endpoint { + remote-endpoint = <&dpi0_out>; + }; + }; + + port@1 { + reg = <1>; + + hdmi0_out: endpoint { + remote-endpoint = <&hdmi_con_in>; + }; + }; + }; + }; + +... From patchwork Mon Apr 12 09:39:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12197427 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7039CC433ED for ; Mon, 12 Apr 2021 09:41:14 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0229861243 for ; Mon, 12 Apr 2021 09:41:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0229861243 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yFy/c6Odc+FiAvXihc38UIrnUzjPK4Z3GTZ5d2Vp9d8=; b=ivwbi2sHQ1FFJkb/wqBaYHoNU 0XjjdHiRt8jjNYI/uSNJYiLJy3h5TkzkPUzR6g++w0lVrz2rSfa6n9jUrwIflPp54SZw4ya+tmP4Y po59Dn8M/wpZwUFIwd6i20rZDRU1IWHUF2vgusO9N+apPiWV9U14wJNG9WVLvqWXY3MYUsop5QNo/ yL/153oZ65oZLeeoVumH7QRZGYAfzO5BWO22J+FFVW59jWFbR/LX7XRsoo7j2YgWh9E1tiAOSewOC 2bOdne018VCAMRAqH7fhFAoZOQBDQRw43eSvGsofBuP0CnWyTxgtEH9Ec8pkPTZJd0mzBIn2qYfNd 69674DxKw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVt44-006JoP-2g; Mon, 12 Apr 2021 09:41:04 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2i-006JWT-7A for linux-mediatek@desiato.infradead.org; Mon, 12 Apr 2021 09:39:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=hIB5ovbW1Quy+W36SGjHdu93f090uQNPnQqmgWziz2Y=; b=RBd9el/21odC8j7is3ZH84xshL VlG13nxS5We8h1tTTrrPyxW14AOyNYbOfoDvnnMFtFcrPgSq0dAKfLxE0xbHeQz0lyfbq81KQg0ir vgQ7r82QBMdHtZCjNDHHD6deEpLvvJhCL6w7wM7pqQ34FSH88RlOLzW5zFJ3mqvg6HqRFnkMVcxAF bJQ48UFX8l/MIUnlrk7AMIt5N47fiZaM6nDSQi79sfemAtw29wLoEpnjOjDSLsQVu7+k2ULoV8RQH XFhDCIRrX5vBNCWqn13fJSfwCSpKc/sJWSgwalPsxk4bkoNXTD6MM+er0BwBqOZEPDFbnNSEPQvzc CuqPapiQ==; Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2f-0064uT-Ex for linux-mediatek@lists.infradead.org; Mon, 12 Apr 2021 09:39:38 +0000 Received: by mail-wm1-x331.google.com with SMTP id 12so6396865wmf.5 for ; Mon, 12 Apr 2021 02:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hIB5ovbW1Quy+W36SGjHdu93f090uQNPnQqmgWziz2Y=; b=zm2xIpJUxLvzkqUTEm7Kux2j4hsc7UsSYGnXv7d2oBzNu+GMnYnhf1z5//irUI3AjJ MMLBh7mFElwdI+UCUkVSCWe+ZwhCqRnhDoZkVeFLOe355xwrscIYoZtDX4Xv50XAFVWn 8iWda9Y3ht52ceGi9cqPxCKnmugHB8RTh33+v5pFyiKNADnH3k3O/OB+pfkERYORBZuK 5zu79RUvFTSKTwZ8+6pOdcgn60pGG74Sxq7MtkWFRG3jNyYPenQXIubqmXPT8uWucvE/ e6Hz/7o9CqCd9w/EZJMVrGxOkoXvFolAws6QSI2o0FhzpIXWaw32OXrQLmJEX0PuVY7a RX/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hIB5ovbW1Quy+W36SGjHdu93f090uQNPnQqmgWziz2Y=; b=jj63QJEkzlTWdAndLtX1L4seUTjKozr6o7fpLCYS1jJL3ZhSLbBih5sPto4xuxBZer ZGcui6vJnyewtNN+Iicg0ZNkKnqIMdJPD5AuKVbMou+WUODyFHOo+pP2sDGw3QIRGz7p XlhYM9OkYFr3RFkKlehZVA3EAGeiUJXh6k3Mav+9MeR29igptZLocnu1+egK2ekrEwYS 8XzIjuTbFASPrIWHk78DoJX5vevWdL9Txwgj9yKL8lkEjAzg9rBsZ/7n5L61Q+dCfY3T mzwtbDNbISAUHuLB5XIViPeV1N6lGF4GqmxnBocOTYuyZ5vXn3MlLF+y/+rhSKIu7Ws6 VK/Q== X-Gm-Message-State: AOAM532ewnpqfz0JkKUbbSLCy5cxNQB3UVtCKiy+F7w5v8oWlcfWyxWz FD52TQPsQ3Hcdefz9XCXGtz7cw== X-Google-Smtp-Source: ABdhPJwxIfToJ6h311EOoJdSj7K3pZVeoBB4kmyIbIG0GYyMak+pMG/9kiLac5dW9hAThNV4EkUzdQ== X-Received: by 2002:a05:600c:2945:: with SMTP id n5mr24322799wmd.7.1618220375929; Mon, 12 Apr 2021 02:39:35 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:90c:e290:4c21:b00e:ff79:bf20]) by smtp.gmail.com with ESMTPSA id r22sm14405902wmh.11.2021.04.12.02.39.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 02:39:35 -0700 (PDT) From: Neil Armstrong To: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, matthias.bgg@gmail.com, devicetree@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH v2 2/5] dt-bindings: mediatek: add mt8167 to hdmi, hdmi-ddc and cec bindings Date: Mon, 12 Apr 2021 11:39:25 +0200 Message-Id: <20210412093928.3321194-3-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210412093928.3321194-1-narmstrong@baylibre.com> References: <20210412093928.3321194-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_023937_519704_216C8F49 X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. 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 Add mt8167 SoC compatible to Mediatek hdmi, hdmi-ddc and cec schema bindings. Signed-off-by: Neil Armstrong --- .../devicetree/bindings/display/mediatek/mediatek,cec.yaml | 1 + .../devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml | 1 + .../devicetree/bindings/display/mediatek/mediatek,hdmi.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,cec.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,cec.yaml index 408e7dfce409..23e21656ca55 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,cec.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,cec.yaml @@ -17,6 +17,7 @@ properties: compatible: enum: - mediatek,mt7623-hdmi + - mediatek,mt8167-hdmi - mediatek,mt8173-hdmi reg: diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml index c15b3470d652..9d7148b1a7c3 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi-ddc.yaml @@ -17,6 +17,7 @@ properties: compatible: enum: - mediatek,mt7623-hdmi + - mediatek,mt8167-hdmi - mediatek,mt8173-hdmi reg: diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml index 9c125d7c8934..01ab0e8e02bc 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,hdmi.yaml @@ -19,6 +19,7 @@ properties: enum: - mediatek,mt2701-hdmi - mediatek,mt7623-hdmi + - mediatek,mt8167-hdmi - mediatek,mt8173-hdmi reg: From patchwork Mon Apr 12 09:39:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12197431 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2600C43460 for ; Mon, 12 Apr 2021 09:41:21 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6BCAF61241 for ; Mon, 12 Apr 2021 09:41:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BCAF61241 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WlmtBEjtMz3dh1PolFAU5NbjSssEoDP6mtGKymabOw0=; b=Q7RMxzRpgbFJrwZwg7/T/Khs7 pb4tqF50g3tIS+xUrrgOFalhbm9xukR3lSTY0XuAetPgTbWTTiMddxame6aBRshIEs/8d5BXfBw6Z OLP8COe5Q8NkqO57Tp8uYrK57GayR6KKK2GaulRJaTsBltGAPugNUH+Jxdek0/gfEHYzrnSLdQfnS /t3xx6ttJWs6abWR9IrzqPxrdaoacOVF+VxVGSAfM0IkaD0jefRaGzmIQ1PccCK2YDYEfZaSSioXC XJEVIqVAJeo3Ud9kEQvE47wgVFzNAW1ECU/uxmmdYpYO2iBILCzyemQ+98W8Gw3lr1eBQdm5WPFqx U15WlXaAA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVt4C-006JqM-5i; Mon, 12 Apr 2021 09:41:12 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2j-006JWd-Bp for linux-mediatek@desiato.infradead.org; Mon, 12 Apr 2021 09:39:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=b64pfOb+ESukFQpojWv0aNxV3D5E9ms1GDFWEsqil0U=; b=E3TAfMsBTnZ0DIfA+ZDkkh7mLX 8NpUNi7JDJFoj9HRTfbmDFjr/YVcVSmQqSFflnqGn+PebRI9t7mQEpfNrqe/bF32Ai7+Fb8QJtRiE 6S0+hiTSOQsiFPcYLHTkQxWfgGr2DvqK/FyMONrXsnP4yFaDzB9tZsyKBt1R2h3zwVlFk6tyfugwd YQd/6GP3sbNTp6k7rA0PYbxhrckr11heAiHlAhbAAl9ObKsqs6UdHF2Lp52AAVmYh8EtZwYLrkfAZ Nw6U2hsLmzPWSGVwvh6kZOMCz5ZOazwKcKwiYzXDtpENiHrFKsAefmVTR1pNPGYKI3HCf9vyNPMcv yRuZPrxA==; Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2g-0064v9-N1 for linux-mediatek@lists.infradead.org; Mon, 12 Apr 2021 09:39:40 +0000 Received: by mail-wr1-x432.google.com with SMTP id x7so12172651wrw.10 for ; Mon, 12 Apr 2021 02:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b64pfOb+ESukFQpojWv0aNxV3D5E9ms1GDFWEsqil0U=; b=cUCTfH9cQ20lN0ASEY1CcKyAskerlXs7EVSJaa6aV9/KVocXxKC9+GyDoWrNIo/+Z6 xinJzqXyxeW3D3CAEl7kmAQIl0+SFCe0ibs9Urg8AyOHMFU+E8L1wfOvAu319Atd7xv2 H9wet+wscvVhrd40D2HQX2U9l3P9Y1QnEieLZdZdvGOdjEJd6vAC3u3OcC2NH1yqaFpu wPoBNr6F3CGOwT4rkkJQ3k3I7iKBP38HOBmpHCHl+NZpewk2S8wEyrQg4B/6I86x/qmv VRRXKBFZsQaPCgjwZfMM6FezSVukE4fYRjWwFFUWkBDxNqUk/JG6wNERV2ufIjHxFpfj wFtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b64pfOb+ESukFQpojWv0aNxV3D5E9ms1GDFWEsqil0U=; b=PudPjdZb4FhDgAbrNcPWHwJA2vAAkK2EeqQH8SOxGQK74C4xjz0W3tFF1cAx2cRnly TnvBBQPn42IDhO81se91aRBEmFLNf4Ko3K0p2nNFe+MXjKCNW46cDZUZnhXVGzHWlMC4 miXMvVLJE5h8iUjsvz2KyouGu/ZsPkGyM0ejIg0Ev1PMYh21+ENnU1LptKXJutahCjWU eHRedpFy6jcBHWoo+vW8q7Drs1uIwxE2xvHKDFmH884uCzcuIvZJUD0gYHZEWJjqq5Yl zg7INSwnhGzF3X2TIxDHLyE4lzJGpRgyrg4CFrmi7h0qBwSaey8ja6RuTrgiTdY8GNI1 71cg== X-Gm-Message-State: AOAM53151tvvyLiw29JRox2KUzvI5Ex2XQ610zcQy2Q3fPyatsyt9s/u 9xpC4JLhrjoWClVQd9s8Zc6QMQ== X-Google-Smtp-Source: ABdhPJz96Ixh0rydLkGNtoMbTLcMl1V8ZHJ6OxRZb3g3eu/v9lSIxMYmfdeZLJ4ofiQecixqlveQKA== X-Received: by 2002:a5d:6c62:: with SMTP id r2mr32037266wrz.62.1618220377138; Mon, 12 Apr 2021 02:39:37 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:90c:e290:4c21:b00e:ff79:bf20]) by smtp.gmail.com with ESMTPSA id r22sm14405902wmh.11.2021.04.12.02.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 02:39:36 -0700 (PDT) From: Neil Armstrong To: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, matthias.bgg@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong , Fabien Parent Subject: [PATCH v2 3/5] gpu/drm: mediatek: hdmi: add check for CEA modes only Date: Mon, 12 Apr 2021 11:39:26 +0200 Message-Id: <20210412093928.3321194-4-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210412093928.3321194-1-narmstrong@baylibre.com> References: <20210412093928.3321194-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_023938_790346_A8DCB7B8 X-CRM114-Status: GOOD ( 12.63 ) 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 Some SoCs like the MT8167 are not validated and supported for HDMI modes out of HDMI CEA modes, so add a configuration boolean to filter out non-CEA modes. Signed-off-by: Fabien Parent Signed-off-by: Neil Armstrong --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index dea46d66e712..0539262e69d3 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -148,6 +148,7 @@ struct hdmi_audio_param { struct mtk_hdmi_conf { bool tz_disabled; + bool cea_modes_only; }; struct mtk_hdmi { @@ -1222,6 +1223,9 @@ static int mtk_hdmi_bridge_mode_valid(struct drm_bridge *bridge, return MODE_BAD; } + if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode)) + return MODE_BAD; + if (mode->clock < 27000) return MODE_CLOCK_LOW; if (mode->clock > 297000) From patchwork Mon Apr 12 09:39:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12197469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FE93C433B4 for ; Mon, 12 Apr 2021 09:43:16 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F294161241 for ; Mon, 12 Apr 2021 09:43:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F294161241 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7XL4M3zAJUej6MONpzXegcXukEtZwV7KaL6JRl476oA=; b=YXlPvrwTr06EmGiIEIDFjoDUP J6f0Ur6g60FtfFwIzlYOTkxCgrfwg8rKTUrqKjzy0zJPKnFM8SeXNmbC4wUHkryeLiboeGaBGm66Q lwjCWVvVDYnlTX3MlW4WuAHwISRAu1R4rGxSWyfGXHZBKrM8R9aW953QJw3/Ke+NoYkyG5NzOFio5 y4eF6SMeQ4tGgXB7IJPQgh8Ze/s4v8Tz06vsRJa2YJxz98Lkr7J3vF4hgJuTvM8fpk+/Pt6uqwQXZ mFc8ngdBP/lLq6+Rs+4yDRIR5E1dfgER/NX8oGfpbyeYW2+rBWEjL0ziidYHTROUwmOi0tnEFgz4g avk0t31bg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVt61-006KMF-UU; Mon, 12 Apr 2021 09:43:06 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2k-006JXA-KG for linux-mediatek@desiato.infradead.org; Mon, 12 Apr 2021 09:39:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Q4YDvpAD1UGIZmGY7ATXAVL5J0kUewQGcgvVMVoEerk=; b=vboTf4ZOEVudf/8ztinRLrKY9m 1ZTpirW1oV0WkZI3E3LgkbA4mLQS2pGzeh9WG7y/G0v79vhji3bjxZ2xcQlS852Enr+YCKxttdBCc E7plbYmCnK8S+tx8p9inzgvH865kYhCtrJfVaFDjoaoLce3jNpnRpbE3slTiZlOTUXJzCyQxEvvut lSP3hM3f1vajl65HgEoIPHoiAbBrYggunABp2ZOpB320vP3g9UErdznpScIQva2RKNrqITUi+wePh K2RegLYBiJgkl/3mxDV/snPLXFFUUz4YwnxVR7xjTeyjMxyGK0YryQOqhcwcwhRDIbJ7ZFw3AdFnu 7bG7n1Tg==; Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2i-0064wY-0F for linux-mediatek@lists.infradead.org; Mon, 12 Apr 2021 09:39:41 +0000 Received: by mail-wr1-x42e.google.com with SMTP id a6so12198107wrw.8 for ; Mon, 12 Apr 2021 02:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q4YDvpAD1UGIZmGY7ATXAVL5J0kUewQGcgvVMVoEerk=; b=eUPqdTia5iFGBnU+yibNZFt8DEHCfvTTXCKdGvWosxt5hgzyijv+ZMjBvmmVh+K3nc cGluFdswEu4BADOWi0qosoBXasU4r3Hh9F3dM9yr/hgCKNx0zicuRBFeaG8TG6n4ZXA5 6XPp/YIIWQ3GlSSDFT2A7Uq1RIUT/3D1hHcxKj07dlfX3YuAZ5SaIz4ng87sRS0HSEu4 54/HVMBdy6xi93Dxe3nnTwg+8AMcfE8/BhJEFuX44v4QL5YQk8ILOEfKJKl0hSfAaO5d +x48W2GH7x97MA8qr7wFbIohjIu+MzmMMH8xwiT+ag8EVdw0KLW7SfZDKQiNjj2U7NV9 ucog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q4YDvpAD1UGIZmGY7ATXAVL5J0kUewQGcgvVMVoEerk=; b=Duj6BAhy9vJS34+NrtkghINJ12a2rzwlFeH92wNWJqXc/iiyq0P1boH+7luOQBa+8T CP6Ex6BYiPLTsENoU+OlZ+JqwkGfvLxPnkeERcg0grutb8ivCf3jBKY2EDxawrmsGNz3 hB+fSWJgN1LWmx7vgVg0mCsHJ2Drx4+lfhioczhX6PshK2cTM3yxe7Vi7L6yMh0wzqry uR9WKCxhdY2zfCNea+Pvx1pBAokXvpl3bcoaJBevjDiz8HF/oDLpzM5RPhzDKTklLbCy cT1GTAPbla8yYnHtl7QqRZ3JbLJf3I6Dk5/Rfw36YIfpj452jndlnSJoA35I66fQL3JF 29kA== X-Gm-Message-State: AOAM532j6hm7Dyqc4aoIWT8yKxABGEzrs7EpaLduNXuQVmTJ97za0QQn z5HQw4vW4H0nzCPn8BvssKyBqw== X-Google-Smtp-Source: ABdhPJxigmfZSCdDY1wqLPhfhhfh2s9j7fmTwvG4DM80AXXv5sUawdrPx6YzpUHMmhfQo3YB3ijV/Q== X-Received: by 2002:adf:fbc8:: with SMTP id d8mr30640128wrs.94.1618220378404; Mon, 12 Apr 2021 02:39:38 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:90c:e290:4c21:b00e:ff79:bf20]) by smtp.gmail.com with ESMTPSA id r22sm14405902wmh.11.2021.04.12.02.39.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 02:39:38 -0700 (PDT) From: Neil Armstrong To: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, matthias.bgg@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong , Fabien Parent Subject: [PATCH v2 4/5] gpu/drm: mediatek: hdmi: add optional limit on maximal HDMI mode clock Date: Mon, 12 Apr 2021 11:39:27 +0200 Message-Id: <20210412093928.3321194-5-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210412093928.3321194-1-narmstrong@baylibre.com> References: <20210412093928.3321194-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_023940_082128_A1113B28 X-CRM114-Status: GOOD ( 11.91 ) 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 Some SoCs like the MT8167 have a hard limit on the maximal supported HDMI TMDS clock, so add a configuration value to filter out those modes. Signed-off-by: Fabien Parent Signed-off-by: Neil Armstrong --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index 0539262e69d3..bc50d97f2553 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -149,6 +149,7 @@ struct hdmi_audio_param { struct mtk_hdmi_conf { bool tz_disabled; bool cea_modes_only; + unsigned long max_mode_clock; }; struct mtk_hdmi { @@ -1226,6 +1227,10 @@ static int mtk_hdmi_bridge_mode_valid(struct drm_bridge *bridge, if (hdmi->conf->cea_modes_only && !drm_match_cea_mode(mode)) return MODE_BAD; + if (hdmi->conf->max_mode_clock && + mode->clock > hdmi->conf->max_mode_clock) + return MODE_CLOCK_HIGH; + if (mode->clock < 27000) return MODE_CLOCK_LOW; if (mode->clock > 297000) From patchwork Mon Apr 12 09:39:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12197471 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 168E4C433B4 for ; Mon, 12 Apr 2021 09:43:24 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 816816120B for ; Mon, 12 Apr 2021 09:43:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 816816120B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=W4g+PSjX+mxOD9b832yZZokOs2T7Cm7ihcvWAuFNz+o=; b=e6gsK8r1t958RlNBxGPzuLkxx XvwCNKfiggTp72t6iYWFmT6mJwWbClZblMCdZQ3Ml/P9CQCCq/xImPt0LIsiioM1voC8JQNbKS+6k cvb7QIV5bgisutp0Fv3XZdy3S9RItVbeSmqhQAOWNQezwgGCB7EGhmnZCZTdvJLAuHPzOjFScC6aN mUvTDdamzsosYHWk00AgxXCScdZooAcqLpU6Xh+tBAzxvrHKM/RZVO9aK3xLVIS1qEF2ZTq2dkH7P Mt4BRoVfJbu5qTQK4jy2QTKmvOJx7t5Xn81attzuLHr/2ZoWlA7GeYN6sJfqGJxY8wNQEpd1/ORS0 op4Crjx1g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVt68-006KOL-UT; Mon, 12 Apr 2021 09:43:13 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2l-006JXa-Kr for linux-mediatek@desiato.infradead.org; Mon, 12 Apr 2021 09:39:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=emj6t0YnQ8kfODwk6pGcM/emMJNNvWG7eis4Ne6JndY=; b=bxuJqkTZoy4mlsOeyQtFyEclYB kQRE2hcoLKTtQO4V7S+VIQ2Mn5ItHrHSjyZlp6XwJ/BDs/EskxftBhOYFfu3iAFKvkSkSVMsP8gLt ESetX5bzi3roHEN0vImoTl1Ze9vjJrauefdgBKVeXGUv2M/OFMYyHGtIBaGMMAFs1RFl3uZGEeRX/ D4ECRdAf5pDMTXiBMVjBxarkyJjrBgVfVqOUUTpgHrvjLkWdgvXLoHTkvrPo8Ey+5j2A6Cd/fzpvz xvMQMbrukYm/7s0KvyiB9nwBkYa9U0XSRqx0yWAcwzIQUUyukRcOsIlqNj4MTQYLJJx1QJI7PJ+5b JB56X0kQ==; Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVt2i-0064x6-Rs for linux-mediatek@lists.infradead.org; Mon, 12 Apr 2021 09:39:42 +0000 Received: by mail-wr1-x42a.google.com with SMTP id j5so11220470wrn.4 for ; Mon, 12 Apr 2021 02:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=emj6t0YnQ8kfODwk6pGcM/emMJNNvWG7eis4Ne6JndY=; b=Jpnjn9rXPzkPxXX9WoOJFeWyeK+Ple7SplSjETf1bgkKa00qCyCMZZHr89iasN12TP oxxcivC+ycem/57+p8Se9OmpW61Ci+2Lwf4CVHcNFuzmyMoJkQq3ZH4ovghZTO8pLOMq MUhnxCtrb85Fxyx4KOXAy1kmoALlk4B4/RN4i2PnbcW/j0xKu1fRmHvKYLT+RffbQoxc sdckkuOeCDhdDf/cMJRNDRqq93W1zI+VrTKEglTuYDA2TVQXBuil6HRCOuEsEsg798Np 9IxE5NDgPI4riPu9xNC9v07n/ayBwsSg/UVLpmw72zWalk75Q8xqPjbjqbRrnD0En2ig dxig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=emj6t0YnQ8kfODwk6pGcM/emMJNNvWG7eis4Ne6JndY=; b=jSHPbrUEkEqT1DJc6MFTva0GNoM3DmsMqVLfGfZxLyt4JqQaYPXx+CkdM4LBmb3U3y Aq/AjwNLfvIZ25k1PkzhyXPqfIZ2srL06leG1CgEBuxKhnOSzNWm6gg6UKQRsXlxlQOf 0z+4IFECf2qRaPeSOtdXLZVwkn9R46COdpnRenhMdrh5zHVvmzEpVEcgaTblPCxvR+d9 7z3Mn2WhFY5lKviIr94/zi53Hmb9UdeVhX4p7N8WLCdcCY2I0OesJ6JZ5uyRu3xPNu9K OK6hrOm0KuFGrR+GDmHFoOIkPKScSUy7pjgveJHS6ljLofdjiZEm1mGDZMU1f/8g8OaT zQsA== X-Gm-Message-State: AOAM5333wjeMKo8fnaRsdTTUJsit3xjV6aYM/0no6EhVrTWdwbNpkXpS SsvYKvOld0Zhyc7+wduhYy2Osw== X-Google-Smtp-Source: ABdhPJxSRfTPtAOzbr7EGyj16vGGsghASbI4b9GyWVvNHffdVr713D7XedbHjc9AgjB8nY3Mw1qMtA== X-Received: by 2002:adf:e8c4:: with SMTP id k4mr6745211wrn.262.1618220379586; Mon, 12 Apr 2021 02:39:39 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:90c:e290:4c21:b00e:ff79:bf20]) by smtp.gmail.com with ESMTPSA id r22sm14405902wmh.11.2021.04.12.02.39.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 02:39:39 -0700 (PDT) From: Neil Armstrong To: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, matthias.bgg@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong , Fabien Parent Subject: [PATCH v2 5/5] gpu/drm: mediatek: hdmi: add MT8167 configuration Date: Mon, 12 Apr 2021 11:39:28 +0200 Message-Id: <20210412093928.3321194-6-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210412093928.3321194-1-narmstrong@baylibre.com> References: <20210412093928.3321194-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_023940_923529_59DECACF X-CRM114-Status: GOOD ( 11.66 ) 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 The MT8167 SoC have a hard limit on the maximal supported HDMI TMDS clock, and is not validated and supported for HDMI modes out of HDMI CEA modes, so add a configuration entry linked to the MT8167 compatible. Signed-off-by: Fabien Parent Signed-off-by: Neil Armstrong --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index bc50d97f2553..c1651a83700d 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -1787,10 +1787,18 @@ static const struct mtk_hdmi_conf mtk_hdmi_conf_mt2701 = { .tz_disabled = true, }; +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8167 = { + .max_mode_clock = 148500, + .cea_modes_only = true, +}; + static const struct of_device_id mtk_drm_hdmi_of_ids[] = { { .compatible = "mediatek,mt2701-hdmi", .data = &mtk_hdmi_conf_mt2701, }, + { .compatible = "mediatek,mt8167-hdmi", + .data = &mtk_hdmi_conf_mt8167, + }, { .compatible = "mediatek,mt8173-hdmi", }, {}