xref: /freebsd-src/sys/contrib/device-tree/Bindings/reset/ti-syscon-reset.txt (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1c66ec88fSEmmanuel VadotTI SysCon Reset Controller
2c66ec88fSEmmanuel Vadot=======================
3c66ec88fSEmmanuel Vadot
4c66ec88fSEmmanuel VadotAlmost all SoCs have hardware modules that require reset control in addition
5c66ec88fSEmmanuel Vadotto clock and power control for their functionality. The reset control is
6c66ec88fSEmmanuel Vadottypically provided by means of memory-mapped I/O registers. These registers are
7c66ec88fSEmmanuel Vadotsometimes a part of a larger register space region implementing various
8c66ec88fSEmmanuel Vadotfunctionalities. This register range is best represented as a syscon node to
9c66ec88fSEmmanuel Vadotallow multiple entities to access their relevant registers in the common
10c66ec88fSEmmanuel Vadotregister space.
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel VadotA SysCon Reset Controller node defines a device that uses a syscon node
13c66ec88fSEmmanuel Vadotand provides reset management functionality for various hardware modules
14c66ec88fSEmmanuel Vadotpresent on the SoC.
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel VadotSysCon Reset Controller Node
17c66ec88fSEmmanuel Vadot============================
18c66ec88fSEmmanuel VadotEach of the reset provider/controller nodes should be a child of a syscon
19c66ec88fSEmmanuel Vadotnode and have the following properties.
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel VadotRequired properties:
22c66ec88fSEmmanuel Vadot--------------------
23c66ec88fSEmmanuel Vadot - compatible		: Should be,
24c66ec88fSEmmanuel Vadot			    "ti,k2e-pscrst"
25c66ec88fSEmmanuel Vadot			    "ti,k2l-pscrst"
26c66ec88fSEmmanuel Vadot			    "ti,k2hk-pscrst"
27c66ec88fSEmmanuel Vadot			    "ti,syscon-reset"
28c66ec88fSEmmanuel Vadot - #reset-cells		: Should be 1. Please see the reset consumer node below
29c66ec88fSEmmanuel Vadot			  for usage details
30c66ec88fSEmmanuel Vadot - ti,reset-bits	: Contains the reset control register information
31c66ec88fSEmmanuel Vadot			  Should contain 7 cells for each reset exposed to
32c66ec88fSEmmanuel Vadot			  consumers, defined as:
33c66ec88fSEmmanuel Vadot			    Cell #1 : offset of the reset assert control
34c66ec88fSEmmanuel Vadot			              register from the syscon register base
35c66ec88fSEmmanuel Vadot			    Cell #2 : bit position of the reset in the reset
36c66ec88fSEmmanuel Vadot			              assert control register
37c66ec88fSEmmanuel Vadot			    Cell #3 : offset of the reset deassert control
38c66ec88fSEmmanuel Vadot			              register from the syscon register base
39c66ec88fSEmmanuel Vadot			    Cell #4 : bit position of the reset in the reset
40c66ec88fSEmmanuel Vadot			              deassert control register
41c66ec88fSEmmanuel Vadot			    Cell #5 : offset of the reset status register
42c66ec88fSEmmanuel Vadot			              from the syscon register base
43c66ec88fSEmmanuel Vadot			    Cell #6 : bit position of the reset in the
44c66ec88fSEmmanuel Vadot			              reset status register
45c66ec88fSEmmanuel Vadot			    Cell #7 : Flags used to control reset behavior,
46*aa1a8ff2SEmmanuel Vadot			              available flags defined in the DT include
47c66ec88fSEmmanuel Vadot			              file <dt-bindings/reset/ti-syscon.h>
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel VadotSysCon Reset Consumer Nodes
50c66ec88fSEmmanuel Vadot===========================
51c66ec88fSEmmanuel VadotEach of the reset consumer nodes should have the following properties,
52c66ec88fSEmmanuel Vadotin addition to their own properties.
53c66ec88fSEmmanuel Vadot
54c66ec88fSEmmanuel VadotRequired properties:
55c66ec88fSEmmanuel Vadot--------------------
56c66ec88fSEmmanuel Vadot - resets	: A phandle to the reset controller node and an index number
57c66ec88fSEmmanuel Vadot		  to a reset specifier as defined above.
58c66ec88fSEmmanuel Vadot
59c66ec88fSEmmanuel VadotPlease also refer to Documentation/devicetree/bindings/reset/reset.txt for
60c66ec88fSEmmanuel Vadotcommon reset controller usage by consumers.
61c66ec88fSEmmanuel Vadot
62c66ec88fSEmmanuel VadotExample:
63c66ec88fSEmmanuel Vadot--------
64c66ec88fSEmmanuel VadotThe following example demonstrates a syscon node, the reset controller node
65c66ec88fSEmmanuel Vadotusing the syscon node, and a consumer (a DSP device) on the TI Keystone 2
66c66ec88fSEmmanuel Vadot66AK2E SoC.
67c66ec88fSEmmanuel Vadot
68c66ec88fSEmmanuel Vadot/ {
69c66ec88fSEmmanuel Vadot	soc {
70c66ec88fSEmmanuel Vadot		psc: power-sleep-controller@2350000 {
71c66ec88fSEmmanuel Vadot			compatible = "syscon", "simple-mfd";
72c66ec88fSEmmanuel Vadot			reg = <0x02350000 0x1000>;
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadot			pscrst: reset-controller {
75c66ec88fSEmmanuel Vadot				compatible = "ti,k2e-pscrst", "ti,syscon-reset";
76c66ec88fSEmmanuel Vadot				#reset-cells = <1>;
77c66ec88fSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot				ti,reset-bits = <
79c66ec88fSEmmanuel Vadot					0xa3c 8 0xa3c 8 0x83c 8 (ASSERT_CLEAR | DEASSERT_SET   | STATUS_CLEAR) /* 0: dsp0 */
80c66ec88fSEmmanuel Vadot					0xa40 5 0xa44 3 0     0 (ASSERT_SET   | DEASSERT_CLEAR | STATUS_NONE)  /* 1: example */
81c66ec88fSEmmanuel Vadot				>;
82c66ec88fSEmmanuel Vadot			};
83c66ec88fSEmmanuel Vadot		};
84c66ec88fSEmmanuel Vadot
85c66ec88fSEmmanuel Vadot		dsp0: dsp0 {
86c66ec88fSEmmanuel Vadot			...
87c66ec88fSEmmanuel Vadot			resets = <&pscrst 0>;
88c66ec88fSEmmanuel Vadot			...
89c66ec88fSEmmanuel Vadot		};
90c66ec88fSEmmanuel Vadot	};
91c66ec88fSEmmanuel Vadot};
92