Aw: Re: [PATCH v1 1/3] arm64: dts: marvell: Fix anyOf conditional failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Gesendet: Montag, 11. November 2024 um 18:15
&gt; Von: "Andrew Lunn" <andrew@xxxxxxx>
&gt; An: "Rob Herring" <robh@xxxxxxxxxx>
&gt; CC: frank-w@xxxxxxxxxxxxxxx, "Frank Wunderlich" <linux@xxxxxxxxx>, "Damien Le Moal" <dlemoal@xxxxxxxxxx>, "Niklas Cassel" <cassel@xxxxxxxxxx>, "Krzysztof Kozlowski" <krzk+dt@xxxxxxxxxx>, "Conor Dooley" <conor+dt@xxxxxxxxxx>, "Gregory Clement" <gregory.clement@xxxxxxxxxxx>, "Sebastian Hesselbarth" <sebastian.hesselbarth@xxxxxxxxx>, "Russell King" <linux@xxxxxxxxxxxxxxx>, "Hans de Goede" <hdegoede@xxxxxxxxxx>, "Jens Axboe" <axboe@xxxxxxxxx>, linux-ide@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
&gt; Betreff: Re: [PATCH v1 1/3] arm64: dts: marvell: Fix anyOf conditional failed
&gt;
&gt; On Mon, Nov 11, 2024 at 10:25:12AM -0600, Rob Herring wrote:
&gt; &gt; On Sun, Nov 10, 2024 at 3:25 AM Frank Wunderlich
&gt; &gt; <frank-w@xxxxxxxxxxxxxxx> wrote:
&gt; &gt; &gt;
&gt; &gt; &gt; Am 9. November 2024 18:29:44 MEZ schrieb Andrew Lunn <andrew@xxxxxxx>:
&gt; &gt; &gt; &gt;On Sat, Nov 09, 2024 at 10:46:19AM +0100, Frank Wunderlich wrote:
&gt; &gt; &gt; &gt;&gt; From: Frank Wunderlich <frank-w@xxxxxxxxxxxxxxx>
&gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt;&gt; after converting the ahci-platform binding to yaml the following files
&gt; &gt; &gt; &gt;&gt; reporting "'anyOf' conditional failed" on
&gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt;&gt; sata@540000: sata-port@0
&gt; &gt; &gt; &gt;&gt; diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
&gt; &gt; &gt; &gt;&gt; index 1e0ab35cc686..2b5e45d2c5a6 100644
&gt; &gt; &gt; &gt;&gt; --- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
&gt; &gt; &gt; &gt;&gt; +++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
&gt; &gt; &gt; &gt;&gt; @@ -214,6 +214,7 @@ &amp;cp0_sata0 {
&gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt;&gt;      sata-port@1 {
&gt; &gt; &gt; &gt;&gt;              phys = &lt;&amp;cp0_comphy3 1&gt;;
&gt; &gt; &gt; &gt;&gt; +            status = "okay";
&gt; &gt; &gt; &gt;&gt;      };
&gt; &gt; &gt; &gt;&gt;  };
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt;&gt; diff --git a/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts b/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
&gt; &gt; &gt; &gt;&gt; index 7af949092b91..6bdc4f1e6939 100644
&gt; &gt; &gt; &gt;&gt; --- a/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
&gt; &gt; &gt; &gt;&gt; +++ b/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
&gt; &gt; &gt; &gt;&gt; @@ -433,11 +433,13 @@ &amp;cp0_sata0 {
&gt; &gt; &gt; &gt;&gt;      /* 7 + 12 SATA connector (J24) */
&gt; &gt; &gt; &gt;&gt;      sata-port@0 {
&gt; &gt; &gt; &gt;&gt;              phys = &lt;&amp;cp0_comphy2 0&gt;;
&gt; &gt; &gt; &gt;&gt; +            status = "okay";
&gt; &gt; &gt; &gt;&gt;      };
&gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt;&gt;      /* M.2-2250 B-key (J39) */
&gt; &gt; &gt; &gt;&gt;      sata-port@1 {
&gt; &gt; &gt; &gt;&gt;              phys = &lt;&amp;cp0_comphy3 1&gt;;
&gt; &gt; &gt; &gt;&gt; +            status = "okay";
&gt; &gt; &gt; &gt;&gt;      };
&gt; &gt; &gt; &gt;&gt;  };
&gt; &gt; &gt; &gt;&gt; diff --git a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi b/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi
&gt; &gt; &gt; &gt;&gt; index 7e595ac80043..161beec0b6b0 100644
&gt; &gt; &gt; &gt;&gt; --- a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi
&gt; &gt; &gt; &gt;&gt; +++ b/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi
&gt; &gt; &gt; &gt;&gt; @@ -347,10 +347,12 @@ CP11X_LABEL(sata0): sata@540000 {
&gt; &gt; &gt; &gt;&gt;
&gt; &gt; &gt; &gt;&gt;                      sata-port@0 {
&gt; &gt; &gt; &gt;&gt;                              reg = &lt;0&gt;;
&gt; &gt; &gt; &gt;&gt; +                            status = "disabled";
&gt; &gt; &gt; &gt;&gt;                      };
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;I don't know the yaml too well, but it is not obvious how adding a few
&gt; &gt; &gt; &gt;status = "disabled"; status = "okay"; fixes a "'anyOf' conditional failed".
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;Maybe you can expand the explanation a bit?
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;       Andrew
&gt; &gt; &gt;
&gt; &gt; &gt; Hi angelo,
&gt; &gt; &gt;
&gt; &gt; &gt; I guess the dtbs_check only checks required properties from yaml if the node is enabled.
&gt; &gt; 
&gt; &gt; Yes, that is exactly how it works.
&gt; 
&gt; So from this, can i imply that phys is a required property?
&gt; 
&gt; Looking at the above patch, it appears that for armada-*.dts,
&gt; sata-port@0 always uses phys = &lt;&amp;cp0_comphy2 0&gt; and sata-port@1 uses
&gt; phys = &lt;&amp;cp0_comphy3 1&gt;. Is this an actual SoC property? Could it be
&gt; moved up into the .dtsi file? Or is it really a board property?

as i said the phy may operate in different modes (not know marvell here, but on other vendors phys are defined at board level), maybe the boards where the phy is missing the phy is used in another mode. Without knowing the SoC and boards disable it at SoC-level and enable only the nodes containing a phys property is all i can do here to fix the issue. Imho it is always a good idea to enable only the conrollers a board will use.

&gt; 	Andrew
&gt; </frank-w@xxxxxxxxxxxxxxx></andrew@xxxxxxx></frank-w@xxxxxxxxxxxxxxx></axboe@xxxxxxxxx></hdegoede@xxxxxxxxxx></linux@xxxxxxxxxxxxxxx></sebastian.hesselbarth@xxxxxxxxx></gregory.clement@xxxxxxxxxxx></conor+dt@xxxxxxxxxx></krzk+dt@xxxxxxxxxx></cassel@xxxxxxxxxx></dlemoal@xxxxxxxxxx></linux@xxxxxxxxx></robh@xxxxxxxxxx></andrew@xxxxxxx>





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux