Aw: Re: [PATCH v3 12/13] arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac

Frank Wunderlich
2025-06-10T09:04:17Z

Hi Andrew

> Gesendet: Sonntag, 8. Juni 2025 um 23:31
> Von: "Andrew Lunn" <andrew@lunn.ch>
> Betreff: Re: [PATCH v3 12/13] arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac
>
> > +&gmac1 {
> > + phy-mode = "internal";
> > + phy-connection-type = "internal";
>
> ethernet-controller.yaml says:
>
> phy-connection-type:
> description:
> Specifies interface type between the Ethernet device and a physical
> layer (PHY) device.
> enum:
> # There is not a standard bus between the MAC and the PHY,
> # something proprietary is being used to embed the PHY in the
> # MAC.
> - internal
> - mii
> - gmii
> ...
>
> phy-mode:
> $ref: "#/properties/phy-connection-type"
>
>
> so phy-mode and phy-connection-type are the same thing.

phy-connection-type seems not needed, tested without it and 2.5G phy works without this property in the 2g5 dts.

> > + /* SFP2 cage (LAN) */
> > + sfp2: sfp2 {
> > + compatible = "sff,sfp";
> > + i2c-bus = <&i2c_sfp2>;
> > + los-gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
> > + mod-def0-gpios = <&pio 83 GPIO_ACTIVE_LOW>;
> > + tx-disable-gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
> > + tx-fault-gpios = <&pio 1 GPIO_ACTIVE_HIGH>;
> > + rate-select0-gpios = <&pio 3 GPIO_ACTIVE_LOW>;
> > + maximum-power-milliwatt = <3000>;
>
> sff,sfp.yaml says:
>
> maximum-power-milliwatt:
> minimum: 1000
> default: 1000
> description:
> Maximum module power consumption Specifies the maximum power consumption
> allowable by a module in the slot, in milli-Watts. Presently, modules can
> be up to 1W, 1.5W or 2W.
>
> I've no idea what will happen when the SFP core sees 3000. Is the
> comment out of date?

at least sfp-core has no issue with the setting

root@bpi-r4-phy-8G:~# dmesg | grep sfp
[ 1.269437] sfp sfp1: Host maximum power 3.0W
[ 1.613749] sfp sfp1: module CISCO-FINISAR FTLX8571D3BCL-C2 rev A sn S2209167650 dc 220916

imho some modules require more than 2W (some gpon/xpon and 10G copper ethernet).

> Andrew
>

regards Frank