[PATCH v2 14/20] ARM: dts: omap3-pandora: Model LCD power enable dependencies

From: H. Nikolaus Schaller

Date: Tue Nov 24 2026 - 02:27:51 EST


The OpenPandora LCD power supply differs between mainboard revisions.

On revision 5a, LCD_5V is derived from the shared 5V supply and
switched by circuitry controlled through VAUX1. Both VAUX1 and the
REGEN-controlled 5V supply must therefore be enabled for the LCD.
On revision 6d, LCD_5V is generated independently from the battery
supply, with its enable input controlled through VAUX1.

Both revisions must use the same device tree. There is no
software-readable board revision identifier that allows the bootloader
or kernel to distinguish them. Nor is manual selection of a board-
specific DTB practical: the revision is not externally visible, and
users would have to open their devices and inspect the mainboard to
find out which revision they own. The original Pandora platform code
also supported both revisions without such a configuration choice.
Preserve that property in the device tree conversion.

Model the enable dependencies as a fixed-regulator chain:

LCD -> lcd_5v -> aux_5v -> vaux1

This enables both required controls on revision 5a, while also working
on revision 6d. It does not describe the physical supply topology:
VAUX1 is not the electrical input of the shared 5V regulator, so
other aux_5v consumers, including audio and USB, also enable VAUX1.

A fixed regulator can express only one vin-supply dependency, whereas
the LCD requires two independent power controls. No suitable existing
DT representation was found that expresses both dependencies without
this artificial relationship. Use the chain as a pragmatic solution
with the existing regulator framework and a common DTB.

Unlike the old platform configuration, the shared 5V rail and USB host
VBUS are no longer forced always on; the regulator consumers manage
their enable state. Keep USB host VBUS enabled at boot.

The sound card node is introduced in patch 17, which must reference
aux_5v for its amp-supply property.

The 5 ms startup delay originates from the older Pandora kernel and
was originally an estimate.

Suggested-by: Grond <grond66@xxxxxxxxxx>
Signed-off-by: H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>
---

Notes:
Changes against V1:
- Historical origin: 55b8da9ea16f (Grond, 2021-12-30),
which described REGEN and the original 5 ms startup estimate.
The revised DT models logical power-enable dependencies for both
Pandora board revisions; it does not describe physical supply topology.
The original contributor is credited with Suggested-by rather than
an unverified current DCO sign-off.
Code and commit-message review assisted by ChatGPT.

.../dts/ti/omap/omap3-pandora-common.dtsi | 34 ++++++++++++++++---
1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
index 2097ec15c6513..f25fc4f8ad042 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
@@ -31,6 +31,28 @@ hfclk_26m: oscillator {
clock-frequency = <26000000>;
};

+ /* Shared 5V rail for headphone amplifier, early LCD and USB */
+ aux_5v: fixed-regulator-5v {
+ compatible = "regulator-fixed"; /* TPS61029DRC */
+ regulator-name = "aux_5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <5000>;
+ enable-active-high;
+ gpio = <&twl_gpio 20 GPIO_ACTIVE_HIGH>; /* REGEN */
+ vin-supply = <&vaux1>; /* logical enable dependency */
+ };
+
+ /* LCD_5V: switched shared 5V on rev 5a, separate supply on rev 6d */
+ lcd_5v: fixed-regulator-lcd-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd_5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ startup-delay-us = <5000>;
+ vin-supply = <&aux_5v>; /* logical enable dependency */
+ };
+
tv: connector {
compatible = "connector-analog-tv";
label = "tv";
@@ -212,15 +234,13 @@ hsusb2_phy: hsusb2-phy-pins {
#phy-cells = <0>;
};

- /* HS USB Host VBUS supply
- * disabling this regulator causes current leakage, and LCD flicker
- * on earlier (CC) board revisions, so keep it always on */
+ /* HS USB Host VBUS supply */
usb_host_5v: fixed-regulator-usb_host_5v {
+ vin-supply = <&aux_5v>;
compatible = "regulator-fixed";
regulator-name = "usb_host_5v";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
- regulator-always-on;
regulator-boot-on;
enable-active-high;
gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>; /* GPIO_164 */
@@ -673,7 +693,7 @@ lcd: lcd@1 {

label = "lcd";
reset-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>; /* GPIO_157 */
- vcc-supply = <&vaux1>;
+ vcc-supply = <&lcd_5v>;

port {
lcd_in: endpoint {
@@ -711,6 +731,10 @@ &mcbsp2 {
};

/* bluetooth */
+&twl_gpio {
+ ti,use-regen;
+};
+
&mcbsp3 {
};

--
2.56.0