Here is my source code:
writel(1<<20, HW_PINCTRL_MUXSEL7_SET);
writel(1<<21, HW_PINCTRL_MUXSEL7_CLR);
// Set the HW_PINCTRL_DRIVEx (3.3V, 12mA)
writel(0x00000600, HW_PINCTRL_DRIVE15_SET);
writel(1<<29 | 1 <<30, HW_CLKCTRL_XTAL_CLR); //gate clock for PWM
/* Reset PWM module*/
writel(1<<31, HW_PWM_CTRL_CLR); //SFTRST = 0;
/* Enable clock*/
//for(i = 100; i; i--);
writel(1<<30, HW_PWM_CTRL_CLR); //CLKGATE = 0;
writel(1<<7, HW_PWM_CTRL_CLR); //Disable PWM7
// Setup PWM channels
writel(0x00002ee0, HW_PWM_ACTIVE7); //12000 ticks
writel(0x000E5DBF, HW_PWM_PERIOD7); //24000 ticks
writel(1<<7, HW_PWM_CTRL_SET); //Enable PWM7
I checked the value of control and status register (all registers was set properly)
HW_CLKCTRL_XTAL: 00 00 00 01
HW_PWM_CTRL: 3F C0 00 80 (PWM7 is enabled)
HW_PWM_ACTIVE7: 00 00 2E E0
HW_PWM_PERIOD7: 00 0E 5D BF