1# Copyright (c) 2019 Nordic Semiconductor ASA
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5  Nordic nRF family TWIM (TWI master with EasyDMA).
6
7  This binding can be used for nodes which can represent TWIM
8  peripherals. A single SoC peripheral ID is often associated with
9  multiple I2C peripherals, like a TWIM and a TWIS. You can choose
10  TWIM by setting the node's "compatible" to "nordic,nrf-twim"
11  and "status" to "okay", e.g. using an overlay file like this one:
12
13      /* This is for TWIM0 -- change to "i2c1" for TWIM1, etc. */
14      &i2c0 {
15              compatible = "nordic,nrf-twim";
16              status = "okay";
17              /* other property settings can go here */
18      };
19
20  This works on any supported SoC, for all TWIM instances.
21
22  Note: on nRF51 SoCs, use the "nordic,nrf-twi" binding instead.
23
24compatible: "nordic,nrf-twim"
25
26include: ["nordic,nrf-twi-common.yaml", "memory-region.yaml"]
27
28properties:
29  zephyr,concat-buf-size:
30    type: int
31    default: 16
32    description: |
33        Size of a concatenation buffer that the driver is to use for merging
34        multiple same direction I2C messages that have no RESTART or STOP
35        flag between them (see e.g. the i2c_burst_write() function) into one
36        transfer on the bus.
37
38        This property must be provided when interacting with devices like
39        the SSD1306 display that cannot tolerate a repeated start and
40        address appearing on the bus between message fragments. For many
41        devices a concatenation buffer is not necessary.
42
43  zephyr,flash-buf-max-size:
44    type: int
45    default: 16
46    description: |
47        TWIM peripherals cannot perform write transactions from buffers
48        located in flash. If such buffers are expected to be used with
49        a given instance of the TWIM peripheral, this property must be
50        set to the maximum possible size of those buffers, so that the
51        driver can reserve enough space in RAM to copy there the contents
52        of particular buffers before requesting the actual transfers.
53
54        If this property is not set to a value adequate for a given
55        application, write transactions may fail for buffers that are
56        located in flash, what in turn may cause certain components,
57        like the DPS310 sensor driver, to not work.
58
59        It is recommended to use the same value for this property and for
60        the zephyr,concat-buf-size one, as both these buffering mechanisms
61        can utilize the same space in RAM.
62