Closed onyx99 closed 2 months ago
If this is the userspace interface that you're looking for then CONFIG_SPI_SPIDEV
needs to be enabled in the kernel config.
Yes exactly, thats why I'm trying to enable CONFIG_SPI_SPIDEV in the kernel configuration for the ESP32S3, but so far I'm encountering difficulties.
Here’s what I've done so far:
I enabled CONFIG_SPI_SPIDEV in the kernel config manually:
File edited: ~/build/buildroot/board/espressif/esp32s3/linux.config Added the following line:
CONFIG_SPI_SPIDEV=y
The relevant sections of the file now look like this:
CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_GPIO=y CONFIG_SPI=y CONFIG_SPI_ESP32=y CONFIG_SPI_GPIO=y CONFIG_SPI_SPIDEV=y I rebuilt the project using the following command:
nice ./rebuild-esp32s3-linux-wifi.sh keep_buildroot=y keep_rootfs=y keep_bootloader=y keep_toolchain=y Upon booting the ESP32S3, I checked for the spidev device using ls /dev, but it did not appear in the list.
Additionally, I tried using make menuconfig to locate the spidev setting by searching for spidev, but I only found the following symbols:
BR2_PACKAGE_PYTHON_SPIDEV BR2_PACKAGE_SPIDEV_TEST
i tried to enable both but without any result
Unfortunately, I couldn't locate the actual CONFIG_SPI_SPIDEV option in the menuconfig interface.
Request: Could you please guide me to the correct location and method to enable CONFIG_SPI_SPIDEV in the kernel configuration? Specifically, I'm looking for the correct folder, file, and configuration entry to ensure that spidev is properly enabled and recognized.
Thank you!
Upon booting the ESP32S3, I checked for the spidev device using ls /dev, but it did not appear in the list.
I've never used SPI from the userspace, but AFAICS in the spidev driver code it's not going to create its devices on its own, without entries in the device tree or without manually binding the driver to the device with the /sys
interface.
I rebuilt the project using the following command: nice ./rebuild-esp32s3-linux-wifi.sh keep_buildroot=y keep_rootfs=y keep_bootloader=y keep_toolchain=y
This would not rebuild anything that has been built already, you'd need to at least remove the package subdirectory under the build/build-buildroot-esp32s3/build
, i.e. for the linux kernel that'd be linux-xtensa-6.10-rc2-esp32-tag
.
Could you please guide me to the correct location and method to enable CONFIG_SPI_SPIDEV in the kernel configuration? Specifically, I'm looking for the correct folder, file, and configuration entry to ensure that spidev is properly enabled and recognized.
If you just ran the ./rebuild-esp32s3-linux-wifi.sh
you could do
XTENSA_GNU_CONFIG=`pwd`/build/xtensa-dynconfig/esp32s3.so make -C build/build-buildroot-esp32s3 linux-menuconfig
to edit the kernel configuration manually, followed by the
keep_buildroot=y keep_rootfs=y keep_bootloader=y keep_toolchain=y keep_etc=yes nice ./rebuild-esp32s3-linux-wifi.sh
to build and flash. Similarly you could reconfigure the buildroot by doing the
XTENSA_GNU_CONFIG=`pwd`/build/xtensa-dynconfig/esp32s3.so make -C build/build-buildroot-esp32s3 menuconfig
And if you wish to make permanent changes you should clone the parts where customizations are made and change the rebuild script to use these clones.
Thank you for your help, i got it working and is listed under /dev now :)
Hi,
How do i enable SPI? i notice it seems not enabled by default, do i need to set with menuconfig?
and if so please tell me how to enable
i only see gpio and i2c are enabled by default
Kind regards.