Commit Graph

610969 Commits

Author SHA1 Message Date
Wyon Bi
bfe130d64a drm/panel: simple: handle small delay durations more precisely
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>
2018-08-10 14:53:00 +08:00
Andy Yan
beacf69d2e arm: rk3308_linux_aarch32[_debug]_defconfig: enable zram support
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>
2018-08-10 14:51:18 +08:00
Elaine Zhang
eb3075d48d clk: rockchip: rk3399: fix up some regs description error
Change-Id: Ia992b20f13ba7037b93fcd2fbd67a4d6b3fd1266
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-10 11:35:18 +08:00
Liang Chen
5b94552057 cpufreq: rockchip: try old regulator name of cpu for PVTM
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>
2018-08-10 11:34:29 +08:00
Finley Xiao
f2e4ad355a arm64: dts: rockchip: rk3308: Reduce 25000uV for 816MHz and 1008MHz
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>
2018-08-10 11:31:14 +08:00
Elaine Zhang
16e3a09855 dt-bindings: add bindings for rk1808 clock controller
Add devicetree bindings for Rockchip cru which found on
Rockchip SoCs.

Change-Id: I56e151b20f44c13b9f2c55e63860abef4cf586ad
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-09 19:43:18 +08:00
Xing Zheng
3e6aa41798 ASoC: rk3308_codec: fix the outdated audio route
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>
2018-08-09 19:41:10 +08:00
Xing Zheng
939100f129 arm64: dts: rockchip: rk3308-evb: switch PCM master for AP side
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>
2018-08-09 19:40:59 +08:00
Jianqun Xu
9eaf334d15 arm64: dts: rockchip: add pinctrl node for rk1808
Add pinctrl node for rk1808 dtsi

Change-Id: I63430d79ecf1349a7e448ee425b8b0f783a1b085
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-08-09 16:26:44 +08:00
Jianqun Xu
b2828bc441 pinctrl: rockchip: add support for rk1808 SoCs
Add support for pinctrl on RK1808 SoCs.

Change-Id: I0688a61af139cc24363b7515036c80d25ff6a738
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-08-09 16:26:40 +08:00
Jianqun Xu
ad01312f2e ARM64: dts: rockchip: include cru header file for rk1808
Change-Id: I5cf677471b87ca5fececa09b46b1dfd3e6eea2c0
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-08-09 15:54:00 +08:00
Shawn Lin
a3c93d1b46 nvme: make partition type depend on saved command line
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>
2018-08-09 14:12:30 +08:00
Elaine Zhang
29c4d612eb clk: rockchip: add clock controller for rk1808
Add the clock tree definition for the new rk1808 SoC.

Change-Id: I86e502b27e0695c77e9937dfd7cffa14b5711954
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-09 09:55:57 +08:00
William Wu
d4cc0ecf0c arm64: dts: rockchip: and phy node for rk3368 usb otg
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>
2018-08-09 09:54:17 +08:00
William Wu
7eb306ed64 phy: rockchip: rockchip-inno-usb2: and otg cfg for rk3368
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>
2018-08-09 09:54:17 +08:00
Liang Chen
38d03d3683 arm64: dts: rockchip: adjust opp-table by pvtm for px30/rk3326
Change-Id: If01552784deb6e3a2d51146fe6e05216e316c132
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-08-08 18:51:42 +08:00
Liang Chen
0b9aadfd54 cpufreq: rockchip: implement get_soc_info() for px30/rk3326 SoCs
Change-Id: I3569ce6447ebda3bef901c0430818090cd5058ca
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-08-08 18:51:33 +08:00
Tao Huang
6b5a070170 soc: rockchip: add CPU_RK1808 config
Change-Id: I01fd798b90e372aaa153ae02b438d4751445343e
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-08-08 18:34:49 +08:00
Elaine Zhang
5112405119 regulator: rk816: support rk816 ES2 chip
Change-Id: Ib9a17be35c5b21b0a8f4b4704b07ca316f02c69c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-08 18:21:46 +08:00
Finley Xiao
56707bc0df clk: rockchip: px30: Set max parent rate for uart fractional divider
Change-Id: Ia77fe3a34de60246ed43c1e43e60ec6fb15dcb19
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-08-08 18:16:14 +08:00
Dingqiang Lin
125b3c4345 drivers: rkflash: add new spi flash
1.SPI nand including HYF, MXIC, XTX
2.SPI nor including XMC, ESMT, MXIC

