Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2017-01-16 Thread Thomas Hoppe
Hi, 
I'm having an issue with a SPI device that works with Kernel 3.8. but not 
with the 4.4.x series. I have also tried the latest one 4.4.41-ti-r82.
The device exists in both cases and I cannot think of a reason. 
Can you give me a hint what I might try to debug it?
I tried the SPI loopback test from the kernel code and it seems to work in 
both cases.
BG, Thomas

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/44cec6e5-788c-433d-b7e2-f86be30d2276%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-12-15 Thread William Hermans
If you load overlays that are already included in your image, then you do
not have to update the initramfs. But if you create your own custom
overlay, it will not be included in the initramfs.

On Thu, Dec 15, 2016 at 4:10 PM, Phil  wrote:

> Thanks for the info. I am not so sure about the need to update initramfs
> though. Just for yuks, I specified my custom overlay in uEnv.txt, and it
> seems to have loaded properly, which I confirmed by inspecting the output
> of dmesg. I am still verifying that my SPI ports work as expected (phase
> and polarity, mostly), but it seems to be working.
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/cbf34cf0-aa12-471f-afc5-375008b3e5bc%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORq6pAb2kAkB_ORwsSNd%2BOETpduWuQEHXXC8cx0TkXmN-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-12-15 Thread Phil
Thanks for the info. I am not so sure about the need to update initramfs 
though. Just for yuks, I specified my custom overlay in uEnv.txt, and it 
seems to have loaded properly, which I confirmed by inspecting the output 
of dmesg. I am still verifying that my SPI ports work as expected (phase 
and polarity, mostly), but it seems to be working.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/cbf34cf0-aa12-471f-afc5-375008b3e5bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-12-15 Thread William Hermans
On Thu, Dec 15, 2016 at 12:36 PM, Phil  wrote:

> On Thursday, December 15, 2016 at 11:20:13 AM UTC-6, Phil wrote:
>
I have written a device tree overlay that incorporates SPI0, SPI1 and the
> PRUSS, and where SPI1 uses a GPIO for a 2nd chip select. Can I load this in
> the same manner via the kernel parameter in /boot/uEnv.txt? If this isn't
> the right way, then what is?
>

So whatever way that works for you, is the right way. But yes, in my own
opinion loading from uEnv.txt is the proper way. As the pin configurations
take place the quickest possible after a boot.


   1. So you need the overlay in /lib/firmware of course.
   2. Then you need to add the overlay to the
   cape_enable=bone_capemgr.enable_partno= line in uEnv.txt
   3. Finally you'll need to update the initramfs

To update the initramfs You need to:

william@beaglebone:~$ cd /opt/scripts/
william@beaglebone:/opt/scripts$ git pull /* So you need to sudo apt-get
install git - If not already installed */

william@beaglebone:/opt/scripts$ cd tools/developers/

william@beaglebone:/opt/scripts/tools/developers$ sudo ./update_initrd.sh

william@beaglebone:/opt/scripts/tools/developers$ sudo reboot

Then your custom overlay will be "injected" into the initramfs, and
properly load at boot.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORqYzrWkMi_K3Lyjj%2B44bVALvaUbS%3Dm8nDxu86pyRRXFfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-12-15 Thread Phil
On Thursday, December 15, 2016 at 11:20:13 AM UTC-6, Phil wrote:
>
> I am having almost the identical issue with SPI as pbft, except that I am 
> running BBB's with *4.4.19-bone-rt-r13* and *4.4.38-bone-rt-r14*. I 
> assume these can be fixed as per your suggestion, but it appears that the 
> dtb-rebuilder is for the TI kernels only. Is this the case? If so, how 
> should I proceed? Or is there some other problem entirely? Any guidance 
> would be appreciated.
>
 

Ok, I found 
https://github.com/adafruit/adafruit-beaglebone-io-python/issues/94 and 
followed the instructions there. It works! Which leads me to my next 
comments/questions:

I have written a device tree overlay that incorporates SPI0, SPI1 and the 
PRUSS, and where SPI1 uses a GPIO for a 2nd chip select. Can I load this in 
the same manner via the kernel parameter in /boot/uEnv.txt? If this isn't 
the right way, then what is?

Phil 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/933b1f86-4917-4d04-ab01-d6ca4d75ef6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-12-15 Thread Phil
I am having almost the identical issue with SPI as pbft, except that I am 
running BBB's with *4.4.19-bone-rt-r13* and *4.4.38-bone-rt-r14*. I assume 
these can be fixed as per your suggestion, but it appears that the 
dtb-rebuilder is for the TI kernels only. Is this the case? If so, how 
should I proceed? Or is there some other problem entirely? Any guidance 
would be appreciated.

Thanks,
Phil

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/9b8b72d4-dd75-40fb-b348-a2b25e21a1cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-10-03 Thread pbft
Fixed and working - thanks for your help and your quick response. I *could* 
have banged my head against the wall a good deal longer on this one. It 
feels so good when you stop doing that.

On Monday, October 3, 2016 at 4:58:55 PM UTC-4, RobertCNelson wrote:
>
> On Mon, Oct 3, 2016 at 3:54 PM, pbft  
> wrote: 
> > Killing me here - I'm running 4.4.21-ti-r45. Is it worth just getting 
> the 
> > newer kernel? 
>
> Yeah, just upgrade: 
>
> sudo apt-get update 
> sudo apt-get install linux-image-4.4.21-ti-r47 
> sudo reboot 
>
> https://github.com/RobertCNelson/ti-linux-kernel-dev/commits/ti-linux-4.4.y 
>
> r46: bbgw wl/bt_en hacks 
>
> r47: 
> tilcdc fixes (lcd panels work again) 
> fixed edt-ft5x05 touchscreen 
> spi overlay fix.. 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2f43360b-b650-40c5-adff-c2c7e0242630%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-10-03 Thread pbft



Thanks. Love your work, by the way. Pretty near perfect for my needs. We 
have an open-source building control built on top of the BBB - we created 
the world's largest cape and stuffed it with industrial-grade I/O:




On Monday, October 3, 2016 at 4:58:55 PM UTC-4, RobertCNelson wrote:
>
> On Mon, Oct 3, 2016 at 3:54 PM, pbft  
> wrote: 
> > Killing me here - I'm running 4.4.21-ti-r45. Is it worth just getting 
> the 
> > newer kernel? 
>
> Yeah, just upgrade: 
>
> sudo apt-get update 
> sudo apt-get install linux-image-4.4.21-ti-r47 
> sudo reboot 
>
> https://github.com/RobertCNelson/ti-linux-kernel-dev/commits/ti-linux-4.4.y 
>
> r46: bbgw wl/bt_en hacks 
>
> r47: 
> tilcdc fixes (lcd panels work again) 
> fixed edt-ft5x05 touchscreen 
> spi overlay fix.. 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7765ff5e-eb20-4c9c-82f2-184dc04ef82b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-10-03 Thread Robert Nelson
On Mon, Oct 3, 2016 at 3:54 PM, pbft  wrote:
> Killing me here - I'm running 4.4.21-ti-r45. Is it worth just getting the
> newer kernel?

Yeah, just upgrade:

sudo apt-get update
sudo apt-get install linux-image-4.4.21-ti-r47
sudo reboot

https://github.com/RobertCNelson/ti-linux-kernel-dev/commits/ti-linux-4.4.y

r46: bbgw wl/bt_en hacks

r47:
tilcdc fixes (lcd panels work again)
fixed edt-ft5x05 touchscreen
spi overlay fix..

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYh%2BVNeSJDS_jivYSjx5YvS%3D_pcKKcZ0iV%3DdKdW%2BMoaBog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-10-03 Thread pbft
Killing me here - I'm running 4.4.21-ti-r45. Is it worth just getting the 
newer kernel?

On Monday, October 3, 2016 at 4:52:45 PM UTC-4, RobertCNelson wrote:
>
> On Mon, Oct 3, 2016 at 3:46 PM, pbft  
> wrote: 
> > Thanks. I'm using your precompiled kernel, so I assume I checkout / 
> download 
> > your 'dtb-rebuilder' and recompile the am335x dtb files that live in 
> > /boot/dtbs// - correct? 
>
> yeah.. 
>
> Or if your running: 4.4.21-ti-r47 or newer, r47 was the first 4.4.x 
> release with the spi edma workaround disabled by default.. 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/92ff21c2-9ca9-4dd6-94c7-685d0c83f7ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-10-03 Thread Robert Nelson
On Mon, Oct 3, 2016 at 3:46 PM, pbft  wrote:
> Thanks. I'm using your precompiled kernel, so I assume I checkout / download
> your 'dtb-rebuilder' and recompile the am335x dtb files that live in
> /boot/dtbs// - correct?

yeah..

Or if your running: 4.4.21-ti-r47 or newer, r47 was the first 4.4.x
release with the spi edma workaround disabled by default..

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYhiWGofqQv0CHjM0bH-t-04Que_QM7A0voCG6GccXAB5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-10-03 Thread pbft
Thanks. I'm using your precompiled kernel, so I assume I checkout / 
download your 'dtb-rebuilder' and recompile the am335x dtb files that live 
in /boot/dtbs// - correct?



