I have a ls1046afrwy board,and sjtag1105s is connect to tms570.
I modify the board ,sjtag1105s connect cpu armv7 by spi;so I need spi drive code.
linux kernel is v5.4.3rt
1.mcu SPI_BASE =0,SPI_EXT =0
2.fsl-ls1046a-frwy.dts
&dspi {
bus-num = <0>;
status = "okay";
sja1105: ethernet-switch@2 {
reg = <0x2>;
#address-cells = <1>;
#size-cells = <0>;
compatible = "nxp,sja1105s";
/* 12 MHz */
spi-max-frequency = <12000000>;
/* Sample data on trailing clock edge */
spi-cpha;
/* SPI controller settings for SJA1105 timing requirements */
fsl,spi-cs-sck-delay = <100>;
fsl,spi-sck-cs-delay = <100>;
};
};
error:
sja1105 spi0.2: Expected device ID 0xae00030e but read 0xffffffff,which means that the switch is not connected to the appropriate SPI Slave Select line.
config :
dspi: spi@2100000 {
compatible = "fsl,ls1021a-v1.0-dspi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0 0x2100000 0x0 0x10000>;
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "dspi";
clocks = <&clockgen 4 1>;
spi-num-chipselects = <4>;
big-endian;
status = "disabled";
};
spi-fsl-dspi.c probe dspi dev,sja1105 sck is right, pcs is right,and sint can see data;
where is the fault?
I donot know that the switch is not connected to the appropriate SPI Slave Select line.
Solved! Go to Solution.
The problem is resolved.
I am also having similar issue, what was your solution?