Skip to content
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

Add sixtron connector Nexus PWM #14

Open
Sokario opened this issue Nov 8, 2024 · 0 comments
Open

Add sixtron connector Nexus PWM #14

Sokario opened this issue Nov 8, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Sokario
Copy link
Contributor

Sokario commented Nov 8, 2024

A mapping for PWM phandles needs to be defined in the sixtron_connector.dtsi in order to be easily used for pwm specifiers.

  <DIO18 0 &gpio1 11 0>;
+ 
+ sixtron_connector_1_pwm: sixtron-connector-1-pwm {
+     compatible = "sixtron-pwm";
+     #pwm-cells = <3>;
+     pwm-map-mask = <0xffffffff 0x0 0x0>;
+     pwm-map-pass-thru = <0x0 0xffffffff 0x0f>;
+     pwm-map = <PWM1 0 0 &<PERIPHERAL> <CHANNEL> 0 0>,
+               <PWM2 0 0 &<PERIPHERAL> <CHANNEL> 0 0>,
+               <PWM3 0 0 &<PERIPHERAL> <CHANNEL> 0 0>;
+ }

An example to populate PERIPHERAL and CHANNEL is available here:

pwm-map = <PWM1 0 0 &pwm1 3 0 0>,
          <PWM2 0 0 &pwm1 2 0 0>,
          <PWM3 0 0 &pwm3 3 0 0>;

A label needs to defines the default pwm nexus.

  sixtron_spi: &sixtron_connector_1_spi {};
+ sixtron_pwm: &sixtron_connector_1_pwm {};

Caution

Be sure to compile example to validate the nexus.

@Sokario Sokario added the enhancement New feature or request label Nov 8, 2024
@Sokario Sokario self-assigned this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant