All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] pwm, imx: add Kconfig and DM support
@ 2019-05-28  4:51 Heiko Schocher
  2019-05-28  4:51 ` [U-Boot] [PATCH 1/2] pwm: imx: add Kconfig support Heiko Schocher
  2019-05-28  4:51 ` [U-Boot] [PATCH 2/2] pwm: imx: add DM_PWM support Heiko Schocher
  0 siblings, 2 replies; 6+ messages in thread
From: Heiko Schocher @ 2019-05-28  4:51 UTC (permalink / raw)
  To: u-boot

add Kconfig and DM support for imx pwm driver

Travis builds clean, see:
https://travis-ci.org/hsdenx/u-boot-test/builds/537631288


Heiko Schocher (2):
  pwm: imx: add Kconfig support
  pwm: imx: add DM_PWM support

 README                                |   4 -
 configs/aristainetos2_defconfig       |   1 +
 configs/aristainetos2b_defconfig      |   1 +
 configs/aristainetos_defconfig        |   1 +
 configs/dms-ba16-1g_defconfig         |   1 +
 configs/dms-ba16_defconfig            |   1 +
 configs/ge_bx50v3_defconfig           |   1 +
 configs/mx53ppd_defconfig             |   1 +
 configs/vining_2000_defconfig         |   1 +
 drivers/pwm/Kconfig                   |   5 ++
 drivers/pwm/pwm-imx.c                 | 110 +++++++++++++++++++++++---
 include/configs/advantech_dms-ba16.h  |   1 -
 include/configs/aristainetos-common.h |   1 -
 include/configs/aristainetos2.h       |   3 -
 include/configs/aristainetos2b.h      |   3 -
 include/configs/ge_bx50v3.h           |   1 -
 include/configs/mx53ppd.h             |   1 -
 include/configs/vining_2000.h         |   1 -
 scripts/config_whitelist.txt          |   1 -
 19 files changed, 114 insertions(+), 25 deletions(-)

-- 
2.21.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] pwm: imx: add Kconfig support
  2019-05-28  4:51 [U-Boot] [PATCH 0/2] pwm, imx: add Kconfig and DM support Heiko Schocher
@ 2019-05-28  4:51 ` Heiko Schocher
  2019-05-28  8:37   ` Martyn Welch
  2019-07-20  8:46   ` sbabic at denx.de
  2019-05-28  4:51 ` [U-Boot] [PATCH 2/2] pwm: imx: add DM_PWM support Heiko Schocher
  1 sibling, 2 replies; 6+ messages in thread
From: Heiko Schocher @ 2019-05-28  4:51 UTC (permalink / raw)
  To: u-boot

add Kconfig support for this driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 README                                | 4 ----
 configs/aristainetos2_defconfig       | 1 +
 configs/aristainetos2b_defconfig      | 1 +
 configs/aristainetos_defconfig        | 1 +
 configs/dms-ba16-1g_defconfig         | 1 +
 configs/dms-ba16_defconfig            | 1 +
 configs/ge_bx50v3_defconfig           | 1 +
 configs/mx53ppd_defconfig             | 1 +
 configs/vining_2000_defconfig         | 1 +
 drivers/pwm/Kconfig                   | 5 +++++
 include/configs/advantech_dms-ba16.h  | 1 -
 include/configs/aristainetos-common.h | 1 -
 include/configs/aristainetos2.h       | 3 ---
 include/configs/aristainetos2b.h      | 3 ---
 include/configs/ge_bx50v3.h           | 1 -
 include/configs/mx53ppd.h             | 1 -
 include/configs/vining_2000.h         | 1 -
 scripts/config_whitelist.txt          | 1 -
 18 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/README b/README
index fd1e17c513..730e28db88 100644
--- a/README
+++ b/README
@@ -964,10 +964,6 @@ The following options need to be configured:
 			CONFIG_SH_ETHER_CACHE_WRITEBACK
 			If this option is set, the driver enables cache flush.
 
-- PWM Support:
-		CONFIG_PWM_IMX
-		Support for PWM module on the imx6.
-
 - TPM Support:
 		CONFIG_TPM
 		Support TPM devices.
diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig
index 87a8678233..8bd1be4e05 100644
--- a/configs/aristainetos2_defconfig
+++ b/configs/aristainetos2_defconfig
@@ -50,6 +50,7 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_MII=y
+CONFIG_PWM_IMX=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
diff --git a/configs/aristainetos2b_defconfig b/configs/aristainetos2b_defconfig
index 256d7229ba..ed9faa74f0 100644
--- a/configs/aristainetos2b_defconfig
+++ b/configs/aristainetos2b_defconfig
@@ -48,6 +48,7 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_MII=y
+CONFIG_PWM_IMX=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
diff --git a/configs/aristainetos_defconfig b/configs/aristainetos_defconfig
index 44b30e33e8..e67aded809 100644
--- a/configs/aristainetos_defconfig
+++ b/configs/aristainetos_defconfig
@@ -49,6 +49,7 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ8XXX=y
 CONFIG_MII=y
+CONFIG_PWM_IMX=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
diff --git a/configs/dms-ba16-1g_defconfig b/configs/dms-ba16-1g_defconfig
index 980f7b4abb..5c06a4f03d 100644
--- a/configs/dms-ba16-1g_defconfig
+++ b/configs/dms-ba16-1g_defconfig
@@ -41,6 +41,7 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHYLIB=y
 CONFIG_MII=y
+CONFIG_PWM_IMX=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
diff --git a/configs/dms-ba16_defconfig b/configs/dms-ba16_defconfig
index bea75b5d23..bc518f9fed 100644
--- a/configs/dms-ba16_defconfig
+++ b/configs/dms-ba16_defconfig
@@ -40,6 +40,7 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHYLIB=y
 CONFIG_MII=y
+CONFIG_PWM_IMX=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_USB=y
diff --git a/configs/ge_bx50v3_defconfig b/configs/ge_bx50v3_defconfig
index 3111451162..6adad7a995 100644
--- a/configs/ge_bx50v3_defconfig
+++ b/configs/ge_bx50v3_defconfig
@@ -55,6 +55,7 @@ CONFIG_CMD_E1000=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
+CONFIG_PWM_IMX=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_MXC_SPI=y
diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig
index 6c3818d845..b9ed46617b 100644
--- a/configs/mx53ppd_defconfig
+++ b/configs/mx53ppd_defconfig
@@ -43,6 +43,7 @@ CONFIG_FSL_ESDHC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX5=y
+CONFIG_PWM_IMX=y
 CONFIG_RTC_S35392A=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_MX5=y
diff --git a/configs/vining_2000_defconfig b/configs/vining_2000_defconfig
index 073ff48329..0d87cd1431 100644
--- a/configs/vining_2000_defconfig
+++ b/configs/vining_2000_defconfig
@@ -37,6 +37,7 @@ CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_FSL_ESDHC=y
 CONFIG_PHYLIB=y
 CONFIG_MII=y
+CONFIG_PWM_IMX=y
 CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 2984b79766..1f36fc78fa 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -18,6 +18,11 @@ config PWM_EXYNOS
 	  used. It provides 5 channels which can be independently
 	  programmed. Channel 4 (the last) is normally used as a timer.
 
+config PWM_IMX
+	bool "Enable support for i.MX27 and later PWM"
+	help
+	  This PWM is found i.MX27 and later i.MX SoCs.
+
 config PWM_ROCKCHIP
 	bool "Enable support for the Rockchip PWM"
 	depends on DM_PWM
diff --git a/include/configs/advantech_dms-ba16.h b/include/configs/advantech_dms-ba16.h
index 22d1e41bc8..a037349162 100644
--- a/include/configs/advantech_dms-ba16.h
+++ b/include/configs/advantech_dms-ba16.h
@@ -223,7 +223,6 @@
 #define CONFIG_IMX_VIDEO_SKIP
 #endif
 
-#define CONFIG_PWM_IMX
 #define CONFIG_IMX6_PWM_PER_CLK         66000000
 
 #ifdef CONFIG_CMD_PCI
diff --git a/include/configs/aristainetos-common.h b/include/configs/aristainetos-common.h
index a24814673c..e998d9b1b2 100644
--- a/include/configs/aristainetos-common.h
+++ b/include/configs/aristainetos-common.h
@@ -196,7 +196,6 @@
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_IMX_VIDEO_SKIP
 
-#define CONFIG_PWM_IMX
 #define CONFIG_IMX6_PWM_PER_CLK	66000000
 
 #endif /* __ARISTAINETOS_COMMON_CONFIG_H */
diff --git a/include/configs/aristainetos2.h b/include/configs/aristainetos2.h
index 00e5667499..361e6ac654 100644
--- a/include/configs/aristainetos2.h
+++ b/include/configs/aristainetos2.h
@@ -45,9 +45,6 @@
 #define CONFIG_LG4573_BUS 0
 #define CONFIG_LG4573_CS 0
 
-#define CONFIG_PWM_IMX
-#define CONFIG_IMX6_PWM_PER_CLK	66000000
-
 #include "aristainetos-common.h"
 
 #endif                         /* __ARISTAINETOS2_CONFIG_H */
diff --git a/include/configs/aristainetos2b.h b/include/configs/aristainetos2b.h
index cfe0e053b6..cdeb7a3b03 100644
--- a/include/configs/aristainetos2b.h
+++ b/include/configs/aristainetos2b.h
@@ -45,9 +45,6 @@
 #define CONFIG_LG4573_BUS 0
 #define CONFIG_LG4573_CS 1
 
-#define CONFIG_PWM_IMX
-#define CONFIG_IMX6_PWM_PER_CLK	66000000
-
 #include "aristainetos-common.h"
 
 #endif                         /* __ARISTAINETOS2B_CONFIG_H */
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index 0481ed06a9..31214a6aa7 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -198,7 +198,6 @@
 #define CONFIG_IMX_VIDEO_SKIP
 #define CONFIG_CMD_BMP
 
-#define CONFIG_PWM_IMX
 #define CONFIG_IMX6_PWM_PER_CLK	66000000
 
 #define CONFIG_PCI
diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h
index 2d6715cba2..d5b54dfa15 100644
--- a/include/configs/mx53ppd.h
+++ b/include/configs/mx53ppd.h
@@ -211,7 +211,6 @@
 #define CONFIG_BCH
 
 /* Backlight Control */
-#define CONFIG_PWM_IMX
 #define CONFIG_IMX6_PWM_PER_CLK 66666000
 
 #endif				/* __CONFIG_H */
diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h
index fd98c1417e..bce038c7a1 100644
--- a/include/configs/vining_2000.h
+++ b/include/configs/vining_2000.h
@@ -86,7 +86,6 @@
 
 #define CONFIG_IMX_THERMAL
 
-#define CONFIG_PWM_IMX
 #define CONFIG_IMX6_PWM_PER_CLK 66000000
 
 #define CONFIG_ENV_OFFSET		(8 * SZ_64K)
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 5ec4ffbeae..e1bf930be3 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -1512,7 +1512,6 @@ CONFIG_PROOF_POINTS
 CONFIG_PRPMC_PCI_ALIAS
 CONFIG_PSRAM_SCFG
 CONFIG_PWM
-CONFIG_PWM_IMX
 CONFIG_PXA_LCD
 CONFIG_PXA_MMC_GENERIC
 CONFIG_PXA_PWR_I2C
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] pwm: imx: add DM_PWM support
  2019-05-28  4:51 [U-Boot] [PATCH 0/2] pwm, imx: add Kconfig and DM support Heiko Schocher
  2019-05-28  4:51 ` [U-Boot] [PATCH 1/2] pwm: imx: add Kconfig support Heiko Schocher
@ 2019-05-28  4:51 ` Heiko Schocher
  2019-07-20  8:51   ` sbabic at denx.de
  1 sibling, 1 reply; 6+ messages in thread
From: Heiko Schocher @ 2019-05-28  4:51 UTC (permalink / raw)
  To: u-boot

add DM support for pwm-imx driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 drivers/pwm/pwm-imx.c | 110 ++++++++++++++++++++++++++++++++++++++----
 1 file changed, 101 insertions(+), 9 deletions(-)

diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 83c1bfa820..8d8f3e6f9f 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <div64.h>
+#include <dm.h>
 #include <pwm.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
@@ -24,18 +25,12 @@ int pwm_init(int pwm_id, int div, int invert)
 	return 0;
 }
 
-int pwm_config(int pwm_id, int duty_ns, int period_ns)
+int pwm_config_internal(struct pwm_regs *pwm, unsigned long period_cycles,
+			unsigned long duty_cycles, unsigned long prescale)
 {
-	struct pwm_regs *pwm = (struct pwm_regs *)pwm_id_to_reg(pwm_id);
-	unsigned long period_cycles, duty_cycles, prescale;
 	u32 cr;
 
-	if (!pwm)
-		return -1;
-
-	pwm_imx_get_parms(period_ns, duty_ns, &period_cycles, &duty_cycles,
-			  &prescale);
-
+	writel(0, &pwm->ir);
 	cr = PWMCR_PRESCALER(prescale) |
 		PWMCR_DOZEEN | PWMCR_WAITEN |
 		PWMCR_DBGEN | PWMCR_CLKSRC_IPG_HIGH;
@@ -48,6 +43,20 @@ int pwm_config(int pwm_id, int duty_ns, int period_ns)
 	return 0;
 }
 
+int pwm_config(int pwm_id, int duty_ns, int period_ns)
+{
+	struct pwm_regs *pwm = (struct pwm_regs *)pwm_id_to_reg(pwm_id);
+	unsigned long period_cycles, duty_cycles, prescale;
+
+	if (!pwm)
+		return -1;
+
+	pwm_imx_get_parms(period_ns, duty_ns, &period_cycles, &duty_cycles,
+			  &prescale);
+
+	return pwm_config_internal(pwm, period_cycles, duty_cycles, prescale);
+}
+
 int pwm_enable(int pwm_id)
 {
 	struct pwm_regs *pwm = (struct pwm_regs *)pwm_id_to_reg(pwm_id);
@@ -68,3 +77,86 @@ void pwm_disable(int pwm_id)
 
 	clrbits_le32(&pwm->cr, PWMCR_EN);
 }
+
+#if defined(CONFIG_DM_PWM)
+struct imx_pwm_priv {
+	struct pwm_regs *regs;
+	bool invert;
+};
+
+static int imx_pwm_set_invert(struct udevice *dev, uint channel,
+			      bool polarity)
+{
+	struct imx_pwm_priv *priv = dev_get_priv(dev);
+
+	debug("%s: polarity=%u\n", __func__, polarity);
+	priv->invert = polarity;
+
+	return 0;
+}
+
+static int imx_pwm_set_config(struct udevice *dev, uint channel,
+			      uint period_ns, uint duty_ns)
+{
+	struct imx_pwm_priv *priv = dev_get_priv(dev);
+	struct pwm_regs *regs = priv->regs;
+	unsigned long period_cycles, duty_cycles, prescale;
+
+	debug("%s: Config '%s' channel: %d\n", __func__, dev->name, channel);
+
+	pwm_imx_get_parms(period_ns, duty_ns, &period_cycles, &duty_cycles,
+			  &prescale);
+
+	return pwm_config_internal(regs, period_cycles, duty_cycles, prescale);
+};
+
+static int imx_pwm_set_enable(struct udevice *dev, uint channel, bool enable)
+{
+	struct imx_pwm_priv *priv = dev_get_priv(dev);
+	struct pwm_regs *regs = priv->regs;
+
+	debug("%s: Enable '%s' state: %d\n", __func__, dev->name, enable);
+
+	if (enable)
+		setbits_le32(&regs->cr, PWMCR_EN);
+	else
+		clrbits_le32(&regs->cr, PWMCR_EN);
+
+	return 0;
+};
+
+static int imx_pwm_ofdata_to_platdata(struct udevice *dev)
+{
+	struct imx_pwm_priv *priv = dev_get_priv(dev);
+
+	priv->regs = (struct pwm_regs *)devfdt_get_addr(dev);
+
+	return 0;
+}
+
+static int imx_pwm_probe(struct udevice *dev)
+{
+	return 0;
+}
+
+static const struct pwm_ops imx_pwm_ops = {
+	.set_invert	= imx_pwm_set_invert,
+	.set_config	= imx_pwm_set_config,
+	.set_enable	= imx_pwm_set_enable,
+};
+
+static const struct udevice_id imx_pwm_ids[] = {
+	{ .compatible = "fsl,imx27-pwm" },
+	{ }
+};
+
+U_BOOT_DRIVER(imx_pwm) = {
+	.name	= "imx_pwm",
+	.id	= UCLASS_PWM,
+	.of_match = imx_pwm_ids,
+	.ops	= &imx_pwm_ops,
+	.ofdata_to_platdata	= imx_pwm_ofdata_to_platdata,
+	.probe		= imx_pwm_probe,
+	.priv_auto_alloc_size	= sizeof(struct imx_pwm_priv),
+};
+#endif
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] pwm: imx: add Kconfig support
  2019-05-28  4:51 ` [U-Boot] [PATCH 1/2] pwm: imx: add Kconfig support Heiko Schocher
