Commit Graph

50526 Commits

Author SHA1 Message Date
Joseph Chen 38b87fbc94 rv1126: configs: remove CONFIG_SUPPORT_USBPLUG wrap
Wrapping makes no sense.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I107fcb8a73438e10392511c43e17d03119b55fc0
2020-06-08 16:47:00 +08:00
Jon Lin 9ee38883a7 mtd: mtd_blk: Support mtd_map_write
Change-Id: Ifbd05736a48aa89a2e808ae4d4385bf59458d010
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-08 16:37:14 +08:00
Joseph Chen 85f134f569 spl: mmc: add partition name to load image
Thus, the a/b system can be supported.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8bceb3d56f50e5bb10de3ec7d4f7768aa7d61fe1
2020-06-08 16:23:31 +08:00
Joseph Chen 54ac22e074 spl: mtd blk: clean rkfw code
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9afc158744895ac73ad54251ed68b1f959c8e9e6
2020-06-08 16:23:21 +08:00
Joseph Chen 34f805b88f spl: nand: clean rkfw code
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icc07b4d18f4de3faf5b9e92da117a90b3c48ea4e
2020-06-08 16:23:21 +08:00
Joseph Chen 5458123932 spl: mmc: clean rkfw from mmc_load_image_raw_sector()
Don't mix rkfw in the mmc_load_image_raw_sector(), it's
not flexsible to add more feature for rkfw.

Pass blk desc to load.dev that the same as spl_mtd_blk.c

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I87ff776362a667ea0e558749016ae3ba7049e053
2020-06-08 16:23:21 +08:00
Joseph Chen 8a5f71e473 spl: rkfw: get partition sector independ on outside
- clean and simplify the code.
- support a/b system and spl boot kernel.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1adb2c1853e51a01e80d7453715ba2aabe0fc973
2020-06-08 16:23:21 +08:00
Jon Lin 759f94f55d dts: rv1126: Add label to SFC subdev SPI Nor
Change-Id: Ie23d7f0ce74a664ec2642e5ff86787b0a0217cb9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-08 15:58:56 +08:00
Jon Lin 572e331b94 dts: rk3308: Add label to SFC subdev SPI Nor
Change-Id: Ibe05af4b4d764db9a0589e847c38f2b3c8ae1617
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-08 15:58:56 +08:00
Jon Lin 951aa503aa mtd: spi nor: Support parse dts node label property
Change-Id: Ib27976970e12f4e97fab2b3c84f6580a09f2c9c1
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-08 15:58:53 +08:00
Jon Lin 31e5d7a303 spi: rockchip_sfc: Make SPI host spi-max-frequency not configurable
Change-Id: I6184134ee423a8ffbead9cac739c6f0b5db91f6c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-08 15:32:21 +08:00
Jon Lin be6c00c075 mtd: nand: Mark bbt start with spare offset 0 and ECC enabled
Change-Id: Ib388c6475003917da302f0535c18ac5fc51fb3e2
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-08 11:17:00 +08:00
YouMin Chen c2d71f78b8 rockchip: rv1126: enable TPL and select TPL_TINY_FRAMEWORK
Change-Id: I98b92a45f37653b93039ed63d955b12c8c5c94b0
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-08 10:30:05 +08:00
YouMin Chen 974a33f475 rockchip: rv1126: add tpl build support
Change-Id: I38badd98916d1ca03a1f0de6b293108063fe9bb6
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-05 19:01:11 +08:00
YouMin Chen f520bb22d7 drivers: ram: rockchip: add rv1126 sdram init code
Change-Id: I0c7ce7f274c396d077a4ae2fe29e382a8e295274
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-05 16:04:28 +08:00
YouMin Chen 78efceb66a rockchip: ram: add dram_spec_timing.h
Change-Id: I4691d46584b78ed47390ea39a90e449e4c9d0bed
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-05 15:11:35 +08:00
YouMin Chen 9994e22090 arm: rockchip: add CONFIG_ROCKCHIP_UART_MUX_SEL config
CONFIG_ROCKCHIP_UART_MUX_SEL is used for selecting uart multiplexer
in board_debug_uart_init.

Change-Id: I75fb8eab76e4db8cd171d8d6c4462abe52ed168e
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-05 15:11:34 +08:00
YouMin Chen 9ae0e26c7f rockchip: rv1126: configure UART iomux in board_debug_uart_init
Change-Id: I8820d87938209a83d493d16a0244874c75763c34
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-05 15:11:34 +08:00
YouMin Chen 8ab3f2621b rockchip: rv1126: not need syscon_rv1126.c when build TPL_TINY_FRAMEWORK
Change-Id: I5396b568129e2decfe64ad6c589f134034ffd4c4
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-05 15:11:34 +08:00
YouMin Chen 9b31f80a47 driver: ram: rockchip: add sdram_head_info_v2
Change-Id: I5715dbfb296fbc684cbd0f22270d3d3bc922bab1
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-05 15:11:34 +08:00
YouMin Chen 9442a4b3bb driver: ram: rockchip: update the driver of sdram_pctl_px30
Change-Id: I586065b41a22bbee266fa234e6513ef1dac5b37b
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-05 15:11:34 +08:00
YouMin Chen 0e03287145 rockchip: rv1126: add the struct of rv1126_pmugrf
Change-Id: Idb6610023e52e3aa640b665f5a08ff142a660c6c
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-06-05 15:11:34 +08:00
Joseph Chen 99ca0554fa common: image-fdt: ignore sysmem alloc for reseved memory at zero address
Kernel will alloc reserved memory dynamically for the node.

This patch avoids the sysmem warning dump.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9b3a397c022450c152d479a60877551ee803ef91
2020-06-05 14:36:13 +08:00
Simon Xue 3cafcfcd6f misc: rockchip_decompress: fix param size
Change-Id: Ia193a6035faff4bab66262cab2e97a3c6b94e45a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-06-05 11:30:07 +08:00
Shunqing Chen 913fb045d4 fuel gauge: rk817/rk809: fix the issue of dsoc cannot reach 100
Change-Id: I8b5c995509df71f23fdf73381ac0e55de727b5c2
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2020-06-05 10:54:52 +08:00
Wyon Bi cea9b5499b video/drm: dsi: Fix device name for rk3288 dsi1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Idcd5fb9331a9f038137197d4a53a07dd7c133f3b
2020-06-05 10:46:49 +08:00
Andy Yan 66338042e0 configs: rv1126: Enable rgb/mcu display
Enable VOP and RGB interface on rv1126.

Change-Id: I44b61d6fc5338c8a78a0178af339cadb2227b297
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-06-05 10:40:04 +08:00
Andy Yan c33e1feac9 drm/rockchip: vop: Enable gate bit
Vop WIN with multi-region support(win2 of rv1126)
should enable the bit.

Change-Id: I3e2c4165e0d2c597ab839829f9cbed6a1e37c59a
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-06-05 10:38:15 +08:00
Andy Yan 406bb09a23 drm/rockchip: rgb: Add support for rv1126
Add support for RGB/MCU interface on rv1126.

Change-Id: I9b085f80e36fdadf6dcb46c3be034b65e645ddd4
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-06-05 10:38:15 +08:00
Andy Yan a144d23d24 drm/rockchip: vop: Add support for rv1126
Change-Id: I762158891605c1a87fd7d3a7c685052ab9125b31
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-06-05 10:38:15 +08:00
Andy Yan 081dec1b2b drm/rockchip: Fix compile error when I2C_EDID disabled
Change-Id: Ibb549312d9ee2468765e61ccf5c77742bd9f5d5d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-06-05 10:38:15 +08:00
Jon Lin 6193938767 mtd: spinand: Assign initial value 0 for bad block marker
This "= { }" smart initial methord is unreliable.

Change-Id: I64860e8d056f44e99461a4fb68bc9b91c7f95732
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-05 10:18:17 +08:00
Simon Xue 327380da2b misc: rockchip_decompress: add limit decompressed buffer size
In order to prevent physical memory from being written oversize,
limit the decompressed buffer size, user can assign a size to
decompress, the reserved destination buffer size is a choice

Change-Id: I8723c5ec8d58ec1d443c5607987941cf67cf1a01
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-06-05 09:14:02 +08:00
Jason Zhu a6f23aea12 common: spl: define maximum decompressible size to prevent memory overrun
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib0be02bc85cb16ccdd832abf9a56260b2f2e500d
2020-06-05 09:14:02 +08:00
Jon Lin 6c62cd54f5 configs: rv1126: increase the space of heap for SPL SPI Nand bbt
Change-Id: If32f76b24c0deb4440ed47441f5627672c08fc27
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 09:08:45 +08:00
Jon Lin fd817f1d8b mtd: nand: fix error in BBT bit operation
Change-Id: I51aab1342d8ded7ac6c19612d27abb8799b85850
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 09:08:45 +08:00
Jon Lin 29f0ea3bb6 mtd: nand: spi: select MTD_NAND_BBT_USING_FLASH
Change-Id: I41a287ab79886982a5f12815afce0641fa641b45
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 09:08:45 +08:00
Jon Lin 53bfae0392 mtd: nand: add BBT using flash management strategy
Change-Id: Ib71dfbcf68283d1118742ab29079cab395ff99ca
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 09:08:45 +08:00
Jon Lin b8af31a74b mtd: nand: spi: enable using BBT in flash
Change-Id: I4f793a10ae3f329c6be412785a01d0f117cd9b0b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 09:08:45 +08:00
Jon Lin d55257eea0 mtd: nand: Support using BBT in flash
Change-Id: I67c8859a711156d1264f783ec2749139999228f3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-04 09:08:45 +08:00
Jason Zhu 747423edb6 rockchip: spl: bring up to kernel when CONFIG_ROCKCHIP_BOOT_MODE_REG is 0
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I3f576fa0527a42ebede6ec252586cf681974fa97
2020-06-03 20:04:17 +08:00
Joseph Chen 371e5b63ad rv1126: common.h: set fit as 1st boot image type
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id36149c79eb0b08fbcb92bd2d55bb808a42bf9dd
2020-06-03 14:29:02 +08:00
Joseph Chen 25047d3f40 rockchip: board: update cli message format
"Cmd interface" is easy to understand.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0c74ad595f6c24abaf1b98bf7a09dc5060a4755d
2020-06-03 14:29:02 +08:00
Jon Lin 360a291130 mtd: mtd_blk: Logical offset should not mix with map address
1.Logical offset should not mix with map address
2.Format with nand_read_skip_bad

Change-Id: I0e5adec374ce4de437e4ce7368caec4c7c07e83b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-03 11:14:37 +08:00
Simon Glass 301f8dd17d UPSTREAM: mtd: Rename free() to rfree()
This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().

Change-Id: I2718843dd4646b7450c36e84cc16e6440c718959
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 8d38a8459b0de45f5ff41f3e11c278a5cf395fd0)
2020-06-03 10:48:53 +08:00
William Zhang b16d7c2247 UPSTREAM: drivers: nand: brcmnand: fix nand_chip ecc layout structure
The current brcmnand driver is based on 4.18 linux kernel which uses
mtd_set_ooblayout to set ecc layout. But nand base code in u-boot is from
old kernel which does not use this new API and expect nand_chip.ecc.layout
structure to be set. This cause nand_scan_tail function running into a bug
check if the device has a different oob size than the default ones.

This patch ports the brcmstb_choose_ecc_layout function from kernel 4.6.7
that supports the ecc layout struture and replaces the mtd_set_ooblayout
method

Change-Id: I31aec45275decfb03af2829c744c3dda0e261d12
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit e365de90517ba4686d7a88417b1a729f5891d376)
2020-06-03 10:48:53 +08:00
Joseph Chen 5cc4c624ec dm: uclass: move new uclass id to the end
This patch handles the issue in SPL:

	U-Boot SPL board initspl_early_init()
	   - found match at 'rv1126_syscon'
	   - found match at 'rv1126_syscon'
	   - found match at 'syscon'
	   - found match at 'rockchip_rv1126_pmucru'
	   - found match at 'rockchip_rv1126_cru'
	   - found match at 'ns16550_serial'
	   - found match at 'rockchip_rk3288_dw_mshc'
	   - found match at 'rk_nandc_v6'
	   - found match at 'rockchip_sfc'
	   - found match at 'spi_nand'
	   - found match at 'spi_flash_std'
	   - found match at 'rockchip_crypto_v2'
	   - found match at 'rockchip_secure_otp_v2'
	Cannot find uclass for id 36: please add the UCLASS_DRIVER() declaration for this UCLASS_... id
	Missing uclass for driver rockchip_secure_otp_v2
	secure_otp@0xff5d0000: ret=-96
	dm_scan_fdt() failed: -96
	dm_extended_scan_dt() failed: -96
	dm_init_and_scan() returned error -96
	spl_early_init() failed: -96
	......

The root cause is drivers/misc/rockchip-secure-otp-v2.S is pre-compile
but not compile every time, it occupies the UCLASS_MISC id as 36.

There are the same situation for other otp drivers, so let's move it to
the end.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I58a2bec703c2af743d209192fefda6ff6167b01c
2020-06-03 10:24:44 +08:00
Joseph Chen e3d9a19ada Revert "misc: otp: re-compile the code due to the UCLASS_MISC is changed"
This reverts commit 551ae2b922.

Change-Id: Ic2723614182b8c4cf2a5433f97ce17bceac4f8dc
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2020-06-03 10:24:41 +08:00
Jason Zhu 551ae2b922 misc: otp: re-compile the code due to the UCLASS_MISC is changed
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Icec8cf342f8cb5f0cf5bdae5644c2814a76c5860
2020-06-03 10:11:36 +08:00
Jon Lin bfb4edbc07 mtd: spinand: Propagate ECC information to the MTD structure
This is done by default in the raw NAND core (nand_base.c) but was
missing in the SPI-NAND core. Without these two lines the ecc_strength
and ecc_step_size values are not exported to the user through sysfs.

Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Richard Weinberger <richard@nod.at>

Change-Id: I37f29616e1522d9ce9e9d7ec18a473c73e1d1551
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-06-03 10:08:02 +08:00