Commit Graph

48350 Commits

Author SHA1 Message Date
Wyon Bi 00cdbd6c88 video/drm: panel: Allow to configure bpc (bits per color) from DT
Change-Id: Iad86b7121e4cdfbd981daba6f860fd8b97bca52a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 18:41:25 +08:00
Wyon Bi 74e3938979 video/drm: Rename rockchip-dw-mipi-dsi.c to dw_mipi_dsi.c
Change-Id: I409b32e945a2182e2948255b02644a98d16fcc21
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 18:41:24 +08:00
Joseph Chen 98e497fd55 arm: arm32_macros: fix coding style
Change-Id: I736139237d184aa7a35c840ea0ed3214d7e47e44
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-30 17:57:45 +08:00
Wyon Bi 8b8b9c4b96 video/drm: dsi: fix pll clock setting for synopsys phy
Fixes: 1c3c799444 ("video/drm: dsi: fix pll clock setting for synopsys phy")
Change-Id: I1b5ef22c6c63a99dd3f10ea03f31d50d3bfeea06
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 17:11:20 +08:00
Guochun Huang d84edf5f5c android: dtbo: enabled by default
Change-Id: I711a9f341b8126e159d4ab07f3fb7fb5e2fab9a2
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2019-01-30 17:10:04 +08:00
Joseph Chen 8e66ecd25d android: fix get wrong ramdisk address when avb verify
- add interface to get android avb enable state;
- get ramdisk from "ramdisk_addr_r" only when android avb disabled
  and CONFIG_ANDROID_BOOT_IMAGE_SEPARATE is enabled;

(fixes: 644e344 android: support loading android image separate)

Change-Id: I7280f911a0c5db851d119acb458b3f335dc28bce
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-30 16:51:22 +08:00
Joseph Chen ecc8fa7230 configs: rk3368: increase sys malloc_f len
Avoid malloc_f space for pre-reloc is not enough which
may cause memory override.

Change-Id: Ifa358f5700dfa8b1dc1240a210e414fb69fca914
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-30 16:21:54 +08:00
Wyon Bi 49ae8667cc video/drm: display: atomic display enable handling
Change-Id: If71e8590fb4e1b1e743d4b085e42b7530f518084
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-30 11:40:17 +08:00
David Wu 81681b40b9 rockchip: dts: rv1108-evb: Fix gmac dts configuration
Add the phy regulator supply for rv1108-evb, and fix the
configuration of clock_in_out.

But the phy will init failed because the phy-reset pin is
the same as the mipi data pin.

Change-Id: I14b0accd083742ca6eb4ae6bec1139ef5ba65db0
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-01-30 11:39:48 +08:00
Jason Zhu 0b06bacceb configs: rk3128x: enable CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION
Since sd does not have RPMB, so store secure data in security partition
for sdboot.

Change-Id: Ibf4557b5b2721657a6abf2f9e70e1b6c8893d7fc
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-29 14:03:05 +08:00
Jason Zhu 726087de6e crypto: support rockchip hardware crypto
Support: rsa & sha algorithm
Usage: Set CONFIG_RK_CRYPTO to enable rk crypto.

