Commit Graph

854354 Commits

Author SHA1 Message Date
Jianqun Xu
554fc0d39d arm64: ARCH_ROCKCHIP remove select PINCTRL_ROCKCHIP
Change-Id: I24dd1e059fcaed7ded9457ed803edae27b83d445
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-07-07 10:49:08 +08:00
Cai YiWei
47c1b60431 media: rockchip: isp: fix isp no ready to read back for thunderboot mode
Change-Id: Ib42b6dee1f7cc2b891b00458a09b2dfabafef9f0
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-07-07 09:13:03 +08:00
Jianqun Xu
d0f4aa1f13 genirq: export irq_gc_set_wake
Change-Id: I52f43e1dff15d987532395e5151e65419b5904b2
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-07-06 20:34:02 +08:00
Baolin Wang
c51417f7f3 UPSTREAM: pinctrl: Export some needed symbols at module load time
Export the pin_get_name()/pinconf_generic_parse_dt_config() symbols needed
by the Spreadtrum pinctrl driver when building it as a module.

Change-Id: I9b0028e250221b3b1d48b482e90bfd4b81d1695b
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/f4e7e20afacb23e6fa7a6b33ea4319b2b3492840.1582776447.git.baolin.wang7@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit b88d145191)
2020-07-06 20:30:57 +08:00
Simon Xue
a38320550e iommu: rockchip: update to support module
Change-Id: I4603bf635c362b07a9a1dcab3283b1ed669b581b
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2020-07-06 20:28:11 +08:00
Will Deacon
1f93fc8bd3 BACKPORT: drivers/iommu: Export core IOMMU API symbols to permit modular drivers
Building IOMMU drivers as modules requires that the core IOMMU API
symbols are exported as GPL symbols.

Signed-off-by: Will Deacon <will@kernel.org>
Tested-by: John Garry <john.garry@huawei.com> # smmu v3
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>

Change-Id: Ib06e99673ebcf2bf6524712c335965dca6d4bdbe
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit a7ba5c3d00)
2020-07-06 20:22:51 +08:00
Tao Huang
6be41e0dfa ARM: dts: rockchip: Rename rockchip_tb to thunder-boot-mmc for rv1126-evb-ddr3-v10-tb
Change-Id: I590acea39d950abad144e58a419931c2b7fa4639
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-07-06 19:01:14 +08:00
Hu Kejun
8677399d80 ARM: configs: enable CONFIG_VIDEO_ROCKCHIP_THUNDER_BOOT_ISP for rv1126-evb-ddr3-v10-tb.config
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I1f9ee907ad1ce9667b492a77c3557ae9485fcbe8
2020-07-06 19:00:16 +08:00
Hu Kejun
c0bf6d40cf ARM: dts: rv1126-evb-ddr3-v10-tb: support rkisp thunderboot mode
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I2f7203f67c7c06e179e692428c54784873c77c53
2020-07-06 19:00:16 +08:00
Hu Kejun
5006af6e8a media: i2c: os04a10: support thunderboot mode
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: If1491dceee255e6e42ba7164da2364ab9933a77e
2020-07-06 19:00:16 +08:00
Hu Kejun
b9ab138ec6 media: rockchip: isp: support thunderboot mode
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I7964c6cab499fd8ea914f37451155261e9f2a4a0
2020-07-06 19:00:16 +08:00
Huang zhibao
9cd8ab456d ARM: dts: rockchip: rv11xx-ai-cam: enable otp
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: Iccc578c5e8b96c5d6dfb92187f8b4e206688b5fe
2020-07-06 15:26:47 +08:00
Jianqun Xu
8be258cb77 pinctrl: rockchip: add module informations
Change-Id: I03d844355d96408774b6a3c8458759e364db4491
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-07-03 18:52:31 +08:00
Cai YiWei
37842f49eb media: rockchip: isp and ispp version to v0.1.1
Change-Id: I3243d3db7216ee326028519732597ace26532823
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-07-03 18:51:52 +08:00
Zhichao Yu
dcc397ccec ARM: configs: disable useless cameras for rv1126-evb-ddr3-v10-tb.config
Signed-off-by: Zhichao Yu <zhichao.yu@rock-chips.com>
Change-Id: I84380d9850643137a864b3632b7df94b8c11fc6c
2020-07-03 18:07:25 +08:00
Elaine Zhang
2047231d24 soc: rockchip: power-domain: support qos init
init qos once when pd is initialized.
e.g:
	&qos_vop {
		priority-init = <0x202>;
		mode-init = <0x1>;
		bandwidth-init = <0x281>;
		saturation-init = <0x41>;
		extcontrol-init = <0x1>;
	};

Change-Id: I2ff600e97e772f209dd29400cd1fde2edb66dd2b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-07-03 17:55:55 +08:00
Nickey Yang
42aa4ad17c ARM: dts: rv1109: add rv1109 38 v10 spi nand board support
rv1109-38-v10-spi-nand is a spi nand,rmii gmac phy,os04a10 board.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: Ie4d3de1f87aee1d630152de95b43714234d32932
2020-07-03 16:50:19 +08:00
Nickey Yang
1a68cf804a ARM: dts: rockchip: rv11xx-ipc: enable cpu tsadc and npu tsadc
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I3e84dd8eb88cf06cbfe8f082c824ce5ab82865d1
2020-07-03 16:46:33 +08:00
Sandy Huang
8f6868e3f2 drm: Add DRM_CLIENT_CAP_SHARE_PLANES ioctl
this is only used to compatibility with old hwc code

Change-Id: Idcf2ca235d320656adf20d010dcd3a3940159c0d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 10:32:23 +08:00
Sandy Huang
4400d60d25 Revert "drm: introduce share plane"
we use new method to implement vop win lite multi area support.

This reverts commit 8b19e980a6.

Change-Id: I2b5ac07ba38fdb416291635719d0634b7824268c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-03 10:14:09 +08:00
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