Commit Graph

615661 Commits

Author SHA1 Message Date
Liang Chen
0eb7707930 soc: rockchip: pvtm: fix wrong bit offset of ring sel for RK1808 SoCs
Change-Id: I476a9c77cf23b972eee6846e21eb1a3c6f263cca
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-04-09 19:52:17 +08:00
Xing Zheng
5a76592440 arm64: dts: rockchip: rk3308: keep ext micbias pull-down
Change-Id: I698fc1914139b5a19a10badd1671c0519bac6bd7
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-04-09 14:24:18 +08:00
Shixiang Zheng
a138e144d9 video/rockchip: rga2: fix a page count calc err
the driver has a bug in calc of page num when virtual
address may not 4k align

Change-Id: I65e8d3017a0365409a69e2edce12f2d302bca298
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-04-09 12:00:38 +08:00
David Wu
1df1aa9a81 arm64: dts: rockchip: Add dma support for rk3399 spi
The spi5 request number is at DMAC0, others are at DMAC1.

Change-Id: I16ce63617d841f867eb7c831a05145b808f2a1d3
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-04-09 11:59:08 +08:00
Hu Kejun
15d63d517d media: i2c: preisp-dummy: add module information and driver version
Change-Id: Ia695d90eda93bf15c986a19117e4560b688f5caf
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-04-08 18:19:12 +08:00
Hu Kejun
0aaf1ad626 media: spi: rk1608: change version number
Change-Id: Id4d80bae2494f8caf32eeac24d375aa476c1c2ff
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-04-08 18:19:05 +08:00
Hu Kejun
de8b82f0ae media: rockchip: cif: add version number
Change-Id: I75960c5d035b11fd9e8ef2a22d77f4337c826e96
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-04-08 18:18:57 +08:00
Hu Kejun
204ad3801e media: i2c: add driver version
Change-Id: I785a3f21711150e155888e9db8a99ff35b1e4bb6
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-04-08 18:18:07 +08:00
Hu Kejun
c152d99f40 media: i2c: vm149c: add driver version
Change-Id: I54559eed4bd0ccec36f8b2bd78b808c580b0f60b
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-04-08 18:16:45 +08:00
Elaine Zhang
b5b0d5415d clk : rockchip: rk1808: add CLK_OPS_PARENT_ENABLE flag for clk npu
Change-Id: I82a1cf3077c275644b9f293f53774e6bcace8e0f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-08 18:15:34 +08:00
Dong Aisheng
f6692b2cea UPSTREAM: clk: core: support clocks which requires parents enable (part 2)
On Freescale i.MX7D platform, all clocks operations, including
enable/disable, rate change and re-parent, requires its parent clock on.
Current clock core can not support it well.
This patch adding flag CLK_OPS_PARENT_ENABLE to handle this special case in
clock core that enable its parent clock firstly for each operation and
disable it later after operation complete.

The patch part 2 fixes set clock rate and set parent while its parent
is off. The most special case is for set_parent() operation which requires
all parents including both old and new one to be enabled at the same time
during the operation.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
[sboyd@codeaurora.org: Move set_rate tracepoint after prepare_enable]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit fc8726a2c0)

Change-Id: I8b71c9081a70b13f29a2c12a5b9eae5468c26ec4
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-08 18:15:34 +08:00
Dong Aisheng
53e7d7849b UPSTREAM: clk: core: support clocks which requires parents enable (part 1)
On Freescale i.MX7D platform, all clocks operations, including
enable/disable, rate change and re-parent, requires its parent
clock enable. Current clock core can not support it well.
This patch introduce a new flag CLK_OPS_PARENT_ENABLE to handle this
special case in clock core that enable its parent clock firstly for
each operation and disable it later after operation complete.

The patch part 1 fixes the possible disabling clocks while its parent
is off during kernel booting phase in clk_disable_unused_subtree().

Before the completion of kernel booting, clock tree is still not built
completely, there may be a case that the child clock is on but its
parent is off which could be caused by either HW initial reset state
or bootloader initialization.

Taking bootloader as an example, we may enable all clocks in HW by default.
And during kernel booting time, the parent clock could be disabled in its
driver probe due to calling clk_prepare_enable and clk_disable_unprepare.
Because it's child clock is only enabled in HW while its SW usecount
in clock tree is still 0, so clk_disable of parent clock will gate
the parent clock in both HW and SW usecount ultimately. Then there will
be a child clock is still on in HW but its parent is already off.

Later in clk_disable_unused(), this clock disable accessing while its
parent off will cause system hang due to the limitation of HW which
must require its parent on.

This patch simply enables the parent clock first before disabling
if flag CLK_OPS_PARENT_ENABLE is set in clk_disable_unused_subtree().
This is a simple solution and only affects booting time.

After kernel booting up the clock tree is already created, there will
be no case that child is off but its parent is off.
So no need do this checking for normal clk_disable() later.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit a4b3518d14)

Change-Id: Idad6e0b3c7e5be87150698257f3fea15061a207e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-08 18:15:34 +08:00
Dong Aisheng
5d94dd443d UPSTREAM: clk: introduce clk_core_enable_lock and clk_core_disable_lock functions
This can be useful when clock core wants to enable/disable clocks.
Then we don't have to convert the struct clk_core to struct clk to call
clk_enable/clk_disable which is a bit un-align with exist using.

And after introduce clk_core_{enable|disable}_lock, we can refine
clk_enable and clk_disable a bit.

As well as clk_core_{enable|disable}_lock, we also added
clk_core_{prepare|unprepare}_lock and clk_core_prepare_enable/
clk_core_unprepare_disable for clock core to easily use.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit a6adc30ba7)

Change-Id: Ie4e31b0d6d638f74ee2304735ddec0eecb56d70e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-08 18:15:34 +08:00
Hu Kejun
2c4f3a8ddd media: i2c: imx317: fix blank pixel in right side of picture
Change-Id: Ie36354342308b0b6c6434c5af67f98d7dc4aa459
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-04-08 18:12:06 +08:00
Shixiang Zheng
0550094bdb logo: add logo.bmp which has been converted to rle 8bit
Change-Id: I8ff0f67e81d7c3e6d82bbd179c2f5964b327cfd8
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-04-08 15:22:47 +08:00
Shixiang Zheng
cad3fd9d59 ARM: Makerfile: try using python script for auto convert bmp logo
Change-Id: I11730f39b317d1d267e60500f0228bb960e44cce
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-04-08 15:22:47 +08:00
Shixiang Zheng
54b39277fc arm64: Makerfile: try using python script for auto convert bmp logo
Change-Id: I7e3ced455f5f7d05b00558d2e7753168a68b7d7f
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-04-08 15:22:47 +08:00
Shixiang Zheng
ce0fe97e4e scripts/bmpconvert: add bmpconvert for auto convert bmpfile
Change-Id: Ic1be83af4de8b586b83c3398e42368106a4fd7e2
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-04-08 15:22:47 +08:00
Dong Aisheng
86bc58f141 UPSTREAM: clk: move clk_disable_unused after clk_core_disable_unprepare function
No function level change, just moving code place.
clk_disable_unused function will need to call clk_core_prepare_enable/
clk_core_disable_unprepare when adding CLK_OPS_PARENT_ENABLE features.
So move it after clk_core_disable_unprepare to avoid adding forward
declared functions later.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 7ec986efed)

Change-Id: I3f67a5949ef1d2f5091be318d9dacbefa0495af3
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-04 18:02:35 +08:00
Sandy Huang
4144e451b8 drm/rockchip: vop: add extern csc for rk3399 win lite
Change-Id: I7a92e64e2bcb9695b23895a6fd79ca5434852d55
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-04-04 15:40:04 +08:00
Finley Xiao
a23f7ce24f MALI: midgard_for_linux: RK: Add support to get soc infomation
Change-Id: I0fcc59bdb978ea85de3c1afb9ae6b368d1fd5e9c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-03 18:29:32 +08:00
Finley Xiao
7c4fc2453a MALI: midgard: RK: Add support to get soc infomation
Change-Id: I9e5ea0458ec08ddfc10d9d4e258713e747946959
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-03 18:28:57 +08:00
Finley Xiao
a9f0970c09 ARM: dts: rockchip: rk3288: Add performance configuration for gpu
Change-Id: Iac51c59395c3111d267b50aea69a2704442def1b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-03 18:28:03 +08:00
Finley Xiao
ff106652d9 clk: rockchip: rk3288: Add 420MHz for PLL
Change-Id: Ic722bdf5d467a64cdf093f8bdabb6dab533cd230
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-03 18:27:42 +08:00
Hans Yang
6b1d3f74d8 input/touchscreen/rockchip_gslX680: add revert_x setting
Change-Id: I2ce5da8730f70b5b62149c6e8c27ca58e20770e0
Signed-off-by: Hans Yang <yhx@rock-chips.com>
2019-04-03 17:35:52 +08:00
Hans Yang
02b3dddab9 ARM: rockchip_linux_defconfig: enable CONFIG_TOUCHSCREEN_GSLX680_D708
Change-Id: I1484182ca5bd841a557cfa3c3fea4009e5d5c945
Signed-off-by: Hans Yang <yhx@rock-chips.com>
2019-04-03 14:00:46 +08:00
Yifeng Zhao
c76939e892 drivers: rk_nand: fix ota update loader fail issue
BUG:
[   98.697677] Unable to handle kernel paging request at virtual address 0000f9ff
[   98.698359] pgd = ffffff800940e000
[   98.698799] [0000f9ff] *pgd=000000003effe003, *pud=000000003effe003, *pmd=0000000000000000
[   98.699604] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[   98.700116] Modules linked in:
[   98.700430] CPU: 1 PID: 152 Comm: rknand Tainted: G        W       4.4.167 #285
[   98.701085] Hardware name: Rockchip rk3326 S863 7 avb board (DT)
[   98.701630] task: ffffffc03ca71b00 task.stack: ffffffc007e40000
[   98.702192] PC is at write_loader_lba+0x188/0x1e8
[   98.702627] LR is at FtlWrite+0x40/0x70
[   98.702991] pc : [<ffffff8008881770>] lr : [<ffffff8008881810>] pstate: 20400145
[   98.703656] sp : ffffffc007e43c10
[   98.703969] x29: ffffffc007e43c10 x28: 0000000000003000
[   98.704480] x27: ffffffc007c8e280 x26: ffffffbdc0000000
[   98.704990] x25: 0000000000000000 x24: 0000000000000000

Change-Id: I9ddca6e8122f90ccc8103829d7d2b8ef89327ee7
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2019-04-02 20:16:19 +08:00
Alex Zhao
fbc0c1ec5b net: wireless: rockchip_wlan: fix ap6255 tx control timeout issue
Change-Id: I4e4eb4666621286457dfa7be9786337ad22dde57
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2019-04-02 20:10:47 +08:00
Finley Xiao
756092be7a soc: rockchip: opp_select: Disable rate scaling when fail to get clk
Change-Id: I1d9f8fcb6cda53bca6d7f63603322a80fcc88e7d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-04-02 20:07:11 +08:00
Zefa Chen
787fdee6e5 dt-bindings: Document add gc8034
Change-Id: Ie602b8317cf98bb26031daa3c4c369d3546682f7
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2019-04-02 16:31:17 +08:00
Zefa Chen
1bf75bcd61 media: i2c: add gc8034 driver
Change-Id: I6380d1e2629efa60b5474198faf89e322f4aa2dc
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2019-04-02 16:31:06 +08:00
Nickey Yang
292f718976 ARM: dts: rockchip: change suspend config for rk3288-evb-rk808-linux
Change-Id: Ifcd902841efd94b4a1ef0e6901ff25724729564c
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2019-04-02 10:29:31 +08:00
Lin Huang
ca811d3159 arm64: dts: rockchip: rk1808-evb: set bt-wake-host default to pull none
gpio4c2 default status is pull up, when it connect to bt module,
that cause this pin default voltage level to 0.8V, it may trigger
irq. So set this pin default status to pull none.

Change-Id: I48f0e22198f200b05c71b4330602e8f638cf997a
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-04-02 09:20:30 +08:00
Zhen Chen
8237d4a56a Mali: midgard: fix Spectre v1 vulnerability
user_atom.atom_number can be indirectly controlled by user-space,
hence leading to a potential exploitation
of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

drivers/gpu/arm/midgard/mali_kbase_jd.c:1397 kbase_jd_submit() warn:
potential spectre issue 'jctx->atoms' [r]
katom = &jctx->atoms[user_atom.atom_number];

Fix this by sanitizing user_atom.atom_number
before 'katom = &jctx->atoms[user_atom.atom_number];'.

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2

Fixes: 5cf27d0b60 ("Mali: midgard: changes to enlarge BASE_JD_ATOM_COUNT to 512, for defect 184210")
Change-Id: If52f30d29a80a06c6693ddadd5947ab9fe8fbc25
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2019-04-01 19:44:04 +08:00
Zefa Chen
f0630e6f87 dt-bindings: Document add gc5025
Change-Id: I66c091aea3c135cc2c03b867b78d22b3e699cefe
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2019-04-01 17:54:53 +08:00
Zefa Chen
d774ae6da4 media: i2c: add gc5025 driver
Change-Id: I7565fbce1abb3f598c91eebb888eb383e27bd08e
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2019-04-01 16:38:52 +08:00
Caesar Wang
304ba59de2 arm64: dts: rockchip: change the order for sound card on rk3399pro evb
Change the order in which the sound card is used. The rk809 sound card is
used by default for card0.

This will keep the status on original, and just add the hdmi sound card
for rk3399pro evb board.

Says the cards order as below.
[root@rk3399pro:/]# cat /proc/asound/cards
 0 [rockchiprk809co]: rockchip_rk809- - rockchip,rk809-codec
                      rockchip,rk809-codec
 1 [rockchiphdmi   ]: rockchip_hdmi - rockchip,hdmi
                      rockchip,hdmi

