From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288900; b=Wzumc+BsBuiJSqm2A6whhfDgv0ljkDRH25QoTIoDEZ7iNOv7/D9MtvFWG3Tiks07KERj DjBeloy4XASb2AJ6pU7v1L4zm9SrWiiTpymhk6oPT2mRlbHloJdpm2c8ORTgC4px/i5eE u0NqdVRztzc9GetMGkgs7P659mzq2nfFOBJCVdfljLu/hygsrkZILlvGq2dDuzehXyRSa zEnispj5PVtpaETavAjvw/XDoUg0wJR1fvElu0nnsrs3g6mEBRScrWTMgPcjs7DatXt0r +C+nX3aJTC0VvKTX61D4Rv1/kLQMou+5jPptAzT8RsSUTxBgBO8hc5sdPRJ8RJse+Uw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288900; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=NgtfBGZW6JnOX8QXxkHMy03vg6zeloIYXjLXT43yxao=; b=baB7IULtQva7/sOLvjn4Mk+zjtiF0/6f1q4AafPFXtNZPum1T3l8VTGMfDcWk4RjhNOs JX8vn2AcBAnXv7k5M3uHkCzUd/8/mZl9zfGkB2Hl2x8yMfK8cUT6odSyxAkfrn/bcZBXn eeDprJWy1LFDGWYYl7u91FM3X8i5aTBAj8JQY48bVvEN6KOFWsTTEJXMx1BO1VC2Y2jTd W/xAOqfTgwBavmeTm/TfTANbnR0Mv4b7gg1YZzVSuPtyxOxTzcHDBTCJoGs7wq6W05wbL p2ryuH7sMCbt3FpxYlG7YnDKdNC+w1ZDbL/7DI0SUqA0eWWSMLStn06PJlHsZThEd/Q== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bu2qiCQM; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2731B606A32A; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bu2qiCQM Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288899; b=hkRQjjwfqaITcKXXTCcNyD3CuZKzrXPr8wJvTIKIjDP3gUTgZs/dD2KyklRY9jasA2XA 5BUx8BFcgoCcXrThTvtHGjx9DcC2X4BZSXudVG86SnxqExZslwq94KVT3ymM+oWqP9UhR nKfoO6iNm9seOBQbD8qbuWhp2p2OqMoQ5H3yLCvazHv61qnxbRH2p4dEERKI3hqtfJROe ZYoDruhfR7pACI3p8GB1/JpdPqAoBJJI6ML0G9pWMQpI/W8eJxCQ1ozqJdSJ08OgsPQuI nRIhS2ag0PsCC8mQ+LORNGgh7J3PiA2SHdC6O/5tuBLNZ8q3gUOixyuWGyqV4yXsi7w== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288899; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=NgtfBGZW6JnOX8QXxkHMy03vg6zeloIYXjLXT43yxao=; b=x6kbJgYgR2u9/OctG1nPvc0uqD0+ZkUJRcWhQn5Pbn7HwjUQ7+n5wxinLNb1Mpr7kolM rB6ooRK5mnvw5b+YXTPcIXF83wWNW66j7kOBJBluPtvIR0iKi5DLhMf8hSCwPuBtWELg4 KC7Win2+Bcsy1FP1iuVMSrC1E/9eW/4vhDIUOkJr5fzwN/F7HXdwyFYHAcriIcf0gjzQY ESUcydJ/p6bfbOLqbt9USTm6OCCgrVj9kPjKWvm+kVU1gjvsK9p/+yd3RarorY7X1OA3a +7c8qMH57Qixu+fyJabY8b+uwd9hdhN1+ZHQqZP5XzXSWXTtmMCSEg8b/num/tlngTQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 1A99A1F000C0; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288899; bh=NgtfBGZW6JnOX8QXxkHMy03vg6zeloIYXjLXT43yxao=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=bu2qiCQMU1osHOpdUN2on0rAgOTnfShprejvu04fJbqGwFJlFzfbj8nPbmXN7Z/Pp jPibZooHoMmF3x3b2mTz6Gzwx1LV6agSRsYJF0e/t7icIhubJ34J6DVBLsT4wwbQRv AUmcKQusTMbQvfKnCl7tqoNK+ETlEGSWf3+UcrOvqB/c0jg6/Wv5tWax0lWZYEldod ZzjXZudB7icOcceTZJMM6fanLfNKo496ki6yfZw2sIQabXaS7P177K3KNAwEGsjrX/ TAfH7eDjKlW12WIJi9ulBbzlOKSvosvTwqU8uMBPo1+QF3lX+0ATEvu/TGcQgntHxQ ugVabyE8GSAAw== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 8E5194BD60; Sat, 21 Nov 2026 19:21:38 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:03 +0100 Subject: [PATCH v3 01/11] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Fix compatible matching in conditionals X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-1-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3283; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=PVKFWIK5TVZ+BrIG2D/sPckomoO1CwEMBpgyzjwKon8=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbje1XfldbHf9f21s259Mfgxdld5jw8bXvcZQwXbn9Wr FtYe8i8o5SFQYyLQVZMkaV/ruWJd5ePnvm6Rz0FZg4rE8gQBi5OAZhIKzcjwxTtg+futHWkzJzD ePpq54OJN5YubGy58Vv5V+OX56KVLlcZ/sdozeLY5T631v2Zwrbqkk0cV1s65nv+itJRnTu/ffv GbH4A X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau The conditional schemas select on "compatible" with a bare enum. On a list such as: compatible =3D "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd"; an enum applied to the whole array only matches single-entry lists, so the if: blocks never match as intended and the per-variant constraints are not applied reliably. Wrap the enums in "contains" so that the conditions match on any entry of the compatible list. Doing so exposes the "phy" child node of "amlogic,meson-gx-hhi-sysctrl": it was forbidden (phy: false), but some DT legitimately describe an "amlogic,g12a-mipi-dphy-analog" PHY node under this system controller, which resulted in dtbs_check warnings such as: system-controller@0 (amlogic,meson-gx-hhi-sysctrl): False schema does not allow {'compatible': ['amlogic,g12a-mipi-dphy-analog'], '#phy-cells': 0, ...} Allow the phy child node for amlogic,meson-gx-hhi-sysctrl by referencing the amlogic,g12a-mipi-dphy-analog binding instead of rejecting it. Signed-off-by: Ronald Claveau --- .../soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml | 32 +++++++++++++-----= ---- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx= -hhi-sysctrl.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,m= eson-gx-hhi-sysctrl.yaml index f3a85c67ce8a..285edac4c082 100644 --- a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sy= sctrl.yaml +++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sy= sctrl.yaml @@ -40,8 +40,9 @@ allOf: - if: properties: compatible: - enum: - - amlogic,meson-hhi-sysctrl + contains: + enum: + - amlogic,meson-hhi-sysctrl then: properties: clock-controller: @@ -53,9 +54,10 @@ allOf: - if: properties: compatible: - enum: - - amlogic,meson-gx-hhi-sysctrl - - amlogic,meson-axg-hhi-sysctrl + contains: + enum: + - amlogic,meson-gx-hhi-sysctrl + - amlogic,meson-axg-hhi-sysctrl then: properties: clock-controller: @@ -67,9 +69,10 @@ allOf: - if: properties: compatible: - enum: - - amlogic,meson-gx-ao-sysctrl - - amlogic,meson-axg-ao-sysctrl + contains: + enum: + - amlogic,meson-gx-ao-sysctrl + - amlogic,meson-axg-ao-sysctrl then: properties: clock-controller: @@ -81,17 +84,20 @@ allOf: - if: properties: compatible: - enum: - - amlogic,meson-gx-hhi-sysctrl + contains: + enum: + - amlogic,meson-gx-hhi-sysctrl then: properties: - phy: false + phy: + $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml =20 - if: properties: compatible: - enum: - - amlogic,meson-axg-hhi-sysctrl + contains: + enum: + - amlogic,meson-axg-hhi-sysctrl then: properties: phy: --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288902; b=lOhOru/yWPsbnLkkiOpwU2LypxQkLAZjYrvnJ8R+9/y7zFgcLNUEypVlZIe6pAqm4fhN nTglPpRb+eXwsRnGcB8ZB+rxRWw1f0lMwMEkb+X6Fe4n4EcIawFJcyRHHZIFtpCFviebx MZ16POPqKZqm8fiWLT47pAP4SIYVjRyZWyBRX4oTNgwLTh22k7SirLpf9BlYbU1NeB3lv hsZwj0dIQey8Mmo/L1ah6NGTnZ1S7iZ4nZrvzTo0W5sCADznJudyM65KR4QE+hr+JPjCr OcviwL9yKh0CqocWlzC2knHwCtOQF6E9IK4lRT5dVVuz2RD7h8d6RYQMgdk3H/w/VGA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288902; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=xA1P8zsvk6kqc3xIgg8qAOvV3prxwK2TGoWpI0Dqwlc=; b=fajZPnsquh3pPGVjHz3Qyo73JDr6Nbi63nT2M3oZE6uWac8pgsXp2whqs4yBAflHIKZm Wc77Nu0nHbPdqaqkJnHA5fxN33az0LQrWImW/v8QzTY0TbS95mCbfKLPSrNGuZDrnMQGi DQwYi9rqSOAajiWFlBfVtXHWmAc/psiiQNTNhzGZH+NfP1FLzjt+kRCtIgsvt1XPxpxBM BRvIro3iD84SabQ6K4DBemPdsvThv9DK3NA0wEU5KjEzXLyqu3yOs8V5L6UQgs3UzqDAr 8OPjM7cZ4+/FTeSUHAjrd3Hv5Ae+eVb+nKZzhdJWcWPgBSEaFQzSjneSfU+PDm/raWA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=R6Est+G7; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43443606A339; Sat, 21 Nov 2026 19:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=R6Est+G7 Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288901; b=ZREIm8TrY8QNp3yLufCD0O3BKDFXa2GPt/tGhJV9YGlND2iWSdOpLmS58zEI3tOqInAZ 9hxvKs7YOtY9XSJa72NxhIl14pKN080uSSOUDuIpZorgU7bdukB4XH8bGIIFXNpu/FrwT BrssSM67LQT5mbgWkS/xJKDQ3VE1x3fBoeA1cjSq8W4VFw5t4Fek4cfxDVcqBj4nTwEHX Eu97oS5HHgXqr2JwsrqhFs/XJWOP6+eMG8iGkMalIVXNApE/Sv/vhxZYi070FUjNo2KCA SPqCtvsNvD6NAdAya5sLbKRElQWYv+VSZx6NHzzpJ62NzQRUWB1fQkcI5Ng6o/jqHzA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288901; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=xA1P8zsvk6kqc3xIgg8qAOvV3prxwK2TGoWpI0Dqwlc=; b=otuIG7GpyTA6fpbDEOF5ItzFN+f6UoT+OINaGPjUNUMkyQiUNxK4DfS/sHiua3uP5L4f US0BIzV7N5b20dR9XOaw2Rgq98Vnog0RCrBD56WA43QyjLlt+Xkr97wr3xLpeKVmUTfqm DfaskD75Xn/pXi8yWtOwu7GybOV6sB1F1heKQFjE3ApK5z3s9M4Lvm6lEq0pkEJB2PXtb 7T+tm1kXO4XvmQGHgRdi6EQegWyNdQZdz5b1lfZ9enoUNfFJ6bETPc6Z2Spf8nD7ux1bj VLIAT6gC4fvu7xgvIOrSdF4Dj0iPSschu8vIi23ctKp6Rcr8Nywy57sB3tXSmy+r6JQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 2C0AA1F000CF; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288901; bh=xA1P8zsvk6kqc3xIgg8qAOvV3prxwK2TGoWpI0Dqwlc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=R6Est+G7KrDFhHSM55VugifMP4VJU7JDcWgBusuOABODnLfACrNOQgAsowVDwr+BK Qh+M3HjvvIhWGf5Vr6oIHfudvez7FdaAeV6wII2K6YjXuux4T524VhfC58oLm0fuBU f0aOjVtEiERhfMS57t48Wny0Fy+6GjtZkyACiwvAUMe1oEIG4dGOvM/IaFGqpGT9lq Z8+YWgs2x9ZtjKTXVTHTof8yXCgyaF/sOQPVmYCo+cTDPhZDjaDRajDgUG4CTp8WXS WbV4WEj8zL4AEQTuvjIqcMrS27YRJwCnCHN4pbw0D9EQ8G2Pr5m2nEP7Xikx46lEwK SiFIA11WbzrxQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id A95E94BD6A; Sat, 21 Nov 2026 19:21:38 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:04 +0100 Subject: [PATCH v3 02/11] dt-bindings: phy: amlogic: Add Meson HDMI TX PHY binding X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-2-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1569; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=OW3BQ47jww+fAV5FJlCwW3Kume/yYrBTmUUehPnw4ZU=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbje/X29e8uTX3MzW+8eiFz+8wXorFcO0X0v6tO/150Y vtGvhtbO0pZGMS4GGTFFFn651qeeHf56Jmve9RTYOawMoEMYeDiFICJLFjPyHDiYPPvrEmXyyM4 jTf9j9rt8ivOvcVxUxxPwur6X11nX6QwMqysm5PxS8zQf0bO9syMmvOXys/+8tazu8kgPXNZSBF TBxcA X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau Add a YAML binding for the HDMI TX PHY found on Amlogic Meson SoCs. It covers the GXBB, GXL and G12A variants, which are described by their own compatible strings: - amlogic,meson-gxbb-hdmi-tx-phy - amlogic,meson-gxl-hdmi-tx-phy - amlogic,meson-g12a-hdmi-tx-phy The PHY is a child of the HHI system controller. Signed-off-by: Ronald Claveau --- .../bindings/phy/amlogic,meson-hdmi-tx-phy.yaml | 33 ++++++++++++++++++= ++++ 1 file changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/amlogic,meson-hdmi-tx-ph= y.yaml b/Documentation/devicetree/bindings/phy/amlogic,meson-hdmi-tx-phy.ya= ml new file mode 100644 index 000000000000..c5dd1036c375 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/amlogic,meson-hdmi-tx-phy.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/amlogic,meson-hdmi-tx-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic HDMI TX PHY + +maintainers: + - Ronald Claveau + +properties: + compatible: + enum: + - amlogic,meson-gxbb-hdmi-tx-phy + - amlogic,meson-gxl-hdmi-tx-phy + - amlogic,meson-g12a-hdmi-tx-phy + + "#phy-cells": + const: 0 + +required: + - compatible + - "#phy-cells" + +additionalProperties: false + +examples: + - | + hdmi-phy { + compatible =3D "amlogic,meson-gxbb-hdmi-tx-phy"; + #phy-cells =3D <0>; + }; --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288901; b=EKFvViafxmve7Xvdm8mC2EbM2nk8j4uV3igv+e/ihWYXDsUyBwpO0liHsE6Lst9qztg0 810cQF/VJ1nm0UKSN4xByN9KtyK5WhmLtkuhP69tL4iUpUWpiSnhKCXIfBTQ8H5KcHgC3 p6X1in+sxQVPsyYUVdqoFK8Tdu3H3+7qBnFzBOxbcdME5RH3cSSKSej5995gtAdbgvF4g QWNgtZoWffXbjcrE8mcIWaCvJr78pD3nmXazMUQh0bu8IvNRCMCK0DEFgbGkXr2KwvFLI 4upb6cKsFob70mFRMpmnycvenKjAEM10jh2Y6lU5a+fA7j7MNfGiYmgevlpz+ZKTD0g== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288901; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=09MIVVUaXPmTOAMRCrsbJMFWfzMJrvosN8N7XD44Bng=; b=4sHmgi4zX282t0leJkQTyJM0C7GtFO/7z4CsQAnBbjSdTa+W5iDe+QMf4HdT1P/VCad3 DRA9ihgzzsGRJGDo+GOZK4rOQl92fsuS9sJgrXjvU8DG7rESmwFMz7Evjd97gPOXGvaC5 CvJR1ajofCS/cOrnBPPQGTpSBf0417dvczZzPSMBklg+FSyHDouU6Yz8H4k3uaEoLBOxQ Isj4I3Mg6yapvkVv8W7qy/3DTJhntFI5kOwQUNrMbxhDYBcSZSbvA+S5U7OFkfRkqb7VF tpf2jVdtFxB8wtykYEUO/59R01YfB2AzaBGuhr9sGiB+pluyJcqtR65QtsAIqF8gqfw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=L9T0n7IL; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B142606A33F; Sat, 21 Nov 2026 19:21:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=L9T0n7IL Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288901; b=DFpZFEvP5W0VCOAIJ3jvoB8PE0qjY550ztIkeX4pY8CONifm2QA87PnCl/G2ToEkFMS3 xEeQyAicIxtY+kzPHF4n6+lGjaQBvJ9MkSFoij6HQTzpwpdCFdzgzoUeUKnKcPcTaa71w Uybm/wsfqqqYoJiBOdoClXedaulYvCR45KO2/1d8P+dGvC5K5KmZ6DPtpruJIUB7R1R4c ybsdwwVlP2G1KaVjFmPB+qnvxEvJdEBX6vwmHGA7LMVZSkM9Q5YNP7YW2HEGtLePeh9NN tLRyo5nItq4E8usSEyTdqY8FlgUULyMAATiC4KhLsRDlnwPH+WPm1lfaopWHZjQUSrg== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288901; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=09MIVVUaXPmTOAMRCrsbJMFWfzMJrvosN8N7XD44Bng=; b=Z1PkIG7/S3egqNJqNzzmFMirqr4c+JDiMmnTvIr8xWQHme2j2gc2Z4y/SsYxJHIsHhRd qB7B8NBWkQLMgGVB4/baYkEA4NcwkexIE/8XRe/s5V9RYDVsyE1JgN6PxOGN4AI5wFcN2 562shxQh0ttmqWtrSujFDmx5n/maNwGPRAwMu97VksAJsKHYt4NJBtNGvyldOmRaQ681n htnQg+UxSG1gkA64JK31bPP7LCuSON0le/0KIQeXrXORdpB4WNtZAhNz7RtsoCgOjGMR4 Au74AJUyMyju0y3vltye8KGJRWiQUM3Sh1UXenWl5d2+pzNbrl99WrOgaahYvEdjzww== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 4B7FB1F000D1; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288900; bh=09MIVVUaXPmTOAMRCrsbJMFWfzMJrvosN8N7XD44Bng=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=L9T0n7ILVUT6EB2yM3CMfU+Kk1IwrRsFvRZi4hZLGyz8tHeP7Ji6i5FTy4FxvbbjZ b86KftNO2v4Pt3kwKF2zLWjfNgC+tuoVemiHIKNN2Y5mzFzfHKN+RZPgcqJuN5E9bH 89EEd0y4RZWWjGZBbWP0RFojy1u3BCRfydbzRYbbENf+a3EnKZJEDI45kCu+lcB0pW EYpWN/6XplC2Ln2ARZNXsGT7aSc3hyFvSThafUvIJCKP6enW671vu/+U+77wd+xWA1 p+71ibPtuIMGny8xlwlD/4HnsO2xVciQZ4g86t/sidC3rPHCuS7/OYRCRNBz6mVDdJ NqO+bWwJLXXBA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id C9A434BD6E; Sat, 21 Nov 2026 19:21:38 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:05 +0100 Subject: [PATCH v3 03/11] dt-bindings: soc: amlogic: meson-gx-hhi-sysctrl: Add hdmi-phy child node X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-3-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1884; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=GJIY+ibCECHLmuzGiUiB/LupTZ5nNvm+rMxqh5qXGxg=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbje80d/FtEYmd5rJNivWZyumRCmVnul90/8j68ZPEyW 74pweRKRykLgxgXg6yYIkv/XMsT7y4fPfN1j3oKzBxWJpAhDFycAjCRe2GMDLulD2opPdQ8W3n6 icL0f7aW82M/6y3ZWLhRLqhHN7X/tQLDf9/NlyY8bXExslhWGX36I7fq3CMRDvn1jZJLtZyfWtt kMgEA X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau The HDMI TX PHY found on Amlogic Meson SoCs is a child of the HHI system controller. Add an optional "hdmi-phy" child node referencing the amlogic,meson-hdmi-tx-phy binding, and add it to the example. The node is forbidden for the other system controller variants. Signed-off-by: Ronald Claveau --- .../bindings/soc/amlogic/amlogic,meson-gx-hhi-sysctrl.yaml | 11 +++++++= ++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx= -hhi-sysctrl.yaml b/Documentation/devicetree/bindings/soc/amlogic/amlogic,m= eson-gx-hhi-sysctrl.yaml index 285edac4c082..97e47592aff2 100644 --- a/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sy= sctrl.yaml +++ b/Documentation/devicetree/bindings/soc/amlogic/amlogic,meson-gx-hhi-sy= sctrl.yaml @@ -36,6 +36,9 @@ properties: phy: type: object =20 + hdmi-phy: + $ref: /schemas/phy/amlogic,meson-hdmi-tx-phy.yaml + allOf: - if: properties: @@ -50,6 +53,7 @@ allOf: =20 pinctrl: false phy: false + hdmi-phy: false =20 - if: properties: @@ -80,6 +84,7 @@ allOf: =20 power-controller: false phy: false + hdmi-phy: false =20 - if: properties: @@ -104,6 +109,7 @@ allOf: oneOf: - $ref: /schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml - $ref: /schemas/phy/amlogic,meson-axg-mipi-pcie-analog.yaml + hdmi-phy: false =20 required: - compatible @@ -155,6 +161,11 @@ examples: clocks =3D <&clk_vpu>, <&clk_vapb>; clock-names =3D "vpu", "vapb"; }; + + hdmi-phy { + compatible =3D "amlogic,meson-g12a-hdmi-tx-phy"; + #phy-cells =3D <0>; + }; }; }; =20 --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288905; b=RDOH9c9lQIoQ/go2C+M5xgVilsE6IdUtYmLAHAwn6GfEQ0fzHFyMymEg61t6sEamK6Yw 8A+uJIvUxsfYoetc3PdDii3TqxvNvibR1MFWw5nCbcnQ1EXqSiSjEBo4he7veh5x0C5+k 1lY2QNA4m7G6NIoPE6WoPnP2goLivwgcZfMReFFTAyWJB2Mnfxu83UhJdiW1tn2sm+lhB sI76i7BUwRrXsTpyVJZjMCOnppb9Djt6dwdAFUz4tESITFlxzFjVf+et6nKxT1ZUZZ64o ycWVxEa8wyPphQ3Lo9JTs1Uxw5YCmmpsOeQG/zTB/s4HIyXm7ma6nR368aJKNG07eEA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288905; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=wHtstx12TPFOVoOdJsV4o5pTGvndM07vJ3yUi+EhRFk=; b=duTvTS465gUco61Vl9U9VjxYY6JFRkLquRo43yAfV4WvMl9lstRXzd0UEmH6a+3bZHHE vTyGfkYqDOu/v8vsE6md5mpRQtgpYpsrgBqqm5t2L/UL+1MpKNzFZBUNVOFVdJ1VzxUxH d+HQgZUz9pNLnhvu42hYbKiAlKOaBzGYY6ta3BoM2K4wk32CgrkmRo4XR0/Moq3i3E2on lURk7eqo83hT/aKUyI6RFodoLvs6tVkzOoBeFw/Bk6rYh9GnS4seFeo2INwWrOF7lk/qw 49S/iDZxcFCDz+aXSiid+sLnGNGTZDRuppaxW8jSPPeUPMWuEKm1fR5zu2QM1LMhaUg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SGLhmQt0; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82E09606A69A; Sat, 21 Nov 2026 19:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SGLhmQt0 Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288905; b=kNTHhGjJ4jUv/3lyXNfseEd7NMx9egxOFJkxhtn9EBTPtkp5mZhcpmb3zmOcXu0xKt8X AAVa89efFuK/zgBzJt56q2Z/Wvj3q3yXHsQN/TPa5V0mNcFihyvXEDYmDNi46gWUNDuYo ir4nmiyYmUTVVDW77dd/giHTZScvfpufaLN8VWsZIttveZ79dpLuek2f4TtHhRFW07bl3 hxeutXxE65coDxzxL7CnaBe7tMkPGVRJOnOUlDBmhaTP8662jbJq8sJYGIPoKwGjSoDSB +k5JXG6h+qSFArRU1MwfoTPUJQvfod0C5XQ8eL5qEmRpY+y1iNvV2fBoPQDwsNj1VmQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288905; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=wHtstx12TPFOVoOdJsV4o5pTGvndM07vJ3yUi+EhRFk=; b=DCQ+bO+1Av2WXzvyBGD8jyqVrB5KMjA8153sKaZjUYfXBj6BdEihEcyqw59nbVQD62u9 BMZ4bjz9LtteQ1qDEDUgknQY8UM3RCTNO2mHzFnJVPanUrFD7iynnTbPoLJ96Kya1GtAw ghFst+7FRmJpbMuxzY83ZcDsTQymnMrDyPe55ZwUIen/0r6jfZAo2cMsEBNlqpG3MNn9M vtaInSrwY4ncWGytpL+lkRZ4v1VTGMiEepbojDYi9UKgmkaTkBD5oLoXwZmdl9SvTtbMy 7wzIYBgHSMZ+HitpcFx8WH78FFoDR+SKE90GafAH8ZmMut3A0LPvRtTQqFrkrAtog6g== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 66DA31F000D2; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288905; bh=wHtstx12TPFOVoOdJsV4o5pTGvndM07vJ3yUi+EhRFk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=SGLhmQt0WMt+u1ntohx7/zKZxUnGGrLT5vXD5K7NLjvPI2ga6gyIS1RR3HqLogmDT 6IfF5kDHT3OrJF8e1Mrs+YkKeuEfgYzVoiuer/+RH21BbnwA5nXkL0U0dk1Qn6+4Ql xbKhsPXw07emTPBGMxl7JzTo/m7Gep+vc8ddEWl4DnU9KZ1McoYrQ0Yv5od3JKp0sr pAw99oZeuVsE7iGyt3l2wIMftnPJZbusXK7J4CUNKcpRwz8MLg+JZGxTEukitUN7T2 ORLeAccaNkZHSa/PMXl99vN2LHGQAZSGBlxdfzDdOhUDCURPQmH5M7CJsKKn64fro2 0rypOpygEoZDA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id E3DD54BD72; Sat, 21 Nov 2026 19:21:38 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:06 +0100 Subject: [PATCH v3 04/11] phy: amlogic: Add Meson HDMI TX PHY driver X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-4-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=12662; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=ucuFasgJ8vF/dPW17iRMO07LFAc2GN7AQ9w0+4vsLvo=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbje11xx0seNj/UhPvDHstuYGDpEJmar3SkPEfyc/2Cj 41pR6s7SlkYxLgYZMUUWfrnWp54d/noma971FNg5rAygQxh4OIUgInU+DH8L533mSnQnn/qtLwL vqsPTnggp15wr7dPcVrSndabYs7LShj+p026//+qr+2JJE7pG1vb9S6wnVhakuvxwdpmRp6+Vcc RHgA= X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau Add a PHY driver for the HDMI TX PHY found on Amlogic GXBB, GXL, GXM and G12A SoCs. The PHY is controlled through the HHI_HDMI_PHY_CNTL0..5 registers of the HHI system controller, of which the PHY node is a child, so the regmap is obtained from the parent syscon. The driver implements the generic PHY API with the HDMI configuration options: .validate() accepts only 8 bpc and a TMDS character rate covered by the per-SoC table, .configure() programs the analog settings matching that rate, and .power_on()/.power_off() handle the reset sequence and the return to the initial state. The per-SoC register values and rate thresholds are taken from the existing HDMI TX code, so that the PHY handling can be moved out of the display driver. For DTs that do not provide a "phys" property on the HDMI TX node, export meson_hdmi_phy_create_legacy() so that the display driver can still create the PHY itself. It is marked as deprecated and will be removed together with the fallback in meson_dw_hdmi.c. Signed-off-by: Ronald Claveau --- drivers/phy/amlogic/Kconfig | 11 ++ drivers/phy/amlogic/Makefile | 1 + drivers/phy/amlogic/phy-meson-hdmi-tx.c | 319 ++++++++++++++++++++++++++++= ++++ include/linux/phy/phy-meson-hdmi-tx.h | 19 ++ 4 files changed, 350 insertions(+) diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig index ce7ba3eb2a8e..14fcde8d88bc 100644 --- a/drivers/phy/amlogic/Kconfig +++ b/drivers/phy/amlogic/Kconfig @@ -105,3 +105,14 @@ config PHY_MESON_AXG_MIPI_DPHY Enable this to support the Meson MIPI DPHY found in Meson AXG SoCs. If unsure, say N. + +config PHY_MESON_HDMI_TX + tristate "Meson HDMI TX PHY driver" + depends on ARCH_MESON || COMPILE_TEST + depends on OF + select GENERIC_PHY + select MFD_SYSCON + help + Enable this to support the HDMI TX PHY found on Amlogic + GXBB, GXL, GXM and G12A SoCs. + If unsure, say N. diff --git a/drivers/phy/amlogic/Makefile b/drivers/phy/amlogic/Makefile index 91e3b9790c03..fa7165700a93 100644 --- a/drivers/phy/amlogic/Makefile +++ b/drivers/phy/amlogic/Makefile @@ -8,3 +8,4 @@ obj-$(CONFIG_PHY_MESON_G12A_MIPI_DPHY_ANALOG) +=3D phy-meso= n-g12a-mipi-dphy-analog obj-$(CONFIG_PHY_MESON_AXG_PCIE) +=3D phy-meson-axg-pcie.o obj-$(CONFIG_PHY_MESON_AXG_MIPI_PCIE_ANALOG) +=3D phy-meson-axg-mipi-pcie-= analog.o obj-$(CONFIG_PHY_MESON_AXG_MIPI_DPHY) +=3D phy-meson-axg-mipi-dphy.o +obj-$(CONFIG_PHY_MESON_HDMI_TX) +=3D phy-meson-hdmi-tx.o diff --git a/drivers/phy/amlogic/phy-meson-hdmi-tx.c b/drivers/phy/amlogic/= phy-meson-hdmi-tx.c new file mode 100644 index 000000000000..872d244de8fb --- /dev/null +++ b/drivers/phy/amlogic/phy-meson-hdmi-tx.c @@ -0,0 +1,319 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Amlogic Meson HDMI TX PHY driver (GXBB / GXL / GXM / G12A) + * + * Copyright (C) 2026 Ronald Claveau + * + * Based on meson_dw_hdmi.c: + * Copyright (C) 2016 BayLibre, SAS + * Author: Neil Armstrong + * Copyright (C) 2015 Amlogic, Inc. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define HHI_HDMI_PHY_CNTL0 0x3a0 /* 0xe8 */ +#define HHI_HDMI_PHY_CNTL1 0x3a4 /* 0xe9 */ +#define PHY_CNTL1_INIT 0x03900000 +#define PHY_INVERT BIT(17) +#define PHY_CNTL1_CTRL_MASK GENMASK(3, 0) +#define PHY_CNTL1_RESET 0xf /* enable + software reset */ +#define PHY_CNTL1_UNRESET 0xe /* enable + unreset */ +#define HHI_HDMI_PHY_CNTL2 0x3a8 /* 0xea */ +#define HHI_HDMI_PHY_CNTL3 0x3ac /* 0xeb */ +#define HHI_HDMI_PHY_CNTL4 0x3b0 /* 0xec */ +#define HHI_HDMI_PHY_CNTL5 0x3b4 /* 0xed */ + +/* The code resets the PHY 3 times in a row */ +#define PHY_RESET_COUNT 3 + +struct meson_hdmi_phy_rate { + unsigned int min_rate; /* TMDS character rate, in Hz */ + u32 cntl0; + u32 cntl3; + u32 cntl5; /* only used if has_cntl5 */ +}; + +struct meson_hdmi_phy_data { + const struct meson_hdmi_phy_rate *rates; + unsigned int num_rates; + unsigned int max_rate; /* Hz, TMDS character rate maximum */ + bool has_cntl5; + u32 cntl0_init; + u32 cntl1_init; +}; + +struct meson_hdmi_phy { + struct regmap *hhi; + const struct meson_hdmi_phy_data *data; +}; + +/* GXBB */ +static const struct meson_hdmi_phy_rate gxbb_rates[] =3D { + /* 5.94Gbps, 3.7125Gbps */ + { 371250000, 0x33353245, 0x2100115b }, + /* 2.97Gbps */ + { 297000000, 0x33634283, 0xb000115b }, + /* 1.485Gbps, down to 251.75Mbps */ + { 25175000, 0x33632122, 0x2000115b }, +}; + +/* GXL / GXM */ +static const struct meson_hdmi_phy_rate gxl_rates[] =3D { + /* 5.94Gbps, 3.7125Gbps */ + { 371250000, 0x333d3282, 0x2136315b }, + /* 2.97Gbps */ + { 297000000, 0x33303382, 0x2036315b }, + /* 1.485Gbps */ + { 148500000, 0x33303362, 0x2016315b }, + /* 742.5Mbps, down to 251.75Mbps */ + { 25175000, 0x33604142, 0x0016315b }, +}; + +/* G12A */ +static const struct meson_hdmi_phy_rate g12a_rates[] =3D { + /* 5.94Gbps, 3.7125Gbps */ + { 371250000, 0x37eb65c4, 0x2ab0ff3b, 0x0000080b }, + /* 2.97Gbps */ + { 297000000, 0x33eb6262, 0x2ab0ff3b, 0x00000003 }, + /* 1.485Gbps, down to 251.75Mbps */ + { 25175000, 0x33eb4242, 0x2ab0ff3b, 0x00000003 }, +}; + +static const struct meson_hdmi_phy_data gxbb_data =3D { + .rates =3D gxbb_rates, + .num_rates =3D ARRAY_SIZE(gxbb_rates), + .max_rate =3D 600000000, /* HDMI 2.0 */ + .cntl0_init =3D 0x0, + .cntl1_init =3D PHY_CNTL1_INIT | PHY_INVERT, +}; + +static const struct meson_hdmi_phy_data gxl_data =3D { + .rates =3D gxl_rates, + .num_rates =3D ARRAY_SIZE(gxl_rates), + .max_rate =3D 600000000, /* HDMI 2.0 */ + .cntl0_init =3D 0x0, + .cntl1_init =3D PHY_CNTL1_INIT, +}; + +static const struct meson_hdmi_phy_data g12a_data =3D { + .rates =3D g12a_rates, + .num_rates =3D ARRAY_SIZE(g12a_rates), + .max_rate =3D 600000000, /* HDMI 2.0 */ + .has_cntl5 =3D true, + .cntl0_init =3D 0x000b4242, /* Bandgap */ + .cntl1_init =3D PHY_CNTL1_INIT, +}; + +static const struct meson_hdmi_phy_rate * +meson_hdmi_phy_find_rate(const struct meson_hdmi_phy_data *data, u64 rate) +{ + unsigned int i; + + if (rate > data->max_rate) + return NULL; + + for (i =3D 0; i < data->num_rates; i++) + if (rate >=3D data->rates[i].min_rate) + return &data->rates[i]; + + return NULL; +} + +/* Fallback to init mode: CNTL1 first, then CNTL0 (order matters) */ +static void meson_hdmi_phy_set_init_state(struct meson_hdmi_phy *priv) +{ + regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL1, priv->data->cntl1_init); + regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, priv->data->cntl0_init); +} + +static int meson_hdmi_phy_init(struct phy *phy) +{ + struct meson_hdmi_phy *priv =3D phy_get_drvdata(phy); + + meson_hdmi_phy_set_init_state(priv); + + return 0; +} + +static int meson_hdmi_phy_configure(struct phy *phy, + union phy_configure_opts *opts) +{ + struct meson_hdmi_phy *priv =3D phy_get_drvdata(phy); + const struct meson_hdmi_phy_rate *r; + + r =3D meson_hdmi_phy_find_rate(priv->data, opts->hdmi.tmds_char_rate); + if (!r) + return -EINVAL; + + regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, r->cntl0); + regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, r->cntl3); + if (priv->data->has_cntl5) + regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL5, r->cntl5); + + /* Disable clock, fifo, fifo_wr */ + regmap_update_bits(priv->hhi, HHI_HDMI_PHY_CNTL1, + PHY_CNTL1_CTRL_MASK, 0); + + return 0; +} + +static int meson_hdmi_phy_validate(struct phy *phy, enum phy_mode mode, + int submode, union phy_configure_opts *opts) +{ + struct meson_hdmi_phy *priv =3D phy_get_drvdata(phy); + + if (mode !=3D PHY_MODE_HDMI) + return -EINVAL; + + if (submode !=3D PHY_HDMI_MODE_TMDS) + return -EINVAL; + + if (opts->hdmi.bpc !=3D 8) + return -EINVAL; + + if (!meson_hdmi_phy_find_rate(priv->data, opts->hdmi.tmds_char_rate)) + return -EINVAL; + + return 0; +} + +static int meson_hdmi_phy_power_on(struct phy *phy) +{ + struct meson_hdmi_phy *priv =3D phy_get_drvdata(phy); + int i; + + /* Reset PHY 3 times in a row */ + for (i =3D 0; i < PHY_RESET_COUNT; i++) { + /* Enable and software reset */ + regmap_update_bits(priv->hhi, HHI_HDMI_PHY_CNTL1, + PHY_CNTL1_CTRL_MASK, PHY_CNTL1_RESET); + fsleep(2000); + + /* Enable and unreset */ + regmap_update_bits(priv->hhi, HHI_HDMI_PHY_CNTL1, + PHY_CNTL1_CTRL_MASK, PHY_CNTL1_UNRESET); + fsleep(2000); + } + + return 0; +} + +static int meson_hdmi_phy_power_off(struct phy *phy) +{ + struct meson_hdmi_phy *priv =3D phy_get_drvdata(phy); + + meson_hdmi_phy_set_init_state(priv); + + return 0; +} + +static const struct phy_ops meson_hdmi_phy_ops =3D { + .init =3D meson_hdmi_phy_init, + .configure =3D meson_hdmi_phy_configure, + .validate =3D meson_hdmi_phy_validate, + .power_on =3D meson_hdmi_phy_power_on, + .power_off =3D meson_hdmi_phy_power_off, + .owner =3D THIS_MODULE, +}; + +static struct phy *meson_hdmi_phy_alloc(struct device *dev, + struct regmap *hhi, + const struct meson_hdmi_phy_data *data) +{ + struct meson_hdmi_phy *priv; + struct phy *phy; + + priv =3D devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return ERR_PTR(-ENOMEM); + + priv->hhi =3D hhi; + priv->data =3D data; + + phy =3D devm_phy_create(dev, NULL, &meson_hdmi_phy_ops); + if (IS_ERR(phy)) + return phy; + + phy_set_drvdata(phy, priv); + + return phy; +} + +/* + * DEPRECATED: only for DTs without a "phys" property on the HDMI TX node. + * Remove together with the fallback in meson_dw_hdmi.c. + */ +struct phy *meson_hdmi_phy_create_legacy(struct device *dev, + struct regmap *hhi, + enum meson_hdmi_phy_soc soc) +{ + static const struct meson_hdmi_phy_data *const soc_data[] =3D { + [MESON_HDMI_PHY_GXBB] =3D &gxbb_data, + [MESON_HDMI_PHY_GXL] =3D &gxl_data, + [MESON_HDMI_PHY_G12A] =3D &g12a_data, + }; + + if (soc >=3D ARRAY_SIZE(soc_data)) + return ERR_PTR(-EINVAL); + + return meson_hdmi_phy_alloc(dev, hhi, soc_data[soc]); +} +EXPORT_SYMBOL_GPL(meson_hdmi_phy_create_legacy); + +static int meson_hdmi_phy_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct phy_provider *provider; + struct regmap *hhi; + struct phy *phy; + const struct meson_hdmi_phy_data *data; + + data =3D of_device_get_match_data(dev); + if (!data) + return -EINVAL; + + /* The PHY node is a child of the HHI syscon */ + hhi =3D syscon_node_to_regmap(dev->of_node->parent); + if (IS_ERR(hhi)) + return dev_err_probe(dev, PTR_ERR(hhi), + "failed to get HHI regmap\n"); + + phy =3D meson_hdmi_phy_alloc(dev, hhi, data); + if (IS_ERR(phy)) + return dev_err_probe(dev, PTR_ERR(phy), + "failed to create PHY\n"); + + provider =3D devm_of_phy_provider_register(dev, of_phy_simple_xlate); + + return PTR_ERR_OR_ZERO(provider); +} + +static const struct of_device_id meson_hdmi_phy_of_match[] =3D { + { .compatible =3D "amlogic,meson-gxbb-hdmi-tx-phy", .data =3D &gxbb_data = }, + { .compatible =3D "amlogic,meson-gxl-hdmi-tx-phy", .data =3D &gxl_data }, + { .compatible =3D "amlogic,meson-g12a-hdmi-tx-phy", .data =3D &g12a_data = }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, meson_hdmi_phy_of_match); + +static struct platform_driver meson_hdmi_phy_driver =3D { + .probe =3D meson_hdmi_phy_probe, + .driver =3D { + .name =3D "meson-hdmi-tx-phy", + .of_match_table =3D meson_hdmi_phy_of_match, + }, +}; +module_platform_driver(meson_hdmi_phy_driver); + +MODULE_AUTHOR("Ronald Claveau "); +MODULE_DESCRIPTION("Amlogic Meson HDMI TX PHY driver"); +MODULE_LICENSE("GPL"); diff --git a/include/linux/phy/phy-meson-hdmi-tx.h b/include/linux/phy/phy-= meson-hdmi-tx.h new file mode 100644 index 000000000000..fe76a5f7efdb --- /dev/null +++ b/include/linux/phy/phy-meson-hdmi-tx.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef __PHY_MESON_HDMI_TX_H +#define __PHY_MESON_HDMI_TX_H + +struct device; +struct regmap; + +enum meson_hdmi_phy_soc { + MESON_HDMI_PHY_GXBB, + MESON_HDMI_PHY_GXL, /* GXL and GXM */ + MESON_HDMI_PHY_G12A, +}; + +/* DEPRECATED: compat for DTs without "phys" on the HDMI TX node */ +struct phy *meson_hdmi_phy_create_legacy(struct device *dev, + struct regmap *hhi, + enum meson_hdmi_phy_soc soc); + +#endif /* __PHY_MESON_HDMI_TX_H */ --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288901; b=HEeNWOM2Z0nGmegLkv8sOCJT2IOHrIzXoH5MPJD3UjAw/LRAeqBqSwoXb9Cd6VUmVTHf Yd59Y7mIr9kbAb2TyX52AnR7TGMaY/yLVhxSDRLmJhZqTk9BMkGQnLzUtCxetg1l61NN4 jd+WjXf8RfLB8qGx3+AXgdU7+1D27uaKH+G/K6kEfwAJavscVkfkcSQvkvj7WO/59z5zE p/RSUVAaSY5weP6z3vx11RrMdwyudKqLJufF5YqWlbALpljT473MemAjeVS1Vk7qOvLgD uuGA0mVbY/RYqZ5gALTK+rdpMTGidq7KxIrsQ99SDI3NlUrY5yCyCJ49iRk7Z435/dA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288901; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=y8B3yYureNWw/gPn5TmCorzbaVWuAnwa7i0qf1DFZYY=; b=tNrnKT70VPEcKoai2HvdRe2Mzcrb8beXy3I80Rr4AMar2wq0SLtOzxHTw3aoKQVjiq6A U8Pi5Mw4+7HjizvR5SSGBaSWEc9543Gptqy62wVkUnx+L8j0CG4xCFw5HQGP/BHr8uqJ5 5bP12MKXRcmWbbK63FUvKSxCv2PuiDc4LpZOI2zYDYiYPzwCbcafpu8fGT4NV1s++Yuxx CVLiU/4eS66n4yHC8IogEerdwqHErw+lg3IjRjWGyzb51fbayl7GrFsyUDNwFsIUMIRO5 7N+8RrZJx0JTs490sPJMDtJvP0UzNaaVqJ2vecQxXoKu69WyrRQhpjsQYDPVGgu6FMw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="Gfyt/L77"; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A0E4606A686; Sat, 21 Nov 2026 19:21:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Gfyt/L77 Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288901; b=ctfSfYS1TY2jvfUyMCNYDfzcdnDpBPKatO6mBMP11yMwhboCtm9n2bBV5HGsd1fhk9UD vxPJetIKERxcvj9UgYMfOL0Ztn7tRa11MsVi+7RnnaIxFq9J/5BzYpk7PCiJUFKdiVyHY 4+Gypr5wUFDnNuHBbu+Zx0ierX0A4icViCEd37ibf0Fezxc0dcCYinpZoXj89HsiMHqpQ B5ZseMaLFVj3ROXYxQZZCl/LIe+Vc+g7Yih//SzXkQH+yFEZ9tp9EwduOWyCRNrw8S0JQ HjeGG4/20slCd6pIgNHqPQJw5Omds564ceEx/nhH0avi6/nDrD/oYkxHdZajNCBapfQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288901; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=y8B3yYureNWw/gPn5TmCorzbaVWuAnwa7i0qf1DFZYY=; b=RauRq3OK9QdG1mAnA9qKIMYtY61/J0T+a8OoAkIJixY23ckjl4K6ZT5P7B5BrWBoUIOg qUEip7dKNa4bJdpP94Fn+KiwK6IMKxeGrrpawZNtWBgrmPuMITH7bmR1rm4io7K4ptoa5 ZM4H92imTAhNxGYgAoVNAmn/sPQRyab6luyKmmLvnKsPDVOfylMnjPgLYUvfZLJrcF8wQ g78naQToyq03ZNhSYfdjyOE0CFXv/eOSnRG+1g3N0x1WFHjhyK+ayrNaWVsAscP0ghXKo bLsgahhmV/WXEji/DDQXtK6g/qmuwmcYlK+PMtaHWcO3ynoor/xdIUXxdrCh2poDt5g== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 552CF1F000C4; Sat, 21 Nov 2026 19:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288901; bh=y8B3yYureNWw/gPn5TmCorzbaVWuAnwa7i0qf1DFZYY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=Gfyt/L77OPxb7XqRNZ/MwCIYKHrYVXemBPRFa2HZuINT36lD8tUqqNIkeWkLHcR38 6JXoKWolsTJMsSwp2EonhFEuG9C2HIJLojuVaD6VkHKRL5/lvcYW6+1U4UDIwOq6Eu /4qkoL1Os59GOFRDjLDCKei2Sd8Ju5FiwussODQEYDvp1EcU/Iye9WXK98zbA8alHa +CWQxh6oGS7gQaZuT8DLBa8hQ/Tw5Gi0clfEg1nQZXgXcjUO0877VaiFHKB0PmtHIU xRwYbHPq/r/5AgmjT41W0ksLsuSB0o+z7YpoJZUDE/vIUwRrPF320j0qQKtvIR7RTP W18ptZk+vW7gQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 0AB564BD76; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:07 +0100 Subject: [PATCH v3 05/11] dt-bindings: display: amlogic,meson-dw-hdmi: Add phys X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-5-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1278; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=gEM9bIkhQe1Q+n5KKc7w/RzPzlM5UABBv5gf7bLSb8c=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbje/3swz+nsmXNEqp/PnedSvyH3QLM0/bFblS9fGXyh VSlqsadHaUsDGJcDLJiiiz9cy1PvLt89MzXPeopMHNYmUCGMHBxCsBEeH8w/C9mudjWw7QsxKVC ernK1dDdpr+Zu9TeXrl45LxxRMnTD08Z/sqF3d80P/wUk4p7+ww3Pf73BSVCBWu9JuZH2a/vPnV lHRcA X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau The HDMI TX PHY now has its own binding and driver. Describe the link between the HDMI TX controller and its PHY with a "phys" property holding a single phandle, and update the example accordingly. The property is optional so that existing DT, which do not describe the PHY, keep validating; the driver falls back to creating the PHY itself in that case. Signed-off-by: Ronald Claveau --- Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml | 4 += +++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdm= i.yaml b/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.ya= ml index 416fe263ac92..7ece4ea262bd 100644 --- a/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml +++ b/Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml @@ -108,6 +108,9 @@ properties: =20 sound-name-prefix: true =20 + phys: + maxItems: 1 + required: - compatible - reg @@ -136,6 +139,7 @@ examples: power-domains =3D <&pd_vpu>; #address-cells =3D <1>; #size-cells =3D <0>; + phys =3D <&hdmi_tx_phy>; =20 /* VPU VENC Input */ hdmi_tx_venc_port: port@0 { --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288905; b=msyuoPQ1re4J/ocM3SzoqN2hclsoasUyI8wipsw0TCkpOf/KdO5DMyRrL0yz2XQwabec SWtRqNDVYSBrOd62Npdz5kIPWSucC+UoPx9fCqDzmNep8H9hdkSaoa0crfIrCynqqly72 nfme64NXEg3CsjgrvBQXwsSrgaAFHbcNMhOQ7HqHy6A934mXZRRHGCh2t9fogAd28rP5X RxNldiKUkC7FlBcu3kZa2Dt18PeO8fZH5K0+yHbNdvLLRhitfHgFcewrJ7ZXlEVoAI0dC Zu4llLWpDc+eM3kQbikajz6rrmPw/TWhO0HDdTA4QE9Kd/h9LxkE6NSf2/xUblDSDNQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288905; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=rAgcqIqOw6zcaQD0GaowJvtaNg3/b1Y5Y23WzFleRQ4=; b=cjHrz0asmlDl5gXDzo7192JGPCWkiiyFekq9zu6ICystqeZoXH7SotIXIKdpurF6ci8A A/KpMZQv/vR6GHXEOmR4VmGlQ5C1Yfxm/0jU2qUveuMwLCroqDxOP8NeFIXSPf3NXia2J Ot70n9LBQUhtWRIQLJAz6cXMbcjpOGSGkrX1y/Y3BagJnkPZadE3DlhdjB4qMrlYt59YG jIBux2CCbLoYZQVnSw5R7T1m9B1CpYiAtfgU+oNYgT3+f+409QV21LFv/hhOXW1wbJKpy acy8O6XTgP03GuHWuymEKKYkJwF6oQlH4MZdr+29RDxvLGuahWMKQqGKLRyFkez1D4g== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=JlEBdC2H; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0B4C606A33E; Sat, 21 Nov 2026 19:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=JlEBdC2H Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288905; b=Yt2V6k8/DXdclqCos7oC1WThjl5gk983RApxu3TFT/X9qQJCidGF7HsyTLMIEAzEFUmy 42Jh4bhCLxcs+CCFJTl7peLd0ewERxoSdfitFlvH1ojC1iA5rzk2T5MXzaJfaaGfOuSO0 /+mI0ViWOPSeJVH27dFmKYZhw/8qmk/pbVuGcBZOPMsNhlQ7e3h7QVYnpNKMKtTfLS3sP IO5zhDUKFfkfhVy/prp7Wp7Q8/bRcM5XTX89bNkEvk0plNTMq/dCgM1WSl1iL0Wtuq5Sp sX/ZV6SbloJvEvd3WqfPHkY0+gthWha6dBPgXSBp1KBVflQs4VFtG/XapTGLq4HK4Mw== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288905; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=rAgcqIqOw6zcaQD0GaowJvtaNg3/b1Y5Y23WzFleRQ4=; b=dw871ckaIm0LZXCEb4Gvd2tHAtW2/jXCsZVdwsva40EQgmr/iztj/id6+DeiqOWXl8CT 2ckVSoRqg5mbiJZP7jBAKMdB+waQenajktOElizDIdqARbkSJMzsvJv6dUpbWiK3YdSMq MZhgshH1tu5mXy1eyvL3zmMlp+P9OjncXI8YAQgpM09c+QpSC6QGYSyYqWNgGFKoZ9Bf6 y8qFJ0T+ofVDimlpOOBfg6rFFTdNIXsi5GcyZdXNEBNLqSbApYvTLORRj61dVqsomSnLM KrT795xkcNmv5QeuLmYE2u2n+Ib7C1hQkF0sCTypwTOXcVkbY/usUC0H2eyp3b4sgbQ== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 5A1031F000D3; Sat, 21 Nov 2026 19:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288905; bh=rAgcqIqOw6zcaQD0GaowJvtaNg3/b1Y5Y23WzFleRQ4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=JlEBdC2H/30seFlcxFGPk7ym6bF9oBRq4CAuAOeBkV2JdBxUxIUlRzG5kWpygthN7 I938eLXO4oEE5N8KFFY4HmLe08dL+K4tx9P3Dc51lzL1oF6ZEGWB9Q0F4P/llVoOOE OEKRLKsUV2YUqyrNst38FvGsqro0+u91e6CQ/csJTmUtW/EwLu0WjKSJ/gElBctvbV r9srK660KdXfgt5cYCIYRNxixW95dPCPN6INU5RGjbChQiCqqalOBu1VBXZwB+GWIy ls3QqRQi3mVbgGKg8q+2z60H5iusFAAripsVAfPspC1kA5b9Qpe7jjHgsFjFNUGKV4 Zm+XPN+ddC0vg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 257064BD7A; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:08 +0100 Subject: [PATCH v3 06/11] pmdomain: amlogic: meson-ee-pwrc: power up memories for boot-enabled domains X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-6-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2681; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=2pSroicxmn87L6WpeMI1TQ71NJdXRXfygd9gmAxHGRQ=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbjeyNd/pLbHSLbNC9O7Kpl3LCmtWPdlw0x26Z8ct2+b F4R+4KjHaUsDGJcDLJiiiz9cy1PvLt89MzXPeopMHNYmUCGMHBxCsBEShIY/rtH9t6YeTTJafnp 9R9ffZ8eufZx5l6Jn+wuL6YyvprF2HqV4Z99JNPl6lw7zxLnFWsfzZ+R/Cy0M3Zmq7DQ/47JSc8 2PuQBAA== X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau When a power domain is found already powered on at probe time (typically the VPU domain left enabled by the bootloader), the driver registers the genpd in the ON state with GENPD_FLAG_ALWAYS_ON and never calls meson_ee_pwrc_on(). As a result, the memory power-down bits of the domain are not touched. pwrc_ee_is_powered_off() only checks the top-level sleep bit, so a bootloader that enabled the VPU without waking every memory block leaves those memories powered down, and nothing in the genpd framework will wake them since pm_runtime_resume_and_get() is a no-op for an always-on domain. This is a preparatory change: a following patch drops the explicit HHI_MEM_PD_REG0 write from the meson_dw_hdmi driver, which relies on the power domain to power the HDMITX memory. Signed-off-by: Ronald Claveau --- drivers/pmdomain/amlogic/meson-ee-pwrc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/pmdomain/amlogic/meson-ee-pwrc.c b/drivers/pmdomain/am= logic/meson-ee-pwrc.c index 338f70d77bf0..b3ae5cd7bea8 100644 --- a/drivers/pmdomain/amlogic/meson-ee-pwrc.c +++ b/drivers/pmdomain/amlogic/meson-ee-pwrc.c @@ -392,11 +392,21 @@ static int meson_ee_pwrc_off(struct generic_pm_domain= *domain) return 0; } =20 +static void meson_ee_pwrc_mem_power_up(struct meson_ee_pwrc_domain *dom) +{ + int i; + + for (i =3D 0; i < dom->desc.mem_pd_count; i++) + regmap_update_bits(dom->pwrc->regmap_hhi, + dom->desc.mem_pd[i].reg, + dom->desc.mem_pd[i].mask, 0); +} + static int meson_ee_pwrc_on(struct generic_pm_domain *domain) { struct meson_ee_pwrc_domain *pwrc_domain =3D container_of(domain, struct meson_ee_pwrc_domain, base); - int i, ret; + int ret; =20 if (pwrc_domain->desc.top_pd) regmap_update_bits(pwrc_domain->pwrc->regmap_ao, @@ -404,10 +414,7 @@ static int meson_ee_pwrc_on(struct generic_pm_domain *= domain) pwrc_domain->desc.top_pd->sleep_mask, 0); udelay(20); =20 - for (i =3D 0 ; i < pwrc_domain->desc.mem_pd_count ; ++i) - regmap_update_bits(pwrc_domain->pwrc->regmap_hhi, - pwrc_domain->desc.mem_pd[i].reg, - pwrc_domain->desc.mem_pd[i].mask, 0); + meson_ee_pwrc_mem_power_up(pwrc_domain); =20 udelay(20); =20 @@ -478,6 +485,8 @@ static int meson_ee_pwrc_init_domain(struct platform_de= vice *pdev, * prepare/enable counters won't be in sync. */ if (dom->num_clks && dom->desc.is_powered_off && !dom->desc.is_powered_of= f(dom)) { + meson_ee_pwrc_mem_power_up(dom); + ret =3D clk_bulk_prepare_enable(dom->num_clks, dom->clks); if (ret) return ret; --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288904; b=UjxS9zAMDnG8B7OyOw24/C2bPs4BnudOtTOA8HklW1PizwN0LgXQZXHlI3heRZ/PeoJe 4wkHWaSnHk0RxEdpJjE/Xw6KzHWs9eLcKNy5kOk0/lwxJo8EwDoxVTIRiVkct74//FM5b qZAQutp1noRT5O3XRzSCzTWXG7unFTXzDvNDnFZupQfw52O5PIiqadvIczV5q+l6lGYPW yxTjezTn3dDeYSWoL/uKov+iD2qSx5rS/15o5Kq4rmJzvnPMaHJo49EiFiw65zIW5YXKv 6CWnhUVzQLKVlouERnzrmQFpQ3Ic+UmQbRqUmeAf2h4uU1rXjhQVApyXMI/Eipp5bng== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288904; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=jnPu9C8U78zwh2haTTxt6kMsYkBetNfurHLTgZHI+MM=; b=LMYKZnN55DyVHr2RjcR43Ro2RE4spwCQ/rlCGI97wdg1/ubdSjkPr5U0y5tXfOUHCTA2 /gxXppBihiKP03HrFy6Esn6qv7zoae7C4GLt2bbPY2h7InJ1Po9RUUfgqfLuZhchdM1h8 fLObPZdb9XVc3n8L3xeAE5zB+oMoI4RuUoIBMTIMQwXEqyVF6zP99+Nb46DPKDYjDI3iT r+OnMVsMEsUnvJHYaT3q7GSlvAlFlN6a6cdC6ysZ1rFF4kTAegcee8QfUWjqt7qgViBO3 TdjMaqXjSbGf4eJ/JzyfMXbSeyLQdm8i7UGvl7ieY4iyAJMJ2a/99Pt13PY9w07usuA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=oru2Ae+a; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D48D3606A33D; Sat, 21 Nov 2026 19:21:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=oru2Ae+a Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288904; b=HjEimbA8kNlnLxNZOoiOBaW14cnprR5jm3uYpW5VvnuJmm2jSYzBCgOw8rVFtuKscAB1 JBncKBMm+YUrKeiXU7+yMrLXPWScE8Zbz6riW5BvR9J0iD0PokCsloHUkYK7TnUlTuVNB BcEqMhUdJS3ZOpm1sNvvZOnmX2/rfHwgs5mUdC/yFIActmHn4i+ek3tulwlsRe+7PaRME FKRaOUuM3jNELi+FzIJcdIpTNIz7PV0TkDVeWMmP8kbPeT1tHCWUZfPPocJkFwBED1/z4 DTtiWMe++n25IYZPpGQLcusmtJsLsd7/cLsegkkuDbdNEDMou6BMHcTHa7qInmhhwQg== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288904; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=jnPu9C8U78zwh2haTTxt6kMsYkBetNfurHLTgZHI+MM=; b=YiPnsH0CXAw8s3a5s1RL8q20ZEP2ieU2qCs6m8tvTXeodFEwpT/1w1W9tdYmuU8bKtJq TOhKKuwsrLnVJdk2nMrJ6GcO9ewAY5mAz9ZF3RaL7ZKVNgdFJsToiAxrIb1l0zKEvFh0q U9yALxWo9+qLjDR529foOa6Lw8wsSva4hUE2hLEuZR/c6HrUh24kwtnFEt1ZgXaTZdDPA blK7j/fMm67K1Az2yEMdqht48KFit/xnnlbOlxPdOb7SF7TzgH30esrZv9bvpFVRnJiBO 51ywnhQKjSf4YL0fXB35WVowU9MO/b1zbvTR52DHbhJOANmYv8A1XsX6QT5KESMVN0A== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 871341F000EB; Sat, 21 Nov 2026 19:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288904; bh=jnPu9C8U78zwh2haTTxt6kMsYkBetNfurHLTgZHI+MM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=oru2Ae+ajoP0yRJ8H5yYpzPqDzukwm3xtyKfFnnnwsmrFv/uujfjQim2ZSYxBsQ6e SqWwryQUX+wdES8i/hPul9O+dq7omNjJeldCmO+AAQIcWZ7S/JDazqXvpasdGm9maV As+V4ArixMK+zzA6AWoVCxbhKMe9ZXzEIW8XLioH3Z6tmr2K2pZ/1jtwTEXeJFgOVT 6171kSwjes731BVzDGM/2vdwg0vfUu1ffxKiMFj5rfyr3joKQAOyRpU13tctnRmdPJ OTHHySRhxzKTKaCWfaIoh7vre/z9CYqULJk35icMp2vRVurb04kMcPxY1O2Qu9gDJd DeArtZe8RRn2g== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 3FCEE4BD7E; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:09 +0100 Subject: [PATCH v3 07/11] drm/meson: dw-hdmi: Drop manual HHI clock and memory PD setup X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-7-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4251; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=Va7r71zAoY5+1f1lapvKRBrSntc7NXGNh523dnCyfas=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbje9OcD/7Kd5K+Zr+Wmi6e4TxZJFfbXuGk1eTZf6ed2 TTR//z+jlIWBjEuBlkxRZb+uZYn3l0+eubrHvUUmDmsTCBDGLg4BWAinq2MDDtub9yuddBV4GYX 3+89ChqamQ+PsBc3H31U7iZ+q0Ujh5vhn0bKxpu7Cmw/eJQ0Giy68ZzpEDv/5iNPNPPTQqR83qs k8QAA X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau meson_dw_hdmi_init() programs two HHI registers by hand: the HDMI clock mux/divider/gate (HHI_HDMI_CLK_CNTL) and the HDMITX memory power-down bits (HHI_MEM_PD_REG0). Both are already covered by resources described in the DT: - the HDMI clock is selected and rated through assigned-clocks (CLKID_HDMI_SEL parented to xtal, CLKID_HDMI at 24 MHz), and gated through the "isfr" clock, which the driver already enables at bind time; - the memory power-down bits are handled by the VPU power domain referenced by "power-domains". Remove the open-coded register writes. Take an explicit runtime PM reference in probe and release it on removal, so that the domain is guaranteed to be on for the lifetime of the device. The driver now relies on runtime PM to power the HDMITX memory, so make it depend on PM. Those properties are optional in the binding and were only added to the in-tree DTs in v6.11, so DTs without them would no longer get the registers programmed by the kernel. This is not a concern in practice: - the DT used by the kernel often comes from U-Boot, which used a DT based on Linux v6.2 before v2024.07 and has used the DT synchronized with Linux since then, matching the v6.11 DT with the clock changes; - U-Boot already sets HHI_HDMI_CLK_CNTL and HHI_MEM_PD_REG0 when probing dw_hdmi, since v2019.04, so both registers are already in the expected state when Linux boots, even with an older U-Boot and DT. The risk of regression is therefore very low. Signed-off-by: Ronald Claveau --- drivers/gpu/drm/meson/Kconfig | 1 + drivers/gpu/drm/meson/meson_dw_hdmi.c | 31 ++++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/meson/Kconfig b/drivers/gpu/drm/meson/Kconfig index 417f79829cf8..6645665f6038 100644 --- a/drivers/gpu/drm/meson/Kconfig +++ b/drivers/gpu/drm/meson/Kconfig @@ -17,6 +17,7 @@ config DRM_MESON config DRM_MESON_DW_HDMI tristate "HDMI Synopsys Controller support for Amlogic Meson Display" depends on DRM_MESON + depends on PM default y if DRM_MESON select DRM_DW_HDMI imply DRM_DW_HDMI_I2S_AUDIO diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/= meson_dw_hdmi.c index eb33c70f29c3..20a821936b3a 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include =20 @@ -102,8 +103,6 @@ #define HDMITX_DWC_CTRL_REG 0x18 =20 /* HHI Registers */ -#define HHI_MEM_PD_REG0 0x100 /* 0x40 */ -#define HHI_HDMI_CLK_CNTL 0x1cc /* 0x73 */ #define HHI_HDMI_PHY_CNTL0 0x3a0 /* 0xe8 */ #define HHI_HDMI_PHY_CNTL1 0x3a4 /* 0xe9 */ #define PHY_CNTL1_INIT 0x03900000 @@ -599,12 +598,6 @@ static void meson_dw_hdmi_init(struct meson_dw_hdmi *m= eson_dw_hdmi) { struct meson_drm *priv =3D meson_dw_hdmi->priv; =20 - /* Enable clocks */ - regmap_update_bits(priv->hhi, HHI_HDMI_CLK_CNTL, 0xffff, 0x100); - - /* Bring HDMITX MEM output of power down */ - regmap_update_bits(priv->hhi, HHI_MEM_PD_REG0, 0xff << 8, 0); - /* Reset HDMITX APB & TX & PHY */ reset_control_reset(meson_dw_hdmi->hdmitx_apb); reset_control_reset(meson_dw_hdmi->hdmitx_ctrl); @@ -829,9 +822,29 @@ static int __maybe_unused meson_dw_hdmi_pm_resume(stru= ct device *dev) return 0; } =20 +static void meson_dw_hdmi_pm_put(void *dev) +{ + pm_runtime_put_sync(dev); +} + static int meson_dw_hdmi_probe(struct platform_device *pdev) { - return component_add(&pdev->dev, &meson_dw_hdmi_ops); + struct device *dev =3D &pdev->dev; + int ret; + + ret =3D devm_pm_runtime_enable(dev); + if (ret) + return ret; + + ret =3D pm_runtime_resume_and_get(dev); + if (ret) + return dev_err_probe(dev, ret, "Failed to power on HDMI TX\n"); + + ret =3D devm_add_action_or_reset(dev, meson_dw_hdmi_pm_put, dev); + if (ret) + return ret; + + return component_add(dev, &meson_dw_hdmi_ops); } =20 static void meson_dw_hdmi_remove(struct platform_device *pdev) --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288907; b=pb3wtI1I3hajn/qsd97Ab4N3etvTkm7G62eVtnrUoWdXmzD91gfacD6EHLaQVQoSHfRL vom1KuwW+KAtVeLgnZZsWShXC9BpfGivgRi0zmCszRvAPeB3Ezu3eQxauqMdJLVqBdSNM T52LZE1Uu06V4tQ1pogcuCp3m6qzCV0ckSapVWd7pTogVTD3a/6a7CwPOQtjaRmYSQmzI Gahnc1QZhJTSqgujTQNTOre2ybm9e8SQ/2a9bSLxABvmkeQ6ry2YTQm4WcQ75qfnajFQF Via0soVKcLOE3MdhkRi8hUQDHQEwdxGp8PW/kzvTY+ODKoW3Om3AA4S2z0mKAOlMJpg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288907; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=JcF6fLn4VkJ18TtLyCFTasbgfJIsZipHTF+q+kaMHNE=; b=Ey4jxu15lGo4FzII/FmQRp1CxIXunUupUhgoa7//5+el+k5Tw93Pdq3LlbmdcITxKG2f S9PHO8Zo27sP/tjYmXhqFIyCiwH07XZCDc4RZOEddQxDoeegu1zi6oKbw+9nEJQcSBVoT 6c5J7v/SW1BptWHpaBXdhDfnzy7k82zW8vIB/59hKD7gsLT/VBgFXrV3ARrgFSquzlDbK pu0u+8eePU9f8Iv49bxbWYu1EkterxSthpOt+LutGKS2wBqm0e86Z+hWw3i0VhwkXpxYT drxIVv7SUb8K9GK6MaKgt9UWzUjpeq3IoLkai1baacMJ4y4TRuADaXItnh50MwnoQ+w== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OE2dDjhy; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22FA460A2624; Sat, 21 Nov 2026 19:21:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OE2dDjhy Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288906; b=QISBvxizIC6TzaRa+s35l51/95LLV6ACRwqVVmMA29d71SNRITvSwuIqeC+MAXFbsG62 DO5tUX6CgeGOiwz1oIvpfjwAAXWXljnUYQqGIPnKsycmUk2TAnbJlPqY6QZTTntQJoIeg sgSHFd4HzVXvcHM0oedp8xSiXuhL7OeqPnwAWSEdFlaNo5BNa43UU27/gUDwn+kE8qHD4 Q/xYAkb1uEL0dmBZgSrFVT0RTs0mCyQl9Ive4mqkIN8kl+JcHh1I7s+1EnrpO7JscQgrr TfNFVpTUgSMsRZMDJlK729f53XifvLPzCP8R1qyFJJukvTRrJPTPepRf2BkQJ9bYeAg== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288906; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=JcF6fLn4VkJ18TtLyCFTasbgfJIsZipHTF+q+kaMHNE=; b=MLQGKW/YlP218gD6jd3eH5fEjSg4pc30LtwQF2dUtCk7YoKFtz0/8Zp0x9WcEcROwPQO EPNqQhGn65mTA3+y28dAab5QRKZtaOGxQFXt0/fZHKi+CU3BaBC/IYqb29dhxwwxEyEWZ vdaCKjy3pGUO5wOug14f3epZZ8osyeXuT6cH2XBT2pVPEid5Zl0oO/0gmHmTL2VGpy+Ng JtttEyvAaYETrNGti2T80U3yQ7HXG7Y8Hwczn7/0oYrKCP4H4OOtwSnmilBMDzRE54w7E o0MpY2qvn6RD1x11yMYuzo4kgDO7/GkcYWiunZ01KTaVr97VWvkgGIyGH7W7pLZ3BQA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 89F161F000EC; Sat, 21 Nov 2026 19:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288906; bh=JcF6fLn4VkJ18TtLyCFTasbgfJIsZipHTF+q+kaMHNE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=OE2dDjhykE/qCHSDfxaOU+M8wbLqhQT6PZyb5bp+MnTbyrFiNrMkFAEU8KhJOBykm MBGRueyFNSczAMXZq32Eff/dTn2DFjM0H2Rpu+nBBtObQpl59/dzxWcP/Qo4mOFIpf u3HqQ7aCHyKb8RFN7He0tqyRbE2TPQTNoQbEEbkay+3UVgK6tMzLWsyZe69NoHfWBr HBkXqBfPCU4qngJYu5iO2jhqOUTNS5fm0K5sdE1N9HHhY232KGOfAi3+n+5WV7VyH4 Iu8UBnIG6MGRDs84T/nqIZzdJwXsK1Ni97fkrbGbnnXs0norQBE8+nj2kv4LbWNhSa MEcrbJSoUi+zw== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 5A9E44BD82; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:10 +0100 Subject: [PATCH v3 08/11] drm/meson: dw-hdmi: Use the generic PHY framework for the HDMI TX PHY X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-8-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=14247; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=GJkl6VMOnfSdsz1EBgoKYCe54isY/+geQo7fT6Vwv3M=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbje/P7AotkJpj91g3daZaV79se+fmF/Yp+yU23Jj3jm /eqt1a5o5SFQYyLQVZMkaV/ruWJd5ePnvm6Rz0FZg4rE8gQBi5OAZjIVFOG/66dvsFxFpOq86ev 05/IllT81zmmte+kUvXdTXZSLhzh8xn+5971as7flVuZIh7safKTY4rOt1mLmXlcFW7c+RL/MPs yBwA= X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau The HDMI TX PHY registers (HHI_HDMI_PHY_CNTL0..5) were programmed directly from this driver, with per-SoC tables selected by compatible string. A dedicated PHY driver now exists, so use it through the generic PHY API instead: - phy_init() replaces the initial CNTL0/CNTL1 programming, - phy_configure() replaces meson_hdmi_phy_setup_mode(), the TMDS character rate being derived from the (possibly 4:2:0 halved) pixel clock, with 8 bpc as before, - phy_power_on() replaces the three successive PHY resets, - phy_power_off() replaces the fallback to the initial state in dw_hdmi_phy_disable(). The "hdmi" PHY is looked up through the "phys" property of the HDMI TX node. Device trees that do not provide it keep working: in that case the PHY is created by this driver through meson_hdmi_phy_create_legacy(), using a per-SoC identifier replacing the former cntl0_init/cntl1_init fields, and a warning is printed. This fallback is deprecated and will be removed once all device trees have been converted. meson_dw_hdmi_init() can now fail, so propagate its return value from probe and resume. Select PHY_MESON_HDMI_TX in Kconfig since the driver now depends on it, including for the legacy path. Add a device link with vpu as consumer and hdmi-tx as supplier to get the correct order on suspend/resume. Signed-off-by: Ronald Claveau --- drivers/gpu/drm/meson/Kconfig | 1 + drivers/gpu/drm/meson/meson_dw_hdmi.c | 191 +++++++++++++-----------------= ---- 2 files changed, 75 insertions(+), 117 deletions(-) diff --git a/drivers/gpu/drm/meson/Kconfig b/drivers/gpu/drm/meson/Kconfig index 6645665f6038..a91cf851314a 100644 --- a/drivers/gpu/drm/meson/Kconfig +++ b/drivers/gpu/drm/meson/Kconfig @@ -20,6 +20,7 @@ config DRM_MESON_DW_HDMI depends on PM default y if DRM_MESON select DRM_DW_HDMI + select PHY_MESON_HDMI_TX imply DRM_DW_HDMI_I2S_AUDIO =20 config DRM_MESON_DW_MIPI_DSI diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/= meson_dw_hdmi.c index 20a821936b3a..8fdb997c28b4 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include #include @@ -102,16 +104,6 @@ #define HDMITX_DWC_DATA_REG 0x14 #define HDMITX_DWC_CTRL_REG 0x18 =20 -/* HHI Registers */ -#define HHI_HDMI_PHY_CNTL0 0x3a0 /* 0xe8 */ -#define HHI_HDMI_PHY_CNTL1 0x3a4 /* 0xe9 */ -#define PHY_CNTL1_INIT 0x03900000 -#define PHY_INVERT BIT(17) -#define HHI_HDMI_PHY_CNTL2 0x3a8 /* 0xea */ -#define HHI_HDMI_PHY_CNTL3 0x3ac /* 0xeb */ -#define HHI_HDMI_PHY_CNTL4 0x3b0 /* 0xec */ -#define HHI_HDMI_PHY_CNTL5 0x3b4 /* 0xed */ - static DEFINE_SPINLOCK(reg_lock); =20 enum meson_venc_source { @@ -131,8 +123,7 @@ struct meson_dw_hdmi_data { unsigned int addr); void (*dwc_write)(struct meson_dw_hdmi *dw_hdmi, unsigned int addr, unsigned int data); - u32 cntl0_init; - u32 cntl1_init; + enum meson_hdmi_phy_soc phy_soc; /* legacy PHY only */ }; =20 struct meson_dw_hdmi { @@ -147,6 +138,8 @@ struct meson_dw_hdmi { u32 irq_stat; struct dw_hdmi *hdmi; struct drm_bridge *bridge; + struct phy *phy; + bool legacy_phy; }; =20 static inline int dw_hdmi_is_compatible(struct meson_dw_hdmi *dw_hdmi, @@ -273,87 +266,6 @@ static inline void dw_hdmi_g12a_dwc_write(struct meson= _dw_hdmi *dw_hdmi, =20 /* Bridge */ =20 -/* Setup PHY bandwidth modes */ -static void meson_hdmi_phy_setup_mode(struct meson_dw_hdmi *dw_hdmi, - const struct drm_display_mode *mode, - bool mode_is_420) -{ - struct meson_drm *priv =3D dw_hdmi->priv; - unsigned int pixel_clock =3D mode->clock; - - /* For 420, pixel clock is half unlike venc clock */ - if (mode_is_420) pixel_clock /=3D 2; - - if (dw_hdmi_is_compatible(dw_hdmi, "amlogic,meson-gxl-dw-hdmi") || - dw_hdmi_is_compatible(dw_hdmi, "amlogic,meson-gxm-dw-hdmi")) { - if (pixel_clock >=3D 371250) { - /* 5.94Gbps, 3.7125Gbps */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x333d3282); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0x2136315b); - } else if (pixel_clock >=3D 297000) { - /* 2.97Gbps */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x33303382); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0x2036315b); - } else if (pixel_clock >=3D 148500) { - /* 1.485Gbps */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x33303362); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0x2016315b); - } else { - /* 742.5Mbps, and below */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x33604142); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0x0016315b); - } - } else if (dw_hdmi_is_compatible(dw_hdmi, - "amlogic,meson-gxbb-dw-hdmi")) { - if (pixel_clock >=3D 371250) { - /* 5.94Gbps, 3.7125Gbps */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x33353245); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0x2100115b); - } else if (pixel_clock >=3D 297000) { - /* 2.97Gbps */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x33634283); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0xb000115b); - } else { - /* 1.485Gbps, and below */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x33632122); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0x2000115b); - } - } else if (dw_hdmi_is_compatible(dw_hdmi, - "amlogic,meson-g12a-dw-hdmi")) { - if (pixel_clock >=3D 371250) { - /* 5.94Gbps, 3.7125Gbps */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x37eb65c4); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0x2ab0ff3b); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL5, 0x0000080b); - } else if (pixel_clock >=3D 297000) { - /* 2.97Gbps */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x33eb6262); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0x2ab0ff3b); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL5, 0x00000003); - } else { - /* 1.485Gbps, and below */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, 0x33eb4242); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL3, 0x2ab0ff3b); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL5, 0x00000003); - } - } -} - -static inline void meson_dw_hdmi_phy_reset(struct meson_dw_hdmi *dw_hdmi) -{ - struct meson_drm *priv =3D dw_hdmi->priv; - - /* Enable and software reset */ - regmap_update_bits(priv->hhi, HHI_HDMI_PHY_CNTL1, 0xf, 0xf); - - mdelay(2); - - /* Enable and unreset */ - regmap_update_bits(priv->hhi, HHI_HDMI_PHY_CNTL1, 0xf, 0xe); - - mdelay(2); -} - static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data, const struct drm_display_info *display, const struct drm_display_mode *mode) @@ -364,6 +276,9 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void = *data, unsigned int wr_clk =3D readl_relaxed(priv->io_base + _REG(VPU_HDMI_SETTING)); bool mode_is_420 =3D false; + unsigned int pixel_clock =3D mode->clock; + union phy_configure_opts opts =3D {}; + int ret; =20 DRM_DEBUG_DRIVER("\"%s\" div%d\n", mode->name, mode->clock > 340000 ? 40 : 10); @@ -392,19 +307,22 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, voi= d *data, dw_hdmi->data->top_write(dw_hdmi, HDMITX_TOP_TMDS_CLK_PTTN_CNTL, 0x2); =20 /* Setup PHY parameters */ - meson_hdmi_phy_setup_mode(dw_hdmi, mode, mode_is_420); - - /* Disable clock, fifo, fifo_wr */ - regmap_update_bits(priv->hhi, HHI_HDMI_PHY_CNTL1, 0xf, 0); + if (mode_is_420) + pixel_clock /=3D 2; + opts.hdmi.tmds_char_rate =3D (u64)pixel_clock * 1000; + opts.hdmi.bpc =3D 8; + ret =3D phy_configure(dw_hdmi->phy, &opts); + if (ret) + return ret; =20 dw_hdmi_set_high_tmds_clock_ratio(hdmi, display); =20 msleep(100); =20 /* Reset PHY 3 times in a row */ - meson_dw_hdmi_phy_reset(dw_hdmi); - meson_dw_hdmi_phy_reset(dw_hdmi); - meson_dw_hdmi_phy_reset(dw_hdmi); + ret =3D phy_power_on(dw_hdmi->phy); + if (ret) + return ret; =20 /* Temporary Disable VENC video stream */ if (priv->venc.hdmi_use_enci) @@ -443,13 +361,11 @@ static void dw_hdmi_phy_disable(struct dw_hdmi *hdmi, void *data) { struct meson_dw_hdmi *dw_hdmi =3D (struct meson_dw_hdmi *)data; - struct meson_drm *priv =3D dw_hdmi->priv; =20 DRM_DEBUG_DRIVER("\n"); =20 /* Fallback to init mode */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL1, dw_hdmi->data->cntl1_init); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, dw_hdmi->data->cntl0_init); + phy_power_off(dw_hdmi->phy); } =20 static enum drm_connector_status dw_hdmi_read_hpd(struct dw_hdmi *hdmi, @@ -572,8 +488,7 @@ static const struct meson_dw_hdmi_data meson_dw_hdmi_gx= bb_data =3D { .top_write =3D dw_hdmi_top_write, .dwc_read =3D dw_hdmi_dwc_read, .dwc_write =3D dw_hdmi_dwc_write, - .cntl0_init =3D 0x0, - .cntl1_init =3D PHY_CNTL1_INIT | PHY_INVERT, + .phy_soc =3D MESON_HDMI_PHY_GXBB, }; =20 static const struct meson_dw_hdmi_data meson_dw_hdmi_gxl_data =3D { @@ -581,8 +496,7 @@ static const struct meson_dw_hdmi_data meson_dw_hdmi_gx= l_data =3D { .top_write =3D dw_hdmi_top_write, .dwc_read =3D dw_hdmi_dwc_read, .dwc_write =3D dw_hdmi_dwc_write, - .cntl0_init =3D 0x0, - .cntl1_init =3D PHY_CNTL1_INIT, + .phy_soc =3D MESON_HDMI_PHY_GXL, }; =20 static const struct meson_dw_hdmi_data meson_dw_hdmi_g12a_data =3D { @@ -590,13 +504,13 @@ static const struct meson_dw_hdmi_data meson_dw_hdmi_= g12a_data =3D { .top_write =3D dw_hdmi_g12a_top_write, .dwc_read =3D dw_hdmi_g12a_dwc_read, .dwc_write =3D dw_hdmi_g12a_dwc_write, - .cntl0_init =3D 0x000b4242, /* Bandgap */ - .cntl1_init =3D PHY_CNTL1_INIT, + .phy_soc =3D MESON_HDMI_PHY_G12A, }; =20 -static void meson_dw_hdmi_init(struct meson_dw_hdmi *meson_dw_hdmi) +static int meson_dw_hdmi_init(struct meson_dw_hdmi *meson_dw_hdmi) { struct meson_drm *priv =3D meson_dw_hdmi->priv; + int ret; =20 /* Reset HDMITX APB & TX & PHY */ reset_control_reset(meson_dw_hdmi->hdmitx_apb); @@ -624,8 +538,9 @@ static void meson_dw_hdmi_init(struct meson_dw_hdmi *me= son_dw_hdmi) meson_dw_hdmi->data->top_write(meson_dw_hdmi, HDMITX_TOP_BIST_CNTL, BIT(1= 2)); =20 /* Setup PHY */ - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL1, meson_dw_hdmi->data->cntl1_in= it); - regmap_write(priv->hhi, HHI_HDMI_PHY_CNTL0, meson_dw_hdmi->data->cntl0_in= it); + ret =3D phy_init(meson_dw_hdmi->phy); + if (ret) + return ret; =20 /* Enable HDMI-TX Interrupt */ meson_dw_hdmi->data->top_write(meson_dw_hdmi, HDMITX_TOP_INTR_STAT_CLR, @@ -634,6 +549,7 @@ static void meson_dw_hdmi_init(struct meson_dw_hdmi *me= son_dw_hdmi) meson_dw_hdmi->data->top_write(meson_dw_hdmi, HDMITX_TOP_INTR_MASKN, HDMITX_TOP_INTR_CORE); =20 + return 0; } =20 static void meson_disable_clk(void *data) @@ -664,10 +580,11 @@ static int meson_dw_hdmi_bind(struct device *dev, str= uct device *master, { struct platform_device *pdev =3D to_platform_device(dev); const struct meson_dw_hdmi_data *match; + struct dw_hdmi_plat_data *dw_plat_data; struct meson_dw_hdmi *meson_dw_hdmi; + struct device_link *link; struct drm_device *drm =3D data; struct meson_drm *priv =3D drm->dev_private; - struct dw_hdmi_plat_data *dw_plat_data; int irq; int ret; =20 @@ -746,7 +663,26 @@ static int meson_dw_hdmi_bind(struct device *dev, stru= ct device *master, return ret; } =20 - meson_dw_hdmi_init(meson_dw_hdmi); + meson_dw_hdmi->phy =3D devm_phy_optional_get(dev, NULL); + if (IS_ERR(meson_dw_hdmi->phy)) + return dev_err_probe(dev, PTR_ERR(meson_dw_hdmi->phy), + "failed to get HDMI PHY\n"); + + if (!meson_dw_hdmi->phy) { + /* DEPRECATED: DT without "phys" */ + dev_warn(dev, "missing \"phys\", using legacy HDMI PHY\n"); + meson_dw_hdmi->phy =3D meson_hdmi_phy_create_legacy(dev, priv->hhi, + meson_dw_hdmi->data->phy_soc); + if (IS_ERR(meson_dw_hdmi->phy)) + return dev_err_probe(dev, PTR_ERR(meson_dw_hdmi->phy), + "failed to create legacy HDMI PHY\n"); + + meson_dw_hdmi->legacy_phy =3D true; + } + + ret =3D meson_dw_hdmi_init(meson_dw_hdmi); + if (ret) + return ret; =20 /* Bridge / Connector */ =20 @@ -767,14 +703,26 @@ static int meson_dw_hdmi_bind(struct device *dev, str= uct device *master, platform_set_drvdata(pdev, meson_dw_hdmi); =20 meson_dw_hdmi->hdmi =3D dw_hdmi_probe(pdev, &meson_dw_hdmi->dw_plat_data); - if (IS_ERR(meson_dw_hdmi->hdmi)) - return PTR_ERR(meson_dw_hdmi->hdmi); + if (IS_ERR(meson_dw_hdmi->hdmi)) { + ret =3D PTR_ERR(meson_dw_hdmi->hdmi); + goto err_hdmi_probe; + } =20 meson_dw_hdmi->bridge =3D of_drm_find_and_get_bridge(pdev->dev.of_node); =20 + link =3D device_link_add(master, dev, DL_FLAG_STATELESS); + if (!link) + dev_warn(dev, "failed to link HDMI (supplier) to DRM master (consumer)\n= "); + DRM_DEBUG_DRIVER("HDMI controller initialized\n"); =20 return 0; + +err_hdmi_probe: + phy_exit(meson_dw_hdmi->phy); + phy_destroy(meson_dw_hdmi->phy); + + return ret; } =20 static void meson_dw_hdmi_unbind(struct device *dev, struct device *master, @@ -786,6 +734,10 @@ static void meson_dw_hdmi_unbind(struct device *dev, s= truct device *master, =20 devm_free_irq(dev, irq, meson_dw_hdmi); dw_hdmi_unbind(meson_dw_hdmi->hdmi); + + phy_exit(meson_dw_hdmi->phy); + if (meson_dw_hdmi->legacy_phy) + devm_phy_destroy(dev, meson_dw_hdmi->phy); drm_bridge_put(meson_dw_hdmi->bridge); } =20 @@ -801,6 +753,8 @@ static int __maybe_unused meson_dw_hdmi_pm_suspend(stru= ct device *dev) if (!meson_dw_hdmi) return 0; =20 + phy_exit(meson_dw_hdmi->phy); + /* Reset TOP */ meson_dw_hdmi->data->top_write(meson_dw_hdmi, HDMITX_TOP_SW_RESET, 0); @@ -811,11 +765,14 @@ static int __maybe_unused meson_dw_hdmi_pm_suspend(st= ruct device *dev) static int __maybe_unused meson_dw_hdmi_pm_resume(struct device *dev) { struct meson_dw_hdmi *meson_dw_hdmi =3D dev_get_drvdata(dev); + int ret; =20 if (!meson_dw_hdmi) return 0; =20 - meson_dw_hdmi_init(meson_dw_hdmi); + ret =3D meson_dw_hdmi_init(meson_dw_hdmi); + if (ret) + return ret; =20 dw_hdmi_resume(meson_dw_hdmi->hdmi); =20 --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288905; b=tuukJ+W3PGq1A4I/EDHgDKk4XI+FEUMmufsASgIXDU5O5KhVAVB9HBlMmCYdixUXRbuf Be3rYBa8j3/3qXyCxG+o6wWHBDYK8WqBxcac878K9MrMZ4eQzYxD3AgzC7N9Ppg913p7K xBQ3Y206WuwzKfkQLYbG7RAu1YeDNenmLOIX35E59FXQeEHJuZg34UVJYEPl4cDVusWab hmsdEhad2eiyrrEQ57iTiQXk3YO/ttgB6fU9s4R2ChLxoEocbMZCBRSD1mtrovcDr9eA7 9BVLNGA0ddJeCyWBkr8bvE/QJ+5ZBkrWLXZ+jC1oZj/WFjvg1DLEKFrd0tZIeeCUoAQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288905; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=+vDV9gxuiMjIN5ig6o5fnYNWGsi3VvCcP9sIBt1qAlo=; b=1B6fA3WI7WlQ4zsUGg3BwB9R+J7tvxrjoEUgC/FSto8gfd1zai7EbumX9aXwVqxcJWPn IbA9xix/6ckNjmZi/p+izIlfZUCU98i6dq2t9rE1DVD04yokS0BxIUFyte4zw/bWQCu8E YB0Cvk+kxBbEwwsRHokfwXYuW1uujpMugUITVgLo4Np0lOpt50z+ZMCU21eBbZZjPorCo Ps3ZOO5EYdR2PpkwmRLSc4LVeZqQn5CTgtba05JSixGG6iGFyACEhc2+uFvE7gb6PGPEI rK5TYfO6NT0w5xHMivSudL9mtjNJpTqNYf6m90FAB1Mcp4PL9d83s5/0ULaskgmjKrg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HlS5o7jB; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82DA3606A680; Sat, 21 Nov 2026 19:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=HlS5o7jB Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288905; b=kUFGZtEIlXA2LJY46QjZo0ssuyzZGvNPZAfCV9JCz5/Mo4ix7VQwq/3VivpNw65dbXb6 sCk5UBC4427U8MPPzb5wcq0gHJ207qrefq8oJvd/2QZg917B5wY3sw3hdUMBoKfDhJqbn CTf9cFlx5Nq6JbIZG6bK5T61SMQeDfVciWLQBwBfThISxmi/CXY4J0bYB/R5gn5nxnXoL J0nSRtI7cdG0Gyvm/4QiRtUNqKexjbW7WDKW5Cv2GvRoSmU0bsZ9oIb/bKcveGMde0F18 OqPHg22xcBc2UILCiiD4Pes+HoI0ybQRZHkBgGNTNkjPRfJiP99Sk7qT9uL5Nanvv3A== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288905; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=+vDV9gxuiMjIN5ig6o5fnYNWGsi3VvCcP9sIBt1qAlo=; b=CWmIlBofG1MWdxKZQ1rugt8XM4ZdjHk0QSdKJ7Yix0ik4lb9WR06E3CQZwAS65AlEFoe nWuxdibKXHsJ9dKk9dI02dlpddi6Ve/iGjFpf5CqjszAG+gLl4DoMQ5ViHzHBSMs+7idw nvRwMwyfujl0iTEXEzV0XW4/Y1FBEOex0s3hrP6svNrsBEPQ/0YuZmhiuKYLtYn1Ama8g Rxo2CTaecxNd8nv/ZCTwoHc1HxT/z5fwPnv2AeOCjmKtxp1FOeT/m+UvHbE5aMyPIG6o3 JuI97LLzMF3e4+l4zLOn3VTCBNGXZN3nEgnTqErGhMrJoHc2Dqfxjq4GpAqSmF4TKYg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 8910B1F000EF; Sat, 21 Nov 2026 19:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288905; bh=+vDV9gxuiMjIN5ig6o5fnYNWGsi3VvCcP9sIBt1qAlo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=HlS5o7jBtHyGSmkRa9+zD37aRmp0S+gOGzENtskYC055LDionUWsMPXRv7o9lMCAV UfnVbEc4etG4NkafANpXlbtwqqQg/kMxdYRypNf5ZX6MWsaH/NqIbX7fMUGmgrIR3k 4IU2IbOB7s+3K2iXtxDZG1wXBzFkTCgQ6uKzaB7qJ3yaKgylpsbxglfOlpQI7cDC6o 9UNQYRnB7SwutHrB0+eaKU8Uxw9GF2Di7KiRjeVH7IDqdOmytqy60SmSML1iBbMJog FPvsJ88VltS3ebNvXONo19Cwc6cz18Nty+luSsS712C5oGw0uABpja4NoOQJJxZ1Yw PQ20pOJtTmdgg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 7553D4BD86; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:11 +0100 Subject: [PATCH v3 09/11] arm64: dts: amlogic: Add HDMI TX PHY node for G12 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-9-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1147; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=96ezTxgocDNVGkQVkrXP3m6ZHN0B1G+z/JYBO9mFeTE=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbje6s3eSs+rFfO+xvj5qDPs4HzAMuy+VMu7Jl8JTv0L FPeuWqJjlIWBjEuBlkxRZb+uZYn3l0+eubrHvUUmDmsTCBDGLg4BWAiZr8Y/pl+uDEnwvjImgem m5qM735Tu1r94Vmak73cJfbzvh1uaZMYGV6IhG+YlrTpdpT9I+X3Skfqzu+9dtbs0urTb+eJnVv /vJ0RAA== X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau Describe the HDMI TX PHY as a child of the HHI system controller, with the amlogic,meson-g12a-hdmi-tx-phy compatible and reference it from the HDMI TX node through "phys". Signed-off-by: Ronald Claveau --- arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64= /boot/dts/amlogic/meson-g12-common.dtsi index 3135566df880..7f9eda4298e9 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi @@ -210,6 +210,7 @@ hdmi_tx: hdmi-tx@0 { <&clkc CLKID_HTX_PCLK>, <&clkc CLKID_VPU_INTR>; clock-names =3D "isfr", "iahb", "venci"; + phys =3D <&hdmi_tx_phy>; #address-cells =3D <1>; #size-cells =3D <0>; #sound-dai-cells =3D <0>; @@ -1683,6 +1684,11 @@ mipi_analog_dphy: phy { #phy-cells =3D <0>; status =3D "disabled"; }; + + hdmi_tx_phy: hdmi-phy { + compatible =3D "amlogic,meson-g12a-hdmi-tx-phy"; + #phy-cells =3D <0>; + }; }; }; =20 --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288905; b=4rqwP5UI2Jwz07poPJxDqwO5B8+dH09GFB/A5UsqxPfFYi4e5UMXyOMwESs587vvIlJX WHu665mTtEKyUq6iW3e2FJ7IlT4Av3j1oHIC/u0Xh+dU6KIf8OMvHBVg8l4iDf42qBFZQ YjyG8wzEmuShB4UB3ABpchF5aDm9c74PlToSK9QVGzA/L/cfgFiQfYd1kQjI2SXv1eLE3 j+D+dCEmLOZ9qjY9gIQGdn0mfXykvu3k/hxp2XLLUxrM8anJCMLBCBQLGfGmizjqs2hOa S/CGz32v5EI3FxujscBSshf40EWJ+zxAVEv8btXxFAZjioqxr2vtov30dn+nDDo30dA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288905; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=5kSP1RnWMSJEJYYJkds0+nXtVqYjbTw1JaXsnE/LlyU=; b=0U900PFU693uIwStPKm5mWQAPwmRObXFyXQcMfuBj8WbTLgeswacP3DElg1Pn1syTY+c Zty5TRyghf8ibkB4vJomuTmW3S7uTN/BLyUQVQJH3rngp47UkztOLQcUg4aoaBYqGYcuP j/YYKr+peFK7hPiEWrmP8q1ucZvTiRdUzqYc0fmizDkTmd/EZ9zqmSdN6+4+sl3AfI+XA QphGfA6jF+KvZSjknIZN7rAKdLhVnpW1VbVMqomZjOMF5xjhru7v99wffAhrQ9FI9ROOB nPE8alEyzrJVwFd1wN5Jf3QnXkw59epRSdXhgVu9FCbrV6eZQitgkwy87QqBgMfJO0w== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="hVQ2M/3a"; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA0C0606A32A; Sat, 21 Nov 2026 19:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hVQ2M/3a Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288905; b=FTqmv7xXu5KoR7vT1jAs381zFySbfC07WF4ReSniJIKMiFqxuj8Y6CzkIRsl2LwNucTi 6Ajy22+EFAoo7nT9Bvftpr9KBj6NYg9eqNX2xCjoG1nE59aFj8LNuT228bFN5oo/MhmyW 0rxDQss/N5n8B3cORS+i2BxzPO+7o7E7nhtD4cpmi6dTioOP0xTZD/Agr+Q9gMLR8XxMk lt98URQinG6AeRKvOXh0r5qreJr90KdmTr1hWfeg7NDfuD2f5gAhgwDJqoN89R5oAJJgr fmQoOycTdoWUtM4n8N4SQAlPVT31GA+kjXQUyrmQ7fkTHkpKkfA88yDDuA7Zp7WEptA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288905; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=5kSP1RnWMSJEJYYJkds0+nXtVqYjbTw1JaXsnE/LlyU=; b=JnW7O6tuoyVon476HuVcX5KBdISibR0N++q0wST71UXN8vmkkKSuRginkZQMQ3vgrRAH amSUJKjxvyLREQBKZzWJHf2p6nZcR78QrCNAbFjOSsMDFh868vDYX+mJpuiSPBQlW+HhY baWpSb9xvc6dz2g4p6s9+ckSovPwJsycYLgIxp3s5f6JhvqLw5Irm5uHuc12zbrsBEIQq ox64/XVrtGkrS3nO5xTY2xoHjF4nJEsNI4jFczh1JRpiTrYHa5e3Q49oVw1mhj4uoZVVG OezXmtI9LZpbBzJRMCe4oMrK6wHl9S1eKpBvZ2OP8s1Jh3083KEW5beossKRuX+OI7w== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 8CC451F000F0; Sat, 21 Nov 2026 19:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288905; bh=5kSP1RnWMSJEJYYJkds0+nXtVqYjbTw1JaXsnE/LlyU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=hVQ2M/3an1gy3dwMYRx86ngxB0d3A2zET589l3fVIJVLmkA2w5IaeYLKtNU4nQ6a1 6NBsKc16nv4WN9aan6y+kdSSy4DUY1U4sB14r2N5oCyQCgVTRbPXcGAyynfI6gH1w/ EcsFIie4wPPULctzD913ripoibO0GhQxPN+1wZqp5B08jMQBRmmRgX6LHc+2vRepXz 5XMfLyBcgkpTWScLB4ArW5ZwTuiRPRTWZlujAs+oik1YHQAjYTQkXl9qFj9bQl/KOn MK/hjc9T0VHxuKlKtw6kOKBp22148htcmcbGhHXlxKk92soDn0RQtDOLUFideVUNLJ wurQ7J274rBPg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 8FE674BD8A; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:12 +0100 Subject: [PATCH v3 10/11] arm64: dts: amlogic: Add HDMI TX PHY node for GXBB X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-10-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1081; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=JfeJFGsdjuVYuSpN9bsRq2rmNT9JvKzwp64cluLxjAw=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbjexud9MiJPwNeik2vrV3seiZ2naau0WM95Z1rb5r9y bqmsv56RykLgxgXg6yYIkv/XMsT7y4fPfN1j3oKzBxWJpAhDFycAjCRI2cY/jvZCote//An5d3J 2ct+KOmw+r/3Sj/axD9zQ/vvNfOXKggz/BU3vST5flL1rkrLKG0+mwlSv5QL97nEK+R96EpbcN+ umAcA X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau Describe the HDMI TX PHY as a child of the HHI system controller, with the amlogic,meson-gxbb-hdmi-tx-phy compatible and reference it from the HDMI TX node through "phys". Signed-off-by: Ronald Claveau --- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/= dts/amlogic/meson-gxbb.dtsi index 5c2fe9dc4f80..09ad9790ebc2 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi @@ -316,6 +316,7 @@ &hdmi_tx { <&clkc CLKID_GCLK_VENCI_INT0>; clock-names =3D "isfr", "iahb", "venci"; power-domains =3D <&pwrc PWRC_GXBB_VPU_ID>; + phys =3D <&hdmi_tx_phy>; =20 assigned-clocks =3D <&clkc CLKID_HDMI_SEL>, <&clkc CLKID_HDMI>; @@ -330,6 +331,11 @@ clkc: clock-controller { clocks =3D <&xtal>; clock-names =3D "xtal"; }; + + hdmi_tx_phy: hdmi-phy { + compatible =3D "amlogic,meson-gxbb-hdmi-tx-phy"; + #phy-cells =3D <0>; + }; }; =20 &hwrng { --=20 2.56.1 From nobody Tue Nov 24 12:36:16 2026 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795288906; b=y9Us1xYbteKoF7Il+uKvy+tkoyAZRey28+Multl3qaFnT4aPHteTvFq6qA3kaPYhAAWU swCPC5eU+PaoYz7/4dGVkc4Ggasfo7X8JMvnObbUBe0lLEOnbpIiXcWGoNec8YHVPspju XH+aeXFsjCqIQYjAXS7Z0GScrsAc1vkTd/HYpWDlVghcnpXNGJXJZg6y+C3+Doq86Uv/M 2UVi28f5fTI8jRfZr7aeMobk8xvpeQkYFGAJCSTIWVIhmuiv4DHIRiM3xPcz2TzTDbG76 VUFHZRIlNv1fZ/gJUCP/8nuK+qsAF9K9U/SiNekvOJnY5Ra9seJjExz7uSpfl9C5DDg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795288906; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=3ySlJUTZg8+yNINn5sfi2SIyHBWA5zVWlGALJ4M1cgM=; b=rcyTbKaooLpEngRec7dpAX3VQ2eYTPW+pEauUvv0ldEhQCIEqcWZ2Qx2kXIzUcfOg7Mv a23PQbDcRl65uLeVGuCJlVNESP5nLcz2uKv95YFhIsKZfk4LJ2q9a26dDUvoW6m4Rs1vh rzjSq8spX2eiDDDFCjiOZsGL1ViAvT9jf0H8rYbtmCcVKlQxwWr3173HBbuxzehdo3623 ydP4kL3GbJixAjL+Az9h8A1NlIW5/4TWqg66GOVg6R7kLJaQDddDu9OBXGS8Kk/QlTB6C vDq0Fdv++UceIdsniBQe57GU8WhHGyzs77kHoCoFDLsYdeCeDp/2ZGVZlU5owcirPgg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NWhhZ8Tx; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 758D960A2605; Sat, 21 Nov 2026 19:21:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NWhhZ8Tx Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1795288906; b=JRI2hHvb8B3SAr63wKsi5aNi0e7XxfYf+iIdOwmTR4OfyRGVq4hiNavKu0ZJjj8rqC4d DNHjkOUMmr6LXBEpbnRF7d6/ytH75lf9bKPyPgmH5hAaXCoZVL6E4UyTHQDGA8E0qQVPN u6ij3R9oZKY1V6emPLa3CJxuvOhpyTKIIcrtZ9lq8FJ43WWM+gri+i1lXBxnIyqwpBwkE f+lsamH0cX6x20weIZt4SbY6LZ1hJAn4KQU02TYcqrMpdR4oSR49Ds4pFiLHdIvYKoLbB eIAX7heL4Pcd5BEYCEtIdAhPj+85JzJONXjrvTpq4Sm0W3DIJCxzePqstzQ1kQthkcw== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795288906; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=3ySlJUTZg8+yNINn5sfi2SIyHBWA5zVWlGALJ4M1cgM=; b=lukfTTr48vAw4iNlV5IWtq6Ue3gS6DXHpaBsjf8wP8QoB/JhXEsVksCOwDzn7buqTRve IDKIokkJo8WsfbGUbjLkBkmsIgjMXQn5HT/MqK4i7thKnIkVWlrzYamO6Rp8Tqp2vwRcw pL3eF/kv2JBy/SYkDq6hKdqMkBt3iZS0ABD9yH0J3X3gQ8cCDIFtTEbdrYSdY8lUDDPK0 8z/Guh7h/tBkK3LRiMgBXMFLG07QQnranGqhpjOqgmLINXPDYDLpf3uVlU4+64vn00jT1 95FxlHW5/NZp0pgDrIdwb3Utg2Bek9Cr8Y+bwm3GMn6HdGHmR70V/u6GsEKGaTFBsFA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 0A9DF1F00AD3; Sat, 21 Nov 2026 19:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795288906; bh=3ySlJUTZg8+yNINn5sfi2SIyHBWA5zVWlGALJ4M1cgM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=NWhhZ8TxIs81wdW1Fy4yXuk26SrglkNzvDmS+Tldb5rGmbmJZs/K9MjKYYxFoyRXh RRXbNkYOcdrP1qem3wGnqCJCZnH+u3NIDi5VWIwNkCOIx6JeooT4tYkFh8j4a+Ip2C g3zTmKIAX9JA+E6a/7O6SYTTrAJsrieqEeEdi5GXrHOw6n3/Mu0+kTIdvlURz+3jW/ wMyxX2gNYQBG67iVaNflkrRRBfckQJiogtOzAfO/69n52ZX1KnXE1/uwkxcBppr33t ceAk3KZbOL9K0SI4o1wnIu6W0t+Bwwh7+uucrPHGuQkUWoZ+ucaOPGMshEGpStbsyl YAzocPve+BXHA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id AA8344BD8E; Sat, 21 Nov 2026 19:21:39 +0000 (UTC) From: Ronald Claveau via B4 Relay Date: Sat, 21 Nov 2026 20:21:13 +0100 Subject: [PATCH v3 11/11] arm64: dts: amlogic: Add HDMI TX PHY node for GXL X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261121-meson-drm-create-hdmitx-phy-v3-11-f8f471788076@aliel.fr> References: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> In-Reply-To: <20261121-meson-drm-create-hdmitx-phy-v3-0-f8f471788076@aliel.fr> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Vinod Koul , Manivannan Sadhasivam , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, Ronald Claveau , linux-pm@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1074; i=linux-kernel-dev@aliel.fr; h=from:subject:message-id; bh=JP7lAwalWZ4HUjkBJydQfX0hMiglUBnijIXqwFKtcOI=; b=owGbwMvMwCWm1SvKXP3cUInxtFoSQzbje/vf+uX5V92qrFhOTbM66DQ/fFWce6/zjVxHdl8xo bTjO791lLIwiHExyIopsvTPtTzx7vLRM1/3qKfAzGFlAhnCwMUpABOplmVk6OwMktjnz/e14YbN 05PHN65YoHK99eNTJ4apGxPnuvmbqTL84S3ns3obu9m22l7e++rn8P7EJqVrLwzYb0p83Fqj/9W OAwA= X-Developer-Key: i=linux-kernel-dev@aliel.fr; a=openpgp; fpr=DFD863F61375BF917F0012173953305EF1D0EC3E X-Endpoint-Received: by B4 Relay for linux-kernel-dev@aliel.fr/default with auth_id=744 X-Original-From: Ronald Claveau Reply-To: linux-kernel-dev@aliel.fr Content-Transfer-Encoding: quoted-printable From: Ronald Claveau Describe the HDMI TX PHY as a child of the HHI system controller, with the amlogic,meson-gxl-hdmi-tx-phy compatible and reference it from the HDMI TX node through "phys". Signed-off-by: Ronald Claveau --- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/d= ts/amlogic/meson-gxl.dtsi index f257fe3860f7..d205eec1cff7 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi @@ -328,6 +328,7 @@ &hdmi_tx { <&clkc CLKID_GCLK_VENCI_INT0>; clock-names =3D "isfr", "iahb", "venci"; power-domains =3D <&pwrc PWRC_GXBB_VPU_ID>; + phys =3D <&hdmi_tx_phy>; =20 assigned-clocks =3D <&clkc CLKID_HDMI_SEL>, <&clkc CLKID_HDMI>; @@ -342,6 +343,11 @@ clkc: clock-controller { clocks =3D <&xtal>; clock-names =3D "xtal"; }; + + hdmi_tx_phy: hdmi-phy { + compatible =3D "amlogic,meson-gxl-hdmi-tx-phy"; + #phy-cells =3D <0>; + }; }; =20 &hwrng { --=20 2.56.1