fix typo
Change-Id: If467ba2cb4d16a4844400e9046e851ab0b96a4de
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 11f12c17d72499292f6e219ebbf8062faedcc5bb)
fix typo
Change-Id: Ifee202f67e4a972854ed33745de3984b6ae9e2d1
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 042de609ed49cfc41afb13639850c7b01079a527)
Some Intel FSP (like Braswell) does SPI lock-down during the call
to fsp_notify(INIT_PHASE_BOOT). But before SPI lock-down is done,
it's bootloader's responsibility to configure the SPI controller's
opcode registers properly otherwise SPI controller driver doesn't
know how to communicate with the SPI flash device.
Rather than passively doing the opcode configuration, let's add a
simple DTS property "intel,spi-lock-down" and let the driver call
the opcode configuration function if required by such FSP.
Change-Id: I2cef052b87320392449c39a8aa2330236539a2c3
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ab20107468de5bf6b9affa93b17f2284cc838b5b)
The DM support is already in the driver, so add
da830-spi to the compatible list.
Reviewed-by: Jagan Teki <jagan@openedev.com>
Change-Id: I1a9146dc21017f7f32e79608cfecb4129df93a14
Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ab0ac272421c4b72c7a78db32ad709e23cab1eea)
In some of the QSPI controller version, there must be atleast
128bit data available in TX FIFO for any pop operation otherwise
error bit will be set. The code will not make any behavior change
for previous controller as the transfer data size in ipcr register
is still the same.
Patch is tested on LS1046A which do not require 16 bytes aligned and
LS1088A which require 16 bytes aligned data in TX FIFO
Change-Id: I87e05aa2d038997a6681d664605c0de9ca6d51bd
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Signed-off-by: Anupam Kumar <anupam.kumar_1@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 10509987285515b0a969c39ef7374fea3545851b)
It is recommended to check either controller is free to take
new spi action. The IP_ACC and AHB_ACC bits indicates that
the controller is busy in IP or AHB mode respectively.
And the BUSY bit indicates that controller is currently
busy handling a transaction to an external flash device
Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
(cherry picked from commit 1c631da459a82f4f82a063f5b4ff339ca5384d11)
Change-Id: I79b786b7e24294538cf014c86658838409c29e78
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Add driver model support for mxc spi driver.
Most functions are restructured to be reused by DM and non-DM.
Tested on mx6slevk/mx6qsabresd board.
Change-Id: Idb04e59b28f570b161aa75216748ebda0ed6d9ac
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 994266bdff7903279b8e43ddbf220b04a4e1411f)
Add M_ATTR_IGNORE_INVISIBLE for kernel memblk on RK3308-AArch32 to
alloc kernel region within 0~1M address.
Add "ramoops" alias for share memblk to avoid sysmem check warning.
Add M_ATTR_KMEM_CAN_OVERLAP for some images.
Change-Id: I1d7ed93a19ea22e5c69f23d75a1c1faf4e9f0104
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
- Allow request region alloc within the first invisiable region reserved by
bidram when request region has flags M_ATTR_IGNORE_INVISIBLE. This is a
workaround for some firmware memory layout, eg: on RK3308-AArch32, the ATF
region is 0~1M(same as RK3308-AArch64), but the kernel would like to alloc
at 0x00058000.
- Always make kernel reserved-memory alloc successfully and check overlap
with invisible and sysmem allocated regions in sysmem_overflow_check()
before bootm. This makes alloc policy more easier.
Change-Id: I533c710a6e69bd930befda441b9ec64415e3f408
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Check if the region is overlap with reserved regions.
Change-Id: Ifd9b6a4438dcf954b7e48930e31d0c6cd5d1274c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
If ddc-i2c-scl-high-time-ns and ddc-i2c-scl-low-time-ns are not
set in dts, scl_high_ns and scl_low_ns will set to -1. Because of
these variables are unsigned int, misjudgment may occur when their
values are judged.
Change-Id: I8b94f7c2ab8bcb0d966182f220877f9268b7981b
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Set flags as early as possible to avoid putc() by CONFIG_DEBUG_UART.
Change-Id: Ifb986397e7d94a4ab1a47c065afba3c7845c2563
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Set CONFIG_DISABLE_CONSOLE priority higher than CONFIG_DEBUG_UART,
otherwise there maybe some early message is printed by CONFIG_DEBUG_UART.
Change-Id: I235a49646b154e10e724e3d63e0ceecdd862c636
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
If we enable CONFIG_CONSOLE_DISABLE_CTRLC for AVB bootflow, we want to
disable hotkey too.
Change-Id: Idd542a1fa8b3b2a7d232373a767e91e49e90d9ae
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
We make the appoint that the other pre-loader can set atags
only when TPL ative it(creating the valid atags header).
Change-Id: I579d31e0880f35193b9c017fc83cbe0f5a25bfb3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
It prints like: "Android 8.1, Build 2019.7", maybe helpful
for debugging.
Change-Id: I10acbb6e8d864ae2daa2621bf9cfdf4b902a49b4
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
When switching from another color to yuv422, neither
encoder input color nor encoder output color is rgb.
CSC coeff will be incorrectly selected as
csc_coeff_full_to_limited, which causes the display
turn to green. To solve this problem, choose
csc_coeff_full_to_limited only if the input and output
colors are both RGB.
Change-Id: If09f53fb2a5aa20359efb548b1a8b7da2c79310d
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Adding hdmi quantization range switching function. The current
version use default quant range, subsequent version will keep consistent
with the kernel Setting.
Change-Id: Ibb93f7c08d72322caa15f12b1d6e1f901371b27b
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.
fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)
Change-Id: I2abed8b06292ce68c09b5bcfc6d0ef9bd19b080f
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.
fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)
Change-Id: I5b26d9ac988f45f4dd3627542c2d2eec9b6ca1f2
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.
fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)
Change-Id: Iae4d1ea91fef4e4355babd88e54277e24ff17edd
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.
fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)
Change-Id: I50054102e03ae5925a35124ccbedd3f7cebce5f5
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.
fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)
Change-Id: Ieb9c9e49df3b18fa6a9b459469e8c9c0377192ac
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.
fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)
Change-Id: I343a84e08668af7895ef3fcbf0da0f2deeced63a
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.
fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)
Change-Id: I0d9028411a83a7bbe15060ecd06c0804b8a29c10
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
The CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION force to use the security
partition. But in routine situation, scan the storage device to find
whether RPMB exist. If not, then use the security partition. So in
conventional defconfig, delete CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION.
fixes: b9a7e756c4
(lib: optee_client: change the condition for eMMC devices)
Change-Id: Ibad49030f76a69c5f32c5deac963f49c96c9670b
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
1.dev_desc->if_type == IF_TYPE_MMC for SD and eMMC device,
dev_desc->devnum == 1 is SD devices,
dev_desc->devnum == 0 is eMMC devices
2.SD devices do not have rpmb
3.we prefer to use rpmb for eMMC devices, use security
partition for nand or SD devices
Change-Id: Ifc21bd4da7c3ee91e2ecc845c343182c78d52dc1
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Without the patch gcc 8 produces:
warning: ignoring attribute ‘noreturn’ because it conflicts with
attribute ‘const’ [-Wattributes]
int ____ilog2_NaN(void);
So let's update the include from Linux kernel v4.16.
This removes static checks of ilog2() arguments.
Change-Id: I313759aac445d1e369ba5c478393ebfa27d988a2
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
FM25S01, HYF1GQ4UPACAE, EM73E044SNA-G, GD5F2GQ5UEYIG
Change-Id: Ied88add0b99e6aa733a59990c267b1802a9c9b79
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
We provide a "logo" partition for user to store logo.bmp
and update from kernel user space dynamically.
This patch follows the rkdevelop usage:
- Only support store one picture named "logo.bmp";
- Use "dd" command to generate partition image with logo.img
eg: "dd if=logo.bmp of=logo.img count=1 bs=19456"
Change-Id: Iffde4d123e303c010d99cd446c241a535bce1dcf
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Since we have unified android and linux image format that "recovery" partition
is necessary, we remove partition lookup when recovery mode is required.
Anyway, there is no recovery partition in A/B system and recovery ramdisk
has been moved to boot.img, and adding this judgment code is a little mess.
Change-Id: I9f590f464a14ac25855b8a9487c55cec8d353890
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This config is used to open the MMC RPMB driver.
Change-Id: Ie58ff510221e75743f10222dab2ebedd81b6bf56
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
cmd/mtd.c:447:13: warning: ‘mtd_help_text’ defined but not used [-Wunused-variable]
static char mtd_help_text[] =
^~~~~~~~~~~~~
When SYS_LONGHELP is not defined. After looking at how other commands
work, we should surround the whole help text (even its declaration) with
an #ifdef CONFIG_SYS_LONGHELP, since it's compiled out when calling
_CMD_HELP[1] on the help text variable argument to U_BOOT_CMD.
[1] https://elixir.bootlin.com/u-boot/latest/source/include/command.h#L181
Change-Id: If84aae3167fd8826e33f717b7debefe32920dd0b
Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit a645831ca0962532660e4db3155a8be85e5ca312)
It's way simpler this way, and we also gain auto-completion support for
free (MTD name auto-completion has been added with mtd_name_complete())
change-Id: I4292fde7affaddd8eb5a51fe8ec4265ae4984a21
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 9671243e8d10defb06f2ea24fac138c87697d7fc)
When avb+ab system boot failed, it means slot a/b is unbootable
and slot_cnt_a/b is zero. We should update images a/b and
active slot again, and this can be done by fastboot. Remove
rockusb from RKIMG_BOOTCOMMAND since rockusb unable to active slot.
Change-Id: Ib9b15940a5b8f0cefe9a91ee7564ea8f9aa6f201
Signed-off-by: Zain Wang <wzz@rock-chips.com>