162306a36Sopenharmony_ciTI SysCon Reset Controller
262306a36Sopenharmony_ci=======================
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciAlmost all SoCs have hardware modules that require reset control in addition
562306a36Sopenharmony_cito clock and power control for their functionality. The reset control is
662306a36Sopenharmony_citypically provided by means of memory-mapped I/O registers. These registers are
762306a36Sopenharmony_cisometimes a part of a larger register space region implementing various
862306a36Sopenharmony_cifunctionalities. This register range is best represented as a syscon node to
962306a36Sopenharmony_ciallow multiple entities to access their relevant registers in the common
1062306a36Sopenharmony_ciregister space.
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciA SysCon Reset Controller node defines a device that uses a syscon node
1362306a36Sopenharmony_ciand provides reset management functionality for various hardware modules
1462306a36Sopenharmony_cipresent on the SoC.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciSysCon Reset Controller Node
1762306a36Sopenharmony_ci============================
1862306a36Sopenharmony_ciEach of the reset provider/controller nodes should be a child of a syscon
1962306a36Sopenharmony_cinode and have the following properties.
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciRequired properties:
2262306a36Sopenharmony_ci--------------------
2362306a36Sopenharmony_ci - compatible		: Should be,
2462306a36Sopenharmony_ci			    "ti,k2e-pscrst"
2562306a36Sopenharmony_ci			    "ti,k2l-pscrst"
2662306a36Sopenharmony_ci			    "ti,k2hk-pscrst"
2762306a36Sopenharmony_ci			    "ti,syscon-reset"
2862306a36Sopenharmony_ci - #reset-cells		: Should be 1. Please see the reset consumer node below
2962306a36Sopenharmony_ci			  for usage details
3062306a36Sopenharmony_ci - ti,reset-bits	: Contains the reset control register information
3162306a36Sopenharmony_ci			  Should contain 7 cells for each reset exposed to
3262306a36Sopenharmony_ci			  consumers, defined as:
3362306a36Sopenharmony_ci			    Cell #1 : offset of the reset assert control
3462306a36Sopenharmony_ci			              register from the syscon register base
3562306a36Sopenharmony_ci			    Cell #2 : bit position of the reset in the reset
3662306a36Sopenharmony_ci			              assert control register
3762306a36Sopenharmony_ci			    Cell #3 : offset of the reset deassert control
3862306a36Sopenharmony_ci			              register from the syscon register base
3962306a36Sopenharmony_ci			    Cell #4 : bit position of the reset in the reset
4062306a36Sopenharmony_ci			              deassert control register
4162306a36Sopenharmony_ci			    Cell #5 : offset of the reset status register
4262306a36Sopenharmony_ci			              from the syscon register base
4362306a36Sopenharmony_ci			    Cell #6 : bit position of the reset in the
4462306a36Sopenharmony_ci			              reset status register
4562306a36Sopenharmony_ci			    Cell #7 : Flags used to control reset behavior,
4662306a36Sopenharmony_ci			              available flags defined in the DT include
4762306a36Sopenharmony_ci			              file <dt-bindings/reset/ti-syscon.h>
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ciSysCon Reset Consumer Nodes
5062306a36Sopenharmony_ci===========================
5162306a36Sopenharmony_ciEach of the reset consumer nodes should have the following properties,
5262306a36Sopenharmony_ciin addition to their own properties.
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ciRequired properties:
5562306a36Sopenharmony_ci--------------------
5662306a36Sopenharmony_ci - resets	: A phandle to the reset controller node and an index number
5762306a36Sopenharmony_ci		  to a reset specifier as defined above.
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ciPlease also refer to Documentation/devicetree/bindings/reset/reset.txt for
6062306a36Sopenharmony_cicommon reset controller usage by consumers.
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ciExample:
6362306a36Sopenharmony_ci--------
6462306a36Sopenharmony_ciThe following example demonstrates a syscon node, the reset controller node
6562306a36Sopenharmony_ciusing the syscon node, and a consumer (a DSP device) on the TI Keystone 2
6662306a36Sopenharmony_ci66AK2E SoC.
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ci/ {
6962306a36Sopenharmony_ci	soc {
7062306a36Sopenharmony_ci		psc: power-sleep-controller@2350000 {
7162306a36Sopenharmony_ci			compatible = "syscon", "simple-mfd";
7262306a36Sopenharmony_ci			reg = <0x02350000 0x1000>;
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci			pscrst: reset-controller {
7562306a36Sopenharmony_ci				compatible = "ti,k2e-pscrst", "ti,syscon-reset";
7662306a36Sopenharmony_ci				#reset-cells = <1>;
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci				ti,reset-bits = <
7962306a36Sopenharmony_ci					0xa3c 8 0xa3c 8 0x83c 8 (ASSERT_CLEAR | DEASSERT_SET   | STATUS_CLEAR) /* 0: dsp0 */
8062306a36Sopenharmony_ci					0xa40 5 0xa44 3 0     0 (ASSERT_SET   | DEASSERT_CLEAR | STATUS_NONE)  /* 1: example */
8162306a36Sopenharmony_ci				>;
8262306a36Sopenharmony_ci			};
8362306a36Sopenharmony_ci		};
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ci		dsp0: dsp0 {
8662306a36Sopenharmony_ci			...
8762306a36Sopenharmony_ci			resets = <&pscrst 0>;
8862306a36Sopenharmony_ci			...
8962306a36Sopenharmony_ci		};
9062306a36Sopenharmony_ci	};
9162306a36Sopenharmony_ci};
92