From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 1B18E4071C6 for ; Thu, 9 Jul 2026 09:58:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783591136; cv=none; b=HwIjaFJPusbzZaogcIVRU+PdMDF+wx+IOmzo5Bei/VVs8fpMsg+JcIJLwtQHJnSfxH9+98QB6cKSE/LF8arcxwCpZbEmYL68y6XGvN5XPe0vr/4C3XfUHJoR5s3cc392DQbuviWLRnbydamwzJMhVofbsoxZfYlGs6W2Hc8uTB0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783591136; c=relaxed/simple; bh=YJyU75cpPuviW3DeoVCtVsycwY35EMz4CrOCdWp2v74=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JrMQwIAKfRnBfbZ/QkGQ4BuvGxD2Qw9usEAR9WQwImXb7MzCKw0KyaX6BAFp4DcikpouxmA8AJsPm4n1eRxqPC+G2BTlyle2tDzCtzUXCjrnDQ7NCbPUPZ9ZVHkIHwKwR+L7TAhtPtrk909E9KUlghJR57g+0CbaDxwYOGQdWrc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=duGC+b1l; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="duGC+b1l" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2cc73e322dbso15548265ad.1 for ; Thu, 09 Jul 2026 02:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1783591134; x=1784195934; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=fzcA9TG2yqej8iZO6JRem4wjlVQiv9Z5qdYjer6rUOE=; b=duGC+b1lCSUBsIj+Lrl58uUbKvyNqEmJEHzggWi7cnrIDYhx2gfTtMhAB04S323Bps 7k9gOcRuXFCosb0j/sRW/Avu873p0kQtbbPMPjYqHbguvhme0pwXhlOOxEA1ZMruEMmW z87/c7x9QbIEIC4ihvyYqLuBTYJVwZb6nHzkc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783591134; x=1784195934; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=fzcA9TG2yqej8iZO6JRem4wjlVQiv9Z5qdYjer6rUOE=; b=i6Rebgmb6EfWvN2v7ktjM4U/B7PlKcgqcYmBRqvpJu8D+79mLqqjQ/f/znAcMdwVcb onUcMukWhGWyKKzrlmeU1QVUEcee9mDFu3xBI4x9EYF3PjJCDhT/+f7Yksbtjqk76GVu SOyMuFVaByTFeDwRg2g6twAApla+mD65DAIY6OcFesDWtWkpQVpyG8BP4JkuNhSCDOmf m9jh0EkIgV5YH6LoDk26KcVYXHwFB5SjLp+y9wVANaUv1TOrR1tG4DgcZ0Gz60VJ71c1 KAy4iM3udTftGyV7VZwvEAkwjJVt2mcbuMswP81C4w0YtCxo7ZqBdb9H7Qw2WRJ3mfjZ 6Iow== X-Forwarded-Encrypted: i=1; AHgh+RqICrnMugwuRSLAwgwX4Bi48lNU6MxEW5ZqIBKV6hvf1qlGeJcbb6dwRNuDr8RjmS+J/JWtV6BR2vFu@vger.kernel.org X-Gm-Message-State: AOJu0Yw/QPRzOrx27MW4sZXVU2AQ/U2GAP4rc34QgpzgPE5pqPORW92T ncUvVkPVoL7ZhkjAslfwSl9a6GgvA6oEp3zjRgRs6s443/xnjtSnqVGAWi5oaehHFw== X-Gm-Gg: AfdE7ckAVEtwcJFZd6eH40m9mb6+OJZO5ERwR7WU2HJhYw7wliUEa8WyLqP0nuaozzT a4LuFys6P7CMzQ7wSCmYtMoYZMxPA8CTYDUZMHXyBj+cNZoyy3PhyRdOliaxGVQelQlGK5x7iAI Gjm1h3MsKOVUwlf3OF2NQ48gFmHEuz5l4slPJ6HWZoPVZ6rYJ2l7hEaFgIaecB7LLaEl4/6i0Wm dVVcxkylY/rrbVce58TeDHoEx9muDc2gHAgf0zxKn/mwuSYn9Hg9p3+ChZ3D1Gi6AuaXOC4Ko8H JNBFpSqZ+EHUZeou43iXwNUQeyBskC+Q0IsEr/zdgarkJMgUydwpSYPXJVCA6iVA/eC/EjNCuBe /4mwrXK/6717EZqfXDbmpaCZ4vSHJrAXheI5mOpzjoF/4fwnOQoZAfsfzDynrrrLj+0f5GDhDZY LaZblUlcY+SYg5cs5ajihxGYPu7Vv14NgXP3xSf4/v5hEIKifKFn47ahqwNE8WOht78Y807A== X-Received: by 2002:a17:903:184:b0:2c0:a555:80d6 with SMTP id d9443c01a7336-2ccea384cc7mr68024015ad.2.1783591134472; Thu, 09 Jul 2026 02:58:54 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2a00:79e0:201d:8:bd09:6ddb:180a:69c5]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ccc9d5bd2fsm41082155ad.78.2026.07.09.02.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 02:58:54 -0700 (PDT) From: Chen-Yu Tsai To: Bartosz Golaszewski , Greg Kroah-Hartman , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , "Rafael J. Wysocki" , Danilo Krummrich , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , linux-acpi@vger.kernel.org, driver-core@lists.linux.dev, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam , Alan Stern Subject: [PATCH v4 14/14] arm64: dts: mediatek: mt8188-geralt: Add WiFi/BT as M.2 E-key slot Date: Thu, 9 Jul 2026 17:57:19 +0800 Message-ID: <20260709095726.704448-15-wenst@chromium.org> X-Mailer: git-send-email 2.55.0.795.g602f6c329a-goog In-Reply-To: <20260709095726.704448-1-wenst@chromium.org> References: <20260709095726.704448-1-wenst@chromium.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The MT8188 Geralt design features a chip-on-board WiFi/BT solution. This is a M.2 E-key WiFi/BT board layout directly inserted into the mainboard design. The connections to the rest of the board are almost the same as if it were a separate M.2 card. The only addition is the PMU_EN pin on the chip; on M.2 cards this would be tied to the primary power source. Model the chip-on-board WiFi/BT solution as a M.2 E-key slot with PCIe, USB and auxiliary signals. The PMU_EN pin, which enables the internal power controls and regulators, is modeled as a regulator fed by the pp3300_wlan regulator. Since power sequencing is now correctly modeled using the M.2 E-key slot, drop the "regulator-always-on" property one pp3300_wlan regulator. Also drop the comment in xhci2 saying "MT7921's power is controlled by PCIe". Also drop the voltage range on the pp3300_wlan regulator. This "regulator" is just a load switch and does not provide any regulation. Signed-off-by: Chen-Yu Tsai --- Changes since v2: - Drop default GPIO output state from kill pins pinconfig --- .../boot/dts/mediatek/mt8188-geralt.dtsi | 92 ++++++++++++++++++- 1 file changed, 88 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi index dee946309121..73b5c0fdeae6 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi @@ -88,13 +88,11 @@ pp3300_z1: regulator-pp3300-z1 { pp3300_wlan: regulator-pp3300-wlan { compatible = "regulator-fixed"; regulator-name = "pp3300_wlan"; - regulator-always-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; enable-active-high; gpio = <&pio 12 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&wlan_en>; pinctrl-names = "default"; + /* load switch */ vin-supply = <&pp3300_z1>; }; @@ -161,6 +159,17 @@ ppvar_mipi_disp_avee: regulator-ppvar-mipi-disp-avee { vin-supply = <&pp5000_z1>; }; + /* PMU_EN pin controls internal regulators and power sequence */ + wlan_pmu: regulator-wlan-pmu { + compatible = "regulator-fixed"; + regulator-name = "wlan-pmu"; + enable-active-high; + gpio = <&pio 145 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&wlan_pmu_en>; + pinctrl-names = "default"; + vin-supply = <&pp3300_wlan>; + }; + reserved_memory: reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -195,6 +204,39 @@ adsp_dma_mem: memory@61000000 { no-map; }; }; + + wifi-bt-connector { + compatible = "pcie-m2-e-connector"; + pinctrl-names = "default"; + pinctrl-0 = <&m2_e_key_kill_pins>; + vpcie1v8-supply = <&mt6359_vcn18_ldo_reg>; + vpcie3v3-supply = <&wlan_pmu>; + w-disable1-gpios = <&pio 13 GPIO_ACTIVE_LOW>; + w-disable2-gpios = <&pio 14 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* PCIe for WiFi */ + port@0 { + reg = <0>; + + wifi_ep: endpoint { + remote-endpoint = <&pcie_ep>; + }; + }; + + /* USB for Bluetooth */ + port@2 { + reg = <2>; + + bt_ep: endpoint { + remote-endpoint = <&usb2_ep>; + }; + }; + }; + }; }; &adsp { @@ -659,6 +701,22 @@ &pcie { pinctrl-names = "default"; pinctrl-0 = <&pcie_pins>; status = "okay"; + + pcie@0 { + compatible = "pciclass,0604"; + reg = <0 0 0 0 0>; + device_type = "pci"; + num-lanes = <1>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + port { + pcie_ep: endpoint { + remote-endpoint = <&wifi_ep>; + }; + }; + }; }; &pciephy { @@ -1002,6 +1060,13 @@ pins-bus { }; }; + m2_e_key_kill_pins: m2-e-key-kill-pins { + pins-kill { + pinmux = , + ; + }; + }; + mipi_disp_avdd_en: mipi-disp-avdd-en-pins { pins-en-ppvar-mipi-disp { pinmux = ; @@ -1174,6 +1239,13 @@ pins-bus { }; }; + wlan_pmu_en: wlan-pmu-en-pins { + pins-wlan-pmu-en { + pinmux = ; + output-low; + }; + }; + wlan_en: wlan-en-pins { pins-en-pp3300-wlan { pinmux = ; @@ -1417,10 +1489,22 @@ vdosys1_ep_ext: endpoint@1 { }; &xhci2 { - /* no power supply since MT7921's power is controlled by PCIe */ /* MT7921's USB BT has issues with USB2 LPM */ usb2-lpm-disable; status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + usb2_ep: endpoint { + remote-endpoint = <&bt_ep>; + }; + }; + }; }; #include -- 2.55.0.795.g602f6c329a-goog