Skip to content

Commit

Permalink
DwHdmiQp: Add initial support for DwHdmi I2CM
Browse files Browse the repository at this point in the history
...and dump the EDID

Signed-off-by: Molly Sophia <[email protected]>
  • Loading branch information
MollySophia committed Nov 21, 2023
1 parent e9f0d33 commit e3a793c
Show file tree
Hide file tree
Showing 6 changed files with 416 additions and 3 deletions.
32 changes: 32 additions & 0 deletions edk2-rockchip/Silicon/Rockchip/Include/Library/DwHdmiQpLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -914,11 +914,43 @@
#define PMU1CRU_SOFTRST_CON03 0xA0C
#define PMU1CRU_SOFTRST_CON04 0xA10

struct DwHdmiQpI2c {
BOOLEAN Cmp;
UINT32 Stat;
UINT32 PinMux;

UINT8 SlaveReg;
BOOLEAN IsSegment;
BOOLEAN IsRegAddr;
};

struct DwHdmiQpDevice {
UINT32 Id;
BOOLEAN ForceHpd;
struct DwHdmiQpI2c I2c;
UINT32 ScdcIntr;
UINT32 FltIntr;
UINT32 EarcIntr;

BOOLEAN FltCmp;
};

struct i2c_msg {
UINT16 addr;
UINT16 flags;
#define I2C_M_RD 0x0001 /* guaranteed to be 0x0001! */
#define I2C_M_TEN 0x0010 /* use only if I2C_FUNC_10BIT_ADDR */
#define I2C_M_DMA_SAFE 0x0200 /* use only in kernel space */
#define I2C_M_RECV_LEN 0x0400 /* use only if I2C_FUNC_SMBUS_READ_BLOCK_DATA */
#define I2C_M_NO_RD_ACK 0x0800 /* use only if I2C_FUNC_PROTOCOL_MANGLING */
#define I2C_M_IGNORE_NAK 0x1000 /* use only if I2C_FUNC_PROTOCOL_MANGLING */
#define I2C_M_REV_DIR_ADDR 0x2000 /* use only if I2C_FUNC_PROTOCOL_MANGLING */
#define I2C_M_NOSTART 0x4000 /* use only if I2C_FUNC_NOSTART */
#define I2C_M_STOP 0x8000 /* use only if I2C_FUNC_PROTOCOL_MANGLING */
UINT16 len;
UINT8 *buf;
};

/* Rockchip Htx Phy */

struct RockchipHdptxPhyHdmi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ EFI_STATUS

typedef
EFI_STATUS
(EFIAPI *ROCKCHIP_CONNECTOR_GET_EDIE) (
(EFIAPI *ROCKCHIP_CONNECTOR_GET_EDID) (
IN ROCKCHIP_CONNECTOR_PROTOCOL *This,
IN OUT DISPLAY_STATE *DisplayState
);
Expand Down Expand Up @@ -95,7 +95,7 @@ struct _ROCKCHIP_CONNECTOR_PROTOCOL {
ROCKCHIP_CONNECTOR_DEINIT Deinit;
ROCKCHIP_CONNECTOR_DETECT Detect;
ROCKCHIP_CONNECTOR_GET_TIMING GetTiming;
ROCKCHIP_CONNECTOR_GET_EDIE GetEdid;
ROCKCHIP_CONNECTOR_GET_EDID GetEdid;
ROCKCHIP_CONNECTOR_PREPARE Prepare;
ROCKCHIP_CONNECTOR_ENABLE Enable;
ROCKCHIP_CONNECTOR_DISABLE Disable;
Expand Down
Loading

0 comments on commit e3a793c

Please sign in to comment.