Commit Graph

866667 Commits

Author SHA1 Message Date
YouMin Chen
72edc8e464 arm64: dts: rockchip: rk3568: remove ddr_timing node
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: Iaef7442a52bfadee989c507e4fb9e60d50f9c49e
2021-10-15 19:27:33 +08:00
YouMin Chen
6a53296ce8 PM / devfreq: rockchip_dmc: remove of_get_rk3568_timings
For rk3568, ddr timings adjustment is no longer supported in dmc drive.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I63f0c5fea8c5acf8e6ef8f44b62968deb7bd823e
2021-10-15 19:26:59 +08:00
YouMin Chen
afda73facd arm64: dts: rockchip: rk3568: add dmc_fsp node
Add dmc_fsp node for initialize dmc frequency set point on U-Boot.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I9fcd1ae498a64b5a4698c42ad05af96740b59e61
2021-10-15 15:59:42 +08:00
YouMin Chen
ed286b021c arm64: dts: rockchip: rk3568-dram-default-timing: add ddr params
Add ddr parameters for initialize dmc frequency set point.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I3445fa2dbabca5774306cc1052cd3c1d472b6867
2021-10-15 15:57:38 +08:00
YouMin Chen
26dd1e440a include: linux: rockchip: add share mem page type for ddr fsp
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: Ie12446e746f4990287873d8ca52675f3398f45ae
2021-10-15 15:57:38 +08:00
YouMin Chen
f824af94ae dt-bindings: memory: add macro definition about LPDDR4 and LPDDR4X
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I7bcf1f8c9f1d282a68d59dcc14fecaa7c0f59090
2021-10-15 15:57:38 +08:00
Ding Wei
fd69926be3 video: rockchip: mpp: Use spinlock for queue->running_lock
reason: mpp_iommu_handle is called by irq for iommu, thus it cannot
use mutex which might case sleep, thus use spinlock instead.

Call trace:
[   71.047958 ] Call trace:
[   71.047974 ]  dump_backtrace+0x0/0x160
[   71.047988 ]  show_stack+0x14/0x1c
[   71.048003 ]  dump_stack+0xd0/0x120
[   71.048018 ]  ___might_sleep+0x1f4/0x204
[   71.048032 ]  __might_sleep+0x4c/0x80
[   71.048045 ]  __mutex_lock_common+0x60/0x1028
[   71.048057 ]  mutex_lock_nested+0x28/0x30
[   71.048073 ]  mpp_iommu_handle+0x44/0x1c8
[   71.048088 ]  report_iommu_fault+0x3c/0x198
[   71.048102 ]  rk_iommu_irq+0x2a4/0x3bc
[   71.048117 ]  __handle_irq_event_percpu+0x114/0x3c4
[   71.048131 ]  handle_irq_event+0x5c/0xd0
[   71.048143 ]  handle_fasteoi_irq+0x124/0x220
[   71.048156 ]  __handle_domain_irq+0x9c/0xf4
[   71.048169 ]  gic_handle_irq+0x108/0x180
[   71.048181 ]  el1_irq+0xec/0x1a0
[   71.048194 ]  _raw_spin_unlock_irqrestore+0x3c/0x78
[   71.048209 ]  vop2_crtc_atomic_flush+0x1c78/0x202c
[   71.048223 ]  drm_atomic_helper_commit_planes+0x1a4/0x210
[   71.048238 ]  rockchip_atomic_commit_complete+0x1a4/0x390
[   71.048252 ]  rockchip_drm_atomic_commit+0x22c/0x24c
[   71.048266 ]  drm_mode_atomic_ioctl+0xa18/0xddc
[   71.048280 ]  drm_ioctl+0x2d8/0x46c
[   71.048296 ]  do_vfs_ioctl+0x4dc/0x794
[   71.048308 ]  __arm64_sys_ioctl+0x70/0x98
[   71.048322 ]  el0_svc_common+0xa0/0x18c
[   71.048335 ]  el0_svc_handler+0x28/0x60
[   71.048348 ]  el0_svc+0x8/0xc

Change-Id: Ie8e79995ec4bebf4ccbb509a57306541de861754
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-10-15 15:46:58 +08:00
Zhaoyang Huang
3ea11abdbe UPSTREAM: psi: Fix race between psi_trigger_create/destroy
Race detected between psi_trigger_destroy/create as shown below, which
cause panic by accessing invalid psi_system->poll_wait->wait_queue_entry
and psi_system->poll_timer->entry->next. Under this modification, the
race window is removed by initialising poll_wait and poll_timer in
group_init which are executed only once at beginning.

  psi_trigger_destroy()                   psi_trigger_create()

  mutex_lock(trigger_lock);
  rcu_assign_pointer(poll_task, NULL);
  mutex_unlock(trigger_lock);
					  mutex_lock(trigger_lock);
					  if (!rcu_access_pointer(group->poll_task)) {
					    timer_setup(poll_timer, poll_timer_fn, 0);
					    rcu_assign_pointer(poll_task, task);
					  }
					  mutex_unlock(trigger_lock);

  synchronize_rcu();
  del_timer_sync(poll_timer); <-- poll_timer has been reinitialized by
                                  psi_trigger_create()

So, trigger_lock/RCU correctly protects destruction of
group->poll_task but misses this race affecting poll_timer and
poll_wait.

Change-Id: I256e7679052ff960683b096e6d804cd4719cfa12
Fixes: 461daba06b ("psi: eliminate kthread_worker from psi trigger scheduling mechanism")
Co-developed-by: ziwei.dai <ziwei.dai@unisoc.com>
Signed-off-by: ziwei.dai <ziwei.dai@unisoc.com>
Co-developed-by: ke.wang <ke.wang@unisoc.com>
Signed-off-by: ke.wang <ke.wang@unisoc.com>
Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lkml.kernel.org/r/1623371374-15664-1-git-send-email-huangzhaoyang@gmail.com
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 8f91efd870)
2021-10-14 18:55:05 +08:00
Suren Baghdasaryan
5d41e8fcf1 UPSTREAM: psi: eliminate kthread_worker from psi trigger scheduling mechanism
Each psi group requires a dedicated kthread_delayed_work and
kthread_worker. Since no other work can be performed using psi_group's
kthread_worker, the same result can be obtained using a task_struct and
a timer directly. This makes psi triggering simpler by removing lists
and locks involved with kthread_worker usage and eliminates the need for
poll_scheduled atomic use in the hot path.

Change-Id: Ib28d84949de068a8bc97dccb187ac3e68980a319
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200528195442.190116-1-surenb@google.com
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 461daba06b)
2021-10-14 18:55:05 +08:00
William Wu
81e84034e8 usb: dwc3: gadget: increase intr ep resize tx fifo to 64B
For RV1109/RV1126 platforms, it resizes the tx fifos for
all of the usb device endpoints by default, it aims to
support UVC composite device, so just only set 16 bytes
for the tx fifo of the intr endpoints. But for the other
USB functions, like MTP function, it requires 64 bytes
tx fifo for its intr endpoint.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I27634dab473dad9a3e3d500cde7156c3eda514e8
2021-10-14 15:59:17 +08:00
Rafael J. Wysocki
00b9fb0f42 UPSTREAM: PM: runtime: Defer suspending suppliers
Because the PM-runtime status of the device is not updated in
__rpm_callback(), attempts to suspend the suppliers of the given
device triggered by the rpm_put_suppliers() call in there may
cause a supplier to be suspended completely before the status of
the consumer is updated to RPM_SUSPENDED, which is confusing.

To avoid that (1) modify __rpm_callback() to only decrease the
PM-runtime usage counter of each supplier and (2) make rpm_suspend()
try to suspend the suppliers after changing the consumer's status to
RPM_SUSPENDED, in analogy with the device's parent.

Change-Id: I2dbdf3999bc8a06bbbe29f57eb9cc1c49ec1aeff
Link: https://lore.kernel.org/linux-pm/CAPDyKFqm06KDw_p8WXsM4dijDbho4bb6T4k50UqqvR1_COsp8g@mail.gmail.com/
Fixes: 21d5c57b37 ("PM / runtime: Use device links")
Reported-by: elaine.zhang <zhangqing@rock-chips.com>
Diagnosed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 5244f5e2d8)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-10-13 18:37:54 +08:00
Rafael J. Wysocki
c133510b15 UPSTREAM: Revert "PM: runtime: Update device status before letting suppliers suspend"
Revert commit 44cc89f764 ("PM: runtime: Update device status
before letting suppliers suspend") that introduced a race condition
into __rpm_callback() which allowed a concurrent rpm_resume() to
run and resume the device prematurely after its status had been
changed to RPM_SUSPENDED by __rpm_callback().

Change-Id: Id45cafe9a26bf1a97a9e12e510894c1e4c889e4b
Fixes: 44cc89f764 ("PM: runtime: Update device status before letting suppliers suspend")
Link: https://lore.kernel.org/linux-pm/24dfb6fc-5d54-6ee2-9195-26428b7ecf8a@intel.com/
Reported-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: 4.10+ <stable@vger.kernel.org> # 4.10+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 0cab893f40)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-10-13 18:35:44 +08:00
Tao Huang
ddc7145079 Merge tag 'ASB-2021-10-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2021-10-01
CVE-2020-29368
CVE-2020-29660
CVE-2021-0707
CVE-2020-10768
CVE-2021-29647

* tag 'ASB-2021-10-05_4.19-stable': (1087 commits)
  Linux 4.19.206
  net: don't unconditionally copy_from_user a struct ifreq for socket ioctls
  Revert "floppy: reintroduce O_NDELAY fix"
  KVM: x86/mmu: Treat NX as used (not reserved) for all !TDP shadow MMUs
  fbmem: add margin check to fb_check_caps()
  vt_kdsetmode: extend console locking
  net/rds: dma_map_sg is entitled to merge entries
  drm/nouveau/disp: power down unused DP links during init
  drm: Copy drm_wait_vblank to user before returning
  qed: Fix null-pointer dereference in qed_rdma_create_qp()
  qed: qed ll2 race condition fixes
  vringh: Use wiov->used to check for read/write desc order
  virtio_pci: Support surprise removal of virtio pci device
  virtio: Improve vq->broken access to avoid any compiler optimization
  opp: remove WARN when no valid OPPs remain
  usb: gadget: u_audio: fix race condition on endpoint stop
  net: hns3: fix get wrong pfc_en when query PFC configuration
  net: marvell: fix MVNETA_TX_IN_PRGRS bit number
  xgene-v2: Fix a resource leak in the error handling path of 'xge_probe()'
  ip_gre: add validation for csum_start
  ...

Change-Id: Ib7da21059ab763a87255147340e4cba92e6b3f61

Conflicts:
	arch/arm/boot/dts/rk322x.dtsi
	arch/arm/boot/dts/rk3288.dtsi
	drivers/dma/pl330.c
	drivers/regulator/core.c
	drivers/staging/android/ion/ion.c
	drivers/usb/dwc3/core.c
	drivers/usb/dwc3/ep0.c
	drivers/usb/gadget/function/u_audio.c
2021-10-13 17:56:17 +08:00
Herman Chen
106d1430c1 video: rockchip: mpp: Remove lock on session release
Move mpp_session_deinit out of the lock range.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I46c3aaeb96c67ed04630b0da0a71385546dd5e7c
2021-10-13 09:46:41 +08:00
Zorro Liu
0c84d6bce8 arm64: dts: rockchip: set chrg_term_mode 1 for eink boards
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Ia383cf9c70acd1aaed0f6426485ebd8c7039f3eb
2021-10-13 09:46:08 +08:00
Jianqun Xu
3b1e3e2136 arm64: dts: rockchip: rk3568-pinctrl: remove flash_volsel
The flash_volsel is not a pin for flash

Change-Id: Ib1f4f4e7f11685ead858e6192b661069c6b85609
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-10-13 09:42:40 +08:00
Jianqun Xu
6ccae1fe9f ARM: dts: rv1126-pinctrl: remove flash_vol_sel/trig_in/trig_out
flash_vol_sel / flash_trig_in / flash_trig_out are not pin for flash.

Change-Id: I149ecac1013f6bd1f7b39440fda0511340b99edd
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-10-12 16:19:48 +08:00
Sandy Huang
9172f699d0 drm/rockchip: add to consider buffer cacheable at vmap
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7d823ceea5b50d3fa0a2d6fc252367611d2bb1e1
2021-10-11 14:23:53 +08:00
Shunqian Zheng
15752dea8b iio: imu: inv_icm42600: add icm40608
By comparing icm40608 datasheet with icm42600, it can
use icm426xx driver directly.

Change-Id: If856076ed4f57df6ba5bbb339a35b119937c6385
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2021-10-11 09:31:34 +08:00
Elaine Zhang
433f0ced6f thermal: rockchip: rv1126: Remove tsadc trim allowance
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Id4aab26d322f933cfb7a36dbdccbb46b6a584ed3
2021-10-09 15:15:37 +08:00
Mark Huang
12ae35d5bf ARM: configs: Add rv1126-uvc-spi-nor.config for uvc
make ARCH=arm rv1126_defconfig rv1126-uvc-spi-nor.config

Change-Id: Ie3258ecf353d1c3430a10909a4da66e2cce109eb
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
2021-10-09 15:08:22 +08:00
Zefa Chen
715b9488cd media: rockchip: cif fix issue for CONFIG_ROCKCHIP_IOMMU=n
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6914ac32bcef7c56eabe6bef9b9acce68615cbc7
2021-10-09 15:06:54 +08:00
Yiqing Zeng
0adfae22a6 media: rockchip: cif: fix pm runtime error
at a high frame rate (120fps), the fast switch test has a higher probability of the following errors:
Failed to get runtime pm, -22

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I6d9fdd86cc69368ba340ab7e43d2b6030a72ce8c
2021-10-09 15:06:54 +08:00
Zefa Chen
53b650ce43 media: rockchip: when cif triggers a reset, redefine the timer after reset
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I3dd12ba2d5f1a6d5a4f77e70b756aba9eaaea98f
2021-10-09 15:06:54 +08:00
Zefa Chen
8ad9944539 media: rockchip: cif optimized buf rotation
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2e188e2709e20a31eb060ee752de31653eab99df
2021-10-09 15:06:54 +08:00
Shunqian Zheng
01b5b14d41 arm64: config: add robot diffconfig for rk356x
It mainly changes:
 - Use preempt for lower latency
 - Enable MTD flash driver
 - Hung task detection and panic
 - Disable configs: FB, HDMI, ETHERNET etc.

Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I32816151c01638530b6a429cdc875aced4ee05e0
2021-10-09 14:58:20 +08:00
William Wu
0b5282ddd8 arm64: dts: rockchip: dis u1 and u2 state for rk3568 dwc3 device
According the commit 729dcffd1e ("usb: dwc3: gadget: Add
support for disabling U1 and U2 entries"), it's necessary
to disable the U1 and U2 low power state to improve USB 3.0
performance for mass storage gadget and uvc gadget.

In addition, it can help to avoid the dwc3 wakeup failed
from U1 or U2 state when connect to the Host USB 3.0 interface.

android_work: sent uevent USB_STATE=CONNECTED
dwc3 fcc00000.dwc3: failed to send remote wakeup
dwc3 fcc00000.dwc3: wakeup failed --> -22
WARNING: CPU: 0 PID: 427 at drivers/usb/dwc3/gadget.c:319 dwc3_send_gadget_ep_cmd+0x198/0x93c
...
Call trace:
 dwc3_send_gadget_ep_cmd+0x198/0x93c
 dwc3_ep0_complete_status+0xe8/0x294
 dwc3_ep0_interrupt+0x2ac/0x3d4
 dwc3_process_event_entry+0x7c/0x610
 dwc3_process_event_buf+0x6c/0x374
 dwc3_thread_interrupt+0x38/0x64
 irq_thread_fn+0x34/0x88
 irq_thread+0x1a4/0x248
 kthread+0x13c/0x344
 ret_from_fork+0x10/0x30
dwc3 fcc00000.dwc3: failed to send remote wakeup
android_work: sent uevent USB_STATE=CONFIGURED

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I7887c782a0320abe768079b098eab17ee846dcf6
2021-10-08 20:56:21 +08:00
William Wu
7216cb1e4b arm64: dts: rockchip: dis u1 and u2 state for rk3399 dwc3 device
According the commit 729dcffd1e ("usb: dwc3: gadget: Add
support for disabling U1 and U2 entries"), it's necessary
to disable the U1 and U2 low power state to improve USB 3.0
performance for mass storage gadget and uvc gadget.

In addition, it can help to avoid the dwc3 wakeup failed
from U1 or U2 state when connect to the Host USB 3.0 interface.

android_work: sent uevent USB_STATE=CONNECTED
dwc3 fcc00000.dwc3: failed to send remote wakeup
dwc3 fcc00000.dwc3: wakeup failed --> -22
WARNING: CPU: 0 PID: 427 at drivers/usb/dwc3/gadget.c:319 dwc3_send_gadget_ep_cmd+0x198/0x93c
...
Call trace:
 dwc3_send_gadget_ep_cmd+0x198/0x93c
 dwc3_ep0_complete_status+0xe8/0x294
 dwc3_ep0_interrupt+0x2ac/0x3d4
 dwc3_process_event_entry+0x7c/0x610
 dwc3_process_event_buf+0x6c/0x374
 dwc3_thread_interrupt+0x38/0x64
 irq_thread_fn+0x34/0x88
 irq_thread+0x1a4/0x248
 kthread+0x13c/0x344
 ret_from_fork+0x10/0x30
dwc3 fcc00000.dwc3: failed to send remote wakeup
android_work: sent uevent USB_STATE=CONFIGURED

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ic63ee7852fbe1bcb3563b6dec455c0aee53522f1
2021-10-08 20:49:28 +08:00
Shunhua Lan
50cd86fb55 media: i2c: rk628csi: adjust mclk use ppm instead of absolute value
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ia72b9628553e2c754e6d35c366d1ba48feee7023
2021-10-08 19:04:47 +08:00
Cai YiWei
cfe05e46c9 media: rockchip: ispp: fix monitor no working
Change-Id: I13c410af8902f65d5fc855a32c2778e44d369851
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-08 19:03:57 +08:00
Cai YiWei
5e30baa651 media: rockchip: isp: unregister dmarx at driver remove
Change-Id: I1146e5c81445980f456bc2ff19810c0ae84d2c7b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-08 19:03:57 +08:00
Cai YiWei
d49f43aafc media: rockchip: ispp: disable scl dma write if no output buffer
Change-Id: I11bbc17dad564510c7cbd37d4ad357f81fe1ecf2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-08 19:03:57 +08:00
Shunqian Zheng
054b699457 iio: imu: inv_icm42600: fix build error
Icm42600 was backported from upstream kernel.
Let icm24600 adopt kernel version 4.19 with minimal changes.

Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I5d4717bdd2e8d04732015d01a9587868165fea9a
2021-10-08 18:27:21 +08:00
Jean-Baptiste Maneyrol
419a3fb68e UPSTREAM: dt-bindings: iio: imu: Add inv_icm42600 documentation
Document the ICM-426xxx devices devicetree bindings.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 45924b8fd2)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I435c2c10d5d9e71215a034afa30c11c491883f0a
2021-10-08 18:24:50 +08:00
Jean-Baptiste Maneyrol
d541e55456 UPSTREAM: iio: imu: inv_icm42600: add accurate timestamping
Add a timestamping mechanism for buffer that provides accurate
event timestamps when using watermark. This mechanism estimates
device internal clock by comparing FIFO interrupts delta time and
device elapsed time computed by parsing FIFO data.

Take interrupt timestamp in hard irq handler and add IIO device
specific timestamp structures in device private allocation.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit ec74ae9fd3)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I2606414aaaecb5e6b16a729376bad374e3cdd024
2021-10-08 18:24:27 +08:00
Jean-Baptiste Maneyrol
beec1e5a14 UPSTREAM: iio: imu: inv_icm42600: add buffer support in iio devices
Add all FIFO parsing and reading functions. Add accel and gyro
kfifo buffer and FIFO data parsing. Use device interrupt for
reading data FIFO and launching accel and gyro parsing.

Support hwfifo watermark by multiplexing gyro and accel settings.
Support hwfifo flush.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 7f85e42a6c)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I7d259cc0a4fa6da00c2014e40cd57c60232bcd5a
2021-10-08 18:24:09 +08:00
Jean-Baptiste Maneyrol
9a4f272340 UPSTREAM: iio: imu: inv_icm42600: add device interrupt
Add INT1 interrupt support. Support interrupt edge and level,
active high or low. Push-pull or open-drain configurations.

Interrupt will be used to read data from the FIFO.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit e5efa1049b)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: Ic6c19caa25e67a44d4d6ab7dd876fc023388bc31
2021-10-08 18:23:52 +08:00
Jean-Baptiste Maneyrol
faabd7297a UPSTREAM: iio: imu: add Kconfig and Makefile for inv_icm42600 driver
Add 3 modules: inv-icm42600, inv-icm42600-i2c, inv-icm42600-spi.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 8237945dbc)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I8bd9bcc06c9886daad5915d94bbfc20025ab23b6
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
1ffc3c45e8 UPSTREAM: iio: imu: inv_icm42600: add temperature sensor support
Add temperature channel in gyroscope and accelerometer devices.

Temperature is available in full 16 bits resolution when reading
register and in low 8 bits resolution in the FIFO. Return full
precision raw temperature with corresponding scale and offset.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit bc3eb0207f)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I76b7a140b4d504289cdc433f2e36835ad5f1984d
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
038d60f8f0 UPSTREAM: iio: imu: inv_icm42600: add accelerometer IIO device
Add IIO device for accelerometer sensor with data polling
interface.
Attributes: raw, scale, sampling_frequency, calibbias.

Accelerometer in low noise mode.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit a47c1cdcb9)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: Iddfda60129a4029449718ab837314e71e359c5bc
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
9e7f3f7253 UPSTREAM: iio: imu: inv_icm42600: add gyroscope IIO device
Add IIO device for gyroscope sensor with data polling interface.
Attributes: raw, scale, sampling_frequency, calibbias.

Gyroscope in low noise mode.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit a095fadb44)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I3e13086ca0a2c9ea657bdbaddcca6848ee1decfd
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
b4c7ee2dee UPSTREAM: iio: imu: inv_icm42600: add SPI driver for inv_icm42600 driver
Add SPI driver for InvenSense ICM-426xxx devices.

Configure bus signal slew rates as indicated in the datasheet.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 9f9ff91b77)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: Id948c314093f28a3bc90d22f0a174dc8d115ca9d
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
1ca48f4883 UPSTREAM: iio: imu: inv_icm42600: add I2C driver for inv_icm42600 driver
Add I2C driver for InvenSense ICM-426xxx devices.

Configure bus signal slew rates as indicated in the datasheet.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 7297ef1e26)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: I0e05a41113ad450b9bb6fe252e380dca381a2580
2021-10-08 18:23:12 +08:00
Jean-Baptiste Maneyrol
a01c19d97b UPSTREAM: iio: imu: inv_icm42600: add core of new inv_icm42600 driver
Core component of a new driver for InvenSense ICM-426xx devices.
It includes registers definition, main probe/setup, and device
utility functions.

ICM-426xx devices are latest generation of 6-axis IMU,
gyroscope+accelerometer and temperature sensor. This device
includes a 2K FIFO, supports I2C/I3C/SPI, and provides
intelligent motion features like pedometer, tilt detection,
and tap detection.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 31c24c1e93)
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Change-Id: Iefe5c28aadd1ca4c75496f6090c3858090cd1c30
2021-10-08 18:23:12 +08:00
Zefa Chen
3bdad4c739 media: rockchip: cif: mipi csi2 do cru reset when stop
to avoid interruption signal after stop

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I1a4e896c38a9c24b6d3d4ded93aaa5b75800c68d
2021-10-08 17:49:17 +08:00
Zefa Chen
4800a4346c media: rockchip: cif fixed frame sequence bug in HDR mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6d1837bb6dd4ae2cbae397fb3a4cce404e5d3909
2021-10-08 17:47:03 +08:00
Zefa Chen
927d72b998 media: i2c: sc500ai fixed vflip err
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I184fd7e06514cae76d02a1990086e98fcf3e9a33
2021-10-08 17:47:03 +08:00
Jianwei Fan
ac58e64e38 arm64: dts: rockchip: rk3568-evb6: add lt8619c dvp-mode and dual-edge
configuration

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I12ae50c528e0399e1e31b1a4488b35a07016145e
2021-10-08 09:59:34 +08:00
Jianwei Fan
7d717e6c83 media: i2c: lt8619c: update the driver to v0.01.02
1. add BT656 mode support.
2. add ddr mode support.
3. fix 576i and 480i support mode.
4. add 4K30 mode.

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ifc59493ab7e838c59b00963c6c4d31749b068047
2021-10-08 09:59:34 +08:00
Caesar Wang
efd472c3cd arm64: dts: rockchip: set unique possible_crtcs for rk3568_linux.dtsi
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: If25aa8e06474473a69d1a370e3e546ecc2a6b748
2021-09-30 15:14:15 +08:00