From nobody Sat Feb 7 07:24:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 123C3225788; Fri, 23 Jan 2026 16:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184763; cv=none; b=hR30cy1CvIjGNQBNeLQyKmcMhTCKHL7f1dvPNzPF1TOo/4MICTad8jKvSNsua5kupNlxZk7p8jmYVcD2LBN2YDCtDB7n+a04OwY5bpQbDTWgt4MSjmH0WK4za4IePsIUaNh0ycpzbVztaFgJGCp5StVfIqoGxZW+Ebz5GhmWLpk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184763; c=relaxed/simple; bh=0zIFnLQkrNv1RDeV/OGwROGYLBJyPuLw2Z2up66C6SY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O63OTjhg5opl/OaveFqSKTGBHh3G6/Bmp1rkFgPAIBbk2lrkTEoynpzrGWdg1KfHdb+XITatB9ih6BkxIyXzpgLe/Z7vrLQpH2RM7GKj5KG6AH2xEb618LG0Kk4G5cdgmkL+8jU90ZGY51hN7imvQFOBCvAYrLUxv5Kd/WCjPfQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=sLwVHkid; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="sLwVHkid" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id B3EC44E42223; Fri, 23 Jan 2026 16:12:39 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 87F756070A; Fri, 23 Jan 2026 16:12:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 80B5E119A87A9; Fri, 23 Jan 2026 17:12:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769184757; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=O0e7oK0+DtrdeS2mjGJxW+Ios+Q8mp3j2SQs5EO70xg=; b=sLwVHkidiHIDfZuSGh2sRDPCpneLh4ZvKNK8EJrcwXsFqE6lVHYTRzYTI4fE/+CwJmhTfr bzXTjSu2Ru4YgqLmubEcynDKIsaXX1eTPnaJFpvPFh12oMSniTn5OkWz6Fc2wH5V63ROao tHD55DhHjB1cAdamR1ytMTVrowVFnHaMflrWFNBjzjYGjjOnLbxsFlRZ0a9BbyErMKxeWg cl2SkR914fIDMVofHcO0TQBHRChiA8gAwhQzckJ1iYaSiz2AqEiIe8+n5bAGnXZP7mGd4M lRQnD3Aep1tJnhma5Rx+J9eV9SV3i2fk9pxkKP/biUUnHjvo5QsOSFJ6/nySbA== From: "Kory Maincent (TI.com)" Date: Fri, 23 Jan 2026 17:12:19 +0100 Subject: [PATCH v5 01/25] dt-bindings: display: tilcdc: Convert to DT schema 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: <20260123-feature_tilcdc-v5-1-5a44d2aa3f6f@bootlin.com> References: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> In-Reply-To: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> To: Jyri Sarha , Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King , Bartosz Golaszewski , Tony Lindgren , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: Markus Schneider-Pargmann , Bajjuri Praneeth , Luca Ceresoli , Louis Chauvet , Thomas Petazzoni , Miguel Gazquez , Herve Codina , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, "Kory Maincent (TI.com)" , Krzysztof Kozlowski X-Mailer: b4 0.15-dev-47773 X-Last-TLS-Session-Version: TLSv1.3 Convert the device tree binding documentation for tilcdc from plain text to DT binding schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kory Maincent (TI.com) --- Change in v3: - Rename binding file to ti,am33xx-tilcdc.yaml. - Use generic node name and drop unused label. --- .../bindings/display/tilcdc/ti,am33xx-tilcdc.yaml | 100 +++++++++++++++++= ++++ .../devicetree/bindings/display/tilcdc/tilcdc.txt | 82 ----------------- 2 files changed, 100 insertions(+), 82 deletions(-) diff --git a/Documentation/devicetree/bindings/display/tilcdc/ti,am33xx-til= cdc.yaml b/Documentation/devicetree/bindings/display/tilcdc/ti,am33xx-tilcd= c.yaml new file mode 100644 index 0000000000000..eb0ebb678fa87 --- /dev/null +++ b/Documentation/devicetree/bindings/display/tilcdc/ti,am33xx-tilcdc.yaml @@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2025 Bootlin +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/tilcdc/ti,am33xx-tilcdc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI LCD Controller, found on AM335x, DA850, AM18x and OMAP-L138 + +maintainers: + - Kory Maincent + +properties: + compatible: + enum: + - ti,am33xx-tilcdc + - ti,da850-tilcdc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + port: + $ref: /schemas/graph.yaml#/properties/port + + ti,hwmods: + $ref: /schemas/types.yaml#/definitions/string + description: + Name of the hwmod associated to the LCDC + + max-bandwidth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The maximum pixels per second that the memory interface / lcd + controller combination can sustain + # maximum: 2048*2048*60 + maximum: 251658240 + + max-width: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The maximum horizontal pixel width supported by the lcd controller. + maximum: 2048 + + max-pixelclock: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The maximum pixel clock that can be supported by the lcd controller + in KHz. + + blue-and-red-wiring: + enum: [straight, crossed] + description: + This property deals with the LCDC revision 2 (found on AM335x) + color errata [1]. + - "straight" indicates normal wiring that supports RGB565, + BGR888, and XBGR8888 color formats. + - "crossed" indicates wiring that has blue and red wires + crossed. This setup supports BGR565, RGB888 and XRGB8888 + formats. + - If the property is not present or its value is not recognized + the legacy mode is assumed. This configuration supports RGB565, + RGB888 and XRGB8888 formats. However, depending on wiring, the red + and blue colors are swapped in either 16 or 24-bit color modes. + + [1] There is an errata about AM335x color wiring. For 16-bit color + mode the wires work as they should (LCD_DATA[0:4] is for Blue[3:7]), + but for 24 bit color modes the wiring of blue and red components is + crossed and LCD_DATA[0:4] is for Red[3:7] and LCD_DATA[11:15] is + for Blue[3-7]. For more details see section 3.1.1 in AM335x + Silicon Errata + https://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratur= eNumber=3Dsprz360 + +required: + - compatible + - interrupts + - reg + - port + +additionalProperties: false + +examples: + - | + display-controller@4830e000 { + compatible =3D "ti,am33xx-tilcdc"; + reg =3D <0x4830e000 0x1000>; + interrupt-parent =3D <&intc>; + interrupts =3D <36>; + ti,hwmods =3D "lcdc"; + + blue-and-red-wiring =3D "crossed"; + + port { + endpoint { + remote-endpoint =3D <&hdmi_0>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt b/= Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt deleted file mode 100644 index 3b3d0bbfcfff4..0000000000000 --- a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt +++ /dev/null @@ -1,82 +0,0 @@ -Device-Tree bindings for tilcdc DRM driver - -Required properties: - - compatible: value should be one of the following: - - "ti,am33xx-tilcdc" for AM335x based boards - - "ti,da850-tilcdc" for DA850/AM18x/OMAP-L138 based boards - - interrupts: the interrupt number - - reg: base address and size of the LCDC device - -Recommended properties: - - ti,hwmods: Name of the hwmod associated to the LCDC - -Optional properties: - - max-bandwidth: The maximum pixels per second that the memory - interface / lcd controller combination can sustain - - max-width: The maximum horizontal pixel width supported by - the lcd controller. - - max-pixelclock: The maximum pixel clock that can be supported - by the lcd controller in KHz. - - blue-and-red-wiring: Recognized values "straight" or "crossed". - This property deals with the LCDC revision 2 (found on AM335x) - color errata [1]. - - "straight" indicates normal wiring that supports RGB565, - BGR888, and XBGR8888 color formats. - - "crossed" indicates wiring that has blue and red wires - crossed. This setup supports BGR565, RGB888 and XRGB8888 - formats. - - If the property is not present or its value is not recognized - the legacy mode is assumed. This configuration supports RGB565, - RGB888 and XRGB8888 formats. However, depending on wiring, the red - and blue colors are swapped in either 16 or 24-bit color modes. - -Optional nodes: - - - port/ports: to describe a connection to an external encoder. The - binding follows Documentation/devicetree/bindings/graph.txt and - supports a single port with a single endpoint. - - - See also Documentation/devicetree/bindings/display/tilcdc/panel.txt and - Documentation/devicetree/bindings/display/bridge/ti,tfp410.yaml for con= necting - tfp410 DVI encoder or lcd panel to lcdc - -[1] There is an errata about AM335x color wiring. For 16-bit color mode - the wires work as they should (LCD_DATA[0:4] is for Blue[3:7]), - but for 24 bit color modes the wiring of blue and red components is - crossed and LCD_DATA[0:4] is for Red[3:7] and LCD_DATA[11:15] is - for Blue[3-7]. For more details see section 3.1.1 in AM335x - Silicon Errata: - https://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNu= mber=3Dsprz360 - -Example: - - fb: fb@4830e000 { - compatible =3D "ti,am33xx-tilcdc", "ti,da850-tilcdc"; - reg =3D <0x4830e000 0x1000>; - interrupt-parent =3D <&intc>; - interrupts =3D <36>; - ti,hwmods =3D "lcdc"; - - blue-and-red-wiring =3D "crossed"; - - port { - lcdc_0: endpoint { - remote-endpoint =3D <&hdmi_0>; - }; - }; - }; - - tda19988: tda19988 { - compatible =3D "nxp,tda998x"; - reg =3D <0x70>; - - pinctrl-names =3D "default", "off"; - pinctrl-0 =3D <&nxp_hdmi_bonelt_pins>; - pinctrl-1 =3D <&nxp_hdmi_bonelt_off_pins>; - - port { - hdmi_0: endpoint { - remote-endpoint =3D <&lcdc_0>; - }; - }; - }; --=20 2.43.0 From nobody Sat Feb 7 07:24:41 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 33FE2225788 for ; Fri, 23 Jan 2026 16:12:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184778; cv=none; b=erSf6u9Bow9EGQ7taeNz3pITwqVW4CZfAfwX5dOwMi47wl57DDM2QnHCoU6afoeA9fMbMj3366tJoFaEo7nYrmmkvesdhRcpoVO1155WG+jA2FL984xWHVSxdd4bgj4qD41pObquaxIR7+1iRslmpRiqdoayzYb9hI3qpdusYPs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184778; c=relaxed/simple; bh=yGejKaZh5ByrBfXLcr2NmrBBEetDse4CwlTbHeXyB7s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZfBTSyTSa78BKMUbFTSt7IvxTYMATVhjj1+WuL35l2AMhyRERaaCq9tJ6TFEsQmxRit/FzM7dSPFhjMQtZzVd9bwWfY/0MQ6vE16Kf+IIUlqi/SSR9gS0JHCUpl7LqcnU8RrhAaZUBhU00hiX+bbrXcwsilMAJLn1vlUhrvZ7Kk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=AN7MdFMl; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="AN7MdFMl" Received: from smtpout-01.galae.net (unknown [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 1F31FC20308; Fri, 23 Jan 2026 16:12:53 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C3A1D6070A; Fri, 23 Jan 2026 16:12:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 63782119A87A7; Fri, 23 Jan 2026 17:12:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769184761; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=9pRdDo0hFTS055NfI0T4ilJaSpXgnD1Q6tcrd1hCPuE=; b=AN7MdFMlbp5FJEZoN2mi0kvDp8vZlv9JdtgkIeBUDR/DWaiOg0D81F1XIu3lU4j/zFPSaP 9KtvghPVLbiUDAnaToy4poSDDba/4DouOVkl3w6X7vANZubSyEvmyrrrx7TN59pUdVIeWr a4cxy2ef4Ne1d7yaYYZwM6TqFq/o9o8bQsIm9uycNrfc3h9AgVyh4OAmVKmF/0jrngw9WH NlPm3DHQIjtoOD/TuBVMcRZZ+m5aph1Ef0eU091IPyj1z5crzszAGTjz7zV/+N/P/DpfL6 VS0qoqj93y5l5A1uRf1TUCPwDUsa4EQAVI1r176mAZyWxYWeGB+OQ/FLYw0p5w== From: "Kory Maincent (TI.com)" Date: Fri, 23 Jan 2026 17:12:20 +0100 Subject: [PATCH v5 02/25] dt-bindings: display: tilcdc: Mark panel binding as deprecated 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: <20260123-feature_tilcdc-v5-2-5a44d2aa3f6f@bootlin.com> References: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> In-Reply-To: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> To: Jyri Sarha , Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King , Bartosz Golaszewski , Tony Lindgren , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: Markus Schneider-Pargmann , Bajjuri Praneeth , Luca Ceresoli , Louis Chauvet , Thomas Petazzoni , Miguel Gazquez , Herve Codina , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, "Kory Maincent (TI.com)" , Krzysztof Kozlowski X-Mailer: b4 0.15-dev-47773 X-Last-TLS-Session-Version: TLSv1.3 Mark the ti,tilcdc,panel binding as deprecated in the documentation. This legacy binding should no longer be used for new designs. Users should migrate to the standard DRM panel bindings instead. Acked-by: Krzysztof Kozlowski Signed-off-by: Kory Maincent (TI.com) --- Change in v2: - New patch --- Documentation/devicetree/bindings/display/tilcdc/panel.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/tilcdc/panel.txt b/D= ocumentation/devicetree/bindings/display/tilcdc/panel.txt index 808216310ea27..b973174d704ed 100644 --- a/Documentation/devicetree/bindings/display/tilcdc/panel.txt +++ b/Documentation/devicetree/bindings/display/tilcdc/panel.txt @@ -1,4 +1,5 @@ Device-Tree bindings for tilcdc DRM generic panel output driver +This binding is deprecated and should not be used. =20 Required properties: - compatible: value should be "ti,tilcdc,panel". --=20 2.43.0 From nobody Sat Feb 7 07:24:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 85139225788; Fri, 23 Jan 2026 16:12:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184769; cv=none; b=OqI/U8FY7vJ0idfMf+SS50f0Kkmt0mVTN6U0pgf5s7pst4cwWxDgUctxd7gpZfPZRSVmXhCImEUYCLdT06Xcw6N/T/3v/2usbIkGysPkvH9uw06VQsl6ascvq1vakrsTUrL5HRuk2dJ+jwJB67HVenVc6w2y8Io1iT5tk1YjetY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184769; c=relaxed/simple; bh=zH6ddwMZf6e4Bua7tANEEOZOr9Vjd0AeuM3WhJ3M9R8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B7HE/NfVB94svHIaRdM3w7OUg6LfjPGI5zzgrwNlNtfXnCKQEIx+eVk0Oi7V6KMPkeHNmU3f0nB9QNe5sN/yn41IsTHAiST64ric+BLk2Ix6E+VOiBn4XYCl3OUhzRX91H+1eim5FRVuKQt7o4iVKCNVZP7IhBz6U627fCHTbHc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Twb4JfBz; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Twb4JfBz" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 515F84E42224; Fri, 23 Jan 2026 16:12:46 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 249FF60760; Fri, 23 Jan 2026 16:12:46 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id AEE8B119A87C6; Fri, 23 Jan 2026 17:12:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769184764; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=RJmCdmjf1cJp6uWKepJHYg4mCo27O3rNk6xDNkv07d0=; b=Twb4JfBze6+mFfHizOX3E8cstyYuXpP6snj4cffFXs2VJ5pCKQ6DHODQ+2JJWCBSaVKUpX CP0/tFbx9PGLnUjPWTLQ1HdvmhlISygUHNfq8inlrth2ufEhpKpHC/pfQ1DxC+lN7iVEz1 NElYp+y5z+Slie583kR9zvXLrHrFFGq9kbiQKQWQ8Ei0gwF7cTnfyOzPh3xuGpXzmiE/QR AZ3D9EErJWDkz7pMdq4M0RDAJ8U3uA9vzkK+tuurf9GqrWwBokAxYQt0K24WE6DfwLz+MQ 3gM9PkmBV7oSrgbr56XZrc1Y3ctu0riCPwiBtaq7kI6qkYriWCNcm0jJsLaoBg== From: "Kory Maincent (TI.com)" Date: Fri, 23 Jan 2026 17:12:21 +0100 Subject: [PATCH v5 03/25] drm/tilcdc: Remove simulate_vesa_sync flag 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: <20260123-feature_tilcdc-v5-3-5a44d2aa3f6f@bootlin.com> References: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> In-Reply-To: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> To: Jyri Sarha , Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King , Bartosz Golaszewski , Tony Lindgren , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: Markus Schneider-Pargmann , Bajjuri Praneeth , Luca Ceresoli , Louis Chauvet , Thomas Petazzoni , Miguel Gazquez , Herve Codina , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, "Kory Maincent (TI.com)" X-Mailer: b4 0.15-dev-47773 X-Last-TLS-Session-Version: TLSv1.3 The tilcdc hardware does not generate VESA-compliant sync signals. It aligns the vertical sync (VS) on the second edge of the horizontal sync (HS) instead of the first edge. To compensate for this hardware behavior, the driver applies a timing adjustment in mode_fixup(). Previously, this adjustment was conditional based on the simulate_vesa_sync flag, which was only set when using external encoders. This appears problematic because: 1. The timing adjustment seems needed for the hardware behavior regardless of whether an external encoder is used 2. The external encoder infrastructure is driver-specific and being removed due to design issues 3. Boards using tilcdc without bridges (e.g., am335x-evm, am335x-evmsk) may not be getting the necessary timing adjustments Remove the simulate_vesa_sync flag and apply the VESA sync timing adjustment unconditionally, ensuring consistent behavior across all configurations. While it's unclear if the previous conditional behavior was causing actual issues, the unconditional adjustment better reflects the hardware's characteristics. Reviewed-by: Luca Ceresoli Signed-off-by: Kory Maincent (TI.com) --- Only few board currently use tilcdc not associated to a bridge like the am335x_evm or the am335x-evmsk. --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 16 ---------------- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 -- drivers/gpu/drm/tilcdc/tilcdc_external.c | 1 - 3 files changed, 19 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/= tilcdc_crtc.c index 52c95131af5af..b06b1453db2dd 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -47,9 +47,6 @@ struct tilcdc_crtc { =20 struct drm_framebuffer *next_fb; =20 - /* Only set if an external encoder is connected */ - bool simulate_vesa_sync; - int sync_lost_count; bool frame_intact; struct work_struct recover_work; @@ -642,11 +639,6 @@ static bool tilcdc_crtc_mode_fixup(struct drm_crtc *cr= tc, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { - struct tilcdc_crtc *tilcdc_crtc =3D to_tilcdc_crtc(crtc); - - if (!tilcdc_crtc->simulate_vesa_sync) - return true; - /* * tilcdc does not generate VESA-compliant sync but aligns * VS on the second edge of HS instead of first edge. @@ -866,14 +858,6 @@ void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc, tilcdc_crtc->info =3D info; } =20 -void tilcdc_crtc_set_simulate_vesa_sync(struct drm_crtc *crtc, - bool simulate_vesa_sync) -{ - struct tilcdc_crtc *tilcdc_crtc =3D to_tilcdc_crtc(crtc); - - tilcdc_crtc->simulate_vesa_sync =3D simulate_vesa_sync; -} - void tilcdc_crtc_update_clk(struct drm_crtc *crtc) { struct drm_device *dev =3D crtc->dev; diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/t= ilcdc_drv.h index 58b276f82a669..3aba3a1155ba0 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h @@ -160,8 +160,6 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc); void tilcdc_crtc_update_clk(struct drm_crtc *crtc); void tilcdc_crtc_set_panel_info(struct drm_crtc *crtc, const struct tilcdc_panel_info *info); -void tilcdc_crtc_set_simulate_vesa_sync(struct drm_crtc *crtc, - bool simulate_vesa_sync); void tilcdc_crtc_shutdown(struct drm_crtc *crtc); void tilcdc_crtc_destroy(struct drm_crtc *crtc); int tilcdc_crtc_update_fb(struct drm_crtc *crtc, diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c b/drivers/gpu/drm/til= cdc/tilcdc_external.c index 3b86d002ef62e..da755a411d9ff 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_external.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c @@ -80,7 +80,6 @@ int tilcdc_add_component_encoder(struct drm_device *ddev) return -ENODEV; =20 /* Only tda998x is supported at the moment. */ - tilcdc_crtc_set_simulate_vesa_sync(priv->crtc, true); tilcdc_crtc_set_panel_info(priv->crtc, &panel_info_tda998x); =20 return 0; --=20 2.43.0 From nobody Sat Feb 7 07:24:41 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 68E6F3043C9; Fri, 23 Jan 2026 16:12:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184779; cv=none; b=Jqzrb8rnIwuObNsbceaIsFvei0YBYh9dQxNKtyMV6q71TU+KpQVcfCsb86wR+BZwME4w/O16kbJnArRYAX6a/gf0dwcAAA/b4MynnOzVIyla0LC6/nrPqAH3gywOm8BuTl1cvvdBkebvAptpxvQW06a5oULSzagt8+ITM2G5t3U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184779; c=relaxed/simple; bh=45Jt5t0sHPdj8Ww07M5bNUhytPHQmSo1UYVB9TAICKY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TxBAxbCvscjQjpNXImPYmuX6GLIhGmbT3pBWHQ8rxwobWg3YBp8rIm3s8XjpaVyM4bqFGuUa15midR5Gif/nvwr96S/JNSiuixWZ7CHlh8p8uSZNEVplL301N4Cyy3x5zx/ZS72x6jfMdzkTD92yO2oU7BxhPLBH7ZHa1Y9w2P0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=jfT4TGGs; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="jfT4TGGs" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 3BEE3C1F1EB; Fri, 23 Jan 2026 16:12:56 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 489D760766; Fri, 23 Jan 2026 16:12:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 266B6119A87DB; Fri, 23 Jan 2026 17:12:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769184767; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=Drz+V5zSCo/xDGMhhUKOwdHPwsGJbTExDYM6rsO7Bv8=; b=jfT4TGGsH+8ZN94z6JffmPhERJPJQU7F675g2h2H3w/er4HpR4Nr7KDj+KMbhvtPf4Vzwi CE1iACqdazSx3W8MjMjCH6XxNxOrVK44uXSI0naHlEI0GqGhvwxtHlJZxg2Uamw9PXtLi5 mOijQn1F/n/aR3qPdEMWE+EwatzDuYCleyaP45getBbC1rYzDMFjB09bevLj2Vr62uxF4s i7LWRyt/RSs06afCL/UsAdPvdUm7WRvPxJNfNypaexvmrKrDOLyl+NOGsvu82sc7QbGHSC TledfBEcGdRP5iyeaLZWBfe2kccU2aQcBl4MegRbfmG8gJpcaBZyljksGcBIEQ== From: "Kory Maincent (TI.com)" Date: Fri, 23 Jan 2026 17:12:22 +0100 Subject: [PATCH v5 04/25] drm/tilcdc: Add support for DRM bus flags and simplify panel config 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: <20260123-feature_tilcdc-v5-4-5a44d2aa3f6f@bootlin.com> References: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> In-Reply-To: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> To: Jyri Sarha , Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King , Bartosz Golaszewski , Tony Lindgren , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: Markus Schneider-Pargmann , Bajjuri Praneeth , Luca Ceresoli , Louis Chauvet , Thomas Petazzoni , Miguel Gazquez , Herve Codina , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, "Kory Maincent (TI.com)" X-Mailer: b4 0.15-dev-47773 X-Last-TLS-Session-Version: TLSv1.3 Migrate CRTC mode configuration to use standard DRM bus flags in preparation for removing the tilcdc_panel driver and its custom tilcdc_panel_info structure. Add support for DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE and DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE flags to control pixel clock and sync signal edge polarity, while maintaining backward compatibility with the existing tilcdc panel info structure. Simplify several hardware parameters by setting them to fixed defaults based on common usage across existing device trees: - DMA burst size: 16 (previously configurable via switch statement) - AC bias frequency: 255 (previously panel-specific) - FIFO DMA request delay: 128 (previously panel-specific) These parameters show no variation in real-world usage, so hardcoding them simplifies the driver without losing functionality. Preserve FIFO threshold configurability by detecting the SoC type, as this parameter varies between AM33xx (8) and DA850 (16) platforms. Reviewed-by: Luca Ceresoli Signed-off-by: Kory Maincent (TI.com) --- Change in v4: - Use of_device_get_match_data() instead of of_match_node(). - Move back the tilcdc_of_match table down were it was before. Change in v2: - Use SoC type instead of devicetree parameter to set FIFO threshold value. --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 47 +++++++++++++-------------------= ---- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 17 +++++++++++-- drivers/gpu/drm/tilcdc/tilcdc_drv.h | 2 ++ 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/= tilcdc_crtc.c index b06b1453db2dd..2309a9a0c925d 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -285,27 +285,15 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crt= c) =20 /* Configure the Burst Size and fifo threshold of DMA: */ reg =3D tilcdc_read(dev, LCDC_DMA_CTRL_REG) & ~0x00000770; - switch (info->dma_burst_sz) { - case 1: - reg |=3D LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_1); - break; - case 2: - reg |=3D LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_2); - break; - case 4: - reg |=3D LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_4); - break; - case 8: - reg |=3D LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_8); - break; - case 16: - reg |=3D LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_16); - break; - default: - dev_err(dev->dev, "invalid burst size\n"); - return; + /* Use 16 bit DMA burst size by default */ + reg |=3D LCDC_DMA_BURST_SIZE(LCDC_DMA_BURST_16); + if (priv->fifo_th) { + int fifo_th_val =3D ilog2(priv->fifo_th) - 3; + + reg |=3D (fifo_th_val << 8); + } else { + reg |=3D (info->fifo_th << 8); } - reg |=3D (info->fifo_th << 8); tilcdc_write(dev, LCDC_DMA_CTRL_REG, reg); =20 /* Configure timings: */ @@ -321,8 +309,8 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crtc) =20 /* Set AC Bias Period and Number of Transitions per Interrupt: */ reg =3D tilcdc_read(dev, LCDC_RASTER_TIMING_2_REG) & ~0x000fff00; - reg |=3D LCDC_AC_BIAS_FREQUENCY(info->ac_bias) | - LCDC_AC_BIAS_TRANSITIONS_PER_INT(info->ac_bias_intrpt); + /* Use 255 AC Bias Pin Frequency by default */ + reg |=3D LCDC_AC_BIAS_FREQUENCY(255); =20 /* * subtract one from hfp, hbp, hsw because the hardware uses @@ -392,20 +380,19 @@ static void tilcdc_crtc_set_mode(struct drm_crtc *crt= c) return; } } - reg |=3D info->fdd << 12; + /* Use 128 FIFO DMA Request Delay by default */ + reg |=3D 128 << 12; tilcdc_write(dev, LCDC_RASTER_CTRL_REG, reg); =20 - if (info->invert_pxl_clk) + if (info->invert_pxl_clk || + mode->flags =3D=3D DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE) tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_PIXEL_CLOCK); else tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_INVERT_PIXEL_CLOCK); =20 - if (info->sync_ctrl) - tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_CTRL); - else - tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_CTRL); - - if (info->sync_edge) + tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_CTRL); + if (info->sync_edge || + mode->flags =3D=3D DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE) tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_EDGE); else tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, LCDC_SYNC_EDGE); diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/t= ilcdc_drv.c index 3dcbec312bacb..fe01f3fcaf3c2 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -31,6 +31,11 @@ #include "tilcdc_panel.h" #include "tilcdc_regs.h" =20 +enum tilcdc_variant { + AM33XX_TILCDC, + DA850_TILCDC, +}; + static LIST_HEAD(module_list); =20 static const u32 tilcdc_rev1_formats[] =3D { DRM_FORMAT_RGB565 }; @@ -198,6 +203,7 @@ static int tilcdc_init(const struct drm_driver *ddrv, s= truct device *dev) struct platform_device *pdev =3D to_platform_device(dev); struct device_node *node =3D dev->of_node; struct tilcdc_drm_private *priv; + enum tilcdc_variant variant; u32 bpp =3D 0; int ret; =20 @@ -209,6 +215,8 @@ static int tilcdc_init(const struct drm_driver *ddrv, s= truct device *dev) if (IS_ERR(ddev)) return PTR_ERR(ddev); =20 + variant =3D (uintptr_t)of_device_get_match_data(dev); + ddev->dev_private =3D priv; platform_set_drvdata(pdev, ddev); drm_mode_config_init(ddev); @@ -309,6 +317,11 @@ static int tilcdc_init(const struct drm_driver *ddrv, = struct device *dev) =20 DBG("Maximum Pixel Clock Value %dKHz", priv->max_pixelclock); =20 + if (variant =3D=3D DA850_TILCDC) + priv->fifo_th =3D 16; + else + priv->fifo_th =3D 8; + ret =3D tilcdc_crtc_create(ddev); if (ret < 0) { dev_err(dev, "failed to create crtc\n"); @@ -598,8 +611,8 @@ static void tilcdc_pdev_shutdown(struct platform_device= *pdev) } =20 static const struct of_device_id tilcdc_of_match[] =3D { - { .compatible =3D "ti,am33xx-tilcdc", }, - { .compatible =3D "ti,da850-tilcdc", }, + { .compatible =3D "ti,am33xx-tilcdc", .data =3D (void *)AM33XX_TILCDC}, + { .compatible =3D "ti,da850-tilcdc", .data =3D (void *)DA850_TILCDC}, { }, }; MODULE_DEVICE_TABLE(of, tilcdc_of_match); diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h b/drivers/gpu/drm/tilcdc/t= ilcdc_drv.h index 3aba3a1155ba0..79078b4ae7393 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h @@ -61,6 +61,8 @@ struct tilcdc_drm_private { */ uint32_t max_width; =20 + u32 fifo_th; + /* Supported pixel formats */ const uint32_t *pixelformats; uint32_t num_pixelformats; --=20 2.43.0 From nobody Sat Feb 7 07:24:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 E9B392F547F for ; Fri, 23 Jan 2026 16:12:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184776; cv=none; b=MABOJfqQsKp6qB6IySsGz1AwTANlTkMbHP7KsPRmrmkff4cFtqH63ngiOUddU+x71kNg6VQNJe2Rj3snfc2xmV1aw6yQRuVdGVaReYc3k4DcAmDRlf7ZxUqZL7aLvI+suW4XmkPcsoxJp/xJxfWmBG51F7zEZsvstOQiUTE+4g0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184776; c=relaxed/simple; bh=vBa+PK3Y1ypDEJKMd/JjYcV9kB5mS9Ju5nU8khR0COI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=INbbTajtEuGd2XTitmc0HXAaxXscrlJV/EZBFMrJjar4bcgwe67ugvCJIra1mPmfvcJ6UBF+9N+n2WzLFH0FVQ+cVD3pBYTlSwY+9QuoJ66evWCA3MvsGvcPScxbfCjndBwkt0YkPWvsAkQ9Ibo4xVdZltvMrjXUEY/ln+9Zg6w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mp278sk/; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mp278sk/" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 855FA4E42222; Fri, 23 Jan 2026 16:12:53 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 574656070A; Fri, 23 Jan 2026 16:12:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 37508119A87DD; Fri, 23 Jan 2026 17:12:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769184771; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=6Pq5QRHafsBrEnq05IXIhJ8AFQ4St6BUqNPN1Ni15mg=; b=mp278sk/KuNsjV5PLUsC1OoaNpX5ETYkEq2ZNjJCgLvxq5+i32V5eVWXOCqELH/t0lNtr2 VkIa7WNyvhYSxviiQ5kM0Xb/oQmBNlJXYon1WNlLmefZrWsPPFu/jApfb9RRkSPExtUTej Go+d/MSqWceBIn39JkiIJjIWt2Mjp09KLztS39xT6DTu236JlfgaEIIiE0ucZrAX4ecH1M n5Z28EK+/ePaOvCAjojH7zZbOupbYhBWvhAyqzEkeOuzw9kYRp7JB6ekAjaO1VbdPa/o0Y LsEf3FYdAzKIvgc1UfFfNgwTrdiehGH+2QK5CTzscuMl9tXLHAzTDX9wldq9dA== From: "Kory Maincent (TI.com)" Date: Fri, 23 Jan 2026 17:12:23 +0100 Subject: [PATCH v5 05/25] drm/tilcdc: Convert legacy panel binding via DT overlay at boot time 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: <20260123-feature_tilcdc-v5-5-5a44d2aa3f6f@bootlin.com> References: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> In-Reply-To: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> To: Jyri Sarha , Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King , Bartosz Golaszewski , Tony Lindgren , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: Markus Schneider-Pargmann , Bajjuri Praneeth , Luca Ceresoli , Louis Chauvet , Thomas Petazzoni , Miguel Gazquez , Herve Codina , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, "Kory Maincent (TI.com)" X-Mailer: b4 0.15-dev-47773 X-Last-TLS-Session-Version: TLSv1.3 To maintain backward compatibility while removing the deprecated tilcdc_panel driver, add a tilcdc_panel_legacy subdriver that converts the legacy "ti,tilcdc,panel" devicetree binding to the standard panel-dpi binding at early boot. The conversion uses an embedded device tree overlay that is applied and modified during subsys_initcall. The process: - Apply embedded overlay to create a tilcdc-panel-dpi node with port/endpoint connections to the LCDC - Copy all properties from the legacy panel node to the new tilcdc-panel-dpi node - Copy display-timings from the legacy panel - Convert legacy panel-info properties (invert-pxl-clk, sync-edge) to standard display timing properties (pixelclk-active, syncclk-active) - Disable the legacy panel by removing its compatible property to prevent the deprecated driver from binding The result is a standard tilcdc-panel-dpi node with proper endpoints and timing properties, allowing the DRM panel infrastructure to work with legacy devicetrees without modification. Other legacy panel-info properties are not migrated as they consistently use default values across all mainline devicetrees and can be hardcoded in the tilcdc driver. This feature is optional via CONFIG_DRM_TILCDC_PANEL_LEGACY and should only be enabled for systems with legacy devicetrees containing "ti,tilcdc,panel" nodes. Suggested-by: Tomi Valkeinen Link: https://lore.kernel.org/all/1d9a9269-bfda-4d43-938b-2df6b82b9369@idea= sonboard.com/ Reviewed-by: Luca Ceresoli Reviewed-by: Herve Codina Signed-off-by: Kory Maincent (TI.com) --- Using the approach of applying an overlay and then modifying the live device tree is the solution I found that requires no modification of the OF core. Dealing entirely with changesets would bring additional requirements such as phandle resolution management, which is internal to the OF framework. I intend to avoid OF core change to support this legacy binding. Change in v4: - Use tab instead of space. Change in v3: - Use __free() macro instead of manual house cleaning. - Enable CONFIG_DRM_TILCDC_PANEL_LEGACY config by default. - Improve config description. - Rename "panel-dpi" to "tilcdc-panel-dpi" to avoid any future conflict. - Use OF changeset instead of modifying the live devicetree step by step. - Add kfree to avoid memory leak. Change in v2: - New patch. --- drivers/gpu/drm/tilcdc/Kconfig | 16 ++ drivers/gpu/drm/tilcdc/Makefile | 2 + drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.c | 185 ++++++++++++++++++++= ++++ drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.dtso | 29 ++++ 4 files changed, 232 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/Kconfig b/drivers/gpu/drm/tilcdc/Kconfig index 24f9a245ba593..a36e809f984cd 100644 --- a/drivers/gpu/drm/tilcdc/Kconfig +++ b/drivers/gpu/drm/tilcdc/Kconfig @@ -14,3 +14,19 @@ config DRM_TILCDC controller, for example AM33xx in beagle-bone, DA8xx, or OMAP-L1xx. This driver replaces the FB_DA8XX fbdev driver. =20 +config DRM_TILCDC_PANEL_LEGACY + bool "Support device tree blobs using TI LCDC Panel binding" + default y + depends on DRM_TILCDC + depends on OF + depends on BACKLIGHT_CLASS_DEVICE + depends on PM + select OF_OVERLAY + select DRM_PANEL_SIMPLE + help + Modifies the live device tree at early boot to convert the legacy + "ti,tilcdc,panel" devicetree node to the standard panel-dpi node. + This allows to maintain backward compatibility for boards which + were using the deprecated tilcdc_panel driver. + If you find "ti,tilcdc,panel"-string from your DTB, you probably + need this. Otherwise you do not. diff --git a/drivers/gpu/drm/tilcdc/Makefile b/drivers/gpu/drm/tilcdc/Makef= ile index f5190477de721..6d6a08b5adf40 100644 --- a/drivers/gpu/drm/tilcdc/Makefile +++ b/drivers/gpu/drm/tilcdc/Makefile @@ -11,3 +11,5 @@ tilcdc-y :=3D \ tilcdc_drv.o =20 obj-$(CONFIG_DRM_TILCDC) +=3D tilcdc.o +obj-$(CONFIG_DRM_TILCDC_PANEL_LEGACY) +=3D tilcdc_panel_legacy.o \ + tilcdc_panel_legacy.dtbo.o diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.c b/drivers/gpu/drm= /tilcdc/tilcdc_panel_legacy.c new file mode 100644 index 0000000000000..37a69b3cf04b2 --- /dev/null +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.c @@ -0,0 +1,185 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2025 Bootlin + * Author: Kory Maincent + * + * To support the legacy "ti,tilcdc,panel" binding, the devicetree has to + * be transformed to the new panel-dpi binding with the endpoint associate= d. + */ + +#include +#include +#include +#include + +/* Embedded dtbo symbols created by cmd_wrap_S_dtb in scripts/Makefile.lib= */ +extern char __dtbo_tilcdc_panel_legacy_begin[]; +extern char __dtbo_tilcdc_panel_legacy_end[]; + +static int __init +tilcdc_panel_update_prop(struct of_changeset *ocs, struct device_node *nod= e, + char *name, void *val, int length) +{ + struct property *prop; + + prop =3D kzalloc(sizeof(*prop), GFP_KERNEL); + if (!prop) + return -ENOMEM; + + prop->name =3D kstrdup(name, GFP_KERNEL); + prop->length =3D length; + prop->value =3D kmemdup(val, length, GFP_KERNEL); + if (!prop->name || !prop->value) { + kfree(prop->name); + kfree(prop->value); + kfree(prop); + return -ENOMEM; + } + + return of_changeset_update_property(ocs, node, prop); +} + +static int __init tilcdc_panel_copy_props(struct device_node *old_panel, + struct device_node *new_panel) +{ + struct device_node *old_timing __free(device_node) =3D NULL; + struct device_node *new_timing __free(device_node) =3D NULL; + struct device_node *panel_info __free(device_node) =3D NULL; + struct device_node *child __free(device_node) =3D NULL; + u32 invert_pxl_clk =3D 0, sync_edge =3D 0; + struct of_changeset ocs; + struct property *prop; + int ret; + + child =3D of_get_child_by_name(old_panel, "display-timings"); + if (!child) + return -EINVAL; + + /* The default display timing is the one specified as native-mode. + * If no native-mode is specified then the first node is assumed + * to be the native mode. + */ + old_timing =3D of_parse_phandle(child, "native-mode", 0); + if (!old_timing) { + old_timing =3D of_get_next_child(child, NULL); + if (!old_timing) + return -EINVAL; + } + + panel_info =3D of_get_child_by_name(old_panel, "panel-info"); + if (!panel_info) + return -EINVAL; + + of_changeset_init(&ocs); + + /* Copy all panel properties to the new panel node */ + for_each_property_of_node(old_panel, prop) { + if (!strncmp(prop->name, "compatible", sizeof("compatible"))) + continue; + + ret =3D tilcdc_panel_update_prop(&ocs, new_panel, prop->name, + prop->value, prop->length); + if (ret) + goto destroy_ocs; + } + + new_timing =3D of_changeset_create_node(&ocs, new_panel, "panel-timing"); + if (!new_timing) { + ret =3D -ENODEV; + goto destroy_ocs; + } + + /* Copy all panel timing properties to the new panel node */ + for_each_property_of_node(old_timing, prop) { + ret =3D tilcdc_panel_update_prop(&ocs, new_timing, prop->name, + prop->value, prop->length); + if (ret) + goto destroy_ocs; + } + + /* Looked only for these two parameter as all the other are always + * set to default and not related to common DRM properties. + */ + of_property_read_u32(panel_info, "invert-pxl-clk", &invert_pxl_clk); + of_property_read_u32(panel_info, "sync-edge", &sync_edge); + + if (!invert_pxl_clk) { + ret =3D tilcdc_panel_update_prop(&ocs, new_timing, "pixelclk-active", + &(u32){cpu_to_be32(1)}, sizeof(u32)); + if (ret) + goto destroy_ocs; + } + + if (!sync_edge) { + ret =3D tilcdc_panel_update_prop(&ocs, new_timing, "syncclk-active", + &(u32){cpu_to_be32(1)}, sizeof(u32)); + if (ret) + goto destroy_ocs; + } + + /* Remove compatible property to avoid any driver compatible match */ + of_changeset_remove_property(&ocs, old_panel, + of_find_property(old_panel, "compatible", NULL)); + + of_changeset_apply(&ocs); + return 0; + +destroy_ocs: + of_changeset_destroy(&ocs); + return ret; +} + +static const struct of_device_id tilcdc_panel_of_match[] __initconst =3D { + { .compatible =3D "ti,tilcdc,panel", }, + {}, +}; + +static const struct of_device_id tilcdc_of_match[] __initconst =3D { + { .compatible =3D "ti,am33xx-tilcdc", }, + { .compatible =3D "ti,da850-tilcdc", }, + {}, +}; + +static int __init tilcdc_panel_legacy_init(void) +{ + struct device_node *new_panel __free(device_node) =3D NULL; + struct device_node *panel __free(device_node) =3D NULL; + struct device_node *lcdc __free(device_node) =3D NULL; + void *dtbo_start; + u32 dtbo_size; + int ovcs_id; + int ret; + + lcdc =3D of_find_matching_node(NULL, tilcdc_of_match); + panel =3D of_find_matching_node(NULL, tilcdc_panel_of_match); + + if (!of_device_is_available(panel) || + !of_device_is_available(lcdc)) + return 0; + + dtbo_start =3D __dtbo_tilcdc_panel_legacy_begin; + dtbo_size =3D __dtbo_tilcdc_panel_legacy_end - + __dtbo_tilcdc_panel_legacy_begin; + + ret =3D of_overlay_fdt_apply(dtbo_start, dtbo_size, &ovcs_id, NULL); + if (ret) + return ret; + + new_panel =3D of_find_node_by_name(NULL, "tilcdc-panel-dpi"); + if (!new_panel) { + ret =3D -ENODEV; + goto overlay_remove; + } + + ret =3D tilcdc_panel_copy_props(panel, new_panel); + if (ret) + goto overlay_remove; + + return 0; + +overlay_remove: + of_overlay_remove(&ovcs_id); + return ret; +} + +subsys_initcall(tilcdc_panel_legacy_init); diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.dtso b/drivers/gpu/= drm/tilcdc/tilcdc_panel_legacy.dtso new file mode 100644 index 0000000000000..ae71d10f5ec13 --- /dev/null +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel_legacy.dtso @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * DTS overlay for converting ti,tilcdc,panel binding to new binding. + * + * Copyright (C) 2025 Bootlin + * Author: Kory Maincent + */ + +/dts-v1/; +/plugin/; + +&{/} { + tilcdc-panel-dpi { + compatible =3D "panel-dpi"; + port { + panel_in: endpoint@0 { + remote-endpoint =3D <&lcd_0>; + }; + }; + }; +}; + +&lcdc { + port { + lcd_0: endpoint@0 { + remote-endpoint =3D <&panel_in>; + }; + }; +}; --=20 2.43.0 From nobody Sat Feb 7 07:24:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 56D863093C0; Fri, 23 Jan 2026 16:12:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184781; cv=none; b=NMgc3d2Kej08/2uk4wfm3ziPFM0EuGd3iPNUQVfNZdWHuRf2OeTAgI7Gnf8XHzKaQhef9a5U0KnM+x50sJ6yawoROndJpqI5fFvGw3JSVXdIhHvJrqbv2ZhqQm19Y6s4YwJUNVCP5KEuLI77HCKUyDKo7SoGNf0ZDVyp0JLtGaI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184781; c=relaxed/simple; bh=5GTiUkvsCOEn1Rji0NE9iYTzCQHhEBs28F0FdHEiPc4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OJ/kKyH1vz28R9YJzSuGnx+mQDAjZv2fH+VDbOlvmySmsw33I1YEd2ynx+b8YKki/tRsQKVbz+Ae0BjZLK90wL6ONv2XETE79jcRxCymfpdF/TIOPowzsubyMG9PX+MLBn9wjbvCO1x7uRFIDI8THRahep5Tj4NXyMSD2ZEsDUs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=gh53rFJL; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="gh53rFJL" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 0B9D24E42222; Fri, 23 Jan 2026 16:12:57 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D437E6070A; Fri, 23 Jan 2026 16:12:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3A74B119A87E2; Fri, 23 Jan 2026 17:12:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769184775; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=X2AoQP2oB2fsfo6TvX2znImFu4rAvlJ1kqDrVfyiIzY=; b=gh53rFJLXykpCECpPm9cS4GAfT/jFZIjdrbf/q2EssNCOw5xhBpUaNapfVXjO99BoNQMtC LWuEWTwEf3SnfclTi8d+7FmYMdMPRwo90qh0I61K0G+6wnFtFqZLRMOz43+KI3a5/VJBww 2wVD8f/lWR5PhDy46qVxcW0Gsu66/U8KbD8q2lRX/l7PF+rCQ6nCqp/y6LRF4+l5YgDle8 d72To2w0d+8IarOMyMB9lwxKI6hlGQI8l1ZV+8/7eqsYSIFYcJZBJ0KWCwIta7vS9GmVgA 9IiMt/PcGqOLKc9SKBBhbesxvRoNaLYnbfIe++mfEN/J6fjCKJU11R+J2nMWtQ== From: "Kory Maincent (TI.com)" Date: Fri, 23 Jan 2026 17:12:24 +0100 Subject: [PATCH v5 06/25] drm/tilcdc: Remove tilcdc panel 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: <20260123-feature_tilcdc-v5-6-5a44d2aa3f6f@bootlin.com> References: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> In-Reply-To: <20260123-feature_tilcdc-v5-0-5a44d2aa3f6f@bootlin.com> To: Jyri Sarha , Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King , Bartosz Golaszewski , Tony Lindgren , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: Markus Schneider-Pargmann , Bajjuri Praneeth , Luca Ceresoli , Louis Chauvet , Thomas Petazzoni , Miguel Gazquez , Herve Codina , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, "Kory Maincent (TI.com)" X-Mailer: b4 0.15-dev-47773 X-Last-TLS-Session-Version: TLSv1.3 The tilcdc panel subdriver is a legacy, non-standard driver that has been replaced by the standard panel-dpi driver and panel-simple infrastructure. With the device tree bindings removed and all in-tree users migrated to use panel-dpi, this driver no longer has any associated device tree bindings or users. The panel-dpi driver combined with DRM bus flags provides equivalent functionality in a standard way that is compatible with the broader DRM panel ecosystem. This removal eliminates 400+ lines of redundant code and completes the migration to standard panel handling. Reviewed-by: Luca Ceresoli Signed-off-by: Kory Maincent (TI.com) --- drivers/gpu/drm/tilcdc/Makefile | 1 - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 - drivers/gpu/drm/tilcdc/tilcdc_panel.c | 408 ------------------------------= ---- drivers/gpu/drm/tilcdc/tilcdc_panel.h | 15 -- 4 files changed, 427 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/Makefile b/drivers/gpu/drm/tilcdc/Makef= ile index 6d6a08b5adf40..b78204a65ce29 100644 --- a/drivers/gpu/drm/tilcdc/Makefile +++ b/drivers/gpu/drm/tilcdc/Makefile @@ -6,7 +6,6 @@ endif tilcdc-y :=3D \ tilcdc_plane.o \ tilcdc_crtc.o \ - tilcdc_panel.o \ tilcdc_external.o \ tilcdc_drv.o =20 diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/t= ilcdc_drv.c index fe01f3fcaf3c2..f03861ed6349d 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -28,7 +28,6 @@ =20 #include "tilcdc_drv.h" #include "tilcdc_external.h" -#include "tilcdc_panel.h" #include "tilcdc_regs.h" =20 enum tilcdc_variant { @@ -634,7 +633,6 @@ static int __init tilcdc_drm_init(void) return -ENODEV; =20 DBG("init"); - tilcdc_panel_init(); return platform_driver_register(&tilcdc_platform_driver); } =20 @@ -642,7 +640,6 @@ static void __exit tilcdc_drm_fini(void) { DBG("fini"); platform_driver_unregister(&tilcdc_platform_driver); - tilcdc_panel_fini(); } =20 module_init(tilcdc_drm_init); diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc= /tilcdc_panel.c deleted file mode 100644 index 262f290d85d91..0000000000000 --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c +++ /dev/null @@ -1,408 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Copyright (C) 2012 Texas Instruments - * Author: Rob Clark - */ - -#include -#include -#include - -#include