From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E17A36655C for ; Thu, 6 Aug 2026 16:53:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786035226; cv=none; b=Ctea6HWwKu2OV4K2D+TY+C6EDgrAQPPlRY/Ae4ujxGxEc8TM5KLXGyiSEWtSZzBgfuQ5Dzium1Ef1dcxTsG9XV58k1lAkCUDIAgWVMk3NovX/lHECHDYU2599r4b85n0BXtwkQu1QT3YSXBIZ6FCcec+ASSHsmtTGHqddE6NqgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786035226; c=relaxed/simple; bh=dyMvht9Z8v4C+WMRKB2cinIFY/+sDpmcaSxjOlWQiCM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=C3kR4lBq2022ERtQi7SdIxhiVIlC0rzSFjJbzKoNzBoNMKlSjQ7IUs6DSq9+6JZrehRNCwH4m/KPzRGsq+sr/EEY2ArCnC80D1o6zVRSdkCZKlB1IHpGE6LbKWcnt2Uy3+glGlBxx5sYNQjoRNjgUKbLKHJkVTg+N9XQejzaIxw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jfzMVnqx; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jfzMVnqx" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-47362928f65so2042975f8f.2 for ; Thu, 06 Aug 2026 09:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786035224; x=1786640024; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=+KE+qyKBRfV7lzyByYvfu7OS66sfgFGM8oKCG0fWclA=; b=jfzMVnqxHc0G1HbwnyZ0xLynPvz/XyU6BonKP1L8PbPnTerfeHaTz5OhSMXRCR6R1J yUzVlHU5374Ls4JsKexdV8CWLgTjHb8h/fUBdH92eigj6Xd296k8BXcKnLsd/gHUlG+7 bCVsNpXHCzIZG1Ep/k/eZI4IN590ERzRwHs3LxrSzyFgZOp87xvs4IH+W4pXmg1bOJr/ Kl+kEtxykaTIVjyLjzFtP7vrg8qLjukVxkziLMaX1M5YY9KDtNzbZl8D1OkgeAXcT3Lc Vuq8U6y8O9dIP7qIBAQmp2yeB6iayPjT9rMxmI+Lj3LK/Wjbtt9/VEfyyHek22zWPctz 5v+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786035224; x=1786640024; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=+KE+qyKBRfV7lzyByYvfu7OS66sfgFGM8oKCG0fWclA=; b=Tuf5psyznAbCx6ndiWivho3avlWH93KyAenXJFEfAZmBmfKJA0FPlZ5GN1J/h5N1uf mt0o1TBuZ2hHzBIsKB4xvN6YdlRdYkyWmwcp7HEiJn8GUfj5CrBIvb9HtthkLKtnqHBx dozCntU5e9MaOXOsozZOATNukW8laaUiYD5iLiPa4u3lSCushb1FcrVOZ0QOP5Kuqdao LNLGpbxPZEfZWcQMg0Xf9E1kyw0an/pdEDj1moCBDCULQ+3Wc3PUcfyGXIZRBwKxNKhb iYjS1/tbxHmQVWeP42gFpCTfYCvjXZC9raWmUoXjaYNXassXFhxgIkvzDLmcx1FsYl3u RIeg== X-Forwarded-Encrypted: i=1; AHgh+Rr6qV8G98B1bHMYquztJISDvlAt9f19fPi4XMo7s9B9tt+g5Yckhbgdinstdbau+xHECokKGmLWBrltys0=@vger.kernel.org X-Gm-Message-State: AOJu0Yz57S79wq8at2UQYFLEle08tYgqRSwMf1q9loaC3O6eKUQaQhB8 q6XetAzqK2aYplvwLPhpJxFn+BWwCPwm0UjfalFaDXKS2ih5f5hDiV6w X-Gm-Gg: AR+sD10prUjQhiuWr1ClqtOArOCyxUZt9Oo1R9KwyR5389qOrRm2OPg1dkAelmo//pl BdIwoJtjsurVkDyfXWDngy0Bve1bDalKV9Y732Xg+JkYk9TUSA4f/K49LxE+1NfiwuOiiPEgW1d v3e/RICXQrl1U1L6oxvpW47ci+cT1XadeenyGfW9+ltl7wb66KT+Y9aZiuG42xUgO5Mx7HDYPKN UvOF1YJxsK1XF7xJL7yCwcxICBDNv7raUoIuZF8TD8JLOzGC6khTT6fZy6bRurlPyEUdTPBwl3q bGx8txD2gzb6keOdQ4Mqp8LkeolS6ejwpcOOUj66uSCZIBhA36wEQtWpFH0aVhhVVM91Tgo3aLx 2MY/XDj/HN7LqgcPmxldN53PBQuIFEGiZWi8LJDVQqyPjmiwrinevGYYW2EQThAKHqyZGWpbDHq Vw97lYTN6nECAwOiSsNYZgZBdFBX4RIxOwjEZCYgoiqEnJ9VRswPva+4MIaWu98n3AkE2upNz5g Q+ixiON2m362171AQ0aB2t0u9lEGdD9oFzpCJ4yunTP+eCxJ/Q3iaBagxcNIcuE X-Received: by 2002:a05:6000:2988:20b0:47f:eb80:ff42 with SMTP id ffacd0b85a97d-47fec4e2975mr23732729f8f.4.1786035223457; Thu, 06 Aug 2026 09:53:43 -0700 (PDT) Received: from Ansuel-XPS24.localdomain (host-79-42-255-151.retail.telecomitalia.it. [79.42.255.151]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-47ff79a7f07sm8070586f8f.8.2026.08.06.09.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2026 09:53:42 -0700 (PDT) From: Christian Marangi To: Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Ryder Lee , Philipp Zabel , Matthias Brugger , AngeloGioacchino Del Regno , Christian Marangi , Jianjun Wang , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 0/2] PCI: mediatek-gen3: Add 2-lanes mode support + clock Date: Thu, 6 Aug 2026 18:53:30 +0200 Message-ID: <20260806165334.7328-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This small series introduce support for 2-lanes mode for Airoha AN7581 SoC. This is needed for correctly functionality of Eagle WiFi Card normally attached to this SoC that require a 2-line PCIe card to correctly work (and give the proper performance) The first 2 patch address a limitation of the PCIe implementation where the PERSTOUT reset were indirectly asserted and deasserted all at the same time (for all the 3 PCIe card) with PCIe enable and disable. The 2 patch address this and introduce correct reset to control reset line for the relevant PCIe line. The last 2 patch add additional logic and support to assert and deassert the PERSTOUT and also apply the required configuration for 2-lanes mode. 2-lanes mode is implemented in DT by adding the required property and by defining the "num-lanes" to 2. Changes v5: - Address formal comments from Bjorn - Drop clk patch (handled in separate series) - Add reference to clk changes Changes v4: - Improve DT split patch (drop unneeded property) - Handle power_down PERSTOUT Changes v3: - Add Ack from Krzysztof - Improve commit description of PCIe patch - Use pcie->num_lanes instead of possible uninit variable num_lanes Changes v2: - Address typo regs -> reg in Documentation - Address typo lan -> lane in Documentation - Apply a suggested fix from Airoha for PCIe MUX configuration before PHY init - Parse secondary reg in probe - Add missing reset_status handling for inverted bits - Move SCU to local handling in power_up - Add check for max num-lanes for EN7581 Christian Marangi (2): dt-bindings: PCI: mediatek-gen3: Split Airoha schema and document 2-lanes PCI: mediatek-gen3: Add 2-lanes mode support for Airoha AN7581 .../bindings/pci/airoha,en7581-pcie.yaml | 244 ++++++++++++++++++ .../bindings/pci/mediatek-pcie-gen3.yaml | 77 +----- drivers/pci/controller/pcie-mediatek-gen3.c | 106 ++++++-- 3 files changed, 338 insertions(+), 89 deletions(-) create mode 100644 Documentation/devicetree/bindings/pci/airoha,en7581-pcie.yaml -- 2.53.0