Commit Graph

854334 Commits

Author SHA1 Message Date
Sandy Huang
bbcd956a03 arm64: dts: rockchip: rk3368-android: add vop multi area support
Change-Id: I9973f47823e938a15d286fe1a258725560595c73
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 10:14:09 +08:00
Sandy Huang
3549ca7efd arm64: dts: rockchip: px30-android: add vop multi area support
Change-Id: I89ebc27b6121354b51b17dbe412c09db9e166ffe
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 10:14:09 +08:00
Sandy Huang
86dc208e94 ARM: dts: rockchip: rk3288-android: add vop multi area support
Change-Id: I193bacb9a2f03beb8eb0e733dae8b3c34ca5e18f
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 10:14:08 +08:00
Sandy Huang
5d29b24bd5 arm64: dts: rockchip: rk3399-android: add vop multi area support
Change-Id: I02a08bcdda601aa434cc72c509fa2c85731d0ebd
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 10:14:08 +08:00
Sandy Huang
3063234724 drm/rockchip: add support win lite multi area
like rk3288/rk3399/px30 win lite, the hardware can support multi area,
we register them as normally plane to drm framwork, but they have some limitations:
one group a multi areas need use same zpos, they can't overlap, etc.
so we add SHARE_ID prop to identy them.

Change-Id: Ia814e6b0896f0e74a53193afe6642eff145da562
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 10:14:08 +08:00
Sandy Huang
d824c75d4b drm/rockchip: init subdev and registe to rockchip_drm_sub_dev_list
Change-Id: Iac3a7ab477abb987d4afd2fe39b5701c8046aae4
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 09:27:20 +08:00
Sandy Huang
4759d059b6 drm: remove connector and encoder port
Change-Id: Ie2bd25f133500b81d47ce6fb21ab7046fca8d9fa
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 09:24:29 +08:00
Sandy Huang
4d1bfde6c6 drm/bridge: synopsys: dw-hdmi: update for remove connector port
Change-Id: Ia0ca8c2fddf89f29bf4ac5703d8f4d0f68d6446a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 09:23:30 +08:00
Sandy Huang
8b4333efc1 drm/bridge: analogix_dp: remove connector->port init
Change-Id: Iad8dbc8a016fa44aba7ce6eb43ecb1f2839a26ab
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 09:23:30 +08:00
Sandy Huang
efc84eaf70 drm/rockchip: remove connector and encoder port init
Change-Id: I6f4e79f37dfc8d59a69b1e35428adaf1d951a310
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 09:23:30 +08:00
Sandy Huang
74d0f7fc4b drm/rockchip: add rockchip_drm_sub_dev_list to record connector
use rockchip_drm_sub_dev_list to manage rockchip drm sub dev and record
connector, offer new method to find connector through the sub_dev_list.

Change-Id: If9508cf9ff51f6f9e1d13c42c60491f4aec4b9c1
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 09:23:30 +08:00
William Wu
cdd4d2410c usb: gadget: uvc: fix zero length packet xfer bug for uvc bulk
Refer to USB 2.0 spec, if a transfer with size divisible to EPs max
packet size and with req->zero field is set, which means that after
data is transfered it is also should be transfered a zero length packet
at the end.

For uvc bulk in transfer, it only sets the req->zero flag to enable
sent the zero length packet to USB Host if the video->payload_size
equal to video->max_payload_size. However, this condition is not
enough, because if the image size is more than the max_payload_size,
the image will be split to several transaction, and if the payload_size
at the last transaction is less than then max_payload_size, it will
not enable the zero length packet xfer.

This patch sets the req->zero flag if the whole image has been
transferred.

Change-Id: I9a62a8b1df0e44b4291b6add664357d148c19d1f
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-07-02 18:50:31 +08:00
Jianqun Xu
bb21ab49d6 media: rockchip: isp: assign memory for device early
The sub devices of rkisp will allocate memory from rkisp before the
reserved memory been assigned to rkisp, and will alloc from default
continuous cma memory region instead.

The current system may never do free these memory, so the issue when
to free these memory can not happen.

Fix free issue by moving the assign memory earlier.

Also return error if failed to assign reserved memory since driver
has no iommu.

Change-Id: I4bd3437e5536bda827c6ca71d630a993fcce2d8d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-07-02 17:11:01 +08:00
Jianqun Xu
01575157a7 ARM: dts: rv1126-pinctrl.dtsi update nodes by newest grf.rxbb
Change-Id: Ibe188cbf861e4aba72a569729db0e37d5103c0f5
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-07-02 16:38:27 +08:00
Wyon Bi
a4dc52009e ARM: dts: rockchip: rk3288-android: enable video phy node
Change-Id: Ifc95e3a9191229c8a5d8b95db9706aa8837b9663
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-07-02 14:25:06 +08:00
Cai YiWei
2568d28187 media: rockchip: ispp: fix tnr 3to1 first buf to isp twice
Fixes: 2fa88ab89a ("media: rockchip: ispp: fix tnr 3to1 frame order")
Change-Id: Ib7f2b948c4308f53b0eadca032499e98ccb5a6d8
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-07-02 14:13:00 +08:00
Simon Xue
fcbec99d51 iommu: rockchip: disable fetch dte time limit
Master fetch data and cpu update page table may work in parallel, may
have the following procedure:

	master			cpu

	fetch dte		update page table
		|			|
	(make dte invalid)  <-	zap iotlb entry
		|			|
	fetch dte again			|
	(make dte invalid)  <-	zap iotlb entry
		|			|
	fetch dte again			|
	(make dte invalid)  <-	zap iotlb entry
		|			|
	fetch dte again			|
	(make iommu block)  <-	zap iotlb entry

New iommu version has the above bug, if fetch dte consecutively four
times, then it will be blocked. Fortunately, we can set bit 31 of
register MMU_AUTO_GATING to 1 to make it work as old version which does
not have this issue.

This issue only appears on RV1126 so far, so make a workaround dedicated
to "rockchip,rv1126" machine type.

Change-Id: I808bf87898e2dfdd8ada5666234e4c2c3237ffde
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-07-02 10:21:16 +08:00
Tao Huang
4f6e98e74f serial: 8250: Call serial8250_init() early when CONFIG_ROCKCHIP_THUNDER_BOOT=y
Before dw8250_platform_driver probe.

Change-Id: I46382f1d563ed75897e964c625b91b6f8be0481a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-07-02 10:21:15 +08:00
Sandy Huang
074532c0a0 drm/rockchip: move loader_protect to rockchip_drm_private
move loader_protect flag from drm_mode_config to rockchip_drm_private.

Change-Id: I7f9ec53ac9a29d3b467697a99159ad4bb7d05e3d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-02 10:21:15 +08:00
Sandy Huang
b5e8a5bae5 drm/rockchip: EXPORT_SYMBOL(rockchip_drm_crtc_send_mcu_cmd)
rockchip_drm_crtc_send_mcu_cmd will be used by panel-simple.ko

Change-Id: I463e52335244564b5a837ff045cff0ab005ea25d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-02 10:21:15 +08:00
Sandy Huang
627c56fdda drm/rockchip: remove drm_atomic_set_property calls
drm_atomic_set_property isn't export function, so we set default prop
vale to instead of it.

Change-Id: I4acc6ddd045415aa180d467b45085609408e2447
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-02 10:21:15 +08:00
Sandy Huang
e9c13d8669 drm/rockchip: remove unused logo_y_mirror
all bmp file have been set to no y mirror file.

Change-Id: I6b8b5362ff0f5bb6d2e9930e23987d133749357d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-02 10:21:15 +08:00
Jianqun Xu
8d1e1e2de4 mm/cma: support to set CMA area status
Add an optional empty property - 'inactive' for reserved memory,
only do effect for regions with reusable property.

CMA area in 'inactive' status means that the operating system can't
alloc pages from the regions.

Change-Id: I34ecde9bc9c2e3cec175e6c032911c1bae21295c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-07-02 10:21:15 +08:00
Elaine Zhang
069bb25961 ARM: dts: rv1126: move the tsadc parameters
This patch moves the tsadc default parameters to the rv1126.dtsi.
When the hardware changes, the tsadc parameters need to be
reconfigured in DTS.(Rockchip_Developer_Guide_Thermal_CN 3.2)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I6ff427e703006135e32e5748e89b3a1367a035c9
2020-07-02 10:21:15 +08:00
Elaine Zhang
96008856e6 regulator: fan53555: fix up the tcs en\disable failed
TCS452x registers are special and different from others.

Fixes: eb1731965c ("regulator: fan53555: add support for Rockchip RK860X regulators")
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I7694defe4f090ff846dbdb88bad51efd07fa241c
2020-07-01 11:21:27 +08:00
Nickey Yang
fd713aac5a media: i2c: ov2718: update new version
1.update the new get regulator method
2.correct initialization sequence
3.fix the level setting of reset gpio
4.support raw12bit linear/hdr mode
5.implement RKMODULE_SET/GET_HDR_CFG

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: Ie9b38ce69b4eb239aec34fa91c3e59ab872ac8c5
2020-06-30 18:41:44 +08:00
Jianqun Xu
99fc5eea94 dt-bindings: reserved-memory: introduce 'inactive' property
Add a new property 'inactive' for reserved memory node, which used for
reserved memory region with 'reusable' property.

When a reserved memory region with 'reusable' property, the operating
system can allocate pages from the CMA region and move outside of CMA
region when cma allocate happend.

The new property 'inactive' can set the CMA region to seperate from the
operating system pages, make the region only used by cma allocate, and
not need to do isolate range.

Change-Id: Id99a1433fb9c36cc10b3293436292efff28cac25
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-06-30 18:34:17 +08:00
Jianqun Xu
96b2bffcd5 ARM: dts: rv1126-evb-ddr3-v10-tb: inactive isp reserved memory
Change-Id: I1d644420bca0a241c716de92dc19ddbb28e99f6a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-06-30 18:29:47 +08:00
Ding Wei
c0540b1b5e video: rockchip: mpp: issue for device attach service
when taskqueue-node not set, it should be considered a new taskqueue.
But when resetgroup-node not set, consider it not need reset asynchronous.

Change-Id: I603df406faaecc46cadef30947230c387e8538cd
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-06-30 16:51:04 +08:00
Ding Wei
ae6f03a436 video: rockchip: mpp: reset relative code refactoring
tips:
1. it should not use reset->rw_sem when reset is not shared.
2. if hardware is combo, and work is time sharing, which
   reset_group in the same taskqueue, the reset->rw_sem
   is also should turn off.

Change-Id: I9d89e3118997cc8d1871ac77799faf85043743d3
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-06-30 16:50:51 +08:00
Ding Wei
8ec4aa8c3b video: rockchip: mpp: mark task->state via set_bit
1. each bit mark task had reached instead of state changed.
2. irq and timeout are ambiguous, if irq reach, timeout_work can not
response. Thus, there use TASK_STATE_HANDLE to handle it.

Change-Id: I1723b49b12abdf6bf1746b3e59431decab928c44
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-06-30 16:50:30 +08:00
Zefa Chen
2dcb987515 media: i2c: camera driver support enum sensor work format
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ia5d0b804a85ce9947183c651395798910e4566bc
2020-06-30 16:49:48 +08:00
Hu Kejun
ef3ee92e16 media: i2c: gt9760s: update dlc move time
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I059e56aecafc1a87351cd11775f84fe5580e8982
2020-06-30 16:45:14 +08:00
Sandy Huang
1058778507 drm/rockchip: remove repeated function calls
drm_vblank_cleanup will be called as following path, so delete it here:
drm_dev_put(drm_dev);
    ->drm_dev_release
        ->drm_dev_fini(dev);
            -> drm_vblank_cleanup(dev);

Change-Id: Ie7d31c19f00cdf8bb331bf069ce09046e6fe6ea4
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-06-30 15:37:29 +08:00
Sandy Huang
97407f1db3 drm/rockchip: vop: fix rb swap error when deal with rgb888 format
1. VOP full need to do rb swap to show rgb888 format color correctly
2. uboot change bmp decoder result from BGR565 to RGB565 format;

so this commit depend on uboot commit:
    59cf3802954 ("drm/rockchip: fix rgb888 format color incorrect")
    f4e3a173323 ("drm/rockchip: change 8bit bmp decoder result")

Change-Id: I2e0329b8c3f35d4ec1e224f0570575934c889dca
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-06-30 15:37:29 +08:00
Wu Liangqing
085c5ba4a7 arm64: dts: rockchip: rk3368a-817-tablet: disable auto-freq-en
Change-Id: I40613c3ba296918d50c92534f464d780cbce43ff
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-06-30 15:36:43 +08:00
Zhenke Fan
f6b6c4c402 media: i2c: gc4c33: modify dpcc to adjust single and multiple bad point
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: Iaf12ded3604ec26e9b61833e1fd4004e03acb110
2020-06-30 15:34:41 +08:00
Lin Jinhan
20c43992f8 crypto: rockchip - add rv1126 crypto des/des3_ede support
cipher mode list:
      des/des3_ede: ecb/cbc

Change-Id: I0b8a75f3f67892988982ea7b52380eb847758af4
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-06-30 14:43:39 +08:00
Lin Jinhan
05c9559e5a ARM: rockchip_defconfig: enable CONFIG_CRYPTO_DEV_ROCKCHIP
merge CONFIG_CRYPTO_DEV_ROCKCHIP_V1 & CONFIG_CRYPTO_DEV_ROCKCHIP_V2
into CONFIG_CRYPTO_DEV_ROCKCHIP.

Change-Id: Ided2e0f7ed78b8f98ad8491055c91c76caee3f6f
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-06-30 14:41:47 +08:00
Lin Jinhan
5f155bc358 arm64: rockchip_defconfig: enable CONFIG_CRYPTO_DEV_ROCKCHIP
merge CONFIG_CRYPTO_DEV_ROCKCHIP_V1 & CONFIG_CRYPTO_DEV_ROCKCHIP_V2
into CONFIG_CRYPTO_DEV_ROCKCHIP.

Change-Id: Ic983f6a5d7eb80462a44fcf12b89e66d46bb341b
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-06-30 14:40:59 +08:00
Lin Jinhan
cfa5f18187 crypto: rockchip: add module compile support
Change-Id: I661fe4e75b77b7995bc0303773c992d6d93ddf7e
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-06-30 14:38:08 +08:00
Hu Kejun
ff3ba38a27 media: rockchip: isp: fix compile error when config with module
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Icdedf22cfe30674107e72293dca80711c2c4a548
2020-06-30 14:34:02 +08:00
Wu Liangqing
be64802e6b arm64: dts: rockchip: rk3368a-817-tablet-bnd: adjust dcdc4 3.0v
Change-Id: Ic643d00b730f5d64fea75d676c9993d2fc9d0694
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-06-30 14:32:51 +08:00
Wu Liangqing
48c2e86e9c arm64: dts: rockchip: rk3368-817-tablet: dmc set vop-dclk-mode = <1>
enable vop clk shakes

Change-Id: I7f087ccd6e9d0f734c2af9338f9fad8672517952
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2020-06-30 14:32:33 +08:00
Ren Jianing
68c654fa7a phy: phy-rockchip-naneng-usb2: add Rref calibrate in tuning
This patch can change phy internal 45 Ohm resistance accord to
reference resistance. The larger the reference resistance, the
greater the internal resistance, and accordingly, high speed
eye diagram amplitude will become lower.

The maximum adjustable range of the reference is +-20% of the
default value (200 Ohm).

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ibd746283c06609b944fa2a148066ba0a661e761a
2020-06-30 14:30:35 +08:00
Jianing Ren
8b73d9a650 dt-binding: phy: add dt doc for Rockchip USB 2.0 PHY
This patch adds a binding that describes the Rockchip USB 2.0
PHY designed by Naneng.

Change-Id: I7cca8bbf0a395baaebb4867681acd4f73004c1b0
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-30 14:30:35 +08:00
Jianing Ren
05960109c0 phy: phy-rockchip-naneng-usb2: add vup_gpio for swing calibration
The USB2.0 OTG PHY of RV1126/1109 which is designed for lower power
consumption provides only 8.8mA current source on DM. Multiplied
by 45 Ohm host termination resistance, voltage is about 400mV.
If the threshold voltage of host is greater than 400mV, the high
speed handshake will fail and SoC communicate at full speed. So
swing calibration is necessary.

We use gpio to control the 220 Ohm pull-up resistor to provide additional
current. Experiments show that the voltage of chirpK can be increases
to about 600mV.

Change-Id: I8b41054af4732569dbc8185bc3d3d4a2ba83cd6a
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-30 14:30:35 +08:00
Jianing Ren
913d3c8e4f usb: dwc3: gadget: add phy calibration during chirpk state
The USB2.0 OTG PHY of RV1126/1109 which is designed for lower power
consumption provides only 8.8mA current source on DM at chirpK state.
Multiplied by 45 Ohm host termination resistance, voltage is about 400mV.
If the threshold voltage of host is greater than 400mV, the high speed
handshake will fail and SoC communicate at full speed. So swing
calibration is necessary.

Because we use this interface for swing calibration. This patch also
disable phy calibration in setting host mode for rockchip platform.

Change-Id: Ic1c8bb6aac95b3d0d61d99becb4facea1bbecb25
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-30 14:30:35 +08:00
Nickey Yang
bbd4383092 ARM: dts: rockchip: rv11xx-evb-v10: add GT917S tp support
Gt917s is a panel adapter board with ili9881d matching touch IC.

At the same time, init delay Ms 80 instead of 10, is to solve the
problem of high probability of not displaying due to incomplete
reset when the hardware of the panel adapter board is changed.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I17eff7fdd140a7d6f82e8991ad2bdd7765d43a73
2020-06-30 14:19:48 +08:00
William Wu
1f056007af Revert "phy: add cp_test callback"
This reverts commit 955bb70bf1.

Fix the following changed report by build_abi.sh for GKI

'struct phy_ops at phy.h:56:1' changed:
  type size changed from 512 to 576 (in bits)
  1 data member insertion:
    'int (phy*)* phy_ops::cp_test', at offset 448 (in bits) at phy.h:70:1
  there are data member changes:
    'module* phy_ops::owner' offset changed from 448 to 512 (in bits) (by +64 bits)
  17 impacted interfaces

Change-Id: I5f163b804aaff2fe9c6e3a7c054de3f8df0c791c
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-06-29 16:53:21 +08:00