Don Pancoe [Tue, 3 Dec 2019 00:31:36 +0000 (19:31 -0500)]
Added BEAGLEBONE_BLACK_INDUSTRIAL to board.py. It still imports from
adafruit_blinka.board.beaglebone_black because it is otherwise
compatible except for the increased temperature range.
Drew Fustini [Sat, 26 Oct 2019 19:03:09 +0000 (21:03 +0200)]
Add PWMOut for PocketBeagle #159
Add PWMOut for PocketBeagle which has the AM3358 SoC.
Note that the generic linux PWMOut implementation will
not work as BeagleBoard.org kernel has a patch to allow
udev to be able to set the ownership and permissions
in /sys/class/pwm when channels are exported. However,
this naming scheme is different than what is used in the
mainline kernel.
Here is the kernel patch that is being used:
https://github.com/RobertCNelson/bb-kernel/blob/am33x-v4.11/patches/drivers/pwm/0001-pwm-Create-device-class-for-pwm-channels.p$
Stephen Warren [Mon, 26 Aug 2019 18:53:29 +0000 (12:53 -0600)]
setup.py: Runtime dependency determination
setup.py currently assumes that all ARMv6/7 platforms are an RPi, and all
AArch64 systems are a Jetson. This is untrue, since:
a) All recent ARM Linux systems are one of those types, and Blinka
supports plenty of Linux systems besides the Pi and Jetson.
b) Recent Pis are quite capable of running an AArch64 user-space, and
Jetson could run an ARMv7 user-spcae.
Solve this by enhancing setup.py to detect which specific system it's
running on, using the device tree compatible value. (Other mechanisms
could be used for other types of system in the future if required.) The
active dependency list is calculated based on this information.
There have been some bugs reported[1] that could only have occurred if
the previous platform limitations in setup.py's install_requires were not
correctly implemented, or people were running non-default user-space.
This change will ensure only the expected libraries are installed in
those cases.
I have tested this on one Jetson system. I have not tested it on a Pi,
nor other systems supported by Blinka. However, I have confirmed the Pi
compatible values match those used by:
- The upstream Linux kernel.
- The latest Pi Foundation kernel.
- Pi Foundation kernel 4.8, from around Jan 2017.
4.7 used different compatible values.
Stephen Warren [Thu, 15 Aug 2019 16:12:11 +0000 (10:12 -0600)]
Require Jetson.GPIO on aarch64
The Tegra pin.py files depend on the Jetson.GPIO library. Currently, they
assume the library is installed in /opt/nvidia/jetson-gpio and hard-code
this path. This doesn't work well when someone has installed an upgraded
version, e.g. via PYTHONPATH or pip. To solve this, remove the
hard-coding of Jetson.GPIO's installation path, and update setup.py and
requirements.txt to ensure that Jetson.GPIO is available. Note that
Jetson.GPIO is now available via PyPi, but may not have been when initial
Jetson support was added to Blinka.
Stephen Warren [Thu, 15 Aug 2019 15:51:40 +0000 (09:51 -0600)]
Add SPI controller support for Jetson boards
Add spiPorts[] to each Tegra's pin.py, and add SPI pin names to each
Jetson's board definition file.
Every Jetson board supports the regular SPI port on the 40-pin GPIO
expansion connector. Jetson Nano also supports a second SPI port.
Note: The user must still take manual action to:
1) Reprogram Jetson's pinmux to route the SPI signals to the 40-pin GPIO
expansion connector; by default these pins are configured as GPIO.
Documentation on this topic is available on the Jetson download site.
2) Instantiate an spidev device in device tree, which will then trigger
the creation of the /dev/spidevN.0 device node file. Future versions of
L4T will do this by default.
3) Set permissions on the /dev/spidevN.0 device node file to allow
regular users to access the file. The udev rules file in the latest
version of Jetson.GPIO includes rules for this purpose.
Without taking these actions, SPI functionality will not work.