Commit Graph

839965 Commits

Author SHA1 Message Date
Liang Chen
fa98363309 ARM: dts: rockchip: delete gpu 100MHz for rk3288
100MHz will hurt performance when app startup.

Change-Id: Ia55a5f53b101559b9d6b94ca98609f7072df6d86
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-04-12 11:38:50 +08:00
Sugar Zhang
600355f776 arm: dts: rockchip: add reset properties for i2s
Change-Id: I4c04448a7f1630aec0f0a6e32edbcf9e6669efcb
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-04-09 21:36:59 +08:00
William Wu
fda619f528 ARM: dts: rockchip: reconfig dwc2 device fifo size
According to the dwc2 programmer's guide v3.10a, in '2.1.3.2 Dedicated
FIFO Mode with No Thresholding', it suggested that:

Device RxFIFO =
- Scatter/Gather DMA mode:
(4 * number of control endpoints + 6) + ((largest USB packet used / 4) +
1 for status information) + (2 * number of OUT endpoints) + 1 for Global NAK

on rockchip platforms:
(4 * 1 + 6) + ((1024 / 4) + 1) + (2 * 6) + 1 = 280

- Slave or Buffer DMA mode:
(5 * number of control endpoints + 8) + ((largest USB packet used / 4) +
1 for status information) + (2 * number of OUT endpoints) + 1 for Global NAK

on rockchip platforms:
(5 * 1 + 8) + ((1024 / 4) + 1) + (2 * 6) + 1 = 283

Device IN Endpoint TxFIFO =
The TxFIFO must equal at least one MaxPacketSize (MPS).

In addition to RxFIFO and TxFIFOs, refer to dwc2 databook v3.10a,
'Figure 2-13 Device Mode FIFO Address Mapping and AHB FIFO Access Mapping
(Dedicated FIFO)', it required that when the device is operating in non
Scatter Gather Internal DMA mode, the last locations of the SPRAM are used
to store the DMAADDR values for each Endpoint (1 location per endpoint).

When the device is operating in Scatter Gather mode, then the last locations
of the SPRAM store the Base Descriptor address, Current Descriptor address,
Current Buffer address, and status quadlet information for each endpoint
direction (4 locations per Endpoint). If an Endpoint is bidirectional , then
4 locations will be used for IN, and another 4 for OUT).

Considering that the total FIFO size of dwc2 otg is 0x3cc (972),
and we must reserve (4 * 13) = 52 locations for all Endpoints.
So reconfig dwc2 device fifo size as follows:

Device RxFIFO = 280
Device IN Endpoint TxFIFO
- FIFO #0 = (64 / 4) = 16 (Assuming this is used for EP0)
- FIFO #1 = (1024/4) = 256 (Assuming this is used for Isochronous)
- FIFO #2 = (512/4) = 128
- FIFO #3 = (512/4) = 128
- FIFO #4 = (256/4) = 64
- FIFO #5 = (128/4) = 32
- FIFO #6 = (64/4) = 16

After reconfig the dwc2 device fifo size, test mtp write on rockchip
platform (PC -> rockchip platform) on rk312x/rk3326/px30/rk3288 evb,
when mask the 'vfs_write' in f_mtp.c, the writing data rate can be
increased from 16MBps ~ 20MBps to 30MBps ~ 36MBps on different kinds
of rockchip evbs.

Change-Id: Icdf8a5dd95f96d174233e4ffc765c9a982b9f0b6
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-04-09 21:36:40 +08:00
Finley Xiao
262535cf9a arm: dts: rockchip: Change cpu opp-microvolt form one entry to three
Single entry is for target voltage and three entries are for
<target min max> voltages. Change cpu opp-microvolt form one entry to
three entries and set maximum acceptable voltage to a high value so that
regulator device can supply multiple consumers at the same time.

Fixes: 16e9353f89 ("arm: dts: rockchip: Change cpu opp-microvolt form one entry to three")

Change-Id: I96e5f87f2945e63e8f4a073fa0292f001830b13c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-09 21:36:33 +08:00
Finley Xiao
f60efb2e82 arm: dts: rk3066a-rayeager: Enable cpu and gpu opp table
Change-Id: I7c4a6ce9d9ba81e37a05462ccfc34dd4697492d7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-09 21:35:17 +08:00
Finley Xiao
79747ecfb6 clk: rockchip: rk3066a: Rename i2s hclk id
Change-Id: I0a5ccf1846950353ea6fc6980c1c4a4fb3457fd1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-09 21:35:09 +08:00
Finley Xiao
b1e59714a2 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>
2019-04-09 21:34:51 +08:00
Zhen Chen
c7b8b6accf ARM: dts: rockchip: rk3066a: correct and add settings of gpu node
Change-Id: I969ced5b48b470868558f19088b8413e1fb99226
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-04-09 21:34:43 +08:00
David Wu
96ec48da98 ARM: dts: rk3066a-rayeager: Make hdmi regulator always on
Change-Id: I9bca56928f6f9c12579107f430f8cd0eedd69665
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-04-09 21:34:36 +08:00
David Wu
5b83a341fd ARM: dts: rk3066a-rayeager: Enable vop0 at dts level
Change-Id: Ie3fe65d6d4d59b24a5fa22772e39496914bb0f13
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-04-09 21:34:29 +08:00
Sugar Zhang
5d060ef316 ARM: dts: rk3066-rayeager: add support for hdmi audio
Change-Id: Idc15040a95a97584117f2f229063b7b404ab2268
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-04-09 21:34:21 +08:00
Zheng Yang
8498c39168 ARM: dts: rockchip: rk3066a: add HDMI nodes
Change-Id: Ic8d7731c445ff1ea8fd607c1f9984ce4672833b3
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-04-09 21:34:13 +08:00
Joseph Chen
d4312deed5 ARM: dts: rk3066a-rayeager: add vdd_logic regulator
The vdd_logic is a pwm regulator. Since '#pwm-cells = <2>', there
is not polarity invert support by pwm driver, so we have to add
property 'pwm-dutycycle-range = <100 0>' to support polarity invert
by pwm regulator driver itself.

Change-Id: Ie5d2cda67ce19dc792f96263836bab658d385681
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-04-09 21:34:06 +08:00
Finley Xiao
e01e0aead2 clk: rockchip: rk3066a: Add some clock IDs
Change-Id: I57f948a425936e0f69b63e7ded86c8d2cdf84148
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-09 21:33:41 +08:00
Chris Zhong
a566b29fe6 ARM: dts: rk3066a-rayeager: add supports- for mmc
Add supports-emmc for emmc; supports-sd for sdcard; supports-sdio for
wifi.

Change-Id: I13d3918f41f63ed9b27e9969e6f89d1006c9d45c
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2019-04-09 21:26:06 +08:00
Jacob Chen
8fa7f79317 ARM: dts: rockchip: add ums boot mode for Linux
Change-Id: I7f5edb9edbe5b9656fafdfb84f523aa45aa93d93
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2019-04-09 21:25:30 +08:00
Chris Zhong
c9c979e20a ARM: dts: rk3066a-rayeager: bring up wifi
Change-Id: Iffcf4970fdd5bf1976860a9be695452a748bdc2a
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2019-04-09 21:24:46 +08:00
Chris Zhong
541782c78b ARM: dts: rockchip: add nandc node for rk3066a/rk3188
Change-Id: I496f76e9aef91f35c2b7fde285b67add7d5f90ae
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2019-04-09 21:23:30 +08:00
Mark Yao
33ed95fc92 ARM: dts: rk3066a-rayeager: enable gpu function
Change-Id: Ib4fe4770129eacfd7d6f1d6434f065aeb3123d5c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2019-04-09 21:19:07 +08:00
Mark Yao
240a97ba6f ARM: dts: rockchip: rk3066a: add mali gpu node
Change-Id: I193269edc32fc40d825f69820f77a96c5d06084c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2019-04-09 21:19:01 +08:00
Mark Yao
ee4bace69f ARM: dts: rockchip: rk3066a: add vop display nodes
Change-Id: I060e02d8dc053c93ff964525cf1643eed3ed0059
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2019-04-09 21:18:56 +08:00
Finley Xiao
12d7a1addf ARM: dts: rockchip: rk3066a: Add assigned-clocks for cru
Change-Id: I82713524f754b05b8f53921bc4730a10163963be
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-09 21:18:49 +08:00
Mark Yao
2464d45ed3 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>
2019-04-09 21:18:39 +08:00
David Wu
7af9a5b91d ARM: dts: Add bootargs for rk3036-kylin
Add console and UUID in the bootargs.

Change-Id: I69827656752725ac9a0d39d36833f23bf36cab28
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-04-09 21:14:30 +08:00
Randy Li
8537a2400c ARM: dts: rockchip: add serial Flash controller to rk3036
Serial Flash controller is used to control the data
transfer between this SoC and a serial nor or nand
flash device.

Change-Id: Ibe7c8c4a11410287c34c1a7dc5b232b330ee6751
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2019-04-09 21:14:20 +08:00
Elaine Zhang
42a89e1767 ARM: dts: rk3036: mark xin32k clk as fixed clk
Change-Id: I5bf0a64502a7dd7b36545437b1675bb896c97bce
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-09 21:14:12 +08:00
Finley Xiao
30d8dfd2f6 ARM: dts: rockchip: rk3036: Add vpu qos node
The vpu qos registers need to save and restore when reset.

Change-Id: I649cf4a360842ad1abb06c35a6fd8d3868fbf706
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-09 21:13:01 +08:00
Caesar Wang
76f7a63950 ARM: dts: rockchip: update rk808's regulators for rk3036 kylin
According to the actual schematic designed by kylin board, update and
rename the regulators for rk808 node information.

Especially gpu regulator voltage, the schematic didn't have this
regulator, this regulaor should be applied by cpu regulator since the
cpu/gpu/ddr are belong to the same logic power supply.

Change-Id: I39e4cf18969391da396cc775f8660701e42977bd
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-04-09 21:12:54 +08:00
Caesar Wang
ef1778cd88 ARM: dts: rockchip: add the needed power domain node on rk3036
As the vpu needed handle the power domain for reset function, this patch
supported the vpu domain for rk3036 Socs.

Change-Id: I67ad6085e2eb9a213c364d58713f02cc78ce6849
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-04-09 21:12:08 +08:00
Joseph Chen
c746ae314c ARM: dts: rk3036-kylin: set vdd_arm regulator-on-in-suspend
rk3036 doesn't support vdd_arm power supply off when system suspend.

Change-Id: I46bd8a7c2b672be30d8106b867275e8ba7d77e54
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-04-09 21:11:50 +08:00
Joseph Chen
1d9798dbde ARM: dts: rk3036: enable rk3036 PSCI
Change-Id: I4c5472587583fb176d88e802d2e7fe20daf9ea48
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-04-09 21:11:31 +08:00
Caesar Wang
8cffc85e21 ARM: dts: rockchip: support the sdmmc for kylin
Change-Id: If761bb4a1adf857f7315edebb17c31eb6ac08652
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-04-09 21:11:20 +08:00
Caesar Wang
d956dfaf77 ARM: dts: rockchip: Assigned the i2s sclk from i2s_frac for rk3036
As the HDMI-audio/codec will cause the hang on bootup, the root
cause that kylin get the invalid master clock from i2s.

$cat/sys/kernel/debug/clk/clk_summary
..
i2s_pre     0 0 0 0 0
    sclk_i2s       0 0 0 0 0
        i2s_clkout     0 0 0 0 0

Since i2s clock selects io input clock by default, but the hardware
didn't supply the clock.

