aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-09-15fit: fdt overlays docPantelis Antoniou3-3/+236
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Reviewed-by: Ɓukasz Majewski Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15fit: Introduce methods for applying overlays on fit-loadPantelis Antoniou3-8/+205
Introduce an overlay based method for constructing a base DT blob to pass to the kernel. It is based on a specific method now to get the FDT from a FIT image named boot_get_fdt_fit(). Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15fit: Do not throw away extra configuration on fit_image_load()Pantelis Antoniou1-4/+7
fit_image_load() threw away the extra configuration parts when loading. We need them around for applying extra overlays for building the boot fdt. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15fit: Allow multiple images per propertyPantelis Antoniou1-3/+15
As part of the fdt overlay support which need it, allow a list of configurations per property. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15fdt: Allow stacked overlays phandle referencesPantelis Antoniou1-22/+206
This patch enables an overlay to refer to a previous overlay's labels by performing a merge of symbol information at application time. In a nutshell it allows an overlay to refer to a symbol that a previous overlay has defined. It requires both the base and all the overlays to be compiled with the -@ command line switch so that symbol information is included. base.dts -------- /dts-v1/; / { foo: foonode { foo-property; }; }; $ dtc -@ -I dts -O dtb -o base.dtb base.dts bar.dts ------- /dts-v1/; /plugin/; / { fragment@1 { target = <&foo>; __overlay__ { overlay-1-property; bar: barnode { bar-property; }; }; }; }; $ dtc -@ -I dts -O dtb -o bar.dtb bar.dts baz.dts ------- /dts-v1/; /plugin/; / { fragment@1 { target = <&bar>; __overlay__ { overlay-2-property; baz: baznode { baz-property; }; }; }; }; $ dtc -@ -I dts -O dtb -o baz.dtb baz.dts Applying the overlays: $ fdtoverlay -i base.dtb -o target.dtb bar.dtb baz.dtb Dumping: $ fdtdump target.dtb / { foonode { overlay-1-property; foo-property; linux,phandle = <0x00000001>; phandle = <0x00000001>; barnode { overlay-2-property; phandle = <0x00000002>; linux,phandle = <0x00000002>; bar-property; baznode { phandle = <0x00000003>; linux,phandle = <0x00000003>; baz-property; }; }; }; __symbols__ { baz = "/foonode/barnode/baznode"; bar = "/foonode/barnode"; foo = "/foonode"; }; }; Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15fdt: Switch to using the verbose overlay application methodPantelis Antoniou1-4/+3
The verbose overlay application method prints out more helpful messages, so switch to it. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15fdt: Introduce helper method fdt_overlay_apply_verbose()Pantelis Antoniou2-0/+33
Introduce fdt_overlay_apply_verbose, a method that applies an overlay but in the case of an error produces a helpful message. In addition if a base tree is found to be missing the __symbols__ node the message will point out that the probable reason is that the base tree was miscompiled without the -@ option. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15libfdt: Initialize the stack variableTien Fong Chee1-1/+1
Report Coverity log: The code uses a variable that has not been initialized, leading to unpredictable or unintended results. Reported-by: Coverity (CID: 60519) Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
2017-09-15dtoc: Add a header to the generated filesSimon Glass1-0/+12
Add a header that indicates that the files generated by dtoc should not be modified. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Rename the auto-generated dt-structs.h fileSimon Glass2-3/+4
The filename of the auto-generated file is the same as the file that includes it. Even though the form is in the generated/ subdirectory, this could be confused. Rename the generated file to something that makes it clear it is auto-generated. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Support properties containing multiple phandle valuesSimon Glass4-12/+58
At present dtoc has a very simplistic view of phandles. It assumes that a property has only a single phandle with a single argument (i.e. two cells per property). This is not true in many cases. Enhance the implementation to scan all phandles in a property and to use the correct number of arguments (which can be 0, 1, 2 or more) when generating the C code. For the struct definitions, use a struct which can hold the maximum number of arguments used by the property. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Put phandle args in an arraySimon Glass4-5/+5
We want to support more than one phandle argument. It makes sense to use an array for this rather than discrete struct members. Adjust the code to support this. Rename the member to 'arg' instead of 'id'. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Put each phandle on a separate lineSimon Glass2-6/+9
When writing values from properties which contain phandles, dtoc currently writes 8 phandles per line. Change this to write one phandle per line. This helps reduce line length, since phandles are generally longer and may have arguments. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Rename the phandle structSimon Glass6-7/+13
Rather than naming the phandle struct according to the number of cells it uses (e.g. struct phandle_2_cell) name it according to the number of arguments it has (e.g. struct phandle_1_arg). This is a more intuitive naming. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Rename is_phandle() and adjust it to return more detailSimon Glass2-22/+58
Update this function to return more detail about a property that contains phandles. This will allow (in a future commit) more accurate handling of these properties. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Make is_phandle() a member functionSimon Glass1-18/+18
This function will need to have access to class members once we enhance it to support multiple phandle values. In preparation for that, move it into the class. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Use the Fdt's class's phandle mapSimon Glass1-13/+3
Now that the Fdt class can map phandles to the associated nodes, use that instead of a separate implementation. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Update the Fdt class to record phandlesSimon Glass1-0/+5
Add a map from phandles to nodes. This can be used by clients of the the class instead of maintaining this themselves. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Handle 'reg' properties with unusual sizesSimon Glass2-0/+38
At present dtoc assumes that all 'reg' properties have both an address and a size. For I2C devices we do not have this. Adjust dtoc to cope. Reported-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Add support for 32 or 64-bit addressesSimon Glass13-6/+413
When using 32-bit addresses dtoc works correctly. For 64-bit addresses it does not since it ignores the #address-cells and #size-cells properties. Update the tool to use fdt64_t as the element type for reg properties when either the address or size is larger than one cell. Use the correct value so that C code can obtain the information from the device tree easily. Alos create a new type, fdt_val_t, which is defined to either fdt32_t or fdt64_t depending on the word size of the machine. This type corresponds to fdt_addr_t and fdt_size_t. Unfortunately we cannot just use those types since they are defined to phys_addr_t and phys_size_t which use 'unsigned long' in the 32-bit case, rather than 'unsigned int'. Add tests for the four combinations of address and size values (32/32, 64/64, 32/64, 64/32). Also update existing uses for rk3399 and rk3368 which now need to use the new fdt_val_t type. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heiko Stuebner <heiko@sntech.de> Reported-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Avoid very long lines in outputSimon Glass2-3/+10
Large arrays can result in lines with hundreds or thousands of characters which is not very editor-friendly. To avoid this, addjust the tool to group values 8 per line. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Add a 64-bit type and a way to convert cells into 64 bitsSimon Glass3-1/+18
When dealing with multi-cell values we need a type that can hold this value. Add this and a function to process it from a list of cell values. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Adjust Node to record its parentSimon Glass1-5/+7
We need to be able to search back up the tree for #address-cells and #size-cells. Record the parent of each node to make this easier. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15fdt: Sync libfdt up to upstreamSimon Glass3-3/+106
Add upstream changes to U-Boot: - new pylibfdt functions - fdt_setprop_placeholder() Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-15Travis-CI: Switch back to using the top of tree dtcTom Rini1-3/+2
In a0f3e3df4adc we switched to using the Ubuntu-provided dtc as travis was having a problem with the number of warnings that were generated by the newer dtc. This is no longer a concern as we now have the same logic as Linux to enable/disable additional more stringent warnings. Go back to building dtc from source. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested on travis-ci: Tested-by: Simon Glass <sjg@chromium.org>
2017-09-14configs: at91: Remove CONFIG_SYS_EXTRA_OPTIONS assignmentWenyou Yang48-135/+102
To remove the assignment of CONFIG_SYS_EXTRA_OPTIONS option, which is deprecated, use the CONFIG_XXXX_BOOT options to indicate the boot media, and the SoC is selected by the board. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-09-14ARM: at91: spl: Add macro CONFIG_XXXX_BOOT supportWenyou Yang1-6/+10
Use the CONFIG_XXXX_BOOT to indicate the boot media, instead of the CONFIG_SYS_USE_XXXX option, which is declared by CONFIG_SYS_EXTRA_OPTIONS option. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-09-14ARM: at91: Remove hardware.h included in configsWenyou Yang16-39/+39
As said in READRE.kconfig, include/configs/*.h will be removed after all options are switched to Kconfig. As the first step, remove the follow line from include/configs/*.h. #include <asm/hardware.h> Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-09-14ARM: at91: Add the SoC options to KconfigWenyou Yang1-27/+79
To prepare to remove the SoCs options such as SAMA5D2, SAMA5D3 and SAMA5D4 from the CONFIG_SYS_EXTRA_OPTIONS option which is deprecated, add the SoC options to Kconfig. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-09-14ARM: at91: Move CONFIG_AT91FAMILY option to KconfigWenyou Yang11-43/+3
Move the CONFIG_AT91FAMILY option from include/mach/<soc>.h header file to Kconfig. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-09-14board: atmel: Add SAMA5D27 SOM1 EK boardWenyou Yang11-0/+809
The SAMA5D27-SiP (System in Package) integrates the SAMA5D2 with 1Gbit DDR2-SDRAM in a single package. The SAMA5D27 SOM1 embeds a 64Mbit QSPI flash, KSZ8081 Phy and Mac-address EEPROM. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-14ARM: at91: Get the Chip ID of SAMA5D2 SiPWenyou Yang2-3/+30
The SAMA5D2 SiP(System in Package) has different Chip IDs in the CHIPID and CHIP_EXID registers. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-14ARM: at91: mach: Add missing defines of MPDDRCWenyou Yang1-0/+4
Add missing defines of Multiport DDR-SDRAM Controller (MPDDRC). Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-14ARM: at91: spl: Add boot device for boot from QSPIWenyou Yang1-0/+2
Add the boot device for booting from the QSPI flash. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-14board: sama5d2_xplained: Make SPL work on spiflashWenyou Yang2-1/+11
Because before switching to a lower clock source, we must switch the clock source first instead of last. So before configuring the PMC_MCKR register, invoke at91_mck_init_down() first. As said in datasheet, the the size of SPL must not exceed the maximum size allowed(64Kbytes). Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-14ARM: at91: spl: Add mck function to lower rate while switchingWenyou Yang2-0/+43
Refer to the commit 70f8c8316ad(PMC: add new mck function to lower rate while switching) from AT91Bootstrap. While switching to a lower clock source, we must switch the clock source first instead of last. Otherwise, we could end up with too high frequency on internal bus and peripherals. This happens on SAMA5D2 as exitting from the ROM code. Add a function pmc_mck_init_down() to allow this sequence. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-14ARM: at91: spl: Adjust switching to oscillator for SAMA5D2Wenyou Yang2-1/+19
As said in 29.5.7 section of SAMA5D2 datasheet, before switching to the crystal oscillator, a check must be carried out to ensure that the oscillator is present and that its freqency is valid. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-14atmel: common: Add function to display via DM_VIDEO's APIWenyou Yang3-0/+74
Add a function to display the company's logo and board information via the API from DM_VIDEO. This function can be shared by other atmel boards, so locate it in board/atmel/common folder. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-14lib: at91: Add logo files used via API of DM_VIDEOWenyou Yang7-0/+2440
In order to display the company's logo via the API of DM_VIDEO, and add the logo files of both Atmel and Microchip. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-14ARM: dts: at91: sama5: Add the sfr nodeWenyou Yang2-0/+8
For sama5d2, add the sfr node with syscon support. In order to access the SFR_UTMICKTRIM register for the utmi clock driver, add the phandle property for the utmi node to point to the sfr node. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-09-14clk: at91: utmi: Set the reference clock frequencyWenyou Yang4-3/+88
By default, it is assumed that the UTMI clock is generated from a 12 MHz reference clock (MAINCK). If it's not the case, the FREQ field of the SFR_UTMICKTRIM has to be updated to generate the UTMI clock in the proper way. The UTMI clock has a fixed rate of 480 MHz. In fact, there is no multiplier we can configure. The multiplier is managed internally, depending on the reference clock frequency, to achieve the target of 480 MHz. The patch is cloned from the patch of mailing-list: [PATCH v2] clk: at91: utmi: set the mainck rate Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> [trini: Depend on SPL_DM] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-14clk: Kconfig: Add dependences of SPL_CLKWenyou Yang1-1/+1
The SPL_CLK config should depend on SPL && SPL_DM. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-13Merge git://git.denx.de/u-boot-dmTom Rini1-3/+25
2017-09-13patman: Fix error when the email blacklist is missingSimon Glass1-3/+25
This section of the settings file may be missing. Handle that gracefully rather than emitting an error. Also update patman to write this section when a new settings file is created. Fixes: e11aa602 (patman: add support for omitting bouncing addresses) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Chris Packham <judge.pckham@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-13ARM: davinci: Update da8xxevm MaintainersAdam Ford1-8/+2
The e-mail addresses for DA8XXEVM BOARD and DA850_AM18XXEVM BOARD are invalid. Remove DA8XXEVM. Update DA850_AM18XXEVM to have me be the maintainer since I work for Logic PD and have access to OMAP-L138 and AM1808 EVM kits. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-13Convert CONFIG_EMIF4 et al to KconfigAdam Ford20-22/+22
This converts the following to Kconfig: CONFIG_EMIF4 CONFIG_SDRC Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-09-13Convert CONFIG_MAC_ADDR_IN_SPIFLASH et al to KconfigAdam Ford5-5/+27
This converts the following to Kconfig: CONFIG_MAC_ADDR_IN_SPIFLASH CONFIG_MAC_ADDR_IN_EEPROM Signed-off-by: Adam Ford <aford173@gmail.com>
2017-09-13davinci: da850evm: Make EEPROM MAC code configurableAdam Ford1-1/+4
There was a check for CONFIG_MAC_ADDR_IN_EEPROM and a check for CONFIG_MAC_ADDR_IN_SPIFLASH, however some of the EEPROM related code wasn't encapsulated inside the #if defined statement so the EEPROM code could get executed even when it wasn't explicitly enabled or wanted. Signed-off-by: Adam Ford <aford173@gmail.com>
2017-09-13include/configs: remove references to SMNAND_ENV_OFFSETAdam Ford15-44/+28
In mancy cases both CONFIG_ENV_OFFSET and CONFIG_ENV_ADDR point to an otherwise-unused SMNAND_ENV_OFFSET. This patch will set both CONFIG_ENV_OFFSET and CONFIG_ENV_ADDR to whatever value was defined by SMNAND_ENV_OFFSET. Signed-off-by: Adam Ford <aford173@gmail.com>
2017-09-13arm: dts: omap3: Re-sync DTS files with Linux 4.13-RC5Adam Ford13-3284/+3382
The DTS files had some spacing issues and they needed fixing. This pull re-sync's the OMAP3xx related DTS files with Linux 4.13-RC5. To keep the DTS and DTSI files clean and in sync with Linux, new u-boot.dtsi files are added. Signed-off-by: Adam Ford <aford173@gmail.com> V3: The resync broke card detect on MMC1 on Logic PD's Torpedo, so we add the cd-invert to the Torpedo's -u-boot.dtsi file. V2: Add the u-boot.dtsi files for OMAP3, OMAP36xx, and Torpedo Remove the need for the second patch in the series