ARM Sunxi Platform Development
 help / color / mirror / Atom feed
From: Chris Morgan <macroalpha82@gmail.com>
To: linux-sunxi@lists.linux.dev
Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
	ryan@testtoast.com, macromorgan@hotmail.com,
	p.zabel@pengutronix.de, tzimmermann@suse.de,
	maarten.lankhorst@linux.intel.com, simona@ffwll.ch,
	airlied@gmail.com, mripard@kernel.org, samuel@sholland.org,
	jernej.skrabec@gmail.com, wens@csie.org, conor+dt@kernel.org,
	krzk+dt@kernel.org, robh@kernel.org
Subject: [PATCH V9 24/24] arm64: dts: allwinner: rg35xx: Enable LCD output
Date: Wed,  7 May 2025 15:19:43 -0500	[thread overview]
Message-ID: <20250507201943.330111-25-macroalpha82@gmail.com> (raw)
In-Reply-To: <20250507201943.330111-1-macroalpha82@gmail.com>

From: Chris Morgan <macromorgan@hotmail.com>

The RG35XX has a 640x480 RGB/SPI LCD panel, supported by the SoC display
pipeline and an NV3052C controller. The H616 SOC's GPIO bank D contains
the muxed display pins for RGB and LVDS output support.

Enable the display engine and LCD timing controller, configure the
panel, and add a fixed 3.3v GPIO-controlled regulator for the panel, and
a VCC supply for the display pins as per the other GPIO banks.

