Skip to content

Commit 3fac7f8

Browse files
mairacanalpopcornmix
authored andcommitted
dt-bindings: gpu: v3d: Add per-compatible register restrictions
In order to enforce per-SoC register rules, add per-compatible restrictions. V3D 3.3 (represented by brcm,7268-v3d) has a cache controller (GCA), which is not present in other V3D generations. Declaring these differences helps ensure the DTB accurately reflect the hardware design. While not ideal, this commit keeps the register order flexible for brcm,7268-v3d with the goal to keep the ABI backwards compatible. Signed-off-by: Maíra Canal <[email protected]>
1 parent c2777ee commit 3fac7f8

File tree

1 file changed

+45
-10
lines changed

1 file changed

+45
-10
lines changed

Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,12 @@ properties:
2323
- brcm,7278-v3d
2424

2525
reg:
26-
items:
27-
- description: hub register (required)
28-
- description: core0 register (required)
29-
- description: GCA cache controller register (if GCA controller present)
30-
- description: bridge register (if no external reset controller)
3126
minItems: 2
27+
maxItems: 4
3228

3329
reg-names:
34-
items:
35-
- const: hub
36-
- const: core0
37-
- enum: [ bridge, gca ]
38-
- enum: [ bridge, gca ]
3930
minItems: 2
31+
maxItems: 4
4032

4133
interrupts:
4234
items:
@@ -59,6 +51,49 @@ required:
5951
- reg-names
6052
- interrupts
6153

54+
allOf:
55+
- if:
56+
properties:
57+
compatible:
58+
contains:
59+
enum:
60+
- brcm,2711-v3d
61+
- brcm,2712-v3d
62+
- brcm,7278-v3d
63+
then:
64+
properties:
65+
reg:
66+
items:
67+
- description: hub register (required)
68+
- description: core0 register (required)
69+
- description: bridge register (if no external reset controller)
70+
reg-names:
71+
items:
72+
- const: hub
73+
- const: core0
74+
- const: bridge
75+
- if:
76+
properties:
77+
compatible:
78+
contains:
79+
const: brcm,7268-v3d
80+
then:
81+
properties:
82+
reg:
83+
items:
84+
- description: hub register (required)
85+
- description: core0 register (required)
86+
- description: GCA cache controller register (required)
87+
- description: bridge register (if no external reset controller)
88+
minItems: 3
89+
reg-names:
90+
items:
91+
- const: hub
92+
- const: core0
93+
- enum: [ bridge, gca ]
94+
- enum: [ bridge, gca ]
95+
minItems: 3
96+
6297
additionalProperties: false
6398

6499
examples:

0 commit comments

Comments
 (0)