@ 2019-05-28  8:37   ` Martyn Welch
  2019-07-20  8:46   ` sbabic at denx.de
  1 sibling, 0 replies; 6+ messages in thread
From: Martyn Welch @ 2019-05-28  8:37 UTC (permalink / raw)
  To: u-boot

On Tue, 2019-05-28 at 06:51 +0200, Heiko Schocher wrote:
> add Kconfig support for this driver.
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>

Acked-by: Martyn Welch <martyn.welch@collabora.co.uk>

> ---
> 
>  README                                | 4 ----
>  configs/aristainetos2_defconfig       | 1 +
>  configs/aristainetos2b_defconfig      | 1 +
>  configs/aristainetos_defconfig        | 1 +
>  configs/dms-ba16-1g_defconfig         | 1 +
>  configs/dms-ba16_defconfig            | 1 +
>  configs/ge_bx50v3_defconfig           | 1 +
>  configs/mx53ppd_defconfig             | 1 +
>  configs/vining_2000_defconfig         | 1 +
>  drivers/pwm/Kconfig                   | 5 +++++
>  include/configs/advantech_dms-ba16.h  | 1 -
>  include/configs/aristainetos-common.h | 1 -
>  include/configs/aristainetos2.h       | 3 ---
>  include/configs/aristainetos2b.h      | 3 ---
>  include/configs/ge_bx50v3.h           | 1 -
>  include/configs/mx53ppd.h             | 1 -
>  include/configs/vining_2000.h         | 1 -
>  scripts/config_whitelist.txt          | 1 -
>  18 files changed, 13 insertions(+), 16 deletions(-)
> 
> diff --git a/README b/README
> index fd1e17c513..730e28db88 100644
> --- a/README
> +++ b/README
> @@ -964,10 +964,6 @@ The following options need to be configured:
>  			CONFIG_SH_ETHER_CACHE_WRITEBACK
>  			If this option is set, the driver enables cache
> flush.
>  
> -- PWM Support:
> -		CONFIG_PWM_IMX
> -		Support for PWM module on the imx6.
> -
>  - TPM Support:
>  		CONFIG_TPM
>  		Support TPM devices.
> diff --git a/configs/aristainetos2_defconfig
> b/configs/aristainetos2_defconfig
> index 87a8678233..8bd1be4e05 100644
> --- a/configs/aristainetos2_defconfig
> +++ b/configs/aristainetos2_defconfig
> @@ -50,6 +50,7 @@ CONFIG_PHYLIB=y
>  CONFIG_PHY_MICREL=y
>  CONFIG_PHY_MICREL_KSZ90X1=y
>  CONFIG_MII=y
> +CONFIG_PWM_IMX=y
>  CONFIG_SPI=y
>  CONFIG_MXC_SPI=y
>  CONFIG_USB=y
> diff --git a/configs/aristainetos2b_defconfig
> b/configs/aristainetos2b_defconfig
> index 256d7229ba..ed9faa74f0 100644
> --- a/configs/aristainetos2b_defconfig
> +++ b/configs/aristainetos2b_defconfig
> @@ -48,6 +48,7 @@ CONFIG_PHYLIB=y
>  CONFIG_PHY_MICREL=y
>  CONFIG_PHY_MICREL_KSZ90X1=y
>  CONFIG_MII=y
> +CONFIG_PWM_IMX=y
>  CONFIG_SPI=y
>  CONFIG_MXC_SPI=y
>  CONFIG_USB=y
> diff --git a/configs/aristainetos_defconfig
> b/configs/aristainetos_defconfig
> index 44b30e33e8..e67aded809 100644
> --- a/configs/aristainetos_defconfig
> +++ b/configs/aristainetos_defconfig
> @@ -49,6 +49,7 @@ CONFIG_PHYLIB=y
>  CONFIG_PHY_MICREL=y
>  CONFIG_PHY_MICREL_KSZ8XXX=y
>  CONFIG_MII=y
> +CONFIG_PWM_IMX=y
>  CONFIG_SPI=y
>  CONFIG_MXC_SPI=y
>  CONFIG_USB=y
> diff --git a/configs/dms-ba16-1g_defconfig b/configs/dms-ba16-
> 1g_defconfig
> index 980f7b4abb..5c06a4f03d 100644
> --- a/configs/dms-ba16-1g_defconfig
> +++ b/configs/dms-ba16-1g_defconfig
> @@ -41,6 +41,7 @@ CONFIG_SPI_FLASH_STMICRO=y
>  CONFIG_SPI_FLASH_WINBOND=y
>  CONFIG_PHYLIB=y
>  CONFIG_MII=y
> +CONFIG_PWM_IMX=y
>  CONFIG_SPI=y
>  CONFIG_MXC_SPI=y
>  CONFIG_USB=y
> diff --git a/configs/dms-ba16_defconfig b/configs/dms-ba16_defconfig
> index bea75b5d23..bc518f9fed 100644
> --- a/configs/dms-ba16_defconfig
> +++ b/configs/dms-ba16_defconfig
> @@ -40,6 +40,7 @@ CONFIG_SPI_FLASH_STMICRO=y
>  CONFIG_SPI_FLASH_WINBOND=y
>  CONFIG_PHYLIB=y
>  CONFIG_MII=y
> +CONFIG_PWM_IMX=y
>  CONFIG_SPI=y
>  CONFIG_MXC_SPI=y
>  CONFIG_USB=y
> diff --git a/configs/ge_bx50v3_defconfig
> b/configs/ge_bx50v3_defconfig
> index 3111451162..6adad7a995 100644
> --- a/configs/ge_bx50v3_defconfig
> +++ b/configs/ge_bx50v3_defconfig
> @@ -55,6 +55,7 @@ CONFIG_CMD_E1000=y
>  CONFIG_MII=y
>  CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX6=y
> +CONFIG_PWM_IMX=y
>  CONFIG_SPI=y
>  CONFIG_DM_SPI=y
>  CONFIG_MXC_SPI=y
> diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig
> index 6c3818d845..b9ed46617b 100644
> --- a/configs/mx53ppd_defconfig
> +++ b/configs/mx53ppd_defconfig
> @@ -43,6 +43,7 @@ CONFIG_FSL_ESDHC=y
>  CONFIG_MII=y
>  CONFIG_PINCTRL=y
>  CONFIG_PINCTRL_IMX5=y
> +CONFIG_PWM_IMX=y
>  CONFIG_RTC_S35392A=y
>  CONFIG_USB=y
>  CONFIG_USB_EHCI_MX5=y
> diff --git a/configs/vining_2000_defconfig
> b/configs/vining_2000_defconfig
> index 073ff48329..0d87cd1431 100644
> --- a/configs/vining_2000_defconfig
> +++ b/configs/vining_2000_defconfig
> @@ -37,6 +37,7 @@ CONFIG_SUPPORT_EMMC_BOOT=y
>  CONFIG_FSL_ESDHC=y
>  CONFIG_PHYLIB=y
>  CONFIG_MII=y
> +CONFIG_PWM_IMX=y
>  CONFIG_PCI=y
>  CONFIG_USB=y
>  CONFIG_USB_STORAGE=y
> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> index 2984b79766..1f36fc78fa 100644
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -18,6 +18,11 @@ config PWM_EXYNOS
>  	  used. It provides 5 channels which can be independently
>  	  programmed. Channel 4 (the last) is normally used as a timer.
>  
> +config PWM_IMX
> +	bool "Enable support for i.MX27 and later PWM"
> +	help
> +	  This PWM is found i.MX27 and later i.MX SoCs.
> +
>  config PWM_ROCKCHIP
>  	bool "Enable support for the Rockchip PWM"
>  	depends on DM_PWM
> diff --git a/include/configs/advantech_dms-ba16.h
> b/include/configs/advantech_dms-ba16.h
> index 22d1e41bc8..a037349162 100644
> --- a/include/configs/advantech_dms-ba16.h
> +++ b/include/configs/advantech_dms-ba16.h
> @@ -223,7 +223,6 @@
>  #define CONFIG_IMX_VIDEO_SKIP
>  #endif
>  
> -#define CONFIG_PWM_IMX
>  #define CONFIG_IMX6_PWM_PER_CLK         66000000
>  
>  #ifdef CONFIG_CMD_PCI
> diff --git a/include/configs/aristainetos-common.h
> b/include/configs/aristainetos-common.h
> index a24814673c..e998d9b1b2 100644
> --- a/include/configs/aristainetos-common.h
> +++ b/include/configs/aristainetos-common.h
> @@ -196,7 +196,6 @@
>  #define CONFIG_VIDEO_BMP_LOGO
>  #define CONFIG_IMX_VIDEO_SKIP
>  
> -#define CONFIG_PWM_IMX
>  #define CONFIG_IMX6_PWM_PER_CLK	66000000
>  
>  #endif /* __ARISTAINETOS_COMMON_CONFIG_H */
> diff --git a/include/configs/aristainetos2.h
> b/include/configs/aristainetos2.h
> index 00e5667499..361e6ac654 100644
> --- a/include/configs/aristainetos2.h
> +++ b/include/configs/aristainetos2.h
> @@ -45,9 +45,6 @@
>  #define CONFIG_LG4573_BUS 0
>  #define CONFIG_LG4573_CS 0
>  
> -#define CONFIG_PWM_IMX
> -#define CONFIG_IMX6_PWM_PER_CLK	66000000
> -
>  #include "aristainetos-common.h"
>  
>  #endif                         /* __ARISTAINETOS2_CONFIG_H */
> diff --git a/include/configs/aristainetos2b.h
> b/include/configs/aristainetos2b.h
> index cfe0e053b6..cdeb7a3b03 100644
> --- a/include/configs/aristainetos2b.h
> +++ b/include/configs/aristainetos2b.h
> @@ -45,9 +45,6 @@
>  #define CONFIG_LG4573_BUS 0
>  #define CONFIG_LG4573_CS 1
>  
> -#define CONFIG_PWM_IMX
> -#define CONFIG_IMX6_PWM_PER_CLK	66000000
> -
>  #include "aristainetos-common.h"
>  
>  #endif                         /* __ARISTAINETOS2B_CONFIG_H */
> diff --git a/include/configs/ge_bx50v3.h
> b/include/configs/ge_bx50v3.h
> index 0481ed06a9..31214a6aa7 100644
> --- a/include/configs/ge_bx50v3.h
> +++ b/include/configs/ge_bx50v3.h
> @@ -198,7 +198,6 @@
>  #define CONFIG_IMX_VIDEO_SKIP
>  #define CONFIG_CMD_BMP
>  
> -#define CONFIG_PWM_IMX
>  #define CONFIG_IMX6_PWM_PER_CLK	66000000
>  
>  #define CONFIG_PCI
> diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h
> index 2d6715cba2..d5b54dfa15 100644
> --- a/include/configs/mx53ppd.h
> +++ b/include/configs/mx53ppd.h
> @@ -211,7 +211,6 @@
>  #define CONFIG_BCH
>  
>  /* Backlight Control */
> -#define CONFIG_PWM_IMX
>  #define CONFIG_IMX6_PWM_PER_CLK 66666000
>  
>  #endif				/* __CONFIG_H */
> diff --git a/include/configs/vining_2000.h
> b/include/configs/vining_2000.h
> index fd98c1417e..bce038c7a1 100644
> --- a/include/configs/vining_2000.h
> +++ b/include/configs/vining_2000.h
> @@ -86,7 +86,6 @@
>  
>  #define CONFIG_IMX_THERMAL
>  
> -#define CONFIG_PWM_IMX
>  #define CONFIG_IMX6_PWM_PER_CLK 66000000
>  
>  #define CONFIG_ENV_OFFSET		(8 * SZ_64K)
> diff --git a/scripts/config_whitelist.txt
> b/scripts/config_whitelist.txt
> index 5ec4ffbeae..e1bf930be3 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -1512,7 +1512,6 @@ CONFIG_PROOF_POINTS
>  CONFIG_PRPMC_PCI_ALIAS
>  CONFIG_PSRAM_SCFG
>  CONFIG_PWM
> -CONFIG_PWM_IMX
>  CONFIG_PXA_LCD
>  CONFIG_PXA_MMC_GENERIC
>  CONFIG_PXA_PWR_I2C

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot]  [PATCH 1/2] pwm: imx: add Kconfig support
  2019-05-28  4:51 ` [U-Boot] [PATCH 1/2] pwm: imx: add Kconfig support Heiko Schocher
  2019-05-28  8:37   ` Martyn Welch
