Page tree
Skip to end of metadata
Go to start of metadata

i2C-6ULX-B开发板的J4扩展座上引出了两个SPI控制器,可以用于连接两个LoRa模块,实现P2P收发测试。

SPI2的信息配置


信号名称J4 扩展座信号名称


2930CSI_DATA0ECSPI2_SCLK


3132CSI_DATA1CS
ECSPI2_MOSICSI_DATA23334CSI_DATA3ECSPI2_MISO


SPI1的信息配置


信号名称

J4 扩展座

信号名称
ECSPI1_SCLKCSI_DATA43536CSI_DATA5CS
ECSPI1_MOSICSI_DATA63738CSI_DATA7ECSPI1_MISO



DTS配置代码如下:

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_hog_1>;
	imx6ul-i2s6ull {

		pinctrl_ecspi1_cs_1: ecspi1_cs_grp-1 {
			fsl,pins = <
				/*MX6UL_PAD_CSI_DATA05__ECSPI1_SS0      0x10b0*/
				MX6UL_PAD_CSI_DATA05__GPIO4_IO26        0x10b0
			>;
		};

		pinctrl_ecspi2_cs_1: ecspi2_cs_grp-1 {
			fsl,pins = <
				/*MX6UL_PAD_CSI_DATA01__ECSPI2_SS0      0x10b0*/
				MX6UL_PAD_CSI_DATA01__GPIO4_IO22	0x10b0
			>;
		};
	};
};


&ecspi1 {
	fsl,spi-num-chipselects = <1>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi1_1 &pinctrl_ecspi1_cs_1>;
	cs-gpios = <&gpio4 26 0>;
	/*cs-gpios = <0>;*/
	status = "okay";

	spidev@0x00 {
		reg = <0>;
		compatible = "spidev";
		spi-max-frequency = <1000000>;
	};
};

&ecspi2 {
	fsl,spi-num-chipselects = <1>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi2_1 &pinctrl_ecspi2_cs_1>;
	cs-gpios = <&gpio4 22 0>;
	/*cs-gpios = <0>;*/
	status = "okay";

	spidev@0x00 {
		reg = <0>;
		compatible = "spidev";
		spi-max-frequency = <1000000>;
	};
};


  • No labels
Write a comment…