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

media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS register space

The binding expects the first register space to be VDEC_SYS. However
this register space is already assigned to a different node on both
MT8173 and MT8183: a clock-controller node called 'vdecsys' which is
also a syscon.

In order to resolve the overlapping address ranges, remove the VDEC_SYS
register space from the video decoder, and add a new property to hold
the phandle to the syscon, so that iospace can still be handled.

Also add reg-names to be able to tell that this new register schema is
used, so the driver can keep backward compatibility.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Nícolas F. R. A. Prado and committed by
Hans Verkuil
5ee1b02a 4115cd8c

+24 -4
+24 -4
Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml
··· 21 21 - mediatek,mt8183-vcodec-dec 22 22 23 23 reg: 24 - maxItems: 12 24 + minItems: 11 25 + maxItems: 11 26 + 27 + reg-names: 28 + items: 29 + - const: misc 30 + - const: ld 31 + - const: top 32 + - const: cm 33 + - const: ad 34 + - const: av 35 + - const: pp 36 + - const: hwd 37 + - const: hwq 38 + - const: hwb 39 + - const: hwg 25 40 26 41 interrupts: 27 42 maxItems: 1 ··· 75 60 description: 76 61 Describes point to scp. 77 62 63 + mediatek,vdecsys: 64 + $ref: /schemas/types.yaml#/definitions/phandle 65 + description: Phandle to the vdecsys syscon node. 66 + 78 67 required: 79 68 - compatible 80 69 - reg ··· 86 67 - clocks 87 68 - clock-names 88 69 - iommus 70 + - mediatek,vdecsys 89 71 90 72 allOf: 91 73 - if: ··· 146 126 #include <dt-bindings/interrupt-controller/irq.h> 147 127 #include <dt-bindings/power/mt8173-power.h> 148 128 149 - vcodec_dec: vcodec@16000000 { 129 + vcodec_dec: vcodec@16020000 { 150 130 compatible = "mediatek,mt8173-vcodec-dec"; 151 - reg = <0x16000000 0x100>, /*VDEC_SYS*/ 152 - <0x16020000 0x1000>, /*VDEC_MISC*/ 131 + reg = <0x16020000 0x1000>, /*VDEC_MISC*/ 153 132 <0x16021000 0x800>, /*VDEC_LD*/ 154 133 <0x16021800 0x800>, /*VDEC_TOP*/ 155 134 <0x16022000 0x1000>, /*VDEC_CM*/ ··· 169 150 <&iommu M4U_PORT_HW_VDEC_VLD_EXT>, 170 151 <&iommu M4U_PORT_HW_VDEC_VLD2_EXT>; 171 152 mediatek,vpu = <&vpu>; 153 + mediatek,vdecsys = <&vdecsys>; 172 154 power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>; 173 155 clocks = <&apmixedsys CLK_APMIXED_VCODECPLL>, 174 156 <&topckgen CLK_TOP_UNIVPLL_D2>,