bcm27xx: update patches from RPi foundation
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0514-dt-bindings-i2c-brcmstb-Add-BCM2711-BSC-AUTO-I2C-bin.patch
1 From 16a6810e521eaf24249085b93b467f7bdf8e8a47 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Tue, 17 Dec 2019 09:58:34 +0100
4 Subject: [PATCH] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C
5 binding
6
7 The HDMI blocks in the BCM2771 have an i2c controller to retrieve the
8 EDID. This block is split into two parts, the BSC and the AUTO_I2C,
9 lying in two separate register areas.
10
11 The AUTO_I2C block has a mailbox-like interface and will take away the
12 BSC control from the CPU if enabled. However, the BSC is the actually
13 the same controller than the one supported by the brcmstb driver, and
14 the AUTO_I2C doesn't really bring any immediate benefit.
15
16 We can model it in the DT as a single device with two register range,
17 which will allow us to use or or the other in the driver without
18 changing anything in the DT.
19
20 Cc: Kamal Dasu <kdasu.kdev@gmail.com>
21 Cc: Wolfram Sang <wsa@the-dreams.de>
22 Cc: bcm-kernel-feedback-list@broadcom.com
23 Cc: linux-i2c@vger.kernel.org
24 Cc: devicetree@vger.kernel.org
25 Acked-by: Florian Fainelli <f.fainelli@gmail.com>
26 Reviewed-by: Rob Herring <robh+dt@kernel.org>
27 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
28 ---
29 .../bindings/i2c/brcm,brcmstb-i2c.yaml | 40 ++++++++++++++++++-
30 1 file changed, 39 insertions(+), 1 deletion(-)
31
32 --- a/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
33 +++ b/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
34 @@ -15,11 +15,21 @@ allOf:
35 properties:
36 compatible:
37 enum:
38 + - brcm,bcm2711-hdmi-i2c
39 - brcm,brcmstb-i2c
40 - brcm,brcmper-i2c
41
42 reg:
43 - maxItems: 1
44 + minItems: 1
45 + maxItems: 2
46 + items:
47 + - description: BSC register range
48 + - description: Auto-I2C register range
49 +
50 + reg-names:
51 + items:
52 + - const: bsc
53 + - const: auto-i2c
54
55 interrupts:
56 maxItems: 1
57 @@ -45,6 +55,26 @@ required:
58
59 unevaluatedProperties: false
60
61 +if:
62 + properties:
63 + compatible:
64 + contains:
65 + enum:
66 + - brcm,bcm2711-hdmi-i2c
67 +
68 +then:
69 + properties:
70 + reg:
71 + minItems: 2
72 +
73 + required:
74 + - reg-names
75 +
76 +else:
77 + properties:
78 + reg:
79 + maxItems: 1
80 +
81 examples:
82 - |
83 bsca: i2c@f0406200 {
84 @@ -56,4 +86,12 @@ examples:
85 interrupt-names = "upg_bsca";
86 };
87
88 + - |
89 + ddc0: i2c@7ef04500 {
90 + compatible = "brcm,bcm2711-hdmi-i2c";
91 + reg = <0x7ef04500 0x100>, <0x7ef00b00 0x300>;
92 + reg-names = "bsc", "auto-i2c";
93 + clock-frequency = <390000>;
94 + };
95 +
96 ...