Commit Graph

48150 Commits

Author SHA1 Message Date
Masahiro Yamada 9862beb6eb UPSTREAM: tools: include necessary headers explicitly
Several host-tools use "bool" type without including <stdbool.h>.
This relies on the crappy header inclusion chain.

tools/Makefile has the following line:

  HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \

All host-tools are forced to include libfdt_env.h even if they are
totally unrelated to FDT.  Then, <stdbool.h> is indirectly included
as follows:

     include/libfdt_env.h
  -> include/linux/types.h
  -> <stdbool.h>

I am fixing this horrible crap.  In advance, I need to add necessary
include directives explicitly.  tools/fdtgrep.c needs more; <fctl.h>
for open() and <errno.h> for errno.

Change-Id: Ic2b0e0d4c417841f7eeb152e486d63fdfd1a4eff
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-24 17:20:37 +08:00
Masahiro Yamada fbedfcfba2 UPSTREAM: libfdt: migrate include/libfdt_env.h to a wrapper
libfdt_env.h is supposed to provide system-dependent defines.

scripts/dtc/libfdt/libfdt_env.h from upstream DTC is suitable
for user-space, so we should use this for USE_HOSTCC case.

For compiling U-Boot, we need to override such system-dependent
defines, so use <linux/libfdt_env.h> imported from Linux.

<libfdt.h> selects a proper one.  Maybe, we should split header
inclusion completely, but I do not want too many patches at one.

I can rip off the include/libfdt_env.h from HOST_EXTRACFLAGS.

Change-Id: I6f5ea1067cd3ada1c8ece0c39b7bf43382c58ff6
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-24 17:20:37 +08:00
Masahiro Yamada c78841b69b UPSTREAM: libfdt: move FDT_RAMDISK_OVERHEAD to image-fdt.c
This macro is locally referenced in common/image-fdt.c

Change-Id: Iaf308d919d666be2615ef8f894099c538366e89d
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-24 17:20:37 +08:00
Masahiro Yamada f976fdd5c9 UPSTREAM: libfdt: move working_fdt and FDT_RAMDISK_OVERHEAD to include/libfdt.h
libfdt_env.h exists to contain system-dependent defines:

  - typedef of fdt*_t
  - fdt*_to_cpu(), cpu_to_fdt*

working_fdt and FDT_RAMDISK_OVERHEAD are unrelated to the environment,
so they must get out of this header.

Change-Id: Ib37fbe1ef1926d9a1696f541fd356b493d5d4db7
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-24 17:20:37 +08:00
Kever Yang 260eab1873 rockchip: video: use common API instead of private
We can use fdtdec_get_is_enabled() instead of fdt_device_is_available().

Change-Id: I7aa03ed82f83fc72206659889a4f7f095dc66b36
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-24 17:20:37 +08:00
Jianqun Xu 1f4079200d configs: rk3399pro: support io-domain driver
Change-Id: I332a9be7e45746089e869bec2f8d3846a296cc84
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-12-24 16:44:06 +08:00
Jianqun Xu dae202865e rockchip: board: add io-domain init
Change-Id: I073cb6567e8becfdb1be09c7faef3c06b308dc6f
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-12-24 16:44:06 +08:00
Jianqun Xu 4f43646e36 power: rockchip: add io-domain driver
The io-domains on Rockchip SoCs will be supplied with 1.8V or 3.3V(3.0V)
depends on hardware design. The driver needs to config them through grf
register.

Change-Id: Ic896b94bfadd0b808da54992e58e2cf4a8fee950
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-12-24 16:44:06 +08:00
David Wu 32c25d1fa3 pinctrl: rockchip: Add slew rate support for px30
The usage of slew rate is needed to config it at DTS,
such as:
  fast speed: slew-rate = <1>;
  slew speed: slew-rate = <0>;

Change-Id: I60ea4ddd37ca70adf1dbd504ba1c3c348e41348b
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-12-24 11:47:18 +08:00
Joseph Chen a1e5c945ad rockchip: dts: rk3368: enable nandc
fix model string typo.

Change-Id: I1e96a986a381c86999839efd486fb371ca8ed82c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-21 15:16:54 +08:00
Elaine Zhang 4585497ae7 thermal: rockchip: get "rockchip,hw-tshut-polarity" form dts node
setting tshut-polarity base on the dts node parameter.

Change-Id: Ie85ffd5e15676984d77d280f589c3748d74419a2
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-20 11:55:57 +08:00
Elaine Zhang e54cf6dba7 power: regulator: add fan53555 regulator
add driver support for fan53555\syr82x\tcs452x dcdc.

Change-Id: Ib6132d7063ba8bda9631b45e128df1d278222dad
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-20 10:20:53 +08:00
Joseph Chen cfb11cfb14 configs: rk3308-aarch32: enable lzo/lz4
remove some unused modules to reduce size.

Change-Id: I7706e501b7496e596bb4a766cb55736ee2c2e233
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 19:15:09 +08:00
Joseph Chen 5c773029df configs: add rk3308 aarch64 defconfig
This defconfig enables kernel dtb.

