Weekly Progress Report Thread: Click board Support Under Greybus

102 views
Skip to first unread message

Vaishnav MA

unread,
May 27, 2019, 1:50:20 PM5/27/19
to BeagleBoard GSoC
Hi,

I am currently working on GSoC 2019 project: Clickboard Support Under Greybus, my mentors for this project are Jason Kridner and Ravi Kumar Prasad.
The introductory video for the project is available here:  https://youtu.be/QtzHhAFE0SE , I have also created a project progress website/blog here: https://vaishnav98.github.io/GSoC19/. Looking forward to hearing suggestions from you. I will be using this thread to submit the weekly progress report about the project

Regards
Vaishnav M A

Vaishnav MA

unread,
Jun 4, 2019, 1:57:20 PM6/4/19
to BeagleBoard GSoC
Hi ,

This is a week 1 status update for the project,

Work done this week :

This week I was able to fix the issues with Greybus  Simulator Installation on latest images and was able to add partial support for I2C based clicks and Provide a Command Line Interface for loading the clicks. the work done this week were:

Current Work: I am presently working on improving the Command Line Interface and adding support and documentation for the rest of I2C based clicks 

Issues faced last week: could not proceed with adding support for SPI based Clicks as the gbsim spi had issues which need to be fixed first.


Next week Plan :

In the coming  week i am planning to :
                    1)fix the issue with loading SPI manifests on gbsim (https://github.com/vaishnav98/gbsim/issues/1)
                    2)Try to bring support for SPI based Clicks(OLED C Click)
                    3)improve the current I2C Click support implementation and documentation according to feedback from mentors
Regards
Vaishnav

Vaishnav MA

unread,
Jun 12, 2019, 11:27:26 AM6/12/19
to BeagleBoard GSoC
Hi,

I could not finish any of the tasks planned for this week as I was at the hospital for the last few days, I am recovering and will put in more time to work in the coming week so as to make up for the lost time and catch up with the schedule.

Blockers: I was at the hospital for the last few days and was not able to finish the work that was planned for the previous week

Next week Plan :

In the coming  week I am planning to :
                    1)fix the issue with loading SPI manifests on gbsim (https://github.com/vaishnav98/gbsim/issues/1)
                    2)Try to bring support for SPI based Clicks(OLED C Click)
                    3)improve the current I2C Click support implementation and documentation according to feedback from mentors

Regards
Vaishnav

Vaishnav MA

unread,
Jun 17, 2019, 2:44:48 PM6/17/19
to BeagleBoard GSoC
Hi,

This is a week 3 status update for the project:

Work done this week :

This week I was able to fix the issues with Greybus  Simulator SPI and was able to add partial(work-in-progress) support for SPI based clicks(oledc ,microSD) and make changes to the insclick CLI for loading the clicks, the work done this week were:
Current Work: I am presently working on fixing and generalizing the support for SPI based clicks and providing documentation for the supported clicks 

Blockers
  • microSD Click support failing giving "Unrecognised CSD Structure version 2" Error, 
  • does not have much idea on how to add support for I2C based click boards with Interrupts and muxed I2C(i2c-gate)

Next week Plan :

In the coming  week I am planning to :
                    1)fix and generalize the GBSIM SPI Click Support
                    2)Provide Documentation and Demonstration Videos for Currently Supported Clicks
                    3)Fix issues with GBSIM exit (https://github.com/vaishnav98/gbsim/issues/3)
                    4)write corresponding service files to run gbsim as a startup service

Regards
Vaishnav

Vaishnav MA

unread,
Jun 24, 2019, 4:40:28 PM6/24/19
to BeagleBoard GSoC
Hi,

This is a week 4 status update for the project:

Work done this week :

This week I was able to add support for OLED B click through gbsim, provided service file for starting gbsim at startup, write examples for Click Boards support on Techlab Cape through greybus, the work done this week were:
Current Work: I am presently working on generalizing the GPIO functions in GBSIM and then provide example manifests.

Blockers
  • could not debug microSD Click support failing giving "Unrecognised CSD Structure version 2" Error, steps performed to debug the issue:
    • performed a SPI Loopback test on the newly created SPIDEV3.x interface created by gbsim to find out that the loopback test was failing,was able to fix that, still microSD click was giving the same error.
    • got some additional debug messages using Dynamic Debug, the debug messages are available here : https://github.com/vaishnav98/gbsim/issues/6#issuecomment-504668670
 Next week Plan  :

 In the  coming  week I am planning to :
                    1)fix issues with microSD Click Support
                    2)make changes to previous weeks work done according to mentor's feedback
                    3)Generalise the GBSIM gpio functions
                    4)try to bring support for MPU9DOF Click

Regards
Vaishnav

Vaishnav MA

