Hi Maxim, On 23 January 2017 at 10:52, Maxim Sloyko <max...@google.com> wrote: > On Fri, Jan 20, 2017 at 7:52 PM, Simon Glass <s...@chromium.org> wrote: >> >> Hi Maxim, >> >> On 17 January 2017 at 16:27, Maxim Sloyko <max...@google.com> wrote: >> > >> > >> > On Sat, Jan 14, 2017 at 9:13 AM, Simon Glass <s...@chromium.org> wrote: >> >> >> >> Hi Maxim, >> >> >> >> On 5 January 2017 at 15:20, Maxim Sloyko <max...@google.com> wrote: >> >> > On Wed, Jan 4, 2017 at 7:26 PM, Tom Rini <tr...@konsulko.com> wrote: >> >> >> On Wed, Jan 04, 2017 at 05:18:42PM -0800, Maxim Sloyko wrote: >> >> >>> On Wed, Jan 4, 2017 at 12:58 PM, Tom Rini <tr...@konsulko.com> wrote: >> >> >>> > On Wed, Jan 04, 2017 at 11:46:49AM -0800, Maxim Sloyko wrote: >> >> >>> > >> >> >>> >> Signed-off-by: Maxim Sloyko <max...@google.com> >> >> >>> >> --- >> >> >>> >> >> >> >>> >> arch/arm/dts/ast2500.dtsi | 423 >> >> >>> >> ++++++++++++++++++++++++++++++++ >> >> >>> >> include/dt-bindings/clock/ast2500-scu.h | 29 +++ >> >> >>> >> 2 files changed, 452 insertions(+) >> >> >>> >> create mode 100644 arch/arm/dts/ast2500.dtsi >> >> >>> >> create mode 100644 include/dt-bindings/clock/ast2500-scu.h >> >> >>> >> >> >> >>> >> diff --git a/arch/arm/dts/ast2500.dtsi b/arch/arm/dts/ast2500.dtsi >> >> >>> >> new file mode 100644 >> >> >>> >> index 0000000000..1a2a3f7ee3 >> >> >>> >> --- /dev/null >> >> >>> >> +++ b/arch/arm/dts/ast2500.dtsi >> >> >>> >> @@ -0,0 +1,423 @@ >> >> >>> >> +/* This device tree is copied from >> >> >>> >> + * >> >> >>> >> https://github.com/openbmc/linux/blob/c5682cb/arch/arm/boot/dts/aspeed-g5.dtsi >> >> >>> > >> >> >>> > Is this also found in the Linux kernel or not yet? Thanks! >> >> >>> >> >> >>> Yes, this is also in in main Linux kernel now, as I've found out, but >> >> >>> actually there is a number of differences, most notably there is no >> >> >>> pin configuration in this device tree, because there is no pinctrl >> >> >>> driver. >> >> > >> >> > Actually, I take that back, I was looking at the wrong linux Linux >> >> > kernel tree still... Only basic version of device tree has made it to >> >> > mainline kernel, but it's enough at the moment, so I used that >> >> > instead. >> >> > >> >> >>> >> >> >>> Should I remove this reference or modify it? >> >> >> >> >> >> Ideally, we will take the kernel dts files and then add what we need on >> >> >> top of that in one of CONFIG_SYS_CPU/CONFIG_SYS_SOC/CONFIG_SYS_VENDOR >> >> >> -u-boot.dtsi files, see for example arch/arm/dts/sunxi-u-boot.dtsi or >> >> >> arch/arm/dts/tegra124-nyan-big-u-boot.dtsi >> >> > >> >> > OK, so I took the device tree from the Linux kernel, (ast2500.dtsi), >> >> > added modifications in ast2500-u-boot.dtsi and now include >> >> > ast2500-u-boot.dtsi in ast2500-evb.dts. Let me know if I misunderstood >> >> > you. >> >> >> >> There is some magic in the Makefile which automatically includes the >> >> .dtsi if you name it correctly: >> >> >> >> # Try these files in order to find the U-Boot-specific .dtsi include file >> >> u_boot_dtsi_options = $(wildcard $(dts_dir)/$(basename $(notdir >> >> $<))-u-boot.dtsi) \ >> >> $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \ >> >> $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \ >> >> $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \ >> >> $(wildcard $(dts_dir)/u-boot.dtsi) >> >> >> >> >> >> So you should not need to include it explicitly. >> > >> > >> > Well, it looks like the only applicable for this case would be >> > CONFIG_SYS_SOC, but it looks like this setting also affects the mach- and >> > arch- directories used. In this case I want different aspeed SoCs to share >> > those directories, but >> > they will have different DTs. >> >> The first option is to a .dtsi derived from the .dts filename. Does that >> help? > > Hmm, probably not... if I understand that correctly. > > This is what I have right now: > > ast2500.dtsi -- device tree from the linux kernel, used by all > ast2500-based boards. > ast2500-u-boot.dtsi -- these are u-boot specific additions, with > u-boot,dm-pre-reloc labels, clock specification and SDRAM driver node. > These are still need to be shared by all ast2500-based boards. > ast2500-evb.dts -- Eval board specific stuff, right now basically just > chosen node with stdout-path and clock frequency specification for > SDRAM. > > I don't this it would make sense to have ast2500-evb-u-boot.dtsi just > to avoid include, because when I later create ast2500-zaius-bmc.dts or > something like that, I would have the same problem.
Yes you may as well have your own include. The idea is to use the same files as Linux, and put the U-Boot additions in a separate file. But it's not critical - just a new idea we had. Also if you can get the U-Boot additions into the upstream Linux version then you won't need this. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot