Commit Graph

1071906 Commits

Author SHA1 Message Date
Tao Huang
c7a43f0886 Merge tag 'ASB-2022-06-05_12-5.10' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2022-01-01
CVE-2022-24958
CVE-2022-20136
CVE-2022-23960
CVE-2022-20141
CVE-2021-4154
CVE-2022-20132

* tag 'ASB-2022-06-05_12-5.10': (1188 commits)
  BACKPORT: net/sched: cls_u32: fix netns refcount changes in u32_change()
  UPSTREAM: io_uring: always use original task when preparing req identity
  FROMLIST: remoteproc: Fix dma_mem leak after rproc_shutdown
  FROMLIST: dma-mapping: Add dma_release_coherent_memory to DMA API
  ANDROID: Update QCOM symbol list for __reset_control_get
  ANDROID: vendor_hooks: Add hooks for mutex
  BACKPORT: can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path
  BACKPORT: can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: oplus: Update the ABI xml and symbol list
  UPSTREAM: remoteproc: Fix count check in rproc_coredump_write()
  BACKPORT: esp: Fix possible buffer overflow in ESP transformation
  ANDROID: Fix the drain_all_pages default condition broken by a hook
  UPSTREAM: Revert "xfrm: xfrm_state_mtu should return at least 1280 for ipv6"
  UPSTREAM: xfrm: fix MTU regression
  ANDROID: signal: Add vendor hook for memory reaping
  FROMGIT: usb: gadget: uvc: allow for application to cleanly shutdown
  FROMGIT: usb: dwc3: gadget: increase tx fifo size for ss isoc endpoints
  UPSTREAM: usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind()
  FROMGIT: usb: gadget: uvc: remove pause flag use
  ...

Change-Id: Idf3eea3b21dc69c8189161c0e24744336431913a

Conflicts:
	drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
	drivers/spi/spi-rockchip.c
	drivers/usb/gadget/function/f_uvc.c
	drivers/usb/gadget/function/uvc.h
	drivers/usb/gadget/function/uvc_configfs.c
	drivers/usb/gadget/function/uvc_queue.c
	drivers/usb/gadget/function/uvc_video.c
	sound/soc/rockchip/rockchip_i2s.c
2022-07-15 17:58:38 +08:00
Tao Huang
62ca347b51 Merge tag 'ASB-2022-05-05_12-5.10' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2022-05-01
CVE-2022-0847
CVE-2022-20009
CVE-2022-20008
CVE-2021-22600

* tag 'ASB-2022-05-05_12-5.10': (116 commits)
  UPSTREAM: usb: dwc3: gadget: Replace list_for_each_entry_safe() if using giveback
  UPSTREAM: usb: dwc3: Issue core soft reset before enabling run/stop
  UPSTREAM: usb: dwc3: gadget: Wait for ep0 xfers to complete during dequeue
  ANDROID: Update QCOM symbol list for trace_map/unmap
  ANDROID: fix KCFLAGS override by __ANDROID_COMMON_KERNEL__
  ANDROID: vendor_hooks: tune reclaim scan type for specified mem_cgroup
  ANDROID: vendor_hooks: Add hooks for rwsem
  ANDROID: Add flag to indicate compiling against ACK
  ANDROID: GKI: build damon reclaim
  FROMLIST: mm/damon/reclaim: Fix the timer always stays active
  BACKPORT: treewide: Add missing includes masked by cgroup -> bpf dependency
  UPSTREAM: mm/damon: modify damon_rand() macro to static inline function
  UPSTREAM: mm/damon: add 'age' of region tracepoint support
  UPSTREAM: mm/damon: hide kernel pointer from tracepoint event
  UPSTREAM: mm/damon/vaddr: hide kernel pointer from damon_va_three_regions() failure log
  UPSTREAM: mm/damon/vaddr: use pr_debug() for damon_va_three_regions() failure logging
  UPSTREAM: mm/damon/dbgfs: remove an unnecessary variable
  UPSTREAM: mm/damon: move the implementation of damon_insert_region to damon.h
  UPSTREAM: mm/damon: add access checking for hugetlb pages
  UPSTREAM: mm/damon/dbgfs: support all DAMOS stats
  ...

Change-Id: I3498d4868ff86bec30e74dab9e541d787c2bd5ac

Conflicts:
	drivers/android/Kconfig
	drivers/usb/dwc3/gadget.c
2022-07-15 17:46:01 +08:00
Tao Huang
24cbee6672 Merge tag 'ASB-2022-04-05_12-5.10' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2022-04-01
CVE-2021-0707
CVE-2021-39800
CVE-2021-39801 (4.9 only)
CVE-2021-39802

* tag 'ASB-2022-04-05_12-5.10': (3832 commits)
  ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus
  ANDROID: vendor_hooks: Reduce pointless modversions CRC churn
  UPSTREAM: locking/lockdep: Avoid potential access of invalid memory in lock_class
  ANDROID: mm: Fix implicit declaration of function 'isolate_lru_page'
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: GKI: Add hook symbol to symbol list
  Revert "ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree"
  ANDROID: vendor_hooks: Add hooks to for free_unref_page_commit
  ANDROID: vendor_hooks: Add hooks to for alloc_contig_range
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: vendor_hooks: Add hook in shrink_node_memcgs
  ANDROID: GKI: Add symbols to symbol list
  FROMGIT: iommu/iova: Improve 32-bit free space estimate
  ANDROID: export walk_page_range and swp_swap_info
  ANDROID: vendor_hooks: export shrink_slab
  ANDROID: usb: gadget: f_accessory: add compat_ioctl support
  UPSTREAM: sr9700: sanity check for packet length
  UPSTREAM: io_uring: return back safer resurrect
  UPSTREAM: Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
  ...

Change-Id: Ic61ead530b99b10ffd535a358a48fe9bb8c33fd4

Conflicts:
	drivers/android/Kconfig
	drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
	drivers/gpu/drm/rockchip/rockchip_vop_reg.c
	drivers/i2c/busses/i2c-rk3x.c
	drivers/media/i2c/imx258.c
	drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
	drivers/usb/dwc2/gadget.c
	drivers/usb/gadget/function/uvc.h
	lib/Kconfig.debug
2022-07-15 17:40:39 +08:00
Tao Huang
2a984af32b Revert "usb: typec: fusb302: fix i_comp and i_bc_lvl interrupt"
This reverts commit 94dab507e0.

Replaced by commit 00f1038c72 ("usb: typec: fusb302: Fix masking of comparator and bc_lvl interrupts")

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-07-15 17:28:27 +08:00
Tao Huang
5e7f6915a1 Revert "usb: gadget: accessory: add compat_ioctl"
This reverts commit 349bb1466b.

Replaced by commit 74720dae8b ("ANDROID: usb: gadget: f_accessory: add compat_ioctl support")

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-07-15 17:28:11 +08:00
Tao Huang
f7e79c99d7 Revert "net: ethernet: stmmac: Add STMMAC_PTP config option"
This reverts commit 2d1e65714c.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Idf56629b15c26e9a28de4c1ba525c7423c7d009e
2022-07-15 17:22:08 +08:00
Jianqun Xu
7fd121907b Revert "dma-buf: heaps: system_heap: fix to sg_dma_address"
This reverts commit 88970bdcdb.

The dmabuf sync operation has a origin DMA_BUF_IOCTL_SYNC which can sync
dmabuf with size of the buffer, i.e all range sync.

On rockchip, the dmabuf sync implements DMA_BUF_IOCTL_SYNC_PARTIAL which
can sync dmabuf with partial size of the buffer.

On rockchip, the userspace call partial sync without a device mapped to
the dmabuf, that actually not according to the dma-api rules, but things
can not be changed. In this case, the partial sync must to work with a
scatterlist table hasn't been mapped, the sg_dma_address(sg) hasn't been
set. The partial sync should use sg_phys(sg) instead which always has a
good value.

Change-Id: I804e033921f2f72c79fed1a73def78bcbd34b71d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-07-15 16:53:56 +08:00
Jianqun Xu
3212cfb965 dma-buf: heaps: system_heap: partial sync with sgtable from heap buffer
The dma-heap will allocate a scatterlist table at alloc time and store
into the heap buffer. Usually a device should attach to the dmabuf and
then map the dmabuf with the attachment, a new scatterlist table will be
created and set during dma map.

In the dma map, the sg_dma_address will be set for the first scatter of
the scatterlist table, if the device has a iommu domain, sg_dma_address
is set with the iova start address, else it will be set with a physical
address.

For a dmabuf hasn't been dma mapped, the sg_dma_address is a error value
(-1 = DMA_MAPPING_ERROR).

The partial sync hits the case that no device mapped to the dmabuf.

It's not easy to support both iommu/no iommu devices for partial sync,
this patch make the partial sync simple to implement for no iommu case.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ib5d0715c4bde95bc444d6fbb873456c94755f550
2022-07-15 16:53:56 +08:00
Jianqun Xu
4925881228 dma-buf: heaps: system_heap: fix to for_each_sgtable_sg
Switch to use for_each_sgtable_sg to use orig_nents instead of nents for
the for the partial sync sgl.

struct sg_table is a common structure used for describing a memory
buffer. It consists of a scatterlist with memory pages and DMA addresses
(sgl entry), as well as the number of scatterlist entries: CPU pages
(orig_nents entry) and DMA mapped pages (nents entry).

It turned out that it was a common mistake to misuse nents and orig_nents
entries, calling the scatterlist iterating functions with a wrong number
of the entries.

To avoid such issues, lets introduce a common wrappers operating directly
on the struct sg_table objects, which take care of the proper use of
the nents and orig_nents entries.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I3f88b98f43b07f97c56b949f7625bebbc65dec26
2022-07-15 16:53:56 +08:00
Lin Jinhan
8050236b61 ARM: configs: rv1106-smart-door: enable ROCKCHIP_HW_DECOMPRESS_USER
Startup time  : essentially unchanged.
Firmware size : increase about 1KByte.

Change-Id: Ib079e04681a3249132bff2b298f8c4945af3d20a
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-07-15 15:42:43 +08:00
Lin Jinhan
2035a4673c soc: rockchip: add hardware decompression user interface
Export the hardware decompression interface to the user layer.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I033f0beabc2e44022418dcd06798ad94e971ff10
2022-07-15 15:42:35 +08:00
Yu Qiaowei
17b7ac8a5b video: rockchip: rga3: check mm_flag when mapping dma-buf
This part of the information is printed when the mapping fails
due to MMU limitations.

Update driver version to 1.2.17

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I2d6e4219ebc54d285bc9c25742f93503f7633b5e
2022-07-15 15:42:11 +08:00
Yu Qiaowei
fb617a18f5 video: rockchip: rga3: remove useless code about rga_job
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I004f35942c3300a173b0aae785bc750bb0497a55
2022-07-15 15:42:11 +08:00
Yu Qiaowei
a74de1825b video: rockchip: rga3: Get current_mm in request
Make sure to get the correct current_mm in asynchronous mode.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Iec2b989e072b68b88d920ce8591924168bac3a7e
2022-07-15 15:42:11 +08:00
Yu Qiaowei
5bd1341b7f video: rockchip: rga3: mpi-mode adapted to batch mode
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I51f38752edc49bb6d47b657a185f0dbfcecf133f
2022-07-15 15:42:11 +08:00
Yu Qiaowei
c93d87e863 video: rockchip: rga3: blit-command adapted to batch mode
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I1b5d25396cf26b10df8c4e62357ec0e203018b7b
2022-07-15 15:42:11 +08:00
Yu Qiaowei
0251aeb09b video: rockchip: rga3: fixed no put_request when request_config exits abnormally
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I82f359e6bec4c405642c8e0fb870596f5713ccb9
2022-07-15 15:42:11 +08:00
Jianqun Xu
aab138a4a6 drm/rockchip: rockchip_drm_vop2 avoid division by zero
WARN on when the frame time is '0'.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Id949b5b9178f67b54622439e8f95c23236f6f1c9
2022-07-15 15:22:53 +08:00
Tao Huang
252911111b media: rockchip: ispp: set vfs-only exports into their own namespace
According to gki commit d483eed85f ("ANDROID: GKI: set vfs-only exports into their own namespace").

ERROR: modpost: module video_rkispp uses symbol kernel_write from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it.
ERROR: modpost: module video_rkispp uses symbol filp_open from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia96b7434d14187e0f3fce5bdf59956d3644db50c
2022-07-15 14:57:58 +08:00
Tao Huang
42a2baccb2 input: touchscreen: gt1x: set vfs-only exports into their own namespace
According to gki commit d483eed85f ("ANDROID: GKI: set vfs-only exports into their own namespace").

ERROR: modpost: module gt1x-ts uses symbol filp_open from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2b25adf85977f90958292ef2af91c1ab6e5aa3e4
2022-07-15 14:57:47 +08:00
Tao Huang
8eb1d1f6c0 input: touchscreen: elan5515: set vfs-only exports into their own namespace
According to gki commit d483eed85f ("ANDROID: GKI: set vfs-only exports into their own namespace").

ERROR: modpost: module tp_elan_5515 uses symbol filp_open from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I22f2fd565c01e804d1e252d6a33dcb62a7b73f62
2022-07-15 14:57:35 +08:00
Tao Huang
264acab70b input: sensors: mc3230: set vfs-only exports into their own namespace
According to gki commit d483eed85f ("ANDROID: GKI: set vfs-only exports into their own namespace").

