2018-02-28 10:37:41 +01:00
|
|
|
# Copyright (c) 2017 I-SENSE group of ICCS
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2019-06-19 00:03:49 +02:00
|
|
|
|
2019-11-19 08:39:11 +01:00
|
|
|
description: STM32 I2C V2 controller
|
2017-06-29 16:20:30 +02:00
|
|
|
|
2019-08-19 20:32:25 +02:00
|
|
|
compatible: "st,stm32-i2c-v2"
|
|
|
|
|
2021-11-08 11:05:02 +01:00
|
|
|
include: [i2c-controller.yaml, pinctrl-device.yaml]
|
2017-06-29 16:20:30 +02:00
|
|
|
|
|
|
|
properties:
|
2023-01-03 20:21:25 +01:00
|
|
|
reg:
|
|
|
|
required: true
|
2017-06-29 16:20:30 +02:00
|
|
|
|
2023-01-03 20:21:25 +01:00
|
|
|
interrupts:
|
|
|
|
required: true
|
2020-08-20 11:22:23 +02:00
|
|
|
|
2023-01-03 20:21:25 +01:00
|
|
|
pinctrl-0:
|
|
|
|
required: true
|
2021-11-23 09:41:16 +01:00
|
|
|
|
2023-01-03 20:21:25 +01:00
|
|
|
pinctrl-names:
|
|
|
|
required: true
|
2020-10-08 11:28:43 +02:00
|
|
|
|
2023-01-03 20:21:25 +01:00
|
|
|
timings:
|
|
|
|
type: array
|
|
|
|
description: |
|
|
|
|
An optional table of pre-computed i2c timing values with the
|
|
|
|
matching clock configuration.
|
2020-08-20 11:22:23 +02:00
|
|
|
|
2023-01-03 20:21:25 +01:00
|
|
|
Precise timings values for a given Hardware can be pre-computed
|
|
|
|
with a tool like STM32CubeMX or directly from I2C_TIMINGR register
|
|
|
|
description.
|
2020-08-20 11:22:23 +02:00
|
|
|
|
2023-01-03 20:21:25 +01:00
|
|
|
Because timing value is valid for a given I2C peripheral clock
|
|
|
|
frequency and target I2C bus clock, each timing value must be
|
|
|
|
provided with the matching configuration.
|
2020-08-20 11:22:23 +02:00
|
|
|
|
2023-01-03 20:21:25 +01:00
|
|
|
The resulting table entries should look like <periph_clock
|
|
|
|
clock-frequency timing>
|
2020-08-20 11:22:23 +02:00
|
|
|
|
2023-01-03 20:21:25 +01:00
|
|
|
For example timings could be defined as
|
2020-08-20 11:22:23 +02:00
|
|
|
|
2023-01-03 20:21:25 +01:00
|
|
|
timings = <64000000 I2C_BITRATE_STANDARD 0x10707DBC>,
|
|
|
|
<64000000 I2C_BITRATE_FAST 0x00603D56>,
|
|
|
|
<56000000 I2C_BITRATE_STANDARD 0x10606DA4>,
|
|
|
|
<56000000 I2C_BITRATE_FAST 0x00501D63>;
|
2023-02-17 18:33:01 +01:00
|
|
|
|
|
|
|
scl-gpios:
|
|
|
|
type: phandle-array
|
|
|
|
description: |
|
|
|
|
GPIO to which the I2C SCL signal is routed. This is only needed for
|
|
|
|
I2C bus recovery support.
|
|
|
|
|
|
|
|
sda-gpios:
|
|
|
|
type: phandle-array
|
|
|
|
description: |
|
|
|
|
GPIO to which the I2C SDA signal is routed. This is only needed for
|
|
|
|
I2C bus recovery support.
|