Skip to content
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

Add support for BeagleBone AI #669

Open
wants to merge 148 commits into
base: dev-next
Choose a base branch
from

Conversation

DhruvaG2000
Copy link
Contributor

@DhruvaG2000 DhruvaG2000 commented Aug 10, 2021

This PR aims to add support for the BeagleBone AI running Linux beaglebone 4.19.94-ti-xenomai-r64
NOTE The necessary BELA Cape overlay for BeagleBone AI can be found here: BBAI-BELA-00A1.dts

Feature List:

  • Creation of PruManager which helps migrate to using the remote processor framework on newe kernels while also maintaining backward compatibility for libprussdrv on the Am335x.
  • New workflow for building the PRU code with clpru. (Which has been integrated in the Makefile)
  • The core as well as PRU codes now decide at compile time depending on which board they are running on, which base constants are to be used by the code.
  • Add McASP configuration that works on AM572x.
  • Add GPIO support for AM572x.
  • Add SPI support for AM572x

Limitations:

  • Xenomai patched kernel (Linux beaglebone 4.19.94-ti-xenomai-r64) crashes on boot, and the board needs to be reset a couple of times to properly boot.
  • The interrupts in AM572x turned out to be much complicated than AM335x due to a new concept called IRQ_CROSSBARS which me and the Bela team have been working on for a few days. This may take some more time to implement. (however, this shouldn't be much of a deal-breaker for most users)
  • Thus, to get a proper release of BELA image for the BBAI, we really need to get the first issue of kernel crashing resolved, which again will take time.

So, at the current stage, the only option is to manually update to the xenomai patched kernel x4.19 using one of the on-board scripts, and then one can source compile BELA using some basic instructions that I have provided on my blog.

Previous PR was made at another branch, this PR just changes the branch against which the PR is made:
ref. Add support for BeagleBone AI #668

Andrew McPherson and others added 30 commits July 2, 2021 10:21
…her 16 or 32 bit slots

(was 1221974f..f43f7587 and removed trailing whitespaces)
…changed depending on whether running in DSP or TDM mode. Works with 2 channels in either case, not with more channels.

(cherry pick of commits 7101946d and 8468cfd0)
… this stage.

(cherry picked from commit c2a0a40bfa96f258430b9d16612a771201a2acd5,
with an edit (removing commented out lines in core/board_detect.cpp)
…rong order and one of them is noise. Input is not working yet.

(cherry picked from commit c85656fc9cf8a454df8313cd641a5676c6c1b945)
…ppears to work.

(cherry picked from commit 2998ded21ed39f65f57aa005c070eb13ededff45)
…inputs. Audio input now appears to work for multichannel. May also address an issue with spurious levels on the WCLK line.

(cherry picked from commit 5d36b099ae19abdb68ee3152e8663e91365a44bc)
(cherry picked from commit 2b09584e01c9b88e7467ed111f2e251d81ff61b4)
…c. Also added register read ability to I2c_Codec.

(cherry picked from commit e3378d1d9b417f3476e5085a7f22157cf68778b9)
… it shouldn't work according to the datasheet, and isn't 100% reliable.

(cherry picked from commit 1efa3434c2dac4acb89013e4f0db94d3f9aeb1f3)
…able if the signal quality issue can be sorted

(cherry picked from commit ba6900ab9e74023a4a0bc36d4029a5ae9f5d50b6)
(cherry picked from commit 1281de7fff79929756c071d2972b6966036bdc48)
…g input still does not work on this code.

(cherry picked from commit 2dda62b8baeab0cd1b8dfe376addd54252766d54)
(cherry picked from commit d1eb9acdf87d8b7c8f0320a390efbd37dd6bc0d1)
(cherry picked from commit 9b6962954789569ce1326d9c7d924a0dd446cf1d)
…presence of components in a BelaHw.

Accordingly refactored/simplified codebase
…JMP_TO as it is more accurate (also covers CTAG cases)
giuliomoro and others added 25 commits July 2, 2021 14:23
(or as much as it works on dev: at 2 analog channels audio is corrupted)
…ional change.

Co-authored-by: Giulio Moro <giuliomoro@yahoo.it>
…efault)

Co-authored-by: Giulio Moro <giuliomoro@yahoo.it>
…building PRU firmware for rproc

These files are taken from https://github.com/beagleboard/cloud9-examples@eed6500

Co-authored-by: Giulio Moro <giuliomoro@yahoo.it>
… Doesn't yet build rproc firmware.

Co-authored-by: Giulio Moro <giuliomoro@yahoo.it>
…c/Uio/board. Removed dependency on libprussdrv and PruBinary.o when not using UIO
… GPIO4 and GPIO6 in the PRU code. More pins are on GPIO3 and GPIO5 and require significant extra work on the PRU side
Verified that the built pru file remains unchanged.
…to pru/pru_rtaudio_irq.p

Verified that without IS_AM572x the assembled code has not changed. Of course it does change when -DIS_AM572x
…ual, this is only honoured by pru_rtaudio_irq.p)
@DhruvaG2000 DhruvaG2000 changed the title Bbai support Add support for BeagleBone AI Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants