Commit Graph

839827 Commits

Author SHA1 Message Date
Elaine Zhang
8d57e73b0b clk: rockchip: rk3036: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: Ic60f491d549e030490c14ea78f4857a8cead596d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-01 19:03:38 +08:00
Elaine Zhang
e12acd34eb clk: rockchip: rk3128: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: I7f9bc78deef60b1fa48bada5b1a6203185ddce48
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-01 19:03:38 +08:00
Elaine Zhang
8ab246e533 clk: rockchip: rv1108: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: Ic4efc985892cbcc5e561203fe8e00dba116439e7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-01 19:03:38 +08:00
Elaine Zhang
22543d0656 clk: rockchip: rk3228: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: Ide2c3e8add083934672f6d22d8182bcfde046783
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-01 19:03:38 +08:00
Elaine Zhang
cdf4422a4b clk: rockchip: rk3288: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: I86ff4f12ed932431d131d22a307360418e2e9f40
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-01 19:03:38 +08:00
Elaine Zhang
909ec389a8 clk: rockchip: rk3368: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: I3aeeeb7f7b9240c917c18bc2d36b082003dc6370
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-04-01 19:03:38 +08:00
Simon Xue
0a2140ea63 dt-bindings: adc: add description for rk1808 saradc
Change-Id: I047410349c527495f5b414d98054e535fc168524
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-03-31 19:55:26 +08:00
Simon Xue
178388b16a iommu/rockchip: use status register instead of flags as parameter
When iommu fall into interrupt, status register indicate more information
than read or write flag, so use status register as parameter when callback
report_iommu_fault

Change-Id: I07c6b9996f305eb970bd1d1d2b0f2a7db53cc6ba
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-03-31 19:55:18 +08:00
Simon Xue
26d6849bcd dt-bindings: iommu: add disable iommu reset and skip iommu read for rockchip iommu
Change-Id: I3f31f5745078717dfecba649ae6aca573eb7f30b
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-03-31 19:54:54 +08:00
Simon Xue
a9832de3c7 iommu/rockchip: skip read vop iommu registers on rk3128 and rk3126
RK3128 and RK3126 failed to read vop iommu register, it is SoC bug.
Add this patch as a workaround for this bug, make SoC work as normal

Change-Id: I44d4ef7f6e15f85a466563b0b3e8e091db23fba0
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-03-31 19:54:46 +08:00
Simon Xue
327bceb983 drm/rockchip: gem: reorder pages if page chunk less than 8
Change-Id: I03a91d2f9c017086b3cb35edeaf6b7913b147b9b
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-03-31 19:52:27 +08:00
Simon Xue
86d6035248 ion: reorder pages for scatterlist
Change-Id: I3a25eba9d65ac1345471321f61ae9d7a959a1be6
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-03-31 19:52:11 +08:00
Sugar Zhang
03b6c8a591 ASoC: rockchip: spdif: fix some coding style issues
Change-Id: Ibe8edc413df2944464848ba81afdc447edbd405e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
c7f75167b3 dt-bindings: soc: rockchip: add pmugrf compatible for rv1108 soc
This patch adds pmugrf compatible for rv1108 soc.

Change-Id: I0b2e6fdcbd565ea324e403cddae8b4d56e8a9b46
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
25ee2cd8cd ASoC: rockchip: pdm: Correct PDM_CTRL0 reg value
This patch fix the wrong reg value for rk322x/rk322xh,
cuz there is no STORE JUSTIFIED MODE on it.

on rk322x/rk322xh, the same bit means PDM_MODE/RESERVED,
if the bit is set to RESERVED, the controller will not work.

Change-Id: I9bfc055e792d73a66f51c78c7c2ff5c4cba620ae
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
668b40d40a ASoC: rockchip: pdm: Mark RXFIFO_DATA as volatile and precious
This patch marks RXFIFO_DATA as precious to avoid being read
outside a call from the driver, such as regmap debugfs

Change-Id: Id94a3d6f4ea382fc09547241dabc6ab84ca74139
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
1b33ff5ec1 ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile
This patch marks SPDIF_SMPDR as volatile to make it resaonable,
which also requires marking it as readable, even though it isn't.

Change-Id: Ia59136a4d7a9a3984d4f4b2518f835ead7419aec
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
f3a201df34 dt-bindings: sound: rockchip-i2s: Add reset property
This patch adds the reset property for reset mechanism.

