Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/canaan,k210-sysctl.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Canaan Kendryte K210 System Controller Device Tree Bindings
0008 
0009 maintainers:
0010   - Damien Le Moal <damien.lemoal@wdc.com>
0011 
0012 description:
0013   Canaan Inc. Kendryte K210 SoC system controller which provides a
0014   register map for controlling the clocks, reset signals and pin power
0015   domains of the SoC.
0016 
0017 properties:
0018   compatible:
0019     items:
0020       - const: canaan,k210-sysctl
0021       - const: syscon
0022       - const: simple-mfd
0023 
0024   clocks:
0025     maxItems: 1
0026     description:
0027       System controller Advanced Power Bus (APB) interface clock source.
0028 
0029   clock-names:
0030     items:
0031       - const: pclk
0032 
0033   reg:
0034     maxItems: 1
0035 
0036   clock-controller:
0037     # Child node
0038     type: object
0039     $ref: "../clock/canaan,k210-clk.yaml"
0040     description:
0041       Clock controller for the SoC clocks. This child node definition
0042       should follow the bindings specified in
0043       Documentation/devicetree/bindings/clock/canaan,k210-clk.yaml.
0044 
0045   reset-controller:
0046     # Child node
0047     type: object
0048     $ref: "../reset/canaan,k210-rst.yaml"
0049     description:
0050       Reset controller for the SoC. This child node definition
0051       should follow the bindings specified in
0052       Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml.
0053 
0054   syscon-reboot:
0055     # Child node
0056     type: object
0057     $ref: "../power/reset/syscon-reboot.yaml"
0058     description:
0059       Reboot method for the SoC. This child node definition
0060       should follow the bindings specified in
0061       Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml.
0062 
0063 required:
0064   - compatible
0065   - clocks
0066   - reg
0067   - clock-controller
0068 
0069 additionalProperties: false
0070 
0071 examples:
0072   - |
0073     #include <dt-bindings/clock/k210-clk.h>
0074     #include <dt-bindings/reset/k210-rst.h>
0075 
0076     clocks {
0077       in0: oscllator {
0078         compatible = "fixed-clock";
0079         #clock-cells = <0>;
0080         clock-frequency = <26000000>;
0081       };
0082     };
0083 
0084     sysctl: syscon@50440000 {
0085       compatible = "canaan,k210-sysctl",
0086                    "syscon", "simple-mfd";
0087       reg = <0x50440000 0x100>;
0088       clocks = <&sysclk K210_CLK_APB1>;
0089       clock-names = "pclk";
0090 
0091       sysclk: clock-controller {
0092         #clock-cells = <1>;
0093         compatible = "canaan,k210-clk";
0094         clocks = <&in0>;
0095       };
0096 
0097       sysrst: reset-controller {
0098         compatible = "canaan,k210-rst";
0099         #reset-cells = <1>;
0100       };
0101 
0102       reboot: syscon-reboot {
0103         compatible = "syscon-reboot";
0104         regmap = <&sysctl>;
0105         offset = <48>;
0106         mask = <1>;
0107         value = <1>;
0108       };
0109     };