brintos

brintos / linux-shallow public Read only

0
0
Text · 1.5 KiB · 3f785f2 Raw
53 lines · c
1/* SPDX-License-Identifier: MIT */2#ifndef __NVBIOS_GPIO_H__3#define __NVBIOS_GPIO_H__4enum dcb_gpio_func_name {5	DCB_GPIO_PANEL_POWER = 0x01,6	DCB_GPIO_FAN = 0x09,7	DCB_GPIO_TVDAC0 = 0x0c,8	DCB_GPIO_THERM_EXT_POWER_EVENT = 0x10,9	DCB_GPIO_TVDAC1 = 0x2d,10	DCB_GPIO_FAN_SENSE = 0x3d,11	DCB_GPIO_POWER_ALERT = 0x4c,12	DCB_GPIO_EXT_POWER_LOW = 0x79,13	DCB_GPIO_LOGO_LED_PWM = 0x84,14	DCB_GPIO_UNUSED = 0xff,15	DCB_GPIO_VID0 = 0x04,16	DCB_GPIO_VID1 = 0x05,17	DCB_GPIO_VID2 = 0x06,18	DCB_GPIO_VID3 = 0x1a,19	DCB_GPIO_VID4 = 0x73,20	DCB_GPIO_VID5 = 0x74,21	DCB_GPIO_VID6 = 0x75,22	DCB_GPIO_VID7 = 0x76,23	DCB_GPIO_VID_PWM = 0x81,24};25 26#define DCB_GPIO_LOG_DIR     0x0227#define DCB_GPIO_LOG_DIR_OUT 0x0028#define DCB_GPIO_LOG_DIR_IN  0x0229#define DCB_GPIO_LOG_VAL     0x0130#define DCB_GPIO_LOG_VAL_LO  0x0031#define DCB_GPIO_LOG_VAL_HI  0x0132 33struct dcb_gpio_func {34	u8 func;35	u8 line;36	u8 log[2];37 38	/* so far, "param" seems to only have an influence on PWM-related39	 * GPIOs such as FAN_CONTROL and PANEL_BACKLIGHT_LEVEL.40	 * if param equals 1, hardware PWM is available41	 * if param equals 0, the host should toggle the GPIO itself42	 */43	u8 param;44};45 46u16 dcb_gpio_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len);47u16 dcb_gpio_entry(struct nvkm_bios *, int idx, int ent, u8 *ver, u8 *len);48u16 dcb_gpio_parse(struct nvkm_bios *, int idx, int ent, u8 *ver, u8 *len,49		   struct dcb_gpio_func *);50u16 dcb_gpio_match(struct nvkm_bios *, int idx, u8 func, u8 line,51		   u8 *ver, u8 *len, struct dcb_gpio_func *);52#endif53