BruceNaylor
Posts: 13
Joined: Sat Nov 15, 2014 5:28 pm
Location: Swindon, UK

SMI Documentation ?

Sat Nov 22, 2014 3:34 pm

Will the SMI (Secondary Memory Interface) documentation be released any time soon? For me it's become a major stumbling block on using the Compute Module for an industrial application.

Imminent? Within weeks? Within Months? Never?

Regards

Bruce.
Any landing you can walk away from is a good landing in my book.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23683
Joined: Sat Jul 30, 2011 7:41 pm

Re: SMI Documentation ?

Sat Nov 22, 2014 4:59 pm

What do you need it for? I've not heard of anyone else using it (that's not to say you don't have a good reason). I beleive Gert knows a bit about it so will ping him.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

User avatar
Gert van Loo
Posts: 2485
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: SMI Documentation ?

Sat Nov 22, 2014 10:20 pm

Yes, I know about it.
But as I no longer work for Broadcom I do not have access to the documentation anymore.
You will need that for the details but to be honest: the last time I used the interface
the documentation of the SMI is not that great. Good for some coarse idea but lacking
details which to me were important.

BruceNaylor
Posts: 13
Joined: Sat Nov 15, 2014 5:28 pm
Location: Swindon, UK

Re: SMI Documentation ?

Sun Nov 23, 2014 12:22 pm

The plan was to have a simple way to suck/spit multi-MB chunks of 16bit wide data with the least CPU overhead. Treat the SMI as DMA'able memory mapped I/O interfacing to an existing hardware solution based on an FPGA. See http://www.troika-systems.com for pics of the current system.
Any landing you can walk away from is a good landing in my book.

Neil
Posts: 98
Joined: Thu Sep 29, 2011 7:10 am
Contact: Website

Re: SMI Documentation ?

Tue Nov 25, 2014 11:40 pm

The Host Interface might also do what you want. It can be configured to do DMA transfers on a single 16-bit-wide channel, and the hardware supports the scheduling of transfer blocks for you. But I'm in the same boat as Gert and James so I'm just going by my fading grey cells.....

Neil

User avatar
Gert van Loo
Posts: 2485
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: SMI Documentation ?

Wed Nov 26, 2014 5:25 pm

Neil wrote:The Host Interface might also do what you want. It can be configured to do DMA transfers on a single 16-bit-wide channel, and the hardware supports the scheduling of transfer blocks for you. But I'm in the same boat as Gert and James so I'm just going by my fading grey cells.....

Neil
There is the tiny little 'issue' that the host port is not brought out on ANY of the versions.
Not even the computer module....

BruceNaylor
Posts: 13
Joined: Sat Nov 15, 2014 5:28 pm
Location: Swindon, UK

Re: SMI Documentation ?

Wed Nov 26, 2014 8:22 pm

Thanks for the input.

Is there really no way to get access to this documentation - officially or otherwise? No snipets of source, no other BC product that uses the same IP? SMI could open the way to an absolute ton of CM derived products.
Any landing you can walk away from is a good landing in my book.

User avatar
TonyD
Posts: 447
Joined: Thu Sep 08, 2011 10:58 am
Location: Newcastle, UK
Contact: Website

Re: SMI Documentation ?

Tue Dec 02, 2014 1:57 pm

To repeat what Bruce said, are they really no plans to release any information on the SMI?

I would like to add a fast ADC (>20Msps) for SDR experimentation or even a el-cheapo scope and was hoping the SMI would be the interface to do that.
Tony

cleverca22
Posts: 202
Joined: Sat Aug 18, 2012 2:33 pm

Re: SMI Documentation ?

Thu Jan 22, 2015 4:37 am

would somebody still with broadcom be able to put together a sample app like the other hello_pi stuff, to get the community started?

User avatar
LukeW
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9
Joined: Tue Jul 07, 2015 2:19 pm

Re: SMI Documentation ?

Mon Jul 11, 2016 4:29 pm

Thought I'd reply to this old thread as it is the first result on google, so other people may come here too, looking for info.

There is now an SMI driver -- see these commits:
https://github.com/raspberrypi/linux/co ... e30329c1d0
https://github.com/raspberrypi/linux/co ... c5917c580a

You can enable the SMI driver by putting

Code: Select all

dtoverlay=smi
into /boot/config.txt. Following this with

Code: Select all

dtoverlay=smi-dev
will enable a chardev interface (/dev/smi) which allows you to shove large amounts of data in and out of the SMI. There is also an experimental NAND flash driver:

Code: Select all

dtoverlay=smi-nand
which allows you to connect a NAND flash chip to the SMI pins and mount it.

There is no public documentation of the SMI peripheral, but if you check out the latter part of this header file (https://github.com/raspberrypi/linux/bl ... 2835_smi.h) you should find a decent summary of the registers and their contents.

Hope this helps.

greg2684
Posts: 2
Joined: Tue Apr 10, 2018 6:03 pm

Re: SMI Documentation ?

Mon Apr 23, 2018 9:09 pm

Sorry to resurrect this old thread, but LukeW (or anyone else), do you have any info on connecting a NAND flash chip to the SMI pins for use with the smi-nand driver (e.g. pinout mapping, etc.)? Scouring the Internet has not turned up anything.

User avatar
rpdom
Posts: 15209
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: SMI Documentation ?

Tue Apr 24, 2018 4:39 am

Some details are given the the BCM2835-ARM-Peripherals file (here). I think it was on page 102 or near there that most of the GPIO alternative pin mappings are listed. ALT1 on most pins is for SMI. The https://pinout.xyz site also shows them, but you have to check each pin to find its SMI function.

User avatar
Gavinmc42
Posts: 3739
Joined: Wed Aug 28, 2013 3:31 am

Re: SMI Documentation ?

Tue Apr 24, 2018 5:35 am

You need to dig out oldish ap notes, a quick google found some.

http://www.ti.com/lit/an/spra825/spra825.pdf
https://www.microsemi.com/document-port ... e-app-note

This one is cool- eMMC hacking
https://www.blackhat.com/docs/us-17/wed ... der-wp.pdf

Just wish there was a nice non BGA eMMC chip ;)
Plugin eMMC?

UHS on Pi4?
https://news.samsung.com/global/emmc-to ... s-evolving

SMI is very similar to IDE/Comp0act flash.
So could a embedded flash controller be used, it would do ECC?
http://www.siliconmotion.com/A3.2_Appli ... .php?sn=35
https://www.hyperstone.com/en/F9-Hypers ... -1217.html
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23683
Joined: Sat Jul 30, 2011 7:41 pm

Re: SMI Documentation ?

Tue Apr 24, 2018 8:58 am

There is a Pi SMI driver in the linux source tree, that can give a lot of hints to how it all works.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Heater
Posts: 13347
Joined: Tue Jul 17, 2012 3:02 pm

Re: SMI Documentation ?

Tue Apr 24, 2018 9:20 am

Yukimasa Sugizaki has what looks like a useful SMI diagnostic utility here, raspi-smi-util: https://github.com/Terminus-IMRC/raspi-smi-util

No documentation or comments in there but from the usage messages it can:

Get settings from SMI and print to stdout
Set settings to SMI, reading from stdin
Set addr of SMI
Write size bytes to SMI
Read size bytes from SMI

Not a bad start if it works. The code is pretty small so should be easy to follow what is going on there.

But where is the SMI pinout documentation so that I can hook up an FPGA and get something cooking with this?

Heater
Posts: 13347
Joined: Tue Jul 17, 2012 3:02 pm

Re: SMI Documentation ?

Tue Apr 24, 2018 10:00 am

LukeW,

So if I have "dtoverlay=smi" and "dtoverlay=smi-dev" in config.txt I then get a /dev/smi device.

Then what?

What pins is that device using? How are they used?

I'm getting the itch to talk to an FPGA via SMI.

Heater
Posts: 13347
Joined: Tue Jul 17, 2012 3:02 pm

Re: SMI Documentation ?

Tue Apr 24, 2018 10:05 am

Ouch!

"dtoverlay"= smi uses GPIOs 2-25!

OK, with that and the GPIO pinout docs I think we are set to start poking at it!

User avatar
Gavinmc42
Posts: 3739
Joined: Wed Aug 28, 2013 3:31 am

Re: SMI Documentation ?

Tue Apr 24, 2018 10:29 am

Something new for me.
http://www.onfi.org/

More datasheets.
http://www.cypress.com/products/1gb-8gb ... ash-memory

Perhaps start with the 8bit wide ones.
Easy to get a few, just pull apart old USB sticks ;)

NAND flash hat?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “General programming discussion”