xref: /linux/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/extdev.h (revision 976e3645923bdd2fe7893aae33fd7a21098bfb28)
1b7019ac5SIlia Mirkin /* SPDX-License-Identifier: MIT */
2c39f472eSBen Skeggs #ifndef __NVBIOS_EXTDEV_H__
3c39f472eSBen Skeggs #define __NVBIOS_EXTDEV_H__
4c39f472eSBen Skeggs enum nvbios_extdev_type {
5c39f472eSBen Skeggs 	NVBIOS_EXTDEV_LM89		= 0x02,
6c39f472eSBen Skeggs 	NVBIOS_EXTDEV_VT1103M		= 0x40,
7c39f472eSBen Skeggs 	NVBIOS_EXTDEV_PX3540		= 0x41,
8c39f472eSBen Skeggs 	NVBIOS_EXTDEV_VT1105M		= 0x42, /* or close enough... */
9b71c0892SKarol Herbst 	NVBIOS_EXTDEV_INA219		= 0x4c,
10b71c0892SKarol Herbst 	NVBIOS_EXTDEV_INA209		= 0x4d,
11b71c0892SKarol Herbst 	NVBIOS_EXTDEV_INA3221		= 0x4e,
12c39f472eSBen Skeggs 	NVBIOS_EXTDEV_ADT7473		= 0x70, /* can also be a LM64 */
13c39f472eSBen Skeggs 	NVBIOS_EXTDEV_HDCP_EEPROM	= 0x90,
14c39f472eSBen Skeggs 	NVBIOS_EXTDEV_NONE		= 0xff,
15c39f472eSBen Skeggs };
16c39f472eSBen Skeggs 
17c39f472eSBen Skeggs struct nvbios_extdev_func {
18c39f472eSBen Skeggs 	u8 type;
19c39f472eSBen Skeggs 	u8 addr;
20c39f472eSBen Skeggs 	u8 bus;
21c39f472eSBen Skeggs };
22c39f472eSBen Skeggs 
23c39f472eSBen Skeggs int
24d390b480SBen Skeggs nvbios_extdev_parse(struct nvkm_bios *, int, struct nvbios_extdev_func *);
25c39f472eSBen Skeggs 
26c39f472eSBen Skeggs int
27d390b480SBen Skeggs nvbios_extdev_find(struct nvkm_bios *, enum nvbios_extdev_type,
28c39f472eSBen Skeggs 		   struct nvbios_extdev_func *);
29*f0790cdaSBen Skeggs 
30*f0790cdaSBen Skeggs bool nvbios_extdev_skip_probe(struct nvkm_bios *);
31c39f472eSBen Skeggs #endif
32