Commit Graph

1053396 Commits

Author SHA1 Message Date
Elaine Zhang
a8dd883a2a soc: rockchip: power-domain: add panic when wait status timeout
Change-Id: Ic0ce83068091313942f9277ba56abffa525da1d2
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 18:09:37 +08:00
Finley Xiao
deb5bade24 soc: rockchip: power-domain: Fix restore error qos value
Change-Id: I74692018652ed2aa45b666f1598662146beec92e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 18:09:37 +08:00
Finley Xiao
bb88b31d18 soc: rockchip: power-domain: Add support to ignore on/off
Change-Id: I96c3ae8ae53b9ae95f6f896363b761798a534821
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 18:09:37 +08:00
Finley Xiao
bce1425f50 soc: rockchip: power-domain: export qos save and restore
Change-Id: I89af4462f561fa06ace7761e20cf522b5954aaed
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 18:09:37 +08:00
Caesar Wang
0b54bf037b soc: rockchip: power-domain: export idle request
We need to put the power status of HEVC IP into IDLE unless
we can't reset that IP or the SoC would crash down.
rockchip_pmu_idle_request(dev, true)---> enter idle
rockchip_pmu_idle_request(dev, false)---> exit idle

Change-Id: I76733efd2de4f7ee183c1b6bd1545d60038ee31b
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 18:09:37 +08:00
Jianqun Xu
eb22b17844 arm64: dts: rockchip: rk3568 fix gpio nodes
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: If8f2290be609b00e37fd34c6abbb7a9192d71978
2021-04-01 16:30:18 +08:00
Jianqun Xu
6c671b92dd FROMLIST: pinctrl: rockchip: add support for rk3568
RK3568 SoCs have 5 gpio controllers, each gpio has 32 pins. GPIO supports
set iomux, pull, drive strength and schmitt.

Change-Id: I857882a985f10fdd8551bbacb632fe206052f40c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-04-01 16:30:18 +08:00
Jianqun Xu
0f764fec09 FROMGIT: pinctrl: rockchip: make driver be tristate module
Make pinctrl-rockchip driver to be tristate module, support to build as
a module, this is useful for GKI.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Link: https://lore.kernel.org/r/20210305003907.1692515-3-jay.xu@rock-chips.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit be786ac5a6
 git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl for-next)
Change-Id: I03d844355d96408774b6a3c8458759e364db4491
2021-04-01 16:30:18 +08:00
Jianqun Xu
569f3cac68 FROMGIT: pinctrl: rockchip: clear int status when driver probed
Some devices may do gpio interrupt trigger and make an int status before
pinctrl driver probed, then the gpio handler will keep complain untill
the device driver works to stop trigger.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20210223101937.273085-1-jay.xu@rock-chips.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit b37c35781d
 git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl for-next)
Change-Id: I93625437bc4e0096fbc6eca42f6bb3852a672d94
2021-04-01 16:30:18 +08:00
Wang Panzhenzhuan
5f4c98e33d UPSTREAM: pinctrl: rockchip: fix restore error in resume
The restore in resume should match to suspend which only set for RK3288
SoCs pinctrl.

Fixes: 8dca933127 ("pinctrl: rockchip: save and restore gpio6_c6 pinmux in suspend/resume")
Reviewed-by: Jianqun Xu <jay.xu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Link: https://lore.kernel.org/r/20210223100725.269240-1-jay.xu@rock-chips.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit c971af25cd)
Change-Id: Icb7700ff63e3cb8ca46025e6efd260d91608f23f
2021-04-01 16:30:18 +08:00
Elaine Zhang
dd5ed2c51a FROMGIT: clk: rockchip: support more core div setting
Use arrays to support more core independent div settings.
A55 supports each core to work at different frequencies, and each core
has an independent divider control.

Change-Id: I40dde15e25843090160bbc32d2de8e2cddffc96e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20210315085608.16010-4-zhangqing@rock-chips.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit a3561e77cf
 git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git v5.13-clk/next)
2021-04-01 15:48:17 +08:00
Sugar Zhang
2a8e2fccde clk: rockchip: Add support for clk compensation
Change-Id: I099261a5906dd72dca15cbbf6acea16179c471ad
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-04-01 15:12:26 +08:00
Elaine Zhang
2aed1b5b93 clk: rockchip: rv1126: mux clocks to none-cpll/hpll
There is a lower power dissipation requirement for some products, like
battery ipc, bell, etc... We have to gate cpll/hpll to reduce power
dissipation.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I48fae621c980b6f7f7d8e8ca71171febd6c6a9a8
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:12:26 +08:00
Finley Xiao
f44db7e0f1 clk: rockchip: Add support for cpu boost
Change-Id: Ie473d60c1076e6b137e2bc7407db73624cd6145f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:12:26 +08:00
Finley Xiao
29d9818f3e clk: rockchip: Add support to get clk scale and rate
Change-Id: I2eeb9f47bffafda4a9706fd48c50d22dd88df2c7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:12:26 +08:00
Finley Xiao
2046169992 clk: rockchip: Fix rk3036 pll rate overflow calculation on 32-bit
Change-Id: I4e367893e97828b01b3e6ec457714c722d2c0af6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:12:26 +08:00
Liang Chen
816ae96705 clk: rockchip: Add adaptive frequency scaling for pll_rk3036
Change-Id: Ifd035967afc1852df81daa2b15afea764c5b851d
Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:12:26 +08:00
Finley Xiao
b2ebd03a39 clk: rockchip: Add adaptive frequency scaling for pll_rk3399
Change-Id: Id7be0fd4045f273052d69f49df1272922fb8f8dc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:12:26 +08:00
Finley Xiao
d25e9e589c clk: rockchip: Add adaptive frequency scaling for pll_rk3066
Change-Id: I9c3422a45f86e8b95be0ad069ac70d5490eb5161
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:12:26 +08:00
Elaine Zhang
89fdf6df28 clk: rockchip: rk3399: add pll up and down when change pll freq
set pll sequence:
	->set pll to slow mode or other plls
	->set pll down
	->set pll params
	->set pll up
	->wait pll lock status
	->set pll to normal mode

To slove the system error:
rockchip_rk3399_wait_pll_lock: timeout waiting for pll to lock
rockchip_rk3399_pll_set_params: pll update unsucessful,
				trying to restore old params

Change-Id: I62aecd9f292de5a3c7bcd8a87231785bf115159d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:12:26 +08:00
Elaine Zhang
d8ebdb44b6 clk: rockchip: rk3399: support pll setting by auto
If setting freq is not support in rockchip_pll_rate_table rk3399_pll_rates[],
It can set pll params by auto.

Change-Id: I5016cece64dca4c2efec18d552ee6be426f6b95a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:12:26 +08:00
Elaine Zhang
e83dd493be clk: rockchip: rk3368: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: I3aeeeb7f7b9240c917c18bc2d36b082003dc6370
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:21 +08:00
Elaine Zhang
6cbf201cec clk: rockchip: add a clock-type for muxes based in the pmugrf
Rockchip socs often have some tiny number of muxes not controlled from
the core clock controller but through bits set in the pmugrf.
Use MUXPMUGRF() to cover this special clock-type.

Change-Id: Iac962a27a3c88ce188d03c416cb4b3b45a462c0a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
d433943b34 clk: rockchip: implement the composite brother branch type
There is a new clock branch have a form like
            |--\

Change-Id: I6a7c17cb782b13965f537f44c103611e00d1ecad
---[GPLL]---|   \                        |--\
---[CPLL]---|mux|-----[GATE]--[DVI]------|   \
---[HPLL]---|   /  |                     |mux|--[GATE]--
            |--/   |--[GATE]--[HALFDVI]--|   /
                                         |--/
This patch registers two composite clocks for this branch type,
and make them become brother clock for each oher.

Change-Id: I46aeab26e478f341600114014db1c7d58e234f11
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
c1a61a70dc clk: composite: Add support to change brother clock rate
Some composite clocks may have the same parent clock, if one clock change
the parent clock rate, the other clock rate may too large, so add a
brother clock in composite that the other clock also can be changed when
parent rate is changed.

Change-Id: I2c6749e578b76d6780cecdcd9ff1b5fd4f25a0ba
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Elaine Zhang
124c0977a0 clk: rockchip: add a COMPOSITE_DCLK clock-type
The CLK_SET_RATE_PARENT flag make the parent clock and the child clk is 1:1.
If the DCLK frequency is too low, the PLL frequency will be very
low, which will affect the output waveform quality of PLL, and PLL
locking may be abnormal, so add a new COMPOSITE_DCLK clock-type to handle
that.

Change-Id: If9bee9ebf157fcf034aed246b3aa1cff503ef9cf
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
e6dfeb296d Revert "clk: fractional-divider: check parent rate only if flag is set"
This reverts commit d13501a2be.

This patch causes 32768Hz can't be divided from 24MHz.

Change-Id: I1e86c2b0c96be0d1a80de83d1ac5e5909becbde1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Xing Zheng
c08b33636a clk: fractional-divider: add handle to frac numerator is not to be greater than 4
We know that under the condition of even frequency division,
if the numeratoris greater than 4, the duty cycle may not be
equal to 50%.

In the case, weneed to keep the original numerator(<4) and
denominator.

Change-Id: I8cd08199df4e3d27d5697ce80370224a6f267e26
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
5abd502598 clk: rockchip: Add supprot to limit input rate for fractional divider
From Rockchips fractional divider usage, some clocks can be generated
by fractional divider, but the input clock frequency of fractional
divider should be less than a specified value.

Change-Id: Ifd6c5f6a24a64021f990506e8657cd925f9b96f9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
58b846439b clk: rockchip: half-divider: Use maximal and best divider
The bigger the divider, the better the clock jitter.

Change-Id: I4b4e06c71c2f0bdb0e32422fb42c8d490c3ec4bd
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Finley Xiao
75ec41628c clk: rockchip: add a COMPOSITE_HALFDIV_OFFSET clock-type
The div offset of some clocks are different from their mux offset
and the COMPOSITE clock-type require that div and mux offset are
the same, so add a new COMPOSITE_DIV_OFFSET clock-type to handle
that.

Change-Id: I1c97f7464c3c80ea6dbd7d4052565dd4e35c0931
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Elaine Zhang
6b08b14d6f clk: rockchip: add COMPOSITE_MUXTBL and MUXTBL variant
A clock branch consisting of a mux with non-standard
select values.
The parent in Mux table is sorted by priority.

Change-Id: Ibcaa35541cf8bc255175a62c7950b2241aac2f55
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-04-01 15:07:20 +08:00
Tao Huang
abe8f1cd98 rk: init/main.c: support print long kernel command line
With features AVB / dm-verity enabled, cmdline content is about to
exceed previous maximum 2048 bytes. printk can not support long line
exceed LOG_LINE_MAX which less than 1024. So loop printk until all
content are printed in init/main.c.

Change-Id: I4c40b5302d82122b93161fe30082f5abcfcad069
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-31 11:23:10 +08:00
Tao Huang
396ae1c301 ARM: rockchip_defconfig: Enable CONFIG_DTC_SYMBOLS
Required by Android.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iaf8da3f852f6f9647298f1379f8c1f2a12170123
2021-03-31 10:02:20 +08:00
Tao Huang
ae34a12515 arm64: rockchip_defconfig: Enable CONFIG_DTC_SYMBOLS
Required by Android.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id4cc964513967a2e8ad4fff92a15e0a485da555d
2021-03-31 09:56:32 +08:00
Tao Huang
2943395673 rk: kbuild: Introduce CONFIG_DTC_SYMBOLS
dtc generation of symbols by CONFIG_DTC_SYMBOLS.
For support device tree overlay.

Change-Id: Ia10496031bc02fd3a4ff98ab0acfc6fc9a54951b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-31 09:56:13 +08:00
Tao Huang
77c36d3572 ARM: rockchip_defconfig: update by savedefconfig
-CONFIG_MEMCG_SWAP=y which default y
-CONFIG_SECCOMP=y which default y
-CONFIG_POWER_AVS=y which is removed upstream.
-CONFIG_ZBOOT_ROM_TEXT=0x0 which default 0x0
-CONFIG_ZBOOT_ROM_BSS=0x0 which default 0x0
reorder some configs.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ifc45b074751a9ef8d0e5390102fe6c4cc9d5bab2
2021-03-31 09:51:51 +08:00
XiaoDong Huang
bc0263dea7 irqchip/gic-v3-its: flush base table if rk356x
Change-Id: Ia2b0dd3d47742c43939eb99d3f8adac8e1107603
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-03-29 20:10:37 +08:00
XiaoDong Huang
44cbfbc637 irqchip/gic-v3-its: force to config its tables as no-inner-cache in rk356x
Change-Id: Idebfe94622cbb8169f4d464a3152c7828683c72c
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-03-29 20:10:37 +08:00
XiaoDong Huang
a9d1129997 irqchip/gic-v3-its: add GFP_DMA32 flag for memory allocated for ITS in rk356x
Change-Id: Ic1d866733b348b86bbfdf2df4c0416a68eb422b7
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-03-29 20:10:37 +08:00
Tao Huang
03b4c8917e arm64: rockchip_defconfig: update by savedefconfig
-CONFIG_MEMCG_SWAP=y which default y
-CONFIG_SECCOMP=y which default y
-CONFIG_POWER_AVS=y which is removed upstream.
reorder some configs.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1b5651ce91a06f69a6cafb116ad2b67c1850a0a1
2021-03-29 19:40:30 +08:00
Tao Huang
91b217558a rk: arm64: support make image with script mkimg
Change-Id: I6067d9a4d2b68b63c449646f36255dde3d795611
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-29 15:44:01 +08:00
Tao Huang
847ff38921 dt-bindings: soc: rockchip: Revert "rk: revert to v4.19"
This reverts part of commit 251c226c35 ("rk: revert to v4.19").
To keep the changes of include/dt-bindings/soc/rockchip,boot-mode.h.

Change-Id: I4bcb721da1bea0600c92d4e23d33320bff8d0caf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-25 21:01:44 +08:00
Tao Huang
beda2dd272 ARM: dts: rockchip: bulk convert gpios to their constant counterparts (v2)
According to upstream commit 07f08d9cee ("ARM: dts: rockchip:
bulk convert gpios to their constant counterparts") replace
RK_FUNC_x -> x and RK_GPIOx -> x.

sed -i -e "
/rockchip,pins *=/bcheck
b # to end of script
:append-next-line
N
:check
/^[^;]*$/bappend-next-line
s/<RK_GPIO\([0-9]\) /<\1 /g
s/<\([^ ][^ ]*  *\)0 /<\1RK_PA0 /g
s/<\([^ ][^ ]*  *\)1 /<\1RK_PA1 /g
s/<\([^ ][^ ]*  *\)2 /<\1RK_PA2 /g
s/<\([^ ][^ ]*  *\)3 /<\1RK_PA3 /g
s/<\([^ ][^ ]*  *\)4 /<\1RK_PA4 /g
s/<\([^ ][^ ]*  *\)5 /<\1RK_PA5 /g
s/<\([^ ][^ ]*  *\)6 /<\1RK_PA6 /g
s/<\([^ ][^ ]*  *\)7 /<\1RK_PA7 /g
s/<\([^ ][^ ]*  *\)8 /<\1RK_PB0 /g
s/<\([^ ][^ ]*  *\)9 /<\1RK_PB1 /g
s/<\([^ ][^ ]*  *\)10 /<\1RK_PB2 /g
s/<\([^ ][^ ]*  *\)11 /<\1RK_PB3 /g
s/<\([^ ][^ ]*  *\)12 /<\1RK_PB4 /g
s/<\([^ ][^ ]*  *\)13 /<\1RK_PB5 /g
s/<\([^ ][^ ]*  *\)14 /<\1RK_PB6 /g
s/<\([^ ][^ ]*  *\)15 /<\1RK_PB7 /g
s/<\([^ ][^ ]*  *\)16 /<\1RK_PC0 /g
s/<\([^ ][^ ]*  *\)17 /<\1RK_PC1 /g
s/<\([^ ][^ ]*  *\)18 /<\1RK_PC2 /g
s/<\([^ ][^ ]*  *\)19 /<\1RK_PC3 /g
s/<\([^ ][^ ]*  *\)20 /<\1RK_PC4 /g
s/<\([^ ][^ ]*  *\)21 /<\1RK_PC5 /g
s/<\([^ ][^ ]*  *\)22 /<\1RK_PC6 /g
s/<\([^ ][^ ]*  *\)23 /<\1RK_PC7 /g
s/<\([^ ][^ ]*  *\)24 /<\1RK_PD0 /g
s/<\([^ ][^ ]*  *\)25 /<\1RK_PD1 /g
s/<\([^ ][^ ]*  *\)26 /<\1RK_PD2 /g
s/<\([^ ][^ ]*  *\)27 /<\1RK_PD3 /g
s/<\([^ ][^ ]*  *\)28 /<\1RK_PD4 /g
s/<\([^ ][^ ]*  *\)29 /<\1RK_PD5 /g
s/<\([^ ][^ ]*  *\)30 /<\1RK_PD6 /g
s/<\([^ ][^ ]*  *\)31 /<\1RK_PD7 /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)0 /<\1RK_FUNC_GPIO /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)RK_FUNC_\([1-9]\) /<\1\2 /g
" *.dts *.dtsi

Change-Id: I8ee2a66094cc25b0d72aba11a239f4fe9c76c4f4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-25 20:36:53 +08:00
Tao Huang
77bcbf172b arm64: dts: rockchip: bulk convert gpios to their constant counterparts (v2)
According to upstream commit d64420e816 ("arm64: dts: rockchip:
bulk convert gpios to their constant counterparts") replace
RK_FUNC_x -> x and RK_GPIOx -> x.

sed -i -e "
/rockchip,pins *=/bcheck
b # to end of script
:append-next-line
N
:check
/^[^;]*$/bappend-next-line
s/<RK_GPIO\([0-9]\) /<\1 /g
s/<\([^ ][^ ]*  *\)0 /<\1RK_PA0 /g
s/<\([^ ][^ ]*  *\)1 /<\1RK_PA1 /g
s/<\([^ ][^ ]*  *\)2 /<\1RK_PA2 /g
s/<\([^ ][^ ]*  *\)3 /<\1RK_PA3 /g
s/<\([^ ][^ ]*  *\)4 /<\1RK_PA4 /g
s/<\([^ ][^ ]*  *\)5 /<\1RK_PA5 /g
s/<\([^ ][^ ]*  *\)6 /<\1RK_PA6 /g
s/<\([^ ][^ ]*  *\)7 /<\1RK_PA7 /g
s/<\([^ ][^ ]*  *\)8 /<\1RK_PB0 /g
s/<\([^ ][^ ]*  *\)9 /<\1RK_PB1 /g
s/<\([^ ][^ ]*  *\)10 /<\1RK_PB2 /g
s/<\([^ ][^ ]*  *\)11 /<\1RK_PB3 /g
s/<\([^ ][^ ]*  *\)12 /<\1RK_PB4 /g
s/<\([^ ][^ ]*  *\)13 /<\1RK_PB5 /g
s/<\([^ ][^ ]*  *\)14 /<\1RK_PB6 /g
s/<\([^ ][^ ]*  *\)15 /<\1RK_PB7 /g
s/<\([^ ][^ ]*  *\)16 /<\1RK_PC0 /g
s/<\([^ ][^ ]*  *\)17 /<\1RK_PC1 /g
s/<\([^ ][^ ]*  *\)18 /<\1RK_PC2 /g
s/<\([^ ][^ ]*  *\)19 /<\1RK_PC3 /g
s/<\([^ ][^ ]*  *\)20 /<\1RK_PC4 /g
s/<\([^ ][^ ]*  *\)21 /<\1RK_PC5 /g
s/<\([^ ][^ ]*  *\)22 /<\1RK_PC6 /g
s/<\([^ ][^ ]*  *\)23 /<\1RK_PC7 /g
s/<\([^ ][^ ]*  *\)24 /<\1RK_PD0 /g
s/<\([^ ][^ ]*  *\)25 /<\1RK_PD1 /g
s/<\([^ ][^ ]*  *\)26 /<\1RK_PD2 /g
s/<\([^ ][^ ]*  *\)27 /<\1RK_PD3 /g
s/<\([^ ][^ ]*  *\)28 /<\1RK_PD4 /g
s/<\([^ ][^ ]*  *\)29 /<\1RK_PD5 /g
s/<\([^ ][^ ]*  *\)30 /<\1RK_PD6 /g
s/<\([^ ][^ ]*  *\)31 /<\1RK_PD7 /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)0 /<\1RK_FUNC_GPIO /g
s/<\([^ ][^ ]*  *[^ ][^ ]*  *\)RK_FUNC_\([1-9]\) /<\1\2 /g
" *.dts *.dtsi

Change-Id: I789e702620a4d0331d54474d48aaf68133795859
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-25 20:30:22 +08:00
Tao Huang
f2c8914ffe rk: kbuild: support build resource_tool
Change-Id: I7b55a5644d3818efac296a16b4009bf10becec97
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-25 18:18:27 +08:00
Tao Huang
4f023b9655 ARM: rockchip: no build mach-rockchip when CONFIG_ARM_PSCI
There is not need to build mach-rockchip when PSCI is enabled.
Save about 5K text, 7K data and fix compilation error for THUMB2_KERNEL.

Change-Id: Ieb17867592d7d49a8b983dc5c7e8d1d1df14d864
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-24 19:28:29 +08:00
Andy Yan
aa5ccab207 Use standard lz4 format for Image.lz4 on ARM64
The lz4 Legacy format(which specified by -l) is
not supported by U-Boot.

Change-Id: I6b94881117b59384daca4efd796c933e8dc9e5a6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-24 19:18:33 +08:00
Tao Huang
f45127c595 media/i2c/soc_camera: remove unused rockchip drivers
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I898b1035c9d591143ec35e7b4c137603201ef89a
2021-03-24 18:57:24 +08:00
Tao Huang
c2482146d1 rk: Makefile: add gcc-wrapper
Change-Id: Ie5025f30a747cd40e26eeb6ec939de28af899645
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-23 15:49:03 +08:00