Skip to content

Commit e3b85b0

Browse files
committed
Merge tag 'i2c-for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: "I2C has mainly cleanups this time and a few driver improvements. Because a lot of developers were on holidays (including myself) it was a good timing to apply lots of cleanups which would normally cause merge conflicts with other floating patches. Extra thanks go to Andi Shyti who backed me up when I was on a four week hiatus. This is also the reason that some patches were commited later than ideal" * tag 'i2c-for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (67 commits) i2c: at91: Use dev_err_probe() instead of dev_err() I2C: ali15x3: Do PCI error checks on own line i2c: Make return value check more accurate and explicit for devm_pinctrl_get() i2c: designware: Add support for recovery when GPIO need pinctrl i2c: mlxcpld: Add support for extended transaction length i2c: mlxcpld: Allow driver to run on ARM64 architecture i2c: nforce2: Do PCI error check on own line i2c: sis5595: Do PCI error checks on own line i2c: qcom-cci: Fix error checking in cci_probe() i2c: muxes: pca954x: Add regulator support i2c: muxes: pca954x: Add MAX735x/MAX736x support dt-bindings: i2c: Add Maxim MAX735x/MAX736x variants dt-bindings: i2c: pca954x: Correct interrupt support i2c: pnx: Use devm_platform_get_and_ioremap_resource() i2c: pxa: Use devm_platform_get_and_ioremap_resource() i2c: s3c2410: Use devm_platform_get_and_ioremap_resource() i2c: sh_mobile: Use devm_platform_get_and_ioremap_resource() i2c: st: Use devm_platform_get_and_ioremap_resource() i2c: qcom-geni: Convert to devm_platform_ioremap_resource() i2c: stm32f4: Use devm_platform_get_and_ioremap_resource() ...
2 parents 3c31041 + 0ab4bcf commit e3b85b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+562
-565
lines changed

Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ properties:
4848
default: 16
4949
enum: [2, 4, 8, 16, 32, 64, 128, 256]
5050

51+
power-domains:
52+
maxItems: 1
53+
5154
required:
5255
- compatible
5356
- reg

Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt

Lines changed: 0 additions & 82 deletions
This file was deleted.
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
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-arb-gpio-challenge.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: GPIO-based I2C Arbitration Using a Challenge & Response Mechanism
8+
9+
maintainers:
10+
- Doug Anderson <[email protected]>
11+
- Peter Rosin <[email protected]>
12+
13+
description: |
14+
This uses GPIO lines and a challenge & response mechanism to arbitrate who is
15+
the master of an I2C bus in a multimaster situation.
16+
17+
In many cases using GPIOs to arbitrate is not needed and a design can use the
18+
standard I2C multi-master rules. Using GPIOs is generally useful in the case
19+
where there is a device on the bus that has errata and/or bugs that makes
20+
standard multimaster mode not feasible.
21+
22+
Note that this scheme works well enough but has some downsides:
23+
* It is nonstandard (not using standard I2C multimaster)
24+
* Having two masters on a bus in general makes it relatively hard to debug
25+
problems (hard to tell if i2c issues were caused by one master, another,
26+
or some device on the bus).
27+
28+
Algorithm:
29+
All masters on the bus have a 'bus claim' line which is an output that the
30+
others can see. These are all active low with pull-ups enabled. We'll
31+
describe these lines as:
32+
* OUR_CLAIM: output from us signaling to other hosts that we want the bus
33+
* THEIR_CLAIMS: output from others signaling that they want the bus
34+
35+
The basic algorithm is to assert your line when you want the bus, then make
36+
sure that the other side doesn't want it also. A detailed explanation is
37+
best done with an example.
38+
39+
Let's say we want to claim the bus. We:
40+
1. Assert OUR_CLAIM.
41+
2. Waits a little bit for the other sides to notice (slew time, say 10
42+
microseconds).
43+
3. Check THEIR_CLAIMS. If none are asserted then the we have the bus and we
44+
are done.
45+
4. Otherwise, wait for a few milliseconds and see if THEIR_CLAIMS are released.
46+
5. If not, back off, release the claim and wait for a few more milliseconds.
47+
6. Go back to 1 (until retry time has expired).
48+
49+
properties:
50+
compatible:
51+
const: i2c-arb-gpio-challenge
52+
53+
i2c-parent:
54+
$ref: /schemas/types.yaml#/definitions/phandle
55+
description:
56+
The I2C bus that this multiplexer's master-side port is connected to.
57+
58+
our-claim-gpios:
59+
maxItems: 1
60+
description:
61+
The GPIO that we use to claim the bus.
62+
63+
slew-delay-us:
64+
default: 10
65+
description:
66+
Time to wait for a GPIO to go high.
67+
68+
their-claim-gpios:
69+
minItems: 1
70+
maxItems: 8
71+
description:
72+
The GPIOs that the other sides use to claim the bus. Note that some
73+
implementations may only support a single other master.
74+
75+
wait-free-us:
76+
default: 50000
77+
description:
78+
We'll give up after this many microseconds.
79+
80+
wait-retry-us:
81+
default: 3000
82+
description:
83+
We'll attempt another claim after this many microseconds.
84+
85+
i2c-arb:
86+
type: object
87+
$ref: /schemas/i2c/i2c-controller.yaml
88+
unevaluatedProperties: false
89+
description:
90+
I2C arbitration bus node.
91+
92+
required:
93+
- compatible
94+
- i2c-arb
95+
- our-claim-gpios
96+
- their-claim-gpios
97+
98+
additionalProperties: false
99+
100+
examples:
101+
- |
102+
#include <dt-bindings/gpio/gpio.h>
103+
#include <dt-bindings/interrupt-controller/irq.h>
104+
105+
i2c-arbitrator {
106+
compatible = "i2c-arb-gpio-challenge";
107+
i2c-parent = <&i2c_4>;
108+
109+
our-claim-gpios = <&gpf0 3 GPIO_ACTIVE_LOW>;
110+
their-claim-gpios = <&gpe0 4 GPIO_ACTIVE_LOW>;
111+
slew-delay-us = <10>;
112+
wait-retry-us = <3000>;
113+
wait-free-us = <50000>;
114+
115+
i2c-arb {
116+
#address-cells = <1>;
117+
#size-cells = <0>;
118+
119+
sbs-battery@b {
120+
compatible = "sbs,sbs-battery";
121+
reg = <0xb>;
122+
sbs,poll-retry-count = <1>;
123+
};
124+
125+
embedded-controller@1e {
126+
compatible = "google,cros-ec-i2c";
127+
reg = <0x1e>;
128+
interrupts = <6 IRQ_TYPE_LEVEL_HIGH>;
129+
interrupt-parent = <&gpx1>;
130+
pinctrl-names = "default";
131+
pinctrl-0 = <&ec_irq>;
132+
wakeup-source;
133+
};
134+
};
135+
};

Documentation/devicetree/bindings/i2c/i2c-arb.txt

Lines changed: 0 additions & 35 deletions
This file was deleted.

Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,29 @@
44
$id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: NXP PCA954x I2C bus switch
7+
title: NXP PCA954x I2C and compatible bus switches
88

99
maintainers:
1010
- Laurent Pinchart <[email protected]>
1111

1212
description:
13-
The binding supports NXP PCA954x and PCA984x I2C mux/switch devices.
14-
15-
allOf:
16-
- $ref: /schemas/i2c/i2c-mux.yaml#
13+
The NXP PCA954x and compatible devices are I2C bus
14+
multiplexer/switches that share the same functionality
15+
and register layout.
16+
The devices usually have 4 or 8 child buses, which are
17+
attached to the parent bus by using the SMBus "Send Byte"
18+
command.
1719

1820
properties:
1921
compatible:
2022
oneOf:
2123
- enum:
24+
- maxim,max7356
25+
- maxim,max7357
26+
- maxim,max7358
27+
- maxim,max7367
28+
- maxim,max7368
29+
- maxim,max7369
2230
- nxp,pca9540
2331
- nxp,pca9542
2432
- nxp,pca9543
@@ -59,10 +67,34 @@ properties:
5967
description: if present, overrides i2c-mux-idle-disconnect
6068
$ref: /schemas/mux/mux-controller.yaml#/properties/idle-state
6169

70+
vdd-supply:
71+
description: A voltage regulator supplying power to the chip. On PCA9846
72+
the regulator supplies power to VDD2 (core logic) and optionally to VDD1.
73+
6274
required:
6375
- compatible
6476
- reg
6577

78+
allOf:
79+
- $ref: /schemas/i2c/i2c-mux.yaml#
80+
- if:
81+
not:
82+
properties:
83+
compatible:
84+
contains:
85+
enum:
86+
- maxim,max7367
87+
- maxim,max7369
88+
- nxp,pca9542
89+
- nxp,pca9543
90+
- nxp,pca9544
91+
- nxp,pca9545
92+
then:
93+
properties:
94+
interrupts: false
95+
"#interrupt-cells": false
96+
interrupt-controller: false
97+
6698
unevaluatedProperties: false
6799

68100
examples:
@@ -74,11 +106,13 @@ examples:
74106
#size-cells = <0>;
75107
76108
i2c-mux@74 {
77-
compatible = "nxp,pca9548";
109+
compatible = "nxp,pca9545";
78110
#address-cells = <1>;
79111
#size-cells = <0>;
80112
reg = <0x74>;
81113
114+
vdd-supply = <&p3v3>;
115+
82116
interrupt-parent = <&ipic>;
83117
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
84118
interrupt-controller;

Documentation/devicetree/bindings/i2c/nxp,pca9541.txt

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)