[PATCH 2/3] board: ti: am335x: Enable eCAP0 PWM and LCD pin muxing
Sukrut Bellary
sbellary at baylibre.com
Wed Mar 19 21:25:15 CET 2025
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 at 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
More information about the U-Boot
mailing list