xref: /linux/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/i2c.h (revision 0898782247ae533d1f4e47a06bc5d4870931b284)
1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVBIOS_I2C_H__
3 #define __NVBIOS_I2C_H__
4 enum dcb_i2c_type {
5 	/* matches bios type field prior to ccb 4.1 */
6 	DCB_I2C_NV04_BIT = 0x00,
7 	DCB_I2C_NV4E_BIT = 0x04,
8 	DCB_I2C_NVIO_BIT = 0x05,
9 	DCB_I2C_NVIO_AUX = 0x06,
10 	/* made up - mostly */
11 	DCB_I2C_PMGR     = 0x80,
12 	DCB_I2C_UNUSED   = 0xff
13 };
14 
15 struct dcb_i2c_entry {
16 	enum dcb_i2c_type type;
17 	u8 drive;
18 	u8 sense;
19 	u8 share;
20 	u8 auxch;
21 };
22 
23 u16 dcb_i2c_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len);
24 u16 dcb_i2c_entry(struct nvkm_bios *, u8 index, u8 *ver, u8 *len);
25 int dcb_i2c_parse(struct nvkm_bios *, u8 index, struct dcb_i2c_entry *);
26 #endif
27