From patchwork Fri Jun 14 20:33:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13699117 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2051.outbound.protection.outlook.com [40.107.249.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C55D1AB508 for ; Fri, 14 Jun 2024 20:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718397242; cv=fail; b=XsDZ9wuVqkfUvFTHDx7CRExBmrYSaDTdpqAyBDGXyuJEDqdhi+HKmxfTGWXsDXNwrYuT6wRdF48m3cJEU5/66gwmThQtW2US4XjIvwpgOKmgwhPH/0J5659sXjAJFDB5w+U4Qk0hF7n1TArDD0UXr5saJQwdl8q7guatMpUj1uM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718397242; c=relaxed/simple; bh=3yzx5KB6n4OILjTp07AvcZIPyV99PC+9xzy776acipo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=qrriiU68xlccKNjD1mjbiY7SGhjYAjTcEMsXfbYBIdspU9prUOv28QjHStz3vEzV3LnclrgTyX4f0fIdHpwjg4Vjhe9BU1Ba1lqtyaRHRZPtM0ztQz/crIgNHSjCCKf0Yl0h+8SpAKUcy3WSxKO9XjqSiMgA/c3xb1LKtrabA4k= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=NAqAAEHX; arc=fail smtp.client-ip=40.107.249.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="NAqAAEHX" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f18TiFcORjDsJDEwPZNhY4d8oA0w4/i+kHmGCW5qHIEbi9tgFSxlhmBkM5gPCZ5byLqOefcXe/1NBByJr9Qhy9vtpTRI/c9Jt8SC5T0oF+jCVKsjrXMJ6vHirLnZvVCTAF7+fVWQ3d8Ix8pPqKvowr4XuYAGY3JvXolNI2InlRdwlTdYPrjSbk6BXNQI0Lw4dol22x7zsyhZndNh0zP48F0yDgRVEIBnhJn/Mc98X6hJdnJEdCx2Coyuu5zsVpMlVYaTNOr8cMrqiVPSt4CvmOY3FpIKNJxk1gBDze4iRHQy6hxadITNuUVzPs/UUW9OZynL7HS+YtkR6EchCTopkg== 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=LNCnDvOZiynOQkexZckOiKB/6PApXtbHWh27jeRreDU=; b=TMlq2ESUbU5+OPnL2pQn+ymLqkXK5j4WF8Sr4518LnLSHLstgSzO6zCHUkAFtRPHODygIvJ7OSh4HS/aYQNEwcegovh8lFX4uK8yvGlewEn4/L7ShABNYFDnk2mh065T9TWV2zMXXDmamr54nTZEjG0Rq54DpJcP4JeFFKHq4LxHM0L9V5fTvdcFK4+D5gU5CjZhFBg83neJrh4u8n+AkYKXl4LTham1ij7zjN/TKBvKA5BehjlpNG0Ewdkl0kYkT76fZjiyoLrRxL+ZavdnZWpD2gGqvc1ntyc6KqGG9juEAMtcS3YMoSNGEFSrdqhav1Set5W4GWnzaX4kPfJxaA== 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=LNCnDvOZiynOQkexZckOiKB/6PApXtbHWh27jeRreDU=; b=NAqAAEHXY5vEAUDHpC7veFI85wF903+dtlEUAdue1SN5DTiR7MeVE0DfpattyyeGYmx+fTZhZGQokARNaDAqbN1joi/Jo+TAgp/jeDXxoLQQoUJDyLY8aCmEDUc8RNxL3Q/2fAv0Wjp9SaiL3KSVQHGhUd/BpSUN1lkrGIim+EA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by GVXPR04MB10203.eurprd04.prod.outlook.com (2603:10a6:150:1c1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.25; Fri, 14 Jun 2024 20:33:56 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.7677.024; Fri, 14 Jun 2024 20:33:56 +0000 From: Frank Li Date: Fri, 14 Jun 2024 16:33:28 -0400 Subject: [PATCH 1/2] dt-bindings: ptp: Convert ptp-qoirq to yaml format Message-Id: <20240614-ls_fman-v1-1-cb33c96dc799@nxp.com> References: <20240614-ls_fman-v1-0-cb33c96dc799@nxp.com> In-Reply-To: <20240614-ls_fman-v1-0-cb33c96dc799@nxp.com> To: Yangbo Lu , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Cochran , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Madalin Bucur , Sean Anderson Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1718397228; l=9765; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=3yzx5KB6n4OILjTp07AvcZIPyV99PC+9xzy776acipo=; b=fx6F9GGJozFhkuxIT4P5wAy3wbp3ux0w5sA9GREA689tQhP3VoyF5Gs2sHIPEpyuP1ryO2cym MWdBsPZ+SwyAjMkFUrdrE8rtb04dhxFjbukGfyzPzkhnuQekz+6gPI7 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR11CA0075.namprd11.prod.outlook.com (2603:10b6:a03:f4::16) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|GVXPR04MB10203:EE_ X-MS-Office365-Filtering-Correlation-Id: d337a676-1616-4360-1caf-08dc8cb15087 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|366013|52116011|376011|7416011|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: =?utf-8?q?QWj5387E11HndVxClglLRGenfrPspAx?= =?utf-8?q?M3Ad93O6/3UxeLomZBBfiVfKMHkpvThJM0G66HBriCjqdX2CwR7WWJPd54Rz4hd6M?= =?utf-8?q?V/Uq1u9uTt9VzcoaHVVT/xGCQs5OU0WZI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ygXgSd8HwVfP?= =?utf-8?q?YW7UXXN+tR7bejnoMkAMZ/5eSVOtlhV5jRicLrU/OaxjD38uKA4xsooX2KkU4+ncn?= =?utf-8?q?t8e9jBW8W9+thqtyvjvxh28/W42E/SI59yWCqUanZuoUVDF8j47bhyTzkztZpPkaD?= =?utf-8?q?4n9j/X4zzQRqojEn8pMCSSA+r3kAXF9b5Zld/7Zxdu+5gykucdFMLA9jCdndAdeyp?= =?utf-8?q?dGOpE64BlOyOgJDYC+nii8tCuZRzYadKcz3Trgp/tPmvHDuY+0i1aEzc9PlwxGy33?= =?utf-8?q?M0I7p0TvDqQm8?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(366013)(52116011)(376011)(7416011)(1800799021)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/PxZe7D+7gnus+15JpmAlKT2j23S?= =?utf-8?q?NmWuQdGG0O7ua1UP85emALxKwpqQ3Nea6aTNm2QWcyZq8kSyUSuwoKVnoO0g+ESQy?= =?utf-8?q?p3GSmndShSiH/+/QOhWESjFkvTOo8nhsl4AAWn9ub50P6peKnqa2kJmv1Pdl7djCt?= =?utf-8?q?gGWDFXIQcUQpAhWjqfD8+nAke87kkXpIK1mPg4D1cLw7drgv6TTuMW1oAfnfUQwVe?= =?utf-8?q?UJXHe1ZMON2mr4hlf3XAU7WJjM3iJ6eNYGX83u+B673iblA10UjX7HBglcCOGSU4N?= =?utf-8?q?9L+DI3YlgXBnfbqfVL3AgMz9T0hbiMvIk/3sP+pSL3084dDHRuXkIMpkMCP4QCmxs?= =?utf-8?q?ubm8rTTcLK8DzmmSd/lZ4+3za+Mv1kCNFqboHAGfGdf44C1OBlnyYN1EtoklLA+tT?= =?utf-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f-8?q?c1FEpwR6w9t3tV4XnSpmzsX+gynlepQHi56gdbhFipuhUDau7UA4QN0Q7cJfKE8zu?= =?utf-8?q?juPWkT1LFn+EsEj6845UZUvi0lX1I/aGclE2P7nKd7MMtHV47/Nhi6ZVwA+Mj7kVN?= =?utf-8?q?hDvWkMK+gBAhd20s+kKRFqzqsRxkHwTglyii/RII1dhUmMBsUnnr6xsSslPlBrJov?= =?utf-8?q?27DhUsFMyCLygjmS7Ue7CvyjtfUrMPzuACvt/YQqfleLL8ii7Lbc/JIqhdDswhp57?= =?utf-8?q?IdMoNE0/4Kw2?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d337a676-1616-4360-1caf-08dc8cb15087 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2024 20:33:56.8814 (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: ueO+5vL1H9tcfh4PsjytrKy+D8wFEIAdf6XHZ82/AdYM8EaxKsCIP2m1Cv5IPRRZimwj2Kbm6+bFxwN69gBhpg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10203 Convert ptp-qoirq from txt to yaml format. Additional change: - Fixed example interrupts proptery to match the least 2 interrupts requirement. - Move Reference clock context under clk,sel. - Interrupts is not required property Signed-off-by: Frank Li --- .../devicetree/bindings/ptp/ptp-qoriq.txt | 87 ------------ .../devicetree/bindings/ptp/ptp-qoriq.yaml | 148 +++++++++++++++++++++ 2 files changed, 148 insertions(+), 87 deletions(-) diff --git a/Documentation/devicetree/bindings/ptp/ptp-qoriq.txt b/Documentation/devicetree/bindings/ptp/ptp-qoriq.txt deleted file mode 100644 index 743eda754e65c..0000000000000 --- a/Documentation/devicetree/bindings/ptp/ptp-qoriq.txt +++ /dev/null @@ -1,87 +0,0 @@ -* Freescale QorIQ 1588 timer based PTP clock - -General Properties: - - - compatible Should be "fsl,etsec-ptp" for eTSEC - Should be "fsl,fman-ptp-timer" for DPAA FMan - Should be "fsl,dpaa2-ptp" for DPAA2 - Should be "fsl,enetc-ptp" for ENETC - - reg Offset and length of the register set for the device - - interrupts There should be at least two interrupts. Some devices - have as many as four PTP related interrupts. - -Clock Properties: - - - fsl,cksel Timer reference clock source. - - fsl,tclk-period Timer reference clock period in nanoseconds. - - fsl,tmr-prsc Prescaler, divides the output clock. - - fsl,tmr-add Frequency compensation value. - - fsl,tmr-fiper1 Fixed interval period pulse generator. - - fsl,tmr-fiper2 Fixed interval period pulse generator. - - fsl,tmr-fiper3 Fixed interval period pulse generator. - Supported only on DPAA2 and ENETC hardware. - - fsl,max-adj Maximum frequency adjustment in parts per billion. - - fsl,extts-fifo The presence of this property indicates hardware - support for the external trigger stamp FIFO. - - little-endian The presence of this property indicates the 1588 timer - IP block is little-endian mode. The default endian mode - is big-endian. - - These properties set the operational parameters for the PTP - clock. You must choose these carefully for the clock to work right. - Here is how to figure good values: - - TimerOsc = selected reference clock MHz - tclk_period = desired clock period nanoseconds - NominalFreq = 1000 / tclk_period MHz - FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0) - tmr_add = ceil(2^32 / FreqDivRatio) - OutputClock = NominalFreq / tmr_prsc MHz - PulseWidth = 1 / OutputClock microseconds - FiperFreq1 = desired frequency in Hz - FiperDiv1 = 1000000 * OutputClock / FiperFreq1 - tmr_fiper1 = tmr_prsc * tclk_period * FiperDiv1 - tclk_period - max_adj = 1000000000 * (FreqDivRatio - 1.0) - 1 - - The calculation for tmr_fiper2 is the same as for tmr_fiper1. The - driver expects that tmr_fiper1 will be correctly set to produce a 1 - Pulse Per Second (PPS) signal, since this will be offered to the PPS - subsystem to synchronize the Linux clock. - - Reference clock source is determined by the value, which is holded - in CKSEL bits in TMR_CTRL register. "fsl,cksel" property keeps the - value, which will be directly written in those bits, that is why, - according to reference manual, the next clock sources can be used: - - For eTSEC, - <0> - external high precision timer reference clock (TSEC_TMR_CLK - input is used for this purpose); - <1> - eTSEC system clock; - <2> - eTSEC1 transmit clock; - <3> - RTC clock input. - - For DPAA FMan, - <0> - external high precision timer reference clock (TMR_1588_CLK) - <1> - MAC system clock (1/2 FMan clock) - <2> - reserved - <3> - RTC clock oscillator - - When this attribute is not used, the IEEE 1588 timer reference clock - will use the eTSEC system clock (for Gianfar) or the MAC system - clock (for DPAA). - -Example: - - ptp_clock@24e00 { - compatible = "fsl,etsec-ptp"; - reg = <0x24E00 0xB0>; - interrupts = <12 0x8 13 0x8>; - interrupt-parent = < &ipic >; - fsl,cksel = <1>; - fsl,tclk-period = <10>; - fsl,tmr-prsc = <100>; - fsl,tmr-add = <0x999999A4>; - fsl,tmr-fiper1 = <0x3B9AC9F6>; - fsl,tmr-fiper2 = <0x00018696>; - fsl,max-adj = <659999998>; - }; diff --git a/Documentation/devicetree/bindings/ptp/ptp-qoriq.yaml b/Documentation/devicetree/bindings/ptp/ptp-qoriq.yaml new file mode 100644 index 0000000000000..585e8bffd90c9 --- /dev/null +++ b/Documentation/devicetree/bindings/ptp/ptp-qoriq.yaml @@ -0,0 +1,148 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ptp/ptp-qoriq.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale QorIQ 1588 timer based PTP clock + +maintainers: + - Frank Li + +properties: + compatible: + enum: + - fsl,etsec-ptp + - fsl,fman-ptp-timer + - fsl,dpaa2-ptp + - fsl,enetc-ptp + description: | + Should be "fsl,etsec-ptp" for eTSEC + Should be "fsl,fman-ptp-timer" for DPAA FMan + Should be "fsl,dpaa2-ptp" for DPAA2 + Should be "fsl,enetc-ptp" for ENETC + + reg: + maxItems: 1 + + interrupts: + minItems: 2 + maxItems: 4 + + clocks: + maxItems: 1 + + fsl,cksel: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Timer reference clock source. + + Reference clock source is determined by the value, which is holded + in CKSEL bits in TMR_CTRL register. "fsl,cksel" property keeps the + value, which will be directly written in those bits, that is why, + according to reference manual, the next clock sources can be used: + + For eTSEC, + <0> - external high precision timer reference clock (TSEC_TMR_CLK + input is used for this purpose); + <1> - eTSEC system clock; + <2> - eTSEC1 transmit clock; + <3> - RTC clock input. + + For DPAA FMan, + <0> - external high precision timer reference clock (TMR_1588_CLK) + <1> - MAC system clock (1/2 FMan clock) + <2> - reserved + <3> - RTC clock oscillator + + fsl,tclk-period: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Timer reference clock period in nanoseconds. + + fsl,tmr-prsc: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Prescaler, divides the output clock. + + fsl,tmr-add: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Frequency compensation value. + + fsl,tmr-fiper1: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Fixed interval period pulse generator. + + fsl,tmr-fiper2: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Fixed interval period pulse generator. + + fsl,tmr-fiper3: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Fixed interval period pulse generator. + Supported only on DPAA2 and ENETC hardware. + + fsl,max-adj: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Maximum frequency adjustment in parts per billion. + + These properties set the operational parameters for the PTP + clock. You must choose these carefully for the clock to work right. + Here is how to figure good values: + + TimerOsc = selected reference clock MHz + tclk_period = desired clock period nanoseconds + NominalFreq = 1000 / tclk_period MHz + FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0) + tmr_add = ceil(2^32 / FreqDivRatio) + OutputClock = NominalFreq / tmr_prsc MHz + PulseWidth = 1 / OutputClock microseconds + FiperFreq1 = desired frequency in Hz + FiperDiv1 = 1000000 * OutputClock / FiperFreq1 + tmr_fiper1 = tmr_prsc * tclk_period * FiperDiv1 - tclk_period + max_adj = 1000000000 * (FreqDivRatio - 1.0) - 1 + + The calculation for tmr_fiper2 is the same as for tmr_fiper1. The + driver expects that tmr_fiper1 will be correctly set to produce a 1 + Pulse Per Second (PPS) signal, since this will be offered to the PPS + subsystem to synchronize the Linux clock. + + When this attribute is not used, the IEEE 1588 timer reference clock + will use the eTSEC system clock (for Gianfar) or the MAC system + clock (for DPAA). + + fsl,extts-fifo: + $ref: /schemas/types.yaml#/definitions/flag + description: + The presence of this property indicates hardware + support for the external trigger stamp FIFO + + little-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: + The presence of this property indicates the 1588 timer + support for the external trigger stamp FIFO. + IP block is little-endian mode. The default endian mode + is big-endian. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + ptp_clock@24e00 { + compatible = "fsl,etsec-ptp"; + reg = <0x24E00 0xB0>; + interrupts = <12 0x8>, <13 0x8>; + interrupt-parent = <&ipic>; + fsl,cksel = <1>; + fsl,tclk-period = <10>; + fsl,tmr-prsc = <100>; + fsl,tmr-add = <0x999999A4>; + fsl,tmr-fiper1 = <0x3B9AC9F6>; + fsl,tmr-fiper2 = <0x00018696>; + fsl,max-adj = <659999998>; + };