Commit Graph

1066650 Commits

Author SHA1 Message Date
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
Jianqun Xu
e165028391 dma-buf: heaps: system_heap: fix partial sync contition error
The uncached heap can skip dma sync.
Fixes: 21f2fd663e ("dma-buf: system_heap: support cpu access partial dma-buf")

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I747db5c3db482804e1a3a0b9388f3b75c1a9b87e
2022-07-08 17:31:29 +08:00
Weiwen Chen
c9dd6b483b ARM: dts: rockchip: rv1106-thunder-boot: reserved memory for meta
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I70266109c9644b849e0e42263a3c8490ee521680
2022-07-08 17:31:29 +08:00
Jason Zhang
d0e671483d arm64: configs: rockchip_defconfig: enable CONFIG_UCS12CM0
This patch enables Ultra Capteur UCS12CM0 support for the rk3588s
tablet platform with defconfig entry for UCS12CM0.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I5e865a13dd30e1429d91093f28e0543a627d1cdc
2022-07-08 17:31:29 +08:00
Jason Zhang
0a417d15ca iio: light: Add initial support for Ultra Capteur UCS12CM0
The UCS12CM0 is a color-based light to digital converter which combines
photodiodes, current amplifiers, analog circuit and digital signal
processor.

Features:
* I2C interface (Fast Speed Mode at 400kHz/s)
* Supply voltage range from 2.4V to 3.6V
* Operating temperature from -40°C to +85°C
* Package level trimming
* Power on reset & brown out reset
* Waiting time function for reducing power consumption
* R, G, B, W and IR five channel parallel output
* Fluorescent light flicker immunity
* Selectable analog gain
* Selectable resolution (up to 16-bit)
* High sensitivity in low illumination
* Wide detect range in high illumination
* High accuracy of LUX & CCT

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: Id960065ae8ebf9e6d23f7a4da9143add49db3d59
2022-07-08 17:31:29 +08:00
Finley Xiao
7d9a7b1eff MALI: bifrost: Fix NULL pointer dereference when only one regulator
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000078
Mem abort info:
  ESR = 0x96000005
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
Data abort info:
  ISV = 0, ISS = 0x00000005
  CM = 0, WnR = 0
[0000000000000078] user address but active_mm is swapper
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 2 PID: 159 Comm: kworker/u8:2 Not tainted 5.10.66 #1719
Hardware name: Rockchip RK3566 EVB2 LP4X V10 Board (DT)
Workqueue: devfreq_wq devfreq_monitor
pstate: 20c00009 (nzCv daif +PAN +UAO -TCO BTYPE=--)
pc : regulator_set_voltage+0x34/0xa0
lr : kbase_devfreq_opp_helper+0x194/0x364
sp : ffffffc014133b20
x29: ffffffc014133b40 x28: 000000000bebc200
x27: 0000000000000000 x26: ffffff8005486268
x25: 0000000000000001 x24: ffffff8005c522b0
x23: ffffff8005483800 x22: ffffff80054839e0
x21: 000000000000314c x20: 0000000000000000
x19: ffffff8005483a00 x18: ffffffc0140b5050
x17: 0000000000000000 x16: 0000000000000001
x15: 0000000000000000 x14: ffffffffffffffc8
x13: 0000000000000000 x12: 0000000000000014
x11: 0000000000000000 x10: ffffff8005486100
x9 : 00000000ffffffff x8 : f06ef41598ba9d00
x7 : 00000000000c96a8 x6 : 0000000000000001
x5 : 0000000000000001 x4 : 000000000bebc200
x3 : 0000000000000000 x2 : 000000007fffffff
x1 : ffffffc014133b20 x0 : 0000000000000000
Call trace:
 regulator_set_voltage+0x34/0xa0
 kbase_devfreq_opp_helper+0x194/0x364
 dev_pm_opp_set_rate+0x2ec/0x92c
 kbase_devfreq_target+0x7c/0xd0
 devfreq_set_target+0x80/0x200
 update_devfreq+0x114/0x148
 devfreq_monitor+0x30/0x12c
 process_one_work+0x1f4/0x490
 worker_thread+0x278/0x4dc
 kthread+0x13c/0x344
 ret_from_fork+0x10/0x30

Fixes: 98a9b2cbb4 ("MALI: bifrost: Add memory regulator support")
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie2a1f0f86169facf31de3cfc9aba5d42092a5d41
2022-07-08 17:31:29 +08:00
Jianqun Xu
52be0a6031 drm/rockchip: gem: const to use rockchip_gem_destroy
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I42e6b4b29bfeb785f167ddf20a0b25b3bed1d414
2022-07-08 17:31:29 +08:00
Jianqun Xu
1a1bf441c8 drm/rockchip: do iommu init after bind all devices
During system bootimg, drm probe will fail since failed to bind all
devices, currently the iommu init is done before bind all devices,
the iommu needs to clean up.

This patch moves the iommu init after bind all devices to reduce the
iommu clean up.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I74eba09c9c5106a2e67e7a3784e9e373229483ce
2022-07-08 17:31:29 +08:00
Algea Cao
c9fcd4910a drm/bridge: synopsys: dw-hdmi-qp: Set default output mode to hdmi
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5574e55a7e4a885a3c79e3a48bc64ac73214034f
2022-07-08 17:31:29 +08:00
Yu Qiaowei
a9b0a038aa video: rockchip: rga3: Fix BUG_ON of spin_lock in single-mode request
[  559.931013] BUG: spinlock bad magic on CPU#6, rk_mb_gtest/1066
[  559.931031]  lock: 0xffffffc014f13b00, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
[  559.931037] CPU: 6 PID: 1066 Comm: rk_mb_gtest Not tainted 5.10.66 #5
[  559.931041] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[  559.931045] Call trace:
[  559.931051]  dump_backtrace+0x0/0x1b4
[  559.931055]  show_stack+0x24/0x30
[  559.931061]  dump_stack_lvl+0xc8/0xf8
[  559.931064]  dump_stack+0x18/0x34
[  559.931070]  spin_bug+0x90/0xb4
[  559.931075]  do_raw_spin_lock+0x44/0xe0
[  559.931080]  _raw_spin_lock_irqsave+0x30/0x44
[  559.931086]  rga_request_submit+0x30/0x220
[  559.931090]  rga_ioctl+0x280/0x7a4
[  559.931095]  vfs_ioctl+0x34/0x54
[  559.931099]  __arm64_sys_ioctl+0x6c/0xa0
[  559.931104]  el0_svc_common.constprop.0+0x13c/0x1ec
[  559.931107]  do_el0_svc+0x8c/0x98
[  559.931111]  el0_svc+0x20/0x30
[  559.931115]  el0_sync_handler+0xd8/0x184
[  559.931119]  el0_sync+0x1a0/0x1c0

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8876383e5692f66bbd44a7a32d7208c2b2810733
2022-07-08 17:31:28 +08:00
Jason Zhang
59f2aa3fd3 arm64: configs: rockchip_defconfig: enable CONFIG_IIO_ST_LSM6DSR
This patch enables ST LSM6DSR support for the rk3588s tablet platform
with defconfig entries for IIO_ST_LSM6DSR, IIO_ST_LSM6DSR_I2C and
IIO_ST_LSM6DSR_SPI.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I026f651aae0b9de78601f7d856adee540569ed4e
2022-07-08 17:31:28 +08:00
Jason Zhang
1927f5785f iio: imu: Add initial support for ST LSM6DSR
The LSM6DSR is a system-in-package featuring a 3D digital accelerometer
and a 3D digital gyroscope with an extended full-scale range for the
gyroscope, up to 4000 dps, and high stability over temperature and time.

The LSM6DSR features the following on-chip functions:
* 9 kbytes data buffering, data can be compressed two or three times
* Event-detection interrupts (fully configurable):
  - Free-fall
  - Wakeup
  - 6D orientation
  - Click and double-click sensing
  - Activity/inactivity recognition
  - Stationary/Motion detection
* Specific IP blocks with negligible power consumption and
  high-performance
  - Pedometer functions: step detector and step counters
  - Tilt
  - Significant Motion Detection
  - Finite State Machine (FSM) for accelerometer, gyroscope, and external
    sensors
* Sensor hub
  - Up to 6 total sensors: 2 internal (accelerometer and gyroscope) and 4
    external sensors
* S4S data rate synchronization with external trigger for reduced sensor
  access and enhanced fusion

Current driver offers support for accelerometer and gyroscope.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: Ie24caba8755538e5ac0e87b2663eb89e7d2b391a
2022-07-08 17:31:28 +08:00
Jason Zhang
a2c96f974d iio: Add channels for LSM6DSR sensor HUB
Add new channels types support for LSM6DSR sensor HUB:
* IIO_SIGN_MOTION
* IIO_STEP_DETECTOR
* IIO_STEP_COUNTER
* IIO_TILT
* IIO_TAP
* IIO_TAP_TAP
* IIO_WRIST_TILT_GESTURE
* IIO_GESTURE

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I8f3f2feae32b94ad6802a9a359ec11ab94a96816
2022-07-08 17:31:28 +08:00
Jason Zhang
2c5b0fb9db iio: Add FIFO event for LSM6DSR sensor HUB
Add FIFO event type:
* IIO_EV_TYPE_FIFO_FLUSH

This change also adds FIFO event directions:
* IIO_EV_DIR_FIFO_EMPTY (indicates the FIFO is empty)
* IIO_EV_DIR_FIFO_DATA (indicates the FIFO is not empty)

A FIFO flush event is triggered after the HW FIFO is flushed,
and indicates that whether the HW FIFO is empty or not.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: Idb21bc271c7fd8def63f2cb29440ebf0677688d5
2022-07-08 17:31:28 +08:00
Jason Zhang
7783835a83 iio: light: vl6180: add custom initialization
Set up the registers related to range according to the datasheet.

Note that some registers is unavailable on the datasheet, but they are
unbelievably useful.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I599ad6fb2a76f79dfd600d626871574221f1aca6
2022-07-08 17:31:28 +08:00
Jason Zhang
31654742f5 iio: light: vl6180: add support for irq and buffer setup
Add support for interrupt request and buffer setup. Use device
interrupt for reading measurements of ALS, range and proximity.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: Idb605241df51519e49e3e4df471c5efe70948dcb
2022-07-08 17:31:28 +08:00
Jason Zhang
61ce1f9f69 dt-bindings: iio: light: vl6180: support power control using gpio
Support power supply and enable using gpio (if provided).

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I2ed5acf9b38652d1e999a072dda17fa069cde23c
2022-07-08 17:31:28 +08:00
Jason Zhang
9a87d22369 iio: light: vl6180: support power control using gpio
There are AVDD and GPIO0/CE in the pinout of STMicro VL6180:
  - AVDD (Digital/analog power supply 2.6 to 3.0 V),
  - GPIO0/CE (Power-up default is chip enable (CE)).

These two pins are gpio connected in some reference design boards and
control the power in the Power-up timing constraints. This patch
emulates this situation.

Signed-off-by: Jason Zhang <jason.zhang@rock-chips.com>
Change-Id: I610455ea7ca738303ec6dd6ff496576ff2e716ce
2022-07-08 17:31:28 +08:00
Yifeng Zhao
487de35b82 emmc: sdhci-of-dwcmshc: improve compatibility with HS400ES mode
This patch modify the strobe tap number for better compatibility
with HS400ES mode.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I7ceb37c448250170f2bf394381a43bd0e925ddfa
2022-07-08 17:31:28 +08:00