Commit Graph

844341 Commits

Author SHA1 Message Date
Andy Yan
da7c615bc4 power: reset: reboot-mode: support parse boot mode
Parse boot mode on system bootup, and export it to
userspace by sysfs: sys/kernel/boot_mode

Change-Id: I0158fc28f4dae51c798806006e49cead4ce2e923
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-10-22 17:24:30 +08:00
Andy Yan
b997d1db8c dt-bindings: add BOOT_PANIC and BOOT_WATCHDOG
Change-Id: I66e3d7caa7b8591bd5af8d481ba773f5e38e9471
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-10-22 17:24:30 +08:00
Shunhua Lan
3c0fe8ef95 arm64: dts: rockchip: enable rt5651 sound for rk3399 excavator evb
Change-Id: I2cf4fcb10b8342aa8404ceec2b047b533986db7e
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-22 15:27:24 +08:00
Finley Xiao
517ab65e13 cpufreq: Adjust target frequency according to cpu threshold
Change-Id: Idd86ef55aad09860a6dc726c7285ee39b0845a38
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-22 15:25:11 +08:00
Finley Xiao
dd0fcebd81 thermal: devfreq_cooling: Add support to update stats when get requested power
The power_allocator thermal governor should get utilization of cooling
device to calculate dynamic power, but the powersave, userspace and performance
devfreq governor don't updade stats, so the utilization is inaccurate.

This patch adds support to update status when get requested power, so that
power_allocator can also work properly when use powersave, userspace and
performance devfreq governor.

Change-Id: Ic98fabf46f693a60b0f07094c59e75e4d141e42c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-22 14:58:00 +08:00
Finley Xiao
481b832d88 cpufreq: governor: userspace: Fix frequency error when suspend and resume
As policy->cur may be changed by thermal and cpufreq_suspend, the setspeed
may be changed after resume.

Change-Id: I6d4e0672ff39127c522f305719afd52806c31f48
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-22 14:48:09 +08:00
YouMin Chen
c2f9d93c30 clk: rockchip: clk-ddr: fill wait_flag to share_memory
Change-Id: I05b7ca6e7dd7e82758283db2899bf67966d00d29
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2019-10-22 11:30:38 +08:00
Simon Xue
2fb48992f3 ARM: dts: rockchip: rk312x: add rockchip,disable-device-link-resume for vop
vop iommu handled by vop driver, so ignore the iommu operation when vop
call pm_runtime_get_sync/pm_runtime_put_sync

Change-Id: I126661e56f16b1740793dcc49340518094eee514
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-22 11:03:28 +08:00
Finley Xiao
2505fbdd87 arm64: rk3399pro_npu_defconfig: Enable CONFIG_ROCKCHIP_PVTM
Change-Id: I7be830c32c023a0cc838ce2d30748cfeebb2f899
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-22 10:29:24 +08:00
Simon Xue
76541d4495 iommu/rockchip: ignore device_link for vop
iommu may enabled by pm_runtime_get_sync from vop, this
path is not accept by vop, so ignore device_link for vop

Change-Id: I532a2a964b423e78fadec02c3b4c2952301ebf4b
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-22 10:28:54 +08:00
Hans Yang
833fd5464b input/touchscreen/rockchip_gslX680: add revert_x setting
Change-Id: I2ce5da8730f70b5b62149c6e8c27ca58e20770e0
Signed-off-by: Hans Yang <yhx@rock-chips.com>
2019-10-22 10:20:13 +08:00
Frank Wang
7a02d27145 mailbox: rk3368: add mailbox and scpi function
Add mailbox and scpi protocol function support for rk3368 SoC.

Change-Id: I201c916865eb2729ed135c3f5a77a9dd97007952
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2019-10-22 09:46:38 +08:00
Simon Xue
ede2e03c38 PCI: rockchip: don't access ep if RC driver in .remove progress
In .remove progress, EP and RC driver may access EP via PCIe, don't
do really hardware access, just ignore.

Change-Id: Ide5831c2cdcabea6c289b1eb96d6f80294f94ac8
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-22 09:38:15 +08:00
Alexander Kochetkov
f086ebcfec clocksource/arm_global_timer: reconfigure clockevents after cpufreq change
After a cpufreq transition, update the clockevent's frequency
by fetching the new clock rate from the clock framework and
reprogram the next clock event.

The clock supplying the arm-global-timer on the rk3188 is coming
from the the cpu clock itself and thus changes its rate everytime
cpufreq adjusts the cpu frequency.

Found by code review, real impact not known. Assume what actual
HZ value will be different from expected on platforms using
arm-global-timer as clockevent.

The patch is port of commit 4fd7f9b128 ("ARM: 7212/1: smp_twd:
reconfigure clockevents after cpufreq change") and
commit 2b25d9f64b ("ARM: 7535/1: Reprogram smp_twd based on
new common clk framework notifiers").

Change-Id: I82552f621e30254b9c48f22fb3ebd2866d4476c8
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-10-21 20:30:19 +08:00
Yu YongZhen
5a84f7feef clk/rockchip: rk618: enlarge buffer size for clk name
strlcpy(clkin_name, __clk_get_name(clk), sizeof(clkin_name));
the clkin_name will wrong when clk is clk_i2s0_8ch_tx_out

Change-Id: If5603b5c31d4705289d075b2b375a35f3d4e4178
Signed-off-by: Yu YongZhen <yuyz@rock-chips.com>
2019-10-21 20:24:49 +08:00
Jacob Chen
dfbe9288e9 FROMLIST: ARM: dts: rockchip: Point rk3288 dwc2 usb at the full PHY reset
The "host1" port (AKA the dwc2 port that isn't the OTG port) on rk3288
has a hardware errata that causes everything to get confused when we get
a remote wakeup.  We'll use the reset that's in the CRU to reset the
port when it's in a bad state.

Note that we add the reset to both dwc2 controllers even though only one
has the errata in case we find some other use for this reset that's
unrelated to the current hardware errata.  Only the host port gets the
quirk property, though.

Change-Id: I472d33fb1db8b1a6b0c4fcea9ab31fd85b61af40
Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9324169/)
2019-10-21 20:13:00 +08:00
Shunqian Zheng
c5246fb319 devfreq_cooling: inline the of_devfreq_cooling_register_power()
Make of_devfreq_cooling_register_power() as static inline.
This fixes the building error when CONFIG_THERMAL is disabled.

Change-Id: I3d88a3679de279a7ee7eadae7243b9661fdddf75
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-10-21 20:08:48 +08:00
Finley Xiao
a75ae2b5d7 thermal: power_allocator: Add support to get PID constant from dt
Change-Id: Ibabdad4ba2df6df26d75483dd35b6c51572befe8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-21 19:09:48 +08:00
Finley Xiao
e8ca6ed7ae PM / devfreq: event: Add new Rockchip NoC probe driver
This patch adds NoC (Network on Chip) Probe driver which provides
the primitive values to get the performance data. For example, RK3399
has multiple NoC probes to monitor traffic statistics for analyzing
the transaction flow.

Change-Id: I66f6708f0d244488ca08f0f1f1cb36b19c7a2d0a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-21 19:08:59 +08:00
XiaoDong Huang
8c9d010061 PM / devfreq: rockchip_bus: add support for rk1808
Change-Id: I2be704a4b72fc0c2b6c8c864e2fb605038271ce5
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2019-10-21 19:08:35 +08:00
Finley Xiao
d6d99ba36f clk: rockchip: rk3128: Change SCLK_DDRC to composite
Change-Id: I6aeae7103c1eaed0b4515d8d11863c4b190b6918
Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-21 19:03:21 +08:00
Jianqun Xu
907ef342e1 PM / devfreq: add to show current load of device
Calculate current load with busytime / totaltime from status,
also show the current frequency.

Change-Id: Ic310035db9c5478aa3d0b1e526b47c451fe09d23
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-21 18:58:31 +08:00
Finley Xiao
aea5343525 soc: rockchip: power-domain: Add dmcfreq lock when pd on/off
In order to fix deadlock between dmcfreq and vop on/off,
When change vop status and ddr frequency at the same time,
the following deadlock will happen:

vop no/off                            dmcfreq
vop_crtc_disable                      update_devfreq
->mutex_lock(&vop->vop_lock);         ->mutex_lock(&pd->pmu->mutex);
->pm_runtime_put(vop->dev);           ->mutex_lock(&vop->vop_lock);
  ->mutex_lock(&pd->pmu->mutex);      ...

Change-Id: I56a4ee944200826d2a09e3ae8d2f4837f6f769d6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-21 18:32:18 +08:00
Shengfei Xu
2f8382918e mfd: RK808: initialization of pm_power_off pointer
Change-Id: I274063825a98fdbcb67ea6879e3adf718a758983
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-10-21 18:05:54 +08:00
Tao Huang
2c28c22183 rk: arm64: support make image with script mkimg
Change-Id: I6067d9a4d2b68b63c449646f36255dde3d795611
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-21 17:07:13 +08:00
Tao Huang
4db3d95ed2 rk: ARM: support make image with script mkimg
Change-Id: I8719d7fb9e6f40b02e3a3f67ac7588e9ff295da2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-21 17:07:13 +08:00
Tao Huang
b742264649 rk: add scripts/mkimg
For help pack rockchip special image.

Change-Id: Ifa101275c21fcfba9e3244c23a5b38ef3175f22c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-21 17:07:13 +08:00
Bin Yang
2131b12006 usb: dwc2: prevent core phy initialisation
The usb phys need to be controlled dynamically on some Rockchip SoCs.
So set the new HCD flag which prevents USB core from trying to manage
our phys.

Change-Id: I2d1197f42fe49bc4e454954481f344256fddb557
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2019-10-21 16:57:57 +08:00
Bin Yang
cd7a75caa3 usb: dwc2: Disable power down feature on Rockchip SoCs
Power down feature of DWC2 module integrated in Rockchip SoCs doesn't work
properly or needs some additional handling in PHY or SoC glue layer, so
disable it for now. Without disabling power down, DWC2 sporadically cannot
detect USB disconnect.

Change-Id: Ic46fdb7a000b9029727a6a46e4ca5399b98285e8
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2019-10-21 16:57:52 +08:00
William Wu
debf378724 usb: dwc2: hcd: do not disable non-split periodic channels
The dwc2 programming guide section 3.5 'Halting a Channel'
says that the application can disable any channel by
programming the HCCHARn register with the HCCHARn.ChDis
and HCCHARn.ChEna bits set to 1'b1. This enables the
dwc_otg host to flush the posted requests (if any) and
generates a Channel Halted interrupt.

But it also requires that channel disable must not be
programmed for non-split periodic channels. At the end
of the next uframe/frame (in the worst case), the core
generates a channel halted and disables the channel
automatically.

If we disable non-spilt periodic channels to halt the
channels, it will easily to cause data transfer fail.
A typical case is take photo with usb camera or close
usb camera, Specifically, the observed order is:

1. uvc driver calls usb_kill_urb
2. usb_kill_urb calls urb_dequeue to cancel urb
3. urb_dequeue call dwc_otg_hc_halt to disable
   non-spilt periodic channels
4. usb core doesn't halt the non-spilt periodic
   channels immediately, and the application
   reallocates the channels for other transactions
   without waiting for the HCINTn.ChHltd interrupt.
5. uvc driver calls usb_set_interface to start
   control transfer, and gets a channel which used
   for non-spilt periodic transfer before. The core
   generates a channel halted and disables the channel
   automatically. This cause control transfer fail.

Change-Id: I95424a99b77b552396a9fb95a5058258270ed4c2
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-10-21 16:57:41 +08:00
Feng Mingli
95ef3c4d12 usb: dwc2: keep phy power on if current mode is host during probe
The commit e6f2f6d63e ("usb: dwc2: power on/off phy for
otg mode") aimed to control phy power for otg mode, but
it also introduced a new problem, so we fix it.

This patch keep phy power on for otg if current mode is
host during dwc2 probe, otherwise the enumeration will
fail with the following error log:

Cannot enable. Maybe the USB cable is bad?
Cannot enable. Maybe the USB cable is bad?
attempt power cycle
Cannot enable. Maybe the USB cable is bad?
Cannot enable. Maybe the USB cable is bad?
unable to enumerate USB device

Fixes: e6f2f6d63e ("usb: dwc2: power on/off phy for otg mode")
Change-Id: I17a4cab6f0337fdc0923989aea8613bfbe1a9e9b
Signed-off-by: Feng Mingli <fml@rock-chips.com>
2019-10-21 16:57:31 +08:00
William Wu
ee18a6d10d usb: dwc2: gadget: fix frame overrun issue
The frame_overrun flag is used to indicates
SOF number (current_frame) overrun in DSTS
and the target_frame over DSTS_SOFFN_LIMIT.

Clear the frame_overrun flag only if target_frame
below DSTS_SOFFN_LIMIT and current_frame less
than target_frame.

Change-Id: I91cf9001324a9bbbcc4bc28b335695d607fb69d4
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-10-21 16:57:14 +08:00
William Wu
69ab1c1656 usb: dwc2: add pm runtime support
Adds pm_runtime support for dwc2, so that power domain is
enabled only when there is a transaction going on to help
save power.

Change-Id: I318552774d20eeaed521ff179f99b2551ee24183
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-10-21 16:57:14 +08:00
Meng Dongyang
95d721398c FROMLIST: usb: dwc2: Fix NULL qh in dwc2_queue_transaction
When a usb device disconnects in a certain way, dwc2_queue_transaction
still gets called after dwc2_hcd_cleanup_channels.

dwc2_hcd_cleanup_channels does "channel->qh = NULL;" but
dwc2_queue_transaction still wants to dereference qh.
This adds a check for a null qh.

(am from https://patchwork.kernel.org/patch/7245251/)
Change-Id: Ia9c7f5febe0bb6f0123cfc85c90beb9fc1d80bdd
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2019-10-21 16:57:14 +08:00
Meng Dongyang
11604a7876 usb: dwc2: set op_state to peripheral when resume
The operation mode of controller will change to peripheral when
resume if PD is power off during suspend, current code disconnect
hcd and set lx state to L3 in this case to make sure the controller
will be reinit in device mode, but that's not enough, the op_state
is still host which is change when init or ID change interrupt
occur. If the ID change happened after suspend the driver would
miss the interrupt, so when the application call the pullup function
to stop gadget and start again to change to another function, the
disconnect gadget operation can't be done and the gadget restart
directly. This will result in NULL point when gadget work. This
patch set op_state to OTG_STATE_B_PERIPHERAL when resume in this
case.

Change-Id: Ifbafb7fae43d634cfa879c9a066d1e114db4196e
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2019-10-21 16:57:14 +08:00
Meng Dongyang
cba3c4bdda usb: dwc2: make hcd into L3 power off state when suspend
The controller will reset and run into error state if turn
off power when suspend in host mode. This patch stop hcd to
make the controller into L3 state to make sure that the
controller and driver state will reset when resume.

Change-Id: If66bc1a249e919f440ecde0c66f18dabde0b2e62
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2019-10-21 16:57:14 +08:00
William Wu
f9299aad43 usb: dwc2: power on/off phy for otg mode
The commit dc71e51944 ("usb: dwc2: make otg manage lowlevel
hw on its own") aimed to control the clk and phy power for
otg mode, but it also introduced lost of new problems, so we
revert it.

This patch only controls phy power for otg mode, it can fix
the dwc2 udc start fail issue with the following error log:

dwc2_hsotg_init_fifo: timeout flushing fifos (GRSTCTL=80000430)
dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
bound driver configfs-gadget
dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001

Change-Id: Id6996aecab7f0aaaf12530b7a377144e23ef1667
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-10-21 16:57:14 +08:00
William Wu
eb6d585c9a FROMLIST: usb: dwc2: resume root hub to handle disconnect of device
When handle disconnect of the hcd during bus_suspend, hcd
needs to resume its root hub, otherwise the root hub will
not disconnect the existing devices under its port.

This issue always happens when connecting with usb devices
which support auto-suspend function (e.g. usb hub).

(am from https://patchwork.kernel.org/patch/9751469/)
Change-Id: I663fdea73f36e89130d9a250612363968cbff941
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-10-21 16:57:14 +08:00
Frank Wang
59b1f262d8 usb: dwc2: add multiple clock handling
Originally, dwc2 just handle one clock named otg, however, it may have
two or more clock need to manage for some new SoCs, so this adds
change clk to clk's array of dwc2_hsotg to handle more clocks operation.

Change-Id: I661297ef908d9eace2215205018fa94d12cea128
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2019-10-21 16:57:14 +08:00
Jacob Chen
48ca5779e3 FROMLIST: usb: dwc2: assert phy reset when waking up in rk3288 platform
On the rk3288 USB host-only port (the one that's not the OTG-enabled
port) the PHY can get into a bad state when a wakeup is asserted (not
just a wakeup from full system suspend but also a wakeup from
autosuspend).

We can get the PHY out of its bad state by asserting its "port reset",
but unfortunately that seems to assert a reset onto the USB bus so it
could confuse things if we don't actually deenumerate / reenumerate the
device.

We can also get the PHY out of its bad state by fully resetting it using
the reset from the CRU (clock reset unit) in chip, which does a more full
reset.  The CRU-based reset appears to actually cause devices on the bus
to be removed and reinserted, which fixes the problem (albeit in a hacky
way).

It's unfortunate that we need to do a full re-enumeration of devices at
wakeup time, but this is better than alternative of letting the bus get
wedged.

Change-Id: I3120a38a7f646a9d244f04bd2dcfef7474a4a6d1
Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(am from https://mail-archive.com/linux-kernel@vger.kernel.org/msg1254059.html)
2019-10-21 16:57:14 +08:00
Shixiang Zheng
e09c7baf75 arm64: Makerfile: try using python script for auto convert bmp logo
Change-Id: I7e3ced455f5f7d05b00558d2e7753168a68b7d7f
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-10-21 16:17:04 +08:00
Yu YongZhen
e52d05cf03 arm: Makefile: pack logo when CONFIG_DRM
Change-Id: I11ce5935ddff13618776a82faae56670f31b1d51
Signed-off-by: Yu YongZhen <yuyz@rock-chips.com>
2019-10-21 16:13:45 +08:00
Shixiang Zheng
14c37b9fb4 ARM: Makerfile: try using python script for auto convert bmp logo
Change-Id: I11730f39b317d1d267e60500f0228bb960e44cce
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2019-10-21 16:13:08 +08:00
Tao Huang
fc5f57b2b0 net: rockchip_wlan: rtl8723cs: work around clang bug
/tmp/rtl8703b_phycfg-53954c.s: Assembler messages:
/tmp/rtl8703b_phycfg-53954c.s:3071: Error: selected processor does not support `bfc w0,#4,#4'

Change-Id: I9a2cf7ea8b4da82ab6148043983ad57b68b93562
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-21 15:56:59 +08:00
Tao Huang
2f0f1a27bd net: rockchip_wlan: rtl8723cs: fix clang compile error
drivers/net/wireless/rockchip_wlan/rtl8723cs/core/rtw_debug.c:45:44: error: expansion of date or time macro is not reproducible [-Werror,-Wdate-time]
        RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__);

Change-Id: I07e50007edc508ec684eb421cfe5fd4378c96553
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-21 15:56:59 +08:00
Jianing Ren
2e4b6184c7 HACK: arm64: dts: rk3399-android: fixing the adb function cannot be used
This is a HACK patch setting dwc3 dr-mode from otg to peripheral.

Change-Id: I4a6ba065e0369315e95f6ad251b58cc16b1c4e81
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2019-10-21 14:46:31 +08:00
William Wu
4e9d8608a8 usb: gadget: composite: fix double freeing of freed memory
The following message can be observed on rk3399 nougat board
when switch MTP/charge mode with KASan backported :

=============================================================================
BUG kmalloc-192 (Not tainted): Object already free
-----------------------------------------------------------------------------

Disabling lock debugging due to kernel taint
INFO: Allocated in dwc3_gadget_ep_alloc_request+0x2c/0xf4 age=977 cpu=4 pid=1
alloc_debug_processing+0x128/0x17c
___slab_alloc.constprop.56+0x520/0x604
__slab_alloc.isra.53.constprop.55+0x24/0x34
kmem_cache_alloc_trace+0xa4/0x210
dwc3_gadget_ep_alloc_request+0x2c/0xf4
__ffs_func_bind_do_descs+0x15c/0x1b0
ffs_do_descs+0x50/0x180
ffs_func_bind+0x3e4/0x634
usb_add_function+0x78/0xe8
configfs_composite_bind+0x240/0x2d8
udc_bind_to_driver+0x38/0xcc
usb_udc_attach_driver+0x80/0xa8
gadget_dev_desc_UDC_store+0xa0/0xe4
configfs_write_file+0xfc/0x14c
__vfs_write+0x38/0xfc
vfs_write+0xac/0x174
INFO: Freed in dwc3_gadget_ep_free_request+0x84/0xbc age=4 cpu=4 pid=1
free_debug_processing+0x29c/0x36c
__slab_free+0x60/0x388
kfree+0x210/0x27c
dwc3_gadget_ep_free_request+0x84/0xbc
ffs_func_unbind+0x88/0xe4
purge_configs_funcs+0xa8/0x100
configfs_composite_unbind+0x34/0x5c
usb_gadget_remove_driver+0x74/0xa0
usb_gadget_unregister_driver+0x60/0xa4
unregister_gadget+0x24/0x48
gadget_dev_desc_UDC_store+0x7c/0xe4
configfs_write_file+0xfc/0x14c
__vfs_write+0x38/0xfc
vfs_write+0xac/0x174
SyS_write+0x54/0xa4
el0_svc_naked+0x24/0x28
Hardware name: Rockchip RK3399 Evaluation Board v3 edp (Android) (DT)
Call trace:
[<ffffff9008088490>] dump_backtrace+0x0/0x1c8
[<ffffff900808866c>] show_stack+0x14/0x1c
[<ffffff900835cbe4>] dump_stack+0x8c/0xac
[<ffffff900819f840>] print_trailer+0x188/0x198
[<ffffff900819f9bc>] object_err+0x3c/0x4c
[<ffffff90081a1fb8>] free_debug_processing+0x27c/0x36c
[<ffffff90081a2108>] __slab_free+0x60/0x388
[<ffffff90081a2c88>] kfree+0x210/0x27c
[<ffffff9008645a58>] composite_dev_cleanup+0x74/0xfc
[<ffffff900864789c>] configfs_composite_bind+0x2b8/0x2d8
[<ffffff900864953c>] udc_bind_to_driver+0x38/0xcc
[<ffffff9008649650>] usb_udc_attach_driver+0x80/0xa8
[<ffffff900864835c>] gadget_dev_desc_UDC_store+0xa0/0xe4
[<ffffff9008218144>] configfs_write_file+0xfc/0x14c
[<ffffff90081ac958>] __vfs_write+0x38/0xfc
[<ffffff90081ad290>] vfs_write+0xac/0x174
[<ffffff90081adc4c>] SyS_write+0x54/0xa4
[<ffffff90080826f0>] el0_svc_naked+0x24/0x28

This patch sets the usb_request pointer to NULL after the
free the usb_request buf. And the composite_dev_cleanup()
will check if the usb_request pointer is NULL before do
kfree and avoid double freeing freed menory.

Change-Id: I69df57553cb14d046b8b8206becd342a5e5fb7ba
Signed-off-by: William Wu <wulf@rock-chips.com>
2019-10-21 11:47:18 +08:00
Shunhua Lan
ec584b4972 ASoC: rt5651: Porting to rockchip platform
1 add mclk control
2 add speaker amplifier control

Change-Id: Ib3c03cd281f1ebf4d6d583076bd3930bbe3b3fe0
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-21 11:00:32 +08:00
Elaine Zhang
cf11cb15dd ARM: dts: rockchip: remove the regulator-initial-mode for vcc_ddr
The driver does not match the dts, pmic driver is update to 4.19 kernel,
but the dts node is not update,make the vcc_ddr regulator init failed:
[    2.126351] rk808 0-001a: chip id: 0x8160
[    2.134083] rk808-regulator rk808-regulator: there is no dvs0 gpio
[    2.134229] rk808-regulator rk808-regulator: there is no dvs1 gpio
[    2.134347] DCDC_REG1: supplied by vcc_sys
[    2.136769] DCDC_REG2: supplied by vcc_sys
[    2.138759] DCDC_REG3: supplied by vcc_sys
[    2.139064] vcc_ddr: no set_mode operation
[    2.139110] rk808 0-001a: failed to register 2 regulator
[    2.140110] rk808-regulator: probe of rk808-regulator failed with error -22

Change-Id: Ieecd8678345202db0be5ac4c669c890283793d42
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2019-10-18 14:04:30 +08:00
Wang Panzhenzhuan
4b28c34a8e arm64: dts: rockchip: rk3399-sapphire-excavator-edp: enable ov13850 & module attached vcm & flash
Change-Id: I3d62df5dd2dce4919314c30f7f4652e8f6e59fd2
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-10-18 09:21:05 +08:00