From patchwork Tue Apr 12 09:49:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 12810263 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 C9A6EC433EF for ; Tue, 12 Apr 2022 09:53:01 +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=rLgjqlAhBzp1noWRS5Pd+xCx8d7qqb04DoSqcQt5Mic=; b=MY6JdIA0+c5aYd TPsFAy3lBrnDgEgCSWtoL/eMB3L6leC9CK1/EkM/GVp33zYPS1WqdKH1VOoVtLzafHx8DFRcgY/jv Ftb4k6PGvVvwnu7rASvMitFnQpoKWGcxY3CU1VPO8KXz2wRi/+B0sR1YP0S/ZcIp4613KFnePSo8g rEVnxQ1GCidEbpGzjnjD32uKN+3GX6a+BdN/l0XlZ6UoMLnGk6Rkx/j9jCPYaSO3QUeMOyKCCHqxO 6nOU1kE+w/BXVuq1G+e0WahYtL/kK8yw1d5rxM9Lt3MH13IhDMeHhMyT5lCYFm+9Z1xY7hNpT+BCn otvG5pL+4xtRT5AcxACQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neDBU-00D3iJ-9c; Tue, 12 Apr 2022 09:51:40 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1neDAN-00D3CT-Vf for linux-arm-kernel@lists.infradead.org; Tue, 12 Apr 2022 09:50:33 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8C2F361881; Tue, 12 Apr 2022 09:50:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A89F2C385AC; Tue, 12 Apr 2022 09:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649757030; bh=dtnf8XsUhj4Osmhrrm08Dt6iD1UNUzpBusiWKcRHhvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sgjz/h69Zzm0IbBc4hN20acNhDIQ01/cZcuXUONWZL+DHD66VXgkoGOSRTymU+XcH 2LefS2l+jCeD1nkXXaRa0DokpNc4BbTeXW3IaBGNha8QG2wXmEqmxSPViXeRdZsHGp +0DnZ28COqc9mV7B3x2/A3utLWokfnxZoMTxQK7Lgffo72ukL4tZrxg8llezKL6snR B9uf9RVd93AptBUT2LGOeJwDPAOB3IGtOFUP1CKNSg0FxqAGgJ+rf6aOTbF/MfPI0e ME3AWRJPJp5V0Fr311sN24BT7hBUrPDtzZWpn2dMosyauzKGjWj/mTeFkL7TIvbsn8 rj15zmdxoHo5w== Received: by pali.im (Postfix) id 4A1632AB3; Tue, 12 Apr 2022 11:50:28 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Lorenzo Pieralisi , Bjorn Helgaas , Rob Herring , Andrew Lunn , Thomas Petazzoni , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , =?utf-8?q?Marek_Beh=C3=BAn?= , Russell King Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/4] dt-bindings: Add 'slot-power-limit-milliwatt' PCIe port property Date: Tue, 12 Apr 2022 11:49:44 +0200 Message-Id: <20220412094946.27069-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220412094946.27069-1-pali@kernel.org> References: <20220412094946.27069-1-pali@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220412_025032_083999_A80D628F X-CRM114-Status: GOOD ( 14.90 ) 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 This property specifies slot power limit in mW unit. It is a form-factor and board specific value and must be initialized by hardware. Some PCIe controllers delegate this work to software to allow hardware flexibility and therefore this property basically specifies what should host bridge program into PCIe Slot Capabilities registers. The property needs to be specified in mW unit instead of the special format defined by Slot Capabilities (which encodes scaling factor or different unit). Host drivers should convert the value from mW to needed format. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- This change was already accepted into dt-schema repo by Rob Herring: https://github.com/devicetree-org/dt-schema/pull/66 --- Documentation/devicetree/bindings/pci/pci.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt index 6a8f2874a24d..b0cc133ed00d 100644 --- a/Documentation/devicetree/bindings/pci/pci.txt +++ b/Documentation/devicetree/bindings/pci/pci.txt @@ -32,6 +32,12 @@ driver implementation may support the following properties: root port to downstream device and host bridge drivers can do programming which depends on CLKREQ signal existence. For example, programming root port not to advertise ASPM L1 Sub-States support if there is no CLKREQ signal. +- slot-power-limit-milliwatt: + If present, this property specifies slot power limit in milliwatts. Host + drivers can parse this property and use it for programming Root Port or host + bridge, or for composing and sending PCIe Set_Slot_Power_Limit messages + through the Root Port or host bridge when transitioning PCIe link from a + non-DL_Up Status to a DL_Up Status. PCI-PCI Bridge properties -------------------------