Commit Graph

608677 Commits

Author SHA1 Message Date
Caesar Wang
2b3fe0f350 arm64: dts: rockchip: add the readable and writable for rk3399 linux
There are some progresses need the readable and writable, when the debian
rootfs brings up.

Change-Id: I0f3b4fab5d591e35f5aacb4901f4e7733e46c306
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-04-09 18:23:19 +08:00
Dingqiang Lin
6f32e1d8ba arm64: dts: rockchip: enable nandc for rk3308-evb-v10
Change-Id: I67004a3354496df9a33f14eacc6f40d1fd33b49d
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-04-09 16:12:03 +08:00
Zheng Yang
0010953e75 ARM: dts: rk3229: remove redundant hdmi phy table
The property rockchip,phy_table is no longer used.

Change-Id: I11a84a0ffaf85d80c1a850abc666cea74f7f6e35
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-04-09 14:52:25 +08:00
David Wu
62eb965b90 pinctrl: rockchip: Add IOMUX_WRITABLE_32BIT flag for rk3288 gpio0 iomux
There are writable 32 bits for PMU_GPIO0's iomux, so add the
IOMUX_WRITABLE_32BIT to read iomux register at first, it would
not change others' bits.

Change-Id: I1fb27c60d5d26e5719b6911a78e7cdf144feba26
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-04-09 14:45:06 +08:00
Binyuan Lan
c9d22180e1 arm64: dts: rockchip: add rk3326 ai-va evaluate board
Change-Id: I60b94ad8c05226c574106d879dd32103fa956d9f
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-04-09 14:41:55 +08:00
Wyon Bi
09866a1911 drm/rockchip: vop: slit dither register field definitions
Change-Id: Id6fb68b88641839fa66c01eda980e07b4317b435
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-04-09 10:58:27 +08:00
Binyuan Lan
2bb9ec21ad ASoC: rockchip: rk817-codec: add ext amplifier and loopback support
Change-Id: Icef0c8a72784260b0d49d8260b0f3377e53b953f
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2018-04-09 10:53:44 +08:00
Sugar Zhang
e31aec5414 arm64: dts: rockchip: rk3308: add reset property for i2s_8ch_0~3
Change-Id: Ib70a5e31f224916c90f6d51a328164b8995661c7
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-09 10:52:12 +08:00
Sugar Zhang
e909c8f5f0 ASoC: rockchip: i2s-tdm: add support for clk-trcm mode.
This patch adds support for clk tx/rx common mode.
rockchip,clk-trcm: tx and rx lrck/bclk common use.
- 0: both tx_lrck/bclk and rx_lrck/bclk are used
- 1: only tx_lrck/bclk is used
- 2: only rx_lrck/bclk is used

Change-Id: I7342ed25b0573bfc0ce0785838d5ee192ca6300d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-04-09 10:49:29 +08:00
Sandy Huang
3ac2bdcfa0 arm64: dts: rockchip: enable uboot logo for rk3308-evb-ext board
Change-Id: I849d03ff50f6573e2d377a507e3fa8d2592be785
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-09 10:01:26 +08:00
Tao Huang
0b3ed0efcd Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (395 commits)
  Linux 4.4.126
  net: systemport: Rewrite __bcm_sysport_tx_reclaim()
  net: fec: Fix unbalanced PM runtime calls
  ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event()
  s390/qeth: on channel error, reject further cmd requests
  s390/qeth: lock read device while queueing next buffer
  s390/qeth: when thread completes, wake up all waiters
  s390/qeth: free netdevice when removing a card
  team: Fix double free in error path
  skbuff: Fix not waking applications when errors are enqueued
  net: Only honor ifindex in IP_PKTINFO if non-0
  netlink: avoid a double skb free in genlmsg_mcast()
  net/iucv: Free memory obtained by kzalloc
  net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface
  net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred
  l2tp: do not accept arbitrary sockets
  ipv6: fix access to non-linear packet in ndisc_fill_redirect_hdr_option()
  dccp: check sk for closed state in dccp_sendmsg()
  net: Fix hlist corruptions in inet_evict_bucket()
  Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs"
  ...

Conflicts:
	include/linux/usb/quirks.h

Change-Id: I125065cef66846e4cdee799f4b34d07c309d353e
2018-04-08 18:28:30 +08:00
Tao Huang
b8f07c4636 mfd: rk808: avoid NULL pointer dereferencing when suspend
rk808->pins maybe NULL.

Fixes: ed38d26a33 ("pinctrl: support pinctrl driver for the RK817&RK809 PMIC")
Change-Id: Ia2c25f2717498c06d0707f17d27b0a85ee23f229
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-08 15:30:34 +08:00
Sandy Huang
09d21836e5 arm64: dts: rockchip: rk3308: init for uboot logo
Change-Id: I36085d2fc033a76e3ee6d0db563ee327deca264d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-08 15:12:20 +08:00
Finley Xiao
f1b24931de clk: rockchip: rk3308: Add clock id for i2s mux clk
Change-Id: Iddf2070da1e2128ca15954c1a14d52e856e7b40f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-08 11:11:34 +08:00
Dingqiang Lin
47c5f48cc8 arm64: dts: rockchip: add nandc node for rk3308
Change-Id: If46f74981d71cc325e7459e11651173632c120ea
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-04-08 09:07:01 +08:00
Caesar
6f92c6ee1e arm64: dts: rockchip: force the bootargs for rk3399 linux
The default GPT will set the same with android tool.

Address  Name       Path
         Boot     -- rk3399_loader_xx.xx.bin
0x4000   loader1  -- out/u-boot/uboot.img
0x6000   atf      -- out/u-boot/trust.img
0x8000   resource -- out/kernel/resource.img
0x8000   kernel   -- out/kernel/kernel.img
0x40000  rootfs   -- out/rootfs/buildroot.img

Change-Id: I03c4f8221d98f0452928ed21b611db5ff90fc48f
Signed-off-by: Caesar <wxt@rock-chips.com>
2018-04-08 09:06:06 +08:00
Mark Brown
a748c8be5a Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android 2018-04-05 18:31:12 +01:00
Mark Brown
2da9deac1e Merge tag 'v4.4.126' into linux-linaro-lsk-v4.4
This is the 4.4.126 stable release
2018-04-05 16:49:48 +01:00
Algea Cao
d15450ae2c drm/rockchip: dw_hdmi: Fix up screen flash when switching color
After switching color, hdmi output signal may be unstable.
If AVMUTE is cleared too early, tv will display err.

Change-Id: I595180bfe6e014de5231bcd75ee259d5702121e0
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-04-04 16:55:15 +08:00
Herman Chen
b09b80ab1c video: rockchip: vpu: Fix debug info error
When vpu mmu fault happen we need to separate encoder and decoder.
And add register index to debug information.

Change-Id: Id98d2af464548972592bae1597c78f070d570b6b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-04-04 16:53:22 +08:00
Finley Xiao
cb047d4ffa Revert "arm64: dts: rockchip: rk3308: Assign emmc, sdio, sdmmc clocks to DIV50"
This reverts commit 699150fe82.

Change-Id: I83f6476540d71e0eba45e27b29f585bb789ee36f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-04 16:37:25 +08:00
Zorro Liu
952f658854 arm: dts: modify mpu6050 layout orientation on rk3288-evb-android-rk808-edp board
Change-Id: I95d94cdd9beca9b70eaf72f0baa1837279b9a9b6
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-04-04 16:20:14 +08:00
hardy.huang
c23500c44d camera: rockchip: camsys_drv: v0.0x29.0
fix camera mipi phy config for rk3288.

Change-Id: If96aab66801ff94539ef9d8d8f337f45c6b25d4a
Signed-off-by: hardy.huang <hardy.huang@rock-chips.com>
2018-04-04 15:54:20 +08:00
Zhou weixin
3766257b45 arm: dts: rockchip: rk3126-bnd-m88-emmc: add m88 cif config
Change-Id: I2d22eae91207cb41b11c42212262962ea29b48ad
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-04-04 15:52:20 +08:00
Sandy Huang
4efa24cc3f drm/rockchip: rgb: init connector->port
this will be used by:
	rockchip_drm_bind()
	    ->show_loader_logo()
		->of_parse_display_resource()
		    ->find_connector_by_node()

Change-Id: I953c06d291a9475b7a60882039c3fc0e26959e46
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-04 15:52:02 +08:00
Sandy Huang
24a11a428c drm/rockchip: rk3399 vop: fix global alpha value offset config error
Change-Id: I6d6a9693d0229ad7f6f4e13929173be28a57ef43
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-04-04 15:51:27 +08:00
William Wu
cbff3d0ae5 arm64: dts: rockchip: reconfig dwc2 device fifo size
According to the dwc2 programmer's guide v3.10a, in '2.1.3.2 Dedicated
FIFO Mode with No Thresholding', it suggested that:

Device RxFIFO =
- Scatter/Gather DMA mode:
(4 * number of control endpoints + 6) + ((largest USB packet used / 4) +
1 for status information) + (2 * number of OUT endpoints) + 1 for Global NAK

on rockchip platforms:
(4 * 1 + 6) + ((1024 / 4) + 1) + (2 * 6) + 1 = 280

- Slave or Buffer DMA mode:
(5 * number of control endpoints + 8) + ((largest USB packet used / 4) +
1 for status information) + (2 * number of OUT endpoints) + 1 for Global NAK

on rockchip platforms:
(5 * 1 + 8) + ((1024 / 4) + 1) + (2 * 6) + 1 = 283

Device IN Endpoint TxFIFO =
The TxFIFO must equal at least one MaxPacketSize (MPS).

In addition to RxFIFO and TxFIFOs, refer to dwc2 databook v3.10a,
'Figure 2-13 Device Mode FIFO Address Mapping and AHB FIFO Access Mapping
(Dedicated FIFO)', it required that when the device is operating in non
Scatter Gather Internal DMA mode, the last locations of the SPRAM are used
to store the DMAADDR values for each Endpoint (1 location per endpoint).

When the device is operating in Scatter Gather mode, then the last locations
of the SPRAM store the Base Descriptor address, Current Descriptor address,
Current Buffer address, and status quadlet information for each endpoint
direction (4 locations per Endpoint). If an Endpoint is bidirectional , then
4 locations will be used for IN, and another 4 for OUT).

Considering that the total FIFO size of dwc2 otg is 0x3cc (972),
and we must reserve (4 * 13) = 52 locations for all Endpoints.
So reconfig dwc2 device fifo size as follows:

Device RxFIFO = 280
Device IN Endpoint TxFIFO
- FIFO #0 = (64 / 4) = 16 (Assuming this is used for EP0)
- FIFO #1 = (1024/4) = 256 (Assuming this is used for Isochronous)
- FIFO #2 = (512/4) = 128
- FIFO #3 = (512/4) = 128
- FIFO #4 = (256/4) = 64
- FIFO #5 = (128/4) = 32
- FIFO #6 = (64/4) = 16

After reconfig the dwc2 device fifo size, test mtp write on rockchip
platform (PC -> rockchip platform) on rk312x/rk3326/px30/rk3288 evb,
when mask the 'vfs_write' in f_mtp.c, the writing data rate can be
increased from 16MBps ~ 20MBps to 30MBps ~ 36MBps on different kinds
of rockchip evbs.

Change-Id: I52c64a279523c811f706e69e427b0a6e8c45683b
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-04 15:49:20 +08:00
William Wu
8cfb4da10e ARM: dts: rockchip: reconfig dwc2 device fifo size
According to the dwc2 programmer's guide v3.10a, in '2.1.3.2 Dedicated
FIFO Mode with No Thresholding', it suggested that:

Device RxFIFO =
- Scatter/Gather DMA mode:
(4 * number of control endpoints + 6) + ((largest USB packet used / 4) +
1 for status information) + (2 * number of OUT endpoints) + 1 for Global NAK

on rockchip platforms:
(4 * 1 + 6) + ((1024 / 4) + 1) + (2 * 6) + 1 = 280

- Slave or Buffer DMA mode:
(5 * number of control endpoints + 8) + ((largest USB packet used / 4) +
1 for status information) + (2 * number of OUT endpoints) + 1 for Global NAK

on rockchip platforms:
(5 * 1 + 8) + ((1024 / 4) + 1) + (2 * 6) + 1 = 283

