Commit Graph

598850 Commits

Author SHA1 Message Date
Elaine Zhang
2cecbe21eb clk: rockchip: add dt-binding header for rk3328
Add the dt-bindings header for the rk3328, that gets shared between
the clock controller and the clock references in the dts.
Add softreset ID for rk3328.

Change-Id: I8e6301fd854fe5c9a820fe76d7826db2c1c08b4e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-12-12 10:54:22 +08:00
Jung Zhao
ea6527dba9 arm64: dts: rk3399-android-next: add iommu_enabled property in vpu&rkvdec node
camera will query this property, this is historical issue!!!

Change-Id: Ida221e9f5781dcc5562cad69e2ac437290b946bb
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2016-12-12 10:45:32 +08:00
Huang Jiachai
a8332c3a4c video: rockchip: fb: add dataspace for hdr
Change-Id: I65fb95a550d6afecf6b45f65afbd24047e8d5097
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-12-09 18:54:14 +08:00
Jacob Chen
a92273c7a9 UPSTREAM: ARM: dts: rockchip: Setup rk3288 ethernet0 alias for u-boot
Add an ethernet0 alias for the RK3288 mac interface so
that u-boot can find the device-node and fill in the mac address on
boards that support a wired network interface.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Change-Id: Ie8c4e0d90b62278485446f614fce0c95145432d9
(cherry picked from commit 85ef8d611f)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:37:13 +08:00
Jacob Chen
ef8d344bae UPSTREAM: ARM: dts: rockchip: add interrupt for Wake-on-Lan on RK3288
In order to use Wake-on-Lan on RK3288 integrated MAC, we need to wake-up
the CPU on the PMT interrupt when the MAC and the PHY are in low power mode.
Adding the interrupt declaration.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Change-Id: Iec2637cc0448b6d93b895ca8f4176bab0a1f2dfb
(cherry picked from commit d5bfbeb809)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:35:35 +08:00
Jacob Chen
4cad1381be UPSTREAM: ARM: dts: rockchip: drop unneeded properties from mipi node
The mipi controller node does contain an unused reg property as well as
unnecessary #address-cells and #size-cells properties for subnodes
not using addresses, so remove those to also make dtc happy.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>

Change-Id: I48166c93f7746fa88fe2b35c3a040048926cadf7
(cherry picked from commit 6b241fcccb)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:34:10 +08:00
Jacob Chen
92c9ba6c8e UPSTREAM: ARM: dts: rockchip: add mipi_dsi to VIO power domain on rk3288
The MIPI controllers are part of the VIO power domain so add the
necessary property to indicate this for the controller we support.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Change-Id: I1d51ba1b91dcacb4dfbd6a23d3e609cb66b9426e
 (cherry picked from commit 1946a201b3)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:30:45 +08:00
Jacob Chen
53cefa30c2 UPSTREAM: ARM: dts: rockchip: add channels properties for i2s
add playback and capture properties to compatible various chips.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I7bc186f631212b0b2f3355aa2e371c52a0a99ede
 (cherry picked from commit e241657de0)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:30:17 +08:00
Jacob Chen
b722d4d508 UPSTREAM: ARM: dts: rockchip: move the rk3288 thermal data into rk3288.dtsi
In order to be standard to manage for rockchip SoCs,  move the thermal
data into rk3288 dtsi, we needn't to add a new file for thermal.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I2b11b46d1cfb9b70882d1062dedc5b8ff1bd5adf
(cherry picked from commit f87305fa00)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:24:56 +08:00
Jacob Chen
fd99e06e3f UPSTREAM: ARM: dts: rockchip: fix rk3288 power-domain unit names
The power-domain sub-nodes do have reg properties, but so far are
missing the expected unit names. So add the missing ones.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>

Change-Id: I03d82afdc2f170c7ecce9685e15b418ca5d30d5a
(cherry picked from commit 95cface95b)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:21:51 +08:00
Jacob Chen
36fe783695 UPSTREAM: ARM: dts: rockchip: fix missing usbphy unit-names
The usbphy subnodes do have a reg property but no unitname, add them.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>
Change-Id: I5b48e289b332397ab7c383b839b875aeefa9f114
 (cherry picked from commit a8f0fa2764)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:19:34 +08:00
Jacob Chen
f5feba517b UPSTREAM: phy: rockchip-usb: should be a child device of the GRF
The usb-phy is fully enclosed in the general register files (GRF).
Therefore as seen from the device-tree it shouldn't be a separate
platform-device but instead a sub-device of the GRF - using the
simply-mfd mechanism.

As the usb-phy is part of the kernel for some releases now, we keep
the old (and now deprecated) binding for compatibility purposes.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

Change-Id: I747a18fba361d6c6f161b6572e43955e18593a34
 (cherry picked from commit a0da445aab)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:17:52 +08:00
Jacob Chen
5619148306 UPSTREAM: phy: rockchip-dp: should be a child device of the GRF
The displayport-phy is fully enclosed in the general register files (GRF).
Therefore as seen from the device-tree it shouldn't be a separate platform-
device but instead a sub-device of the GRF - using the simply-mfd mechanism.

The driver entered the kernel in the current merge-window, so we can still
adapt the binding without needing a fallback, as the binding hasn't been
released with a full kernel yet.

While the edp phy is fully part of the GRF, it doesn't have any separate
register set there, so doesn't get any register-area assigned.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

Change-Id: I44a857051be195386fc888b2c713bedc948d5c95
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
 (cherry picked from commit 0311c76e47)
2016-12-09 18:14:14 +08:00
Jacob Chen
7362631009 UPSTREAM: PM / AVS: rockchip-io: make io-domains a child of the GRF
IO-domain handling is part of the general register files, so should live
under the grf directly. This change allows the grf to be a simple-mfd and
the io-domains fetching the syscon regmap from that parent-node.

The old binding is of course preserved, though deprecated.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Change-Id: I562e293fc96283edc868771851f15dba0e80d3bc
(cherry picked from commit bc19b9a81d)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:12:59 +08:00
Jacob Chen
31c917aebe UPSTREAM: arm: dts: rockchip: add reset node for the exist saradc SoCs
SARADC controller needs to be reset before programming it, otherwise
it will not function properly.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Change-Id: Iaafd41b163ebd853278baea5c1c10dc82c54792b
 (cherry picked from commit 3d4267a5a3)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:05:58 +08:00
Jacob Chen
5c2eebd931 UPSTREAM: ARM: dts: rockchip: move rk3288 usbphy under the GRF node
The rk3288 usbphy is completely enclosed in the general register files
and the updated binding allows it to be a subnode of the GRF now.
So move the node appropriately.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Change-Id: I85ca27786da0cd388ef6b4fddb11747761a579a3
(cherry picked from commit 546a3521f2)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:05:05 +08:00
Jacob Chen
ae60551380 UPSTREAM: ARM: dts: rockchip: move rk3288 io-domain nodes to the grf
io-voltage control is actually part of the grf, so move the node under the
newly available grf simple-mfd.

To minimize duplicate code, the core node and compatible property
gets placed in the core rk3288.dtsi while the individual boards
now only need to enable it and add the necessary supply properties.
cherry picked from commit 4b91545072)

Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Conflicts:
	arch/arm/boot/dts/rk3288-miqi.dts
	arch/arm/boot/dts/rk3288-rock2-som.dtsi

Change-Id: I4f5ecc16524c52e8ac6f04cf8b9cdc0e1b7d937f
 (cherry picked from commit 3445b2fae5)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:01:51 +08:00
Jacob Chen
5af9c95978 UPSTREAM: ARM: dts: rockchip: move rk3288 edp phy under the GRF
The edp-phy control is a part of the General Register Files and
with a recent patch in 4.6 the phy driver can now also handle this
correctly, so move the dts node under the GRF as well.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I6be6270739520f758dbe388cdbd50896c1d7d6f1
(cherry picked from commit 4b91545072)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:01:09 +08:00
Jacob Chen
4bce734436 UPSTREAM: ARM: dts: rockchip: make rk3288-grf a simple-mfd
Similar to the pmu, the general register files contain a lot of different
setting bits grouped into general registers, but also some somewhat special
entities like the controls for some phy-blocks or the io-voltage control.
To be able to move these blocks under the grf node where they actually
belong, make it a simple-mfd.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I2c7f9d6f4411ea05520515a45acbaa689814c872
(cherry picked from commit 6e38e6b26e)
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-09 18:00:41 +08:00
wlq
8e6b03ceb3 arm64: dts: rk3399: enabled rkvdec and vpu on android next board
Change-Id: I418b1065de8e078f1cf25f24889ca78006a98a4e
Signed-off-by: huang zufang <hzf@rock-chips.com>
Signed-off-by: zhangjun <jung.zhao@rock-chips.com>
Signed-off-by: liangqing wu <wlq@rock-chips.com>
2016-12-09 17:46:55 +08:00
Randy Li
f14530d44c video: rockchip: rkvdec: add drm&ion allocator support
Now vpu driver support both drm and ion allocator. And have
test on rk3399-mid(drm android 7.1), rk3399-mid(ion android
6.0), rk3288(linux mini arm) platform.

