Commit Graph

50371 Commits

Author SHA1 Message Date
Joseph Chen a3320fac15 bidram: fix compile error
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia459afb9f821fa22352615de2fd132cc43ec462e
2020-05-22 16:46:40 +08:00
Joseph Chen 598c6b730e common: fdt_support: update code wrap by configure
It avoids compile error while disabling CONFIG_ARCH_FIXUP_FDT_MEMORY.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I283a335c2ecf559e42544ab138af414423d8a888
2020-05-22 16:46:40 +08:00
Joseph Chen d41e543aa6 common: spl: initial spl->next_stage
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5066612be4c90ff674b61034768eeaba9b9c9b85
2020-05-22 16:39:51 +08:00
Joseph Chen a1247eb812 rockchip: spl: fix typo
Use upper case "V2".

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4b252687c560e13ab78812eb72b59806393beb12
2020-05-22 16:39:51 +08:00
Joseph Chen 869c6dc2a9 include: boot_rkimg: define more partition name
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia8c58e2acca485771ef6a2747bdcbb8326dbfebc
2020-05-22 16:39:51 +08:00
Jason Zhu f0130a0392 rockchip: rv1126: call hang() if timeout when set the pmu
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib92d97e4a2faf3d6002cc6236b576b4c820ad6d9
2020-05-22 15:40:16 +08:00
Simon Glass 6cc5f5cc85 UPSTREAM: spi: Avoid using malloc() in a critical function
In general we should avoid calling malloc() and free() repeatedly in
U-Boot lest we turn it into tianocore. In SPL this can make SPI flash
unusable since free() is often a nop and allocation space is limited.

In any case, these seems no need for malloc() since the number of bytes
is very small, perhaps less than 8.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: d13f5b254a (spi: Extend the core to ease integration of SPI
	memory controllers)
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ca2abb75a086d8b0bdb51689f331ba8f1a146379)
Change-Id: Ia76abf7491780b1984eb81c6c78796bcc0141095
2020-05-21 17:14:01 +08:00
Bernhard Messerklinger 3dc0a5efc5 UPSTREAM: spi: spi-mem: Check if exec_op function is set before calling it
Add check if exec_op is set before calling it.
At the moment it is called unconditionally, which leads to a crash if it
is not set correctly.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 567a3eb7956f98af4ed065499898c6d0ac6443c7)
Change-Id: Ie9fdf0cbee364fc33965e3234d7457702bd0120f
2020-05-21 17:12:57 +08:00
Jon Lin cbd9216dad spi: rockchip_sfc: Change SPI Nand dummy cycles as X8bits address
Spetial patch for GD devices cause u-boot SPI Nand MTD bad
supporting for GD, and the u-boot mainline haven't synchronize
with Linux.

reference to following Linux commit:
commit f1541773af49ecd1edae29c8ac0775253a0b0760
Author: Chuanhong Guo <gch981213@gmail.com>
Date:   Sat Feb 8 15:43:50 2020 +0800

    mtd: spinand: rework detect procedure for different READ_ID operation

    Currently there are 3 different variants of read_id implementation:
    1. opcode only. Found in GD5FxGQ4xF.
    2. opcode + 1 addr byte. Found in GD5GxGQ4xA/E
    3. opcode + 1 dummy byte. Found in other currently supported chips.

    Original implementation was for variant 1 and let detect function
    of chips with variant 2 and 3 to ignore the first byte. This isn't
    robust:

    1. For chips of variant 2, if SPI master doesn't keep MOSI low
    during read, chip will get a random id offset, and the entire id
    buffer will shift by that offset, causing detect failure.

    2. For chips of variant 1, if it happens to get a devid that equals
    to manufacture id of variant 2 or 3 chips, it'll get incorrectly
    detected.

    This patch reworks detect procedure to address problems above. New
    logic do detection for all variants separatedly, in 1-2-3 order.
    Since all current detect methods do exactly the same id matching
    procedure, unify them into core.c and remove detect method from
    manufacture_ops.

