Commit Graph

607311 Commits

Author SHA1 Message Date
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
Finley Xiao
b4c3912dce soc: rockchip: pvtm: Stop calculating cycles first if last status is enabled
Change-Id: I7a2188c9f94d776f5421aa25ac2e6e5f0f3042c8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-07 20:19:25 +08:00
Finley Xiao
c046b46454 soc: rockchip: pvtm: Fix frequency calculate done stutus
Change-Id: I16b0a1bbed3e765093e8cb65bb5524d3b9fa31ec
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-07 20:05:18 +08:00
Zhou weixin
8d7742eb92 arm64: dts: rockchip: rk3326-863-lp3-v10: adjust battery config
Change-Id: I8abb28863b4848ab900dddbd04447c098ffcfb84
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-03-07 17:21:25 +08:00
Finley Xiao
158114da5c clk: rockchip: px30: Make pll_npll critical
Change-Id: I14c44b2a467c58f2285afe6219add2c51e1c66eb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-07 16:49:18 +08:00
Finley Xiao
8e7a8732e3 clk: rockchip: px30: Make hclk_usb_niu critical
Change-Id: Id54f2d3fe123faf92a323a78390e4d0d84c15d6c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-07 15:45:57 +08:00
Sandy Huang
d3cc85847c drm/rockchip: px30 vop: fix iommu pagefault when disable win2
In the bandwidth tension environment when close win2, vop will access
the freed memory lead to iommu pagefault. so we add this reset to workaround.

Change-Id: I22b0c0f145d042e3aaf98fb45ffff6304c93963c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
Sandy Huang
50b9027229 drm/rockchip: fix some problem on the process
Because when enable uboot logo display, vop_crtc_enable() will not be
called when power on, this will lead to some vop initial like
axi channel and some debug irq will not be enabled. so we move some
config to vop_initial() and call from vop_crtc_loader_protect().

Change-Id: I86f02e2e7d12b78cce17e278baaf6dff93137167
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
Sandy Huang
9c0c016732 drm/rockchip: vop: add feature for alpha add scale
some version vop unsupport pixel alpha add scale, this case
will lead to display error and post empty.

Change-Id: I32820a14292b46ce61fd30bfccdaa5e4f635de49
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
Sandy Huang
285f058cfe Revert "drm/rockchip: px30 vop: delete win2"
This reverts commit 424a08f4cb.
Change-Id: I32820a14292b46ce61fd30bfccdaa5e4f635de4b
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
Sandy Huang
5851d77b10 Revert "drm/rockchip: px30 vop: set win2 zorder to 2"
This reverts commit 91b8d990c0.
Change-Id: I32820a14292b46ce61fd30bfccdaa5e4f635de4a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-03-07 15:17:23 +08:00
xxh
4fff6af1a3 arm: dts: rockchip: RK3229 EVB board for bluetooth
Change-Id: I9903cd96f1a1b52f610dbbd014e3b9409d4ec56d
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
2018-03-07 15:16:10 +08:00
David Wu
39ddab2681 pinctrl: rockchip: Add pinctrl support for rk3308
The most pins of rk3308 are 2bits iomux, but the banks's register
width is 0x8.

Change-Id: I3305810b3f75febd6ec7a933b65e3c9d50f003dd
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-07 14:19:48 +08:00
David Wu
fd09897f20 PM / AVS: rockchip-io: add io selectors and supplies for rk3308
This adds the necessary data for handling io voltage domains on the rk3308.
As interesting tidbit, the rk3308 contains one iodomain area at grf,

Change-Id: Ife72a284a8926d02ef5df7a422d41924494d0300
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-07 14:19:34 +08:00
Shawn Lin
ed8bb5c154 arm64: dts: rockchip: Add MMC node for rk3308.dtsi
Change-Id: I9942f0ceb474d5411242fa79337782c0b15c7aa2
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-03-07 11:18:32 +08:00
Wyon Bi
5d9f7b3e1b arm64: dts: rockchip: Enable SD/SDIO 3.0 for px30-evb lvds board
Change-Id: I5c9006c7ae02fa8fca6025f1efd8ae902c294002
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-03-07 09:27:02 +08:00
Zhen Chen
789d098dd4 MALI: bifrost: rockchip: not to enable clk_gpu when probing
Otherwise, clk_gpu won't be disabled actually in the runtime.

Change-Id: I92787a5e23bfb92f5a79efda92c130832751cc3b
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-03-07 09:19:16 +08:00
Evgeniy Didin
192b050c35 UPSTREAM: mmc: dw_mmc: Fix the DTO/CTO timeout overflow calculation for 32-bit systems
The commit 9d9491a7da ("mmc: dw_mmc: Fix the DTO timeout calculation")
and commit 4c2357f57d ("mmc: dw_mmc: Fix the CTO timeout calculation")
made changes, which cause multiply overflow for 32-bit systems. The
broken
timeout calculations leads to unexpected ETIMEDOUT errors and causes
stacktrace splat (such as below) during normal data exchange with
SD-card.

| Running :  4M-check-reassembly-tcp-cmykw2-rotatew2.out -v0 -w1
| -  Info: Finished target initialization.
| mmcblk0: error -110 transferring data, sector 320544, nr 2048, cmd
| response 0x900, card status 0x0

DIV_ROUND_UP_ULL helps to escape usage of __udivdi3() from libgcc and so
code gets compiled on all 32-bit platforms as opposed to usage of
DIV_ROUND_UP when we may only compile stuff on a very few arches.

Lets cast this multiply to u64 type to prevent the overflow.

Change-Id: I45462bac22f946c5129eab0e0d5b22b3ed7ca19d
Fixes: 9d9491a7da ("mmc: dw_mmc: Fix the DTO timeout calculation")
Fixes: 4c2357f57d ("mmc: dw_mmc: Fix the CTO timeout calculation")
Tested-by: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Reported-by: Vineet Gupta <Vineet.Gupta1@synopsys.com> # ARC STAR
9001306872 HSDK, sdio: board crashes when copying big files
Signed-off-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: <stable@vger.kernel.org> # 4.14
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from c715160225)
2018-03-07 08:46:47 +08:00
Shawn Lin
6246a99df7 Revert "FROMLIST: mmc: dw_mmc: Fix the DTO timeout overflow calculation for 32-bit systems"
This reverts commit 9c8f6bbf41.

Change-Id: I526d0748a998520ac3e65098c4d4cb4aa9ef4545
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-03-07 08:36:44 +08:00
Shawn Lin
776f510784 Revert "mmc: dw_mmc: Fix the CTO timeout overflow calculation for 32-bit systems"
This reverts commit bc6e99f243.

Change-Id: I8649faa9e16baa0024030f9f58482840c90fb255
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-03-07 08:36:37 +08:00
shika.zhou
1322dd69bb ARM: dts: rockchip: rk3229-evb-android: fix hdmi_sound mclk-fs from 256 to 128
Change-Id: I214ea50044c675067262392c36cdc917cbb2bb02
Signed-off-by: Didong Zhou <shika.zhou@rock-chips.com>
2018-03-06 18:29:39 +08:00
Finley Xiao
81206a0348 arm64: dts: rockchip: rk3308: Add cru node
Change-Id: Ica80020436931a5b146581b26e419f49c0077635
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-06 18:17:49 +08:00
Finley Xiao
539fd81fc6 clk: rockchip: Add clock controller for the RK3308
Add the clock tree definition for the new RK3308 SoC.

Change-Id: I1c0794b290207d28102e8d30cca13bbbf54ccfb8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-06 18:17:49 +08:00
Finley Xiao
229a58abce clk: rockchip: Add dt-binding header for rk3308
Add the dt-bindings header for the rk3308, that gets shared between
the clock controller and the clock references in the dts.

Change-Id: I9c6ea1228417f07603d89f810726e9cdffd2a10a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-06 18:17:49 +08:00
Finley Xiao
44977b50e8 dt-bindings: Add bindings for rk3308 clock controller
Add devicetree bindings for Rockchip cru which found on
Rockchip SoCs.

Change-Id: Ib28b15d3011704a04294672f82d6a8f855da1536
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-03-06 18:17:49 +08:00
Huang jianzhi
385b64ec76 ARM: dts: rockchip: enable nandc on rk3229-evb-android board
Change-Id: Ibb6af409aa5409eb4d1e0933ef15fa80126ec807
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2018-03-06 17:36:42 +08:00