Commit Graph

860502 Commits

Author SHA1 Message Date
Elaine Zhang
413ae617fa arm64: dts: rockchip: rk3568: modify the aclk_top init frequency
For high performance:
modify aclk_top_high 300M to 500M.
modify aclk_top_low 200M to 400M.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I5ef723ed66893024e4b52e49bafb09c3b002b305
2020-11-30 17:11:36 +08:00
Yu Qiaowei
522d802667 video/rockchip: rga2: Ion can be used below kernel4.4.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ie9da1dfcd8682875763d401bc0c5d874ad98b870
2020-11-30 16:22:04 +08:00
Jianqun Xu
0e98c78dfc arm64: dts: rockchip: rk3568-pinctrl fix char '_' to '-'
Fix character '_' not recommended in node name which complained by
node_name_chars_strict

Change-Id: I6e34ff0cffc18a33e2b3f908519161541ccd9cdd
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-11-30 16:16:27 +08:00
Wang Panzhenzhuan
63bb4de8b8 arm64: dts: rockchip: rk3566-rk817-tablet: ov8858 use 4lane config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I7723f2844835e93c1d68cc3ef64cbb1271a571ea
2020-11-30 16:09:05 +08:00
Wang Panzhenzhuan
8f62b2390f arm64: dts: rockchip: rk3566-rk817-tablet: camera add vcm dw9714 support
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I4e452aafe9b20779e67602074baafd13c5e55743
2020-11-30 16:07:46 +08:00
Wang Panzhenzhuan
3fa46ca673 arm64: configs: rockchip_defconfig: enable dw9714
This is needed for rk3566 rk817 tablet.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I3c19299be121549ac3232465b30245efe7d820cb
2020-11-30 16:02:21 +08:00
Wang Panzhenzhuan
a8f62c9bbc media: i2c: dw9714: add set normal mode
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I46a6c844085672d8c50c7db6bdb18dbd19652f01
2020-11-30 15:20:38 +08:00
Yu Qiaowei
17b7a48bf0 video/rockchip: rga2: Add support for BGRX8888
The userspace librga(im2d) is using 0x16 for BGRX8888.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6cac09898039aefa87f5633d60bf590e3f130e56
2020-11-30 14:35:17 +08:00
Putin Lee
78531169b1 video/rockchip: rga2: fixup black slash when use rgb888 output with odd width
Change-Id: I8045880559628904d320da04c8df89a34055ce99
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2020-11-30 14:27:34 +08:00
Algea Cao
d0192bd84e arm64: dts: rockchip: rk3566-evb1-ddr4-v10: Add hdmi phy config table
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5b97019b930de26eb38851ada6aaab47446cd75b
2020-11-30 11:09:17 +08:00
Algea Cao
47e7dc9812 drm: rockchip: dw-hdmi: Increase rockchip_phy_config array size
Some platforms such as rk356x require more detailed configuration
partitioning to accommodate hdmi signal at different resolutions.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I4cc5fd4769ec51a5608b1901776d91f77324af3b
2020-11-30 11:06:23 +08:00
Tao Huang
64be1e46bd arm64: dts: rockchip: rk3566-evb1-ddr4-v10: Sort the nodes alphabetically
And clean up.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I8eafbbd9f2356ffaa5a849a8a1d80c4ccd753530
2020-11-30 10:44:46 +08:00
Guochun Huang
ba83205b99 drm/rockchip: dsi: add support swap two channel data of MIPI
Change-Id: Ib9dd986da26bff9fb744e592522c332e721e03ac
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2020-11-28 10:36:05 +08:00
Huang zhibao
e33cbb1fb8 arm64: dts: rockchip: rk3568-nvr-demo-v10: add pwm15 ir mode
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I751ae502a3ecbbaa7a933841f92e7d353235d62c
2020-11-27 19:13:13 +08:00
Elaine Zhang
f55add63e6 clk: rockchip: rk3568: support hdmi setting clk
Note:
Dclk_vop0, exclusive HPLL, DCLK_VOP0 and HPLL is 1:1 relationship.
dts need setting parent as:
assigned-clocks = <&cru DCLK_VOP0>;
assigned-clock-parents = <&pmucru PLL_HPLL>;

Dclk_vop1, exclusive VPLL, DCLK_VOP1 and VPLL is 1:n relationship.
n = DIV_ROUND_UP(600M, DCLk_rate)
dts need setting parent as:
assigned-clocks = <&cru DCLK_VOP1>;
assigned-clock-parents = <&cru PLL_VPLL>;

Dclk_vop2, no exclusive PLL, GPLL\CPLL\VPLL or HPLL near
frequency division.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I3172025737e544c8989ab9fabe0e7ba06d6db1db
2020-11-27 19:11:40 +08:00
Zhenke Fan
de16379976 media: i2c: add ov4688 driver
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I1289799c912af01a6b6b7129fbd5750340e36a80
2020-11-27 19:10:49 +08:00
Shawn Lin
73a479c07a arm64: configs: rockchip_linux_defconfig: remove CONFIG_PCIEASPM_POWERSAVE
ASPM is not a stable optional function for All devices from history,
and make us hard to debug any conflict issues. So remove it from default
configs.

Change-Id: I5a061a7758e32c5ddbbef677ba37c57fa635a88f
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-27 17:46:33 +08:00
Shawn Lin
bdd1d82af2 arm64: configs: rockchip_defconfig: remove CONFIG_PCIEASPM_POWERSAVE
ASPM is not a stable optional function for All devices from history,
and make us hard to debug any conflict issues. So remove it from default
configs.

Change-Id: I3417889dd4ab78fdc0a73d25f2e83db115558e89
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-27 17:45:05 +08:00
Weixin Zhou
054f27e6f8 arm64: dts: rockchip: rk3566-rk817-tablet-k108: disable u3 port for otg1
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I9e971ccd5dbd78a14dc0028bea7df2980a27318a
2020-11-27 15:32:41 +08:00
Hu Kejun
6857a853ec media: rockchip: isp: config lsc by sram in rdbk mode
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I1a672b25edf41f42300c1e05b2b7324bbd3efaa0
2020-11-27 15:12:57 +08:00
Zefa Chen
559d41be4d dt-bindings: media: i2c: Document add os05a20
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ic36a7c6dca137309ff7649d9a7227200babbcfd1
2020-11-27 14:33:31 +08:00
Zefa Chen
68e0c84550 media: i2c: support os05a20 camera driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ic2345f685f008c910ff7ad1dcbb5d09d90e70a5e
2020-11-27 14:33:31 +08:00
Zefa Chen
7dcec1808d media: i2c: ov8858 fixed bug
1.support s_power function
2.fixed hts_def error value
3.change analog gain max to 16x

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6f7d3d5c090dc3238cc299e28f7c39d3b74e1e7f
2020-11-27 14:22:33 +08:00
Shawn Lin
33fa05fe39 PCI: rockchip: dw: Add LTSSM dump for debug
Change-Id: Ia53158d65e12047ab3a1b225635f274e0d30c36e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-27 10:37:39 +08:00
Shawn Lin
f470814b10 PCI: rockchip: dw: Remove link speed setting
It's should be called by dwc core driver by walking up
the capability registers.

Change-Id: I27ff106dc7688734339c627e32360841d58d68a5
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-27 10:37:38 +08:00
Shawn Lin
96a3df4abd PCI: rockchip: dw: Move rk_pcie_establish_link() into rk_pcie_add_ep()
rk_pcie_establish_link() will be called by dwc core driver for RC,
so we only need it for ep function.

Change-Id: I278f3749bc0571037192ff0c4d03ba306c453316
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-27 10:37:37 +08:00
Huang zhibao
569d7cf2ed arm64: dts: rockchip: rk3568-nvr: set gpu and logic voltage fixed
NVR board logic and GPU are combined, so fixed voltage is required

Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I5e6d52882cb11028803f037c20e0113c1259ad0c
2020-11-26 18:43:12 +08:00
Jianqun Xu
56705884db pinctrl: rockchip: fix rk3568 uart7 mux mode
Change-Id: I9502cddedaa4aae6999c8bc702771152eff4cb7e
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-11-26 17:44:00 +08:00
Jim Lin
d7b2c97fd0 CHROMIUM: usb: gadget: configfs: Fix KASAN use-after-free
When gadget is disconnected, running sequence is like this.
. composite_disconnect
. Call trace:
  usb_string_copy+0xd0/0x128
  gadget_config_name_configuration_store+0x4
  gadget_config_name_attr_store+0x40/0x50
  configfs_write_file+0x198/0x1f4
  vfs_write+0x100/0x220
  SyS_write+0x58/0xa8
