Commit Graph

601502 Commits

Author SHA1 Message Date
Tang Yun ping
764e893ee8 clk: rockchip: support setting ddr clock via SIP Version 2 APIs
1. Add support setting ddr clock via SIP Version 2 APIs
2. RK3288 using SIP Vision 2.

Change-Id: I935e43b1885a96650dc86e3eb6d79de6795062a9
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-05-10 16:17:22 +08:00
Tang Yun ping
40204ab0fd sip: rockchip: fix bus about make kernel failure
When undefine "CONFIG_ROCKCHIP_SIP", define an empty sip function
to avoid make kernel failure.

Change-Id: Id6bcf1cec1c11f09511852e015631d14279ca8bc
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-05-10 16:17:21 +08:00
Mark Yao
c21d27bafc drm: add drm_device_get_by_name support
Change-Id: Ifbd0f403ca2302e9329a16d7b69db5ee056cadf7
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-05-10 15:28:18 +08:00
Huibin Hong
9b6a090325 Revert "fiq debugger: add resume for debug uart"
This reverts commit 0e7d751d6c.

If enable no console suspend, it will do resume when printing log,
which causes problem. Remove resume of kernel, and add resume of
trust firmware or other power management code.

Change-Id: I3e8e704140134a6aad5c0eb2f14fde36fb108ad3
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-05-10 11:59:35 +08:00
Frank Wang
ad972dedbe arm: dts: add vdd_arm and vdd_log regulator for rk3229-evb
Change-Id: I1a0bbee3e5b9a43f2a79285c04497ec598697404
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-05-10 11:28:47 +08:00
Xu Jianqun
4d81e6715c arm64: dts: rk3368-android: revert to use uart2 for debug
Change-Id: I5e6c88e185a2ad39b082ad4b989589cd46ecb874
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2017-05-10 09:21:04 +08:00
David Wu
b9ca500f21 net: stmmac: The netif_device_attach() should be called after napi_enable()
If the netif_device_attach() is called earlier, the state of dev_queue is
waked, txtimer might be modified, and the txtimer is added at same time.
It might make run_timer_softirq crashed, because the timer is be detached
twice together.

Change-Id: I31dde4e940bddcc36372ca1f4a8313c0389d4e6b
Signed-off-by: David Wu <david.wu@rock-chips.com>
2017-05-09 20:10:19 +08:00
Frank Wang
ddb9616d29 arm: dts: simplified rk3229 board configs.
Move EMMC and UART configs from every board DTS to a DTSI file.

Change-Id: If2fd49b9243b879ae89e172f55903eedfd4f3981
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-05-09 20:06:57 +08:00
Frank Wang
23de1f8c34 arm: dts: add watchdog and uart2 related for rk322x SoC
Add another GPIO sets for UART2 since the old ones are conflict
with SDMMC, also add watchdog support.

Change-Id: Ib0f1472b9a7760e15e1b83e103f65f43e3642643
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-05-09 20:06:35 +08:00
Randy Li
646cd86cb8 ARM: dts: rockchip: remove dev_mode from rk3288
Since there is no combo device at RK3288, no need to
use this property anymore.

Change-Id: I56434161c4167fc048e4956e97b29617367e28f6
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-05-09 09:40:30 +08:00
Tang Yun ping
f8c67c5e9b clk: rockchip: rk3288: always enable gpll_ddr for ddrc.
When ddr frequency scanning, need to switch to gpll for saving
times.

Change-Id: Ibb7e4ed1fa4babaf65e1d98c8a0891766cea63de
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-05-08 17:54:43 +08:00
Tang Yun ping
c5ed4570f0 sip: rockchip: add SHARE_PAGE_TYPE_DDR for ddr frequency scanning.
Change-Id: I7b9c81912e15bf2cea6739a051e5f466ba759d77
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-05-08 17:54:38 +08:00
William Wu
81f3ef435d phy: rockchip-inno-usb2: increase otg sm work first schedule time
In rockchip inno usb2 phy driver, we use otg_sm_work to
dynamically manage power consumption for phy otg-port.
If the otg-port works as peripheral mode and doesn't
communicate with usb host, we will suspend phy.

But once suspend phy, the phy no longer has any internal
clock running, include the utmi_clk which supplied for
usb controller. So if we suspend phy before usb controller
init, it will cause usb controller fail to initialize.

Specifically, without this pathch, the observed order is:
 1. unplug usb cable
 2. start system, do dwc2 controller probe
 3. dwc2_lowlevel_hw_enable()
    - phy_init()
     - rockchip_usb2phy_init()
      - schedule otg_sm_work after 2s
        put phy in suspend, and close utmi_clk
 4. dwc2_hsotg_udc_start() - fail to initialize the usb core

Generally, dwc2_hsotg_udc_start() can be called within 5s
after start system on rockchip platform, so we increase the
the first schedule delay time to 6s for otg_sm_work afer usb
controller calls phy_init(), this can make sure that the usb
controller completes initialization before phy enter suspend.

Change-Id: I40a7f6b24620e49a1273cb9c5051d62efb62810d
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-05-08 17:34:25 +08:00
Xu Jianqun
f111309c6a mailbox: rk3368: fix error setting if mbox_msg is null
Fix the error dump:

[19252.682822] Unable to handle kernel NULL pointer dereference at
virtual address 00000020
[19252.682834] pgd = ffffff800935d000
[19252.682844] [00000020] *pgd=0000000077ffe003, *pud=0000000077ffe003,
*pmd=0000000000000000
[19252.682852] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[19252.682863] Modules linked in: pvrsrvkm(O)
[19252.682872] CPU: 1 PID: 59 Comm: irq/32-ff6b0000 Tainted: G        W
O    4.4.55 #34
[19252.682875] Hardware name: Rockchip rk3368 p9 board (DT)
[19252.682880] task: ffffffc074cf8c40 ti: ffffffc074d04000 task.ti:
ffffffc074d04000
[19252.682894] PC is at mbox_chan_received_data+0xc/0x20
[19252.682901] LR is at rk3368_mbox_isr+0xb0/0xd0

Change-Id: I1873d6a7e7d1390d2c2c44a77c120d1a02614fdc
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2017-05-08 15:46:26 +08:00
William Wu
e759aa4172 phy: rockchip-inno-usb2: add a delay after phy resume
When resume phy, it need about 1.5 ~ 2ms to wait for
utmi_clk which used for USB controller to become stable.

Change-Id: I319a28069b4b3381f22cc34567226f341e948bd4
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-05-08 15:45:37 +08:00
Huibin Hong
3639eea28a ARM64: dts: rk3368-android: enable fiq mode
If this patch is used, dedicated trust firmwart is necessary.

Change-Id: I72ca3b1b722c4076f589341e40efcbeeb5a07a58
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-05-08 11:12:33 +08:00
Huibin Hong
cf5579f97d rk_fiq_debugger: remove "read signal irq from dts directly"
Change-Id: I1f531ce2f58b33d5501f8446ad393e7ac4f27ef0
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-05-08 11:12:28 +08:00
William Wu
842bf8ea5a arm: dts: rk322x-android: enable usb otg controller and its phy
Change-Id: Ie03c7fe388360b0285d2a6eb0a455f5ed28e74c4
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-05-08 10:14:07 +08:00
William Wu
e0aba42215 phy: rockchip-inno-usb2: add otg-port support for rk322x SoC
This patch adds USB 2.0 PHY otg-port configuration for rk322x
SoC, this otg-port can be used for USB 2.0 OTG interface.

Change-Id: I7f2e362292edb45078a16d1a9665e3bdccc54814
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-05-08 10:11:49 +08:00
William Wu
e183dc8bfd arm: dts: rockchip: add u2phy otg-port and dwc2 ctrl nodes for rk322x SoC
This patch adds dwc2 controller and its phy nodes for rk322x SoC.

