2019-12-19 12:07:02

by Frank Wunderlich

[permalink] [raw]
Subject: Aw: Re: [PATCH] kbuild: Add DTC_CPP_FLAGS

Hi Rob,

so the way you prefer is this one (use new file for additions and including the board dts):

arch/arm64/boot/dts/mediatek/mt7622-bpi-r64-mt7531.dts (example for mt7531-phy)

/*
* Copyright (c) 2018 MediaTek Inc.
* Author:
*
* SPDX-License-Identifier: (GPL-2.0 OR MIT)
*/

/dts-v1/;

#include "mt7622-bananapi-bpi-r64.dts"

/ {
gsw: gsw@0 {
compatible = "mediatek,mt753x";
mediatek,ethsys = <&ethsys>;
#address-cells = <1>;
#size-cells = <0>;
};
};

&gsw {
mediatek,mdio = <&mdio>;
mediatek,portmap = "wllll";
mediatek,mdio_master_pinmux = <0>;
reset-gpios = <&pio 54 0>;
interrupt-parent = <&pio>;
interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
status = "okay";

port5: port@5 {
compatible = "mediatek,mt753x-port";
reg = <5>;
phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
};
};

port6: port@6 {
compatible = "mediatek,mt753x-port";
reg = <6>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
};
};
};

at least it compiles and after decompile the new nodes are visible...

is there any way to drop nodes (in case dsa-driver gets merged i don't need it in the other 2)? i can disable them, but they will be present.

regards Frank


> Gesendet: Mittwoch, 18. Dezember 2019 um 14:51 Uhr
> Von: "Rob Herring" <[email protected]>
> NAK. #ifdefs and complex macros in particular are features we don't
> want in dts files.
>
> Rob


2019-12-19 17:04:41

by Rob Herring

[permalink] [raw]
Subject: Re: Re: [PATCH] kbuild: Add DTC_CPP_FLAGS

On Thu, Dec 19, 2019 at 6:05 AM Frank Wunderlich
<[email protected]> wrote:
>
> Hi Rob,
>
> so the way you prefer is this one (use new file for additions and including the board dts):

Yes, or you could use an overlay, but that will raise other issues
(current lack of support building them in the kernel).

> arch/arm64/boot/dts/mediatek/mt7622-bpi-r64-mt7531.dts (example for mt7531-phy)
>
> /*
> * Copyright (c) 2018 MediaTek Inc.
> * Author:
> *
> * SPDX-License-Identifier: (GPL-2.0 OR MIT)
> */
>
> /dts-v1/;
>
> #include "mt7622-bananapi-bpi-r64.dts"
>
> / {
> gsw: gsw@0 {
> compatible = "mediatek,mt753x";
> mediatek,ethsys = <&ethsys>;
> #address-cells = <1>;
> #size-cells = <0>;
> };
> };
>
> &gsw {
> mediatek,mdio = <&mdio>;
> mediatek,portmap = "wllll";
> mediatek,mdio_master_pinmux = <0>;
> reset-gpios = <&pio 54 0>;
> interrupt-parent = <&pio>;
> interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
> status = "okay";
>
> port5: port@5 {
> compatible = "mediatek,mt753x-port";
> reg = <5>;
> phy-mode = "rgmii";
> fixed-link {
> speed = <1000>;
> full-duplex;
> };
> };
>
> port6: port@6 {
> compatible = "mediatek,mt753x-port";
> reg = <6>;
> phy-mode = "2500base-x";
> fixed-link {
> speed = <2500>;
> full-duplex;
> };
> };
> };
>
> at least it compiles and after decompile the new nodes are visible...
>
> is there any way to drop nodes (in case dsa-driver gets merged i don't need it in the other 2)? i can disable them, but they will be present.

Yes, use '/delete-node/'.

Rob