Commit Graph

50103 Commits

Author SHA1 Message Date
Cody Xie e65ea10ce4 .gitignore: Ignore more generated files
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
Change-Id: Id0536ad67acfb48c34f1be5bd564a1096c9a43af
2020-04-21 09:30:23 +08:00
Jon Lin ae52cbcb84 spi: rokchip_sfc: set sfc clock
Change-Id: I1f2ae108b7557cfe9b55e21d1ecaec5492efea87
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-21 09:28:24 +08:00
Joseph Chen 4e45d60523 make.sh: remove file before build
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic87dc270a8e090c21eaae643cd9edb9e22cac767
2020-04-20 20:15:09 +08:00
Yifeng Zhao 2d1531fa31 drivers: rknand: zftl: strengthen the parameter judgment for write loader API
The write loader function may call by mistake if the system
is unstable, which will cause flash reading and writing errors
and data loss.

bug log:
MT RR 15 row=dae38,count 15,status=-1
MT RR 15 row=dae38,count 15,status=-1
flash_read_page_en 0 dae38 error_ecc -1 1
load_l2p_region = 0,2,ffffffff, dae1e

Change-Id: Iac55e7807d739f08146ea2d81265857e6136e5d0
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2020-04-20 20:04:59 +08:00
Joseph Chen 30ef03eb67 spl: print entry point for U-Boot and OP-TEE
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ifeb52986851b93cb634f177e3834cbf681f3dfb0
2020-04-20 19:42:03 +08:00
Joseph Chen a11e2c8225 make.sh: simplify remove file
rm -rf can always return 0.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1f7e14ec860bb0da7b72132a8945a959b20cd440
2020-04-20 19:41:55 +08:00
Joseph Chen f9afd3dc76 make.sh: support fit secure image build with args
Such as:
    ./make.sh rk3399 --rollback-index-uboot 12 --rollback-index-boot 22
    ./make.sh --rollback-index-uboot 12 --rollback-index-boot 22

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ifd3d564bc860af215860471a327f752305501123
2020-04-20 18:29:25 +08:00
Joseph Chen 4b4c68413a make.sh: build secure or non-secure image auto by CONFIG_FIT_SIGNATURE
Providing sub command "fit-ns" to force building a non-secure image,
mainly for debugging.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0212dcb1c8387b16a4b0589d74cbc2ddeb282b3d
2020-04-20 18:29:14 +08:00
Joseph Chen 6084ba494f make.sh: fix finish message "make nopack_defconfig"
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I387c6337d8d5ea8a2e68a289aff695f38ebfcd47
2020-04-20 18:29:14 +08:00
Joseph Chen ec4fe46226 fit: add comment for success return
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I58f1c1a159af2da675bd47b632022c2a0cdb9d40
2020-04-20 18:29:14 +08:00
Joseph Chen 5de879f9d8 common: board_f: reserve noncache memory region
board_r.c supports noncache memory region right below malloc
area, but board_f.c seems does not reserve it.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I7da218b6d994227a04a91cea02b64b6c91a0cc54
2020-04-20 18:29:14 +08:00
Joseph Chen 77deab993a rockchip: fit: make some error messge quiet
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4de9914c349093a54e35080ca9d84c0ee95d9893
2020-04-20 18:29:14 +08:00
Jason Zhu 767409c5a6 misc: Kconfig: change the SPL_ROCKCHIP_HW_DECOMPRESS dependent's attribute
Change "depends on MISC" to "depends on SPL_MISC".

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I1b6c2296d5e88e4e2c0cbafb9bb31790d6f25e66
2020-04-20 14:52:32 +08:00
Joseph Chen 2fc776b68f Kconfig: default 2 copies of u-boot.itb for uboot.img
Backup is required for OTA, we proivde at least 2 copies.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I31303dbeac5fb458f343976290296396c24f988f
2020-04-20 11:27:29 +08:00
Jason Zhu 413b349a06 drivers: Makefile: build block drivers if enable CONFIG_SPL_MTD_SUPPORT
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ida49ab768f6fd5e94736b850d06f6af04267c384
2020-04-17 14:39:39 +08:00
Frank Wang 5c6a522a4d configs: rk3328/rk3399: enable usb3.0 host support
Update RK3328 and RK3399 default config to support USB3.0 host.

Change-Id: I2a208478de9711138a85f2cc5fe3bbe69551883b
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2020-04-16 15:51:35 +08:00
Joseph Chen 851015326d make.sh: support pack mcu by parameters
Parameters: mcu address offset and enable status.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id388bf0d94182a55781248a51d26de32ee03e7be
2020-04-16 15:41:28 +08:00
Joseph Chen a515b6d27e fit: spl: verify hashes of images by default
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iea4eabcd87ea612eeeb7cb5e34ce26adee053557
2020-04-16 14:18:10 +08:00
Joseph Chen 3029e24f60 rockchip: fit: update image sig required message
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id0e5d360c2b2f1d73cefabec3ba6f2e7adddd0fc
2020-04-16 12:50:55 +08:00
Joseph Chen da2f97ecea common: sig: require /signature node for images verify
Not allow fail if FIT_SIGANATURE is enabled.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icad787e4b25587121ede1b308c62e1a39e5899f1
2020-04-16 12:50:55 +08:00
Jason Zhu 2996edba74 common: spl: mmc: clean up the useless log
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ibf588d918ce6471aeb540321118e51877ce6fea0
2020-04-15 20:58:18 +08:00
Frank Wang 6caebf11e0 driver: usb: drop legacy rockchip xhci driver
We have changed to use dwc3 generic driver for usb3.0 host, so the
legacy Rockchip's xHCI driver is not needed, and drop it.

Change-Id: I2f6f4d3598aaec1ed30ec3c3f8f594a675520203
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2020-04-15 15:44:22 +08:00
Frank Wang 0162d8c3e4 ARM: dts: rockchip: amend dwc3 nodes to keep in line with kernel
We have changed to use dwc3 generic driver for Rockchip SoCs,
so let amend dts to fix it and keep in line with Linux Kernel.

Change-Id: Iddf114d6a36f9651fd9b222b25ac7c9040629e22
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2020-04-15 15:44:22 +08:00
Frank Wang 3e6777664f usb: gadget: vary ep max packet by usb speed
The EP Maxpacket should be varied due the USB speed may be changed
at enumeration time.

Change-Id: I6cf8e1e8b6e3c24d14f7b24638aff88f8dd066e0
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2020-04-15 15:44:22 +08:00
Frank Wang ea6d52da21 usb: dwc3: add make compatible for rockchip platform
RK3399 Type-C PHY is required that must hold whole USB3.0 OTG controller
in resetting to hold pipe power state in P2 before initializing the PHY.
This commit fixed it and added device compatible for rockchip platform.

Change-Id: I2a546ac91632ea29d9ea88e94bfde948c387b834
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2020-04-15 15:44:22 +08:00
Frank Wang 4f6604d7ff phy: rockchip: add a new driver for type-c phy
This implements the Type-C PHY driver for Rockchip platform
with Cadence IP block.

Change-Id: I4d74aadbae10f743c9daec8f97aadb8458e740fc
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-04-15 15:44:22 +08:00
Frank Wang 86df9e881e phy: rockchip-inno-usb2: add vbus regulator support
Get vbus regulator from DT and manage it when phy power on/off.

Change-Id: Iad6742eb47906b0d13ea1e697a5540e69adb2bd1
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2020-04-15 15:44:22 +08:00
Frank Wang 45d1e0c8a3 clk: rockchip: rk3399: add usb3.0 host clocks mandatory
This adds clocks mandatory for the DWC3 controllers of RK3399,
as these are enabled by default we just simply return success.

Change-Id: I81006d710cb6b4608c8dfa61a4eef661415bad29
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2020-04-15 15:44:22 +08:00
Frank Wang 1b23c040f7 board: rockchip: add dwc3 gadget support for rk3328
Add DWC3 device data and gadget download support for RK3328 SoCs.

Change-Id: I034e9838f0f44f24ebb9b9e372039a19e089f3be
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2020-04-15 15:44:22 +08:00
Frank Wang affb42ab85 phy: rockchip: add a new driver for Rockchip USB3 PHY
This implements the USB3.0 PHY driver for Rockchip platform
with Inno IP block.

Change-Id: I161915cf36fec441822f5f151f017ba8a7ecff9f
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2020-04-15 15:44:22 +08:00
Kever Yang ef78966da5 FROMLIST: usb: Migrate to support live DT for some driver
Use ofnode_ instead of fdt_ APIs so that the drivers can support live DT.
This patch updates usb_get_dr_mode() and usb_get_maximum_speed() to use
ofnode as parameter instead of fdt offset. And all the drivers who use
these APIs update to use live dt APIs at the same time.

