void __init sholes_panel_init(void) { int ret; omap_cfg_reg(AG22_34XX_DSI_DX0); omap_cfg_reg(AH22_34XX_DSI_DY0); omap_cfg_reg(AG23_34XX_DSI_DX1); omap_cfg_reg(AH23_34XX_DSI_DY1); omap_cfg_reg(AG24_34XX_DSI_DX2); omap_cfg_reg(AH24_34XX_DSI_DY2); /* disp reset b */ omap_cfg_reg(AE4_34XX_GPIO136_OUT); omapfb_set_platform_data(&sholes_fb_data); ret = gpio_request(SHOLES_DISPLAY_RESET_GPIO, "display reset"); if (ret) { printk(KERN_ERR "failed to get display reset gpio\n"); goto error; } platform_device_register(&sholes_dss_device); return; error: gpio_free(SHOLES_DISPLAY_RESET_GPIO); }
static int __init rm696_video_init(void) { int r; omap_setup_dss_device(&rm696_dss_device); rm696_dss_devices[0] = &rm696_dsi_display_data; r = gpio_request(rm696_panel_data.reset_gpio, "pyrenees reset"); if (r < 0) goto err0; r = gpio_direction_output(rm696_panel_data.reset_gpio, 1); rm696_dss_data.default_device = rm696_dss_devices[0]; r = platform_device_register(&rm696_dss_device); if (r < 0) goto err1; omapfb_set_platform_data(&rm696_omapfb_data); return 0; err1: gpio_free(rm696_panel_data.reset_gpio); rm696_panel_data.reset_gpio = -1; err0: pr_err("%s failed (%d)\n", __func__, r); return r; }
void __init mapphone_panel_init(void) { int ret; dss_pwrdm = pwrdm_lookup("dss_pwrdm"); if (!dss_pwrdm) pr_info("%s: Not found dss_pwrdm\n", __func__); if (mapphone_dt_panel_init()) printk(KERN_INFO "panel: using non-dt configuration\n"); mapphone_panel_get_fb_info(); omapfb_set_platform_data(&mapphone_fb_data); ret = gpio_request(mapphone_panel_data.reset_gpio, "display reset"); if (ret) { printk(KERN_ERR "failed to get display reset gpio\n"); goto failed_reset; } if (mapphone_displ_pwr_sup_en != 0) { printk(KERN_INFO "DT: display power supply en = %d\n", mapphone_displ_pwr_sup_en); ret = gpio_request(mapphone_displ_pwr_sup_en, "LCD-pwr_sup_en"); if (ret) { printk(KERN_ERR "failed to req for LCD-pwr_sup_en\n"); goto failed_reset; } gpio_direction_output(mapphone_displ_pwr_sup_en, 1); } if (mapphone_feature_hdmi && mapphone_hdmi_5v_enable != 0) { ret = gpio_request(mapphone_hdmi_5v_enable, "HDMI-5V-En"); if (ret) { printk(KERN_ERR "Failed hdmi 5v en gpio request\n"); goto failed_hdmi_5v; } else { printk(KERN_DEBUG "Enabing hdmi 5v gpio\n"); gpio_direction_output(mapphone_hdmi_5v_enable, 1); gpio_set_value(mapphone_hdmi_5v_enable, 0); } platform_device_register(&omap_dssmgr_device); } else { /* Remove HDTV from the DSS device list */ mapphone_dss_data.num_devices--; } platform_device_register(&omap_panel_device); omap_display_init(&mapphone_dss_data); return; failed_hdmi_5v: gpio_free(mapphone_hdmi_5v_enable); failed_reset: gpio_free(mapphone_panel_data.reset_gpio); }
static void omap_4430sdp_display_init(void) { sdp4430_lcd_init(); sdp4430_hdmi_mux_init(); omap_vram_set_sdram_vram(BLAZE_FB_RAM_SIZE, 0); omapfb_set_platform_data(&blaze_fb_pdata); omap_display_init(&sdp4430_dss_data); }
void __init acclaim_panel_init(void) { sdp4430_panel_get_resource(); // sdp4430_hdmi_mux_init(); omap_vram_set_sdram_vram(BLAZE_FB_RAM_SIZE, 0); omapfb_set_platform_data(&blaze_fb_pdata); omap_display_init(&sdp4430_dss_data); acclaim4430_init_display_led(); platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); }
void __init acclaim_panel_init(void) { acclaim_panel_get_resource(); acclaim_init_display_led(); omapfb_set_platform_data(&acclaim_fb_pdata); omap_display_init(&acclaim_dss_data); spi_register_board_info(tablet_spi_board_info, ARRAY_SIZE(tablet_spi_board_info)); platform_add_devices(acclaim_panel_devices, ARRAY_SIZE(acclaim_panel_devices)); }
static void __init rx51_add_gfx_fb(u32 paddr, size_t size, enum omapfb_color_format format) { omapfb_config.mem_desc.region_cnt = 1; omapfb_config.mem_desc.region[0].paddr = paddr; omapfb_config.mem_desc.region[0].size = size; omapfb_config.mem_desc.region[0].format = format; omapfb_config.mem_desc.region[0].format_used = 1; omapfb_set_platform_data(&omapfb_config); }
static void omap_4430sdp_display_init(void) { sdp4430_lcd_init(); sdp4430_hdmi_mux_init(); // omap_vram_set_sdram_vram(BLAZE_FB_RAM_SIZE, 0); omapfb_set_platform_data(&blaze_fb_pdata); omap_display_init(&sdp4430_dss_data); omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); }
int __init tablet_panel_init(void) { if (omap_is_board_version(OMAP4_TABLET_1_0) || omap_is_board_version(OMAP4_TABLET_1_1) || omap_is_board_version(OMAP4_TABLET_1_2)) { tablet_dsi_panel.x_res = 1024; tablet_dsi_panel.y_res = 768; } tablet_lcd_init(); tablet_hdmi_mux_init(); omap_vram_set_sdram_vram(TABLET_FB_RAM_SIZE, 0); omapfb_set_platform_data(&tablet_fb_pdata); omap_display_init(&tablet_dss_data); platform_device_register(&omap4_tablet_disp_led); return 0; }
void __init omap4_tuna_display_init(void) { struct panel_s6e8aa0_data *panel; if (omap4_tuna_get_revision() == (omap4_tuna_get_type() == TUNA_TYPE_MAGURO ? 2 : 1)) { /* * Older devices were not calibrated the same way as newer * devices. These values are probably not correct, but the older * devices tested look closer to the newer devices with these * values than they do using the same register values as the * newer devices. */ tuna_oled_data_m3.factory_info = &tuna_oled_factory_info_m2t1; } else if (omap4_tuna_get_revision() <= 1) { tuna_oled_data_m3.factory_info = &tuna_oled_factory_info_old; } if (panel_id == SM2) panel = &tuna_oled_data_sm2; else panel = &tuna_oled_data_m3; tuna_oled_device.data = panel; omap4_ctrl_pad_writel(0x1FF80000, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); omap_mux_init_gpio(panel->reset_gpio, OMAP_PIN_OUTPUT); pr_info("Using %ps\n", panel->factory_info); omap_vram_set_sdram_vram(TUNA_FB_RAM_SIZE, 0); omapfb_set_platform_data(&tuna_fb_pdata); tuna_hdmi_mux_init(); omap_display_init(&tuna_dss_data); }
static void __init omap5panda_display_init(void) { struct sgx_omaplfb_config data = { .tiler2d_buffers = 0, .swap_chain_length = 2, .vram_buffers = 2, }; omapfb_set_platform_data(&panda_fb_pdata); omap_vram_set_sdram_vram(OMAP5_SEVM_FB_RAM_SIZE, 0); sgx_omaplfb_set(0, &data); i2c_register_board_info(0, hdmi_i2c_eeprom, ARRAY_SIZE(hdmi_i2c_eeprom)); platform_device_register(&hdmi_edid_device); omap5panda_hdmi_init(); omap_display_init(&panda5_dss_data); } static const struct usbhs_omap_board_data usbhs_bdata __initconst = { .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, .port_mode[1] = OMAP_EHCI_PORT_MODE_HSIC, .port_mode[2] = OMAP_EHCI_PORT_MODE_HSIC, .phy_reset = true, .reset_gpio_port[0] = -EINVAL, .reset_gpio_port[1] = GPIO_HUB_NRESET, .reset_gpio_port[2] = GPIO_ETH_NRESET }; static void __init omap_ehci_ohci_init(void) { struct clk *phy_ref_clk; /* FREF_CLK1 provides the 19.2 MHz reference clock to the PHY */ phy_ref_clk = clk_get(NULL, "auxclk1_ck"); if (IS_ERR(phy_ref_clk)) { pr_err("Cannot request auxclk1\n"); } else { clk_set_rate(phy_ref_clk, 19200000); clk_enable(phy_ref_clk); } omap_mux_init_gpio(GPIO_HUB_NRESET, OMAP_PIN_OUTPUT | OMAP_PIN_OFF_NONE | OMAP_MUX_MODE6); omap_mux_init_gpio(GPIO_ETH_NRESET, OMAP_PIN_OUTPUT | OMAP_PIN_OFF_NONE | OMAP_MUX_MODE6); usbhs_init(&usbhs_bdata); return; } static void __init omap_5_panda_init(void) { omap5_mux_init(board_mux, NULL, OMAP_PACKAGE_CBL); omap_sdrc_init(NULL, NULL); omap_init_board_version(BOARD_MAKE_VERSION(BOARD_OMAP5_UEVM, 0)); omap_create_board_props(); omap5pandai2c_init(); omap_msecure_init(); omap5_pmic_init(1, PALMAS_NAME, OMAP44XX_IRQ_SYS_1N, PALMAS_DATA, "twl6040", OMAP44XX_IRQ_SYS_2N, &twl6040_data); omap5_board_serial_init(); platform_device_register(&dummy_sd_regulator_device); omap_ehci_ohci_init(); /* TODO: Once the board identification is passed in from the * bootloader pass in the HACK board ID to the conn board file */ omap4plus_connectivity_init(); omap_hsmmc_init(mmc); usb_dwc3_init(); platform_add_devices(panda5_devices, ARRAY_SIZE(panda5_devices)); omap_init_dmm_tiler(); omap5_register_ion(); omap5panda_display_init(); } static void __init omap_panda5_reserve(void) { omap_rproc_reserve_cma(RPROC_CMA_OMAP5); omap5_ion_init(); omap_reserve(); }
void __init mapphone_panel_init(void) { struct mapphone_dsi_panel_pwr_supply *supply; struct mapphone_dsi_panel_data *panel_data = (struct mapphone_dsi_panel_data *)mapphone_lcd_device.data; int ret; int i; int num_gpio_handled = 0; dss_pwrdm = pwrdm_lookup("dss_pwrdm"); if (!dss_pwrdm) pr_info("%s: Not found dss_pwrdm\n", __func__); if (mapphone_dt_panel_init()) PANELINFO(": using non-dt configuration\n"); mapphone_panel_get_fb_info(); omapfb_set_platform_data(&mapphone_fb_data); ret = gpio_request(mapphone_panel_data.reset_gpio, "display reset"); if (ret) { PANELERR("failed to get display reset gpio\n"); goto failed_reset; } gpio_direction_output(mapphone_panel_data.reset_gpio, 1); for (i = 0; i < panel_data->num_pwr_supply; i++) { supply = &(panel_data->disp_vol_supply[i]); if (supply->en_gpio != 0) { ret = gpio_request(supply->en_gpio, "LCD-pwr_sup_en"); if (ret) { PANELERR("Supply %d, failed to req for " "LCD-pwr_sup_en\n", i); num_gpio_handled = i; goto failed_pwr_supply; } gpio_direction_output(supply->en_gpio, supply->en_gpio_value); } } num_gpio_handled = panel_data->num_pwr_supply; if (mapphone_displ_lvds_cabc_en >= 0) { ret = gpio_request(mapphone_displ_lvds_cabc_en, "LCD-lvds_cabc_en"); if (ret) { printk(KERN_ERR "Failed LCD-lvds_cabc_en req\n"); goto failed_req_lvds_en; } gpio_direction_output(mapphone_displ_lvds_cabc_en, 1); } if (mapphone_displ_color_en >= 0) { ret = gpio_request(mapphone_displ_color_en, "LCD-color_en"); if (ret) { printk(KERN_ERR "Failed LCD-color_en req\n"); goto failed_req_color_en; } gpio_direction_output(mapphone_displ_color_en, 1); } if (mapphone_displ_lcd_bl_pwm >= 0) { ret = gpio_request(mapphone_displ_lcd_bl_pwm, "LCD-lcd_bl_pwm"); if (ret) { printk(KERN_ERR "Failed LCD-lcd_bl_pwm req\n"); goto failed_req_lcd_bl_pwm; } gpio_direction_output(mapphone_displ_lcd_bl_pwm, 0); } if (mapphone_displ_lvds_wp_g >= 0) { ret = gpio_request(mapphone_displ_lvds_wp_g, "LCD-lvds_wp_g"); if (ret) { printk(KERN_ERR "Failed LCD-lvds_wp_g req\n"); goto failed_req_lvds_wp_g; } gpio_direction_output(mapphone_displ_lvds_wp_g, 1); } if (mapphone_displ_lvds_wp_e >= 0) { ret = gpio_request(mapphone_displ_lvds_wp_e, "LCD-lvds_wp_e"); if (ret) { printk(KERN_ERR "Failed LCD-lvds_wp_e req\n"); goto failed_req_lvds_wp_e; } gpio_direction_output(mapphone_displ_lvds_wp_e, 1); } if (mapphone_feature_hdmi) { /* Set the bits to disable "internal pullups" for the DDC * clk and data lines. This is required for ES2.3 parts * and beyond. If these are not set EDID reads fails. */ if (cpu_is_omap44xx()) { omap_writel(HDMI_CONTROL_I2C_1_DDC_PU_DIS, HDMI_CONTROL_I2C_1_REG); } platform_device_register(&omap_dssmgr_device); } else { /* Remove HDTV from the DSS device list */ mapphone_dss_data.num_devices--; } platform_device_register(&omap_panel_device); omap_display_init(&mapphone_dss_data); return; failed_hdmi_5v: gpio_free(mapphone_displ_lvds_wp_e); failed_req_lvds_wp_e: gpio_free(mapphone_displ_lvds_wp_g); failed_req_lvds_wp_g: gpio_free(mapphone_displ_lcd_bl_pwm); failed_req_lcd_bl_pwm: gpio_free(mapphone_displ_color_en); failed_req_color_en: gpio_free(mapphone_displ_lvds_cabc_en); failed_req_lvds_en: failed_pwr_supply: for (i = 0; i < num_gpio_handled; i++) { supply = &(panel_data->disp_vol_supply[i]); if (supply->en_gpio != 0) gpio_free(supply->en_gpio); } failed_reset: gpio_free(mapphone_panel_data.reset_gpio); }
void __init omap4_espresso10_display_init(void) { struct ltn101al03_panel_data *panel; int ret, i; u8 board_type; /* Default setting vlaue for SEC panel*/ int platform_brightness[] = { BRIGHTNESS_OFF, BRIGHTNESS_DIM, BRIGHTNESS_MIN, BRIGHTNESS_25, BRIGHTNESS_DEFAULT, BRIGHTNESS_MAX}; int kernel_brightness[] = {0, 3, 3, 8, 47, 81}; if (espresso10_panel_data.panel_id == PANEL_BOE) { kernel_brightness[4] = 47; kernel_brightness[5] = 81; } #ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT dss_ick = clk_get(NULL, "ick"); if (IS_ERR(dss_ick)) { pr_err("Could not get dss interface clock\n"); /* return -ENOENT; */ } dss_sys_fclk = omap_clk_get_by_name("dss_sys_clk"); if (IS_ERR(dss_sys_fclk)) { pr_err("Could not get dss system clock\n"); /* return -ENOENT; */ } clk_enable(dss_sys_fclk); dss_dss_fclk = omap_clk_get_by_name("dss_dss_clk"); if (IS_ERR(dss_dss_fclk)) { pr_err("Could not get dss functional clock\n"); /* return -ENOENT; */ } #endif espresso10_panel_data.lvds_nshdn_gpio = omap_muxtbl_get_gpio_by_name("LVDS_nSHDN"); espresso10_panel_data.lcd_en_gpio = omap_muxtbl_get_gpio_by_name("LCD_EN"); espresso10_panel_data.led_backlight_reset_gpio = omap_muxtbl_get_gpio_by_name("LED_BACKLIGHT_RESET"); espresso10_panel_data.backlight_gptimer_num = 10; espresso10_panel_data.set_power = espresso10_lcd_set_power; espresso10_panel_data.set_gptimer_idle = espresso10_lcd_set_gptimer_idle; for (i = 0 ; i < NUM_BRIGHTNESS_LEVEL ; i++) { espresso10_panel_data.brightness_table.platform_value[i] = platform_brightness[i]; espresso10_panel_data.brightness_table.kernel_value[i] = kernel_brightness[i]; } ret = gpio_request(espresso10_panel_data.lcd_en_gpio, "lcd_en"); if (ret < 0) pr_err("(%s): gpio_request %d failed!\n", __func__, espresso10_panel_data.lcd_en_gpio); gpio_direction_output(espresso10_panel_data.lcd_en_gpio, 1); panel = &espresso10_panel_data; espresso10_lcd_device.data = panel; board_type = omap4_espresso10_get_board_type(); if (board_type == SEC_MACHINE_ESPRESSO10_USA_BBY) { /* Two DSS devices: LCD & HDMI */ espresso10_dss_data.num_devices = 2; espresso10_hdmi_device.hpd_gpio = omap_muxtbl_get_gpio_by_name("HDMI_HPD"); espresso10_hdmi_mux_init(); } else /* LCD only */ espresso10_dss_data.num_devices = 1; omapfb_set_platform_data(&espresso10_fb_pdata); omap_display_init(&espresso10_dss_data); }