Commit 112450df authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 "Mostly driver updates and refactorization.

  The removal of the XLR driver and the i801 refactoring stand out a
  little. In the core, we enabled async suspend/resume for I2C
  controllers and their clients. No issues were reported during the test
  phase in -next. We will see how this goes for mainline"

* 'i2c/for-mergewindow' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (54 commits)
  i2c: sh_mobile: remove unneeded semicolon
  i2c: riic: Use platform_get_irq() to get the interrupt
  i2c: sh_mobile: Use platform_get_irq_optional() to get the interrupt
  i2c: bcm2835: Use platform_get_irq() to get the interrupt
  i2c: aspeed: Remove unused includes
  dt-bindings: i2c: aspeed: Drop stray '#interrupt-cells'
  i2c: sh_mobile: update to new DMAENGINE API when terminating
  i2c: rcar: update to new DMAENGINE API when terminating
  i2c: exynos5: Fix getting the optional clock
  i2c: designware-pci: Convert to use dev_err_probe()
  i2c: designware-pci: use __maybe_unused for PM functions
  i2c: designware-pci: Group MODULE_*() macros
  i2c: designware-pci: Add a note about struct dw_scl_sda_cfg usage
  i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters
  i2c: designware: Do not complete i2c read without RX_FULL interrupt
  eeprom: at24: Add support for 24c1025 EEPROM
  dt-bindings: at24: add at24c1025
  i2c: tegra: use i2c_timings for bus clock freq
  dt-bindings: at24: Rework special case compatible handling
  i2c: i801: Don't clear status flags twice in interrupt mode
  ...
parents 3bad80da bf3c39f5
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -86,6 +86,10 @@ properties:
                  pattern: c1024$
              - items:
                  pattern: cs1024$
              - items:
                  pattern: c1025$
              - items:
                  pattern: cs1025$
              - items:
                  pattern: c2048$
              - items:
@@ -95,17 +99,20 @@ properties:
      # These are special cases that don't conform to the above pattern.
      # Each requires a standard at24 model as fallback.
      - items:
          - const: nxp,se97b
          - const: atmel,24c02
          - enum:
              - rohm,br24g01
              - rohm,br24t01
          - const: atmel,24c01
      - items:
          - const: onnn,cat24c04
          - const: atmel,24c04
          - enum:
              - nxp,se97b
              - renesas,r1ex24002
          - const: atmel,24c02
      - items:
          - const: onnn,cat24c05
          - enum:
              - onnn,cat24c04
              - onnn,cat24c05
          - const: atmel,24c04
      - items:
          - const: renesas,r1ex24002
          - const: atmel,24c02
      - items:
          - const: renesas,r1ex24016
          - const: atmel,24c16
@@ -115,12 +122,6 @@ properties:
      - items:
          - const: renesas,r1ex24128
          - const: atmel,24c128
      - items:
          - const: rohm,br24g01
          - const: atmel,24c01
      - items:
          - const: rohm,br24t01
          - const: atmel,24c01

  label:
    description: Descriptive name of the EEPROM.
+0 −22
Original line number Diff line number Diff line
Broadcom BCM2835 I2C controller

Required properties:
- compatible : Should be one of:
	"brcm,bcm2711-i2c"
	"brcm,bcm2835-i2c"
- reg: Should contain register location and length.
- interrupts: Should contain interrupt.
- clocks : The clock feeding the I2C controller.

Recommended properties:
- clock-frequency : desired I2C bus clock frequency in Hz.

Example:

i2c@7e205000 {
	compatible = "brcm,bcm2835-i2c";
	reg = <0x7e205000 0x1000>;
	interrupts = <2 21>;
	clocks = <&clk_i2c>;
	clock-frequency = <100000>;
};
+54 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/brcm,bcm2835-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom BCM2835 I2C controller

maintainers:
  - Stephen Warren <swarren@wwwdotorg.org>

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

properties:
  compatible:
    oneOf:
      - enum:
          - brcm,bcm2835-i2c
      - items:
          - const: brcm,bcm2711-i2c
          - const: brcm,bcm2835-i2c

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clock-names:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-frequency: true

required:
  - compatible
  - reg
  - interrupts
  - clocks

unevaluatedProperties: false

examples:
  - |
    i2c@7e205000 {
        compatible = "brcm,bcm2835-i2c";
        reg = <0x7e205000 0x1000>;
        interrupts = <2 21>;
        clocks = <&clk_i2c>;
        clock-frequency = <100000>;
    };
+0 −53
Original line number Diff line number Diff line
* Samsung's High Speed I2C controller

The Samsung's High Speed I2C controller is used to interface with I2C devices
at various speeds ranging from 100khz to 3.4Mhz.

Required properties:
  - compatible: value should be.
	-> "samsung,exynos5-hsi2c", (DEPRECATED)
				for i2c compatible with HSI2C available
				on Exynos5250 and Exynos5420 SoCs.
	-> "samsung,exynos5250-hsi2c", for i2c compatible with HSI2C available
				on Exynos5250 and Exynos5420 SoCs.
	-> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
				on Exynos5260 SoCs.
	-> "samsung,exynos7-hsi2c", for i2c compatible with HSI2C available
				on Exynos7 SoCs.

  - reg: physical base address of the controller and length of memory mapped
    region.
  - interrupts: interrupt number to the cpu.
  - #address-cells: always 1 (for i2c addresses)
  - #size-cells: always 0

  - Pinctrl:
    - pinctrl-0: Pin control group to be used for this controller.
    - pinctrl-names: Should contain only one value - "default".

Optional properties:
  - clock-frequency: Desired operating frequency in Hz of the bus.
    -> If not specified, the bus operates in fast-speed mode at
       at 100khz.
    -> If specified, the bus operates in high-speed mode only if the
       clock-frequency is >= 1Mhz.

Example:

hsi2c@12ca0000 {
	compatible = "samsung,exynos5250-hsi2c";
	reg = <0x12ca0000 0x100>;
	interrupts = <56>;
	clock-frequency = <100000>;

	pinctrl-0 = <&i2c4_bus>;
	pinctrl-names = "default";

	#address-cells = <1>;
	#size-cells = <0>;

	s2mps11_pmic@66 {
		compatible = "samsung,s2mps11-pmic";
		reg = <0x66>;
	};
};
+133 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/i2c-exynos5.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Samsung's High Speed I2C controller

maintainers:
  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

description: |
  The Samsung's High Speed I2C controller is used to interface with I2C devices
  at various speeds ranging from 100kHz to 3.4MHz.

  In case the HSI2C controller is encapsulated within USI block (it's the case
  e.g. for Exynos850 and Exynos Auto V9 SoCs), it might be also necessary to
  define USI node in device tree file, choosing "i2c" configuration. Please see
  Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml for details.

properties:
  compatible:
    oneOf:
      - enum:
          - samsung,exynos5250-hsi2c    # Exynos5250 and Exynos5420
          - samsung,exynos5260-hsi2c    # Exynos5260
          - samsung,exynos7-hsi2c       # Exynos7
          - samsung,exynosautov9-hsi2c  # ExynosAutoV9 and Exynos850
      - const: samsung,exynos5-hsi2c    # Exynos5250 and Exynos5420
        deprecated: true

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clock-frequency:
    default: 100000
    description:
      Desired operating frequency in Hz of the bus.

      If not specified, the bus operates in fast-speed mode at 100kHz.

      If specified, the bus operates in high-speed mode only if the
      clock-frequency is >= 1MHz.

  clocks:
    minItems: 1
    items:
      - description: I2C operating clock
      - description: Bus clock (APB)

  clock-names:
    minItems: 1
    items:
      - const: hsi2c
      - const: hsi2c_pclk

required:
  - compatible
  - reg
  - interrupts
  - clocks

allOf:
  - $ref: /schemas/i2c/i2c-controller.yaml#
  - if:
      properties:
        compatible:
          contains:
            enum:
              - samsung,exynosautov9-hsi2c

    then:
      properties:
        clocks:
          minItems: 2

        clock-names:
          minItems: 2

      required:
        - clock-names

    else:
      properties:
        clocks:
          maxItems: 1

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/exynos5420.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    hsi2c_8: i2c@12e00000 {
        compatible = "samsung,exynos5250-hsi2c";
        reg = <0x12e00000 0x1000>;
        interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
        #address-cells = <1>;
        #size-cells = <0>;
        clock-frequency = <100000>;
        clocks = <&clock CLK_USI4>;
        clock-names = "hsi2c";

        pmic@66 {
            /* compatible = "samsung,s2mps11-pmic"; */
            reg = <0x66>;
        };
    };

  - |
    #include <dt-bindings/clock/exynos850.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    hsi2c_2: i2c@138c0000 {
        compatible = "samsung,exynosautov9-hsi2c";
        reg = <0x138c0000 0xc0>;
        interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>;
        #address-cells = <1>;
        #size-cells = <0>;
        clocks = <&cmu_peri CLK_GOUT_HSI2C2_IPCLK>,
                 <&cmu_peri CLK_GOUT_HSI2C2_PCLK>;
        clock-names = "hsi2c", "hsi2c_pclk";

        pmic@66 {
            /* compatible = "samsung,s2mps11-pmic"; */
            reg = <0x66>;
        };
    };
Loading