18c2ecf20Sopenharmony_ciSPM AVS Wrapper 2 (SAW2)
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe SAW2 is a wrapper around the Subsystem Power Manager (SPM) and the
48c2ecf20Sopenharmony_ciAdaptive Voltage Scaling (AVS) hardware. The SPM is a programmable
58c2ecf20Sopenharmony_cipower-controller that transitions a piece of hardware (like a processor or
68c2ecf20Sopenharmony_cisubsystem) into and out of low power modes via a direct connection to
78c2ecf20Sopenharmony_cithe PMIC. It can also be wired up to interact with other processors in the
88c2ecf20Sopenharmony_cisystem, notifying them when a low power state is entered or exited.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciMultiple revisions of the SAW hardware are supported using these Device Nodes.
118c2ecf20Sopenharmony_ciSAW2 revisions differ in the register offset and configuration data. Also, the
128c2ecf20Sopenharmony_cisame revision of the SAW in different SoCs may have different configuration
138c2ecf20Sopenharmony_cidata due the the differences in hardware capabilities. Hence the SoC name, the
148c2ecf20Sopenharmony_civersion of the SAW hardware in that SoC and the distinction between cpu (big
158c2ecf20Sopenharmony_cior Little) or cache, may be needed to uniquely identify the SAW register
168c2ecf20Sopenharmony_ciconfiguration and initialization data. The compatible string is used to
178c2ecf20Sopenharmony_ciindicate this parameter.
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciPROPERTIES
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci- compatible:
228c2ecf20Sopenharmony_ci	Usage: required
238c2ecf20Sopenharmony_ci	Value type: <string>
248c2ecf20Sopenharmony_ci	Definition: Must have
258c2ecf20Sopenharmony_ci			"qcom,saw2"
268c2ecf20Sopenharmony_ci		    A more specific value could be one of:
278c2ecf20Sopenharmony_ci			"qcom,apq8064-saw2-v1.1-cpu"
288c2ecf20Sopenharmony_ci			"qcom,msm8974-saw2-v2.1-cpu"
298c2ecf20Sopenharmony_ci			"qcom,apq8084-saw2-v2.1-cpu"
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci- reg:
328c2ecf20Sopenharmony_ci	Usage: required
338c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
348c2ecf20Sopenharmony_ci	Definition: the first element specifies the base address and size of
358c2ecf20Sopenharmony_ci		    the register region. An optional second element specifies
368c2ecf20Sopenharmony_ci		    the base address and size of the alias register region.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci- regulator:
398c2ecf20Sopenharmony_ci	Usage: optional
408c2ecf20Sopenharmony_ci	Value type: boolean
418c2ecf20Sopenharmony_ci	Definition: Indicates that this SPM device acts as a regulator device
428c2ecf20Sopenharmony_ci			device for the core (CPU or Cache) the SPM is attached
438c2ecf20Sopenharmony_ci			to.
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ciExample 1:
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci	power-controller@2099000 {
488c2ecf20Sopenharmony_ci		compatible = "qcom,saw2";
498c2ecf20Sopenharmony_ci		reg = <0x02099000 0x1000>, <0x02009000 0x1000>;
508c2ecf20Sopenharmony_ci		regulator;
518c2ecf20Sopenharmony_ci	};
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciExample 2:
548c2ecf20Sopenharmony_ci	saw0: power-controller@f9089000 {
558c2ecf20Sopenharmony_ci		compatible = "qcom,apq8084-saw2-v2.1-cpu", "qcom,saw2";
568c2ecf20Sopenharmony_ci		reg = <0xf9089000 0x1000>, <0xf9009000 0x1000>;
578c2ecf20Sopenharmony_ci	};
58