From patchwork Fri Jan 10 13:31:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13934657 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 A2FADE77188 for ; Fri, 10 Jan 2025 13:32:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F37610E4FF; Fri, 10 Jan 2025 13:32:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="QhwcpCXB"; dkim-atps=neutral Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id DB08610E4FF for ; Fri, 10 Jan 2025 13:32:23 +0000 (UTC) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-38a8b35e168so1310755f8f.1 for ; Fri, 10 Jan 2025 05:32:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1736515882; x=1737120682; darn=lists.freedesktop.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=/CRkSXWyXf0xsAqoBIGl0gizy0vMiUiEuhlip5XNNFI=; b=QhwcpCXB5FCIScVUDGrZIzmd5Xwx9wjTgYtKE7z9mj+4A522uECokzvt8UM7YL9FbZ f0LBeBrsGcDOsTVaTuEIi22xnWjTcIGVPnCFYVAPQEQct4U+jRyaliEnZL0m2nEjGcjt Bx3UVoU+bHKzZWpV6RSuQN23lndl7spkQF31uBy4gDSUovsH+8mBNo6U4rUzzBw2ATf+ W4z30joVrORIN2H0et50u3/bptSViyzvcHyoJW19+cNVtu3laeNHsl9jxBMF6mAcUKyK FSdpIpDhga01Flw7MgyMiyp7MOgpuz4b2y2+o9eH/gbl4p6f9daxeVlbrdSYSuuj2tap 0GXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736515882; x=1737120682; 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=/CRkSXWyXf0xsAqoBIGl0gizy0vMiUiEuhlip5XNNFI=; b=J+/4E12pe3P8p4UspTQwCjpjpRvYVI/9v4T972p+NggEl8He5leQ7H3877ZWaO/wPB dCzmaE0UM/f59+sxiWG72eE5IQ0/O/Q6TR551FDNGFfEgKzWZF+htjPHfebL/GIcV2Mg 22EJUgDm/2M8ne8Ipbj7NpIfSBZgPPIUZoX1UJZGyQE5DCb/pqCw3aCq4X14Llv6AhAk ZE9r9x/IysU2L8g/IFhq6u805hyaDhLA6zxVfykludDS9EfGLQ6mLKCLr8gh38UAa5v5 w2T4VfTsMbkGPVKOhjhFdHOWXWjXb3q0nMur6ZlRc7veC/4f6jS17/ZzwdMbaFAn3bjB 3I/Q== X-Gm-Message-State: AOJu0YzMuVIGaCqRfpq3S8Gzs/jzFvzf3qylu5GCcxoHvOLiFrJsrioo 4BG5A996ZpV2G99b+HuLk0RCtOY9lZBVEieyi+9p6EIzw41/q9zNz7wm7lzTh+o= X-Gm-Gg: ASbGncte0gXnsn9RdrNu3Gzy/xb2DQ8H+uavtTQ0/sKP24lIC8nW3trUvMyRVsLo1O9 e04U6GSf7YSws/ItejcXQdQAkFEoUZvM9+R3XvCWli8rCUF1MIb2cCDF0xoHb8F+gFDP3cRkm/e DgRFcBRcFzh5/0YM0bXMqUVvLld0zZJTOfckr3iFGuHNe7FtZoIpMeKymRFlckdGt/X2fUeTwuK QNMrIF35Tjez09aDKrpxy2MGhLOZobJooTaJ5DyshkaxcD1qOSfITRlf/lG X-Google-Smtp-Source: AGHT+IEeT/k14BcIEcdwF/8jsOntipWrqikOfy+83Y1jOalU/MN+akEWeVXNGmRe7c17qKDi731Pvg== X-Received: by 2002:a05:6000:410a:b0:385:e8e7:d09a with SMTP id ffacd0b85a97d-38a8b0c71cbmr6605006f8f.2.1736515882478; Fri, 10 Jan 2025 05:31:22 -0800 (PST) Received: from [127.0.1.1] ([2a01:e0a:5ee:79d0:2555:edac:4d05:947d]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-38a8e38c990sm4598193f8f.56.2025.01.10.05.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 05:31:21 -0800 (PST) From: amergnat@baylibre.com Date: Fri, 10 Jan 2025 14:31:11 +0100 Subject: [PATCH v7 1/6] dt-bindings: display: mediatek: dpi: add power-domains example MIME-Version: 1.0 Message-Id: <20231023-display-support-v7-1-6703f3e26831@baylibre.com> References: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> In-Reply-To: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> To: Chun-Kuang Hu , Philipp Zabel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Jitao Shi , CK Hu , Catalin Marinas , Will Deacon , Simona Vetter , Simona Vetter 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, Alexandre Mergnat , Fabien Parent X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1612; i=amergnat@baylibre.com; h=from:subject:message-id; bh=1JKrAs8ef9/G6ny5cfhuHd3DFIbQFHxMMv9wBH5/HqA=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBngSEneE6zOf8vEEwrluvT4BlZNUmmzfnh8+dgMnkc OKzALE+JAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZ4EhJwAKCRArRkmdfjHURYjpEA DGf6hGHBkuj/S8FHNwSNHu+zjuNgTJivuTPoZm6K2uGhF9lAzwXa43mbbEEJya8ShfFWrU/m3v9KHP 1Dzgk9DJTlOO1lvgkRv+N6DK8ptMx1C6Aef4kKpP6+dBg5x3dP5J4zL//RyEIZODOEq8GpIRXZMHxn HcNdOkYOM65h8eFd/qcfkRbgOH8zSSUUhdoaqPedu3H0TreyDnOD7i8q7k4SIOYYnnXsjxSiPqh3RE FPmcXUYg2ui411JC5xLGwyK/ui6RIx0/KpfKiH/ZJeT1SvepMvt4bme6wiqZDJjLKFYqkH6SRX5QDP FkMuLf2eqqkjko8WqYCdK2peo26/J/hwDlpMuokN9uJbQ3WR2zIxYjHy5xiexOtkqAjtxeXdJLlJUB FAhBmKw6sLzd/9K/D4r1sCSi4FcGfN7VSvIaL51H44UPdMl0etiRaMmMr+8upGdIF/KW1F+d+CAEbi eLKoW0d2PUIV2IeBfqXMEnZA+6J1jLZBLdsNdMvUmSoOhyB7utbOF9r7axjT8szg47IsXC6vB+4n8B md1my3Uh1z/civLxqDjHZblMSbEhyNglYKeXBleWsc2Dxqs2/dMiWkAslxuxoFbOxq3xPY2yICClKB 32h3cbGNzGnVEne9TVLq23Z5N0xPqsYSqBDfnDJv+PV0Ihw8CS0a2PEsuYIg== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Fabien Parent 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 example. Fixes: 9273cf7d3942 ("dt-bindings: display: mediatek: convert the dpi bindings to yaml") Signed-off-by: Fabien Parent Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring (Arm) Reviewed-by: CK Hu Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml index 0f1e556dc8ef..d5ee52ea479b 100644 --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml @@ -116,11 +116,13 @@ examples: - | #include #include + #include dpi: 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 Fri Jan 10 13:31:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13934653 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 CF9B6E7719D for ; Fri, 10 Jan 2025 13:31:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 580D710E505; Fri, 10 Jan 2025 13:31:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="SxXElUdz"; dkim-atps=neutral Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by gabe.freedesktop.org (Postfix) with ESMTPS id 282EE10F0CC for ; Fri, 10 Jan 2025 13:31:25 +0000 (UTC) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-436637e8c8dso22242925e9.1 for ; Fri, 10 Jan 2025 05:31:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1736515884; x=1737120684; darn=lists.freedesktop.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=fy/DbTIkkOlFt9RUb5dJSds3N2C+4xTIp3gr3Wl8Gls=; b=SxXElUdzQiz76l4Ru0mgwz/WxaeaoknugqI3vVFH1YNvTuwWI4rsiX2TkT3hpQhI58 GObNi4ZpdOhbux2K0jWENjol/SUHMarcHa5c7Z40lzm8yNt53pd3LKBzvfXrp7xCKFzR Zb4No6+e/+4gpL+toMizLfPaAVHaLdeGV0/8AVuS+loLUBR2CzpI0bwtnL3nmkwAHhUG 1WhI03pgE9Pn03xRQk/IbGkRvc1pHVR5sw6n0SvYaiEjj8kmXyQMnSVcCG4BNAp1ap0l 0YekRZSs02dcNTYUmbzyG2hBDQ97UTsxLlQR8zt1rrZYDZb04C6WHtyzGBg2s5G/lYIB S81A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736515884; x=1737120684; 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=fy/DbTIkkOlFt9RUb5dJSds3N2C+4xTIp3gr3Wl8Gls=; b=FLRI86SpC5hjl2B9Ke9Tgp/Y/B1BTBDWdZKNi5QHwSmHfXlGFowrs2ISaXSQj+XrIb t4TLDn+xApfTJlDw+5TYdlDaJAzUH87YzlYm03me4isuaDKd5klA3mDeLcP8Y7t9iGOW wvUengLhRWBfUUNqwKCQMwuEQb0hwzsZ/M6fE16Gmw6TbE4uJ1u3Z0Vcea7tYmD6NDH9 6xeBYv6eJqTokMDntip4Jb1vTZRoplmxSBuOybFIBdFZKvb8rVz65TcJ1uubW3vbAAPA tSWyak+oNcHlReqNYsHL/3T4vMPpmXSHvSlUaxd5njUCm1o+4VI7GGzsMyGKG1DDFrEf IPMQ== X-Gm-Message-State: AOJu0YyB34dUSySrB987AIqY7p9kN2FisOTyu6FTpM2BLGPa3jqq3meu T5u34qHntYnXCti42rFnierrLCgYPr7eEXjJhafvObijm6Got1WgHGkkySTkpRI= X-Gm-Gg: ASbGncvC1ZVmm9ubgtIDz710j+yj/7S5ZASZgJIXX6t9tCXkQttyqXuBkkwIAzT98JG iVrxOwG9iKjAoH+cv5oKpkrjf2vyRvS7drKxB2JnyaWNTNV9ejNHarmsMPfhuJ1icuP8XmCUIFd DZrsd93tlgL7AmRkKK4DNKL5tVi9XqCHImZLHE5r2YSXrTmrTO8g+JuSGurj8QHjbAWwQyKTjJk Iqc2zgwF1TEWuM2KRnMGiqafaGD0VfMFxH2N1asu1VOKlTf/hKlVRETQE9D X-Google-Smtp-Source: AGHT+IHKxpgNUmOUdkrc6PQxJw1G0Fu/KYCSSNNFr/GjW9WVuFsnr7/fR3quCBLX5bmiMLZjyBIZ4Q== X-Received: by 2002:a5d:6c6e:0:b0:388:c61d:43e0 with SMTP id ffacd0b85a97d-38a8733b9e8mr10763857f8f.48.1736515883672; Fri, 10 Jan 2025 05:31:23 -0800 (PST) Received: from [127.0.1.1] ([2a01:e0a:5ee:79d0:2555:edac:4d05:947d]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-38a8e38c990sm4598193f8f.56.2025.01.10.05.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 05:31:23 -0800 (PST) From: Alexandre Mergnat Date: Fri, 10 Jan 2025 14:31:12 +0100 Subject: [PATCH v7 2/6] drm/mediatek: dsi: Improves the DSI lane setup robustness MIME-Version: 1.0 Message-Id: <20231023-display-support-v7-2-6703f3e26831@baylibre.com> References: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> In-Reply-To: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> To: Chun-Kuang Hu , Philipp Zabel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Jitao Shi , CK Hu , Catalin Marinas , Will Deacon , Simona Vetter , Simona Vetter 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, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1234; i=amergnat@baylibre.com; h=from:subject:message-id; bh=Yn0yDiaGCUYQbX+kBDNWi7Wqy2+4x3TU5RubErw6Doo=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBngSEn2Qf8+H9Mmsv7OXpjVxiPUD7Yjb1fkvT0Ur9q aV5CbwSJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZ4EhJwAKCRArRkmdfjHURTGKD/ 9Ty+ydloEEvoD/Kmij1B/CcQVBe6jSd5+V7KY6pP8cX3F8EGZ5DuX1JRDTw7n6qr0v8t5hMj3vnD4y 3kcOdro29k0f3zDbIKnPaldi4Xooy7mth7N+AIF1rG5vrhs5ZwSXy274aJnNwjbi7F79VQtY/ED8BK JMCyF9De60OQ05V2aA48pVLy+YKkoTMB1fGsR6iAmSINWJN1X92qBuivVZpp0sWhjFdllJnA8EGdOB zeRPjNyx0Jn5zrNjYnHseUpuZ8JbV9nWc1zccvD4gVGxDasxqANpeJ6v7srfMCEwDX2lMGQNFqD+V0 ZVV5PnpcIMWPEmo8Fck7WktUnlvHLppVhOl9ZRJ7J5kRzjvt2n/EvBzUojg2t79aKfTJYm5GDHc9lY dWUW6TSq8QSfjkim0hcDojluxIR6FFUsBBYOzXqvptNZr4r6+P2ebaPBNEZBW3T59Z7+AezTXsmLl2 e3HorWswN5WkZpMRCxFb9n2o9eYtwQs5vTRsS/8hVwnwSpM6d19kGVflYfRjoD9dsS3mhncHZzuDXm aSQEe+FxnEU0BZDAdK9ISk1MmLJHWsiJt6V9Ugiv0vEh54yST3DsiO+1pgpS4KQ+yI92tRmf929/4y 8Ylibc+sqUSryOVik5cnV84QM5Y3QZ9+THVZUDG1vFs6e5bdZDV80jGHCO8Q== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Currently, mtk_dsi_lane_ready (which setup the DSI lane) is triggered before mtk_dsi_poweron. lanes_ready flag toggle to true during mtk_dsi_lane_ready function, and the DSI module is set up during mtk_dsi_poweron. Later, during panel driver init, mtk_dsi_lane_ready is triggered but does nothing because lanes are considered ready. Unfortunately, when the panel driver try to communicate, the DSI returns a timeout. The solution found here is to put lanes_ready flag to false after the DSI module setup into mtk_dsi_poweron to init the DSI lanes after the power / setup of the DSI module. Signed-off-by: Alexandre Mergnat --- drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index e61b9bc68e9a..dcf0d93881b5 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -724,6 +724,8 @@ static int mtk_dsi_poweron(struct mtk_dsi *dsi) mtk_dsi_config_vdo_timing(dsi); mtk_dsi_set_interrupt_enable(dsi); + dsi->lanes_ready = false; + return 0; err_disable_engine_clk: clk_disable_unprepare(dsi->engine_clk); From patchwork Fri Jan 10 13:31:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13934654 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 85699E77188 for ; Fri, 10 Jan 2025 13:31:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8EB810F0BB; Fri, 10 Jan 2025 13:31:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="3He8OYJq"; dkim-atps=neutral Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9576410E505 for ; Fri, 10 Jan 2025 13:31:26 +0000 (UTC) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43618283d48so15599095e9.1 for ; Fri, 10 Jan 2025 05:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1736515885; x=1737120685; darn=lists.freedesktop.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=Z//BQnV3/BLX4Mqa0cv4eDxMczGWbcxFqozmONQlohE=; b=3He8OYJqksydy99VHxK1/ZB2Jmuuy0C9f8u4KzUzuQMlOdmtqkm8fo8HODj6VCMb4i IyXhuqjaGBAvZZd9RzdxseRxkC4iQd/+/FegZCnlJ/v66/tPPIFWM/1/mfG9zsleDWdt 0OWAFO9meXWsCXQ01AEwLxBjGznEdv7mR13twioPlPl4WyfNz98HRN/HlJHFasgLYgsL HDRuZ8B74J/SD6PluElPh4BBigzr8s2v9uWWA9rx8tucaRuiWnS/XwrtTeMK4O/X0XRd 6lEJIvy0sFoszEpL8s8jbtsy0E4HgqjDmg1ZbR4zhI7ZQL/Mx4pxGL0dG6evLPiTlyy2 dbbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736515885; x=1737120685; 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=Z//BQnV3/BLX4Mqa0cv4eDxMczGWbcxFqozmONQlohE=; b=sT9Ut5Y/gvDgR5FtV4ez7nudJ3EFJQVNSem+RKQfw8lFz7So8QyNtC5G7GgOpG9K+e 02gESLEQJt1NXdw8xx/dNMBqrQvVSOKd3bEIUCxyToO4xcO7hlzgUUW+W5ks0L5UltHw ALaoX1UagoC5j48zb4LmA6HhF+Ue0GLp8amMKLEpL/c2+IivIoizw1h6CjoZ2Iw3/OSR 22QY56Hd8nTtZp9UX/T5f3yYeCNmzAC14uxKC8Qh+2RchEG8vnjFJsduW52RlKIfGD7P 7dxRCbOylCGgvUoT0puaAJCDwuF4F1n1uhVtlxNSjb1GM/SaRy9hRgTcON01MVdfkaJE iRIw== X-Gm-Message-State: AOJu0YyOoJJrCBTDU7c8DvQA4EoAm7BjfmepyE/CGJY0EvN4wubU5irs vOKmgZ/omTGCIMYakp/juQZMxJewxB/9utbwBav5u+y7OXJk3hmCN9019XClhQQ= X-Gm-Gg: ASbGncsS4uedle6j79Njz6b0S2XnuNq+cnN/cL/SBbhKQWTg7dRTaGD3XC2+lB8kOkA DTkaJ9jSuUsfEDi+Vx9a7GqoXkjRfsBjf5u7cUCoMJTxobk8el3UT6eLzS4v/dtEuwCx9NzeLlh JUVn1BUkUxDrKufKnXifPT9IQ+5n4V2+7ucYTuIxjez9Vt1yQV+8sG8od/XR4PzkKL1u7qO04GY XPlrWZd67xYCRNqAdX6DYcX59DWm1d2PjC/i+ws/P0xN9Jd/TEL3NSEEJJp X-Google-Smtp-Source: AGHT+IFx2GC2yPIa0jo0uLSF3wUAfCDb+jHxkY/Jz5/qgDxr5WT9ZW2q5ZSeDjEs2iELnpyG7PPdYw== X-Received: by 2002:a5d:64ad:0:b0:385:e67d:9e0 with SMTP id ffacd0b85a97d-38a8730d521mr9053765f8f.29.1736515885138; Fri, 10 Jan 2025 05:31:25 -0800 (PST) Received: from [127.0.1.1] ([2a01:e0a:5ee:79d0:2555:edac:4d05:947d]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-38a8e38c990sm4598193f8f.56.2025.01.10.05.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 05:31:24 -0800 (PST) From: amergnat@baylibre.com Date: Fri, 10 Jan 2025 14:31:13 +0100 Subject: [PATCH v7 3/6] drm/mediatek: add MT8365 SoC support MIME-Version: 1.0 Message-Id: <20231023-display-support-v7-3-6703f3e26831@baylibre.com> References: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> In-Reply-To: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> To: Chun-Kuang Hu , Philipp Zabel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Jitao Shi , CK Hu , Catalin Marinas , Will Deacon , Simona Vetter , Simona Vetter 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, Alexandre Mergnat , Fabien Parent X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1705; i=amergnat@baylibre.com; h=from:subject:message-id; bh=wfidoNqLEIpqSK6RG2PAlzWtAyJfTIKDPdldVFKf2ag=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBngSEn6dIUV44F8BjerVW+RaDvB4bQEz+FY+SuSLdC zThnaqCJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZ4EhJwAKCRArRkmdfjHURR7ND/ 9QHUK4fkSZ0JuFIq8kAo9pXcFTRKLN5YRBM6U51ybQaouZrB7uPYUqkPmuHlzNymD7+e1nPAhsjsVA fa2fNmQiGduEJhPZZJVQWDOfwizbo7Blgzat5TE946k6xnyscmUl/86A0IcU0T2CaqDN+64RIXbeOh tVe4RUUzBFDtrxcOiNUkPTYW6ZeM5t4fyx/Yl+aLItJrrTBsmyne18s3duvddS/5eF/XysLTuDedLN JmTG/tFPeUsnaZZkNrkKNvmtvc3bqKKDt+pfcVBsxVlNxcBnw7lSw2L9IHZ1J+So44qRXKJyYitGsP epvfvPsHkswsK5VO+hr/K5kHczfxohSGIukWZSJ75GqYqKSM4jDUZWAKo/vQAWfuWG+F206/Jda+wi +Gx2TrbfaX2VSSGVtXJc3Va/GDFWFcxA1k3CRdfMklYYmhMLT98eLpSYxY6xT/zXWFHXFSOHtttUkX b8vIYKwbVIPi+AO6YUFa5pbFPGeM6z2As/FwyE82JReMRPZpCiVwqro5fZYs8RIZbSYAwZBxMlajcI 9oZln4Ep0IanTgFreC5xAChZmTxAT07/WJ+Q589eASkEAsPACxQDYDC2vZkUnsYt9Sd6pROxh9P8xf RxXuegHE62J2LoezUNJ+7KLyzCwJ1wKDwgFcfeY6c2pPfREbqG+DhICutwKA== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Fabien Parent Add DRM support for MT8365 SoC. Signed-off-by: Fabien Parent Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 0829ceb9967c..5471ef744cc1 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -328,6 +328,10 @@ static const struct mtk_mmsys_driver_data mt8195_vdosys1_driver_data = { .min_height = 1, }; +static const struct mtk_mmsys_driver_data mt8365_mmsys_driver_data = { + .mmsys_dev_num = 1, +}; + static const struct of_device_id mtk_drm_of_ids[] = { { .compatible = "mediatek,mt2701-mmsys", .data = &mt2701_mmsys_driver_data}, @@ -355,6 +359,8 @@ static const struct of_device_id mtk_drm_of_ids[] = { .data = &mt8195_vdosys0_driver_data}, { .compatible = "mediatek,mt8195-vdosys1", .data = &mt8195_vdosys1_driver_data}, + { .compatible = "mediatek,mt8365-mmsys", + .data = &mt8365_mmsys_driver_data}, { } }; MODULE_DEVICE_TABLE(of, mtk_drm_of_ids); @@ -751,6 +757,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = { .data = (void *)MTK_DISP_MUTEX }, { .compatible = "mediatek,mt8195-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", From patchwork Fri Jan 10 13:31:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13934658 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 091ECE7719C for ; Fri, 10 Jan 2025 13:32:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75C6C10F0CD; Fri, 10 Jan 2025 13:32:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="zwV/I9Jq"; dkim-atps=neutral Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id B801A10F0B8 for ; Fri, 10 Jan 2025 13:32:27 +0000 (UTC) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-388cae9eb9fso1117917f8f.3 for ; Fri, 10 Jan 2025 05:32:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1736515886; x=1737120686; darn=lists.freedesktop.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=czQovKHFJiawW3q43/tzxcBianm24ydViBCbQnMA+dM=; b=zwV/I9JqiYA7aJGFAWpgJ17KkFO6Z8xiaINRJIgIdLAIZXgfZMMHy0qO/gBbIETVRg x+YIKaVLZ1SyMvSoR4ts9VOee0SANO2bQJfH9KqQHRRlacw0X4gDlHW/BdhtD8wpHZWa E8ETCP+I7zIRedTdksUN5m5ojanBFRLHV9KRPZGatJuFuSChZG4lFWApoTBHHkuQl+pT 6mTycpKjKoDD1xack2jjnjw1lVpdG5y9OiRDPIODU7AYyqOhJF0nCHazDPFFSJzsOaJ0 e/wQ2hs3S6NG7UqYzJrw5hdk4Yb8bAl0LLrhYPgdgTe4UNZgvt/8J2mUu0uShGp9TQvu 0sbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736515886; x=1737120686; 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=czQovKHFJiawW3q43/tzxcBianm24ydViBCbQnMA+dM=; b=vJdcQq833F8hCh1ReNxfrdtoHvJMQGXMAdEPy2sUrzs3drKuCYwmJuVsEj9h51ek4L TFBFT2YlqpLV5TKiqBwRogGd1OUvUpJkQiEI5fQcTytMwdbefZAlTDU+lJf3pJ75G6DH kjTfUy04tGSWDIhsTtKSEH5UC3+rnXO05kN/P5QAms+rP8pxi2JfJT0GTwLeIFQLs3Xr cCoa7GPl3KVX5QMpc8wrG0h5ykb2TQxQM+c73mDgIio0w33CmCasMd8cyrXf0y2gsw3+ Pa5xyUZNfUBsqZEUDOHD3iXaJx2V8Jag7PmvwNthxk83Hp922Jri9v73KVikhSXXq2lZ TfKQ== X-Gm-Message-State: AOJu0YwC526qwkJHNgazHJ6TsaY6DFicrsX5s94uP8WJcJTnySMjZtEy GuXoJwnj9OkfzkLWGQTD9wih0VRKAD3BS8JSbr00mHn5HHjr8HhG9V5uHL7Svwg= X-Gm-Gg: ASbGncvMzcv5f44ZsEofdRBzfynRKfnD616k9DG67p3Kkx84CrKAMOEmK/Y01186zJC i+649XF1JpFYoTsi0YJUSnPKrCfcjwvLDzWr2d3zEecISid+9sI7At3Y4lZa81hwgvdfNiY/gML 1kZoPRAWdNqUm7R6YEsAx0ZQxeSNXuQnwIqFkzsqhRzrxeK5P8MV9ruZrpz9tFTEOo1KhBDkLAL 4FTHsIxLEdYT/ZRYD+tM4MTsv83Tiea2XAJewx/W4WwhbhyjCKuMInDxTot X-Google-Smtp-Source: AGHT+IGPagTUjFwrYYmmjtjuTfXbN2bDVAsHyXfD27cOpCNW2lmXYAioeDkCa1NDyoNEQON0v8I1+w== X-Received: by 2002:a05:6000:710:b0:385:f4db:e33b with SMTP id ffacd0b85a97d-38a872db2c7mr10663137f8f.21.1736515886322; Fri, 10 Jan 2025 05:31:26 -0800 (PST) Received: from [127.0.1.1] ([2a01:e0a:5ee:79d0:2555:edac:4d05:947d]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-38a8e38c990sm4598193f8f.56.2025.01.10.05.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 05:31:25 -0800 (PST) From: Alexandre Mergnat Date: Fri, 10 Jan 2025 14:31:14 +0100 Subject: [PATCH v7 4/6] arm64: defconfig: enable display support for mt8365-evk MIME-Version: 1.0 Message-Id: <20231023-display-support-v7-4-6703f3e26831@baylibre.com> References: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> In-Reply-To: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> To: Chun-Kuang Hu , Philipp Zabel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Jitao Shi , CK Hu , Catalin Marinas , Will Deacon , Simona Vetter , Simona Vetter 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, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1025; i=amergnat@baylibre.com; h=from:subject:message-id; bh=/FrM5Q7dkW2P/a4wYWyi5MUyL8Mql8ICFVAZt1ovMlM=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBngSEnoSo2eM6ojRqCmld2hpFcaxilavl+I21EUqLr Kup6t+SJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZ4EhJwAKCRArRkmdfjHURQB7D/ 9A/L91PiiGu2rK2SMP9XGcogr6oaqx6UZaDXrDKetU5D8kgdn7C2qhIjPzekgzy5B8ZbekLxqmm7YW PMw7IdT778IA30r2Dv3xkkjoe0EZZ39x+QTxTLbhd4xFSQLL08xnf2BExPVCJMrVBA0gI0zjNxw0dB UvzNve5p8WDSB3b8EYX7Tcx2r4tnFWRhlv5uaGziE2vIyxMAEVAzO/jwryBD4w9IoU4GIHp2w5rmsd i8l+fwpJp+rvhZUIrm86OU282/J5plCcuCG9NdxJjwAf73Q4m5qAhyz3JQtrFWEsv9/a3FY5FjFgLG Kp/dJXr4rspqMnXVGnIc+9yfRR6JdtGODsq9d80FoqkPQ8HQ+Qz8bbaHAg63EOTIFx4KX2nAdXqQSJ H3POeEMfpRMigfsIDX0mKw3KJzpRVdfwYKk8zOiKvjsIGq+c9HBXz8mQmq92oPyHH17wBN3EFKfTN9 Q7x5bPl88hrGjH927T7r6sPCPckmUgZ+oooJjucg3R3CbiEClThzYPsswxpict7DcNfnzz0sXGG6wr wNIw7x1GPN2cVka5ughYRn4aARpjw1XAlAmKyGN2rQK7ToCTkoNYzW2VBzi22tLfe+hyreHgTB+9MS ThR/RoVxRpcIOa3VzZ5G2cb4Fur8bl/CNAQT5uJ0J0LAczK9D9jTqY/jMpjQ== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Enable the DRM HDMI connector support and the MIPI-DSI display Startek KD070FHFID015 panel to have HDMI and DSI display working on the mt8365-evk board. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat Reviewed-by: Krzysztof Kozlowski --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index c62831e61586..1e2963a13500 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -897,9 +897,11 @@ CONFIG_DRM_PANEL_NOVATEK_NT36672E=m CONFIG_DRM_PANEL_RAYDIUM_RM67191=m CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20=m CONFIG_DRM_PANEL_SITRONIX_ST7703=m +CONFIG_DRM_PANEL_STARTEK_KD070FHFID015=m CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m CONFIG_DRM_PANEL_VISIONOX_VTDR6130=m CONFIG_DRM_FSL_LDB=m +CONFIG_DRM_DISPLAY_CONNECTOR=m CONFIG_DRM_LONTIUM_LT8912B=m CONFIG_DRM_LONTIUM_LT9611=m CONFIG_DRM_LONTIUM_LT9611UXC=m From patchwork Fri Jan 10 13:31:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13934655 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 F31DFE7719D for ; Fri, 10 Jan 2025 13:31:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DEC410F0C1; Fri, 10 Jan 2025 13:31:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="HBvKxWKO"; dkim-atps=neutral Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 48B1310F0C1 for ; Fri, 10 Jan 2025 13:31:29 +0000 (UTC) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-38633b5dbcfso2077367f8f.2 for ; Fri, 10 Jan 2025 05:31:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1736515888; x=1737120688; darn=lists.freedesktop.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=+0vdEZ4/pRHsUp9cm8HEUVp7ajHvoJqZ5Fn7zAfqqbs=; b=HBvKxWKOD6h9X4gz8u8crRAFJsOrM8NsrgFIE6eO5aPqVlRGPzYrmI2TArvyz7QM/1 8wbLpj63kEyukJ/QfXM2NzJGyAUJ8JHzVR6MvtHb0GQ7I+L4DaLTm8Rsnfb8K74xgOl3 DzursBkjQjUs/GGGUQVFBb2z8V2LQsXiyO/hZGDGuj0Ejf1oh/n/o5F8chMYKpSyPupv J11LKnZSq9XEJ96aCO+/aze1wQxWbUXyESgDjRxRoRjhJfhK0iK+mOECN9VCXFZB6Ly+ RScSRcd8pcQWQf9yaD4oGxHlqEL/fISuSYjXB7L20r0BCS3RU1fZvWWyeiwpL4OvFLZt SzDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736515888; x=1737120688; 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=+0vdEZ4/pRHsUp9cm8HEUVp7ajHvoJqZ5Fn7zAfqqbs=; b=tanj/0xW5e86VHIg7zVFPZjAW2gFq/A8FM+XLelSC3vCBzT52njrOrLgNHmMXKC1VX wxZ2DDAOJWXyvPkh8m7EaSmqsoCxsqwcdx8Bimpy+lsPX0HAFHuYKQa+M+D+tgNJufuS aih+AEGw6Dcdv2nWN/5FZsjXaTQKdFSK7WjYnPSCOyw0tUUrjvGR7LgCDJNzpdQbDLpY XDs6kiyT8wfrUA0ZUolQCbGwewzHJWbjV8aYZs6DObZAbgycxCRFBBEgsG2Q7aJq3Coj UFuMqGnnBmnyMYI1cwGV3fplEHHJsnROhLfpqxDhU13SPyGSOxaeFKZUkBvxbKuu7l5q PIvQ== X-Gm-Message-State: AOJu0YwMR+SEyNnC5VqhTfNaTp7dXmUiFAex7QjZ6X39ug+iZmSGZzPD ivQZNSAjsGL+6OtZYO2pEjyKtjNOYX3XIecumBCLSLYnUYVhOnm92UDD6PRANcs= X-Gm-Gg: ASbGnctt9VIxcoUtp8ex23nZObi7npWvUoM336pfwCcoXC+yGXB7ggaa02f9nVrwvLf ATTvSA4VfSQamNcoujXJnj6wDK7AQFon9sN7ISOU7cYpolZdXoZnXvmtMAWK0PYqfQ+qzdsQG5+ e958R47CiL9s7aj427HaVF0ajsaxbutxCJBzMwpzQo6MMiKtSlNLC6zn/mKQNb2rJjXiaLtTMb6 04NDZdf0r8Xe7JzdP1ga7JlPKXK0LUm/CTEnapzassvoMciB+ouR529Yz7u X-Google-Smtp-Source: AGHT+IFfMAh2JaR0t80N2VsgZR7cjryTPe8kE/cEI3QSekxtSPLAeT2emtZmRY3kopEDIDNrOMRjFQ== X-Received: by 2002:a05:6000:712:b0:385:ee3f:5cbf with SMTP id ffacd0b85a97d-38a87305369mr10032616f8f.20.1736515887726; Fri, 10 Jan 2025 05:31:27 -0800 (PST) Received: from [127.0.1.1] ([2a01:e0a:5ee:79d0:2555:edac:4d05:947d]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-38a8e38c990sm4598193f8f.56.2025.01.10.05.31.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 05:31:27 -0800 (PST) From: Alexandre Mergnat Date: Fri, 10 Jan 2025 14:31:15 +0100 Subject: [PATCH v7 5/6] arm64: dts: mediatek: add display blocks support for the MT8365 SoC MIME-Version: 1.0 Message-Id: <20231023-display-support-v7-5-6703f3e26831@baylibre.com> References: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> In-Reply-To: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> To: Chun-Kuang Hu , Philipp Zabel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Jitao Shi , CK Hu , Catalin Marinas , Will Deacon , Simona Vetter , Simona Vetter 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, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=10929; i=amergnat@baylibre.com; h=from:subject:message-id; bh=+OaC+AS/ZJpzKH7N8zU/4tgRlbo/T8ud5Vnk6GoVL3w=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBngSEnPwMFjYzMaBFfO/Sq6y01Xk2waqkyXb7hWlXE LjKwbOWJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZ4EhJwAKCRArRkmdfjHURS6wD/ 9x/2GE7BKkRFhoH4+VVtGcmMFGxmQYDTjniSRkhszKSbdSj44cFe6fW9QF4VNWFy9yh4J5SLHCVfC6 uf1BDilgAYQziKHsK+xZjkhkpsqYYfNpABFGQR6PtOSlCKATeahQSf8phrBK7SzSOdStXmWoaU0+Yo pVNnZX2msGcM8wIOypqhEZ9uIUvM1xV+S1f37E4JfHrgTNs9d8DKv4FA8rKkccKUlRba9we11fYPIv Br5tly2kELCh30/BzrMOC2RNbNsPTQ6Wq+vtpyJEObrwSPLBIX8xx00LzmvyN6X7BcwRFdRXMXXmqZ k9hSro3VeCYoQFbz4H5M+Qik40Cc/43+gtNllnCxzaaZz65l8+cTppDU+JzM9JQxdP3ZV/nbYoOD2t C5En/cIXD9Y02G9/3IBmmzRYNbn/RP6g3TsdI5BO9YuwOThtu7sj1rKiW2ydpa55KREtwnoQFzvti9 zJbXC3rOM/mS1sAojNOD8XKzrQ9UJbyKHt4pPmKJYT+rrauh7WbLgqA80JFSO/3Py/sQmMzH/Ffv9u wvIdjiZv16dikK8TrsNWrAKBWwn1xSP5ejygtxr6l/T8GCuBlcnof0rvvXOyG2Yu+N4ETJkSLWUx1n 74XEhj4yMCvTdDTzgB6eAi/6SRG/AV+FjPiOtArWf+fC4N8q9hrMKd8vM0Dw== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" - 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) Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 336 +++++++++++++++++++++++++++++++ 1 file changed, 336 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index 9c91fe8ea0f9..fdd570ca2d20 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8365.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -19,6 +20,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>; @@ -608,6 +622,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>; @@ -704,6 +727,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>; @@ -731,6 +763,26 @@ mmsys: syscon@14000000 { compatible = "mediatek,mt8365-mmsys", "syscon"; reg = <0 0x14000000 0 0x1000>; #clock-cells = <1>; + port { + #address-cells = <1>; + #size-cells = <0>; + + mmsys_main: endpoint@0 { + reg = <0>; + remote-endpoint = <&ovl0_in>; + }; + mmsys_ext: endpoint@1 { + reg = <1>; + remote-endpoint = <&rdma1_in>; + }; + }; + }; + + 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 { @@ -756,6 +808,290 @@ 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>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + ovl0_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&mmsys_main>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + ovl0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&rdma0_in>; + }; + }; + }; + }; + + 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>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + rdma0_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&ovl0_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + rdma0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&color0_in>; + }; + }; + }; + }; + + 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>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + color0_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&rdma0_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + color0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&ccorr0_in>; + }; + }; + }; + }; + + 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>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + ccorr0_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&color0_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + ccorr0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&aal0_in>; + }; + }; + }; + }; + + 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>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + aal0_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&ccorr0_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + aal0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&gamma0_in>; + }; + }; + }; + }; + + 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>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + gamma0_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&aal0_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + gamma0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&dither0_in>; + }; + }; + }; + }; + + 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>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + dither0_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&gamma0_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + dither0_out: endpoint@0 { + reg = <0>; + }; + }; + }; + }; + + 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>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + rdma1_in: endpoint@1 { + reg = <1>; + remote-endpoint = <&mmsys_ext>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + rdma1_out: endpoint@1 { + reg = <1>; + }; + }; + }; + }; + + 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>; From patchwork Fri Jan 10 13:31:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 13934656 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 10FB4E7719C for ; Fri, 10 Jan 2025 13:31:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 631C910F0BF; Fri, 10 Jan 2025 13:31:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="IMmSdu95"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8BB9B10F0C1 for ; Fri, 10 Jan 2025 13:31:30 +0000 (UTC) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4361dc6322fso15070795e9.3 for ; Fri, 10 Jan 2025 05:31:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1736515889; x=1737120689; darn=lists.freedesktop.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=X+ydmhpp1ri+ZdLuckw0JQJHXAllkad5qgHwwB9SlMQ=; b=IMmSdu95W/TW10C6ngUbkYPSnpzxx1Je52zytyVrPMlLJuvLC3EmzLQeF+ckcAms8p UUW84FZyDFe8U7WYwk3QdA/iV/Zsr+oFKAVytWnaftZ9k9/vhX8Z0DpF02Q/HdqCa22i IxSjxoAMc8CbQ941SjbhjPfrfIGbWCNEJaHJR5ZDj4UT8D5CIJzRCLz1U0yjfBNNiNEC qLUlQS1dLcKWs5OgtHwMk4Vh5Q5KgVfZW5PXJ1kAPoJw72LtrWoGqswJIcnBAkEFPkIg XyJ6tZ20nkSPA6EBPiublLdFFrf9ZbhG+AyDCRqzl76gpG/9lnZQWYwOZIj6BduzCSXf tSzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736515889; x=1737120689; 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=X+ydmhpp1ri+ZdLuckw0JQJHXAllkad5qgHwwB9SlMQ=; b=oL7w7PXNSULYaqlgaj9uqab/EGfgL2VSIs4fSb8Xi/pfjs491AJhu/zhUxqpCNBzG2 E+If3jzvpbemSTKe1ozcH6DYhqeBgL7vNyn6XIo+6DdvIsx8oC74EaRB0N1D7NqqP/r4 nXLucPMhGI5FtpnOucsJB+ov5BWxrR0/IQSgf78DOnKvuSfhQN3oPjSVTqN91LCS5nVY GujhG4AWoPsQlz8F9YXsSMWV9pvmsiZDwkOoBSy2OFKeB9fEQuHxk7a5+UKIODo4W4FL QLgwHzshW/T4FbVSlvriR1LOEKFgra1b2nvX7OuBew9wo1m6I3ZLRnFBLe85N7Y/SKl3 /zQA== X-Gm-Message-State: AOJu0YzCi3Pdc6Jcn6OlVtx/cPt7MFYvZH9AEJgKJr/JN6NfC8ANOtwW ERcpGY68LwpctCP6u5uVJv0iKufBIee8oB1nFArtDSYvb2NoDEMIQUdlpwObyco= X-Gm-Gg: ASbGncvq29rDtLCEf5GwDkcojsog79d7fkqBsoovpr9LbIQQpSOCGFfQDvvnyhtwSBH bVxAq+Ig8ynm9HDMFaxKF7C5xflQ99hbwZO/OMLoFgmbHwibyXoIUX+bppJ9BlBQo49UJucJpkn RmiX7jnAjs6ffCkMDhxaGpdnAEIKHc7/lHzsAxUtICJNJLQW1JnB6pP8It8rOg6KYaIZ6tpLG+1 5yPZjM51dBP17QN7JheSEb9+K6bswJjfUKfo/0q1Yzzbf+C0rvh73lu27Co X-Google-Smtp-Source: AGHT+IHOgBZiG80PdI6gQkHthMh4B3T84IIQ+Ibyw1a2z2GuYKQogQiNJn1l8VXim5ZVmA32oxHBEg== X-Received: by 2002:a05:600c:5129:b0:434:a315:19c with SMTP id 5b1f17b1804b1-436e2697002mr94418255e9.3.1736515888894; Fri, 10 Jan 2025 05:31:28 -0800 (PST) Received: from [127.0.1.1] ([2a01:e0a:5ee:79d0:2555:edac:4d05:947d]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-38a8e38c990sm4598193f8f.56.2025.01.10.05.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 05:31:28 -0800 (PST) From: Alexandre Mergnat Date: Fri, 10 Jan 2025 14:31:16 +0100 Subject: [PATCH v7 6/6] arm64: dts: mediatek: add display support for mt8365-evk MIME-Version: 1.0 Message-Id: <20231023-display-support-v7-6-6703f3e26831@baylibre.com> References: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> In-Reply-To: <20231023-display-support-v7-0-6703f3e26831@baylibre.com> To: Chun-Kuang Hu , Philipp Zabel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Jitao Shi , CK Hu , Catalin Marinas , Will Deacon , Simona Vetter , Simona Vetter 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, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=8129; i=amergnat@baylibre.com; h=from:subject:message-id; bh=mR5QEUL3a78L+sYq6qQGF6wk0gc8QlcnD6i8hjpBduI=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBngSEnfupoAl+fwmQa5qOSTPAbmJIL6hR4373elmf0 458SX+OJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZ4EhJwAKCRArRkmdfjHURW0yEA CuPFV9Fo6HVc/tU0xJSXz0nxrF5RnoRINBK8NcymyFOqgQ01YsgxmbQ7EOkMpZYEC7rwdPEf6m76kL IO/J742uJp4PrMo8y5HIT2M7JHt2iDeN+6lqD6l2LLbrR4PB8/jbm7+MUx3sWb1glQ4gZR6+PYP2ly BYtfizhiXHI2fbUlTx7hAJgI4UJLH6GknFmdymks71QFUuZCagNVeLyOmOz4n8SAVG01Q3gI0wOy0O I/PssY++/CDoMTCrOBDCYnGZFl7c9Gn6RGqnQqib56iAqpEASBVClNvZzLI77agTswyIF9/F6qG3Mh DlGuJClcHtx286YeKZV434rSLbrSo2U5ekcdDXVLTeOlu5sh1DlYuqiRvFDEGNXI/D4hIno2QfP8v1 3FBi7DJgSLQ3mOSvxnMYDGwmIR0PJwbpBs4b2p95Eqoxmh3EFsD7Zi+gGLaGOrAUG6i30g98EN+IgH fwJ90H/YGThYyhQjfG6fS5F5jW+TIfTIBEfKBvN0OBqOYXeUuT+bG33biHBX7STnySbNYx8Zv4n6Wg SZ1YJOMRWqt9HOeyPee9j6r4VSI8h6iGHLzCb8ehS2wGCL8JFzWnOwlG0SNDmbnJR+/UWWVeuIiqxJ 178DdqVE7lEUy5fqMHXVmbU16vtFtLiOPcwjFfpGTWAUAt8ohG3kV0Soznzg== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" MIPI DSI: - Add "vsys_lcm_reg" regulator support and setup the "mt6357_vsim1_reg", to power the pannel plugged to the DSI connector. - Setup the Display Parallel Interface. - Add the startek kd070fhfid015 pannel support. HDMI: - Add HDMI connector support. - Add the "ite,it66121" HDMI bridge support, driven by I2C1. - Setup the Display Parallel Interface. Fix a typo in the ethernet node. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 245 +++++++++++++++++++++++++++- 1 file changed, 244 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts index 7d90112a7e27..c72b2f6f8ef4 100644 --- a/arch/arm64/boot/dts/mediatek/mt8365-evk.dts +++ b/arch/arm64/boot/dts/mediatek/mt8365-evk.dts @@ -27,6 +27,21 @@ chosen { stdout-path = "serial0:921600n8"; }; + connector { + compatible = "hdmi-connector"; + label = "hdmi"; + type = "d"; + + port { + #address-cells = <1>; + #size-cells = <0>; + hdmi_connector_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&hdmi_connector_out>; + }; + }; + }; + firmware { optee { compatible = "linaro,optee-tz"; @@ -104,6 +119,16 @@ sound: sound { pinctrl-5 = <&aud_mosi_on_pins>; mediatek,platform = <&afe>; }; + + vsys_lcm_reg: regulator-vsys-lcm { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pio 129 GPIO_ACTIVE_HIGH>; + regulator-max-microvolt = <5000000>; + regulator-min-microvolt = <5000000>; + regulator-name = "vsys_lcm"; + }; + }; &afe { @@ -131,13 +156,102 @@ &cpu3 { sram-supply = <&mt6357_vsram_proc_reg>; }; +&dither0_out { + remote-endpoint = <&dsi0_in>; +}; + +&dpi0 { + pinctrl-0 = <&dpi_default_pins>; + pinctrl-1 = <&dpi_idle_pins>; + pinctrl-names = "default", "sleep"; + /* + * Ethernet and HDMI (DPI0) are sharing pins. + * Only one can be enabled at a time and require the physical switch + * SW2101 to be set on LAN position + */ + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + dpi0_in: endpoint@1 { + reg = <1>; + remote-endpoint = <&rdma1_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + dpi0_out: endpoint@1 { + reg = <1>; + remote-endpoint = <&it66121_in>; + }; + }; + }; +}; + +&dsi0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + panel@0 { + compatible = "startek,kd070fhfid015"; + reg = <0>; + enable-gpios = <&pio 67 GPIO_ACTIVE_HIGH>; + reset-gpios = <&pio 20 GPIO_ACTIVE_HIGH>; + iovcc-supply = <&mt6357_vsim1_reg>; + power-supply = <&vsys_lcm_reg>; + + port { + #address-cells = <1>; + #size-cells = <0>; + panel_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&dsi0_out>; + }; + }; + }; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + dsi0_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&dither0_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + dsi0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_in>; + }; + }; + }; +}; + ðernet { pinctrl-0 = <ðernet_pins>; pinctrl-names = "default"; phy-handle = <ð_phy>; phy-mode = "rmii"; /* - * Ethernet and HDMI (DSI0) are sharing pins. + * Ethernet and HDMI (DPI0) are sharing pins. * Only one can be enabled at a time and require the physical switch * SW2101 to be set on LAN position * mt6357_vibr_reg and mt6357_vsim2_reg are needed to supply ethernet @@ -161,6 +275,56 @@ &i2c0 { status = "okay"; }; +&i2c1 { + #address-cells = <1>; + #size-cells = <0>; + clock-div = <2>; + clock-frequency = <100000>; + pinctrl-0 = <&i2c1_pins>; + pinctrl-names = "default"; + status = "okay"; + + it66121_hdmi: hdmi@4c { + compatible = "ite,it66121"; + reg = <0x4c>; + #sound-dai-cells = <0>; + interrupt-parent = <&pio>; + interrupts = <68 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&ite_pins>; + pinctrl-names = "default"; + reset-gpios = <&pio 69 GPIO_ACTIVE_LOW>; + vcn18-supply = <&mt6357_vsim2_reg>; + vcn33-supply = <&mt6357_vibr_reg>; + vrf12-supply = <&mt6357_vrf12_reg>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + it66121_in: endpoint@0 { + reg = <0>; + bus-width = <12>; + remote-endpoint = <&dpi0_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + hdmi_connector_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; + }; +}; + &mmc0 { assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL>; assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>; @@ -205,6 +369,11 @@ &mt6357_pmic { mediatek,micbias1-microvolt = <1700000>; }; +&mt6357_vsim1_reg { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; +}; + &pio { aud_default_pins: audiodefault-pins { clk-dat-pins { @@ -267,6 +436,49 @@ clk-dat-pins { }; }; + dpi_default_pins: dpi-default-pins { + pins { + pinmux = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + drive-strength = <4>; + }; + }; + + dpi_idle_pins: dpi-idle-pins { + pins { + pinmux = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + }; + }; + ethernet_pins: ethernet-pins { phy_reset_pins { pinmux = ; @@ -308,6 +520,33 @@ pins { }; }; + i2c1_pins: i2c1-pins { + pins { + pinmux = , + ; + bias-pull-up; + }; + }; + + ite_pins: ite-pins { + irq_ite_pins { + pinmux = ; + input-enable; + bias-pull-up; + }; + + pwr_pins { + pinmux = , + ; + output-high; + }; + + rst_ite_pins { + pinmux = ; + output-high; + }; + }; + mmc0_default_pins: mmc0-default-pins { clk-pins { pinmux = ; @@ -463,6 +702,10 @@ &pwm { status = "okay"; }; +&rdma1_out { + remote-endpoint = <&dpi0_in>; +}; + &ssusb { dr_mode = "otg"; maximum-speed = "high-speed";