diff --git a/board/boundary/nitrogen8m_som/nitrogen8m_som.c b/board/boundary/nitrogen8m_som/nitrogen8m_som.c index 5236a0a2a57a07adcb5cbfffdeeb39ae146a9a87..168c6146b37aa7cb77f82b180b32ecbac3b47d0a 100644 --- a/board/boundary/nitrogen8m_som/nitrogen8m_som.c +++ b/board/boundary/nitrogen8m_som/nitrogen8m_som.c @@ -41,7 +41,6 @@ static iomux_v3_cfg_t const init_pads[] = { IMX8MQ_PAD_UART1_RXD__UART1_RX | MUX_PAD_CTRL(UART_PAD_CTRL), IMX8MQ_PAD_UART1_TXD__UART1_TX | MUX_PAD_CTRL(UART_PAD_CTRL), #define GP_LCM_JM430_BKL_EN IMX_GPIO_NR(1, 1) -/* This enables 5V power on LTK080A60A004T mipi display */ #define GP_LTK08_MIPI_EN IMX_GPIO_NR(1, 1) IMX8MQ_PAD_GPIO1_IO01__GPIO1_IO1 | MUX_PAD_CTRL(0x16), @@ -83,7 +82,6 @@ static iomux_v3_cfg_t const init_pads[] = { #define GP_CSI2_MIPI_RESET IMX_GPIO_NR(2, 19) IMX8MQ_PAD_SD2_RESET_B__GPIO2_IO19 |MUX_PAD_CTRL(0x61), #ifdef CONFIG_FEC_MXC - /* PHY - AR8035 */ IOMUX_PAD_CTRL(ENET_MDIO__ENET_MDIO, PAD_CTRL_ENET_MDIO), IOMUX_PAD_CTRL(ENET_MDC__ENET_MDC, PAD_CTRL_ENET_MDC), IOMUX_PAD_CTRL(ENET_TX_CTL__ENET_RGMII_TX_CTL, PAD_CTRL_ENET_TX), @@ -263,42 +261,11 @@ int board_detect_hdmi(struct display_info_t const *di) return hdmi_hpd_status() ? 1 : 0; } -int board_detect_gt911(struct display_info_t const *di) -{ - int ret; - struct udevice *dev, *chip; - - if (di->bus_gp) - gpio_direction_output(di->bus_gp, 1); - gpio_set_value(GP_GT911_RESET, 0); - mdelay(20); - gpio_direction_output(GPIRQ_GT911, di->addr_num == 0x14 ? 1 : 0); - udelay(100); - gpio_set_value(GP_GT911_RESET, 1); - mdelay(6); - gpio_set_value(GPIRQ_GT911, 0); - mdelay(50); - gpio_direction_input(GPIRQ_GT911); - ret = uclass_get_device(UCLASS_I2C, di->bus_num, &dev); - if (ret) - return 0; - - ret = dm_i2c_probe(dev, di->addr_num, 0x0, &chip); - if (ret && di->bus_gp) - gpio_direction_input(di->bus_gp); - return (ret == 0); -} - +// TODO: port internal MIPI DSI -> eDP display static const struct display_info_t displays[] = { - /* hdmi */ - VD_1920_1080M_60(HDMI, board_detect_hdmi, 0, 0x50), - VD_1280_720M_60(HDMI, NULL, 0, 0x50), - VD_MIPI_M101NWWB(MIPI, fbp_detect_i2c, fbp_bus_gp(0, GP_I2C1D_SN65DSI83_EN, 0, 0), 0x2c), - VD_LTK080A60A004T(MIPI, board_detect_gt911, fbp_bus_gp(0, GP_LTK08_MIPI_EN, GP_LTK08_MIPI_EN, 0), 0x5d), /* Goodix touchscreen */ - VD_LCM_JM430(MIPI, fbp_detect_i2c, fbp_bus_gp(0, GP_ST1633_RESET, GP_TC358762_EN, 30), fbp_addr_gp(0x55, GP_LCM_JM430_BKL_EN, 0, 0)), /* Sitronix touch */ - VD_LTK0680YTMDB(MIPI, NULL, fbp_bus_gp(0, GP_MIPI_RESET, GP_MIPI_RESET, 0), 0x0), - VD_MIPI_COM50H5N03ULC(MIPI, NULL, fbp_bus_gp(0, GP_MIPI_RESET, GP_MIPI_RESET, 0), 0x00), + VD_1920_1080M_60(HDMI, board_detect_hdmi, 0, 0x50) }; + #define display_cnt ARRAY_SIZE(displays) #else #define displays NULL @@ -307,18 +274,6 @@ static const struct display_info_t displays[] = { int board_init(void) { - gpio_request(GP_I2C1D_SN65DSI83_EN, "sn65dsi83_enable"); - gpio_request(GP_GT911_RESET, "gt911_reset"); - gpio_request(GPIRQ_GT911, "gt911_irq"); - gpio_request(GP_LTK08_MIPI_EN, "lkt08_mipi_en"); - gpio_direction_output(GP_GT911_RESET, 0); -#ifdef CONFIG_DM_ETH - board_eth_init(gd->bd); -#endif -#ifdef CONFIG_CMD_FBPANEL - fbp_setup_display(displays, display_cnt); -#endif - return 0; } @@ -354,9 +309,10 @@ const struct boot_mode board_boot_modes[] = { static int fastboot_key_pressed(void) { - gpio_request(GP_FASTBOOT_KEY, "fastboot_key"); - gpio_direction_input(GP_FASTBOOT_KEY); - return !gpio_get_value(GP_FASTBOOT_KEY); + //gpio_request(GP_FASTBOOT_KEY, "fastboot_key"); + //gpio_direction_input(GP_FASTBOOT_KEY); + //return !gpio_get_value(GP_FASTBOOT_KEY); + return 0; } void board_late_mmc_env_init(void);