Change-Id: Ia60cc1f140860613b35ec42d703094bff8b46893
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
6e82a96a25 ASoC: rockchip: i2s: Add reset mechanism
This patch brings i2s back to normal by resetting i2s m/h
logic if i2s' clear operation is failed.

Change-Id: I2fd47039b522ac89499b4a2912d5ffb7a469e75e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Xing Zheng
0dc150b7ef ALSA: aloop: fix clear capture buf at wrong time
We need to use uniform current jiffies to avoid
the delta_capt too fast and the playback data is
cleared.

Change-Id: I15e46a3857d76ca37b01a4af4c4d331ec41febfc
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-03-28 22:13:27 +08:00
Xing Zheng
1a4d7e6781 ALSA: aloop: using raw cycles and jiffies
The system tick may be modified by NTP when we connect
with network, then  jiffies have an offset compared to
the local clock, it will cause the irq_pos / delta_play /
delta_capt also be inaccurate.

Therefore, we need a way to get raw jiffies which follows
local raw clocks.

Change-Id: I9be1790dfd98e430982dad6f03b04532889279a6
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
9fb7e51d0b ASoC: rockchip: pdm: adjust waterlevel in frame unit
This patch make the waterlevel more reasonable, because the pdm
controller share the single FIFO(128 entries) with each channel.
adjust waterlevel in frame to meet the vad or dma frames request.

Change-Id: I9b5808e55025347d435f47889f39ba34ac07ea1c
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
7b3bf21389 ASoC: rockchip: i2s: add compatible for rk1808
Change-Id: If495454e1fd8d2f5920f81d19fbf4cf56c979166
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
01994b8dd3 ASoC: rockchip: pdm: add compatible for rk1808
Change-Id: I152c5bf193ad5654d08d193b4ea45931b8d4f910
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Xing Zheng
7eddb52610 ASoC: rockchip: i2s: add 'rockchip,clk-trcm' property
Change-Id: I0756185c677b5cb9512ff25b69ceba5b248ec031
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2019-03-28 22:13:27 +08:00
Xing Zheng
50f1c29a07 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>
2019-03-28 22:13:27 +08:00
Sugar Zhang
ae2a7c248e ASoC: rockchip: add 'rockchip,no-dmaengine' for i2s/tdm/pdm
This patch add support for property 'rockchip,no-dmaengine'.
it is a boolean property. if present, driver will do not
register pcm dmaengine, only just register dai. if the dai
is part of multi-dais, the property should be present. Please
refer to rockchip,multidais.txt about multi-dais usage.

Change-Id: I9aa2ddb15f5a27202f90bf32804f214435cc0b73
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
8345433418 ALSA: pcm_dmaengine: always get stream position from DMA driver
This patch fixup that the wrong position when dma desc status
is DONE. even if the desc status is DONE, it is still able to
get the position from the dma driver. so, just remove the judgement.

Change-Id: I40e92bae09a002f4f5f0b2fab8b0e99fd3ee269d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
dfa5695f0c ASoC: rockchip: pdm: fixup pdm fractional div
Change-Id: I4fa9172e5738f03ad5050965db23f9a72abf7bae
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
d2c7aef4d8 ASoC: rockchip: pdm: optimize clear logic
Change-Id: I5d0062345a175942b82a5c6f4ee4e58a3abc655e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
19d09d8785 ASoC: rockchip: pdm: add default regs
Change-Id: I0453d04c035b8b6d6f084b5bac434ada64ea6e73
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
00e0a18d66 ASoC: rockchip: pdm: using left justified store mode
Change-Id: I3a787a1c71b6bbbfad632b1f07b1496fd1e5d9fc
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Binyuan Lan
e249d0522e ASoC: rockchip: i2s: protect I2S_XFER_TXS/I2S_XFER_RXS with spin lock
fix bug error log: "rockchip-i2s ff070000.i2s: fail to clear".
When the TX/RX have started, can not do 'clear operation'.

Change-Id: Ia156144490a61f4fa9823b1313588e44688f4bce
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
2019-03-28 22:13:27 +08:00
Tao Huang
9107b1d583 sound/soc/codecs/rt5651: fix compile warning
sound/soc/codecs/rt5651.c:351:14: warning: duplicate const
declaration specifier [-Wduplicate-decl-specifier]

Change-Id: I25ac1012398c7742c7b66d6a57f4956b96ba0aa4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
ebbfee2a9d ASoC: rockchip: i2s: add more compatible strings
Change-Id: I470934513e2188db2c2572daab833b11acd0a2a0
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
81d46bbe7f ASoC: rockchip: i2s: fix regmap_ops hang issue
This is because set_fmt ops maybe called when PD is off,
and in such case, regmap_ops will lead system hang.
enale PD before doing regmap_ops.

Change-Id: Iafa18acb59995ad86885a8d6a6f5f49a7d233962
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
ae27376a03 ASoC: rockchip: pdm: fix regmap_ops hang issue
This is because set_fmt ops maybe called when PD is off,
and in such case, regmap_ops will lead system hang.
enale PD before doing regmap_ops.

Change-Id: I86c04679c22e4763fd2539f88371ad1d33951723
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
34fc732a77 ASoC: rockchip: pdm: change dma burst to 8
This patch is to avoid fifo xrun in some timing case.

Change-Id: I511ebc4c443f1c3369fff1c4b4eb5faf145d5ae5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
ea6b48b571 ASoC: rockchip: i2s: change dma burst to 8
Change-Id: I0231030d054e4d3cb861dce8702898decc8ea0af
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
Chris Zhong
de0d15f6cb ASoC: es8328: Enabling support for 12Mhz sysclk
Change-Id: If9dea6039ab562023c81c2394c9286b7adc4a8c5
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2019-03-28 22:13:27 +08:00
zain wang
a6ddb2896a ALSA: usb-audio: Add SNDRV_PCM_TRIGGER_SUSPEND/RESUME to trigger functions
Missing SNDRV_PCM_TRIGGER_SUSPEND/RESUME, usb-audio can not enter suspend
since pcm was always running.

Change-Id: I0f7be7345f2b5c1bd42dad4c6fc4647c8636eed8
Signed-off-by: zain wang <wzz@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
c2fc451481 ASoC: rockchip: i2s: fixup clk div
we found mclk maybe not precise as required because of PLL,
but it still can be used and no side effect. for example, if we
require mclk 11289600, but get 11289598, it doesn't matter.
so using DIV_ROUND_CLOSEST to fix it.

Change-Id: If8453a7a08b319da81b07d572b02247bd7e7bd27
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
LuoXiaoTan
ba77f77aee ASoC: rt5651: add alc5651 ASRC switch for HDMIIn
Change-Id: I447228656d5ee56b2c4b04c515ad71f34e107ba0
Signed-off-by: LuoXiaoTan <lxt@rock-chips.com>
2019-03-28 22:13:27 +08:00
Sugar Zhang
0e676ff2b0 ASoC: rockchip: i2s: add support for i2s bclk fs configuration
this patch add support for i2s bclk fs configuration, we can
configure bclk_fs by devicetree as required.

Change-Id: I7e034e0466793b5b9eab6566a43e90213f219bb0
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 22:13:27 +08:00
wjh
eb85bf1ab7 drivers: sound: usb: fix disvr usb Audio bug
The disvr usb audio sampling rate is through nanoc reported to
the kernel, so don't need the kernel again set the sampling rate.

Change-Id: I60409fc579952a196c4fe40f678e87d505a7508d
Signed-off-by: wjh <wjh@rock-chips.com>
2019-03-28 22:13:27 +08:00
lanshh
d90d0c0a10 sound: usb: add USB ID for nanoc audio codec
Change-Id: I3c25691a74c9cf66e587fd4a5dcb6cef46040eec
Signed-off-by: lanshh <lsh@rock-chips.com>
2019-03-28 22:13:27 +08:00
Xu Jianqun
d9470df401 ASoC: RT5640: make rt5640 driver enable to be selected
Change-Id: I4600f79220ab4faf7bfde1cb75b7fbe7b5fef747
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2019-03-28 22:13:27 +08:00
Elaine Zhang
a3b184a43a thermal: rockchip: add pinctrl control
Based on the TSADC Tshut mode to select pinctrl,
instead of setting pinctrl based on architecture
(Not depends on pinctrl setting by "init" or "default").
And it requires setting the tshut polarity before select pinctrl.

Change-Id: Iac9ca05073b0181ee13b0048d0c2a54204f82bca
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-03-28 19:26:01 +08:00
Sugar Zhang
32ddd2e467 arm64: dts: rockchip: add reset properties for i2s
Change-Id: I1bdc5a417b412d484ba0caccc9e57da6a928de54
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-03-28 19:26:01 +08:00
Liang Chen
83d3857559 dt-bindings: soc: rockchip: add coregrf compatible string for rk1808
Change-Id: I55687ca089a43e9b3d8f293717747866e33e77cc
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-03-28 19:26:01 +08:00