Commit Graph

1064955 Commits

Author SHA1 Message Date
Zefa Chen
bcb8a5d1ce media: rockchip: vicap: modifies the allocation of dummy buffers
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ie58d79e7bba999a4000ea4fd2f8c80d9dc3b74fa
2022-02-11 20:40:25 +08:00
Zefa Chen
1b1ec94d63 media: rockchip: vicap support to check group sync state
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Iff14c0108ba1a1e913177d307e47c0b97c27f7f5
2022-02-11 19:54:39 +08:00
Zhang Yubing
d10dfe46c2 phy: rockchip: usbdp: Add lock for interface functions
Interface functions may call by different threads, which may
access the same value at the same time. So we need add mutex
lock.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I682820c0eb366d514e21cc54f9ab97d5039a0814
2022-02-11 19:00:23 +08:00
Shawn Lin
20d9a60a89 PCI: rockchip: dw: Remove rockchip,prsnt-active-high
gpiod_get_value would take gpio active state into count. So
the default pattern should be like prsnt-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>
to indicate that 1 means no devices. If we need 0 to indicate no devices,
we should use GPIO_ACTIVE_HIGH instead.

Fixes: cca1a93b9e ("PCI: rockchip: dw: Add present IO detect")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ic34debabfccdac357c52df427573decc65eea83f
2022-02-11 18:58:28 +08:00
Lin Jinhan
1a23826f51 crypto: rockchip: v2: modify the length limit under user_ptr
When using user buffer, hardware crypto is used regardless of
 whether the data length is greater than 32K.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I3228910def265765e772da1ab4eda3b54d9927cb
2022-02-11 16:19:04 +08:00
Hongming Zou
f69206a363 arm64: dts: rockchip: update rk3588 pc demo board
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
Change-Id: I8fa1c8eadc13dc2664cbe5860dc0f56a36b28d57
2022-02-11 16:15:04 +08:00
Andy Yan
cf54ca6ff6 drm/rockchip: vop2: reverse list the internal pd when power down
Cluster0_PD is a parent power domain for Cluster1/2/3_PD,
it should be power on first and power down last.

use list_for_each_entry_safe_reverse to make sure the
right order.

