1 #ifndef __NVBIOS_GPIO_H__ 2 #define __NVBIOS_GPIO_H__ 3 enum dcb_gpio_func_name { 4 DCB_GPIO_PANEL_POWER = 0x01, 5 DCB_GPIO_TVDAC0 = 0x0c, 6 DCB_GPIO_TVDAC1 = 0x2d, 7 DCB_GPIO_FAN = 0x09, 8 DCB_GPIO_FAN_SENSE = 0x3d, 9 DCB_GPIO_LOGO_LED_PWM = 0x84, 10 DCB_GPIO_UNUSED = 0xff, 11 DCB_GPIO_VID0 = 0x04, 12 DCB_GPIO_VID1 = 0x05, 13 DCB_GPIO_VID2 = 0x06, 14 DCB_GPIO_VID3 = 0x1a, 15 DCB_GPIO_VID4 = 0x73, 16 DCB_GPIO_VID5 = 0x74, 17 DCB_GPIO_VID6 = 0x75, 18 DCB_GPIO_VID7 = 0x76, 19 DCB_GPIO_VID_PWM = 0x81, 20 }; 21 22 #define DCB_GPIO_LOG_DIR 0x02 23 #define DCB_GPIO_LOG_DIR_OUT 0x00 24 #define DCB_GPIO_LOG_DIR_IN 0x02 25 #define DCB_GPIO_LOG_VAL 0x01 26 #define DCB_GPIO_LOG_VAL_LO 0x00 27 #define DCB_GPIO_LOG_VAL_HI 0x01 28 29 struct dcb_gpio_func { 30 u8 func; 31 u8 line; 32 u8 log[2]; 33 34 /* so far, "param" seems to only have an influence on PWM-related 35 * GPIOs such as FAN_CONTROL and PANEL_BACKLIGHT_LEVEL. 36 * if param equals 1, hardware PWM is available 37 * if param equals 0, the host should toggle the GPIO itself 38 */ 39 u8 param; 40 }; 41 42 u16 dcb_gpio_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len); 43 u16 dcb_gpio_entry(struct nvkm_bios *, int idx, int ent, u8 *ver, u8 *len); 44 u16 dcb_gpio_parse(struct nvkm_bios *, int idx, int ent, u8 *ver, u8 *len, 45 struct dcb_gpio_func *); 46 u16 dcb_gpio_match(struct nvkm_bios *, int idx, u8 func, u8 line, 47 u8 *ver, u8 *len, struct dcb_gpio_func *); 48 #endif 49