From patchwork Mon Apr 11 18:58:57 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: 12809501 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 4E459C433EF for ; Mon, 11 Apr 2022 19: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=rLgjqlAhBzp1noWRS5Pd+xCx8d7qqb04DoSqcQt5Mic=; b=4dE+8/Xgqqn0ca Y0up7kbqRnYOegx0a/l+ORS8u0L2z79LwBlDSN0tbAIqkwQDkHjJa9r46yTac6baPCvuymQ7CYvIp ggzKrMWDrZRE9MoECrjhX0MqWnBCFPjD7GZUHAYgCfZ+bf7/RFNZIXQ+l0fy/c0tW4NJuch5BFlKB Mkrkz1sgJZQmqS44OsAufWHs4x/hRCnCmEmQEDzh+CDgXf81f6BPkjGSbBEZuYbGr425jegtFaTk1 Y16HBLDHqXQQqxLH0G8vRHDd2U+e8cgDzeqz4PLDGcRI52xUJBK9TEeIVDeXmBJqsbZgJlsbjt1CP WfzUG47Ya6TO8FisvFcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndzIN-00AGcd-NP; Mon, 11 Apr 2022 19:01:51 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndzHy-00AGQE-5T for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 19:01:27 +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 ams.source.kernel.org (Postfix) with ESMTPS id 8FD23B81873; Mon, 11 Apr 2022 19:01:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13989C385A6; Mon, 11 Apr 2022 19:01:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649703680; bh=dtnf8XsUhj4Osmhrrm08Dt6iD1UNUzpBusiWKcRHhvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OTS3qLMsLBOoQuuPqyrf6snrwRJnEgz8uyxhJR4Wr2GOnuwBxWtBBPS41FORx5re0 ZvJdmXOicezA/vU3/yeDemD6P6DJ8YYV57AFIakKks/xFaTGaXORXClSF1G79iGNMs Y8/JfjPT9rCKd+4z2gmonEziI1ggQuIIFmZCc9Es8Z4UFT/6NEDOBQBQlx++oLl4GS 3Md3dcg7RH8Duu8eiuS3WOFsZWEQNTB1yt59rNb3MkqaX/vBg4jjGcQk0ek36Munhg qphvDYxAGIZzY7dUtgK7ouT70UBg0v6P25aOrdqSwQVW/Yi94lAmHIsRQi7tWaNM73 kVC2hLoWnR71w== Received: by pali.im (Postfix) id 69F23A83; Mon, 11 Apr 2022 21:01:17 +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 v4 2/4] dt-bindings: Add 'slot-power-limit-milliwatt' PCIe port property Date: Mon, 11 Apr 2022 20:58:57 +0200 Message-Id: <20220411185859.32722-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220411185859.32722-1-pali@kernel.org> References: <20220411185859.32722-1-pali@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_120126_383616_896F289A 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 -------------------------