[v2] ARM: dts: dove.dtsi: Move ethphy to fix schema error
Commit Message
Running 'make dtbs_check' with schema in net/marvell,orion-mdio.yaml
gives the following warnings:
mdio-bus@72004: Unevaluated properties are not allowed
('ethernet-phy' was unexpected)
arch/arm/boot/dts/dove-cubox.dtb
arch/arm/boot/dts/dove-cubox-es.dtb
arch/arm/boot/dts/dove-d2plug.dtb
arch/arm/boot/dts/dove-d2plug.dtb
arch/arm/boot/dts/dove-dove-db.dtb
arch/arm/boot/dts/dove-d3plug.dtb
arch/arm/boot/dts/dove-sbc-a510.dtb
Fix them by removing empty ethphy subnode from dove.dtsi and describe
PHY on the relevant board .dts files level.
Signed-off-by: Michał Grzelak <mig@semihalf.com>
---
arch/arm/boot/dts/dove-cm-a510.dtsi | 14 +++++++++++---
arch/arm/boot/dts/dove-cubox.dts | 15 +++++++++++----
arch/arm/boot/dts/dove.dtsi | 5 -----
3 files changed, 22 insertions(+), 12 deletions(-)
Comments
On Wed, Dec 28, 2022 at 09:02:34PM +0100, Michał Grzelak wrote:
> Running 'make dtbs_check' with schema in net/marvell,orion-mdio.yaml
> gives the following warnings:
> mdio-bus@72004: Unevaluated properties are not allowed
> ('ethernet-phy' was unexpected)
> arch/arm/boot/dts/dove-cubox.dtb
> arch/arm/boot/dts/dove-cubox-es.dtb
> arch/arm/boot/dts/dove-d2plug.dtb
> arch/arm/boot/dts/dove-d2plug.dtb
> arch/arm/boot/dts/dove-dove-db.dtb
> arch/arm/boot/dts/dove-d3plug.dtb
> arch/arm/boot/dts/dove-sbc-a510.dtb
> Fix them by removing empty ethphy subnode from dove.dtsi and describe
> PHY on the relevant board .dts files level.
I don't think your description is correct. What i think is causing the
problem is that the ethphy subnode in dove.dtsi does not have an @X.
By moving it into the .dts file, you can then give it the correct @1,
or @3, which makes the linter happy. The kernel itself does not care
about this, it is an example of the linter being much more strict than
the kernel.
If you agree with me, please update the description.
Andrew
Hi Andrew,
Thanks for quick reply.
On Thu, Dec 29, 2022 at 2:32 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Wed, Dec 28, 2022 at 09:02:34PM +0100, Michał Grzelak wrote:
> > Running 'make dtbs_check' with schema in net/marvell,orion-mdio.yaml
> > gives the following warnings:
> > mdio-bus@72004: Unevaluated properties are not allowed
> > ('ethernet-phy' was unexpected)
> > arch/arm/boot/dts/dove-cubox.dtb
> > arch/arm/boot/dts/dove-cubox-es.dtb
> > arch/arm/boot/dts/dove-d2plug.dtb
> > arch/arm/boot/dts/dove-d2plug.dtb
> > arch/arm/boot/dts/dove-dove-db.dtb
> > arch/arm/boot/dts/dove-d3plug.dtb
> > arch/arm/boot/dts/dove-sbc-a510.dtb
> > Fix them by removing empty ethphy subnode from dove.dtsi and describe
> > PHY on the relevant board .dts files level.
>
> I don't think your description is correct. What i think is causing the
> problem is that the ethphy subnode in dove.dtsi does not have an @X.
>
Yes, it is exactly the case. The problem is after adding dummy address
e.g. ethernet-phy@0 in dove.dtsi 'make dtbs_check' shows warnings
about missing required 'reg' property, that's why ethernet-phy is
moved to .dts files.
> By moving it into the .dts file, you can then give it the correct @1,
> or @3, which makes the linter happy. The kernel itself does not care
> about this, it is an example of the linter being much more strict than
> the kernel.
>
> If you agree with me, please update the description.
This patch exactly fixes this issue by setting proper
ethernet-phy@<reg value> in board files.
In such a case would you like me to update the commit message to
better describe the change or do you have other remarks to the diff?
Best regards,
Michał
On Thu, Dec 29, 2022 at 03:14:47PM +0100, Michał Grzelak wrote:
> Hi Andrew,
>
> Thanks for quick reply.
>
> On Thu, Dec 29, 2022 at 2:32 AM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Wed, Dec 28, 2022 at 09:02:34PM +0100, Michał Grzelak wrote:
> > > Running 'make dtbs_check' with schema in net/marvell,orion-mdio.yaml
> > > gives the following warnings:
> > > mdio-bus@72004: Unevaluated properties are not allowed
> > > ('ethernet-phy' was unexpected)
> > > arch/arm/boot/dts/dove-cubox.dtb
> > > arch/arm/boot/dts/dove-cubox-es.dtb
> > > arch/arm/boot/dts/dove-d2plug.dtb
> > > arch/arm/boot/dts/dove-d2plug.dtb
> > > arch/arm/boot/dts/dove-dove-db.dtb
> > > arch/arm/boot/dts/dove-d3plug.dtb
> > > arch/arm/boot/dts/dove-sbc-a510.dtb
> > > Fix them by removing empty ethphy subnode from dove.dtsi and describe
> > > PHY on the relevant board .dts files level.
> >
> > I don't think your description is correct. What i think is causing the
> > problem is that the ethphy subnode in dove.dtsi does not have an @X.
> >
>
> Yes, it is exactly the case. The problem is after adding dummy address
> e.g. ethernet-phy@0 in dove.dtsi 'make dtbs_check' shows warnings
> about missing required 'reg' property, that's why ethernet-phy is
> moved to .dts files.
>
> > By moving it into the .dts file, you can then give it the correct @1,
> > or @3, which makes the linter happy. The kernel itself does not care
> > about this, it is an example of the linter being much more strict than
> > the kernel.
> >
> > If you agree with me, please update the description.
>
> This patch exactly fixes this issue by setting proper
> ethernet-phy@<reg value> in board files.
> In such a case would you like me to update the commit message to
> better describe the change or do you have other remarks to the diff?
I would like the description to actually describe the problem, that
the linter allows ethernet-phy@X but not ethernet-phy. You description
does not make any sense to me, it is not an empty node which is
causing the problem, but that node is expected to have an @X.
Andrew
@@ -124,9 +124,17 @@ wifi_power: regulator@1 {
};
/* Optional RTL8211D GbE PHY on SMI address 0x03 */
-ðphy {
- reg = <3>;
- status = "disabled";
+&mdio {
+ ethphy: ethernet-phy@3 {
+ reg = <3>;
+ status = "disabled";
+ };
+};
+
+ð {
+ ethernet-port@0 {
+ phy-handle = <ðphy>;
+ };
};
&i2c0 {
@@ -72,11 +72,18 @@ gpu-subsystem {
&uart0 { status = "okay"; };
&sata0 { status = "okay"; };
&mdio { status = "okay"; };
-ð { status = "okay"; };
+ð {
+ status = "okay";
+ ethernet-port@0 {
+ phy-handle = <ðphy>;
+ };
+};
-ðphy {
- compatible = "marvell,88e1310";
- reg = <1>;
+&mdio {
+ ethphy: ethernet-phy@1 {
+ compatible = "marvell,88e1310";
+ reg = <1>;
+ };
};
&gpu {
@@ -382,7 +382,6 @@ ethernet-port@0 {
interrupts = <29>;
/* overwrite MAC address in bootloader */
local-mac-address = [00 00 00 00 00 00];
- phy-handle = <ðphy>;
};
};
@@ -394,10 +393,6 @@ mdio: mdio-bus@72004 {
interrupts = <30>;
clocks = <&gate_clk 2>;
status = "disabled";
-
- ethphy: ethernet-phy {
- /* set phy address in board file */
- };
};
sdio0: sdio-host@92000 {