coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mt6315.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __SOC_MEDIATEK_MT6315_H__
4 #define __SOC_MEDIATEK_MT6315_H__
5 
6 #include <soc/spmi.h>
7 #include <types.h>
8 
9 struct mt6315_setting {
10  unsigned short addr;
11  unsigned short val;
12  unsigned short mask;
13  unsigned char shift;
14 };
15 
16 enum {
20 };
21 
22 enum {
28 };
29 
30 enum {
35 };
36 
37 void mt6315_init(void);
38 void mt6315_buck_set_voltage(u32 slvid, u32 buck_id, u32 buck_uv);
39 u32 mt6315_buck_get_voltage(u32 slvid, u32 buck_id);
40 void mt6315_init_setting(void);
41 void mt6315_write_field(u32 slvid, u32 reg, u32 val, u32 mask, u32 shift);
42 #endif /* __SOC_MEDIATEK_MT6315_H__ */
@ MT6315_BUCK_VBUCK1_DBG0
Definition: mt6315.h:33
@ MT6315_BUCK_TOP_ELR0
Definition: mt6315.h:31
@ MT6315_BUCK_TOP_ELR3
Definition: mt6315.h:32
@ MT6315_BUCK_VBUCK1_DBG3
Definition: mt6315.h:34
void mt6315_init_setting(void)
Definition: mt6315.c:191
void mt6315_write_field(u32 slvid, u32 reg, u32 val, u32 mask, u32 shift)
Definition: mt6315.c:20
@ MT6315_GPU
Definition: mt6315.h:18
@ MT6315_MAX
Definition: mt6315.h:19
@ MT6315_CPU
Definition: mt6315.h:17
void mt6315_init(void)
Definition: mt6315.c:96
@ MT6315_BUCK_3
Definition: mt6315.h:25
@ MT6315_BUCK_2
Definition: mt6315.h:24
@ MT6315_BUCK_max
Definition: mt6315.h:27
@ MT6315_BUCK_1
Definition: mt6315.h:23
@ MT6315_BUCK_4
Definition: mt6315.h:26
void mt6315_buck_set_voltage(u32 slvid, u32 buck_id, u32 buck_uv)
Definition: mt6315.c:38
u32 mt6315_buck_get_voltage(u32 slvid, u32 buck_id)
Definition: mt6315.c:61
static const int mask[4]
Definition: gpio.c:308
@ SPMI_SLAVE_7
Definition: spmi.h:23
@ SPMI_SLAVE_6
Definition: spmi.h:22
uint32_t u32
Definition: stdint.h:51
unsigned short val
Definition: mt6315.h:11
unsigned char shift
Definition: mt6315.h:13
unsigned short mask
Definition: mt6315.h:12
unsigned short addr
Definition: mt6315.h:10
u8 val
Definition: sys.c:300