ERROR: modpost: module mc3230 uses symbol filp_open from namespace VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver, but does not import it.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I29d6a1c79987dc30f4870c42e2995e7045e635ac
2022-07-15 14:57:21 +08:00
Tao Huang
31d7384ebb drm/rockchip: cdn-dp-core: Fix cdn_dp_connector_mode_valid return type
mode_valid should return enum drm_mode_status.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I5525403ad0d637dd41c3ac805d92d186332a8c5b
2022-07-15 14:50:34 +08:00
Tao Huang
5d64d87645 drm/rockchip: dsi2: Fix dw_mipi_dsi2_connector_mode_valid return type
Fix CFI violation:
Kernel panic - not syncing: CFI failure (target: dw_mipi_dsi2_connector_mode_valid+0x0/0x8)

mode_valid should return enum drm_mode_status.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic59e7dda400c7eb18c8b29d6889f4a88d277a780
2022-07-15 14:39:00 +08:00
Zefa Chen
aa12781766 media: rockchip: vicap fixed toisp fs interrupt mask error
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I524c60e2c99f49a98b90d5e18aa50592c55863d2
2022-07-14 20:21:27 +08:00
Zefa Chen
0bd81e611e media: i2c: sensor adapter add ioctl RKMODULE_SET_SENSOR_INFOS
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Id1a95c59168a59b4612b779ebb41e4ad711943f0
2022-07-14 20:19:47 +08:00
Zefa Chen
1e7c74a7aa include: uapi: linux: rk-camera-module: add commond RKMODULE_SET_SENSOR_INFO
Its for sensor adapter to sync all of sensor state, to avoid isp getting the wrong state
in the case of app execution order: sensor0 config param -> run isp0 ... sensorn config param -> run ispn

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I90cc6a1716d5198150b5a0897ada0412622b72d3
2022-07-14 20:09:36 +08:00
Tao Huang
8106e54bdf net: wireless: rockchip: rkwifi: bcmdhd: set vfs-only exports into their own namespace
According to gki commit d483eed85f ("ANDROID: GKI: set vfs-only exports into their own namespace").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ie75429695e0f23ada39d8677a918e5b1c0b8fd97
2022-07-14 19:44:59 +08:00
Tao Huang
18f2a774bc rk: Makefile: Call gcc-wrapper.py use absolute path
Fixes: c2482146d1 ("rk: Makefile: add gcc-wrapper")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I6442c206c797573d57ef1976b4a30316235f4e03
2022-07-14 19:44:59 +08:00
Jianqun Xu
f2f7901e85 power: supply: rk817_battery avoid division by zero
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I811e0a0720a17879bfe36c03b44c2bbfd35355a6
2022-07-14 14:37:19 +08:00
Cai YiWei
7b7b2c475a media: rockchip: isp: add slab.h fix compile
Change-Id: Ie062a9ab953c1d8f9210f895af14e35d775917c3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-07-14 14:26:37 +08:00
Algea Cao
37b7830dd3 drm/rockchip: dw_hdmi: Get uboot hdmi color format
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I06bbd4a8888716a4b209a81f219309304a18420f
2022-07-14 14:25:59 +08:00
Zefa Chen
3417af9ec0 phy: rockchip: csi2-dphy: fixed logic error about clk1_en
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I03dc62115346a5908d27ecf83b1705a96dc4bd53
2022-07-14 14:14:40 +08:00
Frank Wang
e96b693e05 usb: gadget: uvc: add uvc_num_request attribute
Adding uvc attribute "uvc_num_request" to set the number of uvc
requests by configfs, the maximum limit is 64, and the recommended
value is 2.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I6031ba0b569a4ff53e16a59a5bcce021d80823db
2022-07-14 11:22:40 +08:00
Michael Grzeschik
8b66f0c181 UPSTREAM: usb: gadget: uvc: make uvc_num_requests depend on gadget speed
While sending bigger images is possible with USB_SPEED_SUPER it is
better to use more isochronous requests in flight. This patch makes the
number uvc_num_requests dynamic by changing it depending on the gadget
speed.

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20210628155311.16762-3-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 229140375
Signed-off-by: Dan Vacura <w36195@motorola.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I1385bf8f973f3e5ee6c76193bffe0046eca22439
(cherry picked from commit 5d084e9710)
2022-07-14 11:22:40 +08:00
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