imx93spi can't communicate with slave device using dma

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx93spi can't communicate with slave device using dma

Jump to solution
912 Views
Ethane
Contributor II

Hi

I want to configure spi3 to dma mode on imx9352, there is no dma configured by default in imx93.dtsi, I changed the device tree to the following
lpspi3: spi@42550000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx93-spi", "fsl,imx7ulp-spi";
reg = <0x42550000 0x10000>;
interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_LPSPI3_GATE>, <&clk IMX93_CLK_LPSPI3_GATE
<&clk IMX93_CLK_BUS_WAKEUP>;
clock-names = "per", "ipg";
dmas = <&edma2 12 0 0>, <&edma2 13 0 1>;
dma-names = "tx", "rx";
status = "okay";
};
But spi doesn't work anymore, I would like to ask why spi3 is not paired with dma in the default dtsi? I can't even use it myself.
0 Kudos
Reply
1 Solution
856 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Ethane 

This is A0 chip issue, please replace A1 

Zhiming_Liu_0-1710227491999.png

 

 

Best Regards

Zhiming

View solution in original post

0 Kudos
Reply
4 Replies
891 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Ethane 

The default dtsi has dma node, which BSP you are  using?

			lpspi3: spi@42550000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "fsl,imx93-spi", "fsl,imx7ulp-spi";
				reg = <0x42550000 0x10000>;
				interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&clk IMX93_CLK_LPSPI3_GATE>,
					 <&clk IMX93_CLK_BUS_WAKEUP>;
				clock-names = "per", "ipg";
				dmas = <&edma2 12 0 0>, <&edma2 13 0 1>;
				dma-names = "tx","rx";
				status = "disabled";
			};

 

For enabling lpspi3 node, please refer arch/arm64/boot/dts/freescale/imx93-11x11-evk-lpspi.dts

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright 2022 NXP
 */

#include "imx93-11x11-evk.dts"

&flexcan2 {
	status = "disabled";
};

&lpuart7 {
	status = "disabled";
};

&lpspi3 {
	fsl,spi-num-chipselects = <1>;
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&pinctrl_lpspi3>;
	pinctrl-1 = <&pinctrl_lpspi3>;
	cs-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
	pinctrl-assert-gpios = <&adp5585gpio 4 GPIO_ACTIVE_HIGH>;
	status = "okay";

	spidev0: spi@0 {
		reg = <0>;
		compatible = "lwn,bk4";
		spi-max-frequency = <1000000>;
	};
};

&iomuxc {
	pinctrl_lpspi3: lpspi3grp {
		fsl,pins = <
			MX93_PAD_GPIO_IO08__GPIO2_IO08		0x3fe
			MX93_PAD_GPIO_IO09__LPSPI3_SIN		0x3fe
			MX93_PAD_GPIO_IO10__LPSPI3_SOUT		0x3fe
			MX93_PAD_GPIO_IO11__LPSPI3_SCK		0x3fe
		>;
	};
};

 

0 Kudos
Reply
867 Views
Ethane
Contributor II

@Zhiming_Liu 

I'm using linux 5.15.52 version of bsp, by default there is no configuration, and I'm using the A0 version of the CPU, is it because of the old version of bsp has problems?
&lpspi3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi3>;
pinctrl-1 = <&pinctrl_lpspi3>;
cs-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
status = "okay";

spican:can@0 {
compatible = "microchip,mcp2518fd"; reg = <0>; spican:can@0 {
reg = <0>; clocks = <&clk20fd
clocks = <&clk20M>.
spi-max-frequency = <10000000>; interrupts-extended = <&clk20M>; spi-max-frequency = <10000000
interrupts-extended = <&gpio2 7 IRQ_TYPE_LEVEL_LOW>;
}; }
};

0 Kudos
Reply
857 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Ethane 

This is A0 chip issue, please replace A1 

Zhiming_Liu_0-1710227491999.png

 

 

Best Regards

Zhiming

0 Kudos
Reply
847 Views
Ethane
Contributor II
Ok, thanks for your quick reply.
0 Kudos
Reply