Change-Id: I41a3fa52e8fdb99f7fc36b1bc0eb21ae82f90e63
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(am from http://patchwork.ozlabs.org/patch/1248682/)
2020-04-15 15:44:22 +08:00
Kever Yang d4f9534982 FROMLIST: usb: ehci-msm: Use dev interface to get device address
Use dev_read_addr_ptr() instead of devfdt_get_addr() so that we can support
live DT.

Change-Id: I373931c2bfbe4ad4422ee974560e690c775d670d
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(am from http://patchwork.ozlabs.org/patch/1248684/)
2020-04-15 15:44:22 +08:00
Kever Yang b5f6b28fa3 FROMLIST: usb: dwc3-of-simple: Drop redundant inclding header file
The fdtdec.h is no use in this file, remove the include code.

Change-Id: I6e4e9dddae68ba4466eba7a22e8362840f048910
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(am from http://patchwork.ozlabs.org/patch/1248681/)
2020-04-15 15:44:22 +08:00
Jason Zhu 6177e32d3d spl: rkfw: support decompress kernel and ramdisk
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I172b75ed0587726f5d465dcbb20bf9aa7e65e1e4
2020-04-15 11:55:40 +08:00
Jason Zhu fcf012f8b3 spl: Kconfig: add config SPL_KERNEL_COMPRESS_ADDR & SPL_RAMDISK_COMPRESS_ADDR
Load compressed kernel and ramdisk firmwares in these addresses.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Icca49069fcaa08c19f5ef574d9ec4f803dbba6d1
2020-04-15 11:55:40 +08:00
Jason Zhu cc05bcfa96 misc: decompress: realize decompress interface layer function
Realize decompress start & stop & is_complete functions for application layer
calling.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I996861e51706a9ecf97e3db53cf5fce097d9b547
2020-04-15 11:55:40 +08:00
Jason Zhu 74dce6fe82 misc: add IOCTL_REQ_CAPABILITY
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I1d1c6a93fd686d1a13450316b1edc09ce19b6dcf
2020-04-15 11:55:40 +08:00
Jason Zhu 61481586b4 make.sh: support pack mcu.bin
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I0f7967e9bc969d9fe2452f070a8b597f40697b9f
2020-04-14 21:50:46 +08:00
Joseph Chen eee9fb0aea make.sh: fix typo
Fix trust.img pack failed issue.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icbaaba493228f620849851c46bb503dfe7ae6a13
2020-04-14 18:54:59 +08:00
Jason Zhu df197bd25a rockchip: board: truncature the illegal character in the end of sn
The usb will not work well when connects to pc with illegal sn.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Idf17bc1cc6533428606e703d7284053c2b0cc02a
2020-04-14 17:32:16 +08:00
Joseph Chen 8f53a15c01 make/fit: optimise for fit
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I59067a208f3599f13acf995172ec720c1f141d18
2020-04-14 13:13:17 +08:00
Joseph Chen b074ddcefe common: sig: require /signature node if FIT_SIGANATURE is enabled
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I415d198f4d97f6430f7a0bfd478e3bdfb2c6b5aa
2020-04-14 13:10:19 +08:00
Joseph Chen ab760d282c configs: rk3399: disable fit signature
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If63065b7143949bb1d2ce12a0f8bb69b8db1c451
2020-04-14 13:10:19 +08:00
Rick Chen f8ddf2aa61 UPSTREAM: tools: mkimage: Support RISC-V arch
Add riscv uimage arch to support riscv-linux booting.
It can Convert riscv-linux to image which can be
booted by bootm command.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I38119fadebb4fa9f1db12897d6561f97fbf03f02
(cherry picked from commit: 86aa65a0cd2)
2020-04-14 12:45:33 +08:00
Rick Chen ade0ea07bd UPSTREAM: riscv: Modify generic codes to support RISC-V
Support common commands bdinfo and image format,
also modify common generic flow for RISC-V.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Signed-off-by: Greentime Hu <green.hu@gmail.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Change-Id: Id58d17cd58433fdadc8ce7ee78d72035f84adb53
(cherry picked from commit 068feb9b86d991283c43b56e36094f4e6f484d04)
2020-04-14 12:45:33 +08:00
Jason Zhu 342d050ebb spl: fit: support boot standalone firmware
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib3e35cfba0bb52141c8948de994f5e6c9661887f
2020-04-14 12:45:33 +08:00
Marek Vasut f2413b2f2f UPSTREAM: fit: Add standalone image type handling
Just add IH_TYPE_STANDALONE to fit_get_image_type_property().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I0e3dbfad3e15decb81665fabb8d25e1b71f4c7b7
(cherry picked from commit 0298d203754)
2020-04-14 12:45:33 +08:00
Joseph Chen 30374393f3 scripts: fit: update rollback-index error msg
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I721c9c262fa8683d75f7d2413b6fecfcdf0cb28c
2020-04-13 19:48:54 +08:00
Jon Lin 0a7542b5fd rkflash: support 25Q256JWEQ
Change-Id: I0c5feb11a3adbcbd5b82ae5adc8b322b48435847
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-13 19:11:00 +08:00
Jon Lin 534d4d2fe4 rkflash: support transfer large size data
Change-Id: I36c5daabb952215bbc4d2cb2cffb82df3fa7085a
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-04-13 19:11:00 +08:00