dts: fdto: the fdt is damaged in booting process [1/1]
authorJiamin Ma <jiamin.ma@amlogic.com>
Thu, 6 Dec 2018 07:26:57 +0000 (15:26 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 7 Dec 2018 03:55:15 +0000 (19:55 -0800)
PD#SWPL-2960

Problem:
If the overlay dts refers to a node which does not exist in the base
device tree, the final fdt will be in a damaged state after doing fdt
overlay

Solution:
Use the standard overlay dts syntax to note node to be applied instead
of the google recommended one

Verify:
Locally on P230

Change-Id: Ibf45abff1348437bc3fc2745e6d955cc8292db46
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
arch/arm/boot/dts/amlogic/android_p_overlay_dt.dts
arch/arm64/boot/dts/amlogic/android_p_overlay_dt.dts

index 778f84dc72abb8aa76d24ead42c6a00e99716778..de97c56e27a13e4630463da550c3b5a2f792e92d 100644 (file)
 /dts-v1/;
 /plugin/;
 
+/ {
+       fragment@0 {
+               //target = <&some_node>;
+               target-path="/";
+               __overlay__ {
+                       dummy-battery {
+                               compatible = "amlogic, dummy-battery";
+                               status = "okay";
+                       };
+               };
+       };
 
-&amlogic_battery {
-       compatible = "amlogic, dummy-battery";
-       status = "okay";
-};
-
-&amlogic_charger {
-       compatible = "amlogic, dummy-charger";
-       status = "okay";
+       fragment@1 {
+               //target = <&some_node>;
+               target-path="/";
+               __overlay__ {
+                       dummy-charger {
+                               compatible = "amlogic, dummy-charger";
+                               status = "okay";
+                       };
+               };
+       };
 };
index dc46ec32a65726e66be189591019a38d3cd0c92c..42efa870557ce8848ced2cdc5f2d09e74060b8e6 100644 (file)
 /dts-v1/;
 /plugin/;
 
-&amlogic_battery {
-       compatible = "amlogic, dummy-battery";
-       status = "okay";
-};
+/ {
+       fragment@0 {
+               //target = <&some_node>;
+               target-path="/";
+               __overlay__ {
+                       dummy-battery {
+                               compatible = "amlogic, dummy-battery";
+                               status = "okay";
+                       };
+               };
+       };
 
-&amlogic_charger {
-       compatible = "amlogic, dummy-charger";
-       status = "okay";
+       fragment@1 {
+               //target = <&some_node>;
+               target-path="/";
+               __overlay__ {
+                       dummy-charger {
+                               compatible = "amlogic, dummy-charger";
+                               status = "okay";
+                       };
+               };
+       };
 };