Talk:PWM Controller Register Guide

Two things need to be noted here.

PWM_CH0_PERIOD (and CH1) is defined to setup and read a 16-bit counter. PWM_CH0_PUL_START mentions that the pulse width is set in register [0:15]. But PWM_CH0_PERIOD defines it as an 8-bit value, with the other 8-bits being undefined/unused. This seems like an obvious mistake in the datasheet. "Luckly" the code uses hardcoded registers so searching for 0x204 gave some results stating this to be true, as the write mask is specifically set to 0xffff0000. https://github.com/amery/linux-allwinner/blob/wip/lichee3-sunxi/import-sun5i/drivers/video/sun4i/disp/de_bsp/de/disp_lcd.c#L939