diff options
author | Peter Rosin <peda@axentia.se> | 2016-07-08 06:12:17 -0400 |
---|---|---|
committer | Peter Rosin <peda@axentia.se> | 2016-08-25 16:11:00 -0400 |
commit | e8813c15be0a9e7f2c79c58d3329d92bcf056ecc (patch) | |
tree | 4d8f0b29bcd34446ddf619edd4b089040428e4d6 /Documentation | |
parent | 374f8436ff3a450a2f95a0c1910a0b17212cede1 (diff) |
dt-bindings: i2c: add support for 'i2c-arb' subnode
This gets rid of the need for a pointless 'reg' property for i2c
arbitrators.
I.e. this new and more compact style
some-arbitrator {
i2c-arb {
#address-cells = <1>;
#size-cells = <0>;
some-i2c-device@50 {
reg = <0x50>;
};
};
};
instead of the old
some-arbitrator {
#address-cells = <1>;
#size-cells = <0>;
i2c@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
some-i2c-device@50 {
reg = <0x50>;
};
};
};
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Peter Rosin <peda@axentia.se>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt | 8 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/i2c/i2c-arb.txt | 35 |
2 files changed, 37 insertions, 6 deletions
diff --git a/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt b/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt index 71191ff0e781..248a155414c2 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt | |||
@@ -44,8 +44,7 @@ Required properties: | |||
44 | - our-claim-gpio: The GPIO that we use to claim the bus. | 44 | - our-claim-gpio: The GPIO that we use to claim the bus. |
45 | - their-claim-gpios: The GPIOs that the other sides use to claim the bus. | 45 | - their-claim-gpios: The GPIOs that the other sides use to claim the bus. |
46 | Note that some implementations may only support a single other master. | 46 | Note that some implementations may only support a single other master. |
47 | - Standard I2C mux properties. See i2c-mux.txt in this directory. | 47 | - I2C arbitration bus node. See i2c-arb.txt in this directory. |
48 | - Single I2C child bus node at reg 0. See i2c-mux.txt in this directory. | ||
49 | 48 | ||
50 | Optional properties: | 49 | Optional properties: |
51 | - slew-delay-us: microseconds to wait for a GPIO to go high. Default is 10 us. | 50 | - slew-delay-us: microseconds to wait for a GPIO to go high. Default is 10 us. |
@@ -63,8 +62,6 @@ Example: | |||
63 | 62 | ||
64 | i2c-arbitrator { | 63 | i2c-arbitrator { |
65 | compatible = "i2c-arb-gpio-challenge"; | 64 | compatible = "i2c-arb-gpio-challenge"; |
66 | #address-cells = <1>; | ||
67 | #size-cells = <0>; | ||
68 | 65 | ||
69 | i2c-parent = <&{/i2c@12CA0000}>; | 66 | i2c-parent = <&{/i2c@12CA0000}>; |
70 | 67 | ||
@@ -74,8 +71,7 @@ Example: | |||
74 | wait-retry-us = <3000>; | 71 | wait-retry-us = <3000>; |
75 | wait-free-us = <50000>; | 72 | wait-free-us = <50000>; |
76 | 73 | ||
77 | i2c@0 { | 74 | i2c-arb { |
78 | reg = <0>; | ||
79 | #address-cells = <1>; | 75 | #address-cells = <1>; |
80 | #size-cells = <0>; | 76 | #size-cells = <0>; |
81 | 77 | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-arb.txt b/Documentation/devicetree/bindings/i2c/i2c-arb.txt new file mode 100644 index 000000000000..59abf9277bdc --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-arb.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | Common i2c arbitration bus properties. | ||
2 | |||
3 | - i2c-arb child node | ||
4 | |||
5 | Required properties for the i2c-arb child node: | ||
6 | - #address-cells = <1>; | ||
7 | - #size-cells = <0>; | ||
8 | |||
9 | Optional properties for i2c-arb child node: | ||
10 | - Child nodes conforming to i2c bus binding | ||
11 | |||
12 | |||
13 | Example : | ||
14 | |||
15 | /* | ||
16 | An NXP pca9541 I2C bus master selector at address 0x74 | ||
17 | with a NXP pca8574 GPIO expander attached. | ||
18 | */ | ||
19 | |||
20 | arb@74 { | ||
21 | compatible = "nxp,pca9541"; | ||
22 | reg = <0x74>; | ||
23 | |||
24 | i2c-arb { | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <0>; | ||
27 | |||
28 | gpio@38 { | ||
29 | compatible = "nxp,pca8574"; | ||
30 | reg = <0x38>; | ||
31 | #gpio-cells = <2>; | ||
32 | gpio-controller; | ||
33 | }; | ||
34 | }; | ||
35 | }; | ||