Skip to content

Commit

Permalink
apple: remove i2c hack
Browse files Browse the repository at this point in the history
  • Loading branch information
kettenis committed Jul 31, 2021
1 parent 5d6943a commit a3d022f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion configs/apple_m1_defconfig
Expand Up @@ -15,5 +15,5 @@ CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_STORAGE=y
CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="i2c dev 0; pci enum; nvme scan; usb start"
CONFIG_PREBOOT="pci enum; nvme scan; usb start"
CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
17 changes: 0 additions & 17 deletions drivers/i2c/apple_i2c.c
Expand Up @@ -207,23 +207,6 @@ static int apple_i2c_probe(struct udevice *dev)

reg_write(priv, REG_CTL, CLK_400K_DIV | CTL_MAGIC);

/* XXX hack to get the type-C port working. */
struct i2c_msg msg;
u8 cmd[6] = { 0x08, 4, 'S', 'S', 'P', 'S' };
u8 data[4] = { 0x09, 2, 0, 0 };

msg.addr = 0x3f;
msg.flags = 0;
msg.len = 4;
msg.buf = data;
ret = apple_i2c_xfer(dev, &msg, 1);

msg.addr = 0x3f;
msg.flags = 0;
msg.len = 6;
msg.buf = cmd;
ret = apple_i2c_xfer(dev, &msg, 1);

return 0;
}

Expand Down

0 comments on commit a3d022f

Please sign in to comment.