Commit Graph

1272345 Commits

Author SHA1 Message Date
Wesley Yao
0e6bcaa1c2 Revert "ARM: dts: rockchip: rk3506-evb1: Add flexbus related nodes"
This reverts commit 06332253b7.

Change-Id: Id2d17451eb85d02547580103a11418da1c0863b5
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2024-07-31 19:29:16 +08:00
Wesley Yao
53ed9729b7 iio: adc: rockchip-flexbus-adc: Add support for ref_clk
ref_clk is only used for slave-mode.

Change-Id: I1ad0d11efed9ee6b552fa3d7d6f6a5d1b389e98d
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2024-07-31 19:21:51 +08:00
Wesley Yao
06bf21b322 ARM: dts: rockchip: rk3506: Add ref_clk for flexbus_adc
ref_clk is only used for slave-mode

Change-Id: I05094c6552097adc7d14679c3c284f147b49d7f8
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2024-07-31 19:20:49 +08:00
Damon Ding
c6337fce28 arm64: dts: rockchip: rk3576: add osc clk configs for pwm0
For rk3576, pwm1 supports wave generator mode, which
relies on the osc clk.

Change-Id: Icac6a8201aa0370868e0383f2b9daa90919cea9e
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-07-31 19:00:04 +08:00
Damon Ding
d28c2096be ARM: dts: rockchip: rk3506: add osc clk configs for pwm0
For rk3506, pwm0 supports wave generator mode, which
relies on the osc clk.

Change-Id: I8897595eeda31b0f606c2f2f6a365a1125fceeac
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-07-31 19:00:04 +08:00
Damon Ding
19b3f8d830 pwm: rockchip: add pwm clk_osc control for wave generator mode
The read/write behavior of wave table relies on the osc clk
by default.

In addition, replace pwmchip_add() by devm_pwmchip_add().

Change-Id: Idfae114cf51e30c4c82ed5255477eef8d969aa2e
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-07-31 19:00:04 +08:00
Damon Ding
86c6679be9 dt-bindings: display: rockchip: add mcu-panel.yaml
Change-Id: Iae236c1932a12f0ce85917b684f99bed7d052114
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-07-31 18:57:58 +08:00
Damon Ding
194868ef60 dt-bindings: display: rockchip: rgb: convert to yaml
Change-Id: I2a800dced75aca8eb16e832ef1f2f15ff2ab3745
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-07-31 18:57:58 +08:00
Sandy Huang
28228c588f drm/rockchip: logo: add more clock loader protect
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ic2658065a05a492a099fc38fdae716ecc2710f65
2024-07-31 11:07:28 +08:00
Tao Huang
901f5ec1b4 Revert "ATA: ahci_platform: enable FBS for RK3588"
This reverts commit e1f0e15a08.

rk3588 use ahci_dwc driver other than ahci_platform.

Change-Id: Iaefe35363ded3730d978ef330ae9a08b872f4379
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-07-30 19:54:48 +08:00
Yifeng Zhao
5711151287 arm64: configs: rockchip_linux_defconfig: enable CONFIG_AHCI_DWC
Commit 33629d3509 ("ata: ahci: Add DWC AHCI SATA controller support")
move snps,dwc-ahci support from ahci_platform.c to ahci_dwc.c.
So replace CONFIG_SATA_AHCI_PLATFORM by CONFIG_AHCI_DWC.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I4089d656f93fedd8d9437ebb1d2ed5431915b8df
2024-07-30 19:46:26 +08:00
Algea Cao
af176b7250 phy: rockchip-samsung-hdptx-hdmi: Read phy status before phy clk register
Reading uboot phy status must before phy pll clk register,
otherwise phy pll will be enabled and set defualt 74.25Mhz rate.

Change-Id: I569499e0c3522f7f80f4aa0ff6cdda6a357d7fef
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-07-30 19:13:48 +08:00
Chandler Chen
4d15cf5488 video: rockchip: mpp: rkvdec: add spinlock for mmu fault handle
same as link mode, add spinlock for ccu mode

Change-Id: Ic6abe20edd6d932a25b832566504f8372002f897
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
2024-07-30 19:13:22 +08:00
Ye Zhang
798c9ca833 ARM: dts: rockchip: rk3506-pinctrl: update dsmc, dsmc_slv config
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I24ad4c5dd54b037db990e0771c08d2bc24b818f9
2024-07-30 19:12:56 +08:00
Damon Ding
d3d53570bf drm/rockchip: analogix_dp: fix the lcdc_sel config
For RK3399, the lcdc_sel should be set to corresponding id
for vopl or vopb.

Fixes: d4f217f532 ("drm/rockchip: analogix_dp: fix the log to indicate edp data source")
Change-Id: I98f5f50b32038025fe72a6d38e37fb02b011eaba
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-07-30 19:11:51 +08:00
Cai Wenzhong
d501264306 media: i2c: maxim: driver version v3.09.00
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I0ac1c3faf127c196a3154d188d6c307d3f0043c5
2024-07-30 19:00:30 +08:00
Zorro Liu
829e3c82b9 arm64: dts: rockchip: rk3576-eink: config rk806 poweron time as 500ms
Change-Id: I27109ed48b0410870c15c43bf286ebb9afe4adab
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2024-07-29 19:18:36 +08:00
Sugar Zhang
5e88e70a9f ASoC: rockchip: multi-dais: Use CLK Provider and Consumer
Since CLK Master/Slave had been changed to Provider/Consumer
on kernel-6.1 or later.

So, do the same change for multi-dais driver to work well.

Nothing changed if property omitted in DT.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I439cb076cc35d06cbe0834f2169c6b30348f5775
2024-07-29 19:18:07 +08:00
Weixin Zhou
b24dfc3b07 rtc: hym8563: add timer-irq support wake-up in seconds
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Iad6ab4c4d35d74a8b61d4957630a8c780cd977d2
2024-07-29 19:17:52 +08:00
Cai YiWei
44ba808f3c media: rockchip: isp: fix awb resume error
Change-Id: Ied12526e9ca8ac7b92785ff36fe6c843d0ed08b2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-07-29 11:05:53 +08:00
Hongming Zou
36a85eba3b ARM: dts: rockchip: rk3506g-evb1-v10: vcc3v3-lcd0-n remove regulator-always-on
Change-Id: I945a6ab5fef3ff68162870fe215fb4e884962dbe
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2024-07-29 10:27:42 +08:00
Cai YiWei
b0a2b60cf2 media: rockchip: isp: enable bay3d FST_FRAME if change bypass
Change-Id: I535687a54793a04323220979d0f76f0e09f3682a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-07-29 10:11:01 +08:00
Damon Ding
a6ee9f3647 drm/rockchip: vop: add support for mcu soft_te mode
Change-Id: I0393645cf1a950b1c9a6b928bf698f9678a95898
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-07-26 19:02:27 +08:00
Damon Ding
a92ffdc4ba drm/rockchip: rgb: add support for mcu soft_te mode
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ic67a3f3770ff8929a070e6d521c2d77393d3b187
2024-07-26 19:02:27 +08:00
Liang Chen
9c480764d8 clk: rockchip: clk-pvtpll: remove useless mutex lock
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Ic8c1a7d9c297eb204ad42ec50de1cac002275991
2024-07-26 17:22:03 +08:00
Guochun Huang
504ec02125 arm64: dts: rockchip: rk3568-evb-rk628: add support uboot logo
1.hdmi2dsi
2.hdmi2gvi
3.hdmi2lvds
4.rgb2dsi
5.rgb2gvi
6.rgb2lvds

Type: Function
Redmine ID: #496880 #491750
Associated modifications: NULL
Test: NULL

Change-Id: I815a3bb994390f2629cec1f98a9fdfe2a45613f9
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-07-26 15:23:37 +08:00
Guochun Huang
b55833ab45 misc: rk628: add support uboot logo
Type: Function
Redmine ID: #496880 #491750
Associated modifications: NULL
Test: NULL

Change-Id: I311e2c9682f835b377ea9082e1d3a88688167172
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-07-26 15:23:16 +08:00
Wesley Yao
899800bb3e ARM: rk3506_defconfig: Enable flexbus-related configs
before:
   text	   data	    bss	    dec	    hex	filename
4831493	2082556	 107336	7021385	 6b2349	vmlinux

after:
   text	   data	    bss	    dec	    hex	filename
4875062	2110588	 106440	7092090	 6c377a	vmlinux

Change-Id: Ie82c5701049337a79dd80bfbea68de87df9fab7e
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2024-07-26 14:53:26 +08:00
Wesley Yao
57c37c4a8e iio: dac: Kconfig: Select flexbus and buffer for flexbus_dac
Change-Id: I74a6177b7352cbd56e3cbd47ebc751696133ee0f
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2024-07-26 14:51:04 +08:00
Wesley Yao
21065b3a6b iio: adc: Kconfig: Select flexbus and buffer for flexbus_adc
Change-Id: I07614b15f3df71ae573654127048cdc2ca58ae95
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2024-07-26 14:51:04 +08:00
Wesley Yao
b2130b349e spi: rockchip-flexbus-fspi: Rename FLEXBUS_TX_WIDTH
FLEXBUS_TX_WIDTH conflicts with the register name. Rename
FLEXBUS_TX_WIDTH to FLEXBUS_TX_WIDTH_4

