Commit Graph

854944 Commits

Author SHA1 Message Date
Tao Huang
3b31279237 clk: rockchip: rk3568: Fix gcc warning
drivers/clk/rockchip/clk-rk3568.c:162:2: warning: this decimal constant is unsigned only in ISO C90
  RK3568_CPUCLK_RATE(2208000000, 1, 1, 1, 9, 9, 9, 9),

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I697e4b2a9611cf49233d40361863cc820f20d1fa
2020-09-22 09:57:07 +08:00
Yiqing Zeng
b673079429 media: i2c: imx307 change 25fps to 30fps
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I2871f0c69ea691c2c8ae6ce7d300394d5697ba16
2020-09-22 09:16:09 +08:00
Tao Huang
0e3ad9a0f4 net: wireless: rockchip_wlan: rtl8821cs: Fix clang warning
drivers/net/wireless/rockchip_wlan/rtl8821cs/hal/phydm/phydm_dfs.c:1507:4:
warning: misleading indentation; statement is not part of the previous 'if'
[-Wmisleading-indentation]
                        dfs->pri_cond4 = 1;
                        ^

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2aabcd339f71061872327712fbfeb39176073c69
2020-09-21 18:41:38 +08:00
Simon Xue
56a06f65ac iommu: don't break detach if iommu shared by more than one master
Change-Id: I4fade6e770e124dcaca41d122965e8696f268556
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-09-21 16:38:10 +08:00
Hu Kejun
c6e7c35ce4 ARM: dts: rockchip: add csiphy0_pclk to thunder_boot_rkisp for rv1126-thunder-boot
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Id797c8cca9afc9a7d7582970eb5c96bd9c63e35e
2020-09-21 16:35:11 +08:00
Hu Kejun
75200228a6 media: rockchip: isp: fix scr clock is not disabled after app run
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I0fb35bcb4479b9741376fe20e2bf9ea388034abe
2020-09-21 16:35:11 +08:00
Herman Chen
0eca6b2097 video: rockchip: mpp: Add git version info
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I62b32a768c3c64d5477b56cc53527d5fdec7d4df
2020-09-21 16:34:16 +08:00
Lin Jianhua
a7b55392ab HACK: media: videobuf2: allow cache hints on all memory types
This is a workaround to bypass RKISP dma buf sync between MIPI TX(mmap)
and MIPI RX(userptr|dmabuf).

Change-Id: I3d4966f35f2f3330816ac8a3d614486aa3276ebf
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2020-09-21 14:51:37 +08:00
Yu Qiaowei
1e72e1fb40 video/rockchip: rga2: Support A+B->C blend mode.
The mode A is src, B is src1, and C is dst.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I124665d7b727d921b33c0efbe5f3b048141a3879
2020-09-21 10:15:03 +08:00
Ding Wei
34564b6204 video: rockchip: mpp: fix irq issue for rkvenc
1. before reset, it need set mask to avoid irq reentry.
2. rearranged the write of L1 register.

backtrace:
[   33.276048 ] Exception stack(0xee8b9e20 to 0xee8b9e68)
[   33.276059 ] 9e20: dd539040 ee0f6080 00000000 00000104 00000020
00000080 42800200 000000d2
[   33.276071 ] 9e40: 00000001 b0e2396c dd539040 ee0f6080 00000348
ee8b9e70 b03e5044 b03e0ec0
[   33.276080 ] 9e60: 80070013 ffffffff
[   33.276093 ] [<b0101a78>] (__irq_svc) from [<b03e0ec0>]
(mpp_write_req+0x4c/0x94)
[   33.276108 ] [<b03e0ec0>] (mpp_write_req) from [<b03e5044>]
(rkvenc_run+0x1e8/0x2a0)
[   33.276122 ] [<b03e5044>] (rkvenc_run) from [<b03e0bcc>]
(mpp_task_try_run+0x24c/0x3ac)
[   33.276137 ] [<b03e0bcc>] (mpp_task_try_run) from [<b013ccdc>]
(process_one_work+0x1f0/0x408)
[   33.276151 ] [<b013ccdc>] (process_one_work) from [<b013d9b4>]
(worker_thread+0x30/0x564)
[   33.276165 ] [<b013d9b4>] (worker_thread) from [<b014290c>]
(kthread+0x140/0x170)
[   33.276178 ] [<b014290c>] (kthread) from [<b01010d8>]
(ret_from_fork+0x14/0x3c)

Change-Id: I82c56ed384507dbd0d01973dc9d88fa7fc255ed4
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-09-21 09:49:15 +08:00
Cai YiWei
1dc03aa0c1 media: rockchip: isp/ispp procfs add work info
Change-Id: I297e7075abdbf83ae056406a928bc247acf6c1e2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-09-18 10:30:26 +08:00
Cai YiWei
c5a7b6cd72 media: rockchip: ispp: add monitor to restart if abnormal
enable monitor:
add rockchip,restart-monitor-en to rkispp node on dts or
echo Y > /sys/module/video_rkispp/parameters/monitor

Change-Id: I481bb6021166a14dc8f115fe76fcfba092662a7a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-09-18 10:30:26 +08:00
Cai YiWei
ac06ce8496 media: rockchip: isp and ispp version to v0.1.7
Change-Id: Id6c67618747b6b76ac119024675e8ad52228a647
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-09-18 10:28:33 +08:00
Yiqing Zeng
1434763f0e media: i2c: ov2718 add g_mbus_config
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I15278582c25f91c31316611f269cabc2fa13311b
2020-09-18 10:27:33 +08:00
Yiqing Zeng
53ad625648 media: i2c: sc2310 add set flip ctrl
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I33ae9ca26063b7195dbf088262e4f2bbafd1e55d
2020-09-18 10:22:46 +08:00
Cai YiWei
acb35835b0 media: rockchip: cif/isp/ispp vb2 support cache hints
Change-Id: Ib32ebe66eb912ca8bec84ed6512130801b2fdc27
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-09-17 11:32:28 +08:00
Cai YiWei
2f3804a21c media: rockchip: isp: clear csi rdbk fifo when first open
Change-Id: Ib6ccf4656d1ce4926364736bdba9f7c03aab8141
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-09-17 10:42:50 +08:00
Hu Kejun
be6c7ee5a3 media: rockchip: isp: fix rawaf is disabled in config function
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I9fe6243ffae3ceef409fd297c00406b892ab0737
2020-09-17 10:08:16 +08:00
Sergey Senozhatsky
59a5bae71b BACKPORT: media: videobuf2: do not sync caches when we are allowed not to
Skip ->prepare() or/and ->finish() cache synchronisation if
user-space requested us to do so (or when queue dma direction
permits us to skip cache syncs).

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
(cherry picked from commit dcf3bfe7c7)

Conflicts:
	drivers/media/common/videobuf2/videobuf2-core.c

Change-Id: I9cb129fa00f5355fbcda552a3c08052c7c324743
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2020-09-17 10:07:58 +08:00
Sergey Senozhatsky
00d81d9d97 BACKPORT: media: videobuf2: handle V4L2 buffer cache flags
Set video buffer cache management flags corresponding to V4L2 cache
flags.

Both ->prepare() and ->finish() cache management hints should be
passed during this stage (buffer preparation), because there is
no other way for user-space to tell V4L2 to avoid ->finish() cache
flush.

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
(cherry picked from commit f5f5fa73fb)

Conflicts:
	drivers/media/common/videobuf2/videobuf2-v4l2.c

Change-Id: I6d90d080a7468be5e8f96b26dcd36bf583bd5741
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2020-09-17 10:07:58 +08:00
Sergey Senozhatsky
8061fe2a75 BACKPORT: media: videobuf2: add cache management members
Extend vb2_buffer and vb2_queue structs with cache management
members.

V4L2 UAPI already contains two buffer flags which user-space,
supposedly, can use to control buffer cache sync:

- V4L2_BUF_FLAG_NO_CACHE_INVALIDATE
- V4L2_BUF_FLAG_NO_CACHE_CLEAN

None of these, however, do anything at the moment. This patch
set is intended to change it.

Since user-space cache management hints are supposed to be
implemented on a per-buffer basis we need to extend vb2_buffer
struct with two new members ->need_cache_sync_on_prepare and
->need_cache_sync_on_finish, which will store corresponding
user-space hints.

