Commit Graph

1072951 Commits

Author SHA1 Message Date
Wesley Cheng
8ca246c586 BACKPORT: usb: dwc3: Do not service EP0 and conndone events if soft disconnected
There are some operations that need to be ignored if there is a soft
disconnect in progress.  This is to avoid having a pending EP0 transfer in
progress while attempting to stop active transfers and halting the
controller.

There were several instances seen where a soft disconnect was able to occur
during early link negotiation, i.e. bus reset/conndone, which leads to the
conndone handler re-configuring EPs while attempting to halt the
controller, as DEP flags are cleared as part of the soft disconnect path.

ep0out: cmd 'Start New Configuration'
ep0out: cmd 'Set Endpoint Transfer Resource'
ep0in: cmd 'Set Endpoint Transfer Resource'
ep1out: cmd 'Set Endpoint Transfer Resource'
...
event (00030601): Suspend [U3]
event (00000101): Reset [U0]
ep0out: req ffffff87e5c9e100 length 0/0 zsI ==> 0
event (00000201): Connection Done [U0]
ep0out: cmd 'Start New Configuration'
ep0out: cmd 'Set Endpoint Transfer Resource'

In addition, if a soft disconnect occurs, EP0 events are still allowed to
process, however, it will stall/restart during the SETUP phase.  The
host is still able to query for the DATA phase, leading to a
xfernotready(DATA) event.  Since none of the SETUP transfer parameters are
populated, the xfernotready is treated as a "wrong direction" error,
leading to a duplicate stall/restart routine.

Add the proper softconnect/connected checks in sequences that are
potentially involved during soft disconnect processing.

Change-Id: Iaeae73684d91391ab51a02db59e7d04d3a196301
Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220817182359.13550-2-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 359d5a85a7)
2022-11-11 20:03:32 +08:00
Wesley Cheng
d3b61da8cf UPSTREAM: usb: dwc3: gadget: Avoid duplicate requests to enable Run/Stop
Relocate the pullups_connected check until after it is ensured that there
are no runtime PM transitions.  If another context triggered the DWC3
core's runtime resume, it may have already enabled the Run/Stop.  Do not
re-run the entire pullup sequence again, as it may issue a core soft
reset while Run/Stop is already set.

This patch depends on
  commit 69e131d1ac ("usb: dwc3: gadget: Prevent repeat pullup()")

Change-Id: Ic4fa942b4c5f39da71741146fb50b6785ba026ba
Fixes: 77adb8bdf4 ("usb: dwc3: gadget: Allow runtime suspend if UDC unbinded")
Cc: stable <stable@kernel.org>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220728020647.9377-1-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 040f2dbd20)
2022-11-11 20:03:32 +08:00
Michael Grzeschik
8f20fc0a19 UPSTREAM: usb: dwc3: gadget: conditionally remove requests
The functions stop_active_transfers and ep_disable are both calling
remove_requests. This functions in both cases will giveback the requests
with status ESHUTDOWN, which also represents an physical disconnection.
For ep_disable this is not true. This patch adds the status parameter to
remove_requests and sets the status to ECONNRESET on ep_disable.

Change-Id: I7bb9dead0d4f4a50bc5600abb2a64d1d63257355
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220720213523.1055897-1-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit b44c0e7fef)
2022-11-11 20:03:32 +08:00
Wesley Cheng
bbce23d3be UPSTREAM: usb: dwc3: ep0: Properly handle setup_packet_pending scenario in data stage
During a 3 stage SETUP transfer, if the host sends another SETUP token
before completing the status phase, it signifies that the host has aborted
the current control transfer.  Currently, if a setup_packet_pending is
received, there are no subsequent calls to dwc3_ep0_out_start() to fetch
the new SETUP packet.  This leads to a stall on EP0, as host does not
expect another STATUS phase as it has aborted the current transfer.

Fix this issue by explicitly stalling and restarting EP0, as well as
resetting the trb_enqueue indexes.  (without this, there is a chance the
SETUP TRB is set up on trb_endqueue == 1)

Change-Id: Ib4502a1e5d70b46b6314b4061788d3883e2bdf42
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220712014403.2977-1-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 5e76ee96be)
2022-11-11 20:03:32 +08:00
Kushagra Verma
7468a28eab UPSTREAM: usb: dwc3: Fix a repeated word checkpatch warning
Fixes a repeated word checkpatch warning in ep0.c by removing the repeated
'only' word.

Change-Id: Id02e91b0f536a426acb4961f7dc836f30e8ce173
Signed-off-by: Kushagra Verma <kushagra765@outlook.com>
Link: https://lore.kernel.org/r/HK0PR01MB2801996E815208393170010FF8D39@HK0PR01MB2801.apcprd01.prod.exchangelabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit d1b39dd581)
2022-11-11 20:03:32 +08:00
Kushagra Verma
1c05ec4e21 UPSTREAM: usb: dwc3: Fix bare use of unsigned checkpatch warning
Fixes the bare use of unsigned warning from checkpatch.pl in core.c by
changing 'unsigned' to 'unsigned int'.

Change-Id: I887e31d6592f3b753fbce3a644e6691b87bf0efc
Signed-off-by: Kushagra Verma <kushagra765@outlook.com>
Link: https://lore.kernel.org/r/HK0PR01MB280160BCA168FA9FE159F02AF8D39@HK0PR01MB2801.apcprd01.prod.exchangelabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit ca80ca6186)
2022-11-11 20:03:32 +08:00
Mayank Rana
873b6da780 UPSTREAM: usb: dwc3: core: Add error log when core soft reset failed
DWC3 controller soft reset is important operation for USB functionality.
In case when it fails, currently there is no failure log. Hence add
error log when core soft reset failed.

Change-Id: I2de0d6d1f94a85d9efa85b06387858a8db0841e4
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
Link: https://lore.kernel.org/r/1652897572-14461-1-git-send-email-quic_mrana@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 859bdc3595)
2022-11-11 20:03:32 +08:00
Mayank Rana
1929d9ae15 UPSTREAM: usb: dwc3: Fix ep0 handling when getting reset while doing control transfer
According to the databook ep0 should be in setup phase during reset.
If host issues reset between control transfers, ep0 will be  in an
invalid state. Fix this by issuing stall and restart on ep0 if it
is not in setup phase.

Also SW needs to complete pending control transfer and setup core for
next setup stage as per data book. Hence check ep0 state during reset
interrupt handling and make sure active transfers on ep0 out/in
endpoint are stopped by queuing ENDXFER command for that endpoint and
restart ep0 out again to receive next setup packet.

Change-Id: I4127a1d80d3f555ef606e22b49b309f24b7413bc
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
Link: https://lore.kernel.org/r/1651693001-29891-1-git-send-email-quic_mrana@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 9d778f0c5f)
2022-11-11 20:03:32 +08:00
Kushagra Verma
5a08fd1159 UPSTREAM: USB / dwc3: Fix a checkpatch warning in core.c
This patch fixes the following checkpatch.pl warning in core.c:
    WARNING: braces {} are not necessary for any arm of this statement

Change-Id: I17810f2c4b6fcaf7091e97a6050b9ed125a32233
Signed-off-by: Kushagra Verma <kushagra765@outlook.com>
Link: https://lore.kernel.org/r/TYZPR01MB39354534E2F9EE4E022DDAFFF8C89@TYZPR01MB3935.apcprd01.prod.exchangelabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit d090c7a2ab)
2022-11-11 20:03:32 +08:00
Thinh Nguyen
42973c2690 UPSTREAM: usb: dwc3: gadget: Delay issuing End Transfer
If the controller hasn't DMA'ed the Setup data from its fifo, it won't
process the End Transfer command. Polling for the command completion may
block the driver from servicing the Setup phase and cause a timeout.
Previously we only check and delay issuing End Transfer in the case of
endpoint dequeue. Let's do that for all End Transfer scenarios.

Change-Id: I38ca19735337ca3e09d0d27d6623ea7acae37b16
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/2fcf3b5d90068d549589a57a27a79f76c6769b04.1650593829.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f66eef8fb8)
2022-11-11 20:03:32 +08:00
Thinh Nguyen
aa6ce8654e UPSTREAM: usb: dwc3: gadget: Only End Transfer for ep0 data phase
The driver shouldn't be able to issue End Transfer to the control
endpoint at anytime. Typically we should only do so in error cases such
as invalid/unexpected direction of Data Phase as described in the
control transfer flow of the programming guide. It _may_ end started
data phase during controller deinitialization from soft disconnect or
driver removal. However, that should not happen because the driver
should be maintained in EP0_SETUP_PHASE during driver tear-down. On
soft-connect, the controller should be reset from a soft-reset and there
should be no issue starting the control endpoint.

Change-Id: I1dabd91d5078be2af8ff65e1fadd3cf16e76db7f
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/3c6643678863a26702e4115e9e19d7d94a30d49c.1650593829.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit ace17b6ee4)
2022-11-11 20:03:32 +08:00
Thinh Nguyen
fa866ff228 BACKPORT: usb: dwc3: ep0: Don't prepare beyond Setup stage
Since we can't guarantee that the host won't send new Setup packet
before going through the device-initiated disconnect, don't prepare
beyond the Setup stage and keep the device in EP0_SETUP_PHASE. This
ensures that the device-initated disconnect sequence can go through
gracefully. Note that the controller won't service the End Transfer
command if it can't DMA out the Setup packet.

Change-Id: I797d9cc93f775929acdead9762e79e073ac61239
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/6bacec56ecabb2c6e49a09cedfcac281fdc97de0.1650593829.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c96683798e)
2022-11-11 20:03:32 +08:00
Thinh Nguyen
26eef0a006 UPSTREAM: usb: dwc3: gadget: Don't modify GEVNTCOUNT in pullup()
If the GEVNTCOUNT indicates events in the event buffer, the driver needs
to acknowledge them before the controller can halt. Simply let the
interrupt handler acknowledges the remaining event generated by the
controller while polling for DSTS.DEVCTLHLT. This avoids disabling irq
and taking care of race condition between the interrupt handlers and
pullup().

Change-Id: Ief1bc9deb10e02f84fdc952481a7bb98f9cf8b78
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/ea306ec93c41ccafbdb5d16404ff3b6eca299613.1650593829.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 8f8034f493)
2022-11-11 20:03:32 +08:00
Thinh Nguyen
ac866b5b8b UPSTREAM: usb: dwc3: gadget: Refactor pullup()
Move soft-disconnect sequence out of dwc3_gadget_pullup(). No
functional change here.

Change-Id: I2ddbae436142ad57564142240129ef7c29f0a955
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/4c0f259b17d95acaaa931f90276683a48a32fe22.1650593829.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 861c010a2e)
2022-11-11 20:03:32 +08:00
Thinh Nguyen
cf9aef9a99 UPSTREAM: usb: dwc3: gadget: Prevent repeat pullup()
Don't do soft-disconnect if it's previously done. Likewise, don't do
soft-connect if the device is currently connected and running. It would
break normal operation.

Currently the caller of pullup() (udc's sysfs soft_connect) only checks
if it had initiated disconnect to prevent repeating soft-disconnect. It
doesn't check for soft-connect. To be safe, let's keep the check here
regardless whether the udc core is fixed.

Change-Id: I07eaeb0ed388ef967eeb9c7513a9c1b260f8d9c5
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/1c1345bd66c97a9d32f77d63aaadd04b7b037143.1650593829.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 69e131d1ac)
2022-11-11 20:03:32 +08:00
Wesley Cheng
80e501ef08 BACKPORT: usb: dwc3: EP clear halt leading to clearing of delayed_status
The usb_ep_clear_halt() API can be called from the function driver, and
translates to dwc3_gadget_ep_set_halt().  This routine is shared with when
the host issues a clear feature ENDPOINT_HALT, and is differentiated by the
protocol argument.  If the following sequence occurs, there can be a
situation where the delayed_status flag is improperly cleared for the wrong
SETUP transaction:

1. Vendor specific control transfer returns USB_GADGET_DELAYED_STATUS.
2. DWC3 gadget sets dwc->delayed_status to '1'.
3. Another function driver issues a usb_ep_clear_halt() call.
4. DWC3 gadget issues dwc3_stop_active_transfer() and sets
   DWC3_EP_PENDING_CLEAR_STALL.
5. EP command complete interrupt triggers for the end transfer, and
   dwc3_ep0_send_delayed_status() is allowed to run, as delayed_status
   is '1' due to step#1.
6. STATUS phase is sent, and delayed_status is cleared.
7. Vendor specific control transfer is finished being handled, and issues
   usb_composite_setup_continue().  This results in queuing of a data
   phase.

Cache the protocol flag so that DWC3 gadget is aware of when the clear halt
is due to a SETUP request from the host versus when it is sourced from a
function driver.  This allows for the EP command complete interrupt to know
if it needs to issue a delayed status phase.

Change-Id: If19e1628c151a109820a60e7b4c4c6f6128a2242
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220414073902.21960-1-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 2840d6dfcf)
2022-11-11 20:03:32 +08:00
Michael Grzeschik
0ec00e864a UPSTREAM: usb: dwc3: gadget: move cmd_endtransfer to extra function
This patch adds the extra function __dwc3_stop_active_transfer to
consolidate the same codepath.

Change-Id: I59d031db6eb52487f443fc6eef11214ca2d95234
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220306211251.2281335-3-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit e192cc7b52)
2022-11-11 20:03:32 +08:00
Thinh Nguyen
415b0d9d14 UPSTREAM: usb: dwc3: gadget: Skip checking Update Transfer status
If we're not setting CMDACT (from "No Response" Update Transfer
command), then there's no point in checking for the command status. So
skip it. This can reduce a register read delay and improve performance.

Change-Id: I00106aab2965b3c65de8a9ea5e4846e59472c101
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/3dc31cf11581ae3ee82d9202dda3fc17d897d786.1638240306.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit bc27117c7c)
2022-11-11 20:03:32 +08:00
Sandy Huang
a1be106ef0 drm/rockchip: add support vop3
Rockchip VOP3 is new VOP architecture base on VOP2, compared to the
VOP2, the biggest change is VOP overlay and post process module.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I19ee4e91aa430ec8b80095702c697d08a696d52b
2022-11-11 19:45:35 +08:00
Lin Jinhan
fa0690beb7 ARM: dts: rockchip: rv1106-thunder-boot: remove MCLK_REF_MIPI0 control
On some sensors, the exposure configuration for the first frame
 will be lost if the MCLK was ever turned off before stream on.
(Such as GC2093.)

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I06f7eb24fa4f13afaca32f66701956e216b552ec
2022-11-11 16:56:11 +08:00
Shunhua Lan
99edbfa6ee arm64: dts: rockchip: rk3588-evb: use rockchip,hdmi as hdmirx audio machine driver
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I4b71a030a4880805eb3c62ecf3038c74f0494f77
2022-11-11 11:33:56 +08:00
Shunhua Lan
d8ca2c67b5 media: rockchip: hdmirx: report audio off event
For hdmirx controllers, audio interface always act as master And
will make system wait a long time for audio data, Here report a
audio off event to audio stream, Then applications can exit immediately

Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ia8b458d5a45f8c84f17dfd10cf8bdae8d6a6016d
2022-11-11 11:32:48 +08:00
Herman Chen
25e0528c51 video: rockchip: mpp: Add reg range dump
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0999877a10767d90fec32b2858beff72642a0a55
2022-11-11 09:28:56 +08:00
Shunhua Lan
b22cb46be7 ASoC: hdmi-codec: pcm stop when plug out
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I1507dc6b92a0342e6b3d86472618f90dc721e779
2022-11-10 19:19:18 +08:00
Jianqun Xu
5a4a287ae5 ARM: dts: rockchip: rk3288: move i2c0 to the front of other i2c
Move i2c0 node ahead before i2c1, make the i2c0 to be probed first.

Change-Id: I822622fc1f1ed41729851294858246cf6da8c202
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-11-10 17:28:46 +08:00
Zefa Chen
da1b05c63b media: rockchip: vicap fixed frame_phase state with wake up mode
sometimes, cause buffer state error in thunderboot mode

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I1b750cbad21e29b112d8e7670029c6f1d0d53fc3
2022-11-10 17:12:47 +08:00
Jianhui Wang
651d51090c ARM: dts: rockchip: rk3288 support mpp
The defaultly vpu clock rate 600MHz makes reboot failure,
patch has assigned clock rates for vpu.

Change-Id: I986295b4dda6f99e524dcebeaa00128af87d51bf
Signed-off-by: Jianhui Wang <wjh@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-11-10 16:32:11 +08:00
Jianqun Xu
b84653d8ca ARM: dts: rockchip: rk3288-linux fix codingstyle issues
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I65a7ee2ceba5369c09e18061e27915cfeda2c460
2022-11-10 16:00:23 +08:00
Jianqun Xu
8d9511e41e ARM: dts: rockchip: rk3288-evb-rk808-linux fix ak8963 node ref name
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I90f139fd17abe4310d430946dd8ee9a9b73a1946
2022-11-10 15:59:53 +08:00
Jianqun Xu
c5157e245b ARM: dts: rockchip: rk3288-evb-rk808-linux remove power key node
Remove the duplicated power key node, which has existed in
rk3288-evb.dtsi file.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I798fe8fc1096dc07243fa9573bb19ffc6636a358
2022-11-10 15:59:10 +08:00
Jianqun Xu
37b917281e ARM: dts: rockchip: rk3288-evb fix mmc nodes to use host type tags
Fixes: 78f9ac0daa ("treewide: Migrate rockchip dts file to use new host type tags")

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I4f5a4d676a450a706770f8ad0bface40a95f5d5e
2022-11-10 15:58:34 +08:00
Finley Xiao
89f92aa26c ARM: dts: rockchip: rk3288 add system monitor node
The reboot and fb notifiers are also need for some platfroms when enable
dmcfreq.

Change-Id: I7a02e43ebfff6f8cdccd050a30a9e6c270fc5b5e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-11-10 15:57:33 +08:00
Alex Zhao
569a73dcb7 net: wireless: rockchip_wlan: bcmdhd: enable WL_P2P_RAND
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I1a75eed43cb4a9e973c9950d28bf4fc274da4a70
2022-11-10 14:59:52 +08:00
Alex Zhao
997fef6bf4 arm64: dts: rockchip: rk356x-evb/tablet: add WIFI,poweren_gpio for wifi
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I24277480324db1a29db398bee0b003b163cb417a
2022-11-10 14:59:47 +08:00
Alex Zhao
bca955abde arm64: dts: rockchip: px30/rk3326-evb: add WIFI,poweren_gpio for wifi
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I72aedca603b4b780168697218041b41558437e19
2022-11-10 14:59:41 +08:00
Algea Cao
66d9343d63 phy: rockchip-samsung-hdptx-hdmi: FRL 8Gbps * 4 lanes mode use pll cascade mode
Vendor suggest FRL 8G * 4 lanes mode use ROPLL/LCPLL cascade mode.
ROPLL ref clock is from LCPLL.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: If40f4ec55e44f1e53995cf932c68fa374662d636
2022-11-09 14:34:05 +08:00
Algea Cao
d97cce5a64 phy: rockchip-samsung-hdptx-hdmi: LCPLL is also used for low rate frl mode
In RK3588C, 24M clock noise is carried into the PHY ROPLL loop filter.
Due to the low noise frequency, it can pass through the low-pass loop
filter of ROPLL, resulting in hdmi clk jitter test fail.
The loop bandwidth of LCPLL is low, so LCPLL can be used to circumvent
this problem. RK3588 is also suitable for this scheme.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I1eafbc3db3daca6b86c97a6682d120f88b71dfa0
2022-11-09 14:34:05 +08:00
Damon Ding
0dc3443205 ARM: dts: rockchip: rv1106-evb: fix default bus-format of sii902x using bt656
The default bus-format should be MEDIA_BUS_FMT_UYVY8_2X8
according to sii902x datasheet.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ie22ae04fc0a0d339ea211c76891d40c5942e2a86
2022-11-09 14:27:33 +08:00
Damon Ding
5670b5a97d drm/rockchip: vop: add yc_swap check for BT656 interface
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Iecb8439661700f3f4ad4613baa7bbe0289042181
2022-11-09 14:27:09 +08:00
Tao Huang
dfa8d217eb usb: typec: displayport: depends on DRM_ROCKCHIP
To avoid the conflict of GKI, the drm_connector_oob_hotplug_event() is be
completed in rockchip drm driver, not the drm framework.
So add depends on DRM_ROCKCHIP, otherwise get following warning:

aarch64-none-linux-gnu-ld: drivers/usb/typec/altmodes/displayport.o: in function `dp_altmode_status_update':
drivers/usb/typec/altmodes/displayport.c:156: undefined reference to `drm_connector_oob_hotplug_event'

Fixes: 594af86e81 ("FORMLIST: usb: typec: altmodes/displayport: Notify drm subsys of hotplug events")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id31efd89e5af47811138890ce9fbcb79da187b91
2022-11-09 09:40:07 +08:00
Tao Huang
4c1ad45c30 fiq_debugger: stop using alloc_tty_driver
According to upstream commit 39b7b42be4 ("tty: stop using alloc_tty_driver").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1f60a2066a2649c736e333a11161bfb49bef8ccb
2022-11-09 09:39:22 +08:00
Jon Lin
bda58d2941 mtd: spi-nor: normem: Add code
Support NM25Q128EVB.

Change-Id: Id781d499407b1d4db448db1cfff71b43bf6e8e93
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-11-09 09:36:04 +08:00
Jon Lin
fdbfcf0f56 mtd: spi-nor: core: Add boya ids to manufacturers
Change-Id: I752c5a615982bea36ee7adf1ae66921242bc7bcf
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-11-09 09:36:04 +08:00
Tao Huang
94867bdff1 drm/bridge: sii902x: select VIDEOMODE_HELPERS
aarch64-none-linux-gnu-ld: drivers/gpu/drm/bridge/sii902x.o: in function `sii902x_set_embedded_sync':
drivers/gpu/drm/bridge/sii902x.c:473: undefined reference to `drm_display_mode_to_videomode'

Fixes: a14c198318 ("drm/bridge: sii902x: add YUV422 input support")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I770ae0f4cf3d50a90b881eb3fe074ce57d2db3ac
2022-11-08 20:06:46 +08:00
Jianwei Fan
fe80765808 video: rockchip: vehicle: fix some include files
Change-Id: I4b9ad93f17329dd4168a71cc92344af7789266ab
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2022-11-08 17:24:12 +08:00
Jianqun Xu
569ea4ebd4 Revert "Revert "video: rockchip: mpp: use dma-buf-cache func""
This reverts commit e8f7a297a7.

Change-Id: I3b9ab8391312ebcf7496def522cb742e2d7c4036
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-11-08 16:48:22 +08:00
Yandong Lin
f9114c28a3 video: rockchip: mpp: fix rkvenc-core1 cannot disable issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4884da641a2beba1bdbc2d734d9e969baf9026ad
2022-11-08 11:48:00 +08:00
Huang zhibao
66cc355d8f arm64: dts: rockchip: add rk3588-nvr-demo1-v21-android for nvr demo1 board
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I34996de4964e6be26d23a8fbd912231c27e06d13
2022-11-08 10:31:44 +08:00
Tao Huang
0de1c776b7 power: supply: rk818_battery: Fix compile warning
drivers/power/supply/rk818_battery.c: In function 'rk818_bat_calc_zero_linek':
drivers/power/supply/rk818_battery.c:1741:25: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
 1741 |                         else
      |                         ^~~~
drivers/power/supply/rk818_battery.c:45:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   45 |         do { \
      |         ^~
drivers/power/supply/rk818_battery.c:1743:33: note: in expansion of macro 'DBG'
 1743 |                                 DBG("ZERO-new: zero_linek adjust step6...\n");
      |                                 ^~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iefecf6fe6b44ba84850a89a6e8cc12637f801ac0
2022-11-08 09:25:51 +08:00
Tao Huang
b7e087fff7 input: touchscreen: gslx680_pad: Fix compile warning
drivers/input/touchscreen/gslx680_pad.c:1045:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
 1045 |     if(ret)
      |     ^~
In file included from ./include/linux/device.h:15,
                 from drivers/input/touchscreen/gslx680_pad.c:15:
./include/linux/dev_printk.h:118:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  118 |         _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~
drivers/input/touchscreen/gslx680_pad.c:1048:8: note: in expansion of macro 'dev_info'
 1048 |        dev_info(&ts->client->dev, "[tp-gsl] gsl_chip_id =[%d] \n",gsl_chip_id);
      |        ^~~~~~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If4366c867ab6985e37708a4f89ed6d5460c74795
2022-11-08 09:21:23 +08:00