New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dts: bindings: Add Pmod connector GPIO nexus #55342
Conversation
To provide additional arguments for why this will be useful, the following boards all have PMOD connectors:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good. One suggestion:
- GND | ||
- VDD | ||
|
||
compatible: "digilent,pmod-gpio" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest naming it digilent,pmod
. Although the nexus purely deals with GPIOs, the connector itself is a Digilent Pmod connector, not a Digilent Pmod GPIO connector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. What do you think of also renaming the header file to match? In that case the full include path would be zephyr/dt-bindings/gpio/digilent-pmod.h
Please add a Pmod connector to at least one of the in-tree boards to document usage and ensure it is tested in-tree. |
Add a GPIO nexus binding for Pmod interface connectors. This commit also includes a header file with macros that map signal names in the Pmod specification to the corresponding indices in the GPIO nexus, meant for use in devicetree files. Signed-off-by: Alexander Mihajlovic <alexander@eub.se>
Add pmod connector dts description. Signed-off-by: Alexander Mihajlovic <alexander@eub.se>
Add pmod connector dts description. Signed-off-by: Alexander Mihajlovic <alexander@eub.se>
I made the requested change of name and added SCL/SDA/MOSI/MISO/SCK signal defines that I had initially omitted since they would normally not be used with GPIO nexus, but I figure they can be used in a pinch with a bit-banged bus driver. I also added Pmod connectors to two boards but unfortunately I don't have either of them on hand to verify the pinout, so if that's a requirement I will have to order some or ask assistance of someone. |
I don't get it. If you do not have any in-tree board with a Pmod connector, how come you are adding a binding for it upstream? |
|
@henrikbrixandersen Thanks for approving. This dropped off my radar, sorry for not replying sooner.
We have out-of-tree boards using it and we think it's pretty great for rapidly prototyping new hardware designs, and we enjoy sharing the tools we build and use. It's a topic we've been thinking about writing a blog post about, so we're in the works of releasing an open-hardware board that really goes all in on Pmod. |
Interesting. I will look forward to hearing more about that. The reason we need in-tree users is to ensure we cover this addition in CI and not just let it sit there to bitrot (even if it is just a DTS binding). |
Add a GPIO nexus binding for Pmod interface connectors. This commit also includes a header file with macros that map signal names in the Pmod specification to the corresponding indices in the GPIO nexus, meant for use in devicetree files.
There are multiple boards in the tree sporting Pmod connectors where this binding could be useful. With the right GPIO mapping nodes and pinctrl nodes added to the board definitions it becomes easy to set up the devicetree for Pmod peripherals. At Elektronikutvecklingsbyrån we already use this with some in-house boards for prototyping.
Example: