Commit Graph

50943 Commits

Author SHA1 Message Date
Tang Yun ping 958e04de67 rockchip: rv1126: tpl: thunder boot use SPL_KERNEL_BOOT
Use CONFIG_SPL_KERNEL_BOOT for thunder boot to stay the same with SPL.

Change-Id: I0d2f0a91a5f628233de1cb848519fd76b692a2af
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2020-09-16 08:37:30 +08:00
Weiwen Chen 6ab927d862 configs: add rv1126-ab.config
It is used for AB system.

Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I5cc24afe5f737c4172783f00198d96ed536d80e4
2020-09-15 15:12:57 +08:00
Joseph Chen 34df577a5d scripts: fit-repack.sh: fix cp issue
cp: omitting directory ‘out/repack’

Ignore directory.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4ebca3319b290a7eab9f4b51e9338a0cb3c6c10f
2020-09-15 11:47:28 +08:00
Joseph Chen 69b1ad4693 common: android: clean up code
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I98dfd54edd813f892c5f2717a694b2424b8ecded
2020-09-15 10:55:29 +08:00
Joseph Chen f870210e35 rockchip: resource: add comments
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I45434529a44a5e311af1b693c0af56473c770bf9
2020-09-15 10:55:29 +08:00
Jon Lin 247c5a81b3 mtd: spinand: Add initial support for the MX35LF4GE4AD
Change-Id: Ib1228650e76dc82bc86fb28472616d0fefb269bf
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-09-15 09:42:28 +08:00
Elaine Zhang 9848d60c83 dt-bindings: clock: rk3568: Add binding header for rk3568
files origin from kernel.

Change-Id: Iab1de697da1db28ef0d4d10c96c437373363c1bd
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-09-14 17:14:15 +08:00
Jon Lin aec089f883 rockchip: rv1126: Pull up SFC IO2
GPIO0_D6 pull down in default, but it's needed for SPI Flash with
WP# pin pull up.

Change-Id: I80a79e0072f1fff49673bbe834f51603e10283dc
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-09-14 17:12:18 +08:00
Joseph Chen 1dd64bce5e rockchip: rv1126: clean arch_cpu_init() for SPL
Moving current configurations into SPL boot stage except
something belongs to USBPLUG.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I64ec47f7c0c3cef57854a72af86e9ef1bebbcaed
2020-09-14 15:39:08 +08:00
Jon Lin d30345d690 mtd: spinand: Add initial support for the MX35LF2GE4AD
Change-Id: Iab488487f9937d31cf419757988a4152f359e62b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-09-12 20:41:43 +08:00
Ziyuan Xu f771421f9c configs: add new configuration for lp3_emmc-tb boards
Overlay from rv1126-emmc-tb.config

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ic0b26dc2934b1ff87d6120e8a66078639f0e1e23
2020-09-09 17:06:44 +08:00
Jon Lin 65c356141d spi: rockchip_sfc: Limit io rate to 100MHz
Change-Id: Icec10dbe65d5bbef72b858447aa15e848084712b
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-09-08 17:51:24 +08:00
Jon Lin 177c873697 cmd: rockusb: Add block continue write flag
1.It's good for Nand devices P/E align
2.But actually 0x200 sector(USB limit) is aligned with Nand flash block size

Change-Id: I69510161c32e15ee739c99d36f0294d59df554dd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-09-08 17:51:23 +08:00
Jon Lin 853fc11fcc blk: Add BLK_MTD_CONT_WRITE tag
Change-Id: I72537387912d5c981dbe205c0d0c1864fa42a555
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-09-08 17:51:23 +08:00
Jason Zhu 0e91bf0e81 configs: rv1126-emmc-tb: enable CONFIG_SPL_BLK_READ_PREPARE
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I3f1fcde5f0c2c1ee623302310dbaca138b5e8428
2020-09-07 16:26:04 +08:00
Jason Zhu fdb19f3978 spl: fit: add file spl_fit_tb_arm_v7.S
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I59554a339cbad5f03806c6b1007ccf69e03be470
2020-09-07 16:26:04 +08:00
Jason Zhu 2201a451d5 common: fit: add fit_image_is_preload()
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I3c3001a347ae59fcfd186156382c04b4b8a77546
2020-09-07 14:53:06 +08:00
Jason Zhu 4d62a7e032 blk: remove unused code
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib43223baa7d335f6810f714fd64c40cd314b0185
2020-09-07 14:53:06 +08:00
Elaine Zhang 62be0c2c53 clk: rockchip: rk3368: support get pll config by table
add some special pll configs for better clock jitter.

Change-Id: I3484d36feb9f4b99a42a2ba532ae2015968d83ff
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-09-04 14:22:54 +08:00
Joseph Chen 3eac03e218 common: spl: ab: allow missing misc partition
Return partition name without any slot suffix in this case.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: If0692e3e2845f152802632994f5da5a9d3fb1731
2020-09-02 17:10:09 +08:00
Joseph Chen b8fa09953a common: console: support enable timestamp in SPL
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iefe5f9ea6e9abb8c3cc07e75beb68c387f20320f
2020-09-02 16:35:17 +08:00
Joseph Chen c9f753f3de misc: rockchip decompress: use flush_dcache_all() before decompress
flush_dcache_all() operating on set/way is faster than
flush_cache() and invalidate_dcache_range() operating
on virtual address.

