# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

description: |
  Nordic nRF family TWIS

  The TWIS peripheral is an I2C controller which supports the I2C
  peripheral role, and EasyDMA. TWIS shares resources with TWIM and TWI,
  only one of them can be enabled for each peripheral instance.
  Overwrite the compatible of the i2c node to select between TWIM/TWI
  and TWIS, along with the pinctrl instances to select between TWIM/TWI
  and TWIS pin functions.

  Example:

    &pinctrl {
            i2c2_default: i2c2_default {
                    group1 {
                            psels = <NRF_PSEL(TWIS_SDA, 0, 26)>,
                                    <NRF_PSEL(TWIS_SCL, 0, 25)>;
                            bias-pull-up;
                    };
            };

            i2c2_sleep: i2c2_sleep {
                    group1 {
                            psels = <NRF_PSEL(TWIS_SDA, 0, 26)>,
                                    <NRF_PSEL(TWIS_SCL, 0, 25)>;
                            low-power-enable;
                    };
            };
    };

    &i2c2 {
            compatible = "nordic,nrf-twis";
            pinctrl-0 = <&i2c2_default>;
            pinctrl-1 = <&i2c2_sleep>;
            pinctrl-names = "default", "sleep";
            status = "okay";
    };

compatible: "nordic,nrf-twis"

include:
  - "nordic,nrf-twi-common.yaml"
  - "memory-region.yaml"
