Michal Simek [Wed, 21 Oct 2020 10:17:44 +0000 (12:17 +0200)]
xilinx: zynqmp: Do not check 0 as invalid return from snprintf
U-Boot SPL on ZynqMP is using CONFIG_SPL_USE_TINY_PRINTF which doesn't
return any return value and all the time returns 0. That's why
even correct snprintf was returning in SPL chip ID as "unknown".
Change checking condition and allow snprintf to return 0 which is according
manual patch successful return.
"If an output error is encountered, a negative value is returned."
Fixes:
43a138956f7e ("arm64: zynqmp: Get rid of simple_itoa and replace it by snprintf")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 21 Oct 2020 10:16:50 +0000 (12:16 +0200)]
xilinx: zynqmp: Fix debug message in zynqmp_get_silicon_idcode_name()
Fix hex format from 0x%0X to 0x%0x to show correct numbers.
Fixes:
fa793165daf7 ("xilinx: zynqmp: refactor silicon name function")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 21 Oct 2020 10:16:02 +0000 (12:16 +0200)]
xilinx: zynqmp: Check return value from xilinx_pm_request()
xilinx_pm_request() can failed that's why also check return value.
Fixes:
050f10f103cd ("xilinx: zynqmp: remove chip_id function")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 3 Aug 2020 14:14:23 +0000 (16:14 +0200)]
xilinx: board: Add FRU decoder support
FMC cards are using FRU format for card identification. That's why add
support for this format.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 15 Apr 2019 11:54:09 +0000 (13:54 +0200)]
xilinx: cmd: Add basic fru format generator
Idea is to have something what can be used for board bringup from
generic board perspective.
There is a violation compare to spec that FRU ID is ASCII8 instead of
binary format but this is really for having something to pass boot and
boot to OS which has better generating options.
Also time should be filled properly.
For example:
fru board_gen 1000 XILINX versal-x-prc-01-revA serialX partX
There is also support for revision field which is Xilinx specific field.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Siva Durga Prasad Paladugu [Wed, 10 Apr 2019 07:08:10 +0000 (12:38 +0530)]
xilinx: cmd: Add support for FRU commands
This patch adds support for fru commands "fru capture" and "fru display".
The fru capture parses the FRU table present at an address and stores in a
structure for later use. The fru display prints the content of captured
structured in a readable format.
As of now, it supports only common header and board area of FRU. Also, it
supports only English language code and ASCII8/BINARY formats.
fru_data variable is placed to data section because fru parser can be
called very early before bss is initialized. And also information needs to
be shared that's why it is exported via header.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 20 Oct 2020 10:05:14 +0000 (12:05 +0200)]
xilinx: common: Add Makefile to common folder
There is no need to reference files in common folder back. Simply adding
Makefile to this folder does the job because this "common" location is
already wired in main Makefile.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 23 Oct 2020 05:51:04 +0000 (07:51 +0200)]
microblaze: Enable i2c DM by default
Microblaze has been converted fully to DM that's why enabled DM for I2C
too.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 22 Oct 2020 09:14:20 +0000 (11:14 +0200)]
xilinx: common: Protect board_late_init_xilinx()
Do not call board_late_init_xilinx() when BOARD_LATE_INIT is not enabled.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 14 Oct 2020 15:08:14 +0000 (17:08 +0200)]
xilinx: common: Move ZYNQ_GEM_I2C_MAC_OFFSET to board Kconfig
There is no reason to have ZYNQ specific Kconfig macro in generic location
to be visible for all other SoCs. That's why move it to Xilinx common
location to be visible only for us.
Also introduce new bool entry ZYNQ_MAC_IN_EEPROM to have also an option to
disable it or enable. This has connection to code which is reading the
whole content of i2c and also work with the rest of date not just with MAC
address.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 3 Sep 2020 10:44:51 +0000 (12:44 +0200)]
spl: fdt: Record load/entry fit-images entries in 64bit format
The commit
9f45aeb93727 ("spl: fit: implement fdt_record_loadable") which
introduced fdt_record_loadable() state there spl_fit.c is not 64bit safe.
Based on my tests on Xilinx ZynqMP zcu102 platform there shouldn't be a
problem to record these addresses in 64bit format.
The patch adds support for systems which need to load images above 4GB.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Michal Simek [Thu, 3 Sep 2020 09:24:28 +0000 (11:24 +0200)]
spl: Use standard FIT entries
SPL is creating fit-images DT node when loadables are recorded in selected
configuration. Entries which are created are using entry-point and
load-addr property names. But there shouldn't be a need to use non standard
properties because entry/load are standard FIT properties. But using
standard FIT properties enables option to use generic FIT functions to
descrease SPL size. Here is result for ZynqMP virt configuration:
xilinx_zynqmp_virt: spl/u-boot-spl:all -82 spl/u-boot-spl:rodata -22 spl/u-boot-spl:text -60
The patch causes change in run time fit image record.
Before:
fit-images {
uboot {
os = "u-boot";
type = "firmware";
size = <0xfd520>;
entry-point = <0x8000000>;
load-addr = <0x8000000>;
};
};
After:
fit-images {
uboot {
os = "u-boot";
type = "firmware";
size = <0xfd520>;
entry = <0x8000000>;
load = <0x8000000>;
};
};
Replacing calling fdt_getprop_u32() by fit_image_get_entry/load() also
enables support for reading entry/load properties recorded in 64bit format.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
T Karthik Reddy [Tue, 4 Feb 2020 12:47:45 +0000 (05:47 -0700)]
spi: zynq_qspi: Use clk subsystem to get reference qspi clk
Remove fixed reference clk used by plat->frequency and use clk
subsystem to get reference clk. As per spi dt bindings
"spi-max-frequency" property should be used by the slave devices.
This property is read by spi-uclass driver for the slave device.
So avoid reading above property from the platform driver.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Tue, 4 Feb 2020 12:47:44 +0000 (05:47 -0700)]
spi: zynq_spi: Use clk subsystem to get reference spi clk
Remove fixed reference clk used by plat->frequency and use clk
subsystem to get reference clk. As per spi dt bindings
"spi-max-frequency" property should be used by the slave devices.
This property is read by spi-uclass driver for the slave device.
So avoid reading above property from the platform driver.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 13 Oct 2020 13:00:24 +0000 (15:00 +0200)]
serial: pl01x: Add error value checking
There also a need to check return values to make sure that clocks were
enabled and setup properly.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Michal Simek [Mon, 3 Aug 2020 10:57:05 +0000 (12:57 +0200)]
xilinx: board: Add support for additional card detection
The most of Xilinx evaluation boards have FMC connectors which contain
small eeprom for card identification. That's why read content of eeprom and
record it.
Also generate cardX_ variables for easier script handling.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 3 Aug 2020 11:01:45 +0000 (13:01 +0200)]
xilinx: board: Read the whole eeprom not just offset
Starts to use new way how eeproms should be referenced.
Reference is done via nvmem alias nodes. When this new way is specified
code itself read the eeprom and decode xilinx legacy format and fill struct
xilinx_board_description. Then based on information present there board_*
variables are setup.
If variables are saved and content can't be changed information is just
shown on console.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 28 Jul 2020 10:51:08 +0000 (12:51 +0200)]
dm: core: Add support for getting node from aliases
Add support for getting a node/property from aliases.
The similar functionality is provided for chosen node and this
implemenatation is copy of it.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
T Karthik Reddy [Thu, 24 Sep 2020 10:32:15 +0000 (04:32 -0600)]
spi: xilinx_spi: remove unused local variable
Remove unused variable 'count' which is causing warning while
compilation.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 8 Apr 2019 11:43:51 +0000 (13:43 +0200)]
dt-bindings: arm64: versal: Add clk and power headers
Add power and reset headers to be sources by Versal dtses.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 20 Oct 2020 06:29:25 +0000 (08:29 +0200)]
arm64: zynqmp: Add support for saving sha3 key to different address
By default 48B sha3 hash value is written to srcaddr which is not the best
solution in case of that you want to use data for other operations. That's
why add key_addr optional parameters which enables to write 48B sha3 hash
value to specified address.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
T Karthik Reddy [Mon, 7 Jan 2019 11:35:11 +0000 (17:05 +0530)]
arm64: zynqmp: Add support for SHA3 command
This patch adds support for SHA3 command. It takes data blob
as input and generates 48 bytes sha3 hash value.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Mon, 7 Jan 2019 11:35:10 +0000 (17:05 +0530)]
arm64: zynqmp: Add support for RSA command
This patch adds support for RSA command, performs RSA encrypt &
RSA decrypt on data blob of key size.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Siva Durga Prasad Paladugu [Thu, 6 Sep 2018 11:04:44 +0000 (16:34 +0530)]
arm64: zynqmp: Add support for encryption and decryption on data blob
This patch adds support for encryption and decryption on a given data
blob using different key sources such as userkey(KUP), device key and
PUF key. Inorder to support this a new zynqmp command(zynqmp aes) has
been introduced.
Command:
zynqmp aes srcaddr ivaddr len aesop keysrc dstaddr [keyaddr]\n"
Encrypts or decrypts blob of data at src address and puts it\n"
back to dstaddr using key and iv at keyaddr and ivaddr\n"
respectively. keysrc values specifies from which source key\n"
has to be used, it can be User/Device/PUF key. A value of 0\n"
for KUP(user key),1 for DeviceKey and 2 for PUF key. The\n"
aesop value would specify the operationwhich can be 0 for\n"
decrypt and 1 for encrypt(1) operation\n";
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 7 Oct 2020 13:53:39 +0000 (15:53 +0200)]
arm64: zynqmp: Get rid of iommus/power-domains properties for SPL DT
SPL DT contains only nodes which are contain u-boot,dm-pre-reloc property.
iommu node is not this case that's why when DT is read DTC reports some
warnings.
$ dtc -I dtb -O dts dts/dt-spl.dtb >/dev/null
<stdout>: Warning (iommus_property): /amba/spi@
ff0f0000:iommus: Could not get phandle node for (cell 0)
<stdout>: Warning (iommus_property): /amba/mmc@
ff160000:iommus: Could not get phandle node for (cell 0)
<stdout>: Warning (iommus_property): /amba/mmc@
ff170000:iommus: Could not get phandle node for (cell 0)
SPL also has an option to remove some DT properties which are useless for
SPL to make DT even smaller.
Default DT properties are pinctrl-0 pinctrl-names interrupt-parent
interrupts which are already removed.
The patch extends this list with iommus to get rid of above warnings.
Also power-domains unused properties can be removed.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 7 Oct 2020 13:41:21 +0000 (15:41 +0200)]
arm64: zynqmp: Enable cache command
Sometimes it is very useful to be able disable/enable cache that's why
enable commands for it by default.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 5 Oct 2020 13:43:44 +0000 (15:43 +0200)]
arm64: zynqmp: Enable FPGA loading from SPL
fpga bitstream needs to be listed in config node in FIT image. Only tested
option is bitstream in BIN format.
Enabling this feature increase code size by almost 4k.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 7 Oct 2020 13:13:17 +0000 (15:13 +0200)]
arm64: zynqmp: Get rid of simple_itoa and replace it by snprintf
simple_itoa() is implemented only for !CONFIG_USE_TINY_PRINTF. Tiny printf
is normally used by SPL that's code which uses simple_itoa() has missing
reference. That's why refactor code by using on snprintf() instead of
strncpy()/strncat() combination. This change also descrease code size by
saving 24B based on buildman.
aarch64: (for 1/1 boards) all -22.0 rodata +2.0 text -24.0
xilinx_zynqmp_virt: all -22 rodata +2 text -24
u-boot: add: 0/0, grow: 0/-1 bytes: 0/-24 (-24)
function old new delta
board_init 520 496 -24
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 5 Oct 2020 13:23:00 +0000 (15:23 +0200)]
mailbox: zynqmp: Extend timeout for getting observation bit
In case of fpga loading (which can be huge) 100ms is not enough. That's why
extend timeout 10 times to wait maximum 1s to get ACK back.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 5 Oct 2020 13:23:28 +0000 (15:23 +0200)]
firmware: zynqmp: Swap addr_hi/low when PM_FPGA_LOAD is called
Don't know reason but in regular flow addr_hi/low are swapped in ATF. It
means when fpga load is done from EL3 there is a need to swap it for PMUFW
to load bitstream.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ashok Reddy Soma [Wed, 7 Oct 2020 07:54:18 +0000 (01:54 -0600)]
config: versal: Update mini u-boot timer clock to 100Mhz
Mini u-boot timer clock is not updated when u-boot is migrated from
emulator to silicon. Due to this slower clock of 2.72Mhz, delay() functions
are not working accurately. Update CONFIG_COUNTER_FREQUENCY to 100Mhz.
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Ashok Reddy Soma [Wed, 7 Oct 2020 06:36:54 +0000 (00:36 -0600)]
arm64: versal: Update mini u-boot eMMC node parameters
Mini u-boot eMMC dt parameters are not in sync with full u-boot dt.
Frequency for eMMC is fixed to 25Mhz. Due to this, mmc multi-block write
commands are failing. Increase frequency to 200Mhz to fix this issue.
Add bus-width = <8>, non-removable and disable-wp properties to the node
as this is eMMC.
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Tue, 22 Sep 2020 11:18:55 +0000 (05:18 -0600)]
microblaze: Add support for distro boot
Add distro boot support for microblaze and enable jtag, qspi,
dhcp, pxe boot targets for distro boot.
Enable DISTRO_DEFAULTS config in microblaze defconfig and also
enable support for spi xilinx driver & spi vendors to access
spi flash by distro boot.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Tue, 22 Sep 2020 11:18:54 +0000 (05:18 -0600)]
microblaze: Setup distro boot env variables at run time
Setup all the distro boot related environment variables at
run time. Add BOOT_SCRIPT_OFFSET config to microblaze board
Kconfig.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Tue, 22 Sep 2020 11:18:53 +0000 (05:18 -0600)]
microblaze: board: Check return value whlie saving env variables
Check and print warning if run time env variables are not saved.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Tue, 22 Sep 2020 11:18:52 +0000 (05:18 -0600)]
microblaze: trivial code fixes
Set proper indentation for env variables in microblaze header file.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Thu, 17 Sep 2020 12:52:09 +0000 (06:52 -0600)]
microblaze: Enable spi for microblaze
Enable SPI drivers and driver model for microblaze.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 23 Sep 2020 08:36:47 +0000 (10:36 +0200)]
spi: xilinx_spi: Remove unused variable
Remove unused variable:
drivers/spi/xilinx_spi.c: In function 'xilinx_spi_xfer':
drivers/spi/xilinx_spi.c:254:18: warning: unused variable 'timeout' [-Wunused-variable]
254 | u32 reg, count, timeout;
| ^~~~~~~
Fixes:
0c0de58f7b30 ("spi: xilinx_spi: Modify transfer logic xilinx_spi_xfer() function")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 29 Sep 2020 10:38:17 +0000 (12:38 +0200)]
arm64: zynqmp: Enable EMMC boot
Enable EMMC boot commands to be able to change EMMC setup.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 2 Oct 2020 12:42:05 +0000 (14:42 +0200)]
arm64: zynqmp: Add missing support for 9cg version
9cg version was supported before code refactoring. The patch is adding it
back.
Fixes:
fa793165daf7 ("xilinx: zynqmp: refactor silicon name function")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Alexandre GRIVEAUX [Thu, 1 Oct 2020 08:33:36 +0000 (10:33 +0200)]
ARM: zynq: Add Z-turn board V5
Adding Z-turn board V5 to resolve the change between:
"Z-TURNBOARD_schematic.pdf" schematics state version 1 to 4 has Atheros AR8035
"Z-Turn_Board_sch_V15_20160303.pdf" schematics state version 5 has Micrel KSZ9031
At this time the S25FL128SAGNFI003 doesn't work because of bug:
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
zynq-zturn was checked on V5 board, same error.
Maybe Z-turn board have the same problem (board with W25Q128BVFIG).
Signed-off-by: Alexandre GRIVEAUX <agriveaux@deutnet.info>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 14 Sep 2020 13:00:06 +0000 (15:00 +0200)]
doc: board: xilinx: Add documentation for ZynqMP R5
Add missing documentation for Xilinx ZynqMP R5 configuration with steps how
to run it.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 16 Sep 2020 13:16:37 +0000 (15:16 +0200)]
doc: board: xilinx: Add documentation for ZynqMP
Add missing documentation for Xilinx ZynqMP configuration with steps how
to configure it and run it.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 16 Sep 2020 13:16:45 +0000 (15:16 +0200)]
doc: board: xilinx: Update links to DT binding docs
Several drivers have been added without updating documentation.
And also some dt bindings have been moved to yaml.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 14 Sep 2020 12:47:21 +0000 (14:47 +0200)]
doc: board: xilinx: zynq.rst: Update zynq documentation
- Correct location of BSP code
- Remove TODO which is done already
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 16 Sep 2020 13:25:08 +0000 (15:25 +0200)]
MAINTAINERS: Record documentation for Xilinx platforms
Add fragment to cover documenation for Xilinx platforms.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Ovidiu Panait [Thu, 24 Sep 2020 08:54:37 +0000 (11:54 +0300)]
microblaze: start.S: Use board_init_f_alloc/init in early init
Implement early init by calling generic board_init_f_alloc_reserve and
board_init_f_init_reserve functions:
* drop SYS_MALLOC_F_LEN related code, as allocation and gd->malloc_base
assignment are taken care of by the generic functions
* drop _gd logic
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Ovidiu Panait [Thu, 24 Sep 2020 08:54:36 +0000 (11:54 +0300)]
microblaze: start.S: Factor out exception setup code to __setup_exceptions
Currently, the exceptions setup code is duplicated in pre-relocation and
post-relocation init. Factor out this code to __setup_exceptions asm
routine to get rid of the duplication.
__setup_exceptions is called with a relocation offset parameter (r5)
which is set to zero for pre-reloc init and gd->reloc_off for post-reloc
exception setup.
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tom Rini [Sat, 24 Oct 2020 14:49:28 +0000 (10:49 -0400)]
Merge branch '2020-10-23-misc-changes'
Highlights:
- Fix a problem with the bootm overlap tests
- Remove duplicated code in fatwrite
- Cleanup our current "misc" command code and add a new one for misc
class devices.
- Various GPIO fixes
Peng Fan [Thu, 15 Oct 2020 10:06:48 +0000 (18:06 +0800)]
power: regulator: add dummy helper
Add dummy helper to enabling the header could be included when
DM REGULATOR not enabled.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 15 Oct 2020 10:05:58 +0000 (18:05 +0800)]
phy: nop-phy: add clk bulk
Add clk bulk for nop-phy driver.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Jaehoon Chung [Wed, 21 Oct 2020 05:17:03 +0000 (14:17 +0900)]
bootm: fix wrong conditions about images overlap
It doesn't need to consider start byte address.
If ramdisk size is 0x800000 and start address is 0x2700000, then it's
used until 0x02efffff, not 0x02f00000. But it's detected to overlapt RD
image, when kernel start address is 0x02f00000.
Because it's doing wrong calculation about rd_len.
This patch fixed wrong calculation address position when check
condition.
In addition, it needs to check one more condition about overlapping
entire area.
Fixes: commit
fbde7589ce30 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image")
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Lad Prabhakar [Tue, 20 Oct 2020 07:45:46 +0000 (08:45 +0100)]
cmd: fat: Use do_save() for fatwrite
do_save() function defined in fs.c also supports FAT file system
re-use the same for fatwrite command.
Also fix the FAT test script to match the expected output.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Heinrich Schuchardt [Thu, 22 Oct 2020 19:45:28 +0000 (21:45 +0200)]
test: unit tests for print_freq(), print_size()
Provide unit tests for functions print_freq() and print_size().
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Bin Meng [Wed, 14 Oct 2020 06:34:52 +0000 (14:34 +0800)]
cmd: Add a 'misc' command to access miscellaneous devices
Enable the command "misc" for accessing miscellaneous devices with
a MISC uclass driver. The command provides listing all MISC devices
as well as read and write functionalities via their drivers.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Bin Meng [Tue, 13 Oct 2020 10:45:06 +0000 (18:45 +0800)]
cmd: Split out timer command from the sleep command
CONFIG_CMD_TIMER merits a single file instead of co-exist in the
sleep command file.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Bin Meng [Tue, 13 Oct 2020 10:45:05 +0000 (18:45 +0800)]
cmd: Rename CMD_MISC to CMD_SLEEP
The "cmd/Kconfig" has a TODO description for CMD_MISC that it should
really be named as CMD_SLEEP. Change it in the whole source tree.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Pali Rohár [Wed, 7 Oct 2020 13:39:40 +0000 (15:39 +0200)]
Makefile: Fix u-boot-nodtb.bin target
This change fixes two issues when building u-boot-nodtb.bin target:
* Remove intermediate binary u-boot-nodtb.bin from disk when static_rela
call (which modifies u-boot-nodtb.bin binary) failed. It is required
because previous objcopy call creates binary and static_rela finish it.
* Do not call static_rela cmd when u-boot-nodtb.bin binary was not
created/updated by previous objcopy call.
Second fix would ensure that u-boot-nodtb.bin binary is not updated when
all prerequisites were up-to-date. And therefore final binary u-boot.bin
is not updated in case all prerequisites were not modified and were
up-to-date.
Now running 'make SOURCE_DATE_EPOCH=0 u-boot.bin' second time now does not
touch u-boot.bin binary in case nothing was modified, so GNU make can
correctly detect that everything is up-to-date.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Patrick Delaunay [Thu, 10 Sep 2020 16:25:09 +0000 (18:25 +0200)]
i2c: i2c-gpio: Convert to use APIs which support live DT
Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the
driver can support live DT.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Patrick Delaunay [Thu, 10 Sep 2020 16:18:17 +0000 (18:18 +0200)]
power: regulator: gpio-regulator: Convert to use APIs which support live DT
Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the
driver can support live DT.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Patrick Delaunay [Thu, 10 Sep 2020 16:18:16 +0000 (18:18 +0200)]
power: regulator: gpio-regulator: protect count value
Update the size of states_array to avoid overflow for
dev_pdata->voltages[j] and dev_pdata->states[j].
As the size of array is GPIO_REGULATOR_MAX_STATES, the size of
states_array is limited by GPIO_REGULATOR_MAX_STATES * 2 = 4
instead of 8 previously.
The value of the "count" variable is limited by the third parameter of
fdtdec_get_int_array_count.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Mon, 3 Aug 2020 20:12:13 +0000 (22:12 +0200)]
post: remove redundant condition
(A && A == 0x20) is only true for (A == 0x20).
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Fri, 23 Oct 2020 13:19:12 +0000 (09:19 -0400)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Fri, 23 Oct 2020 13:16:20 +0000 (09:16 -0400)]
Merge branch '2020-10-23-revert-xen-changes'
I had inadvertently merged the Xen series before everything was fully
happy with the board maintainer. Revert the series.
Tom Rini [Fri, 23 Oct 2020 13:16:13 +0000 (09:16 -0400)]
Revert "serial: serial_xen: print U-Boot banner and others"
This reverts commit
18426bf02217de2e9bb2b41eaa74d769892c55ef.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 23 Oct 2020 13:16:07 +0000 (09:16 -0400)]
Revert "arch: arm/xen: add putc() for debugging"
This reverts commit
3a51b2a2c3cedc0d2a9ce981b8e00ab8cefcb6b7.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 23 Oct 2020 13:16:01 +0000 (09:16 -0400)]
Revert "xen: add definitions for console_io"
This reverts commit
16389a74c516470c8f0fd8c712e1638f80384b92.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 23 Oct 2020 13:15:55 +0000 (09:15 -0400)]
Revert "serial: serial_xen: add DEBUG_UART support"
This reverts commit
82e21b391bd315f6fe0e0b79326af8a141e9cca7.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 23 Oct 2020 00:32:02 +0000 (20:32 -0400)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxi
- sun8i emac changes (Andre)
- SCP firmware (Samuel)
Tom Rini [Thu, 22 Oct 2020 18:36:47 +0000 (14:36 -0400)]
Merge branch '2020-10-22-misc-changes'
- Assorted updates for Xen, IPQ40xx, ASpeed, Keymile
- Assorted typo / documentation fixes
- Fix default preboot cmd to act like before with USB_STORAGE set
- A number of other bugfixes throughout the code
Heiko Schocher [Fri, 16 Oct 2020 08:41:46 +0000 (10:41 +0200)]
rtc: move pcf8563 to Kconfig
add Kconfig option for pcf8563 driver and
run tools/moveconfig.py
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Fabien Parent [Thu, 15 Oct 2020 16:38:18 +0000 (18:38 +0200)]
mmc: mtk-sd: change some dev_err into dev_dbg
dev_err has been used for debugging and a few dev_err message are
printed for normal code execution. Make them dev_dbg instead.
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
AKASHI Takahiro [Thu, 15 Oct 2020 04:25:16 +0000 (13:25 +0900)]
serial: serial_xen: add DEBUG_UART support
By using a hypervisor call, we can implement DEBUG_UART on xen.
This will allow us to see messages even earlier than serial_init().
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
AKASHI Takahiro [Thu, 15 Oct 2020 04:25:15 +0000 (13:25 +0900)]
xen: add definitions for console_io
Those definitions added are used with HYPERVISOR_console_io().
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
AKASHI Takahiro [Thu, 15 Oct 2020 04:25:14 +0000 (13:25 +0900)]
arch: arm/xen: add putc() for debugging
This new function, xen_debug_putc(), is intended to be used to
enable CONFIG_DEBUG_UART on xen guest.
Please note that the underlying functionality in Xen is available
only when Xen is configured with !NDEBUG but is much simpler than
a generic HYPERVISOR_console_io().
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
AKASHI Takahiro [Thu, 15 Oct 2020 04:25:13 +0000 (13:25 +0900)]
serial: serial_xen: print U-Boot banner and others
At present, DM_FLAG_PRE_RELOC is set only if !OF_CONTROL.
It doesn't make sense for this para-virtualized driver.
With this patch applied, you will be able to see early boot messages:
U-Boot 2020.10-00001-ge442e71a6c52-dirty (Oct 15 2020 - 11:02:25 +0900)
xenguest
Xen virtual CPU
Model: XENVM-4.15
DRAM: 128 MiB
PVBLOCK:
(XEN) gnttab_mark_dirty not implemented yet
pvblock: 0
In: hypervisor
Out: hypervisor
Err: hypervisor
xenguest#
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Chia-Wei, Wang [Thu, 15 Oct 2020 02:25:14 +0000 (10:25 +0800)]
cosmetic: reset: ast2500: Rename driver and configs
1. Rename AST2500 reset driver from ast2500-reset.c
to reset-ast2500.c
2. Rename AST2500 reset kconfig option from AST2500_RESET
to RESET_AST2500
Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
Chia-Wei, Wang [Thu, 15 Oct 2020 02:25:13 +0000 (10:25 +0800)]
reset: ast2500: Use SCU for reset control
The System Control Unit (SCU) controller of Aspeed
SoCs provides the reset control for each peripheral.
This patch refactors the reset method to leverage
the SCU reset control. Thus the driver dependency
on watchdog including dedicated WDT API and reset
flag encoding can be eliminated.
The Kconfig description is also updated accordingly.
Signed-off-by: Chia-Wei, Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com>
Dario Binacchi [Wed, 14 Oct 2020 21:42:17 +0000 (23:42 +0200)]
clk: ccf: replace the get_rate helper
The
12d152620d commit fixed the get_rate helper because the set_parent
one did not re-parent the clock device to the new parent. The
4d139f3838
commit allows you to remove this workaround by calling the
clk_get_parent_rate routine.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Chance.Yang [Wed, 14 Oct 2020 03:47:33 +0000 (11:47 +0800)]
doc: dfu: fix typo in README.dfu
Fix "ram" typos for serial flash
Signed-off-by: Chance.Yang <chance.yang@vatics.com>
Simon Glass [Wed, 14 Oct 2020 01:55:07 +0000 (19:55 -0600)]
log: Tidy up documentation
Fix up the documentation which was lost in a merge conflict in the
conversion to RST.
Fixes:
52d3df7fefe ("log: Allow LOG_DEBUG to always enable log output")
Signed-off-by: Simon Glass <sjg@chromium.org>
Naoki Hayama [Mon, 12 Oct 2020 09:35:55 +0000 (18:35 +0900)]
ARM: mvebu: a38x: Fix comment typo
%s/occured/occurred/
Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp>
Reviewed-by: Stefan Roese <sr@denx.de>
Naoki Hayama [Mon, 12 Oct 2020 09:35:33 +0000 (18:35 +0900)]
fs: btrfs: Fix typo in error message
%s/occured/occurred/
Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp>
Reviewed-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Naoki Hayama [Mon, 12 Oct 2020 09:35:22 +0000 (18:35 +0900)]
mmc: Fix comment typo
%s/occured/occurred/
Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp>
Patrick Delaunay [Mon, 12 Oct 2020 07:47:50 +0000 (09:47 +0200)]
Remove default value of CONFIG_PREBOOT for CONFIG_USB_STORAGE
Remove the default value "usb start" for CONFIG_USB_STORAGE as the USB
storage boot initialization is correctly managed by distro boot command
('usb_boot' defined in include/config_distro_bootcmd.h already include
the command 'usb start').
Fixes:
324d77998ed6 ("Define default CONFIG_PREBOOT with right config option")
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dario Binacchi [Sun, 11 Oct 2020 12:25:47 +0000 (14:25 +0200)]
gpio: fix gpio_request_by_name() description
Replace 'dev->dev' with '@desc->dev' in the gpio_request_by_name function
desc parameter description.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dario Binacchi [Sun, 11 Oct 2020 12:25:46 +0000 (14:25 +0200)]
dm: core: improve uclass_get_device_by_phandle_id() description
Complete the devp parameter description.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
Holger Brunck [Fri, 9 Oct 2020 15:21:33 +0000 (17:21 +0200)]
km/common: change ubicopy variable
Instead having a hard coded value for "cramfsaddr" after compile time,
we change it to take the variable "cramfsaddr" for the ubicopy variable.
This makes sure that ubicopy uses the right address, even when
the value for "cramfsaddr" has changed.
CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
CC: Heiko Schocher <hs@denx.de>
CC: Tom Rini <trini@konsulko.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Holger Brunck [Fri, 9 Oct 2020 15:21:32 +0000 (17:21 +0200)]
km: adapt defines and variables for new memory layout
Due to increasing kernel image sizes we get problems when decompressing
the kernel image. To fix this we need to change the addresses where we
load and where we extract the kernel. Also we need to adapt the address
where to load the CRAMFS image and where to load the DTB file.
While at it also harmonize all boards for PPC and ARM to have the
same values. Also we add a new variable "env_version", so that the
userspace is able to detect if this is a u-boot binary with updated
values or not.
CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
CC: Heiko Schocher <hs@denx.de>
CC: Tom Rini <trini@konsulko.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Remove old values from kmp204x.h]
Signed-off-by: Tom Rini <trini@konsulko.com>
Heinrich Schuchardt [Thu, 8 Oct 2020 20:23:23 +0000 (22:23 +0200)]
lib: print_freq() should output kHz not KHz
In the International System of Units (SI) the prefix kilo is abbreviated as
'k' not 'K'. 'K' is the symbol for Kelvin.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Robert Marko [Thu, 8 Oct 2020 20:05:14 +0000 (22:05 +0200)]
IPQ40xx: Add PRNG support
Since we now have the driver for Qualcomm PRNG HW, lets use it and add the necessary clocks and nodes.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Robert Marko [Thu, 8 Oct 2020 20:05:13 +0000 (22:05 +0200)]
rng: Add Qualcomm MSM PRNG driver
Add support for the hardware pseudo random number generator found in Qualcomm SoC-s.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Robert Marko [Thu, 8 Oct 2020 20:05:12 +0000 (22:05 +0200)]
IPQ40xx: Add support for MDIO
Lets add the necessary DTS node and pinctrl properties for newly added MDIO driver.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Robert Marko [Thu, 8 Oct 2020 20:05:11 +0000 (22:05 +0200)]
net: Add IPQ40xx MDIO driver
This adds the driver for the IPQ40xx built-in MDIO.
This will be needed to support future PHY driver.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Robert Marko [Thu, 8 Oct 2020 20:05:10 +0000 (22:05 +0200)]
IPQ40xx: Add SPI support
Since we have SPI driver for IPQ40xx QUP SPI controller, lets add the necessary nodes, pinctrl and clocks.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Robert Marko [Thu, 8 Oct 2020 20:05:09 +0000 (22:05 +0200)]
spi: Add Qualcomm QUP SPI controller driver
This patch adds support for the Qualcomm QUP SPI controller that is commonly found in most of Qualcomm SoC-s.
Driver currently supports v1.1.1, v2.1.1 and v2.2.1 HW.
FIFO and Block modes are supported, no support for DMA mode is planned.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Luka Kovacic <luka.kovacic@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Heinrich Schuchardt [Thu, 8 Oct 2020 18:51:24 +0000 (20:51 +0200)]
tools: image-host.c: use correct output format
When building on a 32bit host the following warning occurs:
tools/image-host.c: In function ‘fit_image_read_data’:
tools/image-host.c:296:56: warning: format ‘%ld’ expects argument of
type ‘long int’, but argument 3 has type ‘__off64_t’
{aka ‘long long int’} [-Wformat=]
printf("File %s don't have the expected size (size=%ld, expected=%d)\n",
~~^
%lld
filename, sbuf.st_size, expected_size);
~~~~~~~~~~~~
tools/image-host.c:311:62: warning: format ‘%ld’ expects argument of
type ‘long int’, but argument 4 has type ‘__off64_t’
{aka ‘long long int’} [-Wformat=]
printf("Can't read all file %s (read %zd bytes, expexted %ld)\n",
~~^
%lld
filename, n, sbuf.st_size);
~~~~~~~~~~~~
Fix the format strings.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Holger Brunck [Thu, 8 Oct 2020 10:27:22 +0000 (12:27 +0200)]
km: fix license string and compatible strings
As the ownership is now Hitachi Power Grids, change the license string
and adapt the compatible string in DTS files. For kmeter1.dts we
change it to "keymile,KMETER1" for now, as this is then compliant with
what is submitted to the linux kernel. All other boards don't have
a upstreamed version in linux mainline.
Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
CC: Heiko Schocher <hs@denx.de>
CC: Marek Vasut <marex@denx.de>
CC: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Naoki Hayama [Thu, 8 Oct 2020 04:17:16 +0000 (13:17 +0900)]
README: Convert HTTP links to HTTPS
Convert all the other http:// links to https:// .
www.denx.de/twiki/ seems to move to www.denx.de/wiki/ ,
so change it.
I checked all links in this patch are valid.
Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp>
Naoki Hayama [Thu, 8 Oct 2020 04:17:08 +0000 (13:17 +0900)]
README: vxworks: Fix typo overwride
%s/overwride/override/
Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp>