Commit Graph

608003 Commits

Author SHA1 Message Date
shengfei Xu
a6625d7dbb power: rk817: fix the display soc jump from 0 to 100
Change-Id: If930ed4804e502aaa4f6b18a51e671517784ff0b
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-03-13 14:52:25 +08:00
Huibin Hong
f654b33256 arm64: dts: rockchip: Add spi node for rk3308
Change-Id: I5212c378e74da0159247a4dcf4bf66bb5b671f80
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-03-13 14:48:21 +08:00
Huibin Hong
2ed3cd686e arm64: dts: rockchip: Add uart node for rk3308
Change-Id: I3d3bacf0801154d2cd354e39dc2a6440fa616930
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-03-13 14:47:09 +08:00
Huibin Hong
a657105990 arm64: dts: rockchip: Add dma node for rk3308
Change-Id: I7337d230ae8d73805b478b4e7280cdf33c48a1fb
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-03-13 14:43:20 +08:00
Huibin Hong
a9e533b076 arm64: dts: rockchip: Add watch dog node for rk3308
Change-Id: I735a84dc5be18da47131c08cfdb2f66f698648b3
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-03-13 14:41:27 +08:00
Finley Xiao
d65b1d2ec8 clk: rockchip: rk3308: Add dmac clocks
Change-Id: I63e30bb23f6bc61f1dcc189e3bc43a6f1bb57f3f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-13 13:56:09 +08:00
Zhen Chen
4a1507af5a MALI: rockchip: upgrade bifrost DDK to r10p0-01rel0
in addition,
resolve all the conflicts;
rename all the configs and macros that have a same name in midgard/;
fix a compiling error.

Change-Id: I5abc8c925049e087c59b66da57c82aac3092be71
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-03-13 13:55:01 +08:00
Zhen Chen
25c5dc5a92 MALI: midgard: rk: fix a memory leak in platform specific code
Change-Id: I31ecc394c8ac971ed915b18b08d5b5cba5d440e2
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-03-13 10:40:59 +08:00
Zhen Chen
1ffc1d8044 MALI: bifrost: rk: fix a memory leak in platform specific code
Change-Id: I88a8614742b9663454349d09b84e63998f0aeb66
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-03-13 10:40:25 +08:00
XiaoDong Huang
b3bbd99a3f arm64: dts: rockchip: enable rockchip_suspend node for px30/rk3326 board
Change-Id: Ic0abae2f3c474e2d6f03bda3ae4a99d05cc53c30
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-03-12 19:55:55 +08:00
XiaoDong Huang
8e0f9d6184 arm64: dts: rockchip: px30: add rockchip-suspend node
Change-Id: Iac7fdbcf6ede75d8a987c8c618bce4ebc4f536cc
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-03-12 19:54:55 +08:00
XiaoDong Huang
209bb1d4ac soc: rockchip: support px30 pm config
Change-Id: Ia1f48c904cf9711f1c6601e50eccd4d2026cffe6
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-03-12 16:26:08 +08:00
Wyon Bi
b8a66c99b7 phy/rockchip: mipi-dphy: optimized power on/off sequences
we can power off the bandgap to reduce power consumption.

Change-Id: I7959e6f1d38a6abca70d6d904264668a19ace920
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-03-12 11:48:52 +08:00
Algea Cao
e18e74beb7 arm: rockchip_defconfig: Support hdmi cec
Change-Id: I4772bff4d05ebe85a8ccc781788fc7e1fe9bcea1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-03-10 11:23:13 +08:00
Tao Huang
195d03b6cb rockchip: cpu: cpu_is_xxx depends on CPU config
Change-Id: I8c84af7b41da306b20a6d3653deaeee6ce49ea31
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 20:34:27 +08:00
Tao Huang
e3ffa5e5db soc: rockchip: add CPU_XXX config
For build kernel only support the given CPU.

Change-Id: I3d4790779d0ad0ecff6661ffb0b70e2df287fd5a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 20:10:52 +08:00
Tao Huang
3430c68a33 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (660 commits)
  ANDROID: keychord: Check for write data size
  ANDROID: sdcardfs: Set num in extension_details during make_item
  ANDROID: sdcardfs: Hold i_mutex for i_size_write
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck64-XTS
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck128-XTS
  BACKPORT, FROMGIT: crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS
  FROMGIT: crypto: speck - export common helpers
  BACKPORT, FROMGIT: crypto: speck - add support for the Speck block cipher
  UPSTREAM: ANDROID: binder: synchronize_rcu() when using POLLFREE.
  f2fs: updates on v4.16-rc1
  BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()
  BACKPORT: tee: shm: don't put_page on null shm->pages
  BACKPORT: tee: shm: make function __tee_shm_alloc static
  BACKPORT: tee: optee: check type of registered shared memory
  BACKPORT: tee: add start argument to shm_register callback
  BACKPORT: tee: optee: fix header dependencies
  BACKPORT: tee: shm: inline tee_shm_get_id()
  BACKPORT: tee: use reference counting for tee_context
  BACKPORT: tee: optee: enable dynamic SHM support
  BACKPORT: tee: optee: add optee-specific shared pool implementation
  ...

Conflicts:
	drivers/irqchip/Kconfig
	drivers/media/i2c/tc35874x.c
	drivers/media/v4l2-core/v4l2-compat-ioctl32.c
	drivers/usb/gadget/function/f_fs.c
	fs/f2fs/node.c

Change-Id: Icecd73a515821b536fa3d81ea91b63d9b3699916
2018-03-09 19:10:14 +08:00
Rocky Hao
b8856eb8db arm64: dts: rockchip: rk3308: add tsadc node and basic thermal config
Change-Id: I483802c7c3e0e46f085eb3ef802ccdd9bdb89096
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-03-09 18:46:58 +08:00
Rocky Hao
a231e9c68e thermal: rockchip: add tsadc support for rk3308
Change-Id: Ibf1782ca471c8ad4b14d6fd64eeb123181903adc
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-03-09 18:43:57 +08:00
Frank Wang
c687abf750 ARM64: dts: rockchip: add usb related nodes for rk3308
This change adds usb otg/host controllers and related phy nodes
on rk3308 SoC.

Change-Id: I5fd3acc44614cc3fcb58eb269c2e559ea24ab0f1
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-03-09 18:42:48 +08:00
Frank Wang
bdeb719242 phy: rockchip-inno-usb2: add usb-phy support for rk3308
This change adds usb-phy support for rk3308 SoC and amend related
phy Documentation.

Change-Id: I953af94fb4d55d79ae1cba624a04fb4b84e019f6
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-03-09 18:42:23 +08:00
William Wu
e6f2f6d63e usb: dwc2: power on/off phy for otg mode
The commit dc71e51944 ("usb: dwc2: make otg manage lowlevel
hw on its own") aimed to control the clk and phy power for
otg mode, but it also introduced lost of new problems, so we
revert it.

This patch only controls phy power for otg mode, it can fix
the dwc2 udc start fail issue with the following error log:

dwc2_hsotg_init_fifo: timeout flushing fifos (GRSTCTL=80000430)
dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
bound driver configfs-gadget
dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001

Change-Id: Id6996aecab7f0aaaf12530b7a377144e23ef1667
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-03-09 18:41:31 +08:00
William Wu
1d7b6657a5 Revert "usb: dwc2: make otg manage lowlevel hw on its own"
This reverts commit dc71e51944.

We found that this commit will cause at least three issue:
1. On RK3126C Tablet, plug in OTG cable and U disk first,
   then power on the Tablet, the system will hang because
   of dwc2 interrupt storm.

2. On RK3328-EVB, connect usb to PC first, then power on
   the board, the system will hang because of dwc2 interrup
   store.

3. On Linux system, the OTG Host mode can't detect U disk.

The root cause is that this patch will diable the controller
clk at the end of probe if OTG work as OTG mode, and only
enable the clk again in dwc2_hsotg_udc_start(). However,
the dwc2 interrupt is enabled in dwc2_hcd_init() during probe,
so the dwc2 interrupt maybe triggered but the interrupt pending
state can't be cleared because that the clk has been disabled.
This cause dwc2 interrupt storm problem.

On the other hand, for Linux system, it may config OTG work
as OTG mode, but it never calls dwc2_hsotg_udc_start() to
enable the controller clk becasue there is no gadget application.
So the clk never be enabled, and casue OTG Host mode fail
to detect the U disk.

Change-Id: Id3463225e0232de7078de1e9d39470a6d5e2cea4
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-03-09 18:41:31 +08:00
Rocky Hao
0af992ee2e hwmon: gpio-fan: add thermal control
add devfreq and devfreq_cooling feature for gpio-fan and then
it can be used as thermal cooling device to support IPA thermal
policy.

Change-Id: I376faa485625ac41276df9bbac8188ea8d664b36
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-03-09 17:54:34 +08:00
Sandy Huang
df5cbcb5db arm64: dts: rockchip: rk3308: add display node
add display node: vop, rgb node.

Change-Id: I495079cb18170bd2437670fd6d6e3c7e22438895
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-09 17:50:43 +08:00
Sandy Huang
637d06bb3e drm/rockchip: rgb: add support rk3308 rgb
add support for rgb panel or rgb covert to other interface panel.

Change-Id: I190ce6e08d38f794ecabb863e0def5e74890f75a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-09 17:48:58 +08:00
Sandy Huang
b0c948421f drm/rockchip: vop: add support rk3308
rk3308 vop support win0 and win1:
win0: yuv/rgb and scale;
win1: rgb

Change-Id: Ie95128187f92047794c47273923d231da0ab9e93
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-09 17:48:03 +08:00
Wyon Bi
25f2631acc arm64: dts: rockchip: px30: set default driver strength for lcdc pins
Change-Id: I9b2b158576d43f4674922555ce7426bd6f3a82fd
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-03-09 17:45:20 +08:00
Finley Xiao
e0b38fccd1 clk: rockchip: Fix armclk parent error
There are two clocks between armclk and pll_apll on px30,
but there may be only one clock on some Socs, so it will
get a error pll clock.

Change-Id: I34116a1ec824b884d3745082f3546cd9ab4c0d21
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-09 16:47:58 +08:00
Tao Huang
cc0a17adb1 usb: dwc3: rockchip: use __maybe_unused to hide pm functions
Change-Id: I00df5df23de851275bf1fd96b246b8da6f0e44c7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 14:57:43 +08:00
Tao Huang
cdb20a9b84 power/rk817_charger: fix compile warning when !PM_SLEEP
Change-Id: I673cf160c6cb3ae37b9b01d9d38fd4da13d76aa2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 14:43:59 +08:00
Tao Huang
d787b3af1b drm/rockchip: fix compile error when !PM_SLEEP
Fixes: 75f953253b ("drm/rockchip: implement shutdown function")
Change-Id: Ibef7b87888caad827cd552cfa1818e50912dfb39
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 14:43:44 +08:00
Tao Huang
631b032c03 drm/rockchip: backlight: remove unused backlight_lock
Change-Id: I227f777a8855b8050fb198e9f8a63d9eea47d0a9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 14:43:32 +08:00
Tao Huang
3196045628 OPTEE: rename tee_shm_pool_alloc to rk_tee_shm_pool_alloc
keep compitable with new version driver

Change-Id: I8e3f12e252f712860adad57d84bd231769bd8997
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-09 14:24:18 +08:00
David Wu
67e46ea014 ethernet: stmmac: dwmac-rk: Add MAC driver support for rk3308
Add constants and callback functions for the dwmac on rk3308 soc.
The base structure is the same, but registers and the bits in
them moved slightly, and add the clk_mac_speed for the select
of mac speed.

Change-Id: Ieaea3ade9e51d5118f0eb855d8e02febfb2275d1
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-09 14:12:28 +08:00
David Wu
e421fbd4cb arm64: dts: rockchip: Add saradc node for rk3308
Change-Id: I1b9671a2fd7b214b5268aabb3fdc7063f3ff99e3
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-09 14:11:36 +08:00
David Wu
ad2e5708ac arm64: dts: rockchip: Add io-domain node for rk3308
Change-Id: I57bbb420b8114850a16b3e7ad9f6c3564930d699
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-09 14:11:31 +08:00
shengfei Xu
bc22ab7830 arm64: dts: rockchip: rk3326/px30: add charge animation node
Change-Id: I2c013c6e1f94727de7031420e7cd15e022767171
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-03-09 14:10:02 +08:00
Shawn Lin
c420c1e4db FROMLIST: clk: rockchip: Prevent calculating mmc phase if clock rate is zero
The MMC sample and drv clock for rockchip platforms are derived from
the bus clock output to the MMC/SDIO card. So it should never happens
that the clk rate is zero given it should inherits the clock rate from
its parent. If something goes wrong and makes the clock rate to be zero,
the calculation would be wrong but may still make the mmc tuning process
work luckily. However it makes people harder to debug when the following
data transfer is unstable.

Change-Id: Ifeb4c063cb73e0a444fd8819ef3128256331cd7a
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from https://patchwork.kernel.org/patch/10258071/)
2018-03-09 14:07:09 +08:00
Shawn Lin
3327afc610 arm64: dts: rockchip: enable eMMC for RK3308 FPGA platform
Change-Id: Ib9a9d3161101cab867e5c838189003be6e45e15b
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-03-09 14:06:27 +08:00
YouMin Chen
4b93b8c29f arm64: dts: px30: update ddr_timing
Change-Id: I8c605c9b121695b9f91388767db9e7035a68fe59
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2018-03-09 09:47:41 +08:00
David Wu
9da65c6c17 arm64: dts: rockchip: Add pwm 4 channels for rk3308
Change-Id: Iba2e94d037c6d3e2fa5b4f1217d4e32ff7c35bca
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-08 18:34:19 +08:00
David Wu
8e1d938562 arm64: dts: rockchip: Add i2c nodes for rk3308
Change-Id: I44d19186fd334d6b38dae67cda64205e8a2407d0
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-08 18:33:26 +08:00
Kevin Chen
02a1a8f66c ARM: dts: rk3288-evb-android-rk818-edp: Add system/vendor partition nodes
Change-Id: Ie583720ecb1af0aab04dae37519c3c749dd45f1a
Signed-off-by: Kevin Chen <kevin.chen@rock-chips.com>
2018-03-08 18:29:50 +08:00
David Wu
a9673f1df7 arm64: dts: rockchip: Correct the gpio clock for rk3308
Change-Id: Ic7709d0a3f09249d574a15222656c29363d57d50
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-08 15:09:49 +08:00
David Wu
97648a4ce7 arm64: dts: rockchip: px30: Add 12ma strength for rmii mac_refclk pin
If the mac_refclk is provided from mac controller, the pin of mac_refclk
needs to setup 12ma strength, or the signal is not good.
If the mac_refclk is provided from phy, the pin of mac_refclk needs not
to setup 12ma strength, the phy would do it.

Change-Id: I4f6e6d081b4616363d10358c9e36d71cacbdb134
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-08 15:09:24 +08:00
Liang Chen
3efb6d37bd PM / devfreq: record opp rate instead of real clock rate for thermal
Opp rate is used to calc power in thermal framework, so we record
this rate instead of real clock rate.
Devfreq is not ready in target() when use performance governor, so
we need record opp rate in probe().

Change-Id: Iec1918ad5d12124b9f112964f247339e0d50645f
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-03-08 15:08:36 +08:00
Liang Chen
2e0c97d607 clk: rockchip: px30: add more setting of cpu-clk
Change-Id: Ie3f22964f16a636c33c5b215afb6ac8ddd653918
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-03-08 14:42:26 +08:00
Liang Chen
bd5e33aeb5 arm64: dts: rockchip: rk3328: Disable 400MHz and 600MHz for dmc
400MHz and 600MHz aren't supported at present.

This had submitted in commit a8c497e79d
("arm64: dts: rockchip: rk3328: Disable 400MHz and 600MHz for dmc")
but was modified in commit 59af91b563
("arm64: dts: rockchip: auto select opp-table by leakage for rk3328")
by mistake.

Change-Id: I864453d16596798e063a2c3569b260fd1a95c209
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-03-08 09:56:22 +08:00
Finley Xiao
5e4bf4ff0c arm64: dts: rockchip: px30: Enable pvtm
Change-Id: Ib2a0fe5bc2a9e80ea48d35fe526a9efe5df586e7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-07 20:19:33 +08:00