Difference between revisions of "BeagleBoard/GSoC/2019Proposal/usbDeviceTreeIntegration"

From eLinux.org
Jump to: navigation, search
m
(Update approach and timeline)
Line 3: Line 3:
 
[[Category: GSoCProposal]]
 
[[Category: GSoCProposal]]
  
To develop a system to enumerate USB devices from device tree nodes on boot.
+
Modify configfs to enumerate USB devices from device tree nodes on mount.
  
 
''Student'': [http://elinux.org/User:Jmarek Jmarek]<br>
 
''Student'': [http://elinux.org/User:Jmarek Jmarek]<br>
Line 33: Line 33:
  
 
===Timeline===
 
===Timeline===
I do not have a lot of experience mapping out a project over the course of 3 months and that may be reflected in the project outline.
+
I do not have a lot of experience mapping out a project over the course of 3 months and that may be reflected in the project outline. I have found 5 main goals to achieve for this project to work and have simply spaced them out equally along the timeline.
  
2017-06-06: Gain understanding of configFS and libcomposite<br>
+
2017-06-06: <br>
2017-06-13: Gain an understanding of usb device enumeration and usb function drivers<br>
+
2017-06-13: Implement logging during configfs mounting to fetch device tree info<br>
2017-06-20: Build device tree property outline<br>
+
2017-06-20: <br>
2017-06-27: Start interface between device tree and configFS<br>
+
2017-06-27: Enumerate devices based on device tree information<br>
2017-07-04: Continue interface between device tree and configFS<br>
+
2017-07-04: <br>
2017-07-11: Continue interface between device tree and configFS<br>
+
2017-07-11: Implement comprehensive logging for debugging<br>
2017-07-18: Verify USB device discovery and enumeration<br>
+
2017-07-18: <br>
2017-07-25: Start interface between USB device and function drivers<br>
+
2017-07-25: Run time tests for my implementation to check for improvement<br>
2017-08-01: Continue interface betwen USB device and function drivers<br>
+
2017-08-01: <br>
2017-08-08: verify USB functionality<br>
+
2017-08-08: Finalize documentation and pull request<br>
2017-08-15: verify USB funcitonality<br>
+
2017-08-15: <br>
 
 
There are factors that will change this time line including my understanding of the USB subsystem. It may be that after the device listed in the device tree is enumerated, the USB subsystem of the kernel links it to the appropriate function drivers, or the function drivers are linked to the USB device when the device driver is compiled. The answer to this question and other similar to it will be resolved within the first 2 weeks of GSoC as I research the USB kernel subsystem to map out what the project needs to look like.
 
  
 
===Experience and approach===
 
===Experience and approach===
 
I am a fourth year computer science student with a co-op at Extreme Engineering Solutions (X-ES). X-ES produces ruggadized single board computers that run a branch of the Linux kernel that the Linux team at X-ES develops and maintains. As an embedded systems engineer co-op on the Linux team I gained experience working with development on the Linux kernel for embedded systems. Projects I worked on included writing device drivers to interface with a chipset on a SPI bus. This project gave me exposure to working with device trees and writing device drivers to interface with systems over bus communications.
 
I am a fourth year computer science student with a co-op at Extreme Engineering Solutions (X-ES). X-ES produces ruggadized single board computers that run a branch of the Linux kernel that the Linux team at X-ES develops and maintains. As an embedded systems engineer co-op on the Linux team I gained experience working with development on the Linux kernel for embedded systems. Projects I worked on included writing device drivers to interface with a chipset on a SPI bus. This project gave me exposure to working with device trees and writing device drivers to interface with systems over bus communications.
 +
 +
Currently, configfs does not support enumerate gadgets from the device tree. To make this change I will have to modify so that when a configfs file system is mounted, it checks the kernel's representation of the device tree for usb-device nodes and creates the appropriate files and writes the configuration information into them.
 +
 +
The kernel Documentation mentions that USB devices usually are not statically defined in a device tree unless they are hardwired in, but that does not necessarily mean that a break in this convention is unwelcome. That being said, this approach is unorthodox and I have not found an example which could be used to justify this approach on the basis of precedent. ePAPR 1.1 documentation, which defines device trees, does not specifically forbid statically enumerating discoverable devices in a device tree, only that nodes describing probe-able devices may not be necessary, link to documentation [https://www.devicetree.org/downloads/devicetree-specification-v0.1-20160524.pdf here].
  
 
===Contingency===
 
===Contingency===
 
There are many resources online to help with Linux kernel development. Elixir provides a interface to kernel source code that is easy to navigate, forums exist for all aspects of the Linux kernel and its unlikely I will run into a problem dissimilar from problems other people have had in the past. In the event that the forums are of no use there is still the mailing lists.
 
There are many resources online to help with Linux kernel development. Elixir provides a interface to kernel source code that is easy to navigate, forums exist for all aspects of the Linux kernel and its unlikely I will run into a problem dissimilar from problems other people have had in the past. In the event that the forums are of no use there is still the mailing lists.
 +
 +
Documentation for the device tree is available in both the kernel source as well as through ePAPR. Examples can be found online would may help guide me should I loose my way. Configfs itself is documented well enough both on a technical level and from a usage perspective.
  
 
===Benefit===
 
===Benefit===

Revision as of 06:10, 21 March 2019


Modify configfs to enumerate USB devices from device tree nodes on mount.

Student: Jmarek
Mentors: rcn-ee
Code: https://github.com/BeaglePilot
Wiki: http://elinux.org/BeagleBoard/GSoC/Proposal/usbDeviceTreeIntegration
GSoC: GSoC entry

Status

This project is currently just a proposal.

Proposal

About Me

IRC: jmarek
Github: jmarek117
School: Michigan Technological University
Country: United States
Primary language: English
Typical work hours: 8AM-5PM US Eastern
Previous GSoC participation: This GSoC project is an opportunity to have a more structured introduction into participating in upstream Linux Kernel development. I have experience working on the X-ES custom kernel branch they maintain to support their products but I would like to make more broad contributions to the community.

About your project

Project name: USB configFS in device tree

Description

To speed up the boot process by configuring USB statically in the device tree instead of it being conventionally done through a script at boot time. Goal: USB configfs in device tree such that they can be configured statically in device tree ahead of boot and speed the boot process.

Timeline

I do not have a lot of experience mapping out a project over the course of 3 months and that may be reflected in the project outline. I have found 5 main goals to achieve for this project to work and have simply spaced them out equally along the timeline.

2017-06-06:
2017-06-13: Implement logging during configfs mounting to fetch device tree info
2017-06-20:
2017-06-27: Enumerate devices based on device tree information
2017-07-04:
2017-07-11: Implement comprehensive logging for debugging
2017-07-18:
2017-07-25: Run time tests for my implementation to check for improvement
2017-08-01:
2017-08-08: Finalize documentation and pull request
2017-08-15:

Experience and approach

I am a fourth year computer science student with a co-op at Extreme Engineering Solutions (X-ES). X-ES produces ruggadized single board computers that run a branch of the Linux kernel that the Linux team at X-ES develops and maintains. As an embedded systems engineer co-op on the Linux team I gained experience working with development on the Linux kernel for embedded systems. Projects I worked on included writing device drivers to interface with a chipset on a SPI bus. This project gave me exposure to working with device trees and writing device drivers to interface with systems over bus communications.

Currently, configfs does not support enumerate gadgets from the device tree. To make this change I will have to modify so that when a configfs file system is mounted, it checks the kernel's representation of the device tree for usb-device nodes and creates the appropriate files and writes the configuration information into them.

The kernel Documentation mentions that USB devices usually are not statically defined in a device tree unless they are hardwired in, but that does not necessarily mean that a break in this convention is unwelcome. That being said, this approach is unorthodox and I have not found an example which could be used to justify this approach on the basis of precedent. ePAPR 1.1 documentation, which defines device trees, does not specifically forbid statically enumerating discoverable devices in a device tree, only that nodes describing probe-able devices may not be necessary, link to documentation here.

Contingency

There are many resources online to help with Linux kernel development. Elixir provides a interface to kernel source code that is easy to navigate, forums exist for all aspects of the Linux kernel and its unlikely I will run into a problem dissimilar from problems other people have had in the past. In the event that the forums are of no use there is still the mailing lists.

Documentation for the device tree is available in both the kernel source as well as through ePAPR. Examples can be found online would may help guide me should I loose my way. Configfs itself is documented well enough both on a technical level and from a usage perspective.

Benefit

If successfully completed, what will its impact be on the BeagleBoard.org community? Include quotes from BeagleBoard.org community members who can be found on http://beagleboard.org/discuss and http://bbb.io/gsocchat.

Suggestions

Why do you want to work on this project?

I want to be a contributor to the Linux kernel and this project would give me a structured introduction to the process. This project also allows me to build on my experience from working with X-ES on embedded Linux.