Enabling SPI1 on BBGW via DeviceTree (no capemanager)

Hello,
I’m having trouble with, as stated in topic, enabling SPI1 via DeviceTree on BeagleBone Green Wireless.
Debian Stretch, kernels 4.4.62-ti-rt and 4.9.27-ti-rt.
I’ve added proper pinmux, but setting spi1 status to “okay” results in the board not coming online (seems to boot but no wireless communication).

.dts sources are here: https://github.com/GroupOfRobots/RobotConfig/tree/v3/DevTree
uEnv.txt is here: https://github.com/GroupOfRobots/RobotConfig/blob/v3/uEnv.txt

As of now, I can’t just switch to SPI0 - I’m using I2C1, some GPIOs and some PRU GPIOs that would conflict with it (see dts sources).

Problem “solved” (worked around really) by switching to SPI0, changing the pins around and rerouting most of our custom cape.
There are still some problems with the SPI bus but that’s a separate issue.

I had a similar issue with 4.9 kernel where I couldnt load SPI1 pins using BB-SPIDEV1. Apparently mcasp was also getting assigned the same pins, disabling audio in uEnv helps. Didnt really test it all the way, but I could see /dev/spidev* pins loaded and spidev module loaded. Hope this help,

Gaurav

As stated in the first post, I’ve tested it on 4.9 and 4.4, resulting in same behaviour on both. I’ve fully disabled mcasp in my .dtsi:

`

&mcasp0 {

status = “disabled”;

};

`
but it didn’t work. This may be due to the board being BBGW not BBB/BBBW - I’ve already encountered few other things that work differently and are poorly documented.
Also, the aim was to do it via pure DTB without any plugin/overlay (dtbo).

As I’ve written already, I’ve just switched to SPI0.
Additionally, the 4.9.x kernel seems to have some other ongoing issues (e.g. PRU RPROC not working in 4.9.32, bad wireless adapter MAC address in slightly earlier versions and so on) so I’ve reverted to the most up-to-date 4.4.x.

W dniu piątek, 23 czerwca 2017 19:08:41 UTC+2 użytkownik Gaurav S napisał:

I have same problems with SPI1. Guilty part seems to be wl18x that requires pulldown on certain pin. See /opt/source/dtb-4.4-ti/src/arm/am335x-bonegreen-wl1835.dtsi
(included by am335x-bonegreen-wireless.dts). Last fragment introduces gpio-hog of pin p9.30. I’ve tried to enable SPIDEV1 on boot which leads to wilink crashing on init.
Comment on file shows that it is somehow related to BT_AUD which I dont need but I need wlan and bluetooth. I dont know if that is hardwired or not but changing that hog-pin to another was NOT good idea…

So I need to re-route my wirings to SPI0 (which overlaps my I2C-2…) so i’ll be quite busy for a while…

Please inform here if solution is found.

perjantai 23. kesäkuuta 2017 18.33.16 UTC+3 mjbo...@gmail.com kirjoitti:

Hi,

I’m currently facing problems with getting the SPI0 to work on my beaglebone green.
I’m running debian 9.2 and kernel version 4.14.x
The board is using uBoot and so i use config-pin to configure the pins:

config-pin p9.17 spi
config-pin p9.18 spi
config-pin p9.21 spi
config-pin p9.22 spi

This gives no errors. But when i try to use the spidev1.0 or spidev1.1 i see no activity on the pins (i’m using a logic analyser to check)

I really need to get the SPI0 to work, I’m even willing to not use the uboot if that solves the problem, but i have a feeling that that makes it even more complex.

I hope you can help me. Thanks in advance.

My initial thought was the capacitors by the UART Groove connector as here: https://groups.google.com/d/msg/beagleboard/BH-PUmjv6O4/_sYj5Av1BgAJ , but upon inspection of BBG schematics (https://raw.githubusercontent.com/SeeedDocument/BeagleBone_Green/master/resources/BEAGLEBONE_GREEN_V1.pdf page 10) there should be no such capacitors. However it might still be worth verifying.

This might also be a kernel thing - it seems the maintainers are not really testing specific hardware in kernel versions closer to mainline, only whether it generally runs. I’ve never tested 4.14.x but I had serious issues even with 4.9.x and I’ve found 4.4.x to work the best. Unless your board is somehow exposed to the internet, I’d stick with the older but proven version.

With my solution I didn’t use config-pin utility and relied on custom device tree instead. It might be required to not only enable the pins but also setup the bus itself. Note the big “&spi0 {}” block: https://github.com/GroupOfRobots/RobotConfig/blob/master/DevTree/am335x-bonegreen-irys.dtsi

W dniu poniedziałek, 5 lutego 2018 22:12:30 UTC+1 użytkownik j.ro...@gmail.com napisał:

Hi,
I am trying to enable spi1 in my beaglebone green wireless board and already tried the above mentioned options. But spidev1.* device is not getting created in /dev.
Can anyone help me in this?

Thanks in advances.
Karry