Suman Anna [Tue, 10 Mar 2020 21:05:55 +0000 (16:05 -0500)]
armv8: K3: j721e: Add DSP internal memory regions in MMU table
The A72 U-Boot code supports early load and boot of a number of
remote processors including the C66_0 and C66_1 DSPs. The current
code supports only loading into the DDR regions which were already
given the appropriate memory attributes. The C66 DSPs also have L1
and L2 internal memory regions that can behave as normal-memories.
Add a new entry to the J721E MMU table covering these regions with
the appropriate memory attributes to allow the A72 U-Boot code to
support loading directly into these memory regions.
Signed-off-by: Suman Anna <s-anna@ti.com>
Suman Anna [Tue, 10 Mar 2020 21:05:54 +0000 (16:05 -0500)]
remoteproc: k3-dsp: Add a sanity check for DSP boot address alignment
The DSP remote processors on K3 SoCs require a boot register to be
programmed with a boot address, and these boot addresses need to be
aligned on certain address boundaries. The current code does not have
any error checks, and relies on the System Firmware to perform the
checking. Add logic to perform this sanity check within the remoteproc
driver itself to detect these anomalies specifically, and print a
meaningful trace. This avoids the cumbersome debug of root-causing
such failures from the corresponding TI-SCI failure.
The C66x and C71x DSP cores have different alignment needs and are
as follows:
C66x DSP = 1 KB (0x400)
C71x DSP = 2 MB (0x200000)
Signed-off-by: Suman Anna <s-anna@ti.com>
Suman Anna [Tue, 10 Mar 2020 21:05:53 +0000 (16:05 -0500)]
remoteproc: k3-dsp: Fix unbalanced state machine in k3_dsp_start
The global module reset is deasserted through the ti_sci_power_domain_on()
call in k3_dsp_start(), but is not asserted back if the local module reset
fails. Fix this.
While at this, remove the stale comment about assigned-clock-rates that
seems to have been copied from the K3 ARM64 Remoteproc driver.
Fixes:
ab827b385718 ("remoteproc: Introduce K3 C66 and C71 remoteproc driver")
Signed-off-by: Suman Anna <s-anna@ti.com>
Lokesh Vutla [Tue, 10 Mar 2020 11:20:58 +0000 (16:50 +0530)]
arm: mach-k3: Add a separate function for printing sysfw version
Add a separate function for printing sysfw version so that it can be
called independently of k3_sysfw_loader.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Andrew F. Davis [Tue, 10 Mar 2020 15:08:41 +0000 (11:08 -0400)]
defconfigs: am65x_hs_evm: Sync HS and non-HS defconfigs
Additions have been made to the non-HS defconfig without the same
being made to the HS defconfig, sync them.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Andrew F. Davis [Thu, 5 Mar 2020 13:40:25 +0000 (08:40 -0500)]
board: ti: README: Update OP-TEE binary name
The OP-TEE binary to use is renamed to v2 as the v1 binary has been
deprecated and is no longer built by default.
Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Keerthy [Wed, 4 Mar 2020 04:40:01 +0000 (10:10 +0530)]
arm: dts: k3-j721e-r5-common-proc-board: Add ospi1 flash node
Add ospi1 flash node required for QSPI boot.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Keerthy [Wed, 4 Mar 2020 04:40:00 +0000 (10:10 +0530)]
arm: dts: k3-j721e-mcu-wakeup: Add assigned-clocks/rates properties for ospi1/qspi
Add assigned-clocks/rates properties for ospi1/qspi.
This is the expected rate as per ROM configuration.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Keerthy [Wed, 4 Mar 2020 04:39:59 +0000 (10:09 +0530)]
arm: dts: k3-j721e: Enable ospi1/qspi
Enable the ospi1/qspi for both r5 and a72 configurations.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Sam Protsenko [Wed, 26 Feb 2020 17:57:05 +0000 (19:57 +0200)]
configs: am335x_evm: Enable Fastboot
This config option was present in am335x_boneblack_defconfig, but we
have to use generic am335x_evm_defconfig now, as BBB defconfig was
removed in commit
8fa7f65dd02c ("configs: Remove
am335x_boneblack_defconfig"). So this patch merely brings that option
back.
Tested on BeagleBone Black:
=> fastboot 0
$ fastboot flash rootfs rootfs.img
Fixes:
8fa7f65dd02c ("configs: Remove am335x_boneblack_defconfig")
Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
Sam Protsenko [Wed, 26 Feb 2020 17:43:01 +0000 (19:43 +0200)]
configs: am335x_evm: Enable DFU over TFTP support
DFU over TFTP flashing method might be helpful in order to speed-up the
flashing process of big images (as DFU works over USB EP0, which is
quite slow). Also, it's a good backup option in the case when USB got
broken (either in software or hardware), to avoid resorting to SD card
boot.
This config option was present in am335x_boneblack_defconfig, but we
have to use generic am335x_evm_defconfig now, as BBB defconfig was
removed in commit
8fa7f65dd02c ("configs: Remove
am335x_boneblack_defconfig"). So this patch merely brings that option
back.
Tested on BeagleBone Black:
=> setenv dfu_alt_info $dfu_alt_info_emmc
=> setenv ipaddr 192.168.0.100
=> setenv serverip 192.168.0.1
=> setenv updatefile update_uboot.itb
=> dfu tftp mmc 1
Where 'update_uboot.its' file looks like this:
/dts-v1/;
/ {
description = "Automatic U-Boot update";
#address-cells = <1>;
images {
u-boot.img.raw-1 {
description = "U-Boot binary";
data = /incbin/("u-boot.img");
compression = "none";
type = "firmware";
load = <0x60000>;
hash-1 {
algo = "sha1";
};
};
};
};
And 'update_uboot.itb' is generated as follows:
$ mkimage -f update_uboot.its update_uboot.itb
Newly flashed U-Boot works fine.
Fixes:
8fa7f65dd02c ("configs: Remove am335x_boneblack_defconfig")
Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
Lokesh Vutla [Fri, 28 Feb 2020 12:26:20 +0000 (17:56 +0530)]
dma: ti: k3-udma: Mark flow id as valid parameter for RX channel config
When flow id is not marked as valid, sysfw reads the register value to
get the range of flow ids that are supported. Then compares the flow range
with the U-Boot's host id. This will definitely fail as board
configuration doesn't assign the full range to U-Boot's host id. In order
to work around this, mark the flow id as valid and pass range as 0.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Lokesh Vutla [Fri, 28 Feb 2020 12:24:48 +0000 (17:54 +0530)]
firmware: tisci: Drop all deprecated messages
SYSFW v2020.01 and later versions no longer supports the below messages:
- TI_SCI_MSG_RM_RING_GET_CFG
- TISCI_MSG_RM_UDMAP_TX_CH_GET_CFG 0x1206
- TISCI_MSG_RM_UDMAP_RX_CH_GET_CFG 0x1216
- TISCI_MSG_RM_UDMAP_FLOW_GET_CFG 0x1232
- TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_GET_CFG 0x1233
There are no users in U-Boot for any of the above messages, So drop the
support for all the corresponding messages.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Lokesh Vutla [Fri, 28 Feb 2020 12:23:52 +0000 (17:53 +0530)]
board: ti: k3: Update the sysfw image gen repository
Now k3-image-gen[0] is the official repository for generating sysfw.itb
Update the same in AM65x and J721e README.
[0] https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Sam Protsenko [Fri, 21 Feb 2020 14:35:21 +0000 (16:35 +0200)]
env: ti: boot: Fix Android boot on AM57x EVM
When applying DTBO on top of DTB (with "fdt apply" command) on AM57x EVM
board, there is not enough memory reserved in RAM for DTB blob. Hence,
DTBO can't be merged in DTB. It leads to inability to boot Android with
next error message:
failed on fdt_overlay_apply(): FDT_ERR_NOSPACE
To overcome that issue let's provide 512 KiB of space to keep DTB and
all merged DTBO blobs. To do so, "length" parameter should be specified
for "fdt addr" command:
=> fdt addr $fdtaddr 0x80000
512 KiB is the maximum size we can use for this, because next address
after $fdtaddr is 512 KiB ahead of it:
fdtaddr=0x88000000
rdaddr=0x88080000
Also add size variables to 'adtimg' command invocations, to avoid
cluttering the console with DTBO blob sizes.
Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
Reviewed-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>
Vignesh Raghavendra [Mon, 17 Feb 2020 07:52:55 +0000 (13:22 +0530)]
arm: dts: k3-am654-base-board: Enable I2C nodes
Add DT nodes for main domain I2Cs and its slave devices
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Dario Binacchi [Sat, 22 Feb 2020 13:05:49 +0000 (14:05 +0100)]
board: brxre1: fix building errors
Fix building errors if CONFIG_DM_VIDEO is enabled. This is the only
u-boot board that enables CONFIG_AM335X_LCD and from which I started
to develop the version of the frame buffer driver that supports the
driver model.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 22 Feb 2020 13:05:48 +0000 (14:05 +0100)]
video: omap: fix pixel-per-line bitfield setting
Fix the macro to set the pplmsb field (bit 3) of the RASTER_TIMING_0
register. It is used in order to support up to 2048 pixels per line.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 22 Feb 2020 13:05:47 +0000 (14:05 +0100)]
fdt: video: omap: add framebuffer and panel bindings
Add device-tree binding documentation for ti framebuffer and generic
panel output driver.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dario Binacchi [Sat, 22 Feb 2020 13:05:46 +0000 (14:05 +0100)]
arm: dts: am335x: add 'u-boot, dm-pre-reloc' to panel
Add the "u-boot,dm-pre-reloc" property to the "ti,tilcdc,panel"
compatible node. In this way the video-uclass module can allocate the
amount of memory needed to be assigned to the frame buffer.
For boards that support Linux the property is added to the *-u-boot.dtsi
file since it is a u-boot specific dt flag.
Ran building tests with CONFIG_AM335X_LCD enabled and disabled for the
following configurations:
- brxre1_defconfig --> success
- am335x_guardian_defconfig --> success
- am335x_evm_defconfig --> success
- da850evm_defconfig --> failure with CONFIG_AM335X_LCD enabled
Enabling CONFIG_AM335X_LCD in da850evm_defconfig causes building errors
even without applying the patch. The driver has never been enabled on the
da850 and must be adapted for this platform.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Tested-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Felix Brack <fb@ltec.ch>
Dario Binacchi [Sat, 22 Feb 2020 13:05:45 +0000 (14:05 +0100)]
video: omap: add support for DM/DTS
Update the driver to support the device tree and the driver model.
Timings and panel parameters are now loaded from the device tree.
The DM code replaces the am335x_lcdpanel structure with
tilcdc_panel_info taken from the linux kernel, as well the management
of additional parameters not covered in the legacy code. In addition,
the am335x_lcdpanel structure contains parameters and operations that
were probably a requirement of the board for which this driver was
developed and which, however, were not developed in the linux kernel.
All this led to rewrite th DM controller initialization code, except
for the pixel clock setting that is executed in a function created in a
previous patch with code taken from the legacy am335xfb_init.
The patch has been tested on a custom board with u-boot 2018.11-rc2 and
the following device-tree configuration:
panel {
compatible = "ti,tilcdc,panel";
pinctrl-names = "default";
pinctrl-0 = <&lcd_enable_pins>;
enable-gpios = <&gpio0 31 0>;
backlight = <&backlight>;
status = "okay";
u-boot,dm-pre-reloc;
panel-info {
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
bpp = <16>;
fdd = <0x80>;
sync-edge = <0>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <0>;
};
display-timings {
native-mode = <&timing0>;
timing0: 800x480 {
hactive = <800>;
vactive = <480>;
hback-porch = <46>;
hfront-porch = <210>;
hsync-len = <20>;
vback-porch = <23>;
vfront-porch = <22>;
vsync-len = <10>;
clock-frequency = <
33000000>;
hsync-active = <0>;
vsync-active = <0>;
};
};
};
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Tested-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 22 Feb 2020 13:05:44 +0000 (14:05 +0100)]
video: omap: create two routines to set the pixel clock rate
Created in preparation to support driver-model, they can also be called
from legacy code. In this way, code duplication is avoided.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 22 Feb 2020 13:05:43 +0000 (14:05 +0100)]
video: omap: add loop exit conditions to the dpll setup
In case of null error, round rate is equal to target rate, so it is
useless to continue to search the DPLL setup parameters to get the
desidered pixel clock rate.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Dario Binacchi [Sat, 22 Feb 2020 13:05:42 +0000 (14:05 +0100)]
video: omap: fix debug message
"DISP" -> "DIV"
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Dario Binacchi [Sat, 22 Feb 2020 13:05:41 +0000 (14:05 +0100)]
video: omap: rename LCD controller registers
Add more clarity by prefixing the name of the register to the bitfields.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 22 Feb 2020 13:05:40 +0000 (14:05 +0100)]
video: omap: fix bitfields order
Arrange the bitfields of each register in the ascending order.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 22 Feb 2020 13:05:39 +0000 (14:05 +0100)]
video: omap: fix coding style on use of spaces
Use one space around (on each side of) the binary '-' operator.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 22 Feb 2020 13:05:38 +0000 (14:05 +0100)]
video: omap: add missing bitfield masks
Add, if missing, the bitfield masks in the setting macros of the LCD
controller registers.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 22 Feb 2020 13:05:37 +0000 (14:05 +0100)]
video: omap: use BIT() and GENMASK() macros
Use the standard BIT() and GENMASK() macros for bitfield definitions.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Yegor Yefremov [Wed, 12 Feb 2020 11:44:23 +0000 (12:44 +0100)]
arm: baltos: switch to driver model for the net and mdio driver
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Tero Kristo [Fri, 14 Feb 2020 07:05:10 +0000 (09:05 +0200)]
power: mfd: k3_avs: update am65xx MPU_VDD voltage values
The latest data manual SPRSP08I –NOVEMBER 2017–REVISED DECEMBER 2019[1]
for am65xx SoC states the new MPU nominal voltages to be 1.1V (OPP_NOM),
1.2V (OPP_OD) and 1.24V (OPP_TURBO). Update the nominal voltages in the
K3 AVS driver to reflect this.
[1] http://www.ti.com/lit/gpn/am6528
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tero Kristo [Fri, 14 Feb 2020 09:18:20 +0000 (11:18 +0200)]
configs: j721e_evm_r5_defconfig: Enable ESM modules
Enable ESM modules for both PMIC and SoC side for proper watchdog
handling on the board.
SPL_BOARD_INIT is also enabled so that the board init function
probing the drivers is called.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tero Kristo [Fri, 14 Feb 2020 09:18:19 +0000 (11:18 +0200)]
board: ti: j721e: initialize ESM support
Initialize both ESM and ESM_PMIC support if available for the board.
If support is not available for either, a warning is printed out.
ESM signals are only properly routed on PM2 version of the J721E SOM,
so only probe the drivers on this device.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tero Kristo [Fri, 14 Feb 2020 09:18:18 +0000 (11:18 +0200)]
arm: dts: k3-j721e: Add ESM PMIC support for tps659413 based board
The ESM handling on J7 processor board requires routing the
MCU_SAFETY_ERROR signal to the PMIC on the board for critical safety
error handling. The PMIC itself should then reset the board based on
receiving it. Enable the support for the board by adding the esm
node in place.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tero Kristo [Fri, 14 Feb 2020 09:18:17 +0000 (11:18 +0200)]
arm: dts: k3-k721e: Add Main domain ESM support
Main domain ESM support is needed to configure main domain watchdogs
to generate ESM pin events by default. On J7 processor board these
propagate to the PMIC to generate a reset when watchdog expires.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tero Kristo [Fri, 14 Feb 2020 09:18:16 +0000 (11:18 +0200)]
misc: pmic_esm: Add support for PMIC ESM driver
The ESM (Error Signal Monitor) is used on certain PMIC versions to
handle error signals propagating from rest of the system. If these
reach the PMIC, it is typically a last resort fatal error which
requires a system reset. The ESM driver does the proper configuration
for the ESM module to reach this end goal. Initially, only TPS65941
PMIC is supported for this.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tero Kristo [Fri, 14 Feb 2020 09:18:15 +0000 (11:18 +0200)]
misc: k3_esm: Add support for Texas Instruments K3 ESM driver
The ESM (Error Signaling Module) is used to route error signals within
the K3 SoCs somewhat similar to interrupts. The handling for these is
different though, and can be routed for hardware error handling, to
be handled by safety processor or just as error interrupts handled
by the main processor. The u-boot level ESM driver is just used to
configure the ESM signals so that they get routed to proper destination.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tero Kristo [Fri, 14 Feb 2020 09:18:14 +0000 (11:18 +0200)]
power: pmic: tps65941: Add support for probing the child devices
TPS65941 can have child devices under it (like the ESM support), so
probe these once the master pmic node completes probe.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Keerthy [Wed, 12 Feb 2020 08:25:11 +0000 (13:55 +0530)]
configs: j721e_evm_r5_defconfig: Remove saving ENV in eMMC
Remove saving ENV in eMMC in R5 as the power domains are not
setup. Environment in eMMC cannot be read if we do not boot from
eMMC.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Keerthy [Wed, 12 Feb 2020 08:25:10 +0000 (13:55 +0530)]
configs: j721e_evm_r5: Enable R5F remoteproc support
Enable R5F remoteproc support in R5 defconfig so that R5s can
be started in SPL. While at it enable the SPL_FS_EXT4 config
option to load the firmwares from file system.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Keerthy [Wed, 12 Feb 2020 08:25:09 +0000 (13:55 +0530)]
include: configs: j721e_evm: Add env variables for mcu_r5fss0_core0 & main_r5fss0_core0
Add env variables for mcu_r5fss0_core0 & main_r5fss0_core0 firmware
loadaddr and name.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Keerthy [Wed, 12 Feb 2020 08:25:08 +0000 (13:55 +0530)]
arm: dts: k3-j721e-r5: Enable r5fss0 cluster in SPL
Enable MAIN domain r5fss0 cluster and its core0 in R5 spl.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Keerthy [Wed, 12 Feb 2020 08:25:07 +0000 (13:55 +0530)]
arm: dts: k3-j721e-r5-u-boot: Add fs_loader node
Add fs_loader node which will be needed for loading firmwares
from the boot media/filesystem.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Keerthy [Wed, 12 Feb 2020 08:25:06 +0000 (13:55 +0530)]
armv7R: K3: Add support for jumping to firmware
MCU Domain rf50 is currently shutting down after loading the ATF.
Load elf firmware and jump to firmware post loading ATF.
ROM doesn't enable ATCM memory, so make sure that firmware that
is being loaded doesn't use ATCM memory or override SPL.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Keerthy [Wed, 12 Feb 2020 08:25:05 +0000 (13:55 +0530)]
armv7R: K3: r5_mpu: Enable execute permission for MCU0 BTCM
Enable execute permission for mcu_r5fss0_core0 BTCM so that we can jump
to a firmware directly from SPL.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Keerthy [Wed, 12 Feb 2020 08:25:04 +0000 (13:55 +0530)]
arm: k3: Add support for loading non linux remote cores
Add MAIN domain R5FSS0 remoteproc support from spl. This enables
loading the elf firmware in SPL and starting the remotecore.
In order to start the core, there should be a file with path
"/lib/firmware/j7-main-r5f0_0-fw" under filesystem
of respective boot mode.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
[Guard start_non_linux_remote_cores under CONFIG_FS_LOADER]
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Keerthy [Wed, 12 Feb 2020 08:25:03 +0000 (13:55 +0530)]
lib: elf: Move the generic elf loading/validating functions to lib
Move the generic elf loading/validating functions to lib/
so that they can be re-used and accessed by code existing
outside cmd.
While at it remove the duplicate static version of load_elf_image_phdr
under arch/arm/mach-imx/imx_bootaux.c.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Suggested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:59 +0000 (11:09 +0530)]
configs: j721e_hs_evm: Enable OSPI related configs
Enable OSPI related configs for J721e HS variant.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:58 +0000 (11:09 +0530)]
configs: ama65x_hs_evm: Enable OSPI related configs
Enable OSPI related defconfigs for AM65x HS variant.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:57 +0000 (11:09 +0530)]
board: ti: Update AM65x and J721e READMEs for OSPI boot
Update AM65x and J721e README files with instructions for flashing OSPI
images.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:56 +0000 (11:09 +0530)]
configs: am65x_evm_defconfig: Enable OSPI configs
Enable OSPI related defconfigs. Also enable SPL_DMA so that DMA is used
during OSPI boot
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:55 +0000 (11:09 +0530)]
configs: j721e_evm_defconfig: Enable OSPI configs
Enable OSPI related defconfigs. Also enable SPL_DMA so that DMA is used
during OSPI boot
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:54 +0000 (11:09 +0530)]
configs: j721e_evm: Setup mtdparts for OSPI
Set up mtdparts cmdline argument to be passed to kernel
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:53 +0000 (11:09 +0530)]
configs: am65x_evm: Setup mtdparts for OSPI
Set up mtdparts cmdline argument to be passed to kernel
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:52 +0000 (11:09 +0530)]
ARM: dts: k3-j721e: Add OSPI DT nodes
Add OSPI DT nodes to enable OSPI at U-Boot prompt and also to support
OSPI boot.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:51 +0000 (11:09 +0530)]
ARM: dts: k3-am65: Add OSPI DT nodes
Add OSPI DT nodes to enable OSPI at U-Boot prompt and also to support
OSPI boot.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Lokesh Vutla [Tue, 4 Feb 2020 05:39:50 +0000 (11:09 +0530)]
ARM: mach-k3: sysfw-loader: Use SPI memmapped addr when loading SYSFW
Since ROM configures OSPI controller to be in memory mapped mode in OSPI
boot, R5 SPL can directly pass the memory mapped pointer to ROM. With
this ROM can directly pull the SYSFW image from OSPI.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:49 +0000 (11:09 +0530)]
ARM: mach-k3: arm64-mmu: map 64bit FSS MMIO space in A53 MMU
Populate address mapping entries in A53 MMU for 4 GB of MMIO space
reserved for providing MMIO access to multiple flash devices through
OSPI/HBMC IPs within FSS.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:48 +0000 (11:09 +0530)]
drivers: Descend to drivers/soc unconditionally
Descend to drivers/soc directory unconditionally for SPL and U-Boot
builds. Individual drivers can have their own config to check what needs
to be built for SPL. There should be no increase in SPL code size
due to this change.
This is required on K3 SoCs to support DMA in SPL.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 26 Feb 2020 12:53:20 +0000 (07:53 -0500)]
Prepare v2020.04-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 26 Feb 2020 04:35:53 +0000 (23:35 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx
- Update Sata node for T2080QDS and revert SATA related unrequired
patches.
Tom Rini [Tue, 25 Feb 2020 18:59:21 +0000 (13:59 -0500)]
Merge branch '2020-02-25-master-imports'
- Assorted fixes
Carl Gelfand [Wed, 22 Jan 2020 21:03:02 +0000 (16:03 -0500)]
board: novtech: meerkat96: use correct mmc driver
When the board was originally submitted, it was attempting to use the
ESDHC driver. The board uses the USDHC driver.
Signed-off-by: Carl Gelfand <carl@novtech.com>
Cc: Shawn Guo <shawn.guo@kernel.org> (maintainer:MEERKAT96 BOARD)
Acked-by: Shawn Guo <shawnguo@kernel.org>
Markus Klotzbuecher [Wed, 12 Feb 2020 19:46:45 +0000 (20:46 +0100)]
moveconfig: convert ps.stderr to string
Printing the error message in verbose mode fails, since python3
doesn't implicitely convert bytes to strings.
Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Markus Klotzbuecher [Wed, 12 Feb 2020 19:46:44 +0000 (20:46 +0100)]
moveconfig: replace unsafe eval with asteval
Commit
b237d358b425 ("moveconfig: expand simple expressions") added
support for expanding expressions in configs, but used the unsafe python
built-in "eval". This patch fixes this by replacing eval with the
asteval module.
Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sat, 22 Feb 2020 06:45:50 +0000 (07:45 +0100)]
MAINTAINERS: set maintainer for doc/api/efi.rst
doc/api/efi.rst belongs to the UEFI sub-system documentation.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Wasim Khan [Fri, 14 Feb 2020 05:30:52 +0000 (11:00 +0530)]
arch: arm: Fix SZ_64K undeclared compilation error
Macro SZ_64K is undeclared. Include sizes.h to fix the compilation
error.
Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Philippe Reynes [Tue, 18 Feb 2020 16:23:20 +0000 (17:23 +0100)]
tools: image-host.c: remove uboot_aes.h
The include uboot_aes.h is not useful and
it breaks the compilation on android, so
we remove it.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reported-by: Praneeth Bajjuri <praneeth@ti.com>
Tom Rini [Tue, 25 Feb 2020 14:06:50 +0000 (09:06 -0500)]
Merge branch '2020-02-24-ci-htmldocs'
- Update our CI loops to run 'make htmldocs' and stop on errors
Heinrich Schuchardt [Fri, 21 Feb 2020 17:24:03 +0000 (18:24 +0100)]
doc/Makefile: turn warnings into errors
Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Travis CI, Gitlab CI, or Azure CI.
So let us turn all build warnings into errors.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Heinrich Schuchardt [Fri, 21 Feb 2020 17:24:02 +0000 (18:24 +0100)]
azure: build HTML documentation
Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Azure CI.
Provide a build step for 'make htmldocs'.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Heinrich Schuchardt [Fri, 21 Feb 2020 17:24:01 +0000 (18:24 +0100)]
gitlab: build HTML documentation
Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Gitlab CI.
Provide a build step for 'make htmldocs'.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Heinrich Schuchardt [Fri, 21 Feb 2020 17:24:00 +0000 (18:24 +0100)]
travis: build HTML docs
Several patches delivered incorrect restructured text as documentation.
We should be able to discover this in Travis CI.
Provide a build step for 'make htmldocs'.
Add required package graphviz.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tom Rini [Mon, 24 Feb 2020 20:10:36 +0000 (15:10 -0500)]
travis: Add python3-sphinx to the package list
In order to build htmldocs we need sphinx-build which comes from
python3-sphinx.
Signed-off-by: Tom Rini <trini@konsulko.com>
Peng Ma [Mon, 23 Dec 2019 09:28:18 +0000 (09:28 +0000)]
arch: powerpc: Rewrite the sata node to fit the driver
The sata of our powerpc platforms are updated. These changes is to
fit the driver probe.
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Peng Ma [Mon, 23 Dec 2019 09:28:15 +0000 (09:28 +0000)]
Revert "configs: enable sata device module in T2080QDS"
This reverts commit
02dc1599ba0b16eb21ba0c206e5b6f38fe7b67a7
Commit
02dc1599ba0b ("configs: enable sata, eSDHC, USB device module in
T2080QDS")
has some sata defconfig changes to fit support DM mode, Now the driver
will be reverted, So revert it.
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Peng Ma [Mon, 23 Dec 2019 09:28:12 +0000 (09:28 +0000)]
Revert "powerpc: mpc85xx: delete FSL_SATA for T2080QDS board."
This reverts commit
856b9cdb53f0e6c8d98f81cf71ef363c16b0aa0e.
Commit
856b9cdb53f0 ("powerpc: mpc85xx: delete FSL_SATA for T2080QDS
board.") is to fit support sata DM mode, Now the driver will be reverted,
So revert it.
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Peng Ma [Mon, 23 Dec 2019 09:28:09 +0000 (09:28 +0000)]
Revert "ata: fsl_ahci: Add sata DM support for Freescale powerpc socs"
This reverts commit
1ee494291880fd51ef0c5f7342e072bdb069d7ff.
Commit
1ee494291880 ("ata: fsl_ahci: Add sata DM support for Freescale
powerpc socs") introduced SCSI layer to call AHCI private API in order
to support sata operations, In DM mode, This is not necessary for
non-AHCI sata. So revert it and have already updated the driver itself
to operate sata directly.
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Heinrich Schuchardt [Fri, 21 Feb 2020 17:23:59 +0000 (18:23 +0100)]
doc: update doc/sphinx/kerneldoc.py
Update doc/sphinx/kerneldoc.py from Linux next-
20200219 to avoid warnings
like:
doc/sphinx/kerneldoc.py:125: RemovedInSphinx20Warning:
AutodocReporter is now deprecated. Use
sphinx.util.docutils.switch_source_input() instead.
self.state.memo.reporter =
AutodocReporter(result, self.state.memo.reporter)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tom Rini [Mon, 24 Feb 2020 16:04:29 +0000 (11:04 -0500)]
Azure / GitLab: Update Docker image
Bring in a newer Docker image to build on that has everything required
for running 'make htmldocs'.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Fri, 21 Feb 2020 03:14:29 +0000 (22:14 -0500)]
Merge tag 'u-boot-rockchip-
20200220' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- rk3399: split roc-pc-rk3399 out of evb_rk3399
- sync dts from upstream kernel for rk3399,rk3288,px30
- boot_mode: find the saradc device name
Tom Rini [Thu, 20 Feb 2020 12:27:31 +0000 (07:27 -0500)]
Merge tag 'mmc-2-20-2020' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
- sdhci: code clean-up and fix cache coherency problem
- enable cache snooping on mpc830x
- Fix build error when MMC_WRITE disabled
Masahiro Yamada [Fri, 14 Feb 2020 07:40:27 +0000 (16:40 +0900)]
mmc: sdhci: fix missing cache invalidation after reading by DMA
This driver currently performs cache operation before the DMA start,
but does nothing after the DMA completion.
When reading data by DMA, the cache invalidation is needed also after
finishing the DMA transfer. Otherwise, the CPU might read data from
the cache instead of from the main memory when speculative memory read
or memory prefetch occurs.
Instead of calling the cache operation directly, this commit adds
dma_unmap_single(), which performs cache invalidation internally,
but drivers do not need which operation is being run.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Fri, 14 Feb 2020 07:40:26 +0000 (16:40 +0900)]
mmc: sdhci: use dma_map_single() instead of flush_cache() before DMA
Currently, sdhci_prepare_dma() calls flush_cache() regardless of the
DMA direction.
Actually, cache invalidation is enough when reading data from the device.
This is correctly handled by dma_map_single(), which mimics the DMA-API
in Linux kernel. Drivers can be agnostic which cache operation occurs
behind the scene.
This commit also sanitizes the difference between the virtual address
and the dma address.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Fri, 14 Feb 2020 07:40:25 +0000 (16:40 +0900)]
mmc: add mmc_get_dma_dir() helper
Copied from Linux kernel.
include/linux/mmc/host.h
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Masahiro Yamada [Fri, 14 Feb 2020 07:40:24 +0000 (16:40 +0900)]
mmc: sdhci: remove unneeded casts
host->mmc is already (struct mmc *).
memalign() returns an opaque pointer, so there is no need for casting.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Masahiro Yamada [Fri, 14 Feb 2020 07:40:23 +0000 (16:40 +0900)]
mmc: sdhci: use lower_32_bit2() and upper_32_bits() for setting adma_addr
Use {lower,upper}_32_bits() instead of the combination of cast
and shift.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Masahiro Yamada [Fri, 14 Feb 2020 07:40:22 +0000 (16:40 +0900)]
mmc: sdhci: reduce code duplication for aligned buffer
The same code is run for both SDHCI_QUIRK_32BIT_DMA_ADDR and
define(CONFIG_FIXED_SDHCI_ALIGNED_BUFFER).
Unify the code.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Masahiro Yamada [Fri, 14 Feb 2020 07:40:21 +0000 (16:40 +0900)]
mmc: sdhci: put the aligned buffer pointer to struct sdhci_host
Using the global variable does not look nice.
Add a new field sthci::align_buffer to point to the bounce buffer.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Masahiro Yamada [Thu, 20 Feb 2020 05:15:37 +0000 (14:15 +0900)]
dma-mapping: add <asm/dma-mapping.h> for all architectures
To avoid "asm/dma-mapping.h: No such file or directory" error,
we need something.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Peter Robinson [Wed, 8 Jan 2020 03:56:11 +0000 (03:56 +0000)]
arch: arm: rockchip: order the rk3399 entries alphabetically
Put the target entries for rk3399 devices in alphabetical order.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Kever Yang [Wed, 19 Feb 2020 09:51:07 +0000 (17:51 +0800)]
rockchip: rk3399: add target type for evb based board
There are many boards share the board file and device header file with
rk3399 evb, add target type MACRO so that it is fixed instead of default
to the first target in "RK3399 board select".
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Tom Rini [Wed, 19 Feb 2020 22:25:26 +0000 (17:25 -0500)]
Merge tag 'efi-2020-04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-04-rc3
* Update the Kconfig description of CONFIG_EFI_RNG_PROTOCOL
* Fix a function comment resolving a warning in 'make htmldocs'
Masahiro Yamada [Fri, 14 Feb 2020 07:40:19 +0000 (16:40 +0900)]
dma-mapping: move dma_map_(un)single() to <linux/dma-mapping.h>
The implementation of dma_map_single() and dma_unmap_single() is
exactly the same for all the architectures that support them.
Factor them out to <linux/dma-mapping.h>, and make all drivers to
include <linux/dma-mapping.h> instead of <asm/dma-mapping.h>.
If we need to differentiate them for some architectures, we can
move the generic definitions to <asm-generic/dma-mapping.h>.
Add some comments to the helpers. The concept is quite similar to
the DMA-API of Linux kernel. Drivers are agnostic about what is
going on behind the scene. Just call dma_map_single() before the
DMA, and dma_unmap_single() after it.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Fri, 14 Feb 2020 07:40:18 +0000 (16:40 +0900)]
dma-mapping: fix the prototype of dma_unmap_single()
dma_unmap_single() takes the dma address, not virtual address.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Fri, 14 Feb 2020 07:40:17 +0000 (16:40 +0900)]
dma-mapping: fix the prototype of dma_map_single()
Make dma_map_single() return the dma address, and remove the
pointless volatile.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Rasmus Villemoes [Thu, 30 Jan 2020 12:06:45 +0000 (12:06 +0000)]
mmc: fsl_esdhc: actually enable cache snooping on mpc830x
The reference manuals for MPC8308 and MPC8309 both say that the
esdhcctl aka DMA Control Register "is implemented as SDHCCR" in the
System configuration registers. Unfortunately, that doesn't mean that
the registers are just mirrors of each other - any write to esdhcctl
is simply ignored. So to actually enable cache snooping, we
unfortunately have to add a little ifdeffery.
There is, naturally, no description of the bit fields of esdhcctl in
the MPC8309 manual, but comparing the description of esdhcctl from the
LS1021A reference manual to the description of the sdhccr in MPC8309,
one also finds that the fields are bit-reversed, so the bit to set is
0x02000000 rather than 0x00000040 - this is also what board_mmc_init()
uses in the two gdsys/mpc8308/ boards.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Yangbo Lu <yangbo.lu@nxp.com>
Heinrich Schuchardt [Fri, 14 Feb 2020 22:28:58 +0000 (23:28 +0100)]
efi_loader: EFI_RNG_PROTOCOL
Do not use quotation marks for Kconfig help text.
Replace rng abbreviation by full words.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Fri, 7 Feb 2020 21:10:49 +0000 (22:10 +0100)]
efi_loader: fix efi_install_fdt() description
In the function description use the correct parameter name.
Mention EFI_FDT_USE_INTERNAL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Jared Baldridge [Fri, 7 Feb 2020 03:53:14 +0000 (19:53 -0800)]
configs: fix typos in khadas-edge defconfigs
s/dtbi/dtb/
Signed-off-by: Jared Baldridge <jrb@expunge.us>