Change-Id: I55fe3922de0e0888f148a4c21865649076f27603
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 18:46:08 +08:00
Joseph Chen d24a078f3f core: device_bind_common: don't bind UCLASS_SPI_FLASH again
Change-Id: Ie4cfe40398fc1e483b558832663bc50683510ac0
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 18:46:07 +08:00
Joseph Chen 8bea6fa8fe common: rkimg: add dev_desc validation check
If we use a NULL dev_desc, it causes data abort.

Change-Id: Iaf315f7f0ca4a8c33d4d4b809fffea35fc5dcc51
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 18:46:07 +08:00
Joseph Chen afd559b8e3 rkflash: spinor/spinand use different blk name
- The same blk name take a lot confuse for debugging;
- When kernel dtb is enabled and setup dm tree, dm framework can't allow
  devices with same name, only one is left in dm tree list.

Change-Id: Ieed15ffbed28f381e90c18cf0c5f3d257d72eab2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 17:08:21 +08:00
Joseph Chen 8d1dd0c451 rockchip: atags: add serial id print
Change-Id: I8b41ba9e1b02b300c385b2036e7af78ac544cfe1
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 17:08:21 +08:00
Joseph Chen 147c40830c dm: ramdisk: remove unused function
blk uclass would take over initialization.

Change-Id: I34bcb858520b06110685f643705da83c4640a094
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 17:08:21 +08:00
Joseph Chen 717cd360ca rockchip: boot_mode: fallback to legacy bootdev init when atags is invalid
verbose "Bootdev(atags):" if bootdev is from preloader atags, otherwise "Bootdev:"

Change-Id: Ib02a1f6deea330bf33aca60f752a3006a48bc3ac
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 17:08:21 +08:00
Joseph Chen 61ad391ffa configs: rk3399pro-npu: enable CONFIG_SYS_CONSOLE_INFO_QUIET
Change-Id: I20f7c4008627baa4db203ad2c89fa17ce8278e25
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 17:08:21 +08:00
Joseph Chen 5ea39a570f common: autoboot: using ctrl+c to exit bootdelay and enter hush
We hope user can have more clear purpose on entering hush shell,
this avoids some unexpected key hit during normal boot.

Update message from:
Hit any key to stop autoboot: 5 => Hit key to stop autoboot('CTRL+C'): 5

Change-Id: Ifb1b594dc38f92fa38e2c2b8a9a576e38bbdf03e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-19 17:08:17 +08:00
Joseph Chen dc11069f97 rockchip: boot_mode: separate key press and vbus attach conditions message
Change-Id: Iace9c890526179cdceef327f1113db5c8a4c26bd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-18 17:35:07 +08:00
Joseph Chen 2b49f256f5 configs: rk3399: enable CONFIG_SYS_CONSOLE_INFO_QUIET
Change-Id: I19a4621c051518df50618815ccaca8e6d5e0256d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-18 17:34:23 +08:00
William Wu 3e4afe6b7c usb: phy: rockchip: support vbus detect for rk3288
This patch implements USB vbus detect API for rk3288,
it can be used for user to determine whether enter
download mode or not.

Change-Id: Ic493b40b56cd149ec19f57ce914d70d288c54ca9
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-12-18 17:30:47 +08:00
Joseph Chen 9f1dd9df85 dm: key: make kernel dtb key has higher priority than U-Boot keys
We add recovery key node with property "u-boot,dm-pre-reloc"
in uboot dts in order to make sure recovery key works normally
even when kernel dtb is load failed. But There are too many
boards for a platform(eg. RK3399/RK3399PRO), which may cause
a mistake key match between boards via U-Boot dts key nodes,
so that we make kernel dtb key has higher priority.

Change-Id: I771d72860aa626e4a6a1638117cb1876fe5d1a44
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-18 17:03:59 +08:00
jon.lin e7cd9ad210 configs: rk1808: enable sfc spi nor
Change-Id: Ic53f834e805cab86a7cc5666e1767b8d4bd7083f
Signed-off-by: jon.lin <jon.lin@rock-chips.com>
2018-12-18 16:35:55 +08:00
jon.lin c09b5fad43 rockchip: dts: rk1808: add sfc node and enable it
Change-Id: Iaebdadf5eb45fdfa7c693156c851c573a6acb45e
Signed-off-by: jon.lin <jon.lin@rock-chips.com>
2018-12-18 16:35:47 +08:00
Wyon Bi 6f920c07e0 video/drm: Rename rockchip_analogix_dp to analogix_dp
Change-Id: I5603a709abde6a852fcca0b3a5b833727d5f3cad
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-12-18 16:34:46 +08:00
Wyon Bi 9c3b19b6a2 video/drm: edp: code style cleanup and fixes
Change-Id: I7ae761ca7a493e72fc4b4ed55f6cb2aa40a7cbfa
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-12-18 16:34:46 +08:00
Joseph Chen 95351b7a0e rockchip: dts: rk3399: add rk3399pro evb board recovery key
Change-Id: I5fe5a5532e7a6d47209ac38774497575b9c3072a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-17 20:50:38 +08:00
Joseph Chen adba3792a7 dm: key: support register multiple same key code
Due to some board use the same u-boot rkxx-evb.dts, dm key had
better support parse same key code for times.

