Commit Graph

1059262 Commits

Author SHA1 Message Date
Caesar Wang
766bbe8aac ARM: dts: rk3036: enable watchdog on kylin board
Change-Id: I50e2323742695671dcc99232aedd35618961a42f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:26:52 +08:00
Caesar Wang
7755d7762e ARM: dts: rk3036: support the watchdog
Change-Id: I2630993b1b9c5f6d3c4e3405303bfb3ebac07e8b
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:26:52 +08:00
Caesar Wang
2a6e6d9a10 ARM: dts: rockchip: fixes the emmc error on rk3036 SoCs
As the emmc is supplyed power by vcc_io, that's 3.3v voltage.
the default 1.8v volatge will cause the emmc error. as the following:

[   17.096082 ] mmcblk1: error -115 sending stop command, original cmd
response 0x900, card status 0xb00
[   17.127022 ] mmcblk1: error -110 transferring data, sector 664720, nr
72, cmd response 0x900, card status 0xb00

Remove the mmc-ddr-1_8v to keep the default the 3.3v voltage.

Change-Id: I9e2539d63fd93e72d9febbb311fbd686c5a11d09
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:26:52 +08:00
Caesar Wang
7449c71c4b ARM: dts: rockchip: add the gpu opp table for rk3036
This patch supported the gpu opp table for rk3036.
The gpu clock's parent is DPLL, the default frequency is 400MHz, we need
assign 400MHz for gpu to be better working.

There is a quickly way for testing the gpu scaling frequency.
As following:
"
unset FREQS
read -a FREQS < /sys/class/devfreq/10091000.gpu/available_frequencies

RANDOM=$$$(date +%s)
while true; do
  echo userspace > /sys/class/devfreq/10091000.gpu/governor
  FREQ=${FREQS[$RANDOM % ${#FREQS[@]} ]}
  echo GPU:Now ${FREQ}
  echo ${FREQ} > /sys/class/devfreq/10091000.gpu/userspace/set_freq
  sleep 1
done
"

Change-Id: Ia8eb3074e457014c497338a0a129551c51450104
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:26:52 +08:00
Caesar Wang
063681e77e ARM: dts: rk3036: fixes the cpu voltage and opp table for kylin
This patch supported the cpu voltage by changed with different
frequency, otherwise we will hit the following error on bootup.

..
[    5.031516] cpu cpu0: Failed to get cpu_reg
[    5.047725] cpu cpu0: clk or regulater is unavailable
..

Also, remove the 408M and 600M for rk3036 board, as the pclk_hdmi's parent
on apll, the low frequency will make the pclk be bad for hdmi display.

Change-Id: Ia4aac76a08cad3a59c33cd81065f943201a23a35
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:26:52 +08:00
Caesar Wang
ab8125e363 ARM: dts: rockchip: fixes the bt on rk3036 kylin board
This patch fixes the BT power reported the failure message.
As following:
root@linaro-alip:~# echo 1 > /sys/class/rfkill/rfkill0/state
[  892.558269] rockchip-pinctrl pinctrl: pin gpio0-19 already requested
by 20060000.serial; cannot claim for wireless-bluetooth
[  892.571052] rockchip-pinctrl pinctrl: pin-19 (wireless-bluetooth) status -22
...

And for now, the BT can work with this patch.
root@linaro-alip:~# echo 1 > /sys/class/rfkill/rfkill0/state
[   69.328768] [BT_RFKILL]: ENABLE UART_RTS
[   69.438540] [BT_RFKILL]: DISABLE UART_RTS
[   69.443117] [BT_RFKILL]: bt turn on power
...

root@linaro-alip:~# hcitool dev
Devices:
        hci0    94:A1:A2:E9:2D:18

And
root@linaro-alip:~# bluetoothctl
[NEW] Controller 94:A1:A2:E9:2D:18 linaro-alip [default]
[bluetooth]# scan on
Discovery started
[CHG] Controller 94:A1:A2:E9:2D:18 Discovering: yes
..

Change-Id: I2148f4203300ab4265fd3ba718f0d3ec0c57e7ca
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:26:52 +08:00
Randy Li
187431e29d ARM: dts: rockchip: bind the internal ethernet at rk3036
It allows me to set the mac address in the bootloader.

Change-Id: Iad988205c6953e843e62aec67daad52128086324
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2021-08-04 21:26:51 +08:00
Randy Li
9486438b8c ARM: dts: rockchip: enable the video decoder at rk3036 kylin
The kylin is ready for the media time.

Change-Id: I94e46912c82b4ad8b8b184b34dd2820078e0c697
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2021-08-04 21:26:51 +08:00
Randy Li
923228a434 ARM: dts: rockchip: add hevc & vpu service for rk3036
There is a combo of a HEVC decoder and a VPU1 decoder at rk3036.

Change-Id: Ia7174cc9e2f2d640a74271077bd62cc68f3482b4
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2021-08-04 21:26:51 +08:00
Randy Li
3eddd5dd86 clk: rockchip: rk3036: export the sfc clocks
The serial Flash controller on the rk3036 would request
two clock nodes.

Change-Id: Iaa50c4a25602a68241b0b9b2f186e4c7e55bc3da
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-04 21:26:51 +08:00
Caesar Wang
54a9bb2c72 clk: rockchip: export SCLK_I2S_PRE and SCLK_I2S_FRAC of i2s on rk3036
Change-Id: I627c8c2582be2b27414e7b82e9d56dd560f68e64
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-04 21:26:51 +08:00
Randy Li
e35fd036b3 clk: rockchip: rk3036: export the hevc core clock
The clock hevc core will be used to drive the hevc decoder.

Change-Id: Ic1298ce1edd07f86e5c243e3a2c9876481f4cba9
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-08-04 21:26:51 +08:00
Caesar Wang
39389fb7aa ARM: dts: rk3036: add the opp table for rk3036
In order to save power and improve the performance, we can add the opp
table for rk3036 SoCs.

Also, make sure the codec works happily, we should ensure the arm/logic
voltage is greater than 1v.

Change-Id: I9aa17be547eb21e5a83c09780356436c3075bae6
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:26:51 +08:00
Caesar Wang
a7f311f133 ARM: dts: rk3036: support wifi/bt for kylin
In order to support the ap6212 module with rockchip wlan driver,
the kylin dts has to change the below for working.

1) We should add the 'supports-sdio' property for mmc tuning,
that's the rockchip private property, not on the upstream.

2) We should add the wifi power control pin and wifi/bt data for dts,
Maybe the history issue, they like the old driver for power
contronlling, the upstream didn't need these for working. we should
remove it in the future.

Change-Id: Id49de7ad77b8658a551a07659a8a2ddc9691874c
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:26:51 +08:00
Caesar Wang
9ea8a4b9ef ARM: dts: rk3036: add the aclk for hdmi
As the inno-hdmi driver introduced this clock, add it for dts supporting.

Change-Id: I43328a25f0ac72d5a5b7631cc8ff6ce98b78669a
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:26:51 +08:00
Zhen Chen
7573287026 ARM: dts: rockchip: fix vdd_cpu to 1.25V on rk3036 kylin board
In rk3036, the voltages of CPU and GPU are controlled by the same
regulator 'vdd_cpu'.
Here, we fix it to 1.25v to ensure that GPU could work well in
development period.
The actual voltage GPU needs might be much lower, and relative to
the frequency GPU runs at. this would be optimized when we implement
GPU DVFS with devfreq.

Change-Id: Ia25f0a67577fbfe248a25e4d913dc5f14fa40f0d
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-08-04 21:26:29 +08:00
Jacob Chen
ab2e46bf9e ARM: dts: rockchip: merge the hdmi-audio card with rt5616-codec card
Change-Id: I2888cbb7df9d4cd9d270f7fd81f34b27b40997cc
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2021-08-04 21:10:32 +08:00
Jeffy Chen
d21ed31d1a ARM: dts: rk3036: limit vpu aclk freq to 297M
Change-Id: I5fe0d49b7bde947188fcf718ffdb850e0c20c066
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2021-08-04 21:10:32 +08:00
Jeffy Chen
49c14e6700 ARM: dts: rockchip: enable rockchip-vpu node for rk3036 kylin
Change-Id: I82fe6cd685bbf8e7eb360b40d308890735dcf608
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2021-08-04 21:10:32 +08:00
Jeffy Chen
0cb97665cf ARM: dts: rockchip: add rockchip-vpu node for rk3036
Change-Id: If4ce05777e4e4fd2460c76a5fff75c8b1901529e
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2021-08-04 21:10:32 +08:00
Yakir Yang
41bec5ca99 FROMLIST: ARM: dts: rockchip: enable hdmi audio on rk3036-kylin
Enable the basic hdmi audio function on rk3036 kylin board.

Change-Id: Id9d0971203a75bba9a885d590c40b2ddce355b9f
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9178535/)
2021-08-04 21:10:32 +08:00
Caesar Wang
b06afc1fe3 ARM: dts: rk3036: add the supports-emmc for emmc property
I don't need send for upstream since the rockchip inside kernel
need it for tuning. At least the upstream can work it with dwmmc.

Change-Id: Ia9f0836624e8ef1df225dbc6ad1792ec4fb2abbd
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-04 21:10:32 +08:00
Yakir Yang
ec89532499 FROMLIST: ARM: dts: rockchip: add simple sound card for RK3036 SoCs
Using I2S as the audio input source, and force the mclk_fs to 256.

Change-Id: Ib85ba7be4de430d5536aaaebe74bb9fde9174f16
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9178533/)
2021-08-04 21:10:31 +08:00
Finley Xiao
0ccdc18121 arm: dts: rk3066a-rayeager: Enable cpu and gpu opp table
Change-Id: I7c4a6ce9d9ba81e37a05462ccfc34dd4697492d7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-04 20:40:34 +08:00
Finley Xiao
f467c0ecb0 clk: rockchip: rk3066a: Rename i2s hclk id
Change-Id: I0a5ccf1846950353ea6fc6980c1c4a4fb3457fd1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-04 20:40:34 +08:00
Finley Xiao
2454224752 arm: dts: rk3066a: Add operating-points-v2 property for cpu
This patch adds a new opp table for cpu.

Change-Id: I236fd158efc404c3d3611e3e7d1860cdf534aa57
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-04 20:40:34 +08:00
Zhen Chen
85ade7c9f9 ARM: dts: rockchip: rk3066a: correct and add settings of gpu node
Change-Id: I969ced5b48b470868558f19088b8413e1fb99226
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-08-04 20:40:34 +08:00
David Wu
8653b5e81c ARM: dts: rk3066a-rayeager: Make hdmi regulator always on
Change-Id: I9bca56928f6f9c12579107f430f8cd0eedd69665
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-04 20:40:34 +08:00
David Wu
82f9c0ec03 ARM: dts: rk3066a-rayeager: Enable vop0 at dts level
Change-Id: Ie3fe65d6d4d59b24a5fa22772e39496914bb0f13
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-04 20:40:33 +08:00
Sugar Zhang
4dbf68fcf2 ARM: dts: rk3066-rayeager: add support for hdmi audio
Change-Id: Idc15040a95a97584117f2f229063b7b404ab2268
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-04 20:40:33 +08:00
Jacob Chen
ffc238e511 ARM: dts: rockchip: add ums boot mode for Linux
Change-Id: I7f5edb9edbe5b9656fafdfb84f523aa45aa93d93
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2021-08-04 20:40:33 +08:00
Chris Zhong
14822c3036 ARM: dts: rk3066a-rayeager: bring up wifi
Change-Id: Iffcf4970fdd5bf1976860a9be695452a748bdc2a
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2021-08-04 20:40:33 +08:00
Chris Zhong
d8a0e6703b ARM: dts: rockchip: add nandc node for rk3066a/rk3188
Change-Id: I496f76e9aef91f35c2b7fde285b67add7d5f90ae
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2021-08-04 20:40:33 +08:00
Mark Yao
153b2b0498 ARM: dts: rk3066a-rayeager: enable gpu function
Change-Id: Ib4fe4770129eacfd7d6f1d6434f065aeb3123d5c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2021-08-04 20:40:33 +08:00
Mark Yao
9754d6f1a9 ARM: dts: rockchip: rk3066a: add mali gpu node
Change-Id: I193269edc32fc40d825f69820f77a96c5d06084c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2021-08-04 20:40:33 +08:00
Finley Xiao
1be6b60452 ARM: dts: rockchip: rk3066a: Add assigned-clocks for cru
Change-Id: I82713524f754b05b8f53921bc4730a10163963be
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-04 20:31:25 +08:00
Mark Yao
1a93d5a002 ARM: dts: rockchip: add emac phy-reset for rk3066a-rayeager
Change-Id: I0fb2dfa7c6772189b24fe651ca01511509ff1e87
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2021-08-04 20:31:25 +08:00
Sandy Huang
8aa6aa0bf2 drm: support ignore drm ioctl permission
Change-Id: I269766a9f3f844933bd294ce681466f5a97b1d43
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-08-04 20:01:16 +08:00
Sandy Huang
d513513390 drm/rockchip: drv: add support afbc
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I04e99d4d1cfdda75d1938dd2c1e79767ee39b559
2021-08-04 17:36:09 +08:00
Sandy Huang
b33b4d6a73 drm/rockchip: support using reserved memory region for cma
Change-Id: I829162c21748052525b0583185db67015f24141d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-08-04 17:36:09 +08:00
Sandy Huang
c0be657e1e drm/rockchp: drv: Add support for more than 4G memory
fix log:

rockchip-drm display-subsystem: swiotlb buffer is full (sz: 262144 bytes)

Change-Id: I05fd8a2674e1e73fb1d35c75c009eacc7ba8a236
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-08-04 17:36:09 +08:00
Yu Qiaowei
e35fa0a231 video/rockchip: rga2: Remove the useless code about the src1 channel
1. Remove the useless code about the coordinate after rotation in
   the src1 channel.
2. Remove 4 alignment of the src1 channel.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ib780c0143a76e4bfc50c0be95e483c503525ab9f
2021-08-04 09:55:20 +08:00
Jianqun Xu
072228d44e arm64: dts: rockchip: rk3399-android: use irq mode for fiq-debugger
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I18f48e8a0df6c861bf3ff58a99f724268faa06c6
2021-08-03 15:38:21 +08:00
Tao Huang
e3114d3911 arm64: rockchip_gki.config: Enable CONFIG_PHY_ROCKCHIP_INNO_HDMI
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4b72d9621d95d2df2f878dbb2faa2faa39b50f29
2021-08-03 15:18:24 +08:00
Algea Cao
7132bf4dcd phy/rockchip: inno-hdmi: using kernel4.19 inno-hdmi phy driver
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I87775498a06539c007051024e403812e6d92ffbe
2021-08-03 15:18:00 +08:00
David Wu
9be1cd8653 i2c: rk3x: Remove start state and irq
Let configuration start and count be performed at the
same time as much as possible, which can reduce the
interval between the start signal and the data signal,
and can also reduce a start irq.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I529300a083dcd264cc5f25a2069b88601cade83e
2021-08-03 14:55:57 +08:00
David Wu
87bf929a47 i2c: rk3x: set special bit for rv1126 i2c2
If want to use i2c2, we must write i2c2 register bit with 1 at PMUGRF.

Change-Id: Id2b5c1b06c206e43de19fe42024846918fa0b145
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-03 14:55:36 +08:00
David Wu
17e882e4bd i2c: busses: rk3x: Fix i2c grf special bit setting
When the property "rockchip,grf" of i2c DTS node exists and
the GRF offset is also valid, special bit needs to be configured.

Change-Id: If7ea4185b940ad026ed822b44cfb0c8acda83500
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-03 14:55:09 +08:00
David Wu
06aaf9fc7b i2c: rk3x: set special bit for rv1108 i2c2
If want to use i2c2, we must write i2c2 register bit with 1 at GRF.

Change-Id: Ia7e59c105647304162bde283a3fb98d9e0db75c3
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-03 14:54:49 +08:00
David Wu
fd1cd4a26c i2c: rk3x: Disable irq after i2c transfer finished
In some case,log like this:

[   12.393926] rk3x-i2c ff150000.i2c: irq in STATE_IDLE, ipd = 0x51
[   12.416592] rk3x-i2c ff150000.i2c: irq in STATE_IDLE, ipd = 0x51

The i2c clock is disabled, so the pending irq clean is not
worked. Disable the interrupt after the i2c jobs were done,
the error log would not happen.

Change-Id: If04a2e2214d675410c67db0f131ee7ef635ddcb4
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-03 14:54:03 +08:00