Skip to content

dts: stepper: unify msx-gpios #88066

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

Open
jilaypandya opened this issue Apr 2, 2025 · 5 comments · May be fixed by #88798
Open

dts: stepper: unify msx-gpios #88066

jilaypandya opened this issue Apr 2, 2025 · 5 comments · May be fixed by #88798
Assignees
Labels
area: Stepper Enhancement Changes/Updates/Additions to existing features

Comments

@jilaypandya
Copy link
Member

Is your enhancement proposal related to a problem? Please describe.

At present bindings for micro-step-resolution-gpios is done in a different manner between different stepper drivers. For instance,

Describe the solution you'd like

Place msx-gpios in stepper-controller.yaml as a common binding and adjust the two stepper drivers that use m0-gpios and m1-gpios

Describe alternatives you've considered

It is either or between msx-gpios and m0/m1/m2-gpios.
msx-gpios is extensible and can be used for all the drivers that have 1-3 pins for setting micro-step-resolution.

Additional context

@jilaypandya jilaypandya added the Enhancement Changes/Updates/Additions to existing features label Apr 2, 2025
@rruuaanng
Copy link
Collaborator

Maybe more cases are needed to determine if this approach is worthwhile, so far, there seem to be only two. Over-abstracting can make things incomprehensible. WDYT?

@jilaypandya
Copy link
Member Author

jilaypandya commented Apr 3, 2025

Maybe more cases are needed to determine if this approach is worthwhile, so far, there seem to be only two. Over-abstracting can make things incomprehensible. WDYT?

We have actually 3 stepper drivers which require this microstepping gpios.

Two of them (allegro,ti) use m0/m1-gpios and the one from (adi) uses msx-gpios. We already have step/dir-gpios in stepper-controller.yaml and hence introducing the msx-gpios in stepper-controller.yaml is logical imo :-)

I am personally in favour of msx-gpios since its concise and can be extended to both the use-cases requiring two/three gpios for setting microstepping resolution

@jbehrensnx
Copy link
Collaborator

From what I have seen, having (two) gpio lines for microstep resolution is very common for stepper controller, and having astandard devicetree specification would make sense in that context. And using an array would make things more flexible for controllers who use a different number of pins for microstep resolution, through I don't know how widespread these are.

@faxe1008
Copy link
Collaborator

faxe1008 commented Apr 3, 2025

I'd go with the msx-gpios as well. 👍
About the placement of the property I am not sure.

@jilaypandya
Copy link
Member Author

I'd go with the msx-gpios as well. 👍
About the placement of the property I am not sure.

Wouldn't the obvious placement be right next to the step-gpios and dir-gpios? 😅

@jilaypandya jilaypandya linked a pull request Apr 18, 2025 that will close this issue
@jilaypandya jilaypandya linked a pull request Apr 18, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Stepper Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants