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

Andrew Lunn
2025-06-08T21:31:59Z

> +&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.

> + /* 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?

Andrew