View source for Talk:BeagleBoard/Mikrobus Support
I propose the following phases:
Contents
mikroBUS bus driver with gbsim
- Build a mikroBUS bus driver to load I2C, SPI, and UART device drivers
- Instantiate the driver on PocketBeagle+TechLab using whatever device tree entries you need to define it. Define the bus, not any of the devices.
- Use as generic manifests as possible with gbsim. No target specific content should go in the manifest, though a mikroBUS-specific resource could be defined.
- The bus driver should be called (init/probe?) and be able to complete the platform data structure to call the (init/probe?) on the device driver such that no device tree information is required.
- It might be necessary to augment Greybus with some mikroBUS-specific information, like it was a bus at the same level as I2C, SPI, etc.
mikroBUS bus driver with I2C EEPROM holding manifest
- init function fetches a Greybus manifest blob from an I2C EEPROM over the mikroBUS I2C bus.
- I2C EEPROM would be manually programmed to contain the blob.
- Use the Greybus code to parse the manifest, but do not require gbsim to get the data.
Flesh out the driver for the remaining mikroBUS interfaces
- Interfaces: PWM, ADC, etc.
- Extra configuration information for other device types: displays, etc.
Get everything working over actual Greybus
- Start with Greybus over UART to CC1352R Launchpad with mikroBUS slots.
- [View source↑]
- [History↑]
Contents
Thread title | Replies | Last modified |
---|---|---|
Phases | 3 | 19:05, 7 April 2020 |
I propose the following phases:
Contents
mikroBUS bus driver with gbsim[edit]
- Build a mikroBUS bus driver to load I2C, SPI, and UART device drivers
- Instantiate the driver on PocketBeagle+TechLab using whatever device tree entries you need to define it. Define the bus, not any of the devices.
- Use as generic manifests as possible with gbsim. No target specific content should go in the manifest, though a mikroBUS-specific resource could be defined.
- The bus driver should be called (init/probe?) and be able to complete the platform data structure to call the (init/probe?) on the device driver such that no device tree information is required.
- It might be necessary to augment Greybus with some mikroBUS-specific information, like it was a bus at the same level as I2C, SPI, etc.
mikroBUS bus driver with I2C EEPROM holding manifest[edit]
- init function fetches a Greybus manifest blob from an I2C EEPROM over the mikroBUS I2C bus.
- I2C EEPROM would be manually programmed to contain the blob.
- Use the Greybus code to parse the manifest, but do not require gbsim to get the data.
Flesh out the driver for the remaining mikroBUS interfaces[edit]
- Interfaces: PWM, ADC, etc.
- Extra configuration information for other device types: displays, etc.
Get everything working over actual Greybus[edit]
- Start with Greybus over UART to CC1352R Launchpad with mikroBUS slots.
Could you please clarify if my understanding of the approach is in the right direction?
mikroBUS bus driver with gbsim[edit]
Modify Greybus to include Mikrobus under GB Bridged Phy similar to other PHY bus like I2C,SPI . So when a manifest under this category is loaded, then all the greybus interfaces(virtual interfaces for each perpiheral on the mikroBUS: I2C,SPI,GPIO,...) are created and then the corresponding new_device(or similar) call in the mikrobus bus driver is made with the platform data for the device fetched from the manifest to instantiate the device on the bus(greybus created mikrobus), the bus driver then completes the platform data structure for the device and call the device driver to instantiate the device on the bus(virtual greybus). gbsim takes care of the transport(greybus mikrobus<->physical mikrobus).
Instantiate the driver on PocketBeagle+TechLab using whatever device tree entries you need to define it. Define the bus, not any of the devices.
I have one more doubt(maybe dumb), in this case the Mikrobus Driver doesn't do the transport(greybus<->physical) right? So why does it require information about the actual physical Mikrobus? Is it Possible(feasible) to include the transport in the driver itself? Like this:
- In a suitable device tree entry we define the transport, say 'phy' (where the mikrobus port is on the same device as where kernel greybus is running) then we route out the individual greybus interfaces(SPI/I2C/..) separately to the physical peripheral(SPI/I2C/UART) specified in device tree.
mikroBUS bus driver with I2C EEPROM holding manifest[edit]
In this case, the Mikrobus Bus Driver should fetch the manifest blob from an I2C EEPROM(similar to approach done by Bone Cape Manager) and then pass it to greybus(?), so the greybus mikrobus creation and device instantiation happens in the previous manner itself.
Use the Greybus code to parse the manifest, but do not require gbsim to get the data.
In this case who performs the transport?
mikroBUS bus driver with gbsim[edit]
Adding mikroBUS to the Greybus bridged phys might be the right answer, but I'm not sure. Sounds right.
It seems if we make mikroBUS a bus driver, it should have a 'match' function? https://www.kernel.org/doc/html/latest/driver-api/driver-model/bus.html
Is 'match' not needed in this case? Could their be a 'match' function that ends up calling the 'match' function for the I2C/SPI/UART busses? How would it determine which buses it needs?
Why would the device tree define the transport? So many confusing terms!!!
mikroBUS bus driver with I2C EEPROM holding manifest[edit]
The transport is the physical I2C/SPI/UART busses! The goal is to first get mikroBUS add-on boards working on PocketBeagle+TechLab before worrying about any other transports or other board configurations. By keeping the handling of defining the extra platform data in the mikroBUS bus driver, it should be able to have all the extra definitions it needs right there.
The use of gbsim in the earlier phase was just to try to avoid needing to parse manifest data.
Aside[edit]
I wonder if it would help if I did a device tree example for instantiating a mikroBUS bus. What do you think? I might add that to the main page as a draft.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
Return to Thread:Talk:BeagleBoard/Mikrobus Support/Phases/reply (3).