imx93-spi

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

imx93-spi

2,187 次查看
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>;
};
};

标签 (2)
0 项奖励
回复
8 回复数

2,165 次查看
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 项奖励
回复

2,140 次查看
bora
Contributor II
I tried but didnt work I cant still read ID.
0 项奖励
回复

2,086 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

Can you check the exact behavior from the oscilloscope waveform?

Best Regards,
Zhiming

0 项奖励
回复

2,058 次查看
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 项奖励
回复

2,044 次查看
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 项奖励
回复

2,035 次查看
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 项奖励
回复

1,975 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

So this is the result of an unusual hardware design?

Best Regards,
Zhiming

0 项奖励
回复

1,903 次查看
bora
Contributor II
I checked and with spidev_test, I see the clock when I sent a message, but I dont see ADIN2111.
0 项奖励
回复