Skip to content

Conversation

@timlee66
Copy link
Collaborator

@timlee66 timlee66 commented Jan 8, 2026

The PWM clock configurations in npcm.dtsi were incorrectly mapped to PWDWN_CTL registers. According to the NPCM400 hardware specification, the PWM modules use the following power-down control mappings:

Hardware Name Software PWM PWDWN_CTL Register


PWM_A (bit 0) pwm0 PWDWN_CTL2[0]
PWM_B (bit 1) pwm1 PWDWN_CTL2[1]
PWM_C (bit 2) pwm2 PWDWN_CTL2[2]
PWM_D (bit 3) pwm3 PWDWN_CTL2[3]
PWM_E (bit 4) pwm4 PWDWN_CTL2[4]
PWM_F (bit 5) pwm5 PWDWN_CTL2[5]
PWM_G (bit 6) pwm6 PWDWN_CTL2[6]
PWM_H (bit 7) pwm7 PWDWN_CTL2[7]
PWM_I (bit 0) pwm8 PWDWN_CTL0[0]
PWM_J (bit 1) pwm9 PWDWN_CTL0[1]

This fix ensures PWM modules are correctly powered on/off through their designated power-down control register bits.

The PWM clock configurations in npcm.dtsi were incorrectly mapped to
PWDWN_CTL registers. According to the NPCM400 hardware specification,
the PWM modules use the following power-down control mappings:

```
Hardware Name    Software PWM    PWDWN_CTL Register
-------------    ------------    ------------------
PWM_A (bit 0)    pwm0            PWDWN_CTL2[0]
PWM_B (bit 1)    pwm1            PWDWN_CTL2[1]
PWM_C (bit 2)    pwm2            PWDWN_CTL2[2]
PWM_D (bit 3)    pwm3            PWDWN_CTL2[3]
PWM_E (bit 4)    pwm4            PWDWN_CTL2[4]
PWM_F (bit 5)    pwm5            PWDWN_CTL2[5]
PWM_G (bit 6)    pwm6            PWDWN_CTL2[6]
PWM_H (bit 7)    pwm7            PWDWN_CTL2[7]
PWM_I (bit 0)    pwm8            PWDWN_CTL0[0]
PWM_J (bit 1)    pwm9            PWDWN_CTL0[1]
```

This fix ensures PWM modules are correctly powered on/off through
their designated power-down control register bits.

Signed-off-by: Tim Lee <CHLi30@nuvoton.com>
@maxdog988 maxdog988 merged commit 5c37aa6 into Nuvoton-Israel:joseph/npcm4_to_npcmx Jan 9, 2026
1 check passed
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.

2 participants