[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37c7ac6c-a5ea-45cc-8ded-9d9bb22d092e@collabora.com>
Date: Wed, 11 Jun 2025 11:33:37 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Frank Wunderlich <linux@...web.de>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>, Georgi Djakov <djakov@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Andrew Lunn <andrew@...n.ch>,
Vladimir Oltean <olteanv@...il.com>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Matthias Brugger <matthias.bgg@...il.com>
Cc: Frank Wunderlich <frank-w@...lic-files.de>,
Jia-Wei Chang <jia-wei.chang@...iatek.com>,
Johnson Wang <johnson.wang@...iatek.com>, Arınç ÜNAL
<arinc.unal@...nc9.com>, Landen Chao <Landen.Chao@...iatek.com>,
DENG Qingfang <dqfext@...il.com>, Sean Wang <sean.wang@...iatek.com>,
Daniel Golle <daniel@...rotopia.org>, Lorenzo Bianconi <lorenzo@...nel.org>,
Felix Fietkau <nbd@....name>, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH v3 12/13] arm64: dts: mediatek: mt7988a-bpi-r4: add sfp
cages and link to gmac
Il 08/06/25 23:14, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@...lic-files.de>
>
> 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@...rotopia.org>
> Signed-off-by: Frank Wunderlich <frank-w@...lic-files.de>
> ---
> v3:
> - enable mac with 2.5g phy on r4 phy variant because driver is now mainline
> ---
> .../mediatek/mt7988a-bananapi-bpi-r4-2g5.dts | 12 ++++++++++++
> .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 18 ++++++++++++++++++
> .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 18 ++++++++++++++++++
> 3 files changed, 48 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts
> index 53de9c113f60..e63e17ae35a0 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts
> @@ -9,3 +9,15 @@ / {
> model = "Banana Pi BPI-R4 (1x SFP+, 1x 2.5GbE)";
> chassis-type = "embedded";
> };
> +
> +&gmac1 {
phy = ...
phy-c..onnection-type
phy-m...ode
> + phy-mode = "internal";
> + phy-connection-type = "internal";
> + phy = <&int_2p5g_phy>;
> + status = "okay";
> +};
> +
> +&int_2p5g_phy {
> + pinctrl-names = "i2p5gbe-led";
> + pinctrl-0 = <&i2p5gbe_led0_pins>;
pinctrl-names
pinctrl-0
> +};
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> index 36bd1ef2efab..3136dc4ba4cc 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
> @@ -8,6 +8,24 @@ / {
> 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 here
(blank line)
...then gpios
> + los-gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
> + mod-def0-gpios = <&pio 83 GPIO_ACTIVE_LOW>;
(r)ate-select0-gpios before (t)x-disable....
> + 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>;
> + };
> +};
> +
> +&gmac1 {
managed
phy-mode
sfp
> + sfp = <&sfp2>;
> + managed = "in-band-status";
> + phy-mode = "usxgmii";
> };
>
> &pca9545 {
> diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
> index 20073eb4d1bd..d8b9cd794ee3 100644
> --- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
> @@ -63,6 +63,18 @@ reg_3p3v: regulator-3p3v {
> regulator-boot-on;
> regulator-always-on;
> };
> +
> + /* SFP1 cage (WAN) */
> + sfp1: sfp1 {
> + compatible = "sff,sfp";
> + i2c-bus = <&i2c_sfp1>;
(same comments from sfp2)
> + los-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
> + mod-def0-gpios = <&pio 82 GPIO_ACTIVE_LOW>;
> + tx-disable-gpios = <&pio 70 GPIO_ACTIVE_HIGH>;
> + tx-fault-gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
> + rate-select0-gpios = <&pio 21 GPIO_ACTIVE_LOW>;
> + maximum-power-milliwatt = <3000>;
> + };
> };
>
> &cci {
> @@ -133,6 +145,12 @@ map-cpu-active-low {
> };
> };
>
> +&gmac2 {
(same comments from gmac1)
> + sfp = <&sfp1>;
> + managed = "in-band-status";
> + phy-mode = "usxgmii";
> +};
> +
> &i2c0 {
> pinctrl-names = "default";
> pinctrl-0 = <&i2c0_pins>;
Cheers,
Angelo
Powered by blists - more mailing lists