Change-Id: I2b6a920308fcdf46481bcf38fc6be532a02255bd
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-28 20:42:54 +08:00
Jason Zhu 564654eb9c lib: optee_client: add read&wite permanent attributes certificate
Change-Id: I83321afcf9d89b0cde0bcc78f1f02c847f85a115
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-28 20:42:54 +08:00
Shunqing Chen 73d987a762 configs: rk3126: add POWER_FG_RK816 support
Change-Id: Ie5111627ac3303a9beb6f9f778004c7b9cbeb020
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2019-01-28 15:39:27 +08:00
Elaine Zhang 524f26463d clk: rockchip: rk3066: print arm enter and init rate
Change-Id: Iaf4ffbb61830b7bb7cef31843f0e9b75c34d08ec
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-01-25 16:19:57 +08:00
Elaine Zhang 441bfb788a clk: rockchip: rk3188: print arm enter and init rate
Change-Id: I604c18050e8ccbbc9aa25ecd8f4379a877239d49
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-01-25 16:19:57 +08:00
Jason Zhu 14262c55f8 clk: rockchip: rk3328: add case SCLK_EMMC_SAMPLE
Change-Id: Id2769eefc1692422110152e6dbec7afeb4488c8c
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-25 15:45:08 +08:00
Wyon Bi 9f1d10d309 video/drm: dsi: rework dual channel mode
Change-Id: If119532a057d731f523a7ec8b035e9addc76d1e1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-25 14:57:29 +08:00
Wyon Bi 1c3c799444 video/drm: dsi: fix pll clock setting for synopsys phy
Change-Id: Ib2cfdf413e3c4da039a16971fcc00baaab3b101c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(sync from rk/kernel:develop-4.4:331690a183f536fe8a791ceed4231f7e484f8fb7)
2019-01-25 14:57:29 +08:00
Wyon Bi cef5be6b54 video/drm: dsi: Bypass TLP clock lane and data lanes counter threshold
Change-Id: I2b750800859626f3d95ebe6b1b8a3d86aefc07d1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(sync from rk/kernel:develop-4.4:3ef4c2204f9be3f0877333b5d35ab11e322ed90d)
2019-01-25 14:57:29 +08:00
Wyon Bi 2612c8202d video/drm: dsi: Don't hardcode/bypass phy default parameters
Change-Id: If8670bee99c1397647323b34acd3e3da028549c3
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(sync from rk/kernel:develop-4.4:bd920c36fc56d00a24d3688510c84c62d7921c6a)
2019-01-25 14:57:29 +08:00
Wyon Bi 374e75505b video/drm: dsi: fix phy power-on sequence
Change-Id: I1f48f5d13d772ee8c3c71ee40f122811d687bcc6
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(sync from rk/kernel:develop-4.4:1df398e95a19c472ac847ced671175f147a043ad)
2019-01-25 14:57:29 +08:00
Wyon Bi e6cbaa2472 video/drm: dsi: rework test interface
Change-Id: I8521fa8aa8b1ba11888dd506f238e6e6c2d7ad39
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(sync from rk/kernel:develop-4.4:2c659c75a6fb5fc99279a8d4e64b222d0158e77b)
2019-01-25 14:57:29 +08:00
Jason Zhu a64079e606 configs: rk3328: delete clock-names
The clock property is used when emmc initialized.

Change-Id: I9b55c0f8bb91c25326abc45436cbd4d4c2516a08
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-25 14:56:21 +08:00
Jason Zhu f17295bfb0 rockchip: rk3328: update sdmmc&emmc's clocks
Add the SCLK_EMMC_DRV and SCLK_EMMC_SAMPLE to clocks.

Change-Id: I3c633bd973bb1f5cafb98a295ded6cfae704382d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-01-25 14:56:21 +08:00
Shunqing Chen 573b2cce51 regulator: rk8xx: add switch get/set value
RK8xx switch does not need to set the voltage,
but if dts set regulator-min-microvolt/regulator-max-microvolt,
will cause regulator set value fail and not to enable this switch.
So add an empty function to return success.

Change-Id: Ifc3cfe24902123d7434f3f6560a8e530c03d0b2a
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2019-01-25 14:23:39 +08:00
Joseph Chen f36a2342cd rockchip: board: move charge display function to charge display uclass
Change-Id: Ib5143d8bd9beafc585438e57216f2b7c17932859
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:44:08 +08:00
Joseph Chen f9f027c19e common: attestation key: use debug for "ca head not found"
Change-Id: I2d685acbcf18fa21aad35813a23abcfe0cf465a8
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:43:04 +08:00
Joseph Chen 644e344181 android: support loading android image separate
This patch support loading android image separate for the
kernel/ramdisk/second images. It is disabled when android
AVB is enabled, because AVB need verify the full android image.

