Commit Graph

12401 Commits

Author SHA1 Message Date
Joseph Chen 94cf1096ee power: charge animation: fix cmd compile error
cmd depends on DM_CHARGE_DISPLAY and default y.

Change-Id: I5e685e0020c4aa1da80ffc27e5a576bc8969c3be
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-04-30 11:38:48 +08:00
Wyon Bi 350f6a1836 video/drm: rgb: support pinctrl state select
Change-Id: I7eb1204e24e17894d529fc582d3bd4a90a61327a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-04-29 10:13:19 +08:00
Elaine Zhang 88c36f1205 clk: rockchip: rk3399: fix up the assert error
Change-Id: I8cc4f6b775243fef1f5c8e2c711eb1b16eac79a8
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-28 14:51:00 +08:00
Jon Lin f25e3caf73 rkflash: support 4KB page size spi nand
1.support 4KB page size spi nand
2.add new spi nand: ATO25D1GA, XT26G02B, XT26G01B, HYF4GQ4UAACBE

Change-Id: I331c98341e9aa5f2e15cd7a4a5c6aeb2136d65dd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-04-23 10:25:40 +08:00
Simon Xue e7c691e7c7 watchdog: add support for Rockchip watchdog
Change-Id: I6b50f79df12e86453f6defbbddba5f0cf2078d28
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-04-10 14:35:24 +08:00
David Wu ff86648dc8 net: Add rk1808 gmac support
Change-Id: Iba89fc63dce6553beb266106f5f6287a2779032f
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-04-10 14:14:15 +08:00
Elaine Zhang 6b5ade5a57 clk: rockchip: rk1808: fix up the clk_set_default failed
Change-Id: If49d6def0e16b93238311885217f30a4b7a2e7c3
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-10 12:04:10 +08:00
Elaine Zhang b9f5972251 clk: rockchip: rk1808: add mac clk interface
support mac clk set rate and set parent.

Change-Id: I3b4626fd3fcc5ffdf3c58add9c1bc002bb56429a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-10 12:04:10 +08:00
David Wu 18ae91c869 net: Add px30 gmac support
Change-Id: I2c5618e74ef3e710a498795e31c6fe9e3f8d8e89
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-04-10 11:24:29 +08:00
Elaine Zhang 22d359b877 clk: rockchip: px30: add mac clk interface
support mac clk set rate and set parent.

Change-Id: Iaadcb701cf37083d90a37b24f4ffba3bef9c88cd
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-10 11:24:29 +08:00
Elaine Zhang 221585fb35 clk: rockchip: rk3308: support pclk_wdt get rate
Change-Id: I001cfef774c9657b6286467dc4ef841771841895
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-09 17:39:21 +08:00
Elaine Zhang ced960d2b6 clk: rockchip: rk3288: support pclk_wdt get rate
Change-Id: I99f384344feb68ae5b91ade901df4019790ef8db
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-09 17:39:21 +08:00
Elaine Zhang 33a03efd7a clk: rockchip: rk3128: support pclk_wdt get rate
Change-Id: Ie5dbfe5bd3fdd7868a5db64b96471a5524bde462
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-09 17:39:21 +08:00
Elaine Zhang 68d8964cb4 clk: rockchip: rk1808: support pclk_wdt get rate
Change-Id: Ib204b4c014c3b4cbd35d1f335378b0b399689303
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-09 17:39:21 +08:00
Elaine Zhang 8afd7ff1e3 clk: rockchip: px30: support pclk_wdt get rate
Change-Id: I1d58d032c6f3843df3fdee65b1ee9cd3614435b1
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-09 17:39:21 +08:00
Elaine Zhang a4e491228b clk: rockchip: rk3368: support pclk_wdt get rate
Change-Id: I8253532cfa6a1d492d68b0e778f625621cad5dab
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-09 17:39:21 +08:00
Elaine Zhang 981ee0bd7d clk: rockchip: rk3399: support pclk_wdt get rate
Change-Id: I8634beb815d5129534c36861c2f02e62669889e9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-09 17:39:21 +08:00
Shixiang Zheng 7e72214d51 video/drm: logo: the negative height will cause vop register err
the bmp file has been processed when reserved equals BMP_PROCESSED_FLAG

