1 /* 2 * Allwinner SoCs display driver. 3 * 4 * Copyright (C) 2016 Allwinner. 5 * 6 * This file is licensed under the terms of the GNU General Public 7 * License version 2. This program is licensed "as is" without any 8 * warranty of any kind, whether express or implied. 9 */ 10 11 #ifndef __DE_LCD_TYPE_H__ 12 #define __DE_LCD_TYPE_H__ 13 14 #include "de_lcd.h" 15 16 /* 17 * detail information of registers 18 */ 19 20 union tcon_gctl_reg_t { 21 u32 dwval; 22 struct { 23 u32 io_map_sel:1; 24 u32 pad_sel:1; 25 u32 res0:28; 26 u32 tcon_gamma_en:1; 27 u32 tcon_en:1; 28 } bits; 29 }; 30 31 union tcon_gint0_reg_t { 32 u32 dwval; 33 struct { 34 u32 tcon_irq_flag:16; 35 u32 tcon_irq_en:16; 36 } bits; 37 }; 38 39 union tcon_gint1_reg_t { 40 u32 dwval; 41 struct { 42 u32 tcon1_line_int_num:12; 43 u32 res0:4; 44 u32 tcon0_line_int_num:12; 45 u32 res1:4; 46 } bits; 47 }; 48 49 union tcon0_frm_ctl_reg_t { 50 u32 dwval; 51 struct { 52 u32 tcon0_frm_test:2; 53 u32 res0:2; 54 u32 tcon0_frm_mode_b:1; 55 u32 tcon0_frm_mode_g:1; 56 u32 tcon0_frm_mode_r:1; 57 u32 res1:24; 58 u32 tcon0_frm_en:1; 59 } bits; 60 }; 61 62 union tcon0_frm_seed_reg_t { 63 u32 dwval; 64 struct { 65 u32 seed_value:13; 66 u32 res0:19; 67 } bits; 68 }; 69 70 union tcon0_frm_tab_reg_t { 71 u32 dwval; 72 struct { 73 u32 frm_table_value; 74 } bits; 75 }; 76 77 union tcon0_3d_fifo_reg_t { 78 u32 dwval; 79 struct { 80 u32 fifo_3d_setting:2; 81 u32 res0:2; 82 u32 fifo_3d_half_line_size:11; 83 u32 res1:16; 84 u32 fifo_3d_bist_en:1; 85 } bits; 86 }; 87 88 union tcon0_ctl_reg_t { 89 u32 dwval; 90 struct { 91 u32 src_sel:3; 92 u32 res0:1; 93 u32 start_delay:5; 94 u32 res1:11; 95 u32 interlace_en:1; 96 u32 fifo1_rst:1; 97 u32 test_value:1; 98 u32 rb_swap:1; 99 u32 tcon0_if:2; 100 u32 res2:2; 101 u32 tcon0_work_mode:1; 102 u32 res3:2; 103 u32 tcon0_en:1; 104 } bits; 105 }; 106 107 union tcon0_dclk_reg_t { 108 u32 dwval; 109 struct { 110 u32 tcon0_dclk_div:7; 111 u32 res0:21; 112 u32 tcon0_dclk_en:4; 113 } bits; 114 }; 115 116 union tcon0_basic0_reg_t { 117 u32 dwval; 118 struct { 119 u32 y:12; 120 u32 res0:4; 121 u32 x:12; 122 u32 res1:4; 123 } bits; 124 }; 125 126 union tcon0_basic1_reg_t { 127 u32 dwval; 128 struct { 129 u32 hbp:12; 130 u32 res0:4; 131 u32 ht:13; 132 u32 res1:2; 133 u32 reservd:1; 134 } bits; 135 }; 136 137 union tcon0_basic2_reg_t { 138 u32 dwval; 139 struct { 140 u32 vbp:12; 141 u32 res0:4; 142 u32 vt:13; 143 u32 res1:3; 144 } bits; 145 }; 146 147 union tcon0_basic3_reg_t { 148 u32 dwval; 149 struct { 150 u32 vspw:10; 151 u32 res0:6; 152 u32 hspw:10; 153 u32 res1:6; 154 } bits; 155 }; 156 157 union tcon0_hv_if_reg_t { 158 u32 dwval; 159 struct { 160 u32 res0:19; 161 u32 ccir_csc_dis:1; 162 u32 syuv_fdly:2; 163 u32 syuv_seq:2; 164 u32 srgb_seq:4; 165 u32 hv_mode:4; 166 } bits; 167 }; 168 169 union tcon0_cpu_if_reg_t { 170 u32 dwval; 171 struct { 172 u32 trigger_en:1; 173 u32 trigger_start:1; 174 u32 trigger_fifo_en:1; 175 u32 trigger_fifo_bist_en:1; 176 u32 trigger_sync_mode:2; 177 u32 res0:10; 178 u32 flush:1; 179 u32 auto_:1; 180 u32 res1:4; 181 u32 rd_flag:1; 182 u32 wr_flag:1; 183 u32 vsync_cs_sel:1; 184 u32 ca:1; 185 u32 da:1; 186 u32 res2:1; 187 u32 cpu_mode:4; 188 } bits; 189 }; 190 191 union tcon0_cpu_wr_reg_t { 192 u32 dwval; 193 struct { 194 u32 data_wr:24; 195 u32 res0:8; 196 } bits; 197 }; 198 199 union tcon0_cpu_rd0_reg_t { 200 u32 dwval; 201 struct { 202 u32 data_rd0:24; 203 u32 res0:8; 204 } bits; 205 }; 206 207 union tcon0_cpu_rd1_reg_t { 208 u32 dwval; 209 struct { 210 u32 data_rd1:24; 211 u32 res0:8; 212 } bits; 213 }; 214 215 union tcon0_lvds_if_reg_t { 216 u32 dwval; 217 struct { 218 u32 tcon0_lvds_data_revert:4; 219 u32 tcon0_lvds_clk_revert:1; 220 u32 res0:15; 221 u32 tcon0_lvds_clk_sel:1; 222 u32 res1:2; 223 u32 tcon0_lvds_correct_mode:1; 224 u32 tcon0_lvds_debug_mode:1; 225 u32 tcon0_lvds_debug_en:1; 226 u32 tcon0_lvds_bitwidth:1; 227 u32 tcon0_lvds_mode:1; 228 u32 tcon0_lvds_dir:1; 229 u32 tcon0_lvds_even_odd_dir:1; 230 u32 tcon0_lvds_link:1; 231 u32 tcon0_lvds_en:1; 232 } bits; 233 }; 234 235 union tcon0_io_pol_reg_t { 236 u32 dwval; 237 struct { 238 u32 data_inv:24; 239 u32 sync_inv:2; 240 u32 clk_inv:1; 241 u32 de_inv:1; 242 u32 dclk_sel:3; 243 u32 io_output_sel:1; 244 } bits; 245 }; 246 247 union tcon0_io_tri_reg_t { 248 u32 dwval; 249 struct { 250 u32 data_output_tri_en:24; 251 u32 io0_output_tri_en:1; 252 u32 io1_output_tri_en:1; 253 u32 io2_output_tri_en:1; 254 u32 io3_output_tri_en:1; 255 u32 rgb_endian:1; 256 u32 res0:3; 257 } bits; 258 }; 259 260 union tcon1_ctl_reg_t { 261 u32 dwval; 262 struct { 263 u32 src_sel:2; 264 u32 res0:2; 265 u32 start_delay:5; 266 u32 res1:11; 267 u32 interlace_en:1; 268 u32 res2:10; 269 u32 tcon1_en:1; 270 } bits; 271 }; 272 273 union tcon1_basic0_reg_t { 274 u32 dwval; 275 struct { 276 u32 y:12; 277 u32 res0:4; 278 u32 x:12; 279 u32 res1:4; 280 } bits; 281 }; 282 283 union tcon1_basic1_reg_t { 284 u32 dwval; 285 struct { 286 u32 ls_yo:12; 287 u32 res0:4; 288 u32 ls_xo:12; 289 u32 res1:4; 290 } bits; 291 }; 292 293 union tcon1_basic2_reg_t { 294 u32 dwval; 295 struct { 296 u32 yo:12; 297 u32 res0:4; 298 u32 xo:12; 299 u32 res1:4; 300 } bits; 301 }; 302 303 union tcon1_basic3_reg_t { 304 u32 dwval; 305 struct { 306 u32 hbp:12; 307 u32 res0:4; 308 u32 ht:13; 309 u32 res1:3; 310 } bits; 311 }; 312 313 union tcon1_basic4_reg_t { 314 u32 dwval; 315 struct { 316 u32 vbp:12; 317 u32 res0:4; 318 u32 vt:13; 319 u32 res1:3; 320 } bits; 321 }; 322 323 union tcon1_basic5_reg_t { 324 u32 dwval; 325 struct { 326 u32 vspw:10; 327 u32 res0:6; 328 u32 hspw:10; 329 u32 res1:6; 330 } bits; 331 }; 332 333 union tcon1_ps_sync_reg_t { 334 u32 dwval; 335 struct { 336 u32 sync_y:16; 337 u32 sync_x:16; 338 } bits; 339 }; 340 341 union tcon1_io_pol_reg_t { 342 u32 dwval; 343 struct { 344 u32 data_inv:24; 345 u32 io0_inv:1; 346 u32 io1_inv:1; 347 u32 io2_inv:1; 348 u32 io3_inv:1; 349 u32 res0:4; 350 } bits; 351 }; 352 353 union tcon1_io_tri_reg_t { 354 u32 dwval; 355 struct { 356 u32 data_output_tri_en:24; 357 u32 io0_output_tri_en:1; 358 u32 io1_output_tri_en:1; 359 u32 io2_output_tri_en:1; 360 u32 io3_output_tri_en:1; 361 u32 res0:4; 362 } bits; 363 }; 364 365 union tcon_ecc_fifo_reg_t { 366 u32 dwval; 367 struct { 368 u32 ecc_fifo_setting:8; 369 u32 ecc_fifo_blank_en:1; 370 u32 res0:7; 371 u32 ecc_fifo_err_bits:8; 372 u32 res1:6; 373 u32 ecc_fifo_err_flag:1; 374 u32 ecc_fifo_bist_en:1; 375 } bits; 376 }; 377 378 union tcon_debug_reg_t { 379 u32 dwval; 380 struct { 381 u32 tcon1_current_line:12; 382 u32 res0:1; 383 u32 ecc_fifo_bypass:1; 384 u32 res1:2; 385 u32 tcon0_current_line:12; 386 u32 tcon1_field_polarity:1; 387 u32 tcon0_field_polarity:1; 388 u32 tcon1_fifo_under_flow:1; 389 u32 tcon0_fifo_under_flow:1; 390 } bits; 391 }; 392 393 union tcon_ceu_ctl_reg_t { 394 u32 dwval; 395 struct { 396 u32 res0:31; 397 u32 ceu_en:1; 398 } bits; 399 }; 400 401 union tcon_ceu_coef_mul_reg_t { 402 u32 dwval; 403 struct { 404 u32 value:13; 405 u32 res0:19; 406 } bits; 407 }; 408 409 union tcon_ceu_coef_add_reg_t { 410 u32 dwval; 411 struct { 412 u32 value:19; 413 u32 res0:13; 414 } bits; 415 }; 416 417 union tcon_ceu_coef_rang_reg_t { 418 u32 dwval; 419 struct { 420 u32 max:8; 421 u32 res0:8; 422 u32 min:8; 423 u32 res1:8; 424 } bits; 425 }; 426 427 union tcon0_cpu_tri0_reg_t { 428 u32 dwval; 429 struct { 430 u32 block_size:12; 431 u32 res0:4; 432 u32 block_space:12; 433 u32 res1:4; 434 } bits; 435 }; 436 437 union tcon0_cpu_tri1_reg_t { 438 u32 dwval; 439 struct { 440 u32 block_num:16; 441 u32 block_current_num:16; 442 } bits; 443 }; 444 445 union tcon0_cpu_tri2_reg_t { 446 u32 dwval; 447 struct { 448 u32 trans_start_set:13; 449 u32 sync_mode:2; 450 u32 trans_start_mode:1; 451 u32 start_delay:16; 452 } bits; 453 }; 454 455 union tcon0_cpu_tri3_reg_t { 456 u32 dwval; 457 struct { 458 u32 counter_m:8; 459 u32 counter_n:16; 460 u32 res0:4; 461 u32 tri_int_mode:2; 462 u32 res1:2; 463 } bits; 464 }; 465 466 union tcon0_cpu_tri4_reg_t { 467 u32 dwval; 468 struct { 469 u32 data:24; 470 u32 a1:1; 471 u32 res0:3; 472 u32 en:1; 473 u32 res1:3; 474 } bits; 475 }; 476 477 union tcon0_cpu_tri5_reg_t { 478 u32 dwval; 479 struct { 480 u32 data:24; 481 u32 a1:1; 482 u32 res0:7; 483 } bits; 484 }; 485 486 union tcon_cmap_ctl_reg_t { 487 u32 dwval; 488 struct { 489 u32 out_format:1; 490 u32 res0:30; 491 u32 cmap_en:1; 492 } bits; 493 }; 494 495 union tcon_cmap_odd0_reg_t { 496 u32 dwval; 497 struct { 498 u32 out0:16; 499 u32 out1:16; 500 } bits; 501 }; 502 503 union tcon_cmap_odd1_reg_t { 504 u32 dwval; 505 struct { 506 u32 out2:16; 507 u32 out3:16; 508 } bits; 509 }; 510 511 union tcon_cmap_even0_reg_t { 512 u32 dwval; 513 struct { 514 u32 out0:16; 515 u32 out1:16; 516 } bits; 517 }; 518 519 union tcon_cmap_even1_reg_t { 520 u32 dwval; 521 struct { 522 u32 out2:16; 523 u32 out3:16; 524 } bits; 525 }; 526 527 union tcon_safe_period_reg_t { 528 u32 dwval; 529 struct { 530 u32 safe_period_mode:2; 531 u32 res0:14; 532 u32 safe_period_fifo_num:13; 533 u32 res1:3; 534 } bits; 535 }; 536 537 union tcon_mux_ctl_reg_t { 538 u32 dwval; 539 struct { 540 u32 dsi_src:2; 541 u32 res0:6; 542 u32 hdmi_src:2; 543 u32 res1:22; 544 } bits; 545 }; 546 547 union tcon_sync_ctl_reg_t { 548 u32 dwval; 549 struct { 550 u32 ctrl_sync_mode:1; 551 u32 res0:3; 552 u32 master_slave:1; 553 u32 res1:3; 554 u32 dsi_num:1; 555 u32 res2:23; 556 } bits; 557 }; 558 559 union tcon_sync_pos_reg_t { 560 u32 dwval; 561 struct { 562 u32 sync_line_num:12; 563 u32 res0:4; 564 u32 sync_pixel_num:12; 565 u32 res1:4; 566 } bits; 567 }; 568 569 union tcon_slave_stop_reg_t { 570 u32 dwval; 571 struct { 572 u32 stop_val:8; 573 u32 res0:24; 574 } bits; 575 }; 576 577 union tcon_fsync_gen_ctrl_reg_t { 578 u32 dwval; 579 struct { 580 u32 fsync_gen_en:1; 581 u32 sel_vsync_en:1; 582 u32 hsync_pol_sel:1; 583 u32 res0:1; 584 u32 sensor_dis_value:1; 585 u32 sensor_act0_value:1; 586 u32 sensor_act1_value:1; 587 u32 res1:1; 588 u32 sensor_dis_time:11; 589 u32 res2:13; 590 } bits; 591 }; 592 593 union tcon_fsync_gen_dly_reg_t { 594 u32 dwval; 595 struct { 596 u32 sensor_act1_time:12; 597 u32 res0:4; 598 u32 sensor_act0_time:12; 599 u32 res1:4; 600 } bits; 601 }; 602 603 union tcon0_lvds_ana_reg_t { 604 u32 dwval; 605 struct { 606 u32 pwsmb:1; 607 u32 pwslv:1; 608 u32 res0:2; 609 u32 pd:2; 610 u32 res1:2; 611 u32 v:2; 612 u32 res2:2; 613 u32 den:4; 614 u32 denc:1; 615 u32 c:2; 616 u32 res3:1; 617 u32 en_drvd:4; 618 u32 en_drvc:1; 619 u32 res4:3; 620 u32 en_24m:1; 621 u32 en_lvds:1; 622 u32 en_ldo:1; 623 u32 en_mb:1; 624 } bits; 625 }; 626 627 union tcon1_fill_ctl_reg_t { 628 u32 dwval; 629 struct { 630 u32 res0:31; 631 u32 tcon1_fill_en:1; 632 } bits; 633 }; 634 635 union tcon1_fill_begin_reg_t { 636 u32 dwval; 637 struct { 638 u32 fill_begin:24; 639 u32 res0:8; 640 } bits; 641 }; 642 643 union tcon1_fill_end_reg_t { 644 u32 dwval; 645 struct { 646 u32 fill_end:24; 647 u32 res0:8; 648 } bits; 649 }; 650 651 union tcon1_fill_data_reg_t { 652 u32 dwval; 653 struct { 654 u32 fill_value:24; 655 u32 res0:8; 656 } bits; 657 }; 658 659 union tcon_gamma_tlb_reg_t { 660 u32 dwval; 661 struct { 662 u32 pixel:24; 663 u32 res0:8; 664 } bits; 665 struct { 666 u32 blue:8; 667 u32 green:8; 668 u32 red:8; 669 u32 res0:8; 670 } bytes; 671 }; 672 673 union tcon_reservd_reg_t { 674 u32 dwval; 675 struct { 676 u32 res0; 677 } bits; 678 }; 679 680 #if defined(HAVE_DEVICE_COMMON_MODULE) 681 /* 682 * tcon_tv_setup_reg_t - tcon config for tv output 683 * @tv0_clk_src: 0:clk from ccu,1:clk from tve0 684 * @tv1_clk_src: 0:clk from ccu,1:clk from tve1 685 * @tv0_out: 0:lcd0 to gpiod,1:tv0 to gpiod 686 * @tv1_out: 0:lcd1 to gpioh,1:tv1 to gpioh 687 */ 688 union tcon_tv_setup_reg_t { 689 u32 dwval; 690 struct { 691 u32 tv0_clk_src:1; 692 u32 res3:3; 693 u32 tv1_clk_src:1; 694 u32 res2:3; 695 u32 tv0_out:1; 696 u32 res1:3; 697 u32 tv1_out:1; 698 u32 res4:2; 699 u32 rgb0_src_sel:1; 700 u32 res0:16; 701 } bits; 702 }; 703 704 union tcon_de_perh_reg_t { 705 u32 dwval; 706 struct { 707 u32 de_port0_perh:2; 708 u32 res1:2; 709 u32 de_port1_perh:2; 710 u32 res0:26; 711 } bits; 712 }; 713 714 union tcon_clk_gate_reg_t { 715 u32 dwval; 716 struct { 717 u32 vdpo0_clk_gate:1; 718 u32 vdpo1_clk_gate:1; 719 u32 res4:14; 720 u32 dsi_clk_gate:1; 721 u32 lcd1_dsi_clk_gate:1; 722 u32 res3:2; 723 u32 tv0_clk_gate:1; 724 u32 res2:3; 725 u32 tv1_clk_gate:1; 726 u32 res1:3; 727 u32 hdmi_src:2; 728 u32 res0:2; 729 } bits; 730 }; 731 732 union dsi_src_select_reg_t { 733 u32 dwval; 734 struct { 735 u32 dsi0_src_sel:1; 736 u32 res0:3; 737 u32 dsi1_src_sel:1; 738 u32 res1:27; 739 } bits; 740 }; 741 742 union vdpo_src_select_reg_t { 743 u32 dwval; 744 struct { 745 u32 vdpo0_src_sel:1; 746 u32 res0:3; 747 u32 vdpo1_src_sel:1; 748 u32 res1:27; 749 } bits; 750 }; 751 752 struct __de_lcd_top_dev_t { 753 /* 0x00 - 0x0c */ 754 union tcon_tv_setup_reg_t tcon_tv_setup; 755 union dsi_src_select_reg_t dsi_src_select; 756 union vdpo_src_select_reg_t vdpo_src_select; 757 union tcon_reservd_reg_t tcon_reg_000c; 758 /* 0x10 - 0x1c */ 759 union tcon_reservd_reg_t tcon_reg_0010; 760 union tcon_reservd_reg_t tcon_reg_0014; 761 union tcon_reservd_reg_t tcon_reg_0018; 762 union tcon_de_perh_reg_t tcon_de_perh; 763 /* 0x20 - 0x2c */ 764 union tcon_clk_gate_reg_t tcon_clk_gate; 765 }; 766 /* edit by lrx---end */ 767 #endif 768 769 enum cpu_mode { 770 MODE_18BIT = 0, 771 MODE0_16BIT = 2, 772 MODE1_16BIT = 4, 773 MODE2_16BIT = 6, 774 MODE3_16BIT = 8, 775 MODE_9BIT = 10, 776 MODE_8BIT_256K = 12, 777 MODE_8BIT_65K = 14, 778 MODE_DSI = 1, 779 }; 780 781 struct __de_lcd_dev_t { 782 /* 0x00 - 0x0c */ 783 union tcon_gctl_reg_t tcon_gctl; 784 union tcon_gint0_reg_t tcon_gint0; 785 union tcon_gint1_reg_t tcon_gint1; 786 union tcon_reservd_reg_t tcon_reg01c; 787 /* 0x10 - 0x1c */ 788 union tcon0_frm_ctl_reg_t tcon0_frm_ctl; 789 union tcon0_frm_seed_reg_t tcon0_frm_seed_pr; 790 union tcon0_frm_seed_reg_t tcon0_frm_seed_pg; 791 union tcon0_frm_seed_reg_t tcon0_frm_seed_pb; 792 /* 0x20 - 0x2c */ 793 union tcon0_frm_seed_reg_t tcon0_frm_seed_lr; 794 union tcon0_frm_seed_reg_t tcon0_frm_seed_lg; 795 union tcon0_frm_seed_reg_t tcon0_frm_seed_lb; 796 union tcon0_frm_tab_reg_t tcon0_frm_tbl_0; 797 /* 0x30 - 0x3c */ 798 union tcon0_frm_tab_reg_t tcon0_frm_tbl_1; 799 union tcon0_frm_tab_reg_t tcon0_frm_tbl_2; 800 union tcon0_frm_tab_reg_t tcon0_frm_tbl_3; 801 union tcon0_3d_fifo_reg_t tcon0_3d_fifo; 802 /* 0x40 - 0x4c */ 803 union tcon0_ctl_reg_t tcon0_ctl; 804 union tcon0_dclk_reg_t tcon0_dclk; 805 union tcon0_basic0_reg_t tcon0_basic0; 806 union tcon0_basic1_reg_t tcon0_basic1; 807 /* 0x50 - 0x5c */ 808 union tcon0_basic2_reg_t tcon0_basic2; 809 union tcon0_basic3_reg_t tcon0_basic3; 810 union tcon0_hv_if_reg_t tcon0_hv_ctl; 811 union tcon_reservd_reg_t tcon_reg05c; 812 /* 0x60 - 0x6c */ 813 union tcon0_cpu_if_reg_t tcon0_cpu_ctl; 814 union tcon0_cpu_wr_reg_t tcon0_cpu_wr; 815 union tcon0_cpu_rd0_reg_t tcon0_cpu_rd; 816 union tcon0_cpu_rd1_reg_t tcon0_cpu_fet; 817 /* 0x70 - 0x7c */ 818 union tcon_reservd_reg_t tcon_reg070[4]; 819 /* 0x80 - 0x8c */ 820 union tcon_reservd_reg_t tcon_reg080; 821 union tcon0_lvds_if_reg_t tcon0_lvds_ctl; 822 union tcon0_io_pol_reg_t tcon0_io_pol; 823 union tcon0_io_tri_reg_t tcon0_io_tri; 824 /* 0x90 - 0x9c */ 825 union tcon1_ctl_reg_t tcon1_ctl; 826 union tcon1_basic0_reg_t tcon1_basic0; 827 union tcon1_basic1_reg_t tcon1_basic1; 828 union tcon1_basic2_reg_t tcon1_basic2; 829 /* 0xa0 - 0xac */ 830 union tcon1_basic3_reg_t tcon1_basic3; 831 union tcon1_basic4_reg_t tcon1_basic4; 832 union tcon1_basic5_reg_t tcon1_basic5; 833 union tcon_reservd_reg_t tcon_reg0ac; 834 /* 0xb0 - 0xec */ 835 union tcon1_ps_sync_reg_t tcon1_ps_ctl; 836 union tcon_reservd_reg_t tcon_reg0b4[15]; 837 /* 0xf0 - 0xfc */ 838 union tcon1_io_pol_reg_t tcon1_io_pol; 839 union tcon1_io_tri_reg_t tcon1_io_tri; 840 union tcon_ecc_fifo_reg_t tcon_ecfifo_ctl; 841 union tcon_debug_reg_t tcon_debug; 842 /* 0x100 - 0x10c */ 843 union tcon_ceu_ctl_reg_t tcon_ceu_ctl; 844 union tcon_reservd_reg_t tcon_reg104[3]; 845 /* 0x110 - 0x11c */ 846 union tcon_ceu_coef_mul_reg_t tcon_ceu_coef_rr; 847 union tcon_ceu_coef_mul_reg_t tcon_ceu_coef_rg; 848 union tcon_ceu_coef_mul_reg_t tcon_ceu_coef_rb; 849 union tcon_ceu_coef_add_reg_t tcon_ceu_coef_rc; 850 /* 0x120 - 0x12c */ 851 union tcon_ceu_coef_mul_reg_t tcon_ceu_coef_gr; 852 union tcon_ceu_coef_mul_reg_t tcon_ceu_coef_gg; 853 union tcon_ceu_coef_mul_reg_t tcon_ceu_coef_gb; 854 union tcon_ceu_coef_add_reg_t tcon_ceu_coef_gc; 855 /* 0x130 - 0x13c */ 856 union tcon_ceu_coef_mul_reg_t tcon_ceu_coef_br; 857 union tcon_ceu_coef_mul_reg_t tcon_ceu_coef_bg; 858 union tcon_ceu_coef_mul_reg_t tcon_ceu_coef_bb; 859 union tcon_ceu_coef_add_reg_t tcon_ceu_coef_bc; 860 /* 0x140 - 0x14c */ 861 union tcon_ceu_coef_rang_reg_t tcon_ceu_coef_rv; 862 union tcon_ceu_coef_rang_reg_t tcon_ceu_coef_gv; 863 union tcon_ceu_coef_rang_reg_t tcon_ceu_coef_bv; 864 union tcon_reservd_reg_t tcon_reg14c; 865 /* 0x150 - 0x15c */ 866 union tcon_reservd_reg_t tcon_reg150[4]; 867 /* 0x160 - 0x16c */ 868 union tcon0_cpu_tri0_reg_t tcon0_cpu_tri0; 869 union tcon0_cpu_tri1_reg_t tcon0_cpu_tri1; 870 union tcon0_cpu_tri2_reg_t tcon0_cpu_tri2; 871 union tcon0_cpu_tri3_reg_t tcon0_cpu_tri3; 872 /* 0x170 - 0x17c */ 873 union tcon0_cpu_tri4_reg_t tcon0_cpu_tri4; 874 union tcon0_cpu_tri5_reg_t tcon0_cpu_tri5; 875 union tcon_reservd_reg_t tcon_reg178[2]; 876 /* 0x180 - 0x18c */ 877 union tcon_cmap_ctl_reg_t tcon_cmap_ctl; 878 union tcon_reservd_reg_t tcon_reg184[3]; 879 /* 0x190 - 0x19c */ 880 union tcon_cmap_odd0_reg_t tcon_cmap_odd0; 881 union tcon_cmap_odd1_reg_t tcon_cmap_odd1; 882 union tcon_cmap_even0_reg_t tcon_cmap_even0; 883 union tcon_cmap_even1_reg_t tcon_cmap_even1; 884 /* 0x1a0 - 0x1ec */ 885 union tcon_reservd_reg_t tcon_reg1a0[20]; 886 /* 0x1f0 - 0x1fc */ 887 union tcon_safe_period_reg_t tcon_volume_ctl; 888 union tcon_reservd_reg_t tcon_reg1f4[3]; 889 /* 0x200 - 0x21c */ 890 union tcon_mux_ctl_reg_t tcon_mul_ctl; 891 union tcon_reservd_reg_t tcon_reg204[7]; 892 /* 0x220 - 0x22c */ 893 union tcon0_lvds_ana_reg_t tcon0_lvds_ana[2]; 894 union tcon_reservd_reg_t tcon_reg228[2]; 895 /* 0x230 - 0x2fc */ 896 union tcon_sync_ctl_reg_t tcon_sync_ctl; 897 union tcon_sync_pos_reg_t tcon_sync_pos; 898 union tcon_slave_stop_reg_t tcon_slave_stop; 899 #if defined(CONFIG_ARCH_SUN20IW1) 900 union tcon0_lvds_ana_reg_t tcon0_lvds1_ana[2]; 901 union tcon0_lvds_if_reg_t tcon0_lvds1_ctl; 902 union tcon_reservd_reg_t tcon_reg248[46]; 903 #else 904 union tcon_fsync_gen_ctrl_reg_t fsync_gen_ctrl; 905 union tcon_fsync_gen_dly_reg_t fsync_gen_dly; 906 union tcon_reservd_reg_t tcon_reg244[47]; 907 #endif 908 /* 0x300 - 0x30c */ 909 union tcon1_fill_ctl_reg_t tcon_fill_ctl; 910 union tcon1_fill_begin_reg_t tcon_fill_start0; 911 union tcon1_fill_end_reg_t tcon_fill_end0; 912 union tcon1_fill_data_reg_t tcon_fill_data0; 913 /* 0x310 - 0x31c */ 914 union tcon1_fill_begin_reg_t tcon_fill_start1; 915 union tcon1_fill_end_reg_t tcon_fill_end1; 916 union tcon1_fill_data_reg_t tcon_fill_data1; 917 union tcon1_fill_begin_reg_t tcon_fill_start2; 918 /* 0x320 - 0x32c */ 919 union tcon1_fill_end_reg_t tcon_fill_end2; 920 union tcon1_fill_data_reg_t tcon_fill_data2; 921 union tcon_reservd_reg_t tcon_reg328[2]; 922 /* 0x330 - 0x3fc */ 923 union tcon_reservd_reg_t tcon_reg330[52]; 924 /* 0x400 - 0x40c */ 925 union tcon_gamma_tlb_reg_t tcon_gamma_tlb[256]; 926 }; 927 928 s32 tcon_cmap(u32 sel, u32 mode, u32 lcd_cmap_tbl[2][3][4]); 929 s32 tcon_gamma(u32 sel, u32 mode, u32 gamma_tbl[256]); 930 s32 tcon_ceu(u32 sel, u32 mode, s32 b, s32 c, s32 s, s32 h); 931 s32 tcon0_frm(u32 sel, u32 mode); 932 933 #endif 934