TEMP: ARM: dts: dra7-ipu-common: Add a common file for IPU early boots
authorAmarinder Bindra <a-bindra@ti.com>
Mon, 16 Sep 2019 23:00:40 +0000 (18:00 -0500)
committerSuman Anna <s-anna@ti.com>
Mon, 23 Sep 2019 01:47:33 +0000 (20:47 -0500)
The remoteproc 'late attach' functionality has the remote processors
configured, programmed and booted early even before the kernel is booted.
This includes loading the necessary firmware into memory, programming the
IOMMU, configuring the required timers, and programming the corresponding
device's clocks and resets.

The omap hwmod init sequence includes resetting all the hwmods and
idling them to put the devices in sane states to make them independent
of bootloader and corresponding drivers. The "ti,no-idle-on-init" and
"ti,no-reset-on-init" attributes are added to specific omap_hwmod's
associated with the IPU1 & IPU2 processor subsystems to support the
'late attach' feature on these devices, and change the omap hwmod init
behavior. The corresponding memory regions are also removed from the
default kernel memory map (DMA pools instead of CMA pools) so that the
kernel doesn't access anything in these regions until the remoteprocs
are booted.

The "ti,no-reset-on-init" attribute is needed to allow the omap_hwmod
layer to not perform a reset (and thereby reset the programming done
prior to kernel boot). The "ti,no-idle-on-init" is needed to leave the
modules/device in enabled state (and thereby avoid any disabling of the
clocks/modules).

These attributes are added in a new common dtsi file that should be
included into the corresponding TI DRA7xx and AM57xx boards that have
actually early-booted the IPU processors. This file _must_ be included
_only_ when both the IPU1 and IPU2 processors have been booted by
SPL/U-boot.

TODO:
Evaluate the approach where U-Boot can directly add/modify these required
properties using code. Such an approach would eliminate the need for
maintaining one or more dtsi files/overlays and make the support
self-contained within the bootloader.

Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Signed-off-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Venkateswara Rao Mandela <venkat.mandela@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
arch/arm/boot/dts/dra7-ipu-common-early-boot.dtsi [new file with mode: 0644]

diff --git a/arch/arm/boot/dts/dra7-ipu-common-early-boot.dtsi b/arch/arm/boot/dts/dra7-ipu-common-early-boot.dtsi
new file mode 100644 (file)
index 0000000..8a81d19
--- /dev/null
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Common dtsi file that needs to be included in corresponding TI DRA7xx
+ * and AM57xx board dts files that have the IPU1 _and_ IPU2 remote processors
+ * booted early from TI U-Boot/SPL.
+ */
+
+/ {
+       reserved-memory {
+               mmu-early-page-tables@95700000 {
+                       /* address need to match the usage within U-Boot */
+                       reg = <0x0 0x95700000 0x0 0x100000>;
+                       no-map;
+               };
+       };
+};
+
+/* IPU2 */
+&timer3 {
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};
+
+&timer4 {
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};
+
+&timer9 {
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};
+
+&mmu_ipu2{
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};
+
+&ipu2_memory_region {
+       /delete-property/ reusable;
+       no-map;
+};
+
+&ipu2 {
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};
+
+/* IPU1 */
+&timer11 {
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};
+
+&timer7 {
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};
+
+&timer8 {
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};
+
+&mmu_ipu1{
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};
+
+&ipu1_memory_region {
+       /delete-property/ reusable;
+       no-map;
+};
+
+&ipu1 {
+       ti,no-idle-on-init;
+       ti,no-reset-on-init;
+};