dtoc: Support widening a bool value

At present if we see 'ranges' property (with no value) we assume it is a
boolean, as per the devicetree spec.

But another node may define 'ranges' with a value, forcing us to widen it
to an int array. At present this is not supported and causes an error.

Fix this and add some test cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>
40 jobs for dm-pull-1aug21 in 21 seconds (queued for 3 seconds)
latest
Status Name Job ID Coverage
  Testsuites
canceled Build envtools #301707

canceled Build tools-only #301706

canceled Check for configs without MAINTAINERS entry #301705

canceled cppcheck #301701

00:00:21

canceled grep TODO/FIXME/HACK #301702

00:00:19

canceled htmldocs #301703

00:00:19

canceled Run binman, buildman, dtoc, Kconfig and patman testsuites #301708

canceled Run tests for Nokia RX-51 (aka N900) #301709

canceled sloccount #301704

00:00:19

 
  Test.Py
canceled evb-ast2500 test.py #301714

canceled integratorcp_cm926ejs test.py #301716

canceled qemu_arm64 test.py #301718

canceled qemu_arm test.py #301717

canceled qemu_malta64el test.py #301722

canceled qemu_malta64 test.py #301721

canceled qemu_maltael test.py #301720

canceled qemu_malta test.py #301719

canceled qemu-ppce500 test.py #301723

canceled qemu-riscv32_spl test.py #301726

canceled qemu-riscv32 test.py #301724

canceled qemu-riscv64_spl test.py #301727

canceled qemu-riscv64 test.py #301725

canceled qemu-x86_64 test.py #301729

canceled qemu-x86 test.py #301728

canceled r2dplus_i82557c test.py #301730

canceled r2dplus_pcnet test.py #301731

canceled r2dplus_rtl8139 test.py #301732

canceled r2dplus_tulip test.py #301733

canceled sandbox_flattree test.py #301715

canceled sandbox_noinst_test.py #301713

canceled sandbox_spl test.py #301712

canceled sandbox test.py #301710

canceled sandbox with clang test.py #301711

canceled xilinx_versal_virt test.py #301735

canceled xilinx_zynq_virt test.py #301734

canceled xtfpga test.py #301736

 
  World Build
canceled build all 32bit ARM platforms #301737

canceled build all 64bit ARM platforms #301738

canceled build all other platforms #301740

canceled build all PowerPC platforms #301739