From patchwork Wed Dec 9 05:34:55 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: 11960389 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 F0156C4361B for ; Wed, 9 Dec 2020 05:35:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8B3C23B23 for ; Wed, 9 Dec 2020 05:35:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8B3C23B23 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=L7pKDQ8FNdDGTP9LZZNKNFtlZNdyRJ1pPg1A5hebDYI=; b=VcXn24aDxAyqkUiO3vYY1r0yf 5QNR7gKsbEOTmYXNtOyvF9j6aK9kE9eVMc4ul/pTBaC9zRLl4YUcsg8AGYkT/tqSKnPiMwYmzRWSt DbeElzRktoFkPtGMS4Vta4hg9s/DCFg8T/ypDK3vGmQ40WHOhw9xS8wQflP4fGri8VXdeK/cTLNWI 8SdaPAiGZEpaIpGQYIEP1vcRYS0dQ2mQ4IyShxbT8AmQftb11KTSv3+PElBuHmwjnkQWorYGn/7f+ OGLNQE+IZpcVekLbRcQzRaoBeyCwRGERxYr+H5EeR5UvKM5PG4mEU2HO78R1HKRws1odfNBONfSA0 fcxJkJHbg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kms8a-00081r-58; Wed, 09 Dec 2020 05:35:40 +0000 Received: from esa2.hgst.iphmx.com ([68.232.143.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kms8U-0007xt-CR for linux-riscv@lists.infradead.org; Wed, 09 Dec 2020 05:35:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1607492354; x=1639028354; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=irTVIQIcf04Qv4d6ntB8ZOD8tnnSkj9g+ksFRT5I7iY=; b=I/WxIz4rXbg2NrkTQy+FqVckmMnQEg0jhLTRZ60F318qP8kChIbyFdT8 3aPFpk/yHK0rrz30gH9sNDYrU1mktE4CHl2IF1ZH4O/+Fri8shv28abjl 22+3mk4VjCvMpDWdhdM+0YIZuAq/JqdsE312Sh4OA/hDtWEjNJmQDxfOg Q+VzoldPVhV6/032hcZ1YL+daulQPK7ej/+3qzlnWzRv52Y5LCgKczcOQ zdpJgFbv+9rvzqDx6dVhLv1rEkDRlFBIxwtSqxWVv7FnRkSpxWBT/NdwO gp7y/VvK1VV096d3ALuQaF/2TPs0Rhjtf6RiXroRG5o4gJhHQfJ9guPuE A==; IronPort-SDR: DCm8ILN3hMtMIGfB/2r73oWVZ57fFRb1zsbUefwe+888P2nZewu5M1Qohzv38yWMHjIfjAKHE5 IgPc9cwesGleX2LuxGzHahUMt15ShaR7dSM9gzgFYWXl5WU0rVFGgxarMgp4lVbnb8JT1JpeyE cnOug6HnYmljaZSV3UliyCx7HRquTsmPUIaRQ59rjyxE3VJwagvWX1jbdunPz1ZvY8gXMU5OaE WhUWLhu+A3qQwRJ/GD/29TEcKA/PaJzz/qA9BHbtwNhOsnN3ockTuouNGtuUENj3r2rbpYXfV7 uJs= X-IronPort-AV: E=Sophos;i="5.78,404,1599494400"; d="scan'208";a="258465540" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 09 Dec 2020 13:39:13 +0800 IronPort-SDR: /ccwaMdtqA2LpjY976Nk8mdRvDYgSvdAP8S/eDz3U17iXvCcjxxXKExepV6tuP8shNir9IfFRF 3njc02No8U+apdi3QEVQoTceUekxldZ6Q= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2020 21:21:00 -0800 IronPort-SDR: GJmnq7w0IhRhheiSh3mHMDeWiAKpF183abZghRPoDlQ717ftmRl5DJAKnbXtneSvK3DXR3xQ2K jb4dWMqnO/Zg== WDCIronportException: Internal Received: from wdapacbjl0003.my.asia.wdc.com (HELO twashi.fujisawa.hgst.com) ([10.84.71.173]) by uls-op-cesaip02.wdc.com with ESMTP; 08 Dec 2020 21:35:32 -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 Subject: [PATCH v6 11/22] dt-binding: mfd: Document canaan, k210-sysctl bindings Date: Wed, 9 Dec 2020 14:34:55 +0900 Message-Id: <20201209053506.122582-12-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201209053506.122582-1-damien.lemoal@wdc.com> References: <20201209053506.122582-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201209_003534_603336_33D4A7D3 X-CRM114-Status: GOOD ( 13.34 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Anderson Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.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>; + }; + };