From patchwork Tue Nov 24 04:37:17 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: 1405242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=YQk5ll0O; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CgB8t3N0vz9sSf for ; Tue, 24 Nov 2020 15:38:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729243AbgKXEhx (ORCPT ); Mon, 23 Nov 2020 23:37:53 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:49765 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729212AbgKXEhw (ORCPT ); Mon, 23 Nov 2020 23:37:52 -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=1606192672; x=1637728672; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4U4b/nqfPlar1rNpNlwWEX+TNC6mHk8oUWWOJcFYm1M=; b=YQk5ll0O9xao0bXLkzvqJc56ySV+P1quNeBXKzX0+us2BkCXl6RsqI+A IbORSBza3fMnTZhcmIGWHU59WY8EL9x+zSuCKoVCogtJiUVH9EaIuLbLJ 0XSjBuFWcDDOWmAF8F73RLvR7Jb7sOHCMaqm6Cdqqob3OsWtgUUH+xS2N nA/5kok79v9Ur4JjpSoL+E+1nrz1pluBVynOmsbSJFZeyzyqGPj/zbRGp /puqzsS/gclsOH8mpjnLNz1P+xd/NE+Yx9/exbpQ38awjOdr3YsjYkKmQ 6NzmsPnGuKBAUoFH+qQKhIXsPr+ZJYEGkyEk77U8zBhdbuWdxfannYlFJ g==; IronPort-SDR: o+E0EoC8qyaWdI34u2lKD38EYo//HP2BCnXsEH/MQuN50upJE7QzG5fH+TBlZkB8S2N3ACV7wy lq+k1dApN8lNXY4f7u4iiGx3W3nxctZsckZCWKvN3mMzqd9stWrIcAvA9cWLPddXEoEziz+8qq 89m4hhK/MH0Mheo0XUJRg+ev/JoWE8zr2Ns2W5L8TqQje71UkcvsYDy+Ua61vweRKxZ/eUU4fK gbsXTLtjhihRYVYPxPKS4FlfTkINmv0/qVBRdhjuApWen17qiQ58zwleDTnlKH8oIkL2yTvoWw 6v0= X-IronPort-AV: E=Sophos;i="5.78,365,1599494400"; d="scan'208";a="154498179" 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; 24 Nov 2020 12:37:52 +0800 IronPort-SDR: zbyQQ8Y6G1Fl6vpurAIXmSRXbwbsFgNI48vD6inQZfj/q5zXl8lRqxGiGXzUOEGExxNrEBa3Ya SlEPkC8a1AYfMU0Rh/5mbHwNtBaJaIiF4= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2020 20:23:36 -0800 IronPort-SDR: KW8XA8QthMRijnEQvOULnXjnXH6M30sFyb1Wlq7PRN4kUqs3vgKxHCqvY+wrsxhbePKEIe8q7d aKSFqfkLbZMg== WDCIronportException: Internal Received: from hdrdzf2.ad.shared (HELO twashi.fujisawa.hgst.com) ([10.84.71.163]) by uls-op-cesaip01.wdc.com with ESMTP; 23 Nov 2020 20:37:50 -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 v2 10/21] dt-binding: Document canaan,k210-sysctl bindings Date: Tue, 24 Nov 2020 13:37:17 +0900 Message-Id: <20201124043728.199852-11-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201124043728.199852-1-damien.lemoal@wdc.com> References: <20201124043728.199852-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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..1847def8e8f6 --- /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: osc { + 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>; + }; + };