How to Enable and Control PWMs for Libre Computer AML-S905D3-CC Solitude and AML-A311D-CC Alta Cottonwood Family

There are 10 PWMs, 4 AO and 6 EE. Any GPIO can be used as a software PWM but those require CPU interrupts which are taxing for the system and not as accurate. These are the pins that can be muxed to expose PWM functionality. For graphical representation, see the GPIO header maps.

PWM to GPIO pinmux

  • PWMAO_A GPIOAO_11
  • PWMAO_B GPIOE_0
  • PWMAO_C GPIOAO_4 GPIOAO_6
  • PWMAO_D GPIOE_1 GPIOAO_5 GPIOAO_10
  • PWM_A GPIOX_6
  • PWM_B GPIOZ_0 GPIOZ_13 GPIOX_7 GPIOX_19 GPIOH_7
  • PWM_C GPIOX_8 GPIOX_5 GPIOC_4 GPIOZ_1
  • PWM_D GPIOZ_2 GPIOA_4 GPIOX_3 GPIOX_6
  • PWM_E GPIOX_16
  • PWM_F GPIOX_7 GPIOH_5 GPIOZ_12 GPIOA_11

Header Pin to PWM pinmux

  • Pin 7 - PWMAO_C
  • Pin 16 - PWM_D
  • Pin 21 - PWM_F
  • Pin 23 - PWM_B
  • Pin 32 - PWM_F
  • Pin 33 - PWM_C
  • Pin 38 - PWM_C

Some of the PWMs are already used for CPU voltage regulation per the schematics and cannot be changed without crashing the system but the PWMs on the headers should all be available.

Amlogic PWMs are paired meaning that a single module controls two PWMs so care must be taken in layering the device tree overlays. For example, AB are paired, CD are paired, etc. You cannot enable pwm-a and then enable pwm-b. You have to enable pwm-ab.