summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2016-12-11 16:03:00 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2019-07-09 16:42:14 +0100
commit7dfdffc581dc65eabf2b5259d562160b0d05e684 (patch)
tree15b1dd577a560c93fc4a2e8c95449aac724f89f4
parentf063741511c070e45f724e78b7768a59bb3d7d77 (diff)
arm64: dts: marvell: mcbin: add mvpp2x ethernet support
Add support for the Marvell MVPP2x driver for Macchiatobin. The mainline MVPP2 driver can be selected by defining MCBIN_USE_MVPP2_DRIVER. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts83
-rw-r--r--arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts98
-rw-r--r--arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi1
3 files changed, 182 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
index c3e18fd5bc27..2de06e83bdf1 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
@@ -27,3 +27,86 @@
managed = "in-band-status";
sfp = <&sfp_eth1>;
};
+
+/*==================*/
+
+#ifndef MCBIN_USE_MVPP2_DRIVER
+&cp0_ethernet {
+ status = "disabled";
+};
+
+&cp0_eth0 {
+ status = "disabled";
+};
+
+&cp1_ethernet {
+ status = "disabled";
+};
+
+&cp1_eth1 {
+ status = "disabled";
+};
+
+&cp0_mv_ppv22 {
+ status = "okay";
+};
+
+&cp0_mv_emac0 {
+ mac-address = [00 00 00 00 53 01];
+ managed = "in-band-status";
+ phy-mode = "10gbase-kr";
+ phy-names = "comphy";
+ phys = <&cp0_comphy4 0>;
+ sfp = <&sfp_eth0>;
+};
+
+&cp0_mv_eth0 {
+ status = "okay";
+};
+
+&cp1_mv_ppv22 {
+ status = "okay";
+};
+
+&cp1_mv_emac0 {
+ /* CPS Lane 4 */
+ mac-address = [00 00 00 00 53 04];
+ managed = "in-band-status";
+ phy-mode = "10gbase-kr";
+ phy-names = "comphy";
+ phys = <&cp1_comphy4 0>;
+ sfp = <&sfp_eth1>;
+};
+
+&cp1_mv_eth0 {
+ status = "okay";
+};
+
+&cp1_mv_emac2 {
+ /* CPS Lane 0 - J5 (Gigabit RJ45) */
+ mac-address = [00 00 00 00 53 05];
+ managed = "in-band-status";
+ phy = <&ge_phy>;
+ phy-mode = "sgmii";
+ phy-names = "comphy";
+ phys = <&cp1_comphy0 1>;
+};
+
+&cp1_mv_eth1 {
+ status = "okay";
+};
+
+&cp1_mv_emac3 {
+ /* CPS Lane 5 - CON3,4 (SFP) */
+ mac-address = [00 00 00 00 53 06];
+ managed = "in-band-status";
+ phy-mode = "sgmii";
+ phy-names = "comphy";
+ phys = <&cp1_comphy5 2>;
+ sfp = <&sfp_eth3>;
+};
+
+&cp1_mv_eth2 {
+ status = "okay";
+};
+#endif
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
index d06f5ab7ddab..7d98bc3d15e8 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
@@ -43,3 +43,101 @@
phy = <&phy8>;
phy-mode = "10gbase-kr";
};
+
+/*==================*/
+
+#ifdef MCBIN_USE_MVPP2_DRIVER
+/* Mainline MVPP2 driver */
+&cp0_eth0 {
+ mac-address = [00 00 00 00 00 01];
+};
+
+&cp1_eth0 {
+ mac-address = [00 00 00 00 00 04];
+};
+
+&cp1_eth1 {
+ mac-address = [00 00 00 00 00 05];
+};
+
+&cp1_eth2 {
+ mac-address = [00 00 00 00 00 06];
+};
+
+#else
+/* Marvell MVPP2x driver */
+&cp0_ethernet {
+ status = "disabled";
+};
+
+&cp0_eth0 {
+ status = "disabled";
+};
+
+&cp1_ethernet {
+ status = "disabled";
+};
+
+&cp1_eth1 {
+ status = "disabled";
+};
+
+&cp0_mv_ppv22 {
+ status = "okay";
+};
+
+&cp0_mv_emac0 {
+ mac-address = [00 00 00 00 00 01];
+ phy = <&phy0>;
+ phy-mode = "10gbase-kr";
+ phy-names = "comphy";
+ phys = <&cp0_comphy4 0>;
+};
+
+&cp0_mv_eth0 {
+ status = "okay";
+};
+
+&cp1_mv_ppv22 {
+ status = "okay";
+};
+
+&cp1_mv_emac0 {
+ /* CPS Lane 4 */
+ mac-address = [00 00 00 00 00 04];
+ phy = <&phy8>;
+ phy-mode = "10gbase-kr";
+ phy-names = "comphy";
+ phys = <&cp1_comphy4 0>;
+};
+
+&cp1_mv_eth0 {
+ status = "okay";
+};
+
+&cp1_mv_emac2 {
+ /* CPS Lane 0 - J5 (Gigabit RJ45) */
+ mac-address = [00 00 00 00 00 05];
+ phy = <&ge_phy>;
+ phy-mode = "sgmii";
+ phy-names = "comphy";
+ phys = <&cp1_comphy0 1>;
+};
+
+&cp1_mv_eth1 {
+ status = "okay";
+};
+
+&cp1_mv_emac3 {
+ /* CPS Lane 5 - CON3,4 (SFP) */
+ mac-address = [00 00 00 00 00 06];
+ phy-mode = "sgmii";
+ phy-names = "comphy";
+ phys = <&cp1_comphy5 2>;
+ sfp = <&sfp_eth3>;
+};
+
+&cp1_mv_eth2 {
+ status = "okay";
+};
+#endif
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
index 64c75a354847..7ce4a6879bf8 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
@@ -174,6 +174,7 @@
status = "okay";
ge_phy: ethernet-phy@0 {
+ /* should use in-band negotiation */
reg = <0>;
};
};