Skip to content

Conversation

@jilaypandya
Copy link
Member

m0-gpios and m1-gpios are common in step-dir stepper drivers and hence placing them in common stepper-controller.yaml along with step-gpios and dir-gpios

m0-gpios and m1-gpios are common in step-dir stepper drivers
and hence placing them in common stepper-controller.yaml along
with step-gpios and dir-gpios

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 6, 2025

@dipakgmx
Copy link
Member

dipakgmx commented Dec 6, 2025

This solution does not seem extensible. Drivers like A4988, DRV8825 support 3 pins for setting micro-stepping which would not work (or, say extend), in this case. A possible solution, would be to revert to the phandle logic for the microstepping pins, like earlier:

microstep-mode-gpios:
    type: phandle-array
    description: GPIO specifiers for microstepping pins.

& use the existing

  micro-step-res:
    type: int
    default: 1
    enum:
      - 1
      - 2
      - 4
      - 8
      - 16
      - 32
      - 64
      - 128
      - 256
    description: |
      micro-step resolution to be set while initializing the device driver.
      Use this only if the MS pins are hardwired to VCC/GND.

to determine the microstepping resolution in the case of hardwired pins.

Also, we can then enforce this exclusivity in the driver level (eiither set via gpio's or hardwired(static)).

@jilaypandya
Copy link
Member Author

jilaypandya commented Dec 6, 2025

One could hardwire one pin, while still toggling the others via gpio. In this scenario, the idx of the pin getting toggled via gpio is important to know.The available micro-step resolutions would be reduced, but the application would still have the possibility to select.

We can extend the list as soon as one of the aforementioned drivers gets upstreamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants