| 1 |
|
| 2 |
|
| 3 |
#ifndef _I2C_PTN3460_H_ |
| 4 |
#define _I2C_PTN3460_H_ |
| 5 |
|
| 6 |
#include <types.h> |
| 7 |
|
| 8 |
#define PTN_EDID_OFF 0x00 |
| 9 |
#define PTN_EDID_LEN 0x80 |
| 10 |
#define PTN_CONFIG_OFF 0x80 |
| 11 |
#define PTN_CONFIG_LEN 0x19 |
| 12 |
#define PTN_FLASH_CFG_OFF 0xE8 |
| 13 |
#define PTN_FLASH_CFG_LEN 0x04 |
| 14 |
#define PTN_MAX_EDID_NUM 6 |
| 15 |
#define PTN_ENABLE_EMULATION (1 << 0) |
| 16 |
|
| 17 |
|
| 18 |
#define PTN_SUCCESS 0x00000000 |
| 19 |
#define PTN_BUS_ERROR 0x10000000 |
| 20 |
#define PTN_INVALID_EDID 0x20000000 |
| 21 |
#define PTN_INVALID_EDID_BLOCK 0x30000000 |
| 22 |
#define PTN_ERROR 0x40000000 |
| 23 |
|
| 24 |
struct ptn_3460_config { |
| 25 |
u8 dp_interface_ctrl; |
| 26 |
u8 lvds_interface_ctrl1; |
| 27 |
u8 lvds_interface_ctrl2; |
| 28 |
u8 lvds_interface_ctrl3; |
| 29 |
u8 edid_rom_emulation; |
| 30 |
u8 edid_rom_access_ctrl; |
| 31 |
u8 pwm_min[3]; |
| 32 |
u8 pwm_max[3]; |
| 33 |
u8 fast_link_ctrl; |
| 34 |
u8 pin_cfg_ctrl1; |
| 35 |
u8 pin_cfg_ctrl2; |
| 36 |
u8 pwm_default; |
| 37 |
u16 pwm_value; |
| 38 |
u8 pwm_default_freq; |
| 39 |
u8 t3_timing; |
| 40 |
u8 t12_timing; |
| 41 |
u8 backlight_ctrl; |
| 42 |
u8 t2_delay; |
| 43 |
u8 t4_timing; |
| 44 |
u8 t5_delay; |
| 45 |
} __packed; |
| 46 |
|
| 47 |
struct ptn_3460_flash { |
| 48 |
u8 cmd; |
| 49 |
u16 magic; |
| 50 |
u8 trigger; |
| 51 |
} __packed; |
| 52 |
|
| 53 |
|
| 54 |
enum cb_err mainboard_ptn3460_get_edid(uint8_t edid_data[PTN_EDID_LEN]); |
| 55 |
uint8_t mainboard_ptn3460_select_edid_table(void); |
| 56 |
enum cb_err mainboard_ptn3460_config(struct ptn_3460_config *cfg_ptr); |
| 57 |
|
| 58 |
#endif |