Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: dt-bindings: renesas,rsnd.yaml: add R-Car Gen4 support

There are no compatible for "reg/reg-names" and "clock-name"
between previous R-Car series and R-Car Gen4.

"reg/reg-names" needs 3 categorize (for Gen1, for Gen2/Gen3, for Gen4),
therefore, use 3 if-then to avoid nested if-then-else.

Move "clock-name" detail properties to under allOf to use if-then-else
for Gen4 or others.

Link: https://lore.kernel.org/all/87zg9vk0ex.wl-kuninori.morimoto.gx@renesas.com/#r
Link: https://lore.kernel.org/all/87r0v2uvm7.wl-kuninori.morimoto.gx@renesas.com/#r
Link: https://lore.kernel.org/all/87r0v1t02h.wl-kuninori.morimoto.gx@renesas.com/#r
Link: https://lore.kernel.org/all/87y1p7bpma.wl-kuninori.morimoto.gx@renesas.com/#r
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/87sffa8g99.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
7f8b5b24 587cbe99

+64 -12
+64 -12
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
··· 101 101 102 102 clock-names: 103 103 description: List of necessary clock names. 104 - minItems: 1 105 - maxItems: 31 106 - items: 107 - oneOf: 108 - - const: ssi-all 109 - - pattern: '^ssi\.[0-9]$' 110 - - pattern: '^src\.[0-9]$' 111 - - pattern: '^mix\.[0-1]$' 112 - - pattern: '^ctu\.[0-1]$' 113 - - pattern: '^dvc\.[0-1]$' 114 - - pattern: '^clk_(a|b|c|i)$' 104 + # details are defined below 115 105 116 106 ports: 117 107 $ref: audio-graph-port.yaml#/definitions/port-base ··· 278 288 279 289 allOf: 280 290 - $ref: dai-common.yaml# 291 + 292 + #-------------------- 293 + # reg/reg-names 294 + #-------------------- 295 + # for Gen1 281 296 - if: 282 297 properties: 283 298 compatible: ··· 298 303 - scu 299 304 - ssi 300 305 - adg 301 - else: 306 + # for Gen2/Gen3 307 + - if: 308 + properties: 309 + compatible: 310 + contains: 311 + enum: 312 + - renesas,rcar_sound-gen2 313 + - renesas,rcar_sound-gen3 314 + then: 302 315 properties: 303 316 reg: 304 317 minItems: 5 ··· 318 315 - ssiu 319 316 - ssi 320 317 - audmapp 318 + # for Gen4 319 + - if: 320 + properties: 321 + compatible: 322 + contains: 323 + const: renesas,rcar_sound-gen4 324 + then: 325 + properties: 326 + reg: 327 + maxItems: 4 328 + reg-names: 329 + items: 330 + enum: 331 + - adg 332 + - ssiu 333 + - ssi 334 + - sdmc 335 + 336 + #-------------------- 337 + # clock-names 338 + #-------------------- 339 + - if: 340 + properties: 341 + compatible: 342 + contains: 343 + const: renesas,rcar_sound-gen4 344 + then: 345 + properties: 346 + clock-names: 347 + maxItems: 3 348 + items: 349 + enum: 350 + - ssi.0 351 + - ssiu.0 352 + - clkin 353 + else: 354 + properties: 355 + clock-names: 356 + minItems: 1 357 + maxItems: 31 358 + items: 359 + oneOf: 360 + - const: ssi-all 361 + - pattern: '^ssi\.[0-9]$' 362 + - pattern: '^src\.[0-9]$' 363 + - pattern: '^mix\.[0-1]$' 364 + - pattern: '^ctu\.[0-1]$' 365 + - pattern: '^dvc\.[0-1]$' 366 + - pattern: '^clk_(a|b|c|i)$' 321 367 322 368 unevaluatedProperties: false 323 369