Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [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; 40+ 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] 40+ messages in thread

end of thread, other threads:[~2026-11-24 21:43 UTC | newest]

Thread overview: 40+ 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox