Commit Graph

853627 Commits

Author SHA1 Message Date
Sugar Zhang
d41061eefc ARM: dts: rockchip: Adds dts for rv1109 fpga board
Change-Id: Id7294812c0f4147b9c4c124437a8b8897578bc9f
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-05-25 18:19:50 +08:00
Sugar Zhang
67a9bae411 ARM: dts: rockchip: Adds core dtsi for rv1109
rv1109 is a high-performance vision processor soc for
ipc/cvr/smart doorbell, especially for AI related application.

Change-Id: I4f5ed7dddd12a82d0aa006374bed0f5341132993
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-05-25 18:19:50 +08:00
Finley Xiao
7f7d18ba2d clk: rockchip: Add clock controller for the RV1126
Add the clock tree definition for the new RV1126 SoC.

Change-Id: I4a329d27d3a84f43a0ae956bce16597706eeb1ae
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-25 18:19:50 +08:00
Sugar Zhang
722fe56fb6 ARM: configs: Adds rv1126_defconfig
Enable CONFIG_VMSPLIT_3G_OPT
Allows for 1GB systems to have their RAM entirely mapped as low memory.

IMX347 is for RV1126 sphericalipc ddr3 v10 board.
OS04A10 is for RV1126 ipc2 ddr3 v10 board.
gc4c33 is for RV1126 ai camera board

Enable CONFIG_PSTORE_PMSG
Allow user space log to pstore.

Enable CONFIG_USB_STORAGE
For support u disk.
You can disable it if you don't need it.

Enable CONFIG_RK_CONSOLE_THREAD
For better boot time and low irq latency.

Change-Id: I53139a76a0e5a95c401efe31cc7bf793b554c036
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Elon Zhang <zhangzj@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Signed-off-by: Zhibao Huang <hzb@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-05-25 18:19:50 +08:00
Sugar Zhang
a9d3b3d537 soc: rockchip: Adds CPU_RV1126 config
Change-Id: I7669e309a6fa663d04f50d1032f2c9054c82d90a
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2020-05-25 18:19:49 +08:00
Finley Xiao
2652e6302a clk: rockchip: implement the composite brother branch type
There is a new clock branch have a form like
            |--\
---[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>
2020-05-25 18:19:49 +08:00
Finley Xiao
8001749f9c 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>
2020-05-25 18:19:49 +08:00
Finley Xiao
f5463b5262 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>
2020-05-25 18:19:49 +08:00
Caesar Wang
726602e766 arm64: dts: rockchip: remove edp_hpd pinctrl for rk3399 linux
The edp_hpd pin had the conflict with the hdmi cec, enable the hdmi-cec
by default.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Id129364c352377c59f2b2ff48dd97ffefaf6af11
2020-05-25 18:19:49 +08:00
Caesar Wang
c3f028f9df arm64: dts: rockchip: reasonable alllcation of VOP on rk3399 linux
Most users used 4K monitors with HDMI on RK3399/RK3399PRO platform, but no
more than 2K monitors on EDP/DSI panels.

So the reasonable that HDMI connected to VOPB control, and EDP/DSI shound
be connected to VOPL.

Change-Id: Id97efc5d6d534c302aa52ad00e705c093457f41e
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2020-05-25 18:19:49 +08:00
William Wu
eda2124949 usb: dwc3: gadget: properly skip over trbs on ep_dequeue
There is a problem that incorrectly advances the TRB dequeue
pointer if more than one request in the started_list need to
be dequeue. If the request was already started, we issue the
END_TRANSFER command, then wait for END_TRANSFER completion
and only after that jump over the TRBs of the request by
clearing HWO and incrementing the TRB dequeue pointer. But we
don't skip over the TRBs of the rest started request, this
cause we to get incorrect TRB dequeue pointer on completion
next time.

We can easily reproduce this problem on RK3399 EVB Android Q
platform. Use MTP/PTP to transfer a big file, and then cancel
the transition, check if it can transfer again. If retransmission
fails, the problem happens. And if you enable the DWC3 trace
via tracing interface:

echo 1 > /sys/kernel/debug/tracing/events/dwc3/enable

You can get the error log:
irq/71-dwc3-1591  [000] d..1   389.337189: dwc3_complete_trb: ep1out: trb 00000000213b87d9 buf 00000000a84c0000 size 16384
irq/71-dwc3-1591  [000] d..1   389.337195: dwc3_gadget_giveback: ep1out: req 00000000d8c093a2 length 4294951424/512 zsI ==> 0
...
kworker/u12:2-111   [003] ....   389.337380: dwc3_free_request: ep1out: req 00000000d8c093a2 length 4294951424/512 zsI ==> 0

The req actual length is error. It's because that it get the
incorrect TRB dequeue pointer that belong to previous request.

Change-Id: I123ff779d5e2933449581f8b570e2e6ad6b75458
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-05-25 18:19:49 +08:00
Finley Xiao
d424a00590 video: rockchip: mpp: Add devfreq support for rkvenc
Change-Id: If962062014670471d6e7e18fdde5d6a5c2e9cc11
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-25 18:19:49 +08:00
Hu Kejun
3f34c6b39f media: i2c: add gt9760s vcm driver
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I766e9678d7dd0f30a3888b4b320e995cc9b5f9da
2020-05-25 18:19:48 +08:00
Elaine Zhang
ebb67a7240 dt-bindings: regulator: Document Rockchip RK860X regulators
Document the regulator and add a rockchip vendor-prefix.

Change-Id: I3084f2083644e30145ccda2e13e2e81c6470797a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-05-25 18:19:48 +08:00
Zefa Chen
07f2d39135 media: v4l2: add subdev support for ir-cut
Change-Id: Ib39a2e918d0e41574c1f368275a8787a31b5b800
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2020-05-25 18:19:48 +08:00
Zefa Chen
96ccebdd23 media: add rockchip ir_cut driver
Change-Id: Ie29c235e22e19fb5a0cd5c080f46eaba32ec57fc
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2020-05-25 18:19:48 +08:00
Elaine Zhang
eb1731965c regulator: fan53555: add support for Rockchip RK860X regulators
Rockchip RK860X regulators share the exact same functionality and
register layout as the Fairchild FAN53555 regulators.
Therefore extend the driver to add support for them.

Both types use the same vendor id in their ID1 register, so it's not
possible to distinguish them automatically.

Similarly, the types also do not match. Type 8 used by the RK8603
and RK8604 start at 500mV and increment in 6.25mv steps,
while the FAN53555 type 8 starts at 600mV and increments in 10mV steps.
And the en register is also differences.

Change-Id: Id93f85de91b79a1922b1efc27771f30dd7bc8bcb
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-05-25 18:19:48 +08:00
Ding Wei
6b8ae289fa video: rockchip: mpp: fix error for pop twice
when wait time out twice, it may wait recursion, and then
trigger pop twice.

Change-Id: I6c689f4267e0c03e8cf1e41d68796a6d042afce7
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-05-25 18:19:48 +08:00
Wang Panzhenzhuan
c227825078 media: i2c: gc0312: fix vsync config error
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I2ab99ff58aea76ffe09ae162e873cf7d7574f91f
2020-05-22 10:01:12 +08:00
Ding Wei
879330b36d video: rockchip: mpp: re-write mpp_wait_result
1. use task->state to mark the state of task in taskqueue.
2. add delay work in case of hardware dead, then abort current task.
3. if wait timeout, set task->abort_requet for work thread to abort it.

relative dump stack:
<4>[84461.189906]  __list_del_entry_valid+0x30/0x9c
<4>[84461.190616] cc60  00000000 00000000 00000000 00000048 00014b0e
00000550 00000598 00000620
<4>[84461.191018]  mpp_task_finish+0x108/0x15c
<4>[84461.191735]
<4>[84461.191735] X29: 0xffffff800e0cba50:
<4>[84461.192100]  vdpu_isr+0x60/0xbc
<4>[84461.192536] ba50  00000000 ffffff80 f153c4c0 ffffffc0 08109fe0
ffffff80 0e0cba68 ffffff80
<4>[84461.192828]  mpp_dev_isr_sched+0x4c/0x94
<4>[84461.193545] ba70  0e0cba68 ffffff80 b8a42e00 04d029b0 f0401000
ffffffc0 00000000 00000000

Change-Id: I2391a97fca4b6a7fddbf88a05cedf6f2fe564be0
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-05-22 09:25:15 +08:00
Wu Liangqing
8a72cad21e arm64: dts: rockchip: modify backlight levels value for rk3368-tablet
Change-Id: Ic4256893beabd7cbc32800db79f72fd515122d62
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-09 18:17:13 +08:00
Elaine Zhang
22fac96c52 soc: rockchip: power-domain: use DOMAIN_RK3399_PROTECT for pd_hdcp
Make pd_hdcp keep on during startup, to handle the hdmi display
which used hdcp.

Change-Id: I3c12fd5b6aa242bb658c19f5571cd45d3c245b5f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-05-09 17:16:34 +08:00
Wu Liangqing
125d754e00 arm64: dts: rorkchip: emmc no set pinctrl for rk3368 board
for nand and emmc compatibility

Change-Id: If335031c084d87677de366123198dc9455959ca4
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-09 17:13:00 +08:00
Caesar Wang
13f5535ab2 arm64: dts: rockchip: move the common things to the rk3399-linux.dtsi
In order to reduce the duplication of code, let's move the common things
to the rk3399-linux.dtsi.

Change-Id: I066d99642190cfcbe1c8d16d05849297176f9e6b
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2020-05-09 16:58:08 +08:00
Sandy Huang
3399763e20 arm64: dts: rockchip: enable rga for rk3399-linux.dtsi
Change-Id: I55389b59f54ba4195e9532d00d9a1f54a767f2fd
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-05-09 16:58:08 +08:00
Caesar Wang
9a11c3675f arm64: dts: rockchip: enable ramoops for rk3399-linux.dtsi
This patch enables the ramoops to fetch some logs for debugging and
testing, the log will save on /sys/fs/pstore/console-ramoops*.

Change-Id: I47c9efbd1a0e17228e07fd6ad87a446babb265ab
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2020-05-09 16:58:08 +08:00
Caesar Wang
9855e0c16e arm64: dts: rockchip: update vcodec dts for rk3399 linux
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I9ce2b1322c0c7b5d1f2a52eb164366e1c084c6e2
2020-05-09 16:58:08 +08:00
Caesar Wang
051c9276b9 arm64: dts: rockchip: support ov13850 camera on rk3399 evb ind with linux
This patch enables the rkisp and mipi camera for rk3399 evb ind board,
enable the ov13850 board with mipi'rx0 by default.

Change-Id: I2e4949088073fc8032abefd852666f14860552c8
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2020-05-09 16:58:08 +08:00
Caesar Wang
c2395e6617 arm64: dts: rockchip: add rk3399 evb ind v11 board support for linux
Evb ind is part of a family of boards called rk3399 Industry development.
As best as possible, the properties shared by the rk3399 family are placed
in rk3399-evb-ind.dtsi, while Evb-linux specific bits are in
rk3399-evb-ind-lpddr4-linux.dts. This does not add full support for the base
Evb ind board.

Working and tested (to some extent):
* cluster cpu/gpu support -- including frequency, performance
* DVFS: included cpu/gpu/ddr
* UART / console
* LPDDR4
* TF cards
* USB2/USB3
* Thermal
* Touchscreen
* EDP
* Backlight
* System Key (ADC and Power keys, including the reset/vol+/recovery/maskrom)
* Wifi
* Bluetooth / Webcam
* eMMC
* VIDEO: tested the h264 video source
* AUDIO: play and mic music
* HDMI Out
* GMAC
Not tested:
* RS485
* CIF
* Mini Pcie
* IR Receive
* Sensor
* CAMERA

Note: this patch had *not* verified the all functions, it can bringup for
v11 board and some basic functions.
(included wifi/bt, camera, display, video, usb...and so on.)

Change-Id: Ibae4853f4c11d3a269cd3aa96478c45cdb126597
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2020-05-09 16:58:08 +08:00
Caesar Wang
0d423cbb03 arm64: dts: rockchip: rk3399-evb-ind: move the configure for right place
Move the common configure are used for rk3399-evb-ind.dtsi.

Change-Id: Ia42ed2bb823d3d30c8433be5bfc07ed48e6b0015
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2020-05-09 16:58:08 +08:00
William Wu
9bb842fa92 usb: gadget: uvc: configfs: fix the desc of framebased format
Refer to the spec "USB_Video_Payload_Frame_Based_1.1", we
set the bBitsPerPixel of framebased format descriptor to 16,
it means that 16 bits per pixel used to specify color in the
decoded video frame. And set bVariableSize of framebased format
descriptor to 1, it means that the data within the frame is of
variable length from frame to frame is variable.

With this patch, the uvc H264 format can work normally on
Linux OS platform.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ibc25b5f67efb8cfcae9d66a509399cfe896f7943
2020-05-09 16:51:50 +08:00
Finley Xiao
fd315abb67 soc: rockchip: opp_select: Add support to adjust leakge
Change-Id: Ie209113abac74660014a6dc4984fd13ef76e02e2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-09 16:45:10 +08:00
Finley Xiao
746b4c8606 arm64: dts: rockchip: rk3368: Add leakage temperature and voltage for cpu
Change-Id: I4228a3d5787e29ea697cd022575132cca31c4fb5
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-09 16:32:09 +08:00
Alex Zhao
f70750b3b4 arm64: rockchip_defconfig: enable CONFIG_RTL8821CS
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: Ib01765c0a0ae54565af008ea4c5ccc75f0d0c2bd
2020-05-09 15:23:27 +08:00
Alex Zhao
5fd52cc320 net: rockchip_wlan: add rtl8821cs driver: v5.8.1.2_35313.20191016_COEX20191014-4141
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: Icca896b4f64a7caa348b5f488ee49ce910033ddc
2020-05-09 15:23:12 +08:00
Tao Huang
9451c0bf46 arm64: dts: rockchip: rk3399-sapphire-excavator-edp: remove isp node
Fixes: 5ea0aa0609 ("arm64: dts: rockchip: rk3399-android: remove isp node")
Change-Id: Idfecde016a7bfb78008c3d67223b0d8568d35f02
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-05-09 15:10:46 +08:00
shengfei Xu
70282202ba regulator: rk809 & rk817: correct enable/disable for runtime
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I4b4b29c6f31b3c877a3d74d791e14879620c6ff3
2020-05-09 14:53:21 +08:00
Tao Huang
5572fc7fe8 nvmem: rockchip-otp: refactor rockchip_data
Add clocks and reg_read to rockchip_data, allow support more SoCs.

Change-Id: I45271d69dae808d741c953ce61b921b9a3d21202
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-05-09 14:51:50 +08:00
Finley Xiao
d821f78322 nvmem: rockchip-efuse: Update driver to use clk_bulk array APIs
Change-Id: I0489a992ed7edb3317b1b5a57522df3a5374cec2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-09 14:08:55 +08:00
Finley Xiao
3758737250 nvmem: rockchip-otp: Add support to initialize otp when probe
Change-Id: I6ae99f68394787fc2e8e6868d788390f271073ed
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-05-09 10:30:14 +08:00
Wu Liangqing
04e6b38f51 net: wireless: rockchip_wlan: bcmdhd enabled CONFIG_BCMDHD_OOB
Fixes: 9d5a7a9c5a ("net: wifi: rockchip_wlan: add wifi6 support for bcmdhd chipset")
Change-Id: I16e0ede9ce03a5f19c7bdfa78db3051ff20c02b1
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-09 10:29:40 +08:00
Wu Liangqing
5ea0aa0609 arm64: dts: rockchip: rk3399-android: remove isp node
Change-Id: Ia89c18b3c5957980c5a17991effc93250771db6f
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-09 10:25:04 +08:00
Allon Huang
e081456171 drivers: media: platform: rockchip: cif: reconstruct register's reading and writing
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I47e6e118a066a7740a34645cc9736a9a3f5f6afb
2020-05-08 21:52:17 +08:00
Wu Liangqing
b6906fc97d arm64: rockchip_defconfig: enable CONFIG_TOUCHSCREEN_HYN_CST2XX and CONFIG_GS_SC7A30
For rk3368a tablet.

Change-Id: I588802e3ee785cd55327c5b5edb7d256b41403ef
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-08 20:59:27 +08:00
Wu Liangqing
ce45b3c0d1 input: touchscreen: add hyn_cst2xx support
Change-Id: I57e6bd1ec989cf8c803a3648f24cb3fd834940b2
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-08 20:43:58 +08:00
Wu Liangqing
844ba815a5 intput: sensors: accel: add sc7a30 support
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I7727b6bf642b9f2f2a1ee53e7de283c4f818d7f9
2020-05-08 20:34:48 +08:00
Shunqing Chen
1e5052252d arm64: dts: rockchip: rk3368-xikp: add extcon for rk818
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I9f96a6548cdd8111e309a167bba370429ae205c0
2020-05-08 20:02:29 +08:00
Wu Liangqing
42c9a9370d arm64: dts: rockchip: add rk3368-tablet.dts
Change-Id: I8ff1ea45b9de1f9f6497aff158491a352a441bb6
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-05-08 14:57:15 +08:00
Andy Yan
159b2c4d15 arm64: dts: rockchip: Remove data-sync property for px30-ad-d6-anx6345 rgb interface
The data-sync is enabled by default, so we don't need
this property.

Change-Id: I3cfbb051368a2065cf6db5d0bcc91b8e77e77d10
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-05-08 09:12:45 +08:00
Andy Yan
802974d4f2 drm/rockchip: rgb: Fix data-sync logic
According to IC designer:
For RGB screen: The data-sync should enabled to get better SI.
For MCU screen: The data-sync must bypassed, otherwise the mcu signal
can't output.

Because we use much more rgb screen than MCU screen, so it's better
to enable data-sync by default. And for MCU screen, add the
data-sync-bypass property to bypass data-sync.

Fixes: c8f3ab90c0 ("drm/rockchip: rgb: Allow to configure data sync from DT")
Change-Id: Iacb0f7813ea038a210c2bbb88126356381509bf6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-05-08 09:11:07 +08:00