How to enable SPI devices on 3.14 kernel?

Sorry about that, i need to add backwards compatibility to that script.

I promise i only have one more earth shaking change coming down the pipe.

Regards,

done :wink:

dd if=MLO of=/dev/sdX count=1 seek=1 conv=notrunc bs=128k
dd if=u-boot.img of=/dev/sdX count=2 seek=1 conv=notrunc bs=384k

only works on omap4+ bootrom's (so the old omap34xx/omap36xx family is out)

I'm close to rolling out a new testing image that uses this feature..
The flasher gets more interesting as i need to remember to include the
MLO/u-boot.img somewhere in the ext4 partition for later flashing..

Regards,

done :wink:

dd if=MLO of=/dev/sdX count=1 seek=1 conv=notrunc bs=128k
dd if=u-boot.img of=/dev/sdX count=2 seek=1 conv=notrunc bs=384k

only works on omap4+ bootrom’s (so the old omap34xx/omap36xx family is out)

I’m close to rolling out a new testing image that uses this feature…
The flasher gets more interesting as i need to remember to include the
MLO/u-boot.img somewhere in the ext4 partition for later flashing…

Wait a minute, is this creating two partitions that are raw contents of each file ? Not sure what this is doing actually seems more like you’re dumping the raw content of each file onto the same partition. But I’ve actually never seen dd used this way.

OK, so I think I got that figured out. Was not familiar with “seek”, but am now. So what about uEnv.txt ?

/boot/uEnv.txt can be in any partition ( /dev/mmcblkXp1 -> /dev/mmcblkXp7* )

7: is the usual max enabled by default for most normal mmc host controllers
in linux.

Regards,

/boot/uEnv.txt can be in any partition ( /dev/mmcblkXp1 → /dev/mmcblkXp7* )

7: is the usual max enabled by default for most normal mmc host controllers in linux.

Regards,

Right, I get that, but in the case of NFS rootfs, how is uboot supposed to know to look over an NFS share ?

Right now, we have the main uEnv.txt file that resides where uboot.img, and MLO reside. This points to yet another( optional ? ) uEnv.txt for loading possibly common setenv variables. Will this just be hard coded to search /boot, no matter it’s location ?

Oh, and nearly forgot for the fifth time heh. What about g_multi file “share” ? The one that gets auto mounted on Windows machines. I do not use this myself, but I’m sure there are people out there who do use it.

So as of right now, it'll search for these files in this order:

(microSD)

Partition: 1 (fat/extX)
/uEnv.txt
/boot.scr
/boot/boot.scr

Then it'll loop thru partition's: 1 -> 7:
/boot/uEnv.txt

(eMMC)

Partition: 1 (fat/extX)
/uEnv.txt
/boot.scr
/boot/boot.scr

Then it'll loop thru partition's: 1 -> 7:
/boot/uEnv.txt

I've left the logic for the first partition for compatibility sake.

Regards,

That's why we've been moving every "critical" file out of that partition.

