board: arm: google_kukui: Enable I2C
Kukui has two I2C ports with various peripherals including a battery charger and a TCPCi-compatible port controller Enable I2C so that these can be used. No drivers are provided so far. Also update the GPIO documentation while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
9484b9be95
commit
4d7ec57915
|
@ -11,4 +11,4 @@ config BOARD_GOOGLE_KUKUI
|
|||
Duet and 10e Chromebook Tablet. The EC handles battery charging,
|
||||
keyboard scanning, USB Power Delivery and sensors.
|
||||
|
||||
So far for Zephyr only a simple serial console is supported.
|
||||
So far for Zephyr only a simple serial console and I2C are supported.
|
||||
|
|
|
@ -61,6 +61,11 @@ Default Zephyr Peripheral Mapping:
|
|||
----------------------------------
|
||||
|
||||
- UART_1 TX/RX : PA10/PA9
|
||||
- I2C_1 SCL/SDA : PB8/PB9
|
||||
- I2C_2 SCL/SDA : PA11/PA12
|
||||
- Volume down : GPIOB pin 11
|
||||
- Volume up : GPIOB pin 10
|
||||
- Power : GPIOA pin 0
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
|
|
@ -37,3 +37,13 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
};
|
||||
|
|
|
@ -11,6 +11,9 @@ CONFIG_BOARD_GOOGLE_KUKUI=y
|
|||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
|
||||
# I2C support
|
||||
CONFIG_I2C=y
|
||||
|
||||
# Enable console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
|
|
@ -17,6 +17,14 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA9, STM32F0_PINMUX_FUNC_PA9_USART1_TX},
|
||||
{STM32_PIN_PA10, STM32F0_PINMUX_FUNC_PA10_USART1_RX},
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(i2c1))
|
||||
{STM32_PIN_PB8, STM32F0_PINMUX_FUNC_PB8_I2C1_SCL},
|
||||
{STM32_PIN_PB9, STM32F0_PINMUX_FUNC_PB9_I2C1_SDA},
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(i2c2))
|
||||
{STM32_PIN_PA11, STM32F0_PINMUX_FUNC_PA11_I2C2_SCL},
|
||||
{STM32_PIN_PA12, STM32F0_PINMUX_FUNC_PA12_I2C2_SDA},
|
||||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
|
|
Loading…
Reference in a new issue