* [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks
@ 2026-11-24 7:25 H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 01/20] dt-bindings: gpio: twl4030: Document REGEN GPIO H. Nikolaus Schaller
` (21 more replies)
0 siblings, 22 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
PATCH V2 2026-11-24 08:26:00:
Changes in V2:
The series has been reworked and expanded from 16 to 20 patches,
addressing review feedback and issues identified during hardware testing.
Audio and power management:
===========================
* Replace the TWL4030 REGEN regulator implementation with an optional
GPIO and a fixed regulator described in Device Tree.
* Extend the existing PCM1754 codec driver to support the PCM1773
instead of introducing a separate codec driver.
* Add power supply and power-down GPIO support to the codec driver.
* Improve error handling, resource management and power sequencing
in the codec and sound card drivers.
* Update the sound card and codec bindings and Device Tree nodes.
PWM and backlight:
==================
* Add optional 64-cycle frame support to the TWL4030 PWM driver.
* Add an optional enable guard period to the generic pwm-backlight
driver to prevent the TPS61161 from inadvertently entering
EasyScale mode.
* Adjust the Pandora PWM backlight configuration accordingly.
* Remove the obsolete CONFIG_BACKLIGHT_PANDORA option from
omap2plus_defconfig.
Device Tree and general cleanup:
================================
* Correct and validate the affected Device Tree bindings.
* Reorder the series so that bindings and supporting drivers
precede their Device Tree users.
* Improve commit messages and fix coding style issues.
* Clarify the original authorship and take responsibility for
contributions previously signed off under a pseudonym.
Review feedback addressed:
==========================
* Mark Brown suggested representing TWL4030 REGEN as a GPIO rather
than a regulator and reviewed the original standalone PCM1773
driver, which has been replaced by extending the PCM1754 driver.
* Krzysztof Kozlowski requested corrections to the Device Tree
bindings, proper schema validation, improved commit messages and
clarification of the original contributor's authorship.
* Andreas Kemnade suggested handling the TPS61161 initialization
in the backlight layer. V2 implements this through a generic
pwm-backlight enable guard period. His comments on clock modeling
and patch bisectability were also considered.
* Daniel Thompson provided Reviewed-by for the original removal
of the Pandora backlight driver.
* Issues identified by Sashiko and Rob Herring's automated DT
validation were reviewed and addressed as applicable.
Many thanks to everyone who reviewed V1.
Validation and testing:
=======================
* Based on Linux v7.4-rc4.
* All 20 patches checked with checkpatch.pl.
* Remaining checkpatch warnings and intentional deviations have
been reviewed. In particular, ENOTSUPP must be retained in the
GPIO set_config callback because gpiolib handles it differently
from EOPNOTSUPP.
* dt_binding_check and dtbs_check passed for all five affected
Device Tree bindings.
* The complete series has been successfully built and tested on
real OpenPandora hardware.
* LCD operation, PWM backlight brightness control including
brightness zero and power-down, and audio playback through the
internal speakers and headset have been verified.
* Audio capture was not tested.
PATCH V1 2026-07-11 08:02:02:
This series modernizes the OpenPandora handheld support by converting the
sound subsystem and backlight control to proper platform drivers and Device
Tree definitions.
The primary goal is the complete removal of omap3_pandora_legacy_init()
and the elimination of the last remaining user of machine_is_omap3_pandora().
History and Context
===================
The necessity of this cleanup was highlighted in several recent discussions:
1. Tony Lindgren noted that machine_is_omap3_pandora() checks never succeed
on Device Tree-booted machines, leaving the audio subsystem functionally
broken since the DT conversion years ago:
https://marc.info/?l=alsa-devel&m=165632351319716&w=2
2. Ethan Nelson-Moore submitted a patch to replace the macro with DT
compatibility checks (accepted as commit 45efb8fbdae3 in v7.2-rc1):
https://marc.info/?l=linux-omap&m=177841578110704&w=2
3. Sascha Hauer pointed out that the entire omap3pandora driver fundamentally
depended on this broken machine ID check:
https://marc.info/?l=linux-omap&m=178048982272252&w=2
Design Choices and Implementation
=================================
Based on these discussions and a long-standing and working out-of-tree solution,
we initially attempted a migration to generic frameworks like simple-audio-card
or audio-graph-card. However, the hardware routing peculiarities of the
OpenPandora introduced too many functional gaps. Replacing omap3pandora.c
entirely with pure DT definitions proved unfeasible.
Therefore, we opted to base a new proposal on the out-of-tree rewrite of
the old-style sound board file kernel driver (sound/soc/ti/omap3pandora.c)
into a proper platform driver that cleanly fetches its resources from the
Device Tree, while adding specific handling for the twl4030-regen output
and adapting the pandora device tree files.
Series Structure
================
* Patches 01–06 (Preparation): Move highly specific legacy code to its proper
infrastructure (TWL4030 regulator regeneration and codec handling).
* Patch 07-08 (New Driver): Introduce a dedicated platform driver for the
PCM1773 audio DAC.
* Patches 09-14 (Audio Core): Rewrite the omap3pandora ASoC fabric driver
and update the respective Device Tree nodes.
* Patches 14–15 (Backlight): Remove the custom, legacy Pandora backlight driver,
convert it to generic Device Tree nodes
* Patch 16: (Cleanup) safely delete the obsolete omap3_pandora_legacy_init().
Notes & Testing
===============
* Testing: This series has been tested on real OpenPandora hardware.
Credits
=======
This work is a collaborative effort by multiple authors over several years:
* Grond <grond66@riseup.net>
* Stefan Leichter <sle85276@gmx.de>
* H. Nikolaus Schaller <hns@goldelico.com>
H. Nikolaus Schaller (17):
dt-bindings: gpio: twl4030: Document REGEN GPIO
gpio: twl4030: Support REGEN GPIO
ASoC: twl4030: Allow APLL rate selection through set_sysclk()
dt-bindings: sound: pcm1754: Describe PCM1773
ASoC: codecs: pcm1754: Add PCM1773 support
dt-bindings: sound: Document OpenPandora sound card
dt-bindings: mfd: twl4030: Document 64-cycle PWM
pwm: twl: Support 64-cycle PWM frame
dt-bindings: backlight: pwm: Document enable guard
backlight: pwm: Support enable guard period
drm/panel: td043mtea1: Attach DT backlight
ARM: dts: omap3pandora: Disable unused DMA channels
ARM: dts: omap3-pandora: Model LCD power enable dependencies
ARM: dts: omap3pandora: Describe PCM1773
ARM: dts: omap3pandora: Switch backlight to PWM
backlight: Remove legacy Pandora driver
ARM: OMAP2+: Remove Pandora platform-data quirks
Stefan Leichter (3):
ASoC: ti: omap3pandora: Convert sound card to DT
ARM: dts: omap3pandora: Enable audio interfaces
ARM: dts: omap3pandora: Describe sound card
.../bindings/gpio/ti,twl4030-gpio.yaml | 4 +
.../leds/backlight/pwm-backlight.yaml | 20 +
.../devicetree/bindings/mfd/ti,twl.yaml | 9 +
.../sound/openpandora,omap3pandora-sound.yaml | 95 ++++
.../devicetree/bindings/sound/ti,pcm1754.yaml | 10 +-
.../dts/ti/omap/omap3-pandora-common.dtsi | 123 ++++-
arch/arm/configs/omap2plus_defconfig | 1 -
arch/arm/mach-omap2/pdata-quirks.c | 23 -
drivers/gpio/gpio-twl4030.c | 185 ++++++-
drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 4 +
drivers/pwm/pwm-twl.c | 37 ++
drivers/video/backlight/Kconfig | 7 -
drivers/video/backlight/Makefile | 1 -
drivers/video/backlight/pandora_bl.c | 159 ------
drivers/video/backlight/pwm_bl.c | 37 +-
include/linux/mfd/twl.h | 3 +
include/linux/mfd/twl4030-audio.h | 3 +
include/linux/pwm_backlight.h | 1 +
sound/soc/codecs/pcm1754.c | 122 ++++-
sound/soc/codecs/twl4030.c | 142 ++++--
sound/soc/ti/omap3pandora.c | 452 ++++++++++++------
21 files changed, 1016 insertions(+), 422 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml
delete mode 100644 drivers/video/backlight/pandora_bl.c
--
2.56.0
^ permalink raw reply [flat|nested] 41+ messages in thread
* [PATCH v2 01/20] dt-bindings: gpio: twl4030: Document REGEN GPIO
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 02/20] gpio: twl4030: Support " H. Nikolaus Schaller
` (20 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Document the optional ti,use-regen property for the TWL4030 GPIO
controller. It exposes the REGEN power-management output through the
GPIO controller so that device tree consumers can control it using a
GPIO specifier.
The property is opt-in to preserve the existing GPIO numbering for
systems that do not use REGEN as a GPIO.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Replaces the former REGEN regulator binding following Mark Brown's
recommendation to model the control signal as a GPIO and
Krzysztof Kozlowski's binding review.
- Expand the binding commit message to explain why REGEN exposure is
opt-in and how consumers use it.
- Commit-message review assisted by ChatGPT.
Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml b/Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml
index 96d50d14c0710..25ba4328ac2d0 100644
--- a/Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/ti,twl4030-gpio.yaml
@@ -47,6 +47,10 @@ properties:
type: boolean
description: Enables LEDA and LEDB outputs if set
+ ti,use-regen:
+ type: boolean
+ description: Enables the REGEN output as a GPIO if set
+
additionalProperties: false
examples:
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 02/20] gpio: twl4030: Support REGEN GPIO
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 01/20] dt-bindings: gpio: twl4030: Document REGEN GPIO H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 03/20] ASoC: twl4030: Allow APLL rate selection through set_sysclk() H. Nikolaus Schaller
` (19 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Allow the TWL4030 GPIO controller to expose REGEN as an additional,
output-only GPIO when enabled by the ti,use-regen device tree property.
Unlike the ordinary GPIO lines, REGEN is controlled through the TWL4030
power-management registers. Keep it optional so that existing users of
the GPIO controller retain their GPIO numbering and behaviour.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Follow Mark Brown's V1 review of the regulator implementation:
REGEN is a control signal, not a voltage regulator.
- Clarify that REGEN is controlled by power-management registers and
does not require enabling the GPIO module.
- Use WARN_ON_ONCE(true) for the impossible GPIO offset and clarify
that LED and REGEN outputs cannot be inputs.
- Expand the commit message to describe the opt-in output-only GPIO.
- Reject unavailable LED offsets when only REGEN extends ngpio;
do not report a successful GPIO request for reserved lines.
- Address checkpatch style findings (braces, wrapping and alignment).
- Ignore the checkpatch recommendation to use EOPNOTSUPP instead of
ENOTSUPP in the GPIO set_config callback. Gpiolib treats ENOTSUPP
as an unsupported optional configuration; EOPNOTSUPP propagates
as an error and prevents fixed-regulator GPIO setup on Pandora.
- Code and commit-message review assisted by ChatGPT.
drivers/gpio/gpio-twl4030.c | 185 ++++++++++++++++++++++++++++++++----
include/linux/mfd/twl.h | 3 +
2 files changed, 169 insertions(+), 19 deletions(-)
diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c
index 3e06ef9e22336..30ac6f7e0e56a 100644
--- a/drivers/gpio/gpio-twl4030.c
+++ b/drivers/gpio/gpio-twl4030.c
@@ -37,6 +37,20 @@
* There are also two LED pins used sometimes as output-only GPIOs.
*/
+#define TWL4030_GPIO_LED_A TWL4030_GPIO_MAX
+#define TWL4030_GPIO_LED_B (TWL4030_GPIO_MAX + 1)
+#define TWL4030_GPIO_REGEN (TWL4030_GPIO_MAX + 2)
+
+/* PM_RECEIVER: REGEN_DEV_GRP */
+#define TWL4030_REGEN_DEV_GRP 0x7f
+#define TWL4030_REGEN_DEV_GRP_P1 BIT(5)
+#define TWL4030_REGEN_DEV_GRP_P2 BIT(6)
+#define TWL4030_REGEN_DEV_GRP_P3 BIT(7)
+
+/* POWERPM_RECEIVER: DC/DC_GLOBAL_CFG */
+#define TWL4030_DC_DC_GLOBAL_CFG 0x06
+#define TWL4030_REGEN_PU_DISABLE BIT(5)
+
/* genirq interfaces are not available to modules */
#ifdef MODULE
#define is_module() true
@@ -136,6 +150,79 @@ static int twl4030_led_set_value(int led, int value)
TWL4030_LED_LEDEN_REG);
}
+static int twl4030_regen_get(void)
+{
+ u8 value;
+ int ret;
+
+ ret = twl_i2c_read_u8(TWL_MODULE_PM_RECEIVER, &value,
+ TWL4030_REGEN_DEV_GRP);
+ if (ret < 0)
+ return ret;
+
+ return !!(value & TWL4030_REGEN_DEV_GRP_P1);
+}
+
+static int twl4030_regen_set(int value)
+{
+ u8 reg;
+ int ret;
+
+ ret = twl_i2c_read_u8(TWL_MODULE_PM_RECEIVER, ®,
+ TWL4030_REGEN_DEV_GRP);
+ if (ret < 0)
+ return ret;
+
+ if (value)
+ reg |= TWL4030_REGEN_DEV_GRP_P1;
+ else
+ reg &= ~(TWL4030_REGEN_DEV_GRP_P1 |
+ TWL4030_REGEN_DEV_GRP_P2 |
+ TWL4030_REGEN_DEV_GRP_P3);
+
+ return twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, reg,
+ TWL4030_REGEN_DEV_GRP);
+}
+
+static int twl4030_regen_set_pullup(bool enable)
+{
+ u8 value;
+ int ret;
+
+ ret = twl_i2c_read_u8(TWL_MODULE_PM_RECEIVER, &value,
+ TWL4030_DC_DC_GLOBAL_CFG);
+ if (ret < 0)
+ return ret;
+
+ if (enable)
+ value &= ~TWL4030_REGEN_PU_DISABLE;
+ else
+ value |= TWL4030_REGEN_PU_DISABLE;
+
+ return twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, value,
+ TWL4030_DC_DC_GLOBAL_CFG);
+}
+
+static int twl4030_set_config(struct gpio_chip *chip,
+ unsigned int offset, unsigned long config)
+{
+ unsigned int param;
+
+ if (offset != TWL4030_GPIO_REGEN)
+ return -ENOTSUPP;
+
+ param = pinconf_to_config_param(config);
+
+ switch (param) {
+ case PIN_CONFIG_BIAS_PULL_UP:
+ return twl4030_regen_set_pullup(true);
+ case PIN_CONFIG_BIAS_DISABLE:
+ return twl4030_regen_set_pullup(false);
+ default:
+ return -ENOTSUPP;
+ }
+}
+
static int twl4030_set_gpio_direction(int gpio, int is_input)
{
u8 d_bnk = gpio >> 3;
@@ -144,6 +231,9 @@ static int twl4030_set_gpio_direction(int gpio, int is_input)
u8 base = REG_GPIODATADIR1 + d_bnk;
int ret = 0;
+ if (gpio >= TWL4030_GPIO_MAX)
+ return -EINVAL;
+
ret = gpio_twl4030_read(base);
if (ret >= 0) {
if (is_input)
@@ -211,8 +301,16 @@ static int twl_request(struct gpio_chip *chip, unsigned offset)
mutex_lock(&priv->mutex);
+ /*
+ * REGEN is controlled through the power-management registers
+ * and does not require enabling the GPIO module.
+ */
+ if (offset == TWL4030_GPIO_REGEN)
+ goto done;
+
/* Support the two LED outputs as output-only GPIOs. */
- if (offset >= TWL4030_GPIO_MAX) {
+ if (offset >= TWL4030_GPIO_LED_A &&
+ offset <= TWL4030_GPIO_LED_B) {
u8 ledclr_mask = LEDEN_LEDAON | LEDEN_LEDAEXT
| LEDEN_LEDAPWM | LEDEN_PWM_LENGTHA;
u8 reg = TWL4030_PWMAON_REG;
@@ -249,6 +347,15 @@ static int twl_request(struct gpio_chip *chip, unsigned offset)
goto done;
}
+ /*
+ * Offsets 18/19 are reserved for the optional LEDs. If the LEDs
+ * aren't enabled, they must not be treated as LED GPIOs.
+ */
+ if (offset >= TWL4030_GPIO_MAX) {
+ status = -EINVAL;
+ goto done;
+ }
+
/* on first use, turn GPIO module "on" */
if (!priv->usage_count) {
struct twl4030_gpio_platform_data *pdata;
@@ -277,8 +384,18 @@ static void twl_free(struct gpio_chip *chip, unsigned offset)
struct gpio_twl4030_priv *priv = gpiochip_get_data(chip);
mutex_lock(&priv->mutex);
+ if (offset == TWL4030_GPIO_REGEN)
+ goto out;
+
+ if (offset >= TWL4030_GPIO_LED_A &&
+ offset <= TWL4030_GPIO_LED_B) {
+ WARN_ON_ONCE(twl4030_led_set_value(offset -
+ TWL4030_GPIO_LED_A, 1));
+ goto out;
+ }
+
if (offset >= TWL4030_GPIO_MAX) {
- WARN_ON_ONCE(twl4030_led_set_value(offset - TWL4030_GPIO_MAX, 1));
+ WARN_ON_ONCE(true);
goto out;
}
@@ -301,7 +418,7 @@ static int twl_direction_in(struct gpio_chip *chip, unsigned offset)
if (offset < TWL4030_GPIO_MAX)
ret = twl4030_set_gpio_direction(offset, 1);
else
- ret = -EINVAL; /* LED outputs can't be set as input */
+ ret = -EINVAL; /* LED and REGEN outputs cannot be inputs */
if (!ret)
priv->direction &= ~BIT(offset);
@@ -323,10 +440,14 @@ static int twl_get(struct gpio_chip *chip, unsigned offset)
goto out;
}
- if (priv->direction & BIT(offset))
+ if (offset == TWL4030_GPIO_REGEN)
+ status = twl4030_regen_get();
+ else if (priv->direction & BIT(offset))
status = priv->out_state & BIT(offset);
- else
+ else if (offset < TWL4030_GPIO_MAX)
status = twl4030_get_gpio_datain(offset);
+ else
+ status = -EINVAL;
ret = (status < 0) ? status : !!status;
out:
@@ -342,13 +463,20 @@ static int twl_set(struct gpio_chip *chip, unsigned int offset, int value)
mutex_lock(&priv->mutex);
if (offset < TWL4030_GPIO_MAX)
ret = twl4030_set_gpio_dataout(offset, value);
+ else if (offset >= TWL4030_GPIO_LED_A &&
+ offset <= TWL4030_GPIO_LED_B)
+ ret = twl4030_led_set_value(offset - TWL4030_GPIO_LED_A, value);
+ else if (offset == TWL4030_GPIO_REGEN)
+ ret = twl4030_regen_set(value);
else
- ret = twl4030_led_set_value(offset - TWL4030_GPIO_MAX, value);
+ ret = -EINVAL;
- if (value)
- priv->out_state |= BIT(offset);
- else
- priv->out_state &= ~BIT(offset);
+ if (!ret) {
+ if (value)
+ priv->out_state |= BIT(offset);
+ else
+ priv->out_state &= ~BIT(offset);
+ }
mutex_unlock(&priv->mutex);
@@ -361,21 +489,29 @@ static int twl_direction_out(struct gpio_chip *chip, unsigned offset, int value)
int ret = 0;
mutex_lock(&priv->mutex);
+
if (offset < TWL4030_GPIO_MAX) {
ret = twl4030_set_gpio_direction(offset, 0);
- if (ret) {
- mutex_unlock(&priv->mutex);
- return ret;
- }
+ if (ret)
+ goto out;
+ } else if (offset == TWL4030_GPIO_REGEN) {
+ /* REGEN is an output-only signal. */
+ } else if (offset >= TWL4030_GPIO_LED_A &&
+ offset <= TWL4030_GPIO_LED_B) {
+ /* LED GPIOs are output-only. */
+ } else {
+ ret = -EINVAL;
+ goto out;
}
- /*
- * LED gpios i.e. offset >= TWL4030_GPIO_MAX are always output
- */
-
priv->direction |= BIT(offset);
+
+out:
mutex_unlock(&priv->mutex);
+ if (ret)
+ return ret;
+
return twl_set(chip, offset, value);
}
@@ -395,7 +531,14 @@ static int twl_get_direction(struct gpio_chip *chip, unsigned offset)
mutex_unlock(&priv->mutex);
return ret;
}
+ } else if (offset == TWL4030_GPIO_REGEN ||
+ (offset >= TWL4030_GPIO_LED_A &&
+ offset <= TWL4030_GPIO_LED_B)) {
+ ret = GPIO_LINE_DIRECTION_OUT;
+ } else {
+ ret = -EINVAL;
}
+
mutex_unlock(&priv->mutex);
return ret;
@@ -420,6 +563,7 @@ static const struct gpio_chip template_chip = {
.get_direction = twl_get_direction,
.get = twl_get,
.set = twl_set,
+ .set_config = twl4030_set_config,
.to_irq = twl_to_irq,
.can_sleep = true,
};
@@ -478,6 +622,7 @@ static struct twl4030_gpio_platform_data *of_gpio_twl4030(struct device *dev)
omap_twl_info->use_leds = of_property_read_bool(dev->of_node,
"ti,use-leds");
+ omap_twl_info->use_regen = of_property_read_bool(dev->of_node, "ti,use-regen");
of_property_read_u32(dev->of_node, "ti,debounce",
&omap_twl_info->debounce);
@@ -567,7 +712,9 @@ static int gpio_twl4030_probe(struct platform_device *pdev)
* is (still) clear if use_leds is set.
*/
if (pdata->use_leds)
- priv->gpio_chip.ngpio += 2;
+ priv->gpio_chip.ngpio = TWL4030_GPIO_LED_B + 1;
+ if (pdata->use_regen)
+ priv->gpio_chip.ngpio = TWL4030_GPIO_REGEN + 1;
ret = devm_gpiochip_add_data(&pdev->dev, &priv->gpio_chip, priv);
if (ret < 0) {
diff --git a/include/linux/mfd/twl.h b/include/linux/mfd/twl.h
index 238d9dcefc358..9cceb4fe6c12e 100644
--- a/include/linux/mfd/twl.h
+++ b/include/linux/mfd/twl.h
@@ -560,6 +560,9 @@ struct twl4030_gpio_platform_data {
/* package the two LED signals as output-only GPIOs? */
bool use_leds;
+ /* Expose the REGEN signal as an output-only GPIO. */
+ bool use_regen;
+
/* gpio-n should control VMMC(n+1) if BIT(n) in mmc_cd is set */
u8 mmc_cd;
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 03/20] ASoC: twl4030: Allow APLL rate selection through set_sysclk()
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 01/20] dt-bindings: gpio: twl4030: Document REGEN GPIO H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 02/20] gpio: twl4030: Support " H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 04/20] dt-bindings: sound: pcm1754: Describe PCM1773 H. Nikolaus Schaller
` (18 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller, Grond
The TWL4030 APLL supplies the audio clocks used by the Pandora sound
card, including playback through an external DAC. Playback does not
necessarily execute the TWL4030 codec's hw_params() callback, which
previously provided the APLL rate selection.
Allow the machine driver to select the APLL rate through set_sysclk()
so that the clock can be configured for playback-only streams.
Suggested-by: Grond <grond66@riseup.net>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Andreas Kemnade suggested modeling the APLL as a clock provider
to enable a generic audio card; V2 retains the ASoC set_sysclk()
interface instead. This alternative was not implemented.
- Clarify in the commit message why playback-only streams require an
explicit APLL clock-selection interface.
- Take over patch authorship because Grond cannot be reached to
confirm a full name or Signed-off-by. Credit the historical
contribution with Suggested-by rather than asserting code authorship
or a DCO sign-off.
- Historical source: commit 5497d5a29f53 (Grond, 2021-12-15),
"ASoC: twl4030-codec: Allow setting APLL rate through the
.set_sysclk() interface". The present patch is derived from
this implementation, with subsequent revisions.
- Code and commit-message review assisted by ChatGPT.
include/linux/mfd/twl4030-audio.h | 3 +
sound/soc/codecs/twl4030.c | 142 +++++++++++++++++++++---------
2 files changed, 103 insertions(+), 42 deletions(-)
diff --git a/include/linux/mfd/twl4030-audio.h b/include/linux/mfd/twl4030-audio.h
index 1c28605dfda80..4378eef97b0fc 100644
--- a/include/linux/mfd/twl4030-audio.h
+++ b/include/linux/mfd/twl4030-audio.h
@@ -244,6 +244,9 @@
#define TWL4030_VIBRA_SEL 0x10
#define TWL4030_VIBRA_DIR_SEL 0x20
+/* clock ID used for setting APLL rate */
+#define TWL4030_CLOCK_APLL 0xffff
+
/* TWL4030 codec resource IDs */
enum twl4030_audio_res {
TWL4030_AUDIO_RES_POWER = 0,
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index e207721b99414..3c9ed38004783 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -198,6 +198,38 @@ static void twl4030_codec_enable(struct snd_soc_component *component, int enable
udelay(10);
}
+static int twl4030_perform_writes(struct snd_soc_component *component,
+ const unsigned int *regs,
+ const unsigned int *vals,
+ unsigned int n)
+{
+ struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component);
+ bool reboot_codec = twl4030->codec_powered;
+ unsigned int i;
+ int ret = 0;
+
+ if (reboot_codec)
+ twl4030_codec_enable(component, 0);
+
+ for (i = 0; i < n; ++i) {
+ ret = twl4030_write(component, regs[i], vals[i]);
+ if (ret)
+ break;
+ }
+
+ if (reboot_codec)
+ twl4030_codec_enable(component, 1);
+
+ return ret;
+}
+
+static inline int
+twl4030_perform_single_write(struct snd_soc_component *component,
+ unsigned int reg, unsigned int val)
+{
+ return twl4030_perform_writes(component, ®, &val, 1);
+}
+
static void
twl4030_get_board_param_values(struct twl4030_board_params *board_params,
struct device_node *node)
@@ -1697,38 +1729,16 @@ static void twl4030_shutdown(struct snd_pcm_substream *substream,
twl4030_tdm_enable(component, substream->stream, 0);
}
-static int twl4030_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
+static int twl4030_get_codec_mode_for_apll_rate(struct snd_soc_component *component,
+ unsigned int rate, u8 *res)
{
- struct snd_soc_component *component = dai->component;
- struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component);
- u8 mode, old_mode, format, old_format;
-
- /* If the substream has 4 channel, do the necessary setup */
- if (params_channels(params) == 4) {
- format = twl4030_read(component, TWL4030_REG_AUDIO_IF);
- mode = twl4030_read(component, TWL4030_REG_CODEC_MODE);
-
- /* Safety check: are we in the correct operating mode and
- * the interface is in TDM mode? */
- if ((mode & TWL4030_OPTION_1) &&
- ((format & TWL4030_AIF_FORMAT) == TWL4030_AIF_FORMAT_TDM))
- twl4030_tdm_enable(component, substream->stream, 1);
- else
- return -EINVAL;
- }
-
- if (twl4030->configured)
- /* Ignoring hw_params for already configured DAI */
- return 0;
+ u8 old_mode, mode;
- /* bit rate */
old_mode = twl4030_read(component,
TWL4030_REG_CODEC_MODE) & ~TWL4030_CODECPDZ;
mode = old_mode & ~TWL4030_APLL_RATE;
- switch (params_rate(params)) {
+ switch (rate) {
case 8000:
mode |= TWL4030_APLL_RATE_8000;
break;
@@ -1760,11 +1770,50 @@ static int twl4030_hw_params(struct snd_pcm_substream *substream,
mode |= TWL4030_APLL_RATE_96000;
break;
default:
- dev_err(component->dev, "%s: unknown rate %d\n", __func__,
- params_rate(params));
+ dev_err(component->dev, "%s: unknown rate %u\n", __func__,
+ rate);
return -EINVAL;
}
+ *res = mode;
+
+ return mode != old_mode ? 1 : 0;
+}
+
+static int twl4030_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ struct snd_soc_component *component = dai->component;
+ struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component);
+ u8 mode, format, old_format;
+ int s, ret;
+ unsigned int regs[2], vals[2];
+
+ /* If the substream has 4 channel, do the necessary setup */
+ if (params_channels(params) == 4) {
+ format = twl4030_read(component, TWL4030_REG_AUDIO_IF);
+ mode = twl4030_read(component, TWL4030_REG_CODEC_MODE);
+
+ /* Safety check: are we in the correct operating mode and
+ * the interface is in TDM mode?
+ */
+ if ((mode & TWL4030_OPTION_1) &&
+ ((format & TWL4030_AIF_FORMAT) == TWL4030_AIF_FORMAT_TDM))
+ twl4030_tdm_enable(component, substream->stream, 1);
+ else
+ return -EINVAL;
+ }
+
+ if (twl4030->configured)
+ /* Ignoring hw_params for already configured DAI */
+ return 0;
+
+ s = twl4030_get_codec_mode_for_apll_rate(component,
+ params_rate(params), &mode);
+ if (s < 0)
+ return s;
+
/* sample size */
old_format = twl4030_read(component, TWL4030_REG_AUDIO_IF);
format = old_format;
@@ -1782,20 +1831,14 @@ static int twl4030_hw_params(struct snd_pcm_substream *substream,
return -EINVAL;
}
- if (format != old_format || mode != old_mode) {
- if (twl4030->codec_powered) {
- /*
- * If the codec is powered, than we need to toggle the
- * codec power.
- */
- twl4030_codec_enable(component, 0);
- twl4030_write(component, TWL4030_REG_CODEC_MODE, mode);
- twl4030_write(component, TWL4030_REG_AUDIO_IF, format);
- twl4030_codec_enable(component, 1);
- } else {
- twl4030_write(component, TWL4030_REG_CODEC_MODE, mode);
- twl4030_write(component, TWL4030_REG_AUDIO_IF, format);
- }
+ if (format != old_format || s) {
+ regs[0] = TWL4030_REG_CODEC_MODE;
+ vals[0] = mode;
+ regs[1] = TWL4030_REG_AUDIO_IF;
+ vals[1] = format;
+ ret = twl4030_perform_writes(component, regs, vals, ARRAY_SIZE(regs));
+ if (ret)
+ return ret;
}
/* Store the important parameters for the DAI configuration and set
@@ -1820,6 +1863,21 @@ static int twl4030_set_dai_sysclk(struct snd_soc_dai *codec_dai, int clk_id,
{
struct snd_soc_component *component = codec_dai->component;
struct twl4030_priv *twl4030 = snd_soc_component_get_drvdata(component);
+ int s;
+ u8 mode;
+
+ if (clk_id == TWL4030_CLOCK_APLL) {
+ s = twl4030_get_codec_mode_for_apll_rate(component,
+ freq, &mode);
+ if (s < 0)
+ return s;
+
+ if (s)
+ return twl4030_perform_single_write(component,
+ TWL4030_REG_CODEC_MODE, mode);
+
+ return 0;
+ }
switch (freq) {
case 19200000:
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 04/20] dt-bindings: sound: pcm1754: Describe PCM1773
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (2 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 03/20] ASoC: twl4030: Allow APLL rate selection through set_sysclk() H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 12:05 ` Mark Brown
2026-11-24 7:25 ` [PATCH v2 05/20] ASoC: codecs: pcm1754: Add PCM1773 support H. Nikolaus Schaller
` (17 subsequent siblings)
21 siblings, 1 reply; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Extend the PCM1754 device tree binding to describe the related
PCM1773 stereo DAC.
Add the ti,pcm1773 compatible string and an optional enable-gpios
property for the PCM1773 power-down input. The format-gpios property
selects the hardware audio format.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- The standalone PCM1773 binding from V1 was replaced by an
extension of the existing PCM1754 binding. Address Krzysztof
Kozlowski's request to use current bindings and validate the
schema, as well as the DT validation failures reported by
Rob Herring's bot.
- Add the rationale for the compatible and optional enable GPIO to
the commit message.
- Commit-message review assisted by ChatGPT.
.../devicetree/bindings/sound/ti,pcm1754.yaml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/ti,pcm1754.yaml b/Documentation/devicetree/bindings/sound/ti,pcm1754.yaml
index a757f737690c1..ee2ebd819db00 100644
--- a/Documentation/devicetree/bindings/sound/ti,pcm1754.yaml
+++ b/Documentation/devicetree/bindings/sound/ti,pcm1754.yaml
@@ -4,10 +4,10 @@
$id: http://devicetree.org/schemas/sound/ti,pcm1754.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Texas Instruments PCM1754 Stereo DAC
+title: Texas Instruments PCM1754/PCM1773 Stereo DAC
description:
- The PCM1754 is a simple stereo DAC that is controlled via hardware gpios.
+ The PCM1754 and PCM1773 are stereo DACs controlled through hardware pins.
maintainers:
- Stefan Kerkmann <s.kerkmann@pengutronix.de>
@@ -19,12 +19,18 @@ properties:
compatible:
enum:
- ti,pcm1754
+ - ti,pcm1773
vcc-supply: true
'#sound-dai-cells':
const: 0
+ enable-gpios:
+ maxItems: 1
+ description:
+ GPIO used to control the PCM1773 power-down input (/PD)
+
format-gpios:
maxItems: 1
description:
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 05/20] ASoC: codecs: pcm1754: Add PCM1773 support
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (3 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 04/20] dt-bindings: sound: pcm1754: Describe PCM1773 H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 14:48 ` Mark Brown
2026-11-24 7:25 ` [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card H. Nikolaus Schaller
` (16 subsequent siblings)
21 siblings, 1 reply; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller, Grond
Extend the PCM1754 codec driver to support the related PCM1773 DAC.
Select the DAI name, supported formats and sample rate limits per
variant. Handle the different FMT pin polarity and an optional format
GPIO, avoiding GPIO writes when the format pin is not controlled by the
driver. Add an optional enable GPIO for the PCM1773 power-down input,
controlled by a DAPM supply event to enable the DAC after power-up and
disable it before power-down.
Keep the DAI operations instance-specific so that different variants
cannot overwrite each other's selectable formats.
Suggested-by: Grond <grond66@riseup.net>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- The standalone PCM1773 driver reviewed by Mark Brown in V1 was
abandoned. His comments concerned error handling, comment style
and the distinction between memory and wire sample formats.
V2 extends the existing PCM1754 driver instead.
- Keep the per-instance DAI operations and variant-specific format
handling described explicitly in the commit message.
- Original PCM1773 implementation: bdcb6cad6be3 (Grond,
2021-12-15, original commit timezone -0800). The present patch
adapts that work to the existing upstream PCM1754 driver.
- Suggested-by acknowledges the historical contribution without
asserting a new DCO sign-off from Grond.
- Code and commit-message review assisted by ChatGPT.
sound/soc/codecs/pcm1754.c | 122 +++++++++++++++++++++++++++++--------
1 file changed, 97 insertions(+), 25 deletions(-)
diff --git a/sound/soc/codecs/pcm1754.c b/sound/soc/codecs/pcm1754.c
index 3d0708b7566c7..f2e16a25d1891 100644
--- a/sound/soc/codecs/pcm1754.c
+++ b/sound/soc/codecs/pcm1754.c
@@ -6,6 +6,7 @@
* Copyright (c) 2025 Stefan Kerkmann <s.kerkmann@pengutronix.de>
*/
+#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/regulator/consumer.h>
@@ -13,10 +14,35 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
+struct pcm1754_variant {
+ const char *dai_name;
+ unsigned int rate_min;
+ unsigned int rate_max;
+ u64 selectable_formats;
+};
+
struct pcm1754_priv {
unsigned int format;
struct gpio_desc *gpiod_mute;
struct gpio_desc *gpiod_format;
+ struct gpio_desc *gpiod_enable;
+ const struct pcm1754_variant *variant;
+};
+
+static const struct pcm1754_variant pcm1754_variant = {
+ .dai_name = "pcm1754",
+ .rate_min = 5000,
+ .rate_max = 200000,
+ .selectable_formats = SND_SOC_POSSIBLE_DAIFMT_I2S |
+ SND_SOC_POSSIBLE_DAIFMT_RIGHT_J,
+};
+
+static const struct pcm1754_variant pcm1773_variant = {
+ .dai_name = "pcm1773",
+ .rate_min = 8000,
+ .rate_max = 48000,
+ .selectable_formats = SND_SOC_POSSIBLE_DAIFMT_I2S |
+ SND_SOC_POSSIBLE_DAIFMT_LEFT_J,
};
static int pcm1754_set_dai_fmt(struct snd_soc_dai *codec_dai,
@@ -40,31 +66,29 @@ static int pcm1754_hw_params(struct snd_pcm_substream *substream,
switch (priv->format & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_RIGHT_J:
- switch (params_width(params)) {
- case 16:
- format = 1;
- break;
- default:
+ if (priv->variant != &pcm1754_variant ||
+ params_width(params) != 16)
return -EINVAL;
- }
+ format = 1;
+ break;
+ case SND_SOC_DAIFMT_LEFT_J:
+ if (priv->variant != &pcm1773_variant ||
+ (params_width(params) != 16 && params_width(params) != 24))
+ return -EINVAL;
+ format = 0;
break;
case SND_SOC_DAIFMT_I2S:
- switch (params_width(params)) {
- case 16:
- fallthrough;
- case 24:
- format = 0;
- break;
- default:
+ if (params_width(params) != 16 && params_width(params) != 24)
return -EINVAL;
- }
+ format = priv->variant == &pcm1773_variant ? 1 : 0;
break;
default:
dev_err(component->dev, "Invalid DAI format\n");
return -EINVAL;
}
- gpiod_set_value_cansleep(priv->gpiod_format, format);
+ if (priv->gpiod_format)
+ gpiod_set_value_cansleep(priv->gpiod_format, format);
return 0;
}
@@ -73,23 +97,41 @@ static int pcm1754_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
{
struct pcm1754_priv *priv = snd_soc_component_get_drvdata(dai->component);
- gpiod_set_value_cansleep(priv->gpiod_mute, mute);
+ if (priv->gpiod_mute)
+ gpiod_set_value_cansleep(priv->gpiod_mute, mute);
return 0;
}
-static const u64 pcm1754_selectable_formats =
- SND_SOC_POSSIBLE_DAIFMT_I2S |
- SND_SOC_POSSIBLE_DAIFMT_RIGHT_J;
-
static const struct snd_soc_dai_ops pcm1754_dai_ops = {
.set_fmt = pcm1754_set_dai_fmt,
.hw_params = pcm1754_hw_params,
.mute_stream = pcm1754_mute_stream,
- .auto_selectable_formats = &pcm1754_selectable_formats,
- .num_auto_selectable_formats = 1,
};
+static int pcm1754_enable_event(struct snd_soc_dapm_widget *w,
+ struct snd_kcontrol *kcontrol, int event)
+{
+ struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
+ struct pcm1754_priv *priv = snd_soc_component_get_drvdata(component);
+
+ if (!priv->gpiod_enable)
+ return 0;
+
+ switch (event) {
+ case SND_SOC_DAPM_POST_PMU:
+ usleep_range(1000, 2000);
+ gpiod_set_value_cansleep(priv->gpiod_enable, 1);
+ break;
+ case SND_SOC_DAPM_PRE_PMD:
+ gpiod_set_value_cansleep(priv->gpiod_enable, 0);
+ usleep_range(1000, 2000);
+ break;
+ }
+
+ return 0;
+}
+
static const struct snd_soc_dai_driver pcm1754_dai = {
.name = "pcm1754",
.playback = {
@@ -106,6 +148,9 @@ static const struct snd_soc_dai_driver pcm1754_dai = {
static const struct snd_soc_dapm_widget pcm1754_dapm_widgets[] = {
SND_SOC_DAPM_REGULATOR_SUPPLY("VCC", 0, 0),
+ SND_SOC_DAPM_SUPPLY("Enable", SND_SOC_NOPM, 0, 0,
+ pcm1754_enable_event,
+ SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
SND_SOC_DAPM_DAC("DAC1", "Channel 1 Playback", SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_DAC("DAC2", "Channel 2 Playback", SND_SOC_NOPM, 0, 0),
@@ -118,8 +163,9 @@ static const struct snd_soc_dapm_route pcm1754_dapm_routes[] = {
{ "DAC1", NULL, "Playback" },
{ "DAC2", NULL, "Playback" },
- { "DAC1", NULL, "VCC" },
- { "DAC2", NULL, "VCC" },
+ { "DAC1", NULL, "Enable" },
+ { "DAC2", NULL, "Enable" },
+ { "Enable", NULL, "VCC" },
{ "VOUTL", NULL, "DAC1" },
{ "VOUTR", NULL, "DAC2" },
@@ -137,8 +183,14 @@ static int pcm1754_probe(struct platform_device *pdev)
struct pcm1754_priv *priv;
struct device *dev = &pdev->dev;
struct snd_soc_dai_driver *dai_drv;
+ struct snd_soc_dai_ops *dai_ops;
+ const struct pcm1754_variant *variant;
int ret;
+ variant = device_get_match_data(dev);
+ if (!variant)
+ return -ENODEV;
+
dai_drv = devm_kmemdup(dev, &pcm1754_dai, sizeof(*dai_drv), GFP_KERNEL);
if (!dai_drv)
return -ENOMEM;
@@ -147,6 +199,8 @@ static int pcm1754_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
+ priv->variant = variant;
+
priv->gpiod_mute = devm_gpiod_get_optional(dev, "mute", GPIOD_OUT_HIGH);
if (IS_ERR(priv->gpiod_mute))
return dev_err_probe(dev, PTR_ERR(priv->gpiod_mute),
@@ -157,6 +211,23 @@ static int pcm1754_probe(struct platform_device *pdev)
return dev_err_probe(dev, PTR_ERR(priv->gpiod_format),
"failed to get format gpio");
+ priv->gpiod_enable = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_LOW);
+ if (IS_ERR(priv->gpiod_enable))
+ return dev_err_probe(dev, PTR_ERR(priv->gpiod_enable),
+ "failed to get enable gpio");
+
+ dai_ops = devm_kmemdup(dev, &pcm1754_dai_ops,
+ sizeof(*dai_ops), GFP_KERNEL);
+ if (!dai_ops)
+ return -ENOMEM;
+
+ dai_ops->auto_selectable_formats = &variant->selectable_formats;
+ dai_ops->num_auto_selectable_formats = 1;
+ dai_drv->ops = dai_ops;
+ dai_drv->name = variant->dai_name;
+ dai_drv->playback.rate_min = variant->rate_min;
+ dai_drv->playback.rate_max = variant->rate_max;
+
dev_set_drvdata(dev, priv);
ret = devm_snd_soc_register_component(
@@ -169,7 +240,8 @@ static int pcm1754_probe(struct platform_device *pdev)
#ifdef CONFIG_OF
static const struct of_device_id pcm1754_of_match[] = {
- { .compatible = "ti,pcm1754" },
+ { .compatible = "ti,pcm1754", .data = &pcm1754_variant },
+ { .compatible = "ti,pcm1773", .data = &pcm1773_variant },
{ }
};
MODULE_DEVICE_TABLE(of, pcm1754_of_match);
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (4 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 05/20] ASoC: codecs: pcm1754: Add PCM1773 support H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 12:04 ` Mark Brown
` (3 more replies)
2026-11-24 7:25 ` [PATCH v2 07/20] ASoC: ti: omap3pandora: Convert sound card to DT H. Nikolaus Schaller
` (15 subsequent siblings)
21 siblings, 4 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
The OpenPandora audio subsystem describes the routing links between the
OMAP3 McBSP interface, the external PCM1773 DAC, and the TWL4030 audio
codec, alongside amplifiers and power supplies.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Address Krzysztof Kozlowski's V1 request to run the documented
DT schema checks and fix the errors reported by Rob Herring's
automated DT validation.
- Update the binding example and schema during DT consistency review.
- Binding and commit-message review assisted by ChatGPT.
.../sound/openpandora,omap3pandora-sound.yaml | 95 +++++++++++++++++++
1 file changed, 95 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml
diff --git a/Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml b/Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml
new file mode 100644
index 0000000000000..6c4d69ffc1c50
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/openpandora,omap3pandora-sound.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OpenPandora OMAP3 Audio Complex
+
+maintainers:
+ - H. Nikolaus Schaller <hns@goldelico.com>
+
+description:
+ The OpenPandora audio subsystem describes the routing links between the
+ OMAP3 McBSP interface, the external PCM1773 DAC, and the TWL4030 audio codec,
+ alongside amplifiers and power supplies.
+
+properties:
+ compatible:
+ const: openpandora,omap3pandora-sound
+
+ label:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: User-visible name for this sound card.
+
+ amp-gpios:
+ maxItems: 1
+ description: GPIO pin controlling the amplifier power state.
+
+ amp-supply:
+ description: Regulator supplying power to the amplifier.
+
+ sound-dai:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ minItems: 2
+ maxItems: 2
+ description:
+ Phandles to the audio CPU DAI (OMAP3 McBSP) and the codec DAI.
+
+ routing:
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ description:
+ A list of the connections between audio components.
+ Each entry is a pair of strings, the first being the connection's sink,
+ the second being the connection's source.
+
+ widgets:
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ description:
+ User-specified audio sound widgets.
+ Each entry is a pair of strings, the first being the widget type
+ (e.g., "Speaker", "Headphone", "Microphone", "Line") and the second being its name.
+
+required:
+ - compatible
+ - sound-dai
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ sound {
+ compatible = "openpandora,omap3pandora-sound";
+ status = "okay";
+
+ label = "OpenPandora";
+
+ amp-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ amp-supply = <&aux_5v>;
+
+ widgets =
+ "Line", "Line Out",
+ "Line", "Line In",
+ "Headphone", "Headphone Jack",
+ "Microphone", "Mic (internal)",
+ "Microphone", "Mic (external)";
+
+ routing =
+ "DAC1", "APLL Enable",
+ "DAC2", "APLL Enable",
+ "Headphone Amplifier", "VOUTL",
+ "Headphone Amplifier", "VOUTR",
+ "Line Out", "VOUTL",
+ "Line Out", "VOUTR",
+ "Headphone Jack", "Headphone Amplifier",
+ "AUXL", "Line In",
+ "AUXR", "Line In",
+ "MAINMIC", "Mic (internal)",
+ "Mic (internal)", "Mic Bias 1",
+ "SUBMIC", "Mic (external)",
+ "Mic (external)", "Mic Bias 2";
+
+ sound-dai = <&mcbsp2>, <&dac>;
+ };
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 07/20] ASoC: ti: omap3pandora: Convert sound card to DT
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (5 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 14:48 ` Mark Brown
2026-11-24 7:25 ` [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM H. Nikolaus Schaller
` (14 subsequent siblings)
21 siblings, 1 reply; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, Stefan Leichter, Grond,
H. Nikolaus Schaller
From: Stefan Leichter <sle85276@gmx.de>
Convert the OpenPandora ASoC machine driver to bind through a Device
Tree sound-card node instead of creating a platform device from board-
specific setup code. Describe the CPU and codec DAIs and audio routes
through DT, including the external PCM1773 playback DAC.
Move the audio paths from the machine driver's hard-coded DAPM routes
to the Device Tree, and replace pr_info()/pr_err() diagnostics with
device-scoped dev_info()/dev_err() messages.
Separate playback and capture handling and use the TWL4030 APLL clock
selection interface for the audio clocks. Use device-managed resource
allocation and card registration where possible.
This removes the machine-type-dependent sound-card registration and
allows the card to probe only when described by the Device Tree.
Signed-off-by: Stefan Leichter <sle85276@gmx.de>
Suggested-by: Grond <grond66@riseup.net>
Co-developed-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Review Sashiko's V1 findings about stream rate accounting,
sample-rate constraints, resource lifetime and DT DAI linking.
- Rewrite the commit message to describe the DT conversion and
associated resource management without informal wording.
- Credit Grond's historical contribution as Suggested-by; no current
code authorship or DCO sign-off is asserted on Grond's behalf.
- Original DT conversion: 1532a508d5ab (Stefan Leichter,
2020-06-29); Grond was credited as co-developer in that commit.
- Suggested-by preserves historical credit without asserting a
renewed DCO sign-off from Grond.
- Preserve existing sample-rate ownership when a repeated hw_params()
fails; release only reservations acquired by that invocation.
- Restore the missing int ret context line in the first diff hunk
against Linux 7.4-rc3. This fixes git am applicability without
changing the resulting source.
- Code and commit-message review assisted by ChatGPT.
sound/soc/ti/omap3pandora.c | 452 +++++++++++++++++++++++++-----------
1 file changed, 315 insertions(+), 137 deletions(-)
diff --git a/sound/soc/ti/omap3pandora.c b/sound/soc/ti/omap3pandora.c
index 6c9c184cd9d6f..d747c0e6b48cb 100644
--- a/sound/soc/ti/omap3pandora.c
+++ b/sound/soc/ti/omap3pandora.c
@@ -6,138 +6,274 @@
*/
#include <linux/clk.h>
-#include <linux/platform_device.h>
-#include <linux/gpio/consumer.h>
#include <linux/delay.h>
-#include <linux/regulator/consumer.h>
+#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
+#include <asm/mach-types.h>
+#include <linux/mfd/twl4030-audio.h>
#include <linux/platform_data/asoc-ti-mcbsp.h>
#include "omap-mcbsp.h"
-#define PREFIX "ASoC omap3pandora: "
+struct omap3pandora_sound {
+ struct gpio_desc *amp_gpio;
+ struct regulator *amp_regulator;
+
+ struct snd_pcm_substream *playback_stream;
+ struct snd_pcm_substream *capture_stream;
+
+ struct mutex sample_rate_lock; // protects all fields after
+ unsigned int sample_rate;
+ int sample_rate_users;
+};
-static struct regulator *omap3pandora_dac_reg;
-static struct gpio_desc *dac_power_gpio;
-static struct gpio_desc *amp_power_gpio;
+static struct snd_soc_dai_link omap3pandora_dai[];
-static int omap3pandora_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params)
+static int omap3pandora_common_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
- struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
+ __maybe_unused struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
+ struct device *dev = rtd->dev;
int ret;
- /* Set the codec system clock for DAC and ADC */
- ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
- SND_SOC_CLOCK_IN);
- if (ret < 0) {
- pr_err(PREFIX "can't set codec system clock\n");
- return ret;
- }
-
/* Set McBSP clock to external */
ret = snd_soc_dai_set_sysclk(cpu_dai, OMAP_MCBSP_SYSCLK_CLKS_EXT,
256 * params_rate(params),
SND_SOC_CLOCK_IN);
if (ret < 0) {
- pr_err(PREFIX "can't set cpu system clock\n");
+ dev_err(dev, "cannot set McBSP clock to external: %d\n", ret);
return ret;
}
ret = snd_soc_dai_set_clkdiv(cpu_dai, OMAP_MCBSP_CLKGDV, 8);
if (ret < 0) {
- pr_err(PREFIX "can't set SRG clock divider\n");
+ dev_err(dev, "cannot set McBSP clock divider: %d\n", ret);
return ret;
}
return 0;
}
-static int omap3pandora_dac_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *k, int event)
+static inline int constrain_sample_rate(struct snd_pcm_substream *substream,
+ unsigned int sample_rate)
+{
+ return snd_pcm_hw_constraint_single(substream->runtime,
+ SNDRV_PCM_HW_PARAM_RATE,
+ sample_rate);
+}
+
+/* The McBSP playback and capture interfaces share the TWL4030 APLL. */
+static int grab_sample_rate(struct omap3pandora_sound *ctx,
+ struct snd_pcm_substream **owner,
+ struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ bool *new_owner)
+{
+ unsigned int rate = params_rate(params);
+ int ret = 0;
+
+ *new_owner = false;
+ mutex_lock(&ctx->sample_rate_lock);
+ if (*owner == substream) {
+ if (ctx->sample_rate != rate)
+ ret = -EINVAL;
+ } else if (*owner || (ctx->sample_rate_users &&
+ ctx->sample_rate != rate)) {
+ ret = -EINVAL;
+ } else {
+ ctx->sample_rate = rate;
+ ctx->sample_rate_users++;
+ *owner = substream;
+ *new_owner = true;
+ }
+ mutex_unlock(&ctx->sample_rate_lock);
+
+ return ret;
+}
+
+static void release_sample_rate(struct omap3pandora_sound *ctx,
+ struct snd_pcm_substream **owner,
+ struct snd_pcm_substream *substream)
+{
+ mutex_lock(&ctx->sample_rate_lock);
+ if (*owner == substream) {
+ *owner = NULL;
+ if (WARN_ON_ONCE(!ctx->sample_rate_users))
+ goto out;
+ if (!--ctx->sample_rate_users)
+ ctx->sample_rate = 0;
+ }
+out:
+ mutex_unlock(&ctx->sample_rate_lock);
+}
+
+static int omap3pandora_playback_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
{
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_card *card = rtd->card;
+ struct omap3pandora_sound *ctx = snd_soc_card_get_drvdata(card);
+ struct device *dev = rtd->dev;
+ struct snd_soc_pcm_runtime *tmp_rtd;
+ struct snd_soc_pcm_runtime *twl4030_rtd = NULL;
+ bool new_owner;
int ret;
/*
- * The PCM1773 DAC datasheet requires 1ms delay between switching
- * VCC power on/off and /PD pin high/low
+ * We need to set the APLL clock rate on the TWL4030 because it feeds
+ * both the DAI of the PCM1773. So find the appropriate RTD and call
+ * the TWL's .set_sysclk callback through there. Ugly, but it must be
+ * done.
*/
- if (SND_SOC_DAPM_EVENT_ON(event)) {
- struct device *dev = snd_soc_dapm_to_dev(w->dapm);
- ret = regulator_enable(omap3pandora_dac_reg);
- if (ret) {
- dev_err(dev, "Failed to power DAC: %d\n", ret);
- return ret;
+ for_each_card_rtds(card, tmp_rtd)
+ if (tmp_rtd->dai_link == &omap3pandora_dai[1]) {
+ twl4030_rtd = tmp_rtd;
+ break;
}
- mdelay(1);
- gpiod_set_value(dac_power_gpio, 1);
- } else {
- gpiod_set_value(dac_power_gpio, 0);
- mdelay(1);
- regulator_disable(omap3pandora_dac_reg);
+ if (!twl4030_rtd) {
+ dev_err(dev, "cannot find TWL4030 runtime data to set APLL rate\n");
+ return -EINVAL;
}
+ ret = grab_sample_rate(ctx, &ctx->playback_stream, substream,
+ params, &new_owner);
+ if (ret)
+ return ret;
+
+ ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(twl4030_rtd, 0),
+ TWL4030_CLOCK_APLL, params_rate(params),
+ SND_SOC_CLOCK_OUT);
+ if (ret) {
+ dev_err(dev, "cannot set TWL4030 APLL rate via set_sysclk interface: %d\n",
+ ret);
+ goto err_release;
+ }
+
+ ret = omap3pandora_common_hw_params(substream, params);
+ if (ret)
+ goto err_release;
return 0;
+
+err_release:
+ if (new_owner)
+ release_sample_rate(ctx, &ctx->playback_stream, substream);
+ return ret;
}
-static int omap3pandora_hp_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *k, int event)
+static int omap3pandora_capture_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
{
- if (SND_SOC_DAPM_EVENT_ON(event))
- gpiod_set_value(amp_power_gpio, 1);
- else
- gpiod_set_value(amp_power_gpio, 0);
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
+ struct device *dev = rtd->dev;
+ struct snd_soc_card *card = rtd->card;
+ struct omap3pandora_sound *ctx = snd_soc_card_get_drvdata(card);
+ bool new_owner;
+ int ret;
+ /* Set the codec system clock for DAC and ADC */
+ ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000,
+ SND_SOC_CLOCK_IN);
+ if (ret < 0) {
+ dev_err(dev, "cannot set TWL4030 system clock: %d\n", ret);
+ return ret;
+ }
+
+ ret = grab_sample_rate(ctx, &ctx->capture_stream, substream,
+ params, &new_owner);
+ if (ret)
+ return ret;
+
+ ret = omap3pandora_common_hw_params(substream, params);
+ if (ret)
+ goto err_release;
return 0;
+
+err_release:
+ if (new_owner)
+ release_sample_rate(ctx, &ctx->capture_stream, substream);
+ return ret;
}
-/*
- * Audio paths on Pandora board:
- *
- * |O| ---> PCM DAC +-> AMP -> Headphone Jack
- * |M| A +--------> Line Out
- * |A| <~~clk~~+
- * |P| <--- TWL4030 <--------- Line In and MICs
- */
-static const struct snd_soc_dapm_widget omap3pandora_dapm_widgets[] = {
- SND_SOC_DAPM_DAC_E("PCM DAC", "HiFi Playback", SND_SOC_NOPM,
- 0, 0, omap3pandora_dac_event,
- SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
- SND_SOC_DAPM_PGA_E("Headphone Amplifier", SND_SOC_NOPM,
- 0, 0, NULL, 0, omap3pandora_hp_event,
- SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
- SND_SOC_DAPM_HP("Headphone Jack", NULL),
- SND_SOC_DAPM_LINE("Line Out", NULL),
+static int omap3pandora_playback_hw_free(struct snd_pcm_substream *substream)
+{
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_card *card = rtd->card;
+ struct omap3pandora_sound *ctx = snd_soc_card_get_drvdata(card);
- SND_SOC_DAPM_MIC("Mic (internal)", NULL),
- SND_SOC_DAPM_MIC("Mic (external)", NULL),
- SND_SOC_DAPM_LINE("Line In", NULL),
-};
+ release_sample_rate(ctx, &ctx->playback_stream, substream);
-static const struct snd_soc_dapm_route omap3pandora_map[] = {
- {"PCM DAC", NULL, "APLL Enable"},
- {"Headphone Amplifier", NULL, "PCM DAC"},
- {"Line Out", NULL, "PCM DAC"},
- {"Headphone Jack", NULL, "Headphone Amplifier"},
+ return 0;
+}
- {"AUXL", NULL, "Line In"},
- {"AUXR", NULL, "Line In"},
+static int omap3pandora_common_startup(struct snd_pcm_substream *substream)
+{
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_card *card = rtd->card;
+ struct omap3pandora_sound *ctx = snd_soc_card_get_drvdata(card);
+ unsigned int sample_rate;
- {"MAINMIC", NULL, "Mic (internal)"},
- {"Mic (internal)", NULL, "Mic Bias 1"},
+ mutex_lock(&ctx->sample_rate_lock);
+ sample_rate = ctx->sample_rate;
+ mutex_unlock(&ctx->sample_rate_lock);
- {"SUBMIC", NULL, "Mic (external)"},
- {"Mic (external)", NULL, "Mic Bias 2"},
-};
+ if (!sample_rate)
+ return 0;
+
+ return constrain_sample_rate(substream, sample_rate);
+}
+
+static int omap3pandora_capture_hw_free(struct snd_pcm_substream *substream)
+{
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_card *card = rtd->card;
+ struct omap3pandora_sound *ctx = snd_soc_card_get_drvdata(card);
+
+ release_sample_rate(ctx, &ctx->capture_stream, substream);
+
+ return 0;
+}
+
+static int omap3pandora_hp_event(struct snd_soc_dapm_widget *w,
+ struct snd_kcontrol *k, int event)
+{
+ struct snd_soc_card *card = snd_soc_dapm_to_card(w->dapm);
+ struct device *dev = card->dev;
+ struct omap3pandora_sound *ctx =
+ snd_soc_card_get_drvdata(card);
+ int ret;
+
+ if (SND_SOC_DAPM_EVENT_ON(event)) {
+ ret = regulator_enable(ctx->amp_regulator);
+ if (ret) {
+ dev_err(dev, "error enabling amplifier regulator: %d\n", ret);
+ return ret;
+ }
+
+ gpiod_set_value(ctx->amp_gpio, 1);
+ } else {
+ gpiod_set_value(ctx->amp_gpio, 0);
+
+ ret = regulator_disable(ctx->amp_regulator);
+ if (ret) {
+ dev_err(dev, "error disabling amplifier regulator: %d\n", ret);
+ return ret;
+ }
+ }
+
+ return 0;
+}
static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd)
{
@@ -171,20 +307,40 @@ static int omap3pandora_in_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}
-static const struct snd_soc_ops omap3pandora_ops = {
- .hw_params = omap3pandora_hw_params,
+static const struct snd_soc_ops omap3pandora_playback_ops = {
+ .startup = omap3pandora_common_startup,
+ .hw_params = omap3pandora_playback_hw_params,
+ .hw_free = omap3pandora_playback_hw_free,
+};
+
+static const struct snd_soc_ops omap3pandora_capture_ops = {
+ .startup = omap3pandora_common_startup,
+ .hw_params = omap3pandora_capture_hw_params,
+ .hw_free = omap3pandora_capture_hw_free,
};
/* Digital audio interface glue - connects codec <--> CPU */
+#if IS_BUILTIN(CONFIG_SND_SOC_OMAP3_PANDORA)
SND_SOC_DAILINK_DEFS(out,
DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.2")),
- DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-hifi")),
+ DAILINK_COMP_ARRAY(COMP_CODEC("pcm1773-codec", "pcm1773")),
DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.2")));
SND_SOC_DAILINK_DEFS(in,
DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.4")),
DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-hifi")),
DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.4")));
+#else /* IS_BUILTIN(CONFIG_SND_SOC_OMAP3_PANDORA) */
+SND_SOC_DAILINK_DEFS(out,
+ DAILINK_COMP_ARRAY(COMP_CPU("49022000.mcbsp")),
+ DAILINK_COMP_ARRAY(COMP_CODEC("pcm1773-codec", "pcm1773")),
+ DAILINK_COMP_ARRAY(COMP_PLATFORM("49022000.mcbsp")));
+
+SND_SOC_DAILINK_DEFS(in,
+ DAILINK_COMP_ARRAY(COMP_CPU("49026000.mcbsp")),
+ DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-hifi")),
+ DAILINK_COMP_ARRAY(COMP_PLATFORM("49026000.mcbsp")));
+#endif /* IS_BUILTIN(CONFIG_SND_SOC_OMAP3_PANDORA) */
static struct snd_soc_dai_link omap3pandora_dai[] = {
{
@@ -192,100 +348,122 @@ static struct snd_soc_dai_link omap3pandora_dai[] = {
.stream_name = "HiFi Out",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBC_CFC,
- .ops = &omap3pandora_ops,
+ .ops = &omap3pandora_playback_ops,
.init = omap3pandora_out_init,
+ .playback_only = 1,
SND_SOC_DAILINK_REG(out),
}, {
.name = "TWL4030",
.stream_name = "Line/Mic In",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBC_CFC,
- .ops = &omap3pandora_ops,
+ .ops = &omap3pandora_capture_ops,
.init = omap3pandora_in_init,
+ .capture_only = 1,
SND_SOC_DAILINK_REG(in),
}
};
+static const struct snd_soc_dapm_widget omap3pandora_local_widgets[] = {
+ SND_SOC_DAPM_PGA_E("Headphone Amplifier", SND_SOC_NOPM,
+ 0, 0, NULL, 0, omap3pandora_hp_event,
+ SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
+};
+
/* SoC card */
static struct snd_soc_card snd_soc_card_omap3pandora = {
- .name = "omap3pandora",
- .owner = THIS_MODULE,
- .dai_link = omap3pandora_dai,
- .num_links = ARRAY_SIZE(omap3pandora_dai),
-
- .dapm_widgets = omap3pandora_dapm_widgets,
- .num_dapm_widgets = ARRAY_SIZE(omap3pandora_dapm_widgets),
- .dapm_routes = omap3pandora_map,
- .num_dapm_routes = ARRAY_SIZE(omap3pandora_map),
+ .name = "omap3pandora",
+ .owner = THIS_MODULE,
+ .dai_link = omap3pandora_dai,
+ .num_links = ARRAY_SIZE(omap3pandora_dai),
+ .dapm_widgets = omap3pandora_local_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(omap3pandora_local_widgets),
};
-static struct platform_device *omap3pandora_snd_device;
-
-static int __init omap3pandora_soc_init(void)
+static void omap3pandora_destroy_mutex(void *data)
{
- int ret;
+ struct omap3pandora_sound *ctx = data;
- if (!of_machine_is_compatible("openpandora,omap3-pandora-600mhz") &&
- !of_machine_is_compatible("openpandora,omap3-pandora-1ghz"))
- return -ENODEV;
+ mutex_destroy(&ctx->sample_rate_lock);
+}
- pr_info("OMAP3 Pandora SoC init\n");
+static int omap3pandora_probe(struct platform_device *pdev)
+{
+ int ret;
+ struct device *dev = &pdev->dev;
+ struct snd_soc_card *card = &snd_soc_card_omap3pandora;
+ struct omap3pandora_sound *ctx;
- omap3pandora_snd_device = platform_device_alloc("soc-audio", -1);
- if (omap3pandora_snd_device == NULL) {
- pr_err(PREFIX "Platform device allocation failed\n");
+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
+ if (!ctx)
return -ENOMEM;
- }
- platform_set_drvdata(omap3pandora_snd_device, &snd_soc_card_omap3pandora);
+ mutex_init(&ctx->sample_rate_lock);
+ ret = devm_add_action_or_reset(dev, omap3pandora_destroy_mutex, ctx);
+ if (ret)
+ return ret;
- ret = platform_device_add(omap3pandora_snd_device);
- if (ret) {
- pr_err(PREFIX "Unable to add platform device\n");
- goto fail2;
+ ctx->amp_gpio = devm_gpiod_get(dev, "amp", GPIOD_OUT_LOW);
+ if (IS_ERR(ctx->amp_gpio)) {
+ dev_err(dev, "cannot find amplifier gpio\n");
+ return PTR_ERR(ctx->amp_gpio);
}
- dac_power_gpio = devm_gpiod_get(&omap3pandora_snd_device->dev,
- "dac", GPIOD_OUT_LOW);
- if (IS_ERR(dac_power_gpio)) {
- ret = PTR_ERR(dac_power_gpio);
- goto fail3;
+ ctx->amp_regulator = devm_regulator_get(dev, "amp");
+ if (IS_ERR(ctx->amp_regulator)) {
+ ret = PTR_ERR(ctx->amp_regulator);
+ dev_err(dev, "Failed to request regulator for amplifier power: %d\n", ret);
+ return ret;
}
- amp_power_gpio = devm_gpiod_get(&omap3pandora_snd_device->dev,
- "amp", GPIOD_OUT_LOW);
- if (IS_ERR(amp_power_gpio)) {
- ret = PTR_ERR(amp_power_gpio);
- goto fail3;
- }
+ card->dev = dev;
- omap3pandora_dac_reg = regulator_get(&omap3pandora_snd_device->dev, "vcc");
- if (IS_ERR(omap3pandora_dac_reg)) {
- pr_err(PREFIX "Failed to get DAC regulator from %s: %ld\n",
- dev_name(&omap3pandora_snd_device->dev),
- PTR_ERR(omap3pandora_dac_reg));
- ret = PTR_ERR(omap3pandora_dac_reg);
- goto fail3;
+ if (dev->of_node) {
+ ret = snd_soc_of_parse_card_name(card, "label");
+ if (ret)
+ card->name = "omap3pandora";
+
+ ret = snd_soc_of_parse_audio_simple_widgets(card, "widgets");
+ if (ret) {
+ dev_err(dev, "Failed to parse DAPM widgets: %d\n", ret);
+ return ret;
+ }
+
+ ret = snd_soc_of_parse_audio_routing(card, "routing");
+ if (ret) {
+ dev_err(dev, "Failed to parse audio routing: %d\n", ret);
+ return ret;
+ }
}
- return 0;
+ snd_soc_card_set_drvdata(card, ctx);
-fail3:
- platform_device_del(omap3pandora_snd_device);
-fail2:
- platform_device_put(omap3pandora_snd_device);
+ ret = devm_snd_soc_register_card(dev, card);
+ if (ret) {
+ dev_err(dev, "Failed to register sound card: %d\n", ret);
+ return ret;
+ }
- return ret;
+ return 0;
}
-module_init(omap3pandora_soc_init);
-static void __exit omap3pandora_soc_exit(void)
-{
- regulator_put(omap3pandora_dac_reg);
- platform_device_unregister(omap3pandora_snd_device);
-}
-module_exit(omap3pandora_soc_exit);
+static const struct of_device_id omap3pandora_of_match[] = {
+ { .compatible = "openpandora,omap3pandora-sound", },
+ { },
+};
+MODULE_DEVICE_TABLE(of, omap3pandora_of_match);
+
+static struct platform_driver omap3pandora_driver = {
+ .driver = {
+ .name = "omap3pandora-sound",
+ .of_match_table = omap3pandora_of_match,
+ },
+ .probe = omap3pandora_probe,
+};
+
+module_platform_driver(omap3pandora_driver);
MODULE_AUTHOR("Grazvydas Ignotas <notasas@gmail.com>");
MODULE_DESCRIPTION("ALSA SoC OMAP3 Pandora");
MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:omap3pandora-sound");
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (6 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 07/20] ASoC: ti: omap3pandora: Convert sound card to DT H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 14:40 ` Krzysztof Kozlowski
2026-11-24 7:25 ` [PATCH v2 09/20] pwm: twl: Support 64-cycle PWM frame H. Nikolaus Schaller
` (13 subsequent siblings)
21 siblings, 1 reply; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Document the optional ti,twl4030-pwm-frame-64 property for the
TWL4030 PWM controller. It selects the 64-clock-cycle frame instead
of the default 128-cycle frame, doubling the output frequency and
reducing duty-cycle resolution.
The selection is explicit because the driver does not know the PWM
input clock rate and cannot derive the hardware frame length from a
consumer-requested period. The shorter frame can reduce PWM LOW
intervals during startup mode detection of LED drivers such as the
TI TPS61160/61.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Revised commit message to focus on the binding and the reason
for explicit 64-cycle frame selection.
- Commit-message review assisted by ChatGPT.
Documentation/devicetree/bindings/mfd/ti,twl.yaml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
index 9cc3e4721612e..f458f0d80f2cd 100644
--- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
@@ -396,6 +396,15 @@ properties:
'#pwm-cells':
const: 2
+ ti,twl4030-pwm-frame-64:
+ type: boolean
+ description:
+ TWL4030 only; not supported by TWL6030 PWM.
+ Select the short 64-clock-cycle PWM frame instead of the
+ default 128-cycle frame, doubling the PWM frequency. Required
+ for dimming inputs requiring short PWM low intervals during
+ startup mode detection (e.g. TI TPS61160/61).
+
required:
- compatible
- '#pwm-cells'
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 09/20] pwm: twl: Support 64-cycle PWM frame
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (7 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 10/20] dt-bindings: backlight: pwm: Document enable guard H. Nikolaus Schaller
` (12 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Implement the ti,twl4030-pwm-frame-64 device tree option in
the TWL4030 PWM driver. When enabled, program bit 7 of PWMx_ON to
select a 64-clock-cycle frame and clamp the OFF counter to 63.
The shorter frame doubles the output frequency at the expense of
duty-cycle resolution. With ON = 1 and OFF = 63, a full-duty request
is approximated rather than producing a constant HIGH level; the
remaining LOW interval is short enough for the intended LED driver
startup mode detection.
Keep the existing 128-cycle behaviour when the property is absent.
As before, the driver does not implement arbitrary consumer-requested
PWM periods.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Add optional selection of the TWL4030 64-cycle PWM frame through
ti,twl4030-pwm-frame-64; retain the default 128-cycle mode.
- Set the frame-selection bit in PWMx_ON and limit the OFF counter
to 63 in 64-cycle mode, including for full-duty requests.
- Retain the duty-cycle calculation and register encoding of the
hardware-tested working series rather than the later review
proposal using ON = OFF = 1 for full duty.
- Document that ON = 1, OFF = 63 does not produce constant HIGH;
the resulting short LOW intervals are relevant for TPS61160/61.
- Revised commit message to distinguish driver implementation
from the preceding binding documentation.
- PWM encoding and commit-message review assisted by ChatGPT.
drivers/pwm/pwm-twl.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c
index 99c1caf4f19c8..70567d5805f43 100644
--- a/drivers/pwm/pwm-twl.c
+++ b/drivers/pwm/pwm-twl.c
@@ -25,6 +25,9 @@
#define TWL4030_GPBR1_REG 0x0c
#define TWL4030_PMBR1_REG 0x0d
+/* Bit 7 of the PWMx_ON register selects the short (64 cycles) frame */
+#define TWL4030_PWM_ON_FRAME_64 BIT(7)
+
/* GPBR1 register bits */
#define TWL4030_PWMXCLK_ENABLE (1 << 0)
#define TWL4030_PWMX_ENABLE (1 << 2)
@@ -49,6 +52,7 @@ struct twl_pwm_chip {
struct mutex mutex;
u8 twl6030_toggle3;
u8 twl4030_pwm_mux;
+ bool twl4030_frame_64;
};
static inline struct twl_pwm_chip *to_twl(struct pwm_chip *chip)
@@ -56,13 +60,35 @@ static inline struct twl_pwm_chip *to_twl(struct pwm_chip *chip)
return pwmchip_get_drvdata(chip);
}
+/*
+ * Note: this hardware (and driver) does not honor arbitrary periods.
+ * Only the duty ratio is implemented; the frame length is either
+ * 128 clock cycles (default) or - if selected through device tree -
+ * 64 clock cycles. Consumers requiring an accurate period must verify
+ * the actually provided period.
+ */
static int twl_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
u64 duty_ns, u64 period_ns)
{
+ struct twl_pwm_chip *twl = to_twl(chip);
int duty_cycle = DIV64_U64_ROUND_UP(duty_ns * TWL_PWM_MAX, period_ns) + 1;
+ bool frame_64 = twl_class_is_4030() && twl->twl4030_frame_64;
u8 pwm_config[2] = { 1, 0 };
int base, ret;
+ if (frame_64)
+ pwm_config[0] |= TWL4030_PWM_ON_FRAME_64;
+
+ /*
+ * In the 64-cycle frame the OFF counter wraps at 64. A requested
+ * duty_cycle of 64 (full duty) would therefore wrap to a constant
+ * high output. Saturate to the largest value that still produces
+ * a low pulse (OFF = 63, approximately 62/64 high) instead.
+ * This also applies to full-duty requests from PWM consumers.
+ */
+ if (frame_64 && duty_cycle > TWL_PWM_MAX)
+ duty_cycle = TWL_PWM_MAX;
+
/*
* To configure the duty period:
* On-cycle is set to 1 (the minimum allowed value)
@@ -353,6 +379,17 @@ static int twl_pwm_probe(struct platform_device *pdev)
else
chip->ops = &twl6030_pwm_ops;
+ /*
+ * Optional short PWM frame (64 instead of 128 clock cycles).
+ * Doubles the output frequency; useful for LED dimming
+ * inputs requiring short low intervals during startup
+ * mode detection (e.g. TI TPS61160/61).
+ */
+ twl->twl4030_frame_64 =
+ twl_class_is_4030() &&
+ device_property_read_bool(&pdev->dev,
+ "ti,twl4030-pwm-frame-64");
+
mutex_init(&twl->mutex);
return devm_pwmchip_add(&pdev->dev, chip);
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 10/20] dt-bindings: backlight: pwm: Document enable guard
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (8 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 09/20] pwm: twl: Support 64-cycle PWM frame H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 11/20] backlight: pwm: Support enable guard period H. Nikolaus Schaller
` (11 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Add support for a new device tree property
"pwm-enable-guard-period-us". If set, the driver applies a full
duty cycle (duty_cycle == period) for the given duration whenever
the PWM was disabled or had zero duty cycle (e.g. power-up, resume,
brightness 0). This covers the
requirements of such devices generically, without introducing a
chip specific backlight driver.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Describe the guard trigger using the PWM state actually tested
by the implementation (disabled or zero duty cycle).
- Remove the requirement that a disabled provider report zero duty-cycle.
- Remove the redundant uint32 $ref for the standard -us suffix
after dt_binding_check reported a schema error.
- Binding semantics and code-consistency review assisted by ChatGPT;
clarify that full duty is requested, not guaranteed at the output.
.../leds/backlight/pwm-backlight.yaml | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml
index b71f6454a4ac2..9172f14bfb76f 100644
--- a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml
+++ b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml
@@ -49,6 +49,26 @@ properties:
having to list out every possible value in the brightness-level array.
$ref: /schemas/types.yaml#/definitions/uint32
+ pwm-enable-guard-period-us:
+ description: >
+ Duration in microseconds for which the PWM consumer requests
+ full duty (duty_cycle == period) before applying the requested
+ brightness. The guard is issued if the previous PWM state was
+ disabled or had zero duty cycle, e.g. after power-up or resume.
+
+ This can allow LED drivers with startup mode detection to settle
+ before normal PWM dimming begins. For example, TI TPS61160/61
+ distinguish PWM dimming from EasyScale by the duration of low
+ intervals on CTRL during an initial detection window. The guard
+ duration must cover that window according to the LED driver
+ datasheet.
+
+ The PWM provider may approximate full duty if the hardware
+ cannot represent it exactly. The board must ensure that the
+ resulting waveform meets the LED driver startup requirements
+ and that the input has a defined inactive state while off.
+ default: 0
+
dependencies:
default-brightness-level: [brightness-levels]
num-interpolated-steps: [brightness-levels]
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 11/20] backlight: pwm: Support enable guard period
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (9 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 10/20] dt-bindings: backlight: pwm: Document enable guard H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 12/20] drm/panel: td043mtea1: Attach DT backlight H. Nikolaus Schaller
` (10 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Some LED drivers distinguish PWM dimming from a one-wire control
mode during a startup detection window. For example, TI TPS61160/61
use the duration of low intervals on CTRL to detect EasyScale.
An initial guard interval can keep the waveform suitable for PWM
mode detection before normal dimming begins.
Add support for a new device tree property
"pwm-enable-guard-period-us". If set, the driver applies a full
duty cycle (duty_cycle == period) for the given duration whenever
the previous PWM state was disabled or had zero duty cycle.
This covers the
requirements of such devices generically, without introducing a
chip specific backlight driver.
The requested full duty need not produce an exact constant-high
output on hardware with limited duty-cycle resolution. The board
must ensure the resulting waveform meets the LED driver timing.
Suggested-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://patchwork.kernel.org/project/linux-omap/patch/f897f695c0e1e128d7ebb41be8dfdce4d634f552.1783749722.git.hns@goldelico.com/#27124981
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Andreas Kemnade proposed placing the TPS61161 PWM-mode
initialization in backlight support rather than in the PWM
controller. The enable guard is the generic V2 implementation.
- Add pwm-enable-guard-period-us support to pwm-backlight.
- Request full duty during the startup guard when the previously
cached PWM state was disabled or had zero duty cycle.
- Check the return value of the guard PWM update, while leaving
the normal pwm_apply_might_sleep() handling as in upstream.
- Retain the hardware-tested guard implementation from the working
series; do not incorporate the later review changes to power-on
ordering, guard triggering, duty limiting or rollback handling.
- Clarify that requesting full duty does not guarantee constant
HIGH on every PWM provider; actual waveform depends on hardware.
- Keep the existing Suggested-by attribution.
- Code and commit-message review assisted by ChatGPT.
drivers/video/backlight/pwm_bl.c | 37 +++++++++++++++++++++++++++++++-
include/linux/pwm_backlight.h | 1 +
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 3ad71ee3657af..1d0a463710926 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -7,6 +7,7 @@
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
+#include <linux/minmax.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
@@ -18,6 +19,9 @@
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
+/* extra time added above enable_guard_period_us for usleep_range() */
+#define PWM_BL_GUARD_SLACK_US 2000
+
struct pwm_bl_data {
struct pwm_device *pwm;
struct device *dev;
@@ -26,6 +30,7 @@ struct pwm_bl_data {
bool enabled;
struct regulator *power_supply;
struct gpio_desc *enable_gpio;
+ unsigned int enable_guard_period_us;
unsigned int scale;
unsigned int post_pwm_on_delay;
unsigned int pwm_off_delay;
@@ -93,11 +98,39 @@ static int pwm_backlight_update_status(struct backlight_device *bl)
struct pwm_bl_data *pb = bl_get_data(bl);
int brightness = backlight_get_brightness(bl);
struct pwm_state state;
+ int ret;
if (pb->notify)
brightness = pb->notify(pb->dev, brightness);
if (brightness > 0) {
+ pwm_get_state(pb->pwm, &state);
+
+ /*
+ * Some LED drivers detect a one-wire control mode during
+ * a startup window (e.g. TI TPS61160/TPS61161, using
+ * the duration of low intervals on CTRL). Request full
+ * duty for the guard interval before normal dimming.
+ * The PWM provider may approximate full duty.
+ *
+ * Apply the guard if the previous PWM state was disabled
+ * or had zero duty cycle.
+ */
+ if (pb->enable_guard_period_us &&
+ (!state.enabled || !state.duty_cycle)) {
+ struct pwm_state guard = state;
+
+ guard.duty_cycle = guard.period;
+ guard.enabled = true;
+ ret = pwm_apply_might_sleep(pb->pwm, &guard);
+ if (ret)
+ return ret;
+
+ usleep_range(pb->enable_guard_period_us,
+ pb->enable_guard_period_us +
+ PWM_BL_GUARD_SLACK_US);
+ }
+
pwm_get_state(pb->pwm, &state);
state.duty_cycle = compute_duty_cycle(pb, brightness, &state);
state.enabled = true;
@@ -239,7 +272,8 @@ static int pwm_backlight_parse_dt(struct device *dev,
of_property_read_u32(node, "post-pwm-on-delay-ms",
&data->post_pwm_on_delay);
of_property_read_u32(node, "pwm-off-delay-ms", &data->pwm_off_delay);
-
+ of_property_read_u32(node, "pwm-enable-guard-period-us",
+ &data->enable_guard_period_us);
/*
* Determine the number of brightness levels, if this property is not
* set a default table of brightness levels will be used.
@@ -467,6 +501,7 @@ static int pwm_backlight_probe(struct platform_device *pdev)
goto err_alloc;
}
+ pb->enable_guard_period_us = data->enable_guard_period_us;
pb->notify = data->notify;
pb->notify_after = data->notify_after;
pb->exit = data->exit;
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h
index 0bf80e98d5b40..35cf19b1e9768 100644
--- a/include/linux/pwm_backlight.h
+++ b/include/linux/pwm_backlight.h
@@ -13,6 +13,7 @@ struct platform_pwm_backlight_data {
unsigned int lth_brightness;
unsigned int pwm_period_ns;
unsigned int *levels;
+ unsigned int enable_guard_period_us;
unsigned int post_pwm_on_delay;
unsigned int pwm_off_delay;
int (*init)(struct device *dev);
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 12/20] drm/panel: td043mtea1: Attach DT backlight
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (10 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 11/20] backlight: pwm: Support enable guard period H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 13/20] ARM: dts: omap3pandora: Disable unused DMA channels H. Nikolaus Schaller
` (9 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Connect the TPO TD043MTEA1 DRM panel to its backlight described in
Device Tree by calling drm_panel_of_backlight() during probe. Without
this association, the panel does not control the DT backlight.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Explain the DT backlight lookup performed by drm_panel_of_backlight().
Commit-message review assisted by ChatGPT; code unchanged.
drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c b/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
index b18af526b54c5..cb2fa393591c8 100644
--- a/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
+++ b/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
@@ -450,6 +450,10 @@ static int td043mtea1_probe(struct spi_device *spi)
return ret;
}
+ ret = drm_panel_of_backlight(&lcd->panel);
+ if (ret)
+ return ret;
+
ret = sysfs_create_group(&spi->dev.kobj, &td043mtea1_attr_group);
if (ret < 0) {
dev_err(&spi->dev, "failed to create sysfs files\n");
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 13/20] ARM: dts: omap3pandora: Disable unused DMA channels
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (11 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 12/20] drm/panel: td043mtea1: Attach DT backlight H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 14/20] ARM: dts: omap3-pandora: Model LCD power enable dependencies H. Nikolaus Schaller
` (8 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller, Grond
On the OpenPandora, only McSPI1 (spi0) is actually used. Because the device
tree defaults in arch/arm/boot/dts/omap3.dtsi leave all of the mcspi
interfaces enabled, the DMA channels which the device tree assigns to them
cannot be used for anything else. This is a problem because OMAP3's sDMA
controller can only have 32 DMA channels configured at any one time.
This can exhaust available sDMA channels and prevent McBSP audio
transfers from being allocated.
Disable unused McSPI2, McSPI3 and McSPI4 in the Pandora device tree.
Suggested-by: Grond <grond66@riseup.net>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Historical origin: 24727d33755e (Grond, 2021-12-08).
The original contributor is credited with Suggested-by rather than
an unverified current DCO sign-off.
Commit-message and provenance review assisted by ChatGPT; code unchanged.
.../boot/dts/ti/omap/omap3-pandora-common.dtsi | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
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 06c5b23589991..2097ec15c6513 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
@@ -685,6 +685,23 @@ lcd_in: endpoint {
};
+/*
+ * Only mcspi1 is used on the pandora, the others do not surface on the board
+ * due to pinmux configuration. disable the unused ones so that they do not
+ * consume DMA channels
+ */
+&mcspi2 {
+ status = "disabled";
+};
+
+&mcspi3 {
+ status = "disabled";
+};
+
+&mcspi4 {
+ status = "disabled";
+};
+
/* n/a - used as GPIOs */
&mcbsp1 {
};
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 14/20] ARM: dts: omap3-pandora: Model LCD power enable dependencies
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (12 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 13/20] ARM: dts: omap3pandora: Disable unused DMA channels H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 15/20] ARM: dts: omap3pandora: Enable audio interfaces H. Nikolaus Schaller
` (7 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller, Grond
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@riseup.net>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
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
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 15/20] ARM: dts: omap3pandora: Enable audio interfaces
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (13 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 14/20] ARM: dts: omap3-pandora: Model LCD power enable dependencies H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 16/20] ARM: dts: omap3pandora: Describe PCM1773 H. Nikolaus Schaller
` (6 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, Stefan Leichter,
H. Nikolaus Schaller
From: Stefan Leichter <sle85276@gmx.de>
Enable McBSP2 for the external playback DAC and McBSP4 for the
TWL4030 capture path on OpenPandora.
Signed-off-by: Stefan Leichter <sle85276@gmx.de>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Historical origin: d0494afbcf2e (Stefan Leichter, 2020-06-29).
Commit-message review assisted by ChatGPT; code unchanged.
arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi | 2 ++
1 file changed, 2 insertions(+)
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 f25fc4f8ad042..2a5e8ba5714da 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
@@ -728,6 +728,7 @@ &mcbsp1 {
/* audio DAC */
&mcbsp2 {
+ status = "okay";
};
/* bluetooth */
@@ -740,6 +741,7 @@ &mcbsp3 {
/* to twl4030*/
&mcbsp4 {
+ status = "okay";
};
&venc {
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 16/20] ARM: dts: omap3pandora: Describe PCM1773
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (14 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 15/20] ARM: dts: omap3pandora: Enable audio interfaces H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 17/20] ARM: dts: omap3pandora: Describe sound card H. Nikolaus Schaller
` (5 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller, Grond
Describe the PCM1773 playback DAC in the common OpenPandora device tree.
The DAC is supplied by VSIM and enabled through GPIO118. This allows
the PCM1773 codec driver to bind without platform-data registration.
Suggested-by: Grond <grond66@riseup.net>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Historical origin: 13b32c8cd102 (Grond, 2021-12-15).
- The current DTS node has been reviewed for the PCM1773 binding and GPIO/supply properties.
- Code and commit-message review assisted by ChatGPT.
arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
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 2a5e8ba5714da..6e349f7ae6936 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
@@ -64,6 +64,13 @@ tv_connector_in: endpoint {
};
};
+ dac: pcm1773-codec {
+ compatible = "ti,pcm1773";
+ vcc-supply = <&vsim>;
+ enable-gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>; /* GPIO 118 */
+ status = "okay";
+ };
+
gpio-leds {
compatible = "gpio-leds";
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 17/20] ARM: dts: omap3pandora: Describe sound card
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (15 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 16/20] ARM: dts: omap3pandora: Describe PCM1773 H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 18/20] ARM: dts: omap3pandora: Switch backlight to PWM H. Nikolaus Schaller
` (4 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, Stefan Leichter,
H. Nikolaus Schaller
From: Stefan Leichter <sle85276@gmx.de>
Describe the OpenPandora sound card and its connections to the external
PCM1773 playback DAC and TWL4030 capture codec in the device tree.
Provide the amplifier GPIO and power supply, the DAPM widgets and
routing, and the McBSP audio links needed by the DT-based sound card
driver.
Signed-off-by: Stefan Leichter <sle85276@gmx.de>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Historical origin: 570cb6f3073f (Stefan Leichter, 2020-06-29).
- The original history also contains a Signed-off-by from Grond; this has not been carried forward without renewed confirmation.
- The sound-card routing, codec phandles and amplifier supply have been reviewed in the V2 series.
- Code and commit-message review assisted by ChatGPT.
.../dts/ti/omap/omap3-pandora-common.dtsi | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
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 6e349f7ae6936..a5633d93547a3 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
@@ -69,6 +69,41 @@ dac: pcm1773-codec {
vcc-supply = <&vsim>;
enable-gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>; /* GPIO 118 */
status = "okay";
+ #sound-dai-cells = <0>;
+ };
+
+ sound: sound {
+ compatible = "openpandora,omap3pandora-sound";
+ status = "okay";
+
+ label = "OpenPandora";
+
+ amp-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+ amp-supply = <&aux_5v>;
+
+ widgets =
+ "Line", "Line Out",
+ "Line", "Line In",
+ "Headphone", "Headphone Jack",
+ "Microphone", "Mic (internal)",
+ "Microphone", "Mic (external)";
+
+ routing =
+ "DAC1", "APLL Enable",
+ "DAC2", "APLL Enable",
+ "Headphone Amplifier", "VOUTL",
+ "Headphone Amplifier", "VOUTR",
+ "Line Out", "VOUTL",
+ "Line Out", "VOUTR",
+ "Headphone Jack", "Headphone Amplifier",
+ "AUXL", "Line In",
+ "AUXR", "Line In",
+ "MAINMIC", "Mic (internal)",
+ "Mic (internal)", "Mic Bias 1",
+ "SUBMIC", "Mic (external)",
+ "Mic (external)", "Mic Bias 2";
+
+ sound-dai = <&mcbsp2>, <&dac>;
};
gpio-leds {
@@ -736,6 +771,9 @@ &mcbsp1 {
/* audio DAC */
&mcbsp2 {
status = "okay";
+ #sound-dai-cells = <0>;
+ clocks = <&mcbsp2_fck>, <&mcbsp2_ick>;
+ clock-names = "fck", "ick";
};
/* bluetooth */
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 18/20] ARM: dts: omap3pandora: Switch backlight to PWM
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (16 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 17/20] ARM: dts: omap3pandora: Describe sound card H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 19/20] backlight: Remove legacy Pandora driver H. Nikolaus Schaller
` (3 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Replace the legacy Pandora backlight platform device with a
pwm-backlight device-tree node using TWL4030 PWM0.
Use the 64-cycle PWM frame and retain the experimentally determined
brightness table. Request full duty for a 10 ms startup guard before
normal PWM dimming begins. The TWL4030 64-cycle encoding limits the
actual duty to approximately 62/64, retaining short low intervals
during the TPS61161 mode-detection window.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Describe the 10 ms full-duty request and the actual TWL4030 output.
- Brightness levels remain unchanged; duty is capped by the TWL4030
PWM provider in 64-cycle mode (patch 09), not by patch 11.
- Code and commit-message review assisted by ChatGPT.
.../dts/ti/omap/omap3-pandora-common.dtsi | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
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 a5633d93547a3..6bdfbd80b9fcd 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
@@ -53,6 +53,25 @@ lcd_5v: fixed-regulator-lcd-5v {
vin-supply = <&aux_5v>; /* logical enable dependency */
};
+ backlight: pwm-backlight {
+ compatible = "pwm-backlight";
+ pwms = <&twl_pwm 0 1922710>;
+ /*
+ * TPS61161 analog dimming window: duty must stay above
+ * ~20-25 % (below that the regulator drops out, LED off)
+ * and the startup waveform must avoid long low intervals
+ * that could trigger EasyScale detection. The enable guard
+ * requests full duty; TWL4030 limits it to about 62/64.
+ * These levels were determined experimentally.
+ */
+ brightness-levels = <
+ 0 24 30 36 42 49 58 68 80 94 110 129 255
+ >;
+ default-brightness-level = <11>;
+ /* TPS61161: cover startup mode-detection window (10 ms) */
+ pwm-enable-guard-period-us = <10000>;
+ };
+
tv: connector {
compatible = "connector-analog-tv";
label = "tv";
@@ -505,6 +524,10 @@ MATRIX_KEY(7, 4, KEY_LEFTBRACE )
>;
};
+&twl_pwm {
+ ti,twl4030-pwm-frame-64;
+};
+
/* backup battery charger */
&charger {
ti,bb-uvolt = <3200000>;
@@ -737,6 +760,8 @@ lcd: lcd@1 {
reset-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>; /* GPIO_157 */
vcc-supply = <&lcd_5v>;
+ backlight = <&backlight>;
+
port {
lcd_in: endpoint {
remote-endpoint = <&dpi_out>;
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 19/20] backlight: Remove legacy Pandora driver
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (17 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 18/20] ARM: dts: omap3pandora: Switch backlight to PWM H. Nikolaus Schaller
@ 2026-11-24 7:25 ` H. Nikolaus Schaller
2026-11-24 7:26 ` [PATCH v2 20/20] ARM: OMAP2+: Remove Pandora platform-data quirks H. Nikolaus Schaller
` (2 subsequent siblings)
21 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
Remove the Pandora-specific backlight platform driver after its
functionality has been replaced by the TWL4030 PWM provider and the
generic pwm-backlight driver described in the device tree.
Remove its Kconfig and Makefile entries and the obsolete
omap2plus_defconfig selection.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Daniel Thompson gave Reviewed-by for the V1 removal of
pandora_bl. V2 additionally removes the stale defconfig option;
the old Reviewed-by is documented here, not carried as a tag.
- Explain replacement by generic pwm-backlight and removal of the defconfig selection.
- Commit-message review assisted by ChatGPT.
arch/arm/configs/omap2plus_defconfig | 1 -
drivers/video/backlight/Kconfig | 7 --
drivers/video/backlight/Makefile | 1 -
drivers/video/backlight/pandora_bl.c | 159 ---------------------------
4 files changed, 168 deletions(-)
delete mode 100644 drivers/video/backlight/pandora_bl.c
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 5791953b75fff..ef5e8d1bf9da1 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -517,7 +517,6 @@ CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_PLATFORM=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_PWM=m
-CONFIG_BACKLIGHT_PANDORA=m
CONFIG_BACKLIGHT_GPIO=m
CONFIG_BACKLIGHT_LED=m
CONFIG_FRAMEBUFFER_CONSOLE=y
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index dbf4ca23a9b6d..040e6cc7e5a29 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -459,13 +459,6 @@ config BACKLIGHT_MP3309C
To compile this driver as a module, choose M here: the module will
be called mp3309c.
-config BACKLIGHT_PANDORA
- tristate "Backlight driver for Pandora console"
- depends on TWL4030_CORE
- help
- If you have a Pandora console, say Y to enable the
- backlight driver.
-
config BACKLIGHT_SKY81452
tristate "Backlight driver for SKY81452"
depends on MFD_SKY81452
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index 34469711c6cd9..c62c920e64b96 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -52,7 +52,6 @@ obj-$(CONFIG_BACKLIGHT_MAX8925) += max8925_bl.o
obj-$(CONFIG_BACKLIGHT_MP3309C) += mp3309c.o
obj-$(CONFIG_BACKLIGHT_MT6370) += mt6370-backlight.o
obj-$(CONFIG_BACKLIGHT_OMAP1) += omap1_bl.o
-obj-$(CONFIG_BACKLIGHT_PANDORA) += pandora_bl.o
obj-$(CONFIG_BACKLIGHT_PWM) += pwm_bl.o
obj-$(CONFIG_BACKLIGHT_QCOM_WLED) += qcom-wled.o
obj-$(CONFIG_BACKLIGHT_RT4831) += rt4831-backlight.o
diff --git a/drivers/video/backlight/pandora_bl.c b/drivers/video/backlight/pandora_bl.c
deleted file mode 100644
index e6889e2ac55e1..0000000000000
--- a/drivers/video/backlight/pandora_bl.c
+++ /dev/null
@@ -1,159 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Backlight driver for Pandora handheld.
- * Pandora uses TWL4030 PWM0 -> TPS61161 combo for control backlight.
- * Based on pwm_bl.c
- *
- * Copyright 2009,2012 Gražvydas Ignotas <notasas@gmail.com>
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/backlight.h>
-#include <linux/mfd/twl.h>
-#include <linux/err.h>
-
-#define TWL_PWM0_ON 0x00
-#define TWL_PWM0_OFF 0x01
-
-#define TWL_INTBR_GPBR1 0x0c
-#define TWL_INTBR_PMBR1 0x0d
-
-#define TWL_PMBR1_PWM0_MUXMASK 0x0c
-#define TWL_PMBR1_PWM0 0x04
-#define PWM0_CLK_ENABLE BIT(0)
-#define PWM0_ENABLE BIT(2)
-
-/* range accepted by hardware */
-#define MIN_VALUE 9
-#define MAX_VALUE 63
-#define MAX_USER_VALUE (MAX_VALUE - MIN_VALUE)
-
-struct pandora_private {
- unsigned old_state;
-#define PANDORABL_WAS_OFF 1
-};
-
-static int pandora_backlight_update_status(struct backlight_device *bl)
-{
- int brightness = bl->props.brightness;
- struct pandora_private *priv = bl_get_data(bl);
- u8 r;
-
- if (bl->props.power != BACKLIGHT_POWER_ON)
- brightness = 0;
- if (bl->props.state & BL_CORE_FBBLANK)
- brightness = 0;
- if (bl->props.state & BL_CORE_SUSPENDED)
- brightness = 0;
-
- if ((unsigned int)brightness > MAX_USER_VALUE)
- brightness = MAX_USER_VALUE;
-
- if (brightness == 0) {
- if (priv->old_state == PANDORABL_WAS_OFF)
- goto done;
-
- /* first disable PWM0 output, then clock */
- twl_i2c_read_u8(TWL4030_MODULE_INTBR, &r, TWL_INTBR_GPBR1);
- r &= ~PWM0_ENABLE;
- twl_i2c_write_u8(TWL4030_MODULE_INTBR, r, TWL_INTBR_GPBR1);
- r &= ~PWM0_CLK_ENABLE;
- twl_i2c_write_u8(TWL4030_MODULE_INTBR, r, TWL_INTBR_GPBR1);
-
- goto done;
- }
-
- if (priv->old_state == PANDORABL_WAS_OFF) {
- /*
- * set PWM duty cycle to max. TPS61161 seems to use this
- * to calibrate it's PWM sensitivity when it starts.
- */
- twl_i2c_write_u8(TWL_MODULE_PWM, MAX_VALUE, TWL_PWM0_OFF);
-
- /* first enable clock, then PWM0 out */
- twl_i2c_read_u8(TWL4030_MODULE_INTBR, &r, TWL_INTBR_GPBR1);
- r &= ~PWM0_ENABLE;
- r |= PWM0_CLK_ENABLE;
- twl_i2c_write_u8(TWL4030_MODULE_INTBR, r, TWL_INTBR_GPBR1);
- r |= PWM0_ENABLE;
- twl_i2c_write_u8(TWL4030_MODULE_INTBR, r, TWL_INTBR_GPBR1);
-
- /*
- * TI made it very easy to enable digital control, so easy that
- * it often triggers unintentionally and disabes PWM control,
- * so wait until 1 wire mode detection window ends.
- */
- usleep_range(2000, 10000);
- }
-
- twl_i2c_write_u8(TWL_MODULE_PWM, MIN_VALUE + brightness, TWL_PWM0_OFF);
-
-done:
- if (brightness != 0)
- priv->old_state = 0;
- else
- priv->old_state = PANDORABL_WAS_OFF;
-
- return 0;
-}
-
-static const struct backlight_ops pandora_backlight_ops = {
- .options = BL_CORE_SUSPENDRESUME,
- .update_status = pandora_backlight_update_status,
-};
-
-static int pandora_backlight_probe(struct platform_device *pdev)
-{
- struct backlight_properties props;
- struct backlight_device *bl;
- struct pandora_private *priv;
- u8 r;
-
- priv = devm_kmalloc_obj(&pdev->dev, *priv);
- if (!priv)
- return -ENOMEM;
-
- memset(&props, 0, sizeof(props));
- props.max_brightness = MAX_USER_VALUE;
- props.type = BACKLIGHT_RAW;
- bl = devm_backlight_device_register(&pdev->dev, pdev->name, &pdev->dev,
- priv, &pandora_backlight_ops, &props);
- if (IS_ERR(bl)) {
- dev_err(&pdev->dev, "failed to register backlight\n");
- return PTR_ERR(bl);
- }
-
- platform_set_drvdata(pdev, bl);
-
- /* 64 cycle period, ON position 0 */
- twl_i2c_write_u8(TWL_MODULE_PWM, 0x80, TWL_PWM0_ON);
-
- priv->old_state = PANDORABL_WAS_OFF;
- bl->props.brightness = MAX_USER_VALUE;
- backlight_update_status(bl);
-
- /* enable PWM function in pin mux */
- twl_i2c_read_u8(TWL4030_MODULE_INTBR, &r, TWL_INTBR_PMBR1);
- r &= ~TWL_PMBR1_PWM0_MUXMASK;
- r |= TWL_PMBR1_PWM0;
- twl_i2c_write_u8(TWL4030_MODULE_INTBR, r, TWL_INTBR_PMBR1);
-
- return 0;
-}
-
-static struct platform_driver pandora_backlight_driver = {
- .driver = {
- .name = "pandora-backlight",
- },
- .probe = pandora_backlight_probe,
-};
-
-module_platform_driver(pandora_backlight_driver);
-
-MODULE_AUTHOR("Gražvydas Ignotas <notasas@gmail.com>");
-MODULE_DESCRIPTION("Pandora Backlight Driver");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:pandora-backlight");
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH v2 20/20] ARM: OMAP2+: Remove Pandora platform-data quirks
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (18 preceding siblings ...)
2026-11-24 7:25 ` [PATCH v2 19/20] backlight: Remove legacy Pandora driver H. Nikolaus Schaller
@ 2026-11-24 7:26 ` H. Nikolaus Schaller
2026-11-24 21:16 ` Andreas Kemnade
2026-11-24 13:38 ` [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks Mark Brown
2026-11-24 15:13 ` Rob Herring
21 siblings, 1 reply; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 7:26 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula
Cc: Jessica Zhang, linux-gpio, devicetree, linux-kernel, dri-devel,
linux-leds, linux-sound, linux-omap, linux-arm-kernel, linux-pwm,
linux-fbdev, letux-kernel, kernel, H. Nikolaus Schaller
The Pandora backlight is now described in the device tree and driven by
pwm-backlight. The sound card also uses device-tree descriptions for its
codec and amplifier GPIOs instead of legacy GPIO lookup tables.
Remove omap3_pandora_legacy_init(), its backlight platform device and
audio GPIO lookup table, and the associated board compatibility entries.
These platform-data quirks are no longer needed.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
Notes:
Changes against V1:
- Andreas Kemnade raised bisectability and intermediate driver
availability concerns for the V1 pdata-quirks removal.
- Correct the legacy backlight name and explain removal of both backlight platform data and audio GPIO lookup tables.
- Commit-message review assisted by ChatGPT.
arch/arm/mach-omap2/pdata-quirks.c | 23 -----------------------
1 file changed, 23 deletions(-)
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index b947bacf23a37..aca7097a692ed 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -268,27 +268,6 @@ static void __init omap3_logicpd_torpedo_init(void)
omap3_gpio126_127_129();
}
-/* omap3pandora legacy devices */
-
-static struct platform_device pandora_backlight = {
- .name = "pandora-backlight",
- .id = -1,
-};
-
-static struct gpiod_lookup_table pandora_soc_audio_gpios = {
- .dev_id = "soc-audio",
- .table = {
- GPIO_LOOKUP("gpio-112-127", 6, "dac", GPIO_ACTIVE_HIGH),
- GPIO_LOOKUP("gpio-0-15", 14, "amp", GPIO_ACTIVE_HIGH),
- { }
- },
-};
-
-static void __init omap3_pandora_legacy_init(void)
-{
- platform_device_register(&pandora_backlight);
- gpiod_add_lookup_table(&pandora_soc_audio_gpios);
-}
#endif /* CONFIG_ARCH_OMAP3 */
#ifdef CONFIG_SOC_DRA7XX
@@ -514,8 +493,6 @@ static struct pdata_init pdata_quirks[] __initdata = {
{ "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
{ "ti,am3517-evm", am3517_evm_legacy_init, },
{ "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
- { "openpandora,omap3-pandora-600mhz", omap3_pandora_legacy_init, },
- { "openpandora,omap3-pandora-1ghz", omap3_pandora_legacy_init, },
#endif
{ /* sentinel */ },
};
--
2.56.0
^ permalink raw reply related [flat|nested] 41+ messages in thread
* Re: [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card
2026-11-24 7:25 ` [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card H. Nikolaus Schaller
@ 2026-11-24 12:04 ` Mark Brown
2026-11-24 13:35 ` Rob Herring (Arm)
` (2 subsequent siblings)
3 siblings, 0 replies; 41+ messages in thread
From: Mark Brown @ 2026-11-24 12:04 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Aaro Koskinen,
Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
[-- Attachment #1: Type: text/plain, Size: 598 bytes --]
On Tue, Nov 24, 2026 at 08:25:46AM +0100, H. Nikolaus Schaller wrote:
> The OpenPandora audio subsystem describes the routing links between the
> OMAP3 McBSP interface, the external PCM1773 DAC, and the TWL4030 audio
> codec, alongside amplifiers and power supplies.
Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 04/20] dt-bindings: sound: pcm1754: Describe PCM1773
2026-11-24 7:25 ` [PATCH v2 04/20] dt-bindings: sound: pcm1754: Describe PCM1773 H. Nikolaus Schaller
@ 2026-11-24 12:05 ` Mark Brown
2026-11-24 14:33 ` [Letux-kernel] " H. Nikolaus Schaller
0 siblings, 1 reply; 41+ messages in thread
From: Mark Brown @ 2026-11-24 12:05 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Aaro Koskinen,
Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
[-- Attachment #1: Type: text/plain, Size: 488 bytes --]
On Tue, Nov 24, 2026 at 08:25:44AM +0100, H. Nikolaus Schaller wrote:
> Extend the PCM1754 device tree binding to describe the related
> PCM1773 stereo DAC.
Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card
2026-11-24 7:25 ` [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card H. Nikolaus Schaller
2026-11-24 12:04 ` Mark Brown
@ 2026-11-24 13:35 ` Rob Herring (Arm)
2026-11-24 14:42 ` H. Nikolaus Schaller
2026-11-24 14:45 ` Krzysztof Kozlowski
2026-11-24 21:43 ` Andreas Kemnade
3 siblings, 1 reply; 41+ messages in thread
From: Rob Herring (Arm) @ 2026-11-24 13:35 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Andreas Kemnade, Mark Brown, Uwe Kleine-König, Tony Lindgren,
Pavel Machek, Maarten Lankhorst, Simona Vetter, Aaro Koskinen,
Conor Dooley, Lee Jones, linux-sound, Takashi Iwai,
Jaroslav Kysela, linux-omap, linux-gpio, Kevin Hilman,
Linus Walleij, linux-kernel, dri-devel, linux-leds, Jessica Zhang,
linux-pwm, Maxime Ripard, linux-arm-kernel, linux-fbdev,
Peter Ujfalusi, Neil Armstrong, Daniel Thompson, Jarkko Nikula,
Roger Quadros, David Airlie, devicetree, Jingoo Han, letux-kernel,
Bartosz Golaszewski, Thomas Zimmermann, Krzysztof Kozlowski,
Liam Girdwood, Russell King, kernel, Helge Deller
On Tue, 24 Nov 2026 08:25:46 +0100, H. Nikolaus Schaller wrote:
> The OpenPandora audio subsystem describes the routing links between the
> OMAP3 McBSP interface, the external PCM1773 DAC, and the TWL4030 audio
> codec, alongside amplifiers and power supplies.
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>
> Notes:
> Changes against V1:
> - Address Krzysztof Kozlowski's V1 request to run the documented
> DT schema checks and fix the errors reported by Rob Herring's
> automated DT validation.
> - Update the binding example and schema during DT consistency review.
> - Binding and commit-message review assisted by ChatGPT.
>
> .../sound/openpandora,omap3pandora-sound.yaml | 95 +++++++++++++++++++
> 1 file changed, 95 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,apq8016-sbc-sndcard): primary-dai-link:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,apq8016-sbc-sndcard): quaternary-dai-link:cpu:sound-dai: [[4294967295],[3]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,apq8016-sbc-sndcard): tertiary-dai-link:cpu:sound-dai: [[4294967295],[2]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,msm8916-qdsp6-sndcard): mm1-dai-link:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,msm8916-qdsp6-sndcard): primary-dai-link:cpu:sound-dai: [[4294967295],[16]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
Documentation/devicetree/bindings/sound/samsung,snow.example.dtb: sound (google,snow-audio-max98095): codec:sound-dai: [[4294967295],[0],[4294967295]] has more than 2 items
from schema $id: http://devicetree.org/schemas/sound/samsung,snow.yaml
Documentation/devicetree/bindings/sound/samsung,snow.example.dtb: sound (google,snow-audio-max98095): cpu:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/samsung,snow.yaml
Documentation/devicetree/bindings/sound/fsl,qmc-audio.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@0:cpu:sound-dai: [[1],[16]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/fsl,qmc-audio.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu:sound-dai: [[1],[17]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/fsl,qmc-audio.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@2:cpu:sound-dai: [[1],[18]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/mediatek,mt8173-rt5650.example.dtb: sound (mediatek,mt8173-rt5650): codec-capture:sound-dai: [[4294967295],[1]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/mediatek,mt8173-rt5650.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,cpu:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,cpu@0:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,cpu@1:sound-dai: [[4294967295],[1]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@0:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:codec:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu-0:sound-dai: [[4294967295],[1]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu-1:sound-dai: [[4294967295],[2]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu-2:sound-dai: [[4294967295],[3]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu-3:sound-dai: [[4294967295],[4]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@2:codec:sound-dai: [[4294967295],[1]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@2:cpu:sound-dai: [[4294967295],[5]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): hdmi-dai-link:cpu:sound-dai: [[4294967295],[20]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): mm1-dai-link:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): mm2-dai-link:cpu:sound-dai: [[4294967295],[1]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): mm3-dai-link:cpu:sound-dai: [[4294967295],[2]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): usb-dai-link:cpu:sound-dai: [[4294967295],[136]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): va-dai-link:cpu:sound-dai: [[4294967295],[110]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): wsa-dai-link:cpu:sound-dai: [[4294967295],[105]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
Documentation/devicetree/bindings/sound/google,sc7180-trogdor.example.dtb: sound (google,sc7180-trogdor): dai-link@0:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/google,sc7180-trogdor.yaml
Documentation/devicetree/bindings/sound/google,sc7180-trogdor.example.dtb: sound (google,sc7180-trogdor): dai-link@1:cpu:sound-dai: [[4294967295],[1]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/google,sc7180-trogdor.yaml
Documentation/devicetree/bindings/sound/google,sc7180-trogdor.example.dtb: sound (google,sc7180-trogdor): dai-link@2:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
from schema $id: http://devicetree.org/schemas/sound/google,sc7180-trogdor.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/5c6f7deca16f70f1f19cb40c57d70e30068d6000.1795505160.git.hns@goldelico.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (19 preceding siblings ...)
2026-11-24 7:26 ` [PATCH v2 20/20] ARM: OMAP2+: Remove Pandora platform-data quirks H. Nikolaus Schaller
@ 2026-11-24 13:38 ` Mark Brown
2026-11-24 14:52 ` H. Nikolaus Schaller
2026-11-24 15:13 ` Rob Herring
21 siblings, 1 reply; 41+ messages in thread
From: Mark Brown @ 2026-11-24 13:38 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Aaro Koskinen,
Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
On Tue, Nov 24, 2026 at 08:25:40AM +0100, H. Nikolaus Schaller wrote:
> PATCH V2 2026-11-24 08:26:00:
> Changes in V2:
> The series has been reworked and expanded from 16 to 20 patches,
> addressing review feedback and issues identified during hardware testing.
> Audio and power management:
> ===========================
> PWM and backlight:
> ==================
> Device Tree and general cleanup:
> ================================
This is dealing with several tangentially related topics over multiple
subsystems in a single series, this makes it a lot less digestable and
results in a huge series with an extremely large CC list and murky merge
strategy. Please split things out into separate serieses, even within
the various subsystems there are batches of independent work which
really do not need to be in the same series.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Letux-kernel] [PATCH v2 04/20] dt-bindings: sound: pcm1754: Describe PCM1773
2026-11-24 12:05 ` Mark Brown
@ 2026-11-24 14:33 ` H. Nikolaus Schaller
0 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 14:33 UTC (permalink / raw)
To: Mark Brown
Cc: linux-fbdev, Lee Jones, linux-pwm, Tony Lindgren, Linus Walleij,
dri-devel, Jaroslav Kysela, Uwe Kleine-König, David Airlie,
linux-leds, Simona Vetter, Rob Herring, Aaro Koskinen,
Kevin Hilman, Helge Deller, Bartosz Golaszewski, Russell King,
Peter Ujfalusi, Daniel Thompson, devicetree, Conor Dooley,
Pavel Machek, Maarten Lankhorst, Maxime Ripard, Roger Quadros,
linux-gpio, linux-sound, Takashi Iwai, linux-omap,
linux-arm-kernel, Neil Armstrong, Jingoo Han, Liam Girdwood,
linux-kernel, Thomas Zimmermann, kernel, Krzysztof Kozlowski,
Jarkko Nikula, Jessica Zhang
Hi Mark,
> Am 24.11.2026 um 13:05 schrieb Mark Brown <broonie@kernel.org>:
>
> On Tue, Nov 24, 2026 at 08:25:44AM +0100, H. Nikolaus Schaller wrote:
>> Extend the PCM1754 device tree binding to describe the related
>> PCM1773 stereo DAC.
>
> Please submit patches using subject lines reflecting the style for the
> subsystem, this makes it easier for people to identify relevant patches.
> Look at what existing commits in the area you're changing are doing and
> make sure your subject lines visually resemble what they're doing.
> There's no need to resubmit to fix this alone.
Agreed. Should become
ASoC: dt-bindings: ti,pcm1754:
Unfortunately there is no tool to find this (neither checkpatch, Sashiko-Bot,
nor ChatGPT did report it before submission and I didn't think of checking
again).
BR and thanks,
Nikolaus
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM
2026-11-24 7:25 ` [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM H. Nikolaus Schaller
@ 2026-11-24 14:40 ` Krzysztof Kozlowski
2026-11-24 14:49 ` H. Nikolaus Schaller
0 siblings, 1 reply; 41+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-24 14:40 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
On Tue, Nov 24, 2026 at 08:25:48AM +0100, H. Nikolaus Schaller wrote:
> Document the optional ti,twl4030-pwm-frame-64 property for the
> TWL4030 PWM controller. It selects the 64-clock-cycle frame instead
> of the default 128-cycle frame, doubling the output frequency and
> reducing duty-cycle resolution.
>
> The selection is explicit because the driver does not know the PWM
> input clock rate and cannot derive the hardware frame length from a
> consumer-requested period. The shorter frame can reduce PWM LOW
> intervals during startup mode detection of LED drivers such as the
> TI TPS61160/61.
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>
> Notes:
> Changes against V1:
> - Revised commit message to focus on the binding and the reason
> for explicit 64-cycle frame selection.
> - Commit-message review assisted by ChatGPT.
>
> Documentation/devicetree/bindings/mfd/ti,twl.yaml | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
> index 9cc3e4721612e..f458f0d80f2cd 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
> @@ -396,6 +396,15 @@ properties:
> '#pwm-cells':
> const: 2
>
> + ti,twl4030-pwm-frame-64:
Drop twl4030. Properties are not model specific, but should be re-usable
among all of devices from that vendor (when applicable).
> + type: boolean
> + description:
> + TWL4030 only; not supported by TWL6030 PWM.
Don't repeat constraints in free form text. Implement proper dt-schema
for this.
> + Select the short 64-clock-cycle PWM frame instead of the
> + default 128-cycle frame, doubling the PWM frequency. Required
> + for dimming inputs requiring short PWM low intervals during
> + startup mode detection (e.g. TI TPS61160/61).
I don't get how TPS is related here, but if you mention other specific
device then I wonder - why isn't this deducible from the compatible? Or
you mean that PWM consumers might need it, depending on the consumer?
But isn't this then dynamic choice - depending on PWM frequency the
consumer wants?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card
2026-11-24 13:35 ` Rob Herring (Arm)
@ 2026-11-24 14:42 ` H. Nikolaus Schaller
0 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 14:42 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: Andreas Kemnade, Mark Brown, Uwe Kleine-König, Tony Lindgren,
Pavel Machek, Maarten Lankhorst, Simona Vetter, Aaro Koskinen,
Conor Dooley, Lee Jones, linux-sound, Takashi Iwai,
Jaroslav Kysela, linux-omap, linux-gpio, Kevin Hilman,
Linus Walleij, linux-kernel, dri-devel, linux-leds, Jessica Zhang,
linux-pwm, Maxime Ripard, linux-arm-kernel, linux-fbdev,
Peter Ujfalusi, Neil Armstrong, Daniel Thompson, Jarkko Nikula,
Roger Quadros, David Airlie, devicetree, Jingoo Han, letux-kernel,
Bartosz Golaszewski, Thomas Zimmermann, Krzysztof Kozlowski,
Liam Girdwood, Russell King, kernel, Helge Deller
Hi Rob,
> Am 24.11.2026 um 14:35 schrieb Rob Herring (Arm) <robh@kernel.org>:
>
>
> On Tue, 24 Nov 2026 08:25:46 +0100, H. Nikolaus Schaller wrote:
>> The OpenPandora audio subsystem describes the routing links between the
>> OMAP3 McBSP interface, the external PCM1773 DAC, and the TWL4030 audio
>> codec, alongside amplifiers and power supplies.
>>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>>
>> Notes:
>> Changes against V1:
>> - Address Krzysztof Kozlowski's V1 request to run the documented
>> DT schema checks and fix the errors reported by Rob Herring's
>> automated DT validation.
>> - Update the binding example and schema during DT consistency review.
>> - Binding and commit-message review assisted by ChatGPT.
>>
>> .../sound/openpandora,omap3pandora-sound.yaml | 95 +++++++++++++++++++
>> 1 file changed, 95 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml
>>
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,apq8016-sbc-sndcard): primary-dai-link:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
> Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,apq8016-sbc-sndcard): quaternary-dai-link:cpu:sound-dai: [[4294967295],[3]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
> Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,apq8016-sbc-sndcard): tertiary-dai-link:cpu:sound-dai: [[4294967295],[2]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
> Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,msm8916-qdsp6-sndcard): mm1-dai-link:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
> Documentation/devicetree/bindings/sound/qcom,apq8016-sbc-sndcard.example.dtb: sound@7702000 (qcom,msm8916-qdsp6-sndcard): primary-dai-link:cpu:sound-dai: [[4294967295],[16]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml
> Documentation/devicetree/bindings/sound/samsung,snow.example.dtb: sound (google,snow-audio-max98095): codec:sound-dai: [[4294967295],[0],[4294967295]] has more than 2 items
> from schema $id: http://devicetree.org/schemas/sound/samsung,snow.yaml
> Documentation/devicetree/bindings/sound/samsung,snow.example.dtb: sound (google,snow-audio-max98095): cpu:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/samsung,snow.yaml
> Documentation/devicetree/bindings/sound/fsl,qmc-audio.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@0:cpu:sound-dai: [[1],[16]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/fsl,qmc-audio.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu:sound-dai: [[1],[17]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/fsl,qmc-audio.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@2:cpu:sound-dai: [[1],[18]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/mediatek,mt8173-rt5650.example.dtb: sound (mediatek,mt8173-rt5650): codec-capture:sound-dai: [[4294967295],[1]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/mediatek,mt8173-rt5650.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,cpu:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,cpu@0:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,cpu@1:sound-dai: [[4294967295],[1]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@0:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:codec:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu-0:sound-dai: [[4294967295],[1]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu-1:sound-dai: [[4294967295],[2]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu-2:sound-dai: [[4294967295],[3]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@1:cpu-3:sound-dai: [[4294967295],[4]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@2:codec:sound-dai: [[4294967295],[1]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/simple-card.example.dtb: sound (simple-audio-card): simple-audio-card,dai-link@2:cpu:sound-dai: [[4294967295],[5]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/simple-card.yaml
> Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): hdmi-dai-link:cpu:sound-dai: [[4294967295],[20]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
> Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): mm1-dai-link:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
> Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): mm2-dai-link:cpu:sound-dai: [[4294967295],[1]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
> Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): mm3-dai-link:cpu:sound-dai: [[4294967295],[2]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
> Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): usb-dai-link:cpu:sound-dai: [[4294967295],[136]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
> Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): va-dai-link:cpu:sound-dai: [[4294967295],[110]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
> Documentation/devicetree/bindings/sound/qcom,sm8250.example.dtb: sound (qcom,qrb5165-rb5-sndcard): wsa-dai-link:cpu:sound-dai: [[4294967295],[105]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml
> Documentation/devicetree/bindings/sound/google,sc7180-trogdor.example.dtb: sound (google,sc7180-trogdor): dai-link@0:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/google,sc7180-trogdor.yaml
> Documentation/devicetree/bindings/sound/google,sc7180-trogdor.example.dtb: sound (google,sc7180-trogdor): dai-link@1:cpu:sound-dai: [[4294967295],[1]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/google,sc7180-trogdor.yaml
> Documentation/devicetree/bindings/sound/google,sc7180-trogdor.example.dtb: sound (google,sc7180-trogdor): dai-link@2:cpu:sound-dai: [[4294967295],[0]] has more than 1 item
> from schema $id: http://devicetree.org/schemas/sound/google,sc7180-trogdor.yaml
>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.kernel.org/project/devicetree/patch/5c6f7deca16f70f1f19cb40c57d70e30068d6000.1795505160.git.hns@goldelico.com
>
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
>
> pip3 install dtschema --upgrade
>
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
To no unset the file list was the mistake and why I haven't seen these reports.
BR and thanks,
Nikolaus
>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card
2026-11-24 7:25 ` [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card H. Nikolaus Schaller
2026-11-24 12:04 ` Mark Brown
2026-11-24 13:35 ` Rob Herring (Arm)
@ 2026-11-24 14:45 ` Krzysztof Kozlowski
2026-11-24 14:50 ` H. Nikolaus Schaller
2026-11-24 21:43 ` Andreas Kemnade
3 siblings, 1 reply; 41+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-24 14:45 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
On Tue, Nov 24, 2026 at 08:25:46AM +0100, H. Nikolaus Schaller wrote:
> +description:
> + The OpenPandora audio subsystem describes the routing links between the
> + OMAP3 McBSP interface, the external PCM1773 DAC, and the TWL4030 audio codec,
> + alongside amplifiers and power supplies.
> +
> +properties:
> + compatible:
> + const: openpandora,omap3pandora-sound
openpandora,omap3-pandora-sound
(add hyphen) to match other style?
> +
> + label:
> + $ref: /schemas/types.yaml#/definitions/string
> + description: User-visible name for this sound card.
> +
> + amp-gpios:
> + maxItems: 1
> + description: GPIO pin controlling the amplifier power state.
> +
> + amp-supply:
> + description: Regulator supplying power to the amplifier.
> +
> + sound-dai:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + minItems: 2
> + maxItems: 2
> + description:
> + Phandles to the audio CPU DAI (OMAP3 McBSP) and the codec DAI.
> +
> + routing:
> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> + description:
> + A list of the connections between audio components.
> + Each entry is a pair of strings, the first being the connection's sink,
> + the second being the connection's source.
> +
> + widgets:
> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> + description:
> + User-specified audio sound widgets.
> + Each entry is a pair of strings, the first being the widget type
> + (e.g., "Speaker", "Headphone", "Microphone", "Line") and the second being its name.
> +
> +required:
> + - compatible
> + - sound-dai
> +
allOf with $ref to sound-card-common.yaml and you can drop routing property.
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + sound {
> + compatible = "openpandora,omap3pandora-sound";
> + status = "okay";
Drop
> +
> + label = "OpenPandora";
> +
> + amp-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
> + amp-supply = <&aux_5v>;
> +
> + widgets =
> + "Line", "Line Out",
Join these two lines
> + "Line", "Line In",
> + "Headphone", "Headphone Jack",
> + "Microphone", "Mic (internal)",
> + "Microphone", "Mic (external)";
> +
> + routing =
> + "DAC1", "APLL Enable",
As well
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 07/20] ASoC: ti: omap3pandora: Convert sound card to DT
2026-11-24 7:25 ` [PATCH v2 07/20] ASoC: ti: omap3pandora: Convert sound card to DT H. Nikolaus Schaller
@ 2026-11-24 14:48 ` Mark Brown
2026-11-24 14:55 ` H. Nikolaus Schaller
0 siblings, 1 reply; 41+ messages in thread
From: Mark Brown @ 2026-11-24 14:48 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel, Stefan Leichter, Grond
> Convert the OpenPandora ASoC machine driver to bind through a Device
> Tree sound-card node instead of creating a platform device from board-
> specific setup code. Describe the CPU and codec DAIs and audio routes
> through DT, including the external PCM1773 playback DAC.
> + DAILINK_COMP_ARRAY(COMP_CODEC("pcm1773-codec", "pcm1773")),
You've added the external CODEC but not updated the Kconfig dependencies
for that.
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 05/20] ASoC: codecs: pcm1754: Add PCM1773 support
2026-11-24 7:25 ` [PATCH v2 05/20] ASoC: codecs: pcm1754: Add PCM1773 support H. Nikolaus Schaller
@ 2026-11-24 14:48 ` Mark Brown
0 siblings, 0 replies; 41+ messages in thread
From: Mark Brown @ 2026-11-24 14:48 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel, Grond
> Extend the PCM1754 codec driver to support the related PCM1773 DAC.
> Select the DAI name, supported formats and sample rate limits per
> variant. Handle the different FMT pin polarity and an optional format
> GPIO, avoiding GPIO writes when the format pin is not controlled by the
> driver. Add an optional enable GPIO for the PCM1773 power-down input,
> controlled by a DAPM supply event to enable the DAC after power-up and
> disable it before power-down.
> + case SND_SOC_DAIFMT_LEFT_J:
> + if (priv->variant != &pcm1773_variant ||
> + (params_width(params) != 16 && params_width(params) != 24))
> + return -EINVAL;
> + format = 0;
> break;
If you've got a struct describing the variant it is obviously not
tasteful to open code a check based on the address of the variant struct
rather than looking at something inside the description of the variant.
--
Mark Brown <broonie@kernel.org>
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM
2026-11-24 14:40 ` Krzysztof Kozlowski
@ 2026-11-24 14:49 ` H. Nikolaus Schaller
0 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 14:49 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
Tony Lindgren, Russell King, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
Hi Krzysztof,
> Am 24.11.2026 um 15:40 schrieb Krzysztof Kozlowski <krzk@kernel.org>:
>
> On Tue, Nov 24, 2026 at 08:25:48AM +0100, H. Nikolaus Schaller wrote:
>> Document the optional ti,twl4030-pwm-frame-64 property for the
>> TWL4030 PWM controller. It selects the 64-clock-cycle frame instead
>> of the default 128-cycle frame, doubling the output frequency and
>> reducing duty-cycle resolution.
>>
>> The selection is explicit because the driver does not know the PWM
>> input clock rate and cannot derive the hardware frame length from a
>> consumer-requested period. The shorter frame can reduce PWM LOW
>> intervals during startup mode detection of LED drivers such as the
>> TI TPS61160/61.
>>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
>> ---
>>
>> Notes:
>> Changes against V1:
>> - Revised commit message to focus on the binding and the reason
>> for explicit 64-cycle frame selection.
>> - Commit-message review assisted by ChatGPT.
>>
>> Documentation/devicetree/bindings/mfd/ti,twl.yaml | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
>> index 9cc3e4721612e..f458f0d80f2cd 100644
>> --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
>> @@ -396,6 +396,15 @@ properties:
>> '#pwm-cells':
>> const: 2
>>
>> + ti,twl4030-pwm-frame-64:
>
> Drop twl4030. Properties are not model specific, but should be re-usable
> among all of devices from that vendor (when applicable).
Ok.
>
>> + type: boolean
>> + description:
>> + TWL4030 only; not supported by TWL6030 PWM.
>
> Don't repeat constraints in free form text. Implement proper dt-schema
> for this.
Ok.
>
>> + Select the short 64-clock-cycle PWM frame instead of the
>> + default 128-cycle frame, doubling the PWM frequency. Required
>> + for dimming inputs requiring short PWM low intervals during
>> + startup mode detection (e.g. TI TPS61160/61).
>
> I don't get how TPS is related here, but if you mention other specific
> device then I wonder - why isn't this deducible from the compatible? Or
> you mean that PWM consumers might need it, depending on the consumer?
The TPS61160 is an LED boost driver used for the panel backlight of
the OpenPandora.
Besides being capable of PWM for the backlight intensity the TPS also
can undestand some 1-wire data protocol. It switches to that mode if
the common PWM/1-wire input follows a specific timing sequence.
Since we can't reprogram the PWM output connected in the OpenPandora
to speak this protocol, we have to make sure that the TPS chip never
enters this mode accidentially.
This feature is part of it.
And since the TPS is not described in the device tree and can not have
its own driver (because there is PWM and not the protocol) there is no
compatible to base this on.
Yes, I agree in combination with the comments from Mark that we should
split the series and better describe this background.
>
> But isn't this then dynamic choice - depending on PWM frequency the
> consumer wants?
>
> Best regards,
> Krzysztof
I'll collect feedbacks over some days and come up with multiple
series as suggested by Mark.
BR and thanks,
Nikolaus
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card
2026-11-24 14:45 ` Krzysztof Kozlowski
@ 2026-11-24 14:50 ` H. Nikolaus Schaller
0 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 14:50 UTC (permalink / raw)
To: Discussions about the Letux Kernel
Cc: linux-fbdev, Lee Jones, linux-pwm, Tony Lindgren, Linus Walleij,
dri-devel, Jaroslav Kysela, Uwe Kleine-König, David Airlie,
linux-leds, Simona Vetter, Rob Herring, Aaro Koskinen,
Kevin Hilman, Helge Deller, Bartosz Golaszewski, Russell King,
Peter Ujfalusi, Daniel Thompson, devicetree, Conor Dooley,
Pavel Machek, Maarten Lankhorst, Maxime Ripard, Roger Quadros,
linux-gpio, Mark Brown, linux-sound, Takashi Iwai, linux-omap,
linux-arm-kernel, Neil Armstrong, Jingoo Han, Liam Girdwood,
linux-kernel, Thomas Zimmermann, kernel, Krzysztof Kozlowski,
Jarkko Nikula, Jessica Zhang
Hi Krzysztof,
> Am 24.11.2026 um 15:45 schrieb Krzysztof Kozlowski <krzk@kernel.org>:
>
> On Tue, Nov 24, 2026 at 08:25:46AM +0100, H. Nikolaus Schaller wrote:
>> +description:
>> + The OpenPandora audio subsystem describes the routing links between the
>> + OMAP3 McBSP interface, the external PCM1773 DAC, and the TWL4030 audio codec,
>> + alongside amplifiers and power supplies.
>> +
>> +properties:
>> + compatible:
>> + const: openpandora,omap3pandora-sound
>
> openpandora,omap3-pandora-sound
>
> (add hyphen) to match other style?
Yes, that is a good idea.
>
>> +
>> + label:
>> + $ref: /schemas/types.yaml#/definitions/string
>> + description: User-visible name for this sound card.
>> +
>> + amp-gpios:
>> + maxItems: 1
>> + description: GPIO pin controlling the amplifier power state.
>> +
>> + amp-supply:
>> + description: Regulator supplying power to the amplifier.
>> +
>> + sound-dai:
>> + $ref: /schemas/types.yaml#/definitions/phandle-array
>> + minItems: 2
>> + maxItems: 2
>> + description:
>> + Phandles to the audio CPU DAI (OMAP3 McBSP) and the codec DAI.
>> +
>> + routing:
>> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
>> + description:
>> + A list of the connections between audio components.
>> + Each entry is a pair of strings, the first being the connection's sink,
>> + the second being the connection's source.
>> +
>> + widgets:
>> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
>> + description:
>> + User-specified audio sound widgets.
>> + Each entry is a pair of strings, the first being the widget type
>> + (e.g., "Speaker", "Headphone", "Microphone", "Line") and the second being its name.
>> +
>> +required:
>> + - compatible
>> + - sound-dai
>> +
>
> allOf with $ref to sound-card-common.yaml and you can drop routing property.
Ok.
>
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/gpio/gpio.h>
>> +
>> + sound {
>> + compatible = "openpandora,omap3pandora-sound";
>> + status = "okay";
>
> Drop
Ok.
>
>> +
>> + label = "OpenPandora";
>> +
>> + amp-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
>> + amp-supply = <&aux_5v>;
>> +
>> + widgets =
>> + "Line", "Line Out",
>
> Join these two lines
Ok, increases readability.
>
>> + "Line", "Line In",
>> + "Headphone", "Headphone Jack",
>> + "Microphone", "Mic (internal)",
>> + "Microphone", "Mic (external)";
>> +
>> + routing =
>> + "DAC1", "APLL Enable",
>
> As well
>
>
> Best regards,
> Krzysztof
BR and thanks,
Nikolaus
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks
2026-11-24 13:38 ` [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks Mark Brown
@ 2026-11-24 14:52 ` H. Nikolaus Schaller
0 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 14:52 UTC (permalink / raw)
To: Mark Brown
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Aaro Koskinen,
Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
Hi Mark,
> Am 24.11.2026 um 14:38 schrieb Mark Brown <broonie@kernel.org>:
>
> On Tue, Nov 24, 2026 at 08:25:40AM +0100, H. Nikolaus Schaller wrote:
>> PATCH V2 2026-11-24 08:26:00:
>> Changes in V2:
>> The series has been reworked and expanded from 16 to 20 patches,
>> addressing review feedback and issues identified during hardware testing.
>
>> Audio and power management:
>> ===========================
>
>> PWM and backlight:
>> ==================
>
>> Device Tree and general cleanup:
>> ================================
>
> This is dealing with several tangentially related topics over multiple
> subsystems in a single series, this makes it a lot less digestable and
> results in a huge series with an extremely large CC list and murky merge
> strategy. Please split things out into separate serieses, even within
> the various subsystems there are batches of independent work which
> really do not need to be in the same series.
Well, they touch exactly one device, the OpenPandora which is the common
factor.
They are connected through partially common power management and the total
goal is to finally get rid of the ugly and old style pdata-quirks which has
been requested for many years but never achieved.
Another goal is to keep bisectability. Therefore a sequence that can be
merged independently is quite tricky and may reqire to stretch over several
merge windows but seems to be possible (at least ChatGPT pretends to have an idea).
I'll wait for more feedbacks and then prepare multiple series (may become
5 or 6) referring to this one.
BR and thanks,
Nikolaus
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 07/20] ASoC: ti: omap3pandora: Convert sound card to DT
2026-11-24 14:48 ` Mark Brown
@ 2026-11-24 14:55 ` H. Nikolaus Schaller
0 siblings, 0 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 14:55 UTC (permalink / raw)
To: Mark Brown
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Aaro Koskinen,
Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel, Stefan Leichter, Grond
> Am 24.11.2026 um 15:48 schrieb Mark Brown <broonie@kernel.org>:
>
>> Convert the OpenPandora ASoC machine driver to bind through a Device
>> Tree sound-card node instead of creating a platform device from board-
>> specific setup code. Describe the CPU and codec DAIs and audio routes
>> through DT, including the external PCM1773 playback DAC.
>
>> + DAILINK_COMP_ARRAY(COMP_CODEC("pcm1773-codec", "pcm1773")),
>
> You've added the external CODEC but not updated the Kconfig dependencies
> for that.
Yes, I remember it was discussed but slipped through.
BR and thanks,
Nikolaus
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
` (20 preceding siblings ...)
2026-11-24 13:38 ` [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks Mark Brown
@ 2026-11-24 15:13 ` Rob Herring
2026-11-24 15:27 ` H. Nikolaus Schaller
21 siblings, 1 reply; 41+ messages in thread
From: Rob Herring @ 2026-11-24 15:13 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Daniel Thompson, Jingoo Han,
Pavel Machek, Liam Girdwood, Mark Brown, Aaro Koskinen,
Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
On Tue, Nov 24, 2026 at 08:25:40AM +0100, H. Nikolaus Schaller wrote:
> PATCH V2 2026-11-24 08:26:00:
> Changes in V2:
> The series has been reworked and expanded from 16 to 20 patches,
> addressing review feedback and issues identified during hardware testing.
>
> Audio and power management:
> ===========================
> * Replace the TWL4030 REGEN regulator implementation with an optional
> GPIO and a fixed regulator described in Device Tree.
> * Extend the existing PCM1754 codec driver to support the PCM1773
> instead of introducing a separate codec driver.
> * Add power supply and power-down GPIO support to the codec driver.
> * Improve error handling, resource management and power sequencing
> in the codec and sound card drivers.
> * Update the sound card and codec bindings and Device Tree nodes.
>
> PWM and backlight:
> ==================
> * Add optional 64-cycle frame support to the TWL4030 PWM driver.
> * Add an optional enable guard period to the generic pwm-backlight
> driver to prevent the TPS61161 from inadvertently entering
> EasyScale mode.
> * Adjust the Pandora PWM backlight configuration accordingly.
> * Remove the obsolete CONFIG_BACKLIGHT_PANDORA option from
> omap2plus_defconfig.
>
> Device Tree and general cleanup:
> ================================
> * Correct and validate the affected Device Tree bindings.
> * Reorder the series so that bindings and supporting drivers
> precede their Device Tree users.
> * Improve commit messages and fix coding style issues.
> * Clarify the original authorship and take responsibility for
> contributions previously signed off under a pseudonym.
>
> Review feedback addressed:
> ==========================
> * Mark Brown suggested representing TWL4030 REGEN as a GPIO rather
> than a regulator and reviewed the original standalone PCM1773
> driver, which has been replaced by extending the PCM1754 driver.
> * Krzysztof Kozlowski requested corrections to the Device Tree
> bindings, proper schema validation, improved commit messages and
> clarification of the original contributor's authorship.
> * Andreas Kemnade suggested handling the TPS61161 initialization
> in the backlight layer. V2 implements this through a generic
> pwm-backlight enable guard period. His comments on clock modeling
> and patch bisectability were also considered.
> * Daniel Thompson provided Reviewed-by for the original removal
> of the Pandora backlight driver.
> * Issues identified by Sashiko and Rob Herring's automated DT
> validation were reviewed and addressed as applicable.
>
> Many thanks to everyone who reviewed V1.
>
> Validation and testing:
> =======================
> * Based on Linux v7.4-rc4.
> * All 20 patches checked with checkpatch.pl.
> * Remaining checkpatch warnings and intentional deviations have
> been reviewed. In particular, ENOTSUPP must be retained in the
> GPIO set_config callback because gpiolib handles it differently
> from EOPNOTSUPP.
> * dt_binding_check and dtbs_check passed for all five affected
> Device Tree bindings.
> * The complete series has been successfully built and tested on
> real OpenPandora hardware.
> * LCD operation, PWM backlight brightness control including
> brightness zero and power-down, and audio playback through the
> internal speakers and headset have been verified.
> * Audio capture was not tested.
>
> PATCH V1 2026-07-11 08:02:02:
> This series modernizes the OpenPandora handheld support by converting the
> sound subsystem and backlight control to proper platform drivers and Device
> Tree definitions.
>
> The primary goal is the complete removal of omap3_pandora_legacy_init()
> and the elimination of the last remaining user of machine_is_omap3_pandora().
>
> History and Context
> ===================
> The necessity of this cleanup was highlighted in several recent discussions:
>
> 1. Tony Lindgren noted that machine_is_omap3_pandora() checks never succeed
> on Device Tree-booted machines, leaving the audio subsystem functionally
> broken since the DT conversion years ago:
> https://marc.info/?l=alsa-devel&m=165632351319716&w=2
>
> 2. Ethan Nelson-Moore submitted a patch to replace the macro with DT
> compatibility checks (accepted as commit 45efb8fbdae3 in v7.2-rc1):
> https://marc.info/?l=linux-omap&m=177841578110704&w=2
>
> 3. Sascha Hauer pointed out that the entire omap3pandora driver fundamentally
> depended on this broken machine ID check:
> https://marc.info/?l=linux-omap&m=178048982272252&w=2
>
> Design Choices and Implementation
> =================================
> Based on these discussions and a long-standing and working out-of-tree solution,
> we initially attempted a migration to generic frameworks like simple-audio-card
> or audio-graph-card. However, the hardware routing peculiarities of the
> OpenPandora introduced too many functional gaps. Replacing omap3pandora.c
> entirely with pure DT definitions proved unfeasible.
>
> Therefore, we opted to base a new proposal on the out-of-tree rewrite of
> the old-style sound board file kernel driver (sound/soc/ti/omap3pandora.c)
> into a proper platform driver that cleanly fetches its resources from the
> Device Tree, while adding specific handling for the twl4030-regen output
> and adapting the pandora device tree files.
>
> Series Structure
> ================
> * Patches 01–06 (Preparation): Move highly specific legacy code to its proper
> infrastructure (TWL4030 regulator regeneration and codec handling).
> * Patch 07-08 (New Driver): Introduce a dedicated platform driver for the
> PCM1773 audio DAC.
> * Patches 09-14 (Audio Core): Rewrite the omap3pandora ASoC fabric driver
> and update the respective Device Tree nodes.
> * Patches 14–15 (Backlight): Remove the custom, legacy Pandora backlight driver,
> convert it to generic Device Tree nodes
> * Patch 16: (Cleanup) safely delete the obsolete omap3_pandora_legacy_init().
>
> Notes & Testing
> ===============
> * Testing: This series has been tested on real OpenPandora hardware.
>
> Credits
> =======
> This work is a collaborative effort by multiple authors over several years:
> * Grond <grond66@riseup.net>
> * Stefan Leichter <sle85276@gmx.de>
> * H. Nikolaus Schaller <hns@goldelico.com>
>
>
> H. Nikolaus Schaller (17):
> dt-bindings: gpio: twl4030: Document REGEN GPIO
> gpio: twl4030: Support REGEN GPIO
> ASoC: twl4030: Allow APLL rate selection through set_sysclk()
> dt-bindings: sound: pcm1754: Describe PCM1773
> ASoC: codecs: pcm1754: Add PCM1773 support
> dt-bindings: sound: Document OpenPandora sound card
> dt-bindings: mfd: twl4030: Document 64-cycle PWM
> pwm: twl: Support 64-cycle PWM frame
> dt-bindings: backlight: pwm: Document enable guard
> backlight: pwm: Support enable guard period
> drm/panel: td043mtea1: Attach DT backlight
> ARM: dts: omap3pandora: Disable unused DMA channels
> ARM: dts: omap3-pandora: Model LCD power enable dependencies
> ARM: dts: omap3pandora: Describe PCM1773
> ARM: dts: omap3pandora: Switch backlight to PWM
> backlight: Remove legacy Pandora driver
> ARM: OMAP2+: Remove Pandora platform-data quirks
>
> Stefan Leichter (3):
> ASoC: ti: omap3pandora: Convert sound card to DT
> ARM: dts: omap3pandora: Enable audio interfaces
> ARM: dts: omap3pandora: Describe sound card
Which of the 7 maintainers do you expect to take this series? Surely
this can be broken up into smaller series?
Rob
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks
2026-11-24 15:13 ` Rob Herring
@ 2026-11-24 15:27 ` H. Nikolaus Schaller
2026-11-24 16:52 ` Mark Brown
2026-11-24 22:41 ` Andreas Kemnade
0 siblings, 2 replies; 41+ messages in thread
From: H. Nikolaus Schaller @ 2026-11-24 15:27 UTC (permalink / raw)
To: Rob Herring
Cc: Linus Walleij, Bartosz Golaszewski, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Daniel Thompson, Jingoo Han,
Pavel Machek, Liam Girdwood, Mark Brown, Aaro Koskinen,
Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
> Am 24.11.2026 um 16:13 schrieb Rob Herring <robh@kernel.org>:
>
> On Tue, Nov 24, 2026 at 08:25:40AM +0100, H. Nikolaus Schaller wrote:
>> PATCH V2 2026-11-24 08:26:00:
>> Changes in V2:
>> The series has been reworked and expanded from 16 to 20 patches,
>> addressing review feedback and issues identified during hardware testing.
>>
>> Audio and power management:
>> ===========================
>> * Replace the TWL4030 REGEN regulator implementation with an optional
>> GPIO and a fixed regulator described in Device Tree.
>> * Extend the existing PCM1754 codec driver to support the PCM1773
>> instead of introducing a separate codec driver.
>> * Add power supply and power-down GPIO support to the codec driver.
>> * Improve error handling, resource management and power sequencing
>> in the codec and sound card drivers.
>> * Update the sound card and codec bindings and Device Tree nodes.
>>
>> PWM and backlight:
>> ==================
>> * Add optional 64-cycle frame support to the TWL4030 PWM driver.
>> * Add an optional enable guard period to the generic pwm-backlight
>> driver to prevent the TPS61161 from inadvertently entering
>> EasyScale mode.
>> * Adjust the Pandora PWM backlight configuration accordingly.
>> * Remove the obsolete CONFIG_BACKLIGHT_PANDORA option from
>> omap2plus_defconfig.
>>
>> Device Tree and general cleanup:
>> ================================
>> * Correct and validate the affected Device Tree bindings.
>> * Reorder the series so that bindings and supporting drivers
>> precede their Device Tree users.
>> * Improve commit messages and fix coding style issues.
>> * Clarify the original authorship and take responsibility for
>> contributions previously signed off under a pseudonym.
>>
>> Review feedback addressed:
>> ==========================
>> * Mark Brown suggested representing TWL4030 REGEN as a GPIO rather
>> than a regulator and reviewed the original standalone PCM1773
>> driver, which has been replaced by extending the PCM1754 driver.
>> * Krzysztof Kozlowski requested corrections to the Device Tree
>> bindings, proper schema validation, improved commit messages and
>> clarification of the original contributor's authorship.
>> * Andreas Kemnade suggested handling the TPS61161 initialization
>> in the backlight layer. V2 implements this through a generic
>> pwm-backlight enable guard period. His comments on clock modeling
>> and patch bisectability were also considered.
>> * Daniel Thompson provided Reviewed-by for the original removal
>> of the Pandora backlight driver.
>> * Issues identified by Sashiko and Rob Herring's automated DT
>> validation were reviewed and addressed as applicable.
>>
>> Many thanks to everyone who reviewed V1.
>>
>> Validation and testing:
>> =======================
>> * Based on Linux v7.4-rc4.
>> * All 20 patches checked with checkpatch.pl.
>> * Remaining checkpatch warnings and intentional deviations have
>> been reviewed. In particular, ENOTSUPP must be retained in the
>> GPIO set_config callback because gpiolib handles it differently
>> from EOPNOTSUPP.
>> * dt_binding_check and dtbs_check passed for all five affected
>> Device Tree bindings.
>> * The complete series has been successfully built and tested on
>> real OpenPandora hardware.
>> * LCD operation, PWM backlight brightness control including
>> brightness zero and power-down, and audio playback through the
>> internal speakers and headset have been verified.
>> * Audio capture was not tested.
>>
>> PATCH V1 2026-07-11 08:02:02:
>> This series modernizes the OpenPandora handheld support by converting the
>> sound subsystem and backlight control to proper platform drivers and Device
>> Tree definitions.
>>
>> The primary goal is the complete removal of omap3_pandora_legacy_init()
>> and the elimination of the last remaining user of machine_is_omap3_pandora().
>>
>> History and Context
>> ===================
>> The necessity of this cleanup was highlighted in several recent discussions:
>>
>> 1. Tony Lindgren noted that machine_is_omap3_pandora() checks never succeed
>> on Device Tree-booted machines, leaving the audio subsystem functionally
>> broken since the DT conversion years ago:
>> https://marc.info/?l=alsa-devel&m=165632351319716&w=2
>>
>> 2. Ethan Nelson-Moore submitted a patch to replace the macro with DT
>> compatibility checks (accepted as commit 45efb8fbdae3 in v7.2-rc1):
>> https://marc.info/?l=linux-omap&m=177841578110704&w=2
>>
>> 3. Sascha Hauer pointed out that the entire omap3pandora driver fundamentally
>> depended on this broken machine ID check:
>> https://marc.info/?l=linux-omap&m=178048982272252&w=2
>>
>> Design Choices and Implementation
>> =================================
>> Based on these discussions and a long-standing and working out-of-tree solution,
>> we initially attempted a migration to generic frameworks like simple-audio-card
>> or audio-graph-card. However, the hardware routing peculiarities of the
>> OpenPandora introduced too many functional gaps. Replacing omap3pandora.c
>> entirely with pure DT definitions proved unfeasible.
>>
>> Therefore, we opted to base a new proposal on the out-of-tree rewrite of
>> the old-style sound board file kernel driver (sound/soc/ti/omap3pandora.c)
>> into a proper platform driver that cleanly fetches its resources from the
>> Device Tree, while adding specific handling for the twl4030-regen output
>> and adapting the pandora device tree files.
>>
>> Series Structure
>> ================
>> * Patches 01–06 (Preparation): Move highly specific legacy code to its proper
>> infrastructure (TWL4030 regulator regeneration and codec handling).
>> * Patch 07-08 (New Driver): Introduce a dedicated platform driver for the
>> PCM1773 audio DAC.
>> * Patches 09-14 (Audio Core): Rewrite the omap3pandora ASoC fabric driver
>> and update the respective Device Tree nodes.
>> * Patches 14–15 (Backlight): Remove the custom, legacy Pandora backlight driver,
>> convert it to generic Device Tree nodes
>> * Patch 16: (Cleanup) safely delete the obsolete omap3_pandora_legacy_init().
>>
>> Notes & Testing
>> ===============
>> * Testing: This series has been tested on real OpenPandora hardware.
>>
>> Credits
>> =======
>> This work is a collaborative effort by multiple authors over several years:
>> * Grond <grond66@riseup.net>
>> * Stefan Leichter <sle85276@gmx.de>
>> * H. Nikolaus Schaller <hns@goldelico.com>
>>
>>
>> H. Nikolaus Schaller (17):
>> dt-bindings: gpio: twl4030: Document REGEN GPIO
>> gpio: twl4030: Support REGEN GPIO
>> ASoC: twl4030: Allow APLL rate selection through set_sysclk()
>> dt-bindings: sound: pcm1754: Describe PCM1773
>> ASoC: codecs: pcm1754: Add PCM1773 support
>> dt-bindings: sound: Document OpenPandora sound card
>> dt-bindings: mfd: twl4030: Document 64-cycle PWM
>> pwm: twl: Support 64-cycle PWM frame
>> dt-bindings: backlight: pwm: Document enable guard
>> backlight: pwm: Support enable guard period
>> drm/panel: td043mtea1: Attach DT backlight
>> ARM: dts: omap3pandora: Disable unused DMA channels
>> ARM: dts: omap3-pandora: Model LCD power enable dependencies
>> ARM: dts: omap3pandora: Describe PCM1773
>> ARM: dts: omap3pandora: Switch backlight to PWM
>> backlight: Remove legacy Pandora driver
>> ARM: OMAP2+: Remove Pandora platform-data quirks
>>
>> Stefan Leichter (3):
>> ASoC: ti: omap3pandora: Convert sound card to DT
>> ARM: dts: omap3pandora: Enable audio interfaces
>> ARM: dts: omap3pandora: Describe sound card
>
> Which of the 7 maintainers do you expect to take this series?
Well, as a contributor for a specific device one is not regularily thinking
in maintainers work split but about a series to get a device fixed. Which is
obviously orthogonal.
I didn't even recognize that this involves 7 maintainers.
Maybe an extension of checkpatch (which already looks into the MAINTAINER
list) could help here?
> Surely
> this can be broken up into smaller series?
Yes it (we?) can. It is just a question how to do it and properly describe
the dependencies to avoid bisectability problems and avoid that the final
goal is lost.
I'll wait a little if there are other comments on individual patches and
then start working on the split.
BR and thanks,
Nikolaus
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks
2026-11-24 15:27 ` H. Nikolaus Schaller
@ 2026-11-24 16:52 ` Mark Brown
2026-11-24 22:41 ` Andreas Kemnade
1 sibling, 0 replies; 41+ messages in thread
From: Mark Brown @ 2026-11-24 16:52 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Rob Herring, Bartosz Golaszewski, Krzysztof Kozlowski,
Conor Dooley, Lee Jones, Daniel Thompson, Jingoo Han,
Pavel Machek, Liam Girdwood, Aaro Koskinen, Andreas Kemnade,
Kevin Hilman, Roger Quadros, Tony Lindgren, Russell King,
Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
On Tue, Nov 24, 2026 at 04:27:16PM +0100, H. Nikolaus Schaller wrote:
> > Which of the 7 maintainers do you expect to take this series?
> Well, as a contributor for a specific device one is not regularily thinking
> in maintainers work split but about a series to get a device fixed. Which is
> obviously orthogonal.
> I didn't even recognize that this involves 7 maintainers.
> Maybe an extension of checkpatch (which already looks into the MAINTAINER
> list) could help here?
The very large CC list you've got here really ought to have been a
warning sign here, and all the bits in submitting-patches.rst about
splitting patches apply to serieses as much as to individual patches.
Note that sometimes extensive cross subsystem interactions are the right
thing to do since there are actually overlaps in what's being done, a
blanket rule will never cover everything.
> > Surely
> > this can be broken up into smaller series?
> Yes it (we?) can. It is just a question how to do it and properly describe
> the dependencies to avoid bisectability problems and avoid that the final
> goal is lost.
If your multiple serieses can't be applied without each other then hold
off on the dependencies until the earlier things have been applied. It
is not managable to track a large stack of interdependencies.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 20/20] ARM: OMAP2+: Remove Pandora platform-data quirks
2026-11-24 7:26 ` [PATCH v2 20/20] ARM: OMAP2+: Remove Pandora platform-data quirks H. Nikolaus Schaller
@ 2026-11-24 21:16 ` Andreas Kemnade
0 siblings, 0 replies; 41+ messages in thread
From: Andreas Kemnade @ 2026-11-24 21:16 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
On Tue, 24 Nov 2026 08:26:00 +0100
"H. Nikolaus Schaller" <hns@goldelico.com> wrote:
> The Pandora backlight is now described in the device tree and driven by
> pwm-backlight. The sound card also uses device-tree descriptions for its
> codec and amplifier GPIOs instead of legacy GPIO lookup tables.
>
> Remove omap3_pandora_legacy_init(), its backlight platform device and
> audio GPIO lookup table, and the associated board compatibility entries.
> These platform-data quirks are no longer needed.
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>
> Notes:
> Changes against V1:
> - Andreas Kemnade raised bisectability and intermediate driver
> availability concerns for the V1 pdata-quirks removal.
> - Correct the legacy backlight name and explain removal of both backlight platform data and audio GPIO lookup tables.
> - Commit-message review assisted by ChatGPT.
>
> arch/arm/mach-omap2/pdata-quirks.c | 23 -----------------------
> 1 file changed, 23 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
> index b947bacf23a37..aca7097a692ed 100644
> --- a/arch/arm/mach-omap2/pdata-quirks.c
> +++ b/arch/arm/mach-omap2/pdata-quirks.c
> @@ -268,27 +268,6 @@ static void __init omap3_logicpd_torpedo_init(void)
> omap3_gpio126_127_129();
> }
>
> -/* omap3pandora legacy devices */
> -
> -static struct platform_device pandora_backlight = {
> - .name = "pandora-backlight",
> - .id = -1,
> -};
> -
> -static struct gpiod_lookup_table pandora_soc_audio_gpios = {
> - .dev_id = "soc-audio",
> - .table = {
> - GPIO_LOOKUP("gpio-112-127", 6, "dac", GPIO_ACTIVE_HIGH),
> - GPIO_LOOKUP("gpio-0-15", 14, "amp", GPIO_ACTIVE_HIGH),
> - { }
> - },
> -};
> -
> -static void __init omap3_pandora_legacy_init(void)
> -{
maybe ask here for pwm-backlight node? Then this all can be untangled a bit.
so something like if (of_find_compatible_node(NULL, NULL,"pwm-backlight"))
if that node is available do not register that device.
Such a change can go in as soon as we have consensous that pwm-backlight
is the way to go.
After all is in, in a final cleanup step, remove the pandora_bl and
the quirk.
> - platform_device_register(&pandora_backlight);
> - gpiod_add_lookup_table(&pandora_soc_audio_gpios);
> -}
> #endif /* CONFIG_ARCH_OMAP3 */
>
> #ifdef CONFIG_SOC_DRA7XX
> @@ -514,8 +493,6 @@ static struct pdata_init pdata_quirks[] __initdata = {
> { "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
> { "ti,am3517-evm", am3517_evm_legacy_init, },
> { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
> - { "openpandora,omap3-pandora-600mhz", omap3_pandora_legacy_init, },
> - { "openpandora,omap3-pandora-1ghz", omap3_pandora_legacy_init, },
> #endif
> { /* sentinel */ },
> };
Regards,
Andreas
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card
2026-11-24 7:25 ` [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card H. Nikolaus Schaller
` (2 preceding siblings ...)
2026-11-24 14:45 ` Krzysztof Kozlowski
@ 2026-11-24 21:43 ` Andreas Kemnade
3 siblings, 0 replies; 41+ messages in thread
From: Andreas Kemnade @ 2026-11-24 21:43 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
On Tue, 24 Nov 2026 08:25:46 +0100
"H. Nikolaus Schaller" <hns@goldelico.com> wrote:
> The OpenPandora audio subsystem describes the routing links between the
> OMAP3 McBSP interface, the external PCM1773 DAC, and the TWL4030 audio
> codec, alongside amplifiers and power supplies.
>
I think at least in some commit message should be commented why such
an interface is needed and the generic sound cards are not sufficient,
also as a starting point to recheck that later if these reasons are still
valid.
Regards,
Andreas
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>
> Notes:
> Changes against V1:
> - Address Krzysztof Kozlowski's V1 request to run the documented
> DT schema checks and fix the errors reported by Rob Herring's
> automated DT validation.
> - Update the binding example and schema during DT consistency review.
> - Binding and commit-message review assisted by ChatGPT.
>
> .../sound/openpandora,omap3pandora-sound.yaml | 95 +++++++++++++++++++
> 1 file changed, 95 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml b/Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml
> new file mode 100644
> index 0000000000000..6c4d69ffc1c50
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/openpandora,omap3pandora-sound.yaml
> @@ -0,0 +1,95 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/openpandora,omap3pandora-sound.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: OpenPandora OMAP3 Audio Complex
> +
> +maintainers:
> + - H. Nikolaus Schaller <hns@goldelico.com>
> +
> +description:
> + The OpenPandora audio subsystem describes the routing links between the
> + OMAP3 McBSP interface, the external PCM1773 DAC, and the TWL4030 audio codec,
> + alongside amplifiers and power supplies.
> +
> +properties:
> + compatible:
> + const: openpandora,omap3pandora-sound
> +
> + label:
> + $ref: /schemas/types.yaml#/definitions/string
> + description: User-visible name for this sound card.
> +
> + amp-gpios:
> + maxItems: 1
> + description: GPIO pin controlling the amplifier power state.
> +
> + amp-supply:
> + description: Regulator supplying power to the amplifier.
> +
> + sound-dai:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + minItems: 2
> + maxItems: 2
> + description:
> + Phandles to the audio CPU DAI (OMAP3 McBSP) and the codec DAI.
> +
> + routing:
> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> + description:
> + A list of the connections between audio components.
> + Each entry is a pair of strings, the first being the connection's sink,
> + the second being the connection's source.
> +
> + widgets:
> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> + description:
> + User-specified audio sound widgets.
> + Each entry is a pair of strings, the first being the widget type
> + (e.g., "Speaker", "Headphone", "Microphone", "Line") and the second being its name.
> +
> +required:
> + - compatible
> + - sound-dai
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + sound {
> + compatible = "openpandora,omap3pandora-sound";
> + status = "okay";
> +
> + label = "OpenPandora";
> +
> + amp-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
> + amp-supply = <&aux_5v>;
> +
> + widgets =
> + "Line", "Line Out",
> + "Line", "Line In",
> + "Headphone", "Headphone Jack",
> + "Microphone", "Mic (internal)",
> + "Microphone", "Mic (external)";
> +
> + routing =
> + "DAC1", "APLL Enable",
> + "DAC2", "APLL Enable",
> + "Headphone Amplifier", "VOUTL",
> + "Headphone Amplifier", "VOUTR",
> + "Line Out", "VOUTL",
> + "Line Out", "VOUTR",
> + "Headphone Jack", "Headphone Amplifier",
> + "AUXL", "Line In",
> + "AUXR", "Line In",
> + "MAINMIC", "Mic (internal)",
> + "Mic (internal)", "Mic Bias 1",
> + "SUBMIC", "Mic (external)",
> + "Mic (external)", "Mic Bias 2";
> +
> + sound-dai = <&mcbsp2>, <&dac>;
> + };
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks
2026-11-24 15:27 ` H. Nikolaus Schaller
2026-11-24 16:52 ` Mark Brown
@ 2026-11-24 22:41 ` Andreas Kemnade
1 sibling, 0 replies; 41+ messages in thread
From: Andreas Kemnade @ 2026-11-24 22:41 UTC (permalink / raw)
To: H. Nikolaus Schaller
Cc: Rob Herring, Linus Walleij, Bartosz Golaszewski,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Daniel Thompson,
Jingoo Han, Pavel Machek, Liam Girdwood, Mark Brown,
Aaro Koskinen, Kevin Hilman, Roger Quadros, Tony Lindgren,
Russell King, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Uwe Kleine-König, Helge Deller, Jaroslav Kysela,
Takashi Iwai, Peter Ujfalusi, Jarkko Nikula, Jessica Zhang,
linux-gpio, devicetree, linux-kernel, dri-devel, linux-leds,
linux-sound, linux-omap, linux-arm-kernel, linux-pwm, linux-fbdev,
letux-kernel, kernel
On Tue, 24 Nov 2026 16:27:16 +0100
"H. Nikolaus Schaller" <hns@goldelico.com> wrote:
> > Surely
> > this can be broken up into smaller series?
>
> Yes it (we?) can. It is just a question how to do it and properly describe
> the dependencies to avoid bisectability problems and avoid that the final
> goal is lost.
>
I think it is indeed tricky, and probably induces delays.
You can point to the pandora_bl driver resp the pandora sound card to show the
final goal.
If I understand it correctly, you have
1. preparations/extensions for using the standard pwm backlight.
2. REGEN stuff to wire up the power supply.
3. dts changes to wire up backlight and its power supply.
4. sound: quirks in twl4030 codec
5. sound: dt conversion of the sound card.
6. dts changes to wire up sound card and its power supply
7. machine quirk cleanup
So what brings it all together: the power supply requirments,
so both backlight and sound depend on 2.
Maybe it is an idea to split this into a set of
One patchset for
7a. machine quirk conditionally depending on available compatible
2.
1.
3.
Each can go into their individual trees.
3. might to in the next release cycle after 7a, 2. 1.
A second patchset sent after 3 is in -next, containg
4.
5.
6.
A third:
7b: remove quirk + pandora_bl
Regards,
Andreas
^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2026-11-24 22:42 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 01/20] dt-bindings: gpio: twl4030: Document REGEN GPIO H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 02/20] gpio: twl4030: Support " H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 03/20] ASoC: twl4030: Allow APLL rate selection through set_sysclk() H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 04/20] dt-bindings: sound: pcm1754: Describe PCM1773 H. Nikolaus Schaller
2026-11-24 12:05 ` Mark Brown
2026-11-24 14:33 ` [Letux-kernel] " H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 05/20] ASoC: codecs: pcm1754: Add PCM1773 support H. Nikolaus Schaller
2026-11-24 14:48 ` Mark Brown
2026-11-24 7:25 ` [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card H. Nikolaus Schaller
2026-11-24 12:04 ` Mark Brown
2026-11-24 13:35 ` Rob Herring (Arm)
2026-11-24 14:42 ` H. Nikolaus Schaller
2026-11-24 14:45 ` Krzysztof Kozlowski
2026-11-24 14:50 ` H. Nikolaus Schaller
2026-11-24 21:43 ` Andreas Kemnade
2026-11-24 7:25 ` [PATCH v2 07/20] ASoC: ti: omap3pandora: Convert sound card to DT H. Nikolaus Schaller
2026-11-24 14:48 ` Mark Brown
2026-11-24 14:55 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM H. Nikolaus Schaller
2026-11-24 14:40 ` Krzysztof Kozlowski
2026-11-24 14:49 ` H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 09/20] pwm: twl: Support 64-cycle PWM frame H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 10/20] dt-bindings: backlight: pwm: Document enable guard H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 11/20] backlight: pwm: Support enable guard period H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 12/20] drm/panel: td043mtea1: Attach DT backlight H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 13/20] ARM: dts: omap3pandora: Disable unused DMA channels H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 14/20] ARM: dts: omap3-pandora: Model LCD power enable dependencies H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 15/20] ARM: dts: omap3pandora: Enable audio interfaces H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 16/20] ARM: dts: omap3pandora: Describe PCM1773 H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 17/20] ARM: dts: omap3pandora: Describe sound card H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 18/20] ARM: dts: omap3pandora: Switch backlight to PWM H. Nikolaus Schaller
2026-11-24 7:25 ` [PATCH v2 19/20] backlight: Remove legacy Pandora driver H. Nikolaus Schaller
2026-11-24 7:26 ` [PATCH v2 20/20] ARM: OMAP2+: Remove Pandora platform-data quirks H. Nikolaus Schaller
2026-11-24 21:16 ` Andreas Kemnade
2026-11-24 13:38 ` [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks Mark Brown
2026-11-24 14:52 ` H. Nikolaus Schaller
2026-11-24 15:13 ` Rob Herring
2026-11-24 15:27 ` H. Nikolaus Schaller
2026-11-24 16:52 ` Mark Brown
2026-11-24 22:41 ` Andreas Kemnade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox