162306a36Sopenharmony_ciBroadcom AVS mail box and interrupt register bindings
262306a36Sopenharmony_ci=====================================================
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciA total of three DT nodes are required. One node (brcm,avs-cpu-data-mem)
562306a36Sopenharmony_cireferences the mailbox register used to communicate with the AVS CPU[1]. The
662306a36Sopenharmony_cisecond node (brcm,avs-cpu-l2-intr) is required to trigger an interrupt on
762306a36Sopenharmony_cithe AVS CPU. The interrupt tells the AVS CPU that it needs to process a
862306a36Sopenharmony_cicommand sent to it by a driver. Interrupting the AVS CPU is mandatory for
962306a36Sopenharmony_cicommands to be processed.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciThe interface also requires a reference to the AVS host interrupt controller,
1262306a36Sopenharmony_ciso a driver can react to interrupts generated by the AVS CPU whenever a command
1362306a36Sopenharmony_cihas been processed. See [2] for more information on the brcm,l2-intc node.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci[1] The AVS CPU is an independent co-processor that runs proprietary
1662306a36Sopenharmony_cifirmware. On some SoCs, this firmware supports DFS and DVFS in addition to
1762306a36Sopenharmony_ciAdaptive Voltage Scaling.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci[2] Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.yaml
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciNode brcm,avs-cpu-data-mem
2362306a36Sopenharmony_ci--------------------------
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciRequired properties:
2662306a36Sopenharmony_ci- compatible: must include: brcm,avs-cpu-data-mem and
2762306a36Sopenharmony_ci              should include: one of brcm,bcm7271-avs-cpu-data-mem or
2862306a36Sopenharmony_ci                              brcm,bcm7268-avs-cpu-data-mem
2962306a36Sopenharmony_ci- reg: Specifies base physical address and size of the registers.
3062306a36Sopenharmony_ci- interrupts: The interrupt that the AVS CPU will use to interrupt the host
3162306a36Sopenharmony_ci              when a command completed.
3262306a36Sopenharmony_ci- interrupt-names: The name of the interrupt used to interrupt the host.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciOptional properties:
3562306a36Sopenharmony_ci- None
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciNode brcm,avs-cpu-l2-intr
3862306a36Sopenharmony_ci-------------------------
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ciRequired properties:
4162306a36Sopenharmony_ci- compatible: must include: brcm,avs-cpu-l2-intr and
4262306a36Sopenharmony_ci              should include: one of brcm,bcm7271-avs-cpu-l2-intr or
4362306a36Sopenharmony_ci                              brcm,bcm7268-avs-cpu-l2-intr
4462306a36Sopenharmony_ci- reg: Specifies base physical address and size of the registers.
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ciOptional properties:
4762306a36Sopenharmony_ci- None
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ciExample
5162306a36Sopenharmony_ci=======
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci	avs_host_l2_intc: interrupt-controller@f04d1200 {
5462306a36Sopenharmony_ci		#interrupt-cells = <1>;
5562306a36Sopenharmony_ci		compatible = "brcm,l2-intc";
5662306a36Sopenharmony_ci		interrupt-parent = <&intc>;
5762306a36Sopenharmony_ci		reg = <0xf04d1200 0x48>;
5862306a36Sopenharmony_ci		interrupt-controller;
5962306a36Sopenharmony_ci		interrupts = <0x0 0x19 0x0>;
6062306a36Sopenharmony_ci		interrupt-names = "avs";
6162306a36Sopenharmony_ci	};
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci	avs-cpu-data-mem@f04c4000 {
6462306a36Sopenharmony_ci		compatible = "brcm,bcm7271-avs-cpu-data-mem",
6562306a36Sopenharmony_ci				"brcm,avs-cpu-data-mem";
6662306a36Sopenharmony_ci		reg = <0xf04c4000 0x60>;
6762306a36Sopenharmony_ci		interrupts = <0x1a>;
6862306a36Sopenharmony_ci		interrupt-parent = <&avs_host_l2_intc>;
6962306a36Sopenharmony_ci		interrupt-names = "sw_intr";
7062306a36Sopenharmony_ci	};
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci	avs-cpu-l2-intr@f04d1100 {
7362306a36Sopenharmony_ci		compatible = "brcm,bcm7271-avs-cpu-l2-intr",
7462306a36Sopenharmony_ci				"brcm,avs-cpu-l2-intr";
7562306a36Sopenharmony_ci		reg = <0xf04d1100 0x10>;
7662306a36Sopenharmony_ci	};
77