Commit 30d5243e authored by Lucien Zhao's avatar Lucien Zhao Committed by Henrik Brix Andersen
Browse files

samples: drivers: i2s_codec: support sai1 codec function on RT1180



- add imxrt_audio_codec_pll_init function in soc.c
- add sai1 pin configuration
- Verify i2s_codec case on cm33/cm7 core

Signed-off-by: default avatarLucien Zhao <lucien.zhao@nxp.com>
parent 826a2eee
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -357,4 +357,19 @@
			slew-rate = "fast";
		};
	};

	pinmux_sai1: pinmux_sai1 {
		group0 {
			pinmux = <&iomuxc_aon_gpio_aon_24_sai1_mclk>,
				<&iomuxc_aon_gpio_aon_27_sai1_rx_sync>,
				<&iomuxc_aon_gpio_aon_26_sai1_rx_bclk>,
				<&iomuxc_aon_gpio_aon_25_sai1_rx_data0>,
				<&iomuxc_aon_gpio_aon_21_sai1_tx_data0>,
				<&iomuxc_aon_gpio_aon_23_sai1_tx_bclk>,
				<&iomuxc_aon_gpio_aon_22_sai1_tx_sync>;
			drive-strength = "high";
			slew-rate = "fast";
			input-enable;
		};
	};
};
+23 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@
		sw0 = &user_button;
		pwm-led0 = &green_pwm_led;
		sdhc0 = &usdhc1;
		i2s-codec-tx = &sai1;
		i2s-tx = &sai1;
	};

	leds {
@@ -292,3 +294,24 @@ p3t1755dp_ard_i2c_interface: &lpi2c2 {};
		status = "okay";
	};
};

&sai1 {
	pinctrl-0 = <&pinmux_sai1>;
	pinctrl-names = "default";
};

&lpi2c2 {
	pinctrl-0 = <&pinmux_lpi2c2>;
	pinctrl-names = "default";
	#address-cells = <1>;
	#size-cells = <0>;

	audio_codec: wm8962@1a {
		compatible = "wolfson,wm8962";
		reg = <0x1a>;
		clock-source = "MCLK";
		clocks = <&ccm IMX_CCM_SAI1_CLK 0x2004 4>;
		clock-names = "mclk";
	};

};
+4 −0
Original line number Diff line number Diff line
@@ -110,3 +110,7 @@ zephyr_udc1: &usb2 {
temp_sensor: &tmpsns {
	status = "okay";
};

&sai1 {
	status = "okay";
};
+1 −0
Original line number Diff line number Diff line
@@ -32,4 +32,5 @@ supported:
  - sdhc
  - dac
  - kpp
  - i2s
vendor: nxp
+4 −0
Original line number Diff line number Diff line
@@ -104,3 +104,7 @@ zephyr_udc1: &usb2 {
&kpp {
	status = "okay";
};

&sai1 {
	status = "okay";
};
Loading