In order to preserve the existing behaviour, user-space cache
managements flags will be handled only by those drivers that
permit user-space cache hints. That's the purpose of vb2_queue
->allow_cache_hints member. Driver must set ->allow_cache_hints
during queue initialisation to enable cache management hints
mechanism.

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
(cherry picked from commit 6d2199868a)

Conflicts:
	include/media/videobuf2-core.h

Change-Id: I26952d567d599d23e3867e8c1fb735d70e4cae5c
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2020-09-17 10:07:58 +08:00
Liang Chen
2a4bfd1585 ARM: config: rockchip: enable CONFIG_ARM_CPU_TOPOLOGY for rk3308 aarch32
We need enable CONFIG_ARM_CPU_TOPOLOGY for scheduler.
The default value of CONFIG_ARM_CPU_TOPOLOGY is y, so just delete
'# CONFIG_ARM_CPU_TOPOLOGY is not set'.

Change-Id: I6917cfe7d521fa00885e82743738f12f832512f9
Signed-off-by: Liang Chen <cl@rock-chips.com>
2020-09-16 19:28:59 +08:00
Nickey Yang
73ad27b791 ARM: dts: rockchip: correct battery info for rv1126-bat-ipc-v10
vcc_bat has no voltage divider, so correct it.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: Ibb3eb7b32c84414bf47677c422d2cbf3b1ddbac3
2020-09-16 17:28:11 +08:00
Ziyuan Xu
0dcb06bc14 ARM: configs: rv1126-battery.config: enable gpio-poweroff
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I770534fbd18f04d032130a04efc8f167a839b977
2020-09-16 17:23:54 +08:00
Ziyuan Xu
3991a76128 ARM: dts: rockchip: use gpio-poweroff to shutdown rv1126-bat-v10 board
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Iad8106e9ad5896011120c38235d1a9ad9d7033fd
2020-09-16 17:23:45 +08:00
Ziyuan Xu
3694473201 power: reset: gpio-poweroff: force override pm_power_off for rockchip
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I4a8cdeaaf35d51ca39ee7b0336888219d3eca9e1
2020-09-16 17:23:34 +08:00
Finley Xiao
d712e9b8d5 regulator: core: Add support to limit min_uV during system startup
Now a regulator device can supply multiple consumers at the same time,
if a consumer starts and set a low voltage, another consumer doesn't
start in kernel but has been set a high frequency in bootloader will
abort.

This patch Adds support to limit min_uV during kernel startup to make
sure the voltage can suit the needs of all consumers.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I6b65a10d247564bea282e628ee338f7919cbb34d
2020-09-16 15:28:46 +08:00
Finley Xiao
5072177b4d regulator: debugfs: Adding debugfs functions into regulator framework
This change allows the user to read and edit regulator information
in user space through the debugfs file system.

Base on msm work.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I038d2ad43ece4ed927db1ff36c7d1a644c1cf3d1
2020-09-16 15:27:51 +08:00
Finley Xiao
77396ab793 Revert "regulator: debugfs: Adding debugfs functions into regulator framework"
This reverts commit 6b16065afa.

Change-Id: I452cadb8123254be33688ff9cecc08fa4300e604
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-09-16 15:25:49 +08:00
Finley Xiao
3343e43b11 Revert "regulator: core: Add support to limit min_uV during system startup"
This reverts commit d7e9e2622d.

