Commit Graph

867929 Commits

Author SHA1 Message Date
Hu Kejun
74962274ed media: spi: ms41908: add reback ctrl
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I44fd0d3b589f02a16b3fcd4430b6820e72b1b10f
2022-01-27 10:06:59 +08:00
Hu Kejun
634f851ac9 media: spi: ms41908: fix get time failed by compat_ioctl
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I6e95c19d8ed48136c9ee994a6b0f1f7896255469
2022-01-27 09:45:00 +08:00
William Wu
e9ef27fa36 usb: gadget: f_hid: fix zero length packet transfer
If the hid transfer with size divisible to EPs max packet
size, it needs to set the req->zero to true, then the usb
controller can transfer a zero length packet at the end
according to the USB 2.0 spec.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ia63060b4551d30821beaf494c1ccd7dfb3b6ca22
2022-01-24 20:41:56 +08:00
Zorro Liu
8247cacdf4 drm/rockchip: ebc_dev: release version v2.27
ebc: improve handwrite rate
pvi: add version 0x48

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I3b4646e5a4b2932309fa71d9fd4438bc96155907
2022-01-22 16:50:19 +08:00
Jianqun Xu
4464333fca arm64: dts: rockchip: px30 set io drive-strength-s for px30s
Set drive-strength for px30, and set drive-strength-s for px30s.

If only drive-strength, that means both for px30 and px30s.
If only drive-strength-s, that means only for px30s.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Idd2437626a28c03624ce0fb41bedf56ec61dabb0
2022-01-21 18:26:41 +08:00
Wesley Yao
2acbfa596f arm64: dts: rockchip: px30s: Adjust drv and odt of LPDDR4 CA
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
Change-Id: I4124305ff100d0dcb66f6cc0851413e0157265e8
2022-01-21 18:25:04 +08:00
Jianqun Xu
9e991e822a pinctrl: rockchip: fix rk3568 slew rate to 2bit per pin
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I5cb7d6fbb26f5bcdc6ab181d1ad33547259163ab
2022-01-21 15:54:51 +08:00
Finley Xiao
2546df521a thermal: rockchip: Add conversion time for px30s
Change-Id: I48dc8f82a3d1f05d613812a8c169f3cbec4f0d74
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2022-01-21 14:23:43 +08:00
Tao Huang
218dfa33d2 Merge branch 'develop-4.19-px30s'
Change-Id: I5c3e5e4d477cb439bee3dde09978e4380799ffe7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-01-20 14:46:25 +08:00
Liang Chen
d78fd6663e arm64: dts: rockchip: px30-evb-ddr4-v10: use px30-evb-ddr3-v10.dtsi as common config
Change-Id: Ia230a5cdb8487d4fdb4f415dfd6dc1d7c09a492d
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-01-20 14:29:15 +08:00
Lin Jianhua
709c262a1f arm64: dts: rockchip: rk3326-evb-lp3-v10-linux: update panel&ov5695 config
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: I570e64c3fa39c9997c76c0f659546dd08f56d5d9
2022-01-20 14:29:14 +08:00
David Wu
027197247f arm64: dts: rockchip: Fix rmii clock mode for px30-evb-ddr3-v10
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ie5c07e88c989ed95ebea6882b6a11c13563877b0
2022-01-20 14:29:14 +08:00
Binyuan Lan
a4b9fa310c arm64: dts: rockchip: px30-evb-ddr3-v10: update panel/headset/bluetooth config
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I4861887268ca77eeb1856cebd804a170af6ef602
2022-01-20 14:29:13 +08:00
Liang Chen
ece209a531 arm64: dts: rockchip: adjust regulator-min-microvolt of arm/logic for px30/rk3326 boards
From 0.95v to 0.85v.

Change-Id: Iaeaf795e112965069a8a78ba09043e5a9a832ace
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-01-20 14:29:13 +08:00
Liang Chen
785a28fa33 arm64: configs: px30-linux: enable ARM_SCMI_PROTOCOL and CLK_SCMI
Change-Id: I81ccfc295bb781e383a3815e1d5e23a9aad55b35
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-01-20 14:29:12 +08:00
Liang Chen
7ccbdc84a9 MALI: bifrost: rockchip: make sure pvtpll work fine when pd on/off
1. switch to normal pll(200M) before disable pd.
2. call pm_runtime_get() to enable pd before change freq(pvtpll).

Change-Id: I8749025c42ec40604361db4d4de2c2b819e0b2a3
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-01-20 14:29:12 +08:00
Zefa Chen
72fefcc13b phy: rockchip: mipi-rx: support rk3326s mipi dphy rx
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ideca40caec6c7780fcc18058ea428605361c5b07
2022-01-20 14:29:12 +08:00
Jianwei Zheng
65d1d4c772 phy: rockchip: inno-usb2: support rk3326s and px30s tuning
Tuing pre-emphasis and turn off differential receiver in suspend mode
for rk3326s and px30s SoCs.

Fix some pc can not recognize the device when using 5m cable, so tuning
usb phy squelch trigger point configure to 100mv for px30s.

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Change-Id: Ida216e8951c1f1dad19fa3ff4c31ede6a53b3458
2022-01-20 14:29:12 +08:00
Guochun Huang
75025c658f phy/rockchip: inno-video-combo-phy: support px30s
disable pin_txclkesc inverting.
reset digital logic before select lvds mode.
add support 2.5Gsps lane rate for px30s.
reset digital logic before select TTL mode.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I275d589f56e5963649aee9397eba3a9994e5901d
2022-01-20 14:29:12 +08:00
Jianqun Xu
e067a45973 power/avs: rockchip-io-domain: px30s not support pmuio1 1v8 mode
Change-Id: I6e9a4d189788d4c0f8f900adf14bbcd4af44fb8c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-01-20 14:29:11 +08:00
Jianqun Xu
38aee7e234 pinctrl: rockchip: support for px30s
PX30s has 3bit for drive strength set, the highest bit is from slewrate
bit used on PX30.

Change-Id: I21085cb10247eff9c92979ac24449759b0677b34
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-01-20 14:29:11 +08:00
Finley Xiao
7b9905dce3 thermal: rockchip: Support the px30s SoC in thermal driver
There are two Temperature Sensor on px30s, channel 0 is for CPU,
channel 1 is for GPU.

set trim for px30s.

Change-Id: I25e16c8d398634d83a3611fa829ee2e9dd974538
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2022-01-20 14:29:11 +08:00
Elaine Zhang
a8e9452928 clk: rockchip: px30: support px30s
Change-Id: Id86199e066e254279d59a76aaed02f657b40e0c7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-01-20 14:29:11 +08:00
Finley Xiao
f2577d3c26 nvmem: rockchip-otp: Add support for px30s otp
This adds the necessary data for handling efuse on the px30s.

Change-Id: Iaa509d8d22102ff4d054e855d330792f0da8f382
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2022-01-20 14:29:11 +08:00
Elaine Zhang
43da524240 arm64: dts: rockchip: px30s: add scmi/opp-table/dmc_fsp node
Change-Id: Ic1b24c9dec7746f1d1ea1e499de64fcb37e55802
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-01-20 14:29:11 +08:00
Ziyuan Xu
b5f03114e3 mmc: core: Fix used uninitialized warning when CONFIG_ROCKCHIP_THUNDER_BOOT=y
Fixes:
drivers/mmc/core/mmc.c: In function 'mmc_init_card':
drivers/mmc/core/mmc.c:760:3: warning: 'ecsd' may be used uninitialized in this function [-Wmaybe-uninitialized]

Fixes: bc28e06c42 ("mmc: add thunder boot support")
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I2a82c260f7f03f11bbfdc8a4f341f528ce50d44f
2022-01-20 14:20:02 +08:00
Jianwei Fan
40b753b965 media: i2c: lt7911d: add lt7911d type-c DP to MIPI CSI-2 bridge driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I2c7e613e486f4520ab827edd1cfe065bd327c2c8
2022-01-18 10:04:27 +08:00
Shawn Lin
cfab7abefc arm64: dts: rockchip: rk356x: Redefine np 32-bit and pref 64-bit mmio bus address
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ifb34a9b233b092ebb494c542844fa9ceb671350f
2022-01-17 17:43:12 +08:00
Rob Herring
50a01d3c10 BACKPORT: PCI: dwc: Support multiple ATU memory regions
The current ATU setup only supports a single memory resource which
isn't sufficient if there are also prefetchable memory regions. In order
to support multiple memory regions, we need to move away from fixed ATU
slots and rework the assignment. As there's always an ATU entry for
config space, let's assign index 0 to config space. Then we assign
memory resources to index 1 and up. Finally, if we have an I/O region
and slots remaining, we assign the I/O region last. If there aren't
remaining slots, we keep the same config and I/O space sharing.

Link: https://lore.kernel.org/r/20201026181652.418729-1-robh@kernel.org
Tested-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Cc: Vidya Sagar <vidyas@nvidia.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I048f7605406a2cd0a4d8eee0c8541011f672756b
(cherry picked from commit 9f9e59a480)
2022-01-17 17:42:25 +08:00
Sandy Huang
a2d8c2aeb0 drm/rockchip: vop2: fix double config done at one frame time
Maybe appear the following case:
-> set gamma
-> config done
-> atomic commit
   --> update win format
   --> update win address
   ---> here maybe meet vop hardware frame start, and triggle some config take affect.
   ---> as only some config take affect, this maybe lead to iommu pagefault.
   --> update win size
   --> update win other parameters
-> config done

so we add readx_poll_timeout() to make sure the first config done take
effect and then to do next frame config.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I6ec67b374b3afd2bed4a57aa1e7b729964df1736
2022-01-17 10:02:39 +08:00
Damon Ding
0424da3594 drm/rockchip: vop2: fix the core_dclk_div_sel setting
When the display interface is BT656. the register of
core_dclk_div_sel should always be set 1. Not only 'i'
modes like 480i and 576i, but also 'p' modes like 720p,
both need this setting.

As for BT1120 and other interfaces, this bit should be
1 when display mode belongs to 'i', and 0 when display
mode belongs to 'p'.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: If67614bc5068024d602c6acbbe9676d6245fdf1a
2022-01-14 16:03:37 +08:00
Kuo-Hsin Yang
7ce852605f UPSTREAM: drm/gem: Mark pinned pages as unevictable
The gem drivers use shmemfs to allocate backing storage for gem objects.
On Samsung Chromebook Plus, the drm/rockchip driver may call
rockchip_gem_get_pages -> drm_gem_get_pages -> shmem_read_mapping_page
to pin a lot of pages, breaking the page reclaim mechanism and causing
oom-killer invocation.

E.g. when the size of a zone is 3.9 GiB, the inactive_ratio is 5. If
active_anon / inactive_anon < 5 and all pages in the inactive_anon lru
are pinned, page reclaim would keep scanning inactive_anon lru without
reclaiming memory. It breaks page reclaim when the rockchip driver only
pins about 1/6 of the anon lru pages.

Mark these pinned pages as unevictable to avoid the premature oom-killer
invocation. See also similar patch on i915 driver [1].

[1]: https://patchwork.freedesktop.org/patch/msgid/20181106132324.17390-1-chris@chris-wilson.co.uk

Change-Id: I67c513481285d3a40cea3bdadbf1f348f00509d6
Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190108074517.209860-1-vovoy@chromium.org
(cherry picked from commit fb4b49278f)
2022-01-14 09:57:10 +08:00
Kuo-Hsin Yang
10cb221254 BACKPORT: mm, drm/i915: mark pinned shmemfs pages as unevictable
The i915 driver uses shmemfs to allocate backing storage for gem
objects. These shmemfs pages can be pinned (increased ref count) by
shmem_read_mapping_page_gfp(). When a lot of pages are pinned, vmscan
wastes a lot of time scanning these pinned pages. In some extreme case,
all pages in the inactive anon lru are pinned, and only the inactive
anon lru is scanned due to inactive_ratio, the system cannot swap and
invokes the oom-killer. Mark these pinned pages as unevictable to speed
up vmscan.

Export pagevec API check_move_unevictable_pages().

This patch was inspired by Chris Wilson's change [1].

[1]: https://patchwork.kernel.org/patch/9768741/

Change-Id: I85869a8d8fbcbfdfeb9fa69326a2495f977d9bee
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org>
Acked-by: Michal Hocko <mhocko@suse.com> # mm part
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Dave Hansen <dave.hansen@intel.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20181106132324.17390-1-chris@chris-wilson.co.uk
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit 64e3d12f76)
2022-01-14 09:55:51 +08:00
Jianqun Xu
1e69a89f4c dma-buf: dma-buf-cache: fix error case for attach / detach
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I84ff3ac7c1357416bb12ca61aa7134fc652538d6
2022-01-10 17:19:01 +08:00
Sandy Huang
82957dba39 drm/rockchip: vop2: add support DRM_FORMAT_YUYV for RK356x Cluster
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I69cb2989e113c799575fca3bb57602101d7b1341
2022-01-06 16:58:33 +08:00
Zorro Liu
6b8a1e9f8e drm/rockchip: dev_ebc: release version v2.26
improve overlay mode processtion, reduce power consume

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Ib03352779d4096fa9d366f396675827625fe50b9
2022-01-06 16:01:07 +08:00
Wangqiang Guo
3987669c73 media: i2c: add new camera sensor gc030a
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I45601cff5b3d9224575f34513882ad2e931cf0a9
2022-01-06 15:02:51 +08:00
Ziyuan Xu
61cf54704b media: rockchip: isp: improve snapshot feature(tb in RISC-V)
Once RISC-V snapshot wanna queue raw buffer to DDR until FastAE is
matched, the kernel space should not allow rpm_s/r. Make sure that isp
things won't be changed.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I16335e62ee702b93a1daf526325c3d312ebb0d4b
2022-01-06 14:43:28 +08:00
Ziyuan Xu
1f7b89badc media: i2c: os04c10: disallow s_power if RISC-V is in use
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I40d4dcd1a591c9ea76deecf15d418b6ccf170655
2022-01-06 14:43:28 +08:00
Cai YiWei
73e7f0b872 media: rockchip: isp: fix CSI2RX_DATA_IDS_1 config err
Change-Id: I2c552fd3cc291cbaa62804294752b2054efeaa63
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-01-06 14:27:17 +08:00
Jianqun Xu
ac880bc1ae drm/rockchip: return error code when mmap fail
Change-Id: Ie17d259646316cbc65f63fc9f8fb84eb4bfeee9e
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-01-05 15:54:26 +08:00
Jon Lin
b2285d434a mtd: nand: raw: Add TC58NVG5H2 id table
Change-Id: I868467609e1241282024f5ebbf97915ac744edc9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-01-05 11:11:53 +08:00
Shawn Lin
430cf313cf PCI: rockchip: dw: Set #PERST to low after suspend
As we don't do it in resume routine, so in order to be better
compatibale with devices, set it to low.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I0613e05f6d35ba7def7eedd902cfaff73d716952
2022-01-04 09:17:03 +08:00
Wyon Bi
8a4e79051b usb: typec: altmodes: displayport: Fix pin assignment
Fix pin-assignment as per specification.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: Iad7e211e43ebc01607ae534b56666ec56da2f54b
(cherry picked from commit b3e060dc22)
2021-12-31 19:26:55 +08:00
Zorro Liu
c0878f6c38 drm/rockchip: dev_ebc: release version v2.25
improve bg update under overlay mode

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Icbc503bc75177d71e21c241032dfa2f8017eb967
2021-12-31 14:36:33 +08:00
Zorro Liu
67834ad688 drm/rockchip: ebc_dev: release version v2.24
make auto/overlay mode right process flow

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Id18ac580e22788e1897a895017f40f157e00f681
2021-12-30 15:53:21 +08:00
Zorro Liu
7e5049f87e drm/rockchip: ebc_dev: release version v2.23
fix epd_overlay_lut err when use .S files

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Id5d398916938a0323e331982ece571fcbd890f2d
2021-12-28 09:13:24 +08:00
Douglas Gilbert
e7b6652a08 UPSTREAM: USB-PD tcpm: bad warning+size, PPS adapters
Augmented Power Delivery Objects (A)PDO_s are used by USB-C
PD power adapters to advertize the voltages and currents
they support. There can be up to 7 PDO_s but before PPS
(programmable power supply) there were seldom more than 4
or 5. Recently Samsung released an optional PPS 45 Watt power
adapter (EP-TA485) that has 7 PDO_s. It is for the Galaxy 10+
tablet and charges it quicker than the adapter supplied at
purchase. The EP-TA485 causes an overzealous WARN_ON to soil
the log plus it miscalculates the number of bytes to read.

So this bug has been there for some time but goes
undetected for the majority of USB-C PD power adapters on
the market today that have 6 or less PDO_s. That may soon
change as more USB-C PD adapters with PPS come to market.

Tested on a EP-TA485 and an older Lenovo PN: SA10M13950
USB-C 65 Watt adapter (without PPS and has 4 PDO_s) plus
several other PD power adapters.

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191230033544.1809-1-dgilbert@interlog.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
(cherry picked from commit c215e48e97)
Change-Id: I51f7e53e6540cdc0ad543f7cbc80416204a1c816
2021-12-27 15:01:26 +08:00
Guochun Huang
c9282596c9 drm/rockchip/rk628: combtxphy: lvds: power up all channel after phy lock
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: If28520a20e73258037c08cb4dd95888a45093d6a
2021-12-27 08:38:26 +08:00
Yu Qiaowei
e484525366 video: rockchip: rga2: Fix rotating mmu interruption error.
Since the ARGB format was added without processing the address offset
during rotation, the address offset of mmu was calculated incorrectly.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6bddd21b50bf60cadf493e73cff10c18210c375c
2021-12-23 20:24:29 +08:00