Commit Graph

859267 Commits

Author SHA1 Message Date
Finley Xiao
3aa3abee3e soc: rockchip: opp_select: Add support to get leakage for rv1126
The leakage value is a decimal on RV1126, let it multiply by 1000 for
changing voltage and frequency scale according to leakage. And round up to
the nearest whole number for calculating static power, it does not need
to be precise.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I8ae256eb8e725503c744be2011a5edc7275d47cc
2020-10-15 19:44:59 +08:00
Sugar Zhang
0e5a994307 nvmem: rockchip-otp: Add write protection for oem zone
This patch reserved 16 bytes at the tail for write protection
and future extension.

+----------+------------------+--------------------------+
| TYPE     | RANGE(byte)      | NOTE                     |
+----------+------------------+--------------------------+
| system   | 0x000 ~ 0x0ff    | system info, read only   |
+----------+------------------+--------------------------+
| oem      | 0x100 ~ 0x1ef    | for customized           |
+----------+------------------+--------------------------+
| reserved | 0x1f0 ~ 0x1f7    | future extension         |
+----------+------------------+--------------------------+
| wp       | 0x1f8 ~ 0x1ff    | write protection for oem |
+----------+------------------+--------------------------+

+-----+    +------------------+
| wp  | -- | wp for oem range |
+-----+    +------------------+
| 1f8 |    | 0x100 ~ 0x11f    |
+-----+    +------------------+
| 1f9 |    | 0x120 ~ 0x13f    |
+-----+    +------------------+
| 1fa |    | 0x140 ~ 0x15f    |
+-----+    +------------------+
| 1fb |    | 0x160 ~ 0x17f    |
+-----+    +------------------+
| 1fc |    | 0x180 ~ 0x19f    |
+-----+    +------------------+
| 1fd |    | 0x1a0 ~ 0x1bf    |
+-----+    +------------------+
| 1fe |    | 0x1c0 ~ 0x1df    |
+-----+    +------------------+
| 1ff |    | 0x1e0 ~ 0x1ef    |
+-----+    +------------------+

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: If23bb8d77d684a3bff5797e35914c1f897c69fb0
2020-10-15 19:42:14 +08:00
Sugar Zhang
fd2a7f4f91 nvmem: rockchip-otp: Add magic-number for enable otp write func
This patch add magic for enable otp write func to avoid unexpected written.

e.g.:

echo 1380926283 > /sys/module/nvmem_rockchip_otp/parameters/rockchip_otp_wr_magic

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I0d2d5fe97de4f69f2a30142d62a21e17d818d98f
2020-10-15 19:34:13 +08:00
Yiqing Zeng
2a30e12977 media: i2c: imx335 fix comile error
Fixes: a9b8a1ef99 ("media: i2c: imx335 add hdr_mode in enum frame interval")
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I6e6f143b75784dcc8dffbbfe1e4a6945b0699ccb
2020-10-15 18:44:57 +08:00
Yao Xiao
efdfe27e17 ARM: dts: rv1126-bat-ipc-v10: add nodes for wifi keepalive
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
Change-Id: Id59d95230691a98193abcf1e3f4c7dc4c5d0930c
2020-10-15 17:27:41 +08:00
Yao Xiao
36a2d0b595 net: rfkill-wlan: support chip alive and add wifi power node
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
Change-Id: I481e415f29840db332381750ad266067f15dbac7
2020-10-15 17:05:34 +08:00
Yao Xiao
2447df1bef mmc: support logic_card and alive_card for sdio
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
Change-Id: Ic51f0dfb3bb2de2e1f52ab5e24dbeaebc729ec99
2020-10-15 16:58:36 +08:00
Jianqun Xu
7517c89360 arm64: dts: rockchip: rk3568 add io-domain for evb
The io-domain node should be matched to hardware power tree, lookup to
IO Power Domain Map on EVB Schematics For RK3568 file.

