Hi John,

On Sat, Mar 3, 2018 at 10:59 PM, John Morris <[email protected]> wrote:
> I'm having a heck of a time getting overlays working on the BBB with RCN's
> 2018-02 MK image.  I'm weak on the concepts to begin with, and here's what
> I've done.
>
> With the stock `/boot/uEnv.txt`, most pins aren't already assigned to any
> cape:
>
>     machinekit@beaglebone:~$ config-pin P9.18 lo
>     P9_18 pinmux file not found!
>     Pin has no cape: P9_18
>     machinekit@beaglebone:~$ ls -d /sys/devices/platform/ocp/ocp:P*
>     /sys/devices/platform/ocp/ocp:P9_19_pinmux
>     /sys/devices/platform/ocp/ocp:P9_20_pinmux
>
> Trying to load the universal cape with `config-pin overlay cape-universal`
> dumps a huge list of errors to the console and kernel oopses on the 4.14
> kernel.  On the 4.4 kernel, the pins seem to appear in
> `/sys/devices/platform/ocp/ocp:P*`, but `config-pin P9.18 lo` says "WARNING:
> GPIO pin not exported, cannot set direction or value!".  So I don't do that.
>
> Instead, I compile and install a .dts file with just the wanted pins, and
> add the line `uboot_overlay_addr0=/lib/firmware/bb_autoclave-00A0.dtbo` to
> `/boot/uEnv.txt`.  This doesn't seem to assign any pins, but I'm unclear
> whether it's a bad file or something else.
>
>
> https://github.com/zultron/autoclave_control/blob/master/etc/bb_autoclave.dts
>
> Compiling produces no unexpected errors:
>
>>     machinekit@beaglebone:~$ sudo dtc -O dtb -o
>> /lib/firmware/bb_autoclave-00A0.dtbo -b 0 -@ etc/bb_autoclave.dts
>>     /lib/firmware/bb_autoclave-00A0.dtbo: Warning (unit_address_vs_reg):
>> Node /fragment@0 has a unit name, but no reg property
>
>
>
> Maybe this is meaningful; the Linux 4.14 version:
>
>>     machinekit@beaglebone:~$ sudo /opt/scripts/tools/version.sh
>>     git:/opt/scripts/:[ad016da40de5805f1a6f981cbb6c454b1a7f244b]
>>     eeprom:[A335BNLT0A5A1513BBBK3416]
>>     model:[TI_AM335x_BeagleBone_Black]
>>     dogtag:[Machinekit Debian Image 2018-02-04]
>>     bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot
>> 2018.01-00002-g9aa111a004]
>>     bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot
>> 2015.01-00001-gb2412df]

Your old eMMC is blocking U-Boot Overlays:

sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=10


>>     kernel:[4.14.16-ti-rt-r30]
>>     uboot_overlay_options:[enable_uboot_overlays=1]
>>
>> uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/bb_autoclave-00A0.dtbo]
>> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
>>     uboot_overlay_options:[enable_uboot_cape_universal=1]

I'm in a middle of a rewrite to enable cape-universal in this
situation, currently your selection of
"uboot_overlay_addr0=/lib/firmware/bb_autoclave-00A0.dtbo" is blocking
cape-univesal:

Step 1: Upgrade to this bootloader:

sudo /opt/scripts/tools/developers/update_bootloader.sh --beta

Step 2: Install this kernel: (haven't backported the changes to
v4.14.x/v4.9.x/v4.4.x yet)

sudo /opt/scripts/tools/update_kernel.sh --bone-channel --exp

Step 3: in your overlay add a new fragment@0 section like this, but
with the pins your "bb_autoclave" uses:

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-BONE-4D4C-01-00A1.dts#L16-L53


>>     pkg:[bb-cape-overlays]:[4.4.20180126.0-0rcnee0~stretch+20180126]
>>     pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
>>     pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
>>     groups: �‘debian�’: no such user

opps, i need to check for machinekit too..

>>     groups:[]
>>     dmesg | grep pinctrl-single
>>     [    1.409569] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800
>> size 568
>>     dmesg | grep gpio-of-helper
>>     [    1.411448] gpio-of-helper ocp:cape-universal: ready
>>     END
>
>
> The Linux 4.4 version, slightly different:
>
>>     root@beaglebone:/home/machinekit# sudo /opt/scripts/tools/version.sh
>> [...]
>>     kernel:[4.4.113-ti-rt-r147]
>>     [...]
>>     dmesg | grep gpio-of-helper
>>     [    1.511377] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0
>>     [    1.511589] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1
>>     [    1.511604] gpio-of-helper ocp:cape-universal: ready
>>     END
>
>
> So who knows what dumb thing I'm missing?  Thanks!
>
>         John
>
> --
> website: http://www.machinekit.io blog: http://blog.machinekit.io github:
> https://github.com/machinekit
> --- You received this message because you are subscribed to the Google
> Groups "Machinekit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> Visit this group at https://groups.google.com/group/machinekit.
> For more options, visit https://groups.google.com/d/optout.



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

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to