Commit Graph

596482 Commits

Author SHA1 Message Date
Jianqun Xu
b28ea989d6 ARM64: dts: rk3399-evb2: ajust cpu opp table to make evb2 more stable
Since evb2 couple with ES1, the power consumption is large enough to
shutdown device in some case.

Let's reduce it's support lists to make things simple.

Change-Id: I145aa0c6a21e41b3c8e6ff32fd15839baa15f81e
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-25 14:13:06 +08:00
Bin Yang
4a34c58891 arm64: dts: rockchip: remove unused usb node for rk3399 mid
Change-Id: Ie8883d36a829b08d0963cbd7dbe183404b761093
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-08-25 14:00:51 +08:00
David Wu
a96cdb46d9 ethernet: rockchip: add pd_gmac support for rk3399
Change-Id: I990e02f585ae9b2ecf99a7e996cd23041ca19a2b
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-08-25 11:44:20 +08:00
Jacob Chen
76f0eddbd3 ARM: dts: rockchip: enable tsadc for fennec
Change-Id: Id177ffb022046e569c23bf46a5546ac64450e801
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-08-24 19:50:23 +08:00
Zhou weixin
cc9843b1ee arm64: dts: rockchip: use vop_pwm on rk3399-mid-818-android
To control backlight for support cabc.

Change-Id: I8f980174e57c91e264f0ddfb754a670196649b62
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-08-24 19:29:22 +08:00
Huang Jiachai
099974363c video: rockchip: vop: 3399: cabc mode indicate whether cabc enable or not
Change-Id: Ia4911d746c934b91a887881660373e4b4824f314
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-08-24 19:27:21 +08:00
Huang Jiachai
f4f1e0ae85 video: rockchip: fb: add function for vop pwm config done
Change-Id: I80350293c644fc0db1f613b3de14e34b7f3bc0f2
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-08-24 19:27:08 +08:00
Shawn Lin
a8b00ad1cc arm64: dts: rockchip: disable PCIe and PCIe-phy on rk3399-evb
Let's disable it as the auto link training of PCIe
take quite long time without add-in card or M.2
devices available.

Change-Id: I4a48a44574b68da75845a6e614a9970bb5d6685b
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-08-24 18:42:01 +08:00
Shawn Lin
d04a2e0a16 arm64: dts: rockchip: fix pcie and pcie-phy support for rk3399
Fix them for matching what the new drivers want.

Change-Id: I6ce43379ab9cf3d274b6b414ec014e431db588b7
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-08-24 18:40:58 +08:00
Shawn Lin
65d9e9a6ab PCI: rockchip: Add Rockchip PCIe controller support
Add support for the Rockchip PCIe controller found on RK3399 SoC platform.

Change-Id: Ic924a0defaef195575beba4dfc92c33b6b5bc3e7
[Shawn: manually backport to 4.4 with some minor changes]
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
2016-08-24 18:24:29 +08:00
Bjorn Helgaas
3c6d612196 UPSTREAM: PCI: Add devm_request_pci_bus_resources()
Several host bridge drivers iterate through the list of bridge windows to
request resources.  Several others don't request the window resources at
all.

Add a devm_request_pci_bus_resources() interface to make it easier for
drivers to request all the window resources.  Export to GPL modules (from
Arnd Bergmann <arnd@arndb.de>).

Change-Id: I4b89f0739d66d6027bfd2a01e9e93f5218ade617
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 950334bcf1)
2016-08-24 18:24:18 +08:00
Shawn Lin
d1328c43c5 phy: add a driver for the Rockchip SoC internal PCIe PHY
This patch to add a generic PHY driver for rockchip PCIe PHY.
Access the PHY via registers provided by GRF (general register
files) module.

Change-Id: Ieba96d9cdf0d96302f38d29789615e2ec93f3440
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-08-24 18:23:48 +08:00
Nickey Yang
7bc7cbf91c ARM: dts: rockchip: fix i2s&spdif interrupts on rk3288
These must be translated from the values in the TRM by subtracting 32,
which has not been done.

Change-Id: I8d26bd63d39009b60b310e7ccbcd5de814863861
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2016-08-24 16:07:00 +08:00
buluess.li
a03cd4c58d ARM64: dts: rk3399-evb: add gsl3673 node for rk3399-evb
Change-Id: I8b8232dd280a436e330292794b36f617ae3c0a9d
Signed-off-by: buluess.li <buluess.li@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-24 16:06:29 +08:00
Meng Dongyang
44c76fdc01 mfd: fusb302: change to host when connect type-c to standard-a cable
When connected with type-c to standard-a cable, inno phy will
generate an interrupt before setting the state of typec to host,
which result in detecting of battery charger. This patch change
the state to host before interrupt happen.

Change-Id: I6a2e15c264bd6729c3b8d23af23ad15145559b20
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2016-08-24 16:03:55 +08:00
Xu Xuehui
c75676bb6f bluetooth: rfkill-bt: enalbe 32K for ap6356
Change-Id: I71a14f38ab1d46bbf3bfc991140a20d8c6a27eec
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
2016-08-24 15:49:25 +08:00
Shawn Lin
2d43f4dc41 dt-bindings: PCI: rockchip: Add DT bindings for Rockchip PCIe controller
Add a binding that describes the Rockchip PCIe controller found on Rockchip
SoCs PCIe interface.

Change-Id: Ifb84320315c06759612f2b3d9b2b6ff3e1e5cb1e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Acked-by: Rob Herring <robh@kernel.org>
2016-08-24 14:14:49 +08:00
Shawn Lin
053fd60c2d Documentation: bindings: add dt documentation for Rockchip PCIe PHY
This patch adds a binding that describes the Rockchip PCIe PHY found
on Rockchip SoCs PCIe interface.

Change-Id: I18940e940e0c951d3e2d6bb3b2131a37727a430d
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-08-24 14:14:30 +08:00
Zhou weixin
487c53d3b9 pwm: rockchip: Make pwm polarity to be configured correctly
If pwm polarity was configured with different values at uboot,
the enable_conf would not be configured correctly.

Change-Id: I55b9ccc262382951a8a82810f1be74ce9460f266
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2016-08-24 13:12:36 +08:00
Zorro Liu
5aa50a28af driver,mpu6500: modify _RATE_DEBUG
Change-Id: Iaa1f9c099db659aa7ef9f05efb99c4279569bcf8
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-08-24 13:07:43 +08:00
Zorro Liu
f1a5e64dd8 driver,mpu6500: improve readfifo
while (fifo_count == 0) && (kfifo_len(&st->timestamps) > 0) then flush fifo

Change-Id: I9b4ab975d708ee1bb02435bca933ce8f3b55e037
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-08-24 13:07:34 +08:00
Wu Liang feng
6e4ff77147 arm64: dts: rockchip: optimize clks for rk3399 dwc3
1. modify clock-names, according to Heiko's suggestion, clock names
should always be in the scope of the device block (named after what
it supplies), and clock-names are always meant from the perspective
of the individual ip-block.

2. remove unnecessary clocks, refer to rk3399 TRM, aclk_usb3 is the
parent of aclk_usb3otg0/1 and aclk_usb3_grf, and we will enable
aclk_usb3otg0/1 and aclk_usb3_grf, so don't need to enable aclk_usb3
again. In addition, the aclk_usb3_rksoc_axi_perf clk is used for usb3
performance monitor module which we don't use now, so don't need to
enable it.

Change-Id: I1d50a72d1523b8b70f1e5f388dc357807131dd7c
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-08-24 13:04:49 +08:00
Huang, Tao
9c92b942b2 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: Ic222560c0d8ea4af2e9a7a5429f2f49abe7e8a52
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-08-23 18:32:02 +08:00
David Wu
4a6ef342d4 ARM64: dts: rockchip: add pinctrl gpio config for rk3399
Change-Id: I84800a35a95d1de61e3ddce6e7db92efb24bbf59
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-08-23 18:31:43 +08:00
Wu Liang feng
fe61da8d4e Revert "HACK: phy: rockchip-inno-usb2: disable otg phy suspend for rk3399"
This reverts commit d7d2a689d4.

Change-Id: I937498b790c048bcd49269f258bf59b1946e9bbd
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-08-23 15:03:21 +08:00
Wu Liang feng
56173870ac phy: phy-rockchip-typec: fix rx eq training fail
When do Rx compliance test, PHY is in loopback mode, we
observed that Rx test failed with long cable, and it was
found that equalizer adaptation is not happening properly.
With rx_eq_training forced from PMA, the equalizer adaptation
working fine and Rx test can pass. The root cause is that
the Rx REE component will be turned off when control data
is being received by default PHY configuration. So we need
to unmask REE control data by setting REE control data mask
register, and with this patch, equalizer training will happen
based on the signal coming from controller only.

Change-Id: Ic4fca1045d92381470588c4afccff0cc7318ab4c
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-08-23 09:11:41 +08:00
Huang Jiachai
6a70fe365c video: rockchip: vop: 3399: fix post empty when enable afbdc after resume
userspace will set several frame after vop suspend, so the kernel back
buffer will be freed and after resume vop will read a freed buffer and lead
to post empty, so we close all win before suspend, after resume vop will
display black until userspace set a new frame.

Change-Id: I6648861d2162f221e7fbf85d2361ad245e7b88aa
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-08-22 20:29:40 +08:00
Huang Jiachai
e5930c3ed1 video: rockchip: 3399: close auto gating when enable CABC
Change-Id: Iaeb99bbc1f25998361cd20fc57c97f33fa5ce63a
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-08-22 20:29:07 +08:00
Huang Jiachai
36cd8b8ef4 video: rockchip: vop: 3399: add win lite supprt afbdc abgr format
Change-Id: I5709c6e06e5e3ca8bd7fe19aa970fa933b178c62
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-08-22 20:28:57 +08:00
wuliangqing
bd56b2a14c arm64: dts: rockchip: vr: modify battery parameters
Change-Id: If3d0c2f85ba4f6dd03e1b0436072199677e1cf77
signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2016-08-22 15:09:32 +08:00
wuliangqing
7481e06100 arm64: dts: rockchip: rk3399-vr: support fusb302 and enabled Type-c phy
Change-Id: I117832db612b44b0439a0714743a0d875a2f5897
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2016-08-22 15:08:12 +08:00
dalon.zhang
d3d20ffda5 arm64: dts: rockchip: rk3399-android: isp config add dsi control
Change-Id: I39b3a7a7b03d2255342599d4d8b5482c4f8ac5dc
Signed-off-by: dalon.zhang <dalon.zhang@rock-chips.com>
2016-08-22 15:01:01 +08:00
dalon.zhang
773f80ef8e camera: rockchip: camsys driver 0.0x21.4
Change-Id: Ieddb355952150d170ee52a5d80d25c9642a2ec8a
Signed-off-by: dalon.zhang <dalon.zhang@rock-chips.com>
2016-08-22 15:00:25 +08:00
Jianhong Chen
c24559ff1d arm64: dts: rk3399-sapphire-excavator-edp: add test-power
Change-Id: Iaa8632fa7faaefcf05eab96d175deab7329143c3
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-08-22 14:58:48 +08:00
Jianhong Chen
b01bb5f78d arm64: dts: rk3399-sapphire-excavator-box: add test-power
Change-Id: I7c26c8050f27e898ae951fc118fc717cd0b10fce
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-08-22 14:58:35 +08:00
Jianqun Xu
29e1ce87fd ARM64: dts: rk3399-evb3-edp: disable gt9xx
Since edp screen couple with another type of touchscreen,
so disable gt9xx to reduce i2c errors.

Change-Id: I829ae12039ecaea44c4e0734c18a5ebcd41845f8
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-22 13:04:08 +08:00
Jianqun Xu
17bdfc6eb9 ARM64: dts: rk3399-evb-edp: remove pwm3 of vdd_center
Fix the evb-edp error voltage for vdd_center.

Change-Id: I7f60ee233820ca175aa68074c6c2ba946045303d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-22 09:04:06 +08:00
Nickey Yang
e202c15ec4 ARM: dts: rk3288: remove emmc node for miniarm
This patch remove emmc node for rk3288-miniarm board.
because the new version of the hardware does not use emmc.

Change-Id: I72914a4e570342e5b0b559b3400e0a9db8aea7eb
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2016-08-19 16:32:14 +08:00
Elaine Zhang
9f878e7885 UPSTREAM: regmap: drop cache if the bus transfer error
regmap_write
->_regmap_raw_write
-->regcache_write first and than use map->bus->write to write i2c or spi
But if the i2c or spi transfer failed, But the cache is updated, So if I use
regmap_read will get the cache data which is not the real register value.

Change-Id: Iae06edf8a2a50d2561d351a8398bd3140904630c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from
 git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git
 commit 815806e39b)
2016-08-19 16:15:06 +08:00
Bin Yang
3011102eb1 arm64: dts: rockchip: modify battery parameters for rk3399 mid
Change-Id: Ib77ce93fdd5936059a1ecdc318eebc18e031e1ae
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-08-19 11:12:51 +08:00
Bin Yang
05c9cf8229 arm64: rockchip_defconfig: add rk818 charge config
Change-Id: Ib339cfae1035f36d81d64907f4b034bc387f85b3
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-08-19 11:12:23 +08:00
许盛飞
839acebc93 test-power: add testpower dts-config
Change-Id: Ib2c78602f604d610a648397cbf08c56cdbd77eab
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2016-08-19 11:06:11 +08:00
Jianhong Chen
8888128caa arm64: dts: rk3399-evb: add test-power
Change-Id: I269c4c667ba313d315fa6ee9443bb07f6295127a
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-08-19 11:04:00 +08:00
Jianhong Chen
45730d2cb8 arm64: dts: rk3399-box: add test-power
Change-Id: Id06771f84b07c3b943362369269274a41cabb279
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-08-19 11:01:51 +08:00
Lin Huang
becb293628 FROMLIST: PM / devfreq: event: remove duplicate devfreq_event_get_drvdata()
there define two devfreq_event_get_drvdata() function in devfreq-event.h
when disable CONFIG_PM_DEVFREQ_EVENT, it will lead to build fail. So
remove devfreq_event_get_drvdata() function.

Change-Id: I273e91d4aac48ae25af5ef6de2feb37944cf6e39
Signed-off-by: Lin Huang <hl@rock-chips.com>
2016-08-18 19:20:21 +08:00
Lin Huang
d83fb7d535 FROMLIST: clk: rockchip: rk3399: add SCLK_DDRCLK ID for ddrc
Change-Id: I638d8cd8d6a7a867d10b7595c93c674619b99c30
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-08-18 19:08:28 +08:00
Heiko Stübner
6ba48050cc FROMLIST: clk: rockchip: add clock flag parameter when register pll
add clock flag parameter so we can pass specific clock flag
(like CLK_GET_RATE_NOCACHE etc..)to pll driver.

Change-Id: I1e076b3efa6b5da082b6e68e2e2a4c9dfd93e3d4
Signed-off-by: Heiko Stübner <heiko@sntech.de>
Signed-off-by: Lin Huang <hl@rock-chips.com>
2016-08-18 19:08:11 +08:00
Jacob Chen
0cfd1526dc UPSTREAM: usb: dwc2: Reorder AHBIDLE and CSFTRST in dwc2_core_reset()
According to the databook, the core soft reset should be done before
checking for AHBIDLE. The gadget version of core reset had it correct
but the hcd version did not. This fixes the hcd version.

Change-Id: I49540085036982e6c496a3b911805f0b67fa79e1
Signed-off-by: John Youn <johnyoun@synopsys.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(cherry picked from commit b8ccc593ee)
2016-08-18 18:50:54 +08:00
Jacob Chen
a4dac316c9 UPSTREAM: usb: dwc2: Avoid more calls to dwc2_core_reset()
Calls to dwc2_core_reset() are currently very slow, taking at least
150ms (possibly more).  It behooves us to take as many of these calls
out as possible.

It turns out that the calls in dwc2_fs_phy_init() and dwc2_hs_phy_init()
should (as documented in the code) only be needed if we need to do a PHY
SELECT.  That means that if we see that we can avoid the PHY SELECT then
we can avoid the reset.

This patch appears to successfully bypass two resets (one per USB
device) on rk3288-based ARM Chromebooks.

Change-Id: If9f7275d61af6fd8558124ff9ebc7c3622c1f4a3
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(cherry picked from commit 7d56cc2620)
2016-08-18 18:50:25 +08:00
Jacob Chen
b7e9324dbe UPSTREAM: usb: dwc2: reduce dwc2 driver probe time
I found that the probe function of dwc2 driver takes much time
when kernel boot up. There are many long delays in the probe
function these take almost 1 second.

This patch trying to reduce unnecessary delay time.

In dwc2_core_reset() I see it use two at least 20ms delays to
wait AHB idle and core soft reset, but dwc2 data book said that
dwc2 core soft reset and AHB idle just need a few clocks (I think
it refers to AHB clock, and AHB clock run at 150MHz in my RK3288
board), so 20ms is too long, delay 1us for wait AHB idle and soft
reset is enough.

And in dwc2_get_hwparams() it takes 150ms to wait ForceHostMode
and ForceDeviceMode valid but in data book it said software must
wait at least 25ms before the change to take effect, so I reduce
this time to 25ms~50ms. By the way, is there any state bit show
that the force mode take effect ? Could we poll curmod bit for
figuring out if the change take effect ?

It seems that usleep_range() at boot time will pick the longest
value in the range. In dwc2_core_reset() there is a very long
delay takes 200ms, and this function run twice when probe, could
any one tell me is this delay time resonable ?

I have tried this patch in my RK3288-evb board. It works well.

Change-Id: I1f42ab6b6851f0721bf93d516bee895ebcdd994f
Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(cherry picked from commit 20bde64343)
2016-08-18 18:49:55 +08:00