u-boot/tools/dtoc/dtoc_test_phandle.dts
Simon Glass 760b7170c5 dtoc: Fix properties with a single zero-arg phandle
At present a property with a single phandle looks like an integer value
to dtoc. Correct this by adjusting it in the phandle-processing code.

Add a test for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-09 09:11:00 -06:00

43 lines
732 B
Plaintext

// SPDX-License-Identifier: GPL-2.0+
/*
* Test device tree file for dtoc
*
* Copyright 2017 Google, Inc
*/
/dts-v1/;
/ {
phandle: phandle-target {
u-boot,dm-pre-reloc;
compatible = "target";
intval = <0>;
#clock-cells = <0>;
};
phandle_1: phandle2-target {
u-boot,dm-pre-reloc;
compatible = "target";
intval = <1>;
#clock-cells = <1>;
};
phandle_2: phandle3-target {
u-boot,dm-pre-reloc;
compatible = "target";
intval = <2>;
#clock-cells = <2>;
};
phandle-source {
u-boot,dm-pre-reloc;
compatible = "source";
clocks = <&phandle &phandle_1 11 &phandle_2 12 13 &phandle>;
};
phandle-source2 {
u-boot,dm-pre-reloc;
compatible = "source";
clocks = <&phandle>;
};
};