Lines Matching +full:en +full:- +full:active +full:- +full:lanes

35 #include "tc35876x-dsi-lvds.h"
45 #define FLD_MASK(start, end) (((1 << ((start) - (end) + 1)) - 1) << (end))
48 /* DSI D-PHY Layer Registers */
222 * tc35876x_regw - Write DSI-LVDS bridge register using I2C
233 /* NOTE: Register address big-endian, data little-endian. */ in tc35876x_regw()
243 .addr = client->addr, in tc35876x_regw()
250 r = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in tc35876x_regw()
252 dev_err(&client->dev, "%s: reg 0x%04x val 0x%08x error %d\n", in tc35876x_regw()
258 dev_err(&client->dev, "%s: reg 0x%04x val 0x%08x msgs %d\n", in tc35876x_regw()
260 return -EAGAIN; in tc35876x_regw()
263 dev_dbg(&client->dev, "%s: reg 0x%04x val 0x%08x\n", in tc35876x_regw()
270 * tc35876x_regr - Read DSI-LVDS bridge register using I2C
287 .addr = client->addr, in tc35876x_regr()
293 .addr = client->addr, in tc35876x_regr()
300 r = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in tc35876x_regr()
302 dev_err(&client->dev, "%s: reg 0x%04x error %d\n", __func__, in tc35876x_regr()
308 dev_err(&client->dev, "%s: reg 0x%04x msgs %d\n", __func__, in tc35876x_regr()
310 return -EAGAIN; in tc35876x_regr()
316 dev_dbg(&client->dev, "%s: reg 0x%04x value 0x%08x\n", __func__, in tc35876x_regr()
327 dev_dbg(&tc35876x_client->dev, "%s: state %d\n", __func__, state); in tc35876x_set_bridge_reset_state()
356 dev_dbg(&tc35876x_client->dev, "%s\n", __func__); in tc35876x_configure_lvds_bridge()
359 dev_info(&tc35876x_client->dev, "tc35876x ID 0x%08x\n", id); in tc35876x_configure_lvds_bridge()
361 dev_err(&tc35876x_client->dev, "Cannot read ID\n"); in tc35876x_configure_lvds_bridge()
364 txtagocnt = (5 * ppi_lptxtimecnt - 3) / 4; in tc35876x_configure_lvds_bridge()
375 /* Enabling MIPI & PPI lanes, Enable 4 lanes */ in tc35876x_configure_lvds_bridge()
393 /* Horizontal front porch and horizontal active video size. 0x00500500*/ in tc35876x_configure_lvds_bridge()
408 /* LVDS-TX input muxing */ in tc35876x_configure_lvds_bridge()
439 /* f = baseclk / (clkdiv + 1) => clkdiv = (baseclk - f) / f */
442 return (baseclk - f) / f; in calc_clkdiv()
457 dev_err(&dev->pdev->dev, "GPIOPWMCTRL read failed\n"); in tc35876x_brightness_init()
459 …dev_warn(&dev->pdev->dev, "GPIOPWMCTRL was not set to system clock (pwmctrl = 0x%02x)\n", pwmctrl); in tc35876x_brightness_init()
463 dev_err(&dev->pdev->dev, "GPIOPWMCTRL set failed\n"); in tc35876x_brightness_init()
473 dev_err(&dev->pdev->dev, "PWM0CLKDIV set failed\n"); in tc35876x_brightness_init()
475 dev_dbg(&dev->pdev->dev, "PWM0CLKDIV set to 0x%04x (%d Hz)\n", in tc35876x_brightness_init()
495 panel_duty_val = (2 * level - 100) * 0xA9 / in tc35876x_brightness_control()
500 dev_err(&tc35876x_client->dev, "%s: ipc write fail\n", in tc35876x_brightness_control()
507 dev_err(&cmi_lcd_i2c_client->dev, "%s: i2c write failed\n", in tc35876x_brightness_control()
517 dev_dbg(&tc35876x_client->dev, "%s\n", __func__); in tc35876x_toshiba_bridge_panel_off()
528 struct drm_psb_private *dev_priv = dev->dev_private; in tc35876x_toshiba_bridge_panel_on()
533 dev_dbg(&tc35876x_client->dev, "%s\n", __func__); in tc35876x_toshiba_bridge_panel_on()
542 dev_dbg(&cmi_lcd_i2c_client->dev, "setting TCON\n"); in tc35876x_toshiba_bridge_panel_on()
547 * between 255-allow_distort*2 and 255 are mapped to the in tc35876x_toshiba_bridge_panel_on()
548 * 255-allow_distort*2 value. in tc35876x_toshiba_bridge_panel_on()
553 dev_err(&cmi_lcd_i2c_client->dev, in tc35876x_toshiba_bridge_panel_on()
558 dev_err(&cmi_lcd_i2c_client->dev, in tc35876x_toshiba_bridge_panel_on()
560 /* Set minimum brightness value - this is tunable */ in tc35876x_toshiba_bridge_panel_on()
564 dev_err(&cmi_lcd_i2c_client->dev, in tc35876x_toshiba_bridge_panel_on()
571 tc35876x_brightness_control(dev, dev_priv->brightness_adjusted); in tc35876x_toshiba_bridge_panel_on()
578 dev_dbg(&dev->pdev->dev, "%s\n", __func__); in tc35876x_get_config_mode()
585 mode->hdisplay = 1280; in tc35876x_get_config_mode()
586 mode->vdisplay = 800; in tc35876x_get_config_mode()
587 mode->hsync_start = 1360; in tc35876x_get_config_mode()
588 mode->hsync_end = 1400; in tc35876x_get_config_mode()
589 mode->htotal = 1440; in tc35876x_get_config_mode()
590 mode->vsync_start = 814; in tc35876x_get_config_mode()
591 mode->vsync_end = 824; in tc35876x_get_config_mode()
592 mode->vtotal = 838; in tc35876x_get_config_mode()
593 mode->clock = 33324 << 1; in tc35876x_get_config_mode()
595 dev_info(&dev->pdev->dev, "hdisplay(w) = %d\n", mode->hdisplay); in tc35876x_get_config_mode()
596 dev_info(&dev->pdev->dev, "vdisplay(h) = %d\n", mode->vdisplay); in tc35876x_get_config_mode()
597 dev_info(&dev->pdev->dev, "HSS = %d\n", mode->hsync_start); in tc35876x_get_config_mode()
598 dev_info(&dev->pdev->dev, "HSE = %d\n", mode->hsync_end); in tc35876x_get_config_mode()
599 dev_info(&dev->pdev->dev, "htotal = %d\n", mode->htotal); in tc35876x_get_config_mode()
600 dev_info(&dev->pdev->dev, "VSS = %d\n", mode->vsync_start); in tc35876x_get_config_mode()
601 dev_info(&dev->pdev->dev, "VSE = %d\n", mode->vsync_end); in tc35876x_get_config_mode()
602 dev_info(&dev->pdev->dev, "vtotal = %d\n", mode->vtotal); in tc35876x_get_config_mode()
603 dev_info(&dev->pdev->dev, "clock = %d\n", mode->clock); in tc35876x_get_config_mode()
608 mode->type |= DRM_MODE_TYPE_PREFERRED; in tc35876x_get_config_mode()
613 /* DV1 Active area 216.96 x 135.6 mm */
621 return -EINVAL; in tc35876x_get_panel_info()
623 pi->width_mm = DV1_PANEL_WIDTH; in tc35876x_get_panel_info()
624 pi->height_mm = DV1_PANEL_HEIGHT; in tc35876x_get_panel_info()
632 dev_info(&client->dev, "%s\n", __func__); in tc35876x_bridge_probe()
634 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { in tc35876x_bridge_probe()
635 dev_err(&client->dev, "%s: i2c_check_functionality() failed\n", in tc35876x_bridge_probe()
637 return -ENODEV; in tc35876x_bridge_probe()
640 bridge_reset = devm_gpiod_get_optional(&client->dev, "bridge-reset", GPIOD_OUT_LOW); in tc35876x_bridge_probe()
646 bridge_bl_enable = devm_gpiod_get_optional(&client->dev, "bl-en", GPIOD_OUT_LOW); in tc35876x_bridge_probe()
650 gpiod_set_consumer_name(bridge_bl_enable, "tc35876x panel bl en"); in tc35876x_bridge_probe()
652 backlight_voltage = devm_gpiod_get_optional(&client->dev, "vadd", GPIOD_OUT_LOW); in tc35876x_bridge_probe()
665 dev_dbg(&client->dev, "%s\n", __func__); in tc35876x_bridge_remove()
691 dev_info(&client->dev, "%s\n", __func__); in cmi_lcd_i2c_probe()
693 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { in cmi_lcd_i2c_probe()
694 dev_err(&client->dev, "%s: i2c_check_functionality() failed\n", in cmi_lcd_i2c_probe()
696 return -ENODEV; in cmi_lcd_i2c_probe()
706 dev_dbg(&client->dev, "%s\n", __func__); in cmi_lcd_i2c_remove()
714 { "cmi-lcd", 0 },
721 .name = "cmi-lcd",
737 .type = "cmi-lcd", in cmi_lcd_hack_create_device()
747 return -EINVAL; in cmi_lcd_hack_create_device()
778 dev_dbg(&dev->pdev->dev, "%s\n", __func__); in tc35876x_init()
784 dev_err(&dev->pdev->dev, in tc35876x_init()
790 dev_err(&dev->pdev->dev, in tc35876x_init()