Commit Graph

13410 Commits

Author SHA1 Message Date
Jon Lin 7196e3306a rockchip: rk3036: enable NANDC
Change-Id: I9ad4dd1497656f41b42907892c17a2bd85eace0c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-03-02 11:56:08 +08:00
Jon Lin eb45fc5ab7 rockchip: rk3036: add NANDC node
Change-Id: I04c33d238fabeffcf470da71624009313050b904
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-03-02 11:55:37 +08:00
Joseph Chen 57be1825cb rockchip: clean kernel dtb code to kernel_dtb.c
Since there is a lot of code for kernel dtb feature, let's
move them into a individual file to make board.c clean.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4e01627c265807b1c0e26b432f0b4fc1db0d889e
2020-02-28 12:38:42 +08:00
Joseph Chen bc4ccd5396 rockchip: clean rockchip_read_dtb_file() api to boot_rkimg.c
rockchip_read_dtb_file() is top level api which reads dtb from
resource/fit/uImage/distro image, etc.

only leave code about resource image in resource_img.c.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2157ffc204ebd564aa9171de2b8167fbd6c94bcf
2020-02-28 12:38:42 +08:00
Joseph Chen c01d448924 sysmem: simplify the memblk name
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Icfe908ade21d1d8f568db796298f67ba9f013da6
2020-02-28 11:22:04 +08:00
Jean-Jacques Hiblot 94fbbf0f6d UPSTREAM: dm: Add a No-op uclass
This uclass is intended for devices that do not need any features from the
uclass, including binding children.
This will typically be used by devices that are used to bind child devices
but do not use dm_scan_fdt_dev() to do it. That is for example the case of
several USB wrappers that have 2 child devices (1 for device and 1 for
host) but bind only one at a any given time.

Change-Id: Iad9ba5f368bd2de9940cf069baf9bec9d668920c
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 07e33711fec4f1106f36805b5dc830da07c783c5)
2020-02-27 17:51:21 +08:00
Joseph Chen c6f0e81965 rockchip: board: add env fixup
It was called from set_env_default() which only handles
nowhere env, let's move it to board late to handle all
env types.

Fix fdt address earlier before init kernel dtb.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1e60355eef7897b7e92c7652c60a3c72350e46b0
2020-02-25 14:18:15 +08:00
Jason Zhu 3a07c42d83 rockchip: dts: rk1808: support eMMC hs200
Change-Id: I759d5c711887966e732216719c557da804105c15
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 18:21:03 +08:00
Jason Zhu 36e8ecdb69 rockchip: rk1808: set dram area unsecure in spl
So that the mmc controller can read data to dram since the mmc
controller is unsecure.

Change-Id: Iaf8f5cebeacbc034eb129c6b52a702abdbd7fed3
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 17:27:50 +08:00
Jason Zhu ddd4dd8141 rockchip: dts: rk1808: change necessary nodes's u-boot attribute
Change necessary nodes's "u-boot,dm-pre-reloc" to "u-boot,dm-spl",
so that we generate dtb with the nodes which include "u-boot,dm-spl".

The reducing dtb size fuction is supported by the commit:
1. dts: Makefile: simplify the logic of kernel dtb feature
2. dts: Makefile: support provide a minimum SPL DTB

Change-Id: Ibe43a20b435315349bdc1c45a14cf91cd90ecd89
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 16:35:36 +08:00
Jason Zhu 8956822660 arch: rockchip: support resource file in spl
Change-Id: I00a1d9731554cf401b0a82e6d4f07440af1f554d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 14:03:43 +08:00
Jason Zhu fec9980f93 rockchip: dts: rk1808: add u-boot,spl-boot-order
Change-Id: I783c14843d7aa28bb65100ca0a2903b40c88e9d0
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 14:03:43 +08:00
Jason Zhu 28e9e98a51 clk: rockchip: rk1808: set gpll to 594000000
The eMMC clk is depended on gpll, and the eMMC is needed to run 150MHz
in HS200 mode. So set gpll to 594000000.

Change-Id: Id356c87b1db158a0638e4560e886868f133dfaf9
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 14:03:43 +08:00
Jason Zhu a4933f72a5 rockchip: rk1808: support mmc_gpio_init_direct()
Change-Id: Ib6f5818f3a38c88a38b9a4a9bba0aedd49f0247e
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2020-02-24 14:03:43 +08:00
Joseph Chen 2aca71f9d9 rockchip: board: add mmc_dm_reinit() for mmc devices
There maybe something for the mmc devices to do after kernel dtb
dm setup, eg: regain the clock device binding from kernel dtb.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie52edd6a0b4e7f7d54bf5b00d7e97de1f1346230
2020-02-24 11:23:34 +08:00
Joseph Chen a794014552 rockchip: board: rename early_download_init to early_download
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia20430765fe55309650237dc2085d59d9ec41411
2020-02-21 16:55:56 +08:00
Joseph Chen 46f6140176 rockchip: board: move hotkey getc earlier
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5bdf84563f2aae957c707cb12633c4840e58afc0
2020-02-21 16:55:56 +08:00
Joseph Chen b173f38e43 rockchip: hotkey: add fdt dump
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I9bb158f13b723decae01069f4324289c599e0e5f
2020-02-21 16:48:48 +08:00
Joseph Chen 9beff1069b rockchip: hotkey: disable interactive events
Allow other debug message hotkey.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If5c82922e1ce66283a00f7e675451b6104a503bc
2020-02-21 16:48:36 +08:00
Joseph Chen aa1eec08bb rockchip: make boot_rkimg.c as basic mandory code
boot_rkimg.c is the basic code for rockchip platforms, such as
get boot devtype, setup download mode and get kernel dtb, etc.

CONFIG_RKIMG_BOOTLOADER actually makes no sense for rockchip
features any more, but we still leave it to compatile code
compilation since there is a lot of code depends on it. but it
maybe dropped in the future.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iab922cbf3a70e7eb1444678d6e902b9d8e106dd1
2020-02-19 13:21:10 +08:00
Joseph Chen 64c9242ba7 sysmem: add FIT image memory block
The same feature with AVB memory block.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I1aff5ef703d16852b4bc0a0887b037476464034c
2020-01-16 11:14:13 +08:00
Jon Lin 0afd346fb3 rockchip: spl-boot-order: compatible with BOOT_DEVICE_SPI case
Change-Id: Ia3a5506665ea98aa900f253fb703d825c1cf4929
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-01-13 10:41:40 +08:00
Joseph Chen 6d8afb5495 rockchip: remove rockchip crc file
These code have been moved into bootrkp.c.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I12c87b9f7dd7e8ce0c866105e4f5cecd0e6bcf21
2020-01-09 14:31:59 +08:00
Joseph Chen d04ada6cfd rockchip: clean boot_mode.c and boot_rkimg.c
Clean the code into where it belongs to.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ia034b8c3d8b264796db72c7bf44bab95811ecb77
2020-01-09 14:27:25 +08:00
Joseph Chen 6f3562b04c rockchip: resource: remove rockchip_get_resource_file_offset()
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I5c468d69640f223a78dcff1b11981a0d36f3ad8a
2020-01-08 18:04:09 +08:00
Jon Lin cddfd2aeae dts: rk3308: change to add spi_flash to spl-boot-order list
"spi_nand" should in front of "spi_nor"

Change-Id: If57bee64de0cd44cefaa736325bb542ccb9ce83a
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-01-08 17:53:15 +08:00
Jon Lin c9b995fdcc rockchip: spl-boot-order: adjust SPI flash dectecting strategy
Directly detect spi_flash node

Change-Id: Iafb691b28365b624cc2c4b15686cab3efc6da1d5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-01-08 17:53:15 +08:00
Kever Yang fccb2c59ff rockchip: rk3308: add alias for emmc/sdmmc
Add alias for mmc/sdmmc so that we can have a fix mmc number for emmc.

Change-Id: Ic282942ac994dbe015ddd70e5e5b0e34a7b9bd24
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-08 17:51:24 +08:00
Finley Xiao 1bbed24709 clk: rockchip: rk3308: Add support to set and get clk_rtc32k clock
Change-Id: Iea481af0c99a2b2ca9d6eff050e96e80845c8478
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-01-08 17:50:42 +08:00
Patrick Delaunay db704406b3 UPSTREAM: stm32mp1: add stusb1600 support for DK1 and DK2 board
The DK1 and DK2 boards use the USB Type-C controller STUSB1600.
This patch updates:
- the device tree to add the I2C node in the DT
- the board stm32mp1 to probe this I2C device and use this controller
  to check cable detection.
- the DWC2 driver to support a new dt property
  "u-boot,force-b-session-valid" which forces B session and
  device mode; it is a workaround because the VBUS sensing and
  ID detection isn't available with stusb1600.

Conflicts:
	arch/arm/dts/stm32mp157-pinctrl.dtsi
	arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
	arch/arm/dts/stm32mp157a-dk1.dts
	board/st/stm32mp1/stm32mp1.c

Change-Id: I73b62dce9c3e0661e6d2463b87389229cd3559a7
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
(cherry picked from commit 6fe7dd3327d552bacf4266d7f1ed074bf98ffb92)
2020-01-07 17:24:57 +08:00
Andrew F. Davis 09b32b41f2 UPSTREAM: spl: Kconfig: Drop the _SUPPORT postfix from SPL_DFU
The symbol CONFIG_SPL_DFU_SUPPORT in SPL build has the same
meaning as CONFIG_DFU in regular U-Boot. Drop the _SUPPORT
to allow for cleaner use in code.

Conflicts:
	arch/arm/mach-zynqmp/spl.c
	common/Makefile
	common/spl/Kconfig
	common/spl/spl_ram.c

Change-Id: I93f09d5953284d511df135e6e71c03c0552719a2
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
(cherry picked from commit 6536ca4d6676bf38e50784298e713edc30b9cde9)
2020-01-07 17:24:56 +08:00
Jean-Jacques Hiblot eccca8a35d UPSTREAM: Kconfig: rename CONFIG_SPL_USB_GADGET as CONFIG_SPL_USB_GADGET
The SPL option for USB gadget should be named after the option for u-boot
(CONFIG_USB_GADGET)

Conflicts:
	arch/arm/mach-imx/mx6/Kconfig
	arch/arm/mach-imx/spl.c
	configs/am335x_boneblack_vboot_defconfig
	configs/am335x_evm_usbspl_defconfig
	configs/am43xx_evm_defconfig
	configs/am43xx_hs_evm_defconfig
	configs/imx6q_logic_defconfig
	configs/mx6memcal_defconfig
	configs/mx6sabresd_defconfig
	configs/pico-hobbit-imx6ul_defconfig
	configs/pico-hobbit-imx7d_defconfig
	configs/pico-imx6ul_defconfig
	configs/pico-imx7d_defconfig
	configs/pico-pi-imx6ul_defconfig
	configs/pico-pi-imx7d_defconfig
	drivers/Makefile

Change-Id: I51305422f13cb7d743274f82c531000c0f93c144
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit f811e9763f4b6f6f5e3fe9c2fa30d2b6c62d289e)
2020-01-07 17:24:55 +08:00
Jean-Jacques Hiblot 717f5765d9 UPSTREAM: usb: introduce a separate config option for DM USB device
Using CONFIG_DM_USB for this purpose prevents using DM_USB for host and not
for device.

Conflicts:
	arch/arm/Kconfig

Change-Id: I075c887a77e2243463a580eac59d842b620af2f5
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 687ab54560809e01a10652ef82dbac6ae72deb91)
2020-01-07 17:24:53 +08:00
Neil Armstrong 0afa4b6c53 UPSTREAM: clk: add sandbox test for bulk API
This patch adds the bulk clock API tests for the sandbox test suite.

It's very similar to the main test but only uses the _bulk() API and
checks if the clocks are correctly enabled/disabled.

Change-Id: Ibfd7ea033e9a1c2ca76d88be8ca562a660f30448
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 65388d0dc5a36fc86718ffcdf08ac5671ae27b5d)
2020-01-07 17:24:50 +08:00
Neil Armstrong f7a4178d8b UPSTREAM: reset: add sandbox test for bulk API
This patch adds the bulk reset API tests for the sandbox test suite.

Unlike the main test, it also check the "other" reset signal using the bulk API
and checks if the resets are correctly asserted/deasserted.

To allow the bulk API to work, and avoid changing the DT, the number of resets
of the sandbox reset controller has been bumped to 101 for the "other" reset
line to be valid.

Change-Id: Iac62a1c6ee5637695f7d0dd77b35f047eca641a9
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 91f5f8b73ccba5bf591912fe6e8c500a7d51eb93)
2020-01-07 17:24:50 +08:00
Wenbin song 739cab1759 UPSTREAM: armv8: ls1043a/ls2080a: check SoC by device ID
Check LS1043A/LS2080a by device ID without using personality ID to
determine revision number. This check applies to all various
personalities of the same SoC family.

Change-Id: I7be6b46fc17aa7f7a3a40677de0c18c9dd095c52
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit a8f33034f2ed029dd04aae4cfdf11bf1f13a03a2)
2020-01-07 17:24:46 +08:00
Maxime Ripard 0f3e8dc9d2 UPSTREAM: musb: sunxi: switch to the device model
The device model was implemented so far using a hook that needed to be
called from the board support, without DT support and only for the host.

