Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3889438pxb; Wed, 13 Oct 2021 15:26:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwweHw4FV2Iaro83reNrzpq2GPv0Bv8OtvGVIGb+1a968tyuI21Is72dNK2pCUGVsLnsDUU X-Received: by 2002:a62:7b90:0:b0:44d:fa6:325 with SMTP id w138-20020a627b90000000b0044d0fa60325mr1946445pfc.1.1634163996398; Wed, 13 Oct 2021 15:26:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634163996; cv=pass; d=google.com; s=arc-20160816; b=r5qtBxmYcCD2Ge6GmzBo8JfQq/94ZYoEiu6v2lQHNRG5PtPcgvR6YioOLZrCcXVVKO IAU10zpMYQxlf9z42+lCK/lQxU7rarXDFZoPZ5s5Wa0+XKKUocX5Wn7kGfIZ7c4GYrFf nsGBW4v3BnMxNkCQYs2B9ZKDisw7lmNgIJ17wV3QkOU/GU3VUUcp9MjCaJkfA75tuDEB EY330L7tbtG14R0CrxkaZbI32VF3m3Pg4dPKDvgv+aIi6oWuHCYK57jpYnFp676bTLax +gkW99NMYZOyKKy/j0v9s1sIRCmlC/jseWC92JVpd/hLFo9JkqKQNGe/ekU6jVgbv4TF TC2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fP2W43y4NZhUeiHwnoOz9f1Gg3lG4GAcNsaDHuu8td8=; b=DWyhWoXkHd4gchyZYX6e+Wr0vb9lWwvPqcAhhg54PGeVjGqs14B+5yMuieXrZwxCes riwF318CweZTqzqYQ6vwQj0swZYmItxTrJXzqNClkuLVdgkHpPRPuyYpAukbKJ67+FN3 u2/PIsA+pnfOKLdiuQMj+WWW0hqXdBS5o6weECLJFK0imNMPJLbHiidMaXFHmj5yX4PA y9tabtkEs49gdj7fM5Az/9uASK8MGxbcV59L3l4n9aL0qwKMIKdKO7FpPZG2JdvjyGq1 5FLwvpXt7xHYnxqe+4N7Xt68ryIbpazvxSoME0nMl0qqZv3GjH22HahSel78CmWbW4yR lh0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=g6n44D3F; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si1309196pfv.137.2021.10.13.15.26.17; Wed, 13 Oct 2021 15:26:36 -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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=g6n44D3F; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231501AbhJMW0w (ORCPT + 99 others); Wed, 13 Oct 2021 18:26:52 -0400 Received: from mail-db8eur05on2069.outbound.protection.outlook.com ([40.107.20.69]:19889 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231204AbhJMW0j (ORCPT ); Wed, 13 Oct 2021 18:26:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GBLsbaEaknpqFY7sewK3Uvx/mou3FzXgSoV0eRHw3kOYqp9RIwlujZyNtpJfGGCLFpRB5Ie58ilSzyGYGwIUFnPuRWKDI0QTTxtJwwOCJKB2qBEXQxhCoAKdOMJRnSRzq8IHCR+RD2CqZnOZWlkpNqkwKULsMjoo4Bj9gl6ZvnD4XJA4MSeg97gdbuuI1yvuOEiNACzpONH4wWkMXLcSSZ47xj8IpPKptSWd4lAVlXNdBA8Y0VXYQiARQ5cJEStpOn6CKDxpDCralWD56t+caDhfpI6eX0ay6+fFI9LGiVfnN+0euCgDshBqmIKzv3UwSfdrf79H1GahR9OWR2gN3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fP2W43y4NZhUeiHwnoOz9f1Gg3lG4GAcNsaDHuu8td8=; b=nP80FVYy3UovL3WFyBOB+PbEENWEBgBZKhpcL3l1PkWI6hnOKZwoCHnPcHUsJw3puEyqVnnGV23fhgukxDvMate6O9eZwqLOSX+ClNcYGkHV0wTjnxXaHG8BivlV2rd1CkooFhaLowuap6UCBBrMEvi1e6XS6Wcadg87hg+WOTyupnNGHKP6Y7vxHb0jOzi8jNr2dkwW2mZfcfQiB+ycKW1WWqTwcj3yKiIoeGWam9oyXbNIlv/HREGDc053oy0mZlu42Yy7E3C42zIEAeZ5kjOhRfIjaa/tcTA9Mmyd+isLGPiIutlC8xM+/ZBk3yoIzmhVdY+qijhSSkO7KKSXUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fP2W43y4NZhUeiHwnoOz9f1Gg3lG4GAcNsaDHuu8td8=; b=g6n44D3F59rmYlKYa0RBcmv3x9fpsDt8pJsMrw/OZwXv0NPfzHKPAe6kHDfpY8i40fkBNXZiVrGgq81QFhUrszW6Zj/4vFDC6rxuKl7r6sEnUfkttrVrklO4wxpQ4tUxyagUqnCoUBXhOklezHYudKS0pDPM1VUdZL80OsVTQ/Y= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR04MB4816.eurprd04.prod.outlook.com (2603:10a6:803:5b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Wed, 13 Oct 2021 22:24:25 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::e157:3280:7bc3:18c4%5]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 22:24:25 +0000 From: Vladimir Oltean To: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Shawn Guo , Andrew Lunn , Heiner Kallweit , Russell King , Vivien Didelot , Vladimir Oltean , Florian Fainelli , Prasanna Vengateshan , Ansuel Smith , =?UTF-8?q?Alvin=20=C5=A0ipraga?= Subject: [PATCH net-next 5/6] dt-bindings: net: dsa: sja1105: add {rx,tx}-internal-delay-ps Date: Thu, 14 Oct 2021 01:23:12 +0300 Message-Id: <20211013222313.3767605-6-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013222313.3767605-1-vladimir.oltean@nxp.com> References: <20211013222313.3767605-1-vladimir.oltean@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 Received: from localhost.localdomain (188.26.53.217) by AM3PR05CA0154.eurprd05.prod.outlook.com (2603:10a6:207:3::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Wed, 13 Oct 2021 22:24:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5244aee5-9555-41cd-2571-08d98e98366c X-MS-TrafficTypeDiagnostic: VI1PR04MB4816: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +ErV0lFk03rRGOtptc+25nydymfxbTZiexGL5H6lq77ApaVZj14knmt0SVE0udQjug21ZY2bUYf4gaIN5WN53SkhkfC3D6ghRLGfoCv+26VlMMyai4mqGdh4mHTLUba1lYywnB1M84n4NUCfMMiA4c1q+Y5D/Mb227YHwd4MO9XGtkEx1AKWw672WR8dfSpCxJ5D4O30sqjG5j8lCkvql+JU5jO+zCANYqULuD2GYFgKf0xsfcbWNxdP/l2NAHSeRWUyJp2WeK/BT4ZP60OZnYiWdT/t8mTBBL1SWcqQwgCgicqnGCHxh422dJFQWZCxJKOoqXwPZTSOMExud67O+2RAXWhOdM0OYfLQoGgzyZany7YZiiL7aITYpamtJFkfk8hhej1yf2EkX4EaG6lDgNyAb6t3i2nbhSTY448H61/dgypQOgSHYg8+YGS+jh9WCjz/bN5ogQQB9SdMLgaisHxM/8HCrT4YwFxfFWW1HUno6agWQ1+9KoGUonqX8sJrxtM+vl5+T6HAHsVMiQ4yXL00g+KLuO9yqq02wziZlAiIyX+8IZlArnw/jVQGe4TsfMHrS9fynb6jEOZ3Xz7dKGGpZbnG7K9twwjspIdm/ilLMWR6n96NKn8CH0E0osz7xIWTqCySCpl+nEQnFKfbn1+gcBDjQbIn0KtzQKp98F7Y0b0xK+p9KkM8DSJAFa2ArZnVDkDpuzcDCHP8BalIvw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(7416002)(956004)(38350700002)(1076003)(38100700002)(6666004)(2616005)(6486002)(26005)(316002)(54906003)(110136005)(2906002)(8676002)(6506007)(36756003)(66946007)(6512007)(66556008)(66476007)(8936002)(186003)(4326008)(86362001)(508600001)(44832011)(5660300002)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?FtMbOcs8uRORZa77Pd9z/avsBR1m5idoDeaycp1ULDEuzlCnpY/AynuVibAl?= =?us-ascii?Q?BL5sv7fFkKZ6JeduL7gIQi3LifMxfwxl2QC2+KFpVFNUsi+C/yMfU3CXIx1i?= =?us-ascii?Q?mnOHCoLWkebu+CGm08QpbGN862hwTLQQW5qJsupeLTUoeZWcuuQa+qy3+RcQ?= =?us-ascii?Q?lH1A+cra1j7fKY8NnFMp8l+0RMaMJbeRmH5YppEYyJ0R+GgqiO9Wv9XXQdxz?= =?us-ascii?Q?m3+6G2WJ2JKEwQmlEZ8MRYes0LW+BVBIe31SoLbO6GfPSgCpEEyvCzFN14+O?= =?us-ascii?Q?gZd+hmKYMsmuCyR/qGyj7lpC8e7LmGjG/y6/xh9I3itJV/+eXFW9ORYiLIMH?= =?us-ascii?Q?TQfkRBS+DAEKmObVh4oLUP09uWu0mvrEr4uJ3UJ1tWUaEdJwpkH6R13aXRYc?= =?us-ascii?Q?VSo0SUa9CwG2t47yfiKMfgRBB2HD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5Oh2jjxgYzru0q+lu542?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5244aee5-9555-41cd-2571-08d98e98366c X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2021 22:24:25.0235 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Zu8P/M3oWUIXBada5goXS4rCwr0sH3RLvK6ARsspgBq5wqt1arnrVhe0zwxBdp5jiYNBuRhc9XnMINj2kkeaEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4816 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a schema validator to nxp,sja1105.yaml and to dsa.yaml for explicit MAC-level RGMII delays. These properties must be per port and must be present only for a phy-mode that represents RGMII. We tell dsa.yaml that these port properties might be present, we also define their valid values for SJA1105. We create a common definition for the RX and TX valid range, since it's quite a mouthful. We also modify the example to include the explicit RGMII delay properties. On the fixed-link ports (in the example, port 4), having these explicit delays is actually mandatory, since with the new behavior, the driver shouts that it is interpreting what delays to apply based on phy-mode. Signed-off-by: Vladimir Oltean --- .../devicetree/bindings/net/dsa/dsa.yaml | 4 ++ .../bindings/net/dsa/nxp,sja1105.yaml | 42 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml index 9cfd08cd31da..2ad7f79ad371 100644 --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml @@ -97,6 +97,10 @@ patternProperties: managed: true + rx-internal-delay-ps: true + + tx-internal-delay-ps: true + required: - reg diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml index f97a22772e6f..0bbaefacdaba 100644 --- a/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml +++ b/Documentation/devicetree/bindings/net/dsa/nxp,sja1105.yaml @@ -74,10 +74,42 @@ properties: - compatible - reg +patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-9]+$": + allOf: + - if: + properties: + phy-mode: + contains: + enum: + - rgmii + - rgmii-rxid + - rgmii-txid + - rgmii-id + then: + properties: + rx-internal-delay-ps: + $ref: "#/$defs/internal-delay-ps" + tx-internal-delay-ps: + $ref: "#/$defs/internal-delay-ps" + required: - compatible - reg +$defs: + internal-delay-ps: + description: + Disable tunable delay lines using 0 ps, or enable them and select + the phase between 1640 ps (73.8 degree shift at 1Gbps) and 2260 ps + (101.7 degree shift) in increments of 0.9 degrees (20 ps). + enum: + [0, 1640, 1660, 1680, 1700, 1720, 1740, 1760, 1780, 1800, 1820, + 1840, 1860, 1880, 1900, 1920, 1940, 1960, 1980, 2000, 2020, 2040, + 2060, 2080, 2100, 2120, 2140, 2160, 2180, 2200, 2220, 2240, 2260] + unevaluatedProperties: false examples: @@ -97,30 +129,40 @@ examples: port@0 { phy-handle = <&rgmii_phy6>; phy-mode = "rgmii-id"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <0>; }; port@1 { phy-handle = <&rgmii_phy3>; phy-mode = "rgmii-id"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <1>; }; port@2 { phy-handle = <&rgmii_phy4>; phy-mode = "rgmii-id"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <2>; }; port@3 { phy-handle = <&rgmii_phy4>; phy-mode = "rgmii-id"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <3>; }; port@4 { ethernet = <&enet2>; phy-mode = "rgmii"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; reg = <4>; fixed-link { -- 2.25.1