Skip to content

Commit 0473436

Browse files
committed
Merge tag 'i2c-for-5.20-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull more i2c updates from Wolfram Sang: - two driver fixes for issues introduced this cycle - one trivial driver improvement regarding ACPI - more DTS conversion and additions - documentation updates - subsystem-wide move from strlcpy to strscpy * tag 'i2c-for-5.20-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: docs: i2c: i2c-sysfs: fix hyperlinks docs: i2c: i2c-sysfs: improve wording docs: i2c: instantiating-devices: add syntax coloring to dts and C blocks docs: i2c: smbus-protocol: improve DataLow/DataHigh definition docs: i2c: i2c-protocol: remove unused legend items docs: i2c: i2c-protocol,smbus-protocol: remove nonsense words docs: i2c: i2c-protocol: update introductory paragraph i2c: move core from strlcpy to strscpy i2c: move drivers from strlcpy to strscpy i2c: kempld: Support ACPI I2C device declaration i2c: mediatek: add i2c compatible for MT8188 dt-bindings: i2c: update bindings for mt8188 soc i2c: microchip-corei2c: fix erroneous late ack send dt-bindings: i2c: qcom,i2c-cci: convert to dtschema i2c: qcom-geni: Fix GPI DMA buffer sync-back
2 parents a976835 + fe99b81 commit 0473436

Some content is hidden

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

59 files changed

+370
-181
lines changed

Documentation/devicetree/bindings/i2c/i2c-mt65xx.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ properties:
2727
- const: mediatek,mt8173-i2c
2828
- const: mediatek,mt8183-i2c
2929
- const: mediatek,mt8186-i2c
30+
- const: mediatek,mt8188-i2c
3031
- const: mediatek,mt8192-i2c
3132
- items:
3233
- enum:

Documentation/devicetree/bindings/i2c/i2c-qcom-cci.txt

Lines changed: 0 additions & 96 deletions
This file was deleted.
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/i2c/qcom,i2c-cci.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm Camera Control Interface (CCI) I2C controller
8+
9+
maintainers:
10+
- Loic Poulain <[email protected]>
11+
- Robert Foss <[email protected]>
12+
13+
properties:
14+
compatible:
15+
enum:
16+
- qcom,msm8916-cci
17+
- qcom,msm8974-cci
18+
- qcom,msm8996-cci
19+
- qcom,sdm845-cci
20+
- qcom,sm8250-cci
21+
- qcom,sm8450-cci
22+
23+
"#address-cells":
24+
const: 1
25+
26+
"#size-cells":
27+
const: 0
28+
29+
clocks:
30+
minItems: 4
31+
maxItems: 6
32+
33+
clock-names:
34+
minItems: 4
35+
maxItems: 6
36+
37+
interrupts:
38+
maxItems: 1
39+
40+
power-domains:
41+
maxItems: 1
42+
43+
reg:
44+
maxItems: 1
45+
46+
patternProperties:
47+
"^i2c-bus@[01]$":
48+
$ref: /schemas/i2c/i2c-controller.yaml#
49+
unevaluatedProperties: false
50+
51+
properties:
52+
reg:
53+
maxItems: 1
54+
55+
clock-frequency:
56+
default: 100000
57+
58+
required:
59+
- compatible
60+
- clock-names
61+
- clocks
62+
- interrupts
63+
- reg
64+
65+
allOf:
66+
- if:
67+
properties:
68+
compatible:
69+
contains:
70+
enum:
71+
- qcom,msm8996-cci
72+
then:
73+
required:
74+
- power-domains
75+
76+
- if:
77+
properties:
78+
compatible:
79+
contains:
80+
enum:
81+
- qcom,msm8916-cci
82+
then:
83+
properties:
84+
i2c-bus@1: false
85+
86+
- if:
87+
properties:
88+
compatible:
89+
contains:
90+
enum:
91+
- qcom,msm8916-cci
92+
- qcom,msm8996-cci
93+
then:
94+
properties:
95+
clocks:
96+
maxItems: 4
97+
clock-names:
98+
items:
99+
- const: camss_top_ahb
100+
- const: cci_ahb
101+
- const: cci
102+
- const: camss_ahb
103+
104+
- if:
105+
properties:
106+
compatible:
107+
contains:
108+
enum:
109+
- qcom,sdm845-cci
110+
then:
111+
properties:
112+
clocks:
113+
minItems: 6
114+
clock-names:
115+
items:
116+
- const: camnoc_axi
117+
- const: soc_ahb
118+
- const: slow_ahb_src
119+
- const: cpas_ahb
120+
- const: cci
121+
- const: cci_src
122+
123+
- if:
124+
properties:
125+
compatible:
126+
contains:
127+
enum:
128+
- qcom,sm8250-cci
129+
then:
130+
properties:
131+
clocks:
132+
minItems: 5
133+
maxItems: 5
134+
clock-names:
135+
items:
136+
- const: camnoc_axi
137+
- const: slow_ahb_src
138+
- const: cpas_ahb
139+
- const: cci
140+
- const: cci_src
141+
142+
additionalProperties: false
143+
144+
examples:
145+
- |
146+
#include <dt-bindings/clock/qcom,camcc-sdm845.h>
147+
#include <dt-bindings/gpio/gpio.h>
148+
#include <dt-bindings/interrupt-controller/arm-gic.h>
149+
150+
cci@ac4a000 {
151+
reg = <0x0ac4a000 0x4000>;
152+
compatible = "qcom,sdm845-cci";
153+
#address-cells = <1>;
154+
#size-cells = <0>;
155+
156+
interrupts = <GIC_SPI 460 IRQ_TYPE_EDGE_RISING>;
157+
power-domains = <&clock_camcc TITAN_TOP_GDSC>;
158+
159+
clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>,
160+
<&clock_camcc CAM_CC_SOC_AHB_CLK>,
161+
<&clock_camcc CAM_CC_SLOW_AHB_CLK_SRC>,
162+
<&clock_camcc CAM_CC_CPAS_AHB_CLK>,
163+
<&clock_camcc CAM_CC_CCI_CLK>,
164+
<&clock_camcc CAM_CC_CCI_CLK_SRC>;
165+
clock-names = "camnoc_axi",
166+
"soc_ahb",
167+
"slow_ahb_src",
168+
"cpas_ahb",
169+
"cci",
170+
"cci_src";
171+
172+
assigned-clocks = <&clock_camcc CAM_CC_CAMNOC_AXI_CLK>,
173+
<&clock_camcc CAM_CC_CCI_CLK>;
174+
assigned-clock-rates = <80000000>,
175+
<37500000>;
176+
177+
pinctrl-names = "default", "sleep";
178+
pinctrl-0 = <&cci0_default &cci1_default>;
179+
pinctrl-1 = <&cci0_sleep &cci1_sleep>;
180+
181+
i2c-bus@0 {
182+
reg = <0>;
183+
clock-frequency = <1000000>;
184+
#address-cells = <1>;
185+
#size-cells = <0>;
186+
187+
camera@10 {
188+
compatible = "ovti,ov8856";
189+
reg = <0x10>;
190+
191+
reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
192+
pinctrl-names = "default";
193+
pinctrl-0 = <&cam0_default>;
194+
195+
clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
196+
clock-names = "xvclk";
197+
clock-frequency = <19200000>;
198+
199+
dovdd-supply = <&vreg_lvs1a_1p8>;
200+
avdd-supply = <&cam0_avdd_2v8>;
201+
dvdd-supply = <&cam0_dvdd_1v2>;
202+
203+
port {
204+
ov8856_ep: endpoint {
205+
link-frequencies = /bits/ 64 <360000000 180000000>;
206+
data-lanes = <1 2 3 4>;
207+
remote-endpoint = <&csiphy0_ep>;
208+
};
209+
};
210+
};
211+
};
212+
213+
cci_i2c1: i2c-bus@1 {
214+
reg = <1>;
215+
clock-frequency = <1000000>;
216+
#address-cells = <1>;
217+
#size-cells = <0>;
218+
219+
camera@60 {
220+
compatible = "ovti,ov7251";
221+
reg = <0x60>;
222+
223+
enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
224+
pinctrl-names = "default";
225+
pinctrl-0 = <&cam3_default>;
226+
227+
clocks = <&clock_camcc CAM_CC_MCLK3_CLK>;
228+
clock-names = "xclk";
229+
clock-frequency = <24000000>;
230+
231+
vdddo-supply = <&vreg_lvs1a_1p8>;
232+
vdda-supply = <&cam3_avdd_2v8>;
233+
234+
port {
235+
ov7251_ep: endpoint {
236+
data-lanes = <0 1>;
237+
remote-endpoint = <&csiphy3_ep>;
238+
};
239+
};
240+
};
241+
};
242+
};

Documentation/i2c/i2c-protocol.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
The I2C Protocol
33
================
44

5-
This document describes the I2C protocol. Or will, when it is finished :-)
5+
This document is an overview of the basic I2C transactions and the kernel
6+
APIs to perform them.
67

78
Key to symbols
89
==============
@@ -12,13 +13,9 @@ S Start condition
1213
P Stop condition
1314
Rd/Wr (1 bit) Read/Write bit. Rd equals 1, Wr equals 0.
1415
A, NA (1 bit) Acknowledge (ACK) and Not Acknowledge (NACK) bit
15-
Addr (7 bits) I2C 7 bit address. Note that this can be expanded as usual to
16+
Addr (7 bits) I2C 7 bit address. Note that this can be expanded to
1617
get a 10 bit I2C address.
17-
Comm (8 bits) Command byte, a data byte which often selects a register on
18-
the device.
19-
Data (8 bits) A plain data byte. Sometimes, I write DataLow, DataHigh
20-
for 16 bit data.
21-
Count (8 bits) A data byte containing the length of a block operation.
18+
Data (8 bits) A plain data byte.
2219

2320
[..] Data sent by I2C device, as opposed to data sent by the
2421
host adapter.

0 commit comments

Comments
 (0)