. configfs_composite_unbind
. configfs_composite_bind

In configfs_composite_bind, it has
"cn->strings.s = cn->configuration;"

When usb_string_copy is invoked. it would
allocate memory, copy input string, release previous pointed memory space,
and use new allocated memory.

When gadget is connected, host sends down request to get information.
Call trace:
  usb_gadget_get_string+0xec/0x168
  lookup_string+0x64/0x98
  composite_setup+0xa34/0x1ee8

If gadget is disconnected and connected quickly, in the failed case,
cn->configuration memory has been released by usb_string_copy kfree but
configfs_composite_bind hasn't been run in time to assign new allocated
"cn->configuration" pointer to "cn->strings.s".

When "strlen(s->s) of usb_gadget_get_string is being executed, the dangling
memory is accessed, "BUG: KASAN: use-after-free" error occurs.

BUG=chrome-os-partner:58412
TEST=After smaug device was connected to ubuntu PC host, detached and attached
type-C cable quickly several times without seeing
"BUG: KASAN: use-after-free in usb_gadget_get_string".

Change-Id: I58240ee7c55ae8f8fb8597d14f09c5ac07abb032
Signed-off-by: Jim Lin <jilin@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/428059
Commit-Ready: Jim Lin <jilin%nvidia.com@gtempaccount.com>
Tested-by: Jim Lin <jilin%nvidia.com@gtempaccount.com>
Reviewed-by: Adrian Salido <salidoa@google.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Git-repo: https://chromium.googlesource.com/chromiumos/third_party/kernel
Git-commit: a7b597d255d70f6f0c6bfdfb7e4e04f67fcebf9d
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from https://android.googlesource.com/kernel/msm
 commit fcf0e822fce098b27b6735d96e5414d6ff8de762)
2020-11-26 17:43:26 +08:00
Andy Yan
cd6ef0265c drm/rockchip: vop2: Only change port mux when a windows is removed to another port
Change port_mux/layer_sel register as less as possible.

Change-Id: I7436cafcb9dd40ae9495091a08b0df479a79c978
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-26 16:48:19 +08:00
William Wu
d67dccc128 phy: rockchip: naneng-combphy: add pipe clk for rk3568
The pipe clk of rk3568 is used for PIPE_GRF module, we
need to manage this clk so that the USB IP can access
the registers of PIPE_GRF.

Change-Id: I9ebfd5d25bdf1e95a9c5a3390b1030aed5f5c7ba
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-11-26 16:41:21 +08:00
Jianqun Xu
1c085731f3 arm64: dts: rockchip: re-generate rk3568-pinctrl.dtsi by tool
This patch to generate the rk3568-pinctrl.dtsi again by pin2dts tool
which has been updated with some bugs fixed, such as lack of comment
for some nodes.

Now the pin2dts can generate the auto part of pinctrl file absolutely,
changes including:

* file header

/SPDX-License head
/#include <something>
&pinctrl {

};

* full rules

make the auto part can be generated by rules without any handly modify
special case: pwm4 which may be matched as pw-m4, that means the module
is pw and its mux mode is m4.

Change-Id: Ia92668ab938c1c05dfe430cf67b6f73bafaa31c3
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-11-26 15:32:07 +08:00
Weixin Zhou
fe3861c667 arm64: dts: rockchip: rk3566-rk817-tablet-k108: set vdd_logic to 0.9v
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I05639488fc5a600e7e15a49e05bedb0615e606c4
2020-11-26 14:31:11 +08:00
William Wu
b5015f09e2 arm64: dts: rockchip: rk3568: add pipe clk for usb and combphy
Change-Id: I0ce0624ccfd907c464b7ee4d675587a36fa157be
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-11-26 11:47:54 +08:00
Wyon Bi
666136fb3a drm/rockchip: analogix_dp: fix a typo
Fixes: 962c917b1d ("drm/rockchip: analogix_dp: Add audio support")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I105c5942d4cd5b9f82c3219f7494f6627d6e01a4
2020-11-26 02:46:26 +00:00
Zefa Chen
7567930cd2 media: i2c: camera driver fixed pm get error
There is a case, the app may call s_ctrl before device power on,
pm_runtime_get will increment usage counter and call Sensor_runtime_resume,
but when the s_ctrl function judges that the return value of pm_runtime_get
is less than or equal to 0, it returns directly, causing pm_runtime_put
not to be executed. so device can't be suspended.

pm_runtime_get_if_in_use increment the device's counter when runtime PM status
is RPM_ACTIVE and the runtime PM usage counter is nonzero.

so used pm_runtime_get_if_in_use can avoid usage counter error.

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4e61cdefafd82083f2628f67181a6bb2eee50507
2020-11-25 16:52:15 +08:00
Weiguo Hu
1c01cb8832 net: wireless: rockchip_wlan: realtek wifi: fix device_name and nego_ssid overflow in ioctl p2p interface
References: CNVD-C-2020-269231, CNVD-C-2020-269232

Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
Change-Id: I1e926e5c9673fbc141275a72284569179f630aba
2020-11-25 15:20:43 +08:00
William Wu
0e28bc0c1f arm64: dts: rockchip: rk3568-evb6-ddr3-v10: disable u3 port for otg1
Change-Id: I95020ace6f2af7ee73797192e5b6eb09e265417e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-11-25 14:14:03 +08:00
William Wu
70192edddf phy: rockchip: naneng-combphy: support to disable u3 port
This patch support to disable u3 root port for USB3.0 controller
if needed. Such as RK3568 EVB6 USB3.0 OTG1 xHCI controller, it
only used USB2.0 PHY, so we need to disable u3 port by set the
xHCI u3 port number to zero and select the clk_usb3otg0_utmi for
source clk at the same time.

Change-Id: I4aee7cc0d2947e478ff7437e47e329411e67297c
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-11-25 14:13:53 +08:00
William Wu
4ae0b40f64 dt-bindings: phy-rockchip-naneng-combphy: add property to disable u3 port
This patch add new property to disable u3 root port for
usb3.0 controller if we want to force the controller
to u2 only mode.

Change-Id: I53da3a7816585f1d3f9ac7fd3ee5ba8ba323eff1
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-11-25 14:10:31 +08:00
Guochun Huang
d85facab5d arm64: dts: rockchip: set vdd_logic 900mv for rk3566-rk817-tablet-rkg11
Change-Id: I280ddbb0253e14a283e8368ae207779d74cf8639
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2020-11-25 14:05:31 +08:00
Guochun Huang
f7de80beea arm64: dts: rockchip: rk3568-evb: set mipi_dclk_pol posedge
Change-Id: I52426443f707256aae35eec07d64608d36510cc0
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2020-11-25 11:54:14 +08:00
Cai YiWei
96aee6da54 media: rockchip: ispp: fix error state of monitor
Change-Id: I6f022920d1ea60977bec982d1c7cc03de0362edf
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-11-25 11:47:13 +08:00
Tao Huang
357d136f5d arm64: dts: rockchip: Remove redundant cif_clkout pinctrl node for rk3566 tablet
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I85fc4281d62037f29606c5fc9363bf1df49e5651
2020-11-25 11:28:05 +08:00
Sandy Huang
6c86515104 arm64: dts: rockchip: rk3568-evb6: add rk630 bt656 to cvbs
Change-Id: I96d04357fae0aaad43df0b740a802fc5344597a9
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-25 11:20:35 +08:00
Andy Yan
30a84f553e drm/rockchip: vop2: Disable auto gating
A workaround to avoid display image shift on
screen when window enable.

Change-Id: I37064f580f7050997b521282d9cbae4193ace05d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-25 10:43:58 +08:00
Sandy Huang
e366162b70 arm64: dts: rockchip: add rk3566 evb1 lvds panel board
Change-Id: I0c5f4793c7c8ed91374b395a2e1d7c6c0e6bd63d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-24 20:15:43 +08:00
Andy Yan
284e9a78fd drm/rockchip: vop2: Fix ovl_cfg_done_port register definition
Change-Id: Ic3d1df5b24dd6dbe827d36353f0c5b0a05fa6a1b
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-24 20:14:30 +08:00
Andy Yan
a72db1718f drm/rockchip: vop2: Enable debug irq
Enable post buf empty irq.

Change-Id: I3ea4cdf7d13aae553bb30756cebe0c82e1997f4d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-24 20:14:30 +08:00
Hisping Lin
4fc181b2a2 arm64: dts: rockchip: rk3568: add firmware and optee node
Add optee node to supply OP-TEE required properties.
/optee node is supposed to be below /firmware node.

Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
Change-Id: Ib7a96ea6b72915703ae3a9595a32fd84802c7a22
2020-11-24 19:59:32 +08:00