Commit Graph

1066668 Commits

Author SHA1 Message Date
Frank Wang
2df103be0d Revert "usb: gadget: uvc: add a new attribute uvc_num_request"
This reverts commit fbb23b9e8c.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I62ef3bc763ab6d318d80ccef64fdb17d8c67998b
2022-07-14 11:22:40 +08:00
Zefa Chen
e2cb0f408f media: i2c: sensor adapter support set frame_interval
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4273a898c35b52ee16cd7132b08c5eb49bde106b
2022-07-14 11:20:08 +08:00
Jianqun Xu
d741b100b4 clk: rockchip: avoid unintentional integer overflow in rockchip_rk3588_pll_recalc_rate()
Fixes: 58c1fa2ef2 ("clk: rockchip: add pll type for RK3588")
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I840458595475e9e1bb6df74453829ea22dd2d729
2022-07-14 11:18:13 +08:00
Zefa Chen
8704b56415 media: rockchip: vicap supports anomaly detection
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I205c9673f7f567597ec3c9e42d5cec1a58b87f5b
2022-07-14 10:57:58 +08:00
Zefa Chen
f1082a51d0 include: uapi: rkcif-config: add reset CMD
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I52ca7f84b6afcb8f286604fbef7e0940a9b20a4a
2022-07-14 10:57:04 +08:00
Sugar Zhang
bd0b0782e7 ARM: dts: rv1106-uvc: Add support pll frac mode for audio
This patch add pll frac freq around 1G for audio product,
which will do fine tune pll for async clk situation,
such as BT, UAC.

Because we have no much more PLLs, and much more devices
share the same PLL, so, we should setup around 1G to serve
all the devices.

PLLs in rv1106:

  APLL: CPU
  DPLL: DDR
  GPLL: DEVICES
  CPLL: DEVICES

  GPLL: 1188MHz
  CPLL: 1000MHz

* PLLs support frac mode:

  GPLL
  DPLL

So, the only way to use audio pll frac freq is to switch to
use GPLL. and switch the role of GPLL and CPLL.

  GPLL: audio frac freq (~1G)
  CPLL: 1188MHz

Tested by UAC product, so, we first address this. and, of course,
there still have chance apply this to other situation, such as IPC.
but, need more test. at this time, we just handle for UAC.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ief13456b6274802836266228d3288d91a148feff
2022-07-13 17:31:12 +08:00
Sugar Zhang
1fd942ea8b clk: rockchip: rv1106: Add pll frac freq for audio
This patch add pll frac freq around 1G for audio product,
which will do fine tune pll for async clk situation,
such as BT, UAC.

Because we have no much more PLLs, and much more devices
share the same PLL, so, we should setup around 1G to serve
all the devices.

PLLs in rv1106:

  APLL: CPU
  DPLL: DDR
  GPLL: DEVICES
  CPLL: DEVICES

  GPLL: 1188MHz
  CPLL: 1000MHz

* PLLs support frac mode:

  GPLL
  DPLL

So, the only way to use audio pll frac freq is to switch to
use GPLL. and switch the role of GPLL and CPLL.

  GPLL: audio frac freq (~1G)
  CPLL: 1188MHz

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: If26f464ac88cd21195db14084f8b4e9ffb457890
2022-07-13 17:31:12 +08:00
Jon Lin
01dd2b51d5 spi: rockchip-test: Support ACPI
Change-Id: I380953abb9ee33193bed7a40402d65cbfff8fd5d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-07-13 16:41:21 +08:00
Jon Lin
dc77526fb0 spi: rockchip: Support ACPI
1.Remove the dependence on the linux clock framework
2.Change to use the compatible APIs to get device property
3.Add the necessary device property "clock-frequency" for ACPI

Change-Id: I6b996ad4fba8af8d871633947a9eb6a38b8c8707
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-07-13 16:41:21 +08:00
shengfei Xu
1294d14b48 arm64: configs: rockchip_defconfig: enable CONFIG_CHARGER_SGM41542
Enable CONFIG_CHARGER_SGM41542 used for sgm41542 which found on
rk3588s tablet

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ieeeebfe2dde83f40a7589a6fa0418e01ad3433cf
2022-07-13 16:30:43 +08:00
Jianqun Xu
9b7d213684 regulator: rk806: fix a copy-paster error
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I8b632e809c10da9d5eb5627d32a63d6418967f9f
2022-07-13 16:19:29 +08:00
Jianqun Xu
66a2112baa soc: rockchip: rockchip_system_monitor: fix a likely copy-paster error
The global structure system_monitor is same as argument from the
function for rockchip_system_monitor_parse_dt, fix to monitor to make
code easy to read.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I2e0412e9aac697e34e3cc35e1547e837ae7f69b8
2022-07-13 16:16:16 +08:00
Jianqun Xu
35a6ba5aa9 gpio/rockchip: avoid division by zero
If the clk_get_rate return '0', it will happen division by zero.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I1d2c6b12b961a78629f22496fe8f8b685b27dc09
2022-07-13 16:15:03 +08:00
Jianqun Xu
498aa5fd36 phy: rockchip: phy-rockchip-typec fix bad bit shift operation
Remove PHY_DP_POWER_STATE_DISABLED.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Reviewed-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I374341916916a0a3e0753b9fb7d071cea949bfa5
2022-07-13 15:58:34 +08:00
Chen Shunqing
ec31f2140f media: rockchip: hdmirx: add hdcp2 support
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I71146b743c1957a97333cbe1e35c1754cf6f1c90
2022-07-12 16:34:37 +08:00
Algea Cao
f023c52a1f drm/bridge: synopsys: dw-hdmi-qp: Support VSI packet
1.Support 3d mode.
2.Support hdmi1.4 4K resolution VIC number.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ifa424fc89f35ba8045de53929a925821d3e24c92
2022-07-12 16:29:33 +08:00
Lei Chen
62f29586ed drm/rockchip: logo: add resolution types without EDID
Fix the problem that the kernel cannot match the corresponding resolution
when 1080P is used to force output

Signed-off-by: Lei Chen <lei.chen@rock-chips.com>
Change-Id: I5ccc7ee026d4d68935e91f7d05fa3d21a5b26811
2022-07-12 16:29:17 +08:00
Tony Xie
85adeb4f55 serial: 8250_dw: don't set clk when clk is null for rockchip
Fixes: b205560ab1 ("serial: 8250_dw: set uart clk according to baudrate")
Change-Id: I89593824840b2d1c3f5671f46cd92ddea5929d46
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2022-07-12 16:09:24 +08:00
Wang Xiaobin
9622c8cd5a ARM: dts: rockchip: rv1106g-smart-door: reserved memory for meta
Since meta is enabled, remove unnecessary bootargs.

Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: Ief0a0f9788d2d3c6532d5385595a94f1decc8cf4
2022-07-12 15:25:26 +08:00
Lin Jinhan
16684192b2 ARM: dts: rockchip: rv1106-smd-cam: drop rkcif_mipi_lvds1_sditf
rkcif_mipi_lvds1_sditf is a virtual node that is used to link to ISP node.
An error occurs if you do not link to ISP node when stream off.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I441de230b7af955ff34af0e88ba8d0f318154cfc
2022-07-12 14:10:22 +08:00
Yandong Lin
986d8f9d5f arm64: dts: rockchip: Enable vepu node for rk3588 boards
Fixes: 94a5dd9f32 ("arm64: dts: rockchip: add vepu support and separate jpege for rk3588")
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Idc14891685c81f0103477d264d44a58585756cd5
2022-07-12 11:44:40 +08:00
Yu Qiaowei
759eaa8274 video: rockchip: rga3: Remove useless memory maps
Update driver version to 1.2.16

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I655c4cbc7dcf91769a978ad61700c43fb0e97d90
2022-07-11 20:23:22 +08:00
Yu Qiaowei
88d6006732 video: rockchip: rga3: Add default mapped device
1. The default_domain is used when the IOMMU device calls dma-buf api,
so it is necessary to save the dev of the main core as the default_dev.
2. The default mapped device will be able to get all the memory
information required by the device.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I0ed1487dc0bfad65bbb1aafb8d2f31255cc4c9fe
2022-07-11 20:23:21 +08:00
Yu Qiaowei
011f061059 video: rockchip: rga3: rename rga2_mmu_info -> rga_iommu
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I0a1722f5034aea25306573156da0111f5aec558c
2022-07-11 20:23:20 +08:00
Yu Qiaowei
bb6df4d8d0 video: rockchip: rga3: add binding for iommu
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I521412c1a57fd0747f2a0673489b5d4ff32ac647
2022-07-11 20:23:19 +08:00
Yu Qiaowei
d7aa7cf45c video: rockchip: rga3: Move global rga_mmu_info to rga_drvdata
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I92f68a238d4fa2190baf746663d65d59f1f29076
2022-07-11 20:23:19 +08:00
Wang Panzhenzhuan
30ee6498f4 media: i2c: s5kjn1: fix binning aligned & channel info get issue
1. set binning output 32 pixel aligned.
2. fix channel info omitted copy from user issue.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ib67deb7648ac88fc5e9e9b0ab6950d6661f76bcc
2022-07-11 18:58:00 +08:00
Algea Cao
d2f8138d0c arm64: dts: rockchip: rk3588: Optimize hdmi ddc compatibility
Set hdmi ddc pin smt enable.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I12bc18f960bdd5890bb6281607a5edf88e5ddfb7
2022-07-11 15:50:02 +08:00
Jason Zhu
799fe35bfc ASoC: rockchip: add 'rockchip,no-dmaengine' for i2s/tdm/pdm
This patch add support for property 'rockchip,no-dmaengine'.
it is a boolean property. if present, driver will do not
register pcm dmaengine, only just register dai. if the dai
is part of multi-dais, the property should be present. Please
refer to rockchip,multidais.txt about multi-dais usage.

Change-Id: I9aa2ddb15f5a27202f90bf32804f214435cc0b73
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2022-07-11 15:44:02 +08:00
Jason Zhu
930b74b2d7 ASoC: rockchip: multi_dais_pcm: support compile multidais_pcm
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I392c8f5f4f294e1c4f83b7be6d08d0eedcd56e2d
2022-07-11 15:44:02 +08:00
Jason Zhu
50f2627330 dmaengine: pl330: add support for interlace size config
Change-Id: Ia1008d689591f80ee2b3c08e1596b83ccd762f63
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2022-07-11 15:44:02 +08:00
Luo Wei
513d3e3b09 arm64: dts: rockchip: rk3588-vehicle-evb: modify sdio wifi gpio
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I7b43d1713e1332e44420c00e6bf29eb99f65944e
2022-07-11 15:25:21 +08:00
Alex Zhao
6513b9fbdd net: wireless: update bcmdhd driver to 101.10.361.20
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I7beac9c4e228865b7a07a0d2f88e2968ac7e5e8e
2022-07-11 15:17:37 +08:00
Cai YiWei
271bc93c62 media: rockchip: isp: fix isp30 cgc and cproc range
cgc fix to full range output, the range:
cgc(full)->(input: full)cproc(output: full or limit)

Change-Id: Iad7448f75d9c76f62f063673d8d5780a44d7ea3d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-08 17:31:30 +08:00
Jianwei Fan
55ec37f513 arm64: rockchip_defconfig: enable CONFIG_VIDEO_THCV244
used for rk3588 vehicle evb

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I6b4ed374c21b751a7f957941324a7914898bc361
2022-07-08 17:31:30 +08:00
Jianwei Fan
1a1b2faf0b arm64: dts: rockchip: rk3588-vehicle-evb: add thcv244 camera configuration
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I0a3914bae12a711f04ff586ac0b4f5e150c55aa9
2022-07-08 17:31:30 +08:00
Liang Chen
006bc386d7 ARM: dts: rockchip: rv1106: adjust cpu opp-table
Change-Id: I0c22d73108740a0f13d8fcf271809ac84b6c23f5
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-07-08 17:31:30 +08:00
Wang Panzhenzhuan
d912177e8b media: i2c: cn3927v: reduce vcm collision noise
adjust resume & suspend logic to reduce kaka noise

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I41ed140b13f62d8041804716e3e484ea3ff5db11
2022-07-08 17:31:30 +08:00
Wang Panzhenzhuan
734a63bdb1 media: platform: cif: support config adapt to android usb camera hal
usage:
&rkcif {
    ...
    rockchip,android-usb-camerahal-enable;
    ...
};

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Id556c38b65fa528de436443434f50c619a7c9ecc
2022-07-08 17:31:30 +08:00
Frank Wang
18ef66dbd8 usb: typec: tcpm: add get max power support
Traverse fixed pdos to calculate the maximum power that the charger
can provide, and it can be get by POWER_SUPPLY_PROP_INPUT_POWER_LIMIT
property.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I3533beaa2eb2482de371c271db3f601d50e1be73
2022-07-08 17:31:30 +08:00
Jianqun Xu
0373c12d82 iommu/iova: drop codes about rcache from iova_dump
Not to do flush in iova_dump(), and drop to dump the rcache.

