Commit Graph

598972 Commits

Author SHA1 Message Date
wjh
60c8cefeb7 video: hdmi: remove unuse dp timing for Rk3399 disvr
Change-Id: I783b4b7b3cdfad321b8c5bed2ce9b80fecbb3688
Signed-off-by: wjh <wjh@rock-chips.com>
2016-12-27 15:37:43 +08:00
Arnd Bergmann
cebfd3995e phy: rockchip-inno-usb2: select USB_COMMON
When USB is disabled, we get a link error for this driver
because of the added OTG support

drivers/phy/phy-rockchip-inno-usb2.o: In function `rockchip_usb2phy_otg_sm_work':
phy-rockchip-inno-usb2.c:(.text.rockchip_usb2phy_otg_sm_work+0x1f4): undefined reference to `usb_otg_state_string'
drivers/phy/phy-rockchip-inno-usb2.o: In function `rockchip_usb2phy_probe':
phy-rockchip-inno-usb2.c:(.text.rockchip_usb2phy_probe+0x2c8): undefined reference to `of_usb_get_dr_mode_by_phy'

Other phy drivers select USB_COMMON for this, so let's do the same
here.

Change-Id: I088b5862157d35360a30f21c8ed56a2a85792d53
Fixes: 0c42fe48fd23 ("phy: rockchip-inno-usb2: support otg-port for rk3399")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: William Wu <wulf@rock-chips.com>
2016-12-27 11:11:14 +08:00
Frank Wang
6e5aa40fa5 phy: rockchip-inno-usb2: add COMMON_CLK dependency
On kernel builds without COMMON_CLK, the newly added rockchip-inno-usb2
driver fails to build:

drivers/phy/phy-rockchip-inno-usb2.c:124:16: error: field 'clk480m_hw'
has incomplete type
   struct clk_hw clk480m_hw;

In file included from include/linux/clk.h:16:0
                 from drivers/phy/phy-rockchip-inno-usb2.c:17:
include/linux/kernel.h:831:48: error: initialization from incompatible
pointer type [-Werror=incompatible-pointer-types]
   const typeof( ((type *)0)->member ) *__mptr = (ptr); \

  ... ...

Change-Id: I951d89ee34625dea5dfc6eeca841f9a5c44bc951
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: William Wu <wulf@rock-chips.com>
2016-12-27 11:08:29 +08:00
William Wu
35a7b255bc phy: rockchip-inno-usb2: correct 480MHz output clock stable time
We found that the system crashed due to 480MHz output clock of
USB2 PHY was unstable after clock had been enabled by gpu module.

Theoretically, 1 millisecond is a critical value for 480MHz
output clock stable time, so we try to change the delay time
to 1.2 millisecond to avoid this issue.

And the commit ed907fb1d7c3 ("phy: rockchip-inno-usb2: correct
clk_ops callback") used prepare callbacks instead of enable
callbacks to support gate a clk if the operation may sleep. So
we can switch from delay to sleep functions.

Also fix a spelling error from "waitting" to "waiting".

Change-Id: Ie9883e5e9a3f0c2edec9d259b844ca536348c9cf
Signed-off-by: William Wu <wulf@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2016-12-27 10:56:18 +08:00
William Wu
3f49b1a0a4 phy: rockchip-inno-usb2: correct clk_ops callback
Since we needs to delay ~1ms to wait for 480MHz output clock
of USB2 PHY to become stable after turn on it, the delay time
is pretty long for something that's supposed to be "atomic"
like a clk_enable(). Consider that clk_enable() will disable
interrupt and that a 1ms interrupt latency is not sensible.

The 480MHz output clock should be handled in prepare callbacks
which support gate a clk if the operation may sleep.

Change-Id: I943e17f8a97d1229fefd8c1ada706e0c450c98eb
Signed-off-by: William Wu <wulf@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2016-12-27 10:51:30 +08:00
WeiYong Bi
8fa8918ac2 arm64: configs: add vpu related config for rk3399 linux
Change-Id: I599940d16b7e3f9777221f31d1bca4f9e4e206e4
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-27 08:29:57 +08:00
huweiguo
85fd85cc88 net: rkwifi: enable CONFIG_BCMDHD_AG=y by default
Change-Id: Ibe8c13252a134672f4cdaa1c62d82092378b2eb5
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-26 20:09:43 +08:00
Finley Xiao
a3c6493573 ARM: dts: rk3288: use operating-points-v2
Change-Id: I3cb938fbfaf0ae5957d4832f4ad5671ab9631409
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 20:08:09 +08:00
Zikim,Wei
92c9974ec6 video/rockchip: fix rga2 get version from reg
Change-Id: Ia960791f8346a132389cb7f43f0f7ff801465abc
Signed-off-by: Zikim,Wei <wzq@rock-chips.com>
2016-12-26 20:05:11 +08:00
zhangjun
f30d9c25a8 arm64: dts: rk3399-tve1205g: deploy audio configurations
Change-Id: I41ebc8a11c74536ed51720c07fbfe1817342907d
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2016-12-26 18:07:36 +08:00
Bin Yang
7b2ee306c7 arm64: dts: rockchip: add usb camera pd pin control for rk3399-tve1205g
Change-Id: Iee039f3085832861dee5a99da2cbbbec2a08f509
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-12-26 17:54:03 +08:00
Bin Yang
62564b2183 arm64: rockchip_defconfig: add usb camera pd pin control support
Change-Id: If7542a913eab0e36c586005d5bcfbb2b9cabb5d7
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-12-26 17:53:13 +08:00
Bin Yang
3344984bec misc: add usb camera pd pin control driver
Change-Id: Id6ad835c2fff43167a52f90c19e7e6dfe93a4655
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-12-26 17:52:11 +08:00
Sugar Zhang
3014473755 ASoC: rockchip: i2s: add support for i2s bclk fs configuration
this patch add support for i2s bclk fs configuration, we can
configure bclk_fs by devicetree as required.

Change-Id: I7e034e0466793b5b9eab6566a43e90213f219bb0
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-12-26 17:50:51 +08:00
wenping.zhang
2bd4ff7162 video: rockchip: dp: fix dp connected issue which caused by hpd signal.
some device will triggered hpd after dp is connected, so we don't do
traning if dp lanes is not changed.

Change-Id: I3e329e7d2db33138f283ad6584b966ebd0619f65
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-26 17:49:58 +08:00
William Wu
e40c0e2bb5 usb: dwc3: rockchip: support to set testmodes via debugfs
This patch create host_testmode file in debugfs for
USB HOST. It's useful for us to use a scope to verify
signal integrity for USB2/USB3 HOST.

For example, set testmodes for RK3399 board USB:
1. set Test packet for Type-C0 USB2 HOST:
   echo test_packet > /sys/kernel/debug/usb@fe800000/host_testmode

2. set compliance mode for Type-C0 USB3 HOST normal orientation:
   echo test_u3 > /sys/kernel/debug/usb@fe800000/host_testmode

3. set compliance mode for Type-C0 USB3 HOST flip orientation:
   echo test_flip_u3 > /sys/kernel/debug/usb@fe800000/host_testmode

4. check the testmode status:
   cat /sys/kernel/debug/usb@fe800000/host_testmode

   The log maybe like this:
   U2: test_packet     /* means that U2 in test mode */
   U3: compliance mode /* means that U3 in test mode */

Change-Id: Ic7e464b0443c792848846246b782ffba30bf2120
Signed-off-by: William Wu <wulf@rock-chips.com>
2016-12-26 17:49:03 +08:00
Finley Xiao
c15ca6e0d1 PM / AVS: rockchip-cpu-avs: use a new way to get cluster id
The returned value of topology_physical_package_id is socket id
on ARM32 system(for example, RK3288), it's not like the cluster id
on ARM64 system(for example, RK3366), so use a new way.

Change-Id: I5b2cdfdcdaa56c71df394caa2588f6e83931a293
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 17:48:20 +08:00
Viresh Kumar
2cfe35d495 UPSTREAM: cpufreq: Send START policy notification after sending CREATE
The sequence got a bit wrong as we are sending CPUFREQ_START
notifications even before we have sent CPUFREQ_CREATE_POLICY.

Fix it.

Change-Id: I7d1fba317314bb5e5601b1354494398def156424
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 388612baba)
2016-12-26 17:46:23 +08:00
Finley Xiao
7ac7e477b6 arm64: dts: rockchip: rk3366: add cpu avs node
Change-Id: I7d984bf44e04d205c243eb2012cd06ba7c7fe548
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 17:45:55 +08:00
Shunqing Chen
2718b444f3 ARM64: dts: rk3399-tve1205g: host state notify ec module through gpio
Change-Id: I3716de0618394de010000a0497de1b3c83cd88ab
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-26 17:45:22 +08:00
Shunqing Chen
c76f182c49 power: host state notify ec module through gpio
Change-Id: I6b1401c6959a05fce1d6d7ca7a5fb581782fd30d
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-26 17:45:08 +08:00
wenping.zhang
9c88c3dac1 mfd: fusb302: fix fusb302 disconnect error.
shift the time of vbus enable before attach debounce started,
and merge the code of get_cc from chrome ec driver, which used
to fix connection disconnected issue.

