-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: gh-sxp <sunxiaopeng@canaan-creative.com>
- Loading branch information
Showing
5 changed files
with
296 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
Documentation/devicetree/bindings/sound/canaan,k230-audio-inno.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
|
||
%YAML 1.2 | ||
--- | ||
$id: "http://devicetree.org/schemas/sound/canaan,k230-audio-inno.yaml#" | ||
$schema: "http://devicetree.org/meta-schemas/core.yaml#" | ||
|
||
title: Canaan K230 Audio INNO Device Tree Bindings | ||
|
||
maintainers: | ||
- Sun Xiaopeng <sunxiaopeng@canaan-creative.com> | ||
|
||
description: | | ||
This document describes the device tree bindings for the audio subsystem | ||
on the Canaan K230 SoC using the INNO codec. | ||
|
||
properties: | ||
compatible: | ||
const: "canaan,k230-audio-inno" | ||
description: | | ||
Must be "canaan,k230-audio-inno". | ||
canaan,model: | ||
$ref: /schemas/types.yaml#/definitions/string | ||
description: | | ||
Custom model name for the sound card. | ||
canaan,k230-i2s-controller: | ||
$ref: /schemas/types.yaml#/definitions/phandle | ||
description: | | ||
Phandle to the I2S controller node. | ||
canaan,k230-audio-codec: | ||
$ref: /schemas/types.yaml#/definitions/phandle | ||
description: | | ||
Phandle to the audio codec node. | ||
required: | ||
- compatible | ||
- canaan,k230-i2s-controller | ||
- canaan,k230-audio-codec | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
sound { | ||
compatible = "canaan,k230-audio-inno"; | ||
canaan,model = "K230_I2S_INNO"; | ||
canaan,k230-i2s-controller = <&i2s>; | ||
canaan,k230-audio-codec = <&inno_codec>; | ||
}; |
47 changes: 47 additions & 0 deletions
47
Documentation/devicetree/bindings/sound/canaan,k230-audio.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: "http://devicetree.org/schemas/sound/canaan,k230-audio.yaml#" | ||
$schema: "http://devicetree.org/meta-schemas/core.yaml#" | ||
|
||
title: Canaan K230 Audio Controller Device Tree Bindings | ||
|
||
maintainers: | ||
- Sun Xiaopeng <sunxiaopeng@canaan-creative.com> | ||
|
||
description: | | ||
This document defines the device tree bindings for the audio controller | ||
found in the Canaan K230 SoC. The audio controller provides interfaces for | ||
audio input and output functionalities. | ||
|
||
properties: | ||
compatible: | ||
enum: | ||
- canaan,k230-audio | ||
description: | | ||
Specifies the compatible string for the Canaan K230 audio controller. | ||
|
||
reg: | ||
maxItems: 1 | ||
description: | | ||
Specifies the base physical address and size of the audio controller's | ||
register area. | ||
|
||
status: | ||
description: | | ||
Standard property to indicate the operational status of the device. | ||
Should be "okay" if the device is enabled. | ||
|
||
required: | ||
- compatible | ||
- reg | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
audio: audio@9140f400 { | ||
compatible = "canaan,k230-audio"; | ||
reg = <0x0 0x9140f400 0x0 0xc00>; | ||
status = "okay"; | ||
}; |
47 changes: 47 additions & 0 deletions
47
Documentation/devicetree/bindings/sound/canaan,k230-inno-codec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
|
||
%YAML 1.2 | ||
--- | ||
$id: "http://devicetree.org/schemas/sound/canaan,k230-inno-codec.yaml#" | ||
$schema: "http://devicetree.org/meta-schemas/core.yaml#" | ||
|
||
title: Canaan k230 Inno Codec | ||
|
||
maintainers: | ||
- Sun Xiaopeng <sunxiaopeng@canaan-creative.com> | ||
|
||
compatible: "canaan,k230-inno-codec" | ||
description: "Inno Codec Device for K230 SoC" | ||
|
||
properties: | ||
status: | ||
description: "The status of the codec device" | ||
type: string | ||
default: "disabled" | ||
values: | ||
- "okay" | ||
- "disabled" | ||
|
||
reg: | ||
description: "Base address and size of the codec registers" | ||
type: <address> | ||
|
||
clocks: | ||
description: "Clocks used by the codec" | ||
type: list | ||
items: phandle | ||
|
||
clock-names: | ||
description: "Names corresponding to each clock" | ||
type: list | ||
items: string | ||
|
||
examples: | ||
- | | ||
inno_codec:inno_codec@0x9140e000 { | ||
status = "okay"; | ||
compatible = "canaan,k230-inno-codec"; | ||
reg = <0x0 0x9140e000 0x0 0x1000>; | ||
clocks = <&codec_adc_mclk>, <&codec_dac_mclk>; | ||
clock-names = "adc", "dac"; | ||
}; |
65 changes: 65 additions & 0 deletions
65
Documentation/devicetree/bindings/sound/canaan,k230-pdma.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: "http://devicetree.org/schemas/dma/canaan,k230-pdma.yaml#" | ||
$schema: "http://devicetree.org/meta-schemas/core.yaml#" | ||
|
||
title: Canaan K230 PDMA Controller | ||
|
||
maintainers: | ||
- Sun Xiaopeng <sunxiaopeng@canaan-creative.com> | ||
|
||
description: | | ||
The Canaan K230 PDMA controller is a peripheral DMA controller that supports | ||
multiple channels and request signals. | ||
|
||
properties: | ||
compatible: | ||
const: canaan,k230-pdma | ||
description: Must be "canaan,k230-pdma" | ||
|
||
reg: | ||
maxItems: 1 | ||
description: Base address and size of the PDMA registers. | ||
|
||
interrupts: | ||
maxItems: 1 | ||
description: Interrupt specifier for the PDMA controller. | ||
|
||
clocks: | ||
maxItems: 1 | ||
description: Reference to the PDMA controller clock. | ||
|
||
dma-channels: | ||
description: The number of DMA channels supported by the controller. | ||
|
||
dma-requests: | ||
description: The number of DMA request signals supported. | ||
|
||
'#dma-cells': | ||
const: 4 | ||
description: Must be 4. Specifies the number of cells in the DMA specifier. | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- interrupts | ||
- clocks | ||
- dma-channels | ||
- dma-requests | ||
- '#dma-cells' | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
pdma: pdma@80804000 { | ||
compatible = "canaan,k230-pdma"; | ||
reg = <0x0 0x80804000 0x0 0x400>; | ||
interrupts = <203 IRQ_TYPE_LEVEL_HIGH>; | ||
clocks = <&pdma_aclk_gate>; | ||
dma-channels = <8>; | ||
dma-requests = <35>; | ||
#dma-cells = <4>; | ||
status = "okay"; | ||
}; |
85 changes: 85 additions & 0 deletions
85
Documentation/devicetree/bindings/sound/canaan,snps,designware-i2s.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
|
||
%YAML 1.2 | ||
--- | ||
$id: "http://devicetree.org/schemas/sound/canaan,designware-i2s.yaml#" | ||
$schema: "http://devicetree.org/meta-schemas/core.yaml#" | ||
|
||
title: Canaan DesignWare I2S Controller | ||
|
||
maintainers: | ||
- Sun Xiaopeng <sunxiaopeng@canaan-creative.com> | ||
|
||
description: | | ||
This document describes the device tree bindings for the Canaan DesignWare | ||
I2S controller found in the K230 SoC. The controller is compliant with the | ||
Synopsys DesignWare I2S IP core and requires specific properties to function | ||
correctly. | ||
|
||
properties: | ||
compatible: | ||
const: "canaan,snps,designware-i2s" | ||
description: | | ||
Must be "canaan,snps,designware-i2s" to identify the Canaan-specific | ||
implementation of the DesignWare I2S controller. | ||
|
||
reg: | ||
maxItems: 1 | ||
description: | | ||
Contains the base address and length of the I2S controller register set. | ||
|
||
status: | ||
enum: | ||
- "okay" | ||
- "disabled" | ||
description: | | ||
Standard property to enable or disable the device. Must be "okay" to | ||
activate the I2S controller. | ||
|
||
dmas: | ||
minItems: 2 | ||
maxItems: 2 | ||
description: | | ||
Phandles to the DMA channels for transmit and receive. The first item | ||
is for transmit (TX), and the second is for receive (RX). | ||
|
||
dma-names: | ||
items: | ||
- const: "tx" | ||
- const: "rx" | ||
description: | | ||
Names corresponding to the DMA channels listed in the "dmas" property. | ||
|
||
clocks: | ||
maxItems: 1 | ||
description: | | ||
Phandle to the clock provided to the I2S controller. | ||
|
||
clock-names: | ||
items: | ||
- const: "i2sclk" | ||
description: | | ||
Name of the clock listed in the "clocks" property. Must be "i2sclk". | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- status | ||
- dmas | ||
- dma-names | ||
- clocks | ||
- clock-names | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
i2s: i2s@9140f000 { | ||
compatible = "canaan,snps,designware-i2s"; | ||
reg = <0x0 0x9140f000 0x0 0x400>; | ||
status = "okay"; | ||
dmas = <&pdma 1 0xfff 0 0x14>, <&pdma 1 0xfff 0 0x15>; | ||
dma-names = "tx", "rx"; | ||
clocks = <&audio_dev_clk>; | ||
clock-names = "i2sclk"; | ||
}; |