Change-Id: I03a0a66b3b21de055912624b893322fa4880a262
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-10-15 16:32:31 +08:00
Jianqun Xu
8b375d3429 arm64: dts: rockchip: rk3568 add io-domain node
Change-Id: Ib5b4b32faa114d227f463bcb5e0c95d4ccf197a0
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-10-15 15:54:40 +08:00
Huang zhibao
e6684b5e75 input: remotectl: fix PWM_CH1_INT_ENABLE definition error
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: Ib27d5ee7d25004f28978bfd797fa92f045ffb54f
2020-10-15 14:33:49 +08:00
Cai YiWei
9ebe3e376b media: rockchip: isp and ispp sync to power off
Change-Id: Iaaa74ccdc6956458e700fdcf430eba804707c200
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-10-15 14:32:43 +08:00
Shawn Lin
e963ad7f78 arm64: dts: rockchip: Add sdmmc nodes for RK3568 Soc
Change-Id: I79689eb666a467b12d1e6109f6fbf08399544637
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-10-14 20:20:24 +08:00
Shawn Lin
5bc85371a3 arm64: dts: rockchip: Add emmc node for RK3568 Soc
Change-Id: Ie7773e81bc3102379bf4aa30505c6c5cbcfadee3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-10-14 20:20:19 +08:00
Zhenke Fan
d53fb08fae media: i2c: add sc200ai driver
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I25d53efa9c620c51407529414f7eebfdb315cfd6
2020-10-14 16:33:19 +08:00
XiaoDong Huang
60005ae6b0 ARM: configs: rv1126_defconfig: enable ROCKCHIP_BUS_DEVFREQ
Change-Id: Ibdb404f80fda3b3bcdcb3966b4a54b953569bcf1
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2020-10-14 15:23:59 +08:00
XiaoDong Huang
35ff20973c ARM: dts: rv1126: disable soc-bus11
Change-Id: I4e0fd38ca3b20c48834a9f679a1922054a97fff5
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2020-10-14 15:11:25 +08:00
Yao Xiao
ef0479c9ed net: rockchip_wlan: ap6xxx: support keepalive during host shutdown
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
Change-Id: Icf524f45da79a73134dc46e64f08a23fcab908cf
2020-10-14 14:14:41 +08:00
Weiwen Chen
d5467b9bdc ARM: dts: rockchip: rv1126: reboot-mode: add panic and watchdog
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I1068bf4cd7ac33073655cc9dfdd56d88bd5a900a
2020-10-14 14:12:02 +08:00
Wang Jie
5928c52b49 phy: phy-rockchip-usb: support to force otg mode for rk3288 soc
usage:
(1) force host mode
    echo 1 > /sys/devices/platform/ff770000.syscon/ff770000.syscon:usbphy/phy/phy-ff770000.syscon:usbphy.2/otg_mode

(2) force device mode
    echo 2 > /sys/devices/platform/ff770000.syscon/ff770000.syscon:usbphy/phy/phy-ff770000.syscon:usbphy.2/otg_mode

Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I44fa1461076e6c0cd8aba1e2e444004cfb3f5271
2020-10-14 09:54:14 +08:00
Yiqing Zeng
a9b8a1ef99 media: i2c: imx335 add hdr_mode in enum frame interval
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I0e5b73a7ad167d270729b484a7203a20ddfe493d
2020-10-14 09:53:05 +08:00
Yiqing Zeng
ecf8977f0b media: i2c: imx334 parse mclk pinctrl or the mclk will be unavailable
and add set flip ctrl

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I2c355c87ab7fe1e7e8f747e58efe499998e89c34
2020-10-14 09:52:16 +08:00
Li Huang
6100664ca6 video: rockchip: rga2: Update device
1. Modify format enum.
2. Add YUYV input feature.
3. Add NN quantize feature.
4. Add Y4 && YUV400 output feature.

Change-Id: I5ae0d09e5fadf9875cae7ed001d12bd2ba17ce23
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2020-10-14 09:19:40 +08:00
Shawn Lin
5549e7e816 mmc: sdhci-of-dwcmshc: add hs400es support
Add dwcmshc specific hs400 enhanced strobe support.

Change-Id: I028b02608a1507b2b5f0444a1ef8342c4d4227f5
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-10-13 17:55:12 +08:00
Jisheng Zhang
221b4120e3 UPSTREAM: mmc: sdhci-of-dwcmshc: add suspend/resume support
Add dwcmshc specific system-level suspend and resume support.

Change-Id: I5fa4a9d9a5b6ed9752f544361fd18fe23001297f
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20200515141926.52e088fe@xhacker.debian
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit bccce2ec77)
2020-10-13 17:55:12 +08:00
Jisheng Zhang
08a0674b60 UPSTREAM: mmc: sdhci-of-dwcmshc: implement specific set_uhs_signaling
We need a different set_uhs_signaling implementation for
MMC_TIMING_MMC_HS and MMC_TIMING_MMC_HS400.

Change-Id: I8fd38a73a9fea7fefb12d7e741dc66df09f15b06
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20200513182602.3636a551@xhacker.debian
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 554232e8d5)
2020-10-13 17:55:12 +08:00
Jisheng Zhang
bba47f4b54 UPSTREAM: mmc: sdhci: introduce adma_write_desc() hook to struct sdhci_ops
Add this hook so that it can be overridden with driver specific
implementations. We also let the original sdhci_adma_write_desc()
accept &desc so that the function can set its new value. Then export
the function so that it could be reused by driver's specific
implementations.

Change-Id: I7facf3341a12e6af96d2436e6e568b76bfa3f8c2
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 54552e4948)
2020-10-13 17:55:12 +08:00
Jisheng Zhang
8957c12559 UPSTREAM: mmc: sdhci: add adma_table_cnt member to struct sdhci_host
This patch adds adma_table_cnt member to struct sdhci_host to give more
flexibility to drivers to control the ADMA table count.

Default value of adma_table_cnt is set to (SDHCI_MAX_SEGS * 2 + 1).

Change-Id: I595b4c3fa32730cb9fbc386f6730dff7580cd899
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit e93be38af1)
2020-10-13 17:55:12 +08:00
Jisheng Zhang
cf8b582dd9 UPSTREAM: mmc: sdhci-of-dwcmshc: solve 128MB DMA boundary limitation
When using DMA, if the DMA addr spans 128MB boundary, we have to split
the DMA transfer into two so that each one doesn't exceed the boundary.

Change-Id: Ie3a283dd146eb54685325ded8d47cac36cb68507
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit b85c997d2c)
2020-10-13 17:55:12 +08:00
Allon Huang
aea8f3a598 media: i2c: imx415: add quick stream on function
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: Ia277224a25214263564b9bc21ada83c76f021d8d
2020-10-13 17:34:31 +08:00
Allon Huang
bc1e164017 media: rockchip: cif: add reset watchdog
Add mechanism to resume when frame end is stopped unexpected.
It is cru reset, and set by menuconfig, continue mode is default.

Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I9273ea655da9f6e2d9318029bfba980838c4f5dd
2020-10-13 17:21:32 +08:00
Shawn Lin
570c27831f PCI: rockchip: dw: disable CPL order ruler for RC
Change-Id: I154b2e4b0327dc7e35f3d497f353bd03cb2b00f3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-10-13 14:40:35 +08:00
Finley Xiao
609e3bf53b ARM: dts: rockchip: rv1126: Enable 934MHz for npu
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I54701611b1f1d3781bcae2eb95a68c82558f7c85
2020-10-13 14:11:27 +08:00
Yifeng Zhao
2de6a66ea8 arm64: dts: rockchip: add nandc node for RK356X
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I7fb512eb1c1a281c4d891f73380e05ae1ca73b5a
2020-10-13 12:16:30 +08:00
William Wu
83c7532f4f usb: gadget: f_uvc: support uvc and adb use independently
If we use usb gadget as uvc and adb composite function,
the adb will be disconnected if the uvc camera apk is
closed. I can reproduce this issue by the following steps
on rk3399/rk3288 platforms.

1. Set usb gadget as uvc and adb composite function,
   and open uvc camera apk on rk3399/rk3288 platforms.
2. Connect usb to PC, and use adb shell;
3. Close the uvc camera apk;

And then, the adb will also be disconnected. It's because
that when close the uvc camera apk, the userspace calls
v4l2_release -> uvc_v4l2_release -> uvc_function_disconnect
-> usb_gadget_deactivate -> usb_gadget_disconnect ->
pullup(gadget, 0), this cause usb controller disconnect the
usb connection.

This patch adds a uvc_enabled flag to indicate that usb
is connected, don't call pullup(gadget, 0) to disconnet
usb if we only close uvc camera apk but not plug out usb
cable.

Change-Id: I0cc5ce8a24e8e06e0dc9215dfd1b92ef702e4311
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-10-12 15:19:38 +08:00
Elaine Zhang
5522e03af8 clk: rockchip: rv1126: mux clocks to none-cpll/hpll
There is a lower power dissipation requirement for some products, like
battery ipc, bell, etc... We have to gate cpll/hpll to reduce power
dissipation.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I48fae621c980b6f7f7d8e8ca71171febd6c6a9a8
2020-10-12 12:02:26 +08:00
Shunqing Chen
36334401fd drm/bridge: synopsys: dw-hdmi: enable clock termination
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I4927349acfdd94e0dd7b332bbad73defb9ca4f67
2020-10-12 11:53:59 +08:00
Ziyuan Xu
e59af08e39 ARM: configs: rv1126-battery.config: disable usb_o/ehci for low power
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Id3d4281ec30c9508c82c67dd9e68190a77941bee
2020-10-12 11:33:11 +08:00
Ziyuan Xu
4369eeb724 ARM: configs: rv1126-battery.config: enable ROCKCHIP_LOW_PERFORMANCE
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I991f7564aa3859d0063a3f9d5be46299441d8aef
2020-10-12 11:33:03 +08:00
Ziyuan Xu
584d6819a6 soc: rockchip: Add ROCKCHIP_LOW_PERFORMANCE config
This option make the SoC low power.
Default n.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I89254b09c3e0c1c1a6c7020791a440c554a95ca4
2020-10-12 11:32:52 +08:00
Elaine Zhang
ac723caa42 clk: rockchip: rk3568: Replace RKNN with NPU
Update the TRM.

Change-Id: I0fb48df339d2a2350d0e6e2efc5128be0f90a97a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-10-12 10:35:56 +08:00
Tao Huang
0c17cc5fc3 Merge tag 'ASB-2020-10-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2020-10-01
Fix for CVE-2020-0423 not yet public.

* tag 'ASB-2020-10-05_4.19-stable': (518 commits)
  ANDROID: use arm-linux-androidkernel- for CROSS_COMPILE_COMPAT
  ANDROID: build.config.common: enable LLVM=1
  Linux 4.19.149
  KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch
  ata: sata_mv, avoid trigerrable BUG_ON
  ata: make qc_prep return ata_completion_errors
  ata: define AC_ERR_OK
  kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE
  s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl
  mm, THP, swap: fix allocating cluster for swapfile by mistake
  kprobes: Fix to check probe enabled before disarm_kprobe_ftrace()
  s390/dasd: Fix zero write for FBA devices
  tracing: fix double free
  KVM: SVM: Add a dedicated INVD intercept routine
  KVM: x86: Reset MMU context if guest toggles CR4.SMAP or CR4.PKE
  MIPS: Add the missing 'CPU_1074K' into __get_cpu_type()
  regmap: fix page selection for noinc reads
  ALSA: asihpi: fix iounmap in error handler
  bpf: Fix a rcu warning for bpffs map pretty-print
  batman-adv: mcast: fix duplicate mcast packets from BLA backbone to mesh
  ...

Change-Id: I5af52b9921cfd8b55aba5b7705a8bc1a4f88db74

Conflicts:
	drivers/tty/serial/8250/8250_port.c
	drivers/usb/core/message.c
	drivers/usb/core/quirks.c
2020-10-10 18:38:14 +08:00
Finley Xiao
63204abfce arm64: dts: rockchip: rk3568: Add qos device node
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2a5b04f6027e11c1607b94bbe7505aef96b28542
2020-10-10 18:28:23 +08:00
Finley Xiao
eaaea7d366 arm64: dts: rockchip: rk3568: Add pmu device node
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I719eedaf6fddc32ca14cd59757241271c38d8f58
2020-10-10 18:28:23 +08:00
Shunqing Chen
a7d0b4290f power: rk817-battery: fix dsoc jumps after resume
The units of gap_soc and sleep_soc are different.

Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I42873f1dd4ce0543aa1e89dd91131a5c1fbfa23b
2020-10-10 18:23:04 +08:00
Ding Wei
ab0a33650a ARM: dts: rockchip: rv1126: rkvenc rates match with opp_table
Change-Id: Ic8eaaa017e121536fbdcc302a0a9631e0fca961b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-10-10 17:45:51 +08:00
Shunqian Zheng
8e2845b7a9 media: i2c: Add jx_f37 driver
The jx_f37 driver is one lane and supports 2frame HDR,
the gain of short and long frame shall be the same.

Change-Id: Ic92dd76096a4467226522c15dd179c9983fc5c93
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2020-10-10 17:07:23 +08:00
Weiwen Chen
bd5f5c8282 ARM: dts: rv1109: add 38x38 v10 emmc support imx307
This board is the same as rv1126-38x38-v10-emmc.dts,
except camera sensor.

Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: Ib5e368b354b1cd04387db51e038cbc4f539ebf3e
2020-10-10 16:53:02 +08:00
Xing Zheng
92e8d9a625 ASoC: rk3308_codec: increase more delay and fix noise once in a while
To reset Codec and DAC Digital need to wait they are stable.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Iafa48e1d16cd4749749969a07f49250b54dd4fd1
2020-10-10 16:50:16 +08:00
Xing Zheng
9e1de0748b ASoC: rk3308_codec: fix the hidden ADC MIC PGA Gains
When we name 'Volume' for TLV, the 'Volume' will be ignored
and there are some confilcts name 'ADC MIC Group X Left/Right'.
Therefore, using 'Gain' instead of 'Volume'.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I5380cdd376dbd69ae50bee7b164a01f954df53f9
2020-10-10 16:50:10 +08:00
Mark Huang
ba0047478c ARM: dts: rv1126-ai-cam: enable monitor to restart if abnormal for ispp
Change-Id: I3956e1f2988de0f13926650b1bfd299d83483bdb
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
2020-10-10 16:48:48 +08:00