Skip to content

Commit 3d05e49

Browse files
committed
Merge tag 'i2c-for-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: "I2C has largely driver updates for 6.7, i.e. feature additions (like adding transfers while in atomic mode), using new helpers (like devm_clk_get_enabled), new IDs, documentation fixes and additions... you name it. The core got a memleak fix and better support for nested muxes" * tag 'i2c-for-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (53 commits) i2c: s3c2410: make i2c_s3c_irq_nextbyte() void i2c: qcom-geni: add ACPI device id for sc8180x Documentation: i2c: add fault code for not supporting 10 bit addresses i2c: sun6i-p2wi: Prevent potential division by zero i2c: mux: demux-pinctrl: Convert to use sysfs_emit_at() API i2c: i801: Use new helper acpi_use_parent_companion ACPI: Add helper acpi_use_parent_companion MAINTAINERS: add YAML file for i2c-demux-pinctrl i2c: core: fix lockdep warning for sparsely nested adapter chain i2c: axxia: eliminate kernel-doc warnings dt-bindings: i2c: i2c-demux-pinctrl: Convert to json-schema i2c: stm32f7: Use devm_clk_get_enabled() i2c: stm32f4: Use devm_clk_get_enabled() i2c: stm32f7: add description of atomic in struct stm32f7_i2c_dev i2c: fix memleak in i2c_new_client_device() i2c: exynos5: Calculate t_scl_l, t_scl_h according to i2c spec i2c: i801: Simplify class-based client device instantiation i2c: exynos5: add support for atomic transfers i2c: at91-core: Use devm_clk_get_enabled() eeprom: at24: add ST M24C64-D Additional Write lockable page support ...
2 parents 2153fc3 + 10e806d commit 3d05e49

34 files changed

+595
-426
lines changed

Documentation/devicetree/bindings/eeprom/at24.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,14 @@ properties:
6868
pattern: cs16$
6969
- items:
7070
pattern: c32$
71+
- items:
72+
pattern: c32d-wl$
7173
- items:
7274
pattern: cs32$
7375
- items:
7476
pattern: c64$
77+
- items:
78+
pattern: c64d-wl$
7579
- items:
7680
pattern: cs64$
7781
- items:

Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.txt

