Commit Graph

865065 Commits

Author SHA1 Message Date
Jianqun Xu
d4d1745bef arm64: dts: rockchip: rk3568-evb fix vcc5v0_usb nodes
Add min/max voltage for usb regulators, also add vin-supply for them.

From rk3568-evb1 hardware design, the power tree about usb is
DC12V
  ->  VCC5V0_USB(controlled by EXT_EN from PMIC)
        ->  VCC5V0_HOST(controlled by GPIO0_A6)
	->  VCC5V0_OTG(controlled by GPIO0_A5)

The EXT_EN from PMIC RK809 is designed for device power off to cut off
the usb 5.0v power, during system on, it keeps always on.

Change-Id: I21e431b4b41022b101b6db92b0769d096679b67c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-17 14:21:31 +08:00
Jianqun Xu
6de4caa7df arm64: dts: rockchip: rk356x-evb: fix pcie supply to regulator-fixed
The pcie supply design is (rk3566 evb2 example)
DC12V
  -> VCC12V_PCIE(controlled by GPIO0_C2_H)
  -> VCC3V3_PCIE(controlled by GPIO0_C2_H)
  -> VCC5V0_SYS
       -> VCC3V3_PI6C(controlled by GPIO0_C2_H)

The pci phy driver only want to enable or disable the VCC3V3_PCIE power.

Suggested from pcie owner to ignore the VCC12V_PCIE and VCC3V3_PI6C, so
the dts only need to add regulator node for VCC3V3_PCIE.

Most of time we keep the regulator name same as the hardware design, so
the dts node is
    vcc3v3_pcie: gpio-regulator {
        compatible = "regulator-fixed";
        regulator-name = "vcc3v3_pcie";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        enable-active-high;
        gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
        vin-supply = <&dc_12v>;
    };

The regulator type is "regulator-fixed" since its voltage always be
3.3v, min and max should be 3300000 make the regulator has a voltage
value.

The regulator can be enabled or disabled by regulator_enable or
regulator_disable function, so make the GPIO0_B7 as "ena_pin" for the
regulator.

The regulator is supplied by DCIN_12V, so add the vin-supply.

Change-Id: Iaf70abe9c9e06504af067dc0e3d60b775557c026
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-17 14:21:31 +08:00
Jianqun Xu
9218fe5ace pci: dwc: rockchip: fix pci power enable/disable
Change-Id: I4337746b7db995b3c6de29b50b9edc7a6bc10a81
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-17 14:21:31 +08:00
Mark Huang
7e1053d00b usb: gadget: uvc: support nv12 format
Change-Id: Iafa6bdb1540ef9f3ac766bf25e917a76069f942b
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
2021-06-16 16:27:29 +08:00
Mark Huang
61892fa501 usb: gadget: f_uvc: add device name for mult uvc
Change-Id: Ib19bb07a70019e474f5268475cadbb194fc4288d
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
2021-06-16 09:25:37 +08:00
Cai YiWei
975c26b7d1 media: rockchip: isp: fix same frame id
cur frame end and next frame start irq will
togeter if v-blank is short. to handle sof
event later if this happens.

Change-Id: If45300c8f640a6516624c4952e4f124afd7a9952
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-15 22:29:52 +08:00
Elaine Zhang
2ced9f1e5a regulator: gpio: support input supply
Add input supply, to create power tree.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: If67d2d545453b6b8e7d4e276ca5367bc8fb69dd1
2021-06-15 17:16:39 +08:00
Elaine Zhang
a91414049b regulator: gpio: add vin-supply for DT
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ia06eb1548040e8c0a1dbe079d791a8bd95f06efa
2021-06-15 17:14:34 +08:00
Cai YiWei
2e5bb20f4e media: rockchip: isp: hdr direct for isp21
Change-Id: Ia5befcdf241c22fe29ca3a2c0298547c8b4d664f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-15 17:07:23 +08:00
Zefa Chen
3f26b0bdf1 arm64: dts: rockchip: rk3568-evb1-ddr4-v10: gc8034 add power-domains
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I23e83600160acbef7c917e316454a1b12756a56f
2021-06-15 14:44:58 +08:00
shengfei Xu
8aeb120bce arm64: dts: rockchip: config the pmic_sleep internal pull up/down for rk356x boards
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I7340b4e144c3de0f3cedcf1f4d0e7e12c6480955
2021-06-15 14:42:23 +08:00
Zorro Liu
0941cc698b drm/rockchip: ebc_dev: release version v2.01
remove ebc On/off notify

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Ie5f807bfda79af9be3b76aa5db616c85f4180b1d
2021-06-15 14:07:27 +08:00
Yiqing Zeng
96d4b94155 media: i2c: imx347 fix setting flow error and fix hdr gain error
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ib0f17bc1ce74dea8caad414c1d3b66a81c10e85c
2021-06-15 11:49:01 +08:00
Zefa Chen
d326c6f762 media: spi: ms41908 fixed complete bug
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I46ec0ae903c14809c3338dc8fd6677f89579e5cf
2021-06-15 11:17:27 +08:00
Andy Yan
1f750c51d4 drm/rockchip: dw_hdmi: print property name when set/get failed
Change-Id: I947c5599df682f7bec0d3c75ed23cbcd7043ba29
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-15 10:44:10 +08:00
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