Switch to probing both in peripheral and host mode through the DT.

Change-Id: Ieec474f3236f6c7e43e94735f1d544d36708bda0
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 3a61b080acee941a1b14b709b58ff9cde0b367bc)
2020-01-07 17:24:45 +08:00
Maxime Ripard 473221da5a UPSTREAM: usb: gadget: Make g_dnl USB settings common
The g_dnl USB settings for the vendor ID, product ID and manufacturer are
actually common settings that can and should be shared by all the gadgets.

Make them common by renaming them, and convert all the users.

Conflicts:
	configs/cgtqmx6eval_defconfig
	configs/dms-ba16-1g_defconfig
	configs/evb-rk3036_defconfig
	configs/evb-rk3229_defconfig
	configs/evb-rv1108_defconfig
	configs/fennec-rk3288_defconfig
	configs/stih410-b2260_defconfig

Change-Id: Ib855d37af9f539ef794a2519c75c027e67bd091c
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit a95aee6af70d8815547b81329125f2800c8ee37c)
2020-01-07 17:24:45 +08:00
Fabio Estevam f9cd3a6470 UPSTREAM: toradex: imx6: Move g_dnl_bind_fixup() into common SPL code
Instead of having every board file to add its own g_dnl_bind_fixup()
implementation, move it to the common imx6 SPL code.

Change-Id: Id8ee1026cbd8cde4b0711829373f99ba58a6363b
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 511db3bf5a27a2f7eca0f60b6adb1eff74bd6df6)
2020-01-07 17:24:44 +08:00
Joseph Chen f4c9b02d9e rockchip: dts: add rk1806-evb.dts
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic0ef2210f190bb8e229c1d97eb3b78447335e56c
2019-12-30 10:24:03 +08:00
Joseph Chen 5d5f363eb9 rockchip: board: init debug uart if not use pre-loader serial
Pre-loader serial has higher priority.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Idd736b78454f7bc662abe61d25bbfa3a3e4c0d90
2019-12-20 13:09:06 +08:00
Jason Zhu 260e24d205 rockchip: dts: rk3326: support eMMC hs200
Change-Id: Ib0cf27fe1a1fc3bc53d3440ead2631b53fc9f8b2
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-12-20 12:32:14 +08:00
Jon Lin 164b2567a2 rockchip: rk3036: enable SFC
Change-Id: I7eab386c35495377249532b389f9819c9e5c8a79
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-12-20 10:06:47 +08:00
Jon Lin 52a8a1a43a rockchip: rk3036: add SFC node
Change-Id: If91914f86786014f0407fb1d0280545e00368faa
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-12-20 10:03:29 +08:00
Joseph Chen 0453d738ec rockchip: param: support parse 4GB+ memory size
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ifac53c5fd97e0708b0eeef8d455cdcb5c0dc8d4d
2019-12-16 21:01:55 +08:00
Joseph Chen 470c509241 board_f/arm: fixup 4GB+ memory size
- fixup gd->bd->bi_dram[] before update "/memory" node
- append 4GB+ memory size when announce dram

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8908426c54d251e5cfa9216b0dc5470145e37cb5
2019-12-16 21:01:55 +08:00
Joseph Chen 9f8dc1751f rockchip: board: fixup gpio phandle for key nodes from U-Boot dtb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4a6af5334bf512d3713b9f32db903f85c818bfe7
2019-12-13 15:42:00 +08:00
Joseph Chen 6ba52d9f28 rockchip: update grf_px30.h according to latest TRM
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie02f26d60cc75c82cf9098a15d3b913a890d3f7b
2019-12-10 15:33:38 +08:00
Joseph Chen 07f987d8d4 rockchip: resource: support parse logo_kernel.bmp from logo partition
"logo" partition layout, not change order:

|----------------------| 0x00
| raw logo.bmp         |
|----------------------| N*512-byte aligned
| raw logo_kernel.bmp  |
|----------------------|

N: the sector count of logo.bmp

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2deba013d3963c99664c5bfd69693835a46ba48f
2019-12-10 12:47:52 +08:00
Lin Jinhan 1be69feab0 rockchip: dts: rk3368: add and enable crypto node
Change-Id: Icfffb1311388ff7de59b9c9da7d5f25c7eb35684
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-12-10 11:32:12 +08:00