ARM: dts: BCM5301X: Specify MDIO bus in the DT
PATCH 1/1 ARM: dts: BCM5301X: Specify MDIO bus in the DT
From: Rafa? Mi?ecki <[email protected]>
Northstar devices have MDIO bus that may contain various PHYs attached. A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet).
--- arch/arm/boot/dts/bcm5301x.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/bcm5301x.dtsi +7 -0
@@ -320,6 +320,13 @@ }; }; + mdio at 18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; + #size-cells = <1>; + #address-cells = <0>; + }; + i2c0: i2c at 18009000 { compatible = "brcm,iproc-i2c"; reg = <0x18009000 0x50>;
Signature · 1 line
2.11.0
PATCH 1/1 ARM: dts: BCM5301X: Specify MDIO bus in the DT
Le 04/02/17 ? 14:08, Rafa? Mi?ecki a ?crit :
Quoted 15 lines
From: Rafa? Mi?ecki <[email protected]>
Northstar devices have MDIO bus that may contain various PHYs attached. A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet).
Signed-off-by Rafa? Mi?ecki <[email protected]>--- arch/arm/boot/dts/bcm5301x.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/bcm5301x.dtsi +0
-0
arch/arm/boot/dts/bcm5301x.dtsi line 328
Quoted 9 lines
arch/arm/boot/dts/bcm5301x.dtsi +6
-0@@ -320,6 +320,13 @@ }; }; + mdio at 18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; + #size-cells = <1>; + #address-cells = <0>; + };
This looks fine, but usually the block should be enabled on a per-board basis, such that there should be a status = "disabled" property here by default.
Signature · 1 line
Florian
PATCH 1/1 ARM: dts: BCM5301X: Specify MDIO bus in the DT
Quoted 19 lines · Florian Fainelli
Le 04/02/17 ? 14:08, Rafa? Mi?ecki a ?crit :
Quoted 18 lines
From: Rafa? Mi?ecki <[email protected]>
Northstar devices have MDIO bus that may contain various PHYs attached. A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet).
Signed-off-by Rafa? Mi?ecki <[email protected]>--- arch/arm/boot/dts/bcm5301x.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/bcm5301x.dtsi +0
-0@@ -320,6 +320,13 @@ }; };
Quoted 10 lines
arch/arm/boot/dts/bcm5301x.dtsi line 328
Quoted 6 lines
arch/arm/boot/dts/bcm5301x.dtsi +6
-0+ mdio at 18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; + #size-cells = <1>; + #address-cells = <0>; + };This looks fine, but usually the block should be enabled on a per-board basis, such that there should be a status = "disabled" property here by default.
I think we have few blocks in bcm5301x.dtsi enabled by default. I guess it's for stuff that is always present on every SoC family board: rng, nand, spi to name few.
It makes some sense, consider e.g. spi. Every Northstar board has SPI controller so it's enabled by default. Not every board has SPI flash, so it's disabled by default.
It's there and it make sense to me. Is that OK or not?
I find MDIO situation quite simiar. It seems every Northstar board has MDIO bus just devices may differ and should not be enabled by default.
PATCH 1/1 ARM: dts: BCM5301X: Specify MDIO bus in the DT
Quoted 38 lines · Rafa? Mi?ecki
Quoted 20 lines · Florian Fainelli
Le 04/02/17 ? 14:08, Rafa? Mi?ecki a ?crit :
Quoted 19 lines
From: Rafa? Mi?ecki <[email protected]>
Northstar devices have MDIO bus that may contain various PHYs attached. A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet).
Signed-off-by Rafa? Mi?ecki <[email protected]>--- arch/arm/boot/dts/bcm5301x.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/bcm5301x.dtsi +0
-0@@ -320,6 +320,13 @@ }; };Quoted 10 lines
arch/arm/boot/dts/bcm5301x.dtsi line 328
Quoted 6 lines
arch/arm/boot/dts/bcm5301x.dtsi +6
-0+ mdio at 18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; + #size-cells = <1>; + #address-cells = <0>; + };This looks fine, but usually the block should be enabled on a per-board basis, such that there should be a status = "disabled" property here by default.
I think we have few blocks in
bcm5301x.dtsienabled by default. I guess it's
for stuff that is always present on every SoC family board: rng, nand, spi to
name few.
Quoted 6 lines
It makes some sense, consider e.g. spi. Every Northstar board has SPI controller so it's enabled by default. Not every board has SPI flash, so it's
disabled by default.It's there and it make sense to me. Is that OK or not?
Even though there are devices that are always enabled on a given SoC, because the board designs are always consistent does not necessarily make them good candidates to be enabled at the .dtsi level. This is particularly true when there are external connections to blocks (SPI, NAND, USB, Ethernet, MDIO to name a few), having them disabled by default is safer as a starting point to begin with.
Quoted 4 lines
I find MDIO situation quite simiar. It seems every Northstar board has MDIO bus
just devices may differ and should not be enabled by default.
In which case, the only difference, for you would be to do to, at the board-level DTS:
&mdio {
status = "okay";
phy at 0 {
reg = <0>;
...
};
};versus:
&mdio {
phy at 0 {
reg = <0>;
...
};
};I think we can afford putting the mdio node's status property in each board-level DTS and make it clear that way that it is enabled because there are child nodes enabled?
NB: with a CONFIG_OF system, there is no automatic probing of MDIO child devices because it relies on child nodes being declared, but you would still get the driver to be probed and enabled, which is a waste of resources at best.
Thanks
Signature · 1 line
Florian
PATCH 1/1 ARM: dts: BCM5301X: Specify MDIO bus in the DT
Quoted 44 lines · Florian Fainelli
Quoted 43 lines · Rafa? Mi?ecki
Quoted 20 lines · Florian Fainelli
Le 04/02/17 ? 14:08, Rafa? Mi?ecki a ?crit :
Quoted 19 lines
From: Rafa? Mi?ecki <[email protected]>
Northstar devices have MDIO bus that may contain various PHYs attached. A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet).
Signed-off-by Rafa? Mi?ecki <[email protected]>--- arch/arm/boot/dts/bcm5301x.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/bcm5301x.dtsi +0
-0@@ -320,6 +320,13 @@ }; };Quoted 10 lines
arch/arm/boot/dts/bcm5301x.dtsi line 328
Quoted 6 lines
arch/arm/boot/dts/bcm5301x.dtsi +6
-0+ mdio at 18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; + #size-cells = <1>; + #address-cells = <0>; + };This looks fine, but usually the block should be enabled on a per-board basis, such that there should be a status = "disabled" property here by default.
I think we have few blocks in
bcm5301x.dtsienabled by default. I guess it's
for stuff that is always present on every SoC family board: rng, nand, spi to
name few.It makes some sense, consider e.g. spi. Every Northstar board has SPI controller so it's enabled by default. Not every board has SPI flash, so it's
disabled by default.
Quoted 8 lines
Quoted 1 line
It's there and it make sense to me. Is that OK or not?
Even though there are devices that are always enabled on a given SoC, because the board designs are always consistent does not necessarily make them good candidates to be enabled at the .dtsi level. This is particularly true when there are external connections to blocks (SPI, NAND, USB, Ethernet, MDIO to name a few), having them disabled by default is safer as a starting point to begin with.
In case of Northstar there is USB 3.0 PHY connected *internally* to this MDIO. I don't think any board manufacturer is able to rip SoC out of the MDIO or the USB 3.0 PHY.
Quoted 25 lines
Quoted 3 lines
I find MDIO situation quite simiar. It seems every Northstar board has MDIO bus
just devices may differ and should not be enabled by default.In which case, the only difference, for you would be to do to, at the board-level DTS:
&mdio { status = "okay"; phy at 0 { reg = <0>; ... }; };versus:
&mdio { phy at 0 { reg = <0>; ... }; };
Quoted 3 lines
I think we can afford putting the mdio node's status property in each board-level DTS and make it clear that way that it is enabled because there are child nodes enabled?
This will be a pretty big effort because every Northstar device I know has USB 3.0 PHY in the SoC.
Quoted 4 lines
NB: with a
CONFIG_OFsystem, there is no automatic probing of MDIO child devices because it relies on child nodes being declared, but you would still get the driver to be probed and enabled, which is a waste of resources at best.
Right, but DT role is to describe device/board and not really care if operating system handles that efficiently.
PATCH 1/1 ARM: dts: BCM5301X: Specify MDIO bus in the DT
Quoted 56 lines · Rafa? Mi?ecki
Quoted 46 lines · Florian Fainelli
Quoted 45 lines · Rafa? Mi?ecki
Quoted 22 lines · Florian Fainelli
Le 04/02/17 ? 14:08, Rafa? Mi?ecki a ?crit :
Quoted 21 lines
From: Rafa? Mi?ecki <[email protected]>
Northstar devices have MDIO bus that may contain various PHYs attached.
A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet).Signed-off-by Rafa? Mi?ecki <[email protected]>--- arch/arm/boot/dts/bcm5301x.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/bcm5301x.dtsi +0
-0@@ -320,6 +320,13 @@ }; };Quoted 10 lines
arch/arm/boot/dts/bcm5301x.dtsi line 328
Quoted 6 lines
arch/arm/boot/dts/bcm5301x.dtsi +6
-0+ mdio at 18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; + #size-cells = <1>; + #address-cells = <0>; + };This looks fine, but usually the block should be enabled on a per-board basis, such that there should be a status = "disabled" property here by default.
I think we have few blocks in
bcm5301x.dtsienabled by default. I guess it's
for stuff that is always present on every SoC family board: rng, nand, spi to
name few.It makes some sense, consider e.g. spi. Every Northstar board has SPI controller so it's enabled by default. Not every board has SPI flash, so it's
disabled by default.Quoted 8 lines
Quoted 1 line
It's there and it make sense to me. Is that OK or not?
Even though there are devices that are always enabled on a given SoC, because the board designs are always consistent does not necessarily make them good candidates to be enabled at the .dtsi level. This is particularly true when there are external connections to blocks (SPI, NAND, USB, Ethernet, MDIO to name a few), having them disabled by default is safer as a starting point to begin with.
Quoted 5 lines
In case of Northstar there is USB 3.0 PHY connected *internally* to this MDIO.
I don't think any board manufacturer is able to rip SoC out of the MDIO or the
USB 3.0 PHY.
OK, then can you still resubmit a proper patch that a) puts that information in the commit message, and b) also adds a proper label to the mdio node such that it can later on be referenced by label in board-level DTS files? By that I mean:
mdio: mdio at 18003000 {
Thank you
Quoted 27 lines
Quoted 27 lines
Quoted 5 lines
I find MDIO situation quite simiar. It seems every Northstar board has MDIO bus
just devices may differ and should not be enabled by default.In which case, the only difference, for you would be to do to, at the board-level DTS:
&mdio { status = "okay"; phy at 0 { reg = <0>; ... }; };versus:
&mdio { phy at 0 { reg = <0>; ... }; };
Quoted 7 lines
Quoted 3 lines
I think we can afford putting the mdio node's status property in each board-level DTS and make it clear that way that it is enabled because there are child nodes enabled?
This will be a pretty big effort because every Northstar device I know has USB
3.0 PHY in the SoC.
Adding a one liner is a "pretty big effort", for sure.
Quoted 10 lines
Quoted 6 lines
NB: with a
CONFIG_OFsystem, there is no automatic probing of MDIO child devices because it relies on child nodes being declared, but you would still get the driver to be probed and enabled, which is a waste of resources at best.Right, but DT role is to describe device/board and not really care if operating
system handles that efficiently.
Signature · 1 line
Florian
PATCH 1/1 ARM: dts: BCM5301X: Specify MDIO bus in the DT
Quoted 103 lines · Florian Fainelli
Quoted 56 lines · Rafa? Mi?ecki
Quoted 46 lines · Florian Fainelli
Quoted 45 lines · Rafa? Mi?ecki
Quoted 22 lines · Florian Fainelli
Le 04/02/17 ? 14:08, Rafa? Mi?ecki a ?crit :
Quoted 21 lines
From: Rafa? Mi?ecki <[email protected]>
Northstar devices have MDIO bus that may contain various PHYs attached.
A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet).Signed-off-by Rafa? Mi?ecki <[email protected]>--- arch/arm/boot/dts/bcm5301x.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/bcm5301x.dtsi +0
-0@@ -320,6 +320,13 @@ }; };Quoted 10 lines
arch/arm/boot/dts/bcm5301x.dtsi line 328
Quoted 6 lines
arch/arm/boot/dts/bcm5301x.dtsi +6
-0+ mdio at 18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; + #size-cells = <1>; + #address-cells = <0>; + };This looks fine, but usually the block should be enabled on a per-board basis, such that there should be a status = "disabled" property here by default.
I think we have few blocks in
bcm5301x.dtsienabled by default. I guess it's
for stuff that is always present on every SoC family board: rng, nand, spi to
name few.It makes some sense, consider e.g. spi. Every Northstar board has SPI controller so it's enabled by default. Not every board has SPI flash, so it's
disabled by default.Quoted 8 lines
Quoted 1 line
It's there and it make sense to me. Is that OK or not?
Even though there are devices that are always enabled on a given SoC, because the board designs are always consistent does not necessarily make them good candidates to be enabled at the .dtsi level. This is particularly true when there are external connections to blocks (SPI, NAND, USB, Ethernet, MDIO to name a few), having them disabled by default is safer as a starting point to begin with.
Quoted 5 lines
In case of Northstar there is USB 3.0 PHY connected *internally* to this MDIO.
I don't think any board manufacturer is able to rip SoC out of the MDIO or the
USB 3.0 PHY.OK, then can you still resubmit a proper patch that a) puts that information in the commit message, and b) also adds a proper label to the mdio node such that it can later on be referenced by label in board-level DTS files? By that I mean:
mdio: mdio at 18003000 {
Thank you
Quoted 31 lines
Quoted 30 lines
Quoted 5 lines
I find MDIO situation quite simiar. It seems every Northstar board has MDIO bus
just devices may differ and should not be enabled by default.In which case, the only difference, for you would be to do to, at the board-level DTS:
&mdio { status = "okay"; phy at 0 { reg = <0>; ... }; };versus:
&mdio { phy at 0 { reg = <0>; ... }; };I think we can afford putting the mdio node's status property in each board-level DTS and make it clear that way that it is enabled because there are child nodes enabled?
Quoted 5 lines
Quoted 3 lines
This will be a pretty big effort because every Northstar device I know has USB
3.0 PHY in the SoC.Adding a one liner is a "pretty big effort", for sure.
Sorry, we got a misunderstanding here.
I thought you meant adding something like this for every device:
&mdio {
status = "okay";
usb3_phy: usb-phy at 10 {
compatible = "brcm,ns-ax-usb3-phy";
reg = <0x10>;
usb3-dmp-syscon = <&usb3_dmp>;
#phy-cells = <0>;
};
};usb3_dmp: syscon at 18105000 {
reg = <0x18105000 0x1000>;
};So I clearly missed something important. Did you want to have USB 3.0 PHY defined in the dtsi file?
PATCH 1/1 ARM: dts: BCM5301X: Specify MDIO bus in the DT
Quoted 118 lines · Rafa? Mi?ecki
Quoted 107 lines · Florian Fainelli
Quoted 60 lines · Rafa? Mi?ecki
Quoted 50 lines · Florian Fainelli
Quoted 49 lines · Rafa? Mi?ecki
Quoted 22 lines · Florian Fainelli
Le 04/02/17 ? 14:08, Rafa? Mi?ecki a ?crit :
Quoted 21 lines
From: Rafa? Mi?ecki <[email protected]>
Northstar devices have MDIO bus that may contain various PHYs attached.
A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet).Signed-off-by Rafa? Mi?ecki <[email protected]>--- arch/arm/boot/dts/bcm5301x.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/bcm5301x.dtsi +0
-0@@ -320,6 +320,13 @@ }; };Quoted 12 lines
arch/arm/boot/dts/bcm5301x.dtsi line 328
Quoted 6 lines
arch/arm/boot/dts/bcm5301x.dtsi +6
-0+ mdio at 18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; + #size-cells = <1>; + #address-cells = <0>; + };This looks fine, but usually the block should be enabled on a per-board
basis, such that there should be a status = "disabled" property here by
default.I think we have few blocks in
bcm5301x.dtsienabled by default. I guess
it's
for stuff that is always present on every SoC family board: rng, nand, spi to
name few.It makes some sense, consider e.g. spi. Every Northstar board has SPI controller so it's enabled by default. Not every board has SPI flash, so
it's
disabled by default.Quoted 8 lines
Quoted 1 line
It's there and it make sense to me. Is that OK or not?
Even though there are devices that are always enabled on a given SoC, because the board designs are always consistent does not necessarily make them good candidates to be enabled at the .dtsi level. This is particularly true when there are external connections to blocks (SPI, NAND, USB, Ethernet, MDIO to name a few), having them disabled by default is safer as a starting point to begin with.
Quoted 5 lines
In case of Northstar there is USB 3.0 PHY connected *internally* to this MDIO.
I don't think any board manufacturer is able to rip SoC out of the MDIO or the
USB 3.0 PHY.OK, then can you still resubmit a proper patch that a) puts that information in the commit message, and b) also adds a proper label to the mdio node such that it can later on be referenced by label in board-level DTS files? By that I mean:
mdio: mdio at 18003000 {
Thank you
Quoted 31 lines
Quoted 30 lines
Quoted 5 lines
I find MDIO situation quite simiar. It seems every Northstar board has MDIO bus
just devices may differ and should not be enabled by default.In which case, the only difference, for you would be to do to, at the board-level DTS:
&mdio { status = "okay"; phy at 0 { reg = <0>; ... }; };versus:
&mdio { phy at 0 { reg = <0>; ... }; };I think we can afford putting the mdio node's status property in each board-level DTS and make it clear that way that it is enabled because there are child nodes enabled?
Quoted 5 lines
Quoted 3 lines
This will be a pretty big effort because every Northstar device I know has USB
3.0 PHY in the SoC.Adding a one liner is a "pretty big effort", for sure.
Sorry, we got a misunderstanding here.
I thought you meant adding something like this for every device:
Quoted 10 lines
&mdio {
status = "okay";
usb3_phy: usb-phy at 10 {
compatible = "brcm,ns-ax-usb3-phy";
reg = <0x10>;
usb3-dmp-syscon = <&usb3_dmp>;
#phy-cells = <0>;
};
};Ah no, I would have just done the following in the per-board DTS:
&mdio {
status = "okay";
};&usb3_phy {
status = "okay";
};&xhci {
status = "okay";
};Something like that.
Quoted 7 lines
usb3_dmp: syscon at 18105000 { reg = <0x18105000 0x1000>; };So I clearly missed something important. Did you want to have USB 3.0 PHY defined in the dtsi file?
Yes, I think it does make sense to have it defined in the .dtsi file because it's internal to the SoC, however it should probably be marked disabled by default, unless a board enables its xHCI controller, does that make sense?
Signature · 1 line
Florian
PATCH v2 1/1 ARM: dts: BCM5301X: Specify MDIO bus in the DT
In reply to Rafał MiłeckiFrom: Rafa? Mi?ecki <[email protected]>
Northstar devices have MDIO bus that may contain various PHYs attached. A common example is USB 3.0 PHY (that doesn't have an MDIO driver yet).
---
V2: Disable MDIO bus by default.
Add mdio label to allow enabling it easily per board
--- arch/arm/boot/dts/bcm5301x.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/bcm5301x.dtsi +8 -0
@@ -320,6 +320,14 @@ }; }; + mdio: mdio at 18003000 { + compatible = "brcm,iproc-mdio"; + reg = <0x18003000 0x8>; + #size-cells = <1>; + #address-cells = <0>; + status = "disabled"; + }; + i2c0: i2c at 18009000 { compatible = "brcm,iproc-i2c"; reg = <0x18009000 0x50>;
Signature · 1 line
2.11.0