From patchwork Fri Nov 23 19:53:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10696331 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2686C13BB for ; Fri, 23 Nov 2018 19:53:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1587D2871F for ; Fri, 23 Nov 2018 19:53:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09B972876E; Fri, 23 Nov 2018 19:53:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AAC3F2871F for ; Fri, 23 Nov 2018 19:53:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zmIFhWbIujXRt71TiCA5dLhS3MhPsgli69vBH/5UI9E=; b=Qm/NyFfV1yL84I mOlHrEOrs6SvocK85VD0Y6FqtndSwkGnAu1zCdRa/t1ZxzIsq1mr3J+wsFpETWimMxRABAZSZGpn5 73B/qbUeNycBhsQy7eAVeahd3Y4Erg6EotWJnDcH2RlGs7Oc7oZmU5iqagpGHTVgmIEyL6flQxani NAKpQjD2oGuTgsuZCpkofnyAzNf0vOANNsiKGOqfHJbx9xS61L1F3B8W8VOYUyj1IQ/E4StrXcjqp ui0OCuYYMNkOkZywfy9CysOEQ8eD/qJtiOXUwopKAqQxDM36VMywhyLDZNQBQpIz7c6mSslpwarv9 eMptj4JXXAohD4KNFwGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHWN-0007tY-6g; Fri, 23 Nov 2018 19:53:47 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHWC-0007do-VA; Fri, 23 Nov 2018 19:53:38 +0000 Received: by mail-wr1-x443.google.com with SMTP id z5so9038305wrt.11; Fri, 23 Nov 2018 11:53:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7HbOh/pMDb/8M3M5bu0WWSItxe+N1uRR4AZ9SpzTcn4=; b=ojQASPlswdjZbwZZixTwGAoD3LkDgLf+QTPYx9rpr4ZCNbyRTA80nT+uDOtY1O1uTt OV5CNm6WQl8hcllTmq1DIknFO6ZTNdlZYhIPQpCNE1TlV7+x2aaPIdW4Lsg1REVrzm00 STEHWbW49c1Zl+tyOfm8tq/v2orxJhQnou23xzI5YsvZVlwHQq+Yjxh7CYAStCGQFP0j L4FQCm50G5ctfW9DJWUktdBOhKB2rY5inESlo+wSW/i3da3NPdCCVDD5NPtfixDdItaf 6eicTL1YY1AZYKpsnQf6x3TZnSBskhneCzESgZ0L2Mrtwwfk638RmGgyPbTcYDshr47b 9BoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7HbOh/pMDb/8M3M5bu0WWSItxe+N1uRR4AZ9SpzTcn4=; b=tjKLgRYCC+iXNPYsLCrDMoBtN4q25Fje1PpYZjctb1FKRcb6kGaHNFg1rYfnlJrKs6 rtZFiSnAsxuppyHVozAHfWIR4zZpLtC82E+M6uLAJGqkY4DcHQRxsXsK9SPUFQhCqoMG 3xfuTP0FmUfphtIsk0gW2TNHmWHOaReroKvgiL3EQ1x9GuSRKxJos0OHsZVlzn/S96LZ nBoWcTNiWB9z+hriyu50qJe8xnZPbA5kIXXCFr5LJPBOBS1xO1SeFnWs6A3KKBEug+to P3w+AVdLBoQgqvtqxLSWFQObnHhFFLU4H+xn1dgwd4ZOX5vLLHRPPgH0OblI6cv2XaCe ekmw== X-Gm-Message-State: AA+aEWYhDbnyn71fscXJ0eiPDhyH7/KR2yy5EGrGjHcPspqINoT+0/NL xnwGaCOIvWAWe6niPgtym2g= X-Google-Smtp-Source: AFSGD/XX14zN1TOyJS+/BykItwNfzkg7wmUizhdX78YVn8HbmS/6/lOS9CmeE5PDa4ic/W99vJlaWA== X-Received: by 2002:a5d:4b01:: with SMTP id v1mr14633629wrq.5.1543002805240; Fri, 23 Nov 2018 11:53:25 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD732F500597D16A631573221.dip0.t-ipconnect.de. [2003:dc:d732:f500:597d:16a6:3157:3221]) by smtp.googlemail.com with ESMTPSA id g198sm11495337wmd.23.2018.11.23.11.53.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 11:53:24 -0800 (PST) From: Martin Blumenstingl To: carlo@caione.org, khilman@baylibre.com, linux-amlogic@lists.infradead.org Subject: [PATCH 1/6] ARM: meson: select HAVE_ARM_TWD and ARM_GLOBAL_TIMER Date: Fri, 23 Nov 2018 20:53:06 +0100 Message-Id: <20181123195311.4578-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> References: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181123_115336_999592_EB136CBB X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The 32-bit Meson SoCs use multiple Cortex-A9 (Meson8 and Meson8m2) or Cortex-A5 (Meson8b) CPU cores. These come with the "ARM global timer" and "Timer-Watchdog" (aka TWD, which provides both a per-cpu local timer and watchdog). Selecting ARM_GLOBAL_TIMER and HAVE_ARM_TWD allows us to add the timers to the SoC.dtsi files. Signed-off-by: Martin Blumenstingl --- arch/arm/mach-meson/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig index d51cfda953d4..b16831697183 100644 --- a/arch/arm/mach-meson/Kconfig +++ b/arch/arm/mach-meson/Kconfig @@ -4,12 +4,14 @@ menuconfig ARCH_MESON select GPIOLIB select GENERIC_IRQ_CHIP select ARM_GIC + select ARM_GLOBAL_TIMER select CACHE_L2X0 select PINCTRL select PINCTRL_MESON select COMMON_CLK select COMMON_CLK_AMLOGIC select HAVE_ARM_SCU if SMP + select HAVE_ARM_TWD if SMP if ARCH_MESON From patchwork Fri Nov 23 19:53:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10696349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B0145A4 for ; Fri, 23 Nov 2018 20:00:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A55A2BF82 for ; Fri, 23 Nov 2018 20:00:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EAEA2BF84; Fri, 23 Nov 2018 20:00:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CBFC82BF82 for ; Fri, 23 Nov 2018 20:00:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TQPygRlM/I+IwzLWbEeDXPoE0Lp5jmLAAEVdZCuaOV8=; b=bpBZK1qFyXVdKA /+AWbN6ACBTvonJb7d6BUJ+pfQ66Ccp4GHdSt32EtTzD6Mq9EuF+uDDxLcj07yaAfr/W4cA4X83xB 2VvZoSbYewLRbZZpoHoV5A3j6nDjMvjLbEojkMA0QMuQK7MCjQP8E2DV0rnHcmNDiNttclEigXTDS gbQzlwgWsp+QPYzffD31zX8YhclLYJgOF4xmd+sEhj/K6iuhPrRLAtzj8HUwzkF31jmETvzAfZ7Ko vCMEipQUEgsB4+bFw6rmdBp5xRaKkglyAgR9CHUVUgblSrh4cHcNRcUNrjzTR/cmw8B8fq/x7tycX fWvNkM3eekkObdzK+LqA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHck-0003y4-JA; Fri, 23 Nov 2018 20:00:22 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHWE-0007dw-54; Fri, 23 Nov 2018 19:53:39 +0000 Received: by mail-wm1-x341.google.com with SMTP id u13-v6so12978588wmc.4; Fri, 23 Nov 2018 11:53:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Uk6NbW6xFFI/4/JJNngXdoHaDRPggf+bny1s89MRwTM=; b=MNgeUNvVGBLyaLH4ke0l9DdlneCQT5PmpstMQ74LIjJupfYPa8aINF+dRcYQktr59Y 4sY9NSG2VDwd6MGUrYWwgcixradfn8C4iWwv3A5tjOLx4Q2WjDaqgzCUQuLNv5h/exCY aNm1BasYP6Qui/wb7NNQvwPkHZX7T8djUFacnbDrBj/SVX5u7P5yZHmRT1CFBiklPf31 iaKa5qbEMdFPdSr0QoFO5TBgXPJqYQBQx+/twitijqf4CGv1PDCHCFjiYv3ebPYYJrlh CGkzBgdxFvKOEt2WrQFg99nvhc1xrpCWUIqSJIBcZi0cR/tCvtvNyShCwcxG4o7BACS8 dglQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Uk6NbW6xFFI/4/JJNngXdoHaDRPggf+bny1s89MRwTM=; b=LTy68Rv4cQ+HfmRCS09HTyIaALMOvibHGJEaANWlS2MhUGE9gxiiRBqdIdj8MN0CKF ACCz5TDKsB8pRf6tLhdA35O7zPZCVI6L0GrfoRFeNZHenZ8rF2eH1XK8AF+kynX8hqyW xg+5e6JO11Nq0IChwVhWvWS3xM9FFEGXjCSzW/VFywf21/w6gdkquG8qzDW5CQBIQ+6g dZ4lcN4V8HZMBYdDs/6kFYLO+DqtxoyJqahwM2x0wbH3sqGWp9btLIho6A/i90J8SwYF +/Qu7u/cMxrfFT3cqpgMipZMUPEOlJQPKDbMMNf1/+u202kDdNrvMy92WJ2rE1/TtU8G tQxg== X-Gm-Message-State: AA+aEWYr89ps64+JXOiwE4i4aBF6XKawd18JfaFf5/6mB5fmy/VJMgp3 AaGX1lEB5gzP4ULn+q/dCFz65k3+ X-Google-Smtp-Source: AFSGD/WjneB/cPaXtp4qCTMTg78oMJHAtgOSgrgtky6YR75WtV0VRog9ctb+PenzpvqXhMUIUyxBrQ== X-Received: by 2002:a1c:2d5:: with SMTP id 204mr11905221wmc.115.1543002806306; Fri, 23 Nov 2018 11:53:26 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD732F500597D16A631573221.dip0.t-ipconnect.de. [2003:dc:d732:f500:597d:16a6:3157:3221]) by smtp.googlemail.com with ESMTPSA id g198sm11495337wmd.23.2018.11.23.11.53.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 11:53:25 -0800 (PST) From: Martin Blumenstingl To: carlo@caione.org, khilman@baylibre.com, linux-amlogic@lists.infradead.org Subject: [PATCH 2/6] ARM: dts: meson: group the Cortex-A5 / Cortex-A9 peripherals Date: Fri, 23 Nov 2018 20:53:07 +0100 Message-Id: <20181123195311.4578-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> References: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181123_115338_191445_B5CCF0F0 X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The public Meson8b (S805) datasheet describes a memory region called "A9 Periph base" which starts at 0xC4300000 and ends at 0xC430FFFF. Add a simple-bus node and move all peripherals that are part of this memory region. This makes the .dts a bit easier to read. No functional changes. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson.dtsi | 24 ++++++++++++++++-------- arch/arm/boot/dts/meson8.dtsi | 12 +++++++----- arch/arm/boot/dts/meson8b.dtsi | 12 +++++++----- 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi index 0839da07a75c..e4645f612712 100644 --- a/arch/arm/boot/dts/meson.dtsi +++ b/arch/arm/boot/dts/meson.dtsi @@ -59,14 +59,6 @@ cache-level = <2>; }; - gic: interrupt-controller@c4301000 { - compatible = "arm,cortex-a9-gic"; - reg = <0xc4301000 0x1000>, - <0xc4300100 0x0100>; - interrupt-controller; - #interrupt-cells = <3>; - }; - soc { compatible = "simple-bus"; #address-cells = <1>; @@ -207,6 +199,22 @@ }; }; + periph: bus@c4300000 { + compatible = "simple-bus"; + reg = <0xc4300000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0xc4300000 0x10000>; + + gic: interrupt-controller@1000 { + compatible = "arm,cortex-a9-gic"; + reg = <0x1000 0x1000>, + <0x100 0x100>; + interrupt-controller; + #interrupt-cells = <3>; + }; + }; + aobus: aobus@c8100000 { compatible = "simple-bus"; reg = <0xc8100000 0x100000>; diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 3be5fbd07997..28b9f6779993 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -129,11 +129,6 @@ no-map; }; }; - - scu@c4300000 { - compatible = "arm,cortex-a9-scu"; - reg = <0xc4300000 0x100>; - }; }; /* end of / */ &aobus { @@ -362,6 +357,13 @@ arm,shared-override; }; +&periph { + scu@0 { + compatible = "arm,cortex-a9-scu"; + reg = <0x0 0x100>; + }; +}; + &pwm_ab { compatible = "amlogic,meson8-pwm", "amlogic,meson8b-pwm"; }; diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index 587a855f872b..6b097ab8637f 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -112,11 +112,6 @@ no-map; }; }; - - scu@c4300000 { - compatible = "arm,cortex-a5-scu"; - reg = <0xc4300000 0x100>; - }; }; /* end of / */ &aobus { @@ -349,6 +344,13 @@ arm,shared-override; }; +&periph { + scu@0 { + compatible = "arm,cortex-a5-scu"; + reg = <0x0 0x100>; + }; +}; + &pwm_ab { compatible = "amlogic,meson8b-pwm"; }; From patchwork Fri Nov 23 19:53:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10696347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 723815A4 for ; Fri, 23 Nov 2018 20:00:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60E6D2BF82 for ; Fri, 23 Nov 2018 20:00:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 525742BF84; Fri, 23 Nov 2018 20:00:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F24D32BF82 for ; Fri, 23 Nov 2018 20:00:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b2GylQzJDB86yTNpt+gjXCvc/upMskRo/gMDPSbwWIc=; b=fZOGYKay3dfiXJ D4q0pK59gC91ajfsH6ihtRtj8O+n2XIH6M2l8UqLt/LfdTGXlxZyOgvc2rHU4y5wzLMo/btE9lf+e Ym0sOf8YEKbVEvRn3sjXiSxIdeTpCbAzmQ7IJg619YDlDM/v30rzahsebjgqHRyFZ5onIVwmgkshU WSMwzalGwRHfQSBOStfDerFj5WIqbfZzIPa4YA1vdYQsVoZ1RygYyojIT/ap8uDl6b/72osjivp4D DQPEl9kz1eAI5NjzsXWAWeP9HwN374PR6p8JsjhpBrkhTm5ZJPgGgeTvFgdQfBcAgbYPaGWMBudaK XH1DG5v7DhHDGBfY4jhg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHci-0003ug-Iv; Fri, 23 Nov 2018 20:00:20 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHWE-0007e3-54; Fri, 23 Nov 2018 19:53:39 +0000 Received: by mail-wm1-x341.google.com with SMTP id s11so12986927wmh.1; Fri, 23 Nov 2018 11:53:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M61cDCLQgQA9sNaBzxtJV4zAi7xq2DD5D1gWlGJ8y7Q=; b=WF3sxssQSCYAnuy6c55yz7y0QR84Us0Tl1uC09Ii4PgQxTdGrS3/VqOYFPBvZ0mc21 PfTAOFgwskn2x6Ua3bJOmymPPJy2ZDLTDOh9Mrd70JItG0q+FDx6YQmWEMw9GgZX0ySf EMmH7z4JL3hV2w60YupkN/JC2MDT3RaBVSv9vXuXhiahyWLpdU58FsIZMMS/gou0yCv/ /rHDGrpXKmmtNTnkFlRwz7E3y6DBgoqdW/ZRxRUFxw8Ud2thQANtwfE7Z96SA5uzTSDh aSPk6Xp4w12SYmH8l+42EU5Ajwjf4Wif2W4Ts9TwaujAtfyxQyWsLaclovND6Hfemg+3 UDWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M61cDCLQgQA9sNaBzxtJV4zAi7xq2DD5D1gWlGJ8y7Q=; b=SOoDXVqiOKsDLW9yGDaFfNwmG72GnCCsLmUROJAZkAL/FSKRodcXaQRBwkuGZUonDB YJ5+8wmD3ZNEDRfuM8JhxGZo+Eyo4Crv/IDcF2agivQXZdWXzTB6m9LXHl6gALsu25qC NVWHpPDU311Di3HhVArWR+nga7zYo5fSvO90ULxvBgSJO3tQOD21tvNQaqQAXrj/HSzs gA5tqyqQUE1Cu+rgV/JF/X4XKc+HC15nxiS8JJeWS4amZ31SLD2P9W2pYgKPoalWQH7/ V4cDpiWVhBX6W6wnw70ux2ZPeLo/N/aynhqfrlerH/it8kYxN77Em0uC0iJ0csGadGwz Sf8g== X-Gm-Message-State: AGRZ1gK+goYdJMYhwZmnIxwXAsllv4gZ11GnnEkhPpsqPFpdmZljCenx FfY6obIW4KUimihkv33I4cw= X-Google-Smtp-Source: AJdET5eVOW+nRFP4Nitw9c3pyyJV/5bFIqiget0Vkz147/tONK3RusfFunjDix6qGT/EHcoLi0pJMA== X-Received: by 2002:a1c:730b:: with SMTP id d11mr13726144wmb.29.1543002807667; Fri, 23 Nov 2018 11:53:27 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD732F500597D16A631573221.dip0.t-ipconnect.de. [2003:dc:d732:f500:597d:16a6:3157:3221]) by smtp.googlemail.com with ESMTPSA id g198sm11495337wmd.23.2018.11.23.11.53.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 11:53:26 -0800 (PST) From: Martin Blumenstingl To: carlo@caione.org, khilman@baylibre.com, linux-amlogic@lists.infradead.org Subject: [PATCH 3/6] ARM: dts: meson8: add the ARM TWD timer Date: Fri, 23 Nov 2018 20:53:08 +0100 Message-Id: <20181123195311.4578-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> References: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181123_115338_191802_3B583085 X-CRM114-Status: GOOD ( 11.59 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Meson8 and Meson8m2 SoC are using four ARM Cortex-A9 cores which come with a "TWD" (Timer-Watchdog) based timer. This adds support for the ARM TWD Timer on these two SoCs. Suggested-by: Carlo Caione [ rebased patch from Carlo, use IRQ_TYPE_EDGE_RISING instead of IRQ_TYPE_LEVEL_LOW to prevent "GIC: PPI13 is secure or misconfigured" message during boot, use pre-processor macros to specify the IRQ, added the correct clock, dropped TWD watchdog node since there's no driver for it anymore ] Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 28b9f6779993..2b0b3edbd896 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -362,6 +362,13 @@ compatible = "arm,cortex-a9-scu"; reg = <0x0 0x100>; }; + + timer@600 { + compatible = "arm,cortex-a9-twd-timer"; + reg = <0x600 0x20>; + interrupts = ; + clocks = <&clkc CLKID_PERIPH>; + }; }; &pwm_ab { From patchwork Fri Nov 23 19:53:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10696355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 500425A4 for ; Fri, 23 Nov 2018 20:00:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EC20286AE for ; Fri, 23 Nov 2018 20:00:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32A6D2BF83; Fri, 23 Nov 2018 20:00:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE39C286AE for ; Fri, 23 Nov 2018 20:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oHrZjJY2hWnlvFfVUjXAK/ufzIMDWX5D1w7CBMbJ+nY=; b=CHCewhcEAWlEZe C/O1OqEiYsOzpMKOMH6rbFRmbwiGe0lrBRqgpxfIW5fyWIa336qg6Hi8ZLYwXDiC6auzpO2aHJWm5 YB9G6ctnSxDtM5gmSFvCYxbkXPZ84Ptl3LZrHJ4EiCLcZCkXZomWKE2DJmHqp1JhiP8wgXngy9Wlt RXCuRrhhPKQYQAlXsHmlW9fWyX+RQYBokcfYvrEk075IXzn9RtJyE2r9Vt17/bafx8Tb3wfcDrgGp XOFovgWkoiBvBJ9B4VbFn+yWqTsXiYB0Qi+vsuR0kjBi7JShooBtAIYd+aqWg9s6A619NE57FDTkO f/pDYpGcBsPtPW/UMA4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHd9-0004YN-7O; Fri, 23 Nov 2018 20:00:47 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHWG-0007e4-HI; Fri, 23 Nov 2018 19:53:43 +0000 Received: by mail-wr1-x442.google.com with SMTP id p4so13344767wrt.7; Fri, 23 Nov 2018 11:53:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BoOn6WTxlwavf65DbwHydv4Xd7ja4A3o1y3Q9+BXoUc=; b=oWr9/8lWcfbP1NgcvUYxiLWASzyptweuU7b1ABtqtlf28PrNPXSmhoLG8e+6Zz446x JR77fpYnXmeV5yuyaSW++DMo1tFbXo7bOXHeiMmh5HXp6KX3t/SursOJt2l/YBQjBALw wBONO5l6Xq+ljXa50hJH2/q4Z1rRr8Kycj8JduTvT/JqB+2lwlNKFGRD2FifVgk1Tj5B oflt24QE6++lpCf7H2L6NPu8r5ZIuCw4Mk8IJ6zvvXsneCS8FiAfV0flRzLYe7VFEc/g 3yQc0VLhG9fIgrNAs4ZbLEGwdxU2LELOyrG1Z1zlDkjOYT/GO0O3SYE+0b/xFEKfVYiQ /VRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BoOn6WTxlwavf65DbwHydv4Xd7ja4A3o1y3Q9+BXoUc=; b=ZHJ7O8+Ic0ZmGUjpocnbtZ5qGnlm9vElwiDBqLZDOfJzOndBvcmxtx3kW8vqZ6T1Az sRXxrcHozWyGFMmo7CxoRUF5Ll1uFN25ygVDXqDBLMil+d/9N218tyTDsoFmdJE5egLo hpoVI7nPAHWF46q4k6VPA9i0N+uOBLA2e6MJrhlZl1WAFDBTBV+AhxeCXL/Btyi3XqWt gj6J0DUlJ0CXsl8pcJSYd+TN7x14gL5m/d8BK7x5aPpTQHzZ4lWPXjBlmJtIOC0jXwe4 jGsSCx6gYenWbIKbQqwnnlrjAiL0Ol3ckWJuejg2/DznskBUeouuw/dsHDrQCRrKSJ7t RcMg== X-Gm-Message-State: AA+aEWZVDsW9Ka9urIG5yP6czxF/gs8Y7kUO8JRVrfa18kpOuL7mKSI1 2zbErj0fedc91nnWgrYjMcw= X-Google-Smtp-Source: AFSGD/WPpPun6H0bsMadmb9/+iZ4oiq8FDm5jX2mjw7Ginr5bCq9cCGOj4U/G2f70sp/9VBzGr3PCA== X-Received: by 2002:adf:c6c3:: with SMTP id c3-v6mr14724361wrh.243.1543002808790; Fri, 23 Nov 2018 11:53:28 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD732F500597D16A631573221.dip0.t-ipconnect.de. [2003:dc:d732:f500:597d:16a6:3157:3221]) by smtp.googlemail.com with ESMTPSA id g198sm11495337wmd.23.2018.11.23.11.53.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 11:53:28 -0800 (PST) From: Martin Blumenstingl To: carlo@caione.org, khilman@baylibre.com, linux-amlogic@lists.infradead.org Subject: [PATCH 4/6] ARM: dts: meson8: add the Cortex-A9 global timer Date: Fri, 23 Nov 2018 20:53:09 +0100 Message-Id: <20181123195311.4578-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> References: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181123_115340_818719_B46B8966 X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Meson8 and Meson8m2 SoCs are using four Cortex-A9 cores. These come with an ARM global timer. This adds the Cortex-A9 global timer but keeps it disabled for now. The timer is clocked by the "PERIPH" clock whose rate can change during runtime (when changing the frequency of the CPU clock). Unfortunately the arm_global_timer driver does not handle changes to the clock rate yet. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 2b0b3edbd896..2575a5835567 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -363,6 +363,19 @@ reg = <0x0 0x100>; }; + timer@200 { + compatible = "arm,cortex-a9-global-timer"; + reg = <0x200 0x20>; + interrupts = ; + clocks = <&clkc CLKID_PERIPH>; + + /* + * the arm_global_timer driver currently does not handle clock + * rate changes. Keep it disabled for now. + */ + status = "disabled"; + }; + timer@600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0x600 0x20>; From patchwork Fri Nov 23 19:53:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10696335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B9125A4 for ; Fri, 23 Nov 2018 19:54:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A80F286DF for ; Fri, 23 Nov 2018 19:54:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F1662BF0D; Fri, 23 Nov 2018 19:54:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C92F8286DF for ; Fri, 23 Nov 2018 19:54:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YUlxQjwZ4BWHS7nWrXzb2yiMZD3bDyGl6d2L+FddgPc=; b=uPGeroEWLxFNCA cbQWLaOK9otczt1qsd9YlZwPO7xJeFQolkmMs6mGaYtGergPza3udKx+1cNIIBn5db4s9fCIcikLv OVxSEEskwkTJ8pkTRMHMkw6t0x6ALYZw7J8N6DCu6CzT0VTbb/MYsFFUTRKgoriCreSjNX04V3FGz S7dRCprL6EYarzarF7iI5BKiIQJcuBv7razuvM1HP04aukY1ovLl3l8e6NfPCCeda6tR0TU+htJpX KLkFWNkk83+AIQu1xTqsTl/keiG2EDcNwG5jhWlTUVLUzc8KRaS5UG9IuUvBPgMsgkGcqxFPIwA9z RgaXIxltxlms1iNOZTQg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHWv-0008NK-Ib; Fri, 23 Nov 2018 19:54:21 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHWH-0007eA-QY; Fri, 23 Nov 2018 19:53:45 +0000 Received: by mail-wr1-x444.google.com with SMTP id r10so13323028wrs.10; Fri, 23 Nov 2018 11:53:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HrHiabzypDdx9sXk/8fCSUY/mMOsDJBAnI+t/Q5NOr4=; b=Ej+/3NqgYL6iugilKeZ6Fxa/3llufEJG0Vo7RoAS8oiyiiZgNi4/WzAvt9uvp/B8oW D0fqd5SH8FwvgbUbOLfEbbqwekCPR98rdtwAuk6KT3VPVxmhb//Sm2+nR7QSZGJGQPQ+ RTEW/BiVNn8L90xVaIDwGCJcx/g/WYZxoDucIf0Pr0fZUIJuE5Qc++mII0051jGS9IUF tqIaJot+ETjObqwUr17KpH1ZhaWlO0xBjT8p74Jt3oMACzKEF1nS7NIEELd1kR71h+ok BFWGjqWGJatJ9hJEqcH89yU1YvHOZNEfEWBR3IFka/aw9EYVOp9BMYfYoN/AuwHUqveC +mZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HrHiabzypDdx9sXk/8fCSUY/mMOsDJBAnI+t/Q5NOr4=; b=sOc10FNvAYug+yQiNMIv4i57dyW28jWw3qIaIBvmAl78Petdc+Ff4hhfADSDXguBU1 hts/2edOHp9FyeF2f3nlJrptUUAuaTri+x2ZK25tQgu2ydegUEqujTF4q7B7TyhN1CPP KjhxUzto+XCKdQdH3avuIReks0UM2ekYnpkf04oVhtJHiwvhVBpCE69OtxMQrQFbt4re UyM0yaDlHlQbBazzjOn4NGZ6cQLhZTYIAS1sKPAzRLpizQwJL/zYE38rcRIBlSpPUKka DPf5WlXo9uBhByE5g8K8l798PXubHHieSIg0MxUikdknnFIcURXDhy0LmNdpc8rxFDJk f4hg== X-Gm-Message-State: AA+aEWap/k2qk7RGTsj8WpnI1Ju56d1JNHwvcFN+KzrcAqCUleorroKI wDid87yFvqjdzNGFwqgDnhk= X-Google-Smtp-Source: AFSGD/UlnQrPsB5Ujyi8MQoIsaH/g/I5gwf206RcLXExa2vxtpmhmi4D+pHqfQGRV2c9V5MDmCbpjQ== X-Received: by 2002:a5d:56d2:: with SMTP id m18mr16323404wrw.113.1543002810075; Fri, 23 Nov 2018 11:53:30 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD732F500597D16A631573221.dip0.t-ipconnect.de. [2003:dc:d732:f500:597d:16a6:3157:3221]) by smtp.googlemail.com with ESMTPSA id g198sm11495337wmd.23.2018.11.23.11.53.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 11:53:29 -0800 (PST) From: Martin Blumenstingl To: carlo@caione.org, khilman@baylibre.com, linux-amlogic@lists.infradead.org Subject: [PATCH 5/6] ARM: dts: meson8b: add the ARM TWD timer Date: Fri, 23 Nov 2018 20:53:10 +0100 Message-Id: <20181123195311.4578-6-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> References: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181123_115342_345467_9C7665F4 X-CRM114-Status: GOOD ( 10.90 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Meson8B SoC is using four ARM Cortex-A5 cores which come with a "TWD" (Timer-Watchdog) based timer. This adds support for the ARM TWD Timer on this SoC. Suggested-by: Carlo Caione [ rebased patch from Carlo, use IRQ_TYPE_EDGE_RISING instead of IRQ_TYPE_LEVEL_LOW to prevent "GIC: PPI13 is secure or misconfigured" message during boot, use pre-processor macros to specify the IRQ, added the correct clock, dropped TWD watchdog node since there's no driver for it anymore ] Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index 6b097ab8637f..a3a5649e32fa 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -349,6 +349,13 @@ compatible = "arm,cortex-a5-scu"; reg = <0x0 0x100>; }; + + timer@600 { + compatible = "arm,cortex-a5-twd-timer"; + reg = <0x600 0x20>; + interrupts = ; + clocks = <&clkc CLKID_PERIPH>; + }; }; &pwm_ab { From patchwork Fri Nov 23 19:53:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10696337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C82213BB for ; Fri, 23 Nov 2018 19:54:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A992286DF for ; Fri, 23 Nov 2018 19:54:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F10F2BF0D; Fri, 23 Nov 2018 19:54:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 03E95286DF for ; Fri, 23 Nov 2018 19:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tAZNDckaF1dOhLW34uSgO6EpaQtVDxJv/kgqAE4NSBI=; b=V2hzEEX2a+j7NF NbN/J4hASSMDjxwwicPvbF+/akyg08E5dNudcSMDL/d/TowlG8mHaDqqNFx7fzS4knyya2x7n4HcD c2vL7e6CYcO10cjko0EsAGeeyhdgJzM/PnAIUMWQkMna4A2n4PXz2aHPjfDSg19cHh/NWCsH7totI hp4FDSDyhhQ4/hiHI7kbNrKtz21Pw4OPJHYvnZpqMk94HXNY98Tc1fyMk/fGaBYq9E2kcYT1N5dy1 fd6dS6x+MpSrk1zjWiAYbJ9AoNZ5I9OzVoHKUFcS+77ecx/dnRGAlZJrk4xW3DNpmAMDtK2/349cF N4u8lvaRdWgeDePQSbtQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHX0-0008Tr-Df; Fri, 23 Nov 2018 19:54:26 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQHWI-0007eY-VK; Fri, 23 Nov 2018 19:53:48 +0000 Received: by mail-wm1-x344.google.com with SMTP id 79so12264957wmo.0; Fri, 23 Nov 2018 11:53:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BtJ8/ior5XarJZafC0TR6eFgTbDH+g1bBywq7Yhl7So=; b=qR0f03U6jWYKzWGUGH3Ph79PNSbD7rSU5e0OCOchMQ5LltlzWJstK21WaqTS7Ltrlv 1/EDaagXtFhRFrfktQAiSC31Xkt18nMrHH6my6jA1v9yrgalDiZiYxwjXFhM49c2wzoX wptUhAiEnbZcuKmPP1DAyFWB+ViwqeR6zuADIwx/14Qjmp669WB4iWGDvLWwuAueE844 5dSjWQMmggv2ijkjT8GDpFmj9fCrb6c8n0AiAKDpDzkim6WZLw0cszsOI8ihDoo2/yhH tLsC3QT6R1khbJAt0qHct66OyXjPAgfPC+6DWRqSUianamqRZvSIBTP+xKIfAAAZ7Jny 4a0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BtJ8/ior5XarJZafC0TR6eFgTbDH+g1bBywq7Yhl7So=; b=sJdqha9Z7YBavYhPY0Du2EKr+phUoiXN22FBdUebALDiAMzkkaK+kQMlYOOmPzL7/Y UjaqNSL5V9g30HpieKSUY9X0SKYJZqADuM7isA2Xf2ufNoMoUD1IdcAgokRdTI01scCf f/+v7uGD48iXF1hgagXTmoxrdn3iMU+sHdjdWaIlar81qKJjC2n77sAmqerI/MT34dWp Ukgl5QA5xNZrBngIh9qOGOLV1TmZxq97WB25DX3dGkSn2sR38y2YVZxE3u3vINZ4/SfG OSMlza1MCCzqwXeALD7uCPlDe4YWohnVg57bjLF1Xvvn1z3d1/FnBNwF3sPpNCiAD6ZY rXyg== X-Gm-Message-State: AA+aEWaCrroEdFq7qgEe3NYxiSkppQwWFTmJ75CNFFrMocIE/kNdaRS3 a33ke1yYxvmaGNPA6TD+nBI= X-Google-Smtp-Source: AJdET5ee544o4sAtCgcDvUAQK9C61pvQfASctCobRHUpaOycLuWuhWdwDBPxowV1KIrVxu66+Ryr0w== X-Received: by 2002:a1c:1dce:: with SMTP id d197mr15751793wmd.66.1543002811237; Fri, 23 Nov 2018 11:53:31 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD732F500597D16A631573221.dip0.t-ipconnect.de. [2003:dc:d732:f500:597d:16a6:3157:3221]) by smtp.googlemail.com with ESMTPSA id g198sm11495337wmd.23.2018.11.23.11.53.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 11:53:30 -0800 (PST) From: Martin Blumenstingl To: carlo@caione.org, khilman@baylibre.com, linux-amlogic@lists.infradead.org Subject: [PATCH 6/6] ARM: dts: meson8b: add the Cortex-A5 global timer Date: Fri, 23 Nov 2018 20:53:11 +0100 Message-Id: <20181123195311.4578-7-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> References: <20181123195311.4578-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181123_115343_295959_21A2E16D X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Meson8b SoC is using four Cortex-A5 cores. These come with an ARM global timer. This adds the Cortex-A5 global timer but keeps it disabled for now. The timer is clocked by the "PERIPH" clock whose rate can change during runtime (when changing the frequency of the CPU clock). Unfortunately the arm_global_timer driver does not handle changes to the clock rate yet. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index a3a5649e32fa..a38d187d3d6e 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -350,6 +350,19 @@ reg = <0x0 0x100>; }; + timer@200 { + compatible = "arm,cortex-a5-global-timer"; + reg = <0x200 0x20>; + interrupts = ; + clocks = <&clkc CLKID_PERIPH>; + + /* + * the arm_global_timer driver currently does not handle clock + * rate changes. Keep it disabled for now. + */ + status = "disabled"; + }; + timer@600 { compatible = "arm,cortex-a5-twd-timer"; reg = <0x600 0x20>;