提交 d1576b12 编写于 作者: M Matt Porter 提交者: Shawn Guo

ARM: dts: hummingboard: convert onboard audio to simple-audio-card

The HB onboard audio currently makes use of the imx-audio-sgtl5000
binding. This binding does not support auxiliary audio devices such
as external amplifiers. The simple-audio-card binding does support
this property which allows systems incorporating the HB to add an
auxiliary device that's attached to the HB audio jack with an
overlay. Convert the HB onboard audio to use simple-audio-card for
this additional flexibility.
Signed-off-by: NMatt Porter <mporter@konsulko.com>
Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: NShawn Guo <shawnguo@kernel.org>
上级 cc247544
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE. * OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <dt-bindings/sound/fsl-imx-audmux.h>
/ { / {
/* Will be filled by the bootloader */ /* Will be filled by the bootloader */
...@@ -110,17 +111,27 @@ ...@@ -110,17 +111,27 @@
vin-supply = <&v_5v0>; vin-supply = <&v_5v0>;
}; };
sound-sgtl5000 { audio: sound-sgtl5000 {
audio-codec = <&sgtl5000>; compatible = "simple-audio-card";
audio-routing = simple-audio-card,name = "On-board Codec";
"MIC_IN", "Mic Jack", simple-audio-card,format = "i2s";
"Mic Jack", "Mic Bias", simple-audio-card,bitclock-master = <&sound_codec>;
simple-audio-card,frame-master = <&sound_codec>;
simple-audio-card,widgets =
"Microphone", "Headphone Jack",
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"MIC_IN", "Headphone Jack",
"Headphone Jack", "Mic Bias",
"Headphone Jack", "HP_OUT"; "Headphone Jack", "HP_OUT";
compatible = "fsl,imx-audio-sgtl5000";
model = "On-board Codec"; sound_cpu: simple-audio-card,cpu {
mux-ext-port = <5>; sound-dai = <&ssi1>;
mux-int-port = <1>; };
ssi-controller = <&ssi1>;
sound_codec: simple-audio-card,codec {
sound-dai = <&sgtl5000>;
};
}; };
sound-spdif { sound-spdif {
...@@ -134,6 +145,26 @@ ...@@ -134,6 +145,26 @@
&audmux { &audmux {
status = "okay"; status = "okay";
ssi1 {
fsl,audmux-port = <0>;
fsl,port-config = <
(IMX_AUDMUX_V2_PTCR_SYN |
IMX_AUDMUX_V2_PTCR_TFSEL(4) |
IMX_AUDMUX_V2_PTCR_TCSEL(4) |
IMX_AUDMUX_V2_PTCR_TFSDIR |
IMX_AUDMUX_V2_PTCR_TCLKDIR)
IMX_AUDMUX_V2_PDCR_RXDSEL(4)
>;
};
pins5 {
fsl,audmux-port = <4>;
fsl,port-config = <
IMX_AUDMUX_V2_PTCR_SYN
IMX_AUDMUX_V2_PDCR_RXDSEL(0)
>;
};
}; };
&can1 { &can1 {
...@@ -166,6 +197,7 @@ ...@@ -166,6 +197,7 @@
compatible = "fsl,sgtl5000"; compatible = "fsl,sgtl5000";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hummingboard_sgtl5000>; pinctrl-0 = <&pinctrl_hummingboard_sgtl5000>;
#sound-dai-cells = <0>;
reg = <0x0a>; reg = <0x0a>;
VDDA-supply = <&v_3v2>; VDDA-supply = <&v_3v2>;
VDDIO-supply = <&v_3v2>; VDDIO-supply = <&v_3v2>;
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE. * OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include <dt-bindings/sound/fsl-imx-audmux.h>
/ { / {
/* Will be filled by the bootloader */ /* Will be filled by the bootloader */
...@@ -150,22 +151,52 @@ ...@@ -150,22 +151,52 @@
vin-supply = <&v_5v0>; vin-supply = <&v_5v0>;
}; };
sound-sgtl5000 { audio: sound-sgtl5000 {
audio-codec = <&sgtl5000>; compatible = "simple-audio-card";
audio-routing = simple-audio-card,name = "On-board Codec";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_codec>;
simple-audio-card,frame-master = <&sound_codec>;
simple-audio-card,widgets =
"Microphone", "Mic Jack",
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"MIC_IN", "Mic Jack", "MIC_IN", "Mic Jack",
"Mic Jack", "Mic Bias", "Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT"; "Headphone Jack", "HP_OUT";
compatible = "fsl,imx-audio-sgtl5000";
model = "On-board Codec"; sound_cpu: simple-audio-card,cpu {
mux-ext-port = <5>; sound-dai = <&ssi1>;
mux-int-port = <1>; };
ssi-controller = <&ssi1>;
sound_codec: simple-audio-card,codec {
sound-dai = <&sgtl5000>;
};
}; };
}; };
&audmux { &audmux {
status = "okay"; status = "okay";
ssi1 {
fsl,audmux-port = <0>;
fsl,port-config = <
(IMX_AUDMUX_V2_PTCR_SYN |
IMX_AUDMUX_V2_PTCR_TFSEL(4) |
IMX_AUDMUX_V2_PTCR_TCSEL(4) |
IMX_AUDMUX_V2_PTCR_TFSDIR |
IMX_AUDMUX_V2_PTCR_TCLKDIR)
IMX_AUDMUX_V2_PDCR_RXDSEL(4)
>;
};
pins5 {
fsl,audmux-port = <4>;
fsl,port-config = <
IMX_AUDMUX_V2_PTCR_SYN
IMX_AUDMUX_V2_PDCR_RXDSEL(0)
>;
};
}; };
&ecspi2 { &ecspi2 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册