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 778f84d..de97c56 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 dc46ec3..42efa87 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";
+                       };
+               };
+       };
 };