From e655da02f243a2b76bd34944da72c501c9cac0a6 Mon Sep 17 00:00:00 2001 From: Jiamin Ma Date: Thu, 6 Dec 2018 15:26:57 +0800 Subject: [PATCH] dts: fdto: the fdt is damaged in booting process [1/1] 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 --- .../boot/dts/amlogic/android_p_overlay_dt.dts | 29 ++++++++++++++----- .../boot/dts/amlogic/android_p_overlay_dt.dts | 28 +++++++++++++----- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/arch/arm/boot/dts/amlogic/android_p_overlay_dt.dts b/arch/arm/boot/dts/amlogic/android_p_overlay_dt.dts index 778f84dc72ab..de97c56e27a1 100644 --- a/arch/arm/boot/dts/amlogic/android_p_overlay_dt.dts +++ b/arch/arm/boot/dts/amlogic/android_p_overlay_dt.dts @@ -18,13 +18,26 @@ /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"; + }; + }; + }; }; diff --git a/arch/arm64/boot/dts/amlogic/android_p_overlay_dt.dts b/arch/arm64/boot/dts/amlogic/android_p_overlay_dt.dts index dc46ec32a657..42efa870557c 100644 --- a/arch/arm64/boot/dts/amlogic/android_p_overlay_dt.dts +++ b/arch/arm64/boot/dts/amlogic/android_p_overlay_dt.dts @@ -18,12 +18,26 @@ /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"; + }; + }; + }; }; -- 2.20.1