Skip to content

Commit 24168c5

Browse files
NXP-CarlosSongalexandrebelloni
authored andcommitted
dt-bindings: i3c: add header for generic I3C flags
Add header file for generic I3C flags to avoid hard code in dts file. Signed-off-by: Carlos Song <carlos.song@nxp.com> Reviewed-by: Frank Li <frank.li@nxp.com> Acked-by: Jason Liu <jason.hui.liu@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240715225351.3237284-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent b73c983 commit 24168c5

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

Documentation/devicetree/bindings/i3c/i3c.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ patternProperties:
9191
- const: 0
9292
- description: |
9393
Shall encode the I3C LVR (Legacy Virtual Register):
94+
See include/dt-bindings/i3c/i3c.h
9495
bit[31:8]: unused/ignored
9596
bit[7:5]: I2C device index. Possible values:
9697
* 0: I2C device has a 50 ns spike filter
@@ -153,6 +154,8 @@ additionalProperties: true
153154

154155
examples:
155156
- |
157+
#include <dt-bindings/i3c/i3c.h>
158+
156159
i3c@d040000 {
157160
compatible = "cdns,i3c-master";
158161
clocks = <&coreclock>, <&i3csysclock>;
@@ -166,7 +169,7 @@ examples:
166169
/* I2C device. */
167170
eeprom@57 {
168171
compatible = "atmel,24c01";
169-
reg = <0x57 0x0 0x10>;
172+
reg = <0x57 0x0 (I2C_FM | I2C_FILTER)>;
170173
pagesize = <0x8>;
171174
};
172175

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10479,6 +10479,7 @@ F: Documentation/ABI/testing/sysfs-bus-i3c
1047910479
F: Documentation/devicetree/bindings/i3c/
1048010480
F: Documentation/driver-api/i3c
1048110481
F: drivers/i3c/
10482+
F: include/dt-bindings/i3c/
1048210483
F: include/linux/i3c/
1048310484

1048410485
IBM Operation Panel Input Driver

include/dt-bindings/i3c/i3c.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
2+
/*
3+
* Copyright 2024 NXP
4+
*/
5+
6+
#ifndef _DT_BINDINGS_I3C_I3C_H
7+
#define _DT_BINDINGS_I3C_I3C_H
8+
9+
#define I2C_FM (1 << 4)
10+
#define I2C_FM_PLUS (0 << 4)
11+
12+
#define I2C_FILTER (0 << 5)
13+
#define I2C_NO_FILTER_HIGH_FREQUENCY (1 << 5)
14+
#define I2C_NO_FILTER_LOW_FREQUENCY (2 << 5)
15+
16+
#endif

0 commit comments

Comments
 (0)