[PATCH 14/38] dt-bindings: media: mediatek,mt8195-jpeg: Allow range number in node address

AngeloGioacchino Del Regno posted 38 patches 6 months, 3 weeks ago
[PATCH 14/38] dt-bindings: media: mediatek,mt8195-jpeg: Allow range number in node address
Posted by AngeloGioacchino Del Regno 6 months, 3 weeks ago
The dual and triple core jpeg encoder and decoder (respectively)
on MT8195 are far apart: the only way to have this to make sense
is to split those in multiple address ranges in device trees as
one big range would overlap with other IP in at least the MT8195
SoC.

Change both the jpegdec and jpegenc bindings to allow specifying
children nodes such as "jpegdec@0,10000", "jpegdec@1,0" or for
encoder "jpegenc@0,0", "jpegenc@1,0" to resolve dtbs_check issues.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../devicetree/bindings/media/mediatek,mt8195-jpegdec.yaml      | 2 +-
 .../devicetree/bindings/media/mediatek,mt8195-jpegenc.yaml      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/mediatek,mt8195-jpegdec.yaml b/Documentation/devicetree/bindings/media/mediatek,mt8195-jpegdec.yaml
index e5448c60e3eb..935f124a9c05 100644
--- a/Documentation/devicetree/bindings/media/mediatek,mt8195-jpegdec.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek,mt8195-jpegdec.yaml
@@ -36,7 +36,7 @@ properties:
 
 # Required child node:
 patternProperties:
-  "^jpgdec@[0-9a-f]+$":
+  "^jpgdec@([0-9],)?[0-9a-f]+$":
     type: object
     description:
       The jpeg decoder hardware device node which should be added as subnodes to
diff --git a/Documentation/devicetree/bindings/media/mediatek,mt8195-jpegenc.yaml b/Documentation/devicetree/bindings/media/mediatek,mt8195-jpegenc.yaml
index 596186497b68..d7a8f2e3bc1a 100644
--- a/Documentation/devicetree/bindings/media/mediatek,mt8195-jpegenc.yaml
+++ b/Documentation/devicetree/bindings/media/mediatek,mt8195-jpegenc.yaml
@@ -36,7 +36,7 @@ properties:
 
 # Required child node:
 patternProperties:
-  "^jpgenc@[0-9a-f]+$":
+  "^jpgenc@([0-9],)?[0-9a-f]+$":
     type: object
     description:
       The jpeg encoder hardware device node which should be added as subnodes to
-- 
2.50.1
Re: [PATCH 14/38] dt-bindings: media: mediatek,mt8195-jpeg: Allow range number in node address
Posted by Krzysztof Kozlowski 6 months, 3 weeks ago
On 24/07/2025 10:38, AngeloGioacchino Del Regno wrote:
> The dual and triple core jpeg encoder and decoder (respectively)
> on MT8195 are far apart: the only way to have this to make sense
> is to split those in multiple address ranges in device trees as
> one big range would overlap with other IP in at least the MT8195
> SoC.
> 
> Change both the jpegdec and jpegenc bindings to allow specifying
> children nodes such as "jpegdec@0,10000", "jpegdec@1,0" or for
> encoder "jpegenc@0,0", "jpegenc@1,0" to resolve dtbs_check issues.


This should not be needed for standard MMIO/simple-bus nodes. I think
DTS is wrong here.

Which cases really need the ','?


Best regards,
Krzysztof
Re: [PATCH 14/38] dt-bindings: media: mediatek,mt8195-jpeg: Allow range number in node address
Posted by AngeloGioacchino Del Regno 6 months, 1 week ago
Il 24/07/25 11:14, Krzysztof Kozlowski ha scritto:
> On 24/07/2025 10:38, AngeloGioacchino Del Regno wrote:
>> The dual and triple core jpeg encoder and decoder (respectively)
>> on MT8195 are far apart: the only way to have this to make sense
>> is to split those in multiple address ranges in device trees as
>> one big range would overlap with other IP in at least the MT8195
>> SoC.
>>
>> Change both the jpegdec and jpegenc bindings to allow specifying
>> children nodes such as "jpegdec@0,10000", "jpegdec@1,0" or for
>> encoder "jpegenc@0,0", "jpegenc@1,0" to resolve dtbs_check issues.
> 
> 
> This should not be needed for standard MMIO/simple-bus nodes. I think
> DTS is wrong here.
> 
> Which cases really need the ','?
> 

All of the multi-core JPEG enc/decoders on MT8195 (and newer).

The DT changes are included in the same series as this commit; check:

20250724083914.61351-35-angelogioacchino.delregno@collabora.com

Cheers,
Angelo
Re: [PATCH 14/38] dt-bindings: media: mediatek,mt8195-jpeg: Allow range number in node address
Posted by AngeloGioacchino Del Regno 5 months ago
Il 04/08/25 11:02, AngeloGioacchino Del Regno ha scritto:
> Il 24/07/25 11:14, Krzysztof Kozlowski ha scritto:
>> On 24/07/2025 10:38, AngeloGioacchino Del Regno wrote:
>>> The dual and triple core jpeg encoder and decoder (respectively)
>>> on MT8195 are far apart: the only way to have this to make sense
>>> is to split those in multiple address ranges in device trees as
>>> one big range would overlap with other IP in at least the MT8195
>>> SoC.
>>>
>>> Change both the jpegdec and jpegenc bindings to allow specifying
>>> children nodes such as "jpegdec@0,10000", "jpegdec@1,0" or for
>>> encoder "jpegenc@0,0", "jpegenc@1,0" to resolve dtbs_check issues.
>>
>>
>> This should not be needed for standard MMIO/simple-bus nodes. I think
>> DTS is wrong here.
>>
>> Which cases really need the ','?
>>
> 
> All of the multi-core JPEG enc/decoders on MT8195 (and newer).
> 
> The DT changes are included in the same series as this commit; check:
> 
> 20250724083914.61351-35-angelogioacchino.delregno@collabora.com
> 
> Cheers,
> Angelo
> 

Any further comments on this?

Regards,
Angelo
Re: [PATCH 14/38] dt-bindings: media: mediatek,mt8195-jpeg: Allow range number in node address
Posted by Krzysztof Kozlowski 5 months ago
On 12/09/2025 11:00, AngeloGioacchino Del Regno wrote:
> Il 04/08/25 11:02, AngeloGioacchino Del Regno ha scritto:
>> Il 24/07/25 11:14, Krzysztof Kozlowski ha scritto:
>>> On 24/07/2025 10:38, AngeloGioacchino Del Regno wrote:
>>>> The dual and triple core jpeg encoder and decoder (respectively)
>>>> on MT8195 are far apart: the only way to have this to make sense
>>>> is to split those in multiple address ranges in device trees as
>>>> one big range would overlap with other IP in at least the MT8195
>>>> SoC.
>>>>
>>>> Change both the jpegdec and jpegenc bindings to allow specifying
>>>> children nodes such as "jpegdec@0,10000", "jpegdec@1,0" or for
>>>> encoder "jpegenc@0,0", "jpegenc@1,0" to resolve dtbs_check issues.
>>>
>>>
>>> This should not be needed for standard MMIO/simple-bus nodes. I think
>>> DTS is wrong here.
>>>
>>> Which cases really need the ','?
>>>
>>
>> All of the multi-core JPEG enc/decoders on MT8195 (and newer).
>>
>> The DT changes are included in the same series as this commit; check:
>>
>> 20250724083914.61351-35-angelogioacchino.delregno@collabora.com
>>
>> Cheers,
>> Angelo
>>
> 
> Any further comments on this?

Well yeah, that's still wrong. These are simple MMIO, so comma is not
correct. Rob already commented on this at v1 of Ariel's patchset. It was
BTW the same device - mt8195 jpeg!


Best regards,
Krzysztof