1/*
2 * Copyright (c) 2023 Andriy Gelman
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/*
8 * This sample requires several connections listed below. However, no external pull-ups
9 * are needed.
10 * P3.8, P3.7, P1.9, P3.15 must all be connected (sda related pins)
11 * P0.13, P1.8, P5.2 must all be connected (scl related pins)
12 */
13
14#include <zephyr/dt-bindings/i2c/i2c.h>
15
16&usic2ch0 {
17	compatible = "infineon,xmc4xxx-i2c";
18	status = "okay";
19
20	/* node is currently configured as arduino_spi */
21	/delete-property/ miso-src;
22
23	clock-frequency = <I2C_BITRATE_STANDARD>;
24	pinctrl-0 = <&i2c_scl_p5_2_u2c0 &i2c_sda_dx0_p3_7_u2c0 &i2c_sda_dout0_p3_8_u2c0>;
25	pinctrl-names = "default";
26
27	scl-src = "DX1A";
28	sda-src = "DX0C";
29
30	eeprom0: eeprom@54 {
31		compatible = "zephyr,i2c-target-eeprom";
32		reg = <0x54>;
33		size = <256>;
34	};
35};
36
37&arduino_i2c {
38	clock-frequency = <I2C_BITRATE_STANDARD>;
39	pinctrl-0 = <&i2c_scl_p0_13_u1c1 &i2c_scl_dout1_p1_8_u1c1
40		     &i2c_sda_dout0_p1_9_u1c1 &i2c_sda_p3_15_u1c1>;
41
42	scl-src = "DX1B";
43	sda-src = "DX0A";
44	eeprom1: eeprom@56 {
45		compatible = "zephyr,i2c-target-eeprom";
46		reg = <0x56>;
47		size = <256>;
48	};
49};
50
51&i2c_scl_p5_2_u2c0 {
52	drive-strength = "strong-soft-edge";
53	drive-open-drain;
54	hwctrl = "disabled";
55};
56
57&i2c_sda_dout0_p3_8_u2c0 {
58	drive-strength = "strong-soft-edge";
59	drive-open-drain;
60	hwctrl = "disabled";
61};
62
63&i2c_sda_dx0_p3_7_u2c0 {
64	drive-strength = "strong-soft-edge";
65	hwctrl = "disabled";
66	bias-pull-up;
67};
68
69&i2c_sda_p3_15_u1c1 {
70	/delete-property/ drive-open-drain;
71	bias-pull-up;
72};
73
74&i2c_sda_dout0_p1_9_u1c1 {
75	drive-strength = "strong-soft-edge";
76	drive-open-drain;
77	hwctrl = "disabled";
78};
79
80&i2c_scl_p0_13_u1c1 {
81	/delete-property/ drive-open-drain;
82	bias-pull-up;
83};
84
85&i2c_scl_dout1_p1_8_u1c1 {
86	drive-strength = "strong-soft-edge";
87	drive-open-drain;
88	hwctrl = "disabled";
89};
90