imx93-spi

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

imx93-spi

2,213 Views
bora
Contributor II

I'm working with a custom i.MX93 board and trying to bring up SPI. I’ve added the necessary configuration to the device tree, but I’m not sure if it’s correct — the SPI doesn’t seem to work as expected.

Could someone help me check if my device tree setup is right or guide me on how to properly enable SPI on this board?

&lpspi2 {
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2>;
cs-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
dmas = <0>;
dma-names = <0>;
status = "okay";

ethernet@0 {
compatible = "adi,adin2111";

/* SPI CS number */
reg = <0>;

/* will need 23 MHz for 10 Mbps, lower speeds will result in lower bandwidth */
spi-max-frequency = <10000000>;

/* optional, will check all control read/writes over SPI */
adi,spi-crc;

#address-cells = <1>;
#size-cells = <0>;

/* an IRQ is required, INT_N pin is configured to signal RX/TX frames */
interrupt-parent = <&gpio1>;
interrupts = <18 IRQ_TYPE_LEVEL_LOW>;

/* This is the host MAC address, by default ADIN2111 will also accept broadcast frames */
mac-address = [ CA 2F B7 10 23 63 ];

phy@0 {
compatible = "ethernet-phy-id0283.bc91";
phy-10base-t1l-2.4vpp = <1>;
reg = <0x0>;
};
};

Labels (2)
0 Kudos
Reply
8 Replies

2,191 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

Please delete dma nodes. 

dmas = <0>;
dma-names = <0>;

Then try to comment adi,spi-crc; to check if the ID can be read.

Best Regards,
Zhiming

0 Kudos
Reply

2,166 Views
bora
Contributor II
I tried but didnt work I cant still read ID.
0 Kudos
Reply

2,112 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

Can you check the exact behavior from the oscilloscope waveform?

Best Regards,
Zhiming

0 Kudos
Reply

2,084 Views
bora
Contributor II
I checked and the clock voltage is too high. I forgot to say also I use lpspi1 not 2. I corrected in the device tree.
0 Kudos
Reply

2,070 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

What does two high mean here? slave device needs 1v8, but it's 3V3?

Best Regards,
Zhiming

0 Kudos
Reply

2,061 Views
bora
Contributor II
I use ADIN2111. VDDIO is 3,3 V and wenn I measure CS pin (G21) I see more than 3,3V (when I send message via spidev_test).
0 Kudos
Reply

2,001 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

So this is the result of an unusual hardware design?

Best Regards,
Zhiming

0 Kudos
Reply

1,929 Views
bora
Contributor II
I checked and with spidev_test, I see the clock when I sent a message, but I dont see ADIN2111.
0 Kudos
Reply