Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "bone/black.h"
- // note: P9.41 and P9.42 both connect to two processor pins each, which
- // cape-universal calls P9_41/42 and P9_91/92 respectively.
- USES_PIN(P9_41);
- USES_PIN(P9_91);
- USES_PIN(P9_42);
- USES_PIN(P9_92);
- // create pinmux helper to switch between disabled and active states for
- // pruout pins, to allow userspace to initialize R30 before changing the pinmux
- / {
- stepper-pinmux {
- compatible = "bone-pinmux-helper";
- pinctrl-names = "default", "active";
- pinctrl-0 = <&stepper_unused_pins>, <&stepper_disabled_pins>;
- pinctrl-1 = <&stepper_unused_pins>, <&stepper_active_pins>;
- };
- };
- &am33xx_pinmux {
- stepper_unused_pins: stepper-unused {
- pinctrl-single,pins = <
- PIN_NOPULL( P9_41a, 7 )
- PIN_NOPULL( P9_42a, 7 )
- >;
- };
- stepper_disabled_pins: stepper-disabled {
- pinctrl-single,pins = <
- PIN_PULLDN( P9_41b, 7 )
- PIN_PULLDN( P9_42b, 7 )
- >;
- };
- stepper_active_pins: stepper-active {
- pinctrl-single,pins = <
- PIN_PULLDN( P9_41b, 5 ) // pru 0 out 6
- PIN_PULLDN( P9_42b, 5 ) // pru 0 out 4
- >;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement