U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add support for eCAP PWM and LCD
@ 2025-03-19 20:25 Sukrut Bellary
  2025-03-19 20:25 ` [PATCH 1/3] pwm: ti: am33xx: Enable Auxiliary PWM using eCAP Sukrut Bellary
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sukrut Bellary @ 2025-03-19 20:25 UTC (permalink / raw)
  To: Tom Rini
  Cc: Sukrut Bellary, Kevin Hilman, Bajjuri Praneeth,
	Raghavendra Vignesh, u-boot

This patch series adds the support for

1. In am33xx SoC[1], enhanced capture (eCAP) supports auxiliary PWM (APWM).
This series adds the PWM driver support for the APWM feature for eCAP on
AM33xx. AM335X_ECAP0_IN_PWM0_OUT is used to enable the backlight.

2. Enable eCAP0 PWM and LCD pin muxing to support splash screen on
AM335x EVM[2].

3. Add lcdc, panel and backlight nodes for AM335x EVM.

This series doesn't contain defconfig changes since we don't want to
enable LCD, splash screen and PWM support by default.
Enabling splash screen and PWM support in defconfig causes u-boot crash
on AM335x based beaglebone black. This will be handled in a separate
patch.

[1] AM335x TRM - https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf
[2] AM335x EVM - https://www.ti.com/tool/TMDXEVM3358

Sukrut Bellary (3):
  pwm: ti: am33xx: Enable Auxiliary PWM using eCAP
  board: ti: am335x: Enable eCAP0 PWM and LCD pin muxing
  arm: dts: am335x: Add nodes for lcdc, panel and backlight

 arch/arm/dts/am335x-evm.dts |  15 ++-
 board/ti/am335x/mux.c       |  49 +++++++++
 drivers/pwm/Kconfig         |   6 ++
 drivers/pwm/Makefile        |   1 +
 drivers/pwm/pwm-tiecap.c    | 198 ++++++++++++++++++++++++++++++++++++
 5 files changed, 268 insertions(+), 1 deletion(-)
 create mode 100644 drivers/pwm/pwm-tiecap.c

-- 
2.34.1


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

* [PATCH 1/3] pwm: ti: am33xx: Enable Auxiliary PWM using eCAP
  2025-03-19 20:25 [PATCH 0/3] Add support for eCAP PWM and LCD Sukrut Bellary
@ 2025-03-19 20:25 ` Sukrut Bellary
  2025-03-19 20:25 ` [PATCH 2/3] board: ti: am335x: Enable eCAP0 PWM and LCD pin muxing Sukrut Bellary
  2025-03-19 20:25 ` [PATCH 3/3] arm: dts: am335x: Add nodes for lcdc, panel and backlight Sukrut Bellary
  2 siblings, 0 replies; 8+ messages in thread
From: Sukrut Bellary @ 2025-03-19 20:25 UTC (permalink / raw)
  To: Tom Rini
  Cc: Sukrut Bellary, Kevin Hilman, Bajjuri Praneeth,
	Raghavendra Vignesh, u-boot

In am33xx SOC[1], enhanced capture (eCAP) supports auxiliary PWM (APWM).
This series adds the PWM driver support for the APWM feature for eCAP on
AM33xx.

eCAP HW also supports the capture mode. Currently, this driver only
supports APWM.

This is based on the Linux kernel driver -> drivers/pwm/pwm-tiecap.c
Version: v6.12

[1] AM335x TRM - https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf
[2] AM335x EVM - https://www.ti.com/tool/TMDXEVM3358

Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
---
 drivers/pwm/Kconfig      |   6 ++
 drivers/pwm/Makefile     |   1 +
 drivers/pwm/pwm-tiecap.c | 198 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 205 insertions(+)
 create mode 100644 drivers/pwm/pwm-tiecap.c

diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 6e79868d0efc..cbdc87bfccc6 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -118,3 +118,9 @@ config PWM_TI_EHRPWM
 	default y
 	help
 	  PWM driver support for the EHRPWM controller found on TI SOCs.
+
+config PWM_TI_ECAP
+	bool "Enable support for ECAP PWM"
+	depends on DM_PWM && ARCH_OMAP2PLUS
+	help
+	  PWM driver support for the ECAP controller found on TI SOCs.
diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
index e4d10c8dc3ef..5bd9837014da 100644
--- a/drivers/pwm/Makefile
+++ b/drivers/pwm/Makefile
@@ -24,3 +24,4 @@ obj-$(CONFIG_PWM_SIFIVE)	+= pwm-sifive.o
 obj-$(CONFIG_PWM_TEGRA)		+= tegra_pwm.o
 obj-$(CONFIG_PWM_SUNXI)		+= sunxi_pwm.o
 obj-$(CONFIG_PWM_TI_EHRPWM)	+= pwm-ti-ehrpwm.o
+obj-$(CONFIG_PWM_TI_ECAP)	+= pwm-tiecap.o
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
new file mode 100644
index 000000000000..13cf50aa2843
--- /dev/null
+++ b/drivers/pwm/pwm-tiecap.c
@@ -0,0 +1,198 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * ECAP PWM driver
+ *
+ * Copyright (C) 2024 BayLibre, SAS
+ * Author: Sukrut Bellary <sbellary@baylibre.com>
+ */
+
+#include <clk.h>
+#include <div64.h>
+#include <dm.h>
+#include <dm/device_compat.h>
+#include <pwm.h>
+#include <asm/io.h>
+
+/* eCAP module registers */
+#define ECAP_PWM_CAP1			0x08
+#define ECAP_PWM_CAP2			0x0C
+#define ECAP_PWM_CAP3			0x10
+#define ECAP_PWM_CAP4			0x14
+
+#define ECAP_PWM_ECCTL2			0x2A
+#define ECAP_PWM_ECCTL2_APWM_POL_LOW	BIT(10)
+#define ECAP_PWM_ECCTL2_APWM_MODE	BIT(9)
+#define ECAP_PWM_ECCTL2_TSCTR_FREERUN	BIT(4)
+#define ECAP_PWM_ECCTL2_SYNC_SEL_DISA	(BIT(7) | BIT(6))
+
+#define NSEC_PER_SEC			1000000000L
+
+enum tiecap_pwm_polarity {
+	TIECAP_PWM_POLARITY_NORMAL,
+	TIECAP_PWM_POLARITY_INVERSED
+};
+
+enum tiecap_pwm_state {
+	TIECAP_APWM_DISABLED,
+	TIECAP_APWM_ENABLED
+};
+
+struct tiecap_pwm_priv {
+	fdt_addr_t regs;
+	u32 clk_rate;
+	enum tiecap_pwm_state pwm_state;
+};
+
+static int tiecap_pwm_set_config(struct udevice *dev, uint channel,
+				 uint period_ns, uint duty_ns)
+{
+	struct tiecap_pwm_priv *priv = dev_get_priv(dev);
+	u32 period_cycles, duty_cycles;
+	unsigned long long c;
+	u16 value;
+
+	c = priv->clk_rate;
+	c = c * period_ns;
+	do_div(c, NSEC_PER_SEC);
+	period_cycles = (u32)c;
+
+	if (period_cycles < 1) {
+		period_cycles = 1;
+		duty_cycles = 1;
+	} else {
+		c = priv->clk_rate;
+		c = c * duty_ns;
+		do_div(c, NSEC_PER_SEC);
+		duty_cycles = (u32)c;
+	}
+
+	value = readw(priv->regs + ECAP_PWM_ECCTL2);
+
+	/* Configure APWM mode & disable sync option */
+	value |= ECAP_PWM_ECCTL2_APWM_MODE | ECAP_PWM_ECCTL2_SYNC_SEL_DISA;
+
+	writew(value, priv->regs + ECAP_PWM_ECCTL2);
+
+	if (priv->pwm_state == TIECAP_APWM_DISABLED) {
+		/* Update active registers */
+		writel(duty_cycles, priv->regs + ECAP_PWM_CAP2);
+		writel(period_cycles, priv->regs + ECAP_PWM_CAP1);
+	} else {
+		/* Update shadow registers to configure period and
+		 * compare values. This helps current pwm period to
+		 * complete on reconfiguring.
+		 */
+		writel(duty_cycles, priv->regs + ECAP_PWM_CAP4);
+		writel(period_cycles, priv->regs + ECAP_PWM_CAP3);
+	}
+
+	return 0;
+}
+
+static int tiecap_pwm_set_enable(struct udevice *dev, uint channel, bool enable)
+{
+	struct tiecap_pwm_priv *priv = dev_get_priv(dev);
+	u16 value;
+
+	value = readw(priv->regs + ECAP_PWM_ECCTL2);
+
+	if (enable) {
+		/*
+		 * Enable 'Free run Time stamp counter mode' to start counter
+		 * and  'APWM mode' to enable APWM output
+		 */
+		value |= ECAP_PWM_ECCTL2_TSCTR_FREERUN | ECAP_PWM_ECCTL2_APWM_MODE;
+		priv->pwm_state = TIECAP_APWM_ENABLED;
+	} else {
+		/* Disable 'Free run Time stamp counter mode' to stop counter
+		 * and 'APWM mode' to put APWM output to low
+		 */
+		value &= ~(ECAP_PWM_ECCTL2_TSCTR_FREERUN | ECAP_PWM_ECCTL2_APWM_MODE);
+		priv->pwm_state = TIECAP_APWM_DISABLED;
+	}
+
+	writew(value, priv->regs + ECAP_PWM_ECCTL2);
+
+	return 0;
+}
+
+static int tiecap_pwm_set_invert(struct udevice *dev, uint channel,
+				 bool polarity)
+{
+	struct tiecap_pwm_priv *priv = dev_get_priv(dev);
+	u16 value;
+
+	value = readw(priv->regs + ECAP_PWM_ECCTL2);
+
+	if (polarity == TIECAP_PWM_POLARITY_INVERSED)
+		/* Duty cycle defines LOW period of PWM */
+		value |= ECAP_PWM_ECCTL2_APWM_POL_LOW;
+	else
+		/* Duty cycle defines HIGH period of PWM */
+		value &= ~ECAP_PWM_ECCTL2_APWM_POL_LOW;
+
+	writew(value, priv->regs + ECAP_PWM_ECCTL2);
+
+	return 0;
+}
+
+static int tiecap_pwm_of_to_plat(struct udevice *dev)
+{
+	struct tiecap_pwm_priv *priv = dev_get_priv(dev);
+
+	priv->regs = dev_read_addr(dev);
+	if (priv->regs == FDT_ADDR_T_NONE) {
+		dev_err(dev, "invalid address\n");
+		return -EINVAL;
+	}
+
+	dev_dbg(dev, "regs=0x%08lx\n", priv->regs);
+
+	return 0;
+}
+
+static int tiecap_pwm_probe(struct udevice *dev)
+{
+	struct tiecap_pwm_priv *priv = dev_get_priv(dev);
+	struct clk clk;
+	int err;
+
+	err = clk_get_by_name(dev, "fck", &clk);
+	if (err) {
+		dev_err(dev, "failed to get clock\n");
+		return err;
+	}
+
+	priv->clk_rate = clk_get_rate(&clk);
+	if (IS_ERR_VALUE(priv->clk_rate) || !priv->clk_rate) {
+		dev_err(dev, "failed to get clock rate\n");
+		if (IS_ERR_VALUE(priv->clk_rate))
+			return priv->clk_rate;
+
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static const struct pwm_ops tiecap_pwm_ops = {
+	.set_config     = tiecap_pwm_set_config,
+	.set_enable     = tiecap_pwm_set_enable,
+	.set_invert     = tiecap_pwm_set_invert,
+};
+
+static const struct udevice_id tiecap_pwm_ids[] = {
+	{ .compatible = "ti,am3352-ecap" },
+	{ .compatible = "ti,am33xx-ecap" },
+	{ }
+};
+
+U_BOOT_DRIVER(tiecap_pwm) = {
+	.name   = "tiecap_pwm",
+	.id     = UCLASS_PWM,
+	.of_match = tiecap_pwm_ids,
+	.ops    = &tiecap_pwm_ops,
+	.probe  = tiecap_pwm_probe,
+	.of_to_plat     = tiecap_pwm_of_to_plat,
+	.priv_auto      = sizeof(struct tiecap_pwm_priv),
+};
-- 
2.34.1


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

* [PATCH 2/3] board: ti: am335x: Enable eCAP0 PWM and LCD pin muxing
  2025-03-19 20:25 [PATCH 0/3] Add support for eCAP PWM and LCD Sukrut Bellary
  2025-03-19 20:25 ` [PATCH 1/3] pwm: ti: am33xx: Enable Auxiliary PWM using eCAP Sukrut Bellary
@ 2025-03-19 20:25 ` Sukrut Bellary
  2025-03-19 20:25 ` [PATCH 3/3] arm: dts: am335x: Add nodes for lcdc, panel and backlight Sukrut Bellary
  2 siblings, 0 replies; 8+ messages in thread
From: Sukrut Bellary @ 2025-03-19 20:25 UTC (permalink / raw)
  To: Tom Rini
  Cc: Sukrut Bellary, Kevin Hilman, Bajjuri Praneeth,
	Raghavendra Vignesh, u-boot

On AM335x EVM[1],
1. pin AM335X_ECAP0_IN_PWM0_OUT is used to enable the
backlight. ECAP0 can be configured in single channel PWM mode.
If CONFIG_PWM_TI_ECAP is enabled, perform eCAP0 pin muxing.

2. Pins LCD_DATA0 - LCD_DATA15, gpmc_ad8 - gpmc_ad15 and
lcd_vsync, lcd_sync, lcd_ac_bias_en, lcd_pclk are used for driving LCD.
If CONFIG_AM335X_LCD is enabled, perform the LCD pin muxing.

This is required to enable splash screen support on AM335x EVM.
[1] AM335x EVM - https://www.ti.com/tool/TMDXEVM3358

Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
---
 board/ti/am335x/mux.c | 49 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
index 960de15398f8..b661731a038d 100644
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -274,6 +274,47 @@ static struct module_pin_mux uart3_icev2_pin_mux[] = {
 	{-1},
 };
 
+#if IS_ENABLED(CONFIG_AM335X_LCD)
+static struct module_pin_mux lcd_pin_mux[] = {
+	{OFFSET(lcd_data0), (MODE(0))},		/* LCD-Data(0) */
+	{OFFSET(lcd_data1), (MODE(0))},		/* LCD-Data(1) */
+	{OFFSET(lcd_data2), (MODE(0))},		/* LCD-Data(2) */
+	{OFFSET(lcd_data3), (MODE(0))},		/* LCD-Data(3) */
+	{OFFSET(lcd_data4), (MODE(0))},		/* LCD-Data(4) */
+	{OFFSET(lcd_data5), (MODE(0))},		/* LCD-Data(5) */
+	{OFFSET(lcd_data6), (MODE(0))},		/* LCD-Data(6) */
+	{OFFSET(lcd_data7), (MODE(0))},		/* LCD-Data(7) */
+	{OFFSET(lcd_data8), (MODE(0))},		/* LCD-Data(8) */
+	{OFFSET(lcd_data9), (MODE(0))},		/* LCD-Data(9) */
+	{OFFSET(lcd_data10), (MODE(0))},	/* LCD-Data(10) */
+	{OFFSET(lcd_data11), (MODE(0))},	/* LCD-Data(11) */
+	{OFFSET(lcd_data12), (MODE(0))},	/* LCD-Data(12) */
+	{OFFSET(lcd_data13), (MODE(0))},	/* LCD-Data(13) */
+	{OFFSET(lcd_data14), (MODE(0))},	/* LCD-Data(14) */
+	{OFFSET(lcd_data15), (MODE(0))},	/* LCD-Data(15) */
+	{OFFSET(gpmc_ad15), (MODE(1))},		/* LCD-Data(16) */
+	{OFFSET(gpmc_ad14), (MODE(1))},		/* LCD-Data(17) */
+	{OFFSET(gpmc_ad13), (MODE(1))},		/* LCD-Data(18) */
+	{OFFSET(gpmc_ad12), (MODE(1))},		/* LCD-Data(19) */
+	{OFFSET(gpmc_ad11), (MODE(1))},		/* LCD-Data(20) */
+	{OFFSET(gpmc_ad10), (MODE(1))},		/* LCD-Data(21) */
+	{OFFSET(gpmc_ad9), (MODE(1))},		/* LCD-Data(22) */
+	{OFFSET(gpmc_ad8), (MODE(1))},		/* LCD-Data(23) */
+	{OFFSET(lcd_vsync), (MODE(0))},		/* LCD-VSync */
+	{OFFSET(lcd_hsync), (MODE(0))},		/* LCD-HSync */
+	{OFFSET(lcd_ac_bias_en), (MODE(0))},	/* LCD-DE */
+	{OFFSET(lcd_pclk), (MODE(0))},		/* LCD-CLK */
+	{-1},
+};
+#endif
+
+#if IS_ENABLED(CONFIG_PWM_TI_ECAP)
+static struct module_pin_mux ecap_pin_mux[] = {
+	{OFFSET(ecap0_in_pwm0_out), (MODE(0))},         /* ecap0_in_pwm0_out */
+	{-1},
+};
+#endif
+
 #if defined(CONFIG_NOR_BOOT)
 void enable_norboot_pin_mux(void)
 {
@@ -389,6 +430,14 @@ void enable_board_pin_mux(void)
 			configure_module_pin_mux(mmc1_pin_mux);
 			configure_module_pin_mux(spi0_pin_mux);
 		}
+
+		#if IS_ENABLED(CONFIG_AM335X_LCD)
+			configure_module_pin_mux(lcd_pin_mux);
+		#endif
+
+		#if IS_ENABLED(CONFIG_PWM_TI_ECAP)
+			configure_module_pin_mux(ecap_pin_mux);
+		#endif
 	} else if (board_is_idk()) {
 		/* Industrial Motor Control (IDK) */
 		configure_module_pin_mux(mii1_pin_mux);
-- 
2.34.1


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

* [PATCH 3/3] arm: dts: am335x: Add nodes for lcdc, panel and backlight
  2025-03-19 20:25 [PATCH 0/3] Add support for eCAP PWM and LCD Sukrut Bellary
  2025-03-19 20:25 ` [PATCH 1/3] pwm: ti: am33xx: Enable Auxiliary PWM using eCAP Sukrut Bellary
  2025-03-19 20:25 ` [PATCH 2/3] board: ti: am335x: Enable eCAP0 PWM and LCD pin muxing Sukrut Bellary
@ 2025-03-19 20:25 ` Sukrut Bellary
  2025-03-24 17:20   ` Tom Rini
  2 siblings, 1 reply; 8+ messages in thread
From: Sukrut Bellary @ 2025-03-19 20:25 UTC (permalink / raw)
  To: Tom Rini
  Cc: Sukrut Bellary, Kevin Hilman, Bajjuri Praneeth,
	Raghavendra Vignesh, u-boot

For AM335x EVM[1], enable nodes required to enable the support for LCD
and PWM backlight.
This is required for the splash screen support.

[1] AM335x EVM - https://www.ti.com/tool/TMDXEVM3358

Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
---
 arch/arm/dts/am335x-evm.dts | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/am335x-evm.dts b/arch/arm/dts/am335x-evm.dts
index 6e799621678b..d4f93e75ced5 100644
--- a/arch/arm/dts/am335x-evm.dts
+++ b/arch/arm/dts/am335x-evm.dts
@@ -98,7 +98,7 @@
 		};
 	};
 
-	backlight {
+	backlight: backlight {
 		compatible = "pwm-backlight";
 		pwms = <&ecap0 0 50000 0>;
 		brightness-levels = <0 51 53 56 62 75 101 152 255>;
@@ -110,6 +110,7 @@
 		status = "okay";
 		pinctrl-names = "default";
 		pinctrl-0 = <&lcd_pins_s0>;
+		backlight = <&backlight>;
 		panel-info {
 			ac-bias           = <255>;
 			ac-bias-intrpt    = <0>;
@@ -137,6 +138,12 @@
 				vsync-active = <1>;
 			};
 		};
+		port {
+			panel_0: endpoint@0 {
+				remote-endpoint = <&lcdc_0>;
+			};
+		};
+
 	};
 
 	sound {
@@ -478,6 +485,12 @@
 
 &lcdc {
 	status = "okay";
+
+	port {
+		lcdc_0: endpoint@0 {
+			remote-endpoint = <&panel_0>;
+		};
+	};
 };
 
 &elm {
-- 
2.34.1


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

* Re: [PATCH 3/3] arm: dts: am335x: Add nodes for lcdc, panel and backlight
  2025-03-19 20:25 ` [PATCH 3/3] arm: dts: am335x: Add nodes for lcdc, panel and backlight Sukrut Bellary
@ 2025-03-24 17:20   ` Tom Rini
  2025-03-25 19:31     ` Sukrut Bellary
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2025-03-24 17:20 UTC (permalink / raw)
  To: Sukrut Bellary
  Cc: Kevin Hilman, Bajjuri Praneeth, Raghavendra Vignesh, u-boot

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

On Wed, Mar 19, 2025 at 01:25:16PM -0700, Sukrut Bellary wrote:

> For AM335x EVM[1], enable nodes required to enable the support for LCD
> and PWM backlight.
> This is required for the splash screen support.
> 
> [1] AM335x EVM - https://www.ti.com/tool/TMDXEVM3358
> 
> Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
> ---
>  arch/arm/dts/am335x-evm.dts | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)

Can you see how hard moving to OF_UPSTREAM here is first please? Thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH 3/3] arm: dts: am335x: Add nodes for lcdc, panel and backlight
  2025-03-24 17:20   ` Tom Rini
@ 2025-03-25 19:31     ` Sukrut Bellary
  2025-04-15 22:46       ` Sukrut Bellary
  0 siblings, 1 reply; 8+ messages in thread
From: Sukrut Bellary @ 2025-03-25 19:31 UTC (permalink / raw)
  To: Tom Rini; +Cc: Kevin Hilman, Bajjuri Praneeth, Raghavendra Vignesh, u-boot

On Mon, Mar 24, 2025 at 11:20:09AM -0600, Tom Rini wrote:
> On Wed, Mar 19, 2025 at 01:25:16PM -0700, Sukrut Bellary wrote:
> 
> > For AM335x EVM[1], enable nodes required to enable the support for LCD
> > and PWM backlight.
> > This is required for the splash screen support.
> > 
> > [1] AM335x EVM - https://www.ti.com/tool/TMDXEVM3358
> > 
> > Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
> > ---
> >  arch/arm/dts/am335x-evm.dts | 15 ++++++++++++++-
> >  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> Can you see how hard moving to OF_UPSTREAM here is first please? Thanks.
>

Sure, I will check.
Thanks.

> -- 
> Tom



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

* Re: [PATCH 3/3] arm: dts: am335x: Add nodes for lcdc, panel and backlight
  2025-03-25 19:31     ` Sukrut Bellary
@ 2025-04-15 22:46       ` Sukrut Bellary
  2025-04-15 22:47         ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Sukrut Bellary @ 2025-04-15 22:46 UTC (permalink / raw)
  To: Tom Rini; +Cc: Kevin Hilman, Bajjuri Praneeth, Raghavendra Vignesh, u-boot

On Tue, Mar 25, 2025 at 12:31:06PM -0700, Sukrut Bellary wrote:
> On Mon, Mar 24, 2025 at 11:20:09AM -0600, Tom Rini wrote:
> > On Wed, Mar 19, 2025 at 01:25:16PM -0700, Sukrut Bellary wrote:
> > 
> > > For AM335x EVM[1], enable nodes required to enable the support for LCD
> > > and PWM backlight.
> > > This is required for the splash screen support.
> > > 
> > > [1] AM335x EVM - https://www.ti.com/tool/TMDXEVM3358
> > > 
> > > Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
> > > ---
> > >  arch/arm/dts/am335x-evm.dts | 15 ++++++++++++++-
> > >  1 file changed, 14 insertions(+), 1 deletion(-)
> > 
> > Can you see how hard moving to OF_UPSTREAM here is first please? Thanks.
> >
> 
> Sure, I will check.
> Thanks.

I checked OF_UPSTREAM for AM335x.
For the panel driver, timings are fetched differently in the u-boot and kernel.
For OF_UPSTREAM, we need to change the lcdc panel driver in u-boot to be in
sync with kernel dts or see if we can reuse the simple_panel driver.

We plan to take care of OF_UPSTREAM later.
So, For now, can we split this series into two as
1. Enable Auxillary PWM using eCAP and pin muxing(These are independent
of OF_UPSTREAM)
2. Handle dts changes once we have OF_UPSTREAM for AM33xx.
If this is ok, I will post the patches per pt.1

Thanks.

> > -- 
> > Tom
> 
> 

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

* Re: [PATCH 3/3] arm: dts: am335x: Add nodes for lcdc, panel and backlight
  2025-04-15 22:46       ` Sukrut Bellary
@ 2025-04-15 22:47         ` Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2025-04-15 22:47 UTC (permalink / raw)
  To: Sukrut Bellary
  Cc: Kevin Hilman, Bajjuri Praneeth, Raghavendra Vignesh, u-boot

[-- Attachment #1: Type: text/plain, Size: 1479 bytes --]

On Tue, Apr 15, 2025 at 03:46:32PM -0700, Sukrut Bellary wrote:
> On Tue, Mar 25, 2025 at 12:31:06PM -0700, Sukrut Bellary wrote:
> > On Mon, Mar 24, 2025 at 11:20:09AM -0600, Tom Rini wrote:
> > > On Wed, Mar 19, 2025 at 01:25:16PM -0700, Sukrut Bellary wrote:
> > > 
> > > > For AM335x EVM[1], enable nodes required to enable the support for LCD
> > > > and PWM backlight.
> > > > This is required for the splash screen support.
> > > > 
> > > > [1] AM335x EVM - https://www.ti.com/tool/TMDXEVM3358
> > > > 
> > > > Signed-off-by: Sukrut Bellary <sbellary@baylibre.com>
> > > > ---
> > > >  arch/arm/dts/am335x-evm.dts | 15 ++++++++++++++-
> > > >  1 file changed, 14 insertions(+), 1 deletion(-)
> > > 
> > > Can you see how hard moving to OF_UPSTREAM here is first please? Thanks.
> > >
> > 
> > Sure, I will check.
> > Thanks.
> 
> I checked OF_UPSTREAM for AM335x.
> For the panel driver, timings are fetched differently in the u-boot and kernel.
> For OF_UPSTREAM, we need to change the lcdc panel driver in u-boot to be in
> sync with kernel dts or see if we can reuse the simple_panel driver.
> 
> We plan to take care of OF_UPSTREAM later.
> So, For now, can we split this series into two as
> 1. Enable Auxillary PWM using eCAP and pin muxing(These are independent
> of OF_UPSTREAM)
> 2. Handle dts changes once we have OF_UPSTREAM for AM33xx.
> If this is ok, I will post the patches per pt.1

Yes, that's fine, thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2025-04-15 22:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19 20:25 [PATCH 0/3] Add support for eCAP PWM and LCD Sukrut Bellary
2025-03-19 20:25 ` [PATCH 1/3] pwm: ti: am33xx: Enable Auxiliary PWM using eCAP Sukrut Bellary
2025-03-19 20:25 ` [PATCH 2/3] board: ti: am335x: Enable eCAP0 PWM and LCD pin muxing Sukrut Bellary
2025-03-19 20:25 ` [PATCH 3/3] arm: dts: am335x: Add nodes for lcdc, panel and backlight Sukrut Bellary
2025-03-24 17:20   ` Tom Rini
2025-03-25 19:31     ` Sukrut Bellary
2025-04-15 22:46       ` Sukrut Bellary
2025-04-15 22:47         ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox