WIP FPC-III support
[linux/fpc-iii.git] / drivers / gpu / drm / nouveau / include / nvkm / subdev / bios / volt.h
blob0c9be1b2ebbf0780c47be816ca6bb5ee19fa13dd
1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVBIOS_VOLT_H__
3 #define __NVBIOS_VOLT_H__
5 enum nvbios_volt_type {
6 NVBIOS_VOLT_GPIO = 0,
7 NVBIOS_VOLT_PWM,
8 };
10 struct nvbios_volt {
11 enum nvbios_volt_type type;
12 u32 min;
13 u32 max;
14 u32 base;
16 /* GPIO mode */
17 bool ranged;
18 u8 vidmask;
19 s16 step;
21 /* PWM mode */
22 u32 pwm_freq;
23 u32 pwm_range;
26 u32 nvbios_volt_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len);
27 u32 nvbios_volt_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,
28 struct nvbios_volt *);
30 struct nvbios_volt_entry {
31 u32 voltage;
32 u8 vid;
35 u32 nvbios_volt_entry(struct nvkm_bios *, int idx, u8 *ver, u8 *len);
36 u32 nvbios_volt_entry_parse(struct nvkm_bios *, int idx, u8 *ver, u8 *len,
37 struct nvbios_volt_entry *);
38 #endif