With atomic modesetting the hardware will be powered off when the
mode_set function is called. We should configure the hardware in the
enable function.
backport: merge output_mode change from Mark yao efd11cc8fa
("drm/rockchip: Correct vop out_mode configure")
Change-Id: Ic68911e7faa24b2e482448346585e3f7c19da1a6
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit ef1844b7ed)
The clk_get_rate return 0 if something goes wrong, so it can never be
less then zero, the ret should be set a error code, otherwise the
cdn_dp_clk_enable will return 0 when it failed at clk_get_rate.
In addition, clk_get_rate() returns an "unsigned long", so use
"unsigned long" instead of "u32" is better.
Change-Id: I0da9a07b5b9fda5f1586e8179013739d47d7ea35
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1488940077-22297-2-git-send-email-zyw@rock-chips.com
(cherry picked from commit a68b5bb670)
Sometimes the Dock is disconnected, but cdn_dp_encoder_disable is not
triggered by DRM. For example, unplug the Dock in console mode, and
re-plug it again, the cdn_dp_event_work will try to get the sink count
of Dock, since the DP is still active. But the Dock has been powered
down, it need re-power on, and wait for a while until it is ready to
DPCD communication.
Change-Id: I59c17a7ce41d5697b33195894eaf4bb49ac85171
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
(cherry picked from commit 13e0e20694)
We're trying to lock mutex when cdn-dp shutdown, so we need to make
sure the mutex is inited in cdn-dp's probe.
Change-Id: Id414cb9441dbaa245ef9899c7972b080fba44d6b
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
(cherry picked from commit be0270e4d1)
Split DT source files to separate out android fireware specific DT
bindings.
Change-Id: I106afeff0485fa8346986693fb227e2c6e4913c2
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
There are multiple devfreq events and they may be used simultaneously.
Change-Id: I6f4c8754d3bcf5c20215a0689eb843a8f617b7a6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Make the function rockchip_dmcfreq_probe() clearer.
Change-Id: Ia752b57000be6fb8135a2576e4892fd489130461
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
as-master = <1>: will set ov9750 as master mode
as-master = <0>: will set ov9750 as slave mode
as-master inexistence: will set ov9750 as normal mode
Change-Id: Ibea5769be6c126b9365ed9333ac931d20ca20f2f
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
If the gpio IRQ type changes, it is possible to accidentally trigger
an interrupt, such as when the input is high, changed from level to
rise edge. For now, the best way to do this is to disable the INTEN
bit first, then configure the type to stagger this period of time.
Change-Id: I71351b9ed6f7920958c7451c2e51ab5f699875d1
Signed-off-by: David Wu <david.wu@rock-chips.com>
RK1808 SoCs support 2*A35, so add cpu1 node to support.
And add xin24m.
Change-Id: Iebac460c8eb55362e7093f2906f4041a69e581dc
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This is needed to enable the AVB specific dm-verity error handler.
Change-Id: Ic367b266d0e39232a6303eb59c82b9b69fc1b9cc
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
This is needed to enable the AVB specific dm-verity error handler.
Change-Id: I331ba1e6f459ec51ff8584cf1471ad05dd90f6db
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Since msleep is based on jiffies the panel could take longer
than expected. So use msleep for values greater than 20 msec
otherwise usleep_range.
Change-Id: Ib03c6e381b44a31dd57aeaaa3a88a459578de313
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Zram allows Linux to make more efficient use of RAM, since
the system can then hold more pages of memory in the compressed
swap than if the same amount of RAM had been used as application
memory or disk cache. This is particularly effective on machines
that do not have much ram space.
Enable:
echo 16M > /sys/block/zram0/disksize
mkswap /dev/zram0
swapon /dev/zram0
More detial: Documentation/blockdev/zram.txt
Change-Id: I23954dbc7df79d4faac02cf7f393dbfc37858ee6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
PVTM use "cpu-supply" as the name of regulator to get PVTM value to
select opp level, but old dts use "cpu0-supply" as the name of cpu,
so we need be compatible with the old regulator name of cpu.
Change-Id: Id6dbb0b4a85e6154b9be38ffb373e7eab7199781
Signed-off-by: Liang Chen <cl@rock-chips.com>
The latest Vmin test result on evb board is as the following.
/* KHz uV */
1296000 1250000
1200000 1200000
1008000 1075000
816000 975000
600000 850000
408000 850000
Each frequency should add 50000uV margin.
Change-Id: Icbe99d2a4d88466381fd418fb74a8b8e9cac7323
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Add devicetree bindings for Rockchip cru which found on
Rockchip SoCs.
Change-Id: I56e151b20f44c13b9f2c55e63860abef4cf586ad
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
The GRF values may be kept the previous status after hot reboot,
if the property 'rockchip,adc-grps-route' is not set, we need to
recover default the order of sdi/sdo for i2s2_8ch/i2s3_8ch/i2s1_2ch.
Change-Id: Ic35b96388aaeca0ed4e0efd4e6ae3de178f88b06
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
We may need to support a variety of different Bluetooth modules
which are from different vendors. In order to develop efficiently,
we need to uniformly set the PCM of the AP to master mode, and
the Bluetooth side as the slave.
Change-Id: I92e76a9e394eea7b3f700bada5ad97ae92a67c69
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
nvme for rockchip platform could be used as both of main disk
or external storage. So it's not proper to fix the partition
type by checking CONFIG_ARCH_ROCKCHIP. Otherwise, if the nvme
is probed earily then the real main disk device, then the main
disk could be failed to mount.
Change-Id: If30940527e99d88d792fe3f19475fabf4b1a99d3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Add the clock tree definition for the new rk1808 SoC.
Change-Id: I86e502b27e0695c77e9937dfd7cffa14b5711954
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
The usb otg doesn't need phy node, because it uses
legacy controller driver "dwc_otg_310". But the phy
node is needed for uboot which uses kernel dtb. And
it's also useful for otg controller driver if we
switch to dwc2 driver later.
Change-Id: I2f06f00861805f0ed3bf3f052aaa5a7e3bc416f8
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch adds rk3368 otg-port phy configurations.
But actually, we don't use the otg phy configurations
for the time being, because we use dwc_otg_310 driver
for rk3368 otg controller, and this driver doesn't use
generic phy. This patch is useful if we switch to dwc2
driver for rk3368 otg in the feature.
Change-Id: Ibed3fde4ef64ad25e933ac4560f956b7c9f5c476
Signed-off-by: William Wu <william.wu@rock-chips.com>