Enable Columbia EdgeTPU from M.2 card.
Compile device tree with symbols for easy references.
Bug: 144466013
Tested: Build m2.dtbo; add m2 to overlay.txt; lspci to check PCIE
enumeration.
Change-Id: I6f0c23a14fb91bc32d3a496176fcc75051265f6e
diff --git a/arch/arm64/boot/dts/freescale/fsl-imx8mm-columbia-m2.dts b/arch/arm64/boot/dts/freescale/fsl-imx8mm-columbia-m2.dts
new file mode 100644
index 0000000..070954e
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/fsl-imx8mm-columbia-m2.dts
@@ -0,0 +1,24 @@
+// Set Columbia M2 edgetpu card interface.
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "fsl,imx8mm-columbia";
+
+ fragment@0 {
+ target = <&pinctrl_pcie0>;
+ __overlay__ {
+ fsl,pins = <
+ 0x22c 0x494 0x524 0x12 0x0 0x61 /* MX8MM_IOMUXC_I2C4_SCL_PCIE1_CLKREQ_B */
+ 0x058 0x2c0 0x000 0x0 0x0 0x51 /* MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 as APEX_SYS_RST_L for M2 */
+ >;
+ };
+ };
+
+ fragment@1 {
+ target = <&pcie0>;
+ __overlay__ {
+ reset-gpio = <&gpio1 12 1>; // GPIO_ACTIVE_LOW
+ };
+ };
+};
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index aac94d9..203031b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -285,6 +285,9 @@
-Wproperty_name_chars_strict
endif
+# Enable creation of __symbols__ node (used by overlay)
+DTC_FLAGS += -@
+
DTC_FLAGS += $(DTC_FLAGS_$(basetarget))
# Generate an assembly file to wrap the output of the device tree compiler