Tao Huang
3e2dae58e3
fiq_debugger: CONFIG_RK_CONSOLE_THREAD depends on ARCH_ROCKCHIP
...
Make sure this bool config do not affected by gki_defconfig.
Fixes: 44f5b21367 ("fiq_debugger: print log by console thread")
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
Change-Id: Ied79a8b68580bacc4ec27cd98d38400e48de58ba
2021-07-19 16:08:11 +08:00
Tao Huang
861b88568a
of: CONFIG_DTC_SYMBOLS depends on ARCH_ROCKCHIP
...
Make sure this bool config do not affected by gki_defconfig.
Fixes: 2943395673 ("rk: kbuild: Introduce CONFIG_DTC_SYMBOLS")
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
Change-Id: I202378445d901e1bef20161483edc957b23d9fa1
2021-07-19 16:04:37 +08:00
Tao Huang
36040e7744
arm64: rockchip_defconfig: Disable CONFIG_CLK_RK1808/CONFIG_CLK_RK3308
...
RK1808/RK3308 are not supported by Android.
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
Change-Id: Ieb2271c973efd249d1d99f23b92621b6ec618104
2021-07-19 15:22:03 +08:00
Elaine Zhang
3b3d17ae81
clk: rockchip: rk1808: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: I798e59971594f7691f1ad2b3a3e67cdd37736883
2021-07-19 15:09:19 +08:00
Elaine Zhang
02e6224599
clk: rockchip: px30: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: Ibe09ff07f2c0182cea03e41b56afedcd94e88a44
2021-07-19 15:09:14 +08:00
Elaine Zhang
b218253046
clk: rockchip: rv1108: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: Ie65251277283e3770b05107b35c5516386d88a64
2021-07-19 15:09:04 +08:00
Elaine Zhang
24f8496691
clk: rockchip: rk3368: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: I2c3c40aa80343b98377676f8e721c70c1218db42
2021-07-19 15:09:04 +08:00
Elaine Zhang
8c5d7c5d0f
clk: rockchip: rk3328: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: Ie87e3c1acfe9a1f84b0b70d995fb1c85433cd998
2021-07-19 15:09:04 +08:00
Elaine Zhang
3fe07b5ab6
clk: rockchip: rk3308: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: I2240c33e410806aa7788f78b7ab4199bc93cd99a
2021-07-19 15:09:04 +08:00
Elaine Zhang
6c8702e6ff
clk: rockchip: rk3288: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: If93da1b970a5932b7ed64a857ec3e178bf6ae755
2021-07-19 15:09:04 +08:00
Elaine Zhang
312cde491e
clk: rockchip: rk3228: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: I3757624b6b4531eff488c8a9ed6f73da21648f4e
2021-07-19 15:09:04 +08:00
Elaine Zhang
0b00072ffb
clk: rockchip: rk3188: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: I08a179b52a4f09b5c7fc003d8ec773f03614896c
2021-07-19 15:09:04 +08:00
Elaine Zhang
99978df1da
clk: rockchip: rk3128: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: I152679d474d50abdf0617b9fff8524780f0100e9
2021-07-19 15:09:04 +08:00
Elaine Zhang
1acaeb7279
clk: rockchip: rk3036: support driver build as tristate module
...
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com >
Change-Id: I281ae6074a52e01832b357363b92191efadecff9
2021-07-19 15:09:04 +08:00
Tao Huang
eb3fa68f91
iommu: remove unused rk-iommu/iovmm driver
...
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
Change-Id: Ieca1544f10c294303d0d40c6b4c5e1a797e577a2
2021-07-19 14:08:18 +08:00
Simon Xue
75031f75e2
iommu: rockchip: declare iommu_ops to non const
...
If iommu_ops is const, kernel will crash like following:
Unable to handle kernel write to read-only memory at virtual address ffffffc00903c688
Mem abort info:
ESR = 0x9600004f
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
Data abort info:
ISV = 0, ISS = 0x0000004f
CM = 0, WnR = 1
swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000001b6d000
[ffffffc00903c688] pgd=00000001fffff003, p4d=00000001fffff003, pud=00000001fffff003, pmd=000000000c995003, pte=006000000cb01f83
Internal error: Oops: 9600004f [#1 ] PREEMPT SMP
Modules linked in: rockchip_iommu(+) rk808 rk808_regulator clk_rk3568 clk_rk808 clk_scmi clk_pwm pm_domains io_domain pinctrl_rk805 pinctrl_rockchip rockchip_cpuinfo
CPU: 2 PID: 1 Comm: init Not tainted 5.10.43 #112
Hardware name: Rockchip RK3566 RK817 TABLET LP4X Board (DT)
pstate: 20400005 (nzCv daif +PAN -UAO -TCO BTYPE=--)
pc : rk_iommu_probe+0x318/0x4a8 [rockchip_iommu]
lr : rk_iommu_probe+0x2f0/0x4a8 [rockchip_iommu]
sp : ffffffc01003b910
x29: ffffffc01003b910 x28: 0000000000000002
x27: ffffffc00903c988 x26: ffffffc00903c000
x25: ffffffc00903c978 x24: ffffff800ca466b0
x23: ffffffc00903c000 x22: 0000000000000000
x21: ffffff800ca46680 x20: ffffff81f0a0a410
x19: ffffff81f0a0a400 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000
x15: ffffffc011ce9d48 x14: ffffff81f0100a1c
x13: ffffffffffffffff x12: 0000000000000004
x11: ffffff81f010027c x10: 7f7f7f7f7f7f7f7f
x9 : 2c6b7173626d686f x8 : 0000000005f5e0ff
x7 : ffffffc01003b730 x6 : 00000000000012e0
x5 : ffffff81f0116c00 x4 : ffffff81f0116c00
x3 : ffffff81f09054b8 x2 : 10a37138512eb400
x1 : ffffffc00903e1c0 x0 : ffffffc00903c530
Call trace:
rk_iommu_probe+0x318/0x4a8 [rockchip_iommu]
platform_drv_probe+0x50/0xa8
really_probe+0x20c/0x3e8
driver_probe_device+0x54/0xb8
device_driver_attach+0x6c/0x78
__driver_attach+0xb0/0xf0
bus_for_each_dev+0x68/0xc8
driver_attach+0x20/0x28
bus_add_driver+0x168/0x1f8
driver_register+0x60/0x110
__platform_driver_register+0x40/0x48
rk_iommu_init+0x1c/0x1000 [rockchip_iommu]
do_one_initcall+0x48/0x2d8
do_init_module+0x58/0x3ac
load_module+0x1dbc/0x2158
__do_sys_finit_module+0xe4/0x100
__arm64_sys_finit_module+0x18/0x20
el0_svc_common.constprop.3+0x64/0x188
do_el0_svc+0x20/0x98
el0_svc+0x10/0x18
el0_sync_handler+0x8c/0xb0
el0_sync+0x14c/0x180
Code: 54000b09 9109a000 f90022a0 91070021 (f900ac01)
Change-Id: I16089d85a3add6b22047131e62e7bb4919b43a9e
Signed-off-by: Simon Xue <xxm@rock-chips.com >
2021-07-19 11:17:25 +08:00
Tao Huang
b8373952c2
input: touchscreen: gt1x: Allow building as module
...
the module will be called gt1x-ts.
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
Change-Id: If2b2188d1c9e881af83fd2fee1e6cd2f70e3ca76
2021-07-18 18:14:23 +08:00
Zhen Chen
6a2af737e9
Mali: midgard: Fix a runtime WARNING as below
...
[ 4.128429] WARNING: CPU: 0 PID: 247 at drivers/gpu/arm/midgard/mali_kbase_mem_linux.c:1772 kbase_mmap+0x380/0xa78
...
Treat VM_FAULT_NOPAGE as success of calling vmf_insert_pfn().
Take https://android.googlesource.com/kernel/hikey-modules/+/refs/heads/android12-5.10/midgard/mali_kbase_mem_linux.c as a reference.
Fixes: 970017f88e ("MALI: midgard: Fix all compile errors under kernel 5.10")
Change-Id: Ie0562d8024e58031ba8126aab42dc7005f08b071
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com >
2021-07-16 20:26:19 +08:00
Finley Xiao
37d5c1a6fd
opp: Add a summary tree in debugfs
...
On rk3568-evb1-ddr4-v10 the opp_summary looks something like as follow.
device rate(Hz) target(uV) min(uV) max(uV)
-------------------------------------------------------------------
platform-fde60000.gpu
200000000 825000 825000 825000
300000000 825000 825000 825000
400000000 825000 825000 825000
600000000 825000 825000 825000
700000000 900000 900000 900000
800000000 1000000 1000000 1000000
platform-bus-npu
900000000 0 0 0
1000000000 925000 925000 925000
cpu0
408000000 825000 825000 1150000
600000000 825000 825000 1150000
816000000 825000 825000 1150000
1104000000 825000 825000 1150000
1416000000 900000 900000 1150000
1608000000 975000 975000 1150000
1800000000 1050000 1050000 1150000
1992000000 1150000 1150000 1150000
Change-Id: Ia357b4088805cf640dd659f510dd031488bd3ab3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
2021-07-16 17:55:24 +08:00
Finley Xiao
3e45580f16
PM / devfreq: rockchip_dmc: Fix rate when enter isp and dulaview statuses
...
As the frequency can't be changed in isp and dulaview statuses,
the target frequency should be the bigger one, both in isp status
or in dulaview status.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
Change-Id: Id9182d591f615304f24ccba5816424a876046dc3
2021-07-16 16:29:11 +08:00
Finley Xiao
823b966dcf
PM / devfreq: rockchip_dmc: Fix misused IS_ERR_OR_NULL checks
...
Fixes the following warning:
drivers/devfreq/rockchip_dmc.c:2914
rockchip_dmcfreq_register_cooling_device() warn: passing zero to 'PTR_ERR'
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
Change-Id: Ia8b0811d0e27394e420b862305917314189f94be
2021-07-16 16:23:58 +08:00
Liang Chen
a26f8c19dd
PM / devfreq: rockchip_bus: support soc bus devfreq
...
Change-Id: Iba750d4522b99e88c16c8e4a77d3367fbb2a0d82
Signed-off-by: Tony Xie <tony.xie@rock-chips.com >
Signed-off-by: Liang Chen <cl@rock-chips.com >
2021-07-16 16:23:54 +08:00
Liang Chen
87e27bcaf0
PM / devfreq: rockchip_bus: add support for rk3568
...
Add support for rk3568 and init opp-table with rockchip_init_opp_table()
so that rockchip_bus can support pvtm and leakage.
Change-Id: Ief17dba8264906f987d4dac93b2e7344c98bc8fa
Signed-off-by: Liang Chen <cl@rock-chips.com >
2021-07-16 16:22:45 +08:00
Finley Xiao
aacc268cae
PM / devfreq: rockchip_bus: Fix invalid member dereference of cpufreq_freqs
...
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
Change-Id: I45521ebb19283f3e14a75974b25b8a8d4c64bde1
2021-07-16 16:22:45 +08:00
Tao Huang
fdf8dbe714
regulator: core: Call regulator_init later when CONFIG_ROCKCHIP_THUNDER_BOOT=y
...
Change-Id: I302079e585f374a7fddd207e6fd740b61b0df52c
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
2021-07-16 15:29:19 +08:00
YouMin Chen
a97e2d456d
PM / devfreq: rockchip-dfi: add support lpddr4x
...
Change-Id: Icd86a458dc9843e80d9206d620a1da6a71adf799
Signed-off-by: YouMin Chen <cym@rock-chips.com >
2021-07-15 10:56:20 +08:00
Finley Xiao
f35cf18299
PM / devfreq: event: Add new Rockchip NoC probe driver
...
This patch adds NoC (Network on Chip) Probe driver which provides
the primitive values to get the performance data. For example, RK3399
has multiple NoC probes to monitor traffic statistics for analyzing
the transaction flow.
Change-Id: I66f6708f0d244488ca08f0f1f1cb36b19c7a2d0a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
2021-07-15 10:55:00 +08:00
YouMin Chen
19abbe3ebd
dt-bindings: devfreq: rockchip_dfi: add rk3568 support
...
Change-Id: Id99f60a26f260ba9a4fb037fd0be12355c2d5abd
Signed-off-by: YouMin Chen <cym@rock-chips.com >
2021-07-15 10:54:59 +08:00
YouMin Chen
e0603b1c99
PM / devfreq: rockchip-dfi: add support for rk3568 dfi
...
Change-Id: I62d21e31cd56e82c04de675be502b261ba3740da
Signed-off-by: YouMin Chen <cym@rock-chips.com >
2021-07-15 10:54:59 +08:00
YouMin Chen
0369dd4ab2
PM / devfreq: rockchip-dfi: add support for rv1126 dfi
...
Change-Id: I65a403424b68804022025309f9af82b55c044192
Signed-off-by: YouMin Chen <cym@rock-chips.com >
2021-07-15 10:54:59 +08:00
YouMin Chen
d08d38b836
dt-bindings: devfreq: rockchip_dfi: add rv1126 support
...
Change-Id: Ie210fd8aa9fd686590385d3377540cd02a7dc867
Signed-off-by: YouMin Chen <cym@rock-chips.com >
2021-07-15 10:54:59 +08:00
YouMin Chen
354584ddce
PM / devfreq: rockchip-dfi: fix lpddr4 calculation error
...
Fix lpddr4 calculation error about access.
LPDDR4 BL(burst length) = 16,other DDR type BL(burst length) = 8.
Change-Id: Icc1b4f6764fa0b23ec1f7722bda8ffeff1da4ab7
Signed-off-by: YouMin Chen <cym@rock-chips.com >
2021-07-15 10:54:59 +08:00
YouMin Chen
b949c38cbd
PM / devfreq: rockchip-dfi: add support for rk1808 dfi
...
Change-Id: Id95eca244c666b103ce4f9676e2abbeb304196ac
Signed-off-by: YouMin Chen <cym@rock-chips.com >
2021-07-15 10:54:59 +08:00
YouMin Chen
20b5bce157
dt-bindings: devfreq: rockchip_dfi: Add rk1808 support
...
Change-Id: I8bd056dcc93f3c9c94b1b490340f8b040bb77d43
Signed-off-by: YouMin Chen <cym@rock-chips.com >
2021-07-15 10:54:59 +08:00
YouMin Chen
eefc791ec8
PM / devfreq: event: add support for px30 dfi
...
Change-Id: Ib6808d961b65d993fea05ab15d648d814d14a4a2
Signed-off-by: YouMin Chen <cym@rock-chips.com >
2021-07-15 10:54:59 +08:00
CanYang He
8d4209ee06
PM / devfreq: event: add support for rk3328 dfi
...
This adds the necessary data for handling dfi on the rk3328.
Change-Id: Id870f78dad3ddd6cb5771674a4e8905322f9e8ef
Signed-off-by: CanYang He <hcy@rock-chips.com >
2021-07-15 10:54:59 +08:00
CanYang He
0873229b24
PM / devfreq: event: make dfi more extension
...
after modify, rockchip_dfi_ops can apply to other platform use such
version ddr monitor. regardless of channel count, only one channel
of rk3288,rk3399,rk3328 can work. and regardless of monitor clk,
some platform like rk3328 monitor clk is always on.
Change-Id: Ia1c02a89116546ded385c5a6a3e36d020d66b7f3
Signed-off-by: CanYang He <hcy@rock-chips.com >
2021-07-15 10:54:52 +08:00
Liang Chen
7d494650c3
PM / devfreq: event: add support for rk3128 dfi
...
This adds the necessary data for handling dfi on the rk3128.
Access the dfi via registers provided by GRF (general register
files) module.
Change-Id: Ife9e9987224088434e878102b7d1c3b132e761ad
Signed-off-by: Liang Chen <cl@rock-chips.com >
2021-07-15 10:49:09 +08:00
Tang Yun ping
0519cdf40c
PM / devfreq: event: add support for rk3288 dfi
...
This adds the necessary data for handling dfi on the rk3288.
Access the dfi via registers provided by GRF (general register
files) module.
Change-Id: Ic7241af3c20a269ab362055dea04d260e01c50de
Signed-off-by: Tang Yun ping <typ@rock-chips.com >
2021-07-15 10:49:09 +08:00
Finley Xiao
b495cbf359
PM / devfreq: event: add support for rk3368 dfi
...
This adds the necessary data for handling dfi on the rk3368.
Access the dfi via registers provided by GRF (general register
files) module.
Change-Id: I96c2b4dcd34d90731b749ebdbe6922f01559d8e6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
2021-07-15 10:49:09 +08:00
Tao Huang
d15b4cd8ed
soc: rockchip: ROCKCHIP_THUNDER_BOOT depends on NO_GKI
...
Fixes: 451b327661 ("soc: rockchip: Add ROCKCHIP_THUNDER_BOOT config")
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
Change-Id: I372c0c73d3024e7c86620daac5ec30392e0af359
2021-07-14 20:40:58 +08:00
Tao Huang
d5b6ba694d
init/Kconfig: INITRD_ASYNC depends on NO_GKI
...
Fixes: 7be803f0d5 ("init: support init ramfs async")
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
Change-Id: I7fa7d3cb063fb31faf025d35b23bcb459b01ea8d
2021-07-14 20:37:39 +08:00
Tao Huang
b03830fcbe
input: rockchip_pwm_remotectl: Use irq_set_affinity_hint()
...
Fix build error when build as module by
replace irq_set_affinity() with irq_set_affinity_hint().
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
Change-Id: I1ccd70954a5910738bfe4c508046eda2f940a226
2021-07-14 20:17:44 +08:00
Finley Xiao
2761181ab1
arm64: dts: rockchip: rk3399: Add system monitor node
...
Change-Id: I77d9d047b87702d0633d80dc7f945c6672f2ccd5
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
2021-07-14 15:11:22 +08:00
Finley Xiao
450b89167b
arm64: dts: rockchip: rk3399: add cpu pvtm voltage table
...
stress test:
1. reboot
2. antutu, use governor performance
3. antutu, use governor interactive
4. Thomas-sRoomIII, use governor interactive
5. Thomas-sRoomIII, use governor userspace and sweep frequency
Change-Id: If12d2bd72ce3bba01021314265eba4f83a0072e1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
2021-07-14 14:58:07 +08:00
Finley Xiao
2329033783
arm64: dts: rockchip: rk3399: move opp tables to rk3399-opp.dtsi
...
Add a new dtsi file - rk3399-opp.dtsi, to configure opp-tables
for cpu, gpu and dmc.
Add rk3399-early-opp.dtsi for board with ES1, which need limit
frequency for cpu, gpu and dmc.
Change-Id: Ib57761fd5f405b0e79039d7a01e6e023d6f5dc2c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com >
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
2021-07-14 14:57:13 +08:00
Finley Xiao
92e72c556e
dt-bindings: rockchip-thermal: Support the RK3568 SoC compatible
...
Add a new compatible for thermal founding on RK3568 SoC.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
Change-Id: I5ec192a380ffb331120fa0fed20df83d5d83e8d9
2021-07-14 10:30:49 +08:00
Tao Huang
92d4c59160
nvmem: core: Call nvmem_init() early when CONFIG_ROCKCHIP_THUNDER_BOOT=y
...
rockchip_otp_module_init() depends on nvmem_init() to init nvmem_bus_type.
But rockchip_otp_module_init() and nvmem_init() are both in the same
subsys_initcall level.
Change-Id: I58bc66519fb76179be3e6a170048a67c0861b224
Signed-off-by: Tao Huang <huangtao@rock-chips.com >
2021-07-14 10:30:49 +08:00
Finley Xiao
e621ca5fd6
nvmem: rockchip-efuse: Add mutex lock for rk1808 efuse read
...
The rk1808 efuse read has some issues when several threads start to read
efuse through nvmem file node.
Thread1 thread2
1. timing_init
2. write auto_ctrl
3. delay timing_init
4. read status write auto_ctrl
5. if error goto to timing_deinit delay
The thread1 will read no finish bit and then goto error, the user will
see a "Input/Output Error".
The thread1 do timing deinit will cause thread2 halt on read status, and
the user will never success to do read efuse again.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
Change-Id: I3f462afd844686aac153acc0c33215fbd96827a3
2021-07-14 10:30:49 +08:00
Finley Xiao
bd2d7d615f
nvmem: rockchip-efuse: Update driver to use clk_bulk array APIs
...
Change-Id: I0489a992ed7edb3317b1b5a57522df3a5374cec2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com >
2021-07-14 10:30:49 +08:00