Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions Documentation/devicetree/bindings/sound/spacemit,k1-i2s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/spacemit,k1-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: K1 I2S controller

description:
The I2S bus (Inter-IC sound bus) is a serial link for digital
audio data transfer between devices in the system.

maintainers:
- Troy Mitchell <troy.mitchell@linux.spacemit.com>

allOf:
- $ref: dai-common.yaml#

properties:
compatible:
const: spacemit,k1-i2s

reg:
maxItems: 1

clocks:
items:
- description: clock for I2S sysclk
- description: clock for I2S bclk
- description: clock for I2S bus
- description: clock for I2S controller

clock-names:
items:
- const: sysclk
- const: bclk
- const: bus
- const: func

dmas:
minItems: 1
maxItems: 2

dma-names:
oneOf:
- const: rx
- items:
- const: tx
- const: rx

resets:
maxItems: 1

port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false

"#sound-dai-cells":
const: 0

required:
- compatible
- reg
- clocks
- clock-names
- dmas
- dma-names
- resets
- "#sound-dai-cells"

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/clock/spacemit,k1-syscon.h>
i2s@d4026000 {
compatible = "spacemit,k1-i2s";
reg = <0xd4026000 0x30>;
clocks = <&syscon_mpmu CLK_I2S_SYSCLK>,
<&syscon_mpmu CLK_I2S_BCLK>,
<&syscon_apbc CLK_SSPA0_BUS>,
<&syscon_apbc CLK_SSPA0>;
clock-names = "sysclk", "bclk", "bus", "func";
dmas = <&pdma0 21 1>, <&pdma0 22 1>;
dma-names = "tx", "rx";
resets = <&syscon_apbc RESET_SSPA0>;
#sound-dai-cells = <0>;
};
1 change: 1 addition & 0 deletions sound/soc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ source "sound/soc/renesas/Kconfig"
source "sound/soc/rockchip/Kconfig"
source "sound/soc/samsung/Kconfig"
source "sound/soc/sdca/Kconfig"
source "sound/soc/spacemit/Kconfig"
source "sound/soc/spear/Kconfig"
source "sound/soc/sprd/Kconfig"
source "sound/soc/starfive/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions sound/soc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ obj-$(CONFIG_SND_SOC) += rockchip/
obj-$(CONFIG_SND_SOC) += samsung/
obj-$(CONFIG_SND_SOC) += sdca/
obj-$(CONFIG_SND_SOC) += sof/
obj-$(CONFIG_SND_SOC) += spacemit/
obj-$(CONFIG_SND_SOC) += spear/
obj-$(CONFIG_SND_SOC) += sprd/
obj-$(CONFIG_SND_SOC) += starfive/
Expand Down
14 changes: 14 additions & 0 deletions sound/soc/spacemit/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: GPL-2.0-only
menu "SpacemiT"
depends on COMPILE_TEST || ARCH_SPACEMIT
depends on HAVE_CLK

config SND_SOC_K1_I2S
tristate "K1 I2S Device Driver"
select SND_SOC_GENERIC_DMAENGINE_PCM
help
Say Y or M if you want to add support for I2S driver for
K1 I2S controller. The device supports up to maximum of
2 channels each for play and record.

endmenu
5 changes: 5 additions & 0 deletions sound/soc/spacemit/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
# K1 Platform Support
snd-soc-k1-i2s-y := k1_i2s.o

obj-$(CONFIG_SND_SOC_K1_I2S) += snd-soc-k1-i2s.o
Loading
Loading