mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-11 10:25:28 +07:00
![Linus Torvalds](/assets/img/avatar_default.png)
- Removal of most of_platform_populate() calls in arch code. Now the DT core code calls it in the default case and platforms only need to call it if they have special needs. - Use pr_fmt on all the DT core print statements. - CoreSight binding doc improvements to block name descriptions. - Add dt_to_config script which can parse dts files and list corresponding kernel config options. - Fix memory leak hit with a PowerMac DT. - Correct a bunch of STMicro compatible strings to use the correct vendor prefix. - Fix DA9052 PMIC binding doc to match what is actually used in dts files. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXm9KcAAoJEPr7XbWNvGHDRT4QAIIIOSB4AWHardnMLROgGge9 aOQKZ/05O9feOcxYKe8FkQbcH+IujJjrUL+yrRD36yGQPAyBP21gtcmmfrkCcwFM kH915f/JbGvXpfwEf8dcarHhzYH6FFJiQGduPpWfwSSWynx+xq5EKPwCqYzMg8bN SExxt7vUx1MKFOExZ0K8BNCo8VMVLUWQoJ1DNeJDuL25Op4EU3i2l1HQNYV/3XDk BSA3x7Lw3GjrWEH20VWYn2Azq1OFLY+E2FC2lnG4nbkk5X8dZbUH9PR1Sk7uTQDj uxTjWe59NBpliCxKSAbMbTAU/WwSB1pJ0I+zDJBiQsdFT+nb5F4zOrs3qSKHa/A9 Rv6AC8k5gdSMrDB1dOspfF2vWvOOInXgNV4/Kza0D92mbCpwyUuF+vhE6rfcMrZU OiD7rj2/fvO7Y9fUAhrp6zrfrOfH9B1Z9vS+940AlK96YwPE2+J0SA2vBxR/wg8H 7fj4Ud5X+SFisXWQhh5Wlv0W9o6e7C7fsi8vpkQ7gufmezLFWVnJKsUfQaxGEwhG Hkhm9kuSHHMd+6dEnn2756DnNfJAtQv6rSR0/QR4Lf9y5L4dvR3kAQIci8X/nx4P sIk+IJWGZG6wziZq59hh+SO6HEqdSNuvh+5sbR0iUimdE/1HsDBdPiocXf/r8iwK NY9nGeZPRrXmFgdpoZfm =wLMr -----END PGP SIGNATURE----- Merge tag 'devicetree-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: - remove most of_platform_populate() calls in arch code. Now the DT core code calls it in the default case and platforms only need to call it if they have special needs - use pr_fmt on all the DT core print statements - CoreSight binding doc improvements to block name descriptions - add dt_to_config script which can parse dts files and list corresponding kernel config options - fix memory leak hit with a PowerMac DT - correct a bunch of STMicro compatible strings to use the correct vendor prefix - fix DA9052 PMIC binding doc to match what is actually used in dts files * tag 'devicetree-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (35 commits) documentation: da9052: Update regulator bindings names to match DA9052/53 DTS expectations xtensa: Partially Revert "xtensa: Remove unnecessary of_platform_populate with default match table" xtensa: Fix build error due to missing include file MIPS: ath79: Add missing include file Fix spelling errors in Documentation/devicetree ARM: dts: fix STMicroelectronics compatible strings powerpc/dts: fix STMicroelectronics compatible strings Documentation: dt: i2c: use correct STMicroelectronics vendor prefix scripts/dtc: dt_to_config - kernel config options for a devicetree of: fdt: mark unflattened tree as detached of: overlay: add resolver error prints coresight: document binding acronyms Documentation/devicetree: document cavium-pip rx-delay/tx-delay properties of: use pr_fmt prefix for all console printing of/irq: Mark initialised interrupt controllers as populated of: fix memory leak related to safe_name() Revert "of/platform: export of_default_bus_match_table" of: unittest: use of_platform_default_populate() to populate default bus memory: omap-gpmc: use of_platform_default_populate() to populate default bus bus: uniphier-system-bus: use of_platform_default_populate() to populate default bus ...
419 lines
9.4 KiB
Plaintext
419 lines
9.4 KiB
Plaintext
Distributed Switch Architecture Device Tree Bindings
|
|
----------------------------------------------------
|
|
|
|
Two bindings exist, one of which has been deprecated due to
|
|
limitations.
|
|
|
|
Current Binding
|
|
---------------
|
|
|
|
Switches are true Linux devices and can be probes by any means. Once
|
|
probed, they register to the DSA framework, passing a node
|
|
pointer. This node is expected to fulfil the following binding, and
|
|
may contain additional properties as required by the device it is
|
|
embedded within.
|
|
|
|
Required properties:
|
|
|
|
- ports : A container for child nodes representing switch ports.
|
|
|
|
Optional properties:
|
|
|
|
- dsa,member : A two element list indicates which DSA cluster, and position
|
|
within the cluster a switch takes. <0 0> is cluster 0,
|
|
switch 0. <0 1> is cluster 0, switch 1. <1 0> is cluster 1,
|
|
switch 0. A switch not part of any cluster (single device
|
|
hanging off a CPU port) must not specify this property
|
|
|
|
The ports container has the following properties
|
|
|
|
Required properties:
|
|
|
|
- #address-cells : Must be 1
|
|
- #size-cells : Must be 0
|
|
|
|
Each port children node must have the following mandatory properties:
|
|
- reg : Describes the port address in the switch
|
|
- label : Describes the label associated with this port, which
|
|
will become the netdev name. Special labels are
|
|
"cpu" to indicate a CPU port and "dsa" to
|
|
indicate an uplink/downlink port between switches in
|
|
the cluster.
|
|
|
|
A port labelled "dsa" has the following mandatory property:
|
|
|
|
- link : Should be a list of phandles to other switch's DSA
|
|
port. This port is used as the outgoing port
|
|
towards the phandle ports. The full routing
|
|
information must be given, not just the one hop
|
|
routes to neighbouring switches.
|
|
|
|
A port labelled "cpu" has the following mandatory property:
|
|
|
|
- ethernet : Should be a phandle to a valid Ethernet device node.
|
|
This host device is what the switch port is
|
|
connected to.
|
|
|
|
Port child nodes may also contain the following optional standardised
|
|
properties, described in binding documents:
|
|
|
|
- phy-handle : Phandle to a PHY on an MDIO bus. See
|
|
Documentation/devicetree/bindings/net/ethernet.txt
|
|
for details.
|
|
|
|
- phy-mode : See
|
|
Documentation/devicetree/bindings/net/ethernet.txt
|
|
for details.
|
|
|
|
- fixed-link : Fixed-link subnode describing a link to a non-MDIO
|
|
managed entity. See
|
|
Documentation/devicetree/bindings/net/fixed-link.txt
|
|
for details.
|
|
|
|
Example
|
|
|
|
The following example shows three switches on three MDIO busses,
|
|
linked into one DSA cluster.
|
|
|
|
&mdio1 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
switch0: switch0@0 {
|
|
compatible = "marvell,mv88e6085";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <0>;
|
|
|
|
dsa,member = <0 0>;
|
|
|
|
ports {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
port@0 {
|
|
reg = <0>;
|
|
label = "lan0";
|
|
};
|
|
|
|
port@1 {
|
|
reg = <1>;
|
|
label = "lan1";
|
|
};
|
|
|
|
port@2 {
|
|
reg = <2>;
|
|
label = "lan2";
|
|
};
|
|
|
|
switch0port5: port@5 {
|
|
reg = <5>;
|
|
label = "dsa";
|
|
phy-mode = "rgmii-txid";
|
|
link = <&switch1port6
|
|
&switch2port9>;
|
|
fixed-link {
|
|
speed = <1000>;
|
|
full-duplex;
|
|
};
|
|
};
|
|
|
|
port@6 {
|
|
reg = <6>;
|
|
label = "cpu";
|
|
ethernet = <&fec1>;
|
|
fixed-link {
|
|
speed = <100>;
|
|
full-duplex;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&mdio2 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
switch1: switch1@0 {
|
|
compatible = "marvell,mv88e6085";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <0>;
|
|
|
|
dsa,member = <0 1>;
|
|
|
|
ports {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
port@0 {
|
|
reg = <0>;
|
|
label = "lan3";
|
|
phy-handle = <&switch1phy0>;
|
|
};
|
|
|
|
port@1 {
|
|
reg = <1>;
|
|
label = "lan4";
|
|
phy-handle = <&switch1phy1>;
|
|
};
|
|
|
|
port@2 {
|
|
reg = <2>;
|
|
label = "lan5";
|
|
phy-handle = <&switch1phy2>;
|
|
};
|
|
|
|
switch1port5: port@5 {
|
|
reg = <5>;
|
|
label = "dsa";
|
|
link = <&switch2port9>;
|
|
phy-mode = "rgmii-txid";
|
|
fixed-link {
|
|
speed = <1000>;
|
|
full-duplex;
|
|
};
|
|
};
|
|
|
|
switch1port6: port@6 {
|
|
reg = <6>;
|
|
label = "dsa";
|
|
phy-mode = "rgmii-txid";
|
|
link = <&switch0port5>;
|
|
fixed-link {
|
|
speed = <1000>;
|
|
full-duplex;
|
|
};
|
|
};
|
|
};
|
|
mdio-bus {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
switch1phy0: switch1phy0@0 {
|
|
reg = <0>;
|
|
};
|
|
switch1phy1: switch1phy0@1 {
|
|
reg = <1>;
|
|
};
|
|
switch1phy2: switch1phy0@2 {
|
|
reg = <2>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
&mdio4 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
switch2: switch2@0 {
|
|
compatible = "marvell,mv88e6085";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <0>;
|
|
|
|
dsa,member = <0 2>;
|
|
|
|
ports {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
port@0 {
|
|
reg = <0>;
|
|
label = "lan6";
|
|
};
|
|
|
|
port@1 {
|
|
reg = <1>;
|
|
label = "lan7";
|
|
};
|
|
|
|
port@2 {
|
|
reg = <2>;
|
|
label = "lan8";
|
|
};
|
|
|
|
port@3 {
|
|
reg = <3>;
|
|
label = "optical3";
|
|
fixed-link {
|
|
speed = <1000>;
|
|
full-duplex;
|
|
link-gpios = <&gpio6 2
|
|
GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
port@4 {
|
|
reg = <4>;
|
|
label = "optical4";
|
|
fixed-link {
|
|
speed = <1000>;
|
|
full-duplex;
|
|
link-gpios = <&gpio6 3
|
|
GPIO_ACTIVE_HIGH>;
|
|
};
|
|
};
|
|
|
|
switch2port9: port@9 {
|
|
reg = <9>;
|
|
label = "dsa";
|
|
phy-mode = "rgmii-txid";
|
|
link = <&switch1port5
|
|
&switch0port5>;
|
|
fixed-link {
|
|
speed = <1000>;
|
|
full-duplex;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
Deprecated Binding
|
|
------------------
|
|
|
|
The deprecated binding makes use of a platform device to represent the
|
|
switches. The switches themselves are not Linux devices, and make use
|
|
of an MDIO bus for management.
|
|
|
|
Required properties:
|
|
- compatible : Should be "marvell,dsa"
|
|
- #address-cells : Must be 2, first cell is the address on the MDIO bus
|
|
and second cell is the address in the switch tree.
|
|
Second cell is used only when cascading/chaining.
|
|
- #size-cells : Must be 0
|
|
- dsa,ethernet : Should be a phandle to a valid Ethernet device node
|
|
- dsa,mii-bus : Should be a phandle to a valid MDIO bus device node
|
|
|
|
Optional properties:
|
|
- interrupts : property with a value describing the switch
|
|
interrupt number (not supported by the driver)
|
|
|
|
A DSA node can contain multiple switch chips which are therefore child nodes of
|
|
the parent DSA node. The maximum number of allowed child nodes is 4
|
|
(DSA_MAX_SWITCHES).
|
|
Each of these switch child nodes should have the following required properties:
|
|
|
|
- reg : Contains two fields. The first one describes the
|
|
address on the MII bus. The second is the switch
|
|
number that must be unique in cascaded configurations
|
|
- #address-cells : Must be 1
|
|
- #size-cells : Must be 0
|
|
|
|
A switch child node has the following optional property:
|
|
|
|
- eeprom-length : Set to the length of an EEPROM connected to the
|
|
switch. Must be set if the switch can not detect
|
|
the presence and/or size of a connected EEPROM,
|
|
otherwise optional.
|
|
|
|
A switch may have multiple "port" children nodes
|
|
|
|
Each port children node must have the following mandatory properties:
|
|
- reg : Describes the port address in the switch
|
|
- label : Describes the label associated with this port, special
|
|
labels are "cpu" to indicate a CPU port and "dsa" to
|
|
indicate an uplink/downlink port.
|
|
|
|
Note that a port labelled "dsa" will imply checking for the uplink phandle
|
|
described below.
|
|
|
|
Optional property:
|
|
- link : Should be a list of phandles to another switch's DSA port.
|
|
This property is only used when switches are being
|
|
chained/cascaded together. This port is used as outgoing port
|
|
towards the phandle port, which can be more than one hop away.
|
|
|
|
- phy-handle : Phandle to a PHY on an external MDIO bus, not the
|
|
switch internal one. See
|
|
Documentation/devicetree/bindings/net/ethernet.txt
|
|
for details.
|
|
|
|
- phy-mode : String representing the connection to the designated
|
|
PHY node specified by the 'phy-handle' property. See
|
|
Documentation/devicetree/bindings/net/ethernet.txt
|
|
for details.
|
|
|
|
- mii-bus : Should be a phandle to a valid MDIO bus device node.
|
|
This mii-bus will be used in preference to the
|
|
global dsa,mii-bus defined above, for this switch.
|
|
|
|
Optional subnodes:
|
|
- fixed-link : Fixed-link subnode describing a link to a non-MDIO
|
|
managed entity. See
|
|
Documentation/devicetree/bindings/net/fixed-link.txt
|
|
for details.
|
|
|
|
Example:
|
|
|
|
dsa@0 {
|
|
compatible = "marvell,dsa";
|
|
#address-cells = <2>;
|
|
#size-cells = <0>;
|
|
|
|
interrupts = <10>;
|
|
dsa,ethernet = <ðernet0>;
|
|
dsa,mii-bus = <&mii_bus0>;
|
|
|
|
switch@0 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <16 0>; /* MDIO address 16, switch 0 in tree */
|
|
|
|
port@0 {
|
|
reg = <0>;
|
|
label = "lan1";
|
|
phy-handle = <&phy0>;
|
|
};
|
|
|
|
port@1 {
|
|
reg = <1>;
|
|
label = "lan2";
|
|
};
|
|
|
|
port@5 {
|
|
reg = <5>;
|
|
label = "cpu";
|
|
};
|
|
|
|
switch0port6: port@6 {
|
|
reg = <6>;
|
|
label = "dsa";
|
|
link = <&switch1port0
|
|
&switch2port0>;
|
|
};
|
|
};
|
|
|
|
switch@1 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <17 1>; /* MDIO address 17, switch 1 in tree */
|
|
mii-bus = <&mii_bus1>;
|
|
reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
|
|
|
|
switch1port0: port@0 {
|
|
reg = <0>;
|
|
label = "dsa";
|
|
link = <&switch0port6>;
|
|
};
|
|
switch1port1: port@1 {
|
|
reg = <1>;
|
|
label = "dsa";
|
|
link = <&switch2port1>;
|
|
};
|
|
};
|
|
|
|
switch@2 {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <18 2>; /* MDIO address 18, switch 2 in tree */
|
|
mii-bus = <&mii_bus1>;
|
|
|
|
switch2port0: port@0 {
|
|
reg = <0>;
|
|
label = "dsa";
|
|
link = <&switch1port1
|
|
&switch0port6>;
|
|
};
|
|
};
|
|
};
|