Commit Graph

865050 Commits

Author SHA1 Message Date
Pascal Paillet
6d0cb62e47 UPSTREAM: regulator: core: Let boot-on regulators be powered off
Boot-on regulators are always kept on because their use_count value
is now incremented at boot time and never cleaned.

Only increment count value for alway-on regulators.
regulator_late_cleanup() is now able to power off boot-on regulators
when unused.

Change-Id: I7adc58a78fec934e245d9ec94c4604b4d7c7ebb5
Fixes: 05f224ca66 ("regulator: core: Clean enabling always-on regulators + their supplies")
Signed-off-by: Pascal Paillet <p.paillet@st.com>
Link: https://lore.kernel.org/r/20191113102737.27831-1-p.paillet@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 089b3f61ec)
2021-06-11 22:48:26 +08:00
Tao Huang
6d247974f8 Merge tag 'ASB-2021-06-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2021-06-01
CVE-2020-14305
CVE-2020-14381
CVE-2021-0512
CVE-2021-3347

* tag 'ASB-2021-06-05_4.19-stable': (1641 commits)
  Linux 4.19.193
  usb: core: reduce power-on-good delay time of root hub
  net: hns3: check the return of skb_checksum_help()
  drivers/net/ethernet: clean up unused assignments
  hugetlbfs: hugetlb_fault_mutex_hash() cleanup
  MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c
  MIPS: alchemy: xxs1500: add gpio-au1000.h header file
  sch_dsmark: fix a NULL deref in qdisc_reset()
  ipv6: record frag_max_size in atomic fragments in input path
  scsi: libsas: Use _safe() loop in sas_resume_port()
  ixgbe: fix large MTU request from VF
  bpf: Set mac_len in bpf_skb_change_head
  ASoC: cs35l33: fix an error code in probe()
  staging: emxx_udc: fix loop in _nbu2ss_nuke()
  mld: fix panic in mld_newpack()
  net: bnx2: Fix error return code in bnx2_init_board()
  openvswitch: meter: fix race when getting now_ms.
  net: mdio: octeon: Fix some double free issues
  net: mdio: thunder: Fix a double free issue in the .remove function
  net: fec: fix the potential memory leak in fec_enet_init()
  ...

Change-Id: If547ecdc8654e01ea17afea2ff2dd546f7a495d2

Conflicts:
	drivers/media/i2c/ov5670.c
	drivers/mmc/core/mmc_ops.c
	drivers/regulator/core.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/gadget/function/f_uac1.c
	drivers/usb/gadget/function/f_uvc.c
2021-06-11 22:47:35 +08:00
Tao Huang
d42add27c8 Revert "CHROMIUM: usb: gadget: configfs: Fix KASAN use-after-free"
This reverts commit d7b2c97fd0.

Relpaced by commit c3a4fc9f37 ("usb: gadget: configfs: Fix KASAN use-after-free").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I838bfe4ef5d3a7ba3ce4296f76434cfc3d33c991
2021-06-11 20:29:57 +08:00
Tao Huang
51d8f2cdef Revert "PM / QoS: Do not call pm_qos_set_value_for_cpus()"
This reverts commit 17823171af.

Relpaced by commit 3092012197 ("ANDROID: GKI: QoS: Prevent usage of dev_pm_qos_request as pm_qos_request").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iff9c38acdae14cee92c52ac833c7bf062c7fc74c
2021-06-11 20:29:53 +08:00
Tao Huang
62df34992b Revert "UPSTREAM: dma-buf: Fix SET_NAME ioctl uapi"
This reverts commit 97fd895541.

Relpaced by commit 06931a5d14 ("UPSTREAM: dma-buf: Fix SET_NAME ioctl uapi").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I8623aa664bca0c41967a14b7f2247927c0b26151
2021-06-11 20:29:48 +08:00
Andy Yan
9ebbcf1dc0 drm/rockchip: vop2: Add vcnt event
The vcnt event is similar to vblank event, but
userspace can set the time(which scan line) when
the event occur.

This add a new event type: DRM_EVENT_ROCKCHIP_CRTC_VCNT
userspace create this event by ioctl DRM_IOCTL_ROCKCHIP_GET_VCNT_EVENT

Change-Id: If3da4bb29469ac7dc379e9462994aeda3202d3d2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-11 19:43:36 +08:00
Ziyuan Xu
feb6da4129 mmc: block: prefer the host's capability(card_busy) than send_status
According to the specification, the controller should check the device
status before data transport. Generally, it can get the status of device
via CMD13. It's upset that command communication will produce a little
interrupt inside the controller.

To avoid interrupt storm whilst heavily I/O request, use card_busy
instead of send_status(CMD13).

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I3ba79ba2f563006112b0157b78aab5b31911b61a
2021-06-11 17:32:52 +08:00
Jon Lin
ddf2490cc9 drivers; rkflash: Support new devices
W25N04KVZEIR, DS35Q2GB-IB, EM73C044VCF-H, XT26G11C, MT29F1G01ABA,
F50L1G41XA, JS28U1GQSCAHG-83

Change-Id: I38a16e26dea1624a4e101d7f965f9abfe44a3821
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-06-11 15:32:22 +08:00
Fenrir Lin
3938a57de8 ARM: configs: add rv1126-battery-evb.config
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: Ib11f46996d18dc24c836a9055077fd6e52dbaebc
2021-06-11 15:27:44 +08:00
Fenrir Lin
bb512e5e7e ARM: dts: rockchip: add rv1126-bat-evb-v10.dts
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: I4762d2796454c0f4b0f02620d78e2cb6cc6f9339
2021-06-11 15:26:12 +08:00
Shunhua Lan
5fbad35637 ARM: dts: rockchip: rk628: add i2s mclk config and select test_clkout pin as mclk output
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I32ef6ae68a0ffe6ac42a75de09d7995388815f03
2021-06-11 14:30:32 +08:00
Shunhua Lan
0649982abc media: i2c: rk628csi: add i2s mclk
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I70b5b98f37644f881d6db4c0c35a1a84a80fdbff
2021-06-11 14:24:44 +08:00
Fenrir Lin
2b78c27d58 media: i2c: os04c10: support thunderboot mode
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: Ia2fe31c7eb0ee8aba44ecc3f9d102a2f89e5443c
2021-06-11 10:51:46 +08:00
Vicent Chi
dfbe2188c4 media: i2c: imx415: support thunderboot mode
Change-Id: I1634a985880d63c1f1d2873a63923fe87dc7fe68
Signed-off-by: Vicent Chi <vicent.chi@rock-chips.com>
2021-06-11 10:51:41 +08:00
Joseph Chen
274d688a9f ARM: dts: rockchip: rk3308-dot-rk816-v10-aarch32: remove RKPM_DBG_FSM_SOUT
RKPM_DBG_FSM_SOUT enables PMU FSM state signal output through
GPIO4_D5/SDMMC_CLK during sleep, mainly for debug PMU FSM flow.

Some one may use this pin as LED light, it's fine to drop it
to avoid influence on LED.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I54705292226d82829bc37db0758aa0d9a9995658
2021-06-11 09:07:41 +08:00
Joseph Chen
5da4c5d59a arm64: dts: rockchip: rk3308: remove RKPM_DBG_FSM_SOUT
RKPM_DBG_FSM_SOUT enables PMU FSM state signal output through
GPIO4_D5/SDMMC_CLK during sleep, mainly for debug PMU FSM flow.

Some one may use this pin as LED light, it's fine to drop it
to avoid influence on LED.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I82af5fa676d6db8b81e877729c44b976bbfa9ea5
2021-06-11 09:07:21 +08:00
Alex Zhao
5902a56f52 net: rockchip_wlan: rtl8821cs: suspend don't turn off the wifi power.
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I97b5de41d642a05ed914e9d9f86307bd9c7adc34
2021-06-11 09:05:36 +08:00
Zefa Chen
d18b87491a media: i2c: add vcm driver dw9718
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: If6d1e14a20280a88718a72c244672fd42c8b2738
2021-06-10 16:33:33 +08:00
Zefa Chen
291afbfb46 ARM: dts: rv1126-rmsl-ddr3-v1: support dw9718
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ic9261a41305ce3a14bcded343828bd7e9f372f4a
2021-06-10 16:30:45 +08:00
Tony Xu
0c5b62a2da ARM: dts: rv1126-rmsl-ddr3-v1: support psensor
Signed-off-by: Tony Xu <tony.xu@rock-chips.com>
Change-Id: I7ed60597fef8ae8ca960c7d85581d742ebe588b9
2021-06-10 16:28:28 +08:00
Shawn Lin
69eac309b2 phy: phy-rockchip-snps-pcie3: Add sram_init_done check
From test, sram_init_done can be used as a indicator to
see if phy power and input clock work find. Let's yell out
error is anything wrong with phy.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I5493e32ec5a9a6a8f6fc45e95618a657d9a21a67
2021-06-10 16:25:52 +08:00
Zefa Chen
54037be3be media: i2c: sc2310 fixed hdr probabilistically fail to capture images and pm issue
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I93e764d8bb7e009fa00595f5320cb0ee54a34760
2021-06-10 14:23:20 +08:00
Andy Yan
c7659101be drm/rockchip: vop2: check plane state before check plane oetf
We have some plane not registered to drm core(Such as cluster
plane on some linux system), so they don't have pstate.

And also we don't need to check plane state for oetf for
a inactived plane(has no fb).

Change-Id: I909b665397c3df530ff0f466e0d654dcbb3f1a40
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-10 11:52:19 +08:00
Yu Qiaowei
762e61f66b video/rockchip: rga2: Fix the initialization of RGA2 version number
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib66a7c09def302ce7ad3c2bbff9be9946175c4c6
2021-06-09 16:38:41 +08:00
Shunqing Chen
0fcdebff4c clk/rockchip/regmap: rk628: compatible with MCU mode
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I85f2c97ac23c585fc136eb5efa4e01fde979f883
2021-06-09 11:03:08 +08:00
Wyon Bi
7085d63854 clk/rockchip/regmap: rk628: Add support for clk_testout
Change-Id: I71f5ca1d4002d45438ff9d038ccc7eef5a28a857
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-06-09 10:53:50 +08:00
Zorro Liu
99c097ed84 drm/rockchip: ebc_dev: release version v2.00
1.update auto/overlay mode

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I816ce38a50b2446521021c5e83089ca9e7d29f20
2021-06-08 11:26:39 +08:00
Cai YiWei
12931bb817 media: rockchip: isp/ispp to version v1.6.1
Change-Id: I6a9cdac4874a02cb0465c87aa23d7180d2109d3d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-07 18:11:56 +08:00
Shunqian Zheng
7dde7286ee media: rockchip: ispp: destory ispp buffers if start_stream failed
Clean up the buffer pool if start streaming failed.

BUG=redmine:#301918

Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I4abcf17ef0c66dabcddcfac7395c7efabbfe6e47
2021-06-07 18:08:53 +08:00
Sandy Huang
664855bbb1 drm/rockchip: vop2: only when have active win then need to wait win close
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ieaf6497a8597d5d6d3f4a0eb0169fba55c93b4e2
2021-06-07 14:31:24 +08:00
Sandy Huang
b312a6cefb drm/rockchip: vop2: use default sdr2hdr(1000nit) curve
keep sdr2hdr result consistent between VOP and GPU

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3ef6b289978d4b0c083d99e93d97a95b2e7f0b25
2021-06-07 14:31:24 +08:00
Sandy Huang
a433c6370d drm/rockchip: vop2: fix csc config error when at hdr mode
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ide5b9deb13882a561765a2e2be660e3463d1764f
2021-06-07 14:31:24 +08:00
Sandy Huang
916008d27e drm/rockchip: vop2: add more sdr2hdr scene
maybe appear the following scene for sdr2hdr:
1. one sdr layer      -> vop[sdr2hdr]   -> hdr output
2. one hdr layer      -> vop[bypass]  |
                                      | -> hdr output
   one/more sdr layer -> vop[sdr2hdr] |

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I042baf68d36f6f9a089d81928c783e52a2b21499
2021-06-07 14:31:24 +08:00
Ding Wei
c6ce255dd0 arm64: dts: rockchip: rk3568: vepu && jpegd: Disable auto freqence set
reason: In rk356x, due to the hardware, vepu and jpegd should
disable auto freqence.

Change-Id: I2da5b5a7fc3b86180aef28b378a7b651e31a6b7a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-06-07 11:51:01 +08:00
Cai YiWei
dd1b793a86 media: rockchip: ispp: reserved memory using rdma_sg ops
Change-Id: I7bc3cb977c56fc6c81c15baa67d38e3ce59a409f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-07 11:05:48 +08:00
Cai YiWei
72e161eacb media: rockchip: isp: reserved memory using rdma_sg ops
Change-Id: Ia01770c3f54bfbb3d65a73c7db0e8ab8730ab29d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-07 11:05:48 +08:00
William Wu
78c5b7ae9f usb: dwc3: gadget: fix XferInProgress event for isoc ep
On XferInProgress events, if the endpoint is isochronous
type, do not kick transfer directly even if the pending_list
isn't empty. Because it needs to wait for XferNotReady
event to start isoc transfer. Without this patch, it will
trigger a large number of unuseful XferInProgress events,
and easily cause loss of synchronization data if the cpu
core unable to handle the dwc3 thread interrupt in time.

Fixes: b77df21107 ("usb: dwc3: gadget: Continue to process pending requests")
Change-Id: I14d16240a6e10db466fd9822b4fdc35d79817508
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-06-04 22:20:12 +08:00
Yiqing Zeng
b6d806aab1 media: i2c: imx178 fix some errors for exposure and gain
1.fix vts_def/hts_def wrong value;
2.fix gain wrong value;

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I9e0d8b403eb57b4e031ef87179c5dc327628ed9b
2021-06-04 17:50:31 +08:00
Andy Yan
73444eb25e drm/rockchip: vop2: Support set background color from userspace
Add a BACKGROUND property for each crtc.
8 bit for every color channel(r/g/b/y/u/v).

Change-Id: I9439bf16a8142e936508e843cc25b6263e2f661d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-04 16:27:13 +08:00
Zhichao Yu
cd98dfb7fd media: i2c: support imx462 sensor driver
1.support mipi 1080P@30fps linear/hdr2 dol mode
2.support lvds 1080P@60fps linear mode and 1080P@30fps hdr2 dol mode

Change-Id: Ic2cce1f9119cf27685c35c99993bb1c82bd3838a
Signed-off-by: Zhichao Yu <zhichao.yu@rock-chips.com>
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
2021-06-04 16:19:39 +08:00
Shunqing Chen
b5995924b3 drm: rockchip: rk618: hpd io pull down
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I309bc695dbd94281880ce934415c1864c5abc8c8
2021-06-04 16:17:15 +08:00
Liang Chen
ce633552f7 sched/core: reduce rescheduling IPI for non-preempt kernel
It is not necessary to send rescheduling IPI when target cpu is not
idle for non-preempt kernel, because the target cpu will pick all the
tasks on the run-queue before enter idle.

Test this patch on RK3568-NVR, make cpu load to 100% with command:

taskset 01 yes > /dev/null &
taskset 02 yes > /dev/null &
taskset 04 yes > /dev/null &
taskset 08 yes > /dev/null &

So that the cpu will not enter idle.

without the patch, 32 channel video@25fps:
[root@RK356X:/]# cat /proc/interrupts | grep IPI0; sleep 10; cat /proc/interrupts | grep IPI0
IPI0:     74204      58815      99596      81177       Rescheduling interrupts
IPI0:     79503      76143     106149      87676       Rescheduling interrupts

with the patch, 32 channel video@25fps:
[root@RK356X:/]# cat /proc/interrupts | grep IPI0; sleep 10; cat /proc/interrupts | grep IPI0
IPI0:     28814      59314      60173      56759       Rescheduling interrupts
IPI0:     28814      59314      60173      56759       Rescheduling interrupts

Change-Id: I0d45a3d999696503124e693e7d6e145df719174a
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-06-04 14:23:45 +08:00
Liang Chen
a6baf49997 arm64: dts: rockchip: rk356x: enable bus_npu for some boards
Enable bus_npu so that we can enable npu@1.0G safely when necessary.

Change-Id: I1a6ce1652aba7bafe91135bc79881cad0d5980ce
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-06-04 14:23:45 +08:00
Jianqun Xu
fd1e62d491 Documentation: devicetree: rockchip-io-domain add rk3568 support
RK3568 has 3 pmu io-domain, pmuio0/1/2, but the pmuio0 is 1.8v only, and
pmuio1 is 3.3v only, only pmuio2 support to select 1.8v or 3.3v.

RK3568 also has 7 io-domain, vccio1/2/3/4/5/6/7, but the vccio2
defaultly selected by the FLASH_VOL_SEL(GPIO0_A7).

Change-Id: I55ea1263c641112705b1443ff919c508cb3be2f0
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-04 14:23:45 +08:00
Shawn Lin
275b0b1950 arm64: dts: rockchip: remove all rockchip,txclk-tapnum for rk356x
We finally decide to set 16 for tx delay in driver, so no need for
dts to set it now.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I642ed3039db5410ca478b255166d07a035e971aa
2021-06-04 14:23:44 +08:00
Shawn Lin
aa4a1a95ed mmc: sdhci-of-dwcmshc: Set default tx delay to 16
According to the new test result, set tx delay to 16
by default.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I8e0bacfbf14f8c5db60a4d56a624d63c49e23051
2021-06-04 14:23:44 +08:00
Sugar Zhang
32c877b98b ASoC: rockchip: i2s-tdm: Remove sync reset for latest soc
Do sync reset only for PX30/RK1808/RK3308, because the BUG 'fsync
is out of sync' had been fixed on the latest version controller.

Change-Id: Ia4cd711a213cc03221726f7b6e89de3c317dc965
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-06-04 14:23:44 +08:00
Cai YiWei
69d256016a media: rockchip: isp: isp21 get 3a stats from ddr
Change-Id: I223a654d65377f866e1b71d0652f889a5ffbf079
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-04 14:23:44 +08:00
Cai YiWei
a396d69b9e media: rockchip: isp: apply en params if no match for isp21
Change-Id: I72bf7551ac78d035561405d9a61bb40990925085
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-04 14:23:44 +08:00
Cai YiWei
c1b4d98545 media: rockchip: isp: apply en params if no match for isp20
Change-Id: I47bc2b58aae016df1bb6ba0a1425431bed53ca9d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-04 14:23:44 +08:00