Commit Graph

868018 Commits

Author SHA1 Message Date
Elaine Zhang
02bfca0689 clk: rockchip: px30: mark clk_rtc32k_pmu as critical
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I6f85ebd3bea1918b6938276295780f41a4ac197e
2022-03-08 11:50:15 +08:00
Sandy Huang
09145f10d9 drm/rockchip: vop: init win axi read id for px30
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ic2752ad9472b2b5658a24c18525947da621f367c
2022-03-07 17:22:19 +08:00
Liang Chen
93df7b6fa9 clk: scmi: initialize driver earlier when CONFIG_ARCH_ROCKCHIP=y
Make sure scmi_clk_cpu is ready when initialize cpufreq driver.

Change-Id: I8c0d0f59480127b4c98d9bdeb8be6080a1fc3dfd
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-03-04 18:36:06 +08:00
Lin Jinhan
70fd22cb4b crypto: rockchip: fix dma_map_sg/dma_unmap_sg not paired when using dma_fd
dma_fd buffer has been mapped by cryptodev and does not need to
 be mapped again.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ic28bebe3b169dfc4cb1fde4457122277f32294bf
2022-03-04 11:45:28 +08:00
Lin Jinhan
51e2a8f069 crypto: rockchip: cryptodev_linux: added non-multithreaded protection
CRYPTO V1/V2 do not support multi-threading, so it is necessary
 to add a hold mechanism in Cryptodev to prevent abnormal consequences
 caused by multi-threading calls.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ifd5ff6b102c81c8ac44c16f9689d5219c7fa5a56
2022-03-04 10:28:03 +08:00
Yu Qiaowei
dd7f647865 video: rockchip: rga3: Remove iommu_api that does not support GKI
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ie90b87aa84758644a4696e59a63c48d2fbb8e7b2
2022-03-03 21:03:53 +08:00
Yu Qiaowei
4c3a12c9c4 video: rockchip: rga3: Fix hardware support format
1. RGA3 support ARGB/ABGR8888 input.
2. RGA3 support YUV420 packed output.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I7680ed7b0218998f67e0d1ed40cc2ad3690b8572
2022-03-03 21:03:53 +08:00
Yu Qiaowei
16e812f5a2 video: rockchip: rga3: update rga_debugger
1. Add 'debug' mode in debug node.
2. Fix compilation error when procfs is enabled.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I88bdcad127a726a6b2618d54c2c3958a663bc6d7
2022-03-03 21:03:53 +08:00
Zou Wei
1258f08695 UPSTREAM: drm/bridge: lt9611: Add missing MODULE_DEVICE_TABLE
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1620801955-19188-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I6974f900b393538e313a313e2edb66e4281cfd3a
(cherry picked from commit 8d0b1fe81e)
2022-03-03 16:31:59 +08:00
Vinod Koul
458c70122a UPSTREAM: drm/bridge: Fix the dsi remote end-points
DSI end-points are supposed to be at node 0 and node 1 as per binding.
So fix this and use node 0 and node 1 for dsi.

Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fixes: 23278bf54a ("drm/bridge: Introduce LT9611 DSI to HDMI bridge")
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200828074251.3788165-1-vkoul@kernel.org
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I5e97fbc5e24b6d23cdb59156b8f5a3d953fe1445
(cherry picked from commit 85a5167366)
2022-03-03 16:30:14 +08:00
Vinod Koul
815e3255b6 UPSTREAM: drm/bridge: Introduce LT9611 DSI to HDMI bridge
Lontium Lt9611 is a DSI to HDMI bridge which supports two DSI ports and
I2S port as an input and HDMI port as output

