From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Fri, 17 Apr 2015 11:38:45 +0200 Subject: [query] how to use "ranges" in device tree In-Reply-To: <20150417164546.3925eb7c@xhacker> References: <20150416215938.347caa68@xhacker> <5862495.WQJXyp7MlL@wuerfel> <20150417164546.3925eb7c@xhacker> Message-ID: <3074482.0e1L0iyh9V@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Friday 17 April 2015 16:45:46 Jisheng Zhang wrote: > > > > A nicer (but a little more complicated) way to do this would be to use > > #address-cells=<2> in the parent bus and use that to enumerate the > > In this way, we need to change all device nodes' "reg" in arch/arm/boot/dts/berlin2q.dtsi? Correct > And in arm64 case, we should use #address-cells=<3>? It depends: if any of the address spaces within are 64-bit wide, yes, otherwise you can make the virtual spaces just 2-cell wide. > If above two answer is yes, setting "ranges = <..>" seems add complexity in my > humble opinion. So is it better to use 1:1 mapping by "ranges;" in "/soc" node? I agree, it gets a little awkward at that point. A better solution here would be to take the PCI node out of /soc and move it to the root node. This has the slight downside that you end up with registers being part of /soc and /pci, but that's perfectly legal. Arnd