This patch will fix the sclk_i2s's parent on i2s_frac.

As following:
$cat/sys/kernel/debug/clk/clk_summary
..
    i2s_src     1 1 594000000 0 0
        i2s_frac    1 1 22579200 0 0
            i2s_pre     2 2 22579200 0 0
                sclk_i2s 1 1 22579200 0 0

As far, the audio can work with aplay/record on kylin.dts

Says:
(aplay /dev/urandom)

/* recording */
arecord -f cd -d 10 /tmp/audio.wav
/* playback */
aplay /tmp/audio.wav

Change-Id: I73534a0d763eb02fb55e000ce068d9d604bf20ed
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-04-09 21:10:53 +08:00
Caesar Wang
323278e305 ARM: dts: rockchip: fixed the 1GHz cpu frequency for rk3036-kylin
As the cpu frequency is less than 816MHz, the HDMI display maybe
probably cause a flower screen as below log[0]. And Kylin used the rk3036g
series SoCs that the max cpu frequency supported the 1GHz, not 1.2GHz.

In a word, keep the cpu frequency to 1GHz for kylin board.

log[0]:
[26.498843] rk_iommu 10118300.iommu: Enable stall request timed out,
status: 0x000011
[26.528809] rk_iommu 10118300.iommu: Disable paging request timed out,
status: 0x000011
[26.598849] rk_iommu 10118300.iommu: Enable stall request timed out,
status: 0x000011
[26.607579] rockchip-vop 10118000.vop: Failed to attach iommu device
[26.614916] rockchip-vop 10118000.vop: failed to attach dma mapping, -110
..

Change-Id: I8e1d4527b649d8857a9d80a121c10935a4cd1030
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-04-09 21:10:28 +08:00
Caesar Wang
4faab24f56 ARM: dts: rk3036: enable watchdog on kylin board
Change-Id: I50e2323742695671dcc99232aedd35618961a42f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-04-09 21:10:18 +08:00
Caesar Wang
973656103e ARM: dts: rk3036: support the watchdog
Change-Id: I2630993b1b9c5f6d3c4e3405303bfb3ebac07e8b
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-04-09 21:10:11 +08:00
Caesar Wang
361eb8d812 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>
2019-04-09 21:10:03 +08:00
Caesar Wang
7734b72304 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>
2019-04-09 21:09:26 +08:00
Caesar Wang
9eaf7d93da 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>
2019-04-09 21:09:16 +08:00
Caesar Wang
de701ed14f 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>
2019-04-09 21:09:07 +08:00
Randy Li
56fdf0fb4e 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>
2019-04-09 21:08:42 +08:00
Randy Li
7ac59c6c7c 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>
2019-04-09 21:08:32 +08:00
Randy Li
1b56bc905c 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>
2019-04-09 21:08:19 +08:00
Caesar Wang
e30430745a 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>
2019-04-09 21:08:13 +08:00
Caesar Wang
e8e4e05659 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>
2019-04-09 21:08:06 +08:00
Caesar Wang
d44612e39d 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>
2019-04-09 21:07:58 +08:00
chenzhen
aaead23e7b 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 frequence GPU runs at. this would be optimized when we implement
GPU DVFS with devfreq.

Change-Id: Ia25f0a67577fbfe248a25e4d913dc5f14fa40f0d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2019-04-09 21:06:16 +08:00
Jacob Chen
79f75ebf42 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>
2019-04-09 21:06:06 +08:00
Jeffy Chen
25ab130f41 ARM: dts: rk3036: limit vpu aclk freq to 297M
Change-Id: I5fe0d49b7bde947188fcf718ffdb850e0c20c066
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2019-04-09 21:05:43 +08:00
Jeffy Chen
1407aa9aac ARM: dts: rockchip: enable rockchip-vpu node for rk3036 kylin
Change-Id: I82fe6cd685bbf8e7eb360b40d308890735dcf608
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2019-04-09 21:05:35 +08:00