xref: /rk3399_rockchip-uboot/doc/device-tree-bindings/reset/reset.txt (revision 09849f4a7779a247be8af5cfae44f7aad30e1222)
1*89c1e2daSStephen Warren= Reset Signal Device Tree Bindings =
2*89c1e2daSStephen Warren
3*89c1e2daSStephen WarrenThis binding is intended to represent the hardware reset signals present
4*89c1e2daSStephen Warreninternally in most IC (SoC, FPGA, ...) designs. Reset signals for whole
5*89c1e2daSStephen Warrenstandalone chips are most likely better represented as GPIOs, although there
6*89c1e2daSStephen Warrenare likely to be exceptions to this rule.
7*89c1e2daSStephen Warren
8*89c1e2daSStephen WarrenHardware blocks typically receive a reset signal. This signal is generated by
9*89c1e2daSStephen Warrena reset provider (e.g. power management or clock module) and received by a
10*89c1e2daSStephen Warrenreset consumer (the module being reset, or a module managing when a sub-
11*89c1e2daSStephen Warrenordinate module is reset). This binding exists to represent the provider and
12*89c1e2daSStephen Warrenconsumer, and provide a way to couple the two together.
13*89c1e2daSStephen Warren
14*89c1e2daSStephen WarrenA reset signal is represented by the phandle of the provider, plus a reset
15*89c1e2daSStephen Warrenspecifier - a list of DT cells that represents the reset signal within the
16*89c1e2daSStephen Warrenprovider. The length (number of cells) and semantics of the reset specifier
17*89c1e2daSStephen Warrenare dictated by the binding of the reset provider, although common schemes
18*89c1e2daSStephen Warrenare described below.
19*89c1e2daSStephen Warren
20*89c1e2daSStephen WarrenA word on where to place reset signal consumers in device tree: It is possible
21*89c1e2daSStephen Warrenin hardware for a reset signal to affect multiple logically separate HW blocks
22*89c1e2daSStephen Warrenat once. In this case, it would be unwise to represent this reset signal in
23*89c1e2daSStephen Warrenthe DT node of each affected HW block, since if activated, an unrelated block
24*89c1e2daSStephen Warrenmay be reset. Instead, reset signals should be represented in the DT node
25*89c1e2daSStephen Warrenwhere it makes most sense to control it; this may be a bus node if all
26*89c1e2daSStephen Warrenchildren of the bus are affected by the reset signal, or an individual HW
27*89c1e2daSStephen Warrenblock node for dedicated reset signals. The intent of this binding is to give
28*89c1e2daSStephen Warrenappropriate software access to the reset signals in order to manage the HW,
29*89c1e2daSStephen Warrenrather than to slavishly enumerate the reset signal that affects each HW
30*89c1e2daSStephen Warrenblock.
31*89c1e2daSStephen Warren
32*89c1e2daSStephen Warren= Reset providers =
33*89c1e2daSStephen Warren
34*89c1e2daSStephen WarrenRequired properties:
35*89c1e2daSStephen Warren#reset-cells:	Number of cells in a reset specifier; Typically 0 for nodes
36*89c1e2daSStephen Warren		with a single reset output and 1 for nodes with multiple
37*89c1e2daSStephen Warren		reset outputs.
38*89c1e2daSStephen Warren
39*89c1e2daSStephen WarrenFor example:
40*89c1e2daSStephen Warren
41*89c1e2daSStephen Warren	rst: reset-controller {
42*89c1e2daSStephen Warren		#reset-cells = <1>;
43*89c1e2daSStephen Warren	};
44*89c1e2daSStephen Warren
45*89c1e2daSStephen Warren= Reset consumers =
46*89c1e2daSStephen Warren
47*89c1e2daSStephen WarrenRequired properties:
48*89c1e2daSStephen Warrenresets:		List of phandle and reset specifier pairs, one pair
49*89c1e2daSStephen Warren		for each reset signal that affects the device, or that the
50*89c1e2daSStephen Warren		device manages. Note: if the reset provider specifies '0' for
51*89c1e2daSStephen Warren		#reset-cells, then only the phandle portion of the pair will
52*89c1e2daSStephen Warren		appear.
53*89c1e2daSStephen Warren
54*89c1e2daSStephen WarrenOptional properties:
55*89c1e2daSStephen Warrenreset-names:	List of reset signal name strings sorted in the same order as
56*89c1e2daSStephen Warren		the resets property. Consumers drivers will use reset-names to
57*89c1e2daSStephen Warren		match reset signal names with reset specifiers.
58*89c1e2daSStephen Warren
59*89c1e2daSStephen WarrenFor example:
60*89c1e2daSStephen Warren
61*89c1e2daSStephen Warren	device {
62*89c1e2daSStephen Warren		resets = <&rst 20>;
63*89c1e2daSStephen Warren		reset-names = "reset";
64*89c1e2daSStephen Warren	};
65*89c1e2daSStephen Warren
66*89c1e2daSStephen WarrenThis represents a device with a single reset signal named "reset".
67*89c1e2daSStephen Warren
68*89c1e2daSStephen Warren	bus {
69*89c1e2daSStephen Warren		resets = <&rst 10> <&rst 11> <&rst 12> <&rst 11>;
70*89c1e2daSStephen Warren		reset-names = "i2s1", "i2s2", "dma", "mixer";
71*89c1e2daSStephen Warren	};
72*89c1e2daSStephen Warren
73*89c1e2daSStephen WarrenThis represents a bus that controls the reset signal of each of four sub-
74*89c1e2daSStephen Warrenordinate devices. Consider for example a bus that fails to operate unless no
75*89c1e2daSStephen Warrenchild device has reset asserted.
76