coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ps8640.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <edid.h>
4 #include <types.h>
5 
6 #ifndef _PS8640_H_
7 #define _PS8640_H_
8 
9 enum {
10  PAGE2_GPIO_L = 0xa6,
11  PAGE2_GPIO_H = 0xa7,
13  PS_GPIO9 = BIT(1),
15 
16  PAGE2_MCS_EN = 0xf3,
18  MCS_EN_MASK = 0x1,
19  PAGE3_SET_ADD = 0xfe,
20  PAGE3_SET_VAL = 0xff,
21  VDO_CTL_ADD = 0x13,
22  VDO_DIS = 0x18,
23  VDO_EN = 0x1c,
24 };
25 
26 enum {
32  SWAUX_ADDR_MASK = 0xfffff,
41  SWAUX_M_MASK = 0x1f,
42  SWAUX_STATUS_MASK = (0x7 << 5),
43  SWAUX_STATUS_NACK = (0x1 << 5),
44  SWAUX_STATUS_DEFER = (0x2 << 5),
45  SWAUX_STATUS_ACKM = (0x3 << 5),
46  SWAUX_STATUS_INVALID = (0x4 << 5),
47  SWAUX_STATUS_I2C_NACK = (0x5 << 5),
48  SWAUX_STATUS_I2C_DEFER = (0x6 << 5),
49  SWAUX_STATUS_TIMEOUT = (0x7 << 5),
50 };
51 
53 int ps8640_get_edid(uint8_t bus, uint8_t chip, struct edid *out);
55 
56 #endif
#define BIT(nr)
Definition: ec_commands.h:45
static struct tpm_chip chip
Definition: tis.c:17
void ps8640_backlight_enable(uint8_t bus, uint8_t chip)
Definition: ps8640.c:165
int ps8640_init(uint8_t bus, uint8_t chip)
Definition: ps8640.c:45
int ps8640_get_edid(uint8_t bus, uint8_t chip, struct edid *out)
Definition: ps8640.c:11
@ PAGE0_SWAUX_WDATA
Definition: ps8640.h:36
@ PAGE0_SWAUX_STATUS
Definition: ps8640.h:40
@ PAGE0_AUXCH_CFG3
Definition: ps8640.h:27
@ PAGE0_SWAUX_ADDR_15_8
Definition: ps8640.h:30
@ SWAUX_STATUS_NACK
Definition: ps8640.h:43
@ SWAUX_SEND
Definition: ps8640.h:39
@ SWAUX_STATUS_INVALID
Definition: ps8640.h:46
@ SWAUX_STATUS_MASK
Definition: ps8640.h:42
@ PAGE0_SWAUX_RDATA
Definition: ps8640.h:37
@ SWAUX_ADDR_MASK
Definition: ps8640.h:32
@ PAGE0_SWAUX_CTRL
Definition: ps8640.h:38
@ SWAUX_STATUS_I2C_DEFER
Definition: ps8640.h:48
@ SWAUX_STATUS_DEFER
Definition: ps8640.h:44
@ SWAUX_M_MASK
Definition: ps8640.h:41
@ AUXCH_CFG3_RESET
Definition: ps8640.h:28
@ PAGE0_SWAUX_ADDR_23_16
Definition: ps8640.h:31
@ SWAUX_STATUS_ACKM
Definition: ps8640.h:45
@ PAGE0_SWAUX_ADDR_7_0
Definition: ps8640.h:29
@ SWAUX_LENGTH_MASK
Definition: ps8640.h:34
@ PAGE0_SWAUX_LENGTH
Definition: ps8640.h:33
@ SWAUX_STATUS_TIMEOUT
Definition: ps8640.h:49
@ SWAUX_NO_PAYLOAD
Definition: ps8640.h:35
@ SWAUX_STATUS_I2C_NACK
Definition: ps8640.h:47
@ PAGE3_SET_ADD
Definition: ps8640.h:19
@ PAGE3_SET_VAL
Definition: ps8640.h:20
@ VDO_EN
Definition: ps8640.h:23
@ MCS_EN_SHIFT
Definition: ps8640.h:17
@ PAGE2_GPIO_L
Definition: ps8640.h:10
@ VDO_DIS
Definition: ps8640.h:22
@ PAGE2_I2C_BYPASS
Definition: ps8640.h:12
@ PAGE2_GPIO_H
Definition: ps8640.h:11
@ VDO_CTL_ADD
Definition: ps8640.h:21
@ I2C_BYPASS_EN
Definition: ps8640.h:14
@ PAGE2_MCS_EN
Definition: ps8640.h:16
@ MCS_EN_MASK
Definition: ps8640.h:18
@ PS_GPIO9
Definition: ps8640.h:13
unsigned char uint8_t
Definition: stdint.h:8
Definition: device.h:76
Definition: edid.h:49