hc
2023-02-14 796a7ef0befd21e25c2b9e42f53a6d7a4421941d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 
/****************************RK3399 MINI58 Register Start***************************/
#define REGISTER_MCU_VERSION    0x00
 
 
typedef enum
{
    CORE_FW_VERSION = 0,                
    CORE_VID_LSB, 
    CORE_VID_MSB,
    CORE_PID_LSB, 
    CORE_PID_MSB, 
    CORE_POWER_STATE,
    CORE_FUNC_CFG0,
    CORE_FUNC_CFG1,
    CORE_FUNC_STATUS0,
    CORE_FUNC_STATUS1,
    CORE_RTC_TIME,    //0xa
    CORE_RTC_ALARM_TIME,
    CORE_WDT_COUNT,
    CORE_FW_UPDATE,
    CORE_CEC_PHY_LSB,
    CORE_CEC_PHY_MSB,
    CORE_CEC_OSD_NAME,    //0x10
    CORE_NEW_FW_VERSION,
    CORE_POWER_LEVEL,
    CORE_ANX7411_CC_ROLE,    //0x13
    CORE_ANX7411_CC_DIRECTION,    //0x14
    CORE_ANX7411_HPD_STATUS,        //0x15
    CORE_ANX7411_DP_LANES,        //0x16
    CORE_ETH_PHY_ADDR0,
    CORE_ETH_PHY_ADDR1,
    CORE_ETH_PHY_ADDR2,
    CORE_ETH_PHY_ADDR3,
    CORE_ETH_PHY_ADDR4,
    CORE_ETH_PHY_ADDR5,    
    CORE_REG_MAX
} REGIST_CMD;
 
typedef union
 {
   struct
   {
    uint8_t alarmWakeup:1;     //bit 0               
    uint8_t watchdog:1;                    
    uint8_t irdaWakeup:1;                      
    uint8_t net_wakeup:1;                       
    uint8_t hdmi_cec:1;                       
    uint8_t powerloss:2;
    uint8_t usbCharger:1;
   } bit;                                    
   uint8_t reg_function;                            
 } CORE_REG_FUNCTION;  
 
typedef union
{
  struct
  {
   uint8_t last_state:1; 
   uint8_t pwr_wk_en:1;
   uint8_t pwr_opwer_en:1;
   uint8_t reserved:5;
  } bit;                                   
  uint8_t reg_function;                            
} CORE_REG_FUNCTION1;    
 
typedef enum
{
    CORE_FUNC_ALARM = 100,                
    CORE_FUNC_WDT, 
    CORE_FUNC_IRDA,
    CORE_FUNC_NET_WK, 
    CORE_FUNC_CEC,    
    CORE_FUNC_POWER_LOSS, 
    CORE_FUNC_USB_CHARGER,
    CORE_FUNC_LAST_STATE,
    CORE_FUNC_PWR_WK_EN,
    CORE_FUNC_PWR_OFF_EN,
    CORE_FUNC_MAX
} REGIST_FUNC_FLAG;
 
 
/****************************RK3399 MINI58 Regist end***************************/
extern int jw_mcu_get_cc_status(u8 *role, u8 *direction);