18c2ecf20Sopenharmony_ciQualcomm Hexagon Peripheral Image Loader
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis document defines the binding for a component that loads and boots firmware
48c2ecf20Sopenharmony_cion the Qualcomm Hexagon core.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci- compatible:
78c2ecf20Sopenharmony_ci	Usage: required
88c2ecf20Sopenharmony_ci	Value type: <string>
98c2ecf20Sopenharmony_ci	Definition: must be one of:
108c2ecf20Sopenharmony_ci		    "qcom,q6v5-pil",
118c2ecf20Sopenharmony_ci		    "qcom,ipq8074-wcss-pil"
128c2ecf20Sopenharmony_ci		    "qcom,msm8916-mss-pil",
138c2ecf20Sopenharmony_ci		    "qcom,msm8974-mss-pil"
148c2ecf20Sopenharmony_ci		    "qcom,msm8996-mss-pil"
158c2ecf20Sopenharmony_ci		    "qcom,msm8998-mss-pil"
168c2ecf20Sopenharmony_ci		    "qcom,sc7180-mss-pil"
178c2ecf20Sopenharmony_ci		    "qcom,sdm845-mss-pil"
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci- reg:
208c2ecf20Sopenharmony_ci	Usage: required
218c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
228c2ecf20Sopenharmony_ci	Definition: must specify the base address and size of the qdsp6 and
238c2ecf20Sopenharmony_ci		    rmb register blocks
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci- reg-names:
268c2ecf20Sopenharmony_ci	Usage: required
278c2ecf20Sopenharmony_ci	Value type: <stringlist>
288c2ecf20Sopenharmony_ci	Definition: must be "q6dsp" and "rmb"
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci- interrupts-extended:
318c2ecf20Sopenharmony_ci	Usage: required
328c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
338c2ecf20Sopenharmony_ci	Definition: reference to the interrupts that match interrupt-names
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci- interrupt-names:
368c2ecf20Sopenharmony_ci	Usage: required
378c2ecf20Sopenharmony_ci	Value type: <stringlist>
388c2ecf20Sopenharmony_ci	Definition: The interrupts needed depends on the the compatible
398c2ecf20Sopenharmony_ci		    string:
408c2ecf20Sopenharmony_ci	qcom,q6v5-pil:
418c2ecf20Sopenharmony_ci	qcom,ipq8074-wcss-pil:
428c2ecf20Sopenharmony_ci	qcom,msm8916-mss-pil:
438c2ecf20Sopenharmony_ci	qcom,msm8974-mss-pil:
448c2ecf20Sopenharmony_ci		    must be "wdog", "fatal", "ready", "handover", "stop-ack"
458c2ecf20Sopenharmony_ci	qcom,msm8996-mss-pil:
468c2ecf20Sopenharmony_ci	qcom,msm8998-mss-pil:
478c2ecf20Sopenharmony_ci	qcom,sc7180-mss-pil:
488c2ecf20Sopenharmony_ci	qcom,sdm845-mss-pil:
498c2ecf20Sopenharmony_ci		    must be "wdog", "fatal", "ready", "handover", "stop-ack",
508c2ecf20Sopenharmony_ci		    "shutdown-ack"
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci- firmware-name:
538c2ecf20Sopenharmony_ci	Usage: optional
548c2ecf20Sopenharmony_ci	Value type: <stringlist>
558c2ecf20Sopenharmony_ci	Definition: must list the relative firmware image paths for mba and
568c2ecf20Sopenharmony_ci		    modem. They are used for booting and authenticating the
578c2ecf20Sopenharmony_ci		    Hexagon core.
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci- clocks:
608c2ecf20Sopenharmony_ci	Usage: required
618c2ecf20Sopenharmony_ci	Value type: <phandle>
628c2ecf20Sopenharmony_ci	Definition: reference to the clocks that match clock-names
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci- clock-names:
658c2ecf20Sopenharmony_ci	Usage: required
668c2ecf20Sopenharmony_ci	Value type: <stringlist>
678c2ecf20Sopenharmony_ci	Definition: The clocks needed depend on the compatible string:
688c2ecf20Sopenharmony_ci	qcom,ipq8074-wcss-pil:
698c2ecf20Sopenharmony_ci		    no clock names required
708c2ecf20Sopenharmony_ci	qcom,q6v5-pil:
718c2ecf20Sopenharmony_ci	qcom,msm8916-mss-pil:
728c2ecf20Sopenharmony_ci	qcom,msm8974-mss-pil:
738c2ecf20Sopenharmony_ci		    must be "iface", "bus", "mem", "xo"
748c2ecf20Sopenharmony_ci	qcom,msm8996-mss-pil:
758c2ecf20Sopenharmony_ci		    must be "iface", "bus", "mem", "xo", "gpll0_mss",
768c2ecf20Sopenharmony_ci		    "snoc_axi", "mnoc_axi", "pnoc", "qdss"
778c2ecf20Sopenharmony_ci	qcom,msm8998-mss-pil:
788c2ecf20Sopenharmony_ci		    must be "iface", "bus", "mem", "xo", "gpll0_mss",
798c2ecf20Sopenharmony_ci		    "snoc_axi", "mnoc_axi", "qdss"
808c2ecf20Sopenharmony_ci	qcom,sc7180-mss-pil:
818c2ecf20Sopenharmony_ci		    must be "iface", "bus", "xo", "snoc_axi", "mnoc_axi",
828c2ecf20Sopenharmony_ci		    "nav"
838c2ecf20Sopenharmony_ci	qcom,sdm845-mss-pil:
848c2ecf20Sopenharmony_ci		    must be "iface", "bus", "mem", "xo", "gpll0_mss",
858c2ecf20Sopenharmony_ci		    "snoc_axi", "mnoc_axi", "prng"
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci- resets:
888c2ecf20Sopenharmony_ci	Usage: required
898c2ecf20Sopenharmony_ci	Value type: <phandle>
908c2ecf20Sopenharmony_ci	Definition: reference to the reset-controller for the modem sub-system
918c2ecf20Sopenharmony_ci		    reference to the list of 3 reset-controllers for the
928c2ecf20Sopenharmony_ci		    wcss sub-system
938c2ecf20Sopenharmony_ci		    reference to the list of 2 reset-controllers for the modem
948c2ecf20Sopenharmony_ci		    sub-system on SC7180, SDM845 SoCs
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ci- reset-names:
978c2ecf20Sopenharmony_ci	Usage: required
988c2ecf20Sopenharmony_ci	Value type: <stringlist>
998c2ecf20Sopenharmony_ci	Definition: must be "mss_restart" for the modem sub-system
1008c2ecf20Sopenharmony_ci		    must be "wcss_aon_reset", "wcss_reset", "wcss_q6_reset"
1018c2ecf20Sopenharmony_ci		    for the wcss sub-system
1028c2ecf20Sopenharmony_ci		    must be "mss_restart", "pdc_reset" for the modem
1038c2ecf20Sopenharmony_ci		    sub-system on SC7180, SDM845 SoCs
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ciFor devices where the mba and mpss sub-nodes are not specified, mba/mpss region
1068c2ecf20Sopenharmony_cishould be referenced as follows:
1078c2ecf20Sopenharmony_ci- memory-region:
1088c2ecf20Sopenharmony_ci	Usage: required
1098c2ecf20Sopenharmony_ci	Value type: <phandle>
1108c2ecf20Sopenharmony_ci	Definition: reference to the reserved-memory for the mba region followed
1118c2ecf20Sopenharmony_ci		    by the mpss region
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ciFor the compatible strings below the following supplies are required:
1148c2ecf20Sopenharmony_ci  "qcom,q6v5-pil"
1158c2ecf20Sopenharmony_ci  "qcom,msm8916-mss-pil",
1168c2ecf20Sopenharmony_ci- cx-supply:
1178c2ecf20Sopenharmony_ci- mx-supply:
1188c2ecf20Sopenharmony_ci- pll-supply:
1198c2ecf20Sopenharmony_ci	Usage: required
1208c2ecf20Sopenharmony_ci	Value type: <phandle>
1218c2ecf20Sopenharmony_ci	Definition: reference to the regulators to be held on behalf of the
1228c2ecf20Sopenharmony_ci		    booting of the Hexagon core
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ciFor the compatible string below the following supplies are required:
1258c2ecf20Sopenharmony_ci  "qcom,msm8974-mss-pil"
1268c2ecf20Sopenharmony_ci- cx-supply:
1278c2ecf20Sopenharmony_ci- mss-supply:
1288c2ecf20Sopenharmony_ci- mx-supply:
1298c2ecf20Sopenharmony_ci- pll-supply:
1308c2ecf20Sopenharmony_ci	Usage: required
1318c2ecf20Sopenharmony_ci	Value type: <phandle>
1328c2ecf20Sopenharmony_ci	Definition: reference to the regulators to be held on behalf of the
1338c2ecf20Sopenharmony_ci		    booting of the Hexagon core
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_ciFor the compatible string below the following supplies are required:
1368c2ecf20Sopenharmony_ci  "qcom,msm8996-mss-pil"
1378c2ecf20Sopenharmony_ci- pll-supply:
1388c2ecf20Sopenharmony_ci	Usage: required
1398c2ecf20Sopenharmony_ci	Value type: <phandle>
1408c2ecf20Sopenharmony_ci	Definition: reference to the regulators to be held on behalf of the
1418c2ecf20Sopenharmony_ci		    booting of the Hexagon core
1428c2ecf20Sopenharmony_ci
1438c2ecf20Sopenharmony_ci- power-domains:
1448c2ecf20Sopenharmony_ci	Usage: required
1458c2ecf20Sopenharmony_ci	Value type: <phandle>
1468c2ecf20Sopenharmony_ci	Definition: reference to power-domains that match power-domain-names
1478c2ecf20Sopenharmony_ci
1488c2ecf20Sopenharmony_ci- power-domain-names:
1498c2ecf20Sopenharmony_ci	Usage: required
1508c2ecf20Sopenharmony_ci	Value type: <stringlist>
1518c2ecf20Sopenharmony_ci	Definition: The power-domains needed depend on the compatible string:
1528c2ecf20Sopenharmony_ci	qcom,q6v5-pil:
1538c2ecf20Sopenharmony_ci	qcom,ipq8074-wcss-pil:
1548c2ecf20Sopenharmony_ci	qcom,msm8916-mss-pil:
1558c2ecf20Sopenharmony_ci	qcom,msm8974-mss-pil:
1568c2ecf20Sopenharmony_ci		    no power-domain names required
1578c2ecf20Sopenharmony_ci	qcom,msm8996-mss-pil:
1588c2ecf20Sopenharmony_ci	qcom,msm8998-mss-pil:
1598c2ecf20Sopenharmony_ci		    must be "cx", "mx"
1608c2ecf20Sopenharmony_ci	qcom,sc7180-mss-pil:
1618c2ecf20Sopenharmony_ci	qcom,sdm845-mss-pil:
1628c2ecf20Sopenharmony_ci		    must be "cx", "mx", "mss", "load_state"
1638c2ecf20Sopenharmony_ci
1648c2ecf20Sopenharmony_ci- qcom,smem-states:
1658c2ecf20Sopenharmony_ci	Usage: required
1668c2ecf20Sopenharmony_ci	Value type: <phandle>
1678c2ecf20Sopenharmony_ci	Definition: reference to the smem state for requesting the Hexagon to
1688c2ecf20Sopenharmony_ci		    shut down
1698c2ecf20Sopenharmony_ci
1708c2ecf20Sopenharmony_ci- qcom,smem-state-names:
1718c2ecf20Sopenharmony_ci	Usage: required
1728c2ecf20Sopenharmony_ci	Value type: <stringlist>
1738c2ecf20Sopenharmony_ci	Definition: must be "stop"
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ci- qcom,halt-regs:
1768c2ecf20Sopenharmony_ci	Usage: required
1778c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
1788c2ecf20Sopenharmony_ci	Definition: a phandle reference to a syscon representing TCSR followed
1798c2ecf20Sopenharmony_ci		    by the three offsets within syscon for q6, modem and nc
1808c2ecf20Sopenharmony_ci		    halt registers.
1818c2ecf20Sopenharmony_ci
1828c2ecf20Sopenharmony_ciFor the compatible strings below the following phandle references are required:
1838c2ecf20Sopenharmony_ci  "qcom,sc7180-mss-pil"
1848c2ecf20Sopenharmony_ci- qcom,spare-regs:
1858c2ecf20Sopenharmony_ci	Usage: required
1868c2ecf20Sopenharmony_ci	Value type: <prop-encoded-array>
1878c2ecf20Sopenharmony_ci	Definition: a phandle reference to a syscon representing TCSR followed
1888c2ecf20Sopenharmony_ci		    by the offset within syscon for conn_box_spare0 register
1898c2ecf20Sopenharmony_ci		    used by the modem sub-system running on SC7180 SoC.
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_ciThe Hexagon node must contain iommus property as described in ../iommu/iommu.txt
1928c2ecf20Sopenharmony_cion platforms which do not have TrustZone.
1938c2ecf20Sopenharmony_ci
1948c2ecf20Sopenharmony_ci= SUBNODES:
1958c2ecf20Sopenharmony_ciThe Hexagon node must contain two subnodes, named "mba" and "mpss" representing
1968c2ecf20Sopenharmony_cithe memory regions used by the Hexagon firmware. Each sub-node must contain:
1978c2ecf20Sopenharmony_ci
1988c2ecf20Sopenharmony_ci- memory-region:
1998c2ecf20Sopenharmony_ci	Usage: required
2008c2ecf20Sopenharmony_ci	Value type: <phandle>
2018c2ecf20Sopenharmony_ci	Definition: reference to the reserved-memory for the region
2028c2ecf20Sopenharmony_ci
2038c2ecf20Sopenharmony_ciThe Hexagon node may also have an subnode named either "smd-edge" or
2048c2ecf20Sopenharmony_ci"glink-edge" that describes the communication edge, channels and devices
2058c2ecf20Sopenharmony_cirelated to the Hexagon.  See ../soc/qcom/qcom,smd.txt and
2068c2ecf20Sopenharmony_ci../soc/qcom/qcom,glink.txt for details on how to describe these.
2078c2ecf20Sopenharmony_ci
2088c2ecf20Sopenharmony_ci= EXAMPLE
2098c2ecf20Sopenharmony_ciThe following example describes the resources needed to boot control the
2108c2ecf20Sopenharmony_ciHexagon, as it is found on MSM8974 boards.
2118c2ecf20Sopenharmony_ci
2128c2ecf20Sopenharmony_ci	modem-rproc@fc880000 {
2138c2ecf20Sopenharmony_ci		compatible = "qcom,q6v5-pil";
2148c2ecf20Sopenharmony_ci		reg = <0xfc880000 0x100>,
2158c2ecf20Sopenharmony_ci		      <0xfc820000 0x020>;
2168c2ecf20Sopenharmony_ci		reg-names = "qdsp6", "rmb";
2178c2ecf20Sopenharmony_ci
2188c2ecf20Sopenharmony_ci		interrupts-extended = <&intc 0 24 1>,
2198c2ecf20Sopenharmony_ci				      <&modem_smp2p_in 0 0>,
2208c2ecf20Sopenharmony_ci				      <&modem_smp2p_in 1 0>,
2218c2ecf20Sopenharmony_ci				      <&modem_smp2p_in 2 0>,
2228c2ecf20Sopenharmony_ci				      <&modem_smp2p_in 3 0>;
2238c2ecf20Sopenharmony_ci		interrupt-names = "wdog",
2248c2ecf20Sopenharmony_ci				  "fatal",
2258c2ecf20Sopenharmony_ci				  "ready",
2268c2ecf20Sopenharmony_ci				  "handover",
2278c2ecf20Sopenharmony_ci				  "stop-ack";
2288c2ecf20Sopenharmony_ci
2298c2ecf20Sopenharmony_ci		clocks = <&gcc GCC_MSS_Q6_BIMC_AXI_CLK>,
2308c2ecf20Sopenharmony_ci			 <&gcc GCC_MSS_CFG_AHB_CLK>,
2318c2ecf20Sopenharmony_ci			 <&gcc GCC_BOOT_ROM_AHB_CLK>;
2328c2ecf20Sopenharmony_ci		clock-names = "iface", "bus", "mem";
2338c2ecf20Sopenharmony_ci
2348c2ecf20Sopenharmony_ci		qcom,halt-regs = <&tcsr_mutex_block 0x1180 0x1200 0x1280>;
2358c2ecf20Sopenharmony_ci
2368c2ecf20Sopenharmony_ci		resets = <&gcc GCC_MSS_RESTART>;
2378c2ecf20Sopenharmony_ci		reset-names = "mss_restart";
2388c2ecf20Sopenharmony_ci
2398c2ecf20Sopenharmony_ci		cx-supply = <&pm8841_s2>;
2408c2ecf20Sopenharmony_ci		mss-supply = <&pm8841_s3>;
2418c2ecf20Sopenharmony_ci		mx-supply = <&pm8841_s1>;
2428c2ecf20Sopenharmony_ci		pll-supply = <&pm8941_l12>;
2438c2ecf20Sopenharmony_ci
2448c2ecf20Sopenharmony_ci		qcom,smem-states = <&modem_smp2p_out 0>;
2458c2ecf20Sopenharmony_ci		qcom,smem-state-names = "stop";
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_ci		mba {
2488c2ecf20Sopenharmony_ci			memory-region = <&mba_region>;
2498c2ecf20Sopenharmony_ci		};
2508c2ecf20Sopenharmony_ci
2518c2ecf20Sopenharmony_ci		mpss {
2528c2ecf20Sopenharmony_ci			memory-region = <&mpss_region>;
2538c2ecf20Sopenharmony_ci		};
2548c2ecf20Sopenharmony_ci	};
255