Commit 80dc7593 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents f86d1fbb a1182149
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
# 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 <linus.walleij@linaro.org>

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

properties:
  compatible:
    const: arm,versatile-i2c

  reg:
    maxItems: 1

required:
  - compatible
  - reg

unevaluatedProperties: false

...
+0 −23
Original line number Diff line number Diff line
I2C for Nomadik based systems

Required (non-standard) properties:
 - Nil

Recommended (non-standard) properties:
 - clock-frequency : Maximum bus clock frequency for the device

Optional (non-standard) properties:
 - Nil

Example :

i2c@80004000 {
        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c";
        reg = <0x80004000 0x1000>;
        interrupts = <0 21 0x4>;
        #address-cells = <1>;
        #size-cells = <0>;
        v-i2c-supply = <&db8500_vape_reg>;

        clock-frequency = <400000>;
};
+0 −78
Original line number Diff line number Diff line
Device tree configuration for i2c-ocores

Required properties:
- compatible      : "opencores,i2c-ocores"
                    "aeroflexgaisler,i2cmst"
                    "sifive,fu540-c000-i2c", "sifive,i2c0"
                    For Opencore based I2C IP block reimplemented in
                    FU540-C000 SoC.
                    "sifive,fu740-c000-i2c", "sifive,i2c0"
                    For Opencore based I2C IP block reimplemented in
                    FU740-C000 SoC.
                    Please refer to sifive-blocks-ip-versioning.txt for
                    additional details.
- reg             : bus address start and address range size of device
- clocks          : handle to the controller clock; see the note below.
                    Mutually exclusive with opencores,ip-clock-frequency
- opencores,ip-clock-frequency: frequency of the controller clock in Hz;
                    see the note below. Mutually exclusive with clocks
- #address-cells  : should be <1>
- #size-cells     : should be <0>

Optional properties:
- interrupts      : interrupt number.
- clock-frequency : frequency of bus clock in Hz; see the note below.
                    Defaults to 100 KHz when the property is not specified
- reg-shift       : device register offsets are shifted by this value
- reg-io-width    : io register width in bytes (1, 2 or 4)
- regstep         : deprecated, use reg-shift above

Note
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.

Examples:

	i2c0: ocores@a0000000 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "opencores,i2c-ocores";
		reg = <0xa0000000 0x8>;
		interrupts = <10>;
		opencores,ip-clock-frequency = <20000000>;

		reg-shift = <0>;	/* 8 bit registers */
		reg-io-width = <1>;	/* 8 bit read/write */

		dummy@60 {
			compatible = "dummy";
			reg = <0x60>;
		};
	};
or
	i2c0: ocores@a0000000 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "opencores,i2c-ocores";
		reg = <0xa0000000 0x8>;
		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 */

		dummy@60 {
			compatible = "dummy";
			reg = <0x60>;
		};
	};
+4 −3
Original line number Diff line number Diff line
@@ -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"
@@ -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:

+2 −0
Original line number Diff line number Diff line
@@ -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:
Loading