From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF9FECD8CB9 for ; Wed, 10 Jun 2026 08:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wIcmQ/+wBM4HApLQCMfHTTwDc3UumPbYrqxn3prOxAY=; b=GPYbnCbTUf84ybyjeIuIP6MIo2 7l+/Vq4ca24q3KMJuVUhN7E557ZS3i0Bke0k+ulRFRF6Kb0QDHEagqEYumv2jTmLh9gjXuQIAmWV+ EOJnZ8oTSOPHuq4nLjVaAyoZF0FEbyZlvbT/ro1FiMCmXXqS6qFXoxeWy0t88DMsECkHespCVUJS3 V3Lt+fEyT+EqdF59aepzgCK6YXITU+FVCskvXCdwkf9KmA5jhk9WsRkF3CV1bsa+GraToIo1zUjRa nG4R+fsSBAxBGFsaIf1RJCT051wRM100ki8A4Kq3xFRVpcoNx8aDpUoTQUPGSaAX9khpg2yBb5rhL OzTSl3BA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wXEWA-000000076k6-0MmU; Wed, 10 Jun 2026 08:42:34 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wXEW6-000000076ex-1sF4 for linux-arm-kernel@lists.infradead.org; Wed, 10 Jun 2026 08:42:32 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-2c0c32f6ce1so45054235ad.2 for ; Wed, 10 Jun 2026 01:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1781080950; x=1781685750; darn=lists.infradead.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; bh=wIcmQ/+wBM4HApLQCMfHTTwDc3UumPbYrqxn3prOxAY=; b=mKQElvhNNUav4PCW8ANOWNtnixHadExVznJG4eaU6mX2uU4gsLK3LKmrRxgsmC/uH5 kwTEdo1no/1ojVVF0rW9CzqJ93KsPgvcRlctyhZcqNTh2p4BNNPo9c4KBLgElmkNrcZA Y664i4U83NiAbQJVf4jvZT1nM31jNh4Vz2MDA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781080950; x=1781685750; 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; bh=wIcmQ/+wBM4HApLQCMfHTTwDc3UumPbYrqxn3prOxAY=; b=QvlT/+4cBXLarZS0DCuut2SjcZmrDE/CzBj+TIFShhBpLDIlM2pjmIOxMH94UcEZ66 VnkANM6bstxHqaJa7UV8qZRh8Z01ht/Jh8uNfNgHK9fyVm853PxaHBM1oZSsJ5soT4+7 zZMbGSYIFn5YBNoxlGScG5WxT7Dl+WZby3W64s+r0rJG7Hza/YCIBIbLwp03AL51Vqu/ MDcJmHQ+npOljGRpitUjRqRrJl83en/ld+03Viks0JU9FBd8/CuOGj84VUv7jg/EgGjl OoHPwCKWdVfPpGwwNK+ib+mdymrrAvsommgJ5bBC/4QXl8Q7fuKkQhTqCqCYOGwp/H4I nCpg== X-Forwarded-Encrypted: i=1; AFNElJ9zXqOi9Fn/2pBwuE3dMiCUYnaBexfDm2J5cw72e6YX6hLUoNLgKoQknLXHqtXsaD6ecTyp8gkyj609z5Ya/3TZ@lists.infradead.org X-Gm-Message-State: AOJu0Yxx3m3XuHUtuwNbF55p3GshGZzdFTzDb/9b+JYjjK68Daot97v2 HBzNvvEPP7C66QiXXi374ec3RlA3cDtRUFEbFbEZrY2sk/hRgW0tuFhx5w26nfCUEg== X-Gm-Gg: Acq92OG0bbBu7RrhttTmsdsnPTO5qQv2/L8mmtYX5/vLlWL60lwE8ph8sYD2mQIwIO2 U5sOFlsEQj58PY5oIW8aI38CHeIAQrerqCyZvWtNuF3j4meytiEHgyjc1z30/62Moap9CIPk6ds aqvAt1qQd0ud+tNJHR5pANnSybtUTKE6EH0qoYv4Hbr0ZRj1+YtTmicPRYx3oSrslXWk0+WyS1h X4/osTC4RXfvm6UPVVQHxhQcnEB/5sOJ/+sCCdPukHdyH9w13RruNQf8FIB5mqzYv8zrUcRqeIv m+ncFB8+I+AEYiaRDWsfaBZVNAxVYZPsTAqYqh2Elor0hNGsITYqJ4CFYC9PBalLM7zO7OhL+Og irap2tbh4A7SsOVhBzoKvvXYIr6VS0uoTKliR/mbxEm3/D6ZVxl6s4VZoiLYbMv40LlYXyg073R DB8JDcLlkAi+oJyr3aUd3teBNt2H3iMQOVAZ3jvg8j74K8vPULgJYMHpSv5D59UDztq4qAjgdou aHblKjb/7FuJsi7Nw== X-Received: by 2002:a17:902:fc48:b0:2bf:23ad:8595 with SMTP id d9443c01a7336-2c1e78e4f0emr297124555ad.4.1781080949649; Wed, 10 Jun 2026 01:42:29 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2a00:79e0:201d:8:3870:6325:16c:d35c]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c164f890b2sm239223725ad.26.2026.06.10.01.42.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 01:42:29 -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: Alan Stern , 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 Subject: [PATCH v2 16/16] arm64: dts: mediatek: mt8188-geralt: Add WiFi/BT as M.2 E-key slot Date: Wed, 10 Jun 2026 16:40:50 +0800 Message-ID: <20260610084053.2059858-17-wenst@chromium.org> X-Mailer: git-send-email 2.54.0.1099.g489fc7bff1-goog In-Reply-To: <20260610084053.2059858-1-wenst@chromium.org> References: <20260610084053.2059858-1-wenst@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260610_014230_542714_8B44B995 X-CRM114-Status: GOOD ( 17.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- .../boot/dts/mediatek/mt8188-geralt.dtsi | 93 ++++++++++++++++++- 1 file changed, 89 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi index f382f90c48f5..c4cc2cff1b5b 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi @@ -86,13 +86,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>; }; @@ -159,6 +157,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>; @@ -193,6 +202,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 { @@ -657,6 +699,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 { @@ -1000,6 +1058,14 @@ pins-bus { }; }; + m2_e_key_kill_pins: m2-e-key-kill-pins { + pins-kill { + pinmux = , + ; + output-high; + }; + }; + mipi_disp_avdd_en: mipi-disp-avdd-en-pins { pins-en-ppvar-mipi-disp { pinmux = ; @@ -1164,6 +1230,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 = ; @@ -1343,10 +1416,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.54.0.1099.g489fc7bff1-goog