]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac
authorFrank Wunderlich <frank-w@public-files.de>
Wed, 9 Jul 2025 11:09:48 +0000 (13:09 +0200)
committerMatthias Brugger <matthias.bgg@gmail.com>
Tue, 9 Sep 2025 12:52:30 +0000 (14:52 +0200)
Add SFP cages to Bananapi-R4 board. The 2.5g phy variant only contains the
wan-SFP, so add this to common dtsi and the lan-sfp only to the dual-SFP
variant.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20250709111147.11843-13-linux@fw-web.de
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi

index 53de9c113f60390da8d07a748f117e47f20ab964..6f0c81e3fd941ec723f82d83e68d9ea7959371e6 100644 (file)
@@ -9,3 +9,14 @@
        model = "Banana Pi BPI-R4 (1x SFP+, 1x 2.5GbE)";
        chassis-type = "embedded";
 };
+
+&gmac1 {
+       phy = <&int_2p5g_phy>;
+       phy-mode = "internal";
+       status = "okay";
+};
+
+&int_2p5g_phy {
+       pinctrl-0 = <&i2p5gbe_led0_pins>;
+       pinctrl-names = "i2p5gbe-led";
+};
index 36bd1ef2efab93b8fe57c8018380ac71309c8cc7..4b3796ba82e36aae693f16c27dcfdf95f9ce8185 100644 (file)
@@ -8,6 +8,25 @@
        compatible = "bananapi,bpi-r4", "mediatek,mt7988a";
        model = "Banana Pi BPI-R4 (2x SFP+)";
        chassis-type = "embedded";
+
+       /* SFP2 cage (LAN) */
+       sfp2: sfp2 {
+               compatible = "sff,sfp";
+               i2c-bus = <&i2c_sfp2>;
+               maximum-power-milliwatt = <3000>;
+
+               los-gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
+               mod-def0-gpios = <&pio 83 GPIO_ACTIVE_LOW>;
+               rate-select0-gpios = <&pio 3 GPIO_ACTIVE_LOW>;
+               tx-disable-gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
+               tx-fault-gpios = <&pio 1 GPIO_ACTIVE_HIGH>;
+       };
+};
+
+&gmac1 {
+       managed = "in-band-status";
+       phy-mode = "usxgmii";
+       sfp = <&sfp2>;
 };
 
 &pca9545 {
index 6a62da34a51e527e9cc3750555464195c7f9d2a2..34c1bc7f6c097fe0f59d4ff00b38ca71abf9f9de 100644 (file)
                regulator-boot-on;
                regulator-always-on;
        };
+
+       /* SFP1 cage (WAN) */
+       sfp1: sfp1 {
+               compatible = "sff,sfp";
+               i2c-bus = <&i2c_sfp1>;
+               maximum-power-milliwatt = <3000>;
+
+               los-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
+               mod-def0-gpios = <&pio 82 GPIO_ACTIVE_LOW>;
+               rate-select0-gpios = <&pio 21 GPIO_ACTIVE_LOW>;
+               tx-disable-gpios = <&pio 70 GPIO_ACTIVE_HIGH>;
+               tx-fault-gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
+       };
 };
 
 &cci {
        };
 };
 
+&gmac2 {
+       managed = "in-band-status";
+       phy-mode = "usxgmii";
+       sfp = <&sfp1>;
+};
+
 &i2c0 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c0_pins>;