Fixes: 0c51523b06 ("iommu/iova: dump iova when alloc failed")
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Iab4a923960d4aace0645d5276705b47dc00ebeea
2022-07-08 17:31:29 +08:00
Shaoxing Chen
f7decf826f ARM: dts: rockchip: rv1106g-smart-door-lock-rmsl: update sdmmc for wifi
Signed-off-by: Shaoxing Chen <csx@rock-chips.com>
Change-Id: Ib414bfbf39dcdc70f304bf3818849638b80f7143
2022-07-08 17:31:29 +08:00
shengfei Xu
647392471c power: supply: add CellWise cw221x fuel gauge driver
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I0e29139f2c28b145f650af6d29006a71c84fd624
2022-07-08 17:31:29 +08:00
Johnson Ding
30e3070cc2 video: rockchip: mpp: Fix JPEG dma coherence issue
MPP userspace drive will write JPEG header before encoder working, so
these data may remain at cache and flushed after hardware writing
encoded datad. And some data at the boundary may be corrupt.

Change-Id: I7f721293714fff68e6d07578ceb99a12454d488d
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-08 17:31:29 +08:00
Frank Wang
d6b0925fc8 usb: dwc3: resize tx fifos for rockchip platform
Due to TX FIFO size limits on Rockchip platform, we need to
resize TX FIFOs more precisely based on USB transfer type
and Speed, so implement the private method hooked to the
original function.

If you want to enable the Tx fifos resize on rockchip platform,
add the property "tx-fifo-resize" in DTS usbdrd_dwc3 node.

By default, we recommend not to enable the Tx fifo resize,
because the default TxFIFO depth configuration in the
GTXFIFOSIZ(#n) is enough for most of USB composite device.

And for mult UVC function (e.g 2 * UVC + 1 * UAC + ADB),
it needs to enable the Tx fifo resize for UVC streaming
endpoints with 1024 maxpacket.

Note that, the Tx fifos resize code only assign 64 bytes
TxFIFO depth for interrupt endpoint which usually used for
MTP and HID function. If you want to support HID EP-IN
to transfer maxpacket more than 64 bytes, you need to
change the maxpacket of usb_endpoint_xfer_int(dep->endpoint.desc)
in the __dwc3_gadget_resize_tx_fifos().

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I8ff1ed206ac423e9076c8054eb07138658720f25
2022-07-08 17:31:29 +08:00
Frank Wang
0de7d2764b usb: dwc3: fix imbalanced endpoint index
In current implementation, we assume that the IN endpoint number is same
with the OUT endpoint, and assign the dwc3 ep array like this,

  eps[0]  = ep0out  eps[1]  = ep0in
  eps[2]  = ep1out  eps[3]  = ep2in
  ...               ...
  eps[14] = ep7out  eps[15] = ep7in

in fact, the IN endpoint number may be unequal to OUT endpoint on some
platform like RK3588, and the dwc3 ep array are expected to assign like
this,

  eps[0]  = ep0out  eps[1]  = ep0in
  eps[2]  = ep1out  eps[3]  = ep2in
  ...               ...
  eps[12]  = ep6in  eps[13] = ep7in
  eps[14]  = ep8in  eps[15] = ep9in

So increase the index in sequence for the imbalanced endpoint when
epnum is greater than min_eps (min(num_in_eps, num_out_eps)), and the
same time, we should ensure "dep->number" is even numbers are for USB
OUT endpoints, and odd numbers are for USB IN endpoints (Table 6-88 in
the databook).

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I1da1af4685a077cf3d60fcd745877ff20e00545a
2022-07-08 17:31:29 +08:00
Wyon Bi
9f450ee283 drm/rockchip: analogix_dp: Add loader_protect for split mode
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I427dbfc4b1f30c20a3384b310c9b524cc3538091
2022-07-08 17:31:29 +08:00
Jianwei Fan
5ea068626a media: i2c: add thcv241 link thcv244 camera serdes driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I252e9d71b368f986f5a7275fa9f6dfe223ece211
2022-07-08 17:31:29 +08:00
Jianwei Fan
0d6a701cf4 media: i2c: lt7911d: fix hotplug event report
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I1513f35467fe2b5482af20e1f7f884944a32f3d5
2022-07-08 17:31:29 +08:00
Jianwei Fan
9010eda830 media: i2c: lt6911uxc: fix hotplug event report
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Iff105f294deaf39e3bb24c0a2376ac11b3cc9bfd
2022-07-08 17:31:29 +08:00