Signed-off-by: Ryan Walklin <ryan@testtoast.com>
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 .../sun50i-h700-anbernic-rg35xx-2024.dts      | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
index 95f2ae04bd95..260c2d55a86e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
@@ -187,6 +187,49 @@ reg_vcc5v: regulator-vcc5v { /* USB-C power input */
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 	};
+
+	reg_lcd: regulator-gpio-lcd-vdd {
+		compatible = "regulator-fixed";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-name = "vdd-lcd";
+		gpio = <&pio 8 15 GPIO_ACTIVE_HIGH>; // PI15
+		enable-active-high;
+	};
+
+	spi_lcd: spi {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		sck-gpios = <&pio 8 9 GPIO_ACTIVE_HIGH>; // PI9
+		mosi-gpios = <&pio 8 10 GPIO_ACTIVE_HIGH>; // PI10
+		cs-gpios = <&pio 8 8 GPIO_ACTIVE_HIGH>; // PI8
+		num-chipselects = <1>;
+
+		panel: panel@0 {
+			compatible = "anbernic,rg35xx-plus-panel";
+
+			reg = <0>;
+
+			spi-max-frequency = <3125000>;
+			spi-3wire;
+
+			reset-gpios = <&pio 8 14 GPIO_ACTIVE_LOW>; // PI14
+
+			backlight = <&backlight>;
+			power-supply = <&reg_lcd>;
+
+			pinctrl-0 = <&lcd0_rgb888_pins>;
+			pinctrl-names = "default";
+
+			port {
+				panel_in_rgb: endpoint {
+					remote-endpoint = <&tcon_lcd0_out_lcd>;
+				};
+			};
+		};
+	};
 };
 
 &codec {
@@ -199,6 +242,10 @@ &cpu0 {
 	cpu-supply = <&reg_dcdc1>;
 };
 
+&de {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -218,6 +265,7 @@ &ohci0 {
 &pio {
 	vcc-pa-supply = <&reg_cldo3>;
 	vcc-pc-supply = <&reg_cldo3>;
+	vcc-pd-supply = <&reg_cldo3>;
 	vcc-pe-supply = <&reg_cldo3>;
 	vcc-pf-supply = <&reg_cldo3>;
 	vcc-pg-supply = <&reg_aldo4>;
@@ -377,3 +425,14 @@ &usbotg {
 &usbphy {
 	status = "okay";
 };
+
+&tcon_lcd0 {
+	status = "okay";
+};
+
+&tcon_lcd0_out {
+	tcon_lcd0_out_lcd: endpoint@1 {
+		reg = <1>;
+		remote-endpoint = <&panel_in_rgb>;
+	};
+};
-- 
2.43.0


  parent reply	other threads:[~2025-05-07 20:22 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 20:19 [PATCH V9 00/24] drm: sun4i: add Display Engine 3.3 (DE33) support Chris Morgan
2025-05-07 20:19 ` [PATCH V9 01/24] dt-bindings: clock: sun50i-h616-ccu: Add LVDS reset Chris Morgan
2025-05-09 14:12   ` Andre Przywara
2025-05-07 20:19 ` [PATCH V9 02/24] clk: sunxi-ng: h616: Add LVDS reset for LCD TCON Chris Morgan
2025-05-09 14:14   ` Andre Przywara
2025-05-09 14:29     ` Chen-Yu Tsai
2025-05-09 16:31       ` Andre Przywara
2025-05-09 20:05         ` Chris Morgan
2025-05-07 20:19 ` [PATCH V9 03/24] drm: sun4i: de2/de3: add mixer version enum Chris Morgan
2025-05-07 20:19 ` [PATCH V9 04/24] drm: sun4i: de2/de3: refactor mixer initialisation Chris Morgan
2025-05-07 20:19 ` [PATCH V9 05/24] drm: sun4i: de2/de3: add generic blender register reference function Chris Morgan
2025-05-07 20:19 ` [PATCH V9 06/24] drm: sun4i: de2/de3: use generic register reference function for layer configuration Chris Morgan
2025-05-07 20:19 ` [PATCH V9 07/24] dt-bindings: allwinner: add H616 DE33 bus binding Chris Morgan
2025-05-07 20:19 ` [PATCH V9 08/24] dt-bindings: allwinner: add H616 DE33 clock binding Chris Morgan
2025-05-07 20:19 ` [PATCH V9 09/24] dt-bindings: allwinner: add H616 DE33 mixer binding Chris Morgan
2025-05-07 20:19 ` [PATCH V9 10/24] clk: sunxi-ng: ccu: add Display Engine 3.3 (DE33) support Chris Morgan
2025-05-07 20:19 ` [PATCH V9 11/24] drm: sun4i: de33: vi_scaler: " Chris Morgan
2025-05-07 20:19 ` [PATCH V9 12/24] drm: sun4i: de33: mixer: " Chris Morgan
2025-05-07 20:19 ` [PATCH V9 13/24] drm: sun4i: de33: mixer: add mixer configuration for the H616 Chris Morgan
2025-05-07 20:19 ` [PATCH V9 14/24] dt-bindings: allwinner: Add TCON_TOP and TCON_LCD clock/reset defines Chris Morgan
2025-05-07 20:19 ` [PATCH V9 15/24] dt-bindings: display: sun4i: Add compatible strings for H616 DE Chris Morgan
2025-05-07 20:19 ` [PATCH V9 16/24] dt-bindings: display: sun4i: Add compatible strings for H616 TCON TOP Chris Morgan
2025-05-07 20:19 ` [PATCH V9 17/24] dt-bindings: sram: sunxi-sram: Add H616 SRAM C compatible Chris Morgan
2025-05-07 20:19 ` [PATCH V9 18/24] dt-bindings: display: Add R40 and H616 display engine compatibles Chris Morgan
2025-05-07 20:19 ` [PATCH V9 19/24] drm/sun4i: tcon: Add support for R40 LCD Chris Morgan
2025-05-07 20:19 ` [PATCH V9 20/24] arm64: dts: allwinner: h616: add display engine, bus and mixer nodes Chris Morgan
2025-05-07 20:19 ` [PATCH V9 21/24] arm64: dts: allwinner: h616: Add TCON nodes to H616 DTSI Chris Morgan
2025-05-07 20:19 ` [PATCH V9 22/24] arm64: dts: allwinner: h616: add LCD and LVDS pins Chris Morgan
2025-05-07 20:19 ` [PATCH V9 23/24] arm64: dts: allwinner: rg35xx: Add GPIO backlight control Chris Morgan
2025-05-09 14:32   ` Andre Przywara
2025-05-09 20:02     ` Chris Morgan
2025-05-07 20:19 ` Chris Morgan [this message]
2025-05-07 21:13 ` [PATCH V9 00/24] drm: sun4i: add Display Engine 3.3 (DE33) support Rob Herring
2025-05-08 18:34   ` Corentin Labbe
2025-05-08  7:26 ` Krzysztof Kozlowski
2025-05-09 13:08   ` Chris Morgan
2025-05-10  2:01 ` (subset) " Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250507201943.330111-25-macroalpha82@gmail.com \
    --to=macroalpha82@gmail.com \
    --cc=airlied@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=macromorgan@hotmail.com \
    --cc=mripard@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=ryan@testtoast.com \
    --cc=samuel@sholland.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox