From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5976126C02; Wed, 5 Nov 2025 21:18:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377519; cv=none; b=m6ASPQlsF3TEhwMdXCFP0tRwKjDesZ1/ugM2ilThDwicJ/1Jbj+bpT0gaiEc1T8XwRUy/8i/FKZ0pgffS6c720knddbTrIbHNEetfNYmaF2RUzZa/4cSVP77m6BVMn+hOyUunNLfOpyuQF5CEIkm6cRE1U27FabueZzt2d1zVpM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377519; c=relaxed/simple; bh=vTtFVwZhj2dtk28F9mb0pMLT2K98WweVea9+cuC24ag=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=C+ED7EDiKfbt3fInhR6slhqsz2NB1XXeJIuDxUw20s2DRG11sozyu/x8tDCQZzEnCVMMRtClOyXy/EL3pM/N0QweYdwRH+hsGsHSs9EG/M1VkjiJuhnJ4O/tPigdJ/yAGr7Nmm5oowhFPujbnW2SfPFZnTqi+BIIoySdq4Cn+Qc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=pSe49kn1; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="pSe49kn1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377515; bh=vTtFVwZhj2dtk28F9mb0pMLT2K98WweVea9+cuC24ag=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pSe49kn1CNJa/3TIsAfyiPmVF6y8Y8PaNI39JUJJAAPA5wWIFh6XiC4HVZx6wEFNL L5Kdzgoirrmikw+CUAcBOG09J/CVlUGuVArOzbmO7Wslf7ZxtcAwnpndJ43sBsrCq1 v/WOwnTgqG36ax9SAtLwXvRr9iFPFbDxYpPnBjW0uNx0LGTceQTwIerakX6nh/fve2 gDgnn7FFMsjEfMxOyPv6ZSm9V2QYVpS7DfzQzkZ+RBkSvVkeyS66FamW1RxSMduaYI esxgWGjHuf5H2/qYR975Jxrx8kLKRiAIjaJPBj3Zh03WC2gVt5fDKiYp1fSDHIIPAT u+lL/PGRDqsvQ== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 0483317E12AA; Wed, 5 Nov 2025 22:18:35 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id 916BF10F352DB; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:17:56 +0100 Subject: [PATCH v3 01/13] arm64: dts: mediatek: mt7981b-openwrt-one: Enable SPI NOR Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-1-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 The openwrt one has a SPI NOR flash which from factory is used for: * Recovery system * WiFi eeprom data * ethernet Mac addresses Describe this following the same partitions as the openwrt configuration uses. Signed-off-by: Sjoerd Simons --- V2 -> V3: Move earlier in the patch sequence V1 -> V2: - Use numeric drive-strength values rather then defines - Make nvmem cell labers more meaningfull - Only define nvmem cells used in later patches by devicetree --- .../boot/dts/mediatek/mt7981b-openwrt-one.dts | 79 ++++++++++++++++++= ++++ arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 2 +- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts b/arch/ar= m64/boot/dts/mediatek/mt7981b-openwrt-one.dts index 968b91f55bb27..6bb98629f4536 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +++ b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts @@ -3,6 +3,7 @@ /dts-v1/; =20 #include "mt7981b.dtsi" +#include "dt-bindings/pinctrl/mt65xx.h" =20 / { compatible =3D "openwrt,one", "mediatek,mt7981b"; @@ -22,6 +23,84 @@ memory@40000000 { }; }; =20 +&pio { + spi2_flash_pins: spi2-pins { + mux { + function =3D "spi"; + groups =3D "spi2"; + }; + + conf-pu { + bias-pull-up =3D ; + drive-strength =3D <8>; + pins =3D "SPI2_CS", "SPI2_WP"; + }; + + conf-pd { + bias-pull-down =3D ; + drive-strength =3D <8>; + pins =3D "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; + }; + }; +}; + +&spi2 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi2_flash_pins>; + status =3D "okay"; + + flash@0 { + compatible =3D "jedec,spi-nor"; + reg =3D <0>; + spi-max-frequency =3D <40000000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + partition@0 { + reg =3D <0x00000 0x40000>; + label =3D "bl2-nor"; + }; + + partition@40000 { + reg =3D <0x40000 0xc0000>; + label =3D "factory"; + read-only; + + nvmem-layout { + compatible =3D "fixed-layout"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + wifi_factory_calibration: eeprom@0 { + reg =3D <0x0 0x1000>; + }; + + wan_factory_mac: macaddr@24 { + reg =3D <0x24 0x6>; + compatible =3D "mac-base"; + #nvmem-cell-cells =3D <1>; + }; + }; + }; + + partition@100000 { + reg =3D <0x100000 0x80000>; + label =3D "fip-nor"; + }; + + partition@180000 { + reg =3D <0x180000 0xc80000>; + label =3D "recovery"; + }; + }; + }; +}; + &uart0 { status =3D "okay"; }; diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7981b.dtsi index 130ce2fda3995..f00e5bf63de35 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi @@ -156,7 +156,7 @@ i2c@11007000 { status =3D "disabled"; }; =20 - spi@11009000 { + spi2: spi@11009000 { compatible =3D "mediatek,mt7981-spi-ipm", "mediatek,spi-ipm"; reg =3D <0 0x11009000 0 0x1000>; interrupts =3D ; --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB6CC248F73; Wed, 5 Nov 2025 21:18:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377518; cv=none; b=J9borlUMqza8Ix6B0yLHsO1l67vCZv5eq2944mOeevq129rk0QoG7m/1mGufZiInALaUsvuhL2oiUlgV/9suj5wfkSRkd70dQ3WgcspWGOt2E4XGtgm1A4hJFqcd/mOHSI1oJfTVba1YK1jdJN264RVIXCGAFMbEVj8bCzMcljs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377518; c=relaxed/simple; bh=bArrOhdqiPrD9jwVtY5HEE/53V3p8i0UZ8xJQqCPlD0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aFIFfHVuBHejyNquFCTQ5NVVpd+XAsPVAtqzJBJ0qM+zA30HpEdccADwtvRnvpy3d7MmDSFUGQFJWcejZ3iF0br5UNpzM4DTFcRHEeh0gOtv0g0juRibDaK/t4/B84CRG2XQnerXbdlkRvw+dWkDh5tJOTa05scMIG8Wz5mv+BU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=VOReS/tB; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="VOReS/tB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377515; bh=bArrOhdqiPrD9jwVtY5HEE/53V3p8i0UZ8xJQqCPlD0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VOReS/tBa/q6ng2Yhr2+/vUP5UB2401ugVhFf+0UORldLzyq+GXymaYL+4TyWBzbq E5iJPmF4FgnRteq2+Zzs4MGmfv6KXhmt2G3qH5ETOCYYTIUARBRY6u25jdHX+O/gMo RQjh+GIR3h/L5Zus48T6qNKpMtJhHs1KZ5A/r+YahUv+BbOSHCEvWT7GIIh/9XOhL7 6WqcFwJl8Xo3y+1LOMSyZZ/b8WZs6XemcZZkphmKBEawG5voNrNc2TjHbEBZ2Imc79 JR7TkSCCYcSdQkGq79iDohJaa4FfGFvVEDfMbGBBWDITlglqViL0jmLc5ieNhvCiXt VgNVVQbZqGcxg== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id E12A417E129C; Wed, 5 Nov 2025 22:18:34 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id 96B5110F352DD; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:17:57 +0100 Subject: [PATCH v3 02/13] arm64: dts: mediatek: mt7981b-openwrt-one: Enable software leds Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-2-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 The openwrt has 3 status leds at the front: * red: Used as failsafe led by openwrt * white: Used as boot led by openwrt * green: Used as running/upgrade led by openwrt On the back each RJ45 jack has the typical amber/green leds. For the WAN jack this is hardware controlled by the phy, for LAN these are under software control and enabled by this patch. Signed-off-by: Sjoerd Simons --- V2 -> V3: Move earlier in the patch sequence V1 -> V2: - Improve commit message - Re-order nodes to be alphabetical --- .../boot/dts/mediatek/mt7981b-openwrt-one.dts | 59 ++++++++++++++++++= ++++ arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 2 +- 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts b/arch/ar= m64/boot/dts/mediatek/mt7981b-openwrt-one.dts index 6bb98629f4536..2e39e72877301 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +++ b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts @@ -3,6 +3,8 @@ /dts-v1/; =20 #include "mt7981b.dtsi" +#include +#include #include "dt-bindings/pinctrl/mt65xx.h" =20 / { @@ -21,9 +23,60 @@ memory@40000000 { reg =3D <0 0x40000000 0 0x40000000>; device_type =3D "memory"; }; + + pwm-leds { + compatible =3D "pwm-leds"; + + led-0 { + color =3D ; + default-brightness =3D <0>; + function =3D LED_FUNCTION_STATUS; + max-brightness =3D <255>; + pwms =3D <&pwm 0 10000>; + }; + + led-1 { + color =3D ; + default-brightness =3D <0>; + function =3D LED_FUNCTION_STATUS; + max-brightness =3D <255>; + pwms =3D <&pwm 1 10000>; + }; + }; + + gpio-leds { + compatible =3D "gpio-leds"; + + led-0 { + color =3D ; + function =3D LED_FUNCTION_STATUS; + gpios =3D <&pio 9 GPIO_ACTIVE_HIGH>; + }; + + led-1 { + color =3D ; + function =3D LED_FUNCTION_LAN; + gpios =3D <&pio 34 GPIO_ACTIVE_LOW>; + linux,default-trigger =3D "netdev"; + }; + + led-2 { + color =3D ; + function =3D LED_FUNCTION_LAN; + gpios =3D <&pio 35 GPIO_ACTIVE_LOW>; + linux,default-trigger =3D "netdev"; + }; + }; }; =20 &pio { + pwm_pins: pwm-pins { + mux { + function =3D "pwm"; + groups =3D "pwm0_0", "pwm1_1"; + }; + }; + spi2_flash_pins: spi2-pins { mux { function =3D "spi"; @@ -44,6 +97,12 @@ conf-pd { }; }; =20 +&pwm { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pwm_pins>; + status =3D "okay"; +}; + &spi2 { pinctrl-names =3D "default"; pinctrl-0 =3D <&spi2_flash_pins>; diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7981b.dtsi index f00e5bf63de35..416096b80770c 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi @@ -94,7 +94,7 @@ apmixedsys: clock-controller@1001e000 { #clock-cells =3D <1>; }; =20 - pwm@10048000 { + pwm: pwm@10048000 { compatible =3D "mediatek,mt7981-pwm"; reg =3D <0 0x10048000 0 0x1000>; clocks =3D <&infracfg CLK_INFRA_PWM_STA>, --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C42532E7F27; Wed, 5 Nov 2025 21:18:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377524; cv=none; b=l0mpBMpE6Ei5L1TV29xiF1tk9Z38yl0n/KoGm65iPMJgYGLTRCphY3X+n0TY89axlYKby7dbwgLyLsNr78v+y9s8pnjwKaNo7p7irOTFHmhsTwisS8jFxmckx0mFdZj2zEVylRTHWw68meABqmdqAAfBg/W5Yjs2Cdcw6WxvYUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377524; c=relaxed/simple; bh=BNloXSmxfui+A+UD0vb6639VkVLh4h7qFS1iqqJUbUo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s9zIJx6hBidcVurdA9tIo+qfhOLlWq57FV0BLZKr1YmSd3XwLTqqFY9hds6z0WTASlgrWI6XWods8DkU4Az9Etw6F/783z2qdJXlbBlce1zDVNO5GKyYx6HfoPrOpjfl69mwCiDvji4S5POAMiGxZDcPS+UkBh2OG6BpzNq5xAc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=XpSLf1aG; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="XpSLf1aG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377520; bh=BNloXSmxfui+A+UD0vb6639VkVLh4h7qFS1iqqJUbUo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=XpSLf1aGffJeN3zx8uRhcaOmvn2uTssdN8S/TbdnUE69GnvkRSpHrFeCAMfgFw6h+ WBE8bR6DFUQSFUfl/t8PJarzCojzGlWEe/Bjpwy//0LUvlJ4H2KglxqzierbnbGWkJ JxcwY+/LDHd88TJx4wF2pxlYa68pFOAAGnZ+LVsowRN70g0ShSx+cKfz/MuBEEx866 eY2aaiv7kk6cgbVTTgbQpofXT93rsBTiSVOz3zUbIplNpgMBhJP8HWFRc1NYQ6iiQc z6Bp9JVIF1zTXGnS32qST64tNFlO9EM6BZ3Y+WERvYeLEXmsObKq7fVOFZwuL1SDIz lkVC+aPo126sA== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id EB61317E1562; Wed, 5 Nov 2025 22:18:39 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id 9C16B10F352DF; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:17:58 +0100 Subject: [PATCH v3 03/13] dt-bindings: mfd: syscon: Add mt7981-topmisc Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-3-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons , Conor Dooley X-Mailer: b4 0.14.3 This hardware block amongst other things includes a multiplexer for a high-speed Combo-Phy. This binding allows exposing the multiplexer Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sjoerd Simons --- Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentat= ion/devicetree/bindings/mfd/syscon.yaml index 657c38175fba2..51511078c4c3b 100644 --- a/Documentation/devicetree/bindings/mfd/syscon.yaml +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml @@ -193,6 +193,7 @@ properties: - mediatek,mt2701-pctl-a-syscfg - mediatek,mt2712-pctl-a-syscfg - mediatek,mt6397-pctl-pmic-syscfg + - mediatek,mt7981-topmisc - mediatek,mt7988-topmisc - mediatek,mt8135-pctl-a-syscfg - mediatek,mt8135-pctl-b-syscfg --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 009552652A2; Wed, 5 Nov 2025 21:18:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377518; cv=none; b=EOeIdRxsfpijjgmY/++9g0VQIqpqvszcKXdEMH87TqYn3CbpafOppC7BWWRXXgnena2xCEXKYH44ZE0hHWuAAL61JI5wSVD1yPGdZxAmiME9oW7Vo5gCWxMS+588oV0dTuJisifbyUyihsPz3AlAFGKo2R2vzRbb7/knVRC2KqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377518; c=relaxed/simple; bh=JdKvpThqp3TDs4o0pkrFusvXBPtE9LtpoPmwO6qXgiM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gS3qxoBGFaqe0Rav+Vk3uzNYihuNwB8xVj1QjLOBfRAV3QXPlh95MukVyUEBE9jnX78Wy+KbS5UVlRnUCHzxsl62InZu3aeB9gkwrFwJ61WQ+4VWCm1b4o5Pc/6ghPsaGyup5gVZT/G9KyrSsG+obPQ2+QEo3iU00ZT84crSr7s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=ZTJBt+ch; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="ZTJBt+ch" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377515; bh=JdKvpThqp3TDs4o0pkrFusvXBPtE9LtpoPmwO6qXgiM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZTJBt+chv2OorZPxJOTV0pe1cpqVHLoTNLfzME7KhrNsfGLdxx4oH4GlB0XTU3ZzV Dg/1pyFg1MGW0e662nfEk1S8BJrzpfsREKZsEPGeAY2p05QsUhTegWiVIBXoO1G2nv mfEov68FCA/RIqnRgXKcmwscA6qChdT1wHsVU4wdvAWeKz6S+JOOJNWAAhNo2hDtD1 t0a14zBni0iDuSr1ArRKL9Bm1jdw/nG6dqU++jjHl20Cwo/N52n0Bo9o7E+I+I6CIb 5MRJJoYhfbIbU9KPj9WrxNuNRuWVAHXdyvnH5AkIoYVAjapxGp/1IYQ56If0dyk/Fw PLZas/NOkgAGA== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 061F717E1396; Wed, 5 Nov 2025 22:18:35 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id 9FA6010F352E1; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:17:59 +0100 Subject: [PATCH v3 04/13] dt-bindings: PCI: mediatek-gen3: Add MT7981 PCIe compatible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-4-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons , Conor Dooley X-Mailer: b4 0.14.3 Add compatible string for MediaTek MT7981 PCIe Gen3 controller. The MT7981 PCIe controller is compatible with the MT8192 PCIe controller. Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sjoerd Simons --- V1 -> V2: Improve commit subject --- Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml = b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index 0278845701ce8..4db700fc36ba7 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -48,6 +48,7 @@ properties: oneOf: - items: - enum: + - mediatek,mt7981-pcie - mediatek,mt7986-pcie - mediatek,mt8188-pcie - mediatek,mt8195-pcie --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5170F2E1EE5; Wed, 5 Nov 2025 21:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377522; cv=none; b=N/N5kTpdig3mE9S+tSsnVXzmeHrrHv9GrI/T7NPuWrp71KltOQyJOSl6e+6W4rjaWWy6gUvppW9S4P9mvtU99x3xNMiIymlTnHR+7ujESXVBFra6XtLZ0GRMWA3IFGTCvZ3NKhUEXsR3yVQ0QEHpNfdwXw5vEu4QMxxqt5xGZTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377522; c=relaxed/simple; bh=0HQMjZYjWvOC8AwZB4R1t/Hz5V/fyYneHN+5PdUNP20=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gBMjbv3xbPWA5l11OkoGDLCy4ynqb6Tv9CdjN6Cx1/x3Hbdrt5X1l7RrwyFtNI475/7PNTu07P1MuIBCLjOr+NbjSbI8NfWatnIJj/ipFUhu8uRJp70oxavlA2uKQcurOF6iW+eUNl6naq2TcDHQRqE8jnVrNT03bY3EMq1m3Bo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=E+0/zF+6; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="E+0/zF+6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377515; bh=0HQMjZYjWvOC8AwZB4R1t/Hz5V/fyYneHN+5PdUNP20=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=E+0/zF+6oMms5hJTlxoUCNIi/DeN8KiZrnBjTBO/RUtepOeAYNieN3YDaZ8sXRCTg 0R4a3m6gZap6/EjIdz0PgdQPDVl9JQK5VgB55EKabHBR9y9ltShIHngSc/xm9yFlMI e6ixnHLiAseOdlMdjnDpsPHOMWyTbKeOpTxoXQKNIAcKLCostve024jIAdX+WRmgu5 6NqNKuorQRxMCvKTbxg23/bThwa8zbmNRYlUVmCggyw/jMvLUIxcgoofcpGAaa5WNW TNK9SI7WAfpfKHGvNQQrbqK72CLMqOvL0yUsGw5hcX5VNIfNcnZGSDoK7P7sGaTTge EvrkabOTCXGdQ== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id D171217E141C; Wed, 5 Nov 2025 22:18:35 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id A705710F352E3; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:18:00 +0100 Subject: [PATCH v3 05/13] dt-bindings: phy: mediatek,tphy: Add support for MT7981 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-5-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons , Conor Dooley X-Mailer: b4 0.14.3 Add a compatible string for Filogic 820, this chip integrates a MediaTek generic T-PHY version 2 Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sjoerd Simons --- Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml b/Doc= umentation/devicetree/bindings/phy/mediatek,tphy.yaml index b2218c1519391..ff5c77ef11765 100644 --- a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +++ b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml @@ -80,6 +80,7 @@ properties: - mediatek,mt2712-tphy - mediatek,mt6893-tphy - mediatek,mt7629-tphy + - mediatek,mt7981-tphy - mediatek,mt7986-tphy - mediatek,mt8183-tphy - mediatek,mt8186-tphy --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D73E286D4E; Wed, 5 Nov 2025 21:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377520; cv=none; b=nVEKaZLJJIoIm+m+G2Dm//payzX1rYrcOETY0FeGQ8352biQwO3B9Xy+9CcwfdBMNfCSiIqqzSFIjNgNGvttJ/nQjE2GYz/FySsqUQnZqs/CpV5pjkD0ZtV+2xjLahVj+wJTPa+tgXK/dXL1sjqi/nTu5EWT9eOA5qEThigf0KA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377520; c=relaxed/simple; bh=USBTzS5LeZooJ42tEMhi7N85ITpVvJxHo6le5MQpsP8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NOrV+dw/0lsmvK5f9+h5V0A+tZSz8hg7m0NhRJkrwqzbhz0OZxD2CfLHZjmmRsMupSzP8v0Qxg1VD3f+Y8BC7REvq9vCObLZ5w7kLVdS4BaDuwcG53r3CP8PRLV3MtFx5SEY4PxhDv6rhyyacDie6EXQjClzeF2LLF5OEOJKUak= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=WUkRIO/L; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="WUkRIO/L" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377515; bh=USBTzS5LeZooJ42tEMhi7N85ITpVvJxHo6le5MQpsP8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WUkRIO/LYeerYC6Qq/d0vAfift6ItxGSaUObXGhLruOzlq7/kcBr+2CN1AmZAyYlB ZRHuj0ONVxvE+iM881QLIewGCInjRhlpv766aT3kf5EdndnvQpUWI6mGcXSL9+D0bN 0ymjCtAs+DhWJriToq1IQY5gRFeScXU6UIUtzPu2MxzrkrxXxGN01BwA6CQ4EmIum6 Pk5d7dytEcRSh4zBULWcisWeYuZETEWT38J4AeK75/W2ocxODRxIv13QX4OA+rI2Yu gHgcEnQgXIYVVIgDHHmZ463GAH23E5F2DeDcWV6rYF/15ONDTxTVsY/8HKSAF8qhz4 Y2Ku4wTENqHjg== Received: from beast.luon.net (simons.connected.by.freedominter.net [45.83.240.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 5918117E13DC; Wed, 5 Nov 2025 22:18:35 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id AC8E110F352E5; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:18:01 +0100 Subject: [PATCH v3 06/13] arm64: dts: mediatek: mt7981b: Add PCIe and USB support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-6-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 Add device tree nodes for PCIe controller and USB3 XHCI host controller on MT7981B SoC. Both controllers share the USB3 PHY which can be configured for either USB3 or PCIe operation. The USB3 XHCI controller supports USB 2.0 and USB 3.0 SuperSpeed operation. The PCIe controller is compatible with PCIe Gen2 specifications. Also add the topmisc syscon node required for USB/PCIe PHY multiplexing. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sjoerd Simons --- V1 -> V2: Keep xhci reg and phys properties in single lines --- arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 80 +++++++++++++++++++++++++++= ++++ 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7981b.dtsi index 416096b80770c..d3f37413413e2 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi @@ -2,6 +2,7 @@ =20 #include #include +#include #include =20 / { @@ -223,6 +224,55 @@ auxadc: adc@1100d000 { status =3D "disabled"; }; =20 + xhci: usb@11200000 { + compatible =3D "mediatek,mt7986-xhci", "mediatek,mtk-xhci"; + reg =3D <0 0x11200000 0 0x2e00>, <0 0x11203e00 0 0x0100>; + reg-names =3D "mac", "ippc"; + clocks =3D <&infracfg CLK_INFRA_IUSB_SYS_CK>, + <&infracfg CLK_INFRA_IUSB_CK>, + <&infracfg CLK_INFRA_IUSB_133_CK>, + <&infracfg CLK_INFRA_IUSB_66M_CK>, + <&topckgen CLK_TOP_U2U3_XHCI_SEL>; + clock-names =3D "sys_ck", "ref_ck", "mcu_ck", "dma_ck", "xhci_ck"; + interrupts =3D ; + phys =3D <&u2port0 PHY_TYPE_USB2>, <&u3port0 PHY_TYPE_USB3>; + status =3D "disabled"; + }; + + pcie: pcie@11280000 { + compatible =3D "mediatek,mt7981-pcie", + "mediatek,mt8192-pcie"; + reg =3D <0 0x11280000 0 0x4000>; + reg-names =3D "pcie-mac"; + ranges =3D <0x82000000 0 0x20000000 + 0x0 0x20000000 0 0x10000000>; + bus-range =3D <0x00 0xff>; + clocks =3D <&infracfg CLK_INFRA_IPCIE_CK>, + <&infracfg CLK_INFRA_IPCIE_PIPE_CK>, + <&infracfg CLK_INFRA_IPCIER_CK>, + <&infracfg CLK_INFRA_IPCIEB_CK>; + clock-names =3D "pl_250m", "tl_26m", "peri_26m", "top_133m"; + device_type =3D "pci"; + phys =3D <&u3port0 PHY_TYPE_PCIE>; + phy-names =3D "pcie-phy"; + interrupts =3D ; + interrupt-map-mask =3D <0 0 0 7>; + interrupt-map =3D <0 0 0 1 &pcie_intc 0>, + <0 0 0 2 &pcie_intc 1>, + <0 0 0 3 &pcie_intc 2>, + <0 0 0 4 &pcie_intc 3>; + #address-cells =3D <3>; + #interrupt-cells =3D <1>; + #size-cells =3D <2>; + status =3D "disabled"; + + pcie_intc: interrupt-controller { + interrupt-controller; + #address-cells =3D <0>; + #interrupt-cells =3D <1>; + }; + }; + pio: pinctrl@11d00000 { compatible =3D "mediatek,mt7981-pinctrl"; reg =3D <0 0x11d00000 0 0x1000>, @@ -252,6 +302,36 @@ mux { }; }; =20 + topmisc: topmisc@11d10000 { + compatible =3D "mediatek,mt7981-topmisc", "syscon"; + reg =3D <0 0x11d10000 0 0x10000>; + #clock-cells =3D <1>; + }; + + usb_phy: t-phy@11e10000 { + compatible =3D "mediatek,mt7981-tphy", + "mediatek,generic-tphy-v2"; + ranges =3D <0 0 0x11e10000 0x1700>; + #address-cells =3D <1>; + #size-cells =3D <1>; + status =3D "disabled"; + + u2port0: usb-phy@0 { + reg =3D <0x0 0x700>; + clocks =3D <&topckgen CLK_TOP_USB_FRMCNT_SEL>; + clock-names =3D "ref"; + #phy-cells =3D <1>; + }; + + u3port0: usb-phy@700 { + reg =3D <0x700 0x900>; + clocks =3D <&topckgen CLK_TOP_USB3_PHY_SEL>; + clock-names =3D "ref"; + #phy-cells =3D <1>; + mediatek,syscon-type =3D <&topmisc 0x218 0>; + }; + }; + efuse@11f20000 { compatible =3D "mediatek,mt7981-efuse", "mediatek,efuse"; reg =3D <0 0x11f20000 0 0x1000>; --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 748542E7BD3; Wed, 5 Nov 2025 21:18:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377524; cv=none; b=ClfEwOUbYhNxAyha+xENcmb5go9BTvKsTJCV9M/AEgsYCZjHdTFw7u/BTI8L8U6MXw9p2JCSyGdQiuC095b4oL4tuYhRp4BlhPikg5P/1VZTrMx8NAftoCD4RdmUmw+zJctRECjk6nXr0ZkWlRGxWTJiuGpmK+cczSqHBmabQ1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377524; c=relaxed/simple; bh=qtE8TxX+bp4mVeKXXycM622mPKaw8qoe/nGz0YEjV0g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RPcNb0qKgErbTLQ6FurZbAtTT7ruEmDsRMBb1J3OSPyM1CFYajGzJ4U/UAR0Kea5cVSGohy9oeTE87VWFuiARqVBqx/WqfU7ymnwYGYzH1F7tx+JH6pygQVOcXKZrXTSR+t3GG6Pprz15DD4w/51c3ukCeK2INjAxV4rZFGHaxE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=IaRJcfEJ; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="IaRJcfEJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377516; bh=qtE8TxX+bp4mVeKXXycM622mPKaw8qoe/nGz0YEjV0g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IaRJcfEJJPmuVxfIA0AMonJG0NAIwG2GFs1HcbU8uvXF99pgELvzC5G7nSSRhwUVJ LuwV5lD0JO+6NbQDCg/6824/ru1L/WtPNmPZ9XIv2dmNWRPrG1D+ir8Y18q8GzoaIE qEW8KlPcmRtH5QYv8gEmfKMpqY/vnwuoHhrQxhH/YBZUJn8Mrio3T/yeFVOaa9Kfp/ 3bU7QVAyxxZtxGmkVSf/V0rYQ39sDr5ivWxPxN2ygRhLyKoa/vXN3Zh8b/MbgnaR53 jdmgxlQ8Y7in86CB/YBRRqqqam07WivxiWw5icWmtAT4asEubhTmOpyhAMNyxRoJ/A g3EvDDnrDetBw== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 4164C17E1500; Wed, 5 Nov 2025 22:18:36 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id B209C10F352E7; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:18:02 +0100 Subject: [PATCH v3 07/13] arm64: dts: mediatek: mt7981b-openwrt-one: Enable PCIe and USB Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-7-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 Enable the PCIe controller and USB3 XHCI host on the OpenWrt One board. The USB controller is configured for USB 2.0 only mode, as the shared USB3/PCIe PHY is dedicated to PCIe functionality on this board. Signed-off-by: Sjoerd Simons --- .../boot/dts/mediatek/mt7981b-openwrt-one.dts | 43 ++++++++++++++++++= ++++ 1 file changed, 43 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts b/arch/ar= m64/boot/dts/mediatek/mt7981b-openwrt-one.dts index 2e39e72877301..7382599cfea29 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +++ b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts @@ -67,9 +67,40 @@ led-2 { linux,default-trigger =3D "netdev"; }; }; + + reg_3p3v: regulator-3p3v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-3.3V"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_5v: regulator-5v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-5V"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + regulator-boot-on; + regulator-always-on; + }; +}; + +&pcie { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pcie_pins>; + status =3D "okay"; }; =20 &pio { + pcie_pins: pcie-pins { + mux { + function =3D "pcie"; + groups =3D "pcie_pereset"; + }; + }; + pwm_pins: pwm-pins { mux { function =3D "pwm"; @@ -163,3 +194,15 @@ partition@180000 { &uart0 { status =3D "okay"; }; + +&usb_phy { + status =3D "okay"; +}; + +&xhci { + phys =3D <&u2port0 PHY_TYPE_USB2>; + vusb33-supply =3D <®_3p3v>; + vbus-supply =3D <®_5v>; + mediatek,u3p-dis-msk =3D <0x01>; + status =3D "okay"; +}; --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87F942E11D1; Wed, 5 Nov 2025 21:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377522; cv=none; b=etRnvIRdBHHiJDh9PTFGl30ttwLtqNiyDqOOWjHdNj0rk6SGilDr/nC9VF8TDF1d6bDHIKosL0HNGrOIvMsp65fficeAHXTnxs+rgZ+LqnpXFkDe1txoHQWyjf/S9rp7cMKOTItyp2jsXsPP0+j9JRcrq4RXVC2QbC5gc5/Tjb4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377522; c=relaxed/simple; bh=awDSMBDJzPPS4EnVp8+B6nVYbJz7nRdZNkEF4vHPpPs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Vm72+p5OY8GaICP+MsDnFWk4PbGVQBWO4dpuM2mczkqUZtSYNQtZf/It722JbhFTBLua1GR3z1gptiCNiBwr7GnmwYkIpjfcajTtj6tn5eepeeoVMXUGutOtbk4JeMlLDEK1vocc+V0snO/ZeQRudD3Bi0Rpt7szIEziN58fdXE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=ci42NPe8; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="ci42NPe8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377516; bh=awDSMBDJzPPS4EnVp8+B6nVYbJz7nRdZNkEF4vHPpPs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ci42NPe8j7NJSLA1jJMH0sd/AmJryok+Vl512uKMGj5mF2Kxb3nn2pL+6hJVPtci6 ZZkmTVlO1SqVesFxzX+Q4zRKCSPVZeCb7E01Cdng8wUwBesuwK9m0Tn2PfSzaN4oDo fKbUfb5awtUm/uQeA2LTeJgBs9vIHwaBI8zxpWSsM6pXLyiBIHKqlnnW3zA9NjO1i/ ZuSqud86yIDPzsXOaxa3W11u+/4aMukzxMhNeOP9SWxZTMBWKM9ln5DhMMsdFaT1m0 abYnXSsuUk+88l4wwcitMfj6JmgzN8RAJhIpUuBOXP3w4aG5Tl1kvPzmbFApEnf0/2 KMjrOAZnCGYig== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 0997B17E1465; Wed, 5 Nov 2025 22:18:36 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id B56D010F352E9; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:18:03 +0100 Subject: [PATCH v3 08/13] dt-bindings: net: mediatek,net: Correct bindings for MT7981 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-8-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 Different SoCs can have different numbers of Wireless Ethernet Dispatch (WED) units, specifically the MT7981 only has a single WED. Furthermore the MT7981 uses infracfg for PHY switching. Adjust bindings to match both aspects. Signed-off-by: Sjoerd Simons --- V2 -> V3: Only update MT7981 constraints rather then defaults V1 -> V2: Only overwrite constraints that are different from the default --- Documentation/devicetree/bindings/net/mediatek,net.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Docu= mentation/devicetree/bindings/net/mediatek,net.yaml index b45f67f92e80d..c49871438efc7 100644 --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml @@ -338,12 +338,14 @@ allOf: - const: netsys0 - const: netsys1 =20 - mediatek,infracfg: false - mediatek,sgmiisys: minItems: 2 maxItems: 2 =20 + mediatek,wed: + minItems: 1 + maxItems: 1 + - if: properties: compatible: --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5163F2E1EE2; Wed, 5 Nov 2025 21:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377523; cv=none; b=G9D7wia2bHVb2JbB3CavLs2k+2zmtBMkhkyb5OpgG02ZuUt3J3fq9wXfN8ZLGwUZMJKDdfKAHyLqoce61F4As85Lyp4foCXQwTizYIUC9522SAiPjahsQ67f/KIDeSW9UEUXdGK8uK8dQToJBz48ytf5hxv5hswgF4K7pQ0eP1Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377523; c=relaxed/simple; bh=BQ/4Q4O4iwtOMxBPtuM66Fi5zxdH24aH3c3Edh+F6Gw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m5PDVGYTcgaNxFt/fn5NG9N/dMBbtmaN6MSsrbW8r7kq5aEsEFr68q9BZT3vnTX7AtcQIiTjCjPrP8P3j4Din3zuMKlz7u766F5JBSOVLdGpYw6+5qkMQq1DbEimiQYTkwVdOYtn32u8ZLUqqTXgaI1IIwFmEgtS/YEeE+PeeEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=IRXC0OH2; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="IRXC0OH2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377515; bh=BQ/4Q4O4iwtOMxBPtuM66Fi5zxdH24aH3c3Edh+F6Gw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IRXC0OH241ZhJ2dEV4LfgFdc4A+BagnFWsrrwtn3vopT0NppteIBKbXw109zFFIMG 2fkF/7w+APwUdAHb8p8WH8NejrZz9YQMjnZYmts9yjB2RC4J/8uGXcVWaPrpN2OYHr 63AzqjmeOxP0yepmJ8/ngYGq5byQ6vpaSRrfSu1mB8RcYDlBcOy0Q3f8kKlFvO2QET hax6ycKibWsvT1isXzFk5Wf6lyrxvYFABMBQ/cW3mVVXCXYlzjQlqImgmKg3Qs5l2N lKwf4s814rTjC+0SRKPGpYey5S1ExcBlNy1zKk1+38i7C0VxUAa2NfJi4pv43fB8MB fv/XeT07/fxDA== Received: from beast.luon.net (simons.connected.by.freedominter.net [45.83.240.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 6263917E1401; Wed, 5 Nov 2025 22:18:35 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id BD7E410F352EB; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:18:04 +0100 Subject: [PATCH v3 09/13] arm64: dts: mediatek: mt7981b: Add Ethernet and WiFi offload support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-9-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 Add device tree nodes for the Ethernet subsystem on MT7981B SoC, including: - Ethernet MAC controller with dual GMAC support - Wireless Ethernet Dispatch (WED) - SGMII PHY controllers for high-speed Ethernet interfaces - Reserved memory regions for WiFi offload processor Signed-off-by: Sjoerd Simons --- V1 -> V2: Don't add unneeded interrupt-parent --- arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 133 ++++++++++++++++++++++++++= +++- 1 file changed, 132 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7981b.dtsi index d3f37413413e2..6be588be3761a 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi @@ -2,6 +2,7 @@ =20 #include #include +#include #include #include =20 @@ -47,11 +48,36 @@ reserved-memory { #size-cells =3D <2>; ranges; =20 + wo_boot: wo-boot@15194000 { + reg =3D <0 0x15194000 0 0x1000>; + no-map; + }; + + wo_ilm0: wo-ilm@151e0000 { + reg =3D <0 0x151e0000 0 0x8000>; + no-map; + }; + + wo_dlm0: wo-dlm@151e8000 { + reg =3D <0 0x151e8000 0 0x2000>; + no-map; + }; + /* 192 KiB reserved for ARM Trusted Firmware (BL31) */ secmon_reserved: secmon@43000000 { reg =3D <0 0x43000000 0 0x30000>; no-map; }; + + wo_emi0: wo-emi@47d80000 { + reg =3D <0 0x47d80000 0 0x40000>; + no-map; + }; + + wo_data: wo-data@47dc0000 { + reg =3D <0 0x47dc0000 0 0x240000>; + no-map; + }; }; =20 soc { @@ -107,6 +133,18 @@ pwm: pwm@10048000 { #pwm-cells =3D <2>; }; =20 + sgmiisys0: syscon@10060000 { + compatible =3D "mediatek,mt7981-sgmiisys_0", "syscon"; + reg =3D <0 0x10060000 0 0x1000>; + #clock-cells =3D <1>; + }; + + sgmiisys1: syscon@10070000 { + compatible =3D "mediatek,mt7981-sgmiisys_1", "syscon"; + reg =3D <0 0x10070000 0 0x1000>; + #clock-cells =3D <1>; + }; + uart0: serial@11002000 { compatible =3D "mediatek,mt7981-uart", "mediatek,mt6577-uart"; reg =3D <0 0x11002000 0 0x100>; @@ -345,15 +383,108 @@ soc-uuid@140 { thermal_calibration: thermal-calib@274 { reg =3D <0x274 0xc>; }; + + phy_calibration: phy-calib@8dc { + reg =3D <0x8dc 0x10>; + }; }; =20 - clock-controller@15000000 { + ethsys: clock-controller@15000000 { compatible =3D "mediatek,mt7981-ethsys", "syscon"; reg =3D <0 0x15000000 0 0x1000>; #clock-cells =3D <1>; #reset-cells =3D <1>; }; =20 + wed: wed@15010000 { + compatible =3D "mediatek,mt7981-wed", + "syscon"; + reg =3D <0 0x15010000 0 0x1000>; + interrupts =3D ; + memory-region =3D <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, + <&wo_data>, <&wo_boot>; + memory-region-names =3D "wo-emi", "wo-ilm", "wo-dlm", + "wo-data", "wo-boot"; + mediatek,wo-ccif =3D <&wo_ccif0>; + }; + + eth: ethernet@15100000 { + compatible =3D "mediatek,mt7981-eth"; + reg =3D <0 0x15100000 0 0x40000>; + assigned-clocks =3D <&topckgen CLK_TOP_NETSYS_2X_SEL>, + <&topckgen CLK_TOP_SGM_325M_SEL>; + assigned-clock-parents =3D <&topckgen CLK_TOP_CB_NET2_800M>, + <&topckgen CLK_TOP_CB_SGM_325M>; + clocks =3D <ðsys CLK_ETH_FE_EN>, + <ðsys CLK_ETH_GP2_EN>, + <ðsys CLK_ETH_GP1_EN>, + <ðsys CLK_ETH_WOCPU0_EN>, + <&topckgen CLK_TOP_SGM_REG>, + <&sgmiisys0 CLK_SGM0_TX_EN>, + <&sgmiisys0 CLK_SGM0_RX_EN>, + <&sgmiisys0 CLK_SGM0_CK0_EN>, + <&sgmiisys0 CLK_SGM0_CDR_CK0_EN>, + <&sgmiisys1 CLK_SGM1_TX_EN>, + <&sgmiisys1 CLK_SGM1_RX_EN>, + <&sgmiisys1 CLK_SGM1_CK1_EN>, + <&sgmiisys1 CLK_SGM1_CDR_CK1_EN>, + <&topckgen CLK_TOP_NETSYS_SEL>, + <&topckgen CLK_TOP_NETSYS_500M_SEL>; + clock-names =3D "fe", "gp2", "gp1", "wocpu0", + "sgmii_ck", + "sgmii_tx250m", "sgmii_rx250m", + "sgmii_cdr_ref", "sgmii_cdr_fb", + "sgmii2_tx250m", "sgmii2_rx250m", + "sgmii2_cdr_ref", "sgmii2_cdr_fb", + "netsys0", "netsys1"; + interrupts =3D , + , + , + , + , + , + , + ; + interrupt-names =3D "fe0", "fe1", "fe2", "fe3", "pdma0", + "pdma1", "pdma2", "pdma3"; + sram =3D <ð_sram>; + #address-cells =3D <1>; + #size-cells =3D <0>; + mediatek,ethsys =3D <ðsys>; + mediatek,sgmiisys =3D <&sgmiisys0>, <&sgmiisys1>; + mediatek,infracfg =3D <&topmisc>; + mediatek,wed =3D <&wed>; + status =3D "disabled"; + + mdio_bus: mdio-bus { + #address-cells =3D <1>; + #size-cells =3D <0>; + + int_gbe_phy: ethernet-phy@0 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + reg =3D <0>; + phy-mode =3D "gmii"; + phy-is-integrated; + nvmem-cells =3D <&phy_calibration>; + nvmem-cell-names =3D "phy-cal-data"; + }; + }; + }; + + eth_sram: sram@15140000 { + compatible =3D "mmio-sram"; + reg =3D <0 0x15140000 0 0x40000>; + ranges =3D <0 0x15140000 0 0x40000>; + #address-cells =3D <1>; + #size-cells =3D <1>; + }; + + wo_ccif0: syscon@151a5000 { + compatible =3D "mediatek,mt7986-wo-ccif", "syscon"; + reg =3D <0 0x151a5000 0 0x1000>; + interrupts =3D ; + }; + wifi@18000000 { compatible =3D "mediatek,mt7981-wmac"; reg =3D <0 0x18000000 0 0x1000000>, --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 397822E11D7; Wed, 5 Nov 2025 21:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377523; cv=none; b=LJaEcwkWgSEo+NOjXZ0lXS0WpIJoDzJ3IC0gI3qx1tFi6ZhPgqYuvv0pw0L7ThOfhvkwZyOElEXnQUtS/bslIusL7ZUA90H6TSeQyyv2kcQskr7NEU73KYeQpMTXpZJNWsRDu54t9t9fn6QDUffdI8GCjM81Mtw4hpaKR3vPqUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377523; c=relaxed/simple; bh=8iJNPpI85EcL2zA7omSQYgyHFc03BY1+Hwd6GqmpZ7c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=csCf0zUnVruZxkvlFqCV+TAQuT63g4ZMSiz/OGTo+0lJFKy/EtnEc7xFMoAiIb+872aAb/nNuv0fBttIcRfPq0W7ri5vHzsVRX+3w32iwAHT1BlceyZTCsUojdNN4MJwMiTE9EDElclNeTiqWSwL5xqvKBKwaTNeJtwdPEMyehk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=bhcUswcl; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="bhcUswcl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377515; bh=8iJNPpI85EcL2zA7omSQYgyHFc03BY1+Hwd6GqmpZ7c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=bhcUswclG/V7+nJL9BrqpvNYkBM0psesnDqRq4okPos7i3GdGONTy0afA68KlTBYl zpMIv8lqWjOkFGB3cGxu5HSPs4wGpRySiOTO6Rc3Zaz3r+M/Xmasu82dcfGbvYc0za DS59SGV8KrRBldu6YfMedk/I+R3jD5xdRQwb5RWuwM52ePJZCjHxyJnlN7lc7F7oej YKuwFLLB2CaQPDm4h67Kqrd6o+IkWXx61A0SevTi6yc4fDg5Z7k393cfyU++BRjjdE /w2GvFBsr6KtHHMcS+sog8i4wMR48Uw2+7jiNyhYttvT82m0pxA32Vbotz4MPtu175 eAxrkt5hWJEBQ== Received: from beast.luon.net (simons.connected.by.freedominter.net [45.83.240.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 8797817E1416; Wed, 5 Nov 2025 22:18:35 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id C315110F352ED; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:18:05 +0100 Subject: [PATCH v3 10/13] arm64: dts: mediatek: mt7981b-openwrt-one: Enable Ethernet Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-10-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 Enable the Ethernet subsystem on OpenWrt One board with dual-MAC configuration: - GMAC0: Connected to external Airoha EN8811H 2.5GbE PHY via SGMII (2500base-x mode) for WAN connectivity with LED indicators - GMAC1: Connected to internal MT7981 1GbE PHY (GMII mode) for LAN Ethernet aliases are defined to provide consistent network interface naming (ethernet0 =3D LAN, ethernet1 =3D WAN). Signed-off-by: Sjoerd Simons --- V1 -> V2: - Switch gmac0 phy irq to Level - Update mac nvmem label name --- .../boot/dts/mediatek/mt7981b-openwrt-one.dts | 58 ++++++++++++++++++= ++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts b/arch/ar= m64/boot/dts/mediatek/mt7981b-openwrt-one.dts index 7382599cfea29..2aea899006453 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +++ b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts @@ -12,6 +12,8 @@ / { model =3D "OpenWrt One"; =20 aliases { + ethernet0 =3D &gmac1; + ethernet1 =3D &gmac0; serial0 =3D &uart0; }; =20 @@ -87,6 +89,58 @@ reg_5v: regulator-5v { }; }; =20 +ð { + status =3D "okay"; + + /* WAN interface */ + gmac0: mac@0 { + compatible =3D "mediatek,eth-mac"; + reg =3D <0>; + nvmem-cells =3D <&wan_factory_mac 0>; + nvmem-cell-names =3D "mac-address"; + phy-mode =3D "2500base-x"; + phy-handle =3D <&phy15>; + }; + + /* LAN interface */ + gmac1: mac@1 { + compatible =3D "mediatek,eth-mac"; + reg =3D <1>; + phy-mode =3D "gmii"; + phy-handle =3D <&int_gbe_phy>; + }; +}; + +&mdio_bus { + phy15: ethernet-phy@f { + compatible =3D "ethernet-phy-id03a2.a411"; + reg =3D <0xf>; + interrupt-parent =3D <&pio>; + interrupts =3D <38 IRQ_TYPE_LEVEL_LOW>; + reset-gpios =3D <&pio 39 GPIO_ACTIVE_LOW>; + reset-assert-us =3D <10000>; + reset-deassert-us =3D <20000>; + airoha,pnswap-rx; + + leds { + #address-cells =3D <1>; + #size-cells =3D <0>; + + led@0 { + reg =3D <0>; + function =3D LED_FUNCTION_WAN; + color =3D ; + }; + + led@1 { + reg =3D <1>; + function =3D LED_FUNCTION_WAN; + color =3D ; + }; + }; + }; +}; + &pcie { pinctrl-names =3D "default"; pinctrl-0 =3D <&pcie_pins>; @@ -191,6 +245,10 @@ partition@180000 { }; }; =20 +&sgmiisys0 { + mediatek,pnswap; +}; + &uart0 { status =3D "okay"; }; --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25C052E0922; Wed, 5 Nov 2025 21:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377522; cv=none; b=quCHz3fNG+Vwo4X3VUPXY0opeIXgUxSQ2XSupkOC8FhESC/7TRTfNOg68ql+IWwAYk5btQrUuE/J/Nq8PogK6zmIksj+YDso62vlmCIaKJi/j51A5Ogwvc14kh4h6R/Lh4dEw7tspac41eZHFso08TvStcfx13+bFE3JTOWH2nk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377522; c=relaxed/simple; bh=haXHZnrCQw87Hh0XlwT4Nqlq0lDr5SGoeyDsPgAcJ6c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=prxIF1dszkhwoE33DlLYdm9efh3igCFegRljRzvNkEnQN/C6VPh//N3YvUz/P5Oovq+jnhF83oRxRGpGOXPbPB2MoxqwWUo9cDj+YPRwOwKJPny+zEI9HgAw2qTSVrdRWNUsBaU2VlzjZHIFRGAU95vmsQn2KTQMhyDXAgK+EkI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=N1qA/7Am; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="N1qA/7Am" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377515; bh=haXHZnrCQw87Hh0XlwT4Nqlq0lDr5SGoeyDsPgAcJ6c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=N1qA/7AmkMt4wN9yHy1phEnePp5ToltlmZwi7UCQxXJhlXCL6boQBVdmwpoNtT8KS 1X9s51SEPTLvco84Ou9mu/1q7X9ITJ4rv9QHS1yryzpoUpFuSCo/fOTVZq8ISh6Krx kSMG98HfMijUn/ebXM+RRkEg5wOX6HPEg09mKH//uRLukU2lb/Mi4AnOqXIlIpgD8e l9PVEOccMc5Mt25cBc+GBXKeuDbglnliEVbfnq/ctRiishATKfBCbtrXO+OtmOaATJ DRXagBcQDZ/Ww8oM9BTwO4aphu2lcOX1lSnzmWSMOud08FP0ecqwbQ7Sa0UvpvhoKH whKx1JPflZ1mA== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 8654D17E1402; Wed, 5 Nov 2025 22:18:35 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id C8D3810F352EF; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:18:06 +0100 Subject: [PATCH v3 11/13] arm64: dts: mediatek: mt7981b: Disable wifi by default Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-11-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 Disable the wifi block by default as it won't function properly without at least pin muxing. This doesn't enable wifi on any of the existing mt7981b devices as a required memory-region property is missing, causing the driver to fail probing anyway. Signed-off-by: Sjoerd Simons --- V2: Newly introduced patch --- arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7981b.dtsi index 6be588be3761a..1f4c114354660 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi @@ -499,6 +499,7 @@ wifi@18000000 { clock-names =3D "mcu", "ap2conn"; resets =3D <&watchdog MT7986_TOPRGU_CONSYS_SW_RST>; reset-names =3D "consys"; + status =3D "disabled"; }; }; =20 --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 744FF2E8DEB; Wed, 5 Nov 2025 21:18:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377524; cv=none; b=qbcfGyeB6edquKbZEkDis/eoY49AMB5bpb3QDR4Y82OkCnjl8b3FMU7l8jJYr0skqhEt+aiW20OWFafAp03ZjVOJyhCgZnKwz0JDyfdEeF4YX9pndjWnMkYpELAOD1dfbgeoFSKFP00On1nDqciTW2uELYA4K81mwrdIBGoE9VE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377524; c=relaxed/simple; bh=HT2YugA6R+JpQglGJhQu+r3GtnpE3Srg2faLNwIOQZE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XN2tJsQq5jDDGl0wu5md+giXnO1F8uDCwew85oC1pO65+2HorNkcg5+KSvQzWXl2xIrNCtobssh9F9YxkWLw8zwZWrhOIqpDUUSAoP0PFjWRp+zdQKgKzqxTBKXF+U43OuJhoZ28OTqb7K7DQPVwwITATFWK+JgrYtNGv9KBSY8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=pX5785Xe; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="pX5785Xe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377520; bh=HT2YugA6R+JpQglGJhQu+r3GtnpE3Srg2faLNwIOQZE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pX5785XeaN9MSnSwL2CJEFah8vNhRL8O3uSgIa5IIUsi0dsVKQvFHNPboZ1/t6VGy HYMGlF/jafIWUIBCk3xUfon2NPBc/8iS7yAe6TOMu+7np1x2bdtprDcNn2WTGFcX5c t9YD1NdO/D97DTeU+AuNZeMagJIob4P/4RUTgI0pyfPYexY505AVtR4IYod4lwE/iD 14zbJi4IQ7nOQq2nXVZRLfsFZOl8Se0bc8bOiGCKbU7u2hCgO/MHEZmy7Tp5lOFOO+ arFcHIVGSPsrSCy0aGHPYhJxu8F2xT+eBJsfmFn39sWISuHJXg3lY64C/eh1tAKFqu /M/mfIOF6ApyQ== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 6F62117E156C; Wed, 5 Nov 2025 22:18:40 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id CC1B810F352F1; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:18:07 +0100 Subject: [PATCH v3 12/13] arm64: dts: mediatek: mt7981b: Add wifi memory region Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-12-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 Add required memory region for the builtin wifi block. Signed-off-by: Sjoerd Simons --- V1 -> V2: Don't set status to in this patch --- arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7981b.dtsi index 1f4c114354660..a7be3670e0059 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi @@ -69,6 +69,11 @@ secmon_reserved: secmon@43000000 { no-map; }; =20 + wmcpu_emi: wmcpu-reserved@47c80000 { + reg =3D <0 0x47c80000 0 0x100000>; + no-map; + }; + wo_emi0: wo-emi@47d80000 { reg =3D <0 0x47d80000 0 0x40000>; no-map; @@ -497,6 +502,7 @@ wifi@18000000 { clocks =3D <&topckgen CLK_TOP_NETSYS_MCU_SEL>, <&topckgen CLK_TOP_AP2CNN_HOST_SEL>; clock-names =3D "mcu", "ap2conn"; + memory-region =3D <&wmcpu_emi>; resets =3D <&watchdog MT7986_TOPRGU_CONSYS_SW_RST>; reset-names =3D "consys"; status =3D "disabled"; --=20 2.51.0 From nobody Fri Dec 19 14:34:43 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76CE12E22BF; Wed, 5 Nov 2025 21:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377524; cv=none; b=RwozxYH488EhiJ6TVpCvPAvwGGTREFztSrKtS8ddUswc+t0hhvyNWa+eXqZkxJ76NnBi4XO3hztajkwit650zbeXzeZV3p+HCGJV8Gj/HMitKjMQIN7YhXYImvJY0VObKevpeBI3irwltITUvQu676s9W3DFjqfulzv8BXJLj6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762377524; c=relaxed/simple; bh=l3tEWhRqP4lk80hQap0vJX2rjpGnZh5LT9KfShignVs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BlU1vmEtyVRBmUk5LytlsvEfNeQgFSa3RRHVAwhRB/TBmljA0vjh2FTKtyomhQ2xyx1CIU8UI/WXXZO1TI0KnbqaCR7WbSUD9smMmus2enZdCnk9q+jFPU0djegfzLH/m9mVRaowB5KaecESz7aYD+2BoeXD2bQR8mJz+mvp3Sw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=RZt8bfUA; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="RZt8bfUA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1762377516; bh=l3tEWhRqP4lk80hQap0vJX2rjpGnZh5LT9KfShignVs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RZt8bfUA3x1BMPbp6nkMXKDVBZsmSqC8Cr6yQf9Bmt2Dn+/fwoSYvUgfRuREfi7tC Q/Q8f7iMK8cG1uT2ybpCwmTx6q0+56XFN+FUXpTwPkiJMlqFbUFh6CDhq3d/Sb3pYd 0khH4Qat4TIVxrmiUAmDbJPZJT6v44l65FEstFParsZO2eah/zNv3Ok8LrSTZFrPLT QOlF3l0Ffm4b5G93+j/mYrVhX1W2ZC5PZDl3BBzk01fwCQCSA3FY8u3Pgkmvk7bXAF cQY9ji73EbfDjeSbnSNsBMHmBoCAp688kMuyKVrKb17vGX9Deq5zuP796vQziSjtIf lHPsXdw8w/mGw== Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bali.collaboradmins.com (Postfix) with ESMTPSA id 3395417E14FF; Wed, 5 Nov 2025 22:18:36 +0100 (CET) Received: by beast.luon.net (Postfix, from userid 1000) id D51B210F352F3; Wed, 05 Nov 2025 22:18:34 +0100 (CET) From: Sjoerd Simons Date: Wed, 05 Nov 2025 22:18:08 +0100 Subject: [PATCH v3 13/13] arm64: dts: mediatek: mt7981b-openwrt-one: Enable wifi Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251105-openwrt-one-network-v3-13-008e2cab38d1@collabora.com> References: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> In-Reply-To: <20251105-openwrt-one-network-v3-0-008e2cab38d1@collabora.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Chunfeng Yun , Vinod Koul , Kishon Vijay Abraham I , Lee Jones , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi , Felix Fietkau Cc: kernel@collabora.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, netdev@vger.kernel.org, Daniel Golle , Bryan Hinton , Sjoerd Simons X-Mailer: b4 0.14.3 Enable Dual-band WiFI 6 functionality on the Openwrt One Signed-off-by: Sjoerd Simons --- V2 -> V3: replace MTK_DRIVE_4mA with direct value V1 -> V2: Update eeprom node label --- .../boot/dts/mediatek/mt7981b-openwrt-one.dts | 24 ++++++++++++++++++= ++++ arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts b/arch/ar= m64/boot/dts/mediatek/mt7981b-openwrt-one.dts index 2aea899006453..3de368c73bc81 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +++ b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts @@ -180,6 +180,22 @@ conf-pd { pins =3D "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; }; }; + + wifi_dbdc_pins: wifi-dbdc-pins { + mux { + function =3D "eth"; + groups =3D "wf0_mode1"; + }; + + conf { + pins =3D "WF_HB1", "WF_HB2", "WF_HB3", "WF_HB4", + "WF_HB0", "WF_HB0_B", "WF_HB5", "WF_HB6", + "WF_HB7", "WF_HB8", "WF_HB9", "WF_HB10", + "WF_TOP_CLK", "WF_TOP_DATA", "WF_XO_REQ", + "WF_CBA_RESETB", "WF_DIG_RESETB"; + drive-strength =3D <4>; + }; + }; }; =20 &pwm { @@ -257,6 +273,14 @@ &usb_phy { status =3D "okay"; }; =20 +&wifi { + nvmem-cells =3D <&wifi_factory_calibration>; + nvmem-cell-names =3D "eeprom"; + pinctrl-names =3D "dbdc"; + pinctrl-0 =3D <&wifi_dbdc_pins>; + status =3D "okay"; +}; + &xhci { phys =3D <&u2port0 PHY_TYPE_USB2>; vusb33-supply =3D <®_3p3v>; diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7981b.dtsi index a7be3670e0059..66d89495bac52 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi @@ -490,7 +490,7 @@ wo_ccif0: syscon@151a5000 { interrupts =3D ; }; =20 - wifi@18000000 { + wifi: wifi@18000000 { compatible =3D "mediatek,mt7981-wmac"; reg =3D <0 0x18000000 0 0x1000000>, <0 0x10003000 0 0x1000>, --=20 2.51.0