Skip to content

Commit 91fa588

Browse files
committed
Merge branch 'i2c/for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: "I2C has quite some patches for you this time. I hope it is the move to per-driver-maintainers which is now showing results. We will see. The big news is two new drivers (Nuvoton NPCM and Qualcomm CCI), larger refactoring of the Designware, Tegra, and PXA drivers, the Cadence driver supports being a slave now, and there is support to instanciate SPD eeproms for well-known cases (which will be user-visible because the i801 driver supports it), and some devm_platform_ioremap_resource() conversions which blow up the diffstat. Note that I applied the Nuvoton driver quite late, so some minor fixup patches arrived during the merge window. I chose to apply them right away because they were trivial" * 'i2c/for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (109 commits) i2c: Drop stray comma in MODULE_AUTHOR statements i2c: npcm7xx: npcm_i2caddr[] can be static MAINTAINERS: npcm7xx: Add maintainer for Nuvoton NPCM BMC i2c: npcm7xx: Fix a couple of error codes in probe i2c: icy: Fix build with CONFIG_AMIGA_PCMCIA=n i2c: npcm7xx: Remove unnecessary parentheses i2c: npcm7xx: Add support for slave mode for Nuvoton i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver dt-bindings: i2c: npcm7xx: add NPCM I2C controller i2c: pxa: don't error out if there's no pinctrl i2c: add 'single-master' property to generic bindings i2c: designware: Add Baikal-T1 System I2C support i2c: designware: Move reg-space remapping into a dedicated function i2c: designware: Retrieve quirk flags as early as possible i2c: designware: Convert driver to using regmap API i2c: designware: Discard Cherry Trail model flag i2c: designware: Add Baytrail sem config DW I2C platform dependency i2c: designware: slave: Set DW I2C core module dependency i2c: designware: Use `-y` to build multi-object modules dt-bindings: i2c: dw: Add Baikal-T1 SoC I2C controller ...
2 parents ac911b3 + d790eeb commit 91fa588

Some content is hidden

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

80 files changed

+5901
-1425
lines changed

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

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Qualcomm Camera Control Interface (CCI) I2C controller
2+
3+
PROPERTIES:
4+
5+
- compatible:
6+
Usage: required
7+
Value type: <string>
8+
Definition: must be one of:
9+
"qcom,msm8916-cci"
10+
"qcom,msm8996-cci"
11+
"qcom,sdm845-cci"
12+
13+
- reg
14+
Usage: required
15+
Value type: <prop-encoded-array>
16+
Definition: base address CCI I2C controller and length of memory
17+
mapped region.
18+
19+
- interrupts:
20+
Usage: required
21+
Value type: <prop-encoded-array>
22+
Definition: specifies the CCI I2C interrupt. The format of the
23+
specifier is defined by the binding document describing
24+
the node's interrupt parent.
25+
26+
- clocks:
27+
Usage: required
28+
Value type: <prop-encoded-array>
29+
Definition: a list of phandle, should contain an entry for each
30+
entries in clock-names.
31+
32+
- clock-names
33+
Usage: required
34+
Value type: <string>
35+
Definition: a list of clock names, must include "cci" clock.
36+
37+
- power-domains
38+
Usage: required for "qcom,msm8996-cci"
39+
Value type: <prop-encoded-array>
40+
Definition:
41+
42+
SUBNODES:
43+
44+
The CCI provides I2C masters for one (msm8916) or two i2c busses (msm8996 and
45+
sdm845), described as subdevices named "i2c-bus@0" and "i2c-bus@1".
46+
47+
PROPERTIES:
48+
49+
- reg:
50+
Usage: required
51+
Value type: <u32>
52+
Definition: Index of the CCI bus/master
53+
54+
- clock-frequency:
55+
Usage: optional
56+
Value type: <u32>
57+
Definition: Desired I2C bus clock frequency in Hz, defaults to 100
58+
kHz if omitted.
59+
60+
Example:
61+
62+
cci@a0c000 {
63+
compatible = "qcom,msm8996-cci";
64+
#address-cells = <1>;
65+
#size-cells = <0>;
66+
reg = <0xa0c000 0x1000>;
67+
interrupts = <GIC_SPI 295 IRQ_TYPE_EDGE_RISING>;
68+
clocks = <&mmcc MMSS_MMAGIC_AHB_CLK>,
69+
<&mmcc CAMSS_TOP_AHB_CLK>,
70+
<&mmcc CAMSS_CCI_AHB_CLK>,
71+
<&mmcc CAMSS_CCI_CLK>,
72+
<&mmcc CAMSS_AHB_CLK>;
73+
clock-names = "mmss_mmagic_ahb",
74+
"camss_top_ahb",
75+
"cci_ahb",
76+
"cci",
77+
"camss_ahb";
78+
79+
i2c-bus@0 {
80+
reg = <0>;
81+
clock-frequency = <400000>;
82+
#address-cells = <1>;
83+
#size-cells = <0>;
84+
};
85+
86+
i2c-bus@1 {
87+
reg = <1>;
88+
clock-frequency = <400000>;
89+
#address-cells = <1>;
90+
#size-cells = <0>;
91+
};
92+
};

Documentation/devicetree/bindings/i2c/i2c.txt

Lines changed: 45 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,26 @@ Generic device tree bindings for I2C busses
22
===========================================
33

44
This document describes generic bindings which can be used to describe I2C
5-
busses in a device tree.
5+
busses and their child devices in a device tree.
66

7-
Required properties
8-
-------------------
7+
Required properties (per bus)
8+
-----------------------------
99

1010
- #address-cells - should be <1>. Read more about addresses below.
1111
- #size-cells - should be <0>.
12-
- compatible - name of I2C bus controller following generic names
13-
recommended practice.
12+
- compatible - name of I2C bus controller
1413

1514
For other required properties e.g. to describe register sets,
1615
clocks, etc. check the binding documentation of the specific driver.
1716

1817
The cells properties above define that an address of children of an I2C bus
19-
are described by a single value. This is usually a 7 bit address. However,
20-
flags can be attached to the address. I2C_TEN_BIT_ADDRESS is used to mark a 10
21-
bit address. It is needed to avoid the ambiguity between e.g. a 7 bit address
22-
of 0x50 and a 10 bit address of 0x050 which, in theory, can be on the same bus.
23-
Another flag is I2C_OWN_SLAVE_ADDRESS to mark addresses on which we listen to
24-
be devices ourselves.
18+
are described by a single value.
2519

26-
Optional properties
27-
-------------------
20+
Optional properties (per bus)
21+
-----------------------------
2822

2923
These properties may not be supported by all drivers. However, if a driver
30-
wants to support one of the below features, it should adapt the bindings below.
24+
wants to support one of the below features, it should adapt these bindings.
3125

3226
- clock-frequency
3327
frequency of bus clock in Hz.
@@ -73,31 +67,54 @@ wants to support one of the below features, it should adapt the bindings below.
7367
i2c bus clock frequency (clock-frequency).
7468
Specified in Hz.
7569

76-
- interrupts
77-
interrupts used by the device.
78-
79-
- interrupt-names
80-
"irq", "wakeup" and "smbus_alert" names are recognized by I2C core,
81-
other names are left to individual drivers.
82-
83-
- host-notify
84-
device uses SMBus host notify protocol instead of interrupt line.
85-
8670
- multi-master
8771
states that there is another master active on this bus. The OS can use
8872
this information to adapt power management to keep the arbitration awake
89-
all the time, for example.
73+
all the time, for example. Can not be combined with 'single-master'.
9074

91-
- wakeup-source
92-
device can be used as a wakeup source.
75+
- single-master
76+
states that there is no other master active on this bus. The OS can use
77+
this information to detect a stalled bus more reliably, for example.
78+
Can not be combined with 'multi-master'.
79+
80+
Required properties (per child device)
81+
--------------------------------------
82+
83+
- compatible
84+
name of I2C slave device
9385

9486
- reg
95-
I2C slave addresses
87+
One or many I2C slave addresses. These are usually a 7 bit addresses.
88+
However, flags can be attached to an address. I2C_TEN_BIT_ADDRESS is
89+
used to mark a 10 bit address. It is needed to avoid the ambiguity
90+
between e.g. a 7 bit address of 0x50 and a 10 bit address of 0x050
91+
which, in theory, can be on the same bus.
92+
Another flag is I2C_OWN_SLAVE_ADDRESS to mark addresses on which we
93+
listen to be devices ourselves.
94+
95+
Optional properties (per child device)
96+
--------------------------------------
97+
98+
These properties may not be supported by all drivers. However, if a driver
99+
wants to support one of the below features, it should adapt these bindings.
100+
101+
- host-notify
102+
device uses SMBus host notify protocol instead of interrupt line.
103+
104+
- interrupts
105+
interrupts used by the device.
106+
107+
- interrupt-names
108+
"irq", "wakeup" and "smbus_alert" names are recognized by I2C core,
109+
other names are left to individual drivers.
96110

97111
- reg-names
98112
Names of map programmable addresses.
99113
It can contain any map needing another address than default one.
100114

115+
- wakeup-source
116+
device can be used as a wakeup source.
117+
101118
Binding may contain optional "interrupts" property, describing interrupts
102119
used by the device. I2C core will assign "irq" interrupt (or the very first
103120
interrupt if not using interrupt names) as primary interrupt for the slave.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/i2c/nuvoton,npcm7xx-i2c.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: nuvoton NPCM7XX I2C Controller Device Tree Bindings
8+
9+
description: |
10+
The NPCM750x includes sixteen I2C bus controllers. All Controllers support
11+
both master and slave mode. Each controller can switch between master and slave
12+
at run time (i.e. IPMB mode). Each controller has two 16 byte HW FIFO for TX and
13+
RX.
14+
15+
maintainers:
16+
- Tali Perry <[email protected]>
17+
18+
properties:
19+
compatible:
20+
const: nuvoton,npcm7xx-i2c
21+
22+
reg:
23+
maxItems: 1
24+
25+
interrupts:
26+
maxItems: 1
27+
28+
clocks:
29+
maxItems: 1
30+
description: Reference clock for the I2C bus
31+
32+
clock-frequency:
33+
description: Desired I2C bus clock frequency in Hz. If not specified,
34+
the default 100 kHz frequency will be used.
35+
possible values are 100000, 400000 and 1000000.
36+
default: 100000
37+
enum: [100000, 400000, 1000000]
38+
39+
required:
40+
- compatible
41+
- reg
42+
- interrupts
43+
- clocks
44+
45+
allOf:
46+
- $ref: /schemas/i2c/i2c-controller.yaml#
47+
48+
unevaluatedProperties: false
49+
50+
examples:
51+
- |
52+
#include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
53+
#include <dt-bindings/interrupt-controller/arm-gic.h>
54+
i2c0: i2c@80000 {
55+
reg = <0x80000 0x1000>;
56+
clocks = <&clk NPCM7XX_CLK_APB2>;
57+
clock-frequency = <100000>;
58+
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
59+
compatible = "nuvoton,npcm750-i2c";
60+
};
61+
62+
...

0 commit comments

Comments
 (0)