From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795958406; b=WRr16ltWpHVat7hupH5hAnTjyFfWChG30SLvJ2U7lfMW9xSnFgamECieG4rUzcj3HdED yaLCfOzTeHTkaw1AeNuJPr6TZOJahpca+h1jquBgZj71V0tsCCck4iS6F7/OwlOomXBc4 aHKq0BJOx79shEv8RM/vh7XHJp9Z4xC90+h8+tWgkLcFtscW781rmbPPOr7lF13yZqyQa a3KijJkC6Fed+KOdGTO7YUbAfsauNbkEvRmWRLvvaNBT2Wu6rLvXwWUK6R7wS6ebROWRx DFjPlylr1FE1Tix14z84Dek1dS22kknpZ4ILUBAkDbtqKBalrXhDNTbzqaPfKu57sGA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795958406; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=+x45STMmaD7vZwlRUkOGB5IqGpIIS1efmC8bSF3X02Y=; b=4xMbqBvqYY4vN8N8P+9erM9ZV/vSK3TpmEw+nz/9uBqQpDuNPIxVhHPAt5aHBOIU739P Eu9QZ31GJXzPLJ1A5N8+qjSke5ztThhm/TOeBXvj1bMczn3Xc7xu0z0p146loBNAU6icF CweBt1hbOoWGYPMFNfYVJZqEFOLNv1CgrrhbWy5OZevEHTYMwcooxPaotmYsr2G0z4zSG CZZgpP2o3O8LWjpB5/LUROzJzNYvn6OxgiSGPVxmBQmIBvrgibJ31tK/rq8DSRirEe38F ru40NCnZHdRyZwHR1fOfz3VftPLAlY+yAGJuz4Uh2jxDVsHHWhhaqCdcCgf3xw1qh2w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=B4bz2Wnl; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60AF2606A31C; Sun, 29 Nov 2026 13:20:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=B4bz2Wnl Received: by smtp.kernel.org (Postfix) with ESMTPSA id A84A51F000C1; Sun, 29 Nov 2026 13:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795958405; bh=+x45STMmaD7vZwlRUkOGB5IqGpIIS1efmC8bSF3X02Y=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=B4bz2Wnl8q2VrtN2g2g6/sppHy+npZSMOEk4ev0OVkatRHFPUtZ33MBnoP7mAD5Wm AHziRsReJjwX02qao4DGzo0SMseRZQwHGXpCpvtQON1gnrgaZI4yH8cKBGsseo0jCC 4AGUAJ2FpvA489IGC0quE1R/OBZDJZKtf3Mnm8pSZGWBm2/3gQLUvjzZx7lIlyj9Bm q4i+d9sa1z9jxj9yYxsxw91f5eilTg2TpcxJR9UfCZ4aafentaA+g3lwTW0rKoqmAE XYaSd66cSMNuyy0zcJyz43CsAwH6lU8nM/0rufnBf0O8SajnLvPfWj/c5D0Jx6f5FT Ebz/ifHWrgVmA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] mediatek: mt7988: give each PCIe host its PEXTP clock (BPi-R4 Pro 8X, BE14 WiFi module) Reply-To: sashiko-reviews@lists.linux.dev To: =?utf-8?b?xYF1a2FzeiBCdcWba28=?= , =?utf-8?b?bGludXgtcGNpQHZnZXIua2VybmVsLm9yZw==?= , =?utf-8?b?ZGV2aWNldHJlZUB2Z2VyLmtlcm5lbC5vcmc=?= Cc: robh@kernel.org, conor+dt@kernel.org In-Reply-To: References: <20261129123118.187289-1-lukasz.busko@guns4hire.cc> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 13:20:05 +0000 X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [High] arm64: dts: mediatek: commit adds OpenWrt patch files instead of patching tree - [Medium] dt-bindings: PCI: mediatek: mt7988 PEXTP mux added to MAC instead of clk tree - [Low] mediatek: mt7988: commit changelog contains email greeting and quilt patch list -- commit 8239227460147312c96d3389ca6f78c52b062fbe Author: =C5=81ukasz Bu=C5=9Bko > mediatek: mt7988: give each PCIe host its PEXTP clock (BPi-R4 Pro 8X, BE1= 4 WiFi module) >=20 > Hi, > Its my first time to commit patch. Email body+attachment. >=20 > Each MT7988 PCIe port feeds its SerDes through a per-port transceiver PHY > driven by the topckgen pextp_p_sel mux. The hosts are described with > the mediatek,mt7986-pcie fallback, whose schema pins a host to exactly > four clocks, so nothing ever claims that mux and clk.c keeps it off as an > unused clock for the whole uptime: >=20 > pextp_p0_sel 0 0 0 26000000 ... N deviceless >=20 > mtk_pcie_parse_port() collects the clocks of a host node with > devm_clk_bulk_get_all() and mtk_pcie_power_up() enables them before the > LTSSM is started, so the host runs its state machine against a PHY with > no reference clock. That is never reported as a missing clock, only as a > link failure: >=20 > mtk-pcie-gen3 11300000.pcie: PCIe link down, current LTSSM state: detec= t.quiet (0x1) >=20 > - 991 dt-bindings: PCI: mediatek-gen3 add mediatek,mt7988-pcie, paired > with the mediatek,mt8192-pcie fallback, and pin its clocks to the four > infracfg clocks plus pextp_clk. > - 992 DTS: describe <&topckgen CLK_TOP_PEXTP_Pn_SEL> "pextp_clk" on each > of the four hosts and move them onto the new compatible. >=20 > The driver needs no change: the hosts already bind through the > mediatek,mt8192-pcie entry of mtk_pcie_of_match[], so this only > describes the clock the driver has been collecting all along. >=20 > On a BPi-R4 Pro 8X with the BE14/MT7996 module both PCIe links come back > on every boot - 11300000 enumerates 14c3:7990 (mt7996e) and 11310000 > 14c3:7991 (mt7996e_hif) - with the 2.4 GHz, 5 GHz/160 MHz and 6 > GHz/320 MHz BSS up, and pextp_p0_sel/p1_sel read `2 2 ... Y > pcie@11300000` / `pcie@11310000` while the two unused ports stay off. >=20 > Signed-off-by: =C5=81ukasz Bu=C5=9Bko [Severity: Low] The commit message includes a conversational email greeting ("Hi, Its my first time to commit patch...") and lists OpenWrt quilt patch numbers ("991", "992"). Personal notes for reviewers belong below the "---" tearline so they are not recorded in the permanent git history, and each patch should have its own self-contained commit changelog. > diff --git a/target/linux/mediatek/patches-6.18/991-dt-bindings-PCI-media= tek-add-MT7988-with-its-PEXTP-r.patch b/target/linux/mediatek/patches-6.18/= 991-dt-bindings-PCI-mediatek-add-MT7988-with-its-PEXTP-r.patch > new file mode 100644 > index 0000000000000..a7b1ba09159f2 > --- /dev/null > +++ b/target/linux/mediatek/patches-6.18/991-dt-bindings-PCI-mediatek-add= -MT7988-with-its-PEXTP-r.patch > @@ -0,0 +1,67 @@ > +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 > +From: =C5=81ukasz Bu=C5=9Bko > +Date: Sat, 17 Oct 2026 09:10:00 +0200 > +Subject: [PATCH] dt-bindings: PCI: mediatek: add MT7988 with its PEXTP > + reference clock [Severity: High] Does this commit add two OpenWrt quilt patch files under target/linux/mediatek/patches-6.18/ instead of modifying the kernel source files directly? The Linux kernel build system does not process target/linux/, so Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml and arch/arm64/boot/dts/mediatek/mt7988a.dtsi remain unmodified in the tree and compiled DTBs still lack the PEXTP clocks. Also, the embedded diffs were generated against an older 6.18 tree and do not apply cleanly to the current files (for example, mediatek-pcie-gen3.yaml also has mediatek,mt7981-pcie and mediatek,mt8189-pcie in the compatible enum, and pcie2 in mt7988a.dtsi has phys and phy-names properties). Please apply the binding and DTS changes directly to the kernel tree as two separate commits. [ ... ] > +--- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > ++++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml > +@@ -49,6 +49,7 @@ properties: > + - items: > + - enum: > + - mediatek,mt7986-pcie > ++ - mediatek,mt7988-pcie > + - mediatek,mt8188-pcie > + - mediatek,mt8195-pcie > + - const: mediatek,mt8192-pcie > +@@ -268,6 +269,36 @@ allOf: > +=20 > + resets: > + minItems: 1 > ++ maxItems: 2 > ++ > ++ reset-names: > ++ minItems: 1 > ++ maxItems: 2 > ++ > ++ mediatek,pbus-csr: false > ++ > ++ - if: > ++ properties: > ++ compatible: > ++ contains: > ++ enum: > ++ - mediatek,mt7988-pcie > ++ then: > ++ properties: > ++ clocks: > ++ minItems: 5 > ++ maxItems: 5 > ++ > ++ clock-names: > ++ items: > ++ - const: pl_250m > ++ - const: tl_26m > ++ - const: peri_26m > ++ - const: top_133m > ++ - const: pextp_clk [Severity: Medium] Should CLK_TOP_PEXTP_P0_SEL..P3_SEL be parented in the MT7988 clock driver (or assigned to the PHY nodes) rather than added as a required fifth clock on the PCIe MAC binding? In drivers/clk/mediatek/clk-mt7988-infracfg.c, the analogous USB PIPE gates are parented to their topckgen muxes, whereas the PCIe PIPE gates (which each PCIe node already claims as "pl_250m") are parented directly to "top_xtal": drivers/clk/mediatek/clk-mt7988-infracfg.c: GATE_INFRA3(CLK_INFRA_USB_PIPE, "infra_usb_pipe", "sspxtp_sel", 10), GATE_INFRA3(CLK_INFRA_USB_PIPE_CK_P1, "infra_usb_pipe_ck_p1", "usb_phy_sel= ", 11), ... GATE_INFRA3(CLK_INFRA_PCIE_PIPE_P0, "infra_pcie_pipe_ck_p0", "top_xtal", 2= 4), GATE_INFRA3(CLK_INFRA_PCIE_PIPE_P1, "infra_pcie_pipe_ck_p1", "top_xtal", 2= 5), GATE_INFRA3(CLK_INFRA_PCIE_PIPE_P2, "infra_pcie_pipe_ck_p2", "top_xtal", 2= 6), GATE_INFRA3(CLK_INFRA_PCIE_PIPE_P3, "infra_pcie_pipe_ck_p3", "top_xtal", 2= 7), Requiring a new mediatek,mt7988-pcie compatible with 5 clocks on the MAC node breaks compatibility with existing 4-clock mt7988a.dtsi device trees, whereas parenting CLK_INFRA_PCIE_PIPE_P0..P3 to "pextp_p0_sel".."pextp_p3_sel" in clk-mt7988-infracfg.c (or describing the reference clock on the PHY) would enable the mux when the port powers up without changing the PCIe MAC binding. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/WPbvQ5bN1rWZUCz7EPq= l9EZIfTCossuyvgobtVAYvP1JM0m-RohvumoDmBdEAz2H593XEGyTh9T8zn_BYb7OlKc7LePH1R= QbjjCel2mu86s=3D@guns4hire.cc?part=3D1