I am working on LS1088ardb_pb platform
I am trying to use SPI_PCS3 (pin V1 - gpiochip3 offset 20) as a chip selection line for dspi, and here is my device tree node assigned
&dspi {
status = "okay";
bus-num = <0>;
spidev@0 {
compatible = "linux,spidev";
spi-max-frequency = <12000000>;
reg = <x>; //For chip selection pin SPI_PCS3
};
};
In reg = <x>; what would be the number for "x" for corresponding pin SPI_PCS3 to choose a spi chip select?
in rcw_1600_qspi.rcw file I have added below mentioned code
SPI_EXT=0
SPI_BASE_BASE=0
SPI_PCS_BASE=0
I am booting from qspi flash (not SD Card boot) and SPI_PCS3 pin is multiplexed with other functionality, do I need to set any switch configuration?
switch setup as mentioned below:
SW1[1:8] | SW2[1:8] | SW3[1:8] | SW4[1:8] | SW5[1:8] |
0011 0001 | 0100 0000 | 1110 0010 | 1001 0011 | 0111 0000 |
Regards
Suresh
Hi, adding to the thread, we face similar issue, even when we are booting through SD Card, we do not see CS (SPI_PCS3 chosen) signal coming out correct on oscilloscopes or logic analyzer captures. We tried to make changes in application using the parameter cs_change in spi transfer structure:
https://docs.huihoo.com/doxygen/linux/kernel/3.7/structspi__transfer.html
But with this also the CS does not come aligned with clock and other SPI signals. Application code has already been shared to you by my colleague. We use SPIDev method of user space application to test our SPI driver.
Please suggest us the solution, as this driver is becoming a bottleneck for our project.
When we boot from SD Card SPI_PCS_BASE=3 then only SD Card booting will work properly and SPI_PCS[0:3] lines cannot be used for SPI Chip Selection lines. If we want to use SPI_PCS[0:3] lines for SPI Chip Selection lines then SPI_PCS_BASE=0 but SD Card booting won't happen.
Can you please suggest is there any method SPI_PCS[1:3] can be used for SPI Chip selection lines when we boot from SD Card?
Regards
Suresh
> In reg = <x>; what would be the number for "x" for corresponding
> pin SPI_PCS3 to choose a spi chip select?
3
In case of further questions please provide textual U-Boot log.
> But chip selection line is not toggling.
Which SPI CS is toggling? - Can you probe CS0, CS1 and CS2?
I have probed all four lines of SPI_PCS0, SPI_PCS1, SPI_PCS2 and SPI_PCS3, but I did not see any line toggling while transmitting the data.
For a test purpose please modify DTS for PCS0 (reg = <0>;)
Can you see PCS0 during SPI access?
Hi ufedor,
I have tried out all the combinations of SPI_PCS0,1,2,3 and I probed the CS line for toggling, but I could not able to see any toggling on CS line.
Can you please suggest, after booting up, do I need to change any BRDCFG bits to bring out SPI_PCS lines from MUX which was controlled by CFG_MUX_SPI line which was connected to CPLD?
I am booting from QSPI 1 and my boot partition and rootfs in emmc.
attached is my source code file.
Regards
Suresh
> I have probed all four lines of SPI_PCS0, SPI_PCS1, SPI_PCS2 and SPI_PCS3
Please mark in the schematics points where the signals were probed.
You have to probe the signals at the processor's pins.
Basically these pins are not able to access for probing, because both ICs are BGA ICs. Only access those test points.
I did some experiment looks like SPI is working but problem is CS is not coming out due to multiplexing these lines with eMMC lines.
I need to test SPI in different manner. I need to configure eMMC for 4 bit bus width mode and by using Qixis command I need to switch SPI_PCS lines to out to test points.
Can you please help me where I need to change in the code to make eMMC bus width for 4 bit at boot mode and linux mode.
I am using flexbuilder_2108 software package.