Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp466667rwi; Thu, 13 Oct 2022 00:08:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4AufATDizB7sLc3w3phgCNuVzYbbMtimwgSeKHlmgUbF0xSSCtl03+cLF6EKgpe/ZXOtEX X-Received: by 2002:a63:5d0b:0:b0:464:bb2b:9b0e with SMTP id r11-20020a635d0b000000b00464bb2b9b0emr9858669pgb.583.1665644912336; Thu, 13 Oct 2022 00:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665644912; cv=none; d=google.com; s=arc-20160816; b=agrExCJ8jTH4uBHMtnqPIyONNEp4iA5LzP4aC0FTZybQ6EG019LmRXsK9HKkVq4lo4 VMyYuDtWCthJ5Dj5rwZisPWHx6LnUmB5upyYla5pdugsg7ZbXu5EMDt7W7DSsoHj/dsS zN9zR3p+KOoFRoPONARO+wUX1f8ViHc/DGeAdJA8REFuLl+wKZBwtOy7f2u+UERTLea7 YHcQ7zkUZaBKngjUsW00LdUbsar+q0wvex9omsEqDOoKBjrHzWg5Am/QIAc1gC1FsgB8 ZuuCZxi4WYzjR9WmovO1Jzd6fq/JlX3b8FtliESEjblX8f16Wl2Vh4qlEj27yUsARidq wlAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Zf6K0w0MwGi6+CgAd+H4XVP5QSRyk5X8tLOscIzRNgY=; b=hjSuD4ryNz+bzjpjjaLlg9uc8v6bN52yV26XVgijJCAt0z5VZV6Q5Suy2X3b5sEwML emFMpZw1TdMsu4POaj+xUtbKV6miOHP1h0zo07u96URzXQhPlh9Wasvqb7IhrCjJ9N/u H1Sznjbrf6Xx2qBwW/JB6HFFOfyJyKIhocnbcg0fk+TED0+u/Y/hgEHjmnORaptZh29f rEKZqd8cXs5kQQZbeKI4t8Jad+O+iSWdtQaWVCZNeyK00zfgOwgM4+2ZT+Dt7gDDTYcw SpQKqPB25wSiKacVuAWMfU89JZeKtos8nruHMAIyBNsUiK6zhX5z5mk0hjrI6xXhPKFk WyjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibv-augsburg.de header.s=strato-dkim-0002 header.b=YdjxwH9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a170902f68900b0016d5d09a43dsi18433581plg.331.2022.10.13.00.08.19; Thu, 13 Oct 2022 00:08:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibv-augsburg.de header.s=strato-dkim-0002 header.b=YdjxwH9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229648AbiJMGjO (ORCPT + 99 others); Thu, 13 Oct 2022 02:39:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbiJMGjM (ORCPT ); Thu, 13 Oct 2022 02:39:12 -0400 X-Greylist: delayed 360 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 12 Oct 2022 23:39:11 PDT Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC28713B8C5; Wed, 12 Oct 2022 23:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1665642436; s=strato-dkim-0002; d=ibv-augsburg.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=Zf6K0w0MwGi6+CgAd+H4XVP5QSRyk5X8tLOscIzRNgY=; b=YdjxwH9ktRPpuiHNYwPIp5dw4BwRrrLNCPNbXlspgpYEx8a364IuqjNo6mwyxg6slw wiP0H48X9tbyLjnF9f/wP1zMEuHQcuS+SXTfhaTH1k/fAiWqCQbe5ekk2aGBRUWgxcko ZiBk1r+v3D8FzTRgoHxAW3+/I3crLzwozbfdmYCrDlD0I5ipJ7FfHgb4rOcKAbwcTGG9 HMhXdhVkSbZ7t4HgrO2ah69Ap1psV4HpQojUQkGe0qNwZ63/ZoHuEqXkn5wb2vYE+Q1I dhHoSLkVNut7oSTbJ3/VdqDEbGK0K9FyY65iKtPUKa/WBjFNUZeh52Z27rdEBmt0z175 ZW+w== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":KGMJfE6heLGk8b3w7Oa1fDtXwBjeDczIOHPRx8yNRKhFG/cxcP9dNdI9SxioDT8RvZMqtMfbyXFLOT+8odoEkA==" X-RZG-CLASS-ID: mo01 Received: from localhost.localdomain by smtp.strato.de (RZmta 48.2.0 DYNA|AUTH) with ESMTPSA id R6cb4ey9D6RGC0X (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 13 Oct 2022 08:27:16 +0200 (CEST) From: Dominic Rath To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, tjoseph@cadence.com Cc: bhelgaas@google.com, lpieralisi@kernel.org, nm@ti.com, vigneshr@ti.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Alexander Bahle , Dominic Rath Subject: [PATCH 1/3] dt-bindings: PCI: cdns: Add PHY latency properties Date: Thu, 13 Oct 2022 08:26:47 +0200 Message-Id: <20221013062649.303184-2-dominic.rath@ibv-augsburg.de> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20221013062649.303184-1-dominic.rath@ibv-augsburg.de> References: <20221013062649.303184-1-dominic.rath@ibv-augsburg.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Bahle Add "cdns,tx-phy-latency-ps" and "cdns,rx-phy-latency-ps" DT bindings for setting the PCIe PHY latencies. The properties expect a list of uint32 PHY latencies in picoseconds for every supported speed starting at PCIe Gen1, e.g.: max-link-speed = <2>; tx-phy-latency-ps = <100000 200000>; /* Gen1: 100ns, Gen2: 200ns */ rx-phy-latency-ps = <150000 250000>; /* Gen1: 150ns, Gen2: 250ns */ There should be a value for every supported speed. Signed-off-by: Alexander Bahle Signed-off-by: Dominic Rath --- .../bindings/pci/cdns,cdns-pcie-ep.yaml | 2 ++ .../bindings/pci/cdns,cdns-pcie-host.yaml | 2 ++ .../devicetree/bindings/pci/cdns-pcie-ep.yaml | 20 +++++++++++++++++++ .../bindings/pci/cdns-pcie-host.yaml | 20 +++++++++++++++++++ 4 files changed, 44 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-ep.yaml index e6ef1012a580..ce239da3a592 100644 --- a/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-ep.yaml @@ -45,6 +45,8 @@ examples: max-functions = /bits/ 8 <8>; phys = <&pcie_phy0>; phy-names = "pcie-phy"; + cdns,tx-phy-latency-ps = <138800 69400>; + cdns,rx-phy-latency-ps = <185200 92600>; }; }; ... diff --git a/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-host.yaml b/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-host.yaml index 293b8ec318bc..a7f4e3909c51 100644 --- a/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-host.yaml +++ b/Documentation/devicetree/bindings/pci/cdns,cdns-pcie-host.yaml @@ -70,6 +70,8 @@ examples: phys = <&pcie_phy0>; phy-names = "pcie-phy"; + cdns,tx-phy-latency-ps = <138800 69400>; + cdns,rx-phy-latency-ps = <185200 92600>; }; }; ... diff --git a/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml index baeafda36ebe..95ea273372d1 100644 --- a/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/cdns-pcie-ep.yaml @@ -21,4 +21,24 @@ properties: maximum: 32 default: 32 + cdns,tx-phy-latency-ps: + description: + The PHY latencies for the TX direction applied to the PTM timestamps. Most + PCIe PHYs have asynchronous latencies for their RX and TX paths. To obtain + accurate PTM timestamps, the PCIe PTM specification requires that the time + at which the first serial bit is present on the serial lines be taken. + Should contain picosecond latency values for each supported speed, + starting with Gen1 latency. + $ref: /schemas/types.yaml#/definitions/uint32-array + + cdns,rx-phy-latency-ps: + description: + The PHY latencies for the RX direction applied to the PTM timestamps. Most + PCIe PHYs have asynchronous latencies for their RX and TX paths. To obtain + accurate PTM timestamps, the PCIe PTM specification requires that the time + at which the first serial bit is present on the serial lines be taken. + Should contain picosecond latency values for each supported speed, + starting with Gen1 latency. + $ref: /schemas/types.yaml#/definitions/uint32-array + additionalProperties: true diff --git a/Documentation/devicetree/bindings/pci/cdns-pcie-host.yaml b/Documentation/devicetree/bindings/pci/cdns-pcie-host.yaml index a944f9bfffff..66f5a6449e1e 100644 --- a/Documentation/devicetree/bindings/pci/cdns-pcie-host.yaml +++ b/Documentation/devicetree/bindings/pci/cdns-pcie-host.yaml @@ -32,6 +32,26 @@ properties: default: 32 deprecated: true + cdns,tx-phy-latency-ps: + description: + The PHY latencies for the TX direction applied to the PTM timestamps. Most + PCIe PHYs have asynchronous latencies for their RX and TX paths. To obtain + accurate PTM timestamps, the PCIe PTM specification requires that the time + at which the first serial bit is present on the serial lines be taken. + Should contain picosecond latency values for each supported speed, + starting with Gen1 latency. + $ref: /schemas/types.yaml#/definitions/uint32-array + + cdns,rx-phy-latency-ps: + description: + The PHY latencies for the RX direction applied to the PTM timestamps. Most + PCIe PHYs have asynchronous latencies for their RX and TX paths. To obtain + accurate PTM timestamps, the PCIe PTM specification requires that the time + at which the first serial bit is present on the serial lines be taken. + Should contain picosecond latency values for each supported speed, + starting with Gen1 latency. + $ref: /schemas/types.yaml#/definitions/uint32-array + msi-parent: true additionalProperties: true -- 2.36.0