summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-01-28 01:22:16 +0000
committerMark Brown <broonie@kernel.org>2026-01-28 01:22:16 +0000
commit75ca86026b891c21d656dda38c3e7ae6a848b440 (patch)
tree698744b8036ac4da7e24b6ecd582d81c60289376 /Documentation/devicetree/bindings
parentb4ee17729a11f13fbb15cd1fb54549642cd1c44c (diff)
parent8cf19b19dba8814ccc8b1179dabf28b7f8eefc22 (diff)
ASoC: sophgo: add CV1800 I2S controllers support
Merge series from "Anton D. Stavinskii" <stavinsky@gmail.com>: This patch series adds basic audio support for Sophgo CV1800B, as used on boards such as the Milk-V Duo. The series introduces the I2S controller driver, the DAC and ADC codec drivers, corresponding DT bindings, and DTS updates to wire the components together. The implementation is based on vendor documentation and testing on real hardware. This series relies on recent fixes in the DesignWare AXI DMA support; in particular, correct operation depends on the DMA changes discussed at: https://lore.kernel.org/all/20251214224601.598358-1-inochiama@gmail.com/ The current driver implementation supports a fixed audio configuration of 48 kHz sample rate and only I2S protocol which is used in codecs. The series has been tested on the Milk-V Duo 256M board using the Sophgo SG2002 SoC. The implementation is expected to also work on Milk-V Duo and Milk-V Module boards based on the SG2000 SoC, as the audio and DMA blocks are closely related. Known hardware limitation: On CV1800B / SG2002, the I2S2 output pins cannot be enabled via pinctrl alone. Due to SoC design constraints, the output path becomes functional only after additional vendor-specific register programming. This series makes the limitation explicit and does not attempt to work around it implicitly via pinctrl or undocumented behavior.
Diffstat (limited to 'Documentation/devicetree/bindings')
-rw-r--r--Documentation/devicetree/bindings/sound/sophgo,cv1800b-codecs.yaml46
-rw-r--r--Documentation/devicetree/bindings/sound/sophgo,cv1800b-i2s.yaml67
2 files changed, 113 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/sophgo,cv1800b-codecs.yaml b/Documentation/devicetree/bindings/sound/sophgo,cv1800b-codecs.yaml
new file mode 100644
index 000000000000..7293a98e98c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/sophgo,cv1800b-codecs.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/sophgo,cv1800b-codecs.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sophgo CV1800B Internal ADC/DAC Codec
+
+maintainers:
+ - Anton D. Stavinskii <stavinsky@gmail.com>
+
+description:
+ Internal ADC and DAC audio codecs integrated in the Sophgo CV1800B SoC.
+ Codecs expose a single DAI and are intended to be connected
+ to an I2S/TDM controller via an ASoC machine driver.
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ enum:
+ - sophgo,cv1800b-sound-adc
+ - sophgo,cv1800b-sound-dac
+
+ reg:
+ maxItems: 1
+
+ "#sound-dai-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - "#sound-dai-cells"
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ audio-codec@300a100 {
+ compatible = "sophgo,cv1800b-sound-adc";
+ reg = <0x0300a100 0x100>;
+ #sound-dai-cells = <0>;
+ };
+...
diff --git a/Documentation/devicetree/bindings/sound/sophgo,cv1800b-i2s.yaml b/Documentation/devicetree/bindings/sound/sophgo,cv1800b-i2s.yaml
new file mode 100644
index 000000000000..f08362b0ca5e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/sophgo,cv1800b-i2s.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/sophgo,cv1800b-i2s.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sophgo CV1800B I2S/TDM controller
+
+maintainers:
+ - Anton D. Stavinskii <stavinsky@gmail.com>
+
+description: I2S/TDM controller found in CV1800B / Sophgo SG2002/SG2000 SoCs.
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: sophgo,cv1800b-i2s
+
+ reg:
+ maxItems: 1
+
+ "#sound-dai-cells":
+ const: 0
+
+ clocks:
+ maxItems: 2
+
+ clock-names:
+ items:
+ - const: i2s
+ - const: mclk
+
+ dmas:
+ minItems: 1
+ maxItems: 2
+
+ dma-names:
+ minItems: 1
+ items:
+ - enum: [rx, tx]
+ - const: tx
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - "#sound-dai-cells"
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/sophgo,cv1800.h>
+
+ i2s@4110000 {
+ compatible = "sophgo,cv1800b-i2s";
+ reg = <0x04110000 0x10000>;
+ clocks = <&clk CLK_APB_I2S1>, <&clk CLK_SDMA_AUD1>;
+ clock-names = "i2s", "mclk";
+ dmas = <&dmamux 2 1>, <&dmamux 3 1>;
+ dma-names = "rx", "tx";
+ #sound-dai-cells = <0>;
+ };
+...