From patchwork Fri Dec 17 19:57:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 12696722 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 8AAC7C433EF for ; Fri, 17 Dec 2021 19:59:21 +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=A8/N99OFWPRU71d03RI5mz+6/KdxCjr3jFGt0e0rqmY=; b=HVbVGNUK8MQN9b gynfb/HVTPlFxO/wHK0oDApam7RBbnHJt09GrET/Fsjrfx0Pimrv5Znu4EhNsZgN6o84K3SqLmJHL hRhgZGmXk3n46pHHTSZThm9JQKvkbEAaQG8JV8n9ZCSowYUBiIgIdTHKwQXXo9M7xxQm73fDyuwG5 /MdDWoSgT7SBjzLpWSy1AI0lxS4sO3v/Lc9SL4beejP8gHOl+SVsIy2j3Nm5x+qU6gNb4uX3OZRlS Fon/nMi3F7AwgEKLV478pYSkDWJJcITk0NmuuqYIgr1T5+riZ8o25Lvqrfqb7O64FZm+mm7dfFCaN n59OnRwgGMBMEbiBlhiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1myJMO-00CBgI-LE; Fri, 17 Dec 2021 19:57:44 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1myJML-00CBet-4R for linux-arm-kernel@lists.infradead.org; Fri, 17 Dec 2021 19:57:42 +0000 Received: by mail-wr1-x429.google.com with SMTP id o13so6022922wrs.12 for ; Fri, 17 Dec 2021 11:57:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ATS5gBruwanNdU272rerZnhy1vSLEquHj7LuSnNN+Lo=; b=qnB4+19/7gSX+9lGawDmaj6g+X36F2uBnDI91uzpLOh2P5eaBu3njsOrPyTBQu1BVw Lsqmp2ShVjdbfMSAFVSOmtOw1I7cXU5qHQ1LolYhlffhqjBAFROpketFsHA+im4LbVoR YbAlExZyVaA4lQiehGvrxHc5g+dsqCuIt3wPSyQRZhRoZRZSwC5J6sGVFvNxYNm79sdC V9/nxK6mx4UnM7IeD6XDv9/9lVsm3ixfe4EY3in9ZgGhYHNR93y1/PxMiwZoh+IZNUj5 FQRtfQOXDLQioAtpP2yawUPVTpJD7L5xotQb3TUurBcnVXQFoDYwJZqeUxr+z6+jhI8k 2MdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ATS5gBruwanNdU272rerZnhy1vSLEquHj7LuSnNN+Lo=; b=tf6ycgu2oCEEAz3I7FowcUyQIJF0JrfOgg3yk+51V3K7k5SzBMzwVqgXEuz6kXw6EK JDW5+TS2Agz8IAchwJIPnr2UbNYNhdQyTmuXg1ykthGeTainQZXysl0CQXlbco6IPOhf Kipp9cc31Qg/4siLDdvicFhGZ9LcUZRfsMgl3RIRt9xvMecrjRHGc2j3pQfm7TLJIgsg n+NdttB75TnF2aZATgDq4ePpXAQFB8fVsshzYUcVD1pDeOPqI+xBHnJrgRLV5odjaYoO nxOOj9j7sAt+rfsKjZZ+ttqhJDPuivT5vrZjHoaCqkRtYqtlcauL4TsXv1LteGaqPKy6 iNcA== X-Gm-Message-State: AOAM533zCBNvRtis6hAQO0p+bWdgt3wGWsU2cZQDO4x6njzVeLC8ix7P /15xNbqtrfssZr8BTzwD61I= X-Google-Smtp-Source: ABdhPJw6p2zR49SGz4yqKVOw4RR/ZHLX0t/soOMRKCFm2BAD2Fbzcx5etmS+xbynExSLWQ7RWQD1IA== X-Received: by 2002:adf:ec85:: with SMTP id z5mr3735913wrn.568.1639771059023; Fri, 17 Dec 2021 11:57:39 -0800 (PST) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id g18sm13306843wmq.4.2021.12.17.11.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Dec 2021 11:57:38 -0800 (PST) From: Romain Perier To: Daniel Lezcano , Thomas Gleixner , Daniel Palmer , Romain Perier , Rob Herring , Russell King Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/6] Add timers for Mstar SoCs Date: Fri, 17 Dec 2021 20:57:21 +0100 Message-Id: <20211217195727.8955-1-romain.perier@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211217_115741_221031_E498B41F X-CRM114-Status: GOOD ( 15.12 ) 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 This patches series adds a new driver for the timers found in the Mstar MSC313e SoCs and newer. It adds a basic clocksource driver, the corresponding devicetree bindings and its documentation. Changes since v2: - Reworded commit 2/6 - Added Rob's 'Reviewed-by:' tag Changes since v1: - Make delay conditionnal for ARM, so it builds on all platforms - Improved commit message for the timer driver - MSC313E_TIMER is now silent and enabled by platform - Updated msc313e_timer_setup() to make it safe - Updated msc313e_timer_current_value() to make it safe - Renamed the driver variant for ssd20xd to "sstar,ssd20xd-timer" - Moved timer settings for the ssd202d from mstar-infinity2m-ssd20xd.dtsi to mstar-infinity2m.dtsi. - Select MSC313E_TIMER on mstar platforms - Fixed wrong dt-bindings doc that included an rtc property (whoops!) Romain Perier (6): clocksource: Add MStar MSC313e timer support clocksource: msc313e: Add support for ssd20xd-based platforms ARM: mstar: Select MSC313E_TIMER dt-bindings: timer: Add Mstar MSC313e timer devicetree bindings documentation ARM: dts: mstar: Add timers device nodes ARM: dts: mstar: Switch to compatible "sstar,ssd20xd-timer" on infinity2m .../bindings/timer/mstar,msc313e-timer.yaml | 46 ++++ MAINTAINERS | 1 + arch/arm/boot/dts/mstar-infinity2m.dtsi | 18 ++ arch/arm/boot/dts/mstar-v7.dtsi | 20 ++ arch/arm/mach-mstar/Kconfig | 1 + drivers/clocksource/Kconfig | 9 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-msc313e.c | 253 ++++++++++++++++++ 8 files changed, 349 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/mstar,msc313e-timer.yaml create mode 100644 drivers/clocksource/timer-msc313e.c