[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce1de395-3f60-4f7f-9424-bf036134de94@baylibre.com>
Date: Sun, 19 May 2024 19:18:03 +0200
From: Alexandre Mergnat <amergnat@...libre.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.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
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".
- adding the "ports" support in the documentation and driver (to be parsed).
Still possible I missed something and I doing shit :)
--
Regards,
Alexandre
Powered by blists - more mailing lists