Skip to content

Commit

Permalink
LoongArch: dts: Add I2S support to Loongson-2K1000
Browse files Browse the repository at this point in the history
The module is supported, adding it.

Not all Loongson-2K1000 boards have an i2s interface, here is an example
of enabling it:

sound {
	compatible = "loongson,ls-audio-card";
	model = "Loongson-ASoC";
	mclk-fs = <512>;

	cpu {
		sound-dai = <&i2s>;
	};

	codec {
		sound-dai = <&uda1342>;
	};
};

&apbdma2 {
	status = "okay";
};

&apbdma3 {
	status = "okay";
};

&i2c3 {
	status = "okay";

	pinctrl-0 = <&i2c1_pins_default>;
	pinctrl-names = "default";

	#address-cells = <1>;
	#size-cells = <0>;

	uda1342: codec@1a {
		compatible = "nxp,uda1342";
		reg = <0x1a>;
		#sound-dai-cells = <0>;
	};
};

&i2s {
	status = "okay";

	pinctrl-0 = <&hda_pins_default>;
	pinctrl-names = "default";
};

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
  • Loading branch information
Binbin Zhou authored and Huacai Chen committed Nov 26, 2024
1 parent 704f06e commit b7915af
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions arch/loongarch/boot/dts/loongson-2k1000.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
status = "disabled";
};

dma-controller@1fe00c20 {
apbdma2: dma-controller@1fe00c20 {
compatible = "loongson,ls2k1000-apbdma";
reg = <0x0 0x1fe00c20 0x0 0x8>;
interrupt-parent = <&liointc1>;
Expand All @@ -276,7 +276,7 @@
status = "disabled";
};

dma-controller@1fe00c30 {
apbdma3: dma-controller@1fe00c30 {
compatible = "loongson,ls2k1000-apbdma";
reg = <0x0 0x1fe00c30 0x0 0x8>;
interrupt-parent = <&liointc1>;
Expand Down Expand Up @@ -352,6 +352,19 @@
status = "disabled";
};

i2s: i2s@1fe2d000 {
compatible = "loongson,ls2k1000-i2s";
reg = <0 0x1fe2d000 0 0x14>,
<0 0x1fe00438 0 0x8>;
interrupt-parent = <&liointc0>;
interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk LOONGSON2_APB_CLK>;
dmas = <&apbdma2 0>, <&apbdma3 0>;
dma-names = "tx", "rx";
#sound-dai-cells = <0>;
status = "disabled";
};

spi0: spi@1fff0220 {
compatible = "loongson,ls2k1000-spi";
reg = <0x0 0x1fff0220 0x0 0x10>;
Expand Down

0 comments on commit b7915af

Please sign in to comment.