Commit 5b772c61 authored by Mark Brown's avatar Mark Brown

Add PWM-DAC audio support for StarFive JH7110

Merge series from Hal Feng <hal.feng@starfivetech.com>:

This patchset adds PWM-DAC audio support for the StarFive JH7110 SoC.
The PWM-DAC module does not require a hardware codec, but a dummy codec is
needed for the driver. The dummy spdif codec driver, which is already
upstream, is compatible with the one which JH7110 PWM-DAC needed. So we
use it as the dummy codec driver for the JH7110 PWM-DAC module.
parents e17e892d d1802d59
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/starfive,jh7110-pwmdac.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: StarFive JH7110 PWM-DAC Controller
description:
The PWM-DAC Controller uses PWM square wave generators plus RC filters to
form a DAC for audio play in StarFive JH7110 SoC. This audio play controller
supports 16 bit audio format, up to 48K sampling frequency, up to left and
right dual channels.
maintainers:
- Hal Feng <hal.feng@starfivetech.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: starfive,jh7110-pwmdac
reg:
maxItems: 1
clocks:
items:
- description: PWMDAC APB
- description: PWMDAC CORE
clock-names:
items:
- const: apb
- const: core
resets:
maxItems: 1
description: PWMDAC APB
dmas:
maxItems: 1
description: TX DMA Channel
dma-names:
const: tx
"#sound-dai-cells":
const: 0
required:
- compatible
- reg
- clocks
- clock-names
- resets
- dmas
- dma-names
- "#sound-dai-cells"
additionalProperties: false
examples:
- |
pwmdac@100b0000 {
compatible = "starfive,jh7110-pwmdac";
reg = <0x100b0000 0x1000>;
clocks = <&syscrg 157>,
<&syscrg 158>;
clock-names = "apb", "core";
resets = <&syscrg 96>;
dmas = <&dma 22>;
dma-names = "tx";
#sound-dai-cells = <0>;
};
...@@ -20466,6 +20466,13 @@ S: Supported ...@@ -20466,6 +20466,13 @@ S: Supported
F: Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml F: Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml
F: drivers/clk/starfive/clk-starfive-jh7110-pll.c F: drivers/clk/starfive/clk-starfive-jh7110-pll.c
STARFIVE JH7110 PWMDAC DRIVER
M: Hal Feng <hal.feng@starfivetech.com>
M: Xingyu Wu <xingyu.wu@starfivetech.com>
S: Supported
F: Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml
F: sound/soc/starfive/jh7110_pwmdac.c
STARFIVE JH7110 SYSCON STARFIVE JH7110 SYSCON
M: William Qiu <william.qiu@starfivetech.com> M: William Qiu <william.qiu@starfivetech.com>
M: Xingyu Wu <xingyu.wu@starfivetech.com> M: Xingyu Wu <xingyu.wu@starfivetech.com>
......
...@@ -7,6 +7,15 @@ config SND_SOC_STARFIVE ...@@ -7,6 +7,15 @@ config SND_SOC_STARFIVE
the Starfive SoCs' Audio interfaces. You will also need to the Starfive SoCs' Audio interfaces. You will also need to
select the audio interfaces to support below. select the audio interfaces to support below.
config SND_SOC_JH7110_PWMDAC
tristate "JH7110 PWM-DAC device driver"
depends on HAVE_CLK && SND_SOC_STARFIVE
select SND_SOC_GENERIC_DMAENGINE_PCM
select SND_SOC_SPDIF
help
Say Y or M if you want to add support for StarFive JH7110
PWM-DAC driver.
config SND_SOC_JH7110_TDM config SND_SOC_JH7110_TDM
tristate "JH7110 TDM device driver" tristate "JH7110 TDM device driver"
depends on HAVE_CLK && SND_SOC_STARFIVE depends on HAVE_CLK && SND_SOC_STARFIVE
......
# StarFive Platform Support # StarFive Platform Support
obj-$(CONFIG_SND_SOC_JH7110_PWMDAC) += jh7110_pwmdac.o
obj-$(CONFIG_SND_SOC_JH7110_TDM) += jh7110_tdm.o obj-$(CONFIG_SND_SOC_JH7110_TDM) += jh7110_tdm.o
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment