New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4.1.x + overlay migration notes... #80
Comments
Oh cool, is that the new mainline support for the bone capemanager with dynamic device tree overlays? Thanks for the heads up as we'll likely need to make some changes to support it. Do you have a BBB Debian version with the 4.1 kernel support yet to start testing it out with? :) |
Hi Tony, Trying to get a *.deb out, but we need to upgrade gcc on: I'll post a test *.deb later tonight. But, v4.1.0-rc3 this weekend will default to it and be in the repo. btw, feel free to fork the overlay repo and add your guy's *.dts's i'm going to be having that repo installed by default on the bb.org images.. Regards, |
Correct, this is the "new" capemgr panto has been working on getting mainline: https://github.com/pantoniou/linux-beagle-track-mainline/commits/bbb-overlays Regards, |
Awesome, thanks for all the work as always to make the latest releases available! Just curious too, is there any timeline for when you might switch to this 4.1-based kernel as the 'official' Debian release for BBB users? Want to make sure we can get the fixes in, etc. for it. |
I'd say, just as soon as we test/confrm all these capes: https://github.com/beagleboard/devicetree-source/tree/master/arch/arm/boot/dts I've got a lot of them, for some I'll be hitting up ebay! But I'm trying to get the bb.org community and all downstream v3.8.x users involved.. That way when we switch, everything works 100%! The lcd's are still going to be a pain thou. Regards, |
Adafruit-BBIO==0.0.30 support the latest kernel of 4.1.0-rc7-bone7 when I try to use ADC utility, the following error popups, but GPIO utility of the library is okay.
I update the latest kernel, and install bb.org-overlays. I enable ADC in uEnv.txt by optargs=dtb=am335x-boneblack-overlay.dtb My kernel message about capemgr is the following. Related ADC sysfs is available at root@beaglebone:~/python# dmesg | grep capemgr |
Is there any update on this? I would be very interested in this and willing to help where I can, even if its just to help testing. |
I had the same issue. The problem seems to lie in the way Adafruit-BBIO library tries to access the adc devices using the old 3.8.x kernels device tree. Few months ago I've submitted a pull request for a patched version of Adafruit-BBIO library that works with the new >=3.14 device tree structure, but so far I've not received any comments. It's just a starting point and it needs further development. |
Maybe it's too late, it has been months since this thread started, but it could help someone like me when i came here the first time. Then: Seems to work :-) |
I'm also having trouble using Adafruit_BBIO on a beagleboneblack running Ubuntu 14.04.3 and kernel 4.1.12. That patch you referenced looks helpful, but does it require that I recompile my kernel? Seem strange that I would need to patch and recompile my kernel just to get basic I/O to work. Might be easier just to revert to default Angstrom, since I don't have a kernel development environment setup. |
@iandow |
How do I apply this patch? |
Right now i dont have my laptop but if i remeber correctly its something líke |
Concise instructions (starting from scratch) for people landing here from other issues / webpages: git clone https://github.com/adafruit/adafruit-beaglebone-io-python.git
cd adafruit-beaglebone-io-python
wget https://gist.githubusercontent.com/grizmio/bc752dd070652f21266b/raw/336b5ab5ad14ef28341edfeff6cbf20d959d2f70/gistfile1.txt
git apply gistfile1.txt
sudo python setup.py install
cd ..
sudo rm -rf adafruit-beaglebone-io-python # Unless you want to keep it around ofc |
tried it with and without the patches on newest debian 8.3 image from BB.org |
I can say the same. I also did have to monkey with it a bit--Python couldn't find the new egg, so I unzipped it and copied the code to my virtualenv's site-packages. But yeah, no PWM in Linux 4.1. I'll be switching back to 3.8 til someone gets it to work. |
Hi, i'm trying to apply the patch and get the PWM working. But I get this error when I try to
Could you guys resolve it? How to get it working? |
@keerthanamanivannan I am working on getting PWM in Adafruit_BBIO to work with Linux kernel 4.1+. I'm keeping track of my progress here: #103 |
@keerthanamanivannan PWM support for Linux kernel 4.1+ has now been merged from #108 |
@RobertCNelson I believe with #96 and #108 now merged, this library works OK with Linux kernel 4.1+ |
@pdp7 awesome. thanks! |
hi @pdp7 , I am working with Linux beaglebone 4.4.21-bone13 . And I have went through the post and several sites. Basically for PWM. But After applying all patches. (and sources from the merged libraries ) I am still not able to load pwm's. |
@zerrcol Could you please paste the commands and/or code that you are using? Also, please post output of:
|
Hi @pdp7 , root@beaglebone:/lib/firmware# cat /sys/devices/platform/bone_capemgr/slots #Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 uname_r=4.4.21-bone13 ##BeagleBone Black/Green dtb's for v4.1.x (BeagleBone White just works..) ##BeagleBone Black: HDMI (Audio/Video) disabled: ##BeagleBone Black: eMMC disabled: ##BeagleBone Black: HDMI Audio/eMMC disabled: ##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled: ##BeagleBone Black: wl1835 ##BeagleBone Green: eMMC disabled cmdline=quiet cape_universal=enable #In the event of edid real failures, uncomment this next line: ##Example v3.8.x ##Example v4.1.x ##enable Generic eMMC Flasher: #cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.shcat /etc/debian_version I have managed to get UART working ( you can suggest the correct way if I not did properly). |
@zerrcol I think you'll need to disable In
to
You should then be able to load the device tree overlays for PWM. Alternatively, you could keep |
also @pdp7 #Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 uname_r=4.4.21-bone13 ##BeagleBone Black/Green dtb's for v4.1.x (BeagleBone White just works..) ##BeagleBone Black: HDMI (Audio/Video) disabled: ##BeagleBone Black: eMMC disabled: ##BeagleBone Black: HDMI Audio/eMMC disabled: ##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled: ##BeagleBone Black: wl1835 ##BeagleBone Green: eMMC disabled cmdline=quiet #In the event of edid real failures, uncomment this next line: ##Example v3.8.x ##Example v4.1.x ##enable Generic eMMC Flasher: |
Hi @pdp7 , |
@zerrcol I'd like to get a better understanding exactly of what you are typing and what the output is. Could you post the entire transcript of the terminal or make screenshots of the terminal? Is there Python code that you are running before that error occurs? |
Hi @pdp7 , |
@zerrcol are you trying to apply the patch that @grizmio created? PWM support for Linux kernel 4.1+ has now been merged from #108 by @PeteLawler. Have you installed the latest version of this repo on your BeagleBone? |
Yes @pdp7 , |
@zerrcol Have you installed the latest version of No patches should be necessary anymore. Linux 4.1+ support has been merged into
|
hi @pdp7 , I have downloaded adafruit bbio only from master. and directly I am using that only. No separate patches That I am using. |
@zerrcol Ah ok, that is good to know. You previously wrote that you were trying to load PWM and saw this error:
Does that occur during bootup? I'd suggest commenting out the
Then try loading those capes individually from the command line. Please copy and paste the contents of your terminal after doing that, including any errors from |
@pdp7 |
@zerrcol The reason I think it would be good to comment out |
Running uname -a 0: PF---- -1 where my BB-W1-P8.11 is a dts for DS1822/DS18B20 one wire temperature sensors. ##Enable the One Wire interface on P8-11 The cape_enable doesn't work. I still have to echo the dtbo out to the slots file but without the disable there's a pin conflict from cape_universaln. Trying python script with But I'm not able to write out to a GPIO pin. The Python code does the following: bbb.setup("P9_12",bbb.OUT) # Set GPIO P9_12 control to output Is this still the approach from the 3.8 kernel? What am I missing in the python program? All the books I have and most web pages don't appear to address the newer device tree approach. |
@jcdammeyer compare your w1 dts file with this version: https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-W1-P9.12-00A0.dts Regards, |
Thanks Robert, /opt/source/bb.org-overlays/include/dt-bindings into a comment in front of the three include statements. root@beaglebone:/# find -name dt-bindings The second one on my BBB was the location of your include files. Neither mine, which is derived from TI, nor yours, have enough comments to explain why the fragment@1 uses target =<&ocp>; verses target_path=”/”; Not sure why mine uses onewire@0 in fragment@1 while yours uses just onewire. And GPIO_ACTIVE_HIGH is certainly more descriptive than ‘0’ but one has to find the include file to learn what it is. My ultimate goal is to embed this information into the EEROM of a cape along with several other GPIO definitions. Having never done that it’s a new area for me. I suspect I have to create one .dts file that has all of the definitions in it. So if I want to keep using “P8.11” for my One Wire but want to add a LED drive for Cape Active to “P9.12” I imagine it’s just added to the fragment 0 and 1 structures. Thanks for the feedback. From: Robert Nelson [mailto:notifications@github.com] @jcdammeyer https://github.com/jcdammeyer compare your w1 dts file with this version: |
My dts file was stripped in the reply. I've added a .txt to it. Still not sure why the cape_enable in uEnv.txt doesn't work nor can I find out in which script cape-universaln is loaded. Also, interesting point. Sign into Cloud9 and run this simple Python example and my scope shows the output toggling. Very peculiar. import Adafruit_BBIO.GPIO as GPIO And my Python tcpServer.py running in the background is still serving up temperatures from the DS1822 One-Wire device to an Android Tablet running a Client app written in Embarcadero Delphi. |
@jcdammeyer could you please open up a new issue? That will make it easier to keep track of the specific problem that you are experiencing. |
linux repo: https://github.com/beagleboard/linux/tree/4.1
overlay repo: https://github.com/beagleboard/bb.org-overlays
slots:
enable/disable cmdline:
uart:
edit 1: module name: beaglebone_capemgr -> bone_capemgr
The text was updated successfully, but these errors were encountered: