From patchwork Thu Jan 4 13:01:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511076 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 1DFA3C47079 for ; Thu, 4 Jan 2024 13:02:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oU0OHMIknXUwrslAM5aECumvrLSmxdDfno6VtKH4SwA=; b=tgYM9kXTcmaj0B ekUCf62oLLh1H9ujAsCLb/o0vv/fJVCEBIW+bmr/ucQJzSYLkCSsXL7krdalWlxvfFQcT12rSt1Dr +m24LnsV1cV0BIZjkECcFg6aclcYrf/QcbUb3VhJo6gyBbI5BWVvuZe1zZnSJgfK4i1x7DBPNuRs7 L2U+5Vi65IWtF7sXZRKTY1fZfcp4gL5c//r2/XjmYCqB2dDRWHL0ItPa6cG2NbYM/N8KYGewGCA3v Gbc1oUoTGnKWG2DMY9n7c1tIdAbx6sBGTwwW67t3gQ9ufD6Pb0ZrDk4nDS+NNgkeLXNWMz8hhU8Tv qvSvgcc7R29PQ3SOlclQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMR-00E2rf-2Z; Thu, 04 Jan 2024 13:02:11 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMO-00E2nF-0h for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:09 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-336746a545fso259966f8f.0 for ; Thu, 04 Jan 2024 05:02:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373324; x=1704978124; 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=HQIEpNJctaz16RzA/leTZqNcUN7vsgkXc8Xvi93qAho=; b=K1LMzOiQn8NrO4RSQBVDujaoO3NxVqW5LPFRYsDdEC6Vxhxm/UvxLHdNitPN7WmSal E9ZH/xMDQPCvkxw6SZrUjxqN+d3Xub5iRXK4TM2q6Pnd0PgkKqrBOjZMlE0Ln8FZZolU ua825JoUL/HxitN0zLIDQ8Tqr5aNp3p0Tpyeseb6evtlzkzgv6NJbVSa2qkTP2Dd66u0 ji768FtDGi2Y4XFFRx7puq1G9GRlYLBAGgFcRbUQlmzWow6ugxFVLK3TnzokIMS/xEWR QfofK9oYxyxikEcX2MpVxT4qrM1mrJXg2NB0M8U91S74NIE8bWq6MoAQQsBBcXZlyk2r IC1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373324; x=1704978124; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HQIEpNJctaz16RzA/leTZqNcUN7vsgkXc8Xvi93qAho=; b=TsgC1VnTtR3e9ruvCMdDZ7QUWFOZhXlst4Vh6PYIFeQe5YFpnR8UTydSzBKeaRd5D/ dNIgHu2D7jiytYMBOSNHmE1J54qjC+VsjTJxWFghMg30HmBSavjGUOoDcz2M+WY7SY1f QR3FCKJZq58430UzpkjMz4AkMIFf66yfmpCdbJi80LKi1n8DZGxV+DVDRg2NXh3XhTzr f/RGIrZFJrNthlB5LbDDkTDJLok7HeFzlrrAFCR2HLURxzjgCy9aNkAdqDR/9jvrmkTt cmtER7o2RPOQ9TuoyckGOUEpsCN54/o9MtQ6zr356tPfQ7Ekm29cdmFoL6PW7n1lgF19 839g== X-Gm-Message-State: AOJu0YzU3DcnfXnOB4PNiwpxECJ4iZHKOquG44WzwE9zrKAHidRwjKBV Uslr9dOzaNL5JOYM0f69ADdp+m5XB0wXhw== X-Google-Smtp-Source: AGHT+IEYrrjaOaf5/IBZBDz2VUcMEHweLF977kWhWHW+xRF7Tv9rMBKm8dg3stU9d6EnW3pR2nQiEQ== X-Received: by 2002:a5d:4576:0:b0:337:4f04:933c with SMTP id a22-20020a5d4576000000b003374f04933cmr318898wrc.54.1704373323681; Thu, 04 Jan 2024 05:02:03 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:03 -0800 (PST) From: Bartosz Golaszewski To: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: [RFC 1/9] arm64: dts: qcom: sm8250: describe the PCIe port Date: Thu, 4 Jan 2024 14:01:15 +0100 Message-Id: <20240104130123.37115-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050208_252769_9A309252 X-CRM114-Status: GOOD ( 11.49 ) 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 From: Bartosz Golaszewski Improve the description of the PCIe topology by defining the port node at the SoC level. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 760501c1301a..fef9c314ce55 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -2197,6 +2197,16 @@ pcie0: pcie@1c00000 { dma-coherent; status = "disabled"; + + pcieport0: pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + bus-range = <0x01 0xff>; + }; }; pcie0_phy: phy@1c06000 { From patchwork Thu Jan 4 13:01:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511074 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 0D7ECC47073 for ; Thu, 4 Jan 2024 13:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R9zTPlKWjna6nhQSW9gzmJlNbnFlaGvkoY1pT9Wi5LI=; b=eu1leQ5ebl8JCt WEPFFCje2eKIoKvegkrhLkNlKV2ehXr20cJrS2Ys071Seilv/UY1aX067h/ns40pSo9rdfbv32asp VjXIPbwA5aY3LWXAsfXO+06KfZqXfVrEETBSINEOc46EM33oWXzG6UIPpVBYD8DaiY841al9kjYcc Cg/qNQ9evxuoyv9+X2ydU7zMW37CsPb7Xp5A8DZfxP7e6Zg2g0p0S2b8sUrc5NaNwHWRl/sVqWWVq Yf0vuC+2pt29Te6JwxnAud9lO89mS1OqPvXl0KWDz4EpTPIZeAVoejZQEfcp6bicZbLQg4R937HZa VCk9w8NjRBMYfVYbQrPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMS-00E2sI-1O; Thu, 04 Jan 2024 13:02:12 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMP-00E2no-1I for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:10 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3366ddd1eddso425596f8f.0 for ; Thu, 04 Jan 2024 05:02:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373325; x=1704978125; 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=ef54oPQshoe7Gm//fznSEK5vgc/1PN5IaLbwIyajU/k=; b=VBSTCtiGibaDgz+Mb8uzcapVmDU4gmBZNDBHMIzhN+qzMtm2sbRpZ+0Q5lxv7Hk3rU wseMZW/0iyb+ooD8N0j8mXwf+jiMyBAGsHxqH4/WRVd1pf7HEhPSdJarVhutiNrjk4Pf rgCxmxKAvwvjdLbYrTdgaKE8ajLvhggq0BA93E10VrxN7PVxbp8aqt0NwP6gFkMLuGiT lTia+ZwM8tPiN8Di9pRS2uaLuLiA1FzraMZ+P593+MtD0U5ARb+6Btk9QGyTsGi5/kOa 04hVtMGskzwFI+jPd4rsytqKagXBrt+zLPuKcJQ06ivRPy6MK8kMu1CjWXz6giiSNxjL UWeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373325; x=1704978125; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ef54oPQshoe7Gm//fznSEK5vgc/1PN5IaLbwIyajU/k=; b=cDSN1wMG5UVQIjTsg1B5PGtfLlNvWvP9XD0e0savmV9qWdK2vR26QvzTpojUWEen58 o18bx2G82MvCMRE821AxJ7vP4TfOd2ewMGTvlipeJ3Fjdwq2W5MksZWUTsQXQyVc+WM7 Ct2QnCBuYZleLUb/iHhlOtfhHuHUsEY/rzLGwhicXcTapvyn5qiplF69qFJ28qSx9358 SfWaRyDILvCtXiHCLNIrw7ZEesZoPWG4Ja4iYvGOepbUsU8k8s7WD2cxAr7Z0uGcvDXL jEPe6EYUf6PwQoHkxZf3cSzIJxQdIR7yoxZSNzGt/oj+m6UfbL6na5SKU/Z/8FYlU99R S6Jg== X-Gm-Message-State: AOJu0YzXk/sSLGBJMgErPIRsUWXbvzKumlyC7P/DbOpIGV5sgsiUKV/Z DpAIPPWiN7aFsnclFy9j3AqGiKeeQSYTdA== X-Google-Smtp-Source: AGHT+IE3hMjwAGjPrVJAC4uAAQmbYFgXxxZo1RNc4JRLcmBIwG0h5ZwWYvnldKAKE5zO1xwte3fjeQ== X-Received: by 2002:adf:ef47:0:b0:336:7d86:113e with SMTP id c7-20020adfef47000000b003367d86113emr232689wrp.80.1704373325566; Thu, 04 Jan 2024 05:02:05 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:04 -0800 (PST) From: Bartosz Golaszewski To: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: [RFC 2/9] arm64: dts: qcom: qrb5165-rb5: describe the WLAN module of QCA6390 Date: Thu, 4 Jan 2024 14:01:16 +0100 Message-Id: <20240104130123.37115-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050209_445277_793FC927 X-CRM114-Status: GOOD ( 11.41 ) 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 From: Bartosz Golaszewski Describe the ath11k WLAN on-board the QCA6390 module. Include the relevant regulators and the enable GPIO. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index cd0db4f31d4a..721f86af952b 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -734,6 +734,22 @@ &pcie0_phy { vdda-pll-supply = <&vreg_l9a_1p2>; }; +&pcieport0 { + wifi@0 { + compatible = "pci17cb,1101"; + reg = <0x10000 0x0 0x0 0x0 0x0>; + + pinctrl-names = "default"; + pinctrl-0 = <&wlan_en_state>; + + enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>; + + vddpmu-supply = <&vreg_s2f_0p95>; + vddpcie1-supply = <&vreg_s8c_1p3>; + vddpcie2-supply = <&vreg_s5a_1p9>; + }; +}; + &pcie1 { status = "okay"; }; @@ -1303,6 +1319,14 @@ sdc2_card_det_n: sd-card-det-n-state { function = "gpio"; bias-pull-up; }; + + wlan_en_state: wlan-default-state { + pins = "gpio20"; + function = "gpio"; + drive-strength = <16>; + output-low; + bias-pull-up; + }; }; &uart6 { From patchwork Thu Jan 4 13:01:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511073 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 23742C47074 for ; Thu, 4 Jan 2024 13:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DhHc5/S3YGCX1meqTFpDKiYGFJ0ClVBPpo0q7zxjTaE=; b=NHWAIdbwldPFev enI5TWW+HQIWuNTQr2nR3w83cisXdPrdD2TneoeDQQ39letsNOOiLfmlsp5nmF5zIcUWvbu2AcwqE dAlMSjC1Dcd6AVfpkFzmzQfYYTwmPyDFyHuiFvKXLfPDR07zteSyNekMq+JLbPkXDDi1EfRSA/gRm irTik9KmwXgbkFeurzsKF1bW4yTEPeQn5VZmcwZOmaH7BCM9bZXCdLYUcQ9Zw9uUDvs0cNmzqtmcE 95FmTKc1HSJ0wRiWp0z4+ERo9F26oy72Lox2CWVEqnDAIFl2KqsNfJQptXGbAasjsqRgxkfmLWdtZ ZJ/jqHcqHa2SAgWhuubQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMT-00E2tT-0R; Thu, 04 Jan 2024 13:02:13 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMP-00E2oe-2q for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:11 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-336c9acec03so365507f8f.2 for ; Thu, 04 Jan 2024 05:02:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373327; x=1704978127; 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=dm8mMOJsxux6ZmWUG3F7cuu+H2vgOte3WZWDy9og3kI=; b=APOn6HAwKc9GlZ7C/Zu9wfhrDK9GlrvJ/EJG84rbHFSJ1ZfBZy1/kptmn1QvOcqihL XythlXVhzlp1oddWOCtTQch0c4ja8FDMCcv8wXfvvrkNlETd0zHjIaTx3uYJDXkii9Cq 4AbxnaG7YeEj7dXxMmDwI/i76WcZy5Bcn4tJBS1AnnbBJIKFduwSthSUYBqqjhhmhXp+ S7o1Xpyg4f+j6Vzrp3fwBt4CUnFv+LmR4qlgvjInq++RTZ/MI6TMHFYeUKGiVphG9UWu jgEBWHAyduF6WimHQ1ISLscWkp0/hOm2HKlMWNh22Xrx+/A8DvLyf97xMCl05Ttb6gZ9 OAbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373327; x=1704978127; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dm8mMOJsxux6ZmWUG3F7cuu+H2vgOte3WZWDy9og3kI=; b=nfBD6M2j6hOq4FvYA1k+oRiHXXSqJY9BHheuSv+xXad+Cwh/kve2FP9qzP8oi3ILGa P0l+k7bHlxPa/fKzgEe4Py2CCyXhV+tB8c4j+h5JAhe0LvqIrjTrVyzgRvQfsmmyn7rl tiw1Aq+urJJOJGiNjNkJhnHasnkSVqPmrNoIwUCfRrOlp8OKqWUzkaTqwHf+ji2/dDHb dmO1eRFyi9EEp3vLOSDKM1zRZ506E9hRlDecf6GsHKtsUOv/edWD2NMdny8p4I1SlFwJ MgoOLcvP/k7ox4T7s7ccyu9oqqNdXOSPaY/X4upPIAUDmbmBjbd0SQkBnK/mVc9qyIdk c+8g== X-Gm-Message-State: AOJu0Ywrz/CXe02zpp7LMpZVv6J/Y8JBC7wYbPwy5JnZ3BvmVwGKqSgK lP7xXJ+htYCOCzqXXqCXN4Bw2FwDkM42qQ== X-Google-Smtp-Source: AGHT+IEAmqT1dLhz8yMZPRNlwfwkfnr08tFlrQ2qx2EHGz1pEWzlFjlA+PDg16ga3IpH7ARH2S4IxQ== X-Received: by 2002:adf:b199:0:b0:337:175:a079 with SMTP id q25-20020adfb199000000b003370175a079mr327095wra.80.1704373327126; Thu, 04 Jan 2024 05:02:07 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:06 -0800 (PST) From: Bartosz Golaszewski To: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: [RFC 3/9] PCI/portdrv: create platform devices for child OF nodes Date: Thu, 4 Jan 2024 14:01:17 +0100 Message-Id: <20240104130123.37115-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050209_927963_DDFD1DAB X-CRM114-Status: GOOD ( 14.28 ) 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 From: Bartosz Golaszewski In order to introduce PCIe power-sequencing, we need to create platform devices for child nodes of the port driver node. They will get matched against the pwrseq drivers (if one exists) and then the actuak PCIe device will reuse the node once it's detected on the bus. Signed-off-by: Bartosz Golaszewski --- drivers/pci/pcie/portdrv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c index 14a4b89a3b83..401fb731009d 100644 --- a/drivers/pci/pcie/portdrv.c +++ b/drivers/pci/pcie/portdrv.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -715,7 +716,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev, pm_runtime_allow(&dev->dev); } - return 0; + return devm_of_platform_populate(&dev->dev); } static void pcie_portdrv_remove(struct pci_dev *dev) From patchwork Thu Jan 4 13:01:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511077 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 D85D8C47074 for ; Thu, 4 Jan 2024 13:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d0tOdB3UsMKhqyJ9M3a7NUlJEX8DumDWXJeFtdAv2k0=; b=Jg4VUJv8a0lE7I gYFAi/D64IQCZFJnMSpa0jrjLF0KHteB9hUDk1FLIeU6y/oIjLkZzejWliFtiZnC/c8g/QO7Mh6a0 U0W/Y242vQRq8jheHeSMGb9YjuY9ou11nto2bDM5YO3LOQTN1XCT/7nOM+U3Sb1sMk8UIaBPAPK/y mNFZSw+pe7Y9qEE+boEwlPpnlLmpVm7WvbGDr8sFi0Wkc8glCFbU1gKEC09pkPEVI2bMTZcFPBYiD VfnzRX7sOaamOmRcU0g1YlzW8EJLk4B2tWk8IUrYwXh+eYAa7Jd68NFVSzSClUxX/K+f+WfUIZSRn GNPaZBYXYjd4GOHEwRTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMV-00E2w5-37; Thu, 04 Jan 2024 13:02:15 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMS-00E2pa-19 for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:13 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3373bc6d625so365428f8f.3 for ; Thu, 04 Jan 2024 05:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373328; x=1704978128; 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=ko9AldsNAGIySQ6r8IsXSCtLQ9r/1ys0AWCrWCqKA/w=; b=hJqkS2kzYGSJPlPnIQRCspel0TrbmObSlo2EhzXHx3kUZifaT+A8Ukpk0zHkIYqBCK Y1myb+hfEZWfCOOIkH8igMgADfUuct3VZgdWWeFWC53srikIDDcHVmLFXj7t8eUV+aP+ pzJH9s9s6v+bxjfVyBxmhU+foANZzsakpuwlrd/katiyK3xFMd0xK0TZXvEzuOeQMeHe xd6pg1g0yDkUepQzPuAwcs/TWHNadbC1lD1eQVxE8+ZjxEMXCTeE8BAoqr1xK6EnDbQX 6us1wA+h1U3mJSAVuPAY2K05g4mUGgPypMfjedSTetNXvxuGm2Qos2zYwPxP75+MA9I9 awtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373328; x=1704978128; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ko9AldsNAGIySQ6r8IsXSCtLQ9r/1ys0AWCrWCqKA/w=; b=ia3ji5qHX0lM4RtZIc7Q3gCA0DoDtOcQr9bPGUBK57DNV28m+kVVKMIzrCNjR0DzzW DcC98q2b62qa+Vnhb3yw2jJ/ER2fJSp9amovBQc+n7/peCRkFijLIt33yhjsGwh7l6qz S/mLIL+pPU2cZAzB3iQH1ioVKjFuOJSwiM5GNjbHJHX231LTjbg78KKtLgxCz7LnEaf0 bs2fdqaNdAE+EUJ9OVc5/PEvZK4hVTcjcYCJqxpR/0HonsjqjhSQtPu9L2JGpEBSZxln w27XRLXyEatzRVh2pplZ59zKiGUxfb8Mv4VY3XTGjZYUsZCVp/3FZeWp2kHip8MEnjV0 j2dg== X-Gm-Message-State: AOJu0Yy8JD83dJvezvcdLOlSwbf0slzuBa9kbHqk2NYJv2i24soEO3f5 KYvVt0u6OHB3fVq7LT0m6ZEB4mmgFrSz6A== X-Google-Smtp-Source: AGHT+IFUjxl+akq5qBUWz1Hq2UkXunszpKE6K042Vn3Nvy8yjJ9A6yhdSklCJkd/SLfWbEWSuN0qWg== X-Received: by 2002:adf:f1c7:0:b0:336:7f93:3dcc with SMTP id z7-20020adff1c7000000b003367f933dccmr292279wro.81.1704373328663; Thu, 04 Jan 2024 05:02:08 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:08 -0800 (PST) From: Bartosz Golaszewski To: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: [RFC 4/9] PCI: hold the rescan mutex when scanning for the first time Date: Thu, 4 Jan 2024 14:01:18 +0100 Message-Id: <20240104130123.37115-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050212_395919_2295553D X-CRM114-Status: GOOD ( 12.72 ) 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 From: Bartosz Golaszewski With the introduction of the power sequencing drivers that will be able to trigger the port rescan, we need to hold the rescan mutex during the initial pci_host_probe() too or the two could get in each other's way. Signed-off-by: Bartosz Golaszewski --- drivers/pci/probe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index b7335be56008..957f7afee7ba 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -3122,7 +3122,9 @@ int pci_host_probe(struct pci_host_bridge *bridge) struct pci_bus *bus, *child; int ret; + pci_lock_rescan_remove(); ret = pci_scan_root_bus_bridge(bridge); + pci_unlock_rescan_remove(); if (ret < 0) { dev_err(bridge->dev.parent, "Scanning root bridge failed"); return ret; From patchwork Thu Jan 4 13:01:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511078 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 51061C47073 for ; Thu, 4 Jan 2024 13:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gw612v/cVTSOBtwcSYxx80by9lcFewYHhhcq6dE2AYA=; b=sCM/HWOhvvSRf6 on5hva9CEk5fMb1vEhs9NWg2oOjnicUnugNnGDxnZ1lHBxLWHZpnWDtuz8rjF7+PvM4XOP3Z1CA0I 3grQIePgjTAWhtKpKHrmuNbKJ6xo0oXlSBB/JX0ey5KMHa6wjf5IvtIdM8Lv9TF9Iq+IwnahaoNft vX9vM8EZx3MEks2Q9UyJ6fM1FUnbr5hgi3S4xfX/BtVHF/n8GiwOAAp0y9UPApdp40Vn3MnfnJkzf vvuHtneRbyS+hr1PR6aBR25ekOdADE9b5GOlSZnEBTYMNSVwwDTHEa7wEWrOA8EMA2bTTB372FJ6M Dl2NRN1MvMv+YMiIH80g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMY-00E2xx-05; Thu, 04 Jan 2024 13:02:18 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMU-00E2r1-0K for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:15 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-336c8ab0b20so448409f8f.1 for ; Thu, 04 Jan 2024 05:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373330; x=1704978130; 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=C0/NJ7KYEulil2Xeyr0vkcKQVIe4dXTk2WHu1Aal+GM=; b=vaZxj6gYNNpgciOSO74T5tW0zrMVLFdOa6sOPK0MeQSM8WXsMivJa5pOGsB8DqVjbc Z0phrlViv9W/D7BnJYS9WuBwNs2esHs5ZxpprayMFCdhgjVXy8+V4oXJFvndi9C8HX9M EnJYpLzeKtWS61dOweq5XRknYkH/JJm2Z2x/FeBwJVwPDMApSJ1ty6In9eW4WZ15z4CY sDjLSeDqQ6nYPbkEbyPy4UdrVDot3R71/6JkZYGyN7xV2gBeo8fR8Xfl+qne/vl8PLGP 8HSq59mbJjbGpINFvSwrpm/9HAsk0/jJdmxyK9gEa1XBCWIb12xu4ur9fTOl0W+bJEIf JUzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373330; x=1704978130; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C0/NJ7KYEulil2Xeyr0vkcKQVIe4dXTk2WHu1Aal+GM=; b=S2AUEV5JkeOMuTmSjg/DXjIXBZGHyfGPKFgBPeZatdh3wh9lYBQpy88vwg3pgQIUAf cRNIDiM5CgEiDWbikAFdhTnp2QgonS027OCV7IokdlCrAj4Uk6py9v6qDxtZJbBgCsyO wYuCqJhVuxQbUHbuA/KHoW3QHPLE2K/874zqHNjLEuzClowbXc//Kv+3ciMsbGH/a9uz L5Xuv64WCpPyKHz8O+ttfdlP5dUsdqriZylHEqPszF9yEJbY+2mYp70kVwjUFtK76NiT pQLY7WHjfUiBteN1j64uz01wriQpw8YL0saL4rpNbm1mE/i7+PMj4vQhdVwgTN2AJ9Mz B1ZQ== X-Gm-Message-State: AOJu0Yz2/HyQktMPsU2jZ6gRb8QpA7izhptkj1eWZxOe/ms3LRD0waNE JgYcWOC+Mx4yNgzowm6zJtIjW/O9O96bqw== X-Google-Smtp-Source: AGHT+IH1sAH1RUXIP7DjQNVAHdST7oR7mT24OIBd+gWvZXVas72o61+b25pqunGvVU+Vz6z5WhqhXQ== X-Received: by 2002:adf:ce88:0:b0:336:7590:bd34 with SMTP id r8-20020adfce88000000b003367590bd34mr378455wrn.6.1704373330194; Thu, 04 Jan 2024 05:02:10 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:09 -0800 (PST) From: Bartosz Golaszewski To: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: [RFC 5/9] PCI/pwrseq: add pwrseq core code Date: Thu, 4 Jan 2024 14:01:19 +0100 Message-Id: <20240104130123.37115-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050214_172622_FA66BE25 X-CRM114-Status: GOOD ( 25.91 ) 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 From: Bartosz Golaszewski Some PCIe devices must be powered-on before they can be detected on the bus. Introduce a simple framework built around the PCIe port driver which now instantiates its child devices from device-tree. The way this works is: a DT node representing a PCIe device connected to the port can be matched against its power sequencing platform driver. If the match succeeds, the driver is responsible for powering-up the device and calling pcie_pwrseq_device_enable() which will trigger a PCI bus rescan as well as subscribe to PCI bus notifications. When the device is detected and created, we'll make it consume the same DT node that the platform device did. When the device is bound, we'll create a device link between it and the parent power sequencing device. Signed-off-by: Bartosz Golaszewski --- drivers/pci/pcie/Kconfig | 2 + drivers/pci/pcie/Makefile | 2 + drivers/pci/pcie/pwrseq/Kconfig | 8 +++ drivers/pci/pcie/pwrseq/Makefile | 3 ++ drivers/pci/pcie/pwrseq/pwrseq.c | 83 ++++++++++++++++++++++++++++++++ include/linux/pcie-pwrseq.h | 24 +++++++++ 6 files changed, 122 insertions(+) create mode 100644 drivers/pci/pcie/pwrseq/Kconfig create mode 100644 drivers/pci/pcie/pwrseq/Makefile create mode 100644 drivers/pci/pcie/pwrseq/pwrseq.c create mode 100644 include/linux/pcie-pwrseq.h diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig index 8999fcebde6a..064843ab6866 100644 --- a/drivers/pci/pcie/Kconfig +++ b/drivers/pci/pcie/Kconfig @@ -155,3 +155,5 @@ config PCIE_EDR the PCI Firmware Specification r3.2. Enable this if you want to support hybrid DPC model which uses both firmware and OS to implement DPC. + +source "drivers/pci/pcie/pwrseq/Kconfig" diff --git a/drivers/pci/pcie/Makefile b/drivers/pci/pcie/Makefile index 8de4ed5f98f1..ace91384113d 100644 --- a/drivers/pci/pcie/Makefile +++ b/drivers/pci/pcie/Makefile @@ -13,3 +13,5 @@ obj-$(CONFIG_PCIE_PME) += pme.o obj-$(CONFIG_PCIE_DPC) += dpc.o obj-$(CONFIG_PCIE_PTM) += ptm.o obj-$(CONFIG_PCIE_EDR) += edr.o + +obj-$(CONFIG_PCIEPORTBUS) += pwrseq/ diff --git a/drivers/pci/pcie/pwrseq/Kconfig b/drivers/pci/pcie/pwrseq/Kconfig new file mode 100644 index 000000000000..010e31f432c9 --- /dev/null +++ b/drivers/pci/pcie/pwrseq/Kconfig @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0 + +menuconfig PCIE_PWRSEQ + bool "PCIe Power Sequencing support" + depends on PCIEPORTBUS + help + Say yes here to enable support for PCIe power sequencing + drivers. diff --git a/drivers/pci/pcie/pwrseq/Makefile b/drivers/pci/pcie/pwrseq/Makefile new file mode 100644 index 000000000000..da99566594f6 --- /dev/null +++ b/drivers/pci/pcie/pwrseq/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_PCIE_PWRSEQ) += pwrseq.o diff --git a/drivers/pci/pcie/pwrseq/pwrseq.c b/drivers/pci/pcie/pwrseq/pwrseq.c new file mode 100644 index 000000000000..c4f7958074c9 --- /dev/null +++ b/drivers/pci/pcie/pwrseq/pwrseq.c @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2024 Linaro Ltd. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +static int pcie_pwrseq_notify(struct notifier_block *nb, unsigned long action, + void *data) +{ + struct pcie_pwrseq *pwrseq = container_of(nb, struct pcie_pwrseq, nb); + struct device *dev = data; + + if (dev_fwnode(dev) != dev_fwnode(pwrseq->dev)) + return NOTIFY_DONE; + + switch (action) { + case BUS_NOTIFY_ADD_DEVICE: + device_set_of_node_from_dev(dev, pwrseq->dev); + break; + case BUS_NOTIFY_BOUND_DRIVER: + pwrseq->link = device_link_add(dev, pwrseq->dev, + DL_FLAG_AUTOREMOVE_CONSUMER); + if (!pwrseq->link) + dev_err(pwrseq->dev, "Failed to add device link\n"); + break; + case BUS_NOTIFY_UNBOUND_DRIVER: + device_link_del(pwrseq->link); + break; + } + + return NOTIFY_DONE; +} + +int pcie_pwrseq_device_enable(struct pcie_pwrseq *pwrseq) +{ + if (!pwrseq->dev) + return -ENODEV; + + pwrseq->nb.notifier_call = pcie_pwrseq_notify; + bus_register_notifier(&pci_bus_type, &pwrseq->nb); + + pci_lock_rescan_remove(); + pci_rescan_bus(to_pci_dev(pwrseq->dev->parent)->bus); + pci_unlock_rescan_remove(); + + return 0; +} +EXPORT_SYMBOL_GPL(pcie_pwrseq_device_enable); + +void pcie_pwrseq_device_disable(struct pcie_pwrseq *pwrseq) +{ + bus_unregister_notifier(&pci_bus_type, &pwrseq->nb); +} +EXPORT_SYMBOL_GPL(pcie_pwrseq_device_disable); + +static void devm_pcie_pwrseq_device_disable(void *data) +{ + struct pcie_pwrseq *pwrseq = data; + + pcie_pwrseq_device_disable(pwrseq); +} + +int devm_pcie_pwrseq_device_enable(struct device *dev, + struct pcie_pwrseq *pwrseq) +{ + int ret; + + ret = pcie_pwrseq_device_enable(pwrseq); + if (ret) + return ret; + + return devm_add_action_or_reset(dev, devm_pcie_pwrseq_device_disable, + pwrseq); +} +EXPORT_SYMBOL_GPL(devm_pcie_pwrseq_device_enable); diff --git a/include/linux/pcie-pwrseq.h b/include/linux/pcie-pwrseq.h new file mode 100644 index 000000000000..6abb5796754e --- /dev/null +++ b/include/linux/pcie-pwrseq.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2024 Linaro Ltd. + */ + +#ifndef __PCIE_PWRSEQ_H__ +#define __PCIE_PWRSEQ_H__ + +#include + +struct device; + +struct pcie_pwrseq { + struct notifier_block nb; + struct device *dev; + struct device_link *link; +}; + +int pcie_pwrseq_device_enable(struct pcie_pwrseq *pwrseq); +void pcie_pwrseq_device_disable(struct pcie_pwrseq *pwrseq); +int devm_pcie_pwrseq_device_enable(struct device *dev, + struct pcie_pwrseq *pwrseq); + +#endif /* __PCIE_PWRSEQ_H__ */ From patchwork Thu Jan 4 13:01:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511079 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 34B01C47079 for ; Thu, 4 Jan 2024 13:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ULVG+ZiC+NSEYRWRipVUWjbt2lZli9r+GEFcSiSPW/k=; b=WpF3Mxvc3fVDa7 fk9Hqbj6JEZAHel6AI6I+x+L0Gw1CXLNivpuaF6A4iLQuU3jugueWANJv4+FItOASvfNThIBr41RO D/1FdvpkKLbUa51zgjikmsPt99WKpmHnIQ15vcYv7Hwl8iRJl4kULpfuGea8hAyXZQ4cIr9eWb3A+ 3ORStNDRwD4PJZsWpdWta+Wyh2HcW6RiErSSwCpGuwkNltRTSa+DfAcO8YN0jAUIh4GKevtWzCqF5 82/YTWtgFE8k/9AVDbyJQcUl8/KNis1D3MOU3/ifN5QkewDeJus0rZi78fTNfs5pBlDJgp8Wi7elI SWIkiW2MOnzhj4S0grbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMa-00E2zt-1d; Thu, 04 Jan 2024 13:02:20 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMV-00E2tN-1C for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:17 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2ccbded5aa4so5631721fa.1 for ; Thu, 04 Jan 2024 05:02:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373332; x=1704978132; 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=DA5aHFJ46r457gaZ61RwpP8TkLsec2lgKs71JTHrGEQ=; b=wulr9JgMziyekrN74arbFJDRQzXLyKIozpo/LDf8dQxdHiPmjTUiA4S4AvhhJXenjJ 90dbPCEDKZXviyokzWcOQvLGtDQEtLCWLFHNv4rVe5B3C13Qja4hQRbiJEzHaRmk4QJE n0FQ11BSuMoZewW+oPNzBxH1wZMzbqe6Yd4gAHQYMQtymFbgD3kzj8xZSsWSXbS7fcY7 OjchmhbP7j/Ei9r7Aa7wu7RfmRARuG4HE2J20KdzUux4hMCVxJxhpZb1KoEjcxROY8tn 86WeOVpqFszcgn2QCrfcDUCAOo1p6aYLsBIAUWfAjfIP7hKzgRUEfp072c4AroEeybzZ hsVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373332; x=1704978132; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DA5aHFJ46r457gaZ61RwpP8TkLsec2lgKs71JTHrGEQ=; b=QpP0fSUqnlYx6KlQZd5y5LVGeoSTMBdUcY7lf2TncOLHt+yr94b+UIj26dLy8QGE1f zOr5ey1NaqbWT6g9hkM2Rg0ysnXuxmp3T6FtgSkcTs/n81OVt6u23/mZ0+p+iIfIt1j4 VaHTPwRFlY+HzUEvTPv21P0g7ca1GZl4ebl3Q9aMvnUd/HzTA4R1vD2ZdOcor27VOg4M 33NtRyJ7eHf1tb1RTQuCy6uHbjtstb25LbI2NVHgN+4j2wcAUv3q9x7FZnBqC5hnuh1Y vSu2cHZxJwLe4fMIA6iZImcDLTuB/uKA8ti0kISdfGv+v0oXH4OPUWItH4W98ruudgud yk5w== X-Gm-Message-State: AOJu0YzD8qdczGv/qyjtBrvRM54zKwnAV+wxj+4dWk7+epMclYmm0UWm PsBCqUbBxjzhubs2hsbW+II4ueRzdTMBUw== X-Google-Smtp-Source: AGHT+IEDdRsPhWrWa3EOX7GzwSp1+D8RAfZyh7Y4UQZnWMuUFL0QHtHvjG9EaWqRMVvXI0CWBZWV0Q== X-Received: by 2002:a2e:7d07:0:b0:2cc:d574:6057 with SMTP id y7-20020a2e7d07000000b002ccd5746057mr314367ljc.73.1704373331828; Thu, 04 Jan 2024 05:02:11 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:11 -0800 (PST) From: Bartosz Golaszewski To: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: [RFC 6/9] dt-bindings: vendor-prefixes: add a PCI prefix for Qualcomm Atheros Date: Thu, 4 Jan 2024 14:01:20 +0100 Message-Id: <20240104130123.37115-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050215_411984_2F2A584D X-CRM114-Status: GOOD ( 11.30 ) 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 From: Bartosz Golaszewski Document the PCI vendor prefix for Qualcomm Atheros so that we can define the QCA PCI devices on device tree. Signed-off-by: Bartosz Golaszewski --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 2dc098b39234..297d6037cd12 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1128,6 +1128,7 @@ patternProperties: "^purism,.*": description: Purism, SPC "^qca,.*": + "^pci17cb,.*": description: Qualcomm Atheros, Inc. "^qcom,.*": description: Qualcomm Technologies, Inc From patchwork Thu Jan 4 13:01:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511075 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 F1109C47074 for ; Thu, 4 Jan 2024 13:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LFJe9uTn2zsBK+HYb7HW1mQrYvCWrkJ3chxD/WlphA8=; b=Mn+mhUtodVQt79 7wRi0b3EiW0VTV2f9E0mrtyuIGTePoCV2uBFT8oqDEtXcDrnGyuaUUMCzXFKTm2OVanYcLZC4j+m0 8/VU7X+oIx4NetOw4kpJjfHQ0m0RNgg2rKMyg8MRQg/vCy8Q2fzZBGjVW6oZkrXUESFdd8fCYCy6F Cc/0zEaHCK8870Q5PcM/SdumXMdMIpCC6kXFL3vG7j1+FiRCXGhOQPvqaRLS8NwGb2kCm7rH7aYBF oD1RZk7zSy0VtNXLbGvM0EV/MfPuUMZwh+fMIEpqAwc2s/Ay/xmmmKPU8FYjt4erSY5NPQNk8XuW9 7u7LULwalCP5LTebU/DA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMY-00E2yV-2L; Thu, 04 Jan 2024 13:02:18 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMU-00E2u2-28 for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:16 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-33677fb38a3so442064f8f.0 for ; Thu, 04 Jan 2024 05:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373333; x=1704978133; 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=tjubhM9aoU69uzCwJp4rB5H4DPxtKhGSNuyfkMH8Lnk=; b=QgAzda4XEozs5hs2Mo/GClOwnFDHFmfegZazWXaxPubR6pgXooJk1ywvQYh8/bjtnY AvHjeqtGpQG8VvKr+DC2dRcz+Qkmeh9GRaMzFJWejcaw8rhKh2BJDs2L2gbB99fd8/H7 jx1rxcL3HiprPx2aHv4mMlOtZClfak/FNtqCU3dFJ/mX3+BkeKrvRQi3/nfTEasisCCn aN5o3u3a7WkYXMLbQCe0fT+CnHkswNoiCvEtN/Q3N7sq0VsJwXJvDkuizf68a1iOwA+8 qffm0ikSlL5w3l2HYqXTJDI+zWDSIO3tsdNUC7HS4pbgy9eRKMExdJb1jBYu5Og67C5/ NQYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373333; x=1704978133; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tjubhM9aoU69uzCwJp4rB5H4DPxtKhGSNuyfkMH8Lnk=; b=Q93BvJVdYSeYa+Y3MASm15lUt/QrNJ/SmMmHfPI2Xn+oWj32/IXmuooly75zXjwwuL AudbZkcGL5e++UIFoCCpsfe5S4u1MBQn0s4tmh851yCr1vuMyiNUm7kZG+qRhOTfhGEH u1HNc6Tb2hI3iGhJcRCAW4AVkMR2d9vH0pTMRUqEoHfzsE0bY/UB75PVnHxh6EmzF0Fi gBYIJVFMRFA/Kd079zW8IyTw61D3LO+vNo8aJhFczkqzYC6TeK4T8bLrJMnWKQMMDs91 HUQ3A/rFaVDlGU5icUeXoNlG2wbzbUc3EPhe6lV2rfgEk0gqigezvQR26qmxN3xrk9NB BCuA== X-Gm-Message-State: AOJu0Yzu8RhX4iZvJLiXdtdX5dYTtYRw+0/zNvNevWdhJskdUdP64yCP XDc2GDyMHtHTin6/HAia/Wo8BYz2RcK5tg== X-Google-Smtp-Source: AGHT+IFaPrn2+5L/iSvaHGDXgCK1xkrpwFHBcvyt0keh9Su0XYw0Bar2ua6Y0uTWwzoul73MoCE/cw== X-Received: by 2002:a5d:530b:0:b0:333:2e15:632c with SMTP id e11-20020a5d530b000000b003332e15632cmr447162wrv.10.1704373333369; Thu, 04 Jan 2024 05:02:13 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:13 -0800 (PST) From: Bartosz Golaszewski To: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: [RFC 7/9] dt-bindings: wireless: ath11k: describe QCA6390 Date: Thu, 4 Jan 2024 14:01:21 +0100 Message-Id: <20240104130123.37115-8-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050214_712083_6CA98763 X-CRM114-Status: GOOD ( 10.65 ) 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 From: Bartosz Golaszewski Describe the ath11k variant present on the QCA6390 module. Signed-off-by: Bartosz Golaszewski --- .../bindings/net/wireless/qcom,ath11k-pci.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml index 817f02a8b481..f584c25f4276 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml @@ -16,6 +16,7 @@ description: | properties: compatible: enum: + - pci17cb,1101 # QCA6390 - pci17cb,1103 # WCN6855 reg: @@ -27,6 +28,19 @@ properties: string to uniquely identify variant of the calibration data for designs with colliding bus and device ids + enable-gpios: + description: GPIO line enabling the ATH11K module when asserted. + maxItems: 1 + + vddpmu-supply: + description: VDD_PMU supply regulator handle + + vddpcie1-supply: + description: VDD_PCIE1 supply regulator handle + + vddpcie2-supply: + description: VDD_PCIE2 supply regulator handle + required: - compatible - reg From patchwork Thu Jan 4 13:01:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511080 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 6251AC47074 for ; Thu, 4 Jan 2024 13:02:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7NIeXyBEGcJ4gan7rhPtRomfCs9CUmNnaknGgemx9SA=; b=GmbAx28EEVSihP t8gA4ndjUPHJ5M4msk2QstmXAFhAumqddevVrEBDpdUKwqzWd4EA3zKLyG+rzITQEnGJSegoVxUjH dhoWsKEC8QOP+reA2RoUz3m/Eeh99BsrTS7jHkSVvCP5A+HKMO/B49L2lqV+eSuDGCXG10S6HNHc7 bqmpdk8um7x/Po05YRREZwZjOtKJTZgbFk0AC2vO+F1DzmqnnkSty+K0HRB671MgDJdkboeNCYXYo JolE6oaxranrQ44lAuNG+8MNYUrnKedzgYOqLgrXbgW1SXWwzIzyHVzqEWacmvxJLkmkXpyMm4vSB Nv1ltY09z4E14e5hRe0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMb-00E30g-0Y; Thu, 04 Jan 2024 13:02:21 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMW-00E2vR-1J for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:18 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40d60ad5f0bso5154525e9.0 for ; Thu, 04 Jan 2024 05:02:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373335; x=1704978135; 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=3E4Vbkb/LrKV7uJsCtqtIqNAbn7WFp6GN2T7jU5w+KA=; b=rw2UfftfONNwdQia4U4jTcb2F9uKvSrSkHiyblVlSE7usdPD5a5PecUVh7iu/i9Cgo IMk2oRBj5lxXVrwJOCSeEF0mieAgj2PXg6uSfwEEN0kHjsjwcDD3ndiwEh/bt3F36j+f UG3qmY4+K6PRpLFp6hF9Gkf3LeQfov7/0pCix6v8AtVhnNist8YF57rIcDtON2skCg6O YdpWlEkfsP362hm6seZx+zJrXhGZe4ZIHkfHcP63QfPPm47j9Ieh67MFhh/guIT+3qbl 8ZCcve+XkNukyfj0v2KMVmd+oNzbZlYylEL1tBbdeJ6YwSUpp7F5gJtAgMvMJo+t3j/1 rBKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373335; x=1704978135; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3E4Vbkb/LrKV7uJsCtqtIqNAbn7WFp6GN2T7jU5w+KA=; b=dAOE3tKRklpLFtwIMOn2fakXfcTeCb4Y0PLtBcqlZs3Y/Se4qx9r5ycm93P/PTvWrv FNPDKspm6XKINxRN3oE1/X9MErcKlNngn7J722xezLNGLmBYDqovvgVkMpk7NFHVtHO0 vcl9GTdH7aTiq/4faSiHJr7eBwhXw3ZXexQG+rG+aiseRNQSHb8iuZc4BvNd6oPZmPEe yd/X5wS9Jd0J7+g9eHgEQ+Ny5HKnoDEVdr80brr9ypb7jVbLfvvU9FcaSwcAIe1AeaEP DG6Nhm0WcM0ONCskBrjRVo++vgjEQhSmB6qryjpcTpmSuW6ZG2fi7tRQhtD32L5Lhheh QNbQ== X-Gm-Message-State: AOJu0YyRjYj20I3Uquhzl7PA4E7Rm6BmVl2l5re/u5tiHfurE2m5ggAJ i/kcNPfAeMyuHRcCAlfjVEPAbUwo0JGJzw== X-Google-Smtp-Source: AGHT+IHHXVpRs7QMqS9kg1ok0JTc8TTEP2DuD/O7GN8bhaZdGEhV9MHAS2mTz+G8GWP6ubM9PTmRyw== X-Received: by 2002:a05:600c:300b:b0:40d:f9c8:887f with SMTP id j11-20020a05600c300b00b0040df9c8887fmr331173wmh.51.1704373334899; Thu, 04 Jan 2024 05:02:14 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:14 -0800 (PST) From: Bartosz Golaszewski To: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: [RFC 8/9] PCI/pwrseq: add a pwrseq driver for QCA6390 Date: Thu, 4 Jan 2024 14:01:22 +0100 Message-Id: <20240104130123.37115-9-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050216_462284_7082D773 X-CRM114-Status: GOOD ( 27.37 ) 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 From: Bartosz Golaszewski Add a PCIe power sequencing driver that's capable of correctly powering up the ath11k module on QCA6390 using the PCIe pwrseq functionality. Signed-off-by: Bartosz Golaszewski --- drivers/pci/pcie/pwrseq/Kconfig | 11 + drivers/pci/pcie/pwrseq/Makefile | 1 + drivers/pci/pcie/pwrseq/pcie-pwrseq-qca6390.c | 197 ++++++++++++++++++ 3 files changed, 209 insertions(+) create mode 100644 drivers/pci/pcie/pwrseq/pcie-pwrseq-qca6390.c diff --git a/drivers/pci/pcie/pwrseq/Kconfig b/drivers/pci/pcie/pwrseq/Kconfig index 010e31f432c9..f9fe555b8506 100644 --- a/drivers/pci/pcie/pwrseq/Kconfig +++ b/drivers/pci/pcie/pwrseq/Kconfig @@ -6,3 +6,14 @@ menuconfig PCIE_PWRSEQ help Say yes here to enable support for PCIe power sequencing drivers. + +if PCIE_PWRSEQ + +config PCIE_PWRSEQ_QCA6390 + tristate "PCIe Power Sequencing driver for QCA6390" + depends on ARCH_QCOM || COMPILE_TEST + help + Enable support for the PCIe power sequencing driver for the + ath11k module of the QCA6390 WLAN/BT chip. + +endif diff --git a/drivers/pci/pcie/pwrseq/Makefile b/drivers/pci/pcie/pwrseq/Makefile index da99566594f6..da3e02063404 100644 --- a/drivers/pci/pcie/pwrseq/Makefile +++ b/drivers/pci/pcie/pwrseq/Makefile @@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_PCIE_PWRSEQ) += pwrseq.o +obj-$(CONFIG_PCIE_PWRSEQ_QCA6390) += pcie-pwrseq-qca6390.o diff --git a/drivers/pci/pcie/pwrseq/pcie-pwrseq-qca6390.c b/drivers/pci/pcie/pwrseq/pcie-pwrseq-qca6390.c new file mode 100644 index 000000000000..e9fddbb642fe --- /dev/null +++ b/drivers/pci/pcie/pwrseq/pcie-pwrseq-qca6390.c @@ -0,0 +1,197 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2023 Linaro Ltd. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct pcie_pwrseq_qca6390_vreg { + const char *name; + unsigned int load_uA; +}; + +struct pcie_pwrseq_qca6390_pdata { + struct pcie_pwrseq_qca6390_vreg *vregs; + size_t num_vregs; + unsigned int delay_msec; +}; + +struct pcie_pwrseq_qca6390_ctx { + struct pcie_pwrseq pwrseq; + const struct pcie_pwrseq_qca6390_pdata *pdata; + struct regulator_bulk_data *regs; + struct gpio_descs *en_gpios; + unsigned long *en_gpios_values; +}; + +static struct pcie_pwrseq_qca6390_vreg pcie_pwrseq_qca6390_vregs[] = { + { + .name = "vddpmu", + .load_uA = 1250000, + }, + { + .name = "vddpcie1", + .load_uA = 35000, + }, + { + .name = "vddpcie2", + .load_uA = 15000, + }, +}; + +static struct pcie_pwrseq_qca6390_pdata pcie_pwrseq_qca6390_of_data = { + .vregs = pcie_pwrseq_qca6390_vregs, + .num_vregs = ARRAY_SIZE(pcie_pwrseq_qca6390_vregs), + .delay_msec = 16, +}; + +static int pcie_pwrseq_qca6390_power_on(struct pcie_pwrseq_qca6390_ctx *ctx) +{ + int ret; + + ret = regulator_bulk_enable(ctx->pdata->num_vregs, ctx->regs); + if (ret) + return ret; + + bitmap_fill(ctx->en_gpios_values, ctx->en_gpios->ndescs); + + ret = gpiod_set_array_value_cansleep(ctx->en_gpios->ndescs, + ctx->en_gpios->desc, + ctx->en_gpios->info, + ctx->en_gpios_values); + if (ret) { + regulator_bulk_disable(ctx->pdata->num_vregs, ctx->regs); + return ret; + } + + if (ctx->pdata->delay_msec) + msleep(ctx->pdata->delay_msec); + + return 0; +} + +static int pcie_pwrseq_qca6390_power_off(struct pcie_pwrseq_qca6390_ctx *ctx) +{ + int ret; + + bitmap_zero(ctx->en_gpios_values, ctx->en_gpios->ndescs); + + ret = gpiod_set_array_value_cansleep(ctx->en_gpios->ndescs, + ctx->en_gpios->desc, + ctx->en_gpios->info, + ctx->en_gpios_values); + if (ret) + return ret; + + return regulator_bulk_disable(ctx->pdata->num_vregs, ctx->regs); +} + +static void devm_pcie_pwrseq_qca6390_power_off(void *data) +{ + struct pcie_pwrseq_qca6390_ctx *ctx = data; + + pcie_pwrseq_qca6390_power_off(ctx); +} + +static int pcie_pwrseq_qca6309_probe(struct platform_device *pdev) +{ + struct pcie_pwrseq_qca6390_ctx *ctx; + struct device *dev = &pdev->dev; + int ret, i; + + ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); + if (!ctx) + return -ENOMEM; + + ctx->pdata = of_device_get_match_data(dev); + if (!ctx->pdata) + return dev_err_probe(dev, -ENODEV, + "Failed to obtain platform data\n"); + + if (ctx->pdata->vregs) { + ctx->regs = devm_kcalloc(dev, ctx->pdata->num_vregs, + sizeof(*ctx->regs), GFP_KERNEL); + if (!ctx->regs) + return -ENOMEM; + + for (i = 0; i < ctx->pdata->num_vregs; i++) + ctx->regs[i].supply = ctx->pdata->vregs[i].name; + + ret = devm_regulator_bulk_get(dev, ctx->pdata->num_vregs, + ctx->regs); + if (ret < 0) + return dev_err_probe(dev, ret, + "Failed to get all regulators\n"); + + for (i = 0; i < ctx->pdata->num_vregs; i++) { + ret = regulator_set_load(ctx->regs[i].consumer, + ctx->pdata->vregs[i].load_uA); + if (ret) + return dev_err_probe(dev, ret, + "Failed to set vreg load\n"); + } + } + + ctx->en_gpios = devm_gpiod_get_array_optional(dev, "enable", + GPIOD_OUT_LOW); + if (IS_ERR(ctx->en_gpios)) + return dev_err_probe(dev, PTR_ERR(ctx->en_gpios), + "Failed to get enable GPIOs\n"); + + ctx->en_gpios_values = devm_bitmap_zalloc(dev, ctx->en_gpios->ndescs, + GFP_KERNEL); + if (!ctx->en_gpios_values) + return -ENOMEM; + + ret = pcie_pwrseq_qca6390_power_on(ctx); + if (ret) + return dev_err_probe(dev, ret, + "Failed to power on the device\n"); + + ret = devm_add_action_or_reset(dev, devm_pcie_pwrseq_qca6390_power_off, + ctx); + if (ret) + return ret; + + ctx->pwrseq.dev = dev; + + ret = devm_pcie_pwrseq_device_enable(dev, &ctx->pwrseq); + if (ret) + return dev_err_probe(dev, ret, + "Failed to register the pwrseq wrapper\n"); + + return 0; +} + +static const struct of_device_id pcie_pwrseq_qca6309_of_match[] = { + { + .compatible = "pci17cb,1101", + .data = &pcie_pwrseq_qca6390_of_data, + }, + { } +}; +MODULE_DEVICE_TABLE(of, pcie_pwrseq_qca6309_of_match); + +static struct platform_driver pcie_pwrseq_qca6309_driver = { + .driver = { + .name = "pcie-pwrseq-qca6390", + .of_match_table = pcie_pwrseq_qca6309_of_match, + }, + .probe = pcie_pwrseq_qca6309_probe, +}; +module_platform_driver(pcie_pwrseq_qca6309_driver); + +MODULE_AUTHOR("Bartosz Golaszewski "); +MODULE_DESCRIPTION("PCIe Power Sequencing module for QCA6390"); +MODULE_LICENSE("GPL"); From patchwork Thu Jan 4 13:01:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13511081 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 3708DC47079 for ; Thu, 4 Jan 2024 13:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GDEQJpVq1yEz0P5nRhJIz1S8dI7grqwfQ1DGhBfmG24=; b=XF+/m+dW4qylpi 8NCqPSTkYez6mcH8rd3AaJFmDOqC4vFD3DNp6AlgPv5nFYQyw4KLmN83V9ufKE/TVyJLChghGbuqq FsLZ63k8kyLA/dV0rKuAkkVrK9KidMPWhzDsGZb4LwJxy+4zbLdHIl9wHHKjRcpLy4tetpYamgDgq rimnXz8d6yYafVrUZLcHTBh7czXCZJgOoHisz4z+t0wZkbFEt5iU2npyAEfRnT6jrCXEJgAtwfLeA zZPjACcmsbLgrVWWsQNHVfK++46zMTKRGA6jCYNwnjOPTpneyheqUesOTf2ImXTdE8ZQCZ86RIKFb LCCWm7ZF9DmjUenQaztg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMb-00E31H-2g; Thu, 04 Jan 2024 13:02:21 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLNMX-00E2x0-2K for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 13:02:18 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3367601a301so381278f8f.2 for ; Thu, 04 Jan 2024 05:02:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1704373336; x=1704978136; 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=3qJnh8AIcAKZQaw54XikqgZNFVCwv53vFvEp1sREEes=; b=bDFcPUpcXH1njX0+d/D4FtAavgd3krPfKHeZCrK3hf2fxKo/ysTbdkasGk5EUnfsVh rElxYKR3OG6E1WfYhGqN8kKbGnS9gB7s7pMKWlb+TN3i3l+JD3GQRoZHxF19mQvY8cf1 arSHylOV0r2bKPZPW6JDGVaEy/nM4Zv180z4wWGsJ4pDq9oiVwRBUuiEpw36jk9ApDgF YE3WFYOXK5wghKZRNgBUpPTvyyLZtCH03K8gxK+KwkT2qo+W4hAktCS7vXPiuzxBsBEB zX7AZCwMBobEobueJJEjSb1Ae1O2ytw2VXBxZTIo26jlZYWtn1Rp7jmFTWBmgaj4VjM4 /dGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704373336; x=1704978136; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3qJnh8AIcAKZQaw54XikqgZNFVCwv53vFvEp1sREEes=; b=mRTG8nlHkFi137HjaMUj+gTrkeoSSif/aTa2nXsWpYDJc+OSZXRE14ouYzkl+xKtKU 20ngOBGnTwcX2pk0Dihv4iE3hV6Hk/vJqqGREyVSSmJHoZsVo9oJDr61Pebj5vVAMqyn ss2lWev1klTWGXOJ5zFO9L1EvCmA73KrBmrKYPy+sj4s2x5HwCfXDzQPHnUk9dD5f+p1 SaObZVvQv9VBIgeF+PbNkBp/15Rs20vEfX0ef78izZPeTLT+GTNEXBZKlYfcN4Ke9kBR 1bREZK9QJzfTJ3TQPDNj1mDgkZp6/q1hUjYRsw+hKSI2ESqtck2IQCV/+ySpIkjWEcML +W4A== X-Gm-Message-State: AOJu0YwCZXmZn2S4jqs9NDrQWbgedV2YdYi5wrhgWYbUUWVWaBLKfWpM N37CGH5uCOzHJTcrC5+Y+4Seh1OBML4LaA== X-Google-Smtp-Source: AGHT+IEqja+u1Zepunc8yCe1PWCPYTJaRhSPQH3gTIMidcrQA/WboeRZVVunuvMn3vOkG/I8lK1Owg== X-Received: by 2002:adf:f6d1:0:b0:336:74aa:d78b with SMTP id y17-20020adff6d1000000b0033674aad78bmr238945wrp.145.1704373336434; Thu, 04 Jan 2024 05:02:16 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:5b69:3768:8459:8fee]) by smtp.gmail.com with ESMTPSA id w5-20020a5d5445000000b0033660f75d08sm32887387wrv.116.2024.01.04.05.02.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 05:02:16 -0800 (PST) From: Bartosz Golaszewski To: Kalle Valo , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Bjorn Helgaas , Heiko Stuebner , Jernej Skrabec , Chris Morgan , Linus Walleij , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , =?utf-8?q?N=C3=ADcolas_F_=2E_R_?= =?utf-8?q?=2E_A_=2E_Prado?= , Marek Szyprowski , Peng Fan , Robert Richter , Dan Williams , Jonathan Cameron , Terry Bowman , Kuppuswamy Sathyanarayanan , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Huacai Chen , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Bartosz Golaszewski Subject: [RFC 9/9] arm64: defconfig: enable the PCIe power sequencing for QCA6390 Date: Thu, 4 Jan 2024 14:01:23 +0100 Message-Id: <20240104130123.37115-10-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240104130123.37115-1-brgl@bgdev.pl> References: <20240104130123.37115-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_050217_763776_49450820 X-CRM114-Status: GOOD ( 11.32 ) 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 From: Bartosz Golaszewski Build the QCA6390 PCIe power sequencing module by default. Signed-off-by: Bartosz Golaszewski --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 361c31b5d064..7daa863f25e5 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -210,6 +210,8 @@ CONFIG_NFC_S3FWRN5_I2C=m CONFIG_PCI=y CONFIG_PCIEPORTBUS=y CONFIG_PCIEAER=y +CONFIG_PCIE_PWRSEQ=y +CONFIG_PCIE_PWRSEQ_QCA6390=m CONFIG_PCI_IOV=y CONFIG_PCI_PASID=y CONFIG_HOTPLUG_PCI=y