Thers is a phy config clock in RK3399, it must be enable before phy
init, and be disable after phy init.
Change-Id: Idb2d4c85f5284065c3f1d540d9e2fddf5565040d
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
fix warning:
warning: format '%x' expects argument of type 'unsigned int',
but argument 2 has type 'size_t'
Change-Id: Ifab0d16f0229aa3d5fc244678298fa2138bd4aa1
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
The vopb/vopl switch register of rk3399 mipi is different from rk3288,
the default setting for mipi dsi mode is different too, so add a
of_device_id structure to distinguish them, and make sure set the
correct mode before mipi phy init.
Change-Id: I54542752dddd1b28fc0500c0a763f14c29fe98f0
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Fix a typo making the sclk_i2c4 and sclk_i2c8 access a
wrong register bit offset to handle its gate.
Change-Id: I836244b8e14aa34ef44241c8ff24ebd6b63ed23a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
In current of-thermal, the .set_trip_temp only support to
set trip_temp for SW. But some sensors support to set
trip_temp on hardware, so that can trigger interrupt,
shutdown or any other events.
This patch adds .set_trip_temp() callback in
thermal_zone_of_device_ops{}, so that the sensor device can
use it to set trip_temp on hardware.
Change-Id: I879ea144a9ac21a5032dd885118887b4942c96cf
Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit 60f9ce3ada53498409d51da06502392884933f89)
Add resource managed version of thermal_zone_of_sensor_register() and
thermal_zone_of_sensor_unregister().
This helps in reducing the code size in error path, remove of
driver remove callbacks and making proper sequence for deallocations.
Change-Id: Ie2e47805f398ff7b4f1dcc71e0581221d79ba9d2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit e498b4984db82b4ba3ceea7dba813222a31e9c2e)
The gt9xx touchscreen should be used by rk3399 evb board.
The rk3399-monkey.dtsi and rk3399-chrome.dtsi just run the different OS.
So... we should move the touchscreen node into the rk3399-tb.dtsi.
Change-Id: Ida8203e045e0fc0eb49e8a37e4ad609c230e040f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
The gru/kevin board works the iodomain with gpio regulator.
That's useful for rk3399 kevin/gru board.
Change-Id: I70b6185e3a21a038347b9f8ccd679908817184dd
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Technically emerging the kernel with USE=kgdb is supposed to get most of
this. ...and the kernel command line is supposed to come from
elsewhere. Until we get that happier, maybe this CL is useful.
Change-Id: Idd0100b623eb88b4a4a26922754b71f5cbcd602a
Signed-off-by: Douglas Anderson <dianders@chromium.org>
It's useful. Might be something we can leave on even in a real kernel.
We'll have to see. We have common clock debugging...
Change-Id: I3c1cb55b067a4c54bb425d23664c5f1474016c92
Signed-off-by: Douglas Anderson <dianders@chromium.org>
This patch is learn from Marek Szyprowski's patch:
(drm/exynos: rewrite IOMMU support code)
The patch replaces usage of ARM-specific IOMMU/DMA-mapping related calls
with new generic code for managing DMA-IOMMU integration layer. It also
removes all the hacks, which were needed to configure common DMA/IO address
space on the virtual rockchip-drm device.
Change-Id: I5d2b90002bf135a72ce30cc8503a7d06769835f3
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
There are two VOP in rk3399 chip, respectively VOP_BIG and VOP_LIT.
most registers layout of this two vop is same, their framework arm both
VOP_FULL, the Major differences of this two is that:
VOP_BIG max output resolution is 4096x2160.
VOP_LIT max output resolution is 2560x1600
VOP_BIG support four windows.
VOP_LIT only support two windows.
RK3399 vop register layout is similar with rk3288, so some feature can reuse
with rk3288.
Change-Id: I76f94c93b0e63e4fbba51755e92c604211613e8b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This initial patch adds to support the gru/kevin board for rk3399 SoCs.
It builds at least:
make -j32 ARCH=arm64 CROSS_COMPILE=aarch64-cros-linux-gnu- dtbs
Change-Id: I7f3841513da130c107aca0d6b393b2bf269a5396
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Add devicetree bindings for i2s controller found on rk3399
processors from rockchip.
It's helpful to add full set of compatible strings for serials
of Rockchip SoCs (rk3066, rk3188, rk3288, rk3399).
Change-Id: Ida3f9ffecda52d81016bdb6edb640568ed8c872a
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 255edcdfab3d1a45b78d1dacd845d6da5fc64b03)
Change-Id: I9b769b160410cdf0a06c2d6b3b77d563d3672beb
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 4ab936d1aca69978dc738592a00e34f836bda1c3)
there maybe more than one i2s module inside chip, and these i2s modules
have different channels features.
for example: there are 3 i2s in rk3066, one support 8 channels playback
and 2 channels capture, but the others only support 2 channels playback
and 2 channels capture.
in order to compatible with these various chips, we add playback and
capture property to specify these values.
there are default channels configuration in driver: 8 channels playback
and 2 channels capture. if not add property, we use the default values.
Change-Id: I45f3214160877223ba9722bd38a36584e416b14d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit c4f9374ddc461ed76be30f4d354a6d1ecb94dfa5)
This patch sets the dividers autonomously.
when i2s works on master mode, and sample rates changed. We need to change
bclk and lrck at the same time for cpu internal side.
As the input source clock to the module is MCLK_I2S,
and by the divider of the module, the clock generator generates
SCLK and LRCK to transmitter and receiver.
Change-Id: I377f0f08656659787b980785fab0b69197b7b80b
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 2458c37779ddb91b4109949d86f5a5e193ba415b)
This patch like below:
----
commit 3860aa1ccfe01adb6c3fd09e880d812ceb408e5c
Author: Heiko Stuebner <heiko@sntech.de>
Date: Sat Jan 9 03:18:51 2016 +0100
ARM: dts: rockchip: swap i2s clock ordering on rk3036
For sound setups using the simple-card mechanism, the main clock
(sysclk) is expected to be the first element. For the i2s-driver
itself it doesn't matter, as it uses named clocks, so we can just
swap them.
----
If we set HCLK_I2Sx at first, rockchip_i2s_set_sysclk will set the
HCLK_I2S freq (from example is 100MHz) to set the i2s_div, it is
incorrect.
Change-Id: Iab69d541c47d1293a784ebffc23f6c1ceaf9c0b1
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>