> Disable the "edma-fix" it's causing spi issues in v4.4.x 
>
> Just comment out it out like: 
>
>
> https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-boneblack.dts#L12
>  
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/fca11a14-4d0e-41fe-bbec-067866a5899b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-10-03 Thread Robert Nelson
On Mon, Oct 3, 2016 at 3:20 PM, pbft  wrote:
> I have several overlays that I've been using with an earlier (4.1.10)
> kernel. In trying to port everything to a more recent kernel, my two SPI
> overlays don't create pingroups and don't set pinmux attributes. I've
> recompiled them using the dtc that came with the new kernel with no effect.
> They load with no errors and appear in the slots file, but the SPI buses
> don't work and there are no SPI pingroups.
>
> Other overlays (for uarts, for instance) load properly and create pingroups
> as expected.
>
> On the same hardware, the earlier kernel works fine with the same overlays -
> the overlays load and the expected pingroups are created.
>
> The SPI overlays are the defaults, except that CS1 is enabled on spidev1.

Disable the "edma-fix" it's causing spi issues in v4.4.x

Just comment out it out like:

https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-boneblack.dts#L12

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYi%3DPJeBni%2BmETKoD%2BaU1PeR%3DPbZoU-As6qACG%3DhJK458A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Overlay does not create SPI pingroups with 4.4.21 kernel

2016-10-03 Thread pbft
I have several overlays that I've been using with an earlier (4.1.10) 
kernel. In trying to port everything to a more recent kernel, my two SPI 
overlays don't create pingroups and don't set pinmux attributes. I've 
recompiled them using the dtc that came with the new kernel with no effect. 
They load with no errors and appear in the slots file, but the SPI buses 
don't work and there are no SPI pingroups.

Other overlays (for uarts, for instance) load properly and create pingroups 
as expected.

On the same hardware, the earlier kernel works fine with the same overlays 
- the overlays load and the expected pingroups are created.

The SPI overlays are the defaults, except that CS1 is enabled on spidev1.

What's the next step in debugging this?

dmesg excerpt - same as with old kernel:
*[ 6071.124287] bone_capemgr bone_capemgr: part_number 'BB-SPIDEV1', 
version 'N/A'*
*[ 6071.124320] bone_capemgr bone_capemgr: slot #4: override*
*[ 6071.124335] bone_capemgr bone_capemgr: Using override eeprom data at 
slot 4*
*[ 6071.124351] bone_capemgr bone_capemgr: slot #4: 'Override Board 
Name,00A0,Override Manuf,BB-SPIDEV1'*
*[ 6071.140084] bone_capemgr bone_capemgr: slot #4: dtbo 
'BB-SPIDEV1-00A0.dtbo' loaded; overlay id *

New kernel pin states:
*pin 89 (44e10964.0) 0027 pinctrl-single *
*pin 100 (44e10990.0) 0027 pinctrl-single *
*pin 101 (44e10994.0) 0027 pinctrl-single *
*pin 102 (44e10998.0) 0027 pinctrl-single *
*pin 103 (44e1099c.0) 0027 pinctrl-single *

*pin 89 (44e10964.0): (MUX UNCLAIMED) (GPIO UNCLAIMED)*
*pin 100 (44e10990.0): (MUX UNCLAIMED) (GPIO UNCLAIMED)*
*pin 101 (44e10994.0): (MUX UNCLAIMED) (GPIO UNCLAIMED)*
*pin 102 (44e10998.0): (MUX UNCLAIMED) (GPIO UNCLAIMED)*
*pin 103 (44e1099c.0): (MUX UNCLAIMED) (GPIO UNCLAIMED)*

Old kernel (working) pin states:
*pin 89 (44e10964.0) 0012 pinctrl-single *
*pin 100 (44e10990.0) 0033 pinctrl-single *
*pin 101 (44e10994.0) 0033 pinctrl-single *
*pin 102 (44e10998.0) 0013 pinctrl-single *
*pin 103 (44e1099c.0) 0013 pinctrl-single *

*pin 89 (44e10964.0): 481a.spi (GPIO UNCLAIMED) function 
pinmux_bb_spi1_pins group pinmux_bb_spi1_pins*
*pin 100 (44e10990.0): 481a.spi (GPIO UNCLAIMED) function 
pinmux_bb_spi1_pins group pinmux_bb_spi1_pins*
*pin 101 (44e10994.0): 481a.spi (GPIO UNCLAIMED) function 
pinmux_bb_spi1_pins group pinmux_bb_spi1_pins*
*pin 102 (44e10998.0): 481a.spi (GPIO UNCLAIMED) function 
pinmux_bb_spi1_pins group pinmux_bb_spi1_pins*
*pin 103 (44e1099c.0): 481a.spi (GPIO UNCLAIMED) function 
pinmux_bb_spi1_pins group pinmux_bb_spi1_pins*





-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/9b0503c7-8794-4286-ba63-3eb4b82d7bab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.