Change-Id: I35197254e70f65ad85475a8f952ea24111e3499a
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-08-08 12:56:21 +08:00
Dingqiang Lin
3cf664dd57 drivers: rkflash: make printk macro configurable
Change-Id: If4b768f0ebe8186a79b08ec424fd0b70a79f9c83
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-08-08 09:38:55 +08:00
Wyon Bi
f377325281 drm/rockchip: rgb: Fix connector type
Change-Id: I4d4f76b21f2e805f68961416fe8caffd22e529e4
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-08-07 11:13:25 +08:00
Wyon Bi
654b9da60f drm/rockchip: dsi: Remove hardcode link skew
Change-Id: I73e4bbd89e0c688ce708d009526221312bce27d5
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-08-07 11:07:28 +08:00
Wyon Bi
bd920c36fc drm/rockchip: dsi: Don't hardcode/bypass phy default parameters
The parameters of Synopsys PHY is programmed with the default values
for the corresponding hsfreqrange (test code 8'h44, HS RX Control of Lane 0)

Change-Id: I92c6bb0a9cad55e7b1695ca600f9c68804361dac
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-08-07 11:07:28 +08:00
Jian Qiu
c3a9c958ae arm64: dts: rockchip: px30-android: update bootargs
Remove androidboot.selinux=permissive

Change-Id: I6c5ff0a1abd8c4356408f14d68df8ecc1515b7a4
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2018-08-07 10:21:25 +08:00
Zhen Chen
18166b6556 Mali: midgard: set "FMODE_UNSIGNED_OFFSET" bit in file flags of mali device file
According to commit "mmap: introduce sane default mmap limits"

Change-Id: I96bc78053c06fdeaef178662dda36770da867436
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-08-07 09:50:37 +08:00
Tao Huang
6b20cfbfee Revert "UPSTREAM: ANDROID: binder: remove 32-bit binder interface."
This reverts commit 9ffd98e815.
Which breaks 32bit Android <9
Make ANDROID_BINDER_IPC_32BIT depends on ANDROID_VERSION.

Change-Id: Ie599606ce998b27342471f31d1480d0a87135375
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-08-06 18:29:25 +08:00
Hu Kejun
97fd046dc2 media: rockchip: isp1: adjust isp clk by pixel rate of sensor
Change-Id: I47e56b330a8f93f77cbeadd30dde97909ef18379
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-08-06 15:32:53 +08:00
Sugar Zhang
0fb42422c0 ASoC: rk3308_codec: set fmt for all adcs
This patch fixup codec slave mode work abnormal, it is
because the mode bits have not been set. and whatever,
all adcs' fmt should be the same.

Change-Id: Ie5ea7cdddc25c41790797fd2b4ef760a1f2ed727
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-08-03 17:28:23 +08:00
Hu Kejun
bca2464422 media: i2c: modify pixel rate of ov13850/ov4689
Change-Id: I4057edc2cb2292ef17f88c5a5787ec777deabe20
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-08-03 16:42:08 +08:00
Cai YiWei
b628af5d2f media: rockchip: isp1: add suspend/resume to detach/attach isp iommu
when system goto suspend, isp will be powered off,
isp iommu will be disabled, need to attach on resume,
detach on suspend.

Change-Id: I2b5e775b44d2b72df4ddcf2db12b54518c3e1f2e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-08-03 16:35:43 +08:00
Algea Cao
466bcfab4f ARM64: dts: rockchip: rk3328: assign dclk parents for vop
Change-Id: Ie3a5d9dc9aad105deb2f7ac1d1d15494512d42f3
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-08-03 16:34:57 +08:00
Yao Xiao
747439a9e6 net: rockchip_wlan: rtl8189fs: support gpio to wake up for wowlan
Change-Id: I7500c96d21c07c453e4dd6e81a393c08f48728f7
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
2018-08-03 16:32:24 +08:00
CanYang He
16d318c502 arm64: dts: rockchip: prevent some lp4 scale frequency for rk3399 evb3 lp4
lpddr4 scale frequency when display on, cause the display shake and
vop POST_BUF_EMPTY

Change-Id: I2bfef85ae34c3c85609dcb3506272ff0e27cb0c7
Signed-off-by: CanYang He <hcy@rock-chips.com>
2018-08-03 16:30:23 +08:00
Dingqiang Lin
a4b255f987 drivers: rkflash: add 25Q64JVSSIQ and 25Q64FWSSIG nor devices
Change-Id: I3b646acd838b22ce6ab49933454eacb4822e0fa8
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-08-03 11:11:12 +08:00
Jianqun Xu
e1f1329235 dt-bindings: pinctrl: rockchip: Add pinctrl support for rk1808
Add pinctrl support for RK1808 SoCs.

Change-Id: I6f198904c3481b65a3e04c3b687bde7965268e09
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-08-03 11:08:54 +08:00
Elaine Zhang
ce94c78340 clk: rockchip: add dt-binding header for rk1808
Add the dt-bindings header for the rk1808, that gets shared between
the clock controller and the clock references in the dts.
Add softreset ID for rk1808.

Change-Id: I0eef08655037daeab92560f36e06fde4032ddd0c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-03 11:08:06 +08:00
David Wu
ea3d412563 arm64: dts: rockchip: Add pwm node for rk1808
Change-Id: Idc7682b5badda2c1d522152bb7cca2b80a4a1139
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-08-03 11:05:24 +08:00
David Wu
a69c844831 arm64: dts: rockchip: Add i2c nodes for rk1808
Change-Id: Idc9fe2e7b339dd30d770b1fe832bb170a670b393
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-08-03 11:05:24 +08:00
Tao Huang
40aa66fc68 Merge tag 'lsk-v4.4-18.07-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 18.07 v4.4-android

* tag 'lsk-v4.4-18.07-android': (254 commits)
  Linux 4.4.143
  net/nfc: Avoid stalls when nfc_alloc_send_skb() returned NULL.
  rds: avoid unenecessary cong_update in loop transport
  KEYS: DNS: fix parsing multiple options
  netfilter: ebtables: reject non-bridge targets
  MIPS: Use async IPIs for arch_trigger_cpumask_backtrace()
  MIPS: Call dump_stack() from show_regs()
  rtlwifi: rtl8821ae: fix firmware is not ready to run
  net: cxgb3_main: fix potential Spectre v1
  net/mlx5: Fix command interface race in polling mode
  net_sched: blackhole: tell upper qdisc about dropped packets
  vhost_net: validate sock before trying to put its fd
  tcp: prevent bogus FRTO undos with non-SACK flows
  tcp: fix Fast Open key endianness
  r8152: napi hangup fix after disconnect
  qed: Limit msix vectors in kdump kernel to the minimum required count.
  net: sungem: fix rx checksum support
  net/mlx5: Fix incorrect raw command length parsing
  net: dccp: switch rx_tstamp_last_feedback to monotonic clock
  net: dccp: avoid crash in ccid3_hc_rx_send_feedback()
  ...

Fix wrong merge of include/linux/compiler-gcc.h

Change-Id: I1daae1251069d2791d2e29b65942d086fb8ad0ac
2018-08-03 10:09:13 +08:00
Li Huang
9e065854a5 video/rockchip: rga: Remove MMU struct unuse member
it will set alpha_rop_mode to 0, fixup rga blend error.

Change-Id: I6c10df0e4d198ab8da8d352239151ddc3605e860
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2018-08-03 09:37:44 +08:00
Hu Kejun
fad2756f8c media: rockchip: isp1: fix dq timeout
After enter->capture->video->exit->enter ...... long time test,
the shadow register of mi buffer base address can't update
automatically any more.

In application layer, we will get dq timeout error log.

Add CIF_IRCL_MI_SW_RST in rkisp1_isp_stop can fix this bug.

Change-Id: I386d6b2d2c3882fc76eb9f7283e1bc2309ee3210
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-08-03 09:33:02 +08:00
Boris Brezillon
01eef91312 UPSTREAM: leds: pwm: Use pwm_get_args() where appropriate
The PWM framework has clarified the concept of reference PWM config (the
platform dependent config retrieved from the DT or the PWM lookup table)
and real PWM state.

Use pwm_get_args() when the PWM user wants to retrieve this reference
config and not the current state.

This is part of the rework allowing the PWM framework to support
hardware readout and expose real PWM state even when the PWM has just
been requested (before the user calls pwm_config/enable/disable()).

Change-Id: I8286b16dc8d828ba8a66a17675fe6fbedcba480b
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 1b50673dfa)
2018-08-02 19:43:16 +08:00
William Wu
cbc9f84034 ARM: rockchip_defconfig: enable usb configfs uvc
Change-Id: Iccb30e546eecc90ceaa5e4e3039c2f29f2542bde
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-02 19:21:39 +08:00
William Wu
825a3df1a8 arm64: rockchip_defconfig: enable usb configfs uvc
Change-Id: Iade4b2959450e51cb1f75b1b4b1ccbe9cc3fc2e3
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-02 19:21:39 +08:00
William Wu
af0dd3d28b usb: gadget: uvc: fix bFrameIndex of streaming interface descriptor
The bFrameIndex of video streaming interface descriptor
is initialized to 1 in uvcg_frame_make(), but never be
setted for different frame resolutions, this cause host
to fail to select the correct frame resolution. This patch
increases the bFrameIndex in order.

Change-Id: Ic0609976e09d9e3d6f82595c00e2ac7b356e4f5f
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-02 19:21:39 +08:00
William Wu
23f0e17a96 usb: dwc_otg_310: do not clear nak when prepare for setup packet
When prepare setup packet, don't clear nak before call
ep0_out_start(), because clear nak will make the usb
core to handle OUT transaction immediately without
NAK response, this may cause OUT transaction fail.

We can reproduce this issue in the following two case:
 - Configure usb device as rndis, connect to Windows PC;
 - Configure usb device as uvc, connect to Windows PC,
   and take still image;

Use the usb analyzer to capture data in case2,we can
easily to find the problem.

Without this patch, the Class request OUT transfer is:
 - SETUP transaction
 - OUT transaction
   - OUT packet
   - DATA1 packet
   - ACK pakcet
 - IN transactions
   - IN packet
   - NAK packet (response NAK forever)

With this patch, the Class request OUT transfer is:
 - SETUP transaction
 - OUT transaction
   - OUT packet
   - DATA1 packet
   - NAK packet
 - PING transactions
 - OUT transaction
   - OUT packet
   - DATA1 packet
   - ACK pakcet
 - IN transaction
   - IN packet
   - DATA1 packet
   - ACK pakcet

Change-Id: I5ea915bc425ffa2f2a06a1a830f6f88725c94b03
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-02 19:21:39 +08:00
William Wu
6e1353425b usb: dwc_otg_310: do not stop isoc ep transfer when ep dequeue
When dequeue req which already queued on the endpoint,
don't stop the transfer and also don't flush the Tx FIFO
for isoc endpoint, otherwise, it may fail when set NAK
bit and disable ep in dwc_otg_pcd_ep_stop_transfer().

Change-Id: Ib3c1215f9c9507c08cc12c966456209384811b6d
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-02 19:21:39 +08:00
William Wu
f0cdce4eaa usb: dwc_otg_310: use wait-till-ready timeout loop for ep deactivate
In some error case, it may fail to set the NAK bit
or Disable bit for endpoint when do ep deactivate
operation. We need to use wait-till-ready timeout
loop for ep deactivate instead of while loop.

Change-Id: I0e5ed61b2528f89910333c5eb907677e492fe3a0
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-02 19:21:39 +08:00