Change-Id: Ifeeb75bef90e52e2747ef2858cec500a928c806d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-17 20:50:38 +08:00
Joseph Chen 8171b1ba1b rockchip: rk3399: support rk3399pro uart2 input
RK3399: uart2c; RK3399PRO: uart2a.

Change-Id: Ic750e862c30cfd63de4ad800ebf49133feaefb01
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-17 20:31:40 +08:00
Joseph Chen 4d763c7bd8 rockchip: rk3399: add syscon scan sub dev
Change-Id: Icb0b59fa7cb61e41fc611b5671625854894d2283
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-17 15:08:51 +08:00
Nickey Yang 80cc390792 dts: rockchip: rk3288: update ddc-bus for hdmi
use hdmi_ddc instead of i2c5 for read edid.

Change-Id: Ie2efcf99a50bb7cdb68eaa4b8c3a783a743e758e
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-17 14:26:15 +08:00
Zhangbin Tong d52543056c configs: rk322x_defconfig: update with save defconfig
Change-Id: Iedb228f9794bdba0cdc5598935a877291730b1b9
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-12-17 14:21:33 +08:00
Nickey Yang 048ac2b721 dts: rockchip: rk3288: update dsi node from kernel.
Change-Id: I43ffd5e2d782bb18ac6c7fb96db0628458bb5a2d
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-17 14:20:08 +08:00
Nickey Yang 0fd7e0574c rockchip: dt-bindings: clk: rk3288: add SCLK_MIPIDSI_24M
Change-Id: I268aadd6065f93f17e5a48e9b5acf63d2e5132a1
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-17 14:20:08 +08:00
Nickey Yang 03773c159a dts: rockchip: rk3288: sync display-subsystem route node form kernel.
Change-Id: I6758525abe308a35e4dcf3b20905c114d8a5ab46
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-17 14:20:08 +08:00
Elaine Zhang 8b75ff3444 clk: rockchip: rk3399: support clk dump
add clk_dump.
add peri clk getting rate.
modify aplll init freq to 816M.

Change-Id: I57a9c2f708c12968909b804f957e80fb0c6d3573
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-17 14:17:10 +08:00
Elaine Zhang cf04b7e8f2 clk: rockchip: rk3328: support crypto clk setting
Change-Id: I9e4d58050b087c3da6649efe4d3115da2ce6dce7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-17 14:17:10 +08:00
Elaine Zhang a7c5f87313 clk: rockchip: rk322x: support crypto clk setting
Change-Id: Id92acae9424fd0b200f9b4f33982f753f6123207
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-17 14:17:10 +08:00
Elaine Zhang 51d1c6b1dd clk: rockchip: px30: support crypto clk setting
Change-Id: I9971fb2b6a40640d78fb259c72aac32582f8e90d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-17 14:17:10 +08:00
Elaine Zhang 0cde592567 clk: rockchip: rk3308: support crypto clk setting
Change-Id: I58967fe70fbae6630fe0404414daaee6b1498b72
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-17 14:17:10 +08:00
Elaine Zhang 187d951b8f clk: rockchip: rk3399: support crypto clk setting
Change-Id: I12cbaeac250f21d4cb05d8ef3ef0e9238cb3f911
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-17 14:17:10 +08:00
Weixin Zhou ce18b1fcdc rk3399pro: set wifi_26M to 24M and disable by default
fix current leak due to wifi_26M clk enable by default

Change-Id: I53cb7fbfa49a0cda29834bb2e2871aedde6b7d15
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-12-13 20:08:58 +08:00
Nickey Yang 0fd8dec7ce clk: rockchip: rk3288: adjust gpll init_cfg
This patch adjust gpll init nr/no/nf/bw values.
keep them the same as kernel RK3066_PLL_RATE_NB(594000000, 2, 198, 4, 1)
for better clock jitter when hdmi SI test.

Change-Id: I781205d860945214f3f0957882223b8846c00773
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-13 17:35:26 +08:00
Zorro Liu 8853050220 configs: rk3368: add fuel_gauge rk818
Change-Id: I32141e3fb5d09964f82ceb15a63091bb812fa68c
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-12-13 17:34:21 +08:00
David.Wu 2c16899d60 pinctrl: rockchip: Fix the cleaning of drv/pull type mask
Where need to clean the special mask for rockchip_perpin_drv_list
and rockchip_pull_list.

Change-Id: I98bac7768aa0570c12c947913ef2ea91ae303f95
Signed-off-by: David.Wu <david.wu@rock-chips.com>
2018-12-12 21:08:46 +08:00
Joseph Chen c9eb255473 make.sh: add debug command to enable bootstage timing report
Change-Id: I3550de5beb985932fff294953bda4b315805b7ea
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-12-12 11:54:31 +08:00