Change-Id: Iae830d6208c111f1a546c390a6ee62fd609fd701
Co-developed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> # fix lt9611_bridge_mode_valid
Link: https://patchwork.freedesktop.org/patch/msgid/20200723163442.1280414-4-vkoul@kernel.org
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
(cherry picked from commit 23278bf54a)
2022-03-03 16:17:30 +08:00
Tao Huang
67793711ec rk: scripts/mkimg: Fix search mkimage
type will return an exit status of false when the name is not found.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia5f719550c5e6eab3373f6d45c63f5f77d29b688
2022-03-02 18:00:48 +08:00
Wang Jie
73f6a47d0d usb: typec: tcpm: add pending event lock
Quickly plug and unplug the Type-C device with DP function test, there
is a low probability of unplugging the Type-C dongle, DP work cannot
acquire the mutex(port->lock), and it will always be stuck in the
tcpm_unregister_altmodes() function during the rest port process, causing
the Type-C device to be inserted again to fail to be detected or the reboot
system to be stuck. The exception process is as follows:
(1) Thread#1: unplug the Type-C device to trigger cc status changes interrupt, in the
    tcpm_pd_event_handler() function, first acquire the mutex(port->lock),
    then start state_machine work, and finally release the mutex(port->lock);
tcpm_cc_change()
  -->tcpm_pd_event_handler()
    -->mutex_lock(&port->lock)  /* step 1 */
    -->_tcpm_cc_change(port, cc1, cc2) /* step 2 */
      -->tcpm_set_state(port, SRC_UNATTACHED, 0)
        -->kthread_queue_work(port->wq, &port->state_machine) /* step 3 */
    --> mutex_unlock(&port->lock)  /* step 4 */

(2) Thread#2: before the execution of "step 2" is completed, DP work calls
    the callback function registered by the tcpm framework to initiate a VDM
    Message, such as Enter Mode Message, in the tcpm_altmode_enter() acquires
    the mutex(port->lock) fails and goes to sleep;
dp_altmode_work()
  --> typec_altmode_enter(dp->alt)
    --> tcpm_altmode_enter()
      --> mutex_lock(&port->lock) /* dp work enter sleep */

(3) After step 4, tcpm_altmode_enter() did not acquire for the mutex(port->lock),
    but was preempted by the state_machine work to enter the reset port process.
    In the reset port process, call the tcpm_unregister_altmodes() function to
    release altmode and cancel dp work. Because tcpm_altmode_enter() did not
    acquire the mutex(port->lock), causing it to be stuck in cancel dp work.
tcpm_state_machine_work()
  -->mutex_lock(&port->lock)
  -->tcpm_reset_port(port)
    -->tcpm_unregister_altmodes(port)
      ......
      --> dp_altmode_remove()
        --> cancel_work_sync(&dp->work) /* always stuck in cancel dp work */
  ......

Therefore, after adding a new mutex to wait for the tcpm_pd_event_handler() function
to complete the processing, if the port is in the disconnect state, there is no need
to acquire the mutex(port->lock) in the tcpm_altmode_enter() function.

Change-Id: I364a035568ddc35ef7242b42f6d6d0ee3f5586fd
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2022-03-02 17:17:58 +08:00
Zorro Liu
d0f7a64bfa drivers: input: gsensor: mxc6655xa support orientation detect
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I4629a49eb86bcc0480625aceed88e8c180c74f3d
2022-03-01 19:20:56 +08:00
Zorro Liu
08c3c91f01 drivers: input: sensor-dev: support wakeup
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I8f1f48955f1957e998604624f036b0c07f6f755a
2022-03-01 19:19:08 +08:00
Lin Jinhan
1e549d833b crypto: rockchip: v2: ahash init/update/final use hardware crypto
1. disable crypto interrupt when crypto is idle
2. ahash init/update/final use hardware crypto
3. reset crypto cc before cipher/hash hardware init

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Id2c85c36c9f2fbe34af553b3ba12239e3cd281b4
2022-02-28 20:07:02 +08:00
Lin Jinhan
004c428031 crypto: rockchip: v2: modify the algos supported by each platform
1. add sha224/sha384 support.
2. XTS mode was removed due to panic on some platforms(RV1126 kernel 4.19).

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I339cb21c6abefa684f9d36e8faaa04d6ab43d3b1
2022-02-28 20:06:54 +08:00
Lin Jinhan
1ffb2a2a6b crypto: rockchip: v2: skcipher: fix bugs for librkcrypto test
1. On RV1126/RV1109, AES-192 dma-fd should not use hardware crypto.
2. Fixed a bug with CTR rk_iv_copyback in chain mode.
3. Modify cryptodev log information to reduce runtime logging.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ib197e0df4f0ff0c7f4cd20832f25be1b21e8cbf3
2022-02-28 16:54:41 +08:00
Ai ShaoXiang
6ab8eba37e drm/rockchip: vop2: vcnt event use signal to fill user_data
The userspace transmits private data through request.signal,
vcnt event return it to userspace through vbl.userdata

Change-Id: I8295a3d4fd91430b3b9fac6c5b6b526e1f266f24
Signed-off-by: Ai ShaoXiang <aisx@rock-chips.com>
2022-02-25 17:30:34 +08:00
Zorro Liu
cca940cfc4 drm/rockchip: ebc_dev: release version v3.02
fix overlay mode err after resume by blackcheck

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I0cc6b1b13118c9d07e45b523f89febb28bf646f1
2022-02-25 17:18:07 +08:00
Wang Jie
afb133e52f usb: typec: tcpm: add et7303 driver
Change-Id: I2339e9ece6c00d5a18eac01224cb623468d1771c
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2022-02-25 15:45:36 +08:00
Wang Jie
517da39e5c dt-bindings: usb: add et7303 document
Change-Id: I3001058b835e367595924cd8b00b415bcaeee670
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2022-02-25 15:42:42 +08:00
Zefa Chen
a78766f374 media: i2c: gc2093 fixed error when quick stream
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4f360fabb877c059b416e7761d2025cf2d03ece8
2022-02-25 14:59:49 +08:00
David Wu
49647833eb driver: rk630: Add RK630 MAC PHY support
Support RK630 ethernet PHY currently, this is a RMII PHY.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I444f9c5abd1dc5fe8067b79ddee93a801d7a28b9
2022-02-24 18:59:20 +08:00
Zorro Liu
90560c5b5d drm/rockchip: ebc_dev: release version v3.01
diff percent check for part gc16 mode

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I2ff677b3ec09b38bb731456ebd79d305601bf143
2022-02-24 17:48:30 +08:00
Wang Panzhenzhuan
e3bf4f8d9f arm64: dts: rockchip: rk3399-evb-ind-lpddr4-android: add gc8034 config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I99e44cd0212e2a7d3a3e74ec528dae379f3930b5
2022-02-24 16:27:44 +08:00
Binyuan Lan
e242831e3c ASoC: rockchip: rk817-codec: enable chop and reduce record gain
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I144cf8845961f3c03d53afd48754d20fe7789a66
2022-02-24 15:53:28 +08:00
Zefa Chen
9ec09dae48 media: rockchip: cif clean unready subdev before async subdev-itf
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2049f83a9d552109acca86d37d81ef0ceb2e9687
2022-02-24 15:31:53 +08:00
Wang Panzhenzhuan
672ec24093 ARM: dts: rockchip: rk3288-evb-android-rk808-edp: add gc8034 config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I40c74f9eecfde5a0df28bde77f7f9c5b02c29cc5
2022-02-24 15:31:11 +08:00
Wang Panzhenzhuan
9462007903 arm64: dts: rockchip: rk3399-sapphire-excavator-edp: add gc8034 config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Iae8b32357ca46563d12da0c17890bf70884df667
2022-02-24 15:29:56 +08:00
Yu Qiaowei
78d50f1d3f video: rockchip: rga3: Fix parameter error of RGA3 blend mode
layer binding:
    src => win0
    src1/dst => win1
    dst => wr

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I12709d578ce65b9a52d5275e873c660a5b1774d9
2022-02-23 17:49:13 +08:00
Yu Qiaowei
8454d38b6a video: rockchip: rga3: Fix "unknown ioctl cmd" error
Because of the difference in pointer size between 32/64 bit systems.

Update driver version to 1.2.4

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If557cdeb69f1f811eed6cf44419cbb73679dada0
2022-02-22 19:13:54 +08:00
Li Huang
19e2d244b0 video: rockchip: rga3: use get_dma_buf to add ref for mpi dma_buf
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Ie08cf1a296a166ed5b5bd273d485f6e56a6be022
2022-02-22 16:19:57 +08:00
Li Huang
c3f71e9029 video: rockchip: rga3: fixup rga load
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Id09a22819f4d118d1702b6eb7299279f0bd3fcc8
2022-02-22 16:19:47 +08:00
Li Huang
cb40170ed3 video: rockchip: rga3: support batch mode
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: Ib2f9a7815024d468ce1babb0e19789c458653329
2022-02-22 16:19:35 +08:00
Liang Chen
d22ee3f726 arm64: dts: rockchip: rk356x: adjust opp-table by pvtm
Change-Id: I898578def36d38a673678183fdf96339f0d55f0d
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-02-21 16:32:20 +08:00
Tony Xie
46e8168a45 arm64: dts: rockchip: rk3568: support boot amp cpu.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I6cd62516b77af8916c8193e4fb03d5de31745d9e
2022-02-21 11:35:46 +08:00
Tony Xie
2a1a61d4fc soc: rockchip: amp: support amp cpu on/off.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I178ecf1ef41bbad4d3f8064695f44ecd635199cd
2022-02-21 11:35:46 +08:00
Tony Xie
6b245536ea firmware: rockchip_sip: support cpu on/off for amp os.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I723e20cb088063e8f9525b3d64e37090e0a10adf
2022-02-21 11:35:46 +08:00
Yu Qiaowei
730fa9b08b video: rockchip: rga3: Synchronization of user-space image formats
Update driver version to 1.2.3

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I73ff1105bf52f67809be42fb1b45ca08451e17cf
2022-02-21 10:04:54 +08:00
Yu Qiaowei
b07c100c5c video: rockchip: rga3: Integration of format-related processing
1. Wrapped some format-related functions, avoid using formatted
index values.
2. Fix incorrect format alignment requirements.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3f1493dc59f9b303f6e8f289f63b515ad56d3651
2022-02-18 15:11:52 +08:00
Yu Qiaowei
be0736b43a video: rockchip: rga3: rga_mm supports physically continuous dma_buf
When calling RGA2 with a physically contiguous dma_buf it will be called
with the physical address.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Iadb2d638b426c9be64a403b42513f8c7b58fb866
2022-02-18 11:29:03 +08:00
Lin Jinhan
4480a4647c crypto: rockchip: cryptodev: optimized CIOCGSESSION return value
When the CIOCGSESSION command creates an unsupported algorithm or mode,
 errno is set to -ENOEN.

Add SM3/HMAC_SM3 support.

Move CMAC/CBCMAC from cipher to hmac.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I4f5f274ffe47d2b81584c192991670ddb2e3def5
2022-02-18 10:03:06 +08:00
Su Yuefu
8ccfd6aac0 media: i2c: add tp9950 driver
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: Ie3c9ebab575717d26beaded23314c9504828d500
2022-02-17 19:25:30 +08:00
Zorro Liu
f3578f1e73 arm64: dts: rockchip: rk3566-eink: update gpu opp table
improve touch interactive for rk3566-eink

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Ia880a417d255bd7a5a0da70d09232f2245888b2d
2022-02-17 19:20:44 +08:00
Wyon bi
9159680c50 drm/bridge: analogix_dp: Fix YCbCr Coefficients
Signed-off-by: Wyon bi <bivvy.bi@rock-chips.com>
Change-Id: If560fd514a2c946abcca35a5bbc18edf051cea5b
2022-02-17 15:52:56 +08:00
Wyon Bi
eb1afc1397 phy/rockchip: naneng-edp: Convert to use regmap
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I9a4a489b7df34a15d2b8e57cf9e2f4c97cc06118
2022-02-17 10:23:59 +08:00
Wyon Bi
a8fa434b92 soc: rockchip: grf: Add platform driver for edp phy grf
We need to overwrite the default register value to put the PHY into
low power mode in idle state.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I4c788ce04880d6e25d4454e5594882d511b0bc97
2022-02-17 10:23:59 +08:00
Wyon Bi
e8bbfb9fb2 arm64: dts: rockchip: rk3568: Add edp phy grf node
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I0ee522627cc057bd5b0be2c862e56f020dae57a2
2022-02-17 10:23:59 +08:00
Fabrice Gasnier
2031ba0fc1 UPSTREAM: mfd: syscon: Add optional clock support
Some system control registers need to be clocked, so the registers can
be accessed. Add an optional clock and attach it to regmap.

Change-Id: If23c2fc31b5d32b496b964a1c628b8be2bc2bc68
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit a00406b71c)
2022-02-16 11:32:47 +08:00