Lines changed: 0 additions & 135 deletions
This file was deleted.
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/i2c/i2c-demux-pinctrl.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Pinctrl-based I2C Bus Demultiplexer
8+
9+
maintainers:
10+
- Wolfram Sang <[email protected]>
11+
12+
description: |
13+
This binding describes an I2C bus demultiplexer that uses pin multiplexing to
14+
route the I2C signals, and represents the pin multiplexing configuration
15+
using the pinctrl device tree bindings. This may be used to select one I2C
16+
IP core at runtime which may have a better feature set for a given task than
17+
another I2C IP core on the SoC. The most simple example is to fall back to
18+
GPIO bitbanging if your current runtime configuration hits an errata of the
19+
internal IP core.
20+
21+
+-------------------------------+
22+
| SoC |
23+
| | +-----+ +-----+
24+
| +------------+ | | dev | | dev |
25+
| |I2C IP Core1|--\ | +-----+ +-----+
26+
| +------------+ \-------+ | | |
27+
| |Pinctrl|--|------+--------+
28+
| +------------+ +-------+ |
29+
| |I2C IP Core2|--/ |
30+
| +------------+ |
31+
| |
32+
+-------------------------------+
33+
34+
allOf:
35+
- $ref: i2c-mux.yaml
36+
- $ref: /schemas/i2c/i2c-controller.yaml#
37+
38+
properties:
39+
compatible:
40+
const: i2c-demux-pinctrl
41+
42+
i2c-parent:
43+
$ref: /schemas/types.yaml#/definitions/phandle-array
44+
description:
45+
List of phandles of I2C masters available for selection. The first one
46+
will be used as default.
47+
48+
i2c-bus-name:
49+
$ref: /schemas/types.yaml#/definitions/string
50+
description:
51+
The name of this bus. Also needed as pinctrl-name for the I2C parents.
52+
53+
required:
54+
- compatible
55+
- i2c-parent
56+
- i2c-bus-name
57+
58+
unevaluatedProperties: false
59+
60+
examples:
61+
- |
62+
#include <dt-bindings/gpio/gpio.h>
63+
#include <dt-bindings/interrupt-controller/irq.h>
64+
65+
gpioi2c2: i2c-9 {
66+
#address-cells = <1>;
67+
#size-cells = <0>;
68+
compatible = "i2c-gpio";
69+
scl-gpios = <&gpio5 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
70+
sda-gpios = <&gpio5 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
71+
i2c-gpio,delay-us = <5>;
72+
73+
// The I2C controller must have its status "disabled". The I2C bus
74+
// demultiplexer will enable it at runtime when needed.
75+
status = "disabled";
76+
};
77+
78+
iic2: i2c@e6520000 {
79+
reg = <0xe6520000 0x425>;
80+
pinctrl-0 = <&iic2_pins>;
81+
// The pinctrl property for the parent I2C controller needs a pinctrl
82+
// state with the same name as i2c-bus-name in the I2C bus demultiplexer
83+
// node, not "default"!
84+
pinctrl-names = "i2c-hdmi";
85+
86+
clock-frequency = <100000>;
87+
88+
// The I2C controller must have its status "disabled". The I2C bus
89+
// demultiplexer will enable it at runtime when needed.
90+
status = "disabled";
91+
};
92+
93+
i2c2: i2c@e6530000 {
94+
reg = <0 0xe6530000 0 0x40>;
95+
pinctrl-0 = <&i2c2_pins>;
96+
// The pinctrl property for the parent I2C controller needs a pinctrl
97+
// state with the same name as i2c-bus-name in the I2C bus demultiplexer
98+
// node, not "default"!
99+
pinctrl-names = "i2c-hdmi";
100+
101+
clock-frequency = <100000>;
102+
103+
// The I2C controller must have its status "disabled". The I2C bus
104+
// demultiplexer will enable it at runtime when needed.
105+
status = "disabled";
106+
};
107+
108+
// Example for a bus to be demuxed. It contains various I2C clients for
109+
// HDMI, so the bus is named "i2c-hdmi":
110+
i2chdmi: i2c-mux3 {
111+
compatible = "i2c-demux-pinctrl";
112+
i2c-parent = <&iic2>, <&i2c2>, <&gpioi2c2>;
113+
i2c-bus-name = "i2c-hdmi";
114+
#address-cells = <1>;
115+
#size-cells = <0>;
116+
117+
ak4643: codec@12 {
118+
compatible = "asahi-kasei,ak4643";
119+
#sound-dai-cells = <0>;
120+
reg = <0x12>;
121+
};
122+
123+
composite-in@20 {
124+
compatible = "adi,adv7180";
125+
reg = <0x20>;
126+
127+
port {
128+
adv7180: endpoint {
129+
bus-width = <8>;
130+
remote-endpoint = <&vin1ep0>;
131+
};
132+
};
133+
};
134+
135+
hdmi@39 {
136+
compatible = "adi,adv7511w";
137+
reg = <0x39>;
138+
interrupt-parent = <&gpio1>;
139+
interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
140+
clocks = <&cec_clock>;
141+
clock-names = "cec";
142+
143+
avdd-supply = <&fixedregulator1v8>;
144+
dvdd-supply = <&fixedregulator1v8>;
145+
pvdd-supply = <&fixedregulator1v8>;
146+
dvdd-3v-supply = <&fixedregulator3v3>;
147+
bgvdd-supply = <&fixedregulator1v8>;
148+
149+
adi,input-depth = <8>;
150+
adi,input-colorspace = "rgb";
151+
adi,input-clock = "1x";
152+
153+
ports {
154+
#address-cells = <1>;
155+
#size-cells = <0>;
156+
157+
port@0 {
158+
reg = <0>;
159+
adv7511_in: endpoint {
160+
remote-endpoint = <&lvds0_out>;
161+
};
162+
};
163+
164+
port@1 {
165+
reg = <1>;
166+
adv7511_out: endpoint {
167+
remote-endpoint = <&hdmi_con_out>;
168+
};
169+
};
170+
};
171+
};
172+
};

Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ properties:
2525

2626
- items:
2727
- enum:
28+
- qcom,sc7280-cci
2829
- qcom,sdm845-cci
2930
- qcom,sm6350-cci
3031
- qcom,sm8250-cci
@@ -159,6 +160,7 @@ allOf:
159160
compatible:
160161
contains:
161162
enum:
163+
- qcom,sc7280-cci
162164
- qcom,sm8250-cci
163165
- qcom,sm8450-cci
164166
then:

Documentation/i2c/busses/i2c-i801.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Supported adapters:
4747
* Intel Alder Lake (PCH)
4848
* Intel Raptor Lake (PCH)
4949
* Intel Meteor Lake (SOC and PCH)
50+
* Intel Birch Stream (SOC)
5051

5152
Datasheets: Publicly available at the Intel website
5253

Documentation/i2c/fault-codes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Also, codes returned by adapter probe methods follow rules which are
3939
specific to their host bus (such as PCI, or the platform bus).
4040

4141

42+
EAFNOSUPPORT
43+
Returned by I2C adapters not supporting 10 bit addresses when
44+
they are requested to use such an address.
45+
4246
EAGAIN
4347
Returned by I2C adapters when they lose arbitration in master
4448
transmit mode: some other master was transmitting different

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8825,6 +8825,7 @@ F: include/linux/phy/
88258825
GENERIC PINCTRL I2C DEMULTIPLEXER DRIVER
88268826
M: Wolfram Sang <[email protected]>
88278827
S: Supported
8828+
F: Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.yaml
88288829
F: drivers/i2c/muxes/i2c-demux-pinctrl.c
88298830

88308831
GENERIC PM DOMAINS

drivers/i2c/busses/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ config I2C_I801
158158
Alder Lake (PCH)
159159
Raptor Lake (PCH)
160160
Meteor Lake (SOC and PCH)
161+
Birch Stream (SOC)
161162

162163
This driver can also be built as a module. If so, the module
163164
will be called i2c-i801.

0 commit comments

Comments
 (0)