01bdfee303e4ed6fa72083e3507d6b70f44dcb77
[openwrt/staging/mkresin.git] /
1 From 1a2a857af4fe6748fea53799e0007672faa7aa57 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 13 Feb 2020 16:55:01 +0100
4 Subject: [PATCH] dt-bindings: i2c: brcmstb: Convert the BRCMSTB
5 binding to a schema
6
7 Switch the DT binding to a YAML schema to enable the DT validation.
8
9 Cc: Kamal Dasu <kdasu.kdev@gmail.com>
10 Cc: Wolfram Sang <wsa@the-dreams.de>
11 Cc: bcm-kernel-feedback-list@broadcom.com
12 Cc: linux-i2c@vger.kernel.org
13 Cc: devicetree@vger.kernel.org
14 Acked-by: Florian Fainelli <f.fainelli@gmail.com>
15 Reviewed-by: Rob Herring <robh+dt@kernel.org>
16 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
17 ---
18 .../bindings/i2c/brcm,brcmstb-i2c.yaml | 59 +++++++++++++++++++
19 .../devicetree/bindings/i2c/i2c-brcmstb.txt | 26 --------
20 MAINTAINERS | 2 +-
21 3 files changed, 60 insertions(+), 27 deletions(-)
22 create mode 100644 Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
23 delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
24
25 --- /dev/null
26 +++ b/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
27 @@ -0,0 +1,59 @@
28 +# SPDX-License-Identifier: GPL-2.0
29 +%YAML 1.2
30 +---
31 +$id: http://devicetree.org/schemas/i2c/brcm,brcmstb-i2c.yaml#
32 +$schema: http://devicetree.org/meta-schemas/core.yaml#
33 +
34 +title: Broadcom STB BSC IIC Master Controller
35 +
36 +maintainers:
37 + - Kamal Dasu <kdasu.kdev@gmail.com>
38 +
39 +allOf:
40 + - $ref: /schemas/i2c/i2c-controller.yaml#
41 +
42 +properties:
43 + compatible:
44 + enum:
45 + - brcm,brcmstb-i2c
46 + - brcm,brcmper-i2c
47 +
48 + reg:
49 + maxItems: 1
50 +
51 + interrupts:
52 + maxItems: 1
53 +
54 + interrupt-names:
55 + maxItems: 1
56 +
57 + clock-frequency:
58 + enum:
59 + - 46875
60 + - 50000
61 + - 93750
62 + - 97500
63 + - 187500
64 + - 200000
65 + - 375000
66 + - 390000
67 +
68 +required:
69 + - compatible
70 + - reg
71 + - clock-frequency
72 +
73 +unevaluatedProperties: false
74 +
75 +examples:
76 + - |
77 + bsca: i2c@f0406200 {
78 + clock-frequency = <390000>;
79 + compatible = "brcm,brcmstb-i2c";
80 + interrupt-parent = <&irq0_intc>;
81 + reg = <0xf0406200 0x58>;
82 + interrupts = <0x18>;
83 + interrupt-names = "upg_bsca";
84 + };
85 +
86 +...
87 --- a/Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
88 +++ /dev/null
89 @@ -1,26 +0,0 @@
90 -Broadcom stb bsc iic master controller
91 -
92 -Required properties:
93 -
94 -- compatible: should be "brcm,brcmstb-i2c" or "brcm,brcmper-i2c"
95 -- clock-frequency: 32-bit decimal value of iic master clock freqency in Hz
96 - valid values are 375000, 390000, 187500, 200000
97 - 93750, 97500, 46875 and 50000
98 -- reg: specifies the base physical address and size of the registers
99 -
100 -Optional properties :
101 -
102 -- interrupts: specifies the interrupt number, the irq line to be used
103 -- interrupt-names: Interrupt name string
104 -
105 -Example:
106 -
107 -bsca: i2c@f0406200 {
108 - clock-frequency = <390000>;
109 - compatible = "brcm,brcmstb-i2c";
110 - interrupt-parent = <&irq0_intc>;
111 - reg = <0xf0406200 0x58>;
112 - interrupts = <0x18>;
113 - interrupt-names = "upg_bsca";
114 -};
115 -
116 --- a/MAINTAINERS
117 +++ b/MAINTAINERS
118 @@ -3349,7 +3349,7 @@ L: linux-i2c@vger.kernel.org
119 L: bcm-kernel-feedback-list@broadcom.com
120 S: Supported
121 F: drivers/i2c/busses/i2c-brcmstb.c
122 -F: Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
123 +F: Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
124
125 BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER
126 M: Al Cooper <alcooperx@gmail.com>