@ 2019-07-20  8:46   ` sbabic at denx.de
  1 sibling, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2019-07-20  8:46 UTC (permalink / raw)
  To: u-boot

> add Kconfig support for this driver.
> Signed-off-by: Heiko Schocher <hs@denx.de>
> Acked-by: Martyn Welch <martyn.welch@collabora.co.uk>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot]  [PATCH 2/2] pwm: imx: add DM_PWM support
  2019-05-28  4:51 ` [U-Boot] [PATCH 2/2] pwm: imx: add DM_PWM support Heiko Schocher
@ 2019-07-20  8:51   ` sbabic at denx.de
  0 siblings, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2019-07-20  8:51 UTC (permalink / raw)
  To: u-boot

> add DM support for pwm-imx driver.
> Signed-off-by: Heiko Schocher <hs@denx.de>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-20  8:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28  4:51 [U-Boot] [PATCH 0/2] pwm, imx: add Kconfig and DM support Heiko Schocher
2019-05-28  4:51 ` [U-Boot] [PATCH 1/2] pwm: imx: add Kconfig support Heiko Schocher
2019-05-28  8:37   ` Martyn Welch
2019-07-20  8:46   ` sbabic at denx.de
2019-05-28  4:51 ` [U-Boot] [PATCH 2/2] pwm: imx: add DM_PWM support Heiko Schocher
2019-07-20  8:51   ` sbabic at denx.de

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.