Commit 70387813 authored by Maxime Ripard's avatar Maxime Ripard Committed by Wolfram Sang
Browse files

dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema



Switch the DT binding to a YAML schema to enable the DT validation.

Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent f16c1408
Loading
Loading
Loading
Loading
+59 −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,brcmstb-i2c
      - brcm,brcmper-i2c

  reg:
    maxItems: 1

  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

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

...
+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
@@ -3431,7 +3431,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>