xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/canaan,k210-sysctl.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/canaan,k210-sysctl.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Canaan Kendryte K210 System Controller
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
10*fac71e4eSEmmanuel Vadot  - Damien Le Moal <dlemoal@kernel.org>
115def4c47SEmmanuel Vadot
125def4c47SEmmanuel Vadotdescription:
135def4c47SEmmanuel Vadot  Canaan Inc. Kendryte K210 SoC system controller which provides a
145def4c47SEmmanuel Vadot  register map for controlling the clocks, reset signals and pin power
155def4c47SEmmanuel Vadot  domains of the SoC.
165def4c47SEmmanuel Vadot
175def4c47SEmmanuel Vadotproperties:
185def4c47SEmmanuel Vadot  compatible:
195def4c47SEmmanuel Vadot    items:
205def4c47SEmmanuel Vadot      - const: canaan,k210-sysctl
215def4c47SEmmanuel Vadot      - const: syscon
225def4c47SEmmanuel Vadot      - const: simple-mfd
235def4c47SEmmanuel Vadot
245def4c47SEmmanuel Vadot  clocks:
255def4c47SEmmanuel Vadot    maxItems: 1
265def4c47SEmmanuel Vadot    description:
275def4c47SEmmanuel Vadot      System controller Advanced Power Bus (APB) interface clock source.
285def4c47SEmmanuel Vadot
295def4c47SEmmanuel Vadot  clock-names:
305def4c47SEmmanuel Vadot    items:
315def4c47SEmmanuel Vadot      - const: pclk
325def4c47SEmmanuel Vadot
335def4c47SEmmanuel Vadot  reg:
345def4c47SEmmanuel Vadot    maxItems: 1
355def4c47SEmmanuel Vadot
365def4c47SEmmanuel Vadot  clock-controller:
375def4c47SEmmanuel Vadot    # Child node
385def4c47SEmmanuel Vadot    type: object
39*fac71e4eSEmmanuel Vadot    $ref: ../clock/canaan,k210-clk.yaml
405def4c47SEmmanuel Vadot    description:
415def4c47SEmmanuel Vadot      Clock controller for the SoC clocks. This child node definition
425def4c47SEmmanuel Vadot      should follow the bindings specified in
435def4c47SEmmanuel Vadot      Documentation/devicetree/bindings/clock/canaan,k210-clk.yaml.
445def4c47SEmmanuel Vadot
455def4c47SEmmanuel Vadot  reset-controller:
465def4c47SEmmanuel Vadot    # Child node
475def4c47SEmmanuel Vadot    type: object
48*fac71e4eSEmmanuel Vadot    $ref: ../reset/canaan,k210-rst.yaml
495def4c47SEmmanuel Vadot    description:
505def4c47SEmmanuel Vadot      Reset controller for the SoC. This child node definition
515def4c47SEmmanuel Vadot      should follow the bindings specified in
525def4c47SEmmanuel Vadot      Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml.
535def4c47SEmmanuel Vadot
545def4c47SEmmanuel Vadot  syscon-reboot:
555def4c47SEmmanuel Vadot    # Child node
565def4c47SEmmanuel Vadot    type: object
57*fac71e4eSEmmanuel Vadot    $ref: ../power/reset/syscon-reboot.yaml
585def4c47SEmmanuel Vadot    description:
595def4c47SEmmanuel Vadot      Reboot method for the SoC. This child node definition
605def4c47SEmmanuel Vadot      should follow the bindings specified in
615def4c47SEmmanuel Vadot      Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml.
625def4c47SEmmanuel Vadot
635def4c47SEmmanuel Vadotrequired:
645def4c47SEmmanuel Vadot  - compatible
655def4c47SEmmanuel Vadot  - clocks
665def4c47SEmmanuel Vadot  - reg
675def4c47SEmmanuel Vadot  - clock-controller
685def4c47SEmmanuel Vadot
695def4c47SEmmanuel VadotadditionalProperties: false
705def4c47SEmmanuel Vadot
715def4c47SEmmanuel Vadotexamples:
725def4c47SEmmanuel Vadot  - |
735def4c47SEmmanuel Vadot    #include <dt-bindings/clock/k210-clk.h>
745def4c47SEmmanuel Vadot    #include <dt-bindings/reset/k210-rst.h>
755def4c47SEmmanuel Vadot
765def4c47SEmmanuel Vadot    clocks {
775def4c47SEmmanuel Vadot      in0: oscllator {
785def4c47SEmmanuel Vadot        compatible = "fixed-clock";
795def4c47SEmmanuel Vadot        #clock-cells = <0>;
805def4c47SEmmanuel Vadot        clock-frequency = <26000000>;
815def4c47SEmmanuel Vadot      };
825def4c47SEmmanuel Vadot    };
835def4c47SEmmanuel Vadot
845def4c47SEmmanuel Vadot    sysctl: syscon@50440000 {
855def4c47SEmmanuel Vadot      compatible = "canaan,k210-sysctl",
865def4c47SEmmanuel Vadot                   "syscon", "simple-mfd";
875def4c47SEmmanuel Vadot      reg = <0x50440000 0x100>;
885def4c47SEmmanuel Vadot      clocks = <&sysclk K210_CLK_APB1>;
895def4c47SEmmanuel Vadot      clock-names = "pclk";
905def4c47SEmmanuel Vadot
915def4c47SEmmanuel Vadot      sysclk: clock-controller {
925def4c47SEmmanuel Vadot        #clock-cells = <1>;
935def4c47SEmmanuel Vadot        compatible = "canaan,k210-clk";
945def4c47SEmmanuel Vadot        clocks = <&in0>;
955def4c47SEmmanuel Vadot      };
965def4c47SEmmanuel Vadot
975def4c47SEmmanuel Vadot      sysrst: reset-controller {
985def4c47SEmmanuel Vadot        compatible = "canaan,k210-rst";
995def4c47SEmmanuel Vadot        #reset-cells = <1>;
1005def4c47SEmmanuel Vadot      };
1015def4c47SEmmanuel Vadot
1025def4c47SEmmanuel Vadot      reboot: syscon-reboot {
1035def4c47SEmmanuel Vadot        compatible = "syscon-reboot";
1045def4c47SEmmanuel Vadot        regmap = <&sysctl>;
1055def4c47SEmmanuel Vadot        offset = <48>;
1065def4c47SEmmanuel Vadot        mask = <1>;
1075def4c47SEmmanuel Vadot        value = <1>;
1085def4c47SEmmanuel Vadot      };
1095def4c47SEmmanuel Vadot    };
110