From patchwork Sun Dec 12 18:19:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 12695804 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 6DB44C433F5 for ; Sun, 12 Dec 2021 18:20:51 +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=qFjeaXcs7HeLfr21oycc8fF0JELkApQqeyzCfEk9jwI=; b=ky/f6dXKmXwjnC 2ZnzrKcACryqPN4rKqphdjCZTnM6dRcZ0XGCsy+YjKsj3l/Fl6ShXHb6+Pc07qJRNW06elnzGrNot pLn8Y2kWOi7goSQyqCX/f9WaJw93EEVa35cTGyoH6TOpwzejD0ntmu7y2+6zUKBC0mw+sBV3VwArM I1rLqNDYPXakAq6PmEM9A3inqqR0e335FwZTMWnVq+7yUCXClPka2i3rQHGdaVt7eDgRsdR3s/AlX e61X1BFvvOH10gej2orXl1NLK6VGNXtZ01WFlDQCdzPR+52zupPVxtBETzbFE0aTQCeXklCXP8O6n +7AwqbePtdqM+xvzIQ2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwTRL-006vYg-5A; Sun, 12 Dec 2021 18:19:15 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwTRG-006vVl-PL for linux-arm-kernel@lists.infradead.org; Sun, 12 Dec 2021 18:19:12 +0000 Received: by mail-wr1-x436.google.com with SMTP id u17so23572544wrt.3 for ; Sun, 12 Dec 2021 10:19:10 -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=aIkheGXw0yCyl2iBO81AI6AuB3TpavSbnkWQDXLxNfU=; b=HbE9UAyx4rBB+w6KPkrSPpU/jsQ5T6WZJ4qtqqeSEvm9nUF7rpNee1Np8BGhD4jGNE fQ79GS+kgLe+CRgLn0GXuydPGD6ZFR/Z7wjdnwI+XgmpFGmwaH+CbVReL/AHFgMO0rcd yLS4jrcqG/1o67ejn7uSJO8FdZHO1hLy8Z4JaKSsBawHnuvYUbK66dekeQ/q1o7Zozra fOcNtsF47ZPsA22A1H9Ji+KGQ+zIvbl4wS4wzW96A85LMWeY+lzAUcn7kPfT+9ktuqxk ZnvSR8eIO5umZZkSIlIkQ6OlGecbrSuwLJ1liA50GAR5UUgTaBG2KC4gvGx+PU97NWtk B/HA== 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=aIkheGXw0yCyl2iBO81AI6AuB3TpavSbnkWQDXLxNfU=; b=FrG91wGybTEHJVqjCBy9UZN+FBBiUS0G2FXQx44p9T+11bZy9+6DuA4CulhKZ9/RGE 3Bjs3sSjttKgcFrhxoNMLqYrLOx6/0lbd2dUqVypOXqneXZyuvX+nrHdrbX53yKtMDjO Tur/O6FZ1x0+cbob9Y3kDIPgMmcUB8bNF0OcgbWKDssfpkxZuKa8RfWLYU57Dr1waNhg UdvHXfTrLKrktMTxbFWgaNxrUt+kXy11tvlK5U3jyAjO0zvAFaNPBCXBVafS1h9ShHEU wuFc3ZD+sKY6NloU/GeMnHWngQDMfPtALvEvI1Mal/J1O70vichMmumXXFZrp3VMhNBN evbQ== X-Gm-Message-State: AOAM530/u8Hcblrn/3YVEMJsYG3JmTPRAFf/barjwi6MBM7hQtJ/UazQ mAZNahCG+PriDwzrrwUntqr2aBDz2Po= X-Google-Smtp-Source: ABdhPJw0501lVuahgIQBCaBDRPDtN0GkBb7e+167UcrUTm/oWAcwVAxIFnD82rOGaC/lPsqhI//ytg== X-Received: by 2002:a05:6000:128b:: with SMTP id f11mr27449270wrx.70.1639333149009; Sun, 12 Dec 2021 10:19:09 -0800 (PST) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id h17sm8110879wrp.34.2021.12.12.10.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Dec 2021 10:19:08 -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 v2 0/6] Add timers for Mstar SoCs Date: Sun, 12 Dec 2021 19:19:00 +0100 Message-Id: <20211212181906.94062-1-romain.perier@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211212_101910_932571_A4A8C2D3 X-CRM114-Status: GOOD ( 15.32 ) 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 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