It brings some benefits, mainly for saving a lot of boot time:
  - allow skip load second content when kernel dtb is enabled;
  - allow skip fdt and ramdisk relocation during bootm boot flow;
  - allow loading fdt/ramdisk to "fdt_addr_r"/"ramdisk_addr_r";
  - avoid android image too large when load to ram;

Change-Id: Ia040b3031307a8a7c98b011ce038ec61fee6804a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen 2280fbdd62 rockchip: boot_rkimg: import sysmem to alloc image buffer
sysmem avoids memory block overlap with each other.

Change-Id: I7c705c7860a7c88b0d3672b6b4edb8cb8334654d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen 9866229841 rockchip: boot_rkimg: add descrption for reloading kernel dtb
"gd->fdt_blob != (void *)fdt_addr_r" makes users confused, let's
add some descrption.

Change-Id: I3ffe6c26892e99af4183eebcfb3c27ed1bdea38a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen 6bc040a32c rockchip: resource: import sysmem to alloc fdt buffer
sysmem avoids memory block overlap with each other.

Change-Id: I0013c3d05c69e19286cf1c76f936a17eaab1db49
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen 4ec36d6839 rockchip: resource: add interface to get resource file size
clean up code and add comment for other interfaces.

Change-Id: Ibc64978d8db595c4fe76432faca77cdad9c949e6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen 6929f85b13 rockchip: board: implement board_sysmem_reserve()
sysmem provides a mechanism to avoid memory block overlap with
each other.

Change-Id: I84796f4fd5b06283ca23e0ec9da9d0421701a957
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen 4892a977d7 rockchip: board: fix compile warning when atags is disabled
Change-Id: I494f06a715bf7b40c7f56a5ce3aabe1c63ee9bb0
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen 7c015044fd rockchip: boot_mode: use param_parse_bootdev() to get bootdev
Change-Id: I735471aa89502acfc647dbeeb4d487f1001ccad7
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen f0a9765fb1 rockchip: sdram: use common interface to get atf/optee memory info.
using param_parse_atf_mem() and param_parse_optee_mem().

Change-Id: I0d42f80ea4bac61efdc38a0be97c3f416ce90622
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen dbf8423e37 rockchip: add platform param parse interface to param.c
parse: atf/optee/bootdev and common reserved memory.

Change-Id: I829eb42370b217e567cdafe03de4dab6063aa251
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen a384e3f1db common: image-fdt: add boot_fdt_add_sysmem_rsv_regions()
It reserves fdt reserved memory for sysmem.

Change-Id: I7ce1be9bd25a3609bc6dabdc265addbd2571076c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen 322222b253 common: board_r: add sysmem init
setup right after malloc init done.

Change-Id: I6dbf55d825d0b03ed2cc64f2dab0a7331ce56228
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
Joseph Chen ffa8f8b76e lib: introduce sysmem for permanent memory management
U-Boot provides MALLOC for runtime temporary memory management and
LMB for bootm memory management. There is not a mechanism for permanent
memory management. so that the memory blocks are easy to overlap with
each other.

What does permanent memory mean ?
 - The memory can't be touched by U-Boot(ATF/OPTEE/SHM/kernel-reserved, etc);
 - The memory occupied even in kernel, such as some firmware load buffer;

This patch introduces sysmem to do permanent memory management, which
implements base on LMB. It provides memory block (pool):
 - init;
 - add;
 - alloc;
 - free;
 - reserve;
 - stat;
 - overflow check;

Here is an example for RK3399 sysmem boot stat(assume the "fdt" region is Overflow)
called by sysmem_dump_all():

sysmem_dump_all:
    ------------------------------------------------------
    memory.rgn[0].base     = 0x00000000
                 .size     = 0x00000000
    memory.rgn[1].base     = 0x00200000
                 .size     = 0x08200000
    memory.rgn[2].base     = 0x0a200000
                 .size     = 0x75e00000

    memory.total           = 0x7e000000 (2016 MiB. 0 KiB)
    ------------------------------------------------------
    reserved.rgn[0].name   = "ATF"
                   .base   = 0x00000000
                   .size   = 0x00100000
    reserved.rgn[1].name   = "PSTORE/ATAGS/SHM"
                   .base   = 0x00100000
                   .size   = 0x00100000
    reserved.rgn[2].name   = "OP-TEE"
                   .base   = 0x08400000
                   .size   = 0x01e00000
    reserved.rgn[3].name   = "U-Boot"
                   .base   = 0x71be03c0
                   .size   = 0x0e41fc40
    reserved.rgn[4].name   = "secure-memory@20000000"
                   .base   = 0x20000000
                   .size   = 0x10000000

    reserved.total         = 0x2041fc40 (516 MiB. 127 KiB)
    ------------------------------------------------------
    allocated.rgn[0].name  = "fdt"      (Overflow)
                    .base  = 0x01f00000
                    .size  = 0x00009704
    allocated.rgn[1].name  = "kernel"
                    .base  = 0x0027c000
                    .size  = 0x0129da04
    allocated.rgn[2].name  = "ramdisk"
                    .base  = 0x0a200000
                    .size  = 0x001e6c04

    allocated.total        = 0x0148dd0c (20 MiB. 567 KiB)
    ------------------------------------------------------
    LMB.reserved[0].base   = 0x00000000
                   .size   = 0x00200000
    LMB.reserved[1].base   = 0x0027c000
                   .size   = 0x0129da04
    LMB.reserved[2].base   = 0x01f00000
                   .size   = 0x00009704
    LMB.reserved[3].base   = 0x08400000
                   .size   = 0x01fe6c04
    LMB.reserved[4].base   = 0x20000000
                   .size   = 0x10000000
    LMB.reserved[5].base   = 0x71be03c0
                   .size   = 0x0e41fc40

    reserved.core.total    = 0x218ad94c (536 MiB. 694 KiB)
    ------------------------------------------------------

Change-Id: If63b7abed2cdd3c054719511fcceed733ddf606d
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-24 15:33:12 +08:00
wu jingchen a096fa255c configs: rockchip: px30: enable avb for Android P
Change-Id: I3678bc4e3f21379cf12891ca6a99a37bc54d76d7
Signed-off-by: wu jingchen <oven.wu@rock-chips.com>
2019-01-24 14:56:25 +08:00
Shunqing Chen de4e4f5097 fuel gauge: rk817/rk809: add charge detect for rk809
Change-Id: I481793e5e307534deefa15a9f71de75752170dc8
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2019-01-24 08:40:00 +08:00
Joseph Chen 47ad810789 rockchip: rk1808: enable GICV3
Change-Id: I47a459e2408a7a56794cf7f72ff58a616100b7eb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-23 21:17:03 +08:00
Joseph Chen 0b33879477 configs: rk3128x: remove unused modules
Change-Id: Id8c61c9b3fbb9eebe53b28c95e2ca961df48947e
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-23 21:16:50 +08:00
Joseph Chen a3125e1893 configs: rk3399pro: remove unused modules
Change-Id: I3de6562dc2c6546bf148e6571092b2046fd49336
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-23 21:16:50 +08:00
Joseph Chen 0be3899d19 configs: rk3126: remove unused modules
decrease 41KB size.

Change-Id: Ic2cb9d164ab79aa0eee2aa0ad491562231400aa3
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-23 21:16:50 +08:00
Joseph Chen 547a235e37 configs: rk3308(aarch32/64): remove unused modules
Change-Id: I6c9243a7a18b108442e8cf7e5ea298c7770c9a08
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-23 21:16:36 +08:00
Joseph Chen 20e312f0e2 configs: rk3036: remove unused modules
Change-Id: I6fdabf2c1274d791a4cf3fae3219c09b145984b6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-23 21:14:59 +08:00
Joseph Chen 38bddcf9c8 configs: rk3399: clean up with make savedeconfig
Change-Id: I1fac34ded558e3250364604ec07b3d2bf3a31bc6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-23 21:14:25 +08:00
Joseph Chen 5279a51611 configs: rk3399pro-npu: remove unused modules
Change-Id: If8bbff81139a38c47512f59bb25b4baeedab833f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-01-23 21:14:25 +08:00