From patchwork Mon May 30 20:14:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864926 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 A050CC433FE for ; Mon, 30 May 2022 20:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=B1CjYoqtoofhlyfwhSi5QL8RECJN98ab017s2f8UdDs=; b=wyLsLEBID63z9t FzTMFEwny3cgKNJX3kLJ493c4L/DWXr/EWQgcdqlGXMnpvIgB1J6QCZ/cXSoCpQTwENaIKfAP2dBN 6Ob17PbCSqii/cXUJi+qwpTIQytRWRMDYOiku5fveneblkWTvyE/nTs/PGpfc9mU41lIOLi9CWx8O 9zzA8ZHW7dhWmwE+7tYdxQMxrsCVj7hKq0kDutBkHu6vmwnEXQfJhxb1N9HZO9KJHB2fxPQ+swPXG SVPq3Wb+R07dmxg3xcHpgQPUm7ep41/y5J2plShNlLV+Szs1Gq8jmoKIf6auRtaPV8+UBwKVBxg9q dL5t4SUbmrIndQr3mUCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvln9-0089Cv-GM; Mon, 30 May 2022 20:15:07 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvln3-00899q-Om for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:15:04 +0000 Received: by mail-wr1-x42e.google.com with SMTP id t13so16011024wrg.9 for ; Mon, 30 May 2022 13:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=v1KekYBsM60PWOUWQkx+YAzcNsdLIbx5495ax2Uk44I=; b=CqyGXFlBzgROVHYp7ecYqfw78XKSS+1L6CsO2OmUQm1gW9QrLMVzAign7WkMfXoBme A8lr2oORL6b6NHYKjjkGlHMWy7WFnjRrmqtAWvs/Q9zTHfZTXuiqF3FDL3d9wiX/in6V 1y+cx25AaHHtQ/O9bqYMNx4kDPTzWFDu+rFFWtZ+VbALHzs8N3WQ9XJKKYwr7qvthQfp skZkKYkVdVHMoEGPFjwk/62HwsA0GrOQw6QBBXa3+BnVTT+YrZOyX75AW/4ZXbrAZ+Px 05flweFs9wJmVhJcMbp4jwVZB++k4TYn8pbr+gMqfBnuWNl1Ka8iCQB8UiZ18JHZw7Q2 r9eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=v1KekYBsM60PWOUWQkx+YAzcNsdLIbx5495ax2Uk44I=; b=XAQEQbQBygKcC88+CLrOUKYWhv/DbXsB56s1EqhJDL+Ua+nON8zr2g2o3bOJVWmalq VYT0EG1ytiIofP/j+7P0QUy5dSvae9+NA10PgESCql0pMKZ9n9DK21TZLWB/C+JVvppK D+lMedi9tTuysR6AwmbLO7YTUCIXUBImKwgNxa/MxVcYRg6JB/MilANxJygMY8inFir9 ZhcXayRupQfz61atKHf2pxBLKfOYZ+Kb/KVbovaiwiD5HkVgXTskm5x6HMGx7jsuQOrc KTYfKhwkQ7SnLUL5CEtSD5kQgDOMz0MALVOPxzUWDFZu5jjRbwNmxAfZ4qbzPGMJZZT+ pmrA== X-Gm-Message-State: AOAM531qiY9PHHteQl8Nh6kLn1zbN/EtvS0ZcF1gUJNfq0Sf/nXKp9nr g3enKCKgmMVZQvG4py+8YW73WQ== X-Google-Smtp-Source: ABdhPJywyGKnqq1V2paxWnR8T4gDyaRPZAbgv7ZM88KcD65BYAgOubg2wGcIuvlSdR++OtUlPvntWw== X-Received: by 2002:a5d:5281:0:b0:20c:d5be:331c with SMTP id c1-20020a5d5281000000b0020cd5be331cmr46490408wrv.9.1653941699537; Mon, 30 May 2022 13:14:59 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id t1-20020adfe101000000b0020d110bc39esm9770401wrz.64.2022.05.30.13.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:14:58 -0700 (PDT) From: Fabien Parent To: matthias.bgg@gmail.com, ck.hu@mediatek.com, jitao.shi@mediatek.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabien Parent Subject: [PATCH 1/7] dt-bindings: display: mediatek: dpi: add power-domains property Date: Mon, 30 May 2022 22:14:30 +0200 Message-Id: <20220530201436.902505-1-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_131502_110469_DA7CD745 X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DPI is part of the display / multimedia block in MediaTek SoCs, and always have a power-domain (at least in the upstream device-trees). Add the power-domains property to the binding documentation. Signed-off-by: Fabien Parent --- .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml index 77ee1b923991..caf4c88708f4 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml @@ -57,6 +57,9 @@ properties: Output port node. This port should be connected to the input port of an attached HDMI or LVDS encoder chip. + power-domains: + maxItems: 1 + required: - compatible - reg @@ -64,6 +67,7 @@ required: - clocks - clock-names - port + - power-domains additionalProperties: false @@ -71,11 +75,13 @@ examples: - | #include #include + #include dpi0: dpi@1401d000 { compatible = "mediatek,mt8173-dpi"; reg = <0x1401d000 0x1000>; interrupts = ; + power-domains = <&spm MT8173_POWER_DOMAIN_MM>; clocks = <&mmsys CLK_MM_DPI_PIXEL>, <&mmsys CLK_MM_DPI_ENGINE>, <&apmixedsys CLK_APMIXED_TVDPLL>; From patchwork Mon May 30 20:14:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864925 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 1BA0FC433F5 for ; Mon, 30 May 2022 20:16:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=KsKUTSThtWlxVu6wyolfo9APvFPB7Eei1zT4LKodTCU=; b=U30l7+SI2y7rbF +HmJKVDOQnbLY4Ch8BQHlkf6I0zogXitCsa8yxzWPWZt1P8jRG72crZ4dNoNGs4WS6jOLPP1RCB3q 3jSQXo2bXwG2xk63kKdXJHY2CS01rf+xJ1QdqaQly146zCWKQh6HG6XB+DsoKGwCWNMytCeXIgK0h zwjPgKi7zcJo3sHe0fnwbIB1kBAX8A/ibJ9GpQFsJOM1wB7HVYue72pJtkTbPeOwHKR9gPDekUxHt BRFwZqBsIWhIrGenqYHl0+t8w7WF0A1ceCZ4iMzW5Xb8GLDRCFTGQL7DI8uj0VY0BUOfSXXD5VR1h ZLYBATp/EaI/wPi2Wuxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvlnJ-0089Ho-O2; Mon, 30 May 2022 20:15:17 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvln4-00899v-8H for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:15:05 +0000 Received: by mail-wr1-x42e.google.com with SMTP id e25so5386345wra.11 for ; Mon, 30 May 2022 13:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=68IUzThINQHS9c64e/2mypyGj3LqFegF7aUXUpeQSII=; b=u2d8p4QAEi3ctSajLm45PHcAdGNb4dc77i74TOisR6B9VoH4w4onMoONsDGc3+PD+H +CrhEa4dqWqz9Ox/kXTWVRT8E7CQbbf7aihiXS2nwKfsF7QdmyITkvGLWshI6CBe8T3o w+MZ3qyL9qilLXMp73nAWWB+Wf7+LKB0j1tLpB4aiA6DfeiwUpupRWzLyf2NdaFVwFhp 06XaOJrlzigu+lK98u0RqdZ4636R+6b0oGqiR/Rv9Wpdw2nS8VyJTiojxul5B+VTONR3 8g+oeqgqR/+0BrG0MjTMrWqf6A0PMwEMqEuRVaqq+3TNoBTalrcrKHPHGw0XGUawcdLW kgig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=68IUzThINQHS9c64e/2mypyGj3LqFegF7aUXUpeQSII=; b=ljiPN/B4yO0WCndsHilJM78Xk2PNPe784nDtmBX31IeP5Pls9O2nmfnxQEUnCA8OXd sD2n9ks6TDxtFgwi9/9aF1ACktiX+0TPNd/YrAS8Z42XJFIoMv4YKp/NjdNGgt3J9Inn IbDVX/J6hOX+wozc6FdwNeZW3TpwBjCNQH4prrwdU8RA6l9uNqF7iMFQqit7F4mYDrht OBwHQ2PkR/SNkywu3QhCCsSEuKOd6emhddWfWCPGKvwudA95ic4o2quVnZzMTY1KOjqU /L3h0VwZmLky2jdh1tw1Ju36FHQUhG08XdX2l3tOMN52edhMhc1soXFrxp0pFabW09PL 8jJg== X-Gm-Message-State: AOAM533GpFsToVbUwkrl/Xh52x/oYdjbLeYafm6V47bBNi94L14JFFkw 2RN3rcMsNxmFwuQy+zlLJQYwPA== X-Google-Smtp-Source: ABdhPJyV//TAUQKJXHBmXItC+7NmI594G8rIKaBMVmslTUXdIAFnw+TnofqHost0A6YrIMpMLuB/pw== X-Received: by 2002:a05:6000:2ab:b0:210:12ab:76e6 with SMTP id l11-20020a05600002ab00b0021012ab76e6mr17162232wry.120.1653941700978; Mon, 30 May 2022 13:15:00 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id t1-20020adfe101000000b0020d110bc39esm9770401wrz.64.2022.05.30.13.14.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:15:00 -0700 (PDT) From: Fabien Parent To: matthias.bgg@gmail.com, ck.hu@mediatek.com, jitao.shi@mediatek.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabien Parent Subject: [PATCH 2/7] dt-bindings: display: mediatek: dpi: add binding for MT8365 Date: Mon, 30 May 2022 22:14:31 +0200 Message-Id: <20220530201436.902505-2-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220530201436.902505-1-fparent@baylibre.com> References: <20220530201436.902505-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_131502_333394_187C6BDA X-CRM114-Status: GOOD ( 10.83 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DPI for MT8365 is compatible with MT8192 but requires an additional clock. Modify the documentation to requires this clock only on MT8365 SoCs. Signed-off-by: Fabien Parent --- .../display/mediatek/mediatek,dpi.yaml | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml index caf4c88708f4..c9c9f4d5ebe7 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml @@ -17,13 +17,18 @@ description: | properties: compatible: - enum: - - mediatek,mt2701-dpi - - mediatek,mt7623-dpi - - mediatek,mt8173-dpi - - mediatek,mt8183-dpi - - mediatek,mt8186-dpi - - mediatek,mt8192-dpi + oneOf: + - enum: + - mediatek,mt2701-dpi + - mediatek,mt7623-dpi + - mediatek,mt8173-dpi + - mediatek,mt8183-dpi + - mediatek,mt8186-dpi + - mediatek,mt8192-dpi + - items: + - enum: + - mediatek,mt8365-dpi + - const: mediatek,mt8192-dpi reg: maxItems: 1 @@ -32,16 +37,20 @@ properties: maxItems: 1 clocks: + minItems: 3 items: - description: Pixel Clock - description: Engine Clock - description: DPI PLL + - description: DPI Clock clock-names: + minItems: 3 items: - const: pixel - const: engine - const: pll + - const: dpi pinctrl-0: true pinctrl-1: true @@ -71,6 +80,27 @@ required: additionalProperties: false +allOf: + - if: + properties: + compatible: + contains: + const: mediatek,mt8365-dpi + + then: + properties: + clocks: + maxItems: 4 + clock-names: + maxItems: 4 + + else: + properties: + clocks: + maxItems: 3 + clock-names: + maxItems: 3 + examples: - | #include From patchwork Mon May 30 20:14:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864928 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 46724C433EF for ; Mon, 30 May 2022 20:17:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=JNfYBUQiJoFScOIefzDgiYA4AMt4UZ1Dy+W7qfqLx0I=; b=JkQ835rVDPfIo+ Od2YWTedNHe1dSdznVUhhtfk8eeEfWAsa0jPRVanaCWHt1z4iHuxSlFKVIot2kJzM9Ft3z92BmaY1 kEYo8B4OkGICEyYt+KLG2wvYriJ1F4qqdP/hlyOAMYcjEe1xaHvS+Knpp2hG4ZIMBCeRlPHuKv5Bq wfGuRVnfzWbjxi4cstI3g+2ZOXHSSFNxRODQu5F9ngepRs52Fc/Nz3U0TriuCC63NW+bK6XM59Zxb KeJ9RIovKeDp86lGrnQc+A07VZoSielw6eq+2/aMVxi0m0jrn3tIZ5S1W5QQrnXfijCK8nB5hb1mk +TGMYi3ranEIvs/TCssg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvlnh-0089S6-1w; Mon, 30 May 2022 20:15:41 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvln7-0089Aw-Jf for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:15:08 +0000 Received: by mail-wr1-x42c.google.com with SMTP id t6so16034051wra.4 for ; Mon, 30 May 2022 13:15:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x/Dp/zG0GUpVg5pylRpz2bBeewgylQW8uvOtIHZ+kQ4=; b=zlpOUy+1Wox7YTbXLaYC9kanMsm7CfiuU3NFzVSErocML+qCQqqmON+78BsSU/dqRX gyveAXELf6YPf4bA9OsUFOyvZPbRkcH00YF4h/Y3J+M+TqWyKgA0oRDRP24tzAs4ZPlD XusIO9vcyCtJPkTVsrkFfmFUCLFZ5gWPIOyRkRis6CxvND+s5geN/W0oQRsDrY0wtReu /rsnx4WHxnzzTUjXe5RpkOtg5vavCeh7kT+dVPJEm3nicPPEUkSg7tiZvadLj0AvKx9z wA+nBX6B6z4WiLN+ex3MrXDPJLyImxFFBIxbWuvTsMGSeUeg8JWeDcBiLTje/egA2Ydf RsNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x/Dp/zG0GUpVg5pylRpz2bBeewgylQW8uvOtIHZ+kQ4=; b=Sav0JZNpVRmqv1rgjNeXbDK222qlAmvCsQg6Qgb2wdXdsdDogfVFVIY1OQUsOLgu3S ax4+Z67erJrTv5E2s/U+Bd4ke54lfQOC4cwAZculelMc1C9GdBH+WBgPwbPzTryR+kf0 Go2AWau4Ru1DkKacbqWcmK8yBQVXAga+NwOaoMr2j4WMQFN1JetSb2BO2W0/rVYy32Ro ZGTWKFRGFIzXhGKUcgkGqK/cWWxixZTTr+CSED8zi3B4KfH9P9dl1WJyIgk4ZU4dwFwr RGBjZuD44E1i0FYVa6ib/G0gspmJXpPou7YMjZa4L5nE5YtiX7RuT+FCVV0gr1ProkNy 5ftg== X-Gm-Message-State: AOAM5334a6qCqLsRHAdJBfJ9C1zqamcqH3O6FuiSxXWF3gOVZeN8Oobp zbZWo/4RLvWehkJ+pPvLnTSFcg== X-Google-Smtp-Source: ABdhPJxkrVUg6pTK4pFvQWjJ1T9F9EWD/ezcY3p8Ii1GByIQAGMYQmy7kqTOhYXAiJ1eFSg67CETkg== X-Received: by 2002:adf:f1c3:0:b0:210:3532:eb with SMTP id z3-20020adff1c3000000b00210353200ebmr5244751wro.196.1653941702332; Mon, 30 May 2022 13:15:02 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id t1-20020adfe101000000b0020d110bc39esm9770401wrz.64.2022.05.30.13.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:15:01 -0700 (PDT) From: Fabien Parent To: matthias.bgg@gmail.com, ck.hu@mediatek.com, jitao.shi@mediatek.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabien Parent Subject: [PATCH 3/7] dt-bindings: display: mediatek: add bindings for MT8365 SoC Date: Mon, 30 May 2022 22:14:32 +0200 Message-Id: <20220530201436.902505-3-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220530201436.902505-1-fparent@baylibre.com> References: <20220530201436.902505-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_131505_737927_D5ECAB65 X-CRM114-Status: GOOD ( 12.41 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add MT8365 binding documentation for all the display components that are compatible with the compatible string from other SoCs. Signed-off-by: Fabien Parent Reviewed-by: CK Hu Reviewed-by: Matthias Brugger --- .../bindings/display/mediatek/mediatek,aal.yaml | 1 + .../display/mediatek/mediatek,ccorr.yaml | 1 + .../display/mediatek/mediatek,color.yaml | 1 + .../display/mediatek/mediatek,dither.yaml | 1 + .../bindings/display/mediatek/mediatek,dsi.yaml | 17 +++++++++++------ .../display/mediatek/mediatek,gamma.yaml | 1 + .../display/mediatek/mediatek,mutex.yaml | 1 + .../bindings/display/mediatek/mediatek,ovl.yaml | 1 + .../display/mediatek/mediatek,rdma.yaml | 1 + 9 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml index d4d585485e7b..d47bc72f09c0 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml @@ -33,6 +33,7 @@ properties: - mediatek,mt8186-disp-aal - mediatek,mt8192-disp-aal - mediatek,mt8195-disp-aal + - mediatek,mt8365-disp-aal - const: mediatek,mt8183-disp-aal reg: diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml index 63fb02014a56..fc999e614718 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml @@ -32,6 +32,7 @@ properties: - items: - enum: - mediatek,mt8186-disp-ccorr + - mediatek,mt8365-disp-ccorr - const: mediatek,mt8183-disp-ccorr reg: diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml index d2f89ee7996f..9d081da433e8 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml @@ -39,6 +39,7 @@ properties: - mediatek,mt8186-disp-color - mediatek,mt8192-disp-color - mediatek,mt8195-disp-color + - mediatek,mt8365-disp-color - const: mediatek,mt8173-disp-color reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dither.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dither.yaml index 8ad8187c02d1..a7706cd65675 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dither.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dither.yaml @@ -29,6 +29,7 @@ properties: - mediatek,mt8186-disp-dither - mediatek,mt8192-disp-dither - mediatek,mt8195-disp-dither + - mediatek,mt8365-disp-dither - const: mediatek,mt8183-disp-dither reg: diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml index fa5bdf28668a..d17ea215960c 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.yaml @@ -22,12 +22,17 @@ allOf: properties: compatible: - enum: - - mediatek,mt2701-dsi - - mediatek,mt7623-dsi - - mediatek,mt8167-dsi - - mediatek,mt8173-dsi - - mediatek,mt8183-dsi + oneOf: + - enum: + - mediatek,mt2701-dsi + - mediatek,mt7623-dsi + - mediatek,mt8167-dsi + - mediatek,mt8173-dsi + - mediatek,mt8183-dsi + - items: + - enum: + - mediatek,mt8365-dsi + - const: mediatek,mt8183-dsi reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml index a89ea0ea7542..f54859cfc97b 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml @@ -30,6 +30,7 @@ properties: - mediatek,mt8186-disp-gamma - mediatek,mt8192-disp-gamma - mediatek,mt8195-disp-gamma + - mediatek,mt8365-disp-gamma - const: mediatek,mt8183-disp-gamma reg: diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,mutex.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,mutex.yaml index 3fdad71210b4..f4a12dfae77b 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,mutex.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,mutex.yaml @@ -32,6 +32,7 @@ properties: - mediatek,mt8186-disp-mutex - mediatek,mt8192-disp-mutex - mediatek,mt8195-disp-mutex + - mediatek,mt8365-disp-mutex reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml index a2a27d0ca038..20e4ca4fc915 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml @@ -41,6 +41,7 @@ properties: - items: - enum: - mediatek,mt8186-disp-ovl + - mediatek,mt8365-disp-ovl - const: mediatek,mt8192-disp-ovl reg: diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml index 0882ae86e6c4..3bc914785976 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml @@ -40,6 +40,7 @@ properties: - enum: - mediatek,mt8186-disp-rdma - mediatek,mt8192-disp-rdma + - mediatek,mt8365-disp-rdma - const: mediatek,mt8183-disp-rdma reg: From patchwork Mon May 30 20:14:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864927 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 B8B2DC433F5 for ; Mon, 30 May 2022 20:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=QPyzWsLGImxsI/O/CBaG6cUUhR3y/lXCIVifD+NEp44=; b=Lix7PDSWc6pHxi XD+UbneIZCMBSYx/6ppH3wNDFuh4yMJwGk2c9PUhC8pvg0Lss0F5y1zhE6qtaij5icd1bIoUDTLab AbREnMT7hcv4+nbZHf0qFBcd5XVCn1gPGOP1v9Ies0o7HRGLM+uCW2E4LlPIx9ykHs2XhPJXtCaHn vH06JoEu88ie82yK5phUU+wVyUfxsiJJbJDPYxSQJCnkq7oxgX5rObho7pCIOoO6e+tOoeojxkp/z Sa7As44u2ea5ufgXmhVvomiT/2k3m4SsrDpVYJcM0QVbPf8Gvwc//GTlznYvJB0MX7sn0F12kwf/r coLz8j5gUgJapqMy+n8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvlnU-0089MW-HT; Mon, 30 May 2022 20:15:28 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvln7-0089BE-1B for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:15:06 +0000 Received: by mail-wr1-x42e.google.com with SMTP id k19so7832656wrd.8 for ; Mon, 30 May 2022 13:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tSb7UJsPw6fMK+gU6mTIYkwhoB6cAnQoeEgSTcX6/b8=; b=ueLCtT8HrcGEyzdRDJmnkTKVUsCJvfppcoiRujOdqjJ6m+mcEENWGPW1E1dQV8M9Q9 zA5C8YoLjTwZpAqaCXYpf75KEZLoxBV7kxjlL28SQBbWmWJrG8TnBXzL+Dk7FTuzNpF3 Kn09zUv7N9xWjsLZQhUMXjxLZ2dGpq87apiiLcA/g7EsoCS/sYD7ajo1O1/1vqdUugqr 9sO1ZPXTBwxSuv6CarfFQS8tFJ1G1m+0+RwDZdIIF0TRG+Kd8pEjXiqdKdza6zdtn4TG A5BXQY0WEPEjOre5d8ebOqo4QUISRsDGzzevA5fR9SXe5ai2Oo9w4RLguoDgyDujQ8cP Qhcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tSb7UJsPw6fMK+gU6mTIYkwhoB6cAnQoeEgSTcX6/b8=; b=Do9QIQvcejp2/xmnViZU6pxq0q1VOZoo2oVrU85m3bj+Fc4ixH+kuhmeTw0wPfBi83 oDowedCxId/79Q6xHDi5oR+yl+6HdBtCyGjeZ4wPJ6Z9jssJY4+hsB1qQmJn+dpelYdS wKHMuXPDY8BXsEBxfJqsKxX0vHhSlCK6xsjVcQalOoqBon4U8tLAiWyBcclvG61vjxQT IbLkwZ7LhvlxeMNPuOBDfSi/J9UnjvJj87lOKQ8k7W8y+h/sdMR3bOF0Q9D4BMpozp0t DA0qGLtLZCuK4zaspHfvki4Su8QfAWBHZMPBkbUVibIiiHhavnr7EbLz8gu7GFE2NJfS 5SdQ== X-Gm-Message-State: AOAM530DJ9xnqMBcgt0HqPvrGQNFJ8CDsuKD8mDw4FYmHLspAkVuzp1D FAQA1Nv4CHfg1eUCLwqnNKksXA== X-Google-Smtp-Source: ABdhPJwiSzKSg4qkJcPG/0zZ8t9Q6QeHPF/daPy2MXTaCiYXpMfO/YtIWydybS5kvNowbkqSfI9riA== X-Received: by 2002:a5d:648e:0:b0:210:18f6:f954 with SMTP id o14-20020a5d648e000000b0021018f6f954mr11230877wri.323.1653941703895; Mon, 30 May 2022 13:15:03 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id t1-20020adfe101000000b0020d110bc39esm9770401wrz.64.2022.05.30.13.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:15:03 -0700 (PDT) From: Fabien Parent To: matthias.bgg@gmail.com, ck.hu@mediatek.com, jitao.shi@mediatek.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabien Parent Subject: [PATCH 4/7] soc: mediatek: mutex: add MT8365 support Date: Mon, 30 May 2022 22:14:33 +0200 Message-Id: <20220530201436.902505-4-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220530201436.902505-1-fparent@baylibre.com> References: <20220530201436.902505-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_131505_121230_3CB605BB X-CRM114-Status: GOOD ( 12.41 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add mutex support for MT8365 SoC. Signed-off-by: Fabien Parent Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-mutex.c | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/soc/mediatek/mtk-mutex.c b/drivers/soc/mediatek/mtk-mutex.c index 981d56967e7a..b8d5c4a62542 100644 --- a/drivers/soc/mediatek/mtk-mutex.c +++ b/drivers/soc/mediatek/mtk-mutex.c @@ -110,6 +110,20 @@ #define MT8195_MUTEX_MOD_DISP_DP_INTF0 21 #define MT8195_MUTEX_MOD_DISP_PWM0 27 +#define MT8365_MUTEX_MOD_DISP_OVL0 7 +#define MT8365_MUTEX_MOD_DISP_OVL0_2L 8 +#define MT8365_MUTEX_MOD_DISP_RDMA0 9 +#define MT8365_MUTEX_MOD_DISP_RDMA1 10 +#define MT8365_MUTEX_MOD_DISP_WDMA0 11 +#define MT8365_MUTEX_MOD_DISP_COLOR0 12 +#define MT8365_MUTEX_MOD_DISP_CCORR 13 +#define MT8365_MUTEX_MOD_DISP_AAL 14 +#define MT8365_MUTEX_MOD_DISP_GAMMA 15 +#define MT8365_MUTEX_MOD_DISP_DITHER 16 +#define MT8365_MUTEX_MOD_DISP_DSI0 17 +#define MT8365_MUTEX_MOD_DISP_PWM0 20 +#define MT8365_MUTEX_MOD_DISP_DPI0 22 + #define MT2712_MUTEX_MOD_DISP_PWM2 10 #define MT2712_MUTEX_MOD_DISP_OVL0 11 #define MT2712_MUTEX_MOD_DISP_OVL1 12 @@ -315,6 +329,22 @@ static const unsigned int mt8195_mutex_mod[DDP_COMPONENT_ID_MAX] = { [DDP_COMPONENT_DP_INTF0] = MT8195_MUTEX_MOD_DISP_DP_INTF0, }; +static const unsigned int mt8365_mutex_mod[DDP_COMPONENT_ID_MAX] = { + [DDP_COMPONENT_AAL0] = MT8365_MUTEX_MOD_DISP_AAL, + [DDP_COMPONENT_CCORR] = MT8365_MUTEX_MOD_DISP_CCORR, + [DDP_COMPONENT_COLOR0] = MT8365_MUTEX_MOD_DISP_COLOR0, + [DDP_COMPONENT_DITHER] = MT8365_MUTEX_MOD_DISP_DITHER, + [DDP_COMPONENT_DPI0] = MT8365_MUTEX_MOD_DISP_DPI0, + [DDP_COMPONENT_DSI0] = MT8365_MUTEX_MOD_DISP_DSI0, + [DDP_COMPONENT_GAMMA] = MT8365_MUTEX_MOD_DISP_GAMMA, + [DDP_COMPONENT_OVL0] = MT8365_MUTEX_MOD_DISP_OVL0, + [DDP_COMPONENT_OVL_2L0] = MT8365_MUTEX_MOD_DISP_OVL0_2L, + [DDP_COMPONENT_PWM0] = MT8365_MUTEX_MOD_DISP_PWM0, + [DDP_COMPONENT_RDMA0] = MT8365_MUTEX_MOD_DISP_RDMA0, + [DDP_COMPONENT_RDMA1] = MT8365_MUTEX_MOD_DISP_RDMA1, + [DDP_COMPONENT_WDMA0] = MT8365_MUTEX_MOD_DISP_WDMA0, +}; + static const unsigned int mt2712_mutex_sof[DDP_MUTEX_SOF_MAX] = { [MUTEX_SOF_SINGLE_MODE] = MUTEX_SOF_SINGLE_MODE, [MUTEX_SOF_DSI0] = MUTEX_SOF_DSI0, @@ -423,6 +453,14 @@ static const struct mtk_mutex_data mt8195_mutex_driver_data = { .mutex_sof_reg = MT8183_MUTEX0_SOF0, }; +static const struct mtk_mutex_data mt8365_mutex_driver_data = { + .mutex_mod = mt8365_mutex_mod, + .mutex_sof = mt8183_mutex_sof, + .mutex_mod_reg = MT8183_MUTEX0_MOD0, + .mutex_sof_reg = MT8183_MUTEX0_SOF0, + .no_clk = true, +}; + struct mtk_mutex *mtk_mutex_get(struct device *dev) { struct mtk_mutex_ctx *mtx = dev_get_drvdata(dev); @@ -665,6 +703,8 @@ static const struct of_device_id mutex_driver_dt_match[] = { .data = &mt8192_mutex_driver_data}, { .compatible = "mediatek,mt8195-disp-mutex", .data = &mt8195_mutex_driver_data}, + { .compatible = "mediatek,mt8365-disp-mutex", + .data = &mt8365_mutex_driver_data}, {}, }; MODULE_DEVICE_TABLE(of, mutex_driver_dt_match); From patchwork Mon May 30 20:14:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864929 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 66007C433EF for ; Mon, 30 May 2022 20:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=svX3jYkATAEz/H6oZ/1simQ7W9imrckvouvi++Y+pOc=; b=db0hsq7KgPqUiu DlTYtCPVwn2YlIYtmUccWS5lMhOWwOvSpCXmI8J6ftL/RGLErEPJIXneU1xnxAGjm4Yt5qTHIiPBJ c/042JqMHzC7H8ztS4j9+zwUR2LvJ6wCKkUJdGmxOvO/wGQDmAClZounS9XSy7iMo56GiG+q4lHkg d0i2jQLhg3L8QRQRyI3JywXRWJfim08sqhE5yTHRYOqKTgU0o/2hHqgmY9a0XTNDmiWKBubUmC9q/ a53sUfhaGHwVELWmz01dhK+gEPL45OF5mE8iC9xJB27AVTfjxJPti4vw026grkUnbmkwnf7xrCwNk jkYDela+C8QGsPlzhB+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvlo1-0089aZ-3M; Mon, 30 May 2022 20:16:01 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvln8-00899v-7W for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:15:08 +0000 Received: by mail-wr1-x42e.google.com with SMTP id e25so5386345wra.11 for ; Mon, 30 May 2022 13:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dM1Miawze8sKsOoDP6eNmyD3lGqsAxM4OZW/CsiBCqQ=; b=DV2NtNINZimMJqxbhbxmkjmSZbFIXt24MmqWcuL8/ZvoThgLXtp65oYm46Qeakffzp 8YiwMlunn2bwit89barcdfiiBdM1VgK6D127PSqRqZPGniRfU8r4b2fPz4sDdo5G9y77 Kl3OQVuwTNBNkTr5qh/edlV6c4xN3cHk3LXZAqoB6py0WCQHzq5ovmoWOWF31g7x2Ntx r2DOWTOIsoO7MxsUbK5Bpu2HFOYlbuAdMIx7iyTj/RHJpvNIEwW+E6NxPl/2nCVgsBQC 2OjX2o7X8EMlkC0ZIOh+kdfCyv+s2p1+KbPalUDTcj0g2XgHloTLysG/DR4T1qKo37IF REog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dM1Miawze8sKsOoDP6eNmyD3lGqsAxM4OZW/CsiBCqQ=; b=a9ciqC3hGJvZDU0UsGYSpbXdj+w2VzZdGvwVGAamHlonQZUSDjfq/bbHJjP/Oa0Lll cJF8vTyuJ0H7nc4p6VY65WRGPABqcrhMVRHgD+Pp7eNKmRkQzk0eeUwHp8UDE0DW2I1i pvwpdgizEC9IWJFAEjDnSuzW2OvdgFKGfKtFm3sPz+RTm1PYDH0ZrOsUq2SKPVfP+FnR HXPqPZVr2NaDn+vMItPwxOuN82VZz5cN3fStfAxmzxI3DcbiydR3plJWvVLDQWGu9SAf NyjNBkx8ight0jUyqZ82bKWxP09+hgHbd/SyFcZ+4m+wsytdd1mJDhZcTeqooCrOtWIe mLWQ== X-Gm-Message-State: AOAM530gAjsLjTpjt+U3f85+n9wtY61eRusge+WAAFuHiT99CWxkalZH v00DEUQicA7yV8an96OrdfLoYg== X-Google-Smtp-Source: ABdhPJwSSjliAbJddGUfeFIGpLGf9IXHfVrDvhvqnHzFPZT6n2sJsLeNwQeWBnxlnJ7JxvHZVTrllw== X-Received: by 2002:a5d:6051:0:b0:20d:d49:26b8 with SMTP id j17-20020a5d6051000000b0020d0d4926b8mr45843588wrt.454.1653941705665; Mon, 30 May 2022 13:15:05 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id t1-20020adfe101000000b0020d110bc39esm9770401wrz.64.2022.05.30.13.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:15:04 -0700 (PDT) From: Fabien Parent To: matthias.bgg@gmail.com, ck.hu@mediatek.com, jitao.shi@mediatek.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabien Parent Subject: [PATCH 5/7] soc: mediatek: mt8365-mmsys: add DPI/HDMI display path Date: Mon, 30 May 2022 22:14:34 +0200 Message-Id: <20220530201436.902505-5-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220530201436.902505-1-fparent@baylibre.com> References: <20220530201436.902505-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_131506_339417_437FEB7F X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Right now only the DSI path connections are described in the mt8365 mmsys driver. The external path will be DPI/HDMI. This commit adds the connections for DPI/HDMI. Signed-off-by: Fabien Parent Reviewed-by: CK Hu --- drivers/soc/mediatek/mt8365-mmsys.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/soc/mediatek/mt8365-mmsys.h b/drivers/soc/mediatek/mt8365-mmsys.h index 24129a6c25f8..7abaf048d91e 100644 --- a/drivers/soc/mediatek/mt8365-mmsys.h +++ b/drivers/soc/mediatek/mt8365-mmsys.h @@ -10,6 +10,9 @@ #define MT8365_DISP_REG_CONFIG_DISP_RDMA0_RSZ0_SEL_IN 0xf60 #define MT8365_DISP_REG_CONFIG_DISP_COLOR0_SEL_IN 0xf64 #define MT8365_DISP_REG_CONFIG_DISP_DSI0_SEL_IN 0xf68 +#define MT8365_DISP_REG_CONFIG_DISP_RDMA1_SOUT_SEL 0xfd0 +#define MT8365_DISP_REG_CONFIG_DISP_DPI0_SEL_IN 0xfd8 +#define MT8365_DISP_REG_CONFIG_DISP_LVDS_SYS_CFG_00 0xfdc #define MT8365_RDMA0_SOUT_COLOR0 0x1 #define MT8365_DITHER_MOUT_EN_DSI0 0x1 @@ -18,6 +21,10 @@ #define MT8365_RDMA0_RSZ0_SEL_IN_RDMA0 0x0 #define MT8365_DISP_COLOR_SEL_IN_COLOR0 0x0 #define MT8365_OVL0_MOUT_PATH0_SEL BIT(0) +#define MT8365_RDMA1_SOUT_DPI0 0x1 +#define MT8365_DPI0_SEL_IN_RDMA1 0x0 +#define MT8365_LVDS_SYS_CFG_00_SEL_LVDS_PXL_CLK 0x1 +#define MT8365_DPI0_SEL_IN_RDMA1 0x0 static const struct mtk_mmsys_routes mt8365_mmsys_routing_table[] = { { @@ -55,6 +62,21 @@ static const struct mtk_mmsys_routes mt8365_mmsys_routing_table[] = { MT8365_DISP_REG_CONFIG_DISP_RDMA0_RSZ0_SEL_IN, MT8365_RDMA0_RSZ0_SEL_IN_RDMA0, MT8365_RDMA0_RSZ0_SEL_IN_RDMA0 }, + { + DDP_COMPONENT_RDMA1, DDP_COMPONENT_DPI0, + MT8365_DISP_REG_CONFIG_DISP_LVDS_SYS_CFG_00, + MT8365_LVDS_SYS_CFG_00_SEL_LVDS_PXL_CLK, MT8365_LVDS_SYS_CFG_00_SEL_LVDS_PXL_CLK + }, + { + DDP_COMPONENT_RDMA1, DDP_COMPONENT_DPI0, + MT8365_DISP_REG_CONFIG_DISP_DPI0_SEL_IN, + MT8365_DPI0_SEL_IN_RDMA1, MT8365_DPI0_SEL_IN_RDMA1 + }, + { + DDP_COMPONENT_RDMA1, DDP_COMPONENT_DPI0, + MT8365_DISP_REG_CONFIG_DISP_RDMA1_SOUT_SEL, + MT8365_RDMA1_SOUT_DPI0, MT8365_RDMA1_SOUT_DPI0 + }, }; #endif /* __SOC_MEDIATEK_MT8365_MMSYS_H */ From patchwork Mon May 30 20:14:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864937 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 4BB78C433EF for ; Mon, 30 May 2022 20:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=hnHKPSfF1vjRM/gsXvWGjVx9/JmVqxlnK6djphAfH8Y=; b=UDPiAyr8Yyg4uM Fy37J2d38MwLCJShDfjoS9I9aFazUvZEVSSOZONrNe6MyaFpcAT8ODHRwBd5K1hoC3jf2ye4HbiXL 887VdZZasnSNX4ysM1fHISzN3dn8TJBu5IxxmB1xOO8DlbjU6DUWk8CZ7qJ/tpPiP+PbqMWxud+hC QJLWOgtIFTbLhP5MsR1XhvYxuUsNixBd3N9jn/h6NDEh6FVsQ9mAfSWCwOhNjE23G84iSey41DN4z yQB8pDK+rb9hsgnOA2NOZL2Eyc/sYMxDk5Gk/qS6xBg5hsAkQvJppD2nUQTdtLaHjrZDiSLQG1dZR wbaHxfbG4fo+FpCDkAfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvloZ-0089s1-Pw; Mon, 30 May 2022 20:16:35 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvlnB-0089D5-Va for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:15:12 +0000 Received: by mail-wr1-x435.google.com with SMTP id d26so10410311wrb.13 for ; Mon, 30 May 2022 13:15:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PD07AGQSISBrBm8fI0Y+y6jJGPbS9zphsEozNpxvp5c=; b=MIjCVNm9g03WUwxU5l29QvEepUh5wgB7oQF4k3VLWcYaS9VXU+YwiZFLHJ3xuT1eSW nfeoWSQ3Cx/AgyV8zGDKSNUGXjId6MJxju4d+uaToMm2lBCqtTOldeSKsdYeocKgPt6D dZVvQ6Mxp5sMfcruCnIxWupF/gPGMBjsDRzn+lCvvIw+tg8dBT2+NAXfkzpUjRX5sUUC E257NMxeK8YUQWugfDhCqwmO8DVnL/8cDLQ5sC+LTETOKTR4CIsFg/KT7pRcoFc2YrS2 VMvs2eDy8Ql5unLyZ1AdVLM32fevHoEod0supyC5nJJeKF7FJokoujZTL4357QG7MrNL IKew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PD07AGQSISBrBm8fI0Y+y6jJGPbS9zphsEozNpxvp5c=; b=znvkzcb33thpuKHFdgSIXg66JuvpFMbnkOgTdRyoJM3fl4hmEAPbQSSPUi4LiIwgL6 eXng5z3ZSHxS7wHnBGh+buWYn90+HfHZL81IPU1z5jzWnucn8C2FvHh/dKu4l8EI066K rBnFmwByoVX6oQYFaeDz8/2c7WZJhBk6Rp0+QMv/WuaL+5Aqh/z09UWSNwrOXbH5Yvjs dKJQSvjWj7o+X1wBE2iK7jFR7YVw33x9pxYW6+InVM6iBtkDeFvD/iCYnKy3C/nUXVws iZEO3w/lTBXHVayS5JYYxswu9g6h0JdtpsD3nkHxWAIsklPi9dR0tSyPzi+NT5jra8z/ yQWw== X-Gm-Message-State: AOAM531AtWJ3+yBI4PsZXwMuTp/oBMvK9Nkpn9bqqN9nusDh0cPvhvAi lvmyAwJTin2r+i+VdCsdyvlo3ThM1q5ZIg== X-Google-Smtp-Source: ABdhPJzABVtC2tkCZEtAl4IfibZ4A1woYgNYxWWP2/bB92DTuTd5TnPRpW2iy1sQkdfWlmVR0yHj5Q== X-Received: by 2002:a05:6000:15c7:b0:210:472:e0e8 with SMTP id y7-20020a05600015c700b002100472e0e8mr20637968wry.365.1653941706961; Mon, 30 May 2022 13:15:06 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id t1-20020adfe101000000b0020d110bc39esm9770401wrz.64.2022.05.30.13.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:15:06 -0700 (PDT) From: Fabien Parent To: matthias.bgg@gmail.com, ck.hu@mediatek.com, jitao.shi@mediatek.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabien Parent Subject: [PATCH 6/7] drm/mediatek: dpi: add support for dpi clock Date: Mon, 30 May 2022 22:14:35 +0200 Message-Id: <20220530201436.902505-6-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220530201436.902505-1-fparent@baylibre.com> References: <20220530201436.902505-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_131510_106459_FEB443DF X-CRM114-Status: GOOD ( 16.60 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org MT8365 requires an additional clock for DPI. Add support for that additional clock. Signed-off-by: Fabien Parent --- drivers/gpu/drm/mediatek/mtk_dpi.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index e61cd67b978f..7872db60840e 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -72,6 +72,7 @@ struct mtk_dpi { struct device *dev; struct clk *engine_clk; struct clk *pixel_clk; + struct clk *dpi_clk; struct clk *tvd_clk; int irq; struct drm_display_mode mode; @@ -412,6 +413,7 @@ static void mtk_dpi_power_off(struct mtk_dpi *dpi) mtk_dpi_disable(dpi); clk_disable_unprepare(dpi->pixel_clk); clk_disable_unprepare(dpi->engine_clk); + clk_disable_unprepare(dpi->dpi_clk); } static int mtk_dpi_power_on(struct mtk_dpi *dpi) @@ -421,10 +423,16 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi) if (++dpi->refcount != 1) return 0; + ret = clk_prepare_enable(dpi->dpi_clk); + if (ret) { + dev_err(dpi->dev, "failed to enable dpi clock: %d\n", ret); + goto err_refcount; + } + ret = clk_prepare_enable(dpi->engine_clk); if (ret) { dev_err(dpi->dev, "Failed to enable engine clock: %d\n", ret); - goto err_refcount; + goto err_engine; } ret = clk_prepare_enable(dpi->pixel_clk); @@ -441,6 +449,8 @@ static int mtk_dpi_power_on(struct mtk_dpi *dpi) err_pixel: clk_disable_unprepare(dpi->engine_clk); +err_engine: + clk_disable_unprepare(dpi->dpi_clk); err_refcount: dpi->refcount--; return ret; @@ -893,6 +903,12 @@ static int mtk_dpi_probe(struct platform_device *pdev) return ret; } + dpi->dpi_clk = devm_clk_get_optional(dev, "dpi"); + if (IS_ERR(dpi->dpi_clk)) { + return dev_err_probe(dev, ret, "Failed to get dpi clock: %pe\n", + dpi->dpi_clk); + } + dpi->irq = platform_get_irq(pdev, 0); if (dpi->irq <= 0) return -EINVAL; From patchwork Mon May 30 20:14:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12864938 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 2B2D6C433EF for ; Mon, 30 May 2022 20:18:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=lUW0nctBlpXc4wsBtZraN0t8lle8dJxlio3jxMeqGBM=; b=I1X0CapyO7ndxB WQvBNJNH76m7gyQcF7L93bTHGeRSJPj3/qdj5SYGiIWJRdlztBR2FRK/H6EqPJDzZ5qtE4Yk5EQx1 xLFuMLD7VZOPuqzzJuWAKXEJ0oK0hd7xUtTHUV30zXSwl4oofzueQv0+iawvL6fZJsILcdyBFj1va 5Ya+bTvhxQZvaK9o5I74FD9ZKB+VloG5ceen1CPhRGqiQ8UCHbJuPqqhC1mZzC/S436MGd+cNiUIf XWJdf2kk3Gm7+fluAcOUo/bpVvagDnJ6v61MnGRrz9R7d/4GRalgDxNcKmQ6K1MW0fECg+22wqyTv pyjZTsTJryH6K9PDugaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvlov-008A7G-6p; Mon, 30 May 2022 20:16:57 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvlnA-00899q-Sc for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 20:15:12 +0000 Received: by mail-wr1-x42e.google.com with SMTP id t13so16011024wrg.9 for ; Mon, 30 May 2022 13:15:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OCqq60cIFpi0W5rW/stTGkbaV47iCHB38Vu44v/Je2Q=; b=r9ZERXT93z+iXWs30IEZqxm8a2ISlpmrexl1aU/BnE/7kGjjGr4YcPWE9vj9KVytZ7 EXMDYWAv+Kzl5tX1Aefpo97MFGU4puqLGykM6pMvQiY+UBANlF5C/hjRyUXDjZJPi35S pw6uKMSt97KH4ttpx561Glm9iCRqlqrtr5Ja8WNAQgDyGwrsZUvKkQla5T9nmkLTFrlO 5BxSh/2BNI9W+uwzbAxP9YA6YaA3Zm+uQ0cR4s7lFmZ83zmQ4DNvR1UaqcgvfJnva4Ad 22PeNE2w+HQ7GT1F5dustciKNtdPrgQ9Y3aZm1eFQRrcwVyPCH1QEoOZkS/BH5qibec0 IROA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OCqq60cIFpi0W5rW/stTGkbaV47iCHB38Vu44v/Je2Q=; b=udyc/4Rja54+pZ/1JbBEQj4TZJv++psvS4CZ+YUZ5bn9aOyjOmhfQH5hPxWGjlMViO Zdz++34Tuso8L3PLxWibgsidNrQCv+GtPeh7AvzbIbi+JXEPyMowmUpZPYE/Bt6zYfE8 ynmWo5PtC11vmHe9/dFzOlt0qIEKdsyl9EuTY7nIrZIQOzZEIoqG3YxMrkQH3r2bkSYf Es9yZ7sOJmZbsodekVrXNTdNsyPYX2Q1F788GZVtpOI0p8q6OXbbMsCKeOm5OfNbyVom Vx+2Nhjb6zeD2MEyQ3EezeshzsfV1LJwRC9z8Gv4dxShxhqv3ir1tsb9Q0qrmiG2mzPW E//w== X-Gm-Message-State: AOAM530oIAoOdGi+PFavbgbLS69fDxFALsk3T1VoIL7NfSCrIXP1c3FG 9unv8tcexJ71arReHd+yFiNDzQ== X-Google-Smtp-Source: ABdhPJzjkNI9SKbyu+IPKMI7hdxzFtaOw5Wr2qt8pXhyFiGleK1poevdfJ72z/Y8dOnIezY6TauObw== X-Received: by 2002:a05:6000:1611:b0:210:28cc:65dd with SMTP id u17-20020a056000161100b0021028cc65ddmr10243171wrb.700.1653941708426; Mon, 30 May 2022 13:15:08 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id t1-20020adfe101000000b0020d110bc39esm9770401wrz.64.2022.05.30.13.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 13:15:07 -0700 (PDT) From: Fabien Parent To: matthias.bgg@gmail.com, ck.hu@mediatek.com, jitao.shi@mediatek.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabien Parent Subject: [PATCH 7/7] drm/mediatek: add MT8365 SoC support Date: Mon, 30 May 2022 22:14:36 +0200 Message-Id: <20220530201436.902505-7-fparent@baylibre.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220530201436.902505-1-fparent@baylibre.com> References: <20220530201436.902505-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_131508_966548_0F7501F3 X-CRM114-Status: GOOD ( 12.62 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add DRM support for MT8365 SoC. Signed-off-by: Fabien Parent Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 6abe6bcacbdc..0a30ec75b1e2 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -195,6 +195,22 @@ static const enum mtk_ddp_comp_id mt8192_mtk_ddp_ext[] = { DDP_COMPONENT_DPI0, }; +static const enum mtk_ddp_comp_id mt8365_mtk_ddp_main[] = { + DDP_COMPONENT_OVL0, + DDP_COMPONENT_RDMA0, + DDP_COMPONENT_COLOR0, + DDP_COMPONENT_CCORR, + DDP_COMPONENT_AAL0, + DDP_COMPONENT_GAMMA, + DDP_COMPONENT_DITHER, + DDP_COMPONENT_DSI0, +}; + +static const enum mtk_ddp_comp_id mt8365_mtk_ddp_ext[] = { + DDP_COMPONENT_RDMA1, + DDP_COMPONENT_DPI0, +}; + static const struct mtk_mmsys_driver_data mt2701_mmsys_driver_data = { .main_path = mt2701_mtk_ddp_main, .main_len = ARRAY_SIZE(mt2701_mtk_ddp_main), @@ -253,6 +269,13 @@ static const struct mtk_mmsys_driver_data mt8192_mmsys_driver_data = { .ext_len = ARRAY_SIZE(mt8192_mtk_ddp_ext), }; +static const struct mtk_mmsys_driver_data mt8365_mmsys_driver_data = { + .main_path = mt8365_mtk_ddp_main, + .main_len = ARRAY_SIZE(mt8365_mtk_ddp_main), + .ext_path = mt8365_mtk_ddp_ext, + .ext_len = ARRAY_SIZE(mt8365_mtk_ddp_ext), +}; + static int mtk_drm_kms_init(struct drm_device *drm) { struct mtk_drm_private *private = drm->dev_private; @@ -490,6 +513,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = { .data = (void *)MTK_DISP_MUTEX }, { .compatible = "mediatek,mt8192-disp-mutex", .data = (void *)MTK_DISP_MUTEX }, + { .compatible = "mediatek,mt8365-disp-mutex", + .data = (void *)MTK_DISP_MUTEX }, { .compatible = "mediatek,mt8173-disp-od", .data = (void *)MTK_DISP_OD }, { .compatible = "mediatek,mt2701-disp-ovl", @@ -564,6 +589,8 @@ static const struct of_device_id mtk_drm_of_ids[] = { .data = &mt8186_mmsys_driver_data}, { .compatible = "mediatek,mt8192-mmsys", .data = &mt8192_mmsys_driver_data}, + { .compatible = "mediatek,mt8365-mmsys", + .data = &mt8365_mmsys_driver_data}, { } }; MODULE_DEVICE_TABLE(of, mtk_drm_of_ids);