From patchwork Fri Jul 28 21:13:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9869499 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E50ED60382 for ; Fri, 28 Jul 2017 21:13:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDEDA288CE for ; Fri, 28 Jul 2017 21:13:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C28C6288FE; Fri, 28 Jul 2017 21:13:26 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 393D9288CE for ; Fri, 28 Jul 2017 21:13:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752700AbdG1VNZ (ORCPT ); Fri, 28 Jul 2017 17:13:25 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34787 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbdG1VNX (ORCPT ); Fri, 28 Jul 2017 17:13:23 -0400 Received: by mail-wr0-f195.google.com with SMTP id o33so19840098wrb.1; Fri, 28 Jul 2017 14:13:22 -0700 (PDT) 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; bh=hcQCr5PF9Ob6uacB2x6HZ647A52y30jSxl5pBDtXgAo=; b=Ke30nvXlu+AG9ZOJVcok6zjA/4kAatc1gWOsC6ABrw6paI8zUdAXSQV51/0tRpDrk5 DI1T5p5Dcpht3SXtoS0IgvHi+uq++Zelh8X/XuMRJqMOV/F24ywLL0Uf4Y4dREMhrtmJ 5OzYD28EugcMGgwvXTOGieTT9KxWl87C1HpeZTkfnhtYEqUAqC5EAofPpAnNtBcSRph9 cnqVbl95qe3jCnmvKR4HFCtESVZ6GsOjZWkV0ysABXBnh46HsxyS4RuLRkuvFzHxFPW5 HEVnfIP1TyY4Eyv8gF3FpN8e4RWrZYo5/v4A3V6A76CZwZtJfvYPIkaPyycdv3EbR/mg AF1Q== 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; bh=hcQCr5PF9Ob6uacB2x6HZ647A52y30jSxl5pBDtXgAo=; b=sTfbnGFQ28+JDCq+1PZqC7rQV1l5MD5eJzqNzLzvZ+fAMKg9Wg3IUoZNxOqUfno/NJ upwVhYwCATd8aX2sYAKNBzwfqco3eU6bcFeLQrVMnM+Qa9mtNU0nq3TrGVwsYF+kpmDf hGF8n+qlOmpGLDvCjxKicd6DgfGtT8a5br4SOnoJXMb/FCGKADMa9RFWyWSYNsCseGx5 U67x8f8h0dDfa/ZKirT3bBwsROFrwX/C/fE80dmU79/Gf1DGeixCiLpqJTmEhhQdJ556 ewRSmTLo12h6dm+rEMS7GIAK3FsaYARTXyc99sAith/rduI/zYNmMbkaJRykbV+AspaV D21g== X-Gm-Message-State: AIVw113qzHDvBLGoWSzxSJHp2hoHaB1kkK8J6sY5yjn7+OBAYNC72KI2 xn2jdyS7Trxb/A== X-Received: by 10.223.164.20 with SMTP id d20mr6908761wra.183.1501276401769; Fri, 28 Jul 2017 14:13:21 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD3DFC504D5EDFADFEF0C8DD0.dip0.t-ipconnect.de. [2003:dc:d3df:c504:d5ed:fadf:ef0c:8dd0]) by smtp.googlemail.com with ESMTPSA id h68sm22913134wrh.32.2017.07.28.14.13.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2017 14:13:21 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com, carlo@caione.org, narmstrong@baylibre.com, jbrunet@baylibre.com, linux-clk@vger.kernel.org, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux@armlinux.org.uk, mark.rutland@arm.com, mturquette@baylibre.com, sboyd@codeaurora.org, Martin Blumenstingl Subject: [PATCH v3 1/3] dt-bindings: clock: meson8b: describe the embedded reset controller Date: Fri, 28 Jul 2017 23:13:11 +0200 Message-Id: <20170728211313.10603-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170728211313.10603-1-martin.blumenstingl@googlemail.com> References: <20170728211313.10603-1-martin.blumenstingl@googlemail.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Amlogic Meson8/Meson8b/Meson8m2 clock controller provides some reset lines. These are used for example to boot the secondary CPU cores. This patch describes the reset controller which is embedded into the clock controller on these SoCs. A header file is provided which provides preprocessor macros for each reset line (to make the .dts files easier to read). Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Acked-by: Rob Herring --- .../bindings/clock/amlogic,meson8b-clkc.txt | 9 +++++++- .../dt-bindings/reset/amlogic,meson8b-clkc-reset.h | 27 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/reset/amlogic,meson8b-clkc-reset.h diff --git a/Documentation/devicetree/bindings/clock/amlogic,meson8b-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,meson8b-clkc.txt index 606da38c0959..c858fd64f680 100644 --- a/Documentation/devicetree/bindings/clock/amlogic,meson8b-clkc.txt +++ b/Documentation/devicetree/bindings/clock/amlogic,meson8b-clkc.txt @@ -16,18 +16,25 @@ Required Properties: mapped region. - #clock-cells: should be 1. +- #reset-cells: should be 1. Each clock is assigned an identifier and client nodes can use this identifier to specify the clock which they consume. All available clocks are defined as preprocessor macros in the dt-bindings/clock/meson8b-clkc.h header and can be used in device tree sources. +Similarly a preprocessor macro for each reset line is defined in +dt-bindings/reset/amlogic,meson8b-clkc-reset.h (which can be used from the +device tree sources). + + Example: Clock controller node: clkc: clock-controller@c1104000 { - #clock-cells = <1>; compatible = "amlogic,meson8b-clkc"; reg = <0xc1108000 0x4>, <0xc1104000 0x460>; + #clock-cells = <1>; + #reset-cells = <1>; }; diff --git a/include/dt-bindings/reset/amlogic,meson8b-clkc-reset.h b/include/dt-bindings/reset/amlogic,meson8b-clkc-reset.h new file mode 100644 index 000000000000..1f1b56e57346 --- /dev/null +++ b/include/dt-bindings/reset/amlogic,meson8b-clkc-reset.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2017 Martin Blumenstingl . + * + * SPDX-License-Identifier: (GPL-2.0+ OR MIT) + */ + +#ifndef _DT_BINDINGS_AMLOGIC_MESON8B_CLKC_RESET_H +#define _DT_BINDINGS_AMLOGIC_MESON8B_CLKC_RESET_H + +#define CLKC_RESET_L2_CACHE_SOFT_RESET 0 +#define CLKC_RESET_AXI_64_TO_128_BRIDGE_A5_SOFT_RESET 1 +#define CLKC_RESET_SCU_SOFT_RESET 2 +#define CLKC_RESET_CPU0_SOFT_RESET 3 +#define CLKC_RESET_CPU1_SOFT_RESET 4 +#define CLKC_RESET_CPU2_SOFT_RESET 5 +#define CLKC_RESET_CPU3_SOFT_RESET 6 +#define CLKC_RESET_A5_GLOBAL_RESET 7 +#define CLKC_RESET_A5_AXI_SOFT_RESET 8 +#define CLKC_RESET_A5_ABP_SOFT_RESET 9 +#define CLKC_RESET_AXI_64_TO_128_BRIDGE_MMC_SOFT_RESET 10 +#define CLKC_RESET_VID_CLK_CNTL_SOFT_RESET 11 +#define CLKC_RESET_VID_DIVIDER_CNTL_SOFT_RESET_POST 12 +#define CLKC_RESET_VID_DIVIDER_CNTL_SOFT_RESET_PRE 13 +#define CLKC_RESET_VID_DIVIDER_CNTL_RESET_N_POST 14 +#define CLKC_RESET_VID_DIVIDER_CNTL_RESET_N_PRE 15 + +#endif /* _DT_BINDINGS_AMLOGIC_MESON8B_CLKC_RESET_H */