Device IN Endpoint TxFIFO =
The TxFIFO must equal at least one MaxPacketSize (MPS).

In addition to RxFIFO and TxFIFOs, refer to dwc2 databook v3.10a,
'Figure 2-13 Device Mode FIFO Address Mapping and AHB FIFO Access Mapping
(Dedicated FIFO)', it required that when the device is operating in non
Scatter Gather Internal DMA mode, the last locations of the SPRAM are used
to store the DMAADDR values for each Endpoint (1 location per endpoint).

When the device is operating in Scatter Gather mode, then the last locations
of the SPRAM store the Base Descriptor address, Current Descriptor address,
Current Buffer address, and status quadlet information for each endpoint
direction (4 locations per Endpoint). If an Endpoint is bidirectional , then
4 locations will be used for IN, and another 4 for OUT).

Considering that the total FIFO size of dwc2 otg is 0x3cc (972),
and we must reserve (4 * 13) = 52 locations for all Endpoints.
So reconfig dwc2 device fifo size as follows:

Device RxFIFO = 280
Device IN Endpoint TxFIFO
- FIFO #0 = (64 / 4) = 16 (Assuming this is used for EP0)
- FIFO #1 = (1024/4) = 256 (Assuming this is used for Isochronous)
- FIFO #2 = (512/4) = 128
- FIFO #3 = (512/4) = 128
- FIFO #4 = (256/4) = 64
- FIFO #5 = (128/4) = 32
- FIFO #6 = (64/4) = 16

After reconfig the dwc2 device fifo size, test mtp write on rockchip
platform (PC -> rockchip platform) on rk312x/rk3326/px30/rk3288 evb,
when mask the 'vfs_write' in f_mtp.c, the writing data rate can be
increased from 16MBps ~ 20MBps to 30MBps ~ 36MBps on different kinds
of rockchip evbs.

Change-Id: Icdf8a5dd95f96d174233e4ffc765c9a982b9f0b6
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-04-04 15:49:15 +08:00
Zhou weixin
f830af5a02 input/touchscreen/rockchip_gslX680: add reset power control and revert_y setting
Change-Id: I4e836fdf59e4541c067bf35bec86bf4b6a5c0347
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-04-04 15:44:38 +08:00
Zhou weixin
c5c8a9392d arm: dts: rockchip: rk3126-bnd-m88-emmc: add new board for android go test
Change-Id: I70a421782cc641c876dc436f732af2a52b230ae8
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2018-04-04 15:44:08 +08:00
Tony Xie
ed38d26a33 pinctrl: support pinctrl driver for the RK817&RK809 PMIC
Change-Id: I9a24ee0d9266a000d582f8ffff8b0c872e3a0769
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-04-03 20:09:59 +08:00
Tony Xie
1a69527184 arm64: dts: rockchip: add pinctrl info for RK817&RK809
Change-Id: I23dc0c8271ba8cb566fa16bbd179fe6e8aa3b591
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-04-03 19:55:46 +08:00
David Wu
927ae0676c arm64: dts: rockchip: Fix the mac compatible for rk3308
Change-Id: I4a58d831fea81bf5874603159a13e286baae3cda
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-04-03 19:28:11 +08:00
Tony Xie
ff5c625f04 arm64: dts: rockchip: adjust dmc opp-table for px30
Change-Id: I3c51f94fbb5bac52553e38c699b4355d5f8f7518
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
2018-04-03 19:25:11 +08:00
Wyon Bi
868a2dedf0 clk: rockchip: px30: Fix i2s out mclk
Fixes: f6128506aa ("clk: rockchip: px30: Fix i2s out mclk")
Change-Id: I90dd4d1cdb1f3a2e9009dcb574115a5e7504fc32
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-04-03 12:33:46 +08:00
Feng Mingli
158d412110 usb: dwc_otg_310: pcd: in ep do memory copy after alloc aligned buffer
If more than two consecutive requests queue into in ep, maybe some
requests need alloc temporary aligned buffer, only the first request
will do memory copy to the aligned buffer, but start_next_request()
function missing memory copy, then the transmission of data will be
wrong, so do memory copy after alloc aligned buffer right away.

TEST=rk3288 use rndis gadget function, Linux PC use this command
can't ping: ping IP -s 1473

Change-Id: I1c5339dbb089d8a94d8093baa2a801f54e450267
Signed-off-by: Feng Mingli <fml@rock-chips.com>
2018-04-03 11:41:40 +08:00
Tao Huang
0616f26326 rk: arm64: support build boot.img
Change-Id: Iaf50be16e321b13bbe45b9beb335d542e00507cf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-02 21:36:20 +08:00
Finley Xiao
44822b1031 clk: rockchip: rk3399: Fix clk_cifout and clk_cifout_src
Change-Id: I1480615b8f8cfaab2b318e6b8438ead2232a238d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 17:46:27 +08:00
Meng Dongyang
855763aa3c arm64: dts: rockchip: enable u2phy low power mode for rk3326-863
Add rockchip,low-power-suspend property to DT of u2phy to make
the port enter lower power state when suspend.

Change-Id: I88eef53b24c8859ebe2c2b3cb5ecbdc42b406d04
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-04-02 17:43:50 +08:00
Meng Dongyang
5e72cfa2a5 phy: rockchip-inno-usb2: make u2phy enter low power mode
Make u2phy enter low power mode when suspend. If config the DT of
u2phy port with "rockchip,low-power-mode" property, the port will
be config to lower power state when suspend.

Bvalid irq and linestate irq will be disabled in this mode.

Change-Id: Ie7d40a9a181b0622b1f8d062a741661548cabd59
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-04-02 17:43:50 +08:00
Meng Dongyang
a3b1bb7a7a Documentation: bindings: add rockchip,low-power-mode property for u2phy
Change-Id: Id99aeb68aa5b6174a3a97f413f09270d893cef4e
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2018-04-02 17:43:50 +08:00
Finley Xiao
cd5289db24 clk: rockchip: rk3308: Set max parent rate for vop fractional divider
Change-Id: I79b5b412e2952d48e83546dce69c6ce2fbe75e5b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 17:01:54 +08:00
Finley Xiao
0689ad72e4 clk: rockchip: px30: Set max parent rate for i2s fractional divider
Change-Id: Ic3f3cc4fcc90821ec9ecf0d24e9e9fa877f7001f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 17:01:54 +08:00
Finley Xiao
4186a0e423 clk: rockchip: Add supprot to limit input rate for fractional divider
From Rockchips fractional divider usage, some clocks can be generated
by fractional divider, but the input clock frequency of fractional
divider should be less than a specified value.

Change-Id: Ifd6c5f6a24a64021f990506e8657cd925f9b96f9
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 17:01:54 +08:00
Shunqing Chen
ec9e751d33 power: rk817-battery: add power_supply property for CTS.
Change-Id: I31bca691bc404d95b448bfbf1d92897fed2a5767
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-04-02 16:50:51 +08:00
Shunqing Chen
bb651e58d8 power: rk817-battery: get charging state from charger driver
Change-Id: I1cbf9befcb902a46c2e7a42664e4417ce1b441ea
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-04-02 16:50:51 +08:00
Tao Huang
642d98704a mmc: ratelimit error messages
Change-Id: Ida380e193ea4c1ad2c1347997a24b67ed05f7975
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-04-02 16:42:38 +08:00
Finley Xiao
37c869d6fc arm64: dts: rockchip: px30: Add SYS_STATUS_BOOST status for dmc
Change-Id: Id7096f0b558697101fd1ed6bcf72fec92c9ce7f2
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 14:58:40 +08:00
Finley Xiao
aec15a24a8 PM / devfreq: rockchip_dmc: Add touch boost support
Change-Id: I873891c79a75271ddb57cf8dcc25cf882d7c1126
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-04-02 14:58:40 +08:00
JinSen Chen
0b55661d58 ARM: dts: rk3288-evb-android-rk808-edp: update regulators node
set the regulator named "vcc_wl" stay on in suspend.

Change-Id: I6d21b8904a6367938a386df8e905ede62f4069a8
Signed-off-by: JinSen Chen <kevin.chen@rock-chips.com>
2018-04-02 11:25:01 +08:00