Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi
===================================================================
--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/arch/arm64/boot/dts/qcom/qcom-ipq6018-memory.dtsi
@@ -92,6 +92,12 @@
 			reg = <0x0 0x40000000 0x0 0x00800000>;
 		};
 
+		ramoops@4A0f0000 {
+			compatible = "ramoops";
+			reg = <0 0x4A0f0000 0 0x10000>;
+			record-size = <0x1000>;
+		};
+
 		uboot@4A100000 {
 			no-map;
 			reg = <0x0 0x4A100000 0x0 0x00400000>;
@@ -211,6 +217,12 @@
 			reg = <0x0 0x40000000 0x0 0x01000000>;
 		};
 
+		ramoops@4A0f0000 {
+			compatible = "ramoops";
+			reg = <0 0x4A0f0000 0 0x10000>;
+			record-size = <0x1000>;
+		};
+
 		uboot@4A100000 {
 			no-map;
 			reg = <0x0 0x4A100000 0x0 0x00400000>;
@@ -330,6 +342,12 @@
 			reg = <0x0 0x40000000 0x0 0x01000000>;
 		};
 
+		ramoops@4A0f0000 {
+			compatible = "ramoops";
+			reg = <0 0x4A0f0000 0 0x10000>;
+			record-size = <0x1000>;
+		};
+
 		uboot@4A100000 {
 			no-map;
 			reg = <0x0 0x4A100000 0x0 0x00400000>;
Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/fs/pstore/ram.c
===================================================================
--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/fs/pstore/ram.c
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/fs/pstore/ram.c
@@ -466,15 +466,46 @@ static int ramoops_init_prz(struct devic
 	return 0;
 }
 
+static int ramoops_parse_dt(struct platform_device *pdev,
+                            struct ramoops_platform_data *pdata)
+{
+	struct resource *res;
+
+	dev_dbg(&pdev->dev, "using Device Tree\n");
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!res) {
+		dev_err(&pdev->dev,
+			"failed to locate DT /reserved-memory resource\n");
+		return -EINVAL;
+	}
+
+	pdata->mem_size = resource_size(res);
+	pdata->mem_address = res->start;
+	pdata->dump_oops = true;
+	pdata->record_size = 0x1000;
+	return 0;
+}
+
 static int ramoops_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct ramoops_platform_data *pdata = pdev->dev.platform_data;
+	struct ramoops_platform_data pdata_local;
 	struct ramoops_context *cxt = &oops_cxt;
 	size_t dump_mem_sz;
 	phys_addr_t paddr;
 	int err = -EINVAL;
 
+	if (dev_of_node(dev) && !pdata) {
+		pdata = &pdata_local;
+		memset(pdata, 0, sizeof(*pdata));
+
+		err = ramoops_parse_dt(pdev, pdata);
+		if (err < 0)
+		goto fail_out;
+	}
+
 	/* Only a single ramoops area allowed at a time, so fail extra
 	 * probes.
 	 */
@@ -603,11 +634,17 @@ static int ramoops_remove(struct platfor
 	return 0;
 }
 
+static const struct of_device_id dt_match[] = {
+	{ .compatible = "ramoops" },
+	{}
+};
+
 static struct platform_driver ramoops_driver = {
 	.probe		= ramoops_probe,
 	.remove		= ramoops_remove,
 	.driver		= {
 		.name	= "ramoops",
+		.of_match_table = dt_match,
 	},
 };
 
Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/of/platform.c
===================================================================
--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/of/platform.c
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/of/platform.c
@@ -53,6 +53,30 @@ struct platform_device *of_find_device_b
 }
 EXPORT_SYMBOL(of_find_device_by_node);
 
+static const struct of_device_id reserved_mem_matches[] = {
+        { .compatible = "ramoops" },
+        {}
+};
+
+static int __init of_platform_default_populate_init(void)
+{
+	struct device_node *node;
+
+	if (!of_have_populated_dt())
+		return -ENODEV;
+
+	/*
+	 * Handle certain compatibles explicitly, since we don't want to create
+	 * platform_devices for every node in /reserved-memory with a
+	 * "compatible",
+	 */
+	for_each_matching_node(node, reserved_mem_matches)
+		of_platform_device_create(node, NULL, NULL);
+
+	return 0;
+}
+arch_initcall_sync(of_platform_default_populate_init);
+
 #ifdef CONFIG_OF_ADDRESS
 /*
  * The following routines scan a subtree and registers a device for
