aboutsummaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorDario Binacchi <dariobin@libero.it>2020-12-30 00:16:25 +0100
committerLokesh Vutla <lokeshvutla@ti.com>2021-01-12 10:58:05 +0530
commit0f4effb05b275f36c490673313317cfe897c9b79 (patch)
treee26a48e948f271d39648156a9cee56f5c1564cdd /drivers/bus
parentade7f0d00e598387fe67475d54511df4fe25d83f (diff)
downloadu-boot-0f4effb05b275f36c490673313317cfe897c9b79.zip
u-boot-0f4effb05b275f36c490673313317cfe897c9b79.tar.gz
u-boot-0f4effb05b275f36c490673313317cfe897c9b79.tar.bz2
bus: ti: am33xx: add pwm subsystem driver
The TI PWMSS driver is a simple bus driver for providing clock and power management for the PWM peripherals on TI AM33xx SoCs, namely eCAP, eHRPWM and eQEP. For DT binding details see Linux doc: - Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt Signed-off-by: Dario Binacchi <dariobin@libero.it>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/Kconfig6
-rw-r--r--drivers/bus/Makefile1
-rw-r--r--drivers/bus/ti-pwmss.c21
3 files changed, 28 insertions, 0 deletions
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index 733bec5..d742ed3 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -5,6 +5,12 @@
menu "Bus devices"
+config TI_PWMSS
+ bool
+ default y if ARCH_OMAP2PLUS && PWM_TI_EHRPWM
+ help
+ PWM Subsystem driver support for AM33xx SOC.
+
config TI_SYSC
bool "TI sysc interconnect target module driver"
depends on ARCH_OMAP2PLUS
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 875bb4e..a2e71c7 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -3,5 +3,6 @@
# Makefile for the bus drivers.
#
+obj-$(CONFIG_TI_PWMSS) += ti-pwmss.o
obj-$(CONFIG_TI_SYSC) += ti-sysc.o
obj-$(CONFIG_UNIPHIER_SYSTEM_BUS) += uniphier-system-bus.o
diff --git a/drivers/bus/ti-pwmss.c b/drivers/bus/ti-pwmss.c
new file mode 100644
index 0000000..265b4cf
--- /dev/null
+++ b/drivers/bus/ti-pwmss.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Pulse-Width Modulation Subsystem (pwmss)
+ *
+ * Copyright (C) 2020 Dario Binacchi <dariobin@libero.it>
+ */
+
+#include <common.h>
+#include <dm.h>
+
+static const struct udevice_id ti_pwmss_ids[] = {
+ {.compatible = "ti,am33xx-pwmss"},
+ {}
+};
+
+U_BOOT_DRIVER(ti_pwmss) = {
+ .name = "ti_pwmss",
+ .id = UCLASS_SIMPLE_BUS,
+ .of_match = ti_pwmss_ids,
+ .bind = dm_scan_fdt_dev,
+};