Fixes: 8684b9914503("drm/rockchip: vop2: power off all vop pd when enter
suspend mode")

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I50a5d53de40131d4878b8e1d4a065ce2b96eb2c8
2022-02-11 16:07:25 +08:00
Yu Qiaowei
5c4772a66b video: rockchip: rga3: Fix some bugs about import
1. Fix dma_fd cannot be imported when only RGA2.
2. fix crash in fill mode.

Update driver version to 1.2.2

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib71b381c9e784f9eee8be925e80cfb27f0be2563
2022-02-11 15:58:22 +08:00
Li Huang
8442472c30 video: rockchip: rga3: suit for kernel 4.19
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I753e47fe7df8dee11a815db8f13834e722034db5
2022-02-11 15:58:07 +08:00
Zhang Yubing
e7599abc64 phy: rockchip: usbdp: adjust phy parameters for SI test
According to the result of SI test, adjust the ssc, voltage
swing, pre-emphasis to improve the phy compatibility.

Different rates use different parameters. The rbr and hbr
use the same parameters. Note that Type-C port's parameters
and DP standard port's parameters are different when the
lane rate is rbr or hbr.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I27a8a846a198c7feabf1aaf1459a7df056e4312a
2022-02-11 14:11:15 +08:00
Chen Shunqing
577e8c4548 power: supply: bq25890: fix warning of pd notifier call
pc : rcu_note_context_switch+0x358/0x5a0
lr : __schedule+0x80/0x794
sp : ffffffc013233880
x29: ffffffc013233880 x28: 0000000000000002
x27: 0000000000000001 x26: ffffff81fe734c40
x25: ffffffc011ef1c40 x24: ffffff8102d5b590
x23: ffffffc011edc000 x22: 0000000000000002
x21: ffffffc1ec843000 x20: 0000000000000000
x19: ffffff8102909280 x18: ffffffc0130f10a0
x17: 0000000001000000 x16: 0000000000000002
x15: ffffff8102d9f100 x14: 0000000000000001
x13: 0000000000000001 x12: 0000000000000000
x11: 0000000000000001 x10: 0000000000000001
x9 : dead0000000005f6 x8 : 0000000000000001
x7 : 6eff726462687564 x6 : 00001cef92349520
x5 : 0000000000000000 x4 : 0000000000000001
x3 : 00000000fffea2c8 x2 : 0000000000000001
x1 : ffffffc011c34096 x0 : 0000000000000000
Call trace:
 rcu_note_context_switch+0x358/0x5a0
 __schedule+0x80/0x794
 schedule+0xa0/0xe8
 schedule_timeout+0x84/0x124
 rk3x_i2c_xfer_common+0x3cc/0x630
 rk3x_i2c_xfer+0x18/0x28
 __i2c_transfer+0x254/0x79c
 i2c_transfer+0xa4/0x100
 regmap_i2c_read+0x58/0x98
 _regmap_raw_read+0x290/0x42c
 _regmap_bus_read+0x48/0x84
 _regmap_read+0x188/0x24c
 _regmap_update_bits+0x90/0x10c
 regmap_field_update_bits_base+0x70/0xa4
 bq25890_pd_notifier_call+0x148/0x168
 atomic_notifier_call_chain+0x50/0x90
 power_supply_changed_work+0x80/0xd0
 process_one_work+0x1f4/0x490
 worker_thread+0x278/0x4dc
 kthread+0x13c/0x344
 ret_from_fork+0x10/0x30

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I2d42e2115daa99196bb77da577eafa0a94a91008
2022-02-10 20:08:46 +08:00
shengfei Xu
56213b16f7 mfd: rk806: digital output 2MHz clock force enable
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I19c3b55fcd8030d817c231db4eba9663f5a550d6
2022-02-10 15:17:10 +08:00
Lin Jinhan
d54578aabc crypto: rockchip: v2: modify the length limit under dma_fd
When using DMA_fd, hardware crypto is used regardless of
 whether the data length is greater than 32K.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ifcc78bca17beb99ae7eae73f3def6ebf55f5cf1b
2022-02-10 15:10:12 +08:00
William Wu
388805c56b phy: rockchip: inno-usb2: correctly handle otg sm work
RK3588 has two OTG controllers, OTG0 is configured as
OTG mode, and OTG1 is configured as host mode. The OTG1
doesn't init the otg sm work, so it can only handle the
otg sm work if the func of the work is initialized.

This patch can fix the warning if the logic is power off
during deep sleep on RK3588 EVB2.

WARNING: CPU: 0 PID: 145 at kernel/workqueue.c:3057 __flush_work+0x26c/0x28c
Modules linked in:
CPU: 0 PID: 145 Comm: irq/106-rockchi Not tainted 5.10.66 #720
Hardware name: Rockchip RK3588 EVB2 LP4 V10 Board (DT)
pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
pc : __flush_work+0x26c/0x28c
lr : __cancel_work_timer+0x11c/0x1c0
......
Call trace:
 __flush_work+0x26c/0x28c
 __cancel_work_timer+0x11c/0x1c0
 cancel_delayed_work_sync+0x18/0x2c
 rockchip_usb2phy_bvalid_irq+0xf4/0x144
 rockchip_usb2phy_irq+0x368/0x384
 irq_thread_fn+0x34/0x88
 irq_thread+0x1a4/0x248
 kthread+0x13c/0x344
 ret_from_fork+0x10/0x30

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I42b5f6d22df3f7f94d54f05083694fb49e382620
2022-02-10 15:08:28 +08:00
Finley Xiao
003bfa520d soc: rockchip: opp_select: Don't remove static OPP
Only dynamic OPPs can be removed by dev_pm_opp_remove.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7362e7f58927ea9258c5abe761833e9fdc5e7656
2022-02-09 20:22:44 +08:00
Finley Xiao
3b2f4c277f PM / devfreq: rockchip_dmc: Fix WARNING when remove static OPP
Only dynamic OPPs can be removed by dev_pm_opp_remove.

[    2.484575][    T9] ------------[ cut here ]------------
[    2.485095][    T9] WARNING: CPU: 1 PID: 9 at drivers/opp/core.c:1205 dev_pm_opp_put_opp_table+0x130/0x138
[    2.487307][    T9] Modules linked in:
[    2.488411][    T9] CPU: 1 PID: 9 Comm: kworker/u16:1 Not tainted 5.10.66 #1871
[    2.489755][    T9] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[    2.491020][    T9] Workqueue: events_unbound deferred_probe_work_func
[    2.492845][    T9] pstate: 20800009 (nzCv daif -PAN +UAO -TCO BTYPE=--)
[    2.494247][    T9] pc : dev_pm_opp_put_opp_table+0x130/0x138
[    2.494759][    T9] lr : dev_pm_opp_put_opp_table+0x88/0x138
[    2.494767][    T9] sp : ffffffc01220b990
[    2.496151][    T9] x29: ffffffc01220b990
[    2.497399][    T9] x28: ffffff8102cc1488
[    2.498665][    T9]
[    2.498668][    T9] x27: 0000000000000000 x26: 00000000ffffffea
[    2.498675][    T9] x25: ffffffc0118d3536 x24: ffffff8103da5810
[    2.502111][    T9] x23: ffffff8103febf00 x22: dead000000000100
[    2.502680][    T9] x21: ffffff8101058010 x20: ffffff8102cc1800
[    2.503211][    T9] x19: ffffff8102cc1878 x18: ffffffc0120b5088
[    2.503742][    T9] x17: 0000000000000000 x16: 00000000000000d8
[    2.504273][    T9] x15: 0000000000000004 x14: 0000000000003fff
[    2.504812][    T9] x13: ffffffc011bec968 x12: 0000000000000003
[    2.506346][    T9] x11: 0000000000000000 x10: ffffffc1ed335000
[    2.507322][    T9] x9 : ffffff8103febe00 x8 : ffffff8102cc1868
[    2.507853][    T9] x7 : 342e32202020205b x6 : ffffffc011fc9db8
[    2.508385][    T9] x5 : ffffffffffffffff x4 : ffffff81fee890a0
[    2.508918][    T9] x3 : 0000000000000c59 x2 : ffffff8103da5500
[    2.509454][    T9] x1 : 0000000000000000 x0 : 0000000000000000
[    2.509988][    T9] Call trace:
[    2.510269][    T9]  dev_pm_opp_put_opp_table+0x130/0x138
[    2.510746][    T9]  dev_pm_opp_remove+0xe0/0xe4
[    2.511161][    T9]  rockchip_get_freq_info+0xd4/0x294
[    2.511614][    T9]  rk3588_dmc_init+0x148/0x234
[    2.512024][    T9]  rockchip_dmcfreq_probe+0x2f0/0x1498
[    2.512489][    T9]  platform_drv_probe+0x9c/0xc4
[    2.512910][    T9]  really_probe+0x204/0x510
[    2.513331][    T9]  driver_probe_device+0x80/0xc0
[    2.513788][    T9]  __device_attach_driver+0x118/0x140
[    2.514249][    T9]  bus_for_each_drv+0x84/0xd4
[    2.514654][    T9]  __device_attach+0xc0/0x158
[    2.515059][    T9]  device_initial_probe+0x18/0x28
[    2.515486][    T9]  bus_probe_device+0x38/0xa0
[    2.515891][    T9]  deferred_probe_work_func+0x80/0xe0
[    2.516352][    T9]  process_one_work+0x1f4/0x490
[    2.516768][    T9]  worker_thread+0x324/0x4dc
[    2.517164][    T9]  kthread+0x13c/0x344
[    2.517516][    T9]  ret_from_fork+0x10/0x30

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I5638b51e1e1f651c0a6755cebf9529fe64be4419
2022-02-09 20:22:34 +08:00
Finley Xiao
c572fc0487 soc: rockchip: opp_select: Fix safe rate error
Replace tmp_safe_rate type with unsigned long.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I6677eea0a76448d58d0ef1e23ceb0cfcf393c80a
2022-02-09 20:22:25 +08:00
Damon Ding
53e774ac86 drm/rockchip: vop: separate the of_device_id array by different SoC
Separate the process of device matching by the different SoC macro
definitions, which can reduce memory usage.

./ksize.sh  drivers/gpu/drm/

before ksize: 565102 Bytes
after  kszie: 526734 Bytes
save   about:  38368 Bytes

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I6b3689b11598120aad16956235d1ee2bbdbe80e0
2022-02-09 19:48:43 +08:00
Sugar Zhang
e5c34ac367 ARM: dts: rockchip: Add support for RV1106/3 EVB REF Board
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ia8e91f17aa429207caf9d5ca8a1570ef4d9e4e82
2022-02-09 09:29:15 +08:00
Sugar Zhang
f164131252 ARM: dts: rockchip: Add core dtsi for RV1106/3
RV1106/3 is a highly integrated vision processor SoC
for IPC, especially for AI related application.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I77650867696ac94c0a9ab9ad3b6ddaeea6121169
2022-02-09 09:24:32 +08:00
Jianwei Fan
98f59f4f3a arm64: rockchip_defconfig: enable CONFIG_VIDEO_S5K3L6XX
Enable CONFIG_VIDEO_S5K3L6XX which found on rk3588s tablet
rk806 single board

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: If06becce1e3209feccff6d0975fdb17f81df26c1
2022-02-08 20:18:26 +08:00
Jianwei Fan
cb409c05ac arm64: dts: rockchip: rk3588s-tablet-rk806-single: add camera configuration
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ica76e81538b92afefb0693b760a1020f2269d520
2022-02-08 20:15:50 +08:00
Jianwei Fan
ed07815405 media: i2c: s5k3l6xx: add s5k3l6xx camera driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I140414d9c54af22818852812bf436d562c6d5b0b
2022-02-08 20:13:10 +08:00
Zhen Chen
8556e654d6 MALI: bifrost: fix panic "stack is corrupted in: kbase_get_real_power_locked"
The panic was triggered
by running "cat /sys/kernel/debug/mali0/ipa_current_power".

It is fixed by enlarging KBASE_IPA_BLOCK_TYPE_NUM according to the fact
that we set 4 clks for GPU in rk3588 dts.

Change-Id: I3a87f6f2d25cf296d95d033d3d98c51666ea482d
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2022-02-08 20:11:31 +08:00
Ziyuan Xu
e1ebd0062d mmc: free the available reserved memory of escd when CONFIG_ROCKCHIP_THUNDER_BOOT=y
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I77c69d579c9121adde94ffc2e68514a9fd34e870
2022-02-08 19:27:52 +08:00
Ziyuan Xu
ba941e36cc soc: rockchip: thunderboot_mmc: make sense of the *free_reserved_area*
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I5470dadd845c706cae305f8f60b721b9904a7ddb
2022-02-08 19:27:52 +08:00
Tao Huang
e20b6973ec ARM: rockchip: Locate kernel at 0x00608000 if CPU_RV1126
6M reserved when CONFIG_ROCKCHIP_THUNDER_BOOT=y.

Change-Id: Idd4bb302667e851f544b087af1ed7391b58d2075
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-02-08 19:14:31 +08:00
Sugar Zhang
65a0c70ca0 ARM: Make TEXT_OFFSET more flexible
arch/arm/kernel/head.S:181: Error: invalid constant (608000) after fixup
arch/arm/boot/compressed/head.S:209: Error: invalid constant (608000) after fixup

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1efb510817d02732e76976058e5af97586ea0147
2022-02-08 18:53:19 +08:00
Cai YiWei
a411a983a6 media: rockchip: isp: increase v4l2 events length
Change-Id: I30638c25cd51b64875c0fbe6383b879ed8ab8fb2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-02-08 18:49:26 +08:00
Zefa Chen
7609787206 media: rockchip: vicap increase v4l2 event length
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4e41d445f4c1d13dc8232b80306e2ff992e0b037
2022-02-08 18:48:12 +08:00
Tao Huang
a04ad7f646 input: sensors: make local struct sensor_operate ops static
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ifa014ea6e830d4a312a173de473dda3f05c66ad3
2022-02-08 18:40:15 +08:00
Algea Cao
8f1f6dcb73 drm/rockchip: dw_hdmi: Set connector id value
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5f2477e14f039a88f5aea87d86a64cc4f6ed6cf1
2022-02-08 18:36:47 +08:00
XiaoDong Huang
72788364f5 Revert "arm64: dts: rockchip: Temporarily disable cpu-sleep idle state for rk3588"
This reverts commit 61e3b7cd73.

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ia690790ab1ed063d313c60f3190f3960fa6fe1f0
2022-02-08 16:48:57 +08:00
Zhang Yubing
af0ae5b434 phy: rockchip-samsung-hdptx-hdmi: fix pll close issue
If phy pll is used, we don't power off phy. Delay to do
the phy power off work when the phy pll isn't used.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I5a90bc7de2664da2775a81e89aedc26c42da7062
2022-02-08 16:34:05 +08:00
Wang Jie
0bec4db01a usb: typec: tcpm: husb311: disable i2c timeout reset function
According to the description of the I2C_RESET(0x9E) register in
the husb311 datasheet, the main configuration is enable/disable
i2c timeout reset function(bit[7]) and i2c timeout time(bit[3:0]).

If the i2c timeout reset function is enabled, the husb311 will perform
a soft reset in some cases, such as system hibernation, and close the
i2c bus (SCL and SDA are low at the same time). So we disable the i2c
timeout reset function.

Change-Id: Id9169f3ecf65725a959aadda9d2f8f60f20c87a3
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2022-02-08 14:32:05 +08:00
Shunhua Lan
d2cf002d8f arm64: dts: rockchip: add and enable dp sound cards for rk3588 evbs
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I5a1efac436fd0aa49b894c1247b2ae6108ff4ee8
2022-01-28 09:53:36 +08:00
Shunhua Lan
cc58f3be22 drm/rockchip: dw-dp: add audio plugged callback for jack report
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: If96a7b68676a085c7fc290941271b210cc903cdd
2022-01-28 09:53:30 +08:00
Shunhua Lan
9a06c19490 drm/rockchip: dw-dp: enable audio through spdif and i2s switch
There are i2s and spdif interfaces for audio, default is i2s
When switching audio interfaces, both interfaces's mclk must be enabled
And can switch off after switching

Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I9007a2115c3c3fcdc5e68112aabcfab5fce5a5a8
2022-01-28 09:53:24 +08:00
Shunhua Lan
dcdf88d54d arm64: dts: rockchip: rk3588: fix audio mclk configuration for spdif to dp
The clock topology:
MCLK_SPDIF2     ----->  spdif_tx2 mclk
HCLK_SPDIF2_DP0 ----->  spdif_tx2 hclk

MCLK_SPDIF2_DP0   --|\
                    | |----- dp0 audio mclk
MCLK_I2S4_8CH_TX  --|/

MCLK_SPDIF5     ----->  spdif_tx5 mclk
HCLK_SPDIF5_DP1 ----->  spdif_tx5 hclk

MCLK_SPDIF5_DP1   --|\
                    | |----- dp1 audio mclk
MCLK_I2S8_8CH_TX  --|/

Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I00fc9a217227079ed51984615d63116e0be56443
2022-01-28 09:53:15 +08:00
Wangqiang Guo
dab9ef540d arm64: dts: rockchip: rk3588s-tablet-rk806-single: Add L/P sensor ucs14620
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I84288e29c54ff63f9804feb5dcf96c2e6184c8a4
2022-01-28 09:35:32 +08:00
Chen Shunqing
f9b9472cbf power: supply: bq25890: disable auto dp/dm detection when pd in
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I2e19dd3a7c248ab968078dbd9b90f7490be6cb0c
2022-01-28 09:33:29 +08:00
Chen Shunqing
3ddaf8371c arm64: dts: rockchip: rk3588s-tablet-rk806-single: set bq25890 vreg to 4.4v
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I1e859aeafa21aca5f94cf2b391dd4b95d699eab6
2022-01-28 08:34:51 +08:00
Ding Wei
5b7bc45350 video: rockchip: mpp: Extract mpp_dev_shutdown for device shutdown
All device have similar function for device shutdown, thus,
extract it for common function.

Change-Id: I365cc10759559c7d7e824a6e4c93df24198d82f9
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2022-01-27 20:12:39 +08:00
Jaime Liao
c50772fd65 UPSTREAM: mtd: spinand: macronix: Add Quad support for serial NAND flash
Adding FLAG "SPINAND_HAS_QE_BIT" for Quad mode support on Macronix
Serial Flash.
Validated via normal(default) and QUAD mode by read, erase, read back,
on Xilinx Zynq PicoZed FPGA board which included Macronix
SPI Host(drivers/spi/spi-mxic.c).

Change-Id: I7951dd4705cdc7e03bd697da33d216cfd5237b4c
Signed-off-by: Jaime Liao <jaimeliao@mxic.com.tw>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/1628472472-32008-1-git-send-email-jaimeliao@mxic.com.tw
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 6f802696c2)
2022-01-27 20:08:24 +08:00
Zhang Yubing
6b870a0195 drm/rockchip: vop2: Check output_if instead of output_type for vp output type
When a vop port connect more than one type output interface(DP +
HDMI in connector mirror mode), the output_type can't provide all
the interface info, which may calculate wrong dclk. So we use
output_if to get the output interface info.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ia1b815c6d65a47b64e1b9679906c5979119f1d16
2022-01-27 19:49:45 +08:00
Zhang Yubing
c9cabc8567 drm/rockchip: dw-dp: add color properties support.
Add color properties support, then userspace can set the dp
output color depth and color format.

The default color depth and color format is 0, and driver
auto select the suitable color depth and color format.

If set the color depth to 0, it mean driver auto select
the suitable color depth and color format.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I453ec87e8305cb6d8ddf0f7e4a9c274b97c54ee8
2022-01-27 19:47:16 +08:00
Weixin Zhou
539893916b arm64: dts: rockchip: rk3588s-tablet-rk806-single: add fusb302 interrupt gpio configuration for uboot
The uboot Type-C PD driver needs to poll the interrupt gpio level,
but the uboot code does not have a suitable interface to convert the
attributes of "interrupt-parent" and "interrupts" to standard gpio,
so add int-n-gpios configure for uboot to analyze and use.

Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ie403b158a259411312159845ec316ffd8a061acf
2022-01-27 19:45:43 +08:00
Jon Lin
63d457fdbd PCI: rockchip: dw: Change ep BAR distribution scheme
Change from:
	BAR0 512GB 32bits mem
	BAR1~5 64MB 32bits mem
to:
	BAR0 512GB np 32bits mem
	BAR1 8MB np 32bits mem
	BAR2 BAR4 64MB pref 64bits mem

And the log is like the following:
[    5.245427] [  T148] pci 0000:01:00.0: BAR 2: assigned [mem 0x900000000-0x903ffffff 64bit pref]
[    5.245449] [  T148] pci 0000:01:00.0: BAR 4: assigned [mem 0x904000000-0x907ffffff 64bit pref]
[    5.245471] [  T148] pci 0000:01:00.0: BAR 1: assigned [mem 0xf0800000-0xf0ffffff]

Change-Id: I43ba2ebe0aacdc2b7f49175a6008d22c26ffd220
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-01-27 19:40:18 +08:00
Jon Lin
522737b2a6 PCI: rockchip: dw: Initialize dbi_base2 for ep
Change-Id: I494cf7f6f519a072704754e43e991035336b03b9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-01-27 19:33:50 +08:00
Shawn Lin
cca1a93b9e PCI: rockchip: dw: Add present IO detect
prsnt-gpios can be defined in DTS for showing if PCIe device is present
or not. By default, low voltage means device is present defined by PCIe
ECM spec. However, some buggy board may invert this voltage level. So
if you need high voltage to show the device is present, please add
rockchip,prsnt-active-high as well.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ib0a5b509afc202a9ec63a4bbdd1e54a3916dcfc9
2022-01-27 19:26:02 +08:00