Change-Id: I2fd1f83d0265b3770d75a59d622d0f650d737c5b
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-26 14:56:33 +08:00
huweiguo
7925bc3557 net: rkwifi: enable GET_CUSTOM_MAC_ENABLE
Change-Id: I8ea15be317e4bbe1d9cf0834e42536fc4dc4b9d7
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-26 14:18:34 +08:00
Finley Xiao
d505707379 arm64: dts: rockchip: rk3399: Rename OPP nodes as opp@<opp-hz>
It would be better to name OPP nodes as opp@<opp-hz> as that will ensure
that multiple DT nodes don't contain the same frequency. Of course we
expect the writer to name the node with its opp-hz frequency and not any
other frequency.

And that will let the compile error out if multiple nodes are using the
same opp-hz frequency.

Change-Id: I8c77646329e39390fb135d4d75d34893a8168876
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 12:02:00 +08:00
Finley Xiao
0d418c6105 arm64: dts: rk3399: modify opp table according to latest chips
Change-Id: I2a1b5fac74617cf57a5655411f0326800a6a990d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-26 12:01:28 +08:00
WeiYong Bi
791aa7dedc arm64: dts: rockchip: support use drm on rk3399 excavator linux
1. fixup edp enable gpio.
2. add backlight enable gpio.
3. enable route_edp node.

Change-Id: I4b4792abe3c8eb7dba0c2f5c0d3ddffff74478d1
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-23 18:33:53 +08:00
WeiYong Bi
39e7667ca4 arm64: dts: rk3399_linux: support use drm on rk3399 linux
Change-Id: I9b248af7d86d34a669219fbe62a195ee2b49e516
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-23 18:33:45 +08:00
huweiguo
b58f60a9e8 net: rfkill-wlan: prior to use wifi addr store in vendor storage
Change-Id: I32ef43e1f47ee658675b26d54fa834ae9362382f
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-23 18:06:32 +08:00
Elaine Zhang
ccde3d690b ARM64: dts: rockchip: add power domain node for RK3328 Soc
add pd node for RK3328 Soc
create power domain tree

Change-Id: I0ef5729d397105a7992cb4b7440cdc2b251bd1af
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-23 18:03:26 +08:00
wenping.zhang
f2576a3f56 arm64: dts: rk3399-android: add core reset for dp.
Change-Id: I7c86cfbf28cb278bcadebbb08ba31a8b81bdd290
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-23 17:57:03 +08:00
wenping.zhang
3277fb894f video: rockchip: dp: fix dp fw load error.
Do dptx/apb/core reset on every dp clock enabling, otherwise dp
will fail to load the firmware sometimes.

Change-Id: Ied0caad99d865ec86162dead2b4769a53f8db12a
Signed-off-by: wenping.zhang <wenping.zhang@rock-chips.com>
2016-12-23 17:55:32 +08:00
WeiYong Bi
bd94271915 arm64: dts: rockchip: support use vpu on rk3399 excavator linux
Change-Id: I5ea28cd4539140a149f1725a1622fd1dcae3e020
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2016-12-23 17:50:14 +08:00
Mark Yao
2dc37ec50d drm/rockchip: gem: add mutex lock for drm mm
drm_mm_insert_node_generic and drm_mm_remove_node may access same
resource with list ops, it's not threads safe, so protect this context
with mutex lock.

Fix bug:
[49451.856244] ==================================================================
[49451.856350] BUG: KASAN: wild-memory-access on address dead000000000108
[49451.856379] Write of size 8 by task Binder:218_4/683
[49451.856417] CPU: 2 PID: 683 Comm: Binder:218_4 Not tainted 4.4.36 #62
[49451.856443] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[49451.856469] Call trace:
[49451.856519] [<ffffff900808a9d0>] dump_backtrace+0x0/0x230
[49451.856556] [<ffffff900808ac14>] show_stack+0x14/0x1c
[49451.856592] [<ffffff90084a4de0>] dump_stack+0xa0/0xc8
[49451.856633] [<ffffff900821b700>] kasan_report+0x110/0x4dc
[49451.856670] [<ffffff900821aa84>] __asan_store8+0x24/0x7c
[49451.856715] [<ffffff90086158c4>] drm_mm_insert_node_generic+0x2dc/0x464
[49451.856760] [<ffffff90086406a8>] rockchip_gem_iommu_map+0x60/0x158
[49451.856794] [<ffffff9008640bb4>] rockchip_gem_create_object+0x278/0x488
[49451.856827] [<ffffff9008641020>] rockchip_gem_create_with_handle+0x24/0x10c
[49451.856862] [<ffffff9008641364>] rockchip_gem_create_ioctl+0x3c/0x50
[49451.856896] [<ffffff900860aee4>] drm_ioctl+0x354/0x52c
[49451.856939] [<ffffff900823d948>] do_vfs_ioctl+0x670/0x78c
[49451.856976] [<ffffff900823dac4>] SyS_ioctl+0x60/0x88
[49451.857009] [<ffffff9008082ef0>] el0_svc_naked+0x24/0x28

