forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overlays-14-add-rk3328-pcm5102-dac(:1)
Original-Subject: rk3328: add dtb overlay to enable pcm5102 DAC on i2s1 bus None X-Armbian: Patch-File: overlays-14-add-rk3328-pcm5102-dac X-Armbian: Patch-File-Counter: 1 X-Armbian: Patch-Rel-Directory: patch/kernel/archive/rockchip64-6.3 X-Armbian: Patch-Type: kernel X-Armbian: Patch-Root-Type: core X-Armbian: Patch-Sub-Type: common X-Armbian: Original-Subject: rk3328: add dtb overlay to enable pcm5102 DAC on i2s1 bus
- Loading branch information
1 parent
a8f3e06
commit 5bdae80
Showing
2 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
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
104 changes: 104 additions & 0 deletions
104
arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3328-i2s1-pcm5102.dts
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,104 @@ | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/pinctrl/rockchip.h> | ||
|
||
/* | ||
* Device tree overlay to disabled internal analog codec for | ||
* rk3328 boards and enable external i2s, binding it to a | ||
* pcm5102-based DAC. | ||
* Tested on rock-pi E, but should be suitable for other | ||
* similar boards | ||
*/ | ||
|
||
&{/} { | ||
|
||
pcm5102: pcm510x { | ||
#sound-dai-cells = <0>; | ||
compatible = "ti,pcm5102a"; | ||
pcm510x,format = "i2s"; | ||
status = "okay"; | ||
}; | ||
|
||
i2s_sound: i2s-sound { | ||
compatible = "simple-audio-card"; | ||
simple-audio-card,format = "i2s"; | ||
simple-audio-card,mclk-fs = <256>; | ||
simple-audio-card,name = "I2S"; | ||
status = "okay"; | ||
|
||
simple-audio-card,cpu { | ||
sound-dai = <&i2s1>; | ||
}; | ||
|
||
simple-audio-card,codec { | ||
sound-dai = <&pcm5102>; | ||
}; | ||
}; | ||
|
||
}; | ||
|
||
&analog_sound { | ||
status = "disabled"; | ||
}; | ||
|
||
&codec { | ||
status = "disabled"; | ||
}; | ||
|
||
&i2s1_mclk { | ||
rockchip,pins = <2 RK_PB7 1 &pcfg_pull_down>; | ||
}; | ||
|
||
&i2s1_sclk { | ||
rockchip,pins = <2 RK_PC2 1 &pcfg_pull_down>; | ||
}; | ||
|
||
&i2s1_lrckrx { | ||
rockchip,pins = <2 RK_PC0 1 &pcfg_pull_up>; | ||
}; | ||
|
||
&i2s1_lrcktx { | ||
rockchip,pins = <2 RK_PC1 1 &pcfg_pull_up>; | ||
}; | ||
|
||
&i2s1_sdi { | ||
rockchip,pins = <2 RK_PC3 1 &pcfg_pull_up>; | ||
}; | ||
|
||
&i2s1_sdo { | ||
rockchip,pins = <2 RK_PC7 1 &pcfg_pull_up>; | ||
}; | ||
|
||
&i2s1_sdio1 { | ||
rockchip,pins = <2 RK_PC4 1 &pcfg_pull_up>; | ||
}; | ||
|
||
&i2s1_sdio2 { | ||
rockchip,pins = <2 RK_PC5 1 &pcfg_pull_up>; | ||
}; | ||
|
||
&i2s1_sdio3 { | ||
rockchip,pins = <2 RK_PC6 1 &pcfg_pull_up>; | ||
}; | ||
|
||
&i2s1_sleep { | ||
rockchip,pins = | ||
<2 RK_PB7 RK_FUNC_GPIO &pcfg_input_high>, | ||
<2 RK_PC0 RK_FUNC_GPIO &pcfg_input_high>, | ||
<2 RK_PC1 RK_FUNC_GPIO &pcfg_input_high>, | ||
<2 RK_PC2 RK_FUNC_GPIO &pcfg_input_high>, | ||
<2 RK_PC3 RK_FUNC_GPIO &pcfg_input_high>, | ||
<2 RK_PC4 RK_FUNC_GPIO &pcfg_input_high>, | ||
<2 RK_PC5 RK_FUNC_GPIO &pcfg_input_high>, | ||
<2 RK_PC6 RK_FUNC_GPIO &pcfg_input_high>, | ||
<2 RK_PC7 RK_FUNC_GPIO &pcfg_input_high>; | ||
}; | ||
|
||
&i2s1 { | ||
status = "okay"; | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&i2s1_mclk>, <&i2s1_sclk>, <&i2s1_lrckrx>, <&i2s1_lrcktx>, <&i2s1_sdi>, <&i2s1_sdo>, <&i2s1_sdio1>, <&i2s1_sdio2>; | ||
rockchip,playback-channels = <8>; | ||
}; |