Skip to content

Commit d330d97

Browse files
talih0carlescufi
authored andcommitted
dts: bindings: Rename compatible infineon,xmc4-i2c->infineon,xmc4xxx-i2c
To be consistent with other xmc4xxx drivers. A few other device tree changes: - Rename clock signal option as it's handled by DX1. - Remove clock-frequency option as it's already added in i2c-controller.yaml, and interrupts is already defined as array in base.yaml. Signed-off-by: Andriy Gelman <[email protected]>
1 parent 16c40b1 commit d330d97

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

drivers/i2c/Kconfig.ifx_xmc4

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@
88
menuconfig I2C_INFINEON_XMC4
99
bool "Infineon XMC4 I2C driver"
1010
default y
11-
depends on DT_HAS_INFINEON_XMC4_I2C_ENABLED
11+
depends on DT_HAS_INFINEON_XMC4XXX_I2C_ENABLED
1212
help
1313
This option enables the I2C driver for Infineon XMC4 family.
1414

15-
if I2C_INFINEON_XMC4
16-
1715
config I2C_INFINEON_XMC4_TARGET_BUF
1816
int "I2C Target data buffer length"
1917
depends on I2C_INFINEON_XMC4
2018
range 1 1024
2119
default 64
2220
help
2321
Buffer to receive data as an I2C Target.
24-
25-
endif # I2C_INFINEON_XMC4

drivers/i2c/i2c_ifx_xmc4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @brief I2C driver for Infineon XMC MCU family.
1010
*/
1111

12-
#define DT_DRV_COMPAT infineon_xmc4_i2c
12+
#define DT_DRV_COMPAT infineon_xmc4xxx_i2c
1313

1414
#include <zephyr/logging/log.h>
1515
LOG_MODULE_REGISTER(i2c_infineon_xmc4, CONFIG_I2C_LOG_LEVEL);

dts/bindings/i2c/infineon,xmc4-i2c.yaml renamed to dts/bindings/i2c/infineon,xmc4xxx-i2c.yaml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#
44
# SPDX-License-Identifier: Apache-2.0
55

6-
description: Infineon XMC4 I2C
6+
description: Infineon XMC4XXX I2C
77

8-
compatible: "infineon,xmc4-i2c"
8+
compatible: "infineon,xmc4xxx-i2c"
99

1010
include: [i2c-controller.yaml, pinctrl-device.yaml]
1111

@@ -16,19 +16,19 @@ properties:
1616

1717
scl-src:
1818
description: |
19-
Connects the I2C clock line (USIC DX0 input) to a specific GPIO pin.
20-
The USIC DX0 input is a multiplexer which connects to different GPIO pins.
19+
Connects the I2C clock line (USIC DX1 input) to a specific GPIO pin.
20+
The USIC DX1 input is a multiplexer which connects to different GPIO pins.
2121
Refer to the XMC4XXX reference manual for the GPIO pin/mux mappings.
2222
type: string
2323
required: true
2424
enum:
25-
- "DX0A"
26-
- "DX0B"
27-
- "DX0C"
28-
- "DX0D"
29-
- "DX0E"
30-
- "DX0F"
31-
- "DX0G"
25+
- "DX1A"
26+
- "DX1B"
27+
- "DX1C"
28+
- "DX1D"
29+
- "DX1E"
30+
- "DX1F"
31+
- "DX1G"
3232

3333
sda-src:
3434
description: |
@@ -47,7 +47,6 @@ properties:
4747
- "DX0G"
4848

4949
interrupts:
50-
type: array
5150
required: true
5251
description: |
5352
IRQ number and priority to use for interrupt driven by I2C.
@@ -70,8 +69,3 @@ properties:
7069

7170
pinctrl-names:
7271
required: true
73-
74-
clock-frequency:
75-
type: int
76-
description: |
77-
Frequency that the I2C bus runs

tests/drivers/i2c/i2c_api/boards/xmc47_relax_kit.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
};
2323

2424
&usic0ch1 {
25-
compatible = "infineon,xmc4-i2c";
25+
compatible = "infineon,xmc4xxx-i2c";
2626
pinctrl-0 = <&i2c_controller_scl_p6_2_u0c1 &i2c_controller_sda_p3_13_u0c1>;
2727
pinctrl-names = "default";
28-
scl-src = "DX0C";
28+
scl-src = "DX1C";
2929
sda-src = "DX0D";
3030
interrupts = <86 1>;
3131

0 commit comments

Comments
 (0)