diff --git a/boards/arm/google_kukui/Kconfig.board b/boards/arm/google_kukui/Kconfig.board index 4c4efa07cc..d3585a6bc2 100644 --- a/boards/arm/google_kukui/Kconfig.board +++ b/boards/arm/google_kukui/Kconfig.board @@ -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. diff --git a/boards/arm/google_kukui/doc/index.rst b/boards/arm/google_kukui/doc/index.rst index 5bcd7af27c..434541c4f6 100644 --- a/boards/arm/google_kukui/doc/index.rst +++ b/boards/arm/google_kukui/doc/index.rst @@ -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 ************************* diff --git a/boards/arm/google_kukui/google_kukui.dts b/boards/arm/google_kukui/google_kukui.dts index f5b2e76eae..dde8dd3e4c 100644 --- a/boards/arm/google_kukui/google_kukui.dts +++ b/boards/arm/google_kukui/google_kukui.dts @@ -37,3 +37,13 @@ }; }; }; + +&i2c1 { + status = "okay"; + clock-frequency = ; +}; + +&i2c2 { + status = "okay"; + clock-frequency = ; +}; diff --git a/boards/arm/google_kukui/google_kukui_defconfig b/boards/arm/google_kukui/google_kukui_defconfig index c1f9406076..a1456c3f7d 100644 --- a/boards/arm/google_kukui/google_kukui_defconfig +++ b/boards/arm/google_kukui/google_kukui_defconfig @@ -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 diff --git a/boards/arm/google_kukui/pinmux.c b/boards/arm/google_kukui/pinmux.c index 8350d00ebc..c0a3389417 100644 --- a/boards/arm/google_kukui/pinmux.c +++ b/boards/arm/google_kukui/pinmux.c @@ -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)