Change-Id: If60d0281eb963486639d5b4ce1939ad2b219c8d6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-05-20 13:21:15 +08:00
Jon Lin 113ced8fa4 spi: rockchip_sfc: Remove useless abit setting
Change-Id: I98bdc2eca772eaa5934f2980916438eca2492afd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-05-20 13:08:23 +08:00
shengfei Xu c2bb46e4a5 irq: gicv3: Enables Group 1 interrupts for the current Security state
When a CPU enters a low power state, the registers ICC_IGRPEN1_EL1 is lost.
It need to re-initialise.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I62d9eed2b29190134d95ebd153f21aa764c4ab3b
2020-05-20 09:08:34 +08:00
Jon Lin b4e0791886 mtd: mtd_blk: Change to use erasesize_shift for calculating
Change-Id: Iba08a6df807db9ca582bc22864f4cc51ac5ca121
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-05-20 08:53:25 +08:00
Jason Zhu c53a0c58e7 rockchip: atags: support parse mtd block dev type
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie446393b6f96667f37b2050e32a366b7d7265a94
2020-05-19 21:27:57 +08:00
Joseph Chen 1ff581bb9e scripts: fit: refactor code
- update coding style;
- simply some code logic.
- remove some unused file.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0246dcf5aae6bb73771406518fdaf622bfd9bb2b
2020-05-18 18:16:20 +08:00
Joseph Chen 5bce9eeca6 configs: rv1126: use DTC from host pc
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9978690015a0a8533a2e5de5a3a63d25cf095e28
2020-05-18 16:22:34 +08:00
Joseph Chen 1e6f900d03 rockchip: its: remove "@" for nodes
Fix the warning:
	<stdout>: Warning (unit_address_vs_reg): Node /images/uboot@1 has a unit name, but no reg property
	<stdout>: Warning (unit_address_vs_reg): Node /images/uboot@1/hash@1 has a unit name, but no reg property
	<stdout>: Warning (unit_address_vs_reg): Node /images/optee@1 has a unit name, but no reg property
	<stdout>: Warning (unit_address_vs_reg): Node /images/optee@1/hash@1 has a unit name, but no reg property
	<stdout>: Warning (unit_address_vs_reg): Node /images/fdt@1 has a unit name, but no reg property
	<stdout>: Warning (unit_address_vs_reg): Node /images/fdt@1/hash@1 has a unit name, but no reg property
	<stdout>: Warning (unit_address_vs_reg): Node /configurations/conf@1 has a unit name, but no reg property
	......

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If48fa120294ff6061922de3c277654744cdebe02
2020-05-18 16:22:34 +08:00
Joseph Chen 4405dc8ff2 Revert "tools: fit_image: add -Wno-unit_address_vs_reg"
This reverts commit 75e20461a6.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If549e8a3129569b82c625b0afb0b453f4ad56f60
2020-05-18 16:22:31 +08:00
Joseph Chen 8c5bfb85bb rockchip: fit: verify resource depends on CONFIG_FIT_SIGNATURE
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4ab2b177aeae5ecdb843a8215ccab221c3045eae
2020-05-18 16:21:06 +08:00
Finley Xiao 15ede2a15c clk: rockchip: rk3036: Add support for vop
Change-Id: I0f057350a6ad07f61aaf42c84e50c452ee662f46
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-14 16:42:38 +08:00
Joseph Chen b6e67ca896 make.sh: merge all fit common args to a variable
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id485dd311c534260255cfb771b015d83ee401e80
2020-05-14 11:37:26 +08:00
Joseph Chen 6402f0407c scripts: fit: support repack rollback-index version
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3b183e6a7868a5a769d41179f62a5ec0a23b41f5
2020-05-14 11:37:26 +08:00
Jason Zhu 8d861ed2ec configs: rv1126: delete usedless config
It is needless to relocate the spl, so delete usedless config.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie05c705ef113a978de405048bcfc8283d510a0b6
2020-05-14 10:43:13 +08:00
Joseph Chen 66e508b96c rockchip: board: implement board_fit_image_post_process()
Don't override the kernel dtb which maybe processed with overlay,
hw-id dtb or other handling.

