Lines Matching full:tcon
83 static void sun4i_tcon_channel_set_status(struct sun4i_tcon *tcon, int channel, in sun4i_tcon_channel_set_status() argument
90 WARN_ON(!tcon->quirks->has_channel_0); in sun4i_tcon_channel_set_status()
91 regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG, in sun4i_tcon_channel_set_status()
94 clk = tcon->dclk; in sun4i_tcon_channel_set_status()
97 WARN_ON(!tcon->quirks->has_channel_1); in sun4i_tcon_channel_set_status()
98 regmap_update_bits(tcon->regs, SUN4I_TCON1_CTL_REG, in sun4i_tcon_channel_set_status()
101 clk = tcon->sclk1; in sun4i_tcon_channel_set_status()
117 static void sun4i_tcon_setup_lvds_phy(struct sun4i_tcon *tcon, in sun4i_tcon_setup_lvds_phy() argument
120 regmap_write(tcon->regs, SUN4I_TCON0_LVDS_ANA0_REG, in sun4i_tcon_setup_lvds_phy()
129 regmap_update_bits(tcon->regs, SUN4I_TCON0_LVDS_ANA1_REG, in sun4i_tcon_setup_lvds_phy()
133 regmap_update_bits(tcon->regs, SUN4I_TCON0_LVDS_ANA1_REG, in sun4i_tcon_setup_lvds_phy()
136 regmap_update_bits(tcon->regs, SUN4I_TCON0_LVDS_ANA0_REG, in sun4i_tcon_setup_lvds_phy()
141 static void sun6i_tcon_setup_lvds_phy(struct sun4i_tcon *tcon, in sun6i_tcon_setup_lvds_phy() argument
146 regmap_write(tcon->regs, SUN4I_TCON0_LVDS_ANA0_REG, in sun6i_tcon_setup_lvds_phy()
153 regmap_update_bits(tcon->regs, SUN4I_TCON0_LVDS_ANA0_REG, in sun6i_tcon_setup_lvds_phy()
158 regmap_update_bits(tcon->regs, SUN4I_TCON0_LVDS_ANA0_REG, in sun6i_tcon_setup_lvds_phy()
167 regmap_write_bits(tcon->regs, SUN4I_TCON0_LVDS_ANA0_REG, in sun6i_tcon_setup_lvds_phy()
172 static void sun4i_tcon_lvds_set_status(struct sun4i_tcon *tcon, in sun4i_tcon_lvds_set_status() argument
177 regmap_update_bits(tcon->regs, SUN4I_TCON0_LVDS_IF_REG, in sun4i_tcon_lvds_set_status()
180 if (tcon->quirks->setup_lvds_phy) in sun4i_tcon_lvds_set_status()
181 tcon->quirks->setup_lvds_phy(tcon, encoder); in sun4i_tcon_lvds_set_status()
183 regmap_update_bits(tcon->regs, SUN4I_TCON0_LVDS_IF_REG, in sun4i_tcon_lvds_set_status()
188 void sun4i_tcon_set_status(struct sun4i_tcon *tcon, in sun4i_tcon_set_status() argument
213 sun4i_tcon_lvds_set_status(tcon, encoder, false); in sun4i_tcon_set_status()
215 regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG, in sun4i_tcon_set_status()
220 sun4i_tcon_lvds_set_status(tcon, encoder, true); in sun4i_tcon_set_status()
222 sun4i_tcon_channel_set_status(tcon, channel, enabled); in sun4i_tcon_set_status()
225 void sun4i_tcon_enable_vblank(struct sun4i_tcon *tcon, bool enable) in sun4i_tcon_enable_vblank() argument
238 regmap_update_bits(tcon->regs, SUN4I_TCON_GINT0_REG, mask, val); in sun4i_tcon_enable_vblank()
243 * This function is a helper for TCON output muxing. The TCON output
244 * muxing control register in earlier SoCs (without the TCON TOP block)
251 struct sun4i_tcon *tcon; in sun4i_get_tcon0() local
253 list_for_each_entry(tcon, &drv->tcon_list, list) in sun4i_get_tcon0()
254 if (tcon->id == 0) in sun4i_get_tcon0()
255 return tcon; in sun4i_get_tcon0()
263 static void sun4i_tcon_set_mux(struct sun4i_tcon *tcon, int channel, in sun4i_tcon_set_mux() argument
268 if (tcon->quirks->set_mux) in sun4i_tcon_set_mux()
269 ret = tcon->quirks->set_mux(tcon, encoder); in sun4i_tcon_set_mux()
288 DRM_DEBUG_DRIVER("TCON %d clock delay %u\n", channel, delay); in sun4i_tcon_get_clk_delay()
293 static void sun4i_tcon0_mode_set_common(struct sun4i_tcon *tcon, in sun4i_tcon0_mode_set_common() argument
297 clk_set_rate(tcon->dclk, mode->crtc_clock * 1000); in sun4i_tcon0_mode_set_common()
300 regmap_write(tcon->regs, SUN4I_TCON0_BASIC0_REG, in sun4i_tcon0_mode_set_common()
305 static void sun4i_tcon0_mode_set_dithering(struct sun4i_tcon *tcon, in sun4i_tcon0_mode_set_dithering() argument
321 regmap_write(tcon->regs, SUN4I_TCON0_FRM_SEED_PR_REG, 0x11111111); in sun4i_tcon0_mode_set_dithering()
322 regmap_write(tcon->regs, SUN4I_TCON0_FRM_SEED_PG_REG, 0x11111111); in sun4i_tcon0_mode_set_dithering()
323 regmap_write(tcon->regs, SUN4I_TCON0_FRM_SEED_PB_REG, 0x11111111); in sun4i_tcon0_mode_set_dithering()
324 regmap_write(tcon->regs, SUN4I_TCON0_FRM_SEED_LR_REG, 0x11111111); in sun4i_tcon0_mode_set_dithering()
325 regmap_write(tcon->regs, SUN4I_TCON0_FRM_SEED_LG_REG, 0x11111111); in sun4i_tcon0_mode_set_dithering()
326 regmap_write(tcon->regs, SUN4I_TCON0_FRM_SEED_LB_REG, 0x11111111); in sun4i_tcon0_mode_set_dithering()
327 regmap_write(tcon->regs, SUN4I_TCON0_FRM_TBL0_REG, 0x01010000); in sun4i_tcon0_mode_set_dithering()
328 regmap_write(tcon->regs, SUN4I_TCON0_FRM_TBL1_REG, 0x15151111); in sun4i_tcon0_mode_set_dithering()
329 regmap_write(tcon->regs, SUN4I_TCON0_FRM_TBL2_REG, 0x57575555); in sun4i_tcon0_mode_set_dithering()
330 regmap_write(tcon->regs, SUN4I_TCON0_FRM_TBL3_REG, 0x7f7f7777); in sun4i_tcon0_mode_set_dithering()
354 regmap_write(tcon->regs, SUN4I_TCON_FRM_CTL_REG, val); in sun4i_tcon0_mode_set_dithering()
357 static void sun4i_tcon0_mode_set_cpu(struct sun4i_tcon *tcon, in sun4i_tcon0_mode_set_cpu() argument
369 tcon->dclk_min_div = SUN6I_DSI_TCON_DIV; in sun4i_tcon0_mode_set_cpu()
370 tcon->dclk_max_div = SUN6I_DSI_TCON_DIV; in sun4i_tcon0_mode_set_cpu()
372 sun4i_tcon0_mode_set_common(tcon, mode); in sun4i_tcon0_mode_set_cpu()
375 sun4i_tcon0_mode_set_dithering(tcon, sun4i_tcon_get_connector(encoder)); in sun4i_tcon0_mode_set_cpu()
377 regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG, in sun4i_tcon0_mode_set_cpu()
381 regmap_write(tcon->regs, SUN4I_TCON_ECC_FIFO_REG, in sun4i_tcon0_mode_set_cpu()
384 regmap_write(tcon->regs, SUN4I_TCON0_CPU_IF_REG, in sun4i_tcon0_mode_set_cpu()
396 regmap_read(tcon->regs, SUN4I_TCON0_DCLK_REG, &tcon_div); in sun4i_tcon0_mode_set_cpu()
401 regmap_write(tcon->regs, SUN4I_TCON0_CPU_TRI0_REG, in sun4i_tcon0_mode_set_cpu()
405 regmap_write(tcon->regs, SUN4I_TCON0_CPU_TRI1_REG, in sun4i_tcon0_mode_set_cpu()
411 regmap_write(tcon->regs, SUN4I_TCON0_CPU_TRI2_REG, in sun4i_tcon0_mode_set_cpu()
419 regmap_write(tcon->regs, SUN4I_TCON_SAFE_PERIOD_REG, in sun4i_tcon0_mode_set_cpu()
424 regmap_write(tcon->regs, SUN4I_TCON0_IO_TRI_REG, in sun4i_tcon0_mode_set_cpu()
428 static void sun4i_tcon0_mode_set_lvds(struct sun4i_tcon *tcon, in sun4i_tcon0_mode_set_lvds() argument
436 WARN_ON(!tcon->quirks->has_channel_0); in sun4i_tcon0_mode_set_lvds()
438 tcon->dclk_min_div = 7; in sun4i_tcon0_mode_set_lvds()
439 tcon->dclk_max_div = 7; in sun4i_tcon0_mode_set_lvds()
440 sun4i_tcon0_mode_set_common(tcon, mode); in sun4i_tcon0_mode_set_lvds()
443 sun4i_tcon0_mode_set_dithering(tcon, sun4i_tcon_get_connector(encoder)); in sun4i_tcon0_mode_set_lvds()
447 regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG, in sun4i_tcon0_mode_set_lvds()
460 regmap_write(tcon->regs, SUN4I_TCON0_BASIC1_REG, in sun4i_tcon0_mode_set_lvds()
473 regmap_write(tcon->regs, SUN4I_TCON0_BASIC2_REG, in sun4i_tcon0_mode_set_lvds()
483 regmap_write(tcon->regs, SUN4I_TCON0_LVDS_IF_REG, reg); in sun4i_tcon0_mode_set_lvds()
492 regmap_write(tcon->regs, SUN4I_TCON0_IO_POL_REG, val); in sun4i_tcon0_mode_set_lvds()
495 regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG, in sun4i_tcon0_mode_set_lvds()
500 regmap_write(tcon->regs, SUN4I_TCON0_IO_TRI_REG, 0xe0000000); in sun4i_tcon0_mode_set_lvds()
503 static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, in sun4i_tcon0_mode_set_rgb() argument
513 WARN_ON(!tcon->quirks->has_channel_0); in sun4i_tcon0_mode_set_rgb()
515 tcon->dclk_min_div = tcon->quirks->dclk_min_div; in sun4i_tcon0_mode_set_rgb()
516 tcon->dclk_max_div = 127; in sun4i_tcon0_mode_set_rgb()
517 sun4i_tcon0_mode_set_common(tcon, mode); in sun4i_tcon0_mode_set_rgb()
520 sun4i_tcon0_mode_set_dithering(tcon, connector); in sun4i_tcon0_mode_set_rgb()
524 regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG, in sun4i_tcon0_mode_set_rgb()
537 regmap_write(tcon->regs, SUN4I_TCON0_BASIC1_REG, in sun4i_tcon0_mode_set_rgb()
550 regmap_write(tcon->regs, SUN4I_TCON0_BASIC2_REG, in sun4i_tcon0_mode_set_rgb()
558 regmap_write(tcon->regs, SUN4I_TCON0_BASIC3_REG, in sun4i_tcon0_mode_set_rgb()
575 regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG, in sun4i_tcon0_mode_set_rgb()
583 regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG, in sun4i_tcon0_mode_set_rgb()
588 regmap_write(tcon->regs, SUN4I_TCON0_IO_TRI_REG, 0); in sun4i_tcon0_mode_set_rgb()
591 static void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon, in sun4i_tcon1_mode_set() argument
598 WARN_ON(!tcon->quirks->has_channel_1); in sun4i_tcon1_mode_set()
601 clk_set_rate(tcon->sclk1, mode->crtc_clock * 1000); in sun4i_tcon1_mode_set()
605 regmap_update_bits(tcon->regs, SUN4I_TCON1_CTL_REG, in sun4i_tcon1_mode_set()
614 regmap_update_bits(tcon->regs, SUN4I_TCON1_CTL_REG, in sun4i_tcon1_mode_set()
619 regmap_write(tcon->regs, SUN4I_TCON1_BASIC0_REG, in sun4i_tcon1_mode_set()
624 regmap_write(tcon->regs, SUN4I_TCON1_BASIC1_REG, in sun4i_tcon1_mode_set()
629 regmap_write(tcon->regs, SUN4I_TCON1_BASIC2_REG, in sun4i_tcon1_mode_set()
637 regmap_write(tcon->regs, SUN4I_TCON1_BASIC3_REG, in sun4i_tcon1_mode_set()
663 regmap_write(tcon->regs, SUN4I_TCON1_BASIC4_REG, in sun4i_tcon1_mode_set()
671 regmap_write(tcon->regs, SUN4I_TCON1_BASIC5_REG, in sun4i_tcon1_mode_set()
676 if (tcon->quirks->polarity_in_ch0) { in sun4i_tcon1_mode_set()
685 regmap_write(tcon->regs, SUN4I_TCON0_IO_POL_REG, val); in sun4i_tcon1_mode_set()
696 regmap_write(tcon->regs, SUN4I_TCON1_IO_POL_REG, val); in sun4i_tcon1_mode_set()
700 regmap_update_bits(tcon->regs, SUN4I_TCON_GCTL_REG, in sun4i_tcon1_mode_set()
705 void sun4i_tcon_mode_set(struct sun4i_tcon *tcon, in sun4i_tcon_mode_set() argument
712 sun4i_tcon0_mode_set_cpu(tcon, encoder, mode); in sun4i_tcon_mode_set()
715 sun4i_tcon0_mode_set_lvds(tcon, encoder, mode); in sun4i_tcon_mode_set()
718 sun4i_tcon0_mode_set_rgb(tcon, encoder, mode); in sun4i_tcon_mode_set()
719 sun4i_tcon_set_mux(tcon, 0, encoder); in sun4i_tcon_mode_set()
723 sun4i_tcon1_mode_set(tcon, mode); in sun4i_tcon_mode_set()
724 sun4i_tcon_set_mux(tcon, 1, encoder); in sun4i_tcon_mode_set()
748 struct sun4i_tcon *tcon = private; in sun4i_tcon_handler() local
749 struct drm_device *drm = tcon->drm; in sun4i_tcon_handler()
750 struct sun4i_crtc *scrtc = tcon->crtc; in sun4i_tcon_handler()
754 regmap_read(tcon->regs, SUN4I_TCON_GINT0_REG, &status); in sun4i_tcon_handler()
765 regmap_update_bits(tcon->regs, SUN4I_TCON_GINT0_REG, in sun4i_tcon_handler()
778 struct sun4i_tcon *tcon) in sun4i_tcon_init_clocks() argument
780 tcon->clk = devm_clk_get_enabled(dev, "ahb"); in sun4i_tcon_init_clocks()
781 if (IS_ERR(tcon->clk)) { in sun4i_tcon_init_clocks()
782 dev_err(dev, "Couldn't get the TCON bus clock\n"); in sun4i_tcon_init_clocks()
783 return PTR_ERR(tcon->clk); in sun4i_tcon_init_clocks()
786 if (tcon->quirks->has_channel_0) { in sun4i_tcon_init_clocks()
787 tcon->sclk0 = devm_clk_get_enabled(dev, "tcon-ch0"); in sun4i_tcon_init_clocks()
788 if (IS_ERR(tcon->sclk0)) { in sun4i_tcon_init_clocks()
789 dev_err(dev, "Couldn't get the TCON channel 0 clock\n"); in sun4i_tcon_init_clocks()
790 return PTR_ERR(tcon->sclk0); in sun4i_tcon_init_clocks()
794 if (tcon->quirks->has_channel_1) { in sun4i_tcon_init_clocks()
795 tcon->sclk1 = devm_clk_get(dev, "tcon-ch1"); in sun4i_tcon_init_clocks()
796 if (IS_ERR(tcon->sclk1)) { in sun4i_tcon_init_clocks()
797 dev_err(dev, "Couldn't get the TCON channel 1 clock\n"); in sun4i_tcon_init_clocks()
798 return PTR_ERR(tcon->sclk1); in sun4i_tcon_init_clocks()
806 struct sun4i_tcon *tcon) in sun4i_tcon_init_irq() argument
816 dev_name(dev), tcon); in sun4i_tcon_init_irq()
833 struct sun4i_tcon *tcon) in sun4i_tcon_init_regmap() argument
844 tcon->regs = devm_regmap_init_mmio(dev, regs, in sun4i_tcon_init_regmap()
846 if (IS_ERR(tcon->regs)) { in sun4i_tcon_init_regmap()
847 dev_err(dev, "Couldn't create the TCON regmap\n"); in sun4i_tcon_init_regmap()
848 return PTR_ERR(tcon->regs); in sun4i_tcon_init_regmap()
851 /* Make sure the TCON is disabled and all IRQs are off */ in sun4i_tcon_init_regmap()
852 regmap_write(tcon->regs, SUN4I_TCON_GCTL_REG, 0); in sun4i_tcon_init_regmap()
853 regmap_write(tcon->regs, SUN4I_TCON_GINT0_REG, 0); in sun4i_tcon_init_regmap()
854 regmap_write(tcon->regs, SUN4I_TCON_GINT1_REG, 0); in sun4i_tcon_init_regmap()
857 regmap_write(tcon->regs, SUN4I_TCON0_IO_TRI_REG, ~0); in sun4i_tcon_init_regmap()
858 regmap_write(tcon->regs, SUN4I_TCON1_IO_TRI_REG, ~0); in sun4i_tcon_init_regmap()
865 * the TCON is always tied to just one backend. Hence we can traverse
866 * the of_graph upwards to find the backend our tcon is connected to,
871 * registered and binded before the TCON, we can just go through the
892 * This only works if there is only one path from the TCON in sun4i_tcon_find_engine_traverse()
920 * more than one input and one output (TCON TOP) exits, correct in sun4i_tcon_find_engine_traverse()
945 * connection between components, up to and including the TCON, of
978 * Once we know the TCON's id, we can look through the list of
1015 * Because TCON is added to the list at the end of the probe in sun4i_tcon_get_index()
1016 * (after this function is called), index of the current TCON in sun4i_tcon_get_index()
1017 * will be same as current TCON list size. in sun4i_tcon_get_index()
1027 * we assumed the TCON was always tied to just one backend. However
1028 * this proved not to be the case. On the A31, the TCON can select
1030 * the backend can choose which TCON to output to.
1033 * connection between components, up to and including the TCON, of
1039 * However the connections between the backend and TCON were assumed
1042 * up the remote endpoint ID of a TCON input endpoint. TCON1 would be
1045 * This function first checks if the TCON node has 2 input endpoints.
1050 * have endpoint connections between the backend and TCON across
1070 * connections between the backend and TCON? in sun4i_tcon_find_engine()
1079 * contains TCON TOP, chances are that there are either more in sun4i_tcon_find_engine()
1081 * (H6). In that case it's easier just use TCON index in list in sun4i_tcon_find_engine()
1084 * TCON TOP, remaining 2 TCONs can't be connected to anything in sun4i_tcon_find_engine()
1111 struct sun4i_tcon *tcon; in sun4i_tcon_bind() local
1122 tcon = devm_kzalloc(dev, sizeof(*tcon), GFP_KERNEL); in sun4i_tcon_bind()
1123 if (!tcon) in sun4i_tcon_bind()
1125 dev_set_drvdata(dev, tcon); in sun4i_tcon_bind()
1126 tcon->drm = drm; in sun4i_tcon_bind()
1127 tcon->dev = dev; in sun4i_tcon_bind()
1128 tcon->id = engine->id; in sun4i_tcon_bind()
1129 tcon->quirks = of_device_get_match_data(dev); in sun4i_tcon_bind()
1131 tcon->lcd_rst = devm_reset_control_get(dev, "lcd"); in sun4i_tcon_bind()
1132 if (IS_ERR(tcon->lcd_rst)) { in sun4i_tcon_bind()
1134 return PTR_ERR(tcon->lcd_rst); in sun4i_tcon_bind()
1137 if (tcon->quirks->needs_edp_reset) { in sun4i_tcon_bind()
1151 /* Make sure our TCON is reset */ in sun4i_tcon_bind()
1152 ret = reset_control_reset(tcon->lcd_rst); in sun4i_tcon_bind()
1158 if (tcon->quirks->supports_lvds) { in sun4i_tcon_bind()
1166 tcon->lvds_rst = devm_reset_control_get_optional(dev, "lvds"); in sun4i_tcon_bind()
1167 if (IS_ERR(tcon->lvds_rst)) { in sun4i_tcon_bind()
1169 return PTR_ERR(tcon->lvds_rst); in sun4i_tcon_bind()
1170 } else if (tcon->lvds_rst) { in sun4i_tcon_bind()
1172 reset_control_reset(tcon->lvds_rst); in sun4i_tcon_bind()
1184 if (tcon->quirks->has_lvds_alt) { in sun4i_tcon_bind()
1185 tcon->lvds_pll = devm_clk_get(dev, "lvds-alt"); in sun4i_tcon_bind()
1186 if (IS_ERR(tcon->lvds_pll)) { in sun4i_tcon_bind()
1187 if (PTR_ERR(tcon->lvds_pll) == -ENOENT) { in sun4i_tcon_bind()
1191 return PTR_ERR(tcon->lvds_pll); in sun4i_tcon_bind()
1199 (tcon->quirks->has_lvds_alt && !has_lvds_alt)) { in sun4i_tcon_bind()
1210 ret = sun4i_tcon_init_clocks(dev, tcon); in sun4i_tcon_bind()
1212 dev_err(dev, "Couldn't init our TCON clocks\n"); in sun4i_tcon_bind()
1216 ret = sun4i_tcon_init_regmap(dev, tcon); in sun4i_tcon_bind()
1218 dev_err(dev, "Couldn't init our TCON regmap\n"); in sun4i_tcon_bind()
1222 if (tcon->quirks->has_channel_0) { in sun4i_tcon_bind()
1223 ret = sun4i_dclk_create(dev, tcon); in sun4i_tcon_bind()
1225 dev_err(dev, "Couldn't create our TCON dot clock\n"); in sun4i_tcon_bind()
1230 ret = sun4i_tcon_init_irq(dev, tcon); in sun4i_tcon_bind()
1232 dev_err(dev, "Couldn't init our TCON interrupts\n"); in sun4i_tcon_bind()
1236 tcon->crtc = sun4i_crtc_init(drm, engine, tcon); in sun4i_tcon_bind()
1237 if (IS_ERR(tcon->crtc)) { in sun4i_tcon_bind()
1239 ret = PTR_ERR(tcon->crtc); in sun4i_tcon_bind()
1243 if (tcon->quirks->has_channel_0) { in sun4i_tcon_bind()
1245 * If we have an LVDS panel connected to the TCON, we should in sun4i_tcon_bind()
1252 ret = sun4i_lvds_init(drm, tcon); in sun4i_tcon_bind()
1256 ret = sun4i_rgb_init(drm, tcon); in sun4i_tcon_bind()
1263 if (tcon->quirks->needs_de_be_mux) { in sun4i_tcon_bind()
1269 * the CRTC is tied to the TCON, while the layers are in sun4i_tcon_bind()
1274 regmap_update_bits(tcon->regs, SUN4I_TCON0_CTL_REG, in sun4i_tcon_bind()
1276 tcon->id); in sun4i_tcon_bind()
1277 regmap_update_bits(tcon->regs, SUN4I_TCON1_CTL_REG, in sun4i_tcon_bind()
1279 tcon->id); in sun4i_tcon_bind()
1282 list_add_tail(&tcon->list, &drv->tcon_list); in sun4i_tcon_bind()
1287 if (tcon->quirks->has_channel_0) in sun4i_tcon_bind()
1288 sun4i_dclk_free(tcon); in sun4i_tcon_bind()
1290 reset_control_assert(tcon->lcd_rst); in sun4i_tcon_bind()
1297 struct sun4i_tcon *tcon = dev_get_drvdata(dev); in sun4i_tcon_unbind() local
1299 list_del(&tcon->list); in sun4i_tcon_unbind()
1300 if (tcon->quirks->has_channel_0) in sun4i_tcon_unbind()
1301 sun4i_dclk_free(tcon); in sun4i_tcon_unbind()
1336 /* platform specific TCON muxing callbacks */
1337 static int sun4i_a10_tcon_set_mux(struct sun4i_tcon *tcon, in sun4i_a10_tcon_set_mux() argument
1356 0x3 << shift, tcon->id << shift); in sun4i_a10_tcon_set_mux()
1361 static int sun5i_a13_tcon_set_mux(struct sun4i_tcon *tcon, in sun5i_a13_tcon_set_mux() argument
1374 return regmap_write(tcon->regs, SUN4I_TCON_MUX_CTRL_REG, val); in sun5i_a13_tcon_set_mux()
1377 static int sun6i_tcon_set_mux(struct sun4i_tcon *tcon, in sun6i_tcon_set_mux() argument
1397 0x3 << shift, tcon->id << shift); in sun6i_tcon_set_mux()
1402 static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon, in sun8i_r40_tcon_tv_set_mux() argument
1409 /* find TCON TOP platform device and TCON id */ in sun8i_r40_tcon_tv_set_mux()
1411 port = of_graph_get_port_by_id(tcon->dev->of_node, 0); in sun8i_r40_tcon_tv_set_mux()
1418 remote = of_graph_get_remote_node(tcon->dev->of_node, 0, -1); in sun8i_r40_tcon_tv_set_mux()
1437 ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); in sun8i_r40_tcon_tv_set_mux()
1536 /* sun4i_drv uses this list to check if a device node is a TCON */
1538 { .compatible = "allwinner,sun4i-a10-tcon", .data = &sun4i_a10_quirks },
1539 { .compatible = "allwinner,sun5i-a13-tcon", .data = &sun5i_a13_quirks },
1540 { .compatible = "allwinner,sun6i-a31-tcon", .data = &sun6i_a31_quirks },
1541 { .compatible = "allwinner,sun6i-a31s-tcon", .data = &sun6i_a31s_quirks },
1542 { .compatible = "allwinner,sun7i-a20-tcon", .data = &sun7i_a20_quirks },
1545 { .compatible = "allwinner,sun8i-a23-tcon", .data = &sun8i_a33_quirks },
1546 { .compatible = "allwinner,sun8i-a33-tcon", .data = &sun8i_a33_quirks },
1547 { .compatible = "allwinner,sun8i-a83t-tcon-lcd", .data = &sun8i_a83t_lcd_quirks },
1548 { .compatible = "allwinner,sun8i-a83t-tcon-tv", .data = &sun8i_a83t_tv_quirks },
1549 { .compatible = "allwinner,sun8i-r40-tcon-tv", .data = &sun8i_r40_tv_quirks },
1550 { .compatible = "allwinner,sun8i-v3s-tcon", .data = &sun8i_v3s_quirks },
1551 { .compatible = "allwinner,sun9i-a80-tcon-lcd", .data = &sun9i_a80_tcon_lcd_quirks },
1552 { .compatible = "allwinner,sun9i-a80-tcon-tv", .data = &sun9i_a80_tcon_tv_quirks },
1562 .name = "sun4i-tcon",