Commit Graph

860520 Commits

Author SHA1 Message Date
Jianqun Xu
d709fc7b79 scripts: dtc: delete empty node after omit_unused_nodes
A node is empty node if its proplist/label/child both null or both
set as deleted.

Change-Id: Ia934c58df3305dc9531cc912322eb2728f7af689
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-12-01 09:26:26 +08:00
Wyon Bi
6110f21e08 phy/rockchip: naneng-edp: Update for Compliance Test Pass
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ia3366c6a6c97cd77222a7df55b74d731719e74c3
2020-12-01 09:11:31 +08:00
Yandong Lin
1eea3c6b78 arm64: configs: rockchip_defconfig: enable iep2
Change-Id: I218344f1518dbf896c0789736a21bbcb5f4fedad
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2020-12-01 09:07:15 +08:00
Yandong Lin
038c21e63f arm64: dts: rockchip: rk3568: add node-count for iep2
Change-Id: I238b7ab536946071baeefa4758484029c01cb765
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2020-12-01 09:05:46 +08:00
Ziyuan Xu
6b99d577ba ARM: dts: rv1126: Add aliases for MMC
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: If83793f389103af3bcbf6b313aeb4297976b401c
2020-12-01 08:58:58 +08:00
Matthias Schiffer
a920d2b2cf UPSTREAM: mmc: core: Allow setting slot index via device tree alias
As with GPIO, UART and others, allow specifying the device index via the
aliases node in the device tree.

On embedded devices, there is often a combination of removable (e.g.
SD card) and non-removable MMC devices (e.g. eMMC).
Therefore the index might change depending on

* host of removable device
* removable card present or not

This makes it difficult to hardcode the root device, if it is on the
non-removable device. E.g. if SD card is present eMMC will be mmcblk1,
if SD card is not present at boot, eMMC will be mmcblk0.

Alternative solutions like PARTUUIDs do not cover the case where multiple
mmcblk devices contain the same image. This is a common issue on devices
that can boot both from eMMC (for regular boot) and SD cards (as a
temporary boot medium for development). When a firmware image is
installed to eMMC after a test boot via SD card, there will be no
reliable way to refer to a specific device using (PART)UUIDs oder
LABELs.

The demand for this feature has led to multiple attempts to implement
it, dating back at least to 2012 (see
https://www.spinics.net/lists/linux-mmc/msg26586.html for a previous
discussion from 2014).

All indices defined in the aliases node will be reserved for use by the
respective MMC device, moving the indices of devices that don't have an
alias up into the non-reserved range. If the aliases node is not found,
the driver will act as before.

This is a rebased and cleaned up version of
https://www.spinics.net/lists/linux-mmc/msg26588.html .

Based-on-patch-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lkml.org/lkml/2020/8/5/194
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20200901085004.2512-2-matthias.schiffer@ew.tq-group.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

 Conflicts:
	drivers/mmc/core/host.c

Change-Id: I86a98bab7767d630172a552e0dc72d90aaebc2a3
(cherry picked from commit fa2d0aa969)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2020-12-01 08:58:42 +08:00
Frank Liu
75c6fb9f54 media: i2c: gc2053 supports modifying frame rate
Signed-off-by: Frank Liu <frank.liu@rock-chips.com>
Change-Id: I8df05d5105d9e654515de2703726a34fde1d09a3
2020-11-30 19:32:44 +08:00
Sandy Huang
572ab8ceb5 drm/rockchip: vop2: add support bcsh
Change-Id: Ibf87fe909bf7dfd0365000ca31c3bb9b84a3dbc8
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-30 19:11:30 +08:00
Hu Kejun
950bbe45f6 media: rockchip: isp: add force update to enable dehaze
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I5d0e3bfee70cc5ac781130752196085d4185ad45
2020-11-30 18:58:35 +08:00
Yifeng Zhao
ec90a8e129 drivers: rk_nand: update nand flash drivers
1. support samsung 14nm 8GB NAND FLASH.
2. support ymtc 64L 32GB NAND FLASH.
3. support toshiba 15nm 8GB NAND FLASH.
4. disabled loader upgrade api.
5. support rk3568

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ifa5b380412b3b8fa704803bff7cddc7388fb629a
2020-11-30 18:42:39 +08:00
Yifeng Zhao
0195546e0d phy: rockchip: naneng-combphy: enable rx adpt for SATA
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I185e99e571331b8199d2eaacbd3c67bbb58bfcac
2020-11-30 18:41:13 +08:00
Andy Yan
bff67105e4 drm/rockchip: vop2: Fix a setting of port mux value
When there is no layer attach to a port, the por_mux
should set to zero.

Change-Id: I880c3ff4ce8cac8ee41bdc7e6666d13796357cc6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-30 18:40:07 +08:00
Andy Yan
1b1a5b5a62 drm/rockchip: vop2: layer_sel and port_mux config done by port
If layer_sel or port_mux config done immediately, the layer
map and port mux may change when one frame is still in display
process.

Change-Id: I5611e75c56c89fd4fa02a069acc971c9266b05b6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-30 18:40:07 +08:00
Binyuan Lan
a60591d5ba arm64: dts: rockchip: rk3566-evb3: fix clk for i2s3
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I58fa14ff7f9dfc33b9f4037377592f9721606082
2020-11-30 18:24:35 +08:00
Zhen Chen
fd5989b3f9 MALI: bifrost: fix bug "Kbase can do an out of bound access due to invalid jobslot parameter"
This patch is from ARM via mail
"Fwd: 00209996 - [Rockchip][IMPORTANT] Cat A(rare)- Security bug in Mali DDK (16-Nov, 2020) Edit Subject"

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: Ife807e5e850274222db8aea0e4cac588e02a8e53
2020-11-30 18:04:43 +08:00
Zhen Chen
c0720cd95e MALI: rockchip: upgrade bifrost DDK to g2p0-01eac0, from r25p1-01bet0
In addition, rename some configs that have been used in drivers/gpu/arm/midgard.

Change-Id: I5356d6b3f544195eb6bebe88927abe7c8bcb7dd1
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2020-11-30 18:04:43 +08:00
Finley Xiao
3256732d55 clk: rockchip: rv1126: Add CLK_32K_IOE support
Add clk_32k_ioe to select 32k io as input or output.

Change-Id: I2c32af4bded53c91280a0dbbd54af17f2f90e843
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2020-11-30 17:37:45 +08:00
Finley Xiao
9935afc20e ARM: dts: rv1126: Chage grf to pmugrf for pmucru
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I28f9308c0ba8a073ed9869373ed3d36393c39dec
2020-11-30 17:37:45 +08:00
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