The fdt under root "/images" is only used for running fit generic
boot sequence.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ibc0ec1dfa1d53952d80fcc24acea5b4ddeac3431
2020-05-14 09:34:08 +08:00
Joseph Chen a1daefc8e6 rockchip: fit: refactor code
- update coding style;
- verify dtb or resource signature before use.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iff763d5ab9e9f3b5e4ef5cc59065cd1ad782fcf0
2020-05-14 09:25:40 +08:00
Joseph Chen 10d2eb488f Kconfig: remove depend option for CONFIG_FIT_IMAGE_POST_PROCESS
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I7019b8610587c02a2e4473432a66a35af5299b52
2020-05-14 08:46:35 +08:00
Joseph Chen d4229e7722 image: fit: export fit_image_check_hash()
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I41c5c853e9fdad0a9e64c823a68cc88fb68a7e55
2020-05-13 18:37:52 +08:00
Joseph Chen b3622f5b4f common: board_r: skip initr_nand() if kernel dtb is enabled
Nand will be initialized at init_kernel_dtb().

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I41ec1edfcb6328cbe02435143f212453e1638c80
2020-05-13 09:05:41 +08:00
Joseph Chen b53ffe05bf make.sh: fit: change "--new-spl" to "--spl-new"
use "--spl" as prefix in order to add more spl subcommands
in the future.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I6e90e0a4b38030bf64bb25f87b6eb6b03f0000fc
2020-05-13 09:05:24 +08:00
Joseph Chen 4175c72296 rockchip: board: move ramdisk to BL32 address if disabled
This fix sysmem alloc issue on the board with critical memory,
ie. 256MB.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8a01ef2fdf914e0c590b1d96e37aa61be39ad24d
2020-05-13 09:04:47 +08:00
Sandy Huang cf53642aa6 drm/rockchip: filter the edid modes accordinig to vop max output resolution
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id338a2b3bc659799c4fb391d36fa814c44e0274d
2020-05-13 09:04:23 +08:00
Sandy Huang af50552e4f drm/rockchip: vop: fix win2 csc register define error
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ice649d5319b488a8a0aea4d9545d462b33fec05c
2020-05-13 09:04:23 +08:00
Joseph Chen f3797579f0 scripts: fit: support repack boot itb image
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3e529dd9c274196a633a77829d554b2625a77264
2020-05-12 15:05:42 +08:00
Joseph Chen 43816dcece make.sh: fit: support "--boot_img" to sign image
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2717acc851e7a07cdadfebccd46996238846c32e
2020-05-12 15:05:32 +08:00
Joseph Chen ae994be4c1 scripts: fit: support "--boot_img" args to sign image
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0ce040df7b66089462d19a63e144f28ce9cc7fc1
2020-05-12 15:02:47 +08:00
Joseph Chen 436376efb7 scripts: fit: support unpack its from itb file
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0bec62cc6ba31b2c7e7293f32f751e4a639c7917
2020-05-12 15:02:47 +08:00
Joseph Chen 5facc6b84e scripts: fit: update variant name
Use upper case.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icd3a42c897c93ceaed593906bbda12bd9d2e663e
2020-05-12 15:02:47 +08:00
Joseph Chen ca6206136c scripts: fit: fixup "arch" property for arm64
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie45b89215bd5ae636e4753fc47bfb60a3829b40f
2020-05-12 15:02:47 +08:00
Joseph Chen 5a157e97d5 Merge branch 'thunder-boot' into next-dev 2020-05-12 10:37:37 +08:00
Shunqing Chen 23858492ef power: charge animation: fix the issue that did not auto turn off screen
1.set auto_wakeup_screen_invert to 1 and set auto_off_screen_interval to 0.
2.set auto_screen_off_timeout to 1.
2.press power key to turn on screen.
3.screen will not be turned off at this time.

Change-Id: Ifc92f23a38d8ba0da4f6e37625b4114edb42f6a8
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2020-05-11 16:33:49 +08:00
Jon Lin c9e94690ba mtd: mtd_blk: Optimize map table reinitialization
Change-Id: Ie27c8a215568755857cf67444637b1d89f55bd3a
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-05-11 11:34:22 +08:00
Jason Zhu 725378455f rockchip: dts: rv1126: add mmc-ecsd to emmc node
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Iddf35b82a9aed0e25a407a844949f932e2c26c17
2020-05-11 11:32:11 +08:00
Finley Xiao 2438a166f4 clk: rockchip: rv1126: Add support for gmac
Change-Id: I10ade6acbbfe5dd23e33a250ef601948606bc57e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-11 11:31:56 +08:00
Hans Yang 2d2c232ae5 configs: rk3036: enable CONFIG_RKSFC_NAND
Change-Id: I24fc4806a4a70bcceadcda7ca79c6e0151416b00
Signed-off-by: Hans Yang <yhx@rock-chips.com>
2020-05-08 17:02:49 +08:00
Joseph Chen b0c9708366 Merge branch 'next-dev' into thunder-boot 2020-05-08 15:52:44 +08:00
Joseph Chen 311b6440bf rockchip: kernel_arm.its: update descriptions
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I329a361dabf320be9be658ebd832e0c06ec5666f
2020-05-08 15:35:07 +08:00
Joseph Chen 98a624f3ed rockchip: remove kernel_arm64.its
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I03215ddcba76564529c08147b68b2acaf745bc0c
2020-05-08 15:35:07 +08:00
Jason Zhu 2056aa9f86 drivers: mmc: pass the mmc ext_csd to kernel
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I95dbd0da5d8750e5b19f00a54596ca484f72ecb2
2020-05-06 22:12:30 +08:00
Joseph Chen ab6f8011c4 Merge branch 'next-dev' into thunder-boot 2020-05-06 18:29:50 +08:00
Jason Zhu e68ead627b disk: part: auto append android a/b slot suffix when query partition
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I13d6e46f362c0f2d50824fd6bc858521d2d35433
2020-05-06 12:02:32 +08:00
Jason Zhu 1e33e3cb7c common: spl: ab: update new function to support ab system
Add spl_ab_append_part_slot()
Delete spl_get_partitions_sector()

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I116d6d708604762203974dc66a39be1a0e7b6bbe
2020-05-06 11:59:29 +08:00