For the official lxde image, the fat partition will still be there,
but NO critical boot files will exist in. (a windows user can add a
'uEnv.txt/boot.scr/boot/boot.scr' and it will change the boot..

"In" theory, windows users should be able to re-format the drive too,
when it's shown in windows over the usb-gadget connection.

Regards,

That’s why we’ve been moving every “critical” file out of that partition.

For the official lxde image, the fat partition will still be there,
but NO critical boot files will exist in. (a windows user can add a
'uEnv.txt/boot.scr/boot/boot.

scr’ and it will change the boot…

“In” theory, windows users should be able to re-format the drive too,
when it’s shown in windows over the usb-gadget connection.

It is kind of sad that this is even necessary. In the context that the BBB is a dev board, and as such some knowledge / common sense should be implied.

It keeps things interesting. :wink: It Feels like bullet proofing the perfect
mouse trap!

Regards,

heh whatever you like Jason. Simply using lsblk, and mount should make things crystal clear.

…I think I should add this for completion

Also do:

#include “am335x-boneblack-nxp-hdmi-audio.dtsi”

to:

/#include “am335x-boneblack-nxp-hdmi-audio.dtsi”/

and if you want hdmi do:

/* #include “am335x-boneblack-nxp-hdmi-no-audio.dtsi”*/

to:

#include “am335x-boneblack-nxp-hdmi-no-audio.dtsi”

Hey Robert, I know this thread is getting long in the tooth. Originally I had asked for help on enabling the SPI devices on the 3.14 kernel. You got me past that with some patches. However, I just did a merge from the latest upstream and now my SPI devices are not enabled any more when I boot the kernel. This is what I have on the command line:

capemgr.enable_partno=BB-SPIDEV0,BB-SPIDEV1

Do these parts have different names now?

Thanks,

Dallas

I got it figured out. The SPI dev include dtsi were commented out after my merge. I guess the default state is SPI devices disabled.

I’d like to use SPI1 with 4.1 kenrel. I didn’t see a similar line in:
https://github.com/RobertCNelson/dtb-rebuilder/blob/4.1.x/src/arm/am335x-bone.dts

Is there another approach for 4.1?

thanks,
drew

Hey Drew,

Do you want to test the 4.1 spi overlays?? :wink:

if so do this:

sudo apt-get update
sudo apt-get install linux-image-4.1.0-rc6-bone6
sudo reboot

overlays:

git clone https://github.com/beagleboard/bb.org-overlays
cd bb.org-overlays

update dtc (only for 4.1.x + (breaks 3.8.x))

./dtc-overlay.sh

build/install overlays:

./install.sh

add overlays via: /boot/uEnv.txt

bone_capemgr.enable_partno=BB-SPIDEV0

(notice the name changed from "capemgr" -> "bone_capemgr" so update
the example in /boot/uEnv.txt

Future images have both listed..

Regards,

Thanks for the quick response! I will give it a try this weekend.

My goal is to get 1.8" Adafruit TFT working with 4.1's staging/ftbtft.
Matt Porter's old post had it wired up on SPI1:
http://engineersofthecorn.blogspot.com/2012/06/beaglebone-and-adafruit-18-spi-lcd.html

oops, I meant fbtft. This is the driver:
https://github.com/torvalds/linux/blob/master/drivers/staging/fbtft/fb_st7735r.c

thanks, that did work for me. although the uEnv.txt settings seemed
to have no effect. I had to echo the cape name into slots:

root@beaglebone:/# uname -a
Linux beaglebone 4.1.0-rc6-bone6 #1 Mon Jun 1 22:44:52 UTC 2015 armv7l GNU/Linux

root@beaglebone:/# cat /sys/devices/platform/bone_capemgr/slots
0: 54:PF---- -1
1: 55:PF---- -1
2: 56:PF---- -1
3: 57:PF---- -1

root@beaglebone:/# cat /boot/uEnv.txt |egrep -v '^(#|$)'
uname_r=4.1.0-rc6-bone6
cmdline=quiet init=/lib/systemd/systemd
bone_capemgr.enable_partno=BB-SPIDEV0
cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G

root@beaglebone:/# echo 'BB-SPIDEV0' > /sys/devices/platform/bone_capemgr/slots

root@beaglebone:/# cat /sys/devices/platform/bone_capemgr/slots
0: 54:PF---- -1
1: 55:PF---- -1
2: 56:PF---- -1
3: 57:PF---- -1
4: ff:P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-SPIDEV0

root@beaglebone:/# ls -la /dev/spi*
crw-rw---T 1 root spi 153, 1 Jun 7 21:03 /dev/spidev1.0
crw-rw---T 1 root spi 153, 0 Jun 7 21:03 /dev/spidev1.1

Here is additional output:
https://gist.github.com/pdp7/14a813bd3254254b94fe

thanks,
drew