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>
/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";
+ };
+ };
+ };
};
/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";
+ };
+ };
+ };
};