From patchwork Thu Apr 18 14:17:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13634889 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 AC676C4345F for ; Thu, 18 Apr 2024 14:19:39 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uzwzXD40B2/BCuInDETTWNg87n1Rh9OT9e5rdRho1O8=; b=m3kX/1yXfIvt/R GFu4jTQ9aD7mDbARp17T7oykXxVbr4AeGVeQ27VFPFVvE21/EN0nD/awvvKt1UfiWV2pr/StZ814i AW8NV30N7Tn4dEtxbSTWx27/KqXgVn4PFAFAg8s6UstWZZOnQN+ipJAgl3R329PLwbRkMP62Df1lf tUkxKlRT3bMI452egR12ZLYNoojFfRw8YZ5mcaepcS1AX6HfBLJ+VofcQ8oEboB0qOSGlQrgf9mIn 9AsHErHcQzmJnSz37uv9CX0E+SlazdonkM3//RtdRSj+oRNmtcw1m5KwrSmwyeltcceaRMYzXYeQn iwAq2ZfX8dDK2SIiuFoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxSbm-00000002Zqm-248y; Thu, 18 Apr 2024 14:19:26 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxSaD-00000002Yt3-3VL3 for linux-arm-kernel@bombadil.infradead.org; Thu, 18 Apr 2024 14:17:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=BKnhFSmX8zSOSVxyc9nDkp/gYNXTQ5M2zgPpBqUyXTg=; b=qOmCh5pgunfyjU/yETYkesRNmM tyABBIpmmraNPuZTpeETs6ADMrecgcCMz4KLYR9fyEHFAyi5zqcGqphIZTul8vLUQU5JUNzZqkyDE hKondAjN/ugo4Stox7C+yHCsrOnBYunXRXj/QKJipWcvsB8GY0h9OVeJoQOKYcP4C+ffI8uBPTDZr mQJigGd5pb+mIf2TWCBHpJoiM/I4yEU2Bb32dkRhD/9jNP+pucQsiM+UVjGBVixloGdRsHlKeB+1G p7HytYcb2wCgbykiHLg3ySe2dBk5bi4lHfr9dM0Ldrdrp/Gg7qmUeTqx5OI5jDf6kBFiYpGyE4hCU +o/ikILw==; Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxSa2-0000000C2Aq-1Be2 for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2024 14:17:48 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-418dde387a3so7063565e9.0 for ; Thu, 18 Apr 2024 07:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1713449856; x=1714054656; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BKnhFSmX8zSOSVxyc9nDkp/gYNXTQ5M2zgPpBqUyXTg=; b=TegvqeENVoKUyCSDD5a27p9URXoK9C+ci8hA3YhmIfkTMsJbffhXD0kOwnvNCj9lbI /Incl6zbtXuAn0N656rmQLSU+ruf72t+uML3eUhY403S+DyuzfaoRtTIAYtY3XTAYRDd CF4sk7N0rXiMSJzxzMJBKpnvhdRn5yoqRB12OuejBC6KyX0nvN0aza7s45l3aTqa6xms daiBrPfE7sKVHPxxkjIClWINoY8SzkD7h0dKIqVqj9GxLHwRmqGQUhMpuyWdLmazfVS9 nl9NKk92mleYU2WMLlggZd8HtZPspgPc7DCOQvTgyE630jl0VFrIgJtA4dYk1Lgj03Dr Sk0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713449856; x=1714054656; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BKnhFSmX8zSOSVxyc9nDkp/gYNXTQ5M2zgPpBqUyXTg=; b=YEhAmJGsXEE4IZkzXpObwjNPdoFNidJqzGe7b9q3OHlQohw1I4iPSaVJtmQpW+KW6H Gd+0vdw2KUD5A6Xs5I5zJbyqeejobtokIOUvxPXuOqwX40RU7YjKVbwbCR/fPtLhO0BG hWS2S84d4DSnZwH0hf6snElMVRNcnw/fckc1zgUfgGTRJzY4XSajrONUHDHkqbcyiL52 7jXolNZ73V7UDQKhwW8H5pyRsCUkWLuRPEyaJ4lgsS7d6RpZXodnMH3QVIjT3kbFUl43 G0XC3z3VM3W+O+6SV+WM85v0UoSPgW7TzrdFptFglgVjVoYUSoc1jcASb4isUk49iZjj TvMw== X-Forwarded-Encrypted: i=1; AJvYcCVrhjAQs+pisTdBuudPf9rVrTxlHas01oxaY7rWe06Efg+QJU8fHmxzUCv+zd63YgOYzcpfVNqyLuNHbjD+L8RadB8xGHi7N50w4cF9iyaRRSvT/mg= X-Gm-Message-State: AOJu0YyfN5FuzJuC40aH7eJbfVFSDtE+1QQRYeYimgt0G1Z7aBCFCcJS lIu7MGMqDsBrcLsM3lCLOHNLctSX1eV9TGWpSgLD9ZwzKaEiMdlBkBfNXfN0N0c= X-Google-Smtp-Source: AGHT+IHV6YC7NiCV8wvsPwyJwjBjjFxowgPmgZfERu3x6iWLoTi9PZue++xGzmyJpfGKLQL/ABBBIw== X-Received: by 2002:a05:600c:3b27:b0:418:a7a7:98f8 with SMTP id m39-20020a05600c3b2700b00418a7a798f8mr2547667wms.29.1713449856103; Thu, 18 Apr 2024 07:17:36 -0700 (PDT) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id i9-20020a05600c354900b004180c6a26b4sm6267510wmq.1.2024.04.18.07.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:17:35 -0700 (PDT) From: Alexandre Mergnat Date: Thu, 18 Apr 2024 16:17:04 +0200 Subject: [PATCH v3 16/17] arm64: dts: mediatek: add display blocks support for the MT8365 SoC MIME-Version: 1.0 Message-Id: <20231023-display-support-v3-16-53388f3ed34b@baylibre.com> References: <20231023-display-support-v3-0-53388f3ed34b@baylibre.com> In-Reply-To: <20231023-display-support-v3-0-53388f3ed34b@baylibre.com> To: Chun-Kuang Hu , Philipp Zabel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Jitao Shi , CK Hu , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Michael Turquette , Stephen Boyd , Fabien Parent , Markus Schneider-Pargmann , Catalin Marinas , Will Deacon Cc: 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, linux-pwm@vger.kernel.org, linux-clk@vger.kernel.org, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6863; i=amergnat@baylibre.com; h=from:subject:message-id; bh=WWkNfvm63b8mfbdUkjQECD7o+l4Hcro7XXjY2cPobPM=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBmIStjHZhIa3fY5nxorBC0R3lpzo6CCzKyGQm7MXb2 Bk0bklGJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZiErYwAKCRArRkmdfjHURXrDEA CHSpmGb4lHyRMDF2zf3UxtaZp7opzlLezB3PtVoL3AHHGLUsdQPIsXtmkGdw5Z1vWoKCYUvwRdvpib TIw6xMuunM5ZvPi/Esn4gR8giEmd2khCCS5VrTo/UgbN+cVEiblK+CbnV8+RvenHaMCUOoSFK6KTo7 h5pcvuuMx8Hsdverr6bLh9MSYPpK7BOMFam0AJ4goQ9s5VXzGWlpFPWigBgro62f0Y7+5UmISZcVOC cyeKvqiDzGzxE4WOliscb4aWDHmsj69N+TlpojvskSYbkthZOq6NbqfneE2w2ri0XZO9/V4nUubu7H E1Q51YVP0Un6MRInc9/RelQ7ukhlrc1Bt1/24EmKHfX9w0rrKDI+iIKVsiPwELDHpwHDELu+M/Abmu 5LjEsME6SaXuVMhQaq0QOuyPYcmXZYy7mk+gfTCFLxCtYKHQMFCfyGFQwzSXPcnSvvpiKOa1RL6HH7 aN16Z9/+93DKCrPMQZEs+Xm3fLI1LzCch7R/1micwdOEaNhwJ/sBtJsqQXavvVYAd1yo2un28Jprro 1Bo/LQ1i9EeQlztlxqNpOhZhulB0kVfWOVTKu4K7RNeOhmB0VqpFOWmnsBsOP3pgVjFJVZOroys+jI nlSigI7Y9lZhHWZnkv0GeeXq5ojEUZtIPYLm0ZHHo+ay/GfOvL8afNHgLlcg== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240418_151738_553972_C8337970 X-CRM114-Status: GOOD ( 12.96 ) 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 aliases for each display components to help display drivers. - Add the Display Pulse Width Modulation (DISP_PWM) to provide PWM signals for the LED driver of mobile LCM. - Add the MIPI Display Serial Interface (DSI) PHY support. (up to 4-lane output) - Add the display mutex support. - Add the following display component support: - OVL0 (Overlay) - RDMA0 (Data Path Read DMA) - Color0 - CCorr0 (Color Correction) - AAL0 (Adaptive Ambient Light) - GAMMA0 - Dither0 - DSI0 (Display Serial Interface) - RDMA1 (Data Path Read DMA) - DPI0 (Display Parallel Interface) Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 133 +++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index 24581f7410aa..d34519a33c90 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -17,6 +18,19 @@ / { #address-cells = <2>; #size-cells = <2>; + aliases { + aal0 = &aal0; + ccorr0 = &ccorr0; + color0 = &color0; + dither0 = &dither0; + dpi0 = &dpi0; + dsi0 = &dsi0; + gamma0 = &gamma0; + ovl0 = &ovl0; + rdma0 = &rdma0; + rdma1 = &rdma1; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -607,6 +621,15 @@ spi: spi@1100a000 { status = "disabled"; }; + disp_pwm: pwm@1100e000 { + compatible = "mediatek,mt8365-disp-pwm", "mediatek,mt8183-disp-pwm"; + reg = <0 0x1100e000 0 0x1000>; + clock-names = "main", "mm"; + clocks = <&topckgen CLK_TOP_DISP_PWM_SEL>, <&infracfg CLK_IFR_DISP_PWM>; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + #pwm-cells = <2>; + }; + i2c3: i2c@1100f000 { compatible = "mediatek,mt8365-i2c", "mediatek,mt8168-i2c"; reg = <0 0x1100f000 0 0xa0>, <0 0x11000200 0 0x80>; @@ -703,6 +726,15 @@ ethernet: ethernet@112a0000 { status = "disabled"; }; + mipi_tx0: dsi-phy@11c00000 { + compatible = "mediatek,mt8365-mipi-tx", "mediatek,mt8183-mipi-tx"; + reg = <0 0x11c00000 0 0x800>; + clock-output-names = "mipi_tx0_pll"; + clocks = <&clk26m>; + #clock-cells = <0>; + #phy-cells = <0>; + }; + u3phy: t-phy@11cc0000 { compatible = "mediatek,mt8365-tphy", "mediatek,generic-tphy-v2"; #address-cells = <1>; @@ -732,6 +764,13 @@ mmsys: syscon@14000000 { #clock-cells = <1>; }; + mutex: mutex@14001000 { + compatible = "mediatek,mt8365-disp-mutex"; + reg = <0 0x14001000 0 0x1000>; + interrupts = ; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + smi_common: smi@14002000 { compatible = "mediatek,mt8365-smi-common"; reg = <0 0x14002000 0 0x1000>; @@ -755,6 +794,100 @@ larb0: larb@14003000 { mediatek,larb-id = <0>; }; + ovl0: ovl@1400b000 { + compatible = "mediatek,mt8365-disp-ovl", "mediatek,mt8192-disp-ovl"; + reg = <0 0x1400b000 0 0x1000>; + clocks = <&mmsys CLK_MM_MM_DISP_OVL0>; + interrupts = ; + iommus = <&iommu M4U_PORT_DISP_OVL0>; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + + rdma0: rdma@1400d000 { + compatible = "mediatek,mt8365-disp-rdma", "mediatek,mt8183-disp-rdma"; + reg = <0 0x1400d000 0 0x1000>; + clocks = <&mmsys CLK_MM_MM_DISP_RDMA0>; + interrupts = ; + iommus = <&iommu M4U_PORT_DISP_RDMA0>; + mediatek,rdma-fifo-size = <5120>; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + + color0: color@1400f000 { + compatible = "mediatek,mt8365-disp-color", "mediatek,mt8173-disp-color"; + reg = <0 0x1400f000 0 0x1000>; + clocks = <&mmsys CLK_MM_MM_DISP_COLOR0>; + interrupts = ; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + + ccorr0: ccorr@14010000 { + compatible = "mediatek,mt8365-disp-ccorr", "mediatek,mt8183-disp-ccorr"; + reg = <0 0x14010000 0 0x1000>; + clocks = <&mmsys CLK_MM_MM_DISP_CCORR0>; + interrupts = ; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + + aal0: aal@14011000 { + compatible = "mediatek,mt8365-disp-aal", "mediatek,mt8183-disp-aal"; + reg = <0 0x14011000 0 0x1000>; + clocks = <&mmsys CLK_MM_MM_DISP_AAL0>; + interrupts = ; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + + gamma0: gamma@14012000 { + compatible = "mediatek,mt8365-disp-gamma", "mediatek,mt8183-disp-gamma"; + reg = <0 0x14012000 0 0x1000>; + clocks = <&mmsys CLK_MM_MM_DISP_GAMMA0>; + interrupts = ; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + + dither0: dither@14013000 { + compatible = "mediatek,mt8365-disp-dither", "mediatek,mt8183-disp-dither"; + reg = <0 0x14013000 0 0x1000>; + clocks = <&mmsys CLK_MM_MM_DISP_DITHER0>; + interrupts = ; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + + dsi0: dsi@14014000 { + compatible = "mediatek,mt8365-dsi", "mediatek,mt8183-dsi"; + reg = <0 0x14014000 0 0x1000>; + clock-names = "engine", "digital", "hs"; + clocks = <&mmsys CLK_MM_MM_DSI0>, + <&mmsys CLK_MM_DSI0_DIG_DSI>, + <&mipi_tx0>; + interrupts = ; + phy-names = "dphy"; + phys = <&mipi_tx0>; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + + rdma1: rdma@14016000 { + compatible = "mediatek,mt8365-disp-rdma", "mediatek,mt8183-disp-rdma"; + reg = <0 0x14016000 0 0x1000>; + clocks = <&mmsys CLK_MM_MM_DISP_RDMA1>; + interrupts = ; + iommus = <&iommu M4U_PORT_DISP_RDMA1>; + mediatek,rdma-fifo-size = <2048>; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + }; + + dpi0: dpi@14018000 { + compatible = "mediatek,mt8365-dpi", "mediatek,mt8192-dpi"; + reg = <0 0x14018000 0 0x1000>; + clocks = <&mmsys CLK_MM_DPI0_DPI0>, + <&mmsys CLK_MM_MM_DPI0>, + <&apmixedsys CLK_APMIXED_LVDSPLL>; + clock-names = "pixel", "engine", "pll"; + interrupts = ; + power-domains = <&spm MT8365_POWER_DOMAIN_MM>; + status = "disabled"; + }; + camsys: syscon@15000000 { compatible = "mediatek,mt8365-imgsys", "syscon"; reg = <0 0x15000000 0 0x1000>;