Hi,
There is anyone using the spi bus ?
How can I enable it ?
I’m trying to create a dtb for spi but with no lucky yet.
thanks
Hi,
There is anyone using the spi bus ?
How can I enable it ?
I’m trying to create a dtb for spi but with no lucky yet.
thanks
if it’s anything like the I2C-2, you will have to do it in u-boot. i’ve not been able to get any pin muxing in the dts to work. BTW, which SPI bus are you trying to work with?
hi @amf99
in true, first any spi would be ok.
I could generate the spi devices (spi 0 and spi 1 - just 1 channel) - but I believe there is something wrong with the pins once even with a loopback in the spi I can’t get any data.
the SPI on MicroBus is enabled in u-boot
however, the CS pin is only available on the J7 connector
i’ll see if i can get SPI on P9-17/18/21/22 working later today
SPI MB (MikroBus)
SPI_SSN1 GPIO2_13 P9_41 N/A
SPI_SCLK GPIO2_14 P9_31 J7_10
SPI_CSN GPIO2_15 P9_28
SPI_MISO GPIO2_17 P9_29 J7_8
SPI_MOSI GPIO2_16 P9_30 J7_6
MB_CS GPIO2_20 J7_12
light_pin_mux(GPIO2_20,3); // MB_CS
light_pin_mux(SPI_SCLK,3); // MB_SCK
light_pin_mux(SPI_MISO,3); // MB_MOSI
light_pin_mux(SPI_MOSI,3); // MB_MISO
Hi @amf99
I tried several things but with no sucess - the maximun I achieved was listing the spidev under the /dev but couldn’t read anything.
I searched for the TRM for the C910 with no lucky - to check the pins names - but I believe I coudn’t disable the pins - all pins are listed as Led pins - and tried to enable - like was done in the bbbs - with soc and pinmux sections of the dtb but all with no lucky.
best regards.
after adding correct pin mux to u-boot, qspi1 has clock and CS on
P9-17/18/21/22 pins, connected a blank eeprom. so will need some kind of app to write and read from it.
i see in the beagle dts, they have it disabled and spidev, for this spi bus.
will work on it over the weekend, but the next 2 wks after that i will; not be able to work on it.
haven’t had time to work the mikroBUS spi bus.
I have a cape for ardupilot - and this cape runs on black and ai, and I was trying to use with beagle-v - but I believe I must wait a little bit until a more detailed dtb
I was searching for a tecnical reference manual for this processor but I couldn’t find anywhere to confirm the balls and registers (Expansion — BeagleBoard Documentation)
Hi @amf99
after a lot of tests, fights and discussions, I finally could use the SPI buses.
The only way I could done that was using the default pin controls (pinctrl_spi0 and pinctrl_qspi1).
I tried to declare my own controls once I need to use the pins with specific types but I coudn’t find anywhere wat is the values for INPUT/OUTPUT and PULLDOWN or PULLUP.
One change was about the SPI CS1 PIN, in BBBlack, BBGreen and BBAI the pin was P9_42 and now in the BeagleV is P9_41.
Best regards.
XuanTie-OpenC910-UserManual.pdf is a file to search for currently.
I found this to be way too intuitive for me. I am small time.
Seth
P.S. That may be helpful.
@silver2row found the pdf, seems to be very low level stuff, didn’t find anything in it with respect to spi.
Hi @silver2row
great, but have you had a link for this file ?
@Juvinski qspi1 works with a eeprom connected to it. only change to dts is to add the eeprom stuff to qspi1. i’m able to write, power off, power on, read what i wrote to the eeprom
/sys/class/spi_master/spi2/spi2.0/eeprom
tried to do the same with spi0, i get data from the chip, but not to my program,
i’m out of time, will check back after the surgery.
this site had it for OpenC906, just changed it to OpenC910 and here it is. lol
Thanks @amf99
I could use the three spi devices - the eeprom is easy do disable - just put an entry for the eeprom in the dts and state disabled.
Now I’m tring to get uarts - and will be another fight