[][Add MT7986 ice debug driver]

[Description]
Add ice debug driver
1.add debug clk in dts.
2.open ice debug driver.

[Release-log]
N/A

Change-Id: I3bdeca41f59157570a68376aeb16c7ae5c8d4185
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/4695168
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986-clkitg.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986-clkitg.dtsi
index 9a59273..e0c9ce5 100644
--- a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986-clkitg.dtsi
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986-clkitg.dtsi
@@ -82,7 +82,7 @@
 			<&infracfg_ao CK_INFRA_AUD_AUD_CK>,
 			<&infracfg_ao CK_INFRA_AUD_EG2_CK>,
 			<&infracfg_ao CK_INFRA_DRAMC_26M_CK>,
-			<&infracfg_ao CK_INFRA_DBG_CK>,
+			<&clk40m>,
 			<&infracfg_ao CK_INFRA_AP_DMA_CK>,
 			<&infracfg_ao CK_INFRA_SEJ_CK>,
 			<&infracfg_ao CK_INFRA_SEJ_13M_CK>,
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
index 7801a8e..5359a06 100644
--- a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -594,6 +594,13 @@
 		clocks = <&infracfg_ao CK_INFRA_TRNG_CK>;
 		clock-names = "rng";
 	};
+
+	ice: ice_debug {
+		compatible = "mediatek,mt7986-ice_debug",
+			"mediatek,mt2701-ice_debug";
+		clocks = <&infracfg_ao CK_INFRA_DBG_CK>;
+		clock-names = "ice_dbg";
+	};
 };
 
 #include "mt7986-clkitg.dtsi"
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b.dtsi
index adc55b8..3ba00c7 100644
--- a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b.dtsi
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b.dtsi
@@ -546,6 +546,13 @@
 		clocks = <&infracfg_ao CK_INFRA_TRNG_CK>;
 		clock-names = "rng";
 	};
+
+	ice: ice_debug {
+		compatible = "mediatek,mt8512-ice_debug",
+			"mediatek,mt2701-ice_debug";
+		clocks = <&infracfg_ao CK_INFRA_DBG_CK>;
+		clock-names = "ice_dbg";
+	};
 };
 
 #include "mt7986-clkitg.dtsi"
diff --git a/target/linux/mediatek/files-5.4/drivers/misc/mediatek/ice_debug/Kconfig b/target/linux/mediatek/files-5.4/drivers/misc/mediatek/ice_debug/Kconfig
index 9d8584d..338f3d3 100644
--- a/target/linux/mediatek/files-5.4/drivers/misc/mediatek/ice_debug/Kconfig
+++ b/target/linux/mediatek/files-5.4/drivers/misc/mediatek/ice_debug/Kconfig
@@ -1,3 +1,3 @@
 config MTK_ICE_DEBUG
 	bool "ICE_DEBUG"
-	default y if MACH_MT2701
+	default y if ARCH_MEDIATEK