Commit Graph

610544 Commits

Author SHA1 Message Date
Dingqiang Lin
f091fa7c6f rockchip: rkflash: adjust vendor part design for rkflash
1.Using internal vendor strategy for slc nand and spi nand storage;
2.Using outernal vendor strategy for spi nor;
3.Rejust rkflash_debug design.
4.Remove gcc -g

Change-Id: Ib5eca61a7a600f99d438448e4b7f03dd3dddb5f2
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-23 14:43:13 +08:00
Cai YiWei
c5e0b1b35a media: i2c: add gc2155 driver
Change-Id: I8c7ab7abf9ca2b3d33b3bdae3593f727d61955dc
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-07-23 14:42:10 +08:00
Wyon Bi
e800c52921 drm/rockchip: vop: Fix grf_dclk_inv register field definitions
Fixes: c2b587fa35 ("drm/rockchip: vop: config dclk invert from grf register")
Change-Id: I113f9d4c8c58389307d1e03eee2ccbba5c95b2c1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-07-23 14:41:55 +08:00
Zhen Chen
94f98e877c Mali: midgard: add an error handling pass in kbase_mmu_interrupt()
For RK redmine Defect #168230.

Change-Id: I3cd6544dd23b833138e4cc700a8f2cdd627ff592
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2018-07-23 11:19:08 +08:00
Cliff Chen
7dc1699c5d f2fs: modify f_blocks for statfs
The f_blocks of statfs include file system overhead,it is not normal
usage of Posix.

Change-Id: If481626b08c05290626938586e2dc721690f1a91
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
2018-07-23 11:03:47 +08:00
shengfei Xu
c0ce1fa016 power: rk817-battery: optimize charging curve
Change-Id: I3a11593324be523649f6c5b12872336fb24a5283
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-07-20 17:11:21 +08:00
Yifeng Zhao
80cc682ae7 drivers: rk_nand: zftl: fix hynix F16 64Gb NAND multi plane prog error issue
3326: fix hynix F16 64Gb NAND multi plane prog error issue
bug:
[   15.257968] hynix RR 12 row=2000, count 12, status=-1
[   15.257985] flash_complete_page_read 0 2000 error_ecc -1 1
[   15.258000] blk= 20, page=0, ppa = 2000, status = ffffffff

Change-Id: I7e6b6d4dd966bd671b0dcd46f3ee9b6f6e8c8bff
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
2018-07-20 17:09:16 +08:00
William Wu
34ef2afe59 arm64: dts: rockchip: add usic node for rk3399
Add usic node for rk3399 USB 2.0 EHCI controller
with usic phy.

Change-Id: Ibb4179ff1479816daa3b8455b0229f8a7a05bbdf
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-19 18:37:43 +08:00
William Wu
e5708aad7f USB: ehci-platform: support EHCIs with usic phy
Some EHCI controllers use usic phy (e.g rk3399/rk3288),
in order to enable these controllers, we need to set
some additional EHCI vendor-specific registers.

Support this feature in device tree when using the ehci
platform driver by adding a new property for it.

Change-Id: I279ccfdb5866df49828825bfd41b39fcd58a2832
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-19 18:37:43 +08:00
William Wu
8c47ad3c7b usb: dwc3: rockchip: Don't reset otg logic if device connect
During dwc3 resume, it shoudn't reset otg controller logic
if device is connecting with the otg port, because it will
cause device to be reenumerated. More seriously, it may
cause the otg_work to enter disconnect process and power
down usb3 controller power domain, at the same time, if
the xHCI driver is accessing the controller asynchronously,
it will cause system hang.

Change-Id: Id546277bd4082b7baeff830788643a800330ae8e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-19 18:28:43 +08:00
William Wu
04da766284 usb: dwc3: Don't reset core in host mode
When do core init, only reset the core for device mode.
Becasue in host mode, xHCI driver will reset the core
and its host block via usbcmd.hcrst. If we do core reset
in dwc3_core_init() for host mode, it will reset both
the dwc3 core registers and xHCI registers, and cause
device to be reenumerated when usb suspend/resume.

Change-Id: If723ce8a771975e9757d28cb2c114d6269581677
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-19 18:28:43 +08:00
Xing Zheng
46dcb4d5f8 arm64: dts: rockchip: enable Bluetooth PCM sound for RK3308 EVB Boards
By default, only using lrck_tx for PCM by hardware,
therefore, we need to use I2S_CKR_TRCM_TXONLY.

Change-Id: I6c4077e7e7e65b8a3a21416fd61d5900b3b72f42
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-19 16:17:50 +08:00
Xing Zheng
3e056d403d arm64: dts: rockchip: add bluetooth pcm node for RK3308 EVB V10/V11
This patch using PCM rising late1 and slave mode for
Bluetooth HFP.

Change-Id: I4a0188134d7d0ef0690c6c7c9f94fc8ec50c1671
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-19 16:17:50 +08:00
Xing Zheng
1dc24c8e2c ASoC: rockchip: i2s: add 'rockchip,clk-trcm' property
Change-Id: I0756185c677b5cb9512ff25b69ceba5b248ec031
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-19 16:17:50 +08:00
Xing Zheng
b73b288508 ASoC: rockchip: i2s: add support 'rockchip,clk-trcm' property
If there is only one lrck (tx or rx) by hardware, we need to
use 'rockchip,clk-trcm' specify which lrck can be used.

Change-Id: I3bf8d87a6bc8c45e183040012d87d8be21a4c133
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-19 16:17:50 +08:00
Hu Kejun
bb7bcb0a02 media: rk-isp10: modify for af function
add af funtion first time

Change-Id: I91fc8c532e47987cc63694b242f5bac7ef1bc59c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Hu Kejun
347d89b653 media: rk-isp10: remove "Measurement late" check
Change-Id: I6cbabc0faff7003c591142570270475e7afd8dde
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Hu Kejun
71f641cab4 media: rk-isp10: modify for dumpsys tool
Change-Id: I53df81d70fb730634c7600e2a7a18f93b62191df
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Hu Kejun
6976e95c0a media: rk-isp10: fix write fmt is not correct when setting mi_ctrl
Change-Id: I55b4c3ced65d690a2f27755e09c3933dfc265ee7
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Hu Kejun
bd5d042b1a media: rk-isp10: fix owned_by_drv_count is not 0 when stop stream
Change-Id: Iec72be86e515c2f29dfb12a6004db443769edd9f
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-19 14:44:39 +08:00
Shunqian Zheng
41c170c42f scripts: make gcc-wrapper.py compatible with python 2.7 and 3
Python 3 requires parentheses in call to 'print', meanwhile
the 'line' could be bytes-like, let's decoding to str as utf-8.

This makes the gcc-wrapper.py compatible with both 2.7 and 3.

For example, a bytes-like string as below,
 b'kernel/reboot.c:47:13: error: function declaration isn\xe2\x80\x99t a
 prototype [-Werror=strict-prototypes]\n'
 b' static void no_use()\n'
 b'             ^~~~~~\n'

After decoding, it looks like,
 kernel/reboot.c:47:13: error: function declaration isn’t a prototype
 [-Werror=strict-prototypes]
  static void no_use()
              ^~~~~~

Change-Id: Icacdbe2ca7b7ab674ab90e54b79d3176e0061ac6
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-07-19 11:58:45 +08:00
Finley Xiao
0658b84702 soc: rockchip: pvtm: Add support to show temperature
Change-Id: Ibdf09a5a043e7f1a6d203513a6f22172e9e24c09
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-19 09:14:52 +08:00
Tao Huang
d20c557078 Input: rmi4 - remove unused synaptics s3202 driver
Change-Id: If377d7af56ad443a905947a585ff826b6c1625b2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-07-18 19:23:06 +08:00
Dingqiang Lin
a9558e9bdf rockchip: rkflash: fix compile error if !NAND
Change-Id: I890ff638ff3b6fe3e9fb8fc43f4fa4522bd75c11
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-18 19:02:23 +08:00
Cliff Chen
2093a9abe6 f2fs: add a new limit for reserve root
The reserved root blocks is not enough for booting Android due to
the limit of 0.2% if the fs size too small. so we add a new mini-
mum limit is 128MB.

Change-Id: I5af3b182001d27e4d18b4090c5270bbb2ac6253b
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
2018-07-18 11:12:22 +08:00
Zhou weixin
6b600c5baa input: sensors: accel: lsm303d: add data convert
Change-Id: Ied735816cb86cf73ebef76522f0882dbb19a9eb3
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-07-18 10:16:35 +08:00
Xing Zheng
7ea4433197 ASoC: rk3308_codec: fix incorrect idx with loopback_grp
Here should use the mapped grp as a reference, not idx.

Change-Id: Ia40dafc11f4f5f077f764f49985bb8d3ec800c28
Reported-by: Lin Jianhua <linjh@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-17 21:08:14 +08:00
Zhou weixin
5e823aa985 arm64: dts: rockchip: add rk3326 86v board
Change-Id: I533b3243aae6e43151a1db2a454fb67c7423af12
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2018-07-17 18:54:37 +08:00
Huang jianzhi
7786e85e6e arm: dts: rk3128h-box: add rtc fake node
Change-Id: Id2f1861b78de577e95fe2799b0853411f398f23a
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2018-07-17 09:43:43 +08:00
Ruslan Bilovol
9e1bd1a757 UPSTREAM: usb: gadget: function: f_uac1: implement get_alt()
After commit 7e4da3fcf7 ("usb: gadget: composite:
Test get_alt() presence instead of set_alt()") f_uac1
function became broken because it doesn't have
get_alt() callback implementation and composite
framework never set altsetting 1 for audiostreaming
interface. On host site it looks like:

 [424339.017711] 21:1:1: usb_set_interface failed (-32)

Since host can't set altsetting 1, it can't start
playing audio.

In order to fix it implemented get_alt along with
minor improvements (error conditions checking)
similar to what existing f_uac2 has.

Change-Id: I41d59c69e3b300b164e6267c48c1367e8d38b098
Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 1fc4926d92)
2018-07-16 20:14:23 +08:00
Algea Cao
b568dbc61d drm/rockchip: inno_hdmi: output common tv resolution and hdmi mode if no read the correct edid
Change-Id: I5b59b35a01e6b7093f4a076ed3cacf8d92dc2c69
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-07-16 17:45:40 +08:00
Huibin Hong
74cfa8b13a serial: 8250_dw: lost one byte sometime when receive
To avoid "too much work for irq" issue, cherry pick the the patch.
It reads the RBR to clear the time out interrupt, but sometime the
rx fifo may be not empty while cpu reads the RBR. Which would cause
the data lost.

patch for "too much work":06451e93ab59e5b1843c29cbb468a274f4919563

By the way, current patch can't get rid of the risk entirely, so I
try a lot to solve it. Unfortunately, I only got the phenomenon that
lower pclk can reduce the probability. And I check the dw data sheet,
it has pclk and sclk, so there is synchronization problem. But it
only requires (slck < 4*pclk).

Change-Id: I01a36c689b43310294c45294abcf4982f5ddf2af
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-07-16 17:45:23 +08:00
Dingqiang Lin
092053a2b7 drivers: rkflash: remove CONFIG_FUNCTION_TRACER config for slc_ftl_arm_v7 lib
Change-Id: I63562272ca4a5d63310fcc72c109a80b88907223
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-16 14:14:57 +08:00
Caesar Wang
fb0d3f5898 arm64: dts: rockchip: rename rk3326 evb v10 board for linux
This patch tried to rename arch/arm64/boot/dts/rockchip/
{rk3326-evb-linux-lp3-v10.dts => rk3326-evb-lp3-v10-linux.dts},
and correct the right things as below.

* define the rootfs type as the squashfs.
* fixes some typo
* copyright to 2018

Change-Id: I5fed2e472c979d5209222ad51281b01148379efb
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-07-16 12:00:01 +08:00
Algea Cao
d929366968 drm/rockchip: rk3066_hdmi: Clear color depth mask and format if get edid failed
If edid can't be got when hdmi plug in, hdmi color depth mask and format
won't be updated. The color list in the setting are those of the previous
TV. This commit fix the error.

Change-Id: Iffe3164af1f1ad32002c26b5bbac14f2ff417c96
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-07-16 10:05:58 +08:00
Algea Cao
aa3e5d4088 drm/bridge: synopsys: dw-hdmi: Clear color depth mask and format if get edid failed
If edid can't be got when hdmi plug in, hdmi color depth mask and format
won't be updated. The color list in the setting are those of the previous
TV. This commit fix the error.

Change-Id: I5ed4be5efa2a69be0b58489f58a3af5de9912292
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-07-14 16:37:28 +08:00
Shunqian Zheng
d8a557f838 media: rockchip: isp1: fix wrong fmt of isp_sd .get_fmt
The isp_sd .get_fmt of source pad return format of input by mistake.
It should be the *out_fmt of isp_sd.

Change-Id: I9f592a2906275ef58dc564d68de63aac393c8690
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-07-14 16:36:35 +08:00
Dingqiang Lin
6b7277f0a3 drivers: rkflash: fix ecc error after suddenly power lost
Change-Id: I48e3b94300404a29463d6fcde6ed160a9018728f
Signed-off-by: Dingqiang Lin <jon.lin@rock-chips.com>
2018-07-14 10:47:39 +08:00
Sugar Zhang
a28a347204 dmaengine: pl330: _stop: clear interrupt status
This patch kill instructs the DMAC to immediately terminate
execution of a thread. and then clear the interrupt status,
at last, stop generating interrupts for DMA_SEV. to guarantee
the next dma start is clean. otherwise, one interrupt maybe leave
to next start and make some mistake.

we can reporduce the problem as follows:

DMASEV: modify the event-interrupt resource, and if the INTEN sets
function as interrupt, the DMAC will set irq<event_num> HIGH to
generate interrupt. write INTCLR to clear interrupt.

	DMA EXECUTING INSTRUCTS		DMA TERMINATE
		|				|
		|				|
	       ...			      _stop
		|				|
		|			spin_lock_irqsave
	     DMASEV				|
		|				|
		|			    mask INTEN
		|				|
		|			     DMAKILL
		|				|
		|			spin_unlock_irqrestore

in above case, a interrupt was left, and if we unmask INTEN, the DMAC
will set irq<event_num> HIGH to generate interrupt.

to fix this, do as follows:

	DMA EXECUTING INSTRUCTS		DMA TERMINATE
		|				|
		|				|
	       ...			      _stop
		|				|
		|			spin_lock_irqsave
	     DMASEV				|
		|				|
		|			     DMAKILL
		|				|
		|			   clear INTCLR
		|			    mask INTEN
		|				|
		|			spin_unlock_irqrestore

Change-Id: I5d452cad70964c519b53711a292d2d2714b811a1
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-07-14 10:47:15 +08:00
Finley Xiao
270ef04c65 clk: rockchip: rk3308: Add rate table for dpll
DPLL isn't the parent clock of ddr, we may need to change dpll rate for
other devices.

Change-Id: I2b41ccf6df78803980be08e4b82cbfb5c7718b69
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-13 16:30:08 +08:00
Finley Xiao
0c406a7db0 soc: rockchip: opp_select: Limit minimum voltage when low temperature
Change-Id: I4d4dd9d8a1130a11b6364479c24c1bb452045c23
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-13 16:25:59 +08:00
Zheng Yang
d2fb8acd5f drm: rockchip: dw-hdmi: fix colorimetry bt2020 value
To differentiate extend colorimetry and normal colorimetry, we
add the offset HDMI_COLORIMETRY_EXTENDED in colorimetry property.
It should use same value in dw_hdmi_rockchip_select_output.

Change-Id: I13e10b6e8211e7a2634dbd4b6c5310bc129bfa8d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2018-07-13 10:55:25 +08:00
Zhang Zhijie
a07ea942e3 OP-TEE: remove lock when call tee
OPTEE supports multicore, so the lock before enter tee
is needless and can be removed to avoid unnecessary waiting.

Change-Id: I4e9c5876ba69e362b598e0c0ca78e12a96704b58
Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com>
2018-07-13 09:20:19 +08:00
Guochun Huang
78166d0543 arm64: dts: rockchip: rk3399-tve1030g: modified screen timing
Change-Id: If2bdfdbf6364cf8ea25ed9a197e579b18ad5154c
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2018-07-12 18:48:24 +08:00
William Wu
987105c1ff usb: dwc_otg_310: resize the depth of TxFIFO number 1 and 2
The commit c64eaccc619f ("usb: dwc_otg_310: map ep to
corresponding TxFIFO number") use a fixed mapping between
the endpint addresses and the TxFIFO number. The TxFIFO
number 1 is assigned to ep1-in, and the TxFIFO number 2
is assigned to ep3-in. For uvc function, the ep1-in is
used for uvc control ep (interrupt), and the ep3-in is
used for uvc stream ep. So resize the depth of TxFIFO
number 1 to 512 Bytes, and resize the depth of TxFIFO
number 2 to 1024 Bytes.

Change-Id: I07a89aab01206f6b6f853886d564130abffc1586
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-12 15:52:17 +08:00
William Wu
6e131f29b1 usb: dwc_otg_310: map ep to corresponding TxFIFO number
In Dedicated FIFO mode, it uses a simple logic to assign
TxFIFO number for each active endpoint. But it doesn't
guarantee that the FIFO depth is suitable for the maxpacket
of the endpoint. We may meet ep TxFIFO problem if we use
a composite device with more than three functions.

In my test case, I configure an usb composite device with
four functions on rv108: Mass storage + ADB + Rndis + HID.

when the functions are enabled:
echo "mass_storage,ffs,rndis,hidg0" > /sys/class/android_usb/android0/functions

The mass_storage works abnormally because that the mass
storage gadget driver calls ep_enable operation at last,
and the ep1-in of mass_storage is assigned with TxFIFO
number 5. The FIFO mapping between the endpint addresses
and the TxFIFO number is:

Ep1-IN msc   bulk        => TxFIFO number 5, FIFO depth 64 Bytes
Ep3-IN adb   bulk        => TxFIFO number 1, FIFO depth 1024 Bytes
Ep5-IN rndis bulk        => TxFIFO number 3, FIFO depth 512 Bytes
Ep7-IN rndis interrupt   => TxFIFO number 2, FIFO depth 512 Bytes
Ep8-IN hid   interrupt   => TxFIFO number 4, FIFO depth 384 Bytes

This patch use a fixed mapping between the endpint addresses
and the TxFIFO number like this:

EP1-IN => TxFIFO number 1
EP3-IN => TxFIFO number 2
EP5-IN => TxFIFO number 3
EP7-IN => TxFIFO number 4
EP8-IN => TxFIFO number 5
EP9-IN => TxFIFO number 6

With this patch, in my test case (Mass storage+ ADB + Rndis + HID)
the FIFO mapping is:

Ep1-IN msc   bulk        => TxFIFO number 1, FIFO depth 1024 Bytes
Ep3-IN adb   bulk        => TxFIFO number 2, FIFO depth 512 Bytes
Ep5-IN rndis bulk        => TxFIFO number 3, FIFO depth 512 Bytes
Ep7-IN rndis interrupt   => TxFIFO number 4, FIFO depth 384 Bytes
Ep8-IN hid   interrupt   => TxFIFO number 5, FIFO depth 64 Bytes

Change-Id: Id00ed7e78d26d87b6c473ea84d1b1901ef25171e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-12 15:52:17 +08:00
Elaine Zhang
72ea1ab611 clk: rockchip: px30: Add half-divider clock for uart
Change-Id: I74e896e64a212e95200735ad6f16c58abb89496e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-12 14:26:23 +08:00
Kaige Li
6d59312619 media: soc_camera: fixed camera stop timeout error.
Change-Id: I72a34625706135f35b4231abcec8cc683b2319dc
Signed-off-by: Kaige Li <kevin.li@rock-chips.com>
2018-07-12 09:39:16 +08:00
Herman Chen
e5ff23f36d iommu/rockchip: export functions used in vcodec
When compile rk-vcodec as ko some unexported functions will fail the
compiling. This patch will fix this issue.

Change-Id: I8afcb4bc3858f0e9efa54e4996cdcb6a45bbe1e1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-07-10 16:45:51 +08:00
Sugar Zhang
199ae473c8 ASoC: rockchip: vad: fliter the playback for vad
This patch fliter the playback for vad, because vad only
handle capture.

Change-Id: I96ec24870adc4441081b39030056ed9361477bf3
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-07-10 16:43:29 +08:00