Change-Id: I0096c3928849b1f11a62378675f4559b4f101445
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2016-12-09 17:44:41 +08:00
Jung Zhao
674ed815cc ARM64: dts: rockchip: add rkvpu & vpu node in rk3399 android next dtsi
Change-Id: I8151e5dbc428c6a0eb2bcdba5edb193ca304249c
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2016-12-09 17:31:22 +08:00
Jung Zhao
3f7948b476 arm64: dts: rockchip: add allocator type inside vpu & rkvdec for rk3399-android
Change-Id: Idecb0b1f360173955531fed0eac32407eeb33366
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2016-12-09 16:51:55 +08:00
Mark Yao
2628dafb50 drm/rockchip: fb: allow big framebuffer
Change-Id: I2893ebbd616b79dfa6a1fcd1b98576097cbe4cb3
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-12-09 15:57:23 +08:00
Huang Jiachai
80da81fea7 drm/rockchip: add dither config for connected panel
Change-Id: Ia57d2ab75718d0a7a8b386a7d50e2e23011baeb2
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-12-09 11:03:24 +08:00
Mark Yao
ef24372b31 drm/rockchip: fix iommu_map_sg check
The return value of iommu_map_sg is size_t, it's unsigned

Change-Id: Ib06f61c020510673bc513e1a8fde6fd3980a7ca3
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-12-09 10:56:24 +08:00
Mark Yao
1aae839462 drm/rockchip: fix iommu page fault when use boot logo
Since (cacb6f5 FROMLIST: drm/rockchip: Use common IOMMU API to attach
devices), rockchip drm use common IOMMU API, the boot logo buffer
mapping need change to new api.

Change-Id: Ifa2c886e05d2de65de53a868458c56859519a0f2
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-12-09 10:48:17 +08:00
Andy Yan
20977374c5 power: reset: reboot-mode: treat unrecognized reboot mode as normal mode
Some bootloader will check the reboot mode to take different action, so
we treat unrecognized reboot mode as normal mode to prevent the system
run into abnormal case.

Change-Id: I88063a5b41e4e645443229fa490b2b55db5ccf27
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2016-12-09 10:32:09 +08:00
Zikim,Wei
a9f4187bd9 video/rockchip: rga2 support dma fd
in drm mode ion is not support dma fd, in order
to support drm fd rga driver need fix, and user
also need set the buf type by the macro

Change-Id: I3d0eaf7fbefda5aaf715772649d972b9a9d5c06d
Signed-off-by: Zikim,Wei <wzq@rock-chips.com>
2016-12-08 20:51:42 +08:00
Jacob Chen
51dcc8be0e ARM: dts: rk3288: add isp node
Change-Id: Iadb1bb9afae66a935b0498986c3ee83a0fb487c9
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-08 20:33:10 +08:00
Jacob Chen
67893900ee clk: rockchip: rk3288: export isp and cif clk
Change-Id: I2d9e46383f94cbd8023ad042f3921364c191f852
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-08 20:32:39 +08:00
Meng Dongyang
17edd1a0b6 usb: dwc3: gadget: change detemination method of connect status
In current code, the connect status will be set to connected state when
reset interrupt occur and change to disconnected state in disconnect
interrupt.

But the usb charger may bring about reset signal in accident if we
connect and disconnect quickly. In this case, the dwc3 controller will
change link state and set to connect status, yet not change to
disconnected state when disconnect. So the dwc3 controller suspend
fail and result in a mistake when quick reconnect.

This patch set connect status to connected state when transfer complete
to make sure that usb is connect to PC exactly.

Change-Id: I8e5894d2e08b88bb5434222100d8f5c91c9f1a9d
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2016-12-08 20:22:06 +08:00
Meng Dongyang
78c84e83bb usb: dwc3-rockchip: delay suspend until gadget finish transfer
DWC3 controller still need to read or write memory after dwc3
rockchip receive disconnect notify, the dwc3 controller will not
suspend immediately and the clock is still enabled even if we put
dwc_rockchip sync. So if we reconnect to PC quickly, the transer
will start before dwc3 rockchip receive connect notify and the dwc3
controller will reset during normal transer which result in the gadget
function break.

In order to suspend dwc3 controller and disable clock when transfer
finish immediately, this patch wait for usage_count of dwc3 controller
change to 1 and disconnect interrupt occur then suspend dwc3 controller
and disable clock, make the dwc3 continue transfer after dwc3 rockchip
receive connect notify, otherwise do not reset and get or put dwc3
controller if timeout.

Change-Id: If65344557d77370e9b6cf4bfea84175c37f00057
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2016-12-08 20:21:34 +08:00
William Wu
58f09e08b3 phy: rockchip-inno-usb2: set floating charger type as DCP
Floating charger is a kind of special USB charger that
dp/dm not shorted, which is incompatible with BC1.2 spec.

However, we need to support this floating charger, and
consider that the max charge current of floating charger
is the same as standard USB charger (dp/dm is shorted),
so we set the charger type as DCP for floating charger.

Change-Id: Ifaca7269a3d4660ac095c59776d7e935fe6126df
Signed-off-by: William Wu <wulf@rock-chips.com>
2016-12-08 20:16:10 +08:00
wjh
83d3ced876 drivers: video: rockchip: hdmi: modify RAYKEN5.46 pixclock
Change-Id: Ic2e003d6da16939a95a1c3e844d72b9566aefa4b
Signed-off-by: wjh <wjh@rock-chips.com>
2016-12-08 15:57:16 +08:00
Bin Yang
af67514738 input: touchscreen: fix tp gslxxxx irq number bug
gslxxxx wrong irq number with the same vopb, may cause vopb abnormal.

ts->irq is gpio number, gslxxxx irq number is ts->client->irq
ts->client->irq = gpio_to_irq(ts->irq)

Change-Id: Ic1f6a46437a2a185f3218d3f0406deeddd9d670a
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2016-12-08 14:30:40 +08:00
Jacob Chen
65e5a26d63 arm: configs: enable dsi for rockchip linux
Change-Id: I9c8673adbf858b27e0d1bc06c629030a33f6c982
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-12-08 14:23:56 +08:00
Arnd Bergmann
dc1f06cefa UPSTREAM: phy: rockchip-inno-usb2: fix uninitialized tmout variable
The newly added OTG support has an obvious uninitialized variable
access that gcc warns about:

drivers/phy/phy-rockchip-inno-usb2.c: In function 'rockchip_chg_detect_work':
drivers/phy/phy-rockchip-inno-usb2.c:717:7: error: 'tmout' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This replaces the use of the uninitialized variable with what
the value was in the previous USB_CHG_STATE_WAIT_FOR_DCD
state.

Change-Id: Ibeed4872e1168e135a332a0978d85a4e48083267
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>
(cherry picked from git.kernel.org kishon/linux-phy next
 commit dd796e921e)
2016-12-08 12:09:40 +08:00
Meng Dongyang
a17899cda8 usb: rockchip-inno-usb2: pull down dp/dm for rk3399 u2phy otg-port
The linestate change interrupt may occur during suspend if port is
not connected. This patch pull down dp/dm when suspend.

Change-Id: I31e992727ea63efbda4ecec7ad3af02626eceb44
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2016-12-08 12:00:25 +08:00
Chen Liang
2a499cb249 ARM64: dts: rk3399: adjust idle-cost-data of EAS with idle state
Change-Id: I994371c6a3c2aa99ffd666047a1707754ac96290
Signed-off-by: Chen Liang <cl@rock-chips.com>
2016-12-08 11:40:13 +08:00
Jacob Chen
c74ab90e7b FROMLIST: usb: dwc2: assert phy reset when waking up in rk3288 platform
On the rk3288 USB host-only port (the one that's not the OTG-enabled
port) the PHY can get into a bad state when a wakeup is asserted (not
just a wakeup from full system suspend but also a wakeup from
autosuspend).

We can get the PHY out of its bad state by asserting its "port reset",
but unfortunately that seems to assert a reset onto the USB bus so it
could confuse things if we don't actually deenumerate / reenumerate the
device.

We can also get the PHY out of its bad state by fully resetting it using
the reset from the CRU (clock reset unit) in chip, which does a more full
reset.  The CRU-based reset appears to actually cause devices on the bus
to be removed and reinserted, which fixes the problem (albeit in a hacky
way).

It's unfortunate that we need to do a full re-enumeration of devices at
wakeup time, but this is better than alternative of letting the bus get
wedged.

Change-Id: I3120a38a7f646a9d244f04bd2dcfef7474a4a6d1
Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(am from https://mail-archive.com/linux-kernel@vger.kernel.org/msg1254059.html)
2016-12-08 10:45:57 +08:00
Jacob Chen
2067c051d1 FROMLIST: phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
It is a hardware bug in RK3288, the only way to solve it is to
reset the phy.

Change-Id: Iad8f52b623df3c4460dc321bb55e9c3111455590
Signed-off-by: Randy Li <ayaka@soulik.info>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
 (am from https://patchwork.kernel.org/patch/9324163/)
2016-12-08 10:44:37 +08:00
Jacob Chen
d56a1aeb5a FROMLIST: ARM: dts: rockchip: Point rk3288 dwc2 usb at the full PHY reset
The "host1" port (AKA the dwc2 port that isn't the OTG port) on rk3288
has a hardware errata that causes everything to get confused when we get
a remote wakeup.  We'll use the reset that's in the CRU to reset the
port when it's in a bad state.

Note that we add the reset to both dwc2 controllers even though only one
has the errata in case we find some other use for this reset that's
unrelated to the current hardware errata.  Only the host port gets the
quirk property, though.

Change-Id: I472d33fb1db8b1a6b0c4fcea9ab31fd85b61af40
Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9324169/)
2016-12-08 10:43:34 +08:00
Finley Xiao
7a4207f4ff arm64: dts: rk3399: add a opp-suspend property for cpu opp table
The opp who contains a opp-suspend property will be configured
during suspend or reboot.

Change-Id: I6b2eede43216435f568db6959127a6e84c8cd4c8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-07 20:10:55 +08:00
Finley Xiao
dda739e17d cpufreq: dt: change frequency to a specific value when cpufreq exits
Sometimes all cpus of big cluster are closed and its frequency
keep a high value, in order to reduce power and reset normally,
set frequency to a specific value after close all the cpus.

Change-Id: I88bce25812d1b0ff3f78a898cb161642a65cc523
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-12-07 20:10:39 +08:00
Luo wei
ab0f554c91 arm64: dts: rockchip: rk3399: add dp default mode for rk3399 box discrete vr
Change-Id: If1af58e1654786ece68ed24c115ebca78462f62d
Signed-off-by: Luo wei <lw@rock-chips.com>
2016-12-07 16:49:23 +08:00
Caesar Wang
7a96f91b3f soc: rockchip: power-domain: export idle request
We need to put the power status of HEVC IP into IDLE unless
we can't reset that IP or the SoC would crash down.
rockchip_pmu_idle_request(dev, true)---> enter idle
rockchip_pmu_idle_request(dev, false)---> exit idle

Change-Id: I76733efd2de4f7ee183c1b6bd1545d60038ee31b
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2016-12-07 14:53:43 +08:00
Ørjan Eide
dd7968cf8a CHROMIUM: drm/rockchip: Respect page offset in IOMMU mmap
When mapping buffers through the PRIME DMA-buf mmap path we might be
given an offset which has to be respected. The DRM GEM mmap path already
takes care of zeroing out the fake mmap offset, so we can just make the
IOMMU mmap implementation always respect the offset.

BUG=chrome-os-partner:56615
TEST=graphics_GLBench

Change-Id: Iec83e720b24ddd35a92f3df8312015bc5af798f0
Signed-off-by: rjan Eide <orjan.eide@arm.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/386477
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2016-12-07 14:32:34 +08:00
Ørjan Eide
4edac39a91 CHROMIUM: drm/rockchip: Respect page offset for PRIME mmap calls
When mapping external DMA-bufs through the PRIME mmap call, we might be
given an offset which has to be respected. However for the internal DRM
GEM mmap path, we have to ignore the fake mmap offset used to identify
the buffer only. Currently the code always zeroes out vma->vm_pgoff,
which breaks the former.

This patch fixes the problem by moving the vm_pgoff assignment to a
function that is used only for GEM mmap path, so that the PRIME path
retains the original offset.

BUG=chrome-os-partner:56615
TEST=graphics_GLBench

Change-Id: Iec6e996707b0fe7e95a019423a944d98c80beaab
Signed-off-by: rjan Eide <orjan.eide@arm.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/381332
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2016-12-07 14:32:27 +08:00
Tomasz Figa
31bae78bcc CHROMIUM: drm/rockchip: Call drm_gem_object_release() to destroy GEM base
When converting the driver to use shmem-backed GEMs for IOMMU-enabled
systems, we forgot to add calls to drm_gem_object_release(), which gave
us a quite nice memory leak. This patch adds the missing calls.

Fixes: f11d5f0 ("FROMLIST: drm/rockchip: Do not use DMA mapping API if
attached to IOMMU domain")

BUG=chrome-os-partner:57158
TEST=while true; do backlight_dbus_tool --set --percent=0 && sleep 8 &&
 backlight_dbus_tool --set --percent=100 && sleep 3 ; done

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/385456
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>

Conflicts:
	drivers/gpu/drm/rockchip/rockchip_drm_gem.c

Change-Id: I3c7b21ed22cfb38f512150f76fced3b0cc2b296d
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2016-12-07 14:32:20 +08:00