Fixes: 313c342e9a
("arm64: dts: rockchip: add hdmi-sound for rk3399pro evb board")

Change-Id: Ia14f5703f6b79795cd7504fa35a23a550178b82f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-04-01 16:30:55 +08:00
William Wu
1b2e6aadd9 Revert "usb: dwc_otg_310: resize the depth of TxFIFO number 1 and 2"
This reverts commit 987105c1ff.

According to DWC2 Programmer's Guide, 2.1.1.2 Dedicated TxFIFO Operation,
more space allocated in the transmit IN Endpoint FIFO results in a better
performance on the USB and can hide latencies on the AHB.

So this patch sets the depth of TxFIFO number 1 to 1024 Bytes which is
usually used for primary USB function (e.g MTP).

Test on RK3288 EVB Android P:
Without this patch: MTP over eMMC - Read is only 9.48 MBps
With this patch:    MTP over eMMC - Read is 28.4 MB/s

Side effect of this patch, if the user uses UVC function, it need to
change the depth of TxFIFO number 1 to 512 Bytes (used for UVC control
ep), and change the depth of TxFIFO number 2 to 1024 Bytes (used for
UVC stream ep). The dwc_otg_310 driver has provided module_param to
set the depth of TxFIFO for each number. You can set the depth of TxFIFO
number 1 in cmdline like this:

dwc_otg.dev_tx_fifo_size_1=0x80,dwc_otg.dev_tx_fifo_size_2=0x100

Change-Id: I7cebf112731e43f89994b92729bf2a3f9e54e8dc
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-04-01 15:45:03 +08:00
Xing Zheng
f91e736a94 arm64: dts: rockchip: rk3308: add the pinctrl of ext_micbias
Change-Id: I7f93652e6cbda20a9c51503c47b9bf2a7354ef0d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-04-01 10:05:29 +08:00
Xing Zheng
53c5b92aa2 dt-bindings: sound: rk3308_codec: add some descriptions for external micbias
Change-Id: If4ef8c5d149390adf207710246bf3c2289d8c95d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-04-01 10:05:29 +08:00
Xing Zheng
14f9b005bc ASoC: rk3308_codec: add support checking external micbias
Change-Id: I644faff116184ee3fb927cff6531f8d4ac497edc
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-04-01 10:05:29 +08:00
Xing Zheng
984af25ece ASoC: rk3308_codec: add some delay to wait micbias is stable
To avoid bring some noise dues to unstable micbias.

Change-Id: I0127505f0adeacda5d852ae3cefae2fb5f4ee9d2
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-04-01 10:05:29 +08:00
Wyon Bi
4c520eca72 drm/rockchip: cdn-dp: Fix bus format setting
Change-Id: Id54d3dcf00dc1d535783674d3a57309469d279f3
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-03-29 14:17:53 +08:00
Xiaotan Luo
1d1098b342 arch: rockchip: dts: update PCM format from dsp_b to dsp_a
rockchip_i2s.c driver update the DSP_A & DSP_B config,
so we update the dts config.

Change-Id: Ida013540f263d082e20d65a43c3de932aca9f906
Signed-off-by: Xiaotan Luo <lxt@rock-chips.com>
2019-03-29 11:28:01 +08:00
Xiaotan Luo
acdf3e94ad ASoC: rockchip: i2s: fixed PCM DSP format
DSP_A: PCM delay 1 bit mode,L data MSB after FRM LRC
DSP_B: PCM no delay mode,L data MSB during FRM LRC

Change-Id: I198519c431815de3ca1fc154da78773ca705f0e0
Signed-off-by: Xiaotan Luo <lxt@rock-chips.com>
2019-03-29 11:26:36 +08:00
Elaine Zhang
534369dc33 clk: rockchip: rk3036: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: Ic60f491d549e030490c14ea78f4857a8cead596d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-03-29 09:09:21 +08:00
Elaine Zhang
311c96cb28 clk: rockchip: rk3128: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: I7f9bc78deef60b1fa48bada5b1a6203185ddce48
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-03-29 09:09:21 +08:00
Elaine Zhang
cc07bb20b3 clk: rockchip: rv1108: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: Ic4efc985892cbcc5e561203fe8e00dba116439e7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-03-29 09:09:21 +08:00
Elaine Zhang
03aca6529a clk: rockchip: rk3228: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: Ide2c3e8add083934672f6d22d8182bcfde046783
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-03-29 09:09:21 +08:00
Elaine Zhang
5210dded8f clk: rockchip: rk3288: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: I86ff4f12ed932431d131d22a307360418e2e9f40
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-03-29 09:09:21 +08:00