mbox series

[RFC,00/16] ASoC/SOF/clk/gpio/dt: add Hifiberry DAC+ PRO support

Message ID 20200409195841.18901-1-pierre-louis.bossart@linux.intel.com (mailing list archive)
Headers show
Series ASoC/SOF/clk/gpio/dt: add Hifiberry DAC+ PRO support | expand

Message

Pierre-Louis Bossart April 9, 2020, 7:58 p.m. UTC
The Hifiberry DAC+ / DAC+ PRO is supported in the Raspberry PI tree
but until now not in the mainline and not for ACPI platforms.

This patchset implements the recommendations suggested by Mark Brown
back in 2018: first add a gpiochip in the PCM512x codec driver, then
use these gpios from a clock driver and the machine driver.

Since this patchset relies on different subsystems, sending as RFC for
now. I chose to import the original code from the Raspberry PI tree as
is, and add my changes on top. If there is a preference to squash the
changes that'd be fine. I also don't know if I should split this
series in two, one for ASoC and one for clk changes?

This patchset does not add changes to the sound/soc/bcm machine
drivers, but that should be trivial once all the gpio/clock is
available.

Thanks to Andy Shevchenko for his help navigating the gpio subsystem
and flagging mistakes in the use of lookup tables, and to Rob Herring
for pointers on the DT bindings verification tools.

Daniel Matuschek (1):
  clk: hifiberry-dacpro: initial import

Pierre-Louis Bossart (15):
  ASoC: pcm512x: expose 6 GPIOs
  ASoC: pcm512x: use "sclk" string to retrieve clock
  ASoC: Intel: sof-pcm512x: use gpiod for LED
  ASoC: Intel: sof-pcm512x: detect Hifiberry DAC+ PRO
  ASoC: Intel: sof-pcm512x: reconfigure sclk in hw_params if needed
  ASoC: Intel: sof-pcm512x: select HIFIBERRY_DACPRO clk
  clk: hifiberry-dacpro: update SDPX/copyright
  clk: hifiberry-dacpro: style cleanups, use devm_
  clk: hifiberry-dacpro: add OF dependency
  clk: hifiberry-dacpro: transition to _hw functions
  clk: hifiberry-dacpro: add ACPI support
  clk: hifiberry-dacpro: add "sclk" lookup
  clk: hifiberry-dacpro: toggle GPIOs on prepare/unprepare
  clk: hifiberry-dacpro: add delay on clock prepare/deprepare
  ASoC: dt-bindings: add document for Hifiberry DAC+ PRO clock

 .../bindings/sound/hifiberry-dacpro.yaml      |  38 +++
 drivers/clk/Kconfig                           |   4 +
 drivers/clk/Makefile                          |   1 +
 drivers/clk/clk-hifiberry-dacpro.c            | 284 ++++++++++++++++++
 sound/soc/codecs/pcm512x.c                    | 134 ++++++++-
 sound/soc/intel/boards/Kconfig                |   2 +
 sound/soc/intel/boards/sof_pcm512x.c          | 190 +++++++++++-
 7 files changed, 635 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/hifiberry-dacpro.yaml
 create mode 100644 drivers/clk/clk-hifiberry-dacpro.c


base-commit: dd8e871d4e560eeb8d22af82dde91457ad835a63

Comments

Andy Shevchenko April 14, 2020, 4:50 p.m. UTC | #1
On Thu, Apr 09, 2020 at 02:58:25PM -0500, Pierre-Louis Bossart wrote:
> The Hifiberry DAC+ / DAC+ PRO is supported in the Raspberry PI tree
> but until now not in the mainline and not for ACPI platforms.
> 
> This patchset implements the recommendations suggested by Mark Brown
> back in 2018: first add a gpiochip in the PCM512x codec driver, then
> use these gpios from a clock driver and the machine driver.
> 
> Since this patchset relies on different subsystems, sending as RFC for
> now. I chose to import the original code from the Raspberry PI tree as
> is,

I don't see briefly what they are, any pointers like patch numbers in the
series?

>	and add my changes on top. If there is a preference to squash the
> changes that'd be fine.

I guess it would be good to have.

> I also don't know if I should split this
> series in two, one for ASoC and one for clk changes?
> 
> This patchset does not add changes to the sound/soc/bcm machine
> drivers, but that should be trivial once all the gpio/clock is
> available.
> 
> Thanks to Andy Shevchenko for his help navigating the gpio subsystem
> and flagging mistakes in the use of lookup tables, and to Rob Herring
> for pointers on the DT bindings verification tools.

You are welcome!
I'm going to review them (where I understand something) as they are presented.

> Daniel Matuschek (1):
>   clk: hifiberry-dacpro: initial import
> 
> Pierre-Louis Bossart (15):
>   ASoC: pcm512x: expose 6 GPIOs
>   ASoC: pcm512x: use "sclk" string to retrieve clock
>   ASoC: Intel: sof-pcm512x: use gpiod for LED
>   ASoC: Intel: sof-pcm512x: detect Hifiberry DAC+ PRO
>   ASoC: Intel: sof-pcm512x: reconfigure sclk in hw_params if needed
>   ASoC: Intel: sof-pcm512x: select HIFIBERRY_DACPRO clk
>   clk: hifiberry-dacpro: update SDPX/copyright
>   clk: hifiberry-dacpro: style cleanups, use devm_
>   clk: hifiberry-dacpro: add OF dependency
>   clk: hifiberry-dacpro: transition to _hw functions
>   clk: hifiberry-dacpro: add ACPI support
>   clk: hifiberry-dacpro: add "sclk" lookup
>   clk: hifiberry-dacpro: toggle GPIOs on prepare/unprepare
>   clk: hifiberry-dacpro: add delay on clock prepare/deprepare
>   ASoC: dt-bindings: add document for Hifiberry DAC+ PRO clock
> 
>  .../bindings/sound/hifiberry-dacpro.yaml      |  38 +++
>  drivers/clk/Kconfig                           |   4 +
>  drivers/clk/Makefile                          |   1 +
>  drivers/clk/clk-hifiberry-dacpro.c            | 284 ++++++++++++++++++
>  sound/soc/codecs/pcm512x.c                    | 134 ++++++++-
>  sound/soc/intel/boards/Kconfig                |   2 +
>  sound/soc/intel/boards/sof_pcm512x.c          | 190 +++++++++++-
>  7 files changed, 635 insertions(+), 18 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/hifiberry-dacpro.yaml
>  create mode 100644 drivers/clk/clk-hifiberry-dacpro.c
> 
> 
> base-commit: dd8e871d4e560eeb8d22af82dde91457ad835a63
> -- 
> 2.20.1
>
Pierre-Louis Bossart April 14, 2020, 4:57 p.m. UTC | #2
>> Since this patchset relies on different subsystems, sending as RFC for
>> now. I chose to import the original code from the Raspberry PI tree as
>> is,
> 
> I don't see briefly what they are, any pointers like patch numbers in the
> series?

The prefix is the key, I should have added the following in the cover 
letter:

ASoC: pcm512x -> gpiochip creation

ASoC: Intel: sof-pcm512x -> use of gpio and clk API in the 
board-specific machine driver.

clk: hifiberry-dacpro -> use of gpio and creation of clock.

ASoC: dtbindings -> yaml description