diff mbox

ARM: dts: armada-388-clearfog: remove duplicate mdio entry

Message ID E1bMGdu-00005c-Dy@rmk-PC.armlinux.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Russell King (Oracle) July 10, 2016, 3:27 p.m. UTC
The clearfog DTS should not be defining the on-board phy, this device
is located on the microsom.  Remove the duplicated definition.

Reported-by: Jon Nettleton <jon@solid-run.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 arch/arm/boot/dts/armada-388-clearfog.dts | 16 ----------------
 1 file changed, 16 deletions(-)

Comments

Andrew Lunn July 10, 2016, 8:32 p.m. UTC | #1
On Sun, Jul 10, 2016 at 04:27:38PM +0100, Russell King wrote:
> The clearfog DTS should not be defining the on-board phy, this device
> is located on the microsom.  Remove the duplicated definition.
> 
> Reported-by: Jon Nettleton <jon@solid-run.com>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Andrew Lunn July 10, 2016, 8:37 p.m. UTC | #2
On Sun, Jul 10, 2016 at 04:27:38PM +0100, Russell King wrote:
> The clearfog DTS should not be defining the on-board phy, this device
> is located on the microsom.  Remove the duplicated definition.

Hi Russell

While reviewing this patch i noticed that the microsom .dtsi file has

                        pinctrl@18000 {
                                microsom_phy_clk_pins: microsom-phy-clk-pins {
                                        marvell,pins = "mpp45";
                                        marvell,function = "ref";
                                };
                        };

The armada-38x.dtsi has

                                ref_clk0_pins: ref-clk-pins-0 {
                                        marvell,pins = "mpp45";
                                        marvell,function = "ref";
                                };

which you could reference rather then defining it yourself.

      Andrew
Russell King (Oracle) July 10, 2016, 8:45 p.m. UTC | #3
On Sun, Jul 10, 2016 at 10:37:51PM +0200, Andrew Lunn wrote:
> The armada-38x.dtsi has
> 
>                                 ref_clk0_pins: ref-clk-pins-0 {
>                                         marvell,pins = "mpp45";
>                                         marvell,function = "ref";
>                                 };
> 
> which you could reference rather then defining it yourself.

Weren't these going to be deleted from the main SoC dtsi files,
eventually?  I thought that was the idea, to prevent cluttering
up the .dtb files with nodes which aren't ever used.
Andrew Lunn July 10, 2016, 10:27 p.m. UTC | #4
On Sun, Jul 10, 2016 at 09:45:46PM +0100, Russell King - ARM Linux wrote:
> On Sun, Jul 10, 2016 at 10:37:51PM +0200, Andrew Lunn wrote:
> > The armada-38x.dtsi has
> > 
> >                                 ref_clk0_pins: ref-clk-pins-0 {
> >                                         marvell,pins = "mpp45";
> >                                         marvell,function = "ref";
> >                                 };
> > 
> > which you could reference rather then defining it yourself.
> 
> Weren't these going to be deleted from the main SoC dtsi files,
> eventually?  I thought that was the idea, to prevent cluttering
> up the .dtb files with nodes which aren't ever used.

I've not heard they are going to be removed....

Having work on mvebu, and a Freescale Vybrid board, i see two
different styles. mvebu defines all the common pinctrl values in the
.dtsi file, so making the .dts file pretty minimalist. For the vybrid
board there was nothing in the .dtsi file, the dts file is huge, and i
made at least one error, missing at required pin which took me a while
to debug.

I would also say cluttered .dtb because of unused nodes it a compiler
issue. Why does it not optimise them out?

   Andrew
Russell King (Oracle) July 10, 2016, 10:38 p.m. UTC | #5
On Mon, Jul 11, 2016 at 12:27:43AM +0200, Andrew Lunn wrote:
> On Sun, Jul 10, 2016 at 09:45:46PM +0100, Russell King - ARM Linux wrote:
> > On Sun, Jul 10, 2016 at 10:37:51PM +0200, Andrew Lunn wrote:
> > > The armada-38x.dtsi has
> > > 
> > >                                 ref_clk0_pins: ref-clk-pins-0 {
> > >                                         marvell,pins = "mpp45";
> > >                                         marvell,function = "ref";
> > >                                 };
> > > 
> > > which you could reference rather then defining it yourself.
> > 
> > Weren't these going to be deleted from the main SoC dtsi files,
> > eventually?  I thought that was the idea, to prevent cluttering
> > up the .dtb files with nodes which aren't ever used.
> 
> I've not heard they are going to be removed....
> 
> Having work on mvebu, and a Freescale Vybrid board, i see two
> different styles. mvebu defines all the common pinctrl values in the
> .dtsi file, so making the .dts file pretty minimalist. For the vybrid
> board there was nothing in the .dtsi file, the dts file is huge, and i
> made at least one error, missing at required pin which took me a while
> to debug.
> 
> I would also say cluttered .dtb because of unused nodes it a compiler
> issue. Why does it not optimise them out?

How does it know that the pinmux nodes (which are nodes in their own
right, just like any node specifying a real device) are "unused" ?

It doesn't - there's no way that the compiler can possibly know that
these aren't going to be iterated over as a child of the pinctrl@18000
node.
Andrew Lunn July 10, 2016, 10:53 p.m. UTC | #6
On Sun, Jul 10, 2016 at 11:38:04PM +0100, Russell King - ARM Linux wrote:
> On Mon, Jul 11, 2016 at 12:27:43AM +0200, Andrew Lunn wrote:
> > On Sun, Jul 10, 2016 at 09:45:46PM +0100, Russell King - ARM Linux wrote:
> > > On Sun, Jul 10, 2016 at 10:37:51PM +0200, Andrew Lunn wrote:
> > > > The armada-38x.dtsi has
> > > > 
> > > >                                 ref_clk0_pins: ref-clk-pins-0 {
> > > >                                         marvell,pins = "mpp45";
> > > >                                         marvell,function = "ref";
> > > >                                 };
> > > > 
> > > > which you could reference rather then defining it yourself.
> > > 
> > > Weren't these going to be deleted from the main SoC dtsi files,
> > > eventually?  I thought that was the idea, to prevent cluttering
> > > up the .dtb files with nodes which aren't ever used.
> > 
> > I've not heard they are going to be removed....
> > 
> > Having work on mvebu, and a Freescale Vybrid board, i see two
> > different styles. mvebu defines all the common pinctrl values in the
> > .dtsi file, so making the .dts file pretty minimalist. For the vybrid
> > board there was nothing in the .dtsi file, the dts file is huge, and i
> > made at least one error, missing at required pin which took me a while
> > to debug.
> > 
> > I would also say cluttered .dtb because of unused nodes it a compiler
> > issue. Why does it not optimise them out?
> 
> How does it know that the pinmux nodes (which are nodes in their own
> right, just like any node specifying a real device) are "unused" ?

Yes, you are right. A phandle pointing to it shows it is used, but not
being references via a phandle does not mean it is unused.

      Andrew
Gregory CLEMENT July 11, 2016, 4:05 p.m. UTC | #7
Hi Russell,
 
 On dim., juil. 10 2016, Andrew Lunn <andrew@lunn.ch> wrote:

> On Sun, Jul 10, 2016 at 04:27:38PM +0100, Russell King wrote:
>> The clearfog DTS should not be defining the on-board phy, this device
>> is located on the microsom.  Remove the duplicated definition.
>> 
>> Reported-by: Jon Nettleton <jon@solid-run.com>
>> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Applied on mvebu/dt

Thanks,

Gregory

>
>     Andrew
diff mbox

Patch

diff --git a/arch/arm/boot/dts/armada-388-clearfog.dts b/arch/arm/boot/dts/armada-388-clearfog.dts
index 2e9246f749a2..a6dfa8dc3423 100644
--- a/arch/arm/boot/dts/armada-388-clearfog.dts
+++ b/arch/arm/boot/dts/armada-388-clearfog.dts
@@ -208,22 +208,6 @@ 
 				status = "okay";
 			};
 
-			mdio@72004 {
-				pinctrl-0 = <&mdio_pins>;
-				pinctrl-names = "default";
-
-				phy_dedicated: ethernet-phy@0 {
-					/*
-					 * Annoyingly, the marvell phy driver
-					 * configures the LED register, rather
-					 * than preserving reset-loaded setting.
-					 * We undo that rubbish here.
-					 */
-					marvell,reg-init = <3 16 0 0x101e>;
-					reg = <0>;
-				};
-			};
-
 			pinctrl@18000 {
 				clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins {
 					marvell,pins = "mpp46";