Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2834839pxb; Tue, 24 Aug 2021 08:39:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyb5HpyAZaCXO2fpg3s0G9FWrkl8PD+q1xTo/Kbmy5gPdFwkP7fjBK1paiYIwyNMj753Hju X-Received: by 2002:a17:906:408c:: with SMTP id u12mr11265804ejj.413.1629819589722; Tue, 24 Aug 2021 08:39:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629819589; cv=none; d=google.com; s=arc-20160816; b=BoBNMvuma9oIoIZ58nyZkz0w4mC4xB07nG86sqyS0yDTvqa7fhV0CCDSGLYBVXoNDn UEY+36UnHf7KZ0jQ7n6hQECsOaT0n5qRpdhZK4E6UWK2RnYYYDcY6YNL1n7cWH0caP73 72eawj7hg4IPe6FLmbq0aXyzb4gEqw15eduXNhrPNVg2jkaUnDazJslYUZIEp7t1JZsD UxBHYixPaavV0y43NzfNLBwIyEkHCT3U1Ta9HWI1mvwQjo0MMlQoEdpy/+q6UNHh/SZM H1HjSwfOaW20D/xmBsJHZDjOgZ/XX66eoT4NANF6JuH1TkOiddWhO+cdxjHRnGbVDzYf AxmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jINYQ1mvHiE2zLCibJDthuXZKNa+sewnEyR+eVgyDUc=; b=Oxn1/QG1UgucSySli5R9I7rbYutzP+EwzFq7poSZRK7gmqQv976bgVjyp3uWfV2eh4 eccSQH5DpGLHVieaKp4/d+h456x9R3d6v9rnDzcEh9PYmRsoQ2DpxsF+ZZZrjAaFaroY 4jzMxVlBGWRUO8YbH1MuEBqqE7B2Z38+ozTuv8CxrQvU/8v4YVHT5A07CLmM49q08YtP Wr07rgaSuKqf/eUralDkl/ySuVPOPVUR7ffaaq4mcbR/N6ToDnp19t07EeliicHaKu/R QjkFxwxiULWZ1lpb+KCoXSowuviuaudg0LRg6EM5/0JAL29sJTO8+59VmQCNvEa7Vqjj gqDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yc22si150761ejb.327.2021.08.24.08.39.25; Tue, 24 Aug 2021 08:39:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238312AbhHXPgW (ORCPT + 99 others); Tue, 24 Aug 2021 11:36:22 -0400 Received: from mail-ot1-f54.google.com ([209.85.210.54]:39696 "EHLO mail-ot1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235683AbhHXPgV (ORCPT ); Tue, 24 Aug 2021 11:36:21 -0400 Received: by mail-ot1-f54.google.com with SMTP id m7-20020a9d4c87000000b0051875f56b95so47118976otf.6; Tue, 24 Aug 2021 08:35:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=jINYQ1mvHiE2zLCibJDthuXZKNa+sewnEyR+eVgyDUc=; b=gzTjIUzx6SbNm74FsVAs3TDLsgYjLmn9zecn8xWSg8FHXEgXrJ9+IUsoswBn4xBP/m fkd6W4a2GSTLxfSGaQvz8jiKTkrbHd60oGWvOZ5E7NedVAjGT//xKqnjD1Hela7WJn7k qoka7CRFkUiPy0kB/tbXo2zo0jQoQmnhrFUgL6aaBx2mu5jR+TFD6kvwiV21ettcexHB OD8PA4Ys7Qq6zcNj1zqRsdk6P2FaoumKhTmop0FjAJ6MCKAfYUibX6x02PY8u0k/d3TA tIKl6ZDhCObwb+H7SSZ8tQexlAPbgcVnobgJxTBM/ETUXzrLMlAkcz0V6JGmV1d3pmRL TYSA== X-Gm-Message-State: AOAM530HW3rFIlMMcdBSUsfuFPuYp9QYMHZtXvtVp1ZM1bgxQBdO2mhx 5MlpjeBfDcsZpb9nVoj6Kg== X-Received: by 2002:a05:6830:3482:: with SMTP id c2mr11429689otu.16.1629819336616; Tue, 24 Aug 2021 08:35:36 -0700 (PDT) Received: from robh.at.kernel.org (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.gmail.com with ESMTPSA id l16sm4589113ota.55.2021.08.24.08.35.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 08:35:35 -0700 (PDT) Received: (nullmailer pid 496698 invoked by uid 1000); Tue, 24 Aug 2021 15:35:34 -0000 Date: Tue, 24 Aug 2021 10:35:34 -0500 From: Rob Herring To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Lorenzo Pieralisi , Bjorn Helgaas , Marek =?iso-8859-1?Q?Beh=FAn?= , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/3] dt-bindings: Add 'slot-power-limit' PCIe port property Message-ID: References: <20210820160023.3243-1-pali@kernel.org> <20210820160023.3243-2-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210820160023.3243-2-pali@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 20, 2021 at 06:00:21PM +0200, Pali Roh?r wrote: > This property specifies slot power limit in mW unit. It is form-factor and > board specific value and must be initialized by hardware. > > Some PCIe controllers delegates this work to software to allow hardware > flexibility and therefore this property basically specifies what should > host bridge programs into PCIe Slot Capabilities registers. > > Property needs to be specified in mW unit, and not in special format > defined by Slot Capabilities (which encodes scaling factor or different > unit). Host drivers should convert value from mW unit to their format. > > Signed-off-by: Pali Roh?r > --- > Documentation/devicetree/bindings/pci/pci.txt | 6 ++++++ > 1 file changed, 6 insertions(+) This needs to be in dtschema schemas/pci/pci-bus.yaml instead. (pci.txt is still here because it needs to be relicensed to move all the descriptions to pci-bus.yaml.) > > diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt > index 6a8f2874a24d..e67d5db21514 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: > + If present this property specifies slot power limit in mW unit. Host drivers As mentioned, this should have a unit suffix. I'm not sure it is beneficial to share with SFP in this case though. > + can parse this slot power limit and use it for programming Root Port or host > + bridge, or for composing and sending PCIe Set_Slot_Power_Limit message > + through the Root Port or host bridge when transitioning PCIe link from a > + non-DL_Up Status to a DL_Up Status. I no nothing about how this mechanism works, but I think this belongs in the next section as for PCIe, a slot is always below a PCI-PCI bridge. If we have N slots, then there's N bridges and needs to be N slot-power-limit properties, right? (The same is probably true for all the properties here except linux,pci-domain.) There's no distinction between host and PCI bridges in pci-bus.yaml though. Rob