coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
i2c.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef AMD_PICASSO_I2C_H
4 #define AMD_PICASSO_I2C_H
5 
6 #include <types.h>
7 #include <soc/gpio.h>
8 
9 #define GPIO_I2C2_SCL BIT(2)
10 #define GPIO_I2C3_SCL BIT(3)
11 #define GPIO_I2C_MASK (BIT(2) | BIT(3))
12 
13 #define I2C2_SCL_PIN GPIO_113
14 #define I2C3_SCL_PIN GPIO_19
15 
16 #define I2C2_SCL_PIN_IOMUX_GPIOxx GPIO_113_IOMUX_GPIOxx
17 #define I2C3_SCL_PIN_IOMUX_GPIOxx GPIO_19_IOMUX_GPIOxx
18 
19 #define I2C4_USB_PD_CTRL_OFFSET 0x600
20 #define USB_PD_PORT_CONTROL (APU_I2C4_BASE + I2C4_USB_PD_CTRL_OFFSET)
21 #define PD_PORT_MUX_OFFSET(x) (0x10 * (x))
22 #define DP_REVERSE BIT(4)
23 #define USB_PD_RFMUX_OVERRIDE BIT(8)
24 #define USB_PD_DP_OVERRIDE BIT(9)
25 
26 /* Sets the base address for the specific I2C bus. */
27 void i2c_set_bar(unsigned int bus, uintptr_t bar);
28 
29 #endif /* AMD_PICASSO_I2C_H */
void i2c_set_bar(unsigned int bus, uintptr_t bar)
Definition: i2c.c:24
unsigned long uintptr_t
Definition: stdint.h:21
Definition: device.h:76