From nobody Fri Jun 12 17:36:01 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D584F283CBF; Wed, 13 May 2026 13:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678280; cv=none; b=RNkySMz5Ga10pawyn7XIh5Eosivz9An8xhkbd2c3U1Vx2foQTcTNNzZKySGI6CHEc4jRxsbWlWKBUTUhRN/Ley897aaJfR1ACu9YaZcqfEgV9hciSNXbqRBzFzTKsp5LWMEoCVcOLnw1F4duZjFUgJS8kbJrq/t+LQipbJ8zrio= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678280; c=relaxed/simple; bh=PFlOdtkQJnenBMJMqgqsT7Es9PtuqDfu/61DaPuol1M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=g48kL/OAoGsXAe7cpFnLMmtteKh/JQQv/U5FXz0HU8IvsZ86M4AcpZJ805AJC03x6mi+PV5/GvF73btNa6uZcC2YkcNBS0xqNt4kdo4kn0TnbD8kEwwUQRQnkaMKp+bGj5XYmoanI/isHQp5xYUomlbiVDj1MXQH+IxpNNcO0pA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=c0OVnrvE; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="c0OVnrvE" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B9CA2298C; Wed, 13 May 2026 15:17:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678268; bh=PFlOdtkQJnenBMJMqgqsT7Es9PtuqDfu/61DaPuol1M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=c0OVnrvEXkjRSsfu2oMic2bjNg+lPX66E7HkwQ1iQnxg9Ur8MJ0ZgOaM0BS5TtnGC edSgM56fMUxI9z3sg2glWkS0rwU8IK3tWpZsMTP65uMCj2wjUaGfvLmKA1ML5fJtge smMXACHvyJi51waFlpiIE6uWMjyyOf+ebGXBjkTA= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:23 +0300 Subject: [PATCH v2 01/16] dt-bindings: display: ti: Move ti,am62l-dss binding to a new binding file Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-1-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=10332; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=PFlOdtkQJnenBMJMqgqsT7Es9PtuqDfu/61DaPuol1M=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn8QJqmulj6Z9dt6yMxL1jJCPuIRi3ODgRoI N2yrqSrU5OJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/AAKCRD6PaqMvJYe 9YvKD/0YIK6iNGBT1NOnnEMvi+zNV8QN+IFY3I1hFl39jSFrn6BwzjRtqm/XDyZru33M/fzJFhL d6+E6F8Gn7VTbM3b1ZOGcDEq8Y2JtjQx4LSOPmmiQmeGPNurVFJNs751jh0+J4vD4adf8V9I+m0 jpBkyVZVPIbwf8ueLdXUXW78AJu+gq72uFGBI9rFmimokcSawFIDax2K9pD/CyYGO+P07RKMoWR wWUToK3hUrxa+QUlru3kxvQt0VCw0IzORNXM88h1AR3Lo2BhE9IDPA5H7u6eMmzhP3lfgYdAm1s EDCsyt9WMIJ0QzonaNe8MFXewvm6pXH538q32aUO+967roY9UAs6YWnqEvtStH9x5aqiruMdCiZ 1SFGEUrqgU8CYzBmfi77XqIm4lBkMyiPK/I9ta2d4PawvcrXdxKFWsolFN9TAtBHR570+aBTv9k btEXfEIHA+K73/MmXyjHeIDWebP0PDdDPnUeIQqUNZXvBqiiPFHdYKocT/QnU9mHRFPunYfU8g9 vgmHCAPT5U/LxahH3/+rOUEPinKyvng3WxtGiypfQEyjg/vhX5brfDmZMS/twA6YF1vGMY1Fdup ktQ7zDkXKwDiybVpkDEy0Wnv5M7Cz8TwbCnoKXA9xXfEg4COe6eyvA+6Y/Vnmoqk3FVvRMGec3x OnOeUVbxor40EUg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 We currently have two binding files for different TI K3 DSS versions: ti,j721e-dss.yaml which contains bindings for the "full" DSS version, with four planes and outputs, and ti,am65x-dss.yaml which used to contain bindings for the "lite" DSS version, with two planes and outputs. ti,am62l-dss binding was added recently to the ti,am65x-dss.yaml file, which only has a single plane and a single output. To keep with the above "binding file per DSS model" style, and to simplify the ti,am65x-dss.yaml file, let's move the ti,am62l-dss to a separate, new file. Reviewed-by: "Rob Herring (Arm)" Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- .../bindings/display/ti/ti,am62l-dss.yaml | 136 +++++++++++++++++= ++++ .../bindings/display/ti/ti,am65x-dss.yaml | 94 +++----------- MAINTAINERS | 1 + 3 files changed, 156 insertions(+), 75 deletions(-) diff --git a/Documentation/devicetree/bindings/display/ti/ti,am62l-dss.yaml= b/Documentation/devicetree/bindings/display/ti/ti,am62l-dss.yaml new file mode 100644 index 000000000000..ce6185dca18d --- /dev/null +++ b/Documentation/devicetree/bindings/display/ti/ti,am62l-dss.yaml @@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2026 Texas Instruments Incorporated +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/ti/ti,am62l-dss.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments AM62L Display Subsystem + +maintainers: + - Tomi Valkeinen + +description: | + The AM62L display subsystem is a cut-down version of the TI Keystone + Display SubSystem. It has a single output port which supports DPI + format and a single video "lite plane" which does not support scaling. + The output port is routed to the SoC boundary via the DPI interface, + and the same DPI signals are also routed internally to the DSI Tx + controller present within the SoC. Due to clocking limitations only + one of the interfaces (DSI or DPI) can be used at a time. + +properties: + compatible: + const: ti,am62l-dss + + reg: + description: + Addresses to each DSS memory region described in the SoC's TRM. + items: + - description: common DSS register area + - description: VIDL1 light video plane + - description: OVR1 overlay manager for vp1 + - description: VP1 video port 1 + - description: common1 DSS register area + + reg-names: + items: + - const: common + - const: vidl1 + - const: ovr1 + - const: vp1 + - const: common1 + + clocks: + items: + - description: fck DSS functional clock + - description: vp1 Video Port 1 pixel clock + + clock-names: + items: + - const: fck + - const: vp1 + + assigned-clocks: + minItems: 1 + maxItems: 2 + + assigned-clock-parents: + minItems: 1 + maxItems: 2 + + interrupts: + maxItems: 1 + + power-domains: + maxItems: 1 + description: phandle to the associated power domain + + dma-coherent: true + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: + The DSS DPI output port node from video port 1, which may be + connected to the external DPI pins or to the internal DSI Tx + controller. + + required: + - port@0 + + max-memory-bandwidth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Input memory (from main memory to dispc) bandwidth limit in + bytes per second + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + - interrupts + - ports + +additionalProperties: false + +examples: + - | + #include + #include + + bus { + #address-cells =3D <2>; + #size-cells =3D <2>; + + dss: dss@30200000 { + compatible =3D "ti,am62l-dss"; + reg =3D <0x00 0x30200000 0x00 0x1000>, /* common */ + <0x00 0x30202000 0x00 0x1000>, /* vidl1 */ + <0x00 0x30207000 0x00 0x1000>, /* ovr1 */ + <0x00 0x3020a000 0x00 0x1000>, /* vp1 */ + <0x00 0x30201000 0x00 0x1000>; /* common1 */ + reg-names =3D "common", "vidl1", "ovr1", "vp1", "common1"; + power-domains =3D <&scmi_pds 39>; + clocks =3D <&scmi_clk 162>, + <&scmi_clk 161>; + clock-names =3D "fck", "vp1"; + interrupts =3D ; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + port@0 { + reg =3D <0>; + dpi0_out: endpoint { + remote-endpoint =3D <&dsi_in>; + }; + }; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml= b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml index 49a007cbcd3a..75d9640398f0 100644 --- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml +++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml @@ -18,68 +18,45 @@ description: | internally routed to 2 OLDI TXes. The second video port supports DPI format. The first plane is full video plane with all features and the second is a "lite plane" without scaling support. - The AM62L display subsystem has a single output port which supports DPI - format but it only supports single video "lite plane" which does not sup= port - scaling. The output port is routed to SoC boundary via DPI interface and= same - DPI signals are also routed internally to DSI Tx controller present with= in the - SoC. Due to clocking limitations only one of the interface i.e. either D= SI or - DPI can be used at once. =20 properties: compatible: enum: - ti,am625-dss - ti,am62a7-dss - - ti,am62l-dss - ti,am65x-dss =20 reg: description: Addresses to each DSS memory region described in the SoC's TRM. - oneOf: - - items: - - description: common DSS register area - - description: VIDL1 light video plane - - description: VID video plane - - description: OVR1 overlay manager for vp1 - - description: OVR2 overlay manager for vp2 - - description: VP1 video port 1 - - description: VP2 video port 2 - - description: common1 DSS register area - - items: - - description: common DSS register area - - description: VIDL1 light video plane - - description: OVR1 overlay manager for vp1 - - description: VP1 video port 1 - - description: common1 DSS register area + items: + - description: common DSS register area + - description: VIDL1 light video plane + - description: VID video plane + - description: OVR1 overlay manager for vp1 + - description: OVR2 overlay manager for vp2 + - description: VP1 video port 1 + - description: VP2 video port 2 + - description: common1 DSS register area =20 reg-names: - oneOf: - - items: - - const: common - - const: vidl1 - - const: vid - - const: ovr1 - - const: ovr2 - - const: vp1 - - const: vp2 - - const: common1 - - items: - - const: common - - const: vidl1 - - const: ovr1 - - const: vp1 - - const: common1 + items: + - const: common + - const: vidl1 + - const: vid + - const: ovr1 + - const: ovr2 + - const: vp1 + - const: vp2 + - const: common1 =20 clocks: - minItems: 2 items: - description: fck DSS functional clock - description: vp1 Video Port 1 pixel clock - description: vp2 Video Port 2 pixel clock =20 clock-names: - minItems: 2 items: - const: fck - const: vp1 @@ -113,8 +90,6 @@ properties: For AM625 DSS, the internal DPI output port node from video port 1. For AM62A7 DSS, the port is tied off inside the SoC. - For AM62L DSS, the DSS DPI output port node from video port 1 - or DSI Tx controller node connected to video port 1. properties: endpoint@0: $ref: /schemas/graph.yaml#/properties/endpoint @@ -189,38 +164,7 @@ allOf: properties: compatible: contains: - const: ti,am62l-dss - then: - properties: - ports: - properties: - port@1: false - reg: - maxItems: 5 - reg-names: - maxItems: 5 - clocks: - maxItems: 2 - clock-names: - maxItems: 2 - else: - properties: - reg: - minItems: 8 - reg-names: - minItems: 8 - clocks: - minItems: 3 - clock-names: - minItems: 3 - - - if: - properties: - compatible: - contains: - enum: - - ti,am62l-dss - - ti,am65x-dss + const: ti,am65x-dss then: properties: oldi-transmitters: false diff --git a/MAINTAINERS b/MAINTAINERS index d1cc0e12fe1f..902502e1d63c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8756,6 +8756,7 @@ L: dri-devel@lists.freedesktop.org S: Maintained T: git https://gitlab.freedesktop.org/drm/misc/kernel.git F: Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml +F: Documentation/devicetree/bindings/display/ti/ti,am62l-dss.yaml F: Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml F: Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml F: Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml --=20 2.43.0 From nobody Fri Jun 12 17:36:01 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDBD2285CB9; Wed, 13 May 2026 13:18:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678282; cv=none; b=oH4fOMITAk42Uapv70Q4/fFSZPtDX/8TlctVarRDdeZ2XfVI6O2qroK1kekWPbLy1JbS5E402Y36Ft0aLdDxzU9zRMJDIcYJBAz5MHfT2BDXwl5lVcv93oADByoU1TPdnRWPe8iArjm/HAyY0AKEsdR1Ve9+GyZko2ZmNNOpZzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678282; c=relaxed/simple; bh=o2udw3Crr9J1QuXaXPV5drvL6Y5aZAKT/0GYJ/rqNtE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QJzkx8v4Ph2k86m/zfti4azgjQA+ej0MZwtR1hhYgpSIKxAjI3X6Tx9ajh68+pLXBWG7QXJz4IPPgidtdoUF474iP+6/DOdsds6FUiyu5QRv67UzGxjC3CoRFKjJd8w43yB4xi7puwKxLT3TDib8tvSKBhXx3jGXfCi/Tz7HzGc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=vZolVgoY; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vZolVgoY" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D29322A27; Wed, 13 May 2026 15:17:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678269; bh=o2udw3Crr9J1QuXaXPV5drvL6Y5aZAKT/0GYJ/rqNtE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=vZolVgoYklIUglijceeQe7Fu95R4gzz0omMRLvGmJKSseg1AWtCVgQQRlnokoqGt6 TO9GUBGql3/ZH8TAptGhMUtEztqs7mIbRLNxEpphiaNQiJShorIoxdtsAmceDGpzh8 d703xckHqdq4AUm74fCWbGSeA3uHVujdCDDUtXHw= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:24 +0300 Subject: [PATCH v2 02/16] dt-bindings: display: ti,am65x-dss: Simplify binding Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-2-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4169; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=o2udw3Crr9J1QuXaXPV5drvL6Y5aZAKT/0GYJ/rqNtE=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn80Ad+XRSTUuelDFgjSErBUG8JbAIrPKQ2y FVOufLshO2JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/AAKCRD6PaqMvJYe 9XrOD/4icJtb8qOGFJrTWSOhePdRV2E6qdo5J0a8UujWjVBjSUfNEFtlMOcV0AgYOeRyQTrc3Ah ar1In2AgwcjYrHMowZSy2myjcyzQ1hu0venSiUr51DLTIxOet0fn84RVHWhqke0L2k2i9Z9GGTi vPdT3xu2nkR1sr9sDysF7ETxMXfrvjsLpD6MBsDNZ9NgYgvSbCYc3kAPK15UQEM8Z7JVM4lk/yd H5+A2SwQhDZXxRAKrLkjtSm0X4/4gbD0ckU7q3zn8MYu7UgR2PG9SCgLV/RvzZtrJ3T4vrR91Yp Wf4gv2As+NxoipQgLH90FhGAuLm/upzygvhbQ2SMNdQIW+gd1hldBZpYMQhXLsqVAyTGK2fu6fK QNRKGmgLqx+DYPm+X9kVf7yGWzP+zn/K8no3VDGnfCNTn5x+Um7o5jkohuKNEKyCXZPEq6sf1gc UDeMy+6qS8EnC/XwsyII/UBII/OFsj1ETr4snHrj9DAFMofJHajzXlXtC7t9BP7HUu/x0qUOhbj wqAsavkKjtOzvVkZKaXNkDNn8DUGClcTZn3F9KMHKpRSJon05wgKHUSiwIv5Sr9bzNjLHGuwBCV 98lEEvYOcIGmSjNiKV663ey85kQ0sIWXF8M4OzFYkdOYRsmCHymwKNfyoKHEK5vCgXnSJLgwtYG ISgZ0zsH+RwiFjA== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 In principle the DT binding for the DSS IP should mainly cover the DSS IP. The current binding also covers the SoC integration topics outside the DSS, mainly via the endpoint related rules and descriptions. A more recent SoC, AM62P, has two instances of the DSS IP, and while both DSS IPs are identical, they are integrated slightly differently (e.g. which DSS output goes to an in-SoC DSI bridge, which goes to DPI pins, etc.). To make the bindings usable for both DSS instances, relax the binding slightly: remove the explicit endpoint rules, and generalize the descriptions. Reviewed-by: "Rob Herring (Arm)" Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- .../bindings/display/ti/ti,am65x-dss.yaml | 55 ++++++++----------= ---- 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml= b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml index 75d9640398f0..588d72d4ec0d 100644 --- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml +++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml @@ -12,12 +12,21 @@ maintainers: - Tomi Valkeinen =20 description: | - The AM625 and AM65x TI Keystone Display SubSystem has two output - ports and two video planes. In AM65x DSS, the first video port - supports 1 OLDI TX and in AM625 DSS, the first video port output is - internally routed to 2 OLDI TXes. The second video port supports DPI - format. The first plane is full video plane with all features and the - second is a "lite plane" without scaling support. + The Display Subsystem (DSS) used in e.g. AM65x and AM625 SoCs has two ou= tput + video ports (VP) and two video planes. The integration varies from SoC t= o SoC, + affecting the routing of the video ports. + + The first plane is full video plane with all features and the second is a + "lite plane" without scaling support. + + On AM65x, the first VP has an integrated OLDI TX, thus the first output = port + is OLDI output. The second VP is routed to external MIPI DPI pins. + + On AM625, the first VP is connected to two OLDI TX instances, and the se= cond + VP is routed to external MIPI DPI pins. + + On AM62A7, the first VP is tied off in the SoC, and the second VP is rou= ted to + external MIPI DPI pins. =20 properties: compatible: @@ -85,34 +94,15 @@ properties: properties: port@0: $ref: /schemas/graph.yaml#/properties/port - description: - For AM65x DSS, the OLDI output port node from video port 1. - For AM625 DSS, the internal DPI output port node from video - port 1. - For AM62A7 DSS, the port is tied off inside the SoC. - properties: - endpoint@0: - $ref: /schemas/graph.yaml#/properties/endpoint - description: - For AM625 DSS, VP Connection to OLDI0. - For AM65X DSS, OLDI output from the SoC. - - endpoint@1: - $ref: /schemas/graph.yaml#/properties/endpoint - description: - For AM625 DSS, VP Connection to OLDI1. - - anyOf: - - required: - - endpoint - - required: - - endpoint@0 - - endpoint@1 + description: | + AM65x: OLDI output from video port 1 + AM62A7: Not available, tied off inside the SoC + Other SoCs: Parallel video from video port 1 =20 port@1: $ref: /schemas/graph.yaml#/properties/port description: - The DSS DPI output port node from video port 2 + Parallel video from video port 2 =20 ti,am65x-oldi-io-ctrl: $ref: /schemas/types.yaml#/definitions/phandle @@ -168,11 +158,6 @@ allOf: then: properties: oldi-transmitters: false - ports: - properties: - port@0: - properties: - endpoint@1: false =20 required: - compatible --=20 2.43.0 From nobody Fri Jun 12 17:36:01 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23CC32D780E; Wed, 13 May 2026 13:18:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678283; cv=none; b=lDG5WA4x9wOnCffpFmKozD7syNFYwlBPVjsiqP8E5Y4GWqQF99ZBhbQBZfFZ3jxRzhlkrmiyx17tdKHPX29jIYdo2QPxzZVOu98CU/nkj1qpB9vIzUxZ0gCLRXc4tRNoTXNQWwhSwU9+ELKOSQ0DABJkeWf0QfGYbIMNS31gtjM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678283; c=relaxed/simple; bh=0e6peuqhySdYeaoZMj9jOuIaG6XOd9RtU8xKk3jk8Ec=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=A36vjbHezXk47bH/JFh4TFa+ojWYtQrlj97pEeAaY29M79a6QMQGvd6jESxWJxF+X+PfPT9KybEnvMTeM6q2nY5zO493tnRwCq583oDx1nPhDeSP/S0r1X+Rnx01iz4R4aJ4Gj+NoOcObUMTurvewbmMd8Pw7XyYu2S+bDT++4A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=jEjCxvLj; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="jEjCxvLj" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EADDA2A4D; Wed, 13 May 2026 15:17:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678270; bh=0e6peuqhySdYeaoZMj9jOuIaG6XOd9RtU8xKk3jk8Ec=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jEjCxvLjF2IlvUx5li+OA0O8KvbkDomipGTBE41CqCFj8x6e+OG/RYu4aZp+h3vTy PKHN+G69iAx25KaNa/2l8PWOwX/IpoZQlJM4logzGPhc97wQvjYrUZB5mbXCeMOnVX WikDY02ZeEwNgivDUiiBNYJEc5Vtp/1Dd+SknWH4= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:25 +0300 Subject: [PATCH v2 03/16] dt-bindings: display: ti,am625-oldi: Add optional power-domain for OLDI Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-3-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=980; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=0e6peuqhySdYeaoZMj9jOuIaG6XOd9RtU8xKk3jk8Ec=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn9IE6hM/DrxR4zT65+kA4xd2Q3EuCCex3zr iy/I+BKDriJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/QAKCRD6PaqMvJYe 9fDoD/4xxCpHRjAFxnwf2ews0ODjwo3fi2IzPzZ1RafNH+aXavbemDPJZ2SfimzaU8dGStBUsnI pb2G6YECcy2FTc210x/zLUPsui2biU5igYQNDqaapeQ/3x8PDJW6dlzjaHGtRgQp/gkxWjXne+n UE6nrhuv18XprQviLDy2JYGabQx0thzvdDUt7FapuCTygWordzusHfFPx5zo7zYIw+yO/D9LTny dwQFBZj/0H8+MT0Rz17uvD1ZHd3GP3aeUL9Gi3ydJie1ELrcbqkxo/U8tWP/obY6OpuNzTPK8q9 FVmd5qfH46DMQtEpLzwBOOKDuXtjU6HWKMX1xaXOfw57ZHXILPNHuhRiXvxARyA+FaUaQQH604t xrhrQsEoCDi2cSvHR4KBv9s62EtSANABZ2D3IOdWS33m/ZnJhXxT8jp730wBN79+joNK4GopcwJ 50OUyx/B7XxegM9BDeuRnit2srcqYUcNWLpUbwm0ZglE65IZ/dxb4uLoq53V/eqcNdMVVZSrYp5 vRv2/djY0NMkbMKBJhaT2cdUiCzYAY98ekylMoUlS5Ew7Eq1H2LdfrTUvGaM9wYh/qj/qyNhpnM +2MNxILklDs1LUlLdyr9ZN+GZy8+EmQE6UtRPffkbAaPkrHhl7ENaRxIS6jkxzXTOr/ruZGQ7sU 38VEqflS3h4wHcg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 On some SoCs the OLDI blocks belong to the same power-domain as the main DSS block, but on some more recent SoCs the OLDI blocks have a controllable power-domain. Add the power-domain to the DT binding. Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yam= l b/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml index 8203ec5e5bb3..5dbf1f76dd3f 100644 --- a/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml +++ b/Documentation/devicetree/bindings/display/ti/ti,am625-oldi.yaml @@ -29,6 +29,9 @@ properties: clock-names: const: serial =20 + power-domains: + maxItems: 1 + ti,companion-oldi: $ref: /schemas/types.yaml#/definitions/phandle description: --=20 2.43.0 From nobody Fri Jun 12 17:36:01 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECCF72DEA86; Wed, 13 May 2026 13:18:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678285; cv=none; b=MkUSoayXXz3dM6m+raXElYjnAcn2fUhZp9QMWLrFc6nTNdtnuUoyttL4AgAborVc1J1CRRN8M/awF6YTZdbwQM/tjDHAgc7a71W2N6d/GTvvZKPjGv5XYlF1aGTrhnn1jbPVlI8ZInUKkUOMLhJAQhMTt1VJ/zNFTgOxK06MGBQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678285; c=relaxed/simple; bh=nPJzcPekfWg8VQk7v3Ppx+7G3lp2WtkHYg/I3DyeH3I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rouvoa/2asvO5pn6/pPJLxy/rIaKu2LF0e99V4PhTFr4fOI1wvOFZAvnSCGKgoSs5vDo1n8usuQXSATlxXk2D81ReBjh4TK5qRVaDwz4UqZtvEYi4OwYtKvxR/oesbDC2Iqfuxb1KRl5bJTQFSHgYMvvKM8wOJfocgNAm6ImJmY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=RzS/iuzl; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RzS/iuzl" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 12E782B56; Wed, 13 May 2026 15:17:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678272; bh=nPJzcPekfWg8VQk7v3Ppx+7G3lp2WtkHYg/I3DyeH3I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RzS/iuzltOIkYsm+50XK8up8jJdktRZg1TJGbU2TUdm0kYaQZUNgHE/y8NhBIxGmD 2FYgJ44cOA5pMd9KfixROGdB9BgwiqwyJRBfjNdOwnHcXhz6yS+omEPbafiwuw2rCz 0Htc8gRfIdjJpDLlKFa3VFTjfVLNmvnzumGFF5K4= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:26 +0300 Subject: [PATCH v2 04/16] dt-bindings: display: ti,am65x-dss: Add ti,dpi-io-ctrl Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-4-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2200; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=nPJzcPekfWg8VQk7v3Ppx+7G3lp2WtkHYg/I3DyeH3I=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn92BRz7sng2d5pS8QB8Ma8t/id1l5MBxGDP pKNT1+yzSaJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/QAKCRD6PaqMvJYe 9Vf/EACKrp2Z0E8WBm9BgJ17jayJk9cv+S8+TC4tZs6FEbNZYmosN/YYJYgWSL5j1AAGcwA0+Ec fHcuF16HxSg/gN9lRUQX2H6aelw/8oOzM2yQ/6xnzT2TVY2vgc4SVexSTeDBzLM5e7iPAcLjYGM yLE0MMNbufp/+ajmWngQvGFZqXySZftX1AW4C/5dJNHbtvu+1g620huAFAz/bTXrysG5wG0YPrl UqbBXIZUtk2XuERBzbaRMLmTmKXS/rS/R+LVzRARrisTy2XeRxj+wV4okjldzktE9XZSiz354jp mUCepUzy7WmPehQkOJnpaB/+Ppp2haS/PEOTxU1k3zH1H0gc3REi3Pvbj5RohqQKBMRMgQIIRHI TkSOjdGOT9Fv6b7FuX7OmLNrJHqe4UdgyGp7BgLsMoN7Mk49sX8ikH9rnlCg1mpRImG/plvboi6 JMZV6wBwUCELxOfQruJwO0ydigVzG2/4zGKPHkanimMZS70zd1/V9qfZQdDkr8+QYCUtp6mJPf2 CN+vwGqFrZQ7wOBH8Eb6Ck0JnypiqaPA9IJldd1+2/ZWuO9syJAhtaM2wZgYLAOSedD9tKxMo3v wX0eqoKZcrhCLmD5GCkEORydtq6ZXLH+SujPSX36ud7L4dLwDSop1RBp6Htdxs+oOGAtxllznC8 m404lj4bWA3Wk4w== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 The DPI output pipeline in K3 SoCs contains the display subsystem (DSS) which produces the in-SoC parallel video signal, and a DPI block which adjusts the signal to the external MIPI DPI output. The DSS IP has registers to configure whether the data and sync signals are driven on rising or falling clock edge, and on some SoCs these are automatically conveyed to the DPI block which needs that configuration to properly output the MIPI DPI signal. However, on some SoCs the DPI block configuration has to be done manually, using an extra register outside the DSS, DPI0_CLK_CTRL in MAIN_CTRL_MMR_CFG0 block, which controls the DPI block's behavior. Currently the DPI0_CLK_CTRL is never written, so it's always 0, meaning the data and sync are always driven on a rising clock edge regardless of the DSS configuration. Add 'ti,dpi-io-ctrl' property, which contains phandle to the MAIN_CTRL_MMR_CFG0 block and the offset to the DPI0_CLK_CTRL register, so that the DSS driver can configure the data and sync signals correctly. Signed-off-by: Tomi Valkeinen --- .../devicetree/bindings/display/ti/ti,am65x-dss.yaml | 11 +++++++= ++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml= b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml index 588d72d4ec0d..902ae2122d86 100644 --- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml +++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml @@ -113,6 +113,17 @@ properties: and OLDI_CLK_IO_CTRL registers. This property is needed for OLDI interface to work. =20 + ti,dpi-io-ctrl: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + phandle to a syscon device node containing the DPI0_CLK_CTRL registe= r, + with the offset to DPI0_CLK_CTRL as an argument. + maxItems: 1 + items: + items: + - description: phandle to the syscon node + - description: DPI0_CLK_CTRL register offset + max-memory-bandwidth: $ref: /schemas/types.yaml#/definitions/uint32 description: --=20 2.43.0 From nobody Fri Jun 12 17:36:01 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D86292E7165; Wed, 13 May 2026 13:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678286; cv=none; b=l/ocbdCC4Zz/3DlYFU1RzIGilOdCmJ9+JHf2Z6qzH71/KYSsio0yK1mIU9MeRmKV4bMArEveYCZewd9yQg2V59kUtZ5+f3Jtq08piJxK8GRckZ6qdS+dH0hH6yUhgFYlUjY/pJYc//zvDr1Frr2VS6ahX+nW/zVAAWNir6Izn7o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678286; c=relaxed/simple; bh=AFOi9aqsSdBtds83+Z7S7alO1ZnD/XbMhJoZjnM2lgY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E024sfv4r6Kdgdy/BuD3ff+sUW3Njvb3MncUnSV6zXsMqXGHtCm8atPG4qJrXAnRpBLHi7/O62W1XYDIhO+kyCgJQu6Q35sgsilwDXc04kNlCIPOXMNcHCeh0u0ZAJVMA6BYOMbIi0ofXeEKQa/UlQ91TuDb9kEajOOPUPz4rLQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=WE4N4JwJ; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="WE4N4JwJ" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 33BF32B57; Wed, 13 May 2026 15:17:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678273; bh=AFOi9aqsSdBtds83+Z7S7alO1ZnD/XbMhJoZjnM2lgY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WE4N4JwJ/CQmzHVnMY1ouYvjplftL/miJzsn5ez5up0er3bTncNR4LQDS4jwXS9yj /KAJJHesQjVElBQDPBMtnYmCiQsdzyUytlcYDvLQmAzAOKdfvgZ3aR7QPic4l169wF qJF+4sR4iMDYTu5CelXQL+JLZV2xozdQTUiB1x3k= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:27 +0300 Subject: [PATCH v2 05/16] dt-bindings: display: ti,am65x-dss: Add AM62P DSS Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-5-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3555; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=AFOi9aqsSdBtds83+Z7S7alO1ZnD/XbMhJoZjnM2lgY=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn9cxR/VbmIrYANitAxQv0Ha5gKb2WLGVSo0 ic8XtdyLU2JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/QAKCRD6PaqMvJYe 9YxAD/9fiOBVzu5i+ANya5HJAdJNnNcQiLsc7JQ36j0d9UkEw5FPHOzwWAQ84Kd5/dPmNYZ0zaF kHYzIpV5gWqkQBHpUizCbgCct9k/xFKbIvhyO5r5x6ax3Klsbki4syoc5a0h2etruFz4ZoBlf/t YVxoYzx1DSn61oBDyOkpgJacz2ukTxpCzde8t2iMD1KKgs7DWsI88wMnNvyrb+5fbgvYPveqzuA WMMepPUpvQmZryEdAmRBH42FQ5Ch+Fl4aw6k2G0kZANwc8BTgAzN6nVXkbiMGSt/Dmmcw96Vy+j OmNgNEwzngYhLmZJCZabNO6CfMKLflFcTBL4D+dJ6QG+O5NmCoI/k4bWUT2VJTIzRnBkx57PTk5 FPLscVG2H9b0/EkRsztPa8agqz+ldaCkRC7g6yDXLr7UnhPULwtjA7wolg5zNnj4fOok3vCUHNd FJiWsavPY30Qg/OIRTGUFAL/9KenmlINXV9NlMKoawNa8S6rOvGd6/niVigvfUn9I9oWnuC4ubC J/sCk8ox9r39N+D1LX27VYK9W9NBCNdiuvJ9UsoTYdybPzCj1/7m36+zKc4sEI0N8141NIIPXcw /aU1Tixu6iy1M2lJCMzPU2bbuBjEOOi6gZgE8nvavDe0eITS/Ki4eTGrYqmRS+xPU9JkfAUowI1 BuyG9E6OCVKdzag== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 TI's AM62P, J722S and AM67A SoCs contain same implementation of the display subsystem (DSS). There are two instances of the DSS (DSS0 and DSS1), each with two video ports (VP) and two video planes. Additionally the SoCs contain two OLDI TXes (OLDI0 and OLDI1), a MIPI DSI TX and a MIPI DPI output path. DSS0 supports: - VP0: OLDI0 in single-link mode, or OLDI0 and OLDI1 in dual-link or clone mode. - VP1: DPI DSS1 supports: - VP0: OLDI1 in single-link mode, or DPI - VP1: DPI or DSI The DSI is only connected to VP1 of DSS1, but OLDI and DPI are shared between the DSS instances. Thus only a single VP can output to DPI, and a single VP can use an OLDI block. Note that in single-link configuration OLDI0 can be used by DSS0, and at the same time OLDI1 can be used by DSS1. The DSS IP itself is compatible with older SoCs. While we could use "ti,am625-dss" compatible string, we add a new one "ti,am62p-dss" to be on the safe side in case the driver needs to do something special for the dual-DSS case in the future. Original patch by Swamil Jain Reviewed-by: "Rob Herring (Arm)" Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen tested-by was for the series, "b4 trailers" applies it to all patches. --- .../bindings/display/ti/ti,am65x-dss.yaml | 27 ++++++++++++++++++= ++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml= b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml index 902ae2122d86..acb7ac635097 100644 --- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml +++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml @@ -28,11 +28,38 @@ description: | On AM62A7, the first VP is tied off in the SoC, and the second VP is rou= ted to external MIPI DPI pins. =20 + AM62P SoC contains two instances of the DSS: + On AM62P DSS0, the first VP is connected to two OLDI TX instances (the s= econd + TX shared with DSS1), the second VP to external MIPI DPI pins (shared wi= th + DSS1). + On AM62P DSS1, the first VP is connected either to the second OLDI TX, or + external MIPI DPI pins. The second VP is connected to either the externa= l MIPI + DPI pins or a Cadence DSI TX. + + An important note about OLDIs on AM62P: + + There are two OLDI hardware blocks. Each OLDI has certain configuration = that + has to be done before it can be used. The OLDI blocks get this configura= tion + directly from the DSS block, via DSS registers. However, as a single OLDI + block can be used either with DSS0 or DSS1, the source for the configura= tion + changes according to a mux. This mux is set according to the OLDI + configuration registers in DSS0. Thus the OLDI control paths change at + runtime, and it is not obvious how to structure this in the DT bindings. + + The solution used here is that each DSS node contains the OLDI nodes tha= t can + be used with that DSS. Thus the DSS0 node has two OLDI child nodes, OLDI= 0 and + OLDI1, and the DSS1 node has one OLDI child node, OLDI1, so three OLDI DT + nodes in total. The two OLDI1 nodes thus refer to the same piece of hard= ware, + and they cannot be used at the same time. The selection which OLDI nodes= to + use are chosen in the board dts files, so assuming the dts files are cor= rect, + no resource conflict can happen. + properties: compatible: enum: - ti,am625-dss - ti,am62a7-dss + - ti,am62p-dss - ti,am65x-dss =20 reg: --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA1F33033CC; Wed, 13 May 2026 13:18:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678288; cv=none; b=SddGgFt3Iq6Arb5aHXTrsEezwPF4wj/OuwJ9tYc6ys+AfDhjFe6L5dn1CwPD6t1rh0X/RjtBSAwiH8N9TF9cryN8psyAksEQk+f60+2YfMLRzKtFL/qJl/oDYl0yXdx/pK8qHlnE9d1uSPB27kWhIzfu73rOvwFkGIhZcFVRblc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678288; c=relaxed/simple; bh=7Kq5ctr2zF2W69THhXrq0QBJ23m1uyPy7zIOXMhkLEE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HHZbLF6GnH1n5ma8yWA/sZIb1Vdd/sDZoX+JZegNEW6oriLKRdLVHqq+4XpqL7vKvhwvK9rkYbN3jfccSohF8sv5SDxuXpJVRh6ySd5yk/kz8KQ1UzfX1HvDtmCUHYLVqdTKkPMWMLtM/BXuBtddmwq9AN/G7Bk1Fddp4gzQzb4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=FNemlzls; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FNemlzls" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 557722CFB; Wed, 13 May 2026 15:17:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678274; bh=7Kq5ctr2zF2W69THhXrq0QBJ23m1uyPy7zIOXMhkLEE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FNemlzlsknUs+qDdMnYLcETJohafmtBWDm/2QdFJEA9+K9DsWTHGyL0yWUONqbYUt VcDRD8Il1WooHulDS1tIfEapOuzPBJdhtDTZt5/7My3r8D67mKPVeKqsdDrsAEvgLo kc7bZRWRGlVIhDifmGO0PfXQNV+9WeJYUdrt8gHo= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:28 +0300 Subject: [PATCH v2 06/16] drm/tidss: Remove extra pm_runtime_mark_last_busy Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-6-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=754; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=7Kq5ctr2zF2W69THhXrq0QBJ23m1uyPy7zIOXMhkLEE=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn+egwMDI1sBhvAo5l4eKjuQE8QH/7ZBim66 3+X//kus9eJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/gAKCRD6PaqMvJYe 9bQuD/4mDDxoW1AcxcDo/7qxJLvyE/T1uRl3v+CWVFCKXq7XjrW4RLAe2dMLzGnB7iU0Tsteu80 rEqeWkfTdiHzk8jYL9il7qpIJKR9apTddjm3UgWzKaeDamsJVP2FdV0mU/fc+LxKWRPMCBl83Zd 6A/uTQVBTTJozLDFH6LYgYnsc7qyZVcOrZd66HPzgQSj1AtxGBvCRpme9tg+oYFpNNFd16QfBse p3PbSm25Z/ltXM+lN017HAB9kTv3fjmHSJiyPbPJTQdZtdwhTOquK76LbbY5WFxVoeuHWf23xfX iAMFuXmUjMjDjavbXDGLOkScZSJME1NhgJhRp2yUfxJkc9l+l4C0bQLPYjVPeOz2hTdeg1AdZGW OZoff0L9iv/aEjAGdULChKXlfGcS6kUhMXq6eah2S79XqEvA8gVIEN9l+WRUaov8/ErHINvHAiv nlkwyuM9+pt/IxGea4Q81NvUA783f/2rqRr/i0sPmSzeADy4yS7R9fwmlDvTey/r1sXCRZNQYwH C7MvKSbsK1yt8LjWvAuUbdl+fdrUYKsAVPUc5YRgo5iFRM+5DZF68zGFHus7zv/nIztrRrTqU8t DboVSUwqAR4FY3nOt2XdSzJ8YnnS1WaTJkbLd7la740Vi9Isy6BOercW5mQVsQly3VAdB8jkvjb hdAC5Xsc+LCo8Ww== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 pm_runtime_put_autosuspend() calls pm_runtime_mark_last_busy(), so no need to call pm_runtime_mark_last_busy() explicitly in the driver. Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tids= s_drv.c index 1c8cc18bc53c..5cb3e746aeb3 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.c +++ b/drivers/gpu/drm/tidss/tidss_drv.c @@ -42,8 +42,6 @@ void tidss_runtime_put(struct tidss_device *tidss) { int r; =20 - pm_runtime_mark_last_busy(tidss->dev); - r =3D pm_runtime_put_autosuspend(tidss->dev); WARN_ON(r < 0); } --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A892A303CAB; Wed, 13 May 2026 13:18:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678289; cv=none; b=iG9NlkTmDEsvIcHEFMH4MbZ7dbiFuA/LwvKoSuObGHIGw/OPwBdCW3foajb6uQ0P2d8PODrig9veokiYST5OXBR00wUSIw8IRtbN1octVfAiV+93cFzFi3NfdduJ5+qTjmIeseLN/TE+TeFNZESVnLFV3DQNEzfdbNSzIPVQfjA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678289; c=relaxed/simple; bh=bSJ25hdhRUWRW/tt7xLdkj0tLeAfFpTuwryHocg6FPM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Vw94KHlexp/mXXzTOzsgiDrbX8nInZN2TmTV8iZCIaA3/cCS2/dYzF9uweMyvlwQ7Kf2ynnZeymU1EDmuQiRfVfoO4y65vOJNvK5P6BZmg9gQLAwvtNww0o1xwsFLEuiyw69zU3lVg4SEZfdZze6zxqhK+ZbV9LGh5hNXq2m+V8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=KWYq6mDK; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="KWYq6mDK" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 737B02E4F; Wed, 13 May 2026 15:17:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678275; bh=bSJ25hdhRUWRW/tt7xLdkj0tLeAfFpTuwryHocg6FPM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KWYq6mDKn3YTBmsrpB+gmpADSvAEOqMRdYIoxsDrCZpEooPq+q4N+hau/Mxdg9v8d D4bcnmlCwGIBQfvmP88AHvjRG7OX6Qf+CzZ3VBPhxYW/cg2pblEzOEgF/xhSNCK9Hr zJoJWmvqTlnEGykIXbLBFTkCH2CK6xPXh02+H878= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:29 +0300 Subject: [PATCH v2 07/16] drm/tidss: oldi: Remove define for unused register OLDI_LB_CTRL Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-7-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=737; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=bSJ25hdhRUWRW/tt7xLdkj0tLeAfFpTuwryHocg6FPM=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn+2YNXZZ8aN7zUh1BcDJWnr/httpnHSfxdC cui6qEUcaCJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/gAKCRD6PaqMvJYe 9SiqD/92c2VScAUTj8GGdabM+26DMx/WnaEAeKL7Xr0dK0X766sGDIr+pltCP7TpbKRVBk48LX8 UVOeX6UMs8i6Gv8EI94LABG54BXMBDZX8LEjV5q3jdiV+3U7OKu5xTnN+qugSHlXwI8J9RN5/HV JDdam/oFzvnDu9fnjqTTkYHHUYtTWYh5xYeH9Ocnyop4bEVdVx87a6KLyl/I/RI8entf1JwlMC9 2xyg/SBt7ib3koWQJZsESSqvaaw5dNNd3p75kFFtMXVssoeaeJY+GJbRnQDR3ONVoJmZSWvZfrc vQhCc8SKk5rAYK31mJg6cPp+BDKOcEqqP+jy3FhYXiZ3aeGttksrR28c0Rhw6npgFtvn9zCsCYO D9IszvVqi3RVGGP2t5CblnrZQnCn6M0v7yJb595Ogc0Hxb/HpsIt1oYF7m8D6y7vSIUs00KCVO9 PnSWlDzdVIflD6Cb9RoNX4Ygnvkxhzb4w93t+78QA2uuxsmhQMYmA6KGmrK2uZ/MmR81ZsyUC0S 54G6i1FMLlDWujFD+Az/Gqs2SN5+FTD2jKR1/hnQsONUNk7cqUGMGnybQYVnH23CYETJdcG0HuM Ee5NxS2HUMlmzpxxOZMfzQrL3tc4vI5f28BbIhBFRy6ELLrGeQX7n2lTxcs2ljHBUOiwHY8sps5 vRzPI3e0rqvR0bg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 OLDI_LB_CTRL define is not used, and doesn't seem to exist at least on some SoCs. Let's remove the define. Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_oldi.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/tidss/tidss_oldi.h b/drivers/gpu/drm/tidss/tid= ss_oldi.h index 8cd535c5ee65..a361e6dbfce3 100644 --- a/drivers/gpu/drm/tidss/tidss_oldi.h +++ b/drivers/gpu/drm/tidss/tidss_oldi.h @@ -20,7 +20,6 @@ struct tidss_oldi; =20 /* Register offsets */ #define OLDI_PD_CTRL 0x100 -#define OLDI_LB_CTRL 0x104 =20 /* Power control bits */ #define OLDI_PWRDOWN_TX(n) BIT(n) --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9861C30ACF2; Wed, 13 May 2026 13:18:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678291; cv=none; b=oF7Um6Ca3AtyRu77bqtsO1fmhzIE77hmfYpubx4PTMpvbnI3CoBd0mcAydKsu9w7J88+LZE5jk0DGzf3X/OOB5nKhl6MN2R6U+wk+rsxoL5BYwbBl1ufdup/jFtOuLRFtCF7ef5vU496ej7yb5IKMxoQuzxnhQY3ugu3p57XJtQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678291; c=relaxed/simple; bh=MrAjka1D20dEvHeE79IK5H5AEJhNel9NxBpXOhee+Q8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c85OdfG9uMm45HmU5kVvWem5y7qqDFcksTF5EyBPB/0EMNYrgeWkWIiR0P9F/Qzqpy/56VXbCYeKgN+oAevcrUuiSHfj8onUFyd87J6MHfqO0vqyzHqJ9eJgvKEUOGxEna+wE8kQum3TnybgaWqknA1FHPH9DNpWT+syn4HevkI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=RmqGVWdO; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RmqGVWdO" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 92C9A2E6B; Wed, 13 May 2026 15:17:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678276; bh=MrAjka1D20dEvHeE79IK5H5AEJhNel9NxBpXOhee+Q8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RmqGVWdOu7q12709miAhB1xapZHlPyt2j+E9fZEOGkDJfaCvFCvqVouom0KupF3cV A2lLDKxZQI+lXyE6Ts90cUfnNrc+hapRJeOuZvniAm7pCh3u6OoMoCRLNfI8Grg0Uo zI0MdtmHdnAqZMY5T6y7iNdmEvcifLmcETsyZmu0= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:30 +0300 Subject: [PATCH v2 08/16] drm/tidss: Add mechanism to detect DPI output Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-8-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=8450; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=MrAjka1D20dEvHeE79IK5H5AEJhNel9NxBpXOhee+Q8=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn/32Szw/TlqUEhEHpyppXM04CluvkNOCVNd jHEEctIfHCJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/wAKCRD6PaqMvJYe 9UfMEACh7uiFdfBPA+bz5Dx9LsCTGd5Izs72YYN6XDdAG++M1MoQ7pqHel7uvh0FlCJQjURQI6Q cPXgZ35cLYkuoqGHq2oo1OoFKazi/yyTXh7+QqJJ9Y19T5/reFr8ZWR3lh+gVqBSoG3mDojTHr8 gR8V6d0vLwaA7jcZf73umcVdfg5RuaT7nvE/SCbPx+6kv9Rfkn7wc+NkoSaEkAvKFCCpeLIAnXO DqvehT/BCymdIBrPDQ8yLgOfexBpg45Rr6KhIQAElTYmLcnFEatcAkjQKPsE110SC7W8v1J3akL wHPUalLfWx7jJX4mctuYnT+QsqMhvTLbA6AErnBLfcm78vLbpKhG+gwpLnt7NHt6uo3pPQerioc rmQXrZ2CIqG40zT2XSWEjax3AypXcjrv/bMnogWPr68GLMYxn3eQrXak6PKF/dLhiJXhrQinIoQ Eq0ckSD24Bc+lf3HD2xjponiM7q4bmofgw/EbQzr/kKjy4PLlNyAmp+gzBYwr+8Esv32o2LZq0G r5a4jIAoOD5UPn0LSAZE6kWJ99Fx4tKdt7+y4OD5gfAVEDx3DnNr8TvTm5HyJ/5zCHt9YpDpoZN NO7UilTu/6rXyBw8IzzNAsFdGWEvCcWGsC0c1lrWNI8ERIgorVCixvrCrczEdG2/glyEBL0RI95 xaHvsFNp1wXXxCg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 There are situations where the driver needs to know if the output is going to the DPI output or not. There is no trivial way to get this information, as there is no "DPI bridge". We can only find this out in reverse: check if the output is NOT DPI, and if that is negative, then it must be DPI. At the moment we have two non-DPI outputs: DSI and OLDI. DSI always has "ti,j721e-dsi" DSI bridge connected to the DSI, so we can use that for checking. OLDI doesn't have a compatible property, but we can check if the DT node has "oldi-transmitters" node as a parent, and the dss node itself as a grand-parent. If the output is not connected to either of the above, it must be DPI. Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_crtc.c | 10 +++++-- drivers/gpu/drm/tidss/tidss_crtc.h | 4 ++- drivers/gpu/drm/tidss/tidss_dispc.c | 5 +++- drivers/gpu/drm/tidss/tidss_dispc.h | 3 +- drivers/gpu/drm/tidss/tidss_kms.c | 55 +++++++++++++++++++++++++++++++++= +++- 5 files changed, 70 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_crtc.c b/drivers/gpu/drm/tidss/tid= ss_crtc.c index a31c21c5f855..dfdf61b01dcd 100644 --- a/drivers/gpu/drm/tidss/tidss_crtc.c +++ b/drivers/gpu/drm/tidss/tidss_crtc.c @@ -192,7 +192,8 @@ static void tidss_crtc_atomic_flush(struct drm_crtc *cr= tc, return; =20 /* Write vp properties to HW if needed. */ - dispc_vp_setup(tidss->dispc, tcrtc->hw_videoport, crtc->state, false); + dispc_vp_setup(tidss->dispc, tcrtc->hw_videoport, crtc->state, false, + tcrtc->dpi_output); =20 /* Update plane positions if needed. */ tidss_crtc_position_planes(tidss, crtc, old_crtc_state, false); @@ -235,7 +236,8 @@ static void tidss_crtc_atomic_enable(struct drm_crtc *c= rtc, if (r !=3D 0) return; =20 - dispc_vp_setup(tidss->dispc, tcrtc->hw_videoport, crtc->state, true); + dispc_vp_setup(tidss->dispc, tcrtc->hw_videoport, crtc->state, true, + tcrtc->dpi_output); tidss_crtc_position_planes(tidss, crtc, old_state, true); =20 /* Turn vertical blanking interrupt reporting on. */ @@ -417,7 +419,8 @@ static const struct drm_crtc_funcs tidss_crtc_funcs =3D= { =20 struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss, u32 hw_videoport, - struct drm_plane *primary) + struct drm_plane *primary, + bool dpi_output) { struct tidss_crtc *tcrtc; struct drm_crtc *crtc; @@ -430,6 +433,7 @@ struct tidss_crtc *tidss_crtc_create(struct tidss_devic= e *tidss, return ERR_PTR(-ENOMEM); =20 tcrtc->hw_videoport =3D hw_videoport; + tcrtc->dpi_output =3D dpi_output; init_completion(&tcrtc->framedone_completion); =20 crtc =3D &tcrtc->crtc; diff --git a/drivers/gpu/drm/tidss/tidss_crtc.h b/drivers/gpu/drm/tidss/tid= ss_crtc.h index 040d1205496b..65df220698f6 100644 --- a/drivers/gpu/drm/tidss/tidss_crtc.h +++ b/drivers/gpu/drm/tidss/tidss_crtc.h @@ -20,6 +20,7 @@ struct tidss_crtc { struct drm_crtc crtc; =20 u32 hw_videoport; + bool dpi_output; =20 struct drm_pending_vblank_event *event; =20 @@ -44,5 +45,6 @@ void tidss_crtc_error_irq(struct drm_crtc *crtc, u64 irqs= tatus); =20 struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss, u32 hw_videoport, - struct drm_plane *primary); + struct drm_plane *primary, + bool dpi_output); #endif diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/ti= dss_dispc.c index 58d5eb033bdb..c21ac3f51720 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.c +++ b/drivers/gpu/drm/tidss/tidss_dispc.c @@ -448,6 +448,7 @@ static const u16 *dispc_common_regmap; =20 struct dss_vp_data { u32 *gamma_table; + bool dpi_output; }; =20 struct dispc_device { @@ -2770,8 +2771,10 @@ static void dispc_vp_set_color_mgmt(struct dispc_dev= ice *dispc, } =20 void dispc_vp_setup(struct dispc_device *dispc, u32 hw_videoport, - const struct drm_crtc_state *state, bool newmodeset) + const struct drm_crtc_state *state, bool newmodeset, + bool dpi_output) { + dispc->vp_data[hw_videoport].dpi_output =3D dpi_output; dispc_vp_set_default_color(dispc, hw_videoport, 0); dispc_vp_set_color_mgmt(dispc, hw_videoport, state, newmodeset); } diff --git a/drivers/gpu/drm/tidss/tidss_dispc.h b/drivers/gpu/drm/tidss/ti= dss_dispc.h index 739d211d0018..6f53d554259c 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.h +++ b/drivers/gpu/drm/tidss/tidss_dispc.h @@ -131,7 +131,8 @@ void dispc_vp_disable_clk(struct dispc_device *dispc, u= 32 hw_videoport); int dispc_vp_set_clk_rate(struct dispc_device *dispc, u32 hw_videoport, unsigned long rate); void dispc_vp_setup(struct dispc_device *dispc, u32 hw_videoport, - const struct drm_crtc_state *state, bool newmodeset); + const struct drm_crtc_state *state, bool newmodeset, + bool dpi_output); =20 int dispc_runtime_suspend(struct dispc_device *dispc); int dispc_runtime_resume(struct dispc_device *dispc); diff --git a/drivers/gpu/drm/tidss/tidss_kms.c b/drivers/gpu/drm/tidss/tids= s_kms.c index 8bb93194e5ac..bc8b10af9a48 100644 --- a/drivers/gpu/drm/tidss/tidss_kms.c +++ b/drivers/gpu/drm/tidss/tidss_kms.c @@ -122,6 +122,50 @@ static const struct drm_mode_config_funcs mode_config_= funcs =3D { .atomic_commit =3D drm_atomic_helper_commit, }; =20 +static const char * const tidss_internal_bridge_compatibles[] =3D { + "ti,j721e-dsi", +}; + +/* + * Detect whether the bridge is internal to the SoC or not. This is needed + * to find out whether we are using DPI output (thus no internal bridge). + * We detect this via two means: + * - If the bridge's of_node has a compatible, compare to known internal v= alues. + * - If the bridge is a grand-child of DSS, and has "oldi-transmitters" pa= rent. + */ +static bool tidss_is_bridge_internal(struct tidss_device *tidss, + struct drm_bridge *bridge) +{ + struct device_node *parent, *grand_parent; + struct property *prop; + bool is_internal; + + if (WARN_ON(!bridge->of_node)) + return false; + + prop =3D of_find_property(bridge->of_node, "compatible", NULL); + for (const char *cp =3D of_prop_next_string(prop, NULL); cp; + cp =3D of_prop_next_string(prop, cp)) { + for (unsigned int i =3D 0; + i < ARRAY_SIZE(tidss_internal_bridge_compatibles); ++i) { + if (strcmp(cp, tidss_internal_bridge_compatibles[i]) =3D=3D 0) + return true; + } + } + + parent =3D of_get_parent(bridge->of_node); + grand_parent =3D of_get_parent(parent); + + is_internal =3D parent && grand_parent && + tidss->dev->of_node =3D=3D grand_parent && + of_node_name_eq(parent, "oldi-transmitters"); + + of_node_put(grand_parent); + of_node_put(parent); + + return is_internal; +} + static int tidss_dispc_modeset_init(struct tidss_device *tidss) { struct device *dev =3D tidss->dev; @@ -133,6 +177,7 @@ static int tidss_dispc_modeset_init(struct tidss_device= *tidss) u32 hw_videoport; struct drm_bridge *bridge; u32 enc_type; + bool dpi_output; }; =20 const struct dispc_features *feat =3D tidss->feat; @@ -149,6 +194,7 @@ static int tidss_dispc_modeset_init(struct tidss_device= *tidss) struct drm_panel *panel; struct drm_bridge *bridge; u32 enc_type =3D DRM_MODE_ENCODER_NONE; + bool dpi_output; int ret; =20 ret =3D drm_of_find_panel_or_bridge(dev->of_node, i, 0, @@ -160,6 +206,11 @@ static int tidss_dispc_modeset_init(struct tidss_devic= e *tidss) return dev_err_probe(dev, ret, "port %d probe failed\n", i); } =20 + if (bridge) + dpi_output =3D !tidss_is_bridge_internal(tidss, bridge); + else + dpi_output =3D true; + if (panel) { u32 conn_type; =20 @@ -199,6 +250,7 @@ static int tidss_dispc_modeset_init(struct tidss_device= *tidss) pipes[num_pipes].hw_videoport =3D i; pipes[num_pipes].bridge =3D bridge; pipes[num_pipes].enc_type =3D enc_type; + pipes[num_pipes].dpi_output =3D dpi_output; num_pipes++; } =20 @@ -224,7 +276,8 @@ static int tidss_dispc_modeset_init(struct tidss_device= *tidss) tidss->planes[tidss->num_planes++] =3D &tplane->plane; =20 tcrtc =3D tidss_crtc_create(tidss, pipes[i].hw_videoport, - &tplane->plane); + &tplane->plane, + pipes[i].dpi_output); if (IS_ERR(tcrtc)) { dev_err(tidss->dev, "crtc create failed\n"); return PTR_ERR(tcrtc); --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86646225397; Wed, 13 May 2026 13:18:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678291; cv=none; b=N7UhfhAhajvKNXoDOHQkZYaUF0AskPgewkaMxDRH3YJDgvbx27B0v8luk5k+tyM4VbrRxZ3Xl8Zn3H6ns5ut+5VDH/J7q3cVBXDHFQ+c63lw2nvn8vZwuhPiTSUcmC8LqQ7qQLgdbT1liNKSIOVy9jP+09IK7q9iarVo6aeWAbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678291; c=relaxed/simple; bh=/cD+FN8IFiV1Cxcp/yPbJWR8MpBq6AQomdWRb1N4DGA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CCudHh+pXd8PF6flgAv2kNRHRs/+yWz7iKHYyOnofpbAV/xAyd6FD5O62OqAjUIu4zFrhBzYCL43OtvT+3PR9m2oqt5z+3sGTAckRE7HItlKyxiqNMuz6NO16ea4cpt/m8ywQZCiEqIm8tM3HLEpBCiBd4loFE03HVUwkjOfsY8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=OqNxR4p3; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OqNxR4p3" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B0B14227A; Wed, 13 May 2026 15:17:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678277; bh=/cD+FN8IFiV1Cxcp/yPbJWR8MpBq6AQomdWRb1N4DGA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=OqNxR4p3maliM/Q7rE09WEzroY4/TSi/IliQAXf9C+Jbl5UHViH5+ZyzXJIVsvoWv vGpUEZHWmJBHYja2jKKn5/KIYB2AZPgctH0JDXqGa0vF7VEpjU9Tpq2ndvjzCIAhkS tjoD2jgLvd26OqhU6WWEBHulzUrh/pS+vPQ7tvXI= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:31 +0300 Subject: [PATCH v2 09/16] drm/tidss: Add external data and sync signal edge configuration Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-9-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3391; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=/cD+FN8IFiV1Cxcp/yPbJWR8MpBq6AQomdWRb1N4DGA=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn/vZQea/FHHMo/D1Ic2Lo/MhzRwkSg0VICY oon3BJrMOKJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/wAKCRD6PaqMvJYe 9YD2EACEfzzuqGF4ggdLbzif9rhSMTRPxbP6XFKJNASUDLTN9DpUQU8pfcpHK0i4KqxsbsRN/Hf bWrKg8hyuJx0vhsJaTHKvcvcQ8xXjyJ+XGCyyyc3tPXiDmlGft5b1YUNhIiAXw6uQcT1uTtkGfm 8JNif0FbIzwdqwuhAUR91h5k3cgYXxw0i4IYtsZG9TxlCXBN2YY0oBiUmVnwhYEq+ixsuNCuJpI ddPVoXNcQUaRZOY4/yvfZXh74pGkrieZFeAZExpztMAVyoPXew/5JBYsIyjGgiG64rL61808fsC z+GiBNT7lgIdQT8udMDL//H7C4ui9EzA1ElBy1Y+VlDsWdqGpVskKS9Dj01r3B8ybLldWosr9+Q qNOqB4dm7nHVrYkPQn8S8gvix7onCdFgL+E1Oygn9lqzf+zmjnFXHV/Q2GCvXoDWYwNwXZugrPw RiRwPaPad0YgPTyhWA3sB9auwQ0uHMUC5nPQ4HiAyZauf3Prb7uGXyP07McvHuFTwfTML1Ihos6 PxJ4RtVstHyXL9zPBHX9LLPe2ujDRP/HDYnv+6lVso14c56ifPaWSe2h3BSfmBGcz9ycph3Tpnj vuIoKZSWD+SDCrR+NLW5JoutZMqhzSJt+aDZHMjfjHW604w9UgaDRPnVqIQ4CM7uaaDXWk9Iq91 wviI6Gu2rXzRQMg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 The DPI output pipeline in K3 SoCs contains the display subsystem (DSS) which produces the in-SoC parallel video signal, and a DPI block which adjusts the signal to the external MIPI DPI output. The DSS IP has registers to configure whether the data and sync signals are driven on rising or falling clock edge, and on some SoCs these are automatically conveyed to the DPI block which needs that configuration to properly output the MIPI DPI signal. However, on some SoCs the DPI block configuration has to be done manually, using an extra register outside the DSS, DPI0_CLK_CTRL from MAIN_CTRL_MMR_CFG0 block, which controls the DPI block's behavior. Add the support to get the regmap to the register via syscon, and configure the bits before enabling the video output. Original patch from Louis Chauvet Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 21 +++++++++++++++++++++ drivers/gpu/drm/tidss/tidss_dispc_regs.h | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/ti= dss_dispc.c index c21ac3f51720..92cba069ed6c 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.c +++ b/drivers/gpu/drm/tidss/tidss_dispc.c @@ -467,6 +467,8 @@ struct dispc_device { const struct dispc_features *feat; =20 struct clk *fclk; + struct regmap *syscon_dpi_io_ctrl; + unsigned int syscon_dpi_io_ctrl_offset; =20 bool is_enabled; =20 @@ -1201,6 +1203,13 @@ void dispc_vp_prepare(struct dispc_device *dispc, u3= 2 hw_videoport, mode->crtc_hdisplay - 1) | FIELD_PREP(DISPC_VP_SIZE_SCREEN_VDISPLAY_MASK, mode->crtc_vdisplay - 1)); + + if (dispc->vp_data[hw_videoport].dpi_output && dispc->syscon_dpi_io_ctrl)= { + regmap_write(dispc->syscon_dpi_io_ctrl, + dispc->syscon_dpi_io_ctrl_offset + 0x0, + (!ipc ? DPI0_CLK_CTRL_DATA_CLK_INVDIS : 0) | + (rf ? DPI0_CLK_CTRL_SYNC_CLK_INVDIS : 0)); + } } =20 void dispc_vp_enable(struct dispc_device *dispc, u32 hw_videoport) @@ -2989,6 +2998,18 @@ int dispc_init(struct tidss_device *tidss) =20 dispc_init_errata(dispc); =20 + dispc->syscon_dpi_io_ctrl =3D + syscon_regmap_lookup_by_phandle_args(tidss->dev->of_node, + "ti,dpi-io-ctrl", 1, + &dispc->syscon_dpi_io_ctrl_offset); + + if (PTR_ERR(dispc->syscon_dpi_io_ctrl) =3D=3D -ENODEV) + dispc->syscon_dpi_io_ctrl =3D NULL; + else if (IS_ERR(dispc->syscon_dpi_io_ctrl)) + return dev_err_probe(dispc->dev, + PTR_ERR(dispc->syscon_dpi_io_ctrl), + "DISPC: syscon_regmap_lookup_by_phandle failed.\n"); + dispc->fourccs =3D devm_kcalloc(dev, ARRAY_SIZE(dispc_color_formats), sizeof(*dispc->fourccs), GFP_KERNEL); if (!dispc->fourccs) diff --git a/drivers/gpu/drm/tidss/tidss_dispc_regs.h b/drivers/gpu/drm/tid= ss/tidss_dispc_regs.h index 382027dddce8..4cdde24d8372 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc_regs.h +++ b/drivers/gpu/drm/tidss/tidss_dispc_regs.h @@ -333,4 +333,8 @@ enum oldi_mode_reg_val { SPWG_18 =3D 0, JEIDA_24 =3D 1,= SPWG_24 =3D 2 }; =20 #define AM65X_OLDI_PWRDN_TX BIT(8) =20 +/* Bits in the MAIN_CTRL_MMR_CFG0_DPI0_CLK_CTRL register */ +#define DPI0_CLK_CTRL_DATA_CLK_INVDIS BIT(8) +#define DPI0_CLK_CTRL_SYNC_CLK_INVDIS BIT(9) + #endif /* __TIDSS_DISPC_REGS_H */ --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA4113126C0; Wed, 13 May 2026 13:18:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678294; cv=none; b=L3A2yijUQ7wmLhfUYhgq7KcpqxupXtCVmwMIXWi0DL5tVDrWZMiAAfPnK49jdujE/LmZRyAlNn4DsdQsqFnRoOsx8Qhv9opxujvB6w4vRaLe8hh6zkIYCBzsWmL8eGsdebdAMmKIl10QNEqtHpLboN+Kv9hJ0h3zO2S3asS1T9o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678294; c=relaxed/simple; bh=qlAAHPuyfwHqortEyoSLGkoCaKp5dsbc6D/L7Uu8qiE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H5JNcNhjILZKFbbV1n7MPSrWLGUC5ZZ4Cp7uuaH8rzPK7er7BdnXgYxcVctpOjm2jFEA+pNsN/Sf2XtWbOadUWXdc/LPntyKcYZXIin36nPBSziBMzC4IKwr6R631bdrrfM7b9agQHlvcrUizfeIW6ewvCFLbV+Ch5FIaLMPQp4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=CgcgVaZ0; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="CgcgVaZ0" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CD3D12F0D; Wed, 13 May 2026 15:17:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678278; bh=qlAAHPuyfwHqortEyoSLGkoCaKp5dsbc6D/L7Uu8qiE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=CgcgVaZ00ZC/gRlmRFZGJlc9i1nQ9FRvfwoVc/Z7w8FEqeHSo7wLubCqU+arj7ah2 D+VWdUvXndyg8QywPaCSLxvKCrhPL1d5ZSTZatmE+92tXHx2hrPRnh3/CcN7ZhqEPD pT9iaCyqA9v8rzPL9c6X0gbZsUBqDhvC/X5Q4aaY= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:32 +0300 Subject: [PATCH v2 10/16] drm/tidss: Add support for DPIENABLE bit Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-10-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4235; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=qlAAHPuyfwHqortEyoSLGkoCaKp5dsbc6D/L7Uu8qiE=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHn/6E/+DIUFLlIWGpILW9sqFa7vxeqDtI08G VwHofIO+JGJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR5/wAKCRD6PaqMvJYe 9TDkD/4x3MiPYu9hRaFX1cGtbr//N7niKSvVzlTqlimNsME+DIQPoa/GBO/2L5DC199fOD+rGjI 81P7oO8yYuwK+OORdt380WW3EI6eIhUX/EGT63Mf90GYMCwtuZZPL2pKb33CFWw1kQgYAWvqqcd fDJuIR/MSJMxlWI4R0xHLP7lh1LmMqInYW+iWfJwrnUy79idDye9FqsS7EdjiiIDcHmkNAHmdAo J8E2mbtTYYyb35goiSa09D0LaeKTqDngI0RePeiFa79aFpmKIaUUKBYEG6KGULqOxYUKyISEhbH y1j6m6bH8jzqeMrjLzqqjSj7KVynVqrUKmnuacKyjeVCO69qYy2afB6ttbRuG7lMrTgD8WEGii1 mhlxlYqZBD3ofIqOgW8HheHmxaW5wWDGFEsa9W5fjXhdfSTUKghsVVc4pC+aTMl40aKafKFvFYk d/qNRt5etaC/QjVeWZRuzMUdaG+oX5LtEKw1d9eXmPYs+rYwImfse3bEE/YvjAUo+CIb+EhWZvh OP5tt/eSwyKywB8BiOLAE/kamBsal1RU8SRF5XEIKElA3w2WMwQlv38wiE03Qq+o1+ByjICFBY8 4LNgFzKRi6q6B5ScALYewk3JIhEtrndZS4zP0XwmfZvBUXatLFshiEo35u46gZ+XXxAPsAoDEUe /Le5O2gk6gJQpFw== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 Many (or even all?) K3 SoCs have DSS VP_CONTROL.DPIENABLE bit described in their documentation. This bit controls whether the DPI block is enabled, and is set to 1 by default (i.e. DPI is enabled at HW reset). However, in almost all SoCs the setting does not actually do anything, and at the moment the bit is not managed by the driver. The exception is AM62L, which does have DPIENABLE connected, and disabling the DPI block when it is not in use provides power savings. Let's add a new feature flag for this, 'has_vp_control_dpienable', and implement the support. Disable DPIENABLE for all videoports at resume time, so that it is 0 by default. Specifically enable and disable it in dispc_vp_enable() and dispc_vp_disable() for DPI output. Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_dispc.c | 23 +++++++++++++++++++++-- drivers/gpu/drm/tidss/tidss_dispc.h | 2 ++ drivers/gpu/drm/tidss/tidss_dispc_regs.h | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/ti= dss_dispc.c index 92cba069ed6c..82e0b3184cc4 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.c +++ b/drivers/gpu/drm/tidss/tidss_dispc.c @@ -442,6 +442,8 @@ const struct dispc_features dispc_am62l_feats =3D { }, =20 .vid_order =3D {0}, + + .has_vp_control_dpienable =3D true, }; =20 static const u16 *dispc_common_regmap; @@ -1214,6 +1216,11 @@ void dispc_vp_prepare(struct dispc_device *dispc, u3= 2 hw_videoport, =20 void dispc_vp_enable(struct dispc_device *dispc, u32 hw_videoport) { + if (dispc->feat->has_vp_control_dpienable && + dispc->vp_data[hw_videoport].dpi_output) + VP_REG_FLD_MOD(dispc, hw_videoport, DISPC_VP_CONTROL, 1, + DISPC_VP_CONTROL_DPIENABLE_MASK); + VP_REG_FLD_MOD(dispc, hw_videoport, DISPC_VP_CONTROL, 1, DISPC_VP_CONTROL_ENABLE_MASK); } @@ -1222,6 +1229,11 @@ void dispc_vp_disable(struct dispc_device *dispc, u3= 2 hw_videoport) { VP_REG_FLD_MOD(dispc, hw_videoport, DISPC_VP_CONTROL, 0, DISPC_VP_CONTROL_ENABLE_MASK); + + if (dispc->feat->has_vp_control_dpienable && + dispc->vp_data[hw_videoport].dpi_output) + VP_REG_FLD_MOD(dispc, hw_videoport, DISPC_VP_CONTROL, 0, + DISPC_VP_CONTROL_DPIENABLE_MASK); } =20 void dispc_vp_unprepare(struct dispc_device *dispc, u32 hw_videoport) @@ -2445,10 +2457,17 @@ static void dispc_vp_init(struct dispc_device *disp= c) =20 dev_dbg(dispc->dev, "%s()\n", __func__); =20 - /* Enable the gamma Shadow bit-field for all VPs*/ - for (i =3D 0; i < dispc->feat->num_vps; i++) + for (i =3D 0; i < dispc->feat->num_vps; i++) { + /* Enable the gamma Shadow bit-field for all VPs*/ VP_REG_FLD_MOD(dispc, i, DISPC_VP_CONFIG, 1, DISPC_VP_CONFIG_GAMMAENABLE_MASK); + + if (dispc->feat->has_vp_control_dpienable) { + /* Disable DPIENABLE for all VPs */ + VP_REG_FLD_MOD(dispc, i, DISPC_VP_CONTROL, 0, + DISPC_VP_CONTROL_DPIENABLE_MASK); + } + } } =20 static void dispc_initial_config(struct dispc_device *dispc) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.h b/drivers/gpu/drm/tidss/ti= dss_dispc.h index 6f53d554259c..0fbfb86adfbf 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.h +++ b/drivers/gpu/drm/tidss/tidss_dispc.h @@ -92,6 +92,8 @@ struct dispc_features { u32 num_vids; struct dispc_vid_info vid_info[TIDSS_MAX_PLANES]; u32 vid_order[TIDSS_MAX_PLANES]; + /* The DSS has VP_CONTROL.DPIENABLE bit */ + bool has_vp_control_dpienable; }; =20 extern const struct dispc_features dispc_k2g_feats; diff --git a/drivers/gpu/drm/tidss/tidss_dispc_regs.h b/drivers/gpu/drm/tid= ss/tidss_dispc_regs.h index 4cdde24d8372..4246c72efdd5 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc_regs.h +++ b/drivers/gpu/drm/tidss/tidss_dispc_regs.h @@ -230,6 +230,7 @@ enum dispc_common_regs { =20 #define DISPC_VP_CONTROL 0x4 #define DISPC_VP_CONTROL_DATALINES_MASK GENMASK(10, 8) +#define DISPC_VP_CONTROL_DPIENABLE_MASK GENMASK(6, 6) #define DISPC_VP_CONTROL_GOBIT_MASK GENMASK(5, 5) #define DISPC_VP_CONTROL_ENABLE_MASK GENMASK(0, 0) =20 --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51E4F2BD58A; Wed, 13 May 2026 13:18:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678294; cv=none; b=cnUXtL1eRFYV3Lt8GEpzRZySd471LtZ+aUn3+j7fS55i3ily67Cpotq7IzdWc7gofc1LXCA0RU3c8gAeXZtBAoUp05PKdEAcYZCqBqB/4tw3zk9EsEMx0ol62Iqxf1CLriI5sh+XFwA/BvbXklB+m+AgMDIdUqDlwWfzdzaQIXY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678294; c=relaxed/simple; bh=vNhPG3gt1iNAQede4sSDJktbqWiYm6dT9TVVZYkS1Jg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LqaOx6lmasc4+mT9bYBpn3RhjDydUPvOTMbfDvKW/kIoQ443v4L0Mzj/J41VBq/nXyfEJwf2k5e0ta5RO9g724IcrHZ8t0z55GuHtihC0/mnjhXir7t6UQqno5Rl5CzAM6NlKEJhMPSU6w412Qj1iJvoomzyEXkz5WoNsZC4xdo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=wmmeqmvc; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wmmeqmvc" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E8EFE2F84; Wed, 13 May 2026 15:17:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678279; bh=vNhPG3gt1iNAQede4sSDJktbqWiYm6dT9TVVZYkS1Jg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=wmmeqmvcAwYM3R3n48gpc9vcJ5xbooIoKw710g0UvU85u/2AvwUktsjnjpl1hNcGe PdPKryRzh6cr3VrxWa0YtSQJ6MOxdXugLpqx0MaB8hTsNJRDDtXh8vU+q8SjV1M2F9 JULW1baHsJ8NhGAq8tCVfBxCeXsmX+Oe9jUqOFjg= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:33 +0300 Subject: [PATCH v2 11/16] drm/tidss: oldi: Fix OLDI signal polarities Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-11-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4997; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=vNhPG3gt1iNAQede4sSDJktbqWiYm6dT9TVVZYkS1Jg=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHoADKKdxxycDiVBKEHdHXn6PBSrKmAg76JTO qmDkuR18cWJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR6AAAKCRD6PaqMvJYe 9f/uEACn14KBoTk3RisMc2V47Nm7Qa+OtgZ8ZtleGMyekyKkSb6msFgrJfz5VmQCiEqnb97Ur2R +/STOmNOOM5++gVhOozKtzXBTcMYtTAWbHwgjMzxezpChXR0PSNKY2luLbBf2oQs23fidZfnRBc lGDWz8jIU3162LDvBGsHmi79za1SXEfo0WqCzJg24yVRnwPZLSJsZiF5zM95plRJ6jY74Pi0GCf nqv8PsYNEe1+zbYAw0tptHBmoCFLhEVgHfMtrVpkWctfmRSR1lA5SsHNz2eCYgh4KC1DVbDJFoH WMXgxLFtxzaPrdqJDOd0wZ2B7IWUH8WAPJS86wcWToElMiebwHHKBTPEemjJv27iyM4HPpRWHQr W22XWQ6rKNiLrFEpu91zwkdNcIzCf0eglWck+6IPZtnrgshRpeP5piZ0/Xn54g6ORuGzIR1jSL2 YsHBo+7OPKOJiH7h3hPdrQfiRLohkn38EWLMT1JGM5CbyAXltbr1c7GMRJAv4hb6gpU9UJSz5kQ xfm2PAIJJtIv2pRsAN6ae1x5YV7q3e7v7tu9TTUi7ysUoX4KgBRMw2jp3tKL3EJVeP+edjUEP4m aVs/MSxJEy9PcvDL01iYZlXtT4twt6xbiZOROXEbMNlEDoIf3LRat738O28RLvrKxsjwd9Dl4ZD 8vRYMrNtjxuIB0A== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 OLDI has a few issues with how it handles the signal polarities: - It always sets OLDI_DEPOL, which means DE active low - It sets DRM_BUS_FLAG_DE_HIGH in struct drm_bridge_timings, i.e. reverse to the OLDI_DEPOL - It sets DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE in struct drm_bridge_timings, but the TRM says "The DSS interface is clocked on the rising edge of OLDI_FWD_P_CLK pixel clock", which I read as "OLDI samples on rising edge". - But the defined drm_bridge_timings is not actually used anywhere, even if it is set to bridge->timings, so the bus flags are just ignored. However, based on my testing, OLDI_DEPOL bit or the edge on which data and syncs are driven doesn't seem to affect the OLDI output. Possibly it's not as robust, but I did not see any effect with an oscilloscope. However, the code is still quite broken, so let's fix it: - Remove drm_bridge_timings - Set the correct input_bus_cfg.flags in tidss_oldi_atomic_check() - Set OLDI_DEPOL based on the DE bus flag Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_oldi.c | 38 ++++++++++++++++++++++++++++------= ---- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_oldi.c b/drivers/gpu/drm/tidss/tid= ss_oldi.c index 17c535bfa057..e925ddaa4fd6 100644 --- a/drivers/gpu/drm/tidss/tidss_oldi.c +++ b/drivers/gpu/drm/tidss/tidss_oldi.c @@ -164,7 +164,8 @@ static void tidss_oldi_tx_power(struct tidss_oldi *oldi= , bool enable) regmap_update_bits(oldi->io_ctrl, OLDI_PD_CTRL, mask, enable ? 0 : mask); } =20 -static int tidss_oldi_config(struct tidss_oldi *oldi) +static int tidss_oldi_config(struct tidss_oldi *oldi, + struct drm_bridge_state *bridge_state) { const struct oldi_bus_format *bus_fmt =3D NULL; u32 oldi_cfg =3D 0; @@ -183,7 +184,8 @@ static int tidss_oldi_config(struct tidss_oldi *oldi) "OLDI%u: DSS port width %d not supported\n", oldi->oldi_instance, bus_fmt->data_width); =20 - oldi_cfg |=3D OLDI_DEPOL; + if (bridge_state->input_bus_cfg.flags & DRM_BUS_FLAG_DE_LOW) + oldi_cfg |=3D OLDI_DEPOL; /* 1 =3D active low */ =20 oldi_cfg =3D (oldi_cfg & (~OLDI_MAP)) | (bus_fmt->oldi_mode_reg_val << 1); =20 @@ -220,6 +222,22 @@ static int tidss_oldi_config(struct tidss_oldi *oldi) return ret; } =20 +static int tidss_oldi_atomic_check(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state) +{ + bridge_state->input_bus_cfg.flags &=3D + ~(DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | + DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE); + + bridge_state->input_bus_cfg.flags |=3D + DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE | + DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE; + + return 0; +} + static void tidss_oldi_atomic_pre_enable(struct drm_bridge *bridge, struct drm_atomic_state *state) { @@ -228,6 +246,7 @@ static void tidss_oldi_atomic_pre_enable(struct drm_bri= dge *bridge, struct drm_connector_state *conn_state; struct drm_crtc_state *crtc_state; struct drm_display_mode *mode; + struct drm_bridge_state *bridge_state; =20 if (oldi->link_type =3D=3D OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK) return; @@ -245,10 +264,14 @@ static void tidss_oldi_atomic_pre_enable(struct drm_b= ridge *bridge, if (WARN_ON(!crtc_state)) return; =20 + bridge_state =3D drm_atomic_get_new_bridge_state(state, bridge); + if (WARN_ON(!bridge_state)) + return; + mode =3D &crtc_state->adjusted_mode; =20 /* Configure the OLDI params*/ - tidss_oldi_config(oldi); + tidss_oldi_config(oldi, bridge_state); =20 /* Set the OLDI serial clock (7 times the pixel clock) */ tidss_oldi_set_serial_clk(oldi, mode->clock * 7 * 1000); @@ -329,7 +352,8 @@ tidss_oldi_mode_valid(struct drm_bridge *bridge, } =20 static const struct drm_bridge_funcs tidss_oldi_bridge_funcs =3D { - .attach =3D tidss_oldi_bridge_attach, + .attach =3D tidss_oldi_bridge_attach, + .atomic_check =3D tidss_oldi_atomic_check, .atomic_pre_enable =3D tidss_oldi_atomic_pre_enable, .atomic_post_disable =3D tidss_oldi_atomic_post_disable, .atomic_get_input_bus_fmts =3D tidss_oldi_atomic_get_input_bus_fmts, @@ -440,11 +464,6 @@ static int get_parent_dss_vp(struct device_node *oldi_= tx, u32 *parent_vp) return -ENODEV; } =20 -static const struct drm_bridge_timings default_tidss_oldi_timings =3D { - .input_bus_flags =3D DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE - | DRM_BUS_FLAG_DE_HIGH, -}; - void tidss_oldi_deinit(struct tidss_device *tidss) { for (int i =3D 0; i < tidss->num_oldis; i++) { @@ -598,7 +617,6 @@ int tidss_oldi_init(struct tidss_device *tidss) /* Register the bridge. */ oldi->bridge.of_node =3D child; oldi->bridge.driver_private =3D oldi; - oldi->bridge.timings =3D &default_tidss_oldi_timings; =20 tidss->oldis[tidss->num_oldis++] =3D oldi; tidss->is_ext_vp_clk[oldi->parent_vp] =3D true; --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 781E8316189; Wed, 13 May 2026 13:18:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678297; cv=none; b=JHB30x+egOcSbpynkjTNsTE/G21uahUbSaBzFYpQjYiC4mDFp+eRlYoansIYr/jm2yb5SM9JKC1ZAFccPLGNKq6ZwpdLay8NEFb1NAbzw5fM1q6IUdoRE/6Twd0SCe/qjWp7UCDbvRk3ZwYCfMWhuNuy+2ytyGXsxQf3Mo7OSI0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678297; c=relaxed/simple; bh=iVTG0B+cVq7zMLwd1l18EkP50Lew0RlRkKUlnj/wipk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZgC3wdDu/hzOeRKJJ5sTMWusGSQVbImhXW6yCGBIUPIRP0rGRYxAbD28Q8UZ5NGdMNi2zc0WqZZM59M/PhzFuBhEjhJoJBsjcrUZPimQKXMCZYDmepLv5z0WLlrwjzguNsx5ghlj6SjRxTQg+zupd/y/1q1DTSE8C6Mhy7zY8JU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=MmToqoTn; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MmToqoTn" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0E8502F81; Wed, 13 May 2026 15:18:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678281; bh=iVTG0B+cVq7zMLwd1l18EkP50Lew0RlRkKUlnj/wipk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MmToqoTnJJGzZD32CwXl6In/SQfNvXZYIFc7RduXmYx1awOJpfpq+FqSki6MAyfWo 8Vuzrsa7Joj2wbstFtv1XJjV9hAHgLqlKPwjg447droiDKPT8EicQqgkzD/3tn6jit ZEP3cQRxVsTJ6Hr8wjmgAtelgxx2QebpBJe4+Luk= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:34 +0300 Subject: [PATCH v2 12/16] drm/tidss: oldi: Convert OLDI to an aux driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-12-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=23421; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=iVTG0B+cVq7zMLwd1l18EkP50Lew0RlRkKUlnj/wipk=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHoAU/50lMa5bdFqxOjpn02xIOQla/us4qvA/ gHIelMrDuaJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR6AAAKCRD6PaqMvJYe 9UkkEACUIIgOooba1t6Mw9RwQsRWzMJJJVJF9dtuWNp8v8xr6IW2RV4tSYloCNh5QgL+88dMQiO B/ZoRgCIYjfTo23mjkbLmzYZq8YAK1XCFOtwLDS7XNJ1s6GX4PP7BLIUVvioD8fELE0XLEE9W29 hhe/Sfq4vQTwzGww9PNEH6W6U7JSR/39zdCYV6FwBVbLj/Uskc5YyDeMPowO4JXThsLPmUjAeTF /OHsHPA2dmRDEYC12Emwt9eR6UY9u/N6I2ZQVg2Jbe5a3v25XX2nj24ZEVepSIBtRWNS9fO7FfS 8gF1afIM6a01FnlWJ+rpS7j6B6OHFgwxgdbCnNuaoolr5y3a1jvC0sSUrX5oPSTK0OFxUtAugTq 6tTqHksd2TfEopNpjDPp6NvgRlEVxyVdT5phD0xn9hksUX1nKpN1a9U6lzIaq+odZjhA0zP+lhj b1S3HcvxFQBb5ZriddZNjfcuWZ7BTSJVZqDKj60AFSa60eejt3kN08gzVSQCB+Uzlz/XWDxtRE1 C9GOOv64hbzQ/waX8XKoHM8Pd86mRLSc6pkkLW2uJU1+oy+IHsgcHbJADanPZccG90rkjW3x3zp hM+0SEik2yAdguVONwysDrGzEnBcBz+DMV8U5Vi1B6UwoV8IHfHtUmTh06rnkhBWMjQaFqFdRaD KYF0yoyFB2+8ujA== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 Currently in the DT, OLDI is defined in child nodes under the DSS node. The tidss driver will parse the DT, and create DRM bridges for the OLDIs, and there are no Linux devices for the OLDIs. On new SoCs the OLDIs have their own power-domains which we need to control. The cleanest way to do this in DT is to add the PDs to the OLDI nodes. But this means the OLDI bridge code would somehow have to manually manage the PDs, the PDs not being under a Linux device, and there isn't much support for that kind of setup in the PD framework. A solution to this is to convert the OLDI to an auxiliary device/driver, created by tidss: - At module load time the tidss module will, in addition to registering the tidss DRM driver, register an oldi auxiliary driver. - At probe time tidss will parse the DT, and create an auxiliary device for each OLDI. The aux driver will probe, and as its of_node points to the OLDI node containing the PD, the driver framework will take care of enabling and disabling the PD when OLDI is used ("used" as in pm_runtime context). Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 51 +++- drivers/gpu/drm/tidss/tidss_drv.h | 5 +- drivers/gpu/drm/tidss/tidss_oldi.c | 493 ++++++++++++++++++++++++++-------= ---- drivers/gpu/drm/tidss/tidss_oldi.h | 7 +- 4 files changed, 400 insertions(+), 156 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tids= s_drv.c index 5cb3e746aeb3..aef945101be4 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.c +++ b/drivers/gpu/drm/tidss/tidss_drv.c @@ -133,10 +133,6 @@ static int tidss_probe(struct platform_device *pdev) return ret; } =20 - ret =3D tidss_oldi_init(tidss); - if (ret) - return dev_err_probe(dev, ret, "failed to init OLDI\n"); - pm_runtime_enable(dev); =20 pm_runtime_set_autosuspend_delay(dev, 1000); @@ -147,24 +143,30 @@ static int tidss_probe(struct platform_device *pdev) dispc_runtime_resume(tidss->dispc); #endif =20 + ret =3D tidss_oldi_create_devices(tidss); + if (ret) { + dev_err_probe(dev, ret, "failed to create OLDI devices\n"); + goto err_runtime_suspend; + } + ret =3D tidss_modeset_init(tidss); if (ret < 0) { if (ret !=3D -EPROBE_DEFER) dev_err(dev, "failed to init DRM/KMS (%d)\n", ret); - goto err_runtime_suspend; + goto err_destroy_oldis; } =20 irq =3D platform_get_irq(pdev, 0); if (irq < 0) { ret =3D irq; - goto err_runtime_suspend; + goto err_destroy_oldis; } tidss->irq =3D irq; =20 ret =3D tidss_irq_install(ddev, irq); if (ret) { dev_err(dev, "tidss_irq_install failed: %d\n", ret); - goto err_runtime_suspend; + goto err_destroy_oldis; } =20 drm_kms_helper_poll_init(ddev); @@ -194,6 +196,9 @@ static int tidss_probe(struct platform_device *pdev) err_irq_uninstall: tidss_irq_uninstall(ddev); =20 +err_destroy_oldis: + tidss_oldi_destroy_devices(tidss); + err_runtime_suspend: #ifndef CONFIG_PM dispc_runtime_suspend(tidss->dispc); @@ -201,8 +206,6 @@ static int tidss_probe(struct platform_device *pdev) pm_runtime_dont_use_autosuspend(dev); pm_runtime_disable(dev); =20 - tidss_oldi_deinit(tidss); - return ret; } =20 @@ -218,6 +221,8 @@ static void tidss_remove(struct platform_device *pdev) =20 tidss_irq_uninstall(ddev); =20 + tidss_oldi_destroy_devices(tidss); + #ifndef CONFIG_PM /* If we don't have PM, we need to call suspend manually */ dispc_runtime_suspend(tidss->dispc); @@ -225,8 +230,6 @@ static void tidss_remove(struct platform_device *pdev) pm_runtime_dont_use_autosuspend(dev); pm_runtime_disable(dev); =20 - tidss_oldi_deinit(tidss); - /* devm allocated dispc goes away with the dev so mark it NULL */ dispc_remove(tidss); =20 @@ -262,7 +265,31 @@ static struct platform_driver tidss_platform_driver = =3D { }, }; =20 -drm_module_platform_driver(tidss_platform_driver); +static int __init tidss_platform_driver_init(void) +{ + int ret; + + ret =3D tidss_oldi_register_driver(); + if (ret) + return ret; + + ret =3D drm_platform_driver_register(&tidss_platform_driver); + if (ret) { + tidss_oldi_unregister_driver(); + return ret; + } + + return 0; +} +module_init(tidss_platform_driver_init); + +static void __exit tidss_platform_driver_exit(void) +{ + platform_driver_unregister(&tidss_platform_driver); + tidss_oldi_unregister_driver(); +} +module_exit(tidss_platform_driver_exit); + =20 MODULE_AUTHOR("Tomi Valkeinen "); MODULE_DESCRIPTION("TI Keystone DSS Driver"); diff --git a/drivers/gpu/drm/tidss/tidss_drv.h b/drivers/gpu/drm/tidss/tids= s_drv.h index e1c1f41d8b4b..d3dba639b278 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.h +++ b/drivers/gpu/drm/tidss/tidss_drv.h @@ -16,7 +16,8 @@ #define TIDSS_MAX_OLDI_TXES 2 =20 typedef u32 dispc_irq_t; -struct tidss_oldi; + +struct auxiliary_device; =20 struct tidss_device { struct drm_device ddev; /* DRM device for DSS */ @@ -34,7 +35,7 @@ struct tidss_device { struct drm_plane *planes[TIDSS_MAX_PLANES]; =20 unsigned int num_oldis; - struct tidss_oldi *oldis[TIDSS_MAX_OLDI_TXES]; + struct auxiliary_device *oldis[TIDSS_MAX_OLDI_TXES]; =20 unsigned int irq; =20 diff --git a/drivers/gpu/drm/tidss/tidss_oldi.c b/drivers/gpu/drm/tidss/tid= ss_oldi.c index e925ddaa4fd6..5331732ac99e 100644 --- a/drivers/gpu/drm/tidss/tidss_oldi.c +++ b/drivers/gpu/drm/tidss/tidss_oldi.c @@ -5,11 +5,13 @@ * Aradhya Bhatia */ =20 +#include #include #include #include #include #include +#include #include =20 #include @@ -20,6 +22,12 @@ #include "tidss_dispc_regs.h" #include "tidss_oldi.h" =20 +static DEFINE_IDA(tidss_oldi_ida); + +struct tidss_oldi_platform_data { + struct tidss_device *tidss; +}; + struct tidss_oldi { struct tidss_device *tidss; struct device *dev; @@ -251,6 +259,8 @@ static void tidss_oldi_atomic_pre_enable(struct drm_bri= dge *bridge, if (oldi->link_type =3D=3D OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK) return; =20 + WARN_ON(pm_runtime_get_sync(oldi->dev) < 0); + connector =3D drm_atomic_get_new_connector_for_encoder(state, bridge->encoder); if (WARN_ON(!connector)) @@ -296,6 +306,8 @@ static void tidss_oldi_atomic_post_disable(struct drm_b= ridge *bridge, =20 /* Clear OLDI Config */ tidss_disable_oldi(oldi->tidss, oldi->parent_vp); + + pm_runtime_put_autosuspend(oldi->dev); } =20 #define MAX_INPUT_SEL_FORMATS 1 @@ -464,174 +476,375 @@ static int get_parent_dss_vp(struct device_node *ol= di_tx, u32 *parent_vp) return -ENODEV; } =20 -void tidss_oldi_deinit(struct tidss_device *tidss) -{ - for (int i =3D 0; i < tidss->num_oldis; i++) { - if (tidss->oldis[i]) { - drm_bridge_remove(&tidss->oldis[i]->bridge); - tidss->is_ext_vp_clk[tidss->oldis[i]->parent_vp] =3D false; - tidss->oldis[i] =3D NULL; - } - } -} - -int tidss_oldi_init(struct tidss_device *tidss) +static int tidss_oldi_probe(struct auxiliary_device *auxdev, + const struct auxiliary_device_id *id) { - struct tidss_oldi *oldi; - struct device_node *child; - struct drm_bridge *bridge; - u32 parent_vp, oldi_instance; - int companion_instance =3D -1; + struct device *dev =3D &auxdev->dev; + struct tidss_oldi_platform_data *oldi_pdata =3D dev_get_platdata(dev); + struct tidss_device *tidss =3D oldi_pdata->tidss; + struct device_node *node =3D auxdev->dev.of_node; enum tidss_oldi_link_type link_type =3D OLDI_MODE_UNSUPPORTED; - struct device_node *oldi_parent; - int ret =3D 0; - - tidss->num_oldis =3D 0; + int companion_instance =3D -1; + struct drm_bridge *bridge; + struct device_link *link; + struct tidss_oldi *oldi; + u32 oldi_instance; + u32 parent_vp; + int ret; =20 - oldi_parent =3D of_get_child_by_name(tidss->dev->of_node, "oldi-transmitt= ers"); - if (!oldi_parent) - /* Return gracefully */ - return 0; + ret =3D of_property_read_u32(node, "reg", &oldi_instance); + if (ret) + return ret; =20 - for_each_available_child_of_node(oldi_parent, child) { - ret =3D get_parent_dss_vp(child, &parent_vp); - if (ret) { - if (ret =3D=3D -ENODEV) { - /* - * ENODEV means that this particular OLDI node - * is not connected with the DSS, which is not - * a harmful case. There could be another OLDI - * which may still be connected. - * Continue to search for that. - */ - continue; - } - goto err_put_node; - } + ret =3D get_parent_dss_vp(node, &parent_vp); + if (ret) + return ret; =20 - ret =3D of_property_read_u32(child, "reg", &oldi_instance); - if (ret) - goto err_put_node; + /* + * Now that it's confirmed that OLDI is connected with DSS, + * let's continue getting the OLDI sinks ahead and other OLDI + * properties. + */ + bridge =3D devm_drm_of_get_bridge(dev, node, OLDI_OUTPUT_PORT, 0); + if (IS_ERR(bridge)) { + /* + * Either there was no OLDI sink in the devicetree, or the OLDI + * sink has not been added yet. In any case, return. + */ + ret =3D dev_err_probe(dev, PTR_ERR(bridge), + "no panel/bridge for OLDI%u.\n", + oldi_instance); + goto err_put_node; + } =20 + link_type =3D get_oldi_mode(node, &companion_instance); + if (link_type =3D=3D OLDI_MODE_UNSUPPORTED) { + ret =3D dev_err_probe(dev, -EINVAL, + "OLDI%u: Unsupported OLDI connection.\n", + oldi_instance); + goto err_put_node; + } else if ((link_type =3D=3D OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK) || + (link_type =3D=3D OLDI_MODE_CLONE_SINGLE_LINK)) { /* - * Now that it's confirmed that OLDI is connected with DSS, - * let's continue getting the OLDI sinks ahead and other OLDI - * properties. + * The OLDI driver cannot support OLDI clone mode properly at + * present. The clone mode requires 2 working encoder-bridge + * pipelines, generating from the same crtc. The DRM framework + * does not support this at present. If there were to be, say, 2 + * OLDI sink bridges each connected to an OLDI TXes, they + * couldn't both be supported simultaneously. This driver still + * has some code pertaining to OLDI clone mode configuration in + * DSS hardware for future, when there is a better + * infrastructure in the DRM framework to support 2 + * encoder-bridge pipelines simultaneously. Till that time, this + * driver shall error out if it detects a clone mode + * configuration. */ - bridge =3D devm_drm_of_get_bridge(tidss->dev, child, - OLDI_OUTPUT_PORT, 0); - if (IS_ERR(bridge)) { - /* - * Either there was no OLDI sink in the devicetree, or - * the OLDI sink has not been added yet. In any case, - * return. - * We don't want to have an OLDI node connected to DSS - * but not to any sink. - */ - ret =3D dev_err_probe(tidss->dev, PTR_ERR(bridge), - "no panel/bridge for OLDI%u.\n", + ret =3D dev_err_probe(dev, -EOPNOTSUPP, + "The OLDI driver does not support Clone Mode at present.\n"); + goto err_put_node; + } + + oldi =3D devm_drm_bridge_alloc(dev, struct tidss_oldi, bridge, + &tidss_oldi_bridge_funcs); + if (IS_ERR(oldi)) { + ret =3D PTR_ERR(oldi); + goto err_put_node; + } + + oldi->parent_vp =3D parent_vp; + oldi->oldi_instance =3D oldi_instance; + oldi->companion_instance =3D companion_instance; + oldi->link_type =3D link_type; + oldi->dev =3D dev; + oldi->next_bridge =3D bridge; + oldi->tidss =3D tidss; + + auxiliary_set_drvdata(auxdev, oldi); + + /* + * Only the primary OLDI needs to reference the io-ctrl system + * registers, and the serial clock. + * We don't require a check for secondary OLDI in dual-link mode + * because the driver will not create a drm_bridge instance. + * But the driver will need to create a drm_bridge instance, + * for secondary OLDI in clone mode (once it is supported). + */ + if (link_type !=3D OLDI_MODE_SECONDARY_DUAL_LINK && + link_type !=3D OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK) { + oldi->io_ctrl =3D syscon_regmap_lookup_by_phandle(node, + "ti,oldi-io-ctrl"); + if (IS_ERR(oldi->io_ctrl)) { + ret =3D dev_err_probe(oldi->dev, PTR_ERR(oldi->io_ctrl), + "OLDI%u: syscon_regmap_lookup_by_phandle failed.\n", oldi_instance); goto err_put_node; } =20 - link_type =3D get_oldi_mode(child, &companion_instance); - if (link_type =3D=3D OLDI_MODE_UNSUPPORTED) { - ret =3D dev_err_probe(tidss->dev, -EINVAL, - "OLDI%u: Unsupported OLDI connection.\n", + oldi->serial =3D of_clk_get_by_name(node, "serial"); + if (IS_ERR(oldi->serial)) { + ret =3D dev_err_probe(oldi->dev, PTR_ERR(oldi->serial), + "OLDI%u: Failed to get serial clock.\n", oldi_instance); goto err_put_node; - } else if ((link_type =3D=3D OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK) || - (link_type =3D=3D OLDI_MODE_CLONE_SINGLE_LINK)) { - /* - * The OLDI driver cannot support OLDI clone mode - * properly at present. - * The clone mode requires 2 working encoder-bridge - * pipelines, generating from the same crtc. The DRM - * framework does not support this at present. If - * there were to be, say, 2 OLDI sink bridges each - * connected to an OLDI TXes, they couldn't both be - * supported simultaneously. - * This driver still has some code pertaining to OLDI - * clone mode configuration in DSS hardware for future, - * when there is a better infrastructure in the DRM - * framework to support 2 encoder-bridge pipelines - * simultaneously. - * Till that time, this driver shall error out if it - * detects a clone mode configuration. - */ - ret =3D dev_err_probe(tidss->dev, -EOPNOTSUPP, - "The OLDI driver does not support Clone Mode at present.\n"); - goto err_put_node; - } else if (link_type =3D=3D OLDI_MODE_SECONDARY_DUAL_LINK) { - /* - * This is the secondary OLDI node, which serves as a - * companion to the primary OLDI, when it is configured - * for the dual-link mode. Since the primary OLDI will - * be a part of bridge chain, no need to put this one - * too. Continue onto the next OLDI node. - */ - continue; } + } =20 - oldi =3D devm_drm_bridge_alloc(tidss->dev, struct tidss_oldi, bridge, - &tidss_oldi_bridge_funcs); - if (IS_ERR(oldi)) { - ret =3D PTR_ERR(oldi); - goto err_put_node; - } + if (link_type !=3D OLDI_MODE_SECONDARY_DUAL_LINK) { + /* Register the bridge. */ + oldi->bridge.of_node =3D node; + oldi->bridge.driver_private =3D oldi; =20 - oldi->parent_vp =3D parent_vp; - oldi->oldi_instance =3D oldi_instance; - oldi->companion_instance =3D companion_instance; - oldi->link_type =3D link_type; - oldi->dev =3D tidss->dev; - oldi->next_bridge =3D bridge; + tidss->is_ext_vp_clk[oldi->parent_vp] =3D true; =20 - /* - * Only the primary OLDI needs to reference the io-ctrl system - * registers, and the serial clock. - * We don't require a check for secondary OLDI in dual-link mode - * because the driver will not create a drm_bridge instance. - * But the driver will need to create a drm_bridge instance, - * for secondary OLDI in clone mode (once it is supported). - */ - if (link_type !=3D OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK) { - oldi->io_ctrl =3D syscon_regmap_lookup_by_phandle(child, - "ti,oldi-io-ctrl"); - if (IS_ERR(oldi->io_ctrl)) { - ret =3D dev_err_probe(oldi->dev, PTR_ERR(oldi->io_ctrl), - "OLDI%u: syscon_regmap_lookup_by_phandle failed.\n", - oldi_instance); - goto err_put_node; - } + drm_bridge_add(&oldi->bridge); + } + + link =3D device_link_add(&auxdev->dev, tidss->dev, + DL_FLAG_PM_RUNTIME | + DL_FLAG_AUTOREMOVE_CONSUMER); + if (!link) { + ret =3D -EINVAL; + goto err_bridge_remove; + } + + pm_runtime_enable(dev); + pm_runtime_set_autosuspend_delay(dev, 500); + pm_runtime_use_autosuspend(dev); + + return 0; + +err_bridge_remove: + if (link_type !=3D OLDI_MODE_SECONDARY_DUAL_LINK) { + drm_bridge_remove(&oldi->bridge); + tidss->is_ext_vp_clk[oldi->parent_vp] =3D false; + } + +err_put_node: + return ret; +} + +static void tidss_oldi_remove(struct auxiliary_device *auxdev) +{ + struct tidss_oldi *oldi =3D auxiliary_get_drvdata(auxdev); + struct tidss_device *tidss =3D oldi->tidss; + struct device *dev =3D &auxdev->dev; + + pm_runtime_dont_use_autosuspend(dev); + pm_runtime_disable(dev); + + if (oldi->link_type !=3D OLDI_MODE_SECONDARY_DUAL_LINK) { + drm_bridge_remove(&oldi->bridge); =20 - oldi->serial =3D of_clk_get_by_name(child, "serial"); - if (IS_ERR(oldi->serial)) { - ret =3D dev_err_probe(oldi->dev, PTR_ERR(oldi->serial), - "OLDI%u: Failed to get serial clock.\n", - oldi_instance); - goto err_put_node; + tidss->is_ext_vp_clk[oldi->parent_vp] =3D false; + } +} + +static const struct auxiliary_device_id tidss_oldi_aux_id_table[] =3D { + { .name =3D "tidss.oldi" }, + {} +}; + +static struct auxiliary_driver oldi_aux_driver =3D { + .name =3D "oldi", + .probe =3D tidss_oldi_probe, + .remove =3D tidss_oldi_remove, + .id_table =3D tidss_oldi_aux_id_table, +}; + +static void tidss_oldi_aux_device_release(struct device *dev) +{ + struct auxiliary_device *auxdev =3D to_auxiliary_dev(dev); + + ida_free(&tidss_oldi_ida, auxdev->id); + + of_node_put(auxdev->dev.of_node); + + kfree(auxdev->dev.platform_data); + kfree(auxdev); +} + +static struct auxiliary_device * +tidss_oldi_create_device(struct tidss_device *tidss, + struct device_node *oldi_tx) +{ + struct tidss_oldi_platform_data *oldi_pdata; + struct auxiliary_device *companion_auxdev; + struct auxiliary_device *auxdev; + u32 oldi_aux_id; + int ret; + + /* + * Allocate the ID first, so that we get a lower ID for the primary + * OLDI, instead of the companion grabbing it in the call below. Note + * that the ID allocated here often matches the OLDI hardware index, + * but not always. + * The OLDI hardware index cannot be used as an ID, as, say, OLDI 1 on + * two DSS instances would produce the exact same device name + * ("tidss.oldi.1"). + */ + ret =3D ida_alloc(&tidss_oldi_ida, GFP_KERNEL); + if (ret < 0) + return ERR_PTR(ret); + + oldi_aux_id =3D ret; + + companion_auxdev =3D NULL; + + /* + * If this is the primary OLDI and there is a companion, create the + * auxdev for the secondary OLDI first, as the secondary will act as + * a supplier for the primary OLDI. + */ + if (!of_property_read_bool(oldi_tx, "ti,secondary-oldi")) { + struct device_node *companion_node; + + companion_node =3D of_parse_phandle(oldi_tx, "ti,companion-oldi", 0); + if (companion_node) { + companion_auxdev =3D + tidss_oldi_create_device(tidss, companion_node); + + of_node_put(companion_node); + + if (IS_ERR(companion_auxdev)) { + dev_err(tidss->dev, + "Failed to create secondary oldi device\n"); + ret =3D PTR_ERR(companion_auxdev); + goto err_free_ida; } } + } =20 - /* Register the bridge. */ - oldi->bridge.of_node =3D child; - oldi->bridge.driver_private =3D oldi; + oldi_pdata =3D kzalloc_obj(*oldi_pdata); + if (!oldi_pdata) { + ret =3D -ENOMEM; + goto err_free_ida; + } =20 - tidss->oldis[tidss->num_oldis++] =3D oldi; - tidss->is_ext_vp_clk[oldi->parent_vp] =3D true; - oldi->tidss =3D tidss; + oldi_pdata->tidss =3D tidss; =20 - drm_bridge_add(&oldi->bridge); + auxdev =3D kzalloc_obj(*auxdev); + if (!auxdev) { + ret =3D -ENOMEM; + goto err_free_pdata; + } + + *auxdev =3D (struct auxiliary_device) { + .name =3D "oldi", + .id =3D oldi_aux_id, + .dev =3D { + .parent =3D tidss->dev, + .of_node =3D of_node_get(oldi_tx), + .release =3D tidss_oldi_aux_device_release, + .platform_data =3D oldi_pdata, + }, + }; + + ret =3D auxiliary_device_init(auxdev); + if (ret) { + dev_err(tidss->dev, "OLDI auxiliary_device_init failed: %d\n", + ret); + goto err_free_auxdev; + } + + /* + * Create a device-link between the primary and the secondary, so that + * the secondary will be powered on when the primary is used. + */ + if (companion_auxdev) { + struct device_link *link; + + link =3D device_link_add(&auxdev->dev, &companion_auxdev->dev, + DL_FLAG_PM_RUNTIME | + DL_FLAG_AUTOREMOVE_CONSUMER | + DL_FLAG_AUTOREMOVE_SUPPLIER); + if (!link) { + dev_err(tidss->dev, + "device_link_add failed between primary and secondary OLDI\n"); + ret =3D -EINVAL; + goto err_uninit_auxdev; + } + } + + ret =3D auxiliary_device_add(auxdev); + if (ret) { + dev_err(tidss->dev, "OLDI auxiliary_device_add failed: %d\n", + ret); + goto err_uninit_auxdev; } =20 - of_node_put(child); - of_node_put(oldi_parent); + tidss->oldis[tidss->num_oldis++] =3D auxdev; + + return auxdev; + +err_uninit_auxdev: + auxiliary_device_uninit(auxdev); + /* return here, as the rest are done in auxdev's release */ + return ERR_PTR(ret); + +err_free_auxdev: + kfree(auxdev); +err_free_pdata: + kfree(oldi_pdata); +err_free_ida: + ida_free(&tidss_oldi_ida, oldi_aux_id); + + return ERR_PTR(ret); +} + +int tidss_oldi_create_devices(struct tidss_device *tidss) +{ + struct device_node *oldi_txes; + struct device_node *oldi_tx; + int ret; + + oldi_txes =3D of_get_child_by_name(tidss->dev->of_node, + "oldi-transmitters"); + if (!oldi_txes) + return 0; + + /* + * Look for primary OLDIs and create devices for them. For dual-link + * cases, the primary's create_device call will also create the + * secondary device. + */ + for_each_available_child_of_node(oldi_txes, oldi_tx) { + struct auxiliary_device *auxdev; + + if (of_property_read_bool(oldi_tx, "ti,secondary-oldi")) + continue; + + auxdev =3D tidss_oldi_create_device(tidss, oldi_tx); + if (IS_ERR(auxdev)) { + ret =3D PTR_ERR(auxdev); + goto err_destroy_oldis; + } + } + + of_node_put(oldi_txes); =20 return 0; =20 -err_put_node: - of_node_put(child); - of_node_put(oldi_parent); +err_destroy_oldis: + tidss_oldi_destroy_devices(tidss); + + of_node_put(oldi_tx); + of_node_put(oldi_txes); + return ret; } + +void tidss_oldi_destroy_devices(struct tidss_device *tidss) +{ + for (unsigned int i =3D 0; i < tidss->num_oldis; ++i) + auxiliary_device_destroy(tidss->oldis[i]); +} + +int tidss_oldi_register_driver(void) +{ + return auxiliary_driver_register(&oldi_aux_driver); +} + +void tidss_oldi_unregister_driver(void) +{ + auxiliary_driver_unregister(&oldi_aux_driver); +} diff --git a/drivers/gpu/drm/tidss/tidss_oldi.h b/drivers/gpu/drm/tidss/tid= ss_oldi.h index a361e6dbfce3..2069bd46aaae 100644 --- a/drivers/gpu/drm/tidss/tidss_oldi.h +++ b/drivers/gpu/drm/tidss/tidss_oldi.h @@ -36,7 +36,10 @@ enum tidss_oldi_link_type { OLDI_MODE_SECONDARY_DUAL_LINK, }; =20 -int tidss_oldi_init(struct tidss_device *tidss); -void tidss_oldi_deinit(struct tidss_device *tidss); +int tidss_oldi_create_devices(struct tidss_device *tidss); +void tidss_oldi_destroy_devices(struct tidss_device *tidss); + +int tidss_oldi_register_driver(void); +void tidss_oldi_unregister_driver(void); =20 #endif /* __TIDSS_OLDI_H__ */ --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AB8131716B; Wed, 13 May 2026 13:18:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678298; cv=none; b=o/PGS/5LU8peHVROmLXyqdQXutMt6mWK1+WKPeW4S95HEA7rMyWzZ84PA4ins7jaBKWbCh5M96tdx8yBRC1ABM/GfaSUbFR2YPIEyl15cpcN9g8WfKhZDQDs4351VqZlj1Fc3tGfNHJtfqtNY/OVuZ2OVfaordE4bG8ohrlFqoI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678298; c=relaxed/simple; bh=wJIwGQWQVF7nXvYZIy7GC96ascev6Pjy2rroRfLoy3Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ks29GdzKYs+X01wsHmkMyCuJrTHe0X/Hkaqrs1m0j2NxPKeGdoCc2P/xZ6EsrnHYIXSoxhswfRPKWGCXnTo/mBIxrpV+MP3qEW0xqjrjj/ZZRbb+MvkK4HSJ1YOmENCRO5gU5S10WxYpunR+eWxcjwT3m9IGfC78fWZJBQN3LAw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=Z5GVtc6s; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Z5GVtc6s" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2B81E2F8A; Wed, 13 May 2026 15:18:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678282; bh=wJIwGQWQVF7nXvYZIy7GC96ascev6Pjy2rroRfLoy3Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Z5GVtc6sPp4nMSPPOceSEn1fHcYG0tUlRDZUOPYrPhs+sO9IGoxtrCuhr2zFxAcva V1ATauJlJ4WOGUbT2vw1ZayUQOIwsmmpnAFmJh59aIwYiZ3bi96NDyW0lguysRb+Pt eDbzaEt8Qbdq+y3a52bfDyuUELX62qch42DjR7pg= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:35 +0300 Subject: [PATCH v2 13/16] drm/tidss: Add support for AM62P display subsystem Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-13-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1574; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=/85nzazta3ZSz2DegZrNcXTx/gK83bzKu5NpUXGKZHo=; b=kA0DAAgB+j2qjLyWHvUByyZiAGoEegDI1iz7h/jLtCo1kpGKDATo8OONswRA7dotGmDoL4LJy 4kCMwQAAQgAHRYhBMQ4DD6WXv2BB5/zp/o9qoy8lh71BQJqBHoAAAoJEPo9qoy8lh71HGAP/jAX ACMP1m5RFBSzxnk9ZpgOoTGUyyNKTfPp1XSTBcqyIiu6hBh5jbDQuqqa2YfNUkBJIJxQMeuUMo/ XBnlcUDY431qrEIorbOwizNQ4oatFBmQCQI6XjlmtpIg7VccLNg7QbuWUakoTse7qfNUgp9vp/i B8bj54PAx7o4qYzdb4xI6bOyVVQfucJbNGnQ5kd1rg8La2ndgjCtx4k6K7xel3TYJ5SfvT9amTM iwLQLZHLh2D55mlrTLzIytynrm9Q8SMsAyhuijcLl7PDvMrpAg0hSztVy+l85AVAGHT2HMF90rG H1Kj+84rOvVtIw9DpIYaAx8eDFjxXkDnctlwDLJSqC2zZJH3EEQEXQvb/VCnYQi9FEOIpoqvPUu twUl8yoHLpo2l+U6IltX0jOe+W/JgsANRzh+HsLLX3/Jo5Aklgj+I4QHm7MMrm0dVEiFQBYu+Cb 0YJRvcpHIrgztJMmvjqm8cxR2vgH+IHd27oKaOIJGk+ZSjKV56tLIh5sYBoB+6wxSMsgfn3WgbA GDWMG9lcjOE1Zkr4GTuyYdS7mFZDerbyJKY+0OJQfhXsOGPvcBovRWNgMbAf8lY+WRA7JEPTT3v 0AR0IJr7tVGWMqEevXMz2wJHQNPwG1L9NTpbHDDa9f9Gtk/0m199N4LQvSn6a8jUIyhOlbF8q+k 6c6hq X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 From: Swamil Jain The DSS controller on TI's AM62P SoC features two instances of the TI DSS. Each DSS instance supports two video ports, similar to the DSS controller found on the TI AM62X SoC. This allows three independent video streams to be supported: OLDI, DPI, and DSI. Since the DSS instances on AM62P are architecturally similar to those on the AM62X DSS controller, the existing dispc_am625_feats configuration can be reused for the AM62P DSS support. This commit adds the necessary device tree compatibility entry for "ti,am62p-dss" in the tidss driver, pointing to dispc_am625_feats, thereby enabling DSS support on AM62P devices. Signed-off-by: Swamil Jain Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tids= s_drv.c index aef945101be4..2d056dc1c5ff 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.c +++ b/drivers/gpu/drm/tidss/tidss_drv.c @@ -246,6 +246,7 @@ static const struct of_device_id tidss_of_table[] =3D { { .compatible =3D "ti,am625-dss", .data =3D &dispc_am625_feats, }, { .compatible =3D "ti,am62a7-dss", .data =3D &dispc_am62a7_feats, }, { .compatible =3D "ti,am62l-dss", .data =3D &dispc_am62l_feats, }, + { .compatible =3D "ti,am62p-dss", .data =3D &dispc_am625_feats, }, { .compatible =3D "ti,am65x-dss", .data =3D &dispc_am65x_feats, }, { .compatible =3D "ti,j721e-dss", .data =3D &dispc_j721e_feats, }, { } --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51B7631AF1F; Wed, 13 May 2026 13:18:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678300; cv=none; b=CABkkuqiP4vvhqf9JKFyaJ6gmxfdh7eXBQTIsVOWFJQBTeTsNXzOzm+p5afkELSVnbWQCsWDnbEczHh/I7MrN5LAHfhyYRs01X0k129pKB5pX5++om0Rdn7VqAgAJj6u9+BHHF+AC45/TuHIuu12zq0JPzziS5D3YO73tyoReoI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678300; c=relaxed/simple; bh=UiQCLW3CogQyfPKHqhuaL51eoRfncuB5Jy+dPeyp4cY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dCsXfkaTccMgEgMJIHw1RGHGbstJ5rGqL43x/1McMg3soxrZJb6wwfXAhy+2ZczGoUsFdbDXNkiI2sLoAe+uKkfBYcRQZphFN4g9ZmV1zVilsOYrAnFryzCr+rs5a111m5oXq3wU6Q6XXTaiW+lJq9iuu6OlTu4R4gaCy1U+pnY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=DB7zQIf/; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DB7zQIf/" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4B1D82FDE; Wed, 13 May 2026 15:18:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678283; bh=UiQCLW3CogQyfPKHqhuaL51eoRfncuB5Jy+dPeyp4cY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DB7zQIf/nmW5q4dAWD05vg2TAg4+8HxVgD7hH2G9Pcoz9oEr7acXJIH1mjslu2UsU Fw6aRskByaqHWs14ExTEBxFnL2h858bzKVKqaU+S/z91zdCqX84R8HTtKfVWhSqQdl CIwvxN6ZZFQdJY0UjyENbB5H6+qt+rydedmZEQFk= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:36 +0300 Subject: [PATCH v2 14/16] arm64: dts: ti: k3-am62p-j722s-common-main: Make main_conf a syscon Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-14-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=977; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=UiQCLW3CogQyfPKHqhuaL51eoRfncuB5Jy+dPeyp4cY=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHoB4l1YpkguDETJu0LpPAQGFNbaYFPgpAEmz JrY9prgNA6JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR6AQAKCRD6PaqMvJYe 9TePD/oDcWnDUi4dpTb99mtAQMZ5Tc6yx0MIj8U9H17SDAdzND7A7oTRftjLeUecccRfHcMLdaQ ISIH3lDtFx3dumH4AN05Xyi8KHSSHbA7+fOBMbHkjAbNYfbIB2XcVElo3EeZlmyd+qSQdKu7EfR XpcvAJcsYl9N4+LwwSeBG6Z4O7FfEyzet/nVg5ahaqhxDba9jwi2L4XtiTv8QRkQu6kJOhRChaO Q4zYwRj0RoHbVtbx5R6vTqbME3H//Tm3VUMJAXlBLx63k3b9yKeW6T8wKkjUYzK9e/BnICyGiaF /jj/nwSAnw4vfSCLWGd+aYhKi7VYSBBLJdNnUGkstksZTcgFgQpw4FQSlVzEgP/J9qiEaUFRfHY jPBMbj2k55R8Sy10Sx0LHe9ZSuMLN7Bsq6Rns5XrKPP3AS1j5/D5AYW6kcI1XFXz3+07BMbEQP9 VYBPxeen0geMHbSZ3E23CsO+PaDn3lIQ1/eLy6zNacypgPa+RNZV69HauCDOCXx27yNu7rSSxUq dvRobHIAK3fOzUEUq6DCmecxZ5kPgi6MHSvvgENSANd11Z11DJFjczjSjg5PXC9n0JFv/GtJuKU foBTaqnemmr7Ckd4GYRO04KGwChuvv6FuhWkRLZlYL/AfYc0/83esZEqcQOl2VECzfNuI8tE0i/ lt5Gcs+Nhd18ZAw== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 Change the whole main_conf (the CTRL_MMR block) to a syscon. As the main_conf block contains miscallaneous registers for various devices, this way the drivers for those devices can get access to the specific registers they need. Signed-off-by: Tomi Valkeinen --- arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi b/arch/= arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi index 0e1af2a69ca2..41067f2f1425 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi @@ -40,7 +40,7 @@ gic_its: msi-controller@1820000 { }; =20 main_conf: bus@100000 { - compatible =3D "simple-bus"; + compatible =3D "simple-bus", "syscon"; reg =3D <0x00 0x00100000 0x00 0x20000>; #address-cells =3D <1>; #size-cells =3D <1>; --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C40631B803; Wed, 13 May 2026 13:18:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678301; cv=none; b=f+zAIGzEdGcdBqHQh6pi2FOJKD8hZhLM6AdFnvgrJ5SrZcvIw/Fq5dRb3rbEItA5bwRu+0PYOMLVNVBVqX5J7/2g9hhu6/x9x9S0+lh/PtC5F9U84z64aCMVp+XjPTj6dAWirdlC3Zy7MLI5yMBBvZ7rPcDleaCj2MUIhn9vm2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678301; c=relaxed/simple; bh=MN6gx8GYe5AmBvcrHuK35BGCdY8iabWy4vmQ/SnipFg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YHmxu/H+YMTPASdindpBEIfcmqeWe7FooBCzC/IYoEFD02CljzbYNrjdte62FfTQKfvA7+8KqtCtLxCpeb/XrcProP55OeYALmJAQVAen6BO0dQpfuDR6lhqewtFLeB/yYlj6o7FHXVVabV6nDGV5uWj4bDJAeT6hHtN5Q0nQkE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=J2P5bFyn; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="J2P5bFyn" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 67BF83055; Wed, 13 May 2026 15:18:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678284; bh=MN6gx8GYe5AmBvcrHuK35BGCdY8iabWy4vmQ/SnipFg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=J2P5bFynHd0vfwnU6swShwDFdW0W1yqZs95pmrvkAc9egGSht8lTTdYTC2eVlA/zJ vzKeqy+xZ0btEdsNr7KDUsPbI/py1AWMjMbI1vyh36UreOTKKc4ABY5S3kSdVoG0ud BClKY+nSj0Ond2TrAe2y0sRtx8TYVsjLKr2yh51k= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:37 +0300 Subject: [PATCH v2 15/16] arm64: dts: ti: k3-am62p-j722s-common-main: Add support for DSS Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-15-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen , Jayesh Choudhary , Aradhya Bhatia X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=8659; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=zJr8xt+UVG09ZxVvgTj+ef6tvCst5mbuQtco7mnX1HI=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHoBlQxqEv7AscI6GKbObjkoctOcC14SJ8btS 8CR2lAxVFmJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR6AQAKCRD6PaqMvJYe 9VTuD/0Zs198hxXzBRyNzZTEgdDTg/YxWYxideTp5Q09Xkkjto1hy453SqMTG2gNdBQnC6O8f00 PLOvu0NBf7bhew/mwVJt3sv/bxqRHU7y70xBaZh0QmF+YE8xk6l6XiPDXVBhpcm6GyyFoe26SNV X0JwZ9mj7Tq/mOZ/9RMk38LpC01Bkoho/ReBPIlW5Zw6xWuaQGkGJP3vB/ZyyOPnl4jULwqbvA0 vB8XXAiXXpxWeYPLh57zE5aHmAtbi0MZQqrkOvbgVSEqQxH40RgjIDNht2sk3+GccF/2NXBmwsI RBS95eAqWDA4POUqQOESCcP9QF5TDsdvPzt2dtmNdINJ24aqIG4kFv52eiZTjmg/NvcGPQUERSj IdsADfFKcswMuxzN1AdOaTkAX2fXZtVa2vAfH0FX/2qObp96FVWjyyO1WO6GVWMHaByOCDkmzJL LARgXwJRr4jSrHGP/lsE0nUqjBEU72DtRjhBgLTxgTRIzNMHBgSEyxVE2d/ceoAz7iBCEUBHPul 8ehCdSb0eKi4SunFpaNjWE/bl8om6ejbRrhv7Zq55V9uQRZUuV6Oje27S36+zK8sVL++tW2NVpw ZgLQhd2SZ1xYmWAs36YGk42w90049ycaMZ3twimbrcow1xz6NI1mY+YknT0RdnWtXUCyz9r5Zu4 +2+NlZbByrJ4CHA== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 From: Jayesh Choudhary TI's AM62P and J722S SoCs support 2 display subsystems (DSS), DSS0 and DSS1, each with two video ports (VP) and two video planes. The outputs from the DSS VPs can be routed to two OLDI TXes (OLDI0, OLDI1), a DSI TX, or parallel DPI output. DSS0 supports: - VP0: OLDI0 in single-link mode or OLDI0 and OLDI1 in dual-link or clone mode. - VP1: DPI DSS1 supports: - VP0: OLDI1 in single-link mode, or DPI - VP1: DPI or DSI The DSI is only connected to VP1 of DSS1, but OLDI and DPI are shared between the DSS instances. Thus only a single VP can output to DPI, and a single VP can use an OLDI block. Note that in single-link configuration OLDI0 can be used by DSS0, and at the same time OLDI1 can be used by DSS1. Add the necessary nodes to k3-am62p-j722s-common-main.dtsi, including DSS0, DSS1, OLDI0, OLDI1, DPHY and DSI. An important note about OLDIs: We have two OLDI hardware blocks. Each OLDI has certain configuration that has to be done before it can be used. The OLDI blocks get this configuration directly from the DSS block, via DSS registers. However, as a single OLDI block can be used either with DSS0 or DSS1, the source for the configuration changes according to (probably, this is unclear) a DSS related clock mux. So, afaics, when thinking about Linux device hierarchy wrt. control busses, OLDI blocks are children of DSS blocks, and they reside in a special DSS bus. And the OLDI parent changes according to the mux. As far as I know, there is no way we can represent this in the DT. Thus the solution used here (and in the driver) is that each DSS node contains the OLDI nodes that can be used with that DSS. Thus the DSS0 node has two child nodes, OLDI0 and OLDI1, and the DSS1 node has one child node, OLDI1. The OLDI1 nodes thus refer to the same piece of hardware, and they cannot be used at the same time. The selection which OLDI nodes to use are chosen in the board dts files, so assuming the dts files are correct, no resource conflict can happen. This is not a very nice solution, but the hardware doesn't make it easy to have a clean solution, and, most importantly, this works. [j-choudhary@ti.com: Refactor changes for k3-am62p-j722s-common-main.dtsi and add changes for new OLDI driver support] Signed-off-by: Aradhya Bhatia Signed-off-by: Jayesh Choudhary Signed-off-by: Swamil Jain [tomi.valkeinen: various fixes and improvements] Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- .../boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 109 +++++++++++++++++= ++++ arch/arm64/boot/dts/ti/k3-am62p.dtsi | 16 +++ arch/arm64/boot/dts/ti/k3-j722s.dtsi | 16 +++ 3 files changed, 141 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi b/arch/= arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi index 41067f2f1425..6bdd7e7a8cee 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi @@ -64,6 +64,11 @@ audio_refclk1: clock-controller@82e4 { #clock-cells =3D <0>; }; =20 + dss_oldi_io_ctrl: dss-oldi-io-ctrl@8600 { + compatible =3D "ti,am625-dss-oldi-io-ctrl", "syscon"; + reg =3D <0x8600 0x200>; + }; + phy_gmii_sel: phy@4044 { compatible =3D "ti,am654-phy-gmii-sel"; reg =3D <0x4044 0x8>; @@ -1110,6 +1115,110 @@ dphy0: phy@30110000 { status =3D "disabled"; }; =20 + dss0: dss@30200000 { + compatible =3D "ti,am62p-dss"; + reg =3D <0x00 0x30200000 0x00 0x1000>, /* common */ + <0x00 0x30202000 0x00 0x1000>, /* vidl1 */ + <0x00 0x30206000 0x00 0x1000>, /* vid */ + <0x00 0x30207000 0x00 0x1000>, /* ovr1 */ + <0x00 0x30208000 0x00 0x1000>, /* ovr2 */ + <0x00 0x3020a000 0x00 0x1000>, /* vp1: Used for OLDI */ + <0x00 0x3020b000 0x00 0x1000>, /* vp2: Used as DPI */ + <0x00 0x30201000 0x00 0x1000>; /* common1 */ + reg-names =3D "common", "vidl1", "vid", + "ovr1", "ovr2", "vp1", "vp2", "common1"; + power-domains =3D <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>; /* DSS0 */ + clocks =3D <&k3_clks 186 6>, + <&dss0_vp1_clk>, + <&k3_clks 186 2>; + clock-names =3D "fck", "vp1", "vp2"; + interrupts =3D ; + ti,dpi-io-ctrl =3D <&main_conf 0x8300>; + status =3D "disabled"; + + oldi-transmitters { + #address-cells =3D <1>; + #size-cells =3D <0>; + + dss0_oldi0: oldi@0 { + reg =3D <0>; + clocks =3D <&k3_clks 186 0>; + clock-names =3D "serial"; + ti,oldi-io-ctrl =3D <&dss_oldi_io_ctrl>; + status =3D "disabled"; + power-domains =3D <&k3_pds 243 TI_SCI_PD_EXCLUSIVE>; /* OLDI0_VD */ + }; + + dss0_oldi1: oldi@1 { + reg =3D <1>; + status =3D "disabled"; + power-domains =3D <&k3_pds 244 TI_SCI_PD_EXCLUSIVE>; /* OLDI1_VD */ + }; + }; + }; + + dss1: dss@30220000 { + compatible =3D "ti,am62p-dss"; + reg =3D <0x00 0x30220000 0x00 0x1000>, /* common */ + <0x00 0x30222000 0x00 0x1000>, /* vidl1 */ + <0x00 0x30226000 0x00 0x1000>, /* vid */ + <0x00 0x30227000 0x00 0x1000>, /* ovr1 */ + <0x00 0x30228000 0x00 0x1000>, /* ovr2 */ + <0x00 0x3022a000 0x00 0x1000>, /* vp1: Used for DPI/OLDI */ + <0x00 0x3022b000 0x00 0x1000>, /* vp2: Used DPI/DSI */ + <0x00 0x30221000 0x00 0x1000>; /* common1 */ + reg-names =3D "common", "vidl1", "vid", + "ovr1", "ovr2", "vp1", "vp2", "common1"; + power-domains =3D <&k3_pds 232 TI_SCI_PD_EXCLUSIVE>; /* DSS1 */ + clocks =3D <&k3_clks 232 8>, + <&dss1_vp1_clk>, + <&k3_clks 232 4>; + clock-names =3D "fck", "vp1", "vp2"; + interrupts =3D ; + ti,dpi-io-ctrl =3D <&main_conf 0x8300>; + status =3D "disabled"; + + oldi-transmitters { + #address-cells =3D <1>; + #size-cells =3D <0>; + + dss1_oldi1: oldi@1 { + reg =3D <1>; + clocks =3D <&k3_clks 232 0>; + clock-names =3D "serial"; + ti,oldi-io-ctrl =3D <&dss_oldi_io_ctrl>; + status =3D "disabled"; + power-domains =3D <&k3_pds 244 TI_SCI_PD_EXCLUSIVE>; /* OLDI1_VD */ + }; + }; + }; + + dphy_tx0: phy@301c0000 { + compatible =3D "ti,j721e-dphy"; + reg =3D <0x0 0x301c0000 0x0 0x1000>; + clocks =3D <&k3_clks 238 16>, <&k3_clks 238 1>; + clock-names =3D "psm", "pll_ref"; + #phy-cells =3D <0>; + power-domains =3D <&k3_pds 238 TI_SCI_PD_EXCLUSIVE>; + assigned-clocks =3D <&k3_clks 238 1>; + assigned-clock-parents =3D <&k3_clks 238 2>; + assigned-clock-rates =3D <25000000>; + status =3D "disabled"; + }; + + dsi0: dsi@30500000 { + compatible =3D "ti,j721e-dsi"; + reg =3D <0x0 0x30500000 0x0 0x100000>, <0x0 0x30270000 0x0 0x100>; + clocks =3D <&k3_clks 231 2>, <&k3_clks 231 5>; + clock-names =3D "dsi_p_clk", "dsi_sys_clk"; + power-domains =3D <&k3_pds 231 TI_SCI_PD_EXCLUSIVE>; + interrupt-parent =3D <&gic500>; + interrupts =3D ; + phys =3D <&dphy_tx0>; + phy-names =3D "dphy"; + status =3D "disabled"; + }; + vpu: video-codec@30210000 { compatible =3D "ti,j721s2-wave521c", "cnm,wave521c"; reg =3D <0x00 0x30210000 0x00 0x10000>; diff --git a/arch/arm64/boot/dts/ti/k3-am62p.dtsi b/arch/arm64/boot/dts/ti/= k3-am62p.dtsi index 9d6266d6ddb8..074dc44ec049 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p.dtsi @@ -144,6 +144,22 @@ cbass_wakeup: bus@b00000 { }; }; =20 + dss0_vp1_clk: clock-divider-oldi-dss0 { + compatible =3D "fixed-factor-clock"; + clocks =3D <&k3_clks 186 0>; + #clock-cells =3D <0>; + clock-div =3D <7>; + clock-mult =3D <1>; + }; + + dss1_vp1_clk: clock-divider-oldi-dss1 { + compatible =3D "fixed-factor-clock"; + clocks =3D <&k3_clks 232 0>; + #clock-cells =3D <0>; + clock-div =3D <7>; + clock-mult =3D <1>; + }; + #include "k3-am62p-j722s-common-thermal.dtsi" }; =20 diff --git a/arch/arm64/boot/dts/ti/k3-j722s.dtsi b/arch/arm64/boot/dts/ti/= k3-j722s.dtsi index 059c65ece183..f5b74281ab3d 100644 --- a/arch/arm64/boot/dts/ti/k3-j722s.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j722s.dtsi @@ -227,6 +227,22 @@ cbass_wakeup: bus@b00000 { }; }; =20 + dss0_vp1_clk: clock-divider-oldi-dss0 { + compatible =3D "fixed-factor-clock"; + clocks =3D <&k3_clks 186 0>; + #clock-cells =3D <0>; + clock-div =3D <7>; + clock-mult =3D <1>; + }; + + dss1_vp1_clk: clock-divider-oldi-dss1 { + compatible =3D "fixed-factor-clock"; + clocks =3D <&k3_clks 232 0>; + #clock-cells =3D <0>; + clock-div =3D <7>; + clock-mult =3D <1>; + }; + #include "k3-am62p-j722s-common-thermal.dtsi" }; =20 --=20 2.43.0 From nobody Fri Jun 12 17:36:02 2026 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29748327BF8; Wed, 13 May 2026 13:18:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678303; cv=none; b=fSQzjw9yzIdFfMFBJ5IEaIg876V/iE7/rA6OA5iwR7B6hkclqEFYZFjXrVZWaK1+bcvBlee69AQ2jof5f8ups7nPI+lLWSHpE1k6sdicv/ydChqPoYGEwrTlTWg87hBZa8Q5eXNxTuANywhmT1NE8MDSgO9VGRBpSJMp4qtgo38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778678303; c=relaxed/simple; bh=tggQw14cE36Ooi+jxk1SSHsmS/Luwps1jDkCJEkdV+g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ILJx3zM6T2MXShdu53GSH0lH9pDCRsuSgdwizHTY6uO7eUb3Hqz0KIu8c/KPOV2Zg+87kNBNYin8SHhHVf3BYUmsRaZBSCkLdXNTs9uzbQsGUxOU6lQ6fcVrHvbCD+MBwv6/OAH4DAj/5ZbV2S3UiXdae1juMvL1kY1cOzVHVH8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=Vd3VCKUq; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Vd3VCKUq" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9849D298C; Wed, 13 May 2026 15:18:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778678285; bh=tggQw14cE36Ooi+jxk1SSHsmS/Luwps1jDkCJEkdV+g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Vd3VCKUqgzho9o4w+4pCkdzVgAMUSiSd/Xur6455mZVpQ78ZWEXFpaf6T6VRFStiy G8TtXYipl8W1ZATX5HXnAdpjaRpH+U172tcgKoB2iBfKK8WAz4hQ/dCZXUXg6M5AKO Mf0OBBLVXX005QJoltqoNyKEit7dbxghMg2XMUZc= From: Tomi Valkeinen Date: Wed, 13 May 2026 16:17:38 +0300 Subject: [PATCH v2 16/16] arm64: dts: ti: beagley-ai: Enable HDMI display and audio Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-beagley-ai-display-v2-16-9e9bcefde6bc@ideasonboard.com> References: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> In-Reply-To: <20260513-beagley-ai-display-v2-0-9e9bcefde6bc@ideasonboard.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Aradhya Bhatia , Nishanth Menon , Vignesh Raghavendra , Swamil Jain , Devarsh Thakkar , Louis Chauvet Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tomi Valkeinen , Andrew Davis , Robert Nelson X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=7725; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=odPI4cnCuMihRKu6ZVnIBnX5RP8SNojspw7tkGWhGP4=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBqBHoCk8FvrF4ayLVKu1VvZUvvHbvt/OynZpGJ6 vQIP4HHgfuJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCagR6AgAKCRD6PaqMvJYe 9a+lD/47xOw9Vfioc6vPk7mSSQ2sC0nOZ63bPivyczNmPOkgSwYgjZWBbAq8EoAd0qAhtk3uRY/ 8dwUDW5Pw+j46xUJl2+fMsq7tWIWQE36L8hd4K6Te98muNr2xjL1pxzjLxFNNZh84W72LclyJo8 RJmvgwR4ahDePRAQTBScCjz9JXLj2K87gr4VQ3HlHbdKOmKak5DhEFjZxw0VG54OWwrhLzHd0F7 5fhrFwJC85ck0qVcCogDe7vStwNktGp574SZv28LoJ3X7CGG37klnwuFLum0g/nipTeQCd4rAqu Nyl39fceH1wozRdcFQOjHIRxzt/Fvx/71zNWmtQBw+isqev93OPkEkyVvBXN5d+zKG5v6RYTIf3 TnjHnCZKYzs2RnM2YL2IBs5BNwN8fgq8DL7A8/byPp86OEbbVGUfZzXtTnYBRlRK/0qygHH4JCi vpRiEhfarEocMkvMFZWBZmsB8aWdXO3XIPcZpbV9F0JgBk3fmlDMnagibpoqf7t+B3e5Pu+Ft2s UPmsWG6akcXLNZ+dKtxEBDCUDJdop8FNZi5NNHX9Fbj1b/hBQ+BeQXVa0AUDuUNmP0UDF8CzqC7 xL3pMEt1biRvGB4islyhQUmG83VSVmyQhVXwqbMrXy5U/P4Bb0I+e1/jUfBSBJ+b9wJu6HiKWMP lK6KepDQr5Vp+SA== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 From: Andrew Davis Enable HDMI support for BeagleY-AI platform. The display controller used is TIDSS and the HDMI bridge used is IT66122. Based on DT by: Robert Nelson Signed-off-by: Andrew Davis Signed-off-by: Swamil Jain [tomi.valkeinen: cosmetic fixes] Tested-by: Robert Nelson Tested-by: Swamil Jain Signed-off-by: Tomi Valkeinen --- arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts | 197 +++++++++++++++++++++= ++++ 1 file changed, 197 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts b/arch/arm64/bo= ot/dts/ti/k3-am67a-beagley-ai.dts index 5255e04b9ac7..b7bcc90005d7 100644 --- a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts +++ b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts @@ -146,6 +146,34 @@ led-1 { default-state =3D "on"; }; }; + + hdmi0: connector-hdmi { + compatible =3D "hdmi-connector"; + label =3D "hdmi"; + type =3D "d"; + port { + hdmi_connector_in: endpoint { + remote-endpoint =3D <&it66122_out>; + }; + }; + }; + + sound0: sound { + compatible =3D "simple-audio-card"; + simple-audio-card,name =3D "it66122 HDMI"; + simple-audio-card,format =3D "i2s"; + simple-audio-card,bitclock-master =3D <&hdmi_dailink_master>; + simple-audio-card,frame-master =3D <&hdmi_dailink_master>; + + hdmi_dailink_master: simple-audio-card,cpu { + sound-dai =3D <&mcasp1>; + system-clock-direction-out; + }; + + simple-audio-card,codec { + sound-dai =3D <&it66122>; + }; + }; }; =20 &main_pmx0 { @@ -185,6 +213,20 @@ J722S_IOPAD(0x0240, PIN_INPUT, 7) /* (B24) MMC1_SDCD.G= PIO1_48 */ bootph-all; }; =20 + main_i2c1_pins_default: main-i2c1-default-pins { + pinctrl-single,pins =3D < + J722S_IOPAD(0x01e8, PIN_INPUT_PULLUP, 0) /* (C24) I2C1_SCL */ + J722S_IOPAD(0x01ec, PIN_INPUT_PULLUP, 0) /* (A22) I2C1_SDA */ + >; + bootph-all; + }; + + main_gpio0_ioexp_intr_pins_default: main-gpio0-ioexp-intr-default-pins { + pinctrl-single,pins =3D < + J722S_IOPAD(0x0110, PIN_INPUT, 7) /* (G27) MMC2_DAT1.GPIO0_67 */ + >; + }; + mdio_pins_default: mdio-default-pins { pinctrl-single,pins =3D < J722S_IOPAD(0x0160, PIN_OUTPUT, 0) /* (AC24) MDIO0_MDC */ @@ -227,6 +269,47 @@ vdd_3v3_sd_pins_default: vdd-3v3-sd-default-pins { J722S_IOPAD(0x0254, PIN_OUTPUT, 7) /* (E25) USB0_DRVVBUS.GPIO1_50 */ >; }; + + dss1_pins_default: dss1-default-pins { + pinctrl-single,pins =3D < + J722S_IOPAD(0x0100, PIN_OUTPUT, 0) /* (AB23) VOUT0_VSYNC */ + J722S_IOPAD(0x00f8, PIN_OUTPUT, 0) /* (AB24) VOUT0_HSYNC */ + J722S_IOPAD(0x0104, PIN_OUTPUT, 0) /* (AC26) VOUT0_PCLK */ + J722S_IOPAD(0x00fc, PIN_OUTPUT, 0) /* (AC27) VOUT0_DE */ + J722S_IOPAD(0x00b8, PIN_OUTPUT, 0) /* (W27) VOUT0_DATA0 */ + J722S_IOPAD(0x00bc, PIN_OUTPUT, 0) /* (W25) VOUT0_DATA1 */ + J722S_IOPAD(0x00c0, PIN_OUTPUT, 0) /* (W24) VOUT0_DATA2 */ + J722S_IOPAD(0x00c4, PIN_OUTPUT, 0) /* (W23) VOUT0_DATA3 */ + J722S_IOPAD(0x00c8, PIN_OUTPUT, 0) /* (W22) VOUT0_DATA4 */ + J722S_IOPAD(0x00cc, PIN_OUTPUT, 0) /* (W21) VOUT0_DATA5 */ + J722S_IOPAD(0x00d0, PIN_OUTPUT, 0) /* (Y26) VOUT0_DATA6 */ + J722S_IOPAD(0x00d4, PIN_OUTPUT, 0) /* (Y27) VOUT0_DATA7 */ + J722S_IOPAD(0x00d8, PIN_OUTPUT, 0) /* (AA24) VOUT0_DATA8 */ + J722S_IOPAD(0x00dc, PIN_OUTPUT, 0) /* (AA27) VOUT0_DATA9 */ + J722S_IOPAD(0x00e0, PIN_OUTPUT, 0) /* (AA25) VOUT0_DATA10 */ + J722S_IOPAD(0x00e4, PIN_OUTPUT, 0) /* (AB25) VOUT0_DATA11 */ + J722S_IOPAD(0x00e8, PIN_OUTPUT, 0) /* (AA23) VOUT0_DATA12 */ + J722S_IOPAD(0x00ec, PIN_OUTPUT, 0) /* (AA22) VOUT0_DATA13 */ + J722S_IOPAD(0x00f0, PIN_OUTPUT, 0) /* (AB26) VOUT0_DATA14 */ + J722S_IOPAD(0x00f4, PIN_OUTPUT, 0) /* (AB27) VOUT0_DATA15 */ + J722S_IOPAD(0x005c, PIN_OUTPUT, 1) /* (AC25) GPMC0_AD8.VOUT0_DATA16 */ + J722S_IOPAD(0x0060, PIN_OUTPUT, 1) /* (U26) GPMC0_AD9.VOUT0_DATA17 */ + J722S_IOPAD(0x0064, PIN_OUTPUT, 1) /* (V27) GPMC0_AD10.VOUT0_DATA18 */ + J722S_IOPAD(0x0068, PIN_OUTPUT, 1) /* (V25) GPMC0_AD11.VOUT0_DATA19 */ + J722S_IOPAD(0x006c, PIN_OUTPUT, 1) /* (V26) GPMC0_AD12.VOUT0_DATA20 */ + J722S_IOPAD(0x0070, PIN_OUTPUT, 1) /* (V24) GPMC0_AD13.VOUT0_DATA21 */ + J722S_IOPAD(0x0074, PIN_OUTPUT, 1) /* (V22) GPMC0_AD14.VOUT0_DATA22 */ + J722S_IOPAD(0x0078, PIN_OUTPUT, 1) /* (V23) GPMC0_AD15.VOUT0_DATA23 */ + >; + }; + + main_mcasp1_pins_default: main-mcasp1-default-pins { + pinctrl-single,pins =3D < + J722S_IOPAD(0x0090, PIN_INPUT, 2) /* (P27) GPMC0_BE0n_CLE.MCASP1_ACLKX = */ + J722S_IOPAD(0x0098, PIN_INPUT, 2) /* (V21) GPMC0_WAIT0.MCASP1_AFSX */ + J722S_IOPAD(0x008c, PIN_INPUT, 2) /* (N23) GPMC0_WEn.MCASP1_AXR0 */ + >; + }; }; =20 &cpsw3g { @@ -284,6 +367,13 @@ J722S_MCU_IOPAD(0x050, PIN_INPUT_PULLUP, 0) /* (C6) WK= UP_I2C1_SDA */ >; bootph-all; }; + + hdmi_gpio_pins_default: hdmi-gpio-default-pins { + pinctrl-single,pins =3D < + J722S_MCU_IOPAD(0x0038, PIN_INPUT_PULLUP | PIN_DEBOUNCE_CONF6, 7) /* (D= 8) MCU_MCAN0_RX.MCU_GPIO0_14 HDMI_INTn */ + J722S_MCU_IOPAD(0x0034, PIN_OUTPUT_PULLUP, 7) /* (B2) MCU_MCAN0_TX.MCU_= GPIO0_13 HDMI_RSTn */ + >; + }; }; =20 &wkup_uart0 { @@ -385,6 +475,63 @@ rtc: rtc@68 { }; }; =20 +&main_i2c1 { + status =3D "okay"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&main_i2c1_pins_default>; + clock-frequency =3D <400000>; + bootph-all; + + it66122: bridge-hdmi@4c { + compatible =3D "ite,it66122"; + reg =3D <0x4c>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&hdmi_gpio_pins_default>; + vcn33-supply =3D <&vdd_3v3>; + vcn18-supply =3D <&buck2_reg>; + vrf12-supply =3D <&ldo2_reg>; + reset-gpios =3D <&mcu_gpio0 13 GPIO_ACTIVE_LOW>; + interrupt-parent =3D <&mcu_gpio0>; + interrupts =3D <14 IRQ_TYPE_EDGE_FALLING>; + #sound-dai-cells =3D <0>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + /* + * HDMI can be serviced with 3 potential VPs - + * (DSS0 VP1 / DSS1 VP0 / DSS1 VP1). + * For now, we will service it with DSS1 VP1. + */ + port@0 { + reg =3D <0>; + + it66122_in: endpoint { + bus-width =3D <24>; + remote-endpoint =3D <&dss1_dpi0_out>; + }; + }; + + port@1 { + reg =3D <1>; + + it66122_out: endpoint { + remote-endpoint =3D <&hdmi_connector_in>; + }; + }; + }; + }; +}; + +&main_gpio0 { + status =3D "okay"; +}; + +&mcu_gpio0 { + status =3D "okay"; +}; + &sdhci1 { /* SD/MMC */ vmmc-supply =3D <&vdd_mmc1>; @@ -399,4 +546,54 @@ &sdhci1 { status =3D "okay"; }; =20 +&dss1 { + status =3D "okay"; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&dss1_pins_default>; + + clocks =3D <&k3_clks 232 8>, + <&k3_clks 232 0>, + <&k3_clks 232 4>; + + assigned-clocks =3D <&k3_clks 241 0>, /* DSS1-VP0 */ + <&k3_clks 240 0>, /* DSS1-VP1 */ + <&k3_clks 245 0>; /* DPI Output */ + + assigned-clock-parents =3D <&k3_clks 241 2>, /* PLL 17 HDMI */ + <&k3_clks 240 1>, /* PLL 18 DSI */ + <&k3_clks 245 2>; /* DSS1-DPI0 */ + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + /* DSS1-VP1: DPI/HDMI Output */ + port@0 { + reg =3D <0>; + + dss1_dpi0_out: endpoint { + remote-endpoint =3D <&it66122_in>; + }; + }; + }; +}; + +&mcasp1 { + status =3D "okay"; + #sound-dai-cells =3D <0>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&main_mcasp1_pins_default>; + auxclk-fs-ratio =3D <2177>; + op-mode =3D <0>; /* MCASP_IIS_MODE */ + tdm-slots =3D <2>; + serial-dir =3D < /* 0: INACTIVE, 1: TX, 2: RX */ + 1 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + >; + tx-num-evt =3D <32>; + rx-num-evt =3D <32>; +}; + #include "k3-j722s-ti-ipc-firmware.dtsi" --=20 2.43.0