Commit c53f0166 authored by Angus Ainslie (Purism)'s avatar Angus Ainslie (Purism) Committed by Shawn Guo

arm64: dts: librem5-devkit: add the sgtl5000 i2c audio codec

Describe the sgtl5000 of the librem 5 devkit in devicetree.
Signed-off-by: default avatarAngus Ainslie (Purism) <angus@akkea.ca>
Signed-off-by: default avatarMartin Kepplinger <martin.kepplinger@puri.sm>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent dde061b8
......@@ -148,6 +148,34 @@ reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
regulator-always-on;
};
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "sgtl5000";
simple-audio-card,format = "i2s";
simple-audio-card,widgets =
"Microphone", "Microphone Jack",
"Headphone", "Headphone Jack",
"Speaker", "Speaker Ext",
"Line", "Line In Jack";
simple-audio-card,routing =
"MIC_IN", "Microphone Jack",
"Microphone Jack", "Mic Bias",
"LINE_IN", "Line In Jack",
"Headphone Jack", "HP_OUT",
"Speaker Ext", "LINE_OUT";
simple-audio-card,cpu {
sound-dai = <&sai2>;
};
simple-audio-card,codec {
sound-dai = <&sgtl5000>;
clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
frame-master;
bitclock-master;
};
};
vibrator {
compatible = "gpio-vibrator";
pinctrl-names = "default";
......@@ -426,6 +454,19 @@ magnetometer@1e {
vddio-supply = <&reg_3v3_p>;
};
sgtl5000: audio-codec@a {
compatible = "fsl,sgtl5000";
clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
assigned-clock-rates = <24576000>;
#sound-dai-cells = <0>;
reg = <0x0a>;
VDDD-supply = <&reg_1v8_p>;
VDDIO-supply = <&reg_3v3_p>;
VDDA-supply = <&reg_3v3_p>;
};
touchscreen@5d {
compatible = "goodix,gt5688";
reg = <0x5d>;
......@@ -567,6 +608,16 @@ MX8MQ_IOMUXC_SAI3_RXC_GPIO4_IO29 0x80 /* RTC intr */
>;
};
pinctrl_sai2: sai2grp {
fsl,pins = <
MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC 0xd6
MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK 0xd6
MX8MQ_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0 0xd6
MX8MQ_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0 0xd6
MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK 0xd6
>;
};
pinctrl_typec: typecgrp {
fsl,pins = <
MX8MQ_IOMUXC_NAND_DATA06_GPIO3_IO12 0x16
......@@ -742,6 +793,15 @@ &snvs_pwrkey {
status = "okay";
};
&sai2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
assigned-clock-rates = <24576000>;
status = "okay";
};
&uart1 { /* console */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment