Skip to content

Commit

Permalink
Merge tag 'i2c-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/wsa/linux

Pull i2c updates from Wolfram Sang:

 - new drivers: Microchip CoreI2C, Renesas RZV2M

 - quite some DT schema conversions and extensions

 - and a bunch of driver updates and improvements

* tag 'i2c-for-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (37 commits)
  i2c: extend documentation about retvals of master_xfer functions
  i2c: mux-gpmux: Add of_node_put() when breaking out of loop
  dt-bindings: i2c: i2c-rk3x: Document Rockchip RV1126
  i2c: qcom-geni: Use the correct return value
  i2c: cadence: Support PEC for SMBus block read
  i2c: qcom-geni: Propagate GENI_ABORT_DONE to geni_i2c_abort_xfer()
  i2c: brcmstb: Use dev_name() for adapter name
  i2c: Add Renesas RZ/V2M controller
  dt-bindings: i2c: Document RZ/V2M I2C controller
  i2c: mlxcpld: Add callback to notify probing completion
  i2c: scmi: Replace open coded device_get_match_data()
  i2c: stm32: add support for the STM32MP13 soc
  dt-bindings: i2c: st,stm32-i2c: add entry for stm32mp13
  dt-bindings: i2c: i2c-rk3x: add rk3588 compatible
  i2c: add support for microchip fpga i2c controllers
  i2c: i801: Add support for Intel Meteor Lake-P
  dt-bindings: i2c: nomadik: Add power domain to binding
  dt-bindings: i2c: nomadik: Drop unused voltage supply from example
  i2c: Fix a potential use after free
  i2c: hisi: use HZ_PER_KHZ macro in units.h
  ...
  • Loading branch information
torvalds committed Aug 4, 2022
2 parents f86d1fb + a118214 commit 80dc759
Show file tree
Hide file tree
Showing 33 changed files with 1,655 additions and 262 deletions.
29 changes: 29 additions & 0 deletions Documentation/devicetree/bindings/i2c/arm,i2c-versatile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/arm,i2c-versatile.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: I2C Controller on ARM Ltd development platforms

maintainers:
- Linus Walleij <[email protected]>

allOf:
- $ref: /schemas/i2c/i2c-controller.yaml#

properties:
compatible:
const: arm,versatile-i2c

reg:
maxItems: 1

required:
- compatible
- reg

unevaluatedProperties: false

...

23 changes: 0 additions & 23 deletions Documentation/devicetree/bindings/i2c/i2c-nomadik.txt

This file was deleted.

78 changes: 0 additions & 78 deletions Documentation/devicetree/bindings/i2c/i2c-ocores.txt

This file was deleted.

7 changes: 4 additions & 3 deletions Documentation/devicetree/bindings/i2c/i2c-qcom-cci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PROPERTIES:
Value type: <string>
Definition: must be one of:
"qcom,msm8916-cci"
"qcom,msm8974-cci"
"qcom,msm8996-cci"
"qcom,sdm845-cci"
"qcom,sm8250-cci"
Expand Down Expand Up @@ -43,9 +44,9 @@ PROPERTIES:

SUBNODES:

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

PROPERTIES:

Expand Down
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ properties:
- rockchip,rk3308-i2c
- rockchip,rk3328-i2c
- rockchip,rk3568-i2c
- rockchip,rk3588-i2c
- rockchip,rv1126-i2c
- const: rockchip,rk3399-i2c

reg:
Expand Down
10 changes: 0 additions & 10 deletions Documentation/devicetree/bindings/i2c/i2c-versatile.txt

This file was deleted.

25 changes: 20 additions & 5 deletions Documentation/devicetree/bindings/i2c/nuvoton,npcm7xx-i2c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: nuvoton NPCM7XX I2C Controller Device Tree Bindings

description: |
The NPCM750x includes sixteen I2C bus controllers. All Controllers support
both master and slave mode. Each controller can switch between master and slave
at run time (i.e. IPMB mode). Each controller has two 16 byte HW FIFO for TX and
RX.
I2C bus controllers of the NPCM series support both master and
slave mode. Each controller can switch between master and slave at run time
(i.e. IPMB mode). HW FIFO for TX and RX are supported.
maintainers:
- Tali Perry <[email protected]>

properties:
compatible:
const: nuvoton,npcm750-i2c
enum:
- nuvoton,npcm750-i2c
- nuvoton,npcm845-i2c

reg:
maxItems: 1
Expand All @@ -36,6 +37,10 @@ properties:
default: 100000
enum: [100000, 400000, 1000000]

nuvoton,sys-mgr:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of system manager register node.

required:
- compatible
- reg
Expand All @@ -44,6 +49,15 @@ required:

allOf:
- $ref: /schemas/i2c/i2c-controller.yaml#
- if:
properties:
compatible:
contains:
const: nuvoton,npcm845-i2c

then:
required:
- nuvoton,sys-mgr

unevaluatedProperties: false

Expand All @@ -57,6 +71,7 @@ examples:
clock-frequency = <100000>;
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
compatible = "nuvoton,npcm750-i2c";
nuvoton,sys-mgr = <&gcr>;
};
...
113 changes: 113 additions & 0 deletions Documentation/devicetree/bindings/i2c/opencores,i2c-ocores.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/opencores,i2c-ocores.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: OpenCores I2C controller

maintainers:
- Peter Korsgaard <[email protected]>
- Andrew Lunn <[email protected]>

allOf:
- $ref: /schemas/i2c/i2c-controller.yaml#

properties:
compatible:
oneOf:
- items:
- enum:
- sifive,fu740-c000-i2c # Opencore based IP block FU740-C000 SoC
- sifive,fu540-c000-i2c # Opencore based IP block FU540-C000 SoC
- const: sifive,i2c0
- enum:
- opencores,i2c-ocores
- aeroflexgaisler,i2cmst

reg:
maxItems: 1

interrupts:
maxItems: 1

clocks:
maxItems: 1

clock-frequency:
description: |
clock-frequency property is meant to control the bus frequency for i2c bus
drivers, but it was incorrectly used to specify i2c controller input clock
frequency. So the following rules are set to fix this situation:
- if clock-frequency is present and neither opencores,ip-clock-frequency nor
clocks are, then clock-frequency specifies i2c controller clock frequency.
This is to keep backwards compatibility with setups using old DTB. i2c bus
frequency is fixed at 100 KHz.
- if clocks is present it specifies i2c controller clock. clock-frequency
property specifies i2c bus frequency.
- if opencores,ip-clock-frequency is present it specifies i2c controller
clock frequency. clock-frequency property specifies i2c bus frequency.
default: 100000

reg-io-width:
description: |
io register width in bytes
enum: [1, 2, 4]

reg-shift:
description: |
device register offsets are shifted by this value
default: 0

regstep:
description: |
deprecated, use reg-shift above
deprecated: true

opencores,ip-clock-frequency:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Frequency of the controller clock in Hz. Mutually exclusive with clocks.
See the note above.
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"

oneOf:
- required:
- opencores,ip-clock-frequency
- required:
- clocks

unevaluatedProperties: false

examples:
- |
i2c@a0000000 {
compatible = "opencores,i2c-ocores";
reg = <0xa0000000 0x8>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <10>;
opencores,ip-clock-frequency = <20000000>;
reg-shift = <0>; /* 8 bit registers */
reg-io-width = <1>; /* 8 bit read/write */
};
i2c@b0000000 {
compatible = "opencores,i2c-ocores";
reg = <0xa0000000 0x8>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <10>;
clocks = <&osc>;
clock-frequency = <400000>; /* i2c bus frequency 400 KHz */
reg-shift = <0>; /* 8 bit registers */
reg-io-width = <1>; /* 8 bit read/write */
};
...
Loading

0 comments on commit 80dc759

Please sign in to comment.