Change-Id: I29779baf92c28154ad342e234e8a5582984b8a12
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-05-08 10:11:37 +08:00
Mark Yao
333afcb8a3 ARM: dts: rk322x: add vop display node
Change-Id: Ic26431540260c758b6872020c36a41efdb2d82f2
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-05-08 10:11:04 +08:00
Huang, Tao
3ee0d9f2b7 OP-TEE: use sema_init instead of __SEMAPHORE_INITIALIZER
Fix lockdep warning:
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU:rk3288:/ $  0 PID: 234 Comm: tee-supplicant Not tainted 4.4.64 #51
Hardware name: Rockchip (Device Tree)
[<c0110018>] (unwind_backtrace) from [<c010c048>] (show_stack+0x10/0x14)
[<c010c048>] (show_stack) from [<c04194a8>] (dump_stack+0x9c/0xd4)
[<c04194a8>] (dump_stack) from [<c018321c>] (__lock_acquire+0x638/0x1c10)
[<c018321c>] (__lock_acquire) from [<c01850ec>] (lock_acquire+0x1d0/0x29c)
[<c01850ec>] (lock_acquire) from [<c0bc0f3c>] (_raw_spin_lock_irqsave+0x50/0x64)
[<c0bc0f3c>] (_raw_spin_lock_irqsave) from [<c017e148>] (down_interruptible+0xc/0x48)
[<c017e148>] (down_interruptible) from [<c03cd72c>] (tee_supp_read+0x74/0x154)
[<c03cd72c>] (tee_supp_read) from [<c025d638>] (__vfs_read+0x2c/0xf0)
[<c025d638>] (__vfs_read) from [<c025de30>] (vfs_read+0x84/0x134)
[<c025de30>] (vfs_read) from [<c025e720>] (SyS_read+0x4c/0xa4)
[<c025e720>] (SyS_read) from [<c01072c0>] (ret_fast_syscall+0x0/0x1c)

Change-Id: I09335112bed6efb30e60a22b471d4467eecaf520
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-08 09:44:37 +08:00
Huang, Tao
cf1df1b161 arm64: rockchip_defconfig: enable MODVERSIONS
353a964727 ("ANDROID: android-base.cfg: add CONFIG_MODULES option")

Change-Id: I8e85dfd6c7fedf797066e5e707eba7595dc2c123
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 17:57:54 +08:00
Huang, Tao
28f4152aad arm64: rockchip_defconfig: enable CONFIG_IKCONFIG
6286b142ae ("ANDROID: android-base.cfg: add CONFIG_IKCONFIG option")

Change-Id: I68b0dc00a68a3eb885eb32d8c82b326067a438dc
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 17:57:53 +08:00
Huang, Tao
54567d06f8 arm64: rockchip_defconfig: disable CONFIG_USELIB
1c634ee26b ("config: disable CONFIG_USELIB and CONFIG_FHANDLE")

Change-Id: I1518e974427572d941b982db3896eb72822872f8
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 17:57:53 +08:00
Huang, Tao
cc8e6930a4 arm64: rockchip_defconfig: rename UID_CPUTIME to UID_SYS_STATS
2ea16502ca ("ANDROID: uid_sys_stats: rename uid_cputime.c to uid_sys_stats.c")

Change-Id: I11ad23129722f87111a5c6f3881b4bdcc5626f66
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 17:57:52 +08:00
Huang, Tao
802cc05239 arm64: rockchip_defconfig: enable ARM64_SW_TTBR0_PAN
536bf705c5 ("ANDROID: configs: CONFIG_ARM64_SW_TTBR0_PAN=y")

Change-Id: I49f562d81d8f354dfbeb545618bc6c907256d60b
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 17:57:52 +08:00
Huang, Tao
f94605aa75 ARM: rockchip_defconfig: enable MODVERSIONS
353a964727 ("ANDROID: android-base.cfg: add CONFIG_MODULES option")

Change-Id: Ia85709d1dc711f1ed8632e6299f121b4e6fbedc2
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 17:29:27 +08:00
Huang, Tao
b90c069d1e ARM: rockchip_defconfig: enable CONFIG_IKCONFIG
6286b142ae ("ANDROID: android-base.cfg: add CONFIG_IKCONFIG option")

Change-Id: I4d0369b990f9f9d707b672c6959e668307be700b
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 17:28:01 +08:00
Huang, Tao
888ba17ea8 ARM: rockchip_defconfig: disable CONFIG_USELIB
1c634ee26b ("config: disable CONFIG_USELIB and CONFIG_FHANDLE")

Change-Id: I617db2524c604e732d9d3f4eae0b8566efd82e98
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 17:26:09 +08:00
Huang, Tao
28ac4628e5 ARM: rockchip_defconfig: rename UID_CPUTIME to UID_SYS_STATS
2ea16502ca ("ANDROID: uid_sys_stats: rename uid_cputime.c to uid_sys_stats.c")

Change-Id: I345f44e510cb0168e9816f7d9adecf5772cdb092
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 17:23:51 +08:00
Huang, Tao
986d4e4637 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (521 commits)
  Linux 4.4.66
  ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram
  ARCv2: save r30 on kernel entry as gcc uses it for code-gen
  nfsd: check for oversized NFSv2/v3 arguments
  Input: i8042 - add Clevo P650RS to the i8042 reset list
  p9_client_readdir() fix
  MIPS: Avoid BUG warning in arch_check_elf
  MIPS: KGDB: Use kernel context for sleeping threads
  ALSA: seq: Don't break snd_use_lock_sync() loop by timeout
  ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type
  ipv6: check raw payload size correctly in ioctl
  ipv6: check skb->protocol before lookup for nexthop
  macvlan: Fix device ref leak when purging bc_queue
  ip6mr: fix notification device destruction
  netpoll: Check for skb->queue_mapping
  net: ipv6: RTF_PCPU should not be settable from userspace
  dp83640: don't recieve time stamps twice
  tcp: clear saved_syn in tcp_disconnect()
  sctp: listen on the sock only when it's state is listening or closed
  net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given
  ...

Conflicts:
	drivers/usb/dwc3/gadget.c
	include/linux/usb/quirks.h

Change-Id: I490f766b9a530b10da3107e20709538e4536a99d
2017-05-06 14:23:00 +08:00
Huang, Tao
7afca43604 ARM: rockchip_defconfig: update by savedefconfig
Change-Id: I96ee84cfa4b40b10f5fb273044a81b22f20f4efb
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 14:21:26 +08:00
Huang, Tao
075d03af42 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: I4aa6538762060d62da3da56065abee4d42134da2
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-05-06 14:17:39 +08:00
Xu Jianqun
2f858177f7 camera: rockchip: camsys driver disable debug
Change-Id: I1a4b3d1ab0e96bbc4ff482b8f3a3f8aa98b4529d
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2017-05-05 17:37:43 +08:00
XiaoDong Huang
bb4f7fa1b3 arm64: dts: rk3368: add rockchip-suspend node
Change-Id: I68f8068c795e87ffa3cbea4b23ba5df56a70218d
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2017-05-05 14:37:22 +08:00
XiaoDong Huang
c7db890039 soc: rockchip: support rk3368 pm config
Change-Id: I69e823d397a411c1b1395563870fca6485dfb936
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2017-05-05 14:37:11 +08:00
Frank Wang
1924661beb arm: dts: assigned host vbus regulator for rk3229-evb board
Change-Id: I86608300c600db0ece0120ce3fba0f541953910e
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-05-05 09:03:36 +08:00
Frank Wang
3ad7ff8bfb arm: dts: assigned host vbus regulator for rk3229-echo-v10 board
Change-Id: Ia4cd6a915750d933886b217d2c4818d4f66d31c9
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-05-05 09:00:50 +08:00
Frank Wang
f1ea1d7b25 arm: dts: enable all usb phy and usb host for rk322x SoC
Change-Id: Ia69914348eee190aea0cd0f1a380a4ce569f1cdf
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-05-05 08:58:46 +08:00
Frank Wang
81a0376545 arm: dts: add usb-phy and usb2.0 host nodes for rk322x SoC
This patch adds usb2.0 host and usb-phy related nodes for rk322x SoC.

Change-Id: Ib1c5375f81c8d7b55608b1b1793c27be012a8c6e
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-05-05 08:56:12 +08:00
Frank Wang
ec25ee5845 phy: rockchip-inno-usb2: add host-port support for rk322x SoC
This adds support host-port on rk322x SoC and amend phy Documentation.

Change-Id: I440adc10e25c98cbe220275fecd12774c08d24d1
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-05-04 18:43:36 +08:00
Randy Li
15481606f0 video: rockchip: vpu: support VDPU at RK3328
The VDPU at RK3328 is a standalone decoder IP without
encoder. Also there is the other AVS+ decoder IP,
working as the combo IP.

I introduce the following commit from develop-3.10,
commit ee2f9f6912fb ("rk322xh/vcodec: bugfix, avoid combo device overwrite irq status")
commit 568dabeb12ef ("rockchip/vcodec: bugfix, inconsistence power on/off operation")

The following patches have not been introduced,
it would effect RKV device:
commit b8a2ce7e5b60 ("rockchip/vcodec: disable power-save optimization for hw defeat")
commit 046faf9ba20a ("rk322xh/vcodec: bugfix, probe failed when ion cma heap undefined")
commit beaeb230cbf2 ("rk322xh/vcodec: revise for rk322xh feature")

Change-Id: Ifc14daa84b692f8fcfbd4f6690ed66dd56bbbe29
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-05-04 15:47:41 +08:00
Randy Li
091274470b video: rockchip: vpu: add avs decoder table
This table would be used for both AVS and AVS+ decoder.

Change-Id: I9557a3d170943a3b544d97b6c63f02679bd7b532
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-05-04 15:46:09 +08:00
Randy Li
a551def232 video: rockchip: vpu: only use the dev_mode for combo
The most of device can get this its running type from the
compatible. This property becomes unnecessary.

Change-Id: I40ec41b130fac2cadd47d92332d27c58a8c2c9f7
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-05-04 15:45:30 +08:00
Finley Xiao
9c76cd21b9 PM / devfreq: rockchip_dmc: add mutex lock for pmu register
As dmc may also assess register PMU_BUS_IDLE_REQ, we should prevent
pd driver and dmc driver assessing this register at the same time.

Change-Id: I546033536c87dcf497774cbc6c8f36a3e651ff07
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-05-04 15:01:17 +08:00
Finley Xiao
a670400e8b soc: rockchip: power-domain: export rockchip_pm_register_notify_to_dmc
This function registers a notifier to dmc devfreq, it will lock the mutex
of pmu when scaling frequency, so that pd driver and dmc driver will not
assess register PMU_BUS_IDLE_REQ at the same time.

Change-Id: I0ba96599d9050d11924d032146e6b4d415629614
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-05-04 15:00:54 +08:00
Xu Jianqun
e25503f147 dmaengine: pl330: fix error message to dev_err_ratelimited
Change-Id: I4d1191f5b7d330c2786eaac42213b4d255b05db8
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2017-05-04 14:53:05 +08:00
Zorro Liu
df9708384f ARM64: dts: rk3368-p9: enable route mipi
Change-Id: Ib93918524c173bce1283b0001e0f8ca91594dc6f
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-05-04 14:16:04 +08:00
Finley Xiao
f1ec141d60 PM / devfreq: rockchip_dmc: set polling_ms to 50
In order to scaling frequency more timely, reduce the polling_ms.

Change-Id: Icbee5552396fa0552fb514d92ea77687228c3e28
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-05-04 12:03:17 +08:00