unread,
Jul 1, 2019, 10:58:32 PM7/1/19
to BeagleBoard GSoC
Hi,

This is a week 5 status update for the project:

Work done this week :

This week I was able to test the work done in previous weeks and make fixes and also update the documentation, the work done this week were:
Current Work: I am presently working on debugging the microSD click issue and modify the greybus driver to include platform_data details in spi_new_device calls.

Blockers
 Next week Plan  :

 In the  coming  week I am planning to :
                    1)fix issues with microSD Click Support
                    4)modify the greybus driver to include platform data in new_device calls

Vaishnav MA

unread,
Jul 9, 2019, 5:31:27 PM7/9/19
to BeagleBoard GSoC
Hi,

This is a week 6 status update for the project:

Work done this week :

This week I was able to bring in Techlab Cape and Clickboard Support in the Makecode Beaglebone target, the work done this week were:
Current Work: I am presently working on understanding the suggested implementation by mdp and make changes to the project accordingly

Blockers
Resolution to Blockers:
  • obtained suggestions from Greybus Dev Mailing List and mdp regarding adding support for clickboards in a generalized manner, so that Clickboards with interfaces like Interrupts and other requirements can supported
 Next week Plan  :

 In the  coming  week I am planning to :
                    1)try out a generalized solution for bringing click board support
                    2) fix issues with work done so far

Vaishnav MA

unread,
Jul 16, 2019, 11:03:47 AM7/16/19
to BeagleBoard GSoC
Hi,

This is a week 7 status update for the project:

Work done this week :

This week was not very productive as it took me some time to understand the of_bus implementation in PCI and make a similar implementation for Greybus, I hope I'll be able to make up for the lost time by spending more time on the project in the coming week :
Current Work: I am presently working on adding support for describing Greybus nodes in the Device Tree and port the existing clickboard support to a DT based implementation.

Blockers
  • not familiar with PCI and Open Firmware, takes some time to learn the implementation and modifying the driver accordingly
  • trying to pass platform data from Greybus Simulator to Greybus SPI throws Kernel Panic
Resolution to Blockers:
  • obtained suggestions from Gregh KH via Greybus Dev Mailing list
 Next week Plan  :

 In the  coming  week I am planning to :
                    1)adding support for describing Greybus nodes in the Device Tree and port the existing click boards support to a  generic Device Tree overlay based one

Vaishnav MA

unread,
Jul 23, 2019, 12:57:22 AM7/23/19
to BeagleBoard GSoC
Hi,

This is a week 8 status update for the project:

Work done this week :

This week I tried to add device tree support for greybus nodes and with device tree parsing code on greybus side I was able to instantiate the clicks when the platform_data of the corresponding device is known beforehand:
  • implemented of_bus for greybus and was able to get the platform_data details from the device tree and instantiate the device through greybus( tried with OLED C click) after casting the platform_data to the corresponding device platform_data struct.
  • tried to pass the data from the of_node->data without casting to the proper struct but this implementation failed throwing kernel panic.
Current Work: I am presently working on implementing an IIO protocol class for greybus and bringing the associated click support through that.

Resolution to Blockers: had a discussion with jkridner regarding the blockers and decided to start with an implementation for an IIO protocol class for greybus

Blockers
  • cannot pass the platform data to the corresponding driver without knowing the platform_data struct for the device
  • trying to pass platform data fetched from device tree(device_node->data) without casting to the proper struct throws Kernel Panic
Next week Plan  :

 In the  coming  week I am planning to :
                    1)add an IIO protocol driver for greybus and  bring support for clicks which rely on IIO based drivers

Vaishnav MA

unread,
Jul 30, 2019, 4:22:30 PM7/30/19
to BeagleBoard GSoC

Hi,

This is a week 9 status update for the project:

Work done this week :

This week I started with a mikrobus kernel module which would help export the mikrobus gpios through greybus and instantiate devices on the greybus spi/i2c :
  • was able to instantiate clicks without interrupt requirements on the greybus spi via the module
  • when trying to instantiate clicks with interrupt requirements, it fails as if no irq was passed
  • I tried the following combinations (greybus spi/i2c bus + physical gpio as irq , greybus  spi/i2c bus + greybus gpio as irq) both these fails and the driver probe error messages seems as if the irq was not passed to it, to confirm that it is not an issue with the  mikrobus driver , I tried with a physical spi/i2c bus and  physical gpio as irq and found that it works without any issues.
  • to debug the issue with greybus gpio interrupts, I tried out a led+push button based interrupt implementation through a driver as jkridner suggested, I found that the irq request succeeds and the corresponding entry can be found under /proc/interrupts , but the output is not as expected(led doesn't respond to button presses,nor are there messages in kernel logs when button is pressed, the example is working perfectly when the gpio numbers are changed to corresponding physical gpio).
Current Work: I am presently working on fixing the issue with greybus gpio interrupt and making modifications to the mikrobus driver as per jkridner's suggestion

Resolution to Blockers: started out with separate mikrobus module for device instantiation(https://github.com/vaishnav98/mikrobus_device)

Blockers
  • interrupts on greybus gpio fails (https://github.com/vaishnav98/mikrobus_device/issues/1)
  • passing irq parameter inside spi/i2c_board_info fails for a greybus spi/i2c bus, the device instantiation fails as if the irq parameter was provided
  • classes have started at my university which forces me to change my working hours, I understand there are a lot of things yet to finish in the project and will try my level best to adjust my school and work timings.
Next week Plan  :

 In the  coming  week I am planning to :
                    1)fix issues with greybus gpio interrupt
                    2)fix issue with instantiating click devices with interrupt requirements on greybus spi/i2c bus

Vaishnav MA

unread,
Aug 6, 2019, 2:40:41 PM8/6/19
to BeagleBoard GSoC

Hi,

This is a week 10 status update for the project:

Work done this week :

This week I was able to fix the issue with interrupts via gbsim, and was able to try out a simple button + LED kernel driver to test the greybus gpio irq -> physical gpio irq events, it was working well and also I  was able to instantiate MPU9DOF click on the greybus I2C bus along with Greybus GPIO as irq  :
  • was able to implement interrupts support in GBSIM, now when a greybus gpio is configured as irq, the corresponding physical gpio will also be configured for the same irq type by gbsim and then in the interrupt callback a greybus Interrupt Event message is sent with the corresponding gpio id, all these were done using libsoc helper functions
  • tried out a greybus gpio configured as a gpio interrupt(button) and a greybus gpio as output(LED) Kernel Driver example to test the interrupt functionality and it was working well 
  • was able to fix the issue with instantiating clicks with interrupts over greybus I2C bus , the issue was with setting different functionality for the greybus i2c adapter, setting the correct functionality solves the problem and I was able to test out with the MPU9DOF click and have explained the steps here: https://vaishnav98.github.io/GSoC19/mpu9dof.html
Current Work: I am presently working on fixing the issue with instantiating SPI clicks with interrupt requirements on the Greybus SPI bus 

Resolution to Blockers: changing the functionality parameter of the greybus I2C adapter fixed the issue of not being able to instantiate clicks with interrupt requirements on the greybus I2C bus 

Blockers
Next week Plan  :

 In the  coming  week I am planning to :
                    1)fix issues with instantiating clicks with interrupt requirements on the greybus SPI
                    2)add support for remaining clicks with existing kernel driver support
                    3)add Documentation and Tests, Discuss with mentors on how to submit the work for final evaluation

Vaishnav MA

unread,
Aug 14, 2019, 12:58:41 AM8/14/19
to BeagleBoard GSoC
Hi,

This is a week 11 status update for the project:

Work done this week :

This week I was able to write tests for testing out the creation of the correct greybus peripherals  for a mikrobus slot and provide instructions for running the same:
Current Work: I am presently working on setting up gb-netlink and gbridge to try out their applications in the project as suggested by cfriedt.

Resolution to Blockers: partially figured out a way to find greybus startgpio by looking at /sys/class/gpio/gpiochipX (where X > the existing GPIO ID) 

Blockers
  • Waveform Generator Click not working after updating to latest sources
  • could not bring up support for Ultrasonic 2 click
  • Due to heavy rains power outages for long duration are becoming very frequent in my area which causes difficulty in working
Next week Plan  :

 In the  coming  week I am planning to :
                    1)clean up the code and update the documentation
                    2)provide documentation for adding support for new clicks 
                    3)start working on the final video and add instructions for setting up Makecode along with gbsim

Vaishnav MA

unread,
Aug 21, 2019, 10:04:43 AM8/21/19
to BeagleBoard GSoC
Hi,

This is a week 12 status update for the project:

Work done this week :

This week I was able to clean up the code and provide instructions for setting up the project and adding support for new clicks:
  • classified the clicks into different classes (ordinary/display/platform) so that insclick can figure out how to instantiate a click on the mikrobus port and added instructions for adding support for new clicks with examples (https://github.com/vaishnav98/manifesto/blob/master/README.md)
  • Currently adding support for new clicks normally requires only the addition of click details under clicks.json, only for SPI based simple clicks a new manifest is required
  • cleaned up the mikrobus driver code and added install instructions, currently, mikrobus driver is used to instantiate devices with additional platform data
Current Work: I am presently working on preparing the final Wiki and creating the final demonstration video

Work to be done (before 26th) :

                    1)separate GBSIM Instance for each mikrobus port
                    2)Debian Packaging and CI 
                    3)Final Project Wiki and Video
Reply all
Reply to author
Forward
0 new messages