How to use AW-CM358SM on-board Wi-Fi on i.MX8M Quad

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to use AW-CM358SM on-board Wi-Fi on i.MX8M Quad

745 次查看
Derek0902
Contributor II

Hi,

I want to use AW-CM358SM on-board Wi-Fi on my custom board. The AW-CM358SM datasheet is below. 

Derek0902_0-1704171882087.png

I measured the VBAT and VDDIO, relatively 3.3V and 1.8V. But PDn is 0V. I use UART4_TXD (PAD)

multiplexed GPIO5_GPIO29 (PORT) as PDn input. The GPIO5_GPIO29 output is low level.

 

This is my device tree setting.

Derek0902_1-1704172679673.pngDerek0902_2-1704172705534.png

How can I make GPIO5_GPIO29 output the voltage level to 1.8V ?

 

Thanks & Regards,

Derek Lin

0 项奖励
回复
4 回复数

726 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @Derek0902!

Thank you for contacting NXP Support!

 

You can get bases on iMX8MN-EVK or iMX8MM-EVK device tree for that purpose.

 

We use the "AW-CM358SM" on iMX8MN-EVK and iMX8MM-EVK.

 

Please see the device tree by following the link:

 

https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi#L51...

 

Best Regards!

Chavira

0 项奖励
回复

718 次查看
Derek0902
Contributor II

Hi @Chavira ,

I have followed imx8mn-evk.dtsi to set my device tree as below:

 

&usdhc2 {
	// assigned-clocks = <&clk IMX8MQ_CLK_USDHC2>;
	// assigned-clock-rates = <200000000>;
	#address-cells = <1>;
	#size-cells = <0>;
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_wlan>;
	pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_wlan>;
	pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_wlan>;
	// cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
	vmmc-supply = <&reg_usdhc2_vmmc>;
	bus-width = <4>;
	keep-power-in-suspend;
	non-removable;
	wakeup-source;
	fsl,sdio-async-interrupt-enabled;
	// mmc-pwrseq = <&usdhc2_pwrseq>;
	status = "okay";

	wifi_wake_host {
		compatible = "nxp,wifi-wake-host";
		interrupt-parent = <&gpio2>;
		interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
		interrupt-names = "host-wake";
	};
reg_usdhc2_vmmc: regulator-usdhc2 {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
		compatible = "regulator-fixed";
		regulator-name = "WLAN_EN";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&gpio5 29 GPIO_ACTIVE_HIGH>;
		// off-on-delay-us = <20000>;
		enable-active-high;
	};
pinctrl_usdhc2: usdhc2grp {
		fsl,pins = <
			MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK			0x83
			MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD			0xc3
			MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0		0xc3
			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1		0xc3
			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2		0xc3
			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3		0xc3
			// MX8MQ_IOMUXC_GPIO1_IO04_USDHC2_VSELECT		0xc1
		>;
	};

	pinctrl_usdhc2_100mhz: usdhc2-100grp {
		fsl,pins = <
			MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK			0x85
			MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD			0xc5
			MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0		0xc5
			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1		0xc5
			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2		0xc5
			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3		0xc5
			// MX8MQ_IOMUXC_GPIO1_IO04_USDHC2_VSELECT		0xc1
		>;
	};

	pinctrl_usdhc2_200mhz: usdhc2-200grp {
		fsl,pins = <
			MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK			0x87
			MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD			0xc7
			MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0		0xc7
			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1		0xc7
			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2		0xc7
			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3		0xc7
			// MX8MQ_IOMUXC_GPIO1_IO04_USDHC2_VSELECT		0xc1
		>;
	};
pinctrl_wlan: wlangrp {
		fsl,pins = <
			MX8MQ_IOMUXC_GPIO1_IO00_ANAMIX_REF_CLK_32K		0x41
			/* Do not stuff */
			MX8MQ_IOMUXC_SD2_WP_GPIO2_IO20 				0x41
		>;
	};
pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
		fsl,pins = <
			// MX8MQ_IOMUXC_SD2_RESET_B_GPIO2_IO19		0x41
			MX8MQ_IOMUXC_UART4_TXD_GPIO5_IO29		0x16
		>;
	};

 

 

 

But there are mmc1 error in dmesg as below: 

Derek0902_0-1704255806260.png

Is there any other place that needs to be set?

 

Thanks & Regards,

Derek Lin

 

0 项奖励
回复

703 次查看
Chavira
NXP TechSupport
NXP TechSupport

Hi @Derek0902!

Checking your configurations I noticed that are incorrect, for example, some pins need to be configured on a fast slew rate and if you set them on a slow slew rate, you have to enable the pull-up resistor on some pins, and is not configured.

Please check the values of each pin of iMX8MN with their reference manual and set the features on the iMX8MQ, which are on different bits, you have to check the iMX8MQ reference manual to set the correct value.

Best Regards!
Chavira

0 项奖励
回复

706 次查看
Derek0902
Contributor II

Hi @Chavira ,

My custom board uses UART4_TXD as GPIO5_IO29 to connect Wi-Fi module PDn. Then I found that NVCC_UART is 3v3. But i.MX8M NANO EVK uses SD1_RESET_B as GPIO2_IO10 to connect Wi-Fi module PDn. Then NVCC_SD1 is 1v8. If I want to make PDn to pull high to 1v8, my custom board need to be modified NVCC_UART to 1v8, right?

 

Thanks & Regards,

Derek Lin

0 项奖励
回复