Commit Graph

860485 Commits

Author SHA1 Message Date
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
Wang Panzhenzhuan
8655e57f8e arm64: dts: rockchip: rk3566 evb2 add camera configs
default enable mipi camera ov5695,
disable dvp camera gc2145;
for dvp camrea pinctrl conflicts with gmac1 & ov5695

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I74697200539249e006e505af2e69cec2300b25ec
2020-11-24 16:36:02 +08:00
Frank Liu
b9d1865980 media: i2c: add ov02b10 driver
Signed-off-by: Frank Liu <frank.liu@rock-chips.com>
Change-Id: I8fedf59b422d7a62f4e45c1d32760951af447cc8
2020-11-24 16:33:47 +08:00
Wenping Zhang
baf00edd1f arm64: dts: rockchip: add rk3566-rk817-eink.dts.
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: I3523e2aa3214ae231dadff2bcabbc1f651fa1fca
2020-11-24 16:29:47 +08:00
Sandy Huang
cc5b0920ed arm64: configs: rockchip_defconfig: enable rk630
Change-Id: I793db1e4acb9a7b9ead24e49db88d0b00e9e2fa1
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-24 16:26:33 +08:00
Shawn Lin
839101df49 mmc: sdhci-of-dwcmshc: Add runtime PM support
Change-Id: I27a9e60079a9f5207d5f00d2251e9c499447af1c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-24 16:24:26 +08:00
Sandy Huang
6a9eb7b334 arm64: dts: rockchip: rk3568: delete unused node for lvds
Change-Id: I9807f261804e9c79bb37041ab974e1c6df925899
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-24 14:52:32 +08:00
Jason Song
6dd31db615 arm64: configs: rockchip_defconfig: enable DIO5632
This is needed by rk3566 rkg11 2k tablet LCD power supply.

Signed-off-by: Jason Song <sxj@rock-chips.com>
Change-Id: I0a752a92f62b4e72e8778a62ffaabf6fb3cf793f
2020-11-24 14:44:22 +08:00
Wang Panzhenzhuan
40fb762353 arm64: dts: rockchip: rk3568-pinctrl: add cif group configurations
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I22c5661b4e77f6b0c8cdf316e14135e7b1d8b581
2020-11-24 14:42:49 +08:00
Algea Cao
95a674b078 drm/bridge: rk630: Add RK630 tve driver
Change-Id: I80180ca55d1eda0dd63dc8399d5196ae8d4e9f57
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-24 14:39:11 +08:00
Algea Cao
d77feca3b9 mfd: Add RK630 mfd driver
Change-Id: I03c127df4ec2ad80cbaf4b0d4ad540cb5b32a245
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-11-24 14:39:11 +08:00
Weixin Zhou
84555eb9d1 arm64: dts: rockchip: rk3566-rk817-tablet-k108: adjust sdcard config
if sdcard detect pin active status is low, forcejtag must be 0.

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I653693e92422b191539d11ba498a4c14a4ccd117
2020-11-24 14:24:37 +08:00
Sandy Huang
189e797edf drm/rockchip: lvds: remove unused code
Change-Id: Id579000e6b48a2bc6991abbb87e8e4099ec17d77
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-24 11:37:49 +08:00
Shawn Lin
6eb33ebe60 mmc: sdhci-of-dwcmshc: Disable cmd conflict check
We don't need to check cmd conflict, so remove it.

Change-Id: Ied0619820395b5354b2fe892d7986217426a3e82
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-11-24 10:53:31 +08:00
Weixin Zhou
826a944541 arm64: dts: rockchip: rk3566-rk817-tablet-k108: add usb3_host1 for keyboard
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I7c229c528c8fd1adb7bd937c53bce6813112a65d
2020-11-24 10:37:57 +08:00
Bin Yang
27a2210534 arm64: dts: rockchip: rk3568-pinctrl: enable pull-up for sdmmc0_det
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
Change-Id: Ie0f2809485926ea219ced808f8751878a8c77ac1
2020-11-24 10:23:50 +08:00
Alex Zhao
b3019b9a01 net: rockchip_wlan: use the correct map path for rtl8821cs cob wifi
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I77ef214e83417b24708e4baad26b2afaaf6b6a82
2020-11-24 10:23:14 +08:00
Sandy Huang
c179d5b9da drm/rockchip: lvds: enable lvds clk invert
Change-Id: I22a6a45e54e9adefaf826f42549e2492fa831d31
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-24 10:01:47 +08:00