Tested: it saves about 12.5ms in rv1126 thunder-boot.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie8ba42f56e72d0d554dca3949573196ef2165bd7
2020-09-02 16:35:16 +08:00
Joseph Chen 8259a58e4a rv1126: configs: do reset for bootcmd if thunder-boot version
We made a deal: Not allow U-Boot to bring up thunder-boot kernel.

Because the thunder-boot feature may require special memory layout
or other appointments, U-Boot can't handle all that. Let's go back
to SPL to bring up kernel.

Note: bootcmd is only called in normal boot sequence, that means
we allow user to boot what they want in U-Boot shell mode.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8a68af3fbd441ab7e30ad310640eaf3ee5f24525
2020-09-02 16:02:49 +08:00
Jon Lin d38748a7d2 mtd: spinand: Support DS35X2GA
Change-Id: I05e3a0d28983cf24a8a7ba0aee23e434cda4a1a9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-09-01 14:44:03 +08:00
Jon Lin f1b20f5a45 rkflash: Support FS35ND02G-S3Y2
Change-Id: Ifd62df6188c09fc9fccf4a38bd7c856bc8061d80
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-09-01 14:43:56 +08:00
Jianqun Xu 72832ab675 pinctrl: rockchip: add rk3308 support
Change-Id: Id2a34aa7984ee00da2bf78e55f38cf268a2ce8f3
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-08-31 16:03:47 +08:00
Jianqun Xu e20d80255b pinctrl: rockchip: add rk1808 support
Change-Id: Iac6b15651e19b7eaf6dd18339f6de6d65a3dd1ff
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-08-31 16:03:47 +08:00
Jianqun Xu 92b1d31aeb pinctrl: rockchip: add rv1126 support
Keep rv1126 support in pinctrl-rockchip.c with legency

Change-Id: I50791c3c30e6efa58d324eaef7bfc4d4aa9e440c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-08-31 16:03:47 +08:00
Jianqun Xu b8d3e6ff7d pinctrl: rockchip: set mux route in core driver
Change-Id: Iccc880b150b1cea3cef9d2a84d14a0e82ce5c5cf
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-08-31 16:03:47 +08:00
Jianqun Xu 3624458ab0 pinctrl: rockchip: put nr_pins to pinctrl info structure
Put the nr_pins information to pinctrl info structure, instead of
calculating in probe.

Change-Id: I3af11d99ef4b0e30c306ebd99a2233cd0c6b97b5
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-08-31 16:03:47 +08:00
Jianqun Xu d3acdc96e2 pinctrl: support to build without pinctrl driver
Change-Id: I353d4a761d42ad2a22f94cc72dfeb7724e288061
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-08-31 16:03:47 +08:00
David Wu 5635c457ec UPSTREAM: pinctrl: rockchip: Also move common set_schmitter func into per Soc file
Only some Soc need Schmitter feature, so move the
implementation into their own files.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 79d16e45409f928c952b6935d695cd08f9db76b3)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: I41ede5737258292e27492e391cf9a981210e4a71
2020-08-31 16:03:47 +08:00
David Wu b8a0fe4c87 UPSTREAM: pinctrl: rockchip: Clean the unused type and label
As the mux/pull/drive feature implement at own file,
the type and label are not necessary.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 623aca88308b4f917f0465cd5dd1514ee781bee8)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: Idcbb3fdf4311567c599686d52926a057d1101b6b
2020-08-31 16:03:47 +08:00
David Wu cfe427fe38 UPSTREAM: pinctrl: rockchip: Special treatment for RK3288 gpio0 pins' pull
RK3288 pmu_gpio0 pull setting have no higher 16 writing corresponding
bits, need to read before write the register.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 69a38f81bb55893a8555c899319305c539226a0a)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: Ie8f94cf1a0b33a24bb32d3de8231b7f2db51ddff
2020-08-31 16:03:47 +08:00
David Wu 05a5688e53 UPSTREAM: pinctrl: rockchip: Split the common set_pull() func into per Soc
As the common set_mux func(), implement the feature at the own file
for each Soc.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 743a77373bfa22ca099b30d4ac88d95a2f98d1b6)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: Ib0de627d3aee1759965d64852bcd287785538dc0
2020-08-31 16:03:47 +08:00
David Wu 79899a49f9 UPSTREAM: pinctrl: rockchip: Special treatment for RK3288 gpio0 pins' drive strength
RK3288 pmu_gpio0 drive strength setting have no higher 16 writing
corresponding bits, need to read before write the register.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 956362c84b0422ea99da947feca2878193c26ade)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: I409107119d557b953c904b53e657685907879a3a
2020-08-31 16:03:47 +08:00
David Wu 681441e641 UPSTREAM: pinctrl: rockchip: Split the common set_drive() func into per Soc
As the common set_mux func(), implement the feature at the own file
for each Soc.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 625ab11fdae3daf346647aaba59abee804e34589)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: I07caae48cd4699aa7bbddf2edf7de6863c0a58c2
2020-08-31 16:03:47 +08:00
David Wu aa570f0140 UPSTREAM: pinctrl: rockchip: Special treatment for RK3288 gpio0 pins' iomux
RK3288 pmu_gpio0 iomux setting have no higher 16 writing corresponding
bits, need to read before write the register.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit cd8f00ce08102d2dbb350c76bbb53f7b0f804b7d)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: I7aaaf9642ee7bed6a2e9f6538a053bd6e1810dd7
2020-08-31 16:03:47 +08:00
David Wu 5f55bbd7d6 UPSTREAM: pinctrl: rockchip: Split the common set_mux() into per Soc
Such as rk3288's pins of pmu_gpio0 are a special feature, which have no
higher 16 writing corresponding bits, use common set_mux() func would
introduce more code, so implement their set_mux() in each Soc's own
file to reduce the size of code.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 54e75702c48a9757e82cbe71176c0b5ddcf6a092)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: Ifdfce706e9b1cbe94300d2bed91182033f23f301
2020-08-31 16:03:47 +08:00
David Wu 16f7081913 UPSTREAM: pinctrl: rockchip: Remove redundant spaces
Some files have the redundant spaces, remove them.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 8541beb86daf3ce7e4be9ca67859aab3dd0daefb)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: I9f621c3714260165bab0111e486a1d60ecf33c11
2020-08-31 16:03:47 +08:00
David Wu 8fa6c06288 UPSTREAM: pinctrl: rockchip: Add pull-pin-default param and remove unused param
Some Socs use the pull-pin-default config param, need to add it.
And input-enable/disable config params are not necessary, remove it.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 0a5cc3cac96dcbb1f31c9c2a3954dad702a543c1)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: Id7522a4fdd21d42d46c42e6f66b93985064fd9ab
2020-08-31 16:03:47 +08:00
David Wu 49b3d5d5ff UPSTREAM: pinctrl: rockchip: Add 32bit writing function for rk3288 gpio0 pinctrl
There are no higher 16 writing corresponding bits for pmu_gpio0's
iomux/drive/pull at rk3288, need to read the value from register
firstly. Add the flag to distinguish it from normal registers.

Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry picked from commit 502980914b2d6f9ee85a823aa3ef9ead76c0b7f2)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: Ibf0ba2d879904a06a2fb6722f5886a39c010a7f7
2020-08-31 16:03:47 +08:00
David Wu f2e4e921f0 UPSTREAM: pinctrl: rockchip: Add common rockchip pinctrl driver
Use this driver to fit all Rockchip SOCs and to support
the desired pinctrl configuration via DTS.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
(cherry picked from commit e7ae4cf27a6d5837cb5e868712cdaa61d3ceb5e0)

1. fix with error handle with pin with IOMUX_UNROUTED.
2. add get pin count operation
3. modify drivers/pinctrl/rockchip/Makefile

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I1a398c865eb9e9afc38c6aca5431b6546e7260a6
2020-08-31 16:03:47 +08:00
Jianqun Xu 9f32e0d2ec gpio: rockchip: handle error code from pinctrl
Change-Id: Iac48b2302da562d0c204884d9eb3f763c2071c9f
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-08-31 16:03:47 +08:00
YouMin Chen 8e4f57b962 drivers: ram: rv1126: modify the dram side DS and ODT for fsp_param
Change-Id: I1080edf76073f9387e7211b8333bf086f26a09d2
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-08-31 15:33:52 +08:00
YouMin Chen 38b16f0834 drivers: ram: rv1126: fix the timing about noc and controller
1. set the noc ddrtimingc0.b.wrtomwr for LPDDR4
2. set the noc ddrmode.b.mwrsize for LPDDR4
3. update the noc ddrmode.b.burstsize
4. update the controller timing for 328MHz
5. set ddr4timing to 0 except LPDDR4
6. calculate ddr4timing using *_L timing for DDR4

Change-Id: I9f8fae51a05f8547d64da262d4c69fd4edec79fb
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-08-31 15:33:52 +08:00
Tang Yun ping a5033de0ca rv1126: ddr: fix bug of ca driver strength setup
lpddr4 reg0x107/108 is for clk driver strength.
for other type of dram this register is for A6/A8 driver strength.

Change-Id: Ia0acbe03574ad5a1a4ecdaa2c0f53cb9a45c034b
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2020-08-31 15:33:52 +08:00
Finley Xiao de58289ebb rockchip: rv1126: reduce npu aclk and sclk when reset
Change-Id: I29644c83b20ecf40d5005119a86f2bcaad410c34
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-08-31 15:28:45 +08:00
Jon Lin 14ce3c6d83 mtd: spinand: Support GD5F1GQ5UExxG
Change-Id: I5f494ce09eed8c28bd2cb10bac5ec7d9113bac50
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-08-27 17:42:11 +08:00
Joseph Chen 446ef41c12 clk: rockchip: rv1126: always support decompress clock get/set
The SPL without thunder-boot or U-Boot needs it.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ie2d8b59e35fbc2056cfbc910dae94419afcbfc09
2020-08-21 17:49:13 +08:00