]> git.baikalelectronics.ru Git - uboot.git/commit
pwm: Add driver for Amlogic Meson PWM controller
authorNeil Armstrong <narmstrong@baylibre.com>
Thu, 1 Oct 2020 08:04:56 +0000 (10:04 +0200)
committerNeil Armstrong <narmstrong@baylibre.com>
Mon, 5 Oct 2020 16:02:16 +0000 (18:02 +0200)
commitabbc14148f0ff5473ebed2e1ae32b580dec3035a
tree50cd6ab4c006a6b1a238fdc79f235a6191f1e6d0
parent08fab352a44656ac06cfc36dc9739d16459f9675
pwm: Add driver for Amlogic Meson PWM controller

This adds the driver for the PWM controller found in the Amlogic SoCs.

This PWM is only a set of Gates, Dividers and Counters:
PWM output is achieved by calculating a clock that permits calculating
two periods (low and high). The counter then has to be set to switch after
N cycles for the first half period.
The hardware has no "polarity" setting. This driver reverses the period
cycles (the low length is inverted with the high length) for
PWM_POLARITY_INVERSED.

Disabling the PWM stops the output immediately (without waiting for the
current period to complete first).

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
drivers/pwm/Kconfig
drivers/pwm/Makefile
drivers/pwm/pwm-meson.c [new file with mode: 0644]