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>2020-01-22 17:47:23 +0000
commitded7c9f09d7849bb30236cc57dbb79fbdaf57a48 (patch)
treedb6300501dd07dd5f97d475c89d0b4eb182967e0
parentd85c3a4f239d3fc77ce71f24dd25336ea3554012 (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.dts97
-rw-r--r--arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi1
3 files changed, 181 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..26114d96d637 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>;
};
+
+/*==================*/
+
+#ifdef MCBIN_USE_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 53 01];
+ managed = "in-band-status";
+ phy-mode = "10gbase-r";
+ 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-r";
+ 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 87a3149a4261..f3025a16f4d4 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
@@ -45,3 +45,100 @@
phy = <&phy8>;
phy-mode = "10gbase-kr";
};
+
+/*==================*/
+
+#ifdef MCBIN_USE_MVPP2X_DRIVER
+/* 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-r";
+ 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-r";
+ 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";
+};
+#else
+/* 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];
+};
+#endif
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
index 87c0e1f73890..bf9f20a4f7b4 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
@@ -169,6 +169,7 @@
status = "okay";
ge_phy: ethernet-phy@0 {
+ /* should use in-band negotiation */
reg = <0>;
};
};