Change-Id: I1a8cd1c9f7db22cb5f3c35e1479bae37c0bf5284
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2024-07-26 14:51:04 +08:00
Jason Zhu
e661bff241 ARM: rk3506_defconfig: enable CONFIG_SND_SOC_ROCKCHIP_ASRC
Change-Id: Id3913bcafc69651ba65dbab0967260ad15df5c10
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2024-07-26 10:59:27 +08:00
Sandy Huang
3248d77d05 drm/rockchip: vop2: update win dly for rk3562
Update win dly number according new TRM. Without this commit, the left 4
columns will display black when act width is 2048.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie8b6d999c530c8836cb847e8809c5cdc6a3fdc7b
2024-07-26 10:57:38 +08:00
Jason Zhu
03f44b662b ASoC: codecs: rk3506: set ADC_IP enable or disable when power on or off
The ADC_IP bit controls all powers of the codec.

Change-Id: Iaaa4f277093023e430b98e9f1d343d3f0e5086ba
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2024-07-26 10:53:00 +08:00
David Wu
30969e8412 net: ethernet: stmmac: Make MAC PHY into idle state when suspend
Pulling down the phy reset pin can directly reduce the
power consumption of the phy.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I04355593fc2867fcf5f48543b6c4d0fb8b8ab159
2024-07-26 10:50:06 +08:00
Simon Xue
73d746eecf mm/slab: allows kmalloc min size independent on arch dma min alignment when CONFIG_ROCKCHIP_KMALLOC_NO_USE_ARCH_DMA_MINALIGN=y
CONFIG_ROCKCHIP_MINI_KERNEL enabled in some project which perform DMA
into kmalloc area that may cause data corrupt. Use a independent config
CONFIG_ROCKCHIP_KMALLOC_NO_USE_ARCH_DMA_MINALIGN instead of CONFIG_ROCKCHIP_MINI_KERNEL

Fixes: c97fea6ed1 ("slab: allows kmalloc min size independent on arch dma min alignment when CONFIG_ROCKCHIP_MINI_KERNEL=y")
Change-Id: Idd36490d695a0f2910d2b453228688405efdd43a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2024-07-24 17:33:30 +08:00
Simon Xue
c3c6ec4a49 soc: rockchip: Kconfig: add ROCKCHIP_KMALLOC_NO_USE_ARCH_DMA_MINALIGN
Change-Id: I1dc9d920d35e341173e43906ef9a6ff3a56e5d0a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2024-07-24 17:23:41 +08:00
Jianwei Zheng
78999d6007 usb: dwc2: fix USB bus repeatedly suspending and resuming
When system wakeup, It will call _dwc2_hcd_resume function and the
port_suspend_change flag will be set to 1 in _dwc2_hcd_resume function.
But in current code, the autosuspend delay for hub is set to zero and
this will cause a strange phenomenon where the USB bus will repeatedly
suspending and resuming.

Considering that setting the port_suspend_change to 1 is only applicable
for partial power mode, there is no need to set port_suspend_change to
1 when DWC2 IP not support partial power mode.

