Commit 5c8db3eb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull i2c updates from Wolfram Sang:
 "I2C has:

   - using defines for bus speeds to avoid mistakes in hardcoded values;
     lots of small driver updates because of that. Thanks, Andy!

   - API change: i2c_setup_smbus_alert() was renamed to
     i2c_new_smbus_alert_device() and returns ERRPTR now. All in-tree
     users have been converted

   - in the core, a rare race condition when deleting the cdev has been
     fixed. Thanks, Kevin!

   - lots of driver updates. Thanks, everyone!

  I also want to mention: The amount of review and testing tags given
  was quite high this time. Thank you to these people, too. I hope we
  can keep it like this!"

* 'i2c/for-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (34 commits)
  i2c: rcar: clean up after refactoring i2c_timings
  macintosh: convert to i2c_new_scanned_device
  i2c: drivers: Use generic definitions for bus frequencies
  i2c: algo: Use generic definitions for bus frequencies
  i2c: stm32f7: switch to I²C generic property parsing
  i2c: rcar: Consolidate timings calls in rcar_i2c_clock_calculate()
  i2c: core: Allow override timing properties with 0
  i2c: core: Provide generic definitions for bus frequencies
  i2c: mxs: Use dma_request_chan() instead dma_request_slave_channel()
  i2c: imx: remove duplicate print after platform_get_irq()
  i2c: designware: Fix spelling typos in the comments
  i2c: designware: Discard i2c_dw_read_comp_param() function
  i2c: designware: Detect the FIFO size in the common code
  i2c: dev: Fix the race between the release of i2c_dev and cdev
  i2c: qcom-geni: Drop of_platform.h include
  i2c: qcom-geni: Grow a dev pointer to simplify code
  i2c: qcom-geni: Let firmware specify irq trigger flags
  i2c: stm32f7: do not backup read-only PECR register
  i2c: smbus: remove outdated references to irq level triggers
  i2c: convert SMBus alert setup function to return an ERRPTR
  ...
parents 848960e5 df576bee
Loading
Loading
Loading
Loading
+97 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/brcm,brcmstb-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom STB BSC IIC Master Controller

maintainers:
  - Kamal Dasu <kdasu.kdev@gmail.com>

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

properties:
  compatible:
    enum:
      - brcm,bcm2711-hdmi-i2c
      - brcm,brcmstb-i2c
      - brcm,brcmper-i2c

  reg:
    minItems: 1
    maxItems: 2
    items:
      - description: BSC register range
      - description: Auto-I2C register range

  reg-names:
    items:
      - const: bsc
      - const: auto-i2c

  interrupts:
    maxItems: 1

  interrupt-names:
    maxItems: 1

  clock-frequency:
    enum:
      - 46875
      - 50000
      - 93750
      - 97500
      - 187500
      - 200000
      - 375000
      - 390000

required:
  - compatible
  - reg
  - clock-frequency

unevaluatedProperties: false

if:
  properties:
    compatible:
      contains:
        enum:
          - brcm,bcm2711-hdmi-i2c

then:
  properties:
    reg:
      minItems: 2

  required:
    - reg-names

else:
  properties:
    reg:
      maxItems: 1

examples:
  - |
      bsca: i2c@f0406200 {
          clock-frequency = <390000>;
          compatible = "brcm,brcmstb-i2c";
          interrupt-parent = <&irq0_intc>;
          reg = <0xf0406200 0x58>;
          interrupts = <0x18>;
          interrupt-names = "upg_bsca";
      };

  - |
      ddc0: i2c@7ef04500 {
          compatible = "brcm,bcm2711-hdmi-i2c";
          reg = <0x7ef04500 0x100>, <0x7ef00b00 0x300>;
          reg-names = "bsc", "auto-i2c";
          clock-frequency = <390000>;
      };

...
+10 −0
Original line number Diff line number Diff line
@@ -28,8 +28,13 @@ Optional properties:
	"atmel,sama5d4-i2c",
	"atmel,sama5d2-i2c",
	"microchip,sam9x60-i2c".
- scl-gpios: specify the gpio related to SCL pin
- sda-gpios: specify the gpio related to SDA pin
- pinctrl: add extra pinctrl to configure i2c pins to gpio function for i2c
  bus recovery, call it "gpio" state
- Child nodes conforming to i2c bus binding


Examples :

i2c0: i2c@fff84000 {
@@ -64,6 +69,11 @@ i2c0: i2c@f8034600 {
	clocks = <&flx0>;
	atmel,fifo-size = <16>;
	i2c-sda-hold-time-ns = <336>;
	pinctrl-names = "default", "gpio";
	pinctrl-0 = <&pinctrl_i2c0>;
	pinctrl-1 = <&pinctrl_i2c0_gpio>;
	sda-gpios = <&pioA 30 GPIO_ACTIVE_HIGH>;
	scl-gpios = <&pioA 31 GPIO_ACTIVE_HIGH>;

	wm8731: wm8731@1a {
		compatible = "wm8731";
+0 −26
Original line number Diff line number Diff line
Broadcom stb bsc iic master controller

Required properties:

- compatible: should be "brcm,brcmstb-i2c" or "brcm,brcmper-i2c"
- clock-frequency: 32-bit decimal value of iic master clock freqency in Hz
		   valid values are 375000, 390000, 187500, 200000
		   93750, 97500, 46875 and 50000
- reg: specifies the base physical address and size of the registers

Optional properties :

- interrupts: specifies the interrupt number, the irq line to be used
- interrupt-names: Interrupt name string

Example:

bsca: i2c@f0406200 {
      clock-frequency = <390000>;
      compatible = "brcm,brcmstb-i2c";
      interrupt-parent = <&irq0_intc>;
      reg = <0xf0406200 0x58>;
      interrupts = <0x18>;
      interrupt-names = "upg_bsca";
};
+1 −1
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ to know which slave triggered the interrupt.
This is implemented the following way in the Linux kernel:

* I2C bus drivers which support SMBus alert should call
  i2c_setup_smbus_alert() to setup SMBus alert support.
  i2c_new_smbus_alert_device() to install SMBus alert support.
* I2C drivers for devices which can trigger SMBus alerts should implement
  the optional alert() callback.

+1 −1
Original line number Diff line number Diff line
@@ -3470,7 +3470,7 @@ L: linux-i2c@vger.kernel.org
L:	bcm-kernel-feedback-list@broadcom.com
S:	Supported
F:	drivers/i2c/busses/i2c-brcmstb.c
F:	Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
F:	Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER
M:	Al Cooper <alcooperx@gmail.com>
Loading