Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add alsa driver #159

Closed
wants to merge 7 commits into from
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
9 changes: 9 additions & 0 deletions arch/riscv/boot/dts/canaan/k230-canmv.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
device_type = "memory";
reg = <0x0 0x0 0x0 0x20000000>;
};

sound {
status = "okay";
compatible = "canaan,k230-audio-inno";
canaan,model = "CANAAN_K230_I2S_INNO";
canaan,k230-i2s-controller = <&i2s>;
canaan,k230-audio-codec = <&inno_codec>;
};

};

&uart0 {
Expand Down
37 changes: 37 additions & 0 deletions arch/riscv/boot/dts/canaan/k230.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,43 @@
status = "okay";
};

pdma: pdma@0x80804000 {
#dma-cells = <4>;
dma-channels = <8>;
dma-requests = <35>;
status = "okay";
compatible = "canaan,k230-pdma";
reg = <0x0 0x80804000 0x0 0x400>;
/*interrupt-parent = <&intc>;*/
interrupts = <203 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&pdma_aclk_gate>;
};

i2s: i2s@0x9140f000 {
status = "okay";
compatible = "snps,designware-i2s";
reg = <0x0 0x9140f000 0x0 0x400>;
dmas = <&pdma 1 0xfff 0 0x14>, <&pdma 1 0xfff 0 0x15>;
dma-names = "tx", "rx";
clocks = <&audio_dev_clk>;
clock-names = "i2sclk";
};

/* audio */
audio: audio@0x9140f400 {
status = "okay";
compatible = "canaan,k230-audio";
reg = <0x0 0x9140f400 0x0 0xc00>;
};

inno_codec:inno_codec@0x9140e000{
status = "okay";
compatible = "k230,inno-codec";
reg = <0x0 0x9140e000 0x0 0x1000>;
clocks = <&codec_adc_mclk>,<&codec_dac_mclk>;
clock-names = "adc", "dac";
};

isp: isp.0 {
compatible = "verisilicon,isp";
id = <0>;
Expand Down
8 changes: 8 additions & 0 deletions arch/riscv/boot/dts/canaan/k230d-canmv.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
device_type = "memory";
reg = <0x0 0x0 0x0 0x8000000>;
};

sound {
status = "okay";
compatible = "canaan,k230-audio-inno";
canaan,model = "CANAAN_K230_I2S_INNO";
canaan,k230-i2s-controller = <&i2s>;
canaan,k230-audio-codec = <&inno_codec>;
};
};

&uart0 {
Expand Down
6 changes: 6 additions & 0 deletions arch/riscv/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,9 @@ CONFIG_MTD_UBI=y
CONFIG_MAILBOX=y
# TH1520 PMIC_WDT
CONFIG_TH1520_PMIC_WATCHDOG=y

CONFIG_SND_DESIGNWARE_I2S=y
CONFIG_K230_PERIDMA=y
CONFIG_SND_SOC_K230_INNO=y
CONFIG_SND_SOC_CANAAN_K230_AUDIO=y
CONFIG_SND_SOC_CANAAN_K230_INNO=y
10 changes: 9 additions & 1 deletion drivers/dma/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ config MOXART_DMA
select DMA_VIRTUAL_CHANNELS
help
Enable support for the MOXA ART SoC DMA controller.

Say Y here if you enabled MMP ADMA, otherwise say N.

config MPC512X_DMA
Expand Down Expand Up @@ -733,6 +733,14 @@ config XILINX_ZYNQMP_DPDMA
driver provides the dmaengine required by the DisplayPort subsystem
display driver.

config K230_PERIDMA
tristate "K230 Periphal DMA support"
depends on ARCH_RV64I
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS
help
Enable support for the Periphal DMA controller present in the K230 SoC.

# driver files
source "drivers/dma/bestcomm/Kconfig"

Expand Down
1 change: 1 addition & 0 deletions drivers/dma/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
obj-$(CONFIG_ST_FDMA) += st_fdma.o
obj-$(CONFIG_FSL_DPAA2_QDMA) += fsl-dpaa2-qdma/
obj-$(CONFIG_INTEL_LDMA) += lgm/
obj-$(CONFIG_K230_PERIDMA) += k230_peridma.o

obj-y += mediatek/
obj-y += qcom/
Expand Down
Loading
Loading