Fixes: c74c26f6e3 ("usb: dwc2: Fix partial power down exiting by
system resume")
Change-Id: Ia57bfb8502cb55a5d9375a5ad609ac4104ff8acb
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
2024-07-24 17:18:35 +08:00
Jianwei Zheng
d036e8956b usb: dwc2: fix the port cannot suspend when a HUB is connected
This patch fix the port cannot suspend when a HUB is connected. The
DWC2 IP on Rockchip SOCs does not support clock gating and Current
code places the port suspend within the dwc2_host_enter_clock_gating
function, which results in the port being unable to suspend.

Change-Id: I40fe73d116a30fec6c01a8c3c988653a48175f7f
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
2024-07-24 17:18:35 +08:00
Wang Panzhenzhuan
b0a05407cd arm64: dts: rockchip: rk3562-evb2: add ov5695 config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I76c1861fd7c41cdff6709f0536be6ee1955c0a14
2024-07-24 17:07:42 +08:00
Ye Zhang
64422a050b arm64: dts: rockchip: rk3576: Add trim configure for tsadc
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I34fbd118ac4b428548f8a5a71c656634a6a703dc
2024-07-24 14:22:20 +08:00
Sugar Zhang
d8b7089c6a ARM: dts: rockchip: rk3506: Add support for dmamux parsed
Ref: commit 0cabdbb81c ("dmaengine: pl330: Add support for dmamux parsed from DT")

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: If5300201be7a2592946a09b23e4be4d459170748
2024-07-24 09:54:54 +08:00
Sugar Zhang
0cabdbb81c dmaengine: pl330: Add support for dmamux parsed from DT
dmamux pair0: args[1]: reg0 args[2]: val0
dmamux pair1: args[3]: reg1 args[4]: val1

e.g. rk3506

sai0 {
    dmas = <&dmac0 9 0xff2880a4 0x01000100 0xff2880ac 0x000c0000>,
           <&dmac0 8 0xff2880a4 0x00800080 0xff2880ac 0x00030002>;
}

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I81a2d5e8de37954930b6d0e0aab061273ae76cd2
2024-07-24 09:47:25 +08:00
Jianwei Zheng
1087df59e2 extcon: usb-gpio: add some extcon cables
Current Code USB2 PHY use extcon notifier to send USB charger
types to power driver. If we use gpio to detect vbus or id state,
the extcon device is allocated and registered by extcon-usb-gpio.c
driver and USB2 PHY obtains this extcon device through DTS. If
these cables are missing, it will cause USB2 PHY driver to be
unable to set the status of these cables, leading to functional
abnormalities.

Change-Id: Iec27dfde4ec8bf12294bd6c57c3db5dada2f35cd
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
2024-07-23 20:52:07 +08:00
Shawn Lin
892834cb62 scsi: ufs: rockchip: Add shutdown support
Disable vcc if it exists, so the rom code could relink the device
from the init state.

Change-Id: I4493df466f3ea60b8c7a7e3befd110311fce6f6c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-07-23 18:41:08 +08:00
Caesar Wang
f148c41378 arm64: dts: rockchip: rk3566/rk3568 boards: Fix pinctrl configuration for wireless-bluetooth
The Linux OS uses the device tree to detect the wifibt module,
particularly the Bluetooth module's UART, identified via
`/sys/firmware/devicetree/base/pinctrl/wireless-bluetooth`.

Some RK3566/RK3568 board configurations redundantly register the pinctrl
for wireless-bluetooth, causing script failures in UART identification.

This commit removes the redundant node to resolve conflicts and ensure
correct UART identification for Bluetooth communication.

Change-Id: Id55c48bda38275c04a365b0ede1f740baf767da2
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2024-07-23 18:37:05 +08:00
Zhibin Huang
df3e952b00 misc: rk628: fix first edid get failure
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I799efc76a444f33c4206f2d6e3610a8768088c81
(cherry picked from commit 11e329fa9405c61c01e6f7630b1482f4f82b6b5f)
2024-07-23 17:24:01 +08:00
Sugar Zhang
42568b67f3 ASoC: rockchip: i2s-tdm: Fix the clk glitch on Calibrate case
BACKGROUND
A short clk giltch (~200us) found on the mclk calibrate case in
kernel 5.10.

  mclk-12.288M - mclk-49.152M (~200us) - mclk-12.288M

The root cause is:

  clk_set_rate(mclk_parent, 49.152M)
  clk_set_rate(mclk, 12.288M)

Prefer to get the mclk rate div from mclk_parent rate, Unfortunately,
the latter will change the mclk_parent rate again in kernel 5.10.

So, do not change mclk parent's rate when it is multiple mclk already,
let clk framework handle it.

e.g.

mclk: clk_i2s1_8ch_tx mclk_parent: clk_i2s_8ch_tx_src

clk_i2s1_8ch_tx_src         0        0        0    12288000
   clk_i2s1_8ch_tx_mux      0        0        0    12288000
      clk_i2s1_8ch_rx       0        0        0    12288000

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie9e869a48b65e287e60545626e92c9090ab02229
2024-07-23 15:20:51 +08:00
Sugar Zhang
c06d283fd2 ASoC: rockchip: multi-dais: Register PCM before DAI component
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.

  devm_snd_soc_register_component
      snd_soc_try_rebind_card
          snd_soc_bind_card
              snd_soc_add_pcm_runtime
  devm_snd_dmaengine_pcm_register

So, we should register PCM before DAI component.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I275e919495280568b6b732097532f466a0cc3a2a
2024-07-23 15:20:51 +08:00
Sugar Zhang
1f1211c186 ASoC: rockchip: spdifrx: Register PCM before DAI component
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.

  devm_snd_soc_register_component
      snd_soc_try_rebind_card
          snd_soc_bind_card
              snd_soc_add_pcm_runtime
  devm_snd_dmaengine_pcm_register

So, we should register PCM before DAI component.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8de05cf709187afd406775998f58ed5ebdb39d38
2024-07-23 15:20:51 +08:00