1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #ifndef AMD_PICASSO_I2C_H 4 #define AMD_PICASSO_I2C_H 5 6 #include <gpio.h> 7 #include <types.h> 8 9 #define GPIO_I2C2_SCL BIT(2) 10 #define GPIO_I2C3_SCL BIT(3) 11 #define GPIO_I2C_MASK (GPIO_I2C2_SCL | GPIO_I2C3_SCL) 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 void reset_i2c_peripherals(void); 29 30 #endif /* AMD_PICASSO_I2C_H */ 31