Skip to content

Commit 5627ecb

Browse files
committed
Merge branch 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: - tracepoints when Linux acts as an I2C client - added support for AMD PSP - whole subsystem now uses generic_handle_irq_safe() - piix4 driver gained MMIO access enabling so far missed controllers with AMD chipsets - a bulk of device driver updates, refactorization, and fixes. * 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (61 commits) i2c: mux: demux-pinctrl: do not deactivate a master that is not active i2c: meson: Fix wrong speed use from probe i2c: add tracepoints for I2C slave events i2c: designware: Remove code duplication i2c: cros-ec-tunnel: Fix syntax errors in comments MAINTAINERS: adjust XLP9XX I2C DRIVER after removing the devicetree binding i2c: designware: Mark dw_i2c_plat_{suspend,resume}() as __maybe_unused i2c: mediatek: Add i2c compatible for Mediatek MT8168 dt-bindings: i2c: update bindings for MT8168 SoC i2c: mt65xx: Simplify with clk-bulk i2c: i801: Drop two outdated comments i2c: xiic: Make bus names unique i2c: i801: Add support for the Process Call command i2c: i801: Drop useless masking in i801_access i2c: tegra: Add SMBus block read function i2c: designware: Use the i2c_mark_adapter_suspended/resumed() helpers i2c: designware: Lock the adapter while setting the suspended flag i2c: mediatek: remove redundant null check i2c: mediatek: modify bus speed calculation formula i2c: designware: Fix improper usage of readl ...
2 parents a060c94 + 1a22aab commit 5627ecb

Some content is hidden

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

50 files changed

+1545
-363
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ Required properties:
1212
"mediatek,mt7622-i2c": for MediaTek MT7622
1313
"mediatek,mt7623-i2c", "mediatek,mt6577-i2c": for MediaTek MT7623
1414
"mediatek,mt7629-i2c", "mediatek,mt2712-i2c": for MediaTek MT7629
15+
"mediatek,mt8168-i2c": for MediaTek MT8168
1516
"mediatek,mt8173-i2c": for MediaTek MT8173
1617
"mediatek,mt8183-i2c": for MediaTek MT8183
18+
"mediatek,mt8186-i2c": for MediaTek MT8186
1719
"mediatek,mt8192-i2c": for MediaTek MT8192
1820
"mediatek,mt8195-i2c", "mediatek,mt8192-i2c": for MediaTek MT8195
1921
"mediatek,mt8516-i2c", "mediatek,mt2712-i2c": for MediaTek MT8516

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ PROPERTIES:
1010
"qcom,msm8996-cci"
1111
"qcom,sdm845-cci"
1212
"qcom,sm8250-cci"
13+
"qcom,sm8450-cci"
1314

1415
- reg
1516
Usage: required
@@ -43,7 +44,8 @@ PROPERTIES:
4344
SUBNODES:
4445

4546
The CCI provides I2C masters for one (msm8916) or two i2c busses (msm8996,
46-
sdm845 and sm8250), described as subdevices named "i2c-bus@0" and "i2c-bus@1".
47+
sdm845, sm8250 and sm8450), described as subdevices named "i2c-bus@0" and
48+
"i2c-bus@1".
4749

4850
PROPERTIES:
4951

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/i2c/microchip,corei2c.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Microchip MPFS I2C Controller Device Tree Bindings
8+
9+
maintainers:
10+
- Daire McNamara <[email protected]>
11+
12+
allOf:
13+
- $ref: /schemas/i2c/i2c-controller.yaml#
14+
15+
properties:
16+
compatible:
17+
oneOf:
18+
- items:
19+
- const: microchip,mpfs-i2c # Microchip PolarFire SoC compatible SoCs
20+
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core
21+
- const: microchip,corei2c-rtl-v7 # Microchip Fabric based i2c IP core
22+
23+
reg:
24+
maxItems: 1
25+
26+
interrupts:
27+
maxItems: 1
28+
29+
clocks:
30+
maxItems: 1
31+
32+
clock-frequency:
33+
description: |
34+
Desired I2C bus clock frequency in Hz. As only Standard and Fast
35+
modes are supported, possible values are 100000 and 400000.
36+
enum: [100000, 400000]
37+
38+
required:
39+
- compatible
40+
- reg
41+
- interrupts
42+
- clocks
43+
44+
unevaluatedProperties: false
45+
46+
examples:
47+
- |
48+
i2c@2010a000 {
49+
compatible = "microchip,mpfs-i2c", "microchip,corei2c-rtl-v7";
50+
reg = <0x2010a000 0x1000>;
51+
clocks = <&clkcfg 15>;
52+
interrupt-parent = <&plic>;
53+
interrupts = <58>;
54+
clock-frequency = <100000>;
55+
};
56+
...

Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ properties:
4949
- renesas,i2c-r8a779a0 # R-Car V3U
5050
- const: renesas,rcar-gen3-i2c # R-Car Gen3 and RZ/G2
5151

52+
- items:
53+
- enum:
54+
- renesas,i2c-r8a779f0 # R-Car S4-8
55+
- const: renesas,rcar-gen4-i2c # R-Car Gen4
56+
5257
reg:
5358
maxItems: 1
5459

@@ -132,6 +137,7 @@ allOf:
132137
enum:
133138
- renesas,rcar-gen2-i2c
134139
- renesas,rcar-gen3-i2c
140+
- renesas,rcar-gen4-i2c
135141
then:
136142
required:
137143
- resets

Documentation/firmware-guide/acpi/enumeration.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,45 @@ In robust cases the client unfortunately needs to call
142142
acpi_dma_request_slave_chan_by_index() directly and therefore choose the
143143
specific FixedDMA resource by its index.
144144

145+
Named Interrupts
146+
================
147+
148+
Drivers enumerated via ACPI can have names to interrupts in the ACPI table
149+
which can be used to get the IRQ number in the driver.
150+
151+
The interrupt name can be listed in _DSD as 'interrupt-names'. The names
152+
should be listed as an array of strings which will map to the Interrupt()
153+
resource in the ACPI table corresponding to its index.
154+
155+
The table below shows an example of its usage::
156+
157+
Device (DEV0) {
158+
...
159+
Name (_CRS, ResourceTemplate() {
160+
...
161+
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
162+
0x20,
163+
0x24
164+
}
165+
})
166+
167+
Name (_DSD, Package () {
168+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
169+
Package () {
170+
Package () {"interrupt-names",
171+
Package (2) {"default", "alert"}},
172+
}
173+
...
174+
})
175+
}
176+
177+
The interrupt name 'default' will correspond to 0x20 in Interrupt()
178+
resource and 'alert' to 0x24. Note that only the Interrupt() resource
179+
is mapped and not GpioInt() or similar.
180+
181+
The driver can call the function - fwnode_irq_get_byname() with the fwnode
182+
and interrupt name as arguments to get the corresponding IRQ number.
183+
145184
SPI serial bus support
146185
======================
147186

Documentation/i2c/busses/i2c-i801.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Supported adapters:
4545
* Intel Jasper Lake (SOC)
4646
* Intel Emmitsburg (PCH)
4747
* Intel Alder Lake (PCH)
48+
* Intel Raptor Lake (PCH)
4849

4950
Datasheets: Publicly available at the Intel website
5051

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18877,6 +18877,7 @@ SYNOPSYS DESIGNWARE I2C DRIVER
1887718877
M: Jarkko Nikula <[email protected]>
1887818878
R: Andy Shevchenko <[email protected]>
1887918879
R: Mika Westerberg <[email protected]>
18880+
R: Jan Dabros <[email protected]>
1888018881
1888118882
S: Maintained
1888218883
F: drivers/i2c/busses/i2c-designware-*
@@ -21520,7 +21521,6 @@ M: George Cherian <[email protected]>
2152021521
2152121522
S: Supported
2152221523
W: http://www.marvell.com
21523-
F: Documentation/devicetree/bindings/i2c/i2c-xlp9xx.txt
2152421524
F: drivers/i2c/busses/i2c-xlp9xx.c
2152521525

2152621526
XRA1403 GPIO EXPANDER

drivers/acpi/acpi_apd.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,13 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
232232
/* Generic apd devices */
233233
#ifdef CONFIG_X86_AMD_PLATFORM_DEVICE
234234
{ "AMD0010", APD_ADDR(cz_i2c_desc) },
235-
{ "AMDI0010", APD_ADDR(wt_i2c_desc) },
236235
{ "AMD0020", APD_ADDR(cz_uart_desc) },
237-
{ "AMDI0020", APD_ADDR(cz_uart_desc) },
238-
{ "AMDI0022", APD_ADDR(cz_uart_desc) },
239236
{ "AMD0030", },
240237
{ "AMD0040", APD_ADDR(fch_misc_desc)},
238+
{ "AMDI0010", APD_ADDR(wt_i2c_desc) },
239+
{ "AMDI0019", APD_ADDR(wt_i2c_desc) },
240+
{ "AMDI0020", APD_ADDR(cz_uart_desc) },
241+
{ "AMDI0022", APD_ADDR(cz_uart_desc) },
241242
{ "HYGO0010", APD_ADDR(wt_i2c_desc) },
242243
#endif
243244
#ifdef CONFIG_ARM64

drivers/base/property.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,35 @@ void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index)
935935
}
936936
EXPORT_SYMBOL(fwnode_iomap);
937937

938+
/**
939+
* fwnode_irq_get_byname - Get IRQ from a fwnode using its name
940+
* @fwnode: Pointer to the firmware node
941+
* @name: IRQ name
942+
*
943+
* Description:
944+
* Find a match to the string @name in the 'interrupt-names' string array
945+
* in _DSD for ACPI, or of_node for Device Tree. Then get the Linux IRQ
946+
* number of the IRQ resource corresponding to the index of the matched
947+
* string.
948+
*
949+
* Return:
950+
* Linux IRQ number on success, or negative errno otherwise.
951+
*/
952+
int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name)
953+
{
954+
int index;
955+
956+
if (!name)
957+
return -EINVAL;
958+
959+
index = fwnode_property_match_string(fwnode, "interrupt-names", name);
960+
if (index < 0)
961+
return index;
962+
963+
return fwnode_irq_get(fwnode, index);
964+
}
965+
EXPORT_SYMBOL(fwnode_irq_get_byname);
966+
938967
/**
939968
* fwnode_graph_get_next_endpoint - Get next endpoint firmware node
940969
* @fwnode: Pointer to the parent firmware node

drivers/i2c/busses/Kconfig

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ menu "I2C Hardware Bus support"
99
comment "PC SMBus host controller drivers"
1010
depends on PCI
1111

12+
config I2C_CCGX_UCSI
13+
tristate
14+
help
15+
A common module to provide an API to instantiate UCSI device
16+
for Cypress CCGx Type-C controller. Individual bus drivers
17+
need to select this one on demand.
18+
1219
config I2C_ALI1535
1320
tristate "ALI 1535"
1421
depends on PCI
@@ -148,6 +155,7 @@ config I2C_I801
148155
Jasper Lake (SOC)
149156
Emmitsburg (PCH)
150157
Alder Lake (PCH)
158+
Raptor Lake (PCH)
151159

152160
This driver can also be built as a module. If so, the module
153161
will be called i2c-i801.
@@ -245,6 +253,7 @@ config I2C_NFORCE2_S4985
245253
config I2C_NVIDIA_GPU
246254
tristate "NVIDIA GPU I2C controller"
247255
depends on PCI
256+
select I2C_CCGX_UCSI
248257
help
249258
If you say yes to this option, support will be included for the
250259
NVIDIA GPU I2C controller which is used to communicate with the GPU's
@@ -477,8 +486,8 @@ config I2C_BCM_KONA
477486

478487
config I2C_BRCMSTB
479488
tristate "BRCM Settop/DSL I2C controller"
480-
depends on ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC || \
481-
ARCH_BCM_63XX || COMPILE_TEST
489+
depends on ARCH_BCM2835 || ARCH_BCM4908 || ARCH_BCM_63XX || \
490+
ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
482491
default y
483492
help
484493
If you say yes to this option, support will be included for the
@@ -553,6 +562,17 @@ config I2C_DESIGNWARE_PLATFORM
553562
This driver can also be built as a module. If so, the module
554563
will be called i2c-designware-platform.
555564

565+
config I2C_DESIGNWARE_AMDPSP
566+
bool "AMD PSP I2C semaphore support"
567+
depends on X86_MSR
568+
depends on ACPI
569+
depends on I2C_DESIGNWARE_PLATFORM
570+
help
571+
This driver enables managed host access to the selected I2C bus shared
572+
between AMD CPU and AMD PSP.
573+
574+
You should say Y if running on an AMD system equipped with the PSP.
575+
556576
config I2C_DESIGNWARE_BAYTRAIL
557577
bool "Intel Baytrail I2C semaphore support"
558578
depends on ACPI
@@ -570,6 +590,7 @@ config I2C_DESIGNWARE_PCI
570590
tristate "Synopsys DesignWare PCI"
571591
depends on PCI
572592
select I2C_DESIGNWARE_CORE
593+
select I2C_CCGX_UCSI
573594
help
574595
If you say yes to this option, support will be included for the
575596
Synopsys DesignWare I2C adapter. Only master mode is supported.

0 commit comments

Comments
 (0)