LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 09-24-2024, 01:46 AM   #1
Genadi
LQ Newbie
 
Registered: Sep 2024
Posts: 2

Rep: Reputation: 0
Question dev/spidev is missing


Hello everyone

I recently took on a project to create a Linux image with basic hardware support for the NanoPi Neo SOM. This is my first experience working with embedded Linux, as my background has primarily been in developing hardware for microcontrollers.

For this task, I am utilizing Buildroot. While the output image works well, I have encountered an issue: I cannot find SPI support in the /dev/ directory, which I believe is crucial for my application. However, I do see some SPI-related files located in other parts of the system, such as /sys/bus/, /sys/class/, and /lib/modules/6.10.9/kernel/drivers/.

While calling make linux-menuconfig command and searching for SPI configuration it seems enabled:

Symbol: SPI_SPIDEV [=y]
│ Type : tristate
│ Defined at drivers/spi/Kconfig:1222
│ Prompt: User mode SPI device driver support
│ Depends on: SPI [=y] && SPI_MASTER [=y]
│ Location:
│ -> Device Drivers
│ -> SPI support (SPI [=y])
│ (1) -> User mode SPI device driver support (SPI_SPIDEV [=y])

This is what I found in ./buildroot/output/target/boot/sun8i-h3-nanopi-neo.dtb:

Quote:
pinctrl@1c20800 {
spi0-pins {
pins = "PC0\0PC1\0PC2\0PC3";
function = "spi0";
phandle = <0x14>;
};

spi1-pins {
pins = "PA15\0PA16\0PA14\0PA13";
function = "spi1";
phandle = <0x15>;
};
};

soc {
spi@1c68000 {
compatible = "allwinner,sun8i-h3-spi";
reg = <0x1c68000 0x1000>;
interrupts = <0x00 0x41 0x04>;
clocks = <0x03 0x1e 0x03 0x52>;
clock-names = "ahb\0mod";
dmas = <0x13 0x17 0x13 0x17>;
dma-names = "rx\0tx";
pinctrl-names = "default";
pinctrl-0 = <0x14>;
resets = <0x03 0x0f>;
status = "disabled";
#address-cells = <0x01>;
#size-cells = <0x00>;
phandle = <0x4e>;
};

spi@1c69000 {
compatible = "allwinner,sun8i-h3-spi";
reg = <0x1c69000 0x1000>;
interrupts = <0x00 0x42 0x04>;
clocks = <0x03 0x1f 0x03 0x53>;
clock-names = "ahb\0mod";
dmas = <0x13 0x18 0x13 0x18>;
dma-names = "rx\0tx";
pinctrl-names = "default";
pinctrl-0 = <0x15>;
resets = <0x03 0x10>;
status = "disabled";
#address-cells = <0x01>;
#size-cells = <0x00>;
phandle = <0x4f>;
};
};

__symbols__ {
spi0_pins = "/soc/pinctrl@1c20800/spi0-pins";
spi1_pins = "/soc/pinctrl@1c20800/spi1-pins";
spi0 = "/soc/spi@1c68000";
spi1 = "/soc/spi@1c69000";
};
I changed status from "disabled" to "okay" but it did not help.

Does anyone have insights into why this might be happening or suggestions for resolving this issue?

Thank you!

Last edited by Genadi; 09-24-2024 at 07:28 AM.
 
Old 09-24-2024, 08:36 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,418

Rep: Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389
Normally a dtb file is binary, so I'm guessing that is the dtb converted to human readable form. Changing it won't affect anything. You will need to either change the dts file and rebuild the dtb or enable SPI in the BIOS depending on why it is disabled.
 
Old 09-27-2024, 02:30 AM   #3
Genadi
LQ Newbie
 
Registered: Sep 2024
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by smallpond View Post
Normally a dtb file is binary, so I'm guessing that is the dtb converted to human readable form. Changing it won't affect anything. You will need to either change the dts file and rebuild the dtb or enable SPI in the BIOS depending on why it is disabled.
I moved to an official image and this question is not relevant any more

Thank you for your time.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SPIDEV implementation issues - probe not called Mintu123 Linux - Software 1 11-30-2015 01:35 AM
[SOLVED] why couldn't i access spi_read,spi_write in spidev.c?? yixiaoyang Linux - Newbie 2 03-28-2012 08:04 PM
initialise SPIDEV from userspace beaglebone Nixon Linux - Embedded & Single-board computer 0 02-23-2012 05:25 AM
Problems with SPI driver and spidev asmeti Linux - Software 2 11-11-2011 09:08 PM
imx51 - babbage - spidev driver problem - SCLK not generated linux_pn Linux - Software 1 02-16-2010 12:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 05:03 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions