[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7dbe08cf-47a1-4da6-9035-6b0932cf8426@collabora.com>
Date: Mon, 20 May 2024 12:53:27 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Alexandre Mergnat <amergnat@...libre.com>, chunkuang.hu@...nel.org
Cc: robh@...nel.org, krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
p.zabel@...gutronix.de, airlied@...il.com, daniel@...ll.ch,
maarten.lankhorst@...ux.intel.com, mripard@...nel.org, tzimmermann@...e.de,
matthias.bgg@...il.com, shawn.sung@...iatek.com, yu-chang.lee@...iatek.com,
ck.hu@...iatek.com, jitao.shi@...iatek.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-mediatek@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
wenst@...omium.org, kernel@...labora.com
Subject: Re: [PATCH v4 2/3] dt-bindings: arm: mediatek: mmsys: Add OF graph
support for board path
Il 19/05/24 19:18, Alexandre Mergnat ha scritto:
> Hi Angelo,
>
> On 16/05/2024 10:11, AngeloGioacchino Del Regno wrote:
>> + oneOf:
>> + - required:
>> + - endpoint@0
>> + - required:
>> + - endpoint@1
>> + - required:
>> + - endpoint@2
>
> I'm not sure this is what you expect because I must remove this part to pass the
> dt-validate.
>
> I have 2 possible display at the same time (DSI and DPI), then I add this in my DTSI:
>
> mmsys: syscon@...00000 {
> compatible = "mediatek,mt8365-mmsys", "syscon";
> reg = <0 0x14000000 0 0x1000>;
> #clock-cells = <1>;
> port {
> #address-cells = <1>;
> #size-cells = <0>;
>
> mmsys_main: endpoint@0 {
> reg = <0>;
> remote-endpoint = <&ovl0_in>;
> };
> mmsys_ext: endpoint@1 {
> reg = <1>;
> remote-endpoint = <&rdma1_in>;
> };
> };
> };
>
> But the DTS check returns me an error:
>
> dt-validate -s Documentation/devicetree/bindings
> arch/arm64/boot/dts/mediatek/mt8365-evk.dtb
> /home/*******/linux-upstream/arch/arm64/boot/dts/mediatek/mt8365-evk.dtb:
> syscon@...00000: port: More than one condition true in oneOf schema:
> {'$ref': '/schemas/graph.yaml#/properties/port',
> 'oneOf': [{'required': ['endpoint@0']},
> {'required': ['endpoint@1']},
> {'required': ['endpoint@2']}],
> 'properties': {'endpoint@0': {'$ref':
> '/schemas/graph.yaml#/properties/endpoint'},
> 'endpoint@1': {'$ref':
> '/schemas/graph.yaml#/properties/endpoint'},
> 'endpoint@2': {'$ref':
> '/schemas/graph.yaml#/properties/endpoint'}}}
> from schema $id:
> http://devicetree.org/schemas/arm/mediatek/mediatek,mmsys.yaml#
>
>
> In other hand, if I use "ports" to keep only one endpoint for each port:
>
> mmsys: syscon@...00000 {
> compatible = "mediatek,mt8365-mmsys", "syscon";
> reg = <0 0x14000000 0 0x1000>;
> #clock-cells = <1>;
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
>
> port@0 {
> #address-cells = <1>;
> #size-cells = <0>;
> reg = <0>;
> mmsys_main: endpoint@0 {
> reg = <0>;
> remote-endpoint = <&ovl0_in>;
> };
> };
>
> port@1 {
> #address-cells = <1>;
> #size-cells = <0>;
> reg = <1>;
> mmsys_ext: endpoint@1 {
> reg = <1>;
> remote-endpoint = <&rdma1_in>;
> };
> };
> };
> };
>
> The DTS check returns another error:
>
> dt-validate -s Documentation/devicetree/bindings
> arch/arm64/boot/dts/mediatek/mt8365-evk.dtb
> /home/*******/linux-upstream/arch/arm64/boot/dts/mediatek/mt8365-evk.dtb:
> syscon@...00000: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+'
> from schema $id:
> http://devicetree.org/schemas/arm/mediatek/mediatek,mmsys.yaml#
>
> Additionally, with the last DTS example, displays aren't working, probably because
> "ports" isn't well parsed.
>
> So, I don't know how you want to manage multiple display, but IMHO there are 2 ways:
> - removing the current "oneOf".
..eh I think this should be anyOf instead :-)
I'll check later and send a v5.
Cheers,
Angelo
> - adding the "ports" support in the documentation and driver (to be parsed).
>
> Still possible I missed something and I doing shit :)
>
Powered by blists - more mailing lists