Change-Id: I03c9adb98e99764ec9800da5f3745e550bb37304
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-09-16 15:22:48 +08:00
Jon Lin
eff0b09319 drivers: rkflash: Check bad block mark in spare 1st and 2nd byte
Change-Id: I7d1b11be4ef8e1b8aa3cf9deba4463f16a970b07
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-09-16 11:37:56 +08:00
William Wu
153905db2e usb: dwc3: gadget: only resize fifo for isoc ep with 1024 maxpacket
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If28098b07a1d3bf0a35c4ff37ae7f548283191c7
2020-09-16 11:36:56 +08:00
Weiwen Chen
cede220648 ARM: dts: rv1126-38x38-v10-emmc: fix npu frequency
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: Ib31889c49ba8708f3ff1a44ffdc2c64078841719
2020-09-16 11:31:34 +08:00
Zefa Chen
2bbbb85837 media: i2c: imx415 support DOL3 10bit 1485Mbps/lane
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ibf6ad4beb160083d6daa8e4a13753dea93b0297d
2020-09-16 11:30:04 +08:00
Yu Qiaowei
b4ccced3e0 video/rockchip: rga2: Fix some errors.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I2bc574f6423da23d44a0b5361e216854636d83a0
2020-09-16 11:24:39 +08:00
Wang Jie
c8ebec26c7 input: sensor: sensor supports modularity
The sensor-dev framework and device drivers depend on each other,
causing sensor initialization to fail. eg:
[    2.907011] i2c i2c-4: sensor_probe: mpu6500_acc,000000006539f8ba
[    2.907626] sensors 4-0068: sensor_chip_init:ops is null,sensor name is mpu6500_acc
[    2.908318] i2c i2c-4: sensor_probe failed -1

Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: Ic1f320a7c40bde0c4e3db3dc43542302d9270f42
2020-09-15 20:40:31 +08:00
Kever Yang
4869b05bb7 input: touchscreen: Support gsl3673 build as modular
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I530763b02bb2e1818ade3571e5984d9dce642648
2020-09-15 20:21:22 +08:00
Yiqing Zeng
4a1cccace9 media: i2c: add sc2310 sensor driver
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I240aea1457bf344a1ca6b410433ddf75edb33deb
2020-09-15 20:19:24 +08:00
Zefa Chen
73ac2e5cb6 leds: leds-rgb13h: Intensity can be set in any mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I16f70e812d2b0932f7d1a39d8c819975760c9f6d
2020-09-15 20:18:44 +08:00
Kever Yang
614dbbdcda input: remotectl: Set REMOTECTL driver as tristate
The removectl drivers may be build as driver, set Kconfig to tristate to
support it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Id786747e0eb0748644dc0fe76110e2805d4f2500
2020-09-15 20:13:46 +08:00
Sugar Zhang
bfadc5e3c3 rk_headset: Add support for driver to be built as module
Change-Id: Id85bea200c99a08f8a67bd9e3a6d0c929d974ba0
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-09-15 20:12:09 +08:00
Joseph Chen
669923d002 power: rk818-battery/charger: Support building as module
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I39bbf5d0d4ea9c296a39267500cb0d46acd5e386
2020-09-15 20:09:56 +08:00
Joseph Chen
2213ba67cc power: rk816-battery: Support building as module
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I3da83ddf51f742daa4fad6540ed4499fa58a6d28
2020-09-15 20:09:50 +08:00
shengfei Xu
3e84048355 power: rk817_charger: Support building as module
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I4f1e7b2250001c04c5964abcf736d68e8f9317e2
2020-09-15 20:04:46 +08:00
shengfei Xu
53524e0241 power: supply: rk817_battery: Support building as module
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ic9479fc7358d3953aae5e54b6ae82e9babbce1f9
2020-09-15 20:04:39 +08:00
shengfei Xu
24cdbe2d6b soc: rockchip: suspend config: enable module
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Icb217f3ebcee418b6f36223865ab631645be2523
2020-09-15 20:03:32 +08:00
Joseph Chen
fd44df1817 video: rockchip: mpp: allow rockchip sip as module
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0fcc27563a5e406b0383c074c68d08bfc7d837af
2020-09-15 19:59:45 +08:00
Joseph Chen
91422abe8b firmware: rockchip_sip: Support building as module
- Export API for other drivers;
- Add a local cpu_logical_map() implementation since
  cpu_logical_map() is not export.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I784dbbbaf76efaca0bbdcf0d183518be88a7f0c7
2020-09-15 19:58:23 +08:00
Finley Xiao
9c086e2acc cpufreq: rockchip: Add support to be build as module
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I63b80d9c19ab73424046567ff08b82ab8f8558fa
2020-09-15 19:54:58 +08:00
Finley Xiao
1890971d65 soc: rockchip: system-monitor: Add support to be built as module
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: If59392732efe0dc1cb20e49115a1a1f65854bd7a
2020-09-15 19:53:27 +08:00