Change-Id: I2ea377aa9ca24f70c59e2d86f2a6ad5ccb9c0891
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-12-23 11:11:55 +08:00
Zhou weixin
ff541f79f1 ARM64: dts: rk3399-tve1205g: add wakeup support for hid keyboard
Change-Id: I21d0f6dac30f64b90c68f98c11c0cc7012e2b1b6
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-22 18:12:45 +08:00
Zhou weixin
578582392c HID: i2c-hid: add support wakeup
Change-Id: I15890509ff5983e1a8adaa48b28391ec67de8bb5
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-22 16:24:27 +08:00
huweiguo
215fd01589 ethernet: rockchip: get and save eth addr in vendor storage
Change-Id: I83d8bc81ca8d33e6f2575d0d90a3dc5978500a64
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-12-22 16:07:34 +08:00
Huang, Tao
c8e3cdd349 input: keyboard: rk_keys: add rk_keys.h
Make sure drivers work if rk_keys do not selected.

Change-Id: I2882e6c69f0ddbff54089f824be33964ded3cb2e
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-22 15:31:12 +08:00
Huang, Tao
fa25ca7318 rk: rm drivers/clk/rk
Change-Id: I8c541c0edb446a285ca5097b597216635e755460
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-22 14:23:30 +08:00
dalong.zhang
436d4c489e camera: rockchip: camsys driver v0.0x21.9
Change-Id: I371f3bfc1e6276407bb9481f4a7897d4955903ba
Signed-off-by: dalong.zhang <dalon.zhang@rock-chips.com>
2016-12-22 14:00:27 +08:00
Huang, Tao
b208f11618 soc: rockchip: reboot-mode: rename BOOT_LOADER to BOOT_BL_DOWNLOAD
Same as upstream.

Change-Id: Id9042d288bdbac2fede7da4aee13cc7a32609d6d
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-22 12:04:44 +08:00
Huang, Tao
541ba1412b arm64: dts: rockchip: move vpu/rkvdec to rk3399.dtsi
Right now only one driver support vpu and rkvdec,
so move the nodes from rk3399-android[-next].dtsi to rk3399.dtsi.

Change-Id: Id908843774ed8eede3aeddb24059ae92a35e5b98
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-22 11:58:18 +08:00
Shunqing Chen
e74a918a47 arm64: rockchip_defconfig: enable EC_BATTERY
Change-Id: I7f467608e6d366b8839dc171ad98c928fe3ed788
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-22 10:36:41 +08:00
Elaine Zhang
0f2a06b135 soc: rockchip: power-domain: Modify power domain driver for rk3328
This driver is modified to support RK3328 SoC.
RK3328 SoC is only support idle.
add DOMAIN_M type, for support regs have write_enable bit.

Change-Id: I5780b7bab680ddd9d9480e19d7c49681dd571d27
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-22 10:19:29 +08:00
Elaine Zhang
1a0ee03a6b dt-bindings: add binding for rk3328 power domains
Add binding documentation for the power domains
found on Rockchip RK3328 SoCs.
But RK3328 SoC just support idle, not support pd.

Change-Id: I331680b2e91a45fd09f4bdab7ff9fd3990cb35c4
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-22 10:19:16 +08:00
Elaine Zhang
5e7595141e dt/bindings: power: add RK3328 SoCs header for idle-request
According to a description from TRM, add all the idle request.

Change-Id: Ia2fdb20d89f7e668a3c86074ebed8c73ab0a9429
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-22 10:19:09 +08:00
Shunqing Chen
620a4f67a4 power: add ec battery driver
Change-Id: I7b1b0087a9ec361ec322a34b4caefc71a51bd2c9
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2016-12-22 10:18:37 +08:00
Zhaoyifeng
bef7ae199a drivers: soc: rockchip: fix vendor storage write issue
Change-Id: I65bf5896ac8cf792c400755fc62e3e433209891d
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2016-12-22 10:17:30 +08:00
Zhou weixin
739d11dee7 ARM64: dts: rk3399-tve1205g: add leds gpio control
Change-Id: I89b0c1a2ee631b133f81494063b6cb4a57a1daca
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-12-22 10:14:31 +08:00
Huang, Tao
d83da99f31 soc: rockchip: rename rockchip_boot-mode.h to rockchip,boot-mode.h
Same as upstream.

Change-Id: Ic1887e5cf808ebf214168b51683dec25880f0dac
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-12-21 21:41:34 +08:00
zhangjun
b50d6cbbe2 ASoC: es8316: fix null pointer error
due to function will be called from rk_headset_irq_hook_adc.c
when es8316 configured in defconfig file but not in device tree

Change-Id: Ie0294fff2c05b9f77c6740d81dc9445007c1b62b
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
2016-12-21 17:57:37 +08:00