Rev 4560 | Rev 5354 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4560 | Rev 5060 | ||
---|---|---|---|
Line 102... | Line 102... | ||
102 | #define BDB_LVDS_OPTIONS 40 |
102 | #define BDB_LVDS_OPTIONS 40 |
103 | #define BDB_LVDS_LFP_DATA_PTRS 41 |
103 | #define BDB_LVDS_LFP_DATA_PTRS 41 |
104 | #define BDB_LVDS_LFP_DATA 42 |
104 | #define BDB_LVDS_LFP_DATA 42 |
105 | #define BDB_LVDS_BACKLIGHT 43 |
105 | #define BDB_LVDS_BACKLIGHT 43 |
106 | #define BDB_LVDS_POWER 44 |
106 | #define BDB_LVDS_POWER 44 |
107 | #define BDB_MIPI 50 |
107 | #define BDB_MIPI_CONFIG 52 |
- | 108 | #define BDB_MIPI_SEQUENCE 53 |
|
108 | #define BDB_SKIP 254 /* VBIOS private block, ignore */ |
109 | #define BDB_SKIP 254 /* VBIOS private block, ignore */ |
Line 109... | Line 110... | ||
109 | 110 | ||
110 | struct bdb_general_features { |
111 | struct bdb_general_features { |
111 | /* bits 1 */ |
112 | /* bits 1 */ |
Line 279... | Line 280... | ||
279 | * sizeof(child_device_config); |
280 | * sizeof(child_device_config); |
280 | */ |
281 | */ |
281 | union child_device_config devices[0]; |
282 | union child_device_config devices[0]; |
282 | } __packed; |
283 | } __packed; |
Line -... | Line 284... | ||
- | 284 | ||
- | 285 | /* Mask for DRRS / Panel Channel / SSC / BLT control bits extraction */ |
|
- | 286 | #define MODE_MASK 0x3 |
|
283 | 287 | ||
284 | struct bdb_lvds_options { |
288 | struct bdb_lvds_options { |
285 | u8 panel_type; |
289 | u8 panel_type; |
286 | u8 rsvd1; |
290 | u8 rsvd1; |
287 | /* LVDS capabilities, stored in a dword */ |
291 | /* LVDS capabilities, stored in a dword */ |
Line 291... | Line 295... | ||
291 | u8 pfit_ratio_auto:1; |
295 | u8 pfit_ratio_auto:1; |
292 | u8 pixel_dither:1; |
296 | u8 pixel_dither:1; |
293 | u8 lvds_edid:1; |
297 | u8 lvds_edid:1; |
294 | u8 rsvd2:1; |
298 | u8 rsvd2:1; |
295 | u8 rsvd4; |
299 | u8 rsvd4; |
- | 300 | /* LVDS Panel channel bits stored here */ |
|
- | 301 | u32 lvds_panel_channel_bits; |
|
- | 302 | /* LVDS SSC (Spread Spectrum Clock) bits stored here. */ |
|
- | 303 | u16 ssc_bits; |
|
- | 304 | u16 ssc_freq; |
|
- | 305 | u16 ssc_ddt; |
|
- | 306 | /* Panel color depth defined here */ |
|
- | 307 | u16 panel_color_depth; |
|
- | 308 | /* LVDS panel type bits stored here */ |
|
- | 309 | u32 dps_panel_type_bits; |
|
- | 310 | /* LVDS backlight control type bits stored here */ |
|
- | 311 | u32 blt_control_type_bits; |
|
296 | } __packed; |
312 | } __packed; |
Line 297... | Line 313... | ||
297 | 313 | ||
298 | /* LFP pointer table contains entries to the struct below */ |
314 | /* LFP pointer table contains entries to the struct below */ |
299 | struct bdb_lvds_lfp_data_ptr { |
315 | struct bdb_lvds_lfp_data_ptr { |
Line 371... | Line 387... | ||
371 | 387 | ||
372 | struct bdb_lvds_lfp_data { |
388 | struct bdb_lvds_lfp_data { |
373 | struct bdb_lvds_lfp_data_entry data[16]; |
389 | struct bdb_lvds_lfp_data_entry data[16]; |
Line -... | Line 390... | ||
- | 390 | } __packed; |
|
- | 391 | ||
- | 392 | #define BDB_BACKLIGHT_TYPE_NONE 0 |
|
374 | } __packed; |
393 | #define BDB_BACKLIGHT_TYPE_PWM 2 |
375 | 394 | ||
376 | struct bdb_lfp_backlight_data_entry { |
395 | struct bdb_lfp_backlight_data_entry { |
377 | u8 type:2; |
396 | u8 type:2; |
378 | u8 active_low_pwm:1; |
397 | u8 active_low_pwm:1; |
Line 476... | Line 495... | ||
476 | u16 legacy_crt_max_y; |
495 | u16 legacy_crt_max_y; |
477 | u8 legacy_crt_max_refresh; |
496 | u8 legacy_crt_max_refresh; |
Line 478... | Line 497... | ||
478 | 497 | ||
479 | u8 hdmi_termination; |
498 | u8 hdmi_termination; |
- | 499 | u8 custom_vbt_version; |
|
- | 500 | /* Driver features data block */ |
|
- | 501 | u16 rmpm_enabled:1; |
|
- | 502 | u16 s2ddt_enabled:1; |
|
- | 503 | u16 dpst_enabled:1; |
|
- | 504 | u16 bltclt_enabled:1; |
|
- | 505 | u16 adb_enabled:1; |
|
- | 506 | u16 drrs_enabled:1; |
|
- | 507 | u16 grs_enabled:1; |
|
- | 508 | u16 gpmt_enabled:1; |
|
- | 509 | u16 tbt_enabled:1; |
|
- | 510 | u16 psr_enabled:1; |
|
- | 511 | u16 ips_enabled:1; |
|
- | 512 | u16 reserved3:4; |
|
480 | u8 custom_vbt_version; |
513 | u16 pc_feature_valid:1; |
Line 481... | Line 514... | ||
481 | } __packed; |
514 | } __packed; |
482 | 515 | ||
483 | #define EDP_18BPP 0 |
516 | #define EDP_18BPP 0 |
Line 708... | Line 741... | ||
708 | #define DVO_PORT_CRT 6 |
741 | #define DVO_PORT_CRT 6 |
709 | #define DVO_PORT_DPB 7 |
742 | #define DVO_PORT_DPB 7 |
710 | #define DVO_PORT_DPC 8 |
743 | #define DVO_PORT_DPC 8 |
711 | #define DVO_PORT_DPD 9 |
744 | #define DVO_PORT_DPD 9 |
712 | #define DVO_PORT_DPA 10 |
745 | #define DVO_PORT_DPA 10 |
- | 746 | #define DVO_PORT_MIPIA 21 |
|
- | 747 | #define DVO_PORT_MIPIB 22 |
|
- | 748 | #define DVO_PORT_MIPIC 23 |
|
- | 749 | #define DVO_PORT_MIPID 24 |
|
- | 750 | ||
- | 751 | /* Block 52 contains MIPI Panel info |
|
- | 752 | * 6 such enteries will there. Index into correct |
|
- | 753 | * entery is based on the panel_index in #40 LFP |
|
- | 754 | */ |
|
- | 755 | #define MAX_MIPI_CONFIGURATIONS 6 |
|
- | 756 | ||
- | 757 | #define MIPI_DSI_UNDEFINED_PANEL_ID 0 |
|
- | 758 | #define MIPI_DSI_GENERIC_PANEL_ID 1 |
|
Line 713... | Line -... | ||
713 | - | ||
714 | /* MIPI DSI panel info */ |
759 | |
715 | struct bdb_mipi { |
760 | struct mipi_config { |
716 | u16 panel_id; |
- | |
Line 717... | Line 761... | ||
717 | u16 bridge_revision; |
761 | u16 panel_id; |
718 | 762 | ||
719 | /* General params */ |
- | |
720 | u32 dithering:1; |
763 | /* General Params */ |
721 | u32 bpp_pixel_format:1; |
764 | u32 enable_dithering:1; |
722 | u32 rsvd1:1; |
- | |
Line 723... | Line -... | ||
723 | u32 dphy_valid:1; |
- | |
724 | u32 resvd2:28; |
- | |
725 | - | ||
726 | u16 port_info; |
- | |
727 | u16 rsvd3:2; |
- | |
728 | u16 num_lanes:2; |
- | |
729 | u16 rsvd4:12; |
765 | u32 rsvd1:1; |
730 | - | ||
731 | /* DSI config */ |
766 | u32 is_bridge:1; |
Line -... | Line 767... | ||
- | 767 | ||
- | 768 | u32 panel_arch_type:2; |
|
- | 769 | u32 is_cmd_mode:1; |
|
- | 770 | ||
- | 771 | #define NON_BURST_SYNC_PULSE 0x1 |
|
- | 772 | #define NON_BURST_SYNC_EVENTS 0x2 |
|
- | 773 | #define BURST_MODE 0x3 |
|
- | 774 | u32 video_transfer_mode:2; |
|
- | 775 | ||
- | 776 | u32 cabc_supported:1; |
|
- | 777 | u32 pwm_blc:1; |
|
- | 778 | ||
- | 779 | /* Bit 13:10 */ |
|
- | 780 | #define PIXEL_FORMAT_RGB565 0x1 |
|
- | 781 | #define PIXEL_FORMAT_RGB666 0x2 |
|
- | 782 | #define PIXEL_FORMAT_RGB666_LOOSELY_PACKED 0x3 |
|
- | 783 | #define PIXEL_FORMAT_RGB888 0x4 |
|
- | 784 | u32 videomode_color_format:4; |
|
- | 785 | ||
- | 786 | /* Bit 15:14 */ |
|
- | 787 | #define ENABLE_ROTATION_0 0x0 |
|
- | 788 | #define ENABLE_ROTATION_90 0x1 |
|
- | 789 | #define ENABLE_ROTATION_180 0x2 |
|
- | 790 | #define ENABLE_ROTATION_270 0x3 |
|
- | 791 | u32 rotation:2; |
|
- | 792 | u32 bta_enabled:1; |
|
- | 793 | u32 rsvd2:15; |
|
- | 794 | ||
- | 795 | /* 2 byte Port Description */ |
|
- | 796 | #define DUAL_LINK_NOT_SUPPORTED 0 |
|
- | 797 | #define DUAL_LINK_FRONT_BACK 1 |
|
- | 798 | #define DUAL_LINK_PIXEL_ALT 2 |
|
- | 799 | u16 dual_link:2; |
|
- | 800 | u16 lane_cnt:2; |
|
- | 801 | u16 rsvd3:12; |
|
732 | u16 virt_ch_num:2; |
802 | |
733 | u16 vtm:2; |
803 | u16 rsvd4; |
734 | u16 rsvd5:12; |
- | |
Line -... | Line 804... | ||
- | 804 | ||
- | 805 | u8 rsvd5[5]; |
|
- | 806 | u32 dsi_ddr_clk; |
|
- | 807 | u32 bridge_ref_clk; |
|
- | 808 | ||
- | 809 | #define BYTE_CLK_SEL_20MHZ 0 |
|
- | 810 | #define BYTE_CLK_SEL_10MHZ 1 |
|
- | 811 | #define BYTE_CLK_SEL_5MHZ 2 |
|
- | 812 | u8 byte_clk_sel:2; |
|
- | 813 | ||
- | 814 | u8 rsvd6:6; |
|
- | 815 | ||
- | 816 | /* DPHY Flags */ |
|
- | 817 | u16 dphy_param_valid:1; |
|
- | 818 | u16 eot_pkt_disabled:1; |
|
- | 819 | u16 enable_clk_stop:1; |
|
- | 820 | u16 rsvd7:13; |
|
- | 821 | ||
- | 822 | u32 hs_tx_timeout; |
|
- | 823 | u32 lp_rx_timeout; |
|
- | 824 | u32 turn_around_timeout; |
|
735 | 825 | u32 device_reset_timer; |
|
736 | u32 dsi_clock; |
826 | u32 master_init_timer; |
737 | u32 bridge_ref_clk; |
827 | u32 dbi_bw_timer; |
738 | u16 rsvd_pwr; |
828 | u32 lp_byte_clk_val; |
739 | 829 | ||
740 | /* Dphy Params */ |
830 | /* 4 byte Dphy Params */ |
741 | u32 prepare_cnt:5; |
831 | u32 prepare_cnt:6; |
742 | u32 rsvd6:3; |
832 | u32 rsvd8:2; |
Line 743... | Line -... | ||
743 | u32 clk_zero_cnt:8; |
- | |
744 | u32 trail_cnt:5; |
- | |
745 | u32 rsvd7:3; |
833 | u32 clk_zero_cnt:8; |
- | 834 | u32 trail_cnt:5; |
|
- | 835 | u32 rsvd9:3; |
|
- | 836 | u32 exit_zero_cnt:6; |
|
- | 837 | u32 rsvd10:2; |
|
- | 838 | ||
- | 839 | u32 clk_lane_switch_cnt; |
|
- | 840 | u32 hl_switch_cnt; |
|
- | 841 | ||
- | 842 | u32 rsvd11[6]; |
|
- | 843 | ||
- | 844 | /* timings based on dphy spec */ |
|
- | 845 | u8 tclk_miss; |
|
- | 846 | u8 tclk_post; |
|
- | 847 | u8 rsvd12; |
|
- | 848 | u8 tclk_pre; |
|
- | 849 | u8 tclk_prepare; |
|
- | 850 | u8 tclk_settle; |
|
- | 851 | u8 tclk_term_enable; |
|
- | 852 | u8 tclk_trail; |
|
- | 853 | u16 tclk_prepare_clkzero; |
|
- | 854 | u8 rsvd13; |
|
- | 855 | u8 td_term_enable; |
|
- | 856 | u8 teot; |
|
- | 857 | u8 ths_exit; |
|
- | 858 | u8 ths_prepare; |
|
- | 859 | u16 ths_prepare_hszero; |
|
- | 860 | u8 rsvd14; |
|
- | 861 | u8 ths_settle; |
|
- | 862 | u8 ths_skip; |
|
- | 863 | u8 ths_trail; |
|
- | 864 | u8 tinit; |
|
- | 865 | u8 tlpx; |
|
- | 866 | u8 rsvd15[3]; |
|
- | 867 | ||
- | 868 | /* GPIOs */ |
|
- | 869 | u8 panel_enable; |
|
746 | u32 exit_zero_cnt:6; |
870 | u8 bl_enable; |
Line -... | Line 871... | ||
- | 871 | u8 pwm_enable; |
|
- | 872 | u8 reset_r_n; |
|
- | 873 | u8 pwr_down_r; |
|
- | 874 | u8 stdby_r_n; |
|
- | 875 | ||
- | 876 | } __packed; |
|
- | 877 | ||
- | 878 | /* Block 52 contains MIPI configuration block |
|
- | 879 | * 6 * bdb_mipi_config, followed by 6 pps data |
|
- | 880 | * block below |
|
- | 881 | * |
|
- | 882 | * all delays has a unit of 100us |
|
- | 883 | */ |
|
- | 884 | struct mipi_pps_data { |
|
- | 885 | u16 panel_on_delay; |
|
- | 886 | u16 bl_enable_delay; |
|
- | 887 | u16 bl_disable_delay; |
|
- | 888 | u16 panel_off_delay; |
|
- | 889 | u16 panel_power_cycle_delay; |
|
- | 890 | }; |
|
- | 891 | ||
- | 892 | struct bdb_mipi_config { |
|
- | 893 | struct mipi_config config[MAX_MIPI_CONFIGURATIONS]; |
|
- | 894 | struct mipi_pps_data pps[MAX_MIPI_CONFIGURATIONS]; |
|
- | 895 | }; |
|
- | 896 | ||
- | 897 | /* Block 53 contains MIPI sequences as needed by the panel |
|
- | 898 | * for enabling it. This block can be variable in size and |
|
- | 899 | * can be maximum of 6 blocks |
|
- | 900 | */ |
|
- | 901 | struct bdb_mipi_sequence { |
|
- | 902 | u8 version; |
|
- | 903 | u8 data[0]; |
|
- | 904 | }; |
|
- | 905 | ||
- | 906 | /* MIPI Sequnece Block definitions */ |
|
- | 907 | enum mipi_seq { |
|
- | 908 | MIPI_SEQ_UNDEFINED = 0, |
|
- | 909 | MIPI_SEQ_ASSERT_RESET, |
|
- | 910 | MIPI_SEQ_INIT_OTP, |
|
- | 911 | MIPI_SEQ_DISPLAY_ON, |
|
- | 912 | MIPI_SEQ_DISPLAY_OFF, |
|
- | 913 | MIPI_SEQ_DEASSERT_RESET, |
|
- | 914 | MIPI_SEQ_MAX |
|
- | 915 | }; |
|
- | 916 | ||
- | 917 | enum mipi_seq_element { |
|
- | 918 | MIPI_SEQ_ELEM_UNDEFINED = 0, |
|
- | 919 | MIPI_SEQ_ELEM_SEND_PKT, |
|
- | 920 | MIPI_SEQ_ELEM_DELAY, |
|
- | 921 | MIPI_SEQ_ELEM_GPIO, |
|
- | 922 | MIPI_SEQ_ELEM_STATUS, |
|
- | 923 | MIPI_SEQ_ELEM_MAX |
|
- | 924 | }; |
|
- | 925 | ||
- | 926 | enum mipi_gpio_pin_index { |
|
- | 927 | MIPI_GPIO_UNDEFINED = 0, |
|
- | 928 | MIPI_GPIO_PANEL_ENABLE, |
|
- | 929 | MIPI_GPIO_BL_ENABLE, |
|
747 | u32 rsvd8:2; |
930 | MIPI_GPIO_PWM_ENABLE, |