Skip to content

Commit

Permalink
arm64: dts: colibri-imx8x: Add sound card
Browse files Browse the repository at this point in the history
Add audio support for Colibri-iMX8X sound card.

Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
  • Loading branch information
João Paulo Gonçalves authored and Shawn Guo committed Sep 4, 2024
1 parent 0f26437 commit ce97bdc
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
regulator-max-microvolt = <3300000>;
};

reg_module_3v3_avdd: regulator-module-3v3-avdd {
compatible = "regulator-fixed";
regulator-max-microvolt = <3300000>;
regulator-min-microvolt = <3300000>;
regulator-name = "+V3.3_AVDD_AUDIO";
};

reg_module_vref_1v8: regulator-module-vref-1v8 {
compatible = "regulator-fixed";
regulator-max-microvolt = <1800000>;
Expand All @@ -55,6 +62,23 @@
regulator-min-microvolt = <5000000>;
regulator-name = "usbh_vbus";
};

sound-card {
compatible = "simple-audio-card";
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&dailink_master>;
simple-audio-card,name = "colibri-imx8x";

dailink_master: simple-audio-card,codec {
clocks = <&mclkout0_lpcg IMX_LPCG_CLK_0>;
sound-dai = <&sgtl5000_a>;
};

simple-audio-card,cpu {
sound-dai = <&sai0>;
};
};
};

/* Colibri Analogue Inputs */
Expand Down Expand Up @@ -91,6 +115,21 @@
pinctrl-0 = <&pinctrl_i2c0>, <&pinctrl_sgtl5000_usb_clk>;
status = "okay";

sgtl5000_a: audio-codec@a {
compatible = "fsl,sgtl5000";
reg = <0xa>;
#sound-dai-cells = <0>;
assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>,
<&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_SLV_BUS>,
<&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_MST_BUS>,
<&mclkout0_lpcg IMX_LPCG_CLK_0>;
assigned-clock-rates = <786432000>, <49152000>, <12000000>, <12000000>;
clocks = <&mclkout0_lpcg IMX_LPCG_CLK_0>;
VDDA-supply = <&reg_module_3v3_avdd>;
VDDD-supply = <&reg_module_vref_1v8>;
VDDIO-supply = <&reg_module_3v3>;
};

/* Touch controller */
touchscreen@2c {
compatible = "adi,ad7879-1";
Expand Down Expand Up @@ -373,7 +412,13 @@

/* TODO on-module PCIe for Wi-Fi */

/* TODO On-module i2s / Audio */
/* On-module I2S */
&sai0 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai0>;
status = "okay";
};

&usbotg1 {
adp-disable;
Expand Down

0 comments on commit ce97bdc

Please sign in to comment.