Lines Matching full:adv

27 static void adv7511_dsi_config_timing_gen(struct adv7511 *adv)  in adv7511_dsi_config_timing_gen()  argument
29 struct mipi_dsi_device *dsi = adv->dsi; in adv7511_dsi_config_timing_gen()
30 struct drm_display_mode *mode = &adv->curr_mode; in adv7511_dsi_config_timing_gen()
42 regmap_write(adv->regmap_cec, 0x16, in adv7511_dsi_config_timing_gen()
46 regmap_write(adv->regmap_cec, 0x28, mode->htotal >> 4); in adv7511_dsi_config_timing_gen()
47 regmap_write(adv->regmap_cec, 0x29, (mode->htotal << 4) & 0xff); in adv7511_dsi_config_timing_gen()
48 regmap_write(adv->regmap_cec, 0x2a, hsw >> 4); in adv7511_dsi_config_timing_gen()
49 regmap_write(adv->regmap_cec, 0x2b, (hsw << 4) & 0xff); in adv7511_dsi_config_timing_gen()
50 regmap_write(adv->regmap_cec, 0x2c, hfp >> 4); in adv7511_dsi_config_timing_gen()
51 regmap_write(adv->regmap_cec, 0x2d, (hfp << 4) & 0xff); in adv7511_dsi_config_timing_gen()
52 regmap_write(adv->regmap_cec, 0x2e, hbp >> 4); in adv7511_dsi_config_timing_gen()
53 regmap_write(adv->regmap_cec, 0x2f, (hbp << 4) & 0xff); in adv7511_dsi_config_timing_gen()
56 regmap_write(adv->regmap_cec, 0x30, mode->vtotal >> 4); in adv7511_dsi_config_timing_gen()
57 regmap_write(adv->regmap_cec, 0x31, (mode->vtotal << 4) & 0xff); in adv7511_dsi_config_timing_gen()
58 regmap_write(adv->regmap_cec, 0x32, vsw >> 4); in adv7511_dsi_config_timing_gen()
59 regmap_write(adv->regmap_cec, 0x33, (vsw << 4) & 0xff); in adv7511_dsi_config_timing_gen()
60 regmap_write(adv->regmap_cec, 0x34, vfp >> 4); in adv7511_dsi_config_timing_gen()
61 regmap_write(adv->regmap_cec, 0x35, (vfp << 4) & 0xff); in adv7511_dsi_config_timing_gen()
62 regmap_write(adv->regmap_cec, 0x36, vbp >> 4); in adv7511_dsi_config_timing_gen()
63 regmap_write(adv->regmap_cec, 0x37, (vbp << 4) & 0xff); in adv7511_dsi_config_timing_gen()
66 void adv7533_dsi_power_on(struct adv7511 *adv) in adv7533_dsi_power_on() argument
68 struct mipi_dsi_device *dsi = adv->dsi; in adv7533_dsi_power_on()
70 if (adv->use_timing_gen) in adv7533_dsi_power_on()
71 adv7511_dsi_config_timing_gen(adv); in adv7533_dsi_power_on()
74 regmap_write(adv->regmap_cec, 0x1c, dsi->lanes << 4); in adv7533_dsi_power_on()
76 if (adv->use_timing_gen) { in adv7533_dsi_power_on()
78 regmap_write(adv->regmap_cec, 0x27, 0xcb); in adv7533_dsi_power_on()
79 regmap_write(adv->regmap_cec, 0x27, 0x8b); in adv7533_dsi_power_on()
80 regmap_write(adv->regmap_cec, 0x27, 0xcb); in adv7533_dsi_power_on()
83 regmap_write(adv->regmap_cec, 0x27, 0x0b); in adv7533_dsi_power_on()
87 regmap_write(adv->regmap_cec, 0x03, 0x89); in adv7533_dsi_power_on()
89 regmap_write(adv->regmap_cec, 0x55, 0x00); in adv7533_dsi_power_on()
91 regmap_register_patch(adv->regmap_cec, adv7533_cec_fixed_registers, in adv7533_dsi_power_on()
95 void adv7533_dsi_power_off(struct adv7511 *adv) in adv7533_dsi_power_off() argument
98 regmap_write(adv->regmap_cec, 0x03, 0x0b); in adv7533_dsi_power_off()
100 regmap_write(adv->regmap_cec, 0x27, 0x0b); in adv7533_dsi_power_off()
103 enum drm_mode_status adv7533_mode_valid(struct adv7511 *adv, in adv7533_mode_valid() argument
106 struct mipi_dsi_device *dsi = adv->dsi; in adv7533_mode_valid()
110 if (mode->clock > adv->info->max_mode_clock_khz) in adv7533_mode_valid()
114 if (mode->clock * bpp > adv->info->max_lane_freq_khz * adv->num_dsi_lanes) in adv7533_mode_valid()
120 int adv7533_patch_registers(struct adv7511 *adv) in adv7533_patch_registers() argument
122 return regmap_register_patch(adv->regmap, in adv7533_patch_registers()
127 int adv7533_patch_cec_registers(struct adv7511 *adv) in adv7533_patch_cec_registers() argument
129 return regmap_register_patch(adv->regmap_cec, in adv7533_patch_cec_registers()
134 int adv7533_attach_dsi(struct adv7511 *adv) in adv7533_attach_dsi() argument
136 struct device *dev = &adv->i2c_main->dev; in adv7533_attach_dsi()
145 host = of_find_mipi_dsi_host_by_node(adv->host_node); in adv7533_attach_dsi()
155 adv->dsi = dsi; in adv7533_attach_dsi()
157 dsi->lanes = adv->num_dsi_lanes; in adv7533_attach_dsi()
169 int adv7533_parse_dt(struct device_node *np, struct adv7511 *adv) in adv7533_parse_dt() argument
178 adv->num_dsi_lanes = num_lanes; in adv7533_parse_dt()
180 adv->host_node = of_graph_get_remote_node(np, 0, 0); in adv7533_parse_dt()
181 if (!adv->host_node) in adv7533_parse_dt()
184 of_node_put(adv->host_node); in adv7533_parse_dt()
186 adv->use_timing_gen = !of_property_read_bool(np, in adv7533_parse_dt()
190 adv->rgb = true; in adv7533_parse_dt()
191 adv->embedded_sync = false; in adv7533_parse_dt()