Commit Graph

608760 Commits

Author SHA1 Message Date
Sandy Huang
f3ddf22d15 arm: dts: rockchip: add grf reference for vop
add grf reference for rk3288,rk3368,px30 vop

Change-Id: I89b620b2df45f83bdfc36dd64168107beee9b9fb
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-19 18:39:34 +08:00
Sandy Huang
c2b587fa35 drm/rockchip: vop: config dclk invert from grf register
Some platform like rk3288,rk3368,px30, we need to config grf
register to invert dclk polarity when connector is rgb or lvds.

Change-Id: I9ef9ce09f050ee42c0543d415a9baac1f50a0848
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-19 18:39:34 +08:00
Sandy Huang
04e6e5c7a0 drm/rockchip: vop: add support dclk invert config
Since some special hardware or panel need to invert dclk,
so we add dclk invert config at dts display timing node:

dts sample:

display-timings {
    timing0: timing0 {
        ...
        pixelclk-active = <1>;
        ...
    }
}

Change-Id: I64f053ecda0f607bdd6fd392a0922489502ac274
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-19 18:39:34 +08:00
Rocky Hao
27e0c547c2 arm64: dts: rockchip: update pinctrl for px30
1 move pinctrl into board level dts file.
2 remove pinctrl for sleep state.
in sleep state we do not change pin control and keep the pin control
in otp state, which is used by atf as a flag to control pmic's state.

Change-Id: Ib68b20d4f4ba79d99255f1deb509ff8a741deef2
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2018-04-19 18:35:39 +08:00
Finley Xiao
46d3be8026 Revert "arm64: dts: rockchip: rk3308-evb-v10: Add regulator-early-min-microvolt for core"
This reverts commit 602e4a0969.

Change-Id: If70202a1f8b6837c8804f054e0350b5a63c2e6c2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-19 18:35:03 +08:00
Finley Xiao
a4e0323d13 regulator: of: Use regulator-init-microvolt as early minimum
Change-Id: If491089520b3228484357e08482ae0e955b1226a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-19 18:34:36 +08:00
Finley Xiao
1c571cf228 regulator: core: Fix min_uV and max_uV error of regulator_release_early_min_volt
Fixes: 6882654464 ("regulator: core: Add support to limit min_uV during system startup")
Change-Id: Ie281f77d9e36cd8bc72b075bb7b18b9cb0eb7ec5
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-19 18:34:29 +08:00
Ziyuan Xu
64298fd57f arm64: dts: rockchip: assign 400KHz to i2c bus clock for rk3308-evb
Reduce about 8ms for led driver initialization time

before:
initcall is31fl32xx_driver_init+0x0/0x20 returned 0 after 14832 usecs

after:
initcall is31fl32xx_driver_init+0x0/0x20 returned 0 after 6270 usecs

Change-Id: I3154efa154a484ccf8f9974c8148ff9895b1f68a
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-04-19 17:01:52 +08:00
Nickey Yang
1e9f9ce3af arm: dts: rockchip: force the bootargs for rk3288 linux
Force bootargs for bring up rk3288-linux with RKIMG_BOOT.

Change-Id: I43d03e51abddeb4c29fb4c94bbd2dba774b4abe5
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-04-19 17:01:25 +08:00
Zhangbin Tong
5c831a95a1 firmware: rockchip_sip: Export the sip_smc_vpu_reset API
Change-Id: Id5afcc8d9afc7e5e1cb188a5d4b7a8f1de3f46e8
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-04-18 17:25:32 +08:00
lanshh
1b20f713f1 arm64: dts: rockchip: rk3326-evb-ai-va-v10
1. add lsensor and psensor
2. remove unused sensors
3. add unprepare-delay-ms up to 40 for panel device
4. add bt sco audio support

Change-Id: Iedde0567f0cf4eaa099f7323e812a58f88c58d1e
Signed-off-by: lanshh <lsh@rock-chips.com>
2018-04-18 17:24:20 +08:00
Finley Xiao
602e4a0969 arm64: dts: rockchip: rk3308-evb-v10: Add regulator-early-min-microvolt for core
Change-Id: I2938c0ab6cbf383d49a2f41a6013c1df2567c22c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-18 17:22:03 +08:00
Finley Xiao
3cdb4852bc arm64: dts: rockchip: rk3308: Add dmc node
Change-Id: I50a9b7efaf1a1556bd4aed669a30477f292d06b8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-18 17:22:03 +08:00
Finley Xiao
26b6eb8f9d arm64: dts: rockchip: rk3308: Change cpu opp-microvolt form one entry to three
Single entry is for target voltage and three entries are for
<target min max> voltages. Change cpu opp-microvolt form one entry to
three entries and set maximum acceptable voltage to a high value so that
regulator device can supply multiple consumers at the same time.

Change-Id: I72e2efb9828432ee29773c8e1939a59062127ff7
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-18 17:22:03 +08:00
Finley Xiao
b63f27bbc9 PM / devfreq: rockchip_dmc: Add support for rk3308
Change-Id: Iff7deff76a02360021aacaeaa0d509593f88fb2d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-18 17:22:03 +08:00
Finley Xiao
7eedb273de PM / devfreq: rockchip_dmc: Adjust voltage according to opp table when probe
If dmc node doesn't contain 'system-status-freq' and auto-freq is disabled,
devfreq feature won't be added and only to adjust voltage according to opp
table.

Change-Id: Iaf9d9f61938babff2e08719e2285a8554cfa9389
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-18 17:22:03 +08:00
Finley Xiao
4f67042620 clk: rockchip: rk3308: Add sclk_ddrc
Change-Id: I5cbec62ab78623c1adcb79ac8990e3620223de23
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-18 17:22:03 +08:00
Finley Xiao
6882654464 regulator: core: Add support to limit min_uV during system startup
Now a regulator device can supply multiple consumers at the same time,
if a consumer starts and set a low voltage, another consumer doesn't
start in kernel but has been set a high frequency in bootloader will
abort.

This patch Adds support to limit min_uV during kernel startup to make
sure the voltage can suit the needs of all consumers.

Change-Id: Ibd16a8e44916798021e2470c90a8e3488df206f4
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-18 17:22:03 +08:00
Xuhanrui
859175c093 ARM: dts: add secure drm buffer for rk3229
default disabled

Change-Id: Iea0bfa746de22ba59e356e9eb1f2f957fabcda50
Signed-off-by: Hery Xu <xhr@rock-chips.com>
2018-04-18 16:59:48 +08:00
Zhangbin Tong
440b073db3 ARM: dts: add dts files for rk3128h
Add initial device tree nodes for rk3128h SoC

Change-Id: If2e5e53e3b78ee6272b94be273b90f0b4861341a
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-04-18 14:08:50 +08:00
Leo Wen
9770324ee5 arm64: dts: rockchip: support for rk3326 linux
Change-Id: Idb2133eb6f2d99eaa69def1909968cded6a9c215
Signed-off-by: Leo Wen <leo.wen@rock-chips.com>
2018-04-18 11:42:23 +08:00
Leo Wen
8363eaa39f arm64: rockchip_linux_defconfig: add some configs for rk3326 linux
Change-Id: I52bfb345e64cf8ae0bbd24ff737e50cbfbfb5861
Signed-off-by: Leo Wen <leo.wen@rock-chips.com>
2018-04-18 11:42:23 +08:00
Xing Zheng
ebe6ab37d9 ASoC: rk3308_codec: add hp-ctl and rename to spk-ctl gpio
Change-Id: I67a3c770b06c8f53afdac89bd3423ad776d6ec01
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-04-17 20:54:17 +08:00
Xing Zheng
63ce58c3fa arm64: dts: rockchip: clean up output ctl gpios for rk3308
Add support hp-ctl gpio for amic board, and rename
to spk-ctl from dtsi file. Usually, we should assign
these output ctl gpios according to the specific
product type.

Change-Id: Icf0c29f61bed3c0f48069b9e38ddf47d921fed26
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-04-17 20:54:17 +08:00
Xing Zheng
68e8641c53 ASoC: rk3308_codec: update and apply many advices from vendor
We need to configure each ADC in parallel as much as
possible. The infos from vendor, we add some new
registers to make effect better:

1/ optimize the flows for enable/disable ADC/DAC flows
2/ add support fade-out digital gains for de-pop
3/ many updates

Change-Id: I2e72451201010de96e7dc5c22ff3384ce71767ea
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-04-17 20:54:17 +08:00
Qiang Wu
623da8f83a wifi: add marvell 88W8977 wifi module driver
Change-Id: Ia1e254e2c084621141d837be385d9198962be1cd
Signed-off-by: Qiang Wu <xianlee.wu@rock-chips.com>
2018-04-17 18:54:27 +08:00
ZhouJing
120d153592 video: rockchip: vpu: Support default freq for rk3288w
Change-Id: Ic9e5adfbb129a5af731ce6bf49d4d197e80e9c6d
Signed-off-by: Zhou Jing <tracy.zhou@rock-chips.com>
2018-04-17 16:33:58 +08:00
Liang Chen
aee8a961fc arm: dts: fix typo on nvmem-cell-names of gpu for rk3228
Change-Id: I4e54f11981c7ab7a8a96d28934f757136c986065
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-04-17 14:09:06 +08:00
Joseph Chen
f36de44fad mfd: rk808: set fall event higher priority than rise event
When PMIC irq occurs, regmap-irq.c will traverse all PMIC child
interrupts from low index 0 to high index, we give fall interrupt
high priority to be called earlier than rise, so that it can be
override by late rise event. This can helps to solve key release
glitch which make a wrongly fall event immediately after rise.

Change-Id: Ieda1d6fd3c50cc36742a4740504ec7ce12ea509b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-04-17 11:36:29 +08:00
Algea Cao
efae8c5e28 drm/rockchip: inno-hdmi-phy: Get inno hdmi phy config from dts
Setting inno phy config table in dts. According to tmds clock range, phy
config data can be chosen. We can also filter some video modes which
tmds clock out of range we set.

Change-Id: I666c825921877fe2cdf45c2ccd1415815a4b7715
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-04-17 11:35:49 +08:00
Algea Cao
cbbbff8d5c ARM64: dts: rk3328-evb-android: Add inno hdmi phy config
Change-Id: I9b1c4be3bbc69faafd1c8e605db03e4ff520b2ee
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-04-17 11:35:49 +08:00
Algea Cao
718c3dde0c arm: rockchip_linux_config: enable drm tve
Change-Id: I6c1b81809b31873e751207c29feb045fdcfc1a63
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-04-17 11:15:39 +08:00
Sandy Huang
215c0afafa drm/rockchip: update crtc->primary->fb only for hotplug device.
For hotplug device the crtc->primary->fb should be equal to
fb_helper->fb, otherwise the following path will return false
and lead to connect state error:
->hotplug
	->output_poll_changed()
		->drm_fb_helper_hotplug_event()
			->drm_fb_helper_is_bound()
after user space beging, the above path can return false, because
sometimes user space wants everything disabled, don't steal the display
if there's a master, so we set crtc->primary->fb point to the original
fb when drm_open.

Change-Id: I5343978ce602324dbdc3125b6b98a7b4233149ab
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-17 09:35:33 +08:00
Sandy Huang
afcdeee1b5 drm/rockchip: update rockchip_drm_platform_shutdown
The reason to implement shutdown is for the fake shutdown on the box
product. but after implement this function, panel will still display
overlay plane for about two second when power off. so we directly
close crtc instead of rockchip_drm_sys_suspend() when shutdown.

Change-Id: I60ed3e541e022ad828fd535828fe264aabd40ecb
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-17 09:31:57 +08:00
Meng Dongyang
5ab47a4a46 FROMLIST: usb: dwc2: Fix NULL qh in dwc2_queue_transaction
When a usb device disconnects in a certain way, dwc2_queue_transaction
still gets called after dwc2_hcd_cleanup_channels.

dwc2_hcd_cleanup_channels does "channel->qh = NULL;" but
dwc2_queue_transaction still wants to dereference qh.
This adds a check for a null qh.

(am from https://patchwork.kernel.org/patch/7245251/)
Change-Id: Ia9c7f5febe0bb6f0123cfc85c90beb9fc1d80bdd
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-04-17 09:31:07 +08:00
Wyon Bi
d26d7a61c4 arm64: dts: rockchip: rk3399-evb3-edp: add force-hpd property for edp
Change-Id: I82984011ca0b34ff2b23d24235f3bf00739d0abc
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-04-16 20:25:52 +08:00
Tao Huang
17aa49c0ef arm64: rk3308_linux_defconfig: disable RK_PARTITION
Change-Id: I9ed1abcd7d4d3bd92736f0c5c5460f4952d55144
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-16 20:13:52 +08:00
Tao Huang
5cc52c13d9 arm64: rk3308_linux_defconfig: disable BOUNCE
Save about 4101 Bytes.

Change-Id: I7675e73a078b802db652a541885c1de908f3cd2f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-16 20:05:59 +08:00
Tao Huang
5f0f7744d2 arm64: rk3308_linux_defconfig: disable SPARSEMEM_VMEMMAP
Save about 15MB memory for 64MB device, 8MB for 512MB.

For 64MB device,
before:
Memory: 37984K/63488K available (5182K kernel code, 366K rwdata,
 1740K rodata, 256K init, 521K bss, 25504K reserved, 0K cma-reserved)

after:
Memory: 53348K/63488K available (5182K kernel code, 366K rwdata,
 1740K rodata, 256K init, 521K bss, 10140K reserved, 0K cma-reserved)

For 512MB device,
before:
Memory: 495992K/522240K available (5182K kernel code, 366K rwdata,
 1740K rodata, 256K init, 521K bss, 26248K reserved, 0K cma-reserved)

after:
Memory: 504188K/522240K available (5182K kernel code, 366K rwdata,
 1740K rodata, 256K init, 521K bss, 18052K reserved, 0K cma-reserved)

Change-Id: Ica3431aff50a52e3d66d9e203f2313fcfdca068b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-16 20:05:40 +08:00
Tao Huang
588c1da038 arm64: rk3308_linux_defconfig: enable PROC_PAGE_MONITOR
Use 8356 bytes. Make memory size debug easy.

Change-Id: I308221dde7bb3521748bfdbe5931b37a4848dc51
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-16 19:13:58 +08:00
Sandy Huang
de1bd7d791 drm/rockchip: get kvaddr for some SPI panel
some low solutation SPI panel, the display content should be
send through the SPI interface, so add to get the kernel virtual
address, which can be accessed by cpu and SPI interface.

Change-Id: I9823162e682819309bf61d3b132eb452b73fdd3a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-16 16:23:01 +08:00
Zheng Yang
3ffff820ed phy: rockchip: inno-hdmi: fix 3229 div zero error in recalc_rate
Pre PLL pclk_dividera value range is from 1 to 31, but the default
value of register 0xe0 on 3229 is zero. To avoid div zero error,
we take the divider value as one.

[<c0110070>] (unwind_backtrace) from [<c010bcbc>] (show_stack+0x20/0x24)
[<c010bcbc>] (show_stack) from [<c040f56c>] (dump_stack+0x80/0xa0)
[<c040f56c>] (dump_stack) from [<c010bbf4>] (__div0+0x20/0x28)
[<c010bbf4>] (__div0) from [<c040d62c>] (Ldiv0_64+0x8/0x18)
[<c040d62c>] (Ldiv0_64) from [<c043f310>] (inno_hdmi_rk3228_phy_pll_recalc_rate+0x104/0x114)
[<c043f310>] (inno_hdmi_rk3228_phy_pll_recalc_rate) from [<c043efac>] (inno_hdmi_phy_clk_recalc_rate+0x30/0x3c)
[<c043efac>] (inno_hdmi_phy_clk_recalc_rate) from [<c0980c00>] (clk_register+0x438/0x64c)
[<c0980c00>] (clk_register) from [<c0980e68>] (devm_clk_register+0x54/0x94)
[<c0980e68>] (devm_clk_register) from [<c0440028>] (inno_hdmi_phy_probe+0x24c/0x378)
[<c0440028>] (inno_hdmi_phy_probe) from [<c0566424>] (platform_drv_probe+0x60/0xac)
[<c0566424>] (platform_drv_probe) from [<c05645bc>] (driver_probe_device+0x120/0x2a8)
[<c05645bc>] (driver_probe_device) from [<c05647bc>] (__driver_attach+0x78/0x9c)
[<c05647bc>] (__driver_attach) from [<c0562a28>] (bus_for_each_dev+0x84/0x98)
[<c0562a28>] (bus_for_each_dev) from [<c05640d0>] (driver_attach+0x28/0x30)
[<c05640d0>] (driver_attach) from [<c0563c5c>] (bus_add_driver+0xdc/0x1f8)
[<c0563c5c>] (bus_add_driver) from [<c056533c>] (driver_register+0xac/0xf0)
[<c056533c>] (driver_register) from [<c0566364>] (__platform_driver_register+0x40/0x54)
[<c0566364>] (__platform_driver_register) from [<c122af4c>] (inno_hdmi_phy_driver_init+0x18/0x20)
[<c122af4c>] (inno_hdmi_phy_driver_init) from [<c0101ad4>] (do_one_initcall+0x114/0x1c8)
[<c0101ad4>] (do_one_initcall) from [<c1200ef0>] (kernel_init_freeable+0x1ac/0x280)
[<c1200ef0>] (kernel_init_freeable) from [<c0c5e4c8>] (kernel_init+0x18/0x11c)
[<c0c5e4c8>] (kernel_init) from [<c0107550>] (ret_from_fork+0x14/0x24)

Change-Id: Ib61fbd87547d3316e9ed5b564e291b6c15d93cdd
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-04-16 16:23:00 +08:00
Tony Xie
4f0b7f5826 PM / OPP: Add "rockchip,board-irdrop" and "rockchip,evb-irdrop" binding
Change-Id: Iae0e4aad260347eb03726d13ef91411cfdf6b556
Signed-off-by: Tony Xie <xxx@rock-chips.com>
2018-04-16 16:23:00 +08:00
Liang Chen
8748fb44c2 ARM: dts: rockchip: adjust opp-table by leakage for rk322x
Change-Id: I3758f2915a9eea0febf982c49c9452f17b6eba3c
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-04-16 16:22:55 +08:00
William Wu
0c5fe85302 phy: rockchip-inno-usb2: fix a clang warning
This patch fix the following clang warning:
[clang]drivers/phy/rockchip/phy-rockchip-inno-usb2.c:1255:3:
warning: Value stored to 'delay' is never read

Change-Id: I8c70975e1bc2b24a78d0934ccefc9d67fe3a5da9
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-16 11:49:41 +08:00
William Wu
b33c8e4b63 usb: dwc_otg_310: hcd: assign reg address to hc_regs
In dwc_otg_hcd_endpoint_disable(), the hc_regs is initialized
to NULL, but never assign a host channel reg address to it,
so the chdis operation can't be handled for ever.

This patch gets a host channenl reg address for hc_regs via
qh->channel->hc_num.

Change-Id: I5917df1975000876d28868ed51e218489ed3d209
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-16 11:49:41 +08:00
William Wu
fbd5567d33 phy: rockchip-inno-usb2: reduce the otg schedule delay time
Reduce the otg schedule delay time from 6s to 1s to do
the first time usb charger detection earlier when power
on system with usb cable connect to PC USB. Because the
usb connection willed be disconnectted during usb charger
detection.

And the patch also makes the phy detect the usb disconnetion
more quickly after usb cable plug out.

Change-Id: I9b55317ab3592f517fdf590fea85c4ed403bbd8d
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-16 11:49:41 +08:00
Liang Chen
381d236c72 clk: rockchip: mark rkvdec clk as critical clk on rk3228
Change-Id: I08d8eaa8002a955cf38a90b0a750731e7afae63e
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-04-16 10:45:56 +08:00
Hu Kejun
53219cd8f3 arm64: dts: rockchip: Add rkisp1 for rk3399
Change-Id: Ie0eb7088d08f9c0cbd0443b6f9c635ade9b4cc8f
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-04-13 18:46:31 +08:00
Finley Xiao
c05bc80b87 soc: rockchip: pvtm: Fix the number of channels for px30
Change-Id: Ieaa208baa2abbdc5cc8f341c183587354a202a13
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-13 17:06:39 +08:00