Commit 008128cd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull i2c updates from Wolfram Sang:

 - new drivers for HPE GXP and Loongson 2K/LS7A

 - bigger refactorings for i801 and xiic

 - gpio driver gained ACPI and SDA-write only support

 - the core converted some OF helpers to fwnode helpers

 - usual bunch of driver updates

* tag 'i2c-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (52 commits)
  MAINTAINERS: Add HPE GXP I2C Support
  i2c: Add GXP SoC I2C Controller
  dt-bindings: i2c: Add hpe,gxp-i2c
  i2c: xiic: Remove some dead code
  i2c: xiic: Add SCL frequency configuration support
  i2c: xiic: Update compatible with new IP version
  dt-bindings: i2c: xiic: Add 'xlnx,axi-iic-2.1' to compatible
  i2c: i801: Call i801_check_post() from i801_access()
  i2c: i801: Call i801_check_pre() from i801_access()
  i2c: i801: Centralize configuring block commands in i801_block_transaction
  i2c: i801: Centralize configuring non-block commands in i801_simple_transaction
  i2c: i801: Handle SMBAUXCTL_E32B in i801_block_transaction_by_block only
  i2c: i801: Add i801_simple_transaction(), complementing i801_block_transaction()
  Documentation: i2c: correct spelling
  dt-bindings: i2c: i2c-st: convert to DT schema
  i2c: i801: add helper i801_set_hstadd()
  i2c: i801: make FEATURE_BLOCK_PROC dependent on FEATURE_BLOCK_BUFFER
  i2c: i801: make FEATURE_HOST_NOTIFY dependent on FEATURE_IRQ
  i2c: i801: improve interrupt handler
  i2c: st: use pm_sleep_ptr to avoid ifdef CONFIG_PM_SLEEP
  ...
parents 39f01344 e8444bb9
Loading
Loading
Loading
Loading
+59 −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/hpe,gxp-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: HPE GXP SoC I2C Controller

maintainers:
  - Nick Hawkins <nick.hawkins@hpe.com>

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

properties:
  compatible:
    const: hpe,gxp-i2c

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clock-frequency:
    default: 100000

  hpe,sysreg:
    $ref: /schemas/types.yaml#/definitions/phandle
    description:
      Phandle to the global status and enable interrupt registers shared
      between each I2C engine controller instance. It enables the I2C
      engine controller to act as both a master or slave by being able to
      arm and respond to interrupts from its engine. Each bit in the
      registers represent the respective bit position.

required:
  - compatible
  - reg
  - interrupts

unevaluatedProperties: false

examples:
  - |
    i2c@2600 {
        compatible = "hpe,gxp-i2c";
        reg = <0x2500 0x70>;
        interrupts = <9>;
        #address-cells = <1>;
        #size-cells = <0>;
        hpe,sysreg = <&sysreg_system_controller>;
        clock-frequency = <10000>;

        eeprom@50 {
            compatible = "atmel,24c128";
            reg = <0x50>;
        };
    };
+26 −0
Original line number Diff line number Diff line
@@ -33,6 +33,10 @@ properties:
      open drain.
    maxItems: 1

  i2c-gpio,sda-output-only:
    description: sda as output only
    type: boolean

  i2c-gpio,scl-output-only:
    description: scl as output only
    type: boolean
@@ -63,6 +67,28 @@ properties:
      GPIO line used for SCL into open drain mode, and that something is not
      the GPIO chip. It is essentially an inconsistency flag.

  i2c-gpio,sda-has-no-pullup:
    type: boolean
    description: sda is used in a non-compliant way and has no pull-up.
      Therefore disable open-drain. This property is mutually-exclusive
      with i2c-gpio,sda-open-drain.

  i2c-gpio,scl-has-no-pullup:
    type: boolean
    description: scl is used in a non-compliant way and has no pull-up.
      Therefore disable open-drain. This property is mutually-exclusive
      with i2c-gpio,scl-open-drain.

dependencies:
  i2c-gpio,sda-has-no-pullup:
    not:
      required:
        - i2c-gpio,sda-open-drain
  i2c-gpio,scl-has-no-pullup:
    not:
      required:
        - i2c-gpio,scl-open-drain

required:
  - compatible
  - sda-gpios
+4 −0
Original line number Diff line number Diff line
@@ -41,6 +41,10 @@ properties:
              - mediatek,mt6797-i2c
              - mediatek,mt7623-i2c
          - const: mediatek,mt6577-i2c
      - items:
          - enum:
              - mediatek,mt8365-i2c
          - const: mediatek,mt8168-i2c
      - items:
          - enum:
              - mediatek,mt8195-i2c
+0 −41
Original line number Diff line number Diff line
ST SSC binding, for I2C mode operation

Required properties :
- compatible : Must be "st,comms-ssc-i2c" or "st,comms-ssc4-i2c"
- reg : Offset and length of the register set for the device
- interrupts : the interrupt specifier
- clock-names: Must contain "ssc".
- clocks: Must contain an entry for each name in clock-names. See the common
  clock bindings.
- A pinctrl state named "default" must be defined to set pins in mode of
  operation for I2C transfer.

Optional properties :
- clock-frequency : Desired I2C bus clock frequency in Hz. If not specified,
  the default 100 kHz frequency will be used. As only Normal and Fast modes
  are supported, possible values are 100000 and 400000.
- st,i2c-min-scl-pulse-width-us : The minimum valid SCL pulse width that is
  allowed through the deglitch circuit. In units of us.
- st,i2c-min-sda-pulse-width-us : The minimum valid SDA pulse width that is
  allowed through the deglitch circuit. In units of us.
- A pinctrl state named "idle" could be defined to set pins in idle state
  when I2C instance is not performing a transfer.
- A pinctrl state named "sleep" could be defined to set pins in sleep state
  when driver enters in suspend.



Example :

i2c0: i2c@fed40000 {
	compatible	= "st,comms-ssc4-i2c";
	reg		= <0xfed40000 0x110>;
	interrupts	=  <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
	clocks		= <&clk_s_a0_ls CLK_ICN_REG>;
	clock-names	= "ssc";
	clock-frequency = <400000>;
	pinctrl-names	= "default";
	pinctrl-0	= <&pinctrl_i2c0_default>;
	st,i2c-min-scl-pulse-width-us = <0>;
	st,i2c-min-sda-pulse-width-us = <5>;
};
+51 −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/loongson,ls2x-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Loongson LS2X I2C Controller

maintainers:
  - Binbin Zhou <zhoubinbin@loongson.cn>

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

properties:
  compatible:
    enum:
      - loongson,ls2k-i2c
      - loongson,ls7a-i2c

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - interrupts

unevaluatedProperties: false

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

    i2c0: i2c@1fe21000 {
        compatible = "loongson,ls2k-i2c";
        reg = <0x1fe21000 0x8>;
        interrupt-parent = <&extioiic>;
        interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
        #address-cells = <1>;
        #size-cells = <0>;

        eeprom@57 {
            compatible = "atmel,24c16";
            reg = <0x57>;
            pagesize = <16>;
        };
    };
Loading