Change-Id: I793582cdd4ee5ee2a774c7a0dee8d36c81ed4f4c
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-04-09 14:44:20 +08:00
David Wu 200683ea3d clk: rockchip: Add mac clock support for rk3308
Change-Id: I972e2b7977f0f94164c72ae2205ec51780eb7373
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-04-09 11:09:22 +08:00
David Wu 23adb58f0c net: Add rk3308 mac support
Change-Id: I143e7847e2249fafdcbcdaf69ff3a88915674836
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-04-09 11:09:22 +08:00
Joseph Chen 5a54baa793 dm: key: refactor code
- use standard dm framework to implement all key drivers;
- all key node to be children and attach to key bus;
- dm key uclass takes over most work;
- reduce a lot of driver code size;

Change-Id: I9ea4515249d493eb4434890b90350f694c07404f
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-04-09 10:54:14 +08:00
Joseph Chen 4388deca72 dm: add amp uclass and rockchip amp driver support
- add amp uclass;
- add a simple rockchip amp driver.

An example for amps dts node configure:
amps {
	compatible = "uboot,rockchip-amp";
	status = "okay";

	amp@0 {
		description  = "mcu-os1";
		partition    = "mcu1";
		cpu          = <0x1>; // this is mpidr!
		load         = <0x800000>;
		entry        = <0x800000>;
		memory       = <0x800000 0x400000>;
	};

	amp@1 {
		......
	};

	......
};

U-Boot loads "mcu-os1" firmware to "0x800000" address from partiton
"mcu1" for cpu[1], the cpu[1] entry address is 0x800000. And
U-Boot reserve memory from 0x800000 with 0x400000 size in order
to make it invisible for kernel.

Please use rockchip tool "mkkrnlimg" to pack firmware binary, example:
./scripts/mkkrnlimg mcu-os1.bin mcu-os1.img

Change-Id: I127d5d9f460ec0c1812a76fb4c3702e82f21c9a6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-04-08 20:53:44 +08:00
Shengfei Xu ba76dc003e power: pmic: rk8xx: enable under-voltage protection to rk817/rk809
The under-voltage protection will shutdown the LDO3 and reset the PMIC.

Change-Id: Ic84c7ad1a2eed8c1f983e761988ffb903fc878af
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-04-02 19:09:07 +08:00
Jason Zhu 204f7c3926 mmc: dw_mmc: fix sd card power enable errror
The sd card power is enabled when PWREN is set low by rockchip hardware design.

Change-Id: I4fb54235bd5235030146f77be1e07dc4e729ae06
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-04-02 17:44:46 +08:00
Yifeng Zhao ca13d12f66 drivers: mtd: nand: add rockchip nandc v9 drivers
Change-Id: I7019f309528d41710c5af6857a4d4f54037dd595
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-04-01 13:59:32 +08:00
Finley Xiao 6be53b633a rockchip: otp: Add support for RK3308
Change-Id: I44391e0f039b1bd347124e90aad67a936ade2f99
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-03-29 18:26:05 +08:00
Finley Xiao 4973d825b8 rockchip: otp: Add (misc) driver for PX30 non-secure OTP block
This adds a simple driver for reading the OTP block of the PX30.

Change-Id: Ic2c0f4b0886808af87c826e8d0045e5d440521f7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-03-29 18:26:05 +08:00
Finley Xiao b13cc84cd1 rockchip: efuse: support rk1808 non-secure efuse
Change-Id: I2a7cc8306c5ea45c5586b036cbc13eaa153e4227
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-03-29 18:26:05 +08:00
Jason Zhu 5743ef647f mmc: dw_mmc: support get_cd in struct dm_mmc_ops
Add function get_cd to detect storage device directly instead of detect
it by mmc command.

Change-Id: I486dee836c62092baabe40fc6de995904849f91d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-03-28 15:51:05 +08:00
Joseph Chen 0476014ebb ram: ramdisk: rename "readonly" to "ro"
Change-Id: I4f7c052e5750db78969f37125056906cacd222a0
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-03-28 14:47:12 +08:00
Shengfei Xu 327c34ef1d fuel gauge: rk817/rk809: only rk809 need pull-up and pull-down resistor
Change-Id: I9c88a0cf11205ba351305eb37bd1e725ed203dca
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-03-28 14:42:43 +08:00
Joseph Chen c5449fd30c dm: dvfs: don't print fail message when there is no device
Change-Id: I8ec8920972261e8009dfd9306d8ab898460a71df
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-03-27 08:59:47 +08:00
Zhihuan He e5f393836b driver: ram: rv1108: use common code to setup ddr parameter
use rockchip_setup_ddr_param to setup ddr parameter.
The dram_init() and dram_init_banksize() make use of
sdram common code.

Change-Id: Icfc6cbef9fcc128e3a835184b46b89b9b22aab16
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2019-03-22 09:00:32 +08:00
Jon Lin 6e9d994efb rkflash: support 8KB page size slc flash
comfirm in MT29F16G08ABABA

Change-Id: Ib2a3c62b3a4c9b9880c78fb01d39d4ad8fe2ac87
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-03-20 16:06:27 +08:00
Joseph Chen 2e68f6b5f9 power: charge animation: support long key event without release
Change-Id: I9d7cd439376f2f4ff89ea6bfe3baedbeaa4deeb9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-03-18 11:34:06 +08:00
Yifeng Zhao 7aec704a4e drivers: mtd: nand: rockchip nandc add bad block detect api
The data layout for rockchip nandc is:
    1024 bytes data + 32 obb + 1024 data + 32 obb ...
The system detect bad block flag locate at 2048, 4096, 8192...

The system checks for bad blocks and gets the wrong bad block.
Add a bad block detect api to check the bad block.

Change-Id: I8b0f2907a851d3bbb4d1b9f5daf21319bfb047d9
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-03-14 16:51:39 +08:00
Jason Zhu 41175141f3 mtd: nand: rockchip: fix incompatible-pointer-types compile err
Fix the following compile error:
drivers/mtd/nand/rockchip_nand.c: In function ‘nand_spl_load_image’:
drivers/mtd/nand/rockchip_nand.c:657:39: error: passing argument 3 of
‘nand_read_skip_bad’ from incompatible pointer type
[-Werror=incompatible-pointer-types]
  return nand_read_skip_bad(mtd, offs, &size, NULL, size, (u_char
*)dst);
                                       ^
