I have been struggling with the configuration for a couple days now for the RPi header. I ended up building the Yocto and enabling the CP2130 driver in the kernel to be able to get it loaded into the system.
I have spidev0.0 in my /dev
I am now having a few issues understanding how to configure the CP2130.
The board I am connecting to CS is connected to pin 24 on RPi header. As well, pin 26 I need configured as a GPIO to control the reset of the board.
I have issued the following command to configure SPI:
echo -n 1,1,-1,1,1,1,4,0,0,0,0,spidev > /sys/devices/platform/msm_hsic_host/usb1/1-1/1-1.1/1-1.1:1.0/channel_config
It takes and creates a spidev32766.1
But, I am struggling on how to configure the GPIO.2 on the CP2130. I can see that when booting up linux finds the chips and creates gpiochip501 (it also says it has 11 ports). I am not sure what to export here using sysfs to create the gpio to then control.
Can someone please provide some confirmation on the SPI configuration as well as what commands I need to issue to configure the GPIO.2 to be an output?