Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 52ad48ef authored by Jason Kridner's avatar Jason Kridner
Browse files

mikrobus: WIP

parent bb5d5de5
Branches
Tags
1 merge request!58PocketBeagle minor fix-up
...@@ -6,6 +6,14 @@ Using mikroBUS ...@@ -6,6 +6,14 @@ Using mikroBUS
Using boards with ClickID Using boards with ClickID
************************* *************************
Steps:
1. Identify if mikroBUS add-on includes an ID. If not, ID must be supplied.
2. Identify if mikroBUS add-on is supported by the kernel. If not, kernel module must be added.
3. Identify how driver exposes the data: IIO, net, etc.
4. Connect and power
5. Verify and utilize
What is mikroBUS? What is mikroBUS?
================= =================
...@@ -38,10 +46,23 @@ Look for the "ID" logo on the board. It should be on the side with the pins stic ...@@ -38,10 +46,23 @@ Look for the "ID" logo on the board. It should be on the side with the pins stic
If your add-on has ClickID, simply connect it while BeaglePlay is powered off and then apply power. If your add-on has ClickID, simply connect it while BeaglePlay is powered off and then apply power.
Example of examining boot log to see a ClickID was detected.
.. code:: shell-session
debian@BeaglePlay:~$ dmesg | grep mikrobus
[ 2.096254] mikrobus:mikrobus_port_register: registering port mikrobus-0
[ 2.096325] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom
[ 2.663698] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=opt3001, protocol=3, reg=44
[ 2.663711] mikrobus_manifest:mikrobus_manifest_parse: Ambient 2 Click manifest parsed with 1 devices
[ 2.663783] mikrobus mikrobus-0: registering device : opt3001
To use the add-on, see TBD below. To use the add-on, see TBD below.
What if my add-on doesn't have ClickID? What if my add-on doesn't have ClickID?
======================================= ***************************************
It is still possible a ``manifest`` has been created for your add-on as we have created over 100 of them. You can install the existing manifest files onto your BeaglePlay. It is still possible a ``manifest`` has been created for your add-on as we have created over 100 of them. You can install the existing manifest files onto your BeaglePlay.
...@@ -52,18 +73,6 @@ It is still possible a ``manifest`` has been created for your add-on as we have ...@@ -52,18 +73,6 @@ It is still possible a ``manifest`` has been created for your add-on as we have
sudo apt install bbb.io-clickid-manifests sudo apt install bbb.io-clickid-manifests
cat /lib/firmware/mikrobus/amibient-light-click.mnfb > /sys/bus/mikrobus/devices/mikrobus-0/new_device cat /lib/firmware/mikrobus/amibient-light-click.mnfb > /sys/bus/mikrobus/devices/mikrobus-0/new_device
It'll forget on reboot... need to have a boot service.
To make it stick, ...
Steps:
1. Identify if mikroBUS add-on includes an ID. If not, ID must be supplied.
2. Identify if mikroBUS add-on is supported by the kernel. If not, kernel module must be added.
3. Identify how driver exposes the data: IIO, net, etc.
4. Connect and power
5. Verify and utilize
.. note:: .. note::
...@@ -76,6 +85,67 @@ Steps: ...@@ -76,6 +85,67 @@ Steps:
Patched Linux with out-of-tree Mikrobus driver: https://git.beagleboard.org/beagleboard/linux Patched Linux with out-of-tree Mikrobus driver: https://git.beagleboard.org/beagleboard/linux
.. note::
It'll forget on reboot... need to have a boot service.
.. todo::
To make it stick, ...
Using boards with Linux drivers
*******************************
IIO driver
==========
https://docs.kernel.org/driver-api/iio/intro.html
.. code: shell-session
debian@BeaglePlay:~$ iio_info
Library version: 0.24 (git tag: v0.24)
Compiled with backends: local xml ip usb
IIO context created with local backend.
Backend version: 0.24 (git tag: v0.24)
Backend description string: Linux BeaglePlay 5.10.168-ti-arm64-r104 #1bullseye SMP Thu Jun 8 23:07:22 UTC 2023 aarch64
IIO context has 2 attributes:
local,kernel: 5.10.168-ti-arm64-r104
uri: local:
IIO context has 2 devices:
iio:device0: opt3001
1 channels found:
illuminance: (input)
2 channel-specific attributes found:
attr 0: input value: 163.680000
attr 1: integration_time value: 0.800000
2 device-specific attributes found:
attr 0: current_timestamp_clock value: realtime
attr 1: integration_time_available value: 0.1 0.8
No trigger on this device
iio:device1: adc102s051
2 channels found:
voltage1: (input)
2 channel-specific attributes found:
attr 0: raw value: 4084
attr 1: scale value: 0.805664062
voltage0: (input)
2 channel-specific attributes found:
attr 0: raw value: 2440
attr 1: scale value: 0.805664062
No trigger on this device
Storage driver
==============
Network driver
==============
How does ClickID work? How does ClickID work?
********************** **********************
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment