new file mode 100644
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Common ISP configuration for Apple silicon platforms.
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+/ {
+ aliases {
+ isp = &isp;
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ isp_heap: isp-heap {
+ /* Filled in by bootloder */
+ reg = <0 0 0 0>;
+ no-map;
+ };
+ };
+};
+
+&isp {
+ memory-region = <&isp_heap>;
+ status = "okay";
+};
+
+&isp_dart0 {
+ status = "okay";
+};
+
+&isp_dart1 {
+ status = "okay";
+};
+
+&isp_dart2 {
+ status = "okay";
+};
+
+&ps_isp_sys {
+ status = "okay";
+};
new file mode 100644
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * ISP configuration for platforms with IMX248 sensor.
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+#include "isp-common.dtsi"
+
+&isp {
+ apple,temporal-filter = <0>;
+
+ sensor-presets {
+ /* 1280x720 */
+ preset0 {
+ apple,config-index = <0>;
+ apple,input-size = <1296 736>;
+ apple,output-size = <1280 720>;
+ apple,crop = <8 8 1280 720>;
+ };
+
+ /* 960x720 (4:3) */
+ preset1 {
+ apple,config-index = <0>;
+ apple,input-size = <1296 736>;
+ apple,output-size = <960 720>;
+ apple,crop = <168 8 960 720>;
+ };
+
+ /* 960x540 (16:9) */
+ preset2 {
+ apple,config-index = <0>;
+ apple,input-size = <1296 736>;
+ apple,output-size = <960 540>;
+ apple,crop = <8 8 1280 720>;
+ };
+
+ /* 640x480 (4:3) */
+ preset3 {
+ apple,config-index = <0>;
+ apple,input-size = <1296 736>;
+ apple,output-size = <640 480>;
+ apple,crop = <168 8 960 720>;
+ };
+
+ /* 640x360 (16:9) */
+ preset4 {
+ apple,config-index = <0>;
+ apple,input-size = <1296 736>;
+ apple,output-size = <640 360>;
+ apple,crop = <8 8 1280 720>;
+ };
+
+ /* 320x180 (16:9) */
+ preset5 {
+ apple,config-index = <0>;
+ apple,input-size = <1296 736>;
+ apple,output-size = <320 180>;
+ apple,crop = <8 8 1280 720>;
+ };
+ };
+};
new file mode 100644
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * ISP configuration for platforms with IMX364 sensor.
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+#include "isp-common.dtsi"
+
+&isp {
+ apple,temporal-filter = <0>;
+
+ sensor-presets {
+ /* 1920x1080 */
+ preset0 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <1920 1080>;
+ apple,crop = <0 0 1920 1080>;
+ };
+
+ /* 1440x720 (4:3) */
+ preset1 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <1440 1080>;
+ apple,crop = <240 0 1440 1080>;
+ };
+
+ /* 1280x720 (16:9) */
+ preset2 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <1280 720>;
+ apple,crop = <0 0 1920 1080>;
+ };
+
+ /* 960x720 (4:3) */
+ preset3{
+ apple,config-index = <0>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <960 720>;
+ apple,crop = <240 0 1440 1080>;
+ };
+
+ /* 960x540 (16:9) */
+ preset4 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <960 540>;
+ apple,crop = <0 0 1920 1080>;
+ };
+
+ /* 640x480 (4:3) */
+ preset5 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <640 480>;
+ apple,crop = <240 0 1440 1080>;
+ };
+
+ /* 640x360 (16:9) */
+ preset6 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <640 360>;
+ apple,crop = <0 0 1920 1080>;
+ };
+
+ /* 320x180 (16:9) */
+ preset7 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <320 180>;
+ apple,crop = <0 0 1920 1080>;
+ };
+ };
+};
new file mode 100644
@@ -0,0 +1,101 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * ISP configuration for platforms with IMX558 sensor in
+ * config #0 mode.
+ *
+ * These platforms enable MLVNR for all configs except
+ * #0, which we don't support. Config #0 is an uncropped
+ * square 1920x1920 sensor, with dark corners.
+ * Therefore, we synthesize common resolutions by using
+ * crop/scale while always choosing config #0.
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+#include "isp-common.dtsi"
+
+&isp {
+ apple,temporal-filter = <0>;
+
+ sensor-presets {
+ /* 1920x1080 */
+ preset0 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <1920 1080>;
+ apple,crop = <0 420 1920 1080>;
+ };
+
+ /* 1080x1920 */
+ preset1 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <1080 1920>;
+ apple,crop = <420 0 1080 1920>;
+ };
+
+ /* 1920x1440 */
+ preset2 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <1920 1440>;
+ apple,crop = <0 240 1920 1440>;
+ };
+
+ /* 1440x1920 */
+ preset3 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <1440 1920>;
+ apple,crop = <240 0 1440 1920>;
+ };
+
+ /* 1280x720 */
+ preset4 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <1280 720>;
+ apple,crop = <0 420 1920 1080>;
+ };
+
+ /* 720x1280 */
+ preset5 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <720 1280>;
+ apple,crop = <420 0 1080 1920>;
+ };
+
+ /* 1280x960 */
+ preset6 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <1280 960>;
+ apple,crop = <0 240 1920 1440>;
+ };
+
+ /* 960x1280 */
+ preset7 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <960 1280>;
+ apple,crop = <240 0 1440 1920>;
+ };
+
+ /* 640x480 */
+ preset8 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <640 480>;
+ apple,crop = <0 240 1920 1440>;
+ };
+
+ /* 480x640 */
+ preset9 {
+ apple,config-index = <0>;
+ apple,input-size = <1920 1920>;
+ apple,output-size = <480 640>;
+ apple,crop = <240 0 1440 1920>;
+ };
+ };
+};
new file mode 100644
@@ -0,0 +1,102 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * ISP configuration for platforms with IMX558 sensor.
+ *
+ * Copyright The Asahi Linux Contributors
+ */
+
+#include "isp-common.dtsi"
+
+&isp {
+ apple,temporal-filter = <0>;
+
+ sensor-presets {
+ /* 1920x1080 */
+ preset0 {
+ apple,config-index = <1>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <1920 1080>;
+ apple,crop = <0 0 1920 1080>;
+ };
+
+ /* 1080x1920 */
+ preset1 {
+ apple,config-index = <2>;
+ apple,input-size = <1080 1920>;
+ apple,output-size = <1080 1920>;
+ apple,crop = <0 0 1080 1920>;
+ };
+
+ /* 1760x1328 */
+ preset2 {
+ apple,config-index = <3>;
+ apple,input-size = <1760 1328>;
+ apple,output-size = <1760 1328>;
+ apple,crop = <0 0 1760 1328>;
+ };
+
+ /* 1328x1760 */
+ preset3 {
+ apple,config-index = <4>;
+ apple,input-size = <1328 1760>;
+ apple,output-size = < 1328 1760>;
+ apple,crop = <0 0 1328 1760>;
+ };
+
+ /* 1152x1152 */
+ preset4 {
+ apple,config-index = <5>;
+ apple,input-size = <1152 1152>;
+ apple,output-size = <1152 1152>;
+ apple,crop = <0 0 1152 1152>;
+ };
+
+ /* 1280x720 */
+ preset5 {
+ apple,config-index = <1>;
+ apple,input-size = <1920 1080>;
+ apple,output-size = <1280 720>;
+ apple,crop = <0 0 1920 1080>;
+ };
+
+ /* 720x1280 */
+ preset6 {
+ apple,config-index = <2>;
+ apple,input-size = <1080 1920>;
+ apple,output-size = <720 1280>;
+ apple,crop = <0 0 1080 1920>;
+ };
+
+ /* 1280x960 */
+ preset7 {
+ apple,config-index = <3>;
+ apple,input-size = <1760 1328>;
+ apple,output-size = <1280 960>;
+ apple,crop = <0 4 1760 1320>;
+ };
+
+ /* 960x1280 */
+ preset8 {
+ apple,config-index = <4>;
+ apple,input-size = <1328 1760>;
+ apple,output-size = <960 1280>;
+ apple,crop = <4 0 1320 1760>;
+ };
+
+ /* 640x480 */
+ preset9 {
+ apple,config-index = <3>;
+ apple,input-size = <1760 1328>;
+ apple,output-size = <640 480>;
+ apple,crop = <0 4 1760 1320>;
+ };
+
+ /* 480x640 */
+ preset10 {
+ apple,config-index = <4>;
+ apple,input-size = <1328 1760>;
+ apple,output-size = <480 640>;
+ apple,crop = <4 0 1320 1760>;
+ };
+ };
+};
@@ -53,6 +53,54 @@ wdt: watchdog@2922b0000 {
interrupts = <AIC_IRQ 0 631 IRQ_TYPE_LEVEL_HIGH>;
};
+ isp: isp@384000000 {
+ compatible = "apple,t6000-isp", "apple,isp";
+ reg = <0x3 0x84000000 0x0 0x2000000>,
+ <0x3 0x86104000 0x0 0x100>,
+ <0x3 0x86104170 0x0 0x100>,
+ <0x3 0x861043f0 0x0 0x100>;
+ reg-names = "coproc", "mbox", "gpio", "mbox2";
+ iommus = <&isp_dart0 0>, <&isp_dart1 0>, <&isp_dart2 0>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 0 538 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&ps_isp_sys>, <&ps_isp_set0>,
+ <&ps_isp_set1>, <&ps_isp_fe>, <&ps_isp_set3>,
+ <&ps_isp_set4>, <&ps_isp_set5>, <&ps_isp_set6>,
+ <&ps_isp_set7>, <&ps_isp_set8>;
+ apple,dart-vm-size = <0x0 0xa0000000>;
+ status = "disabled";
+ };
+
+ isp_dart0: iommu@3860e8000 {
+ compatible = "apple,t6000-dart";
+ reg = <0x3 0x860e8000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 0 543 IRQ_TYPE_LEVEL_HIGH>;
+ #iommu-cells = <1>;
+ power-domains = <&ps_isp_sys>;
+ status = "disabled";
+ };
+
+ isp_dart1: iommu@3860f4000 {
+ compatible = "apple,t6000-dart";
+ reg = <0x3 0x860f4000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 0 543 IRQ_TYPE_LEVEL_HIGH>;
+ #iommu-cells = <1>;
+ power-domains = <&ps_isp_sys>;
+ status = "disabled";
+ };
+
+ isp_dart2: iommu@3860fc000 {
+ compatible = "apple,t6000-dart";
+ reg = <0x3 0x860fc000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 0 543 IRQ_TYPE_LEVEL_HIGH>;
+ #iommu-cells = <1>;
+ power-domains = <&ps_isp_sys>;
+ status = "disabled";
+ };
+
sio_dart_0: iommu@39b004000 {
compatible = "apple,t6000-dart";
reg = <0x3 0x9b004000 0x0 0x4000>;
@@ -119,3 +119,9 @@ sdhci0: mmc@0,0 {
&fpwm0 {
status = "okay";
};
+
+#include "isp-imx558.dtsi"
+
+&isp {
+ apple,platform-id = <3>;
+};
@@ -1368,6 +1368,7 @@ DIE_NODE(ps_isp_sys): power-controller@3a8 {
#reset-cells = <0>;
label = DIE_LABEL(isp_sys);
power-domains = <&DIE_NODE(ps_afnc2_lw1)>;
+ status = "disabled";
};
DIE_NODE(ps_venc_sys): power-controller@3b0 {
@@ -1456,6 +1457,86 @@ DIE_NODE(ps_venc_me1): power-controller@8020 {
label = DIE_LABEL(venc_me1);
power-domains = <&DIE_NODE(ps_venc_me0)>;
};
+
+ /* There is a dependency tree involved with these PDs,
+ * but we do not express it here since the ISP driver
+ * is supposed to sequence them in the right order anyway
+ * (and we do not know the exact tree structure).
+ *
+ * This also works around spurious parent PD activation
+ * on machines with ISP disabled (desktops).
+ */
+ DIE_NODE(ps_isp_set0): power-controller@4000 {
+ compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4000 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set0";
+ };
+
+ DIE_NODE(ps_isp_set1): power-controller@4010 {
+ compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4010 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set1";
+ };
+
+ DIE_NODE(ps_isp_fe): power-controller@4008 {
+ compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4008 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set2";
+ };
+
+ DIE_NODE(ps_isp_set3): power-controller@4028 {
+ compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4028 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set3";
+ };
+
+ DIE_NODE(ps_isp_set4): power-controller@4020 {
+ compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4020 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set4";
+ };
+
+ DIE_NODE(ps_isp_set5): power-controller@4030 {
+ compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4030 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set5";
+ };
+
+ DIE_NODE(ps_isp_set6): power-controller@4018 {
+ compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4018 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set6";
+ };
+
+ DIE_NODE(ps_isp_set7): power-controller@4038 {
+ compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4038 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set7";
+ };
+
+ DIE_NODE(ps_isp_set8): power-controller@4040 {
+ compatible = "apple,t6000-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4040 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set8";
+ };
};
&DIE_NODE(pmgr_south) {
@@ -49,3 +49,9 @@ &i2c4 {
&fpwm1 {
status = "okay";
};
+
+#include "isp-imx248.dtsi"
+
+&isp {
+ apple,platform-id = <1>;
+};
@@ -41,3 +41,9 @@ &wifi0 {
&fpwm1 {
status = "okay";
};
+
+#include "isp-imx248.dtsi"
+
+&isp {
+ apple,platform-id = <1>;
+};
@@ -75,3 +75,9 @@ &pcie0_dart_1 {
&pcie0_dart_2 {
status = "okay";
};
+
+#include "isp-imx364.dtsi"
+
+&isp {
+ apple,platform-id = <2>;
+};
@@ -48,3 +48,9 @@ ethernet0: ethernet@0,0 {
&pcie0_dart_2 {
status = "okay";
};
+
+#include "isp-imx364.dtsi"
+
+&isp {
+ apple,platform-id = <2>;
+};
@@ -805,6 +805,7 @@ ps_isp_sys: power-controller@400 {
#reset-cells = <0>;
label = "isp_sys";
power-domains = <&ps_rmx>;
+ status = "disabled";
};
ps_venc_sys: power-controller@408 {
@@ -1003,6 +1004,123 @@ ps_disp0_cpu0: power-controller@10018 {
apple,always-on; /* TODO: figure out if we can enable PM here */
apple,min-state = <4>;
};
+
+ /* There is a dependency tree involved with these PDs,
+ * but we do not express it here since the ISP driver
+ * is supposed to sequence them in the right order anyway
+ * (and we do not know the exact tree structure).
+ *
+ * This also works around spurious parent PD activation
+ * on machines with ISP disabled (desktops).
+ */
+ ps_isp_set0: power-controller@4000 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4000 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set0";
+ apple,force-disable;
+ };
+
+ ps_isp_set1: power-controller@4008 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4008 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set1";
+ apple,force-disable;
+ apple,force-reset;
+ };
+
+ ps_isp_set2: power-controller@4010 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4010 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set2";
+ apple,force-disable;
+ apple,force-reset;
+ };
+
+ ps_isp_fe: power-controller@4018 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4018 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_fe";
+ };
+
+ ps_isp_set4: power-controller@4020 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4020 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set4";
+ };
+
+ ps_isp_set5: power-controller@4028 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4028 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set5";
+ };
+
+ ps_isp_set6: power-controller@4030 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4030 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set6";
+ };
+
+ ps_isp_set7: power-controller@4038 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4038 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set7";
+ };
+
+ ps_isp_set8: power-controller@4040 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4040 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set8";
+ };
+
+ ps_isp_set9: power-controller@4048 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4048 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set9";
+ };
+
+ ps_isp_set10: power-controller@4050 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4050 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set10";
+ };
+
+ ps_isp_set11: power-controller@4058 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4058 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set11";
+ };
+
+ ps_isp_set12: power-controller@4060 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4060 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set12";
+ };
};
&pmgr_mini {
@@ -356,6 +356,56 @@ cpufreq_p: performance-controller@211e20000 {
#performance-domain-cells = <0>;
};
+ isp: isp@22a000000 {
+ compatible = "apple,t8103-isp", "apple,isp";
+ reg = <0x2 0x2a000000 0x0 0x2000000>,
+ <0x2 0x2c104000 0x0 0x100>,
+ <0x2 0x2c104170 0x0 0x100>,
+ <0x2 0x2c1043f0 0x0 0x100>;
+ reg-names = "coproc", "mbox", "gpio", "mbox2";
+ iommus = <&isp_dart0 0>, <&isp_dart1 0>, <&isp_dart2 0>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 246 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&ps_isp_sys>, <&ps_isp_set0>,
+ <&ps_isp_set1>, <&ps_isp_set2>, <&ps_isp_fe>,
+ <&ps_isp_set4>, <&ps_isp_set5>, <&ps_isp_set6>,
+ <&ps_isp_set7>, <&ps_isp_set8>, <&ps_isp_set9>,
+ <&ps_isp_set10>, <&ps_isp_set11>,
+ <&ps_isp_set12>;
+ apple,dart-vm-size = <0x0 0xa0000000>;
+ status = "disabled";
+ };
+
+ isp_dart0: iommu@22c0e8000 {
+ compatible = "apple,t8103-dart";
+ reg = <0x2 0x2c0e8000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 251 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&ps_isp_sys>;
+ #iommu-cells = <1>;
+ status = "disabled";
+ };
+
+ isp_dart1: iommu@22c0f4000 {
+ compatible = "apple,t8103-dart";
+ reg = <0x2 0x2c0f4000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 251 IRQ_TYPE_LEVEL_HIGH>;
+ #iommu-cells = <1>;
+ power-domains = <&ps_isp_sys>;
+ status = "disabled";
+ };
+
+ isp_dart2: iommu@22c0fc000 {
+ compatible = "apple,t8103-dart";
+ reg = <0x2 0x2c0fc000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 251 IRQ_TYPE_LEVEL_HIGH>;
+ #iommu-cells = <1>;
+ power-domains = <&ps_isp_sys>;
+ status = "disabled";
+ };
+
sio_dart: iommu@235004000 {
compatible = "apple,t8103-dart";
reg = <0x2 0x35004000 0x0 0x4000>;
@@ -78,3 +78,10 @@ &i2c4 {
&fpwm1 {
status = "okay";
};
+
+#include "isp-imx558-cfg0.dtsi"
+
+&isp {
+ apple,platform-id = <14>;
+ apple,temporal-filter = <1>;
+};
@@ -67,3 +67,9 @@ &i2c4 {
&fpwm1 {
status = "okay";
};
+
+#include "isp-imx248.dtsi"
+
+&isp {
+ apple,platform-id = <6>;
+};
@@ -818,6 +818,7 @@ ps_isp_sys: power-controller@438 {
#reset-cells = <0>;
label = "isp_sys";
power-domains = <&ps_rmx1>;
+ status = "disabled";
};
ps_venc_sys: power-controller@440 {
@@ -964,6 +965,123 @@ ps_sep: power-controller@c00 {
apple,always-on;
};
+ /* There is a dependency tree involved with these PDs,
+ * but we do not express it here since the ISP driver
+ * is supposed to sequence them in the right order anyway
+ * (and we do not know the exact tree structure).
+ *
+ * This also works around spurious parent PD activation
+ * on machines with ISP disabled (desktops).
+ */
+ ps_isp_set0: power-controller@4000 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4000 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set0";
+ apple,force-disable;
+ };
+
+ ps_isp_set1: power-controller@4008 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4008 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set1";
+ apple,force-disable;
+ apple,force-reset;
+ };
+
+ ps_isp_set2: power-controller@4010 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4010 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set2";
+ apple,force-disable;
+ apple,force-reset;
+ };
+
+ ps_isp_fe: power-controller@4018 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4018 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_fe";
+ };
+
+ ps_isp_set4: power-controller@4020 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4020 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set4";
+ };
+
+ ps_isp_set5: power-controller@4028 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4028 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set5";
+ };
+
+ ps_isp_set6: power-controller@4030 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4030 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set6";
+ };
+
+ ps_isp_set7: power-controller@4038 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4038 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set7";
+ };
+
+ ps_isp_set8: power-controller@4040 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4040 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set8";
+ };
+
+ ps_isp_set9: power-controller@4048 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4048 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set9";
+ };
+
+ ps_isp_set12: power-controller@4050 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4050 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set10";
+ };
+
+ ps_isp_set10: power-controller@4058 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4058 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set11";
+ };
+
+ ps_isp_set11: power-controller@4060 {
+ compatible = "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate";
+ reg = <0x4060 4>;
+ #power-domain-cells = <0>;
+ #reset-cells = <0>;
+ label = "isp_set12";
+ };
+
ps_venc_dma: power-controller@8000 {
compatible = "apple,t8112-pmgr-pwrstate", "apple,pmgr-pwrstate";
reg = <0x8000 4>;
@@ -379,6 +379,56 @@ cpufreq_p: cpufreq@211e20000 {
#performance-domain-cells = <0>;
};
+ isp: isp@22a000000 {
+ compatible = "apple,t8112-isp", "apple,isp";
+ reg = <0x2 0x2a000000 0x0 0x2000000>,
+ <0x2 0x2c4c4000 0x0 0x100>,
+ <0x2 0x2c4c41b0 0x0 0x100>,
+ <0x2 0x2c4c4430 0x0 0x100>;
+ reg-names = "coproc", "mbox", "gpio", "mbox2";
+ iommus = <&isp_dart0 0>, <&isp_dart1 0>, <&isp_dart2 0>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&ps_isp_sys>, <&ps_isp_set0>,
+ <&ps_isp_set1>, <&ps_isp_set2>, <&ps_isp_fe>,
+ <&ps_isp_set4>, <&ps_isp_set5>, <&ps_isp_set6>,
+ <&ps_isp_set7>, <&ps_isp_set8>, <&ps_isp_set9>,
+ <&ps_isp_set10>, <&ps_isp_set11>,
+ <&ps_isp_set12>;
+ apple,dart-vm-size = <0x0 0xa0000000>;
+ status = "disabled";
+ };
+
+ isp_dart0: iommu@22c4a8000 {
+ compatible = "apple,t8110-dart";
+ reg = <0x2 0x2c4a8000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 274 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&ps_isp_sys>;
+ #iommu-cells = <1>;
+ status = "disabled";
+ };
+
+ isp_dart1: iommu@22c4b4000 {
+ compatible = "apple,t8110-dart";
+ reg = <0x2 0x2c4b4000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 274 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&ps_isp_sys>;
+ #iommu-cells = <1>;
+ status = "disabled";
+ };
+
+ isp_dart2: iommu@22c4bc000 {
+ compatible = "apple,t8110-dart";
+ reg = <0x2 0x2c4bc000 0x0 0x4000>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 274 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&ps_isp_sys>;
+ #iommu-cells = <1>;
+ status = "disabled";
+ };
+
sio_dart: iommu@235004000 {
compatible = "apple,t8110-dart";
reg = <0x2 0x35004000 0x0 0x4000>;