In file included from drivers/mtd/nand/rockchip_nand.c:11:0:
include/nand.h:101:5: note: expected ‘size_t * {aka long unsigned int
*}’ but argument is of type ‘unsigned int *’
 int nand_read_skip_bad(struct mtd_info *mtd, loff_t offset, size_t
*length,

Change-Id: I44c97f21c2c2d40a7dcbdab7ddb96a1025949ee4
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-03-14 16:51:28 +08:00
William Wu 6a3f8006e0 usb: phy: rockchip: fix implicit definition warning
When make with rock_defconfig, compile warning for the
following implicitly defined function are raised due to
a missing include directive:

  drivers/usb/phy/rockchip_usb2_phy.c: In function ‘otg_phy_parse’:
  drivers/usb/phy/rockchip_usb2_phy.c: 102:10: error:
  implicit declaration of function ‘fdt_translate_address’ [-Werror=implicit-function-declaration]
  addr = fdt_translate_address(blob, node, reg);
          ^~~~~~~~~~~~~~~~~~~~~
This change fixes this by including <fdt_support.h>.

And this patch also fixes the following compile error:

  drivers/usb/phy/rockchip_usb2_phy.c:96:1: error:
  label ‘retry’ defined but not used [-Werror=unused-label]

Change-Id: Ia82d0ff02b0f528ddde8a553d457c6c0cb763680
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-03-14 14:04:14 +08:00
Jason Zhu 74b485fb2b fastboot: delete write perm-attr hash if use pre-loader pub_key
Since we use the pre-loader public key to verify permanent attribute, then
we do not need to write permanent attribute hash to otp & efuse.

Change-Id: Ic5e19fed2fc9405ab5bc7504dd930fd5f02d847c
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-03-08 18:12:14 +08:00
Jason Zhu 3cf641a815 fastboot: support write&read perm attr rsa certificate
Change-Id: Iab2ca981dedc188c61c60cd8cebd0f01c5896d44
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-03-08 15:32:09 +08:00
YouMin Chen 00e55222d3 driver: ram: rk3399: clear interrupt before data training
Clears the corresponding interrupt bit of the PI_INT_STATUS
parameter before trigger data training.

Change-Id: Ic25c952a19913cb4332b6cd3405f41474585bfb1
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2019-03-08 15:07:29 +08:00
Jon Lin 6f226dcaab rkflash: change flash_read_page_raw return to error_ecc_bits
1.increase the number of read retry, Triggered only when the
readout is wrong, so efficiency affects small
2.add nand buildin ecc support
3.skip ECC error block instead of marking as bad block
4.less debug printing
5.adjust the way of building tables to increase ftl init

Change-Id: I9cbc369472740d472dfad29449d1fd6529cd9877
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-03-08 14:57:22 +08:00
Joseph Chen a5e3baaa93 irq: disable all gpio interrupt by default
Enable gpio irq only when child pin irq is request.

Change-Id: I429839c7dcdcb90cfe58738eeb36c7445fb0152b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-03-05 16:39:54 +08:00
Wyon Bi 005d29a79d video/drm: rockchip_display: support get display mode from edid if client is not present
Change-Id: Ib8956972b7bbb6aaaac2e3c8a93e0d38d98abf6a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-03-05 15:24:33 +08:00
Jason Zhu a0bf35b582 mmc: rpmb: correct MMC_RSP_R1b to MMC_RSP_R1
According to eMMC spec, the resp_type of MMC_CMD_WRITE_MULTIPLE_BLOCK
is MMC_RSP_R1 but not MMC_RSP_R1b.

If use MMC_RSP_R1b, this causes rpmb can not work with sdhci drive.

Change-Id: I02ab825a4a526646079be6a7ae27326d1a3b7acf
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-03-05 11:20:06 +08:00
Joseph Chen 19066e9932 led: led_gpio: add "default-state" apply
It follows kernel led gpio initialization.

Change-Id: I8c4af429f03bd373e76cd0607306950a2dce33de
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-03-01 11:03:15 +08:00
Yifeng Zhao b3b8e4f06e drivers: rk_nand: support SKHynix 14nm 2D 16GB Nand Flash
support SKHynix 14nm 2D 16GB NAND FLASH H27TDG8T2D8R.

Change-Id: I60bb7aa145d2c6c6be90e91a8288300eacaeabb1
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-03-01 10:05:59 +08:00
Joseph Chen 269512fdf6 irq: clean up code
- using IRQ_X() to print message;
- update some comment;
- rename some function;
- add more strict irq sanity;

Change-Id: If5432818d4bc12fc1aa0b8aca6898bbf79dfa9fb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-25 14:29:34 +08:00
Joseph Chen ebe3d004b5 power: charge animation: clean up code
Change-Id: I0d76d7ad28ef3683bbc78f36d4a0f00d5517e2fa
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-25 14:29:33 +08:00
Joseph Chen 1b3009debe power: charge animation: add leds support
It supports charging and charging-full leds which
depends on soc value.

Change-Id: I6b37919c5bedf9b81d388853996cf83c6f75a73a
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-02-25 14:29:33 +08:00