powerpc/85xx: add the Fman device tree template include files
Subsystems (5)
PATCH 1/2 powerpc/85xx: add the Fman device tree template include files
Introduce the template include files for the Freecale Frame Manager (Fman). An SOC can have up to two Fman devices, and each Fman can have up to five 1G Ethernet MACs and one 10G Ethernet MAC.
--- arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi | 140 +++++++++++++++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi | 54 ++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi | 140 +++++++++++++++++++++ 14 files changed, 1027 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi
arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi new file +63 -0
@@ -0,0 +1,63 @@ +/* + * QorIQ FMan 10g port #0 device tree stub [ controller @ offset 0x400000 ] + * + * Copyright 2011 Freescale Semiconductor Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Freescale Semiconductor nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License ("GPL") as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * This software is provided by Freescale Semiconductor "as is" and any + * express or implied warranties, including, but not limited to, the implied + * warranties of merchantability and fitness for a particular purpose are + * disclaimed. In no event shall Freescale Semiconductor be liable for any + * direct, indirect, incidental, special, exemplary, or consequential damages + * (including, but not limited to, procurement of substitute goods or services; + * loss of use, data, or profits; or business interruption) however caused and + * on any theory of liability, whether in contract, strict liability, or tort + * (including negligence or otherwise) arising in any way out of the use of this + * software, even if advised of the possibility of such damage. + */ + +fman@400000 { + fman0_10g_rx0: port@90000 { + cell-index = <0>; + compatible = "fsl,fman-port-10g-rx"; + reg = <0x90000 0x1000>; + }; + + fman0_10g_tx0: port@b0000 { + cell-index = <0>; + compatible = "fsl,fman-port-10g-tx"; + reg = <0xb0000 0x1000>; + fsl,qman-channel-id = <0x40>; + }; + + ethernet@f0000 { + cell-index = <0>; + compatible = "fsl,fman-10g-mac"; + reg = <0xf0000 0x1000>; + fsl,port-handles = <&fman0_10g_rx0 &fman0_10g_tx0>; + }; + + xmdio0: mdio@f1000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,fman-xmdio"; + reg = <0xf1000 0x1000>; + interrupts = <100 1 0 0>; + }; +};
arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi new file +140 -0
140 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi new file +54 -0
54 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi new file +63 -0
63 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi new file +140 -0
140 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH 2/2 powerpc/85xx: add Fman MDIO muxing support to the P4080DS
The Freescale P4080 SOC contains two Fman Ethernet controllers, each of which contains four 1G Ethernet MACs and one 10G Ethernet MAC. The SerDes protocol determines how the MACs are routed to various RGMII, SGMII, or XGMII PHYs on the board, so the P4080DS reference board provides a MDIO bus multiplexing feature that is controlled via GPIOs.
This patch adds the basic Ethernet, MDIO, mdio-mux, and PHY nodes necessary to get MDIO bus muxing working, using Cavium's mdio-mux-gpio driver. The remaining DPAA nodes (Qman, Bman, etc), as well as the DPAA device drivers, are not included.
--- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 12 + arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi | 3 + arch/powerpc/boot/dts/p4080ds.dts | 307 +++++++++++++++++++++++++++ arch/powerpc/platforms/85xx/Kconfig | 3 + arch/powerpc/platforms/85xx/corenet_ds.c | 7 + 5 files changed, 332 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/fsl/p4080si-post.dtsi +12 -0
@@ -347,4 +347,16 @@ /include/ "qoriq-usb2-mph-0.dtsi" /include/ "qoriq-usb2-dr-0.dtsi" /include/ "qoriq-sec4.0-0.dtsi" +/include/ "qoriq-fman-0.dtsi" +/include/ "qoriq-fman-0-1g-0.dtsi" +/include/ "qoriq-fman-0-1g-1.dtsi" +/include/ "qoriq-fman-0-1g-2.dtsi" +/include/ "qoriq-fman-0-1g-3.dtsi" +/include/ "qoriq-fman-0-10g-0.dtsi" +/include/ "qoriq-fman-1.dtsi" +/include/ "qoriq-fman-1-1g-0.dtsi" +/include/ "qoriq-fman-1-1g-1.dtsi" +/include/ "qoriq-fman-1-1g-2.dtsi" +/include/ "qoriq-fman-1-1g-3.dtsi" +/include/ "qoriq-fman-1-10g-0.dtsi" };
arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi +3 -0
@@ -69,6 +69,9 @@ rtic_c = &rtic_c; rtic_d = &rtic_d; sec_mon = &sec_mon; + + fman0 = &fman0; + fman1 = &fman1; }; cpus {
arch/powerpc/boot/dts/p4080ds.dts +307 -0
325 lines not on this page · raw message
arch/powerpc/platforms/85xx/Kconfig +3 -0
@@ -235,6 +235,9 @@ config P4080_DS select GPIO_MPC8XXX select HAS_RAPIDIO select PPC_EPAPR_HV_PIC + select MPC8xxx_GPIO if PHYLIB + select MDIO_BUS_MUX if PHYLIB + select MDIO_BUS_MUX_GPIO if PHYLIB help This option enables support for the P4080 DS board
arch/powerpc/platforms/85xx/corenet_ds.c +7 -0
@@ -106,6 +106,13 @@ static const struct of_device_id of_device_ids[] __devinitconst = { { .name = "handles", }, + { +/* +* Warning: this entry might need to be located before those +* for the Fman Ethernet nodes. +*/ + .compatible = "mdio-mux", + }, {} };
Signature · 1 line
1.7.3.4
Re: [PATCH 2/2] powerpc/85xx: add Fman MDIO muxing support to the P4080DS
=
Quoted 1 line · Timur Tabi
= renamed from arch/powerpc/platforms/85xx/corenet_ds.c +0
-0
b/arch/powerpc/platforms/85xx/corenet_ds.c
arch/powerpc/platforms/85xx/corenet_ds.c static const struct of_device_id of_device_ids[] =
Quoted 4 lines
index 925b028..a79fc79 100644
arch/powerpc/platforms/85xx/corenet_ds.c +0
-0@@ -106,6 +106,13 @@ static const struct of_device_id of_device_ids[] =
__devinitconst =3D {
arch/powerpc/platforms/85xx/corenet_ds.c static const struct of_device_id of_device_ids[] __devinitconst = {
Quoted 6 lines
arch/powerpc/platforms/85xx/corenet_ds.c +3
-0{ .name =3D "handles", }, + { +/* +* Warning: this entry might need to be located before =
those
arch/powerpc/platforms/85xx/corenet_ds.c static const struct of_device_id of_device_ids[] __devinitconst = { · line 117
Quoted 6 lines
arch/powerpc/platforms/85xx/corenet_ds.c +4
-0+* for the Fman Ethernet nodes. +*/ + .compatible =3D "mdio-mux", + }, {} };
Under what condition would that be the case?
- k=
Re: [PATCH 2/2] powerpc/85xx: add Fman MDIO muxing support to the P4080DS
Quoted 10 lines · Kumar Gala
Quoted 9 lines
Quoted 9 lines
arch/powerpc/platforms/85xx/corenet_ds.c +7
-0+ { +/* +* Warning: this entry might need to be located before those +* for the Fman Ethernet nodes. +*/ + .compatible = "mdio-mux", + },{} };Under what condition would that be the case?
We had this discussion already. In my tests, I had to locate this entry before these entries:
{
.compatible = "fsl,dpaa"
},
{
.compatible = "fsl,srio",
},otherwise, the mdio-mux code would not prepare the mdio mus in time, and there would be initialization failures. Now maybe this goes away with -EPROBE_DEFER, or maybe it doesn't. But until we push the DPAA drivers upstream, we won't know.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Re: [PATCH 2/2] powerpc/85xx: add Fman MDIO muxing support to the P4080DS
Quoted 12 lines · Timur Tabi
Quoted 10 lines · Kumar Gala
Quoted 9 lines
Quoted 9 lines
arch/powerpc/platforms/85xx/corenet_ds.c +7
-0+ { +/* +* Warning: this entry might need to be located before those +* for the Fman Ethernet nodes. +*/ + .compatible = "mdio-mux", + },{} };Under what condition would that be the case?
Quoted 1 line
We had this discussion already.
I think that was internally, and not on this specific comment wording. I don't think that code comment adequately explains things.
Quoted 4 lines
otherwise, the mdio-mux code would not prepare the mdio mus in time, and there would be initialization failures. Now maybe this goes away with -EPROBE_DEFER, or maybe it doesn't. But until we push the DPAA drivers upstream, we won't know.
Do you know if it's theoretically supposed to be fixed and just can't test it, or are you unsure of whether it's even supposed to work?
I don't think we should be relying on the order of this list to determine probe order. For one thing, it won't work if the drivers register after you create the platform devices (e.g. they're modules).
-Scott
Re: [PATCH 2/2] powerpc/85xx: add Fman MDIO muxing support to the P4080DS
Quoted 2 lines · Scott Wood
I think that was internally, and not on this specific comment wording. I don't think that code comment adequately explains things.
I don't really have any more insight to add.
Quoted 7 lines
Quoted 4 lines
otherwise, the mdio-mux code would not prepare the mdio mus in time, and there would be initialization failures. Now maybe this goes away with -EPROBE_DEFER, or maybe it doesn't. But until we push the DPAA drivers upstream, we won't know.
Do you know if it's theoretically supposed to be fixed and just can't test it, or are you unsure of whether it's even supposed to work?
I'm not sure of anything. For one thing, we don't implement EPROBE_DEFER in the DPAA drivers, so we'd probably have to fix that before anything. And then, I'm just guessing that's the solution.
Quoted 3 lines
I don't think we should be relying on the order of this list to determine probe order. For one thing, it won't work if the drivers register after you create the platform devices (e.g. they're modules).
I agree we should not be relying on the order, but I don't know what to do. EPROBE_DEFER was designed to handle this situation, so my recommendation is to worry about it later. I can beef up the comment to talk about that, if you want.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Re: [PATCH 2/2] powerpc/85xx: add Fman MDIO muxing support to the P4080DS
Quoted 6 lines · Timur Tabi
Quoted 2 lines · Scott Wood
I think that was internally, and not on this specific comment wording. I don't think that code comment adequately explains things.
I don't really have any more insight to add.
My point (at least, this part of it) was that more of the insight you've already provided should be moved from e-mail discussion to the code comment.
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
otherwise, the mdio-mux code would not prepare the mdio mus in time, and there would be initialization failures. Now maybe this goes away with -EPROBE_DEFER, or maybe it doesn't. But until we push the DPAA drivers upstream, we won't know.
Do you know if it's theoretically supposed to be fixed and just can't test it, or are you unsure of whether it's even supposed to work?
I'm not sure of anything. For one thing, we don't implement
EPROBE_DEFERin the DPAA drivers, so we'd probably have to fix that before anything. And then, I'm just guessing that's the solution.
I feel confident saying it is the solution, at least until it is demonstrated otherwise.
Quoted 8 lines
Quoted 3 lines
I don't think we should be relying on the order of this list to determine probe order. For one thing, it won't work if the drivers register after you create the platform devices (e.g. they're modules).
I agree we should not be relying on the order, but I don't know what to do.
EPROBE_DEFERwas designed to handle this situation, so my recommendation is to worry about it later. I can beef up the comment to talk about that, if you want.
If the DPAA driver doesn't implement it when it's submitted, it's a bug in the DPAA driver and we should insist it be fixed. I don't think we should at all entertain the notion that careful device id list ordering is even a potential solution.
If anything, I'd make the ordering be "wrong" to force that code path to be tested -- though ideally there would be a more systematic approach to such testing, that doesn't require inefficiency during normal boot.
-Scott
Re: [PATCH 2/2] powerpc/85xx: add Fman MDIO muxing support to the P4080DS
Quoted 4 lines · Scott Wood
If anything, I'd make the ordering be "wrong" to force that code path to be tested -- though ideally there would be a more systematic approach to such testing, that doesn't require inefficiency during normal boot.
I can't force the ordering to be wrong, because it's the only entry in the list. The DPAA entries are not there yet.
This is what I have now:
static const struct of_device_id of_device_ids[] __devinitconst = {
{
.compatible = "simple-bus"
},
{
.compatible = "fsl,srio",
},
{
.compatible = "fsl,p4080-pcie",
},
{
.compatible = "fsl,qoriq-pcie-v2.2",
},
{
.compatible = "fsl,qoriq-pcie-v2.3",
},
{
.compatible = "fsl,qoriq-pcie-v2.4",
},
/* The following two are for the Freescale hypervisor */
{
.name = "hypervisor",
},
{
.name = "handles",
},
{
/*
* Warning: this entry might need to be located before those
* for the Fman Ethernet nodes, although using EPROBE_DEFER
* in the DPAA drivers could fix that.
*/
.compatible = "mdio-mux",
},
{}
};Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Re: [PATCH 2/2] powerpc/85xx: add Fman MDIO muxing support to the P4080DS
Quoted 8 lines · Timur Tabi
Quoted 4 lines · Scott Wood
If anything, I'd make the ordering be "wrong" to force that code path to be tested -- though ideally there would be a more systematic approach to such testing, that doesn't require inefficiency during normal boot.
I can't force the ordering to be wrong, because it's the only entry in the list. The DPAA entries are not there yet.
Right, I mean once the DPAA entries are added.
Quoted 28 lines
This is what I have now:
static const struct of_device_id of_device_ids[] __devinitconst = { { .compatible = "simple-bus" }, { .compatible = "fsl,srio", }, { .compatible = "fsl,p4080-pcie", }, { .compatible = "fsl,qoriq-pcie-v2.2", }, { .compatible = "fsl,qoriq-pcie-v2.3", }, { .compatible = "fsl,qoriq-pcie-v2.4", }, /* The following two are for the Freescale hypervisor */ { .name = "hypervisor", }, { .name = "handles", },
Quoted 8 lines
{
/*
* Warning: this entry might need to be located before those
* for the Fman Ethernet nodes, although using EPROBE_DEFER
* in the DPAA drivers could fix that.
*/
.compatible = "mdio-mux",
},I'd either say nothing here or say only "The ethernet driver should use EPROBE_DEFER to ensure that the mdio-mux is probed first". Don't give whoever submits the DPAA ethernet driver the idea that relying on list order is an acceptable solution.
-Scott
Quoted 5 lines · Timur Tabi
Introduce the template include files for the Freecale Frame Manager (Fman). An SOC can have up to two Fman devices, and each Fman can have up to five 1G Ethernet MACs and one 10G Ethernet MAC.
Signed-off-by Timur Tabi <[email protected]>
Quoted 16 lines
--- arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi | 140 +++++++++++++++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi | 54 ++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi | 63 +++++++++ arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi | 140 +++++++++++++++++++++ 14 files changed, 1027 insertions(+), 0 deletions(-)
Where's the binding document for all this? Why isn't devicetree-discuss on CC?
-Scott
Quoted 2 lines · Scott Wood
Where's the binding document for all this? Why isn't devicetree-discuss on CC?
Oops. I don't even know if our existing documentation is up-to-date. Ugh. I'll dig it up and post a v2.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale