From patchwork Thu Dec 10 03:39:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 341262 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59752C433FE for ; Thu, 10 Dec 2020 03:43:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2482B23A1D for ; Thu, 10 Dec 2020 03:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730684AbgLJDna (ORCPT ); Wed, 9 Dec 2020 22:43:30 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:39174 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730774AbgLJDnX (ORCPT ); Wed, 9 Dec 2020 22:43:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1607572563; x=1639108563; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JaZDfj3HCaC7CI61ySYE6mZNZ1qz3fve+oOLHQcNsw0=; b=hsZWtux90/JF+JsccR8h02OYdhsR7GM+gsIjz41XJi+eBXU/KL7IWgfM fG7V9KbOyGMWimeoLxY2g3Hn2JKSo3IcHjwA0OyskNB/s4fuYd3aZ8uFS /ilurLnYIg8CRMK15LQcvbNK/yfwRJzSe02KQYOMxSDZwB18/xK7gU9H+ 4yMqbysY2AORg3TdQaKb696CT+IWj+waetYq/RipiHx7Uts+4+uAx7kyk mtXJyXnsHqvklc6y4QDNNkVdaQg+1UDjOVNLIHKwJYYVtsvagO7efB8PK oxsX/wJpP4Mg2j+27MnZ280HE3047aqdX6R5uvUJZJoFHAgev66b6+QE2 A==; IronPort-SDR: 4SXSvXu1Cfu9d8mThtZXpCCA9h5erj46JKaTL6ba+amD43W5WCaftH02v7Lo4np+CGuQH76W+j zaEdvFhmUY2R/5KZzmd1+TWj68YyPBZ6HG36obI9wMGgtW7euN5J6yM6QZstRtx4OZAj00R3Lk EzPWtNUKLXSV2P+X40kp1p6vXnL6r7EXRP8cHd/SKo04Hgti4djLJCp4nfAad31Vizko4S+mGZ IzcRknca9Ilj8pkRw8NXJ67f8rziNw7A9JJEm0QO3MwIc1Wp0qyZmZrWX3mkemo4UwHHl+cFkD d2A= X-IronPort-AV: E=Sophos;i="5.78,407,1599494400"; d="scan'208";a="258551226" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 10 Dec 2020 11:51:51 +0800 IronPort-SDR: 0ibW312YUAr6kbJEN4hjlvBHQYy1vOZDbbxHdfiECL/3rUTwitWkfKkCdNr/R5wqHw0ISnHG61 T6nWpqz43LvXKhStbaopsCREH9RL+r2Kc= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2020 19:24:31 -0800 IronPort-SDR: eL+rpgnFXYq7QUaqmc8crg6HDOagzHVKydLQIIms3nYfQ46Pw3bCLZcKh60Qts1j47nsHO5FFa IeJAjI8YSs4A== WDCIronportException: Internal Received: from wdapacbjl0003.my.asia.wdc.com (HELO twashi.fujisawa.hgst.com) ([10.84.71.173]) by uls-op-cesaip01.wdc.com with ESMTP; 09 Dec 2020 19:40:33 -0800 From: Damien Le Moal To: Palmer Dabbelt , linux-riscv@lists.infradead.org, Rob Herring , devicetree@vger.kernel.org, Stephen Boyd , linux-clk@vger.kernel.org, Linus Walleij , linux-gpio@vger.kernel.org, Philipp Zabel Cc: Sean Anderson Subject: [PATCH v7 11/22] dt-binding: mfd: Document canaan, k210-sysctl bindings Date: Thu, 10 Dec 2020 12:39:52 +0900 Message-Id: <20201210034003.222297-12-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210034003.222297-1-damien.lemoal@wdc.com> References: <20201210034003.222297-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document the device tree bindings of the Canaan Kendryte K210 SoC system controller driver in Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml. Signed-off-by: Damien Le Moal --- .../bindings/mfd/canaan,k210-sysctl.yaml | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml diff --git a/Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml b/Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml new file mode 100644 index 000000000000..a61d8ea4fbec --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/canaan,k210-sysctl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Canaan Kendryte K210 System Controller Device Tree Bindings + +maintainers: + - Damien Le Moal + +description: + Canaan Inc. Kendryte K210 SoC system controller which provides a + register map for controlling the clocks, reset signals and pin power + domains of the SoC. + +properties: + compatible: + allOf: + - items: + - const: canaan,k210-sysctl + - const: syscon + - const: simple-mfd + + clocks: + description: + System controller Advanced Power Bus (APB) interface clock source. + + clock-names: + maxItems: 1 + items: + - const: pclk + + reg: + maxItems: 1 + description: + Offset and length of the system controller register space. + + reg-io-width: + const: 4 + + clock-controller: + # Child node + type: object + $ref: "../clock/canaan,k210-clk.yaml" + description: + Clock controller for the SoC clocks. This child node definition + should follow the bindings specified in + Documentation/devicetree/bindings/clock/canaan,k210-clk.yaml. + + reset-controller: + # Child node + type: object + $ref: "../reset/canaan,k210-rst.yaml" + description: + Reset controller for the SoC. This child node definition + should follow the bindings specified in + Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml. + + syscon-reboot: + # Child node + type: object + $ref: "../power/reset/syscon-reboot.yaml" + description: + Reboot method for the SoC. This child node definition + should follow the bindings specified in + Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml. + +required: + - compatible + - clocks + - reg + - clock-controller + +additionalProperties: false + +examples: + - | + #include + #include + + clocks { + in0: oscllator { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <26000000>; + }; + }; + + sysctl: syscon@50440000 { + compatible = "canaan,k210-sysctl", + "syscon", "simple-mfd"; + reg = <0x50440000 0x100>; + reg-io-width = <4>; + clocks = <&sysclk K210_CLK_APB1>; + clock-names = "pclk"; + + sysclk: clock-controller { + #clock-cells = <1>; + compatible = "canaan,k210-clk"; + clocks = <&in0>; + }; + + sysrst: reset-controller { + compatible = "canaan,k210-rst"; + #reset-cells = <1>; + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&sysctl>; + offset = <48>; + mask = <1>; + value = <1>; + }; + };