Activate SPI drivers on SAMA5D27

Moderator: nferre

guillemrbaiges
Posts: 3
Joined: Fri Jul 20, 2018 4:13 pm

Activate SPI drivers on SAMA5D27

Fri Jul 20, 2018 4:18 pm

Hi, I've been struggling with this topic for quite a long now. I've found information about SAMA5D3 system but unfortunately this looks like a very specific. I'm working with RoadRunner Berta board (ACME systems), a Linux embedded system on module designed around the Microchip SAMA5D27. I'd really appreciate if somebody that has already worked with this board or microprocessor could help me with activating the SPI drivers. Thanks!
blue_z
Location: USA
Posts: 1745
Joined: Thu Apr 19, 2007 10:15 pm

Re: Activate SPI drivers on SAMA5D27

Sat Jul 21, 2018 1:30 am

guillemrbaiges wrote:... this looks like a very specific.
...
... activating the SPI drivers.
You need to rephrase your question to actually be specific.
What do you mean by "activate"? In what context?
If this is a question about Linux kernel drivers, then why not post in the Linux forum instead of this board forum?

Typically there is no driver for the interface itself.
Are you referring to a device driver for the SPI master or for a SPI slave?
Are you referring to a device driver for the SPI controllers that are integrated in the SoC?
Are you referring to a device driver for some peripheral that has a SPI interface?

Essentially you're asking an XY question, and a vague one at that.
Instead of asking about an abstract task that you think needs to be accomplished, describe the actual problem with details of your circumstances.

Regards
guillemrbaiges
Posts: 3
Joined: Fri Jul 20, 2018 4:13 pm

Re: Activate SPI drivers on SAMA5D27

Sat Jul 21, 2018 10:52 am

Hi, thanks for your quick answer. Sorry for not being concrete, I thought this was a common question and wouldn't need a dense explanation.

As I said, I've found material in this same community regarding the same topic but for different microprocessors, specifically for the SAMA5D3. What I need is the device tree binding for enabling and configuring SPI, to upload to the .dts file.

Here I attach the post and another link with some examples of device tree bindings for the specific board I'm using (unfortunately it does not have the SPI DTB example for RoadRunner). This is exactly what I need but for the SAMA5D27 microprocessor.

SAMA5D3 SPI enabling: viewtopic.php?t=25273
DTB for AcmeSystems boards: https://www.acmesystems.it/dts_bindings

Thanks again!
blue_z
Location: USA
Posts: 1745
Joined: Thu Apr 19, 2007 10:15 pm

Re: Activate SPI drivers on SAMA5D27

Tue Jul 24, 2018 2:03 am

guillemrbaiges wrote:unfortunately it does not have the SPI DTB example ...
DTB for AcmeSystems boards
First off, do not make up your own acronym. It's confusing and makes your post difficult to understand.
A compiled .dts (Device Tree source) file produces a .dtb file, a Device Tree binary, aka blob.
Nobody but you uses "DTB" to refer to DT bindings.

guillemrbaiges wrote:I thought this was a common question and wouldn't need a dense explanation.

As I said, I've found material in this same community regarding the same topic but for different microprocessors, specifically for the SAMA5D3. What I need is the device tree binding for enabling and configuring SPI, to upload to the .dts file.
You seem defensive and persistent in claiming that your question does not need elaboration.
Previously you only mentioned "activating the SPI drivers".
Now you mention the Device Tree.
That's a different topic.
(Bindings are not "uploaded".)

You haven't responded to the questions to clarify what you're doing.
Study Documentation/spi/spi-summary and Documentation/devicetree/bindings/spi/spi_atmel.txt

Regards
guillemrbaiges
Posts: 3
Joined: Fri Jul 20, 2018 4:13 pm

Re: Activate SPI drivers on SAMA5D27

Tue Jul 24, 2018 5:44 pm

Hi, sorry one more time for not being able to express myself clear, I'll try my best.

It is indeed the device tree binding what I am looking for. The thing is, the /dev/ directory of our board does not show the SPI drivers. We did some research and found we had to add all the information related to them in the device tree binding in order to enable and configure them, but we did not find this info neither in the datasheet nor any webpage.

The second link you've shared in your second message is exactly what I need, both for the spi0 and the spi1, but with the specific configuration for our microprocessor. Do you know where I can find this information?

Regards.
blue_z
Location: USA
Posts: 1745
Joined: Thu Apr 19, 2007 10:15 pm

Re: Activate SPI drivers on SAMA5D27

Wed Jul 25, 2018 1:19 am

guillemrbaiges wrote:It is indeed the device tree binding what I am looking for.
That's already obvious.
guillemrbaiges wrote:The thing is, the /dev/ directory of our board does not show the SPI drivers.
That directory doesn't contain any drivers. It's for device nodes.
And if you bothered to read the kernel documentation and answered my questions, you'd be more specific than repeatedly write the ambigous "SPI drivers".

guillemrbaiges wrote:... both for the spi0 and the spi1, but with the specific configuration for our microprocessor.
The purpose of the Device Tree is to describe the board configuration to the kernel.
The Device Tree has to be specific for your entire board, and not just specific for your MPU.

For examples of the SPI master controller nodes, look at a .dts of a board that uses the same SoC, such as at91-sama5d2_ptc_ek.dts.
But beware of kernel versions, as binding requirements can change between kernel versions.

Regards

Return to “SAMA5-based”

Who is online

Users browsing this forum: Google [Bot] and 2 guests