From patchwork Fri Nov 26 20:21:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 12693777 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 242DCC433F5 for ; Fri, 26 Nov 2021 20:24:15 +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=UsvdCOrjhq775SCxKFr4LT4Lwp6O7PV2/lEl/3aPUx0=; b=2GQgj4VVQGLQeW 9BXygI+q1oegnFVx07aQeJi9XVuEmN3t6TrEt3zVV53F4MNJ5ViXnFqNavGNdMSKhXS9W7Ysg0yel QSv+UTnJkOT91+oI+XTACyni1ECvHfqBrSixEmAgCetFGMJbLwUD7QfOh4Vb9vFItVhrvLfgxs4ZJ kH1poDFzJPSw6K+9beyl4ktdN3M99UypvIsmWLy0bTS309xlXgKnVXIgwDo3J12W6Jqbsnwr72fKE /ye+POi08kSbVRkNqt6hkz3zgj+GGw76iW4jWvWBywHSMBS266sbJ3Kue9khmXzNFB+mRQ0w5+l7O blwA6dqfk6g4f5/5MYhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqhjm-00BhG2-Hc; Fri, 26 Nov 2021 20:22:26 +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 1mqhjQ-00BhD7-7J for linux-arm-kernel@lists.infradead.org; Fri, 26 Nov 2021 20:22:05 +0000 Received: by mail-wr1-x429.google.com with SMTP id a18so20966830wrn.6 for ; Fri, 26 Nov 2021 12:22:03 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=WoZhLfvDm+L99HoPOnksDANG3fbG7ckhGdgFkoSItVw=; b=U829GneLOuDIJS6pH3revEcaJhxH5S2UX6CdW0CLnBHNWqBA7zdlQN4E9hyogJ1lVA bG6cYuMStyQK3fdIcvhMrDycOXRtd/4sGCBeCELQYxQQF79oOgolG72aNfAoaYC+E6wY GDYD0e6Z/oAWqvHPaJmAOY+umH70DgSgG2WpKLGYmuP+JP+8Bi3m8MKz6GQ/10IQlWHn hPpkzJcPJVZLNYk2kOFPrETxyTrtnhnyqItOYQ9ifpre6LkplZ46En4ZTDiyOzedGWYM MgWI26VX0+8+1x0S+0BWhovX/sOYvaEt6y9p5VATg9AP2uszVhBYHIOrJ7vWSHhGwMTJ NpNA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=WoZhLfvDm+L99HoPOnksDANG3fbG7ckhGdgFkoSItVw=; b=CJPgjMqiYRtRRs9RQaCm1h2dAMD8OvHiIz+ZNnON7gpPSkuVV1LUvIxM1O+Amay3aA 766z3/kvFvfpvAwANPWk5wUCK6dUOSRAEBWPGW8zg5+rWBQUYz2/nbEMqd9E6G/FqAuQ BZ2ns20t7Lz3KOz2zid1WEaJxQLs9IEhPbKREKP5WS8xq2wCKTnueeiOGj1Pz5+HpiX+ 80RNc9IcLHF+1qrtJDMFpVD1TrwoMZSMTl1vN1et3/9meUw7JuQGLx4ySIe66d7tttSV nMnU1X7Oun8pG7zfOskXtPLzrBnjwWtN15qcjyDIYFCFBzsNABesUU6RNeGwlhk0WXqj NLHQ== X-Gm-Message-State: AOAM533eFOBGnKdUEeaCJSMzZKWxtzx8CjQEKYFWsVVI0pIf9EFsd4os nGTtBXQb7vAMFNyAxGJxFW0= X-Google-Smtp-Source: ABdhPJxAj+GzV4qkcmRopmJdcF2SNPVQWiFXjjXS6uLCVyAnDT1unI7LKakikwA4IevYMCsTIcxbxg== X-Received: by 2002:adf:8bd8:: with SMTP id w24mr16668961wra.540.1637958121727; Fri, 26 Nov 2021 12:22:01 -0800 (PST) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id t11sm6638917wrz.97.2021.11.26.12.22.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 12:22:01 -0800 (PST) From: Romain Perier To: Daniel Lezcano , Thomas Gleixner , Daniel Palmer , Romain Perier , Rob Herring Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] clocksource: Add MStar MSC313e timer support Date: Fri, 26 Nov 2021 21:21:39 +0100 Message-Id: <20211126202144.72936-2-romain.perier@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211126202144.72936-1-romain.perier@gmail.com> References: <20211126202144.72936-1-romain.perier@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_122204_291337_BEA13563 X-CRM114-Status: GOOD ( 25.20 ) 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 The MSC313e-compatible SoCs have 3 timer hardware blocks. All of these are free running 32-bit increasing counters and can generate interrupts. This commit adds basic support for these timers, the first timer block being used as clocksource/sched_clock and delay, while the others will be used as clockevents. Signed-off-by: Romain Perier Co-developed-by: Daniel Palmer Signed-off-by: Daniel Palmer --- MAINTAINERS | 1 + drivers/clocksource/Kconfig | 10 ++ drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-msc313e.c | 228 ++++++++++++++++++++++++++++ 4 files changed, 240 insertions(+) create mode 100644 drivers/clocksource/timer-msc313e.c diff --git a/MAINTAINERS b/MAINTAINERS index 7a2345ce8521..f39a1617bf50 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2282,6 +2282,7 @@ F: Documentation/devicetree/bindings/gpio/mstar,msc313-gpio.yaml F: arch/arm/boot/dts/mstar-* F: arch/arm/mach-mstar/ F: drivers/clk/mstar/ +F: drivers/clocksource/timer-msc313e.c F: drivers/gpio/gpio-msc313.c F: drivers/rtc/rtc-msc313.c F: drivers/watchdog/msc313e_wdt.c diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index f65e31bab9ae..822e711da284 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -671,6 +671,16 @@ config MILBEAUT_TIMER help Enables the support for Milbeaut timer driver. +config MSC313E_TIMER + bool "MSC313E timer driver" + depends on ARCH_MSTARV7 || COMPILE_TEST + select TIMER_OF + select CLKSRC_MMIO + help + Enables support for the MStar MSC313E timer driver. + This provides access to multiple interrupt generating + programmable 32-bit free running incrementing counters. + config INGENIC_TIMER bool "Clocksource/timer using the TCU in Ingenic JZ SoCs" default MACH_INGENIC diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile index c17ee32a7151..fa5f624eadb6 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile @@ -88,3 +88,4 @@ obj-$(CONFIG_CSKY_MP_TIMER) += timer-mp-csky.o obj-$(CONFIG_GX6605S_TIMER) += timer-gx6605s.o obj-$(CONFIG_HYPERV_TIMER) += hyperv_timer.o obj-$(CONFIG_MICROCHIP_PIT64B) += timer-microchip-pit64b.o +obj-$(CONFIG_MSC313E_TIMER) += timer-msc313e.o diff --git a/drivers/clocksource/timer-msc313e.c b/drivers/clocksource/timer-msc313e.c new file mode 100644 index 000000000000..81f161744349 --- /dev/null +++ b/drivers/clocksource/timer-msc313e.c @@ -0,0 +1,228 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * MStar timer driver + * + * Copyright (C) 2021 Daniel Palmer + * Copyright (C) 2021 Romain Perier + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "timer-of.h" + +#define TIMER_NAME "msc313e_timer" + +#define MSC313E_REG_CTRL 0x00 +#define MSC313E_REG_CTRL_TIMER_EN BIT(0) +#define MSC313E_REG_CTRL_TIMER_TRIG BIT(1) +#define MSC313E_REG_CTRL_TIMER_INT_EN BIT(8) +#define MSC313E_REG_TIMER_MAX_LOW 0x08 +#define MSC313E_REG_TIMER_MAX_HIGH 0x0c +#define MSC313E_REG_COUNTER_LOW 0x10 +#define MSC313E_REG_COUNTER_HIGH 0x14 + +#define TIMER_SYNC_TICKS 3 + +struct msc313e_delay { + void __iomem *base; + struct delay_timer delay; +}; + +static void __iomem *msc313e_clksrc; +static struct msc313e_delay msc313e_delay; + +static void msc313e_timer_stop(void __iomem *base) +{ + writew(0, base + MSC313E_REG_CTRL); +} + +static void msc313e_timer_start(void __iomem *base, bool periodic) +{ + u16 reg; + + reg = readw(base + MSC313E_REG_CTRL); + if (periodic) + reg |= MSC313E_REG_CTRL_TIMER_EN; + else + reg |= MSC313E_REG_CTRL_TIMER_TRIG; + writew(reg | MSC313E_REG_CTRL_TIMER_INT_EN, base + MSC313E_REG_CTRL); +} + +static void msc313e_timer_setup(void __iomem *base, unsigned long delay) +{ + writew(delay >> 16, base + MSC313E_REG_TIMER_MAX_HIGH); + writew(delay & 0xffff, base + MSC313E_REG_TIMER_MAX_LOW); +} + +static unsigned long msc313e_timer_current_value(void __iomem *base) +{ + unsigned long result; + + result = readw(base + MSC313E_REG_COUNTER_LOW); + result |= readw(base + MSC313E_REG_COUNTER_HIGH) << 16; + + return result; +} + +static int msc313e_timer_clkevt_shutdown(struct clock_event_device *evt) +{ + struct timer_of *timer = to_timer_of(evt); + + msc313e_timer_stop(timer_of_base(timer)); + + return 0; +} + +static int msc313e_timer_clkevt_set_oneshot(struct clock_event_device *evt) +{ + struct timer_of *timer = to_timer_of(evt); + + msc313e_timer_stop(timer_of_base(timer)); + msc313e_timer_start(timer_of_base(timer), false); + + return 0; +} + +static int msc313e_timer_clkevt_set_periodic(struct clock_event_device *evt) +{ + struct timer_of *timer = to_timer_of(evt); + + msc313e_timer_stop(timer_of_base(timer)); + msc313e_timer_setup(timer_of_base(timer), timer_of_period(timer)); + msc313e_timer_start(timer_of_base(timer), true); + + return 0; +} + +static int msc313e_timer_clkevt_next_event(unsigned long evt, struct clock_event_device *clkevt) +{ + struct timer_of *timer = to_timer_of(clkevt); + + msc313e_timer_stop(timer_of_base(timer)); + msc313e_timer_setup(timer_of_base(timer), evt); + msc313e_timer_start(timer_of_base(timer), false); + + return 0; +} + +static irqreturn_t msc313e_timer_clkevt_irq(int irq, void *dev_id) +{ + struct clock_event_device *evt = dev_id; + + evt->event_handler(evt); + + return IRQ_HANDLED; +} + +static u64 msc313e_timer_clksrc_read(struct clocksource *cs) +{ + return msc313e_timer_current_value(msc313e_clksrc) & cs->mask; +} + +static unsigned long msc313e_read_delay_timer_read(void) +{ + return msc313e_timer_current_value(msc313e_delay.base); +} + +static u64 msc313e_timer_sched_clock_read(void) +{ + return msc313e_timer_current_value(msc313e_clksrc); +} + +static struct clock_event_device msc313e_clkevt = { + .name = TIMER_NAME, + .rating = 300, + .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, + .set_state_shutdown = msc313e_timer_clkevt_shutdown, + .set_state_periodic = msc313e_timer_clkevt_set_periodic, + .set_state_oneshot = msc313e_timer_clkevt_set_oneshot, + .tick_resume = msc313e_timer_clkevt_shutdown, + .set_next_event = msc313e_timer_clkevt_next_event, +}; + +static int __init msc313e_clkevt_init(struct device_node *np) +{ + int ret; + struct timer_of *to; + + to = kzalloc(sizeof(*to), GFP_KERNEL); + if (!to) + return -ENOMEM; + + to->flags = TIMER_OF_IRQ | TIMER_OF_CLOCK | TIMER_OF_BASE; + to->of_irq.handler = msc313e_timer_clkevt_irq; + ret = timer_of_init(np, to); + if (ret) + return ret; + + msc313e_clkevt.cpumask = cpu_possible_mask; + msc313e_clkevt.irq = to->of_irq.irq; + to->clkevt = msc313e_clkevt; + + clockevents_config_and_register(&to->clkevt, timer_of_rate(to), + TIMER_SYNC_TICKS, 0xffffffff); + return 0; +} + +static int __init msc313e_clksrc_init(struct device_node *np) +{ + struct timer_of to = { 0 }; + int ret; + u16 reg; + + to.flags = TIMER_OF_BASE | TIMER_OF_CLOCK; + ret = timer_of_init(np, &to); + if (ret) + return ret; + + msc313e_delay.base = timer_of_base(&to); + msc313e_delay.delay.read_current_timer = msc313e_read_delay_timer_read; + msc313e_delay.delay.freq = timer_of_rate(&to); + + msc313e_clksrc = timer_of_base(&to); + reg = readw(msc313e_clksrc + MSC313E_REG_CTRL); + reg |= MSC313E_REG_CTRL_TIMER_EN; + writew(reg, msc313e_clksrc + MSC313E_REG_CTRL); + + register_current_timer_delay(&msc313e_delay.delay); + + sched_clock_register(msc313e_timer_sched_clock_read, 32, timer_of_rate(&to)); + return clocksource_mmio_init(timer_of_base(&to), TIMER_NAME, timer_of_rate(&to), 300, 32, + msc313e_timer_clksrc_read); +} + +static int __init msc313e_timer_init(struct device_node *np) +{ + int ret = 0; + static int num_called; + + switch (num_called) { + case 0: + ret = msc313e_clksrc_init(np); + if (ret) + return ret; + break; + + default: + ret = msc313e_clkevt_init(np); + if (ret) + return ret; + break; + } + + num_called++; + + return 0; +} + +TIMER_OF_DECLARE(msc313, "mstar,msc313e-timer", msc313e_timer_init); From patchwork Fri Nov 26 20:21:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 12693774 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 2A219C433EF for ; Fri, 26 Nov 2021 20:24:01 +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=d/EgalJvtN+RqroFO9cr/mtlNR+Zm9uucJnOgB5U69s=; b=zfbaolH3LaR/zN hrvms5SNp4trWzFOYqvLndfnGR3vnCx9XhaUOCOjfLr8+naJKDymNe+OKtrAOhxkX4fp2/HEWnAe+ teVjN6JNI3+wPT7Kthew25A0EObkhkD6vgFQS8GY5gd+x0arLfmfqXpZ4soURTfU0MSvICYU1ea0T LyyzvG8z4IkciqAtAaZL4dBsAuNP9AoTwvJ4bC+D/Fyta1S9VNQ01sb5HXO1zF/1qCXI5v0Vg/d25 r38Wzj5tE/s8NUsmty5XzMpb326gtz6naDvO1NmWEe2PVFaApGy3pGBsKzkeiaumVMKXzC5+1MW4H IqAi5Ad+Uf2Vtu5L6KIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqhjc-00BhFV-AF; Fri, 26 Nov 2021 20:22:16 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqhjQ-00BhDO-5e for linux-arm-kernel@lists.infradead.org; Fri, 26 Nov 2021 20:22:05 +0000 Received: by mail-wm1-x32a.google.com with SMTP id p3-20020a05600c1d8300b003334fab53afso11489029wms.3 for ; Fri, 26 Nov 2021 12:22:03 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=1BejTOJeuXx0KsauYDbKnEuX2+Uj/mIn82Fl6byzxj0=; b=WyLQcViM/fgfJEs2YDWvTFL5riGU5OyW63tZf2uXlrIOpiM1MZD7Z7INCZpnEEeboJ JrjoxgCgLq0wu5pz5thWAi1dTF5DXHWZhcxdtVLSaUulbrO/MJhRBRve9IEwautWOAwO 3qEAWkn3DF+MxCd+kXmrb4MwBwbUgT/Ae2Vvjb/X3IXSWfVLOjHLXTMdgS9UCjoSoFO/ gL2MiLV+JCoS1YyF0Qm0/KNM5gzA6ZhwbOVOIgUW5buwng8A1eQVzjOCbK0z+MrFefn5 2KJVjBRIuAAxhNyLwT1RYZfWYWO+djHzCYm79jo1jlooJlspR/AgS7gI3Ml2y4NAcqh9 s+wg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=1BejTOJeuXx0KsauYDbKnEuX2+Uj/mIn82Fl6byzxj0=; b=u4gq4OkhWOXUi13K8pK/7f+zfjSCzJBB08+/PCMD0y6wMMHwJO8b5XOJGQzYbisIxr 0VEnjT7xK8dvEI5Zn4mGvKObOfw/BmLf2dui7c/okb5BeYZCMHZ5Yo5zzLsrxnhpnG1V +OTW1lABQYFojJ8tvdtxl+6Kvr7Wli3JdQCXM3jLqYIoNrh4sq39jHibMXQ9BmxjgYvU idwjcaa+oXCcfG9snRIAAl1jF5B+2zpmwDT2j4uNXsWLC65yPaffzypVNtN29sb9A5nq fl1VVmzUbcEC12+cdU0H1O1QOMzlwtkTko1AbQIbTkHTp6OVJplSmhTfkN/V4e5bKC3H Hq9A== X-Gm-Message-State: AOAM533pzzAomAE18PTuznf5EMEZG6G/OieYmtlPEfhY0lvbXzmMSRVE NZI76iPAoMz6DebhzWxfJNg= X-Google-Smtp-Source: ABdhPJxZXL81jdxgu2l8Z2pMT9tymHke6ye10PrsS6Y0SlTeF9DXY/YcOTm6nLx2l2VvsMbGHXYpXw== X-Received: by 2002:a7b:cc8f:: with SMTP id p15mr19148841wma.158.1637958122726; Fri, 26 Nov 2021 12:22:02 -0800 (PST) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id l7sm8118475wry.86.2021.11.26.12.22.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 12:22:02 -0800 (PST) From: Romain Perier To: Daniel Lezcano , Thomas Gleixner , Daniel Palmer , Romain Perier , Rob Herring Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] ARM: dts: mstar: Remove unused rtc_xtal Date: Fri, 26 Nov 2021 21:21:40 +0100 Message-Id: <20211126202144.72936-3-romain.perier@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211126202144.72936-1-romain.perier@gmail.com> References: <20211126202144.72936-1-romain.perier@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_122204_233160_A7750830 X-CRM114-Status: GOOD ( 10.67 ) 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 The rtc device node use an oscillator @12Mhz right now, namely xtal_div2. rtc_xtal is no longer used, remove it. Signed-off-by: Romain Perier --- arch/arm/boot/dts/mstar-v7.dtsi | 7 ------- 1 file changed, 7 deletions(-) diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi index 89ebfe4f29da..9b335ee4512c 100644 --- a/arch/arm/boot/dts/mstar-v7.dtsi +++ b/arch/arm/boot/dts/mstar-v7.dtsi @@ -55,13 +55,6 @@ xtal: xtal { clock-frequency = <24000000>; }; - rtc_xtal: rtc_xtal { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <32768>; - status = "disabled"; - }; - xtal_div2: xtal_div2 { #clock-cells = <0>; compatible = "fixed-factor-clock"; From patchwork Fri Nov 26 20:21:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 12693778 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 E062EC433F5 for ; Fri, 26 Nov 2021 20:24:18 +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=9iFECQ7quJNaK8GIBbEQ7MI3sF5Vvbs581JJsaXkb4M=; b=f8BMYlgTyyZiuL mNtMpqFeYcqIMOBImQ6y364AnzmSprAkgr3o5gjzsQSBChQK99HryXUUj9UOYxs88HfFH2O0pw/nV WAYFJyH/7vKaUx78wPoN09/dUPtSqgiWl3BbStsSNq94bomuU1VSuafJXw78F06cZnvGyKJnr4D04 GCwVUMkvT3ZoH2BExWxFLoevqR236FUor75TmIM4m5SlYlPplJcRAhM7r8trZwDs4/PlpNYE9Cvlv gwGJdpyrDnFlkrBWmqerWuHM5UhTzzOOHFuWde7y7Q3OYDggorS5cuRRevFUgqmsSUBkuyuAFoVn6 UwrrC8+hYYBcPHZAabMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqhk8-00BhIZ-N7; Fri, 26 Nov 2021 20:22:48 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqhjR-00BhDw-Vf for linux-arm-kernel@lists.infradead.org; Fri, 26 Nov 2021 20:22:07 +0000 Received: by mail-wm1-x32d.google.com with SMTP id az34-20020a05600c602200b0033bf8662572so7539957wmb.0 for ; Fri, 26 Nov 2021 12:22:05 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=qq+/EDGbVO3mNT4nMhuGS7PpCY5cRArGWC5WLtDNkBk=; b=mkXwO8YUv0rvLYlDvbai45/oql7QB/Jl4vwIpxGY53LNifdr62W9JVHqV3+W8CaKcT fP1Os7ZW+6IavaKlwZodUaSaeeZrTf5ZW856mYhqIUGJ0XGchJLb6kPuPXzE0nnyHmZh g+lLZ4myjee77IQmJM0MuZZc8UZxCr8NgChRsK/0YHqtXb1w/3trpC1gUkGDhb1bUosq XodawD5kIj+8h4ONbecP8hktlf3HtyVazlppmdRcJLPJ/I7ZEWcMLC8bHmu+AoYTvRUd oodiFtassVrS9fG60XLKyAMN2+wzvYuamtp3yMiw1KNVVBLbZrp6RXvj0K+oWjtC4E9B nAmQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=qq+/EDGbVO3mNT4nMhuGS7PpCY5cRArGWC5WLtDNkBk=; b=v2+DM3I7UkedtcCi21bF6vBtWsaQuFtmPG8m2nCFzDfpCwbA1HD/EDboZbRyLLRBoh 8RmPVRTCj3NGFmPl6KMhE7ca2Y175drPIFDG47G7b8JBjGorWNaniUYyxtd/sYw3uAX+ Cd95QZ7K3cvLYZ4rJwWDsOGWlN4XCm5wkYGZVTSyJkVtcxZ2VUCf38dcRhHXPHWndVAQ K8XdQ88ZH983zhARwBtFCsBJWjQi8zjGCs+/FQ2aiK8Hu4rQxJvcDyu0kGTJdO02Y0aJ B/kKHJ3d/dE4/Cj6oKkeBaDTc31V/0WCX35hwsA+caoYhQK+QgekncC+nDDJ9fLl5Y5w BjcA== X-Gm-Message-State: AOAM531i0KPzm0BcrPS+sS9yyeCECdIhLuM0jT44UrClmH+qMhOJ8WwP k4ES0w+7Xpxm/p9/tUxJ+0qCWkraZcQ= X-Google-Smtp-Source: ABdhPJwMfpbgXrYtTy/dOfMsrG9kgfAzQdDWEJvt2KMJik3XelFxCHre8Bb1A9CoVH3nu9uWE/C1Zw== X-Received: by 2002:a1c:4d8:: with SMTP id 207mr18243845wme.23.1637958124560; Fri, 26 Nov 2021 12:22:04 -0800 (PST) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id f18sm6358827wre.7.2021.11.26.12.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 12:22:04 -0800 (PST) From: Romain Perier To: Daniel Lezcano , Thomas Gleixner , Daniel Palmer , Romain Perier , Rob Herring Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] dt-bindings: timer: Add Mstar MSC313e timer devicetree bindings documentation Date: Fri, 26 Nov 2021 21:21:42 +0100 Message-Id: <20211126202144.72936-5-romain.perier@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211126202144.72936-1-romain.perier@gmail.com> References: <20211126202144.72936-1-romain.perier@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_122206_083673_725DDF14 X-CRM114-Status: GOOD ( 14.39 ) 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 adds the documentation for the devicetree bindings of the Mstar MSC313e timer driver, found from MSC313e SoCs and newer. Signed-off-by: Romain Perier --- .../bindings/timer/mstar,msc313e-timer.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/mstar,msc313e-timer.yaml diff --git a/Documentation/devicetree/bindings/timer/mstar,msc313e-timer.yaml b/Documentation/devicetree/bindings/timer/mstar,msc313e-timer.yaml new file mode 100644 index 000000000000..f4d43e141dd0 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/mstar,msc313e-timer.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/timer/mstar,msc313e-timer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mstar MSC313e Timer Device Tree Bindings + +maintainers: + - Daniel Palmer + - Romain Perier + +properties: + compatible: + enum: + - mstar,msc313e-timer + - mstar,ssd20xd-timer + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + start-year: true + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +additionalProperties: false + +examples: + - | + #include + + timer@6040 { + compatible = "mstar,msc313e-timer"; + reg = <0x6040 0x40>; + clocks = <&xtal_div2>; + interrupts-extended = <&intc_fiq GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + }; +... From patchwork Fri Nov 26 20:21:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 12693779 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 6126EC433F5 for ; Fri, 26 Nov 2021 20:24:32 +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=iFMDhlzK2yDyEORwdmhp0sGTR12afxixTwVJXs58Hjk=; b=Jwp8o0u0BDndpz vxun/Kr31krHVxUpeEBYHHePO1fTjtGYgKmcXdjg8s3eq4Zym3AzYmhClR96wdgbU9SQaj8CQhMd1 vXPVc68+M357N8yKgEgshtoiIyAfR1uOSK4WQ2gdCTgMm4k5N5d3v3ROREgCnxzlr9UcIGSwZknfM iHLDow5w9FAPh+x/FqUUTO/aDZ7BgH0luJWpRmPED/iL2obJ28bIUxghF8FBsucRvQ432eq/VhPKK 8PvD8GZBfE58xESa5P99p69DZAXrCicBSYFQYdsCe6INEcFzDyBIU38t6Hm440ONm50k1eVzbLcI/ gnlHP38JhwOVvuNsDJng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqhkK-00BhM8-77; Fri, 26 Nov 2021 20:23:00 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqhjS-00BhEK-Rq for linux-arm-kernel@lists.infradead.org; Fri, 26 Nov 2021 20:22:08 +0000 Received: by mail-wr1-x42c.google.com with SMTP id j3so21001757wrp.1 for ; Fri, 26 Nov 2021 12:22:06 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=a03oi73IUIbALiHeFayx9Bqv0K+rE4kVayfrAJF+ar0=; b=qX7uM7p97Jt0FQj6iQEBYdM+mBXQ/ChNeRNfngSQvq/n6N6YwvQjGsylVDLjn/upje pZsrSQl9c0R2YsNsgX1hgWZcfypOwDAKEg/1tNUmb0abjZ8VXuwj1blcW1DdNJa36acy 6YKFLP0VQiBLWgPKoHZgRgIzSsWUfsSbczkuXsFr3qe+G6hLszgm/BDG1u102lixiSaB uKpjZTWgtR6NbjOrxoizXOvLra49t5ViOzZEJlEMxoiuUiURormXWN4B9bMr9vKRqIRN 1m5kfiKm7R74DXQqQgdj/nnXJ1iOOLnQ2PL9UK+fAhJDW16TcKSFc9IEIVsEbzCb66WS 9gfQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=a03oi73IUIbALiHeFayx9Bqv0K+rE4kVayfrAJF+ar0=; b=J6nltBZCw3CKDWfBaA6VPJ7emhsAUl7fux4NzthCbDbnQe7dDMyxc0itA2ZOswRWCv DqKvjH0xUE6LSySp6rvnlRkGskoqYOYM7Vef06HGbXYNPmCvaAI2MESJXJaSOwlwTnNf TiXwN43RAdglQo49Rt0z4+7R68XyxY2DOPYQmBKPew2Pa/KRY6fFFIy2+UqitJlcAwPZ H36WHgCng/HcvANzqWGoyvwM0YmdQ0ahKJS6VnUt8jjiPNPV91DPib9+XtXIARnArMlg WWpYQ9cvCTtPIwLidWOXcYa2/dJS7/cHFmJD6odktjfk6xx+cK5koy9GfDxRylHVvPSh jI0A== X-Gm-Message-State: AOAM5332XL2XRejYFk1NaCGd8GWLOHe9tfN4KvzkoTvlCvVMrrWsAcn9 vJXXK7rtO2jkyXyua50rrEI= X-Google-Smtp-Source: ABdhPJz8uSeuZpTMKhNOKdJcRyH0QQPdOuoobO37b+5kX2WUsmVWOFxZnRjPlDVf30LtKuHPirCsJA== X-Received: by 2002:a5d:6e82:: with SMTP id k2mr16084465wrz.147.1637958125381; Fri, 26 Nov 2021 12:22:05 -0800 (PST) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id m36sm8236955wms.25.2021.11.26.12.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 12:22:05 -0800 (PST) From: Romain Perier To: Daniel Lezcano , Thomas Gleixner , Daniel Palmer , Romain Perier , Rob Herring Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] ARM: dts: mstar: Add timers device nodes Date: Fri, 26 Nov 2021 21:21:43 +0100 Message-Id: <20211126202144.72936-6-romain.perier@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211126202144.72936-1-romain.perier@gmail.com> References: <20211126202144.72936-1-romain.perier@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_122206_926035_036AB64D X-CRM114-Status: GOOD ( 11.85 ) 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 adds the definition of the timers device node. Signed-off-by: Romain Perier --- arch/arm/boot/dts/mstar-v7.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/mstar-v7.dtsi b/arch/arm/boot/dts/mstar-v7.dtsi index 89ebfe4f29da..7ede4cec0af9 100644 --- a/arch/arm/boot/dts/mstar-v7.dtsi +++ b/arch/arm/boot/dts/mstar-v7.dtsi @@ -123,6 +123,26 @@ watchdog@6000 { clocks = <&xtal_div2>; }; + timer@6040 { + compatible = "mstar,msc313e-timer"; + reg = <0x6040 0x40>; + clocks = <&xtal_div2>; + interrupts-extended = <&intc_fiq GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + }; + + timer1: timer@6080 { + compatible = "mstar,msc313e-timer"; + reg = <0x6080 0x40>; + clocks = <&xtal_div2>; + interrupts-extended = <&intc_fiq GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; + }; + + timer2: timer@60c0 { + compatible = "mstar,msc313e-timer"; + reg = <0x60c0 0x40>; + clocks = <&xtal_div2>; + interrupts-extended = <&intc_fiq GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; + }; intc_fiq: interrupt-controller@201310 { compatible = "mstar,mst-intc"; From patchwork Fri Nov 26 20:21:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 12693780 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 EDD8CC433FE for ; Fri, 26 Nov 2021 20:24:52 +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=04E2K0tyaI4xlFgkFebUr4COYz1dfG9PqGOAVjbWuNg=; b=G2xAQFK9Z17QjF s7M/N96J5atwb6TXhQfKgajmkCqzFPQPF9x7KQ8yZAatMF1jB0e8pZGKTVHohJ3vwQv+RPYa9pwGJ JdstlB/Ansaqrri8PBR2SiJ86s3iiODbkeolH102t53hCNE8YKotxu7ZP3iCMb2lO8TzbOgYhr5Yf 6lLEMYHHs8ucELruBnp8x1NbRqdz+1xcSLuK5NrgMD38YF/fUbvXi+jgMzfA2kfF3vEJ6Cs6chQDS 9ORJXoApXLqUmxawjfTJhaidObdtzwb9NMK/Xcdx1hGHNhViCamjzjr4X0cXZddB8l9S40SJg7f8m WQ8GmG22kqM2U/KNoiGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqhkg-00Bhaa-Ri; Fri, 26 Nov 2021 20:23:23 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqhjV-00BhEg-NI for linux-arm-kernel@lists.infradead.org; Fri, 26 Nov 2021 20:22:10 +0000 Received: by mail-wr1-x42e.google.com with SMTP id a9so20971482wrr.8 for ; Fri, 26 Nov 2021 12:22:07 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=/bjLeLE8NisM6I6x1ix9MSyRmnprV2Uww+hlJ5LbrFk=; b=jAea0yatGm2kjrF5pO/TRDoDEIdz9mmVwiuKkzv5K1FHSXMraphJ2xs3Zk9umxV6tY 7oTuIH/SkGA69zCglBihqdSrdmEb+X83lcl/g2edGvCidp0ryd/Sdxfysk/Yu4GdvMbY etkaRn2JvNAszHS6/myD4fDxFtgm3MAhWyLxa0Wf0NDTxqNba4enQfvsoPONclR2tcEo Vegs403IjyZhp1nO6bO0G1J7Re4eB0q17RjckEKzaSzwMgM2rMmLCIzpPu4fYnfJXofY sp6KKcDHa/TgOxr5NCXVPiiAVZYxryv+qsyP5UxKQ++nKcI0xmOXVt0cXWNfH1KlGsZD pzzg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=/bjLeLE8NisM6I6x1ix9MSyRmnprV2Uww+hlJ5LbrFk=; b=r+EZxTGyGw5ReOK324mIZLIWVZtW1Qua3lsBzUIX1ZPPoj6Mpue69TxQpeVvwowMmW 1FCvL7r43o0hZoeSgtQImgMlCU9YD/+b1sHF9jIttrgaMo4Mlcg/U//VfdsJZEjyr/qF 5hcX7SgORibzLvs8wFKqVG/YuZlYo711RpgFMauLnZsw8ddot2GHk6KrOfB6/zr7K5Zu vIWkw55+AtByDuEH8o77jQz6AZXU6ki0OkJqJMe3TgCUcitnnqPuRt/1PMkMpHafZTBj 6PFWWnmxYSJH70n31BT9UKvNZeKUhF4BXcU5CGGCeYr9ZL37J1UPxrt9LkOuEzLinh3u ISew== X-Gm-Message-State: AOAM531DGN5P1m94JDz9x/h63i611bxNwJT4Ja1wJbk11j7bp3cFOQL2 F/NpYt14EwrHt9Tp5epivVA= X-Google-Smtp-Source: ABdhPJwkMeFhdNvv6zrQBQAJpIm1bhwUMJDtlNZjSQHYx7AO6OXvKEqLvLWtoZ+ZErqWeVYTr8bBWA== X-Received: by 2002:adf:b34f:: with SMTP id k15mr17056010wrd.125.1637958126248; Fri, 26 Nov 2021 12:22:06 -0800 (PST) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id u23sm6980262wru.21.2021.11.26.12.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 12:22:05 -0800 (PST) From: Romain Perier To: Daniel Lezcano , Thomas Gleixner , Daniel Palmer , Romain Perier , Rob Herring Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] ARM: dts: mstar: Switch to compatible "mstar, ssd20xd-timer" on ssd20xd Date: Fri, 26 Nov 2021 21:21:44 +0100 Message-Id: <20211126202144.72936-7-romain.perier@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211126202144.72936-1-romain.perier@gmail.com> References: <20211126202144.72936-1-romain.perier@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211126_122209_787972_9DC62C8A X-CRM114-Status: GOOD ( 11.57 ) 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 defines the real oscillators as input of timer1 and timer2 and switch to "mstar,ssd20xd-timer". Signed-off-by: Romain Perier --- .../arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi b/arch/arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi index 6f067da61ba3..6ff1f02e00a0 100644 --- a/arch/arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi +++ b/arch/arm/boot/dts/mstar-infinity2m-ssd20xd.dtsi @@ -6,6 +6,14 @@ #include "mstar-infinity2m.dtsi" +/ { + xtal_timer: timer_xtal { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <432000000>; + }; +}; + &gpio { compatible = "sstar,ssd20xd-gpio"; status = "okay"; @@ -15,3 +23,13 @@ &smpctrl { compatible = "sstar,ssd201-smpctrl", "mstar,smpctrl"; status = "okay"; }; + +&timer1 { + compatible = "mstar,ssd20xd-timer"; + clocks = <&xtal_timer>; +}; + +&timer2 { + compatible = "mstar,ssd20xd-timer"; + clocks = <&xtal_timer>; +};