From patchwork Fri Jun 10 11:37:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12877508 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 4F405C43334 for ; Fri, 10 Jun 2022 11:39:20 +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: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:In-Reply-To:References: List-Owner; bh=yMHU67xuw53wwysb/hu5YnwiFr9kBICXR1miYqHCHrY=; b=pEGrz6RubAKXoo suPDaw32xMUasYolOxM0kA8Evz2n6OjcnqUZXoG2VFvE6CCAyGGB/M6ZzcQh4z6ORyVZ9770+IJjB VC+y0OGymYRcUk8SdYd7aE7D5GJs3qr7boeEyZw9cVtFH2AFLAsLKVRre06zqmmO9fmMZ8U0/C+81 ck+Ozv+4UOshSJAycZejx+J3hXhpnSHbQQMWYCyYwoh6V8oXNhgTKD5drBuy0Hjk17Q72wak3hjy8 JVcOhnAetsafu1FK4yywlIg6ejcGrvclcgjy7WX/xo2+5rthncp6OCuSoqGdfHHZBSmUxXtcUIN6n OpWLZ2KMLucjaNpVHdAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzcxL-007xcF-Aa; Fri, 10 Jun 2022 11:37:36 +0000 Received: from mail-dm6nam10on20624.outbound.protection.outlook.com ([2a01:111:f400:7e88::624] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzcxC-007xZE-Vc for linux-arm-kernel@lists.infradead.org; Fri, 10 Jun 2022 11:37:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZlLnJUAQlsz2G6a40UiH/Rz23aBWq/pqqVsQ1y6aXWqGdj0xycdHJlhTtPQ+tL/K7nx7T8tZ5sXDQP/nLvBijg3mv328S1hq6A+rlZxJpnCV6Wg166hm+ufZfqVKq70Vu636FWYbEwyPKW4YmTZMabVdFJ1J4SSqqaYpGGfDlvqRjaPtTMM6F1js7NlywmIyvg5uUB4TsbC+EBVqBZ6GIe8OKsJf1gHSAN9RZ0HCNKCH9tPON9VUa+WaU9NnYK4oWXX+pCG+9r8wZIREpjpIsws3uGuQmdxlA4Q1GF88pvzYoqRxYAmivucSknPWu7S/tiRuqmENPFk0uiU2PG5vpw== 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=ZV1RKnpftW3nhmBaiz1zu2KZJstojZ5o5LgSt8WE6OE=; b=iwsZ+Pj9R3q2Fivsby0yG3fGO9k9MXLgIntdEfYhErRcMwjZVjoU1HJPnn0yifRWKYheDqf+VxPMRonxPBm3Ez2OnpiCabuN2o25NEX6VzjWK0ykTx43aId9TDJkRlmee9AYtpVVs+qsBcN8tiso0ssQfRAvGKp+BSy6hzavj6GKGA2vcPO94g9sIrn6/L5z8jN8nB3KTZtJi3v+gMdYdGyMTZBLbVZkhzYguvpt/LH6OcPPe1MmJexC7wb4d0RwrvEVq8FZjse84mpLCC6x+HAfLAN/y5vu8JoU2cW8WNZCZGthP2B1p0ImC/QoqJtmBcMWdx9QB5qFFONJ2QdWSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=towertech.it smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZV1RKnpftW3nhmBaiz1zu2KZJstojZ5o5LgSt8WE6OE=; b=OpwlGARx8K8mzv/ObKE+MKitXtwLva386LohTIr1e5SXIwE6fHC9byIbtf75br8pc7h9ob57rgzvYfv0LlyhFXA5M4OW29wNBEo5qY36qPqS570ky6YWnVIf8HK6o1PocqUy/ebomyCPGzEmql1PTOZhcffCYw6Noub5h3GnHXM= Received: from SN4PR0601CA0016.namprd06.prod.outlook.com (2603:10b6:803:2f::26) by SA0PR02MB7450.namprd02.prod.outlook.com (2603:10b6:806:db::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.17; Fri, 10 Jun 2022 11:37:22 +0000 Received: from SN1NAM02FT0025.eop-nam02.prod.protection.outlook.com (2603:10b6:803:2f:cafe::5b) by SN4PR0601CA0016.outlook.office365.com (2603:10b6:803:2f::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13 via Frontend Transport; Fri, 10 Jun 2022 11:37:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; pr=C Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0025.mail.protection.outlook.com (10.97.5.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5332.12 via Frontend Transport; Fri, 10 Jun 2022 11:37:22 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 10 Jun 2022 04:37:20 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 10 Jun 2022 04:37:20 -0700 Received: from [10.140.6.39] (port=39538 helo=xhdsgoud40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nzcx6-0002aq-2p; Fri, 10 Jun 2022 04:37:20 -0700 From: Srinivas Neeli To: , , , , , , , , CC: , , , , , Srinivas Neeli Subject: [PATCH V7 1/3] dt-bindings: rtc: zynqmp: Add clock information Date: Fri, 10 Jun 2022 17:07:07 +0530 Message-ID: <20220610113709.2646118-1-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e262eb3-95e4-4a2e-e503-08da4ad59567 X-MS-TrafficTypeDiagnostic: SA0PR02MB7450:EE_ X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mNqOV6phavtYSumd8TOw+xuYaYfN+m63jtLdDPWoGw1GfuN7nEtvKmzc0TVmJ3Xlp/+R+6Fg+5ZjCCtbExpyWWCHNjg0jh7/Z2JsCH3sOA5onlvXCtrnUdb16bai3IZd76vbtO36CBbphQztn8Cbhbz1XmD7a+AmodBx/eFxMXuMM9sAbZEXAfdKtF5ASpeTsPZ/QG9w43vx2WaVvTxbaYKB5TxLAsiR2rS1SYg3JBS7Y/mYlaV99XeT0Ztf3FjygZF3KNjORS+ByeGVJiAuOl1XKEVzteNxhjf6YezaKXrW+RlTwmvf3CuSHaCEZ1DzeduciMJwBJ+9rtUZbwaatViS0DG1gX69awQj+pgqxdFz9tg15H5lzm6uUz4U0i9bI2g1E86TirthdukwD1N/JK+rmzRXsXEZuULHPlvmB/fMQRMOZy/dWb2VfnBNH2gV6TcHY2Ogewk/8fDvjagYYPPcqInAfEGyTJ1JQGwnE90e9rgQbzZY/4x0o2kgR7Ybpc3WioR/nnblQnW4pzR3CPGs5dFBeVIm8EdSZvHUTPTeyna+6sp5PTQr8gQkqZ/RMuOBx7p8gDevNJ2bFXrnpCVz679N0AK67/WhC5k//BRj+NzyQNhx6DXWAa7WZUyJ9PkH+rAY9/dQ3vW5OdKu0aS5oUX4GMUjvVjNPrtadAIBZCgvRdN62p+Fs60S5PT2WhG5DHi+gik8zWE/2PDjA4xRKYPBIgsD57h5OXkmIxg= X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch01.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(2906002)(4326008)(336012)(36860700001)(426003)(47076005)(316002)(186003)(508600001)(70586007)(70206006)(40460700003)(83380400001)(8676002)(7696005)(7416002)(7636003)(26005)(82310400005)(356005)(1076003)(107886003)(44832011)(9786002)(5660300002)(8936002)(36756003)(6666004)(2616005)(110136005)(54906003)(102446001)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2022 11:37:22.0668 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e262eb3-95e4-4a2e-e503-08da4ad59567 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0025.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR02MB7450 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220610_043727_081101_B2E27636 X-CRM114-Status: UNSURE ( 8.43 ) X-CRM114-Notice: Please train this message. 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 Added clock information and deprecated calibration support. Signed-off-by: Srinivas Neeli --- Changes in V7: -None Changes in V6: -Removed dtc warnings. Changes in V5: -Removed quotes and _clk suffix from clocknames. Changes in V4: - Deprecated calibrtion support Changes in V3: - New patch --- .../devicetree/bindings/rtc/xlnx,zynqmp-rtc.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/rtc/xlnx,zynqmp-rtc.yaml b/Documentation/devicetree/bindings/rtc/xlnx,zynqmp-rtc.yaml index bdb72d3ddf2a..638dd1d8bb26 100644 --- a/Documentation/devicetree/bindings/rtc/xlnx,zynqmp-rtc.yaml +++ b/Documentation/devicetree/bindings/rtc/xlnx,zynqmp-rtc.yaml @@ -23,8 +23,15 @@ properties: reg: maxItems: 1 + clocks: + items: + - description: rtc_clk is the operating frequency of crystal. + + clock-names: + maxItems: 1 + interrupts: - minItems: 2 + maxItems: 2 interrupt-names: items: @@ -39,6 +46,7 @@ properties: minimum: 0x1 maximum: 0x1FFFFF default: 0x198233 + deprecated: true required: - compatible @@ -61,5 +69,7 @@ examples: interrupts = <0 26 4>, <0 27 4>; interrupt-names = "alarm", "sec"; calibration = <0x198233>; + clock-names = "rtc_clk"; + clocks = <&rtc_clk>; }; }; From patchwork Fri Jun 10 11:37:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12877509 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 B075CC43334 for ; Fri, 10 Jun 2022 11:39:36 +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=z8vdtgzmAdD1+STpB/SIcGS75h5yfabHq8Uoe2Wdul0=; b=lXSDzt9VWyGpM7 Drk003qswlzYpzLDVnqzrNtiVVLWXofF6d5320VLTiJjoumnWon7wBBVDSMNB4iT3OycdoWf0x+pB KEjEYCdlxf3Byk+zIkpTI8BAzG8xCKTxCrtTWPCkzGLhFzS1LS1oTqlbzdA3CCTL+vs28gJLYXq+G Pn7OeKIcp5UuQJtmnMGypJL7u8P4xC18iL+jPs/XHq/v/ETuxuFUhxXGiZ16sQ3g7QhWlnYKHur8Q t/vEDfM1MFx5udXg1zeTKs/jDnf3NplOuWeNUcuM8US/P3cF4YTrIPHh2NPH/RI5Aky2LtfS9lgYR ROzouWwMlURSCOSz0qyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzcxp-007xqk-81; Fri, 10 Jun 2022 11:38:06 +0000 Received: from mail-co1nam11on20604.outbound.protection.outlook.com ([2a01:111:f400:7eab::604] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzcxI-007xc3-Er for linux-arm-kernel@lists.infradead.org; Fri, 10 Jun 2022 11:37:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NxZiuLc5kcEOF+aDTKWsbE8H5WFd2qUr3p+yWCK3XpvCs5unq/S4P6qXovgnbwhmsjMCGvkxKoYBtMp8WM8zIPw+ESwLSuv7dHITQwBHF2w3wyQjNDzFCPsl5dqAZUBfAN2YJsg1orGErybsKJLvYc97eLUfD7OLlN5gzbYwdYSVzVuwH2uhRytBipxIgBc6TV/i6HDhPniqSt7VJp9ji/LiRIMrobAv3ooA9qJjB+9/Y++1ryH4joFeqYbi8vRZzJRuxs0mSYisAzezSTFr5hFWzbPe8EwVM95F5sSlZ+KxTmcgTk/Va0cpHnoS5EIJtad4AYHG5t7uQQeZ5ULjvQ== 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=Vi6W89wILb2rFFcoXkD3plmfkD0PZBhNyAyNqw8vseU=; b=WS3hI/Z30PEg412eW0T1gF2H5lO9gxkfZhItZMK5OIrdAu0yV7GeE5AN8xEzsRFmMClmRzHyWzJtuUWejiBcczhCjeYb/w048N/f9y9LDwdT/AJ6tSTEUgrSqM+bvfl7+GiiA4CEWNv4EH50JRRdEnBgeUxBQfOgxT6lhF+otjPDHKPK1ZGDtvH201/4XCZsyNG1qJOI3PD8vLh1QKZ7HIYDQBF3gTyvSJw3Khp7XiulUC3UaMJtL5VQOuBUbZG0v17v1Zod8FH/B/XcvGyqTEfZ68Z+t4MX1tw1EG14YeN1M632YLLpxeTXjd29KOAU0OnghLvmiDsXUMyzuMjg9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=towertech.it smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vi6W89wILb2rFFcoXkD3plmfkD0PZBhNyAyNqw8vseU=; b=M9+qIr31MZVS7s7fI9wrRtgCWyGE0prIUYya74Lb4Uy+/+j/rMcT8FmgUBmOJCzVOFZ3RbAZQ8GXEZm+C8zur6VoyuizXmdnvFCfQLUlxbYht4WoPb3SV18ke7UkG8/+fKXqDlkU6phfM54/CBlbI/I2uyoL7ZCvaEL6gwUsTJc= Received: from SN4PR0601CA0017.namprd06.prod.outlook.com (2603:10b6:803:2f::27) by BN8PR02MB5748.namprd02.prod.outlook.com (2603:10b6:408:b0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.12; Fri, 10 Jun 2022 11:37:27 +0000 Received: from SN1NAM02FT0025.eop-nam02.prod.protection.outlook.com (2603:10b6:803:2f:cafe::98) by SN4PR0601CA0017.outlook.office365.com (2603:10b6:803:2f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13 via Frontend Transport; Fri, 10 Jun 2022 11:37:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; pr=C Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0025.mail.protection.outlook.com (10.97.5.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5332.12 via Frontend Transport; Fri, 10 Jun 2022 11:37:27 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 10 Jun 2022 04:37:25 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 10 Jun 2022 04:37:24 -0700 Received: from [10.140.6.39] (port=39538 helo=xhdsgoud40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nzcxA-0002aq-9t; Fri, 10 Jun 2022 04:37:24 -0700 From: Srinivas Neeli To: , , , , , , , , CC: , , , , , Srinivas Neeli Subject: [PATCH V7 2/3] rtc: zynqmp: Add calibration set and get support Date: Fri, 10 Jun 2022 17:07:08 +0530 Message-ID: <20220610113709.2646118-2-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610113709.2646118-1-srinivas.neeli@xilinx.com> References: <20220610113709.2646118-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d6f094d7-2880-4b96-2565-08da4ad598a3 X-MS-TrafficTypeDiagnostic: BN8PR02MB5748:EE_ X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PQSKw12100Kyl4t1fhjZc/nvfVragYTqCNQdE/IntS92uJTRCr5RWC9C/a/LPKIYoh0XzLdXmE+6l/UaNiabTSBr/8/OswD4Sd4FZi3AHmEqdLyBD+Qw3LzySM9WDk1SReGtSkipppz11ZoHwfaUZrvHWHRJNwNgQ4nU9Dcg/TIlqx2pzP0kaNtidYO3eIWg0tPTtutgmK3atwxUGkL49hk4+FILHETrrt06NK9kezEfAlogONNrCMRSuvPY55p6t95zyRZuQb1Pb8UrMWbI8j48OcZ+FsvLWBZe5Pk001ulmv7sDN3qEI+v3I7T8klR5DdasLW5N8WCrH9SUG/zL4ZpbaYZCwlFywQ96D6ECgOA5NlzPMPdEm5lWRakTPLyMJdXXkDwXvd98LxbfHiEjKuM/3sXLvpcw353FigW3PAUoVj+aVCViBQVQMZGn3/JSiClpoiJsMKfPiS7Orxg8/bjil6yV7Y32N0sgZKpBOGbkkEO/c3P75Gq1VSphsAjSGcmZPkT29GvmTnxnGbIokpzuC9mnL3Ed7xItF6ty/6yuAifyjXMXdOLC4nn0o4xf0ogAPIB2lF+Kl8nEUGO2S1oj0AQ8H7jntRHWF1cLkZHe6tq77NDNl8T0YYJYk8IUrL0D/HFlnM6g0JY8yYbW8XwnmHb8FT0iJU3sCLo6vVElTVw9C+TdTJn3JbyHEwCNfAPXPaO2o2W0NQ1adDwJvyj9tDgSiFM1vgSAFiF5BQ= X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch01.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(83380400001)(82310400005)(36860700001)(40460700003)(508600001)(316002)(2906002)(110136005)(54906003)(6666004)(7696005)(356005)(336012)(7636003)(47076005)(26005)(186003)(1076003)(107886003)(70586007)(2616005)(70206006)(36756003)(8676002)(4326008)(5660300002)(44832011)(9786002)(8936002)(7416002)(426003)(102446001)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2022 11:37:27.4883 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d6f094d7-2880-4b96-2565-08da4ad598a3 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0025.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR02MB5748 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220610_043732_577873_8BE8823D X-CRM114-Status: GOOD ( 21.48 ) 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 Zynqmp RTC controller has a calibration feature to compensate time deviation due to input clock inaccuracy. Set and get calibration API's are used for setting and getting calibration value from the controller calibration register. Signed-off-by: Srinivas Neeli --- Changes in V7: -Removed calibration default value update from this patch. Changes in V6: -None Changes in V5: -None Changes in V4: -Updated MIN and MAX calibration values. Changes in V3: -Calculated tick_mult using crystal frequency. -Calibration register updating based on crystal frequency in probe. -Supressed MIN an MAX calibration values,Will send separate patch in future. Changes in V2: -Removed unused macro. -Updated code with review comments. --- drivers/rtc/rtc-zynqmp.c | 113 ++++++++++++++++++++++++++++++++------- 1 file changed, 94 insertions(+), 19 deletions(-) diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index f440bb52be92..39b23f88ee26 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c @@ -6,6 +6,7 @@ * */ +#include #include #include #include @@ -40,13 +41,19 @@ #define RTC_CALIB_MASK 0x1FFFFF #define RTC_ALRM_MASK BIT(1) #define RTC_MSEC 1000 +#define RTC_FR_MASK 0xF0000 +#define RTC_FR_MAX_TICKS 16 +#define RTC_PPB 1000000000LL +#define RTC_MIN_OFFSET -32768000 +#define RTC_MAX_OFFSET 32767000 struct xlnx_rtc_dev { struct rtc_device *rtc; void __iomem *reg_base; int alarm_irq; int sec_irq; - unsigned int calibval; + struct clk *rtc_clk; + unsigned int freq; }; static int xlnx_rtc_set_time(struct device *dev, struct rtc_time *tm) @@ -61,13 +68,6 @@ static int xlnx_rtc_set_time(struct device *dev, struct rtc_time *tm) */ new_time = rtc_tm_to_time64(tm) + 1; - /* - * Writing into calibration register will clear the Tick Counter and - * force the next second to be signaled exactly in 1 second period - */ - xrtcdev->calibval &= RTC_CALIB_MASK; - writel(xrtcdev->calibval, (xrtcdev->reg_base + RTC_CALIB_WR)); - writel(new_time, xrtcdev->reg_base + RTC_SET_TM_WR); /* @@ -173,15 +173,76 @@ static void xlnx_init_rtc(struct xlnx_rtc_dev *xrtcdev) rtc_ctrl = readl(xrtcdev->reg_base + RTC_CTRL); rtc_ctrl |= RTC_BATT_EN; writel(rtc_ctrl, xrtcdev->reg_base + RTC_CTRL); +} - /* - * Based on crystal freq of 33.330 KHz - * set the seconds counter and enable, set fractions counter - * to default value suggested as per design spec - * to correct RTC delay in frequency over period of time. +static int xlnx_rtc_read_offset(struct device *dev, long *offset) +{ + struct xlnx_rtc_dev *xrtcdev = dev_get_drvdata(dev); + unsigned long long rtc_ppb = RTC_PPB; + unsigned int tick_mult = do_div(rtc_ppb, xrtcdev->freq); + unsigned int calibval; + long offset_val; + + calibval = readl(xrtcdev->reg_base + RTC_CALIB_RD); + /* Offset with seconds ticks */ + offset_val = calibval & RTC_TICK_MASK; + offset_val = offset_val - RTC_CALIB_DEF; + offset_val = offset_val * tick_mult; + + /* Offset with fractional ticks */ + if (calibval & RTC_FR_EN) + offset_val += ((calibval & RTC_FR_MASK) >> RTC_FR_DATSHIFT) + * (tick_mult / RTC_FR_MAX_TICKS); + *offset = offset_val; + + return 0; +} + +static int xlnx_rtc_set_offset(struct device *dev, long offset) +{ + struct xlnx_rtc_dev *xrtcdev = dev_get_drvdata(dev); + unsigned long long rtc_ppb = RTC_PPB; + unsigned int tick_mult = do_div(rtc_ppb, xrtcdev->freq); + unsigned char fract_tick; + unsigned int calibval; + short int max_tick; + int fract_offset; + + if (offset < RTC_MIN_OFFSET || offset > RTC_MAX_OFFSET) + return -ERANGE; + + /* Number ticks for given offset */ + max_tick = div_s64_rem(offset, tick_mult, &fract_offset); + + /* Number fractional ticks for given offset */ + if (fract_offset) { + if (fract_offset < 0) { + fract_offset = fract_offset + tick_mult; + max_tick--; + } + if (fract_offset > (tick_mult / RTC_FR_MAX_TICKS)) { + for (fract_tick = 1; fract_tick < 16; fract_tick++) { + if (fract_offset <= + (fract_tick * + (tick_mult / RTC_FR_MAX_TICKS))) + break; + } + } + } + + /* Zynqmp RTC uses second and fractional tick + * counters for compensation */ - xrtcdev->calibval &= RTC_CALIB_MASK; - writel(xrtcdev->calibval, (xrtcdev->reg_base + RTC_CALIB_WR)); + calibval = max_tick + RTC_CALIB_DEF; + + if (fract_tick) + calibval |= RTC_FR_EN; + + calibval |= (fract_tick << RTC_FR_DATSHIFT); + + writel(calibval, (xrtcdev->reg_base + RTC_CALIB_WR)); + + return 0; } static const struct rtc_class_ops xlnx_rtc_ops = { @@ -190,6 +251,8 @@ static const struct rtc_class_ops xlnx_rtc_ops = { .read_alarm = xlnx_rtc_read_alarm, .set_alarm = xlnx_rtc_set_alarm, .alarm_irq_enable = xlnx_rtc_alarm_irq_enable, + .read_offset = xlnx_rtc_read_offset, + .set_offset = xlnx_rtc_set_offset, }; static irqreturn_t xlnx_rtc_interrupt(int irq, void *id) @@ -255,10 +318,22 @@ static int xlnx_rtc_probe(struct platform_device *pdev) return ret; } - ret = of_property_read_u32(pdev->dev.of_node, "calibration", - &xrtcdev->calibval); - if (ret) - xrtcdev->calibval = RTC_CALIB_DEF; + /* Getting the rtc_clk info */ + xrtcdev->rtc_clk = devm_clk_get_optional(&pdev->dev, "rtc_clk"); + if (IS_ERR(xrtcdev->rtc_clk)) { + if (PTR_ERR(xrtcdev->rtc_clk) != -EPROBE_DEFER) + dev_warn(&pdev->dev, "Device clock not found.\n"); + } + xrtcdev->freq = clk_get_rate(xrtcdev->rtc_clk); + if (!xrtcdev->freq) { + ret = of_property_read_u32(pdev->dev.of_node, "calibration", + &xrtcdev->freq); + if (ret) + xrtcdev->freq = RTC_CALIB_DEF; + } + ret = readl(xrtcdev->reg_base + RTC_CALIB_RD); + if (!ret) + writel(xrtcdev->freq, (xrtcdev->reg_base + RTC_CALIB_WR)); xlnx_init_rtc(xrtcdev); From patchwork Fri Jun 10 11:37:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 12877510 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 18848C43334 for ; Fri, 10 Jun 2022 11:40:04 +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=OGXd76TkEaZzVlqXuTfl+MYNkkMF+wqIAy3Z/Dl1zGc=; b=QA5TKrhYIQrgvR 1Ncnj3a1OV78Rk87xjvU9ds1eZ7tFApChig6cj0jHZv3AoDgEQBCmeeAyO/D2nxXsPymFReZgxY2a ZhVFIbR3L7gQc2wER2Lax91x4z5VegizCzR4yuBo3NyQ/wQ6jrssEQj/88dvi1rTknQPg7IRAMwT/ 4TMOH7qfpetIvroRjprI8CAp5QnHARkbIghIOjuFmsKD53uyFuEDBcGhaEEFA7fxinQbXYZBPs9IN o0VKoBQ+22LPdIvKier19Ool3pxqlaqGplyuMrdZm+d/X9XoZ15ZrKtx8e5wuxbQwdUmNhfJ6q4YY 1+JriXDvVDQRW/5phCIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzcyS-007y9W-Bv; Fri, 10 Jun 2022 11:38:44 +0000 Received: from mail-bn1nam07on20609.outbound.protection.outlook.com ([2a01:111:f400:7eb2::609] helo=NAM02-BN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzcxT-007xfe-3B for linux-arm-kernel@lists.infradead.org; Fri, 10 Jun 2022 11:37:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UvbBxp3EdLqYRcAzsf6f+ljkavgiVQzYKpCBguTbpx9jGG4h93V3M6vFYfKpmQ5eouWo3ope4kZ79Dfkcnb9EZP0gahCrSMOpYoyIKvxt5q1g8bIOi2RJRasl00pVsbJVD68pY+WV20TPnz+Xzplt4SirjYpI6y02w1KuxK9QI1EZQmx8NNdVBr1/9ZUmocW8j2JRNCrdZmMzzNtGtdlpU0Jrbx1xt4bYOo1yqeiv27byICf1htNtpAQDVhWIizWMfIrZz3z1DOW1BXlmB5tj63obgAXKlzsnjuu4Fk08GUjSV0fpShbfbcjK5KWPkahLcAxT+A4Q6Fhvtfhl9V3zw== 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=BilvxH1CXwSb6NBAg9shBOxM3x5GNuQ86//VEdBMkWE=; b=lD3M6vwDffoYKbTXrBAohTdT+0xzymUhVmwhMgA71UWwk53SNTrFrSQE+z2IQYllSryM/A4+jROfq/MitLdODXw20WCTSP1MCYGQbIa/udWcb5E2cEaXqQFv8pCR/BPM8DTk7kF0D/xnbOGLlmDN3keDHG6zBOjrkqK3Y+Nb3oxMgRCGE4EJwBaW8zxUMIJ0sv6XPc8OpnUnKTxvgYzK+9pbUu/HBza3cVa/OG1M0MbiFDv7Y/kWYmX3IWuRf/8BEp8/BUZCJp5k6MBzo2RbVTMpJn8OYNw2Jb9MecOnygBiZdi5Z9RjB3C7t22uUUXc91yQyJwW+h5t9c1G+HaSZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=towertech.it smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BilvxH1CXwSb6NBAg9shBOxM3x5GNuQ86//VEdBMkWE=; b=FdJ0CfaZAleN3/btGjBFs+G5rAza7lRj1XXNRp0TNieQK36vQsQ+kdTcEynwF6Ds0FvxNhQ9hxgz8hB9Yk8Y4orcgJwUrCXxZdzmrUEbmzQrd9qjwlpux5UimP28OsN7VxntdP6t9xNGxj7yEkJ4EBYNiVVOaej3Uamwl7v+4Og= Received: from SN2PR01CA0037.prod.exchangelabs.com (2603:10b6:804:2::47) by BL0PR02MB5634.namprd02.prod.outlook.com (2603:10b6:208:85::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.12; Fri, 10 Jun 2022 11:37:36 +0000 Received: from SN1NAM02FT0048.eop-nam02.prod.protection.outlook.com (2603:10b6:804:2:cafe::81) by SN2PR01CA0037.outlook.office365.com (2603:10b6:804:2::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13 via Frontend Transport; Fri, 10 Jun 2022 11:37:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; pr=C Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0048.mail.protection.outlook.com (10.97.4.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5332.12 via Frontend Transport; Fri, 10 Jun 2022 11:37:35 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 10 Jun 2022 04:37:34 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 10 Jun 2022 04:37:34 -0700 Received: from [10.140.6.39] (port=39538 helo=xhdsgoud40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1nzcxE-0002aq-D3; Fri, 10 Jun 2022 04:37:34 -0700 From: Srinivas Neeli To: , , , , , , , , CC: , , , , , Srinivas Neeli Subject: [PATCH V7 3/3] rtc: zynqmp: Updated calibration value Date: Fri, 10 Jun 2022 17:07:09 +0530 Message-ID: <20220610113709.2646118-3-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610113709.2646118-1-srinivas.neeli@xilinx.com> References: <20220610113709.2646118-1-srinivas.neeli@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 41483507-179f-4741-ac3b-08da4ad59db5 X-MS-TrafficTypeDiagnostic: BL0PR02MB5634:EE_ X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PVCoVYM9hwpt8LPkQIoSwDh3rWABpx+jghkoKIftLMFw3T1bWOOd4YNHkaMlxFbt308Leh/UPWzlYRaNgLJRFThTWFZH9LmYApHwtsc5DhiUo/zhf2Rk37HUWwYDsoKYTSiNcNtgUGhmyaI6ef3pdPYZ6MDgI4+fYqI3urxvSJwNIo1/dAzWE7pzZ302Ht6ISC7rFhuOnoH20tRdd3BOUPGshJJe/SK7O1O6ffqWoHlQfRSEjk6XXpovVk+Z+rcdQl41ZiNP1qfsgtOwL4ZHmo/FnbKWzt54XCIjhrp1uD9myro2rVbHQ/47rI4C0vrv44rTsdE6IUsXj2oI/PPX+Gw3PrngzU46jafNh/WksxcFGgLA0cNQwye8QIu05R8aupc8GHVsTt7iArecQ37YtQGem8SroJqz6x8FKyhF+fx/Av3ToMXpFtDU53WvFGOOXDXQXAf8CA1LENifyEKZi3+n+atpFyzLWB3qAVswDF0w7WQec0SbrjO7aAPgHZ7pU7/ndeWI5cyRoJy9THLp2oAd9j5+fHTz+udYoCSVEhNJFXULno03sSdBR2nSnEMuP/80kVYEnaMBzwUbX8DBIuIukAs1yCTcdds5YSzlvMZaIOWwOSDdeJYtYOCI+rT+y33gSq7osOucR0UeVlMQoC9EI2OpGcrLaTmUlnDQ9u+nnA3Lw2yyRbgzh29cRr3JqBWjIAeE+4YhuJIYalm39N//JxQd/5/kJ1hNKBKldjI= X-Forefront-Antispam-Report: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch01.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(40460700003)(26005)(54906003)(110136005)(6666004)(83380400001)(316002)(70586007)(70206006)(7696005)(2616005)(336012)(426003)(186003)(107886003)(1076003)(508600001)(47076005)(82310400005)(8676002)(4326008)(8936002)(2906002)(9786002)(36756003)(36860700001)(5660300002)(356005)(7416002)(44832011)(4744005)(7636003)(15650500001)(102446001)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2022 11:37:35.9983 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 41483507-179f-4741-ac3b-08da4ad59db5 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.62.198];Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0048.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB5634 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220610_043743_190334_B21265C2 X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. 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 As per RTC spec default calibration value is 0x7FFF. Signed-off-by: Srinivas Neeli --- Changes in V7: -New patch -TRM not updated yet, Internal design document contains 0x7FFF as default value. TRM Will update in next release. --- drivers/rtc/rtc-zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index 39b23f88ee26..1dd389b891fe 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c @@ -37,7 +37,7 @@ #define RTC_OSC_EN BIT(24) #define RTC_BATT_EN BIT(31) -#define RTC_CALIB_DEF 0x198233 +#define RTC_CALIB_DEF 0x7FFF #define RTC_CALIB_MASK 0x1FFFFF #define RTC_ALRM_MASK BIT(1) #define RTC_MSEC 1000