[ Upstream commit a59c68a6a3 ]
Currently user can configure UAC1 function with
parameters that violate UAC1 spec or are not supported
by UAC1 gadget implementation.
This can lead to incorrect behavior if such gadget
is connected to the host - like enumeration failure
or other issues depending on host's UAC1 driver
implementation, bringing user to a long hours
of debugging the issue.
Instead of silently accept these parameters, throw
an error if they are not valid.
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Link: https://lore.kernel.org/r/1614599375-8803-5-git-send-email-ruslan.bilovol@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2993c5f99161149ac126d55baf54c954279483ff
[ Upstream commit 3713d5ceb0 ]
Currently user can configure UAC2 function with
parameters that violate UAC2 spec or are not supported
by UAC2 gadget implementation.
This can lead to incorrect behavior if such gadget
is connected to the host - like enumeration failure
or other issues depending on host's UAC2 driver
implementation, bringing user to a long hours
of debugging the issue.
Instead of silently accept these parameters, throw
an error if they are not valid.
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Link: https://lore.kernel.org/r/1614599375-8803-4-git-send-email-ruslan.bilovol@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Change-Id: Ic6b7e292b60e838c53aab989d1f8b16798dc15e7
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
The rk3588-evb5-lp4 and rk3588s-evb2-lp5 only support Type-C
usb 2.0 high speed device, and their usb 3.0 phys are disabled
by default. So these boards can only use usb 2.0 phy node.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I7f76774001445d0c5470c10f65995be489b62db6
This patch aims to improve the functions of rk3588 usb2
phys for otg0 and otg1 port.
1. Add bvalid and id configuration registers to support
switch device/host mode by phy.
2. Add charger detection function for otg1.
3. Fix charger detection fail on DCD stage.
Change-Id: I3922123ad0c75f88ab3c9be117b9c92c3ea7dfaf
Signed-off-by: William Wu <william.wu@rock-chips.com>
When switch dwc3 mode to device on rockchip platform,
it may fails to connect to usb host because the auto
suspend delay is only 100ms. This patch sets the switch
mode to desired_role_sw_mode, and it can avoid to enter
runtime suspend.
Fixes: 5ac62b80f7 ("usb: dwc3: fix runtime pm for rockchip")
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If3f7faee1e9550322a80f297136b8faf1ebed301
RK3588 does not currently support this property.
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Iddb898bc044a3f2aa07b27506593b2c56f096e16
When a new connector is added to current routing in clone mode,
the new connector doesn't have mode_changed=true set. This
incorrect programming sequence causes .mode_set call mismatches
to occur in the new stream.
So move the mode_set code to other callback.
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I90f50882057c63f702cf390fb7bfeed088575324
Use page_pool_alloc_pages instead of page_pool_dev_alloc_pages, which
can give the gfp parameter, in the case of not supporting 64-bit width,
using 32-bit address memory can reduce a copy from swiotlb.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Change-Id: I62bff35850cf62db1be7067f3050b27039ae5d75
It will cause this sensor to fail to link to the vicap controller if
used late_initcall_sync. Because the probe level of vicap controller is
late_initcall.
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I74a4606f0af16d860d7b28ba311b14efeda0c225
Use the definition of MEDIA_BUS_FMT_XXX instead of the
definition of sii902x_bus_format.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I72b4d92a1704f98f437a80d2a8afe16d9f6b003f
The rkvenc2 dual core mode will split one large frame into two tile as
task 0 and 1. The task 0 must be started before task 1 otherwise
hardware will generate error.
So we need some changes:
1. Bind two core into one taskqueue. If each core is binded to one
thread then the real hardware config and start timing is not certain.
NOTE: current mode still has case that one extra task is insert between
task 0 and 1.
2. Record core info and core id when multi-core is attached to the same
taskqueue.
3. Add prepare stage to decide which core is used to run the task and
set the struce mpp_dev *mpp in struct mpp_task.
4. Correspondingly the free task should use the mpp_task->mpp if it is a
multi-core mode task.
5. Remove mpp_iommu_attach in mpp_task_run. The mpp_iommu_attach is for
switching different devices which has shared resource like vpu and
rkhevc in rk3568 and rk312x. These chipsets are not supported on 5.10
kernel.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ide52d59cca3adec44e05ab4bfc5bac7d713ad628
Fixes: f9e002e86f ("drm/rockchip: dw-dp: Add full output bus format support")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ib644ce28a5963082989e5345f046aca591c63166
This patch aims to tuning the high speed Tx signal for
4 independent USB2.0 PHYs of RK3588.
1. Adjust the HS DC level voltage from design default
4'b0110:0 to 4'b1001:+5.89%.
2. Adjust the HS Transmitter pre-emphasis current control
from design default 2'b00 disabled pre-emphasis to
2'b10 2x pre-emphasis current.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If212a606113fd4409d9a33a25a04f8416336f6e4
The default aux tx amplitude level can't satisfied some
device, which will cause the aux communication failed.
Enhance the aux tx amplitude to a high level to be
compatible with different devices.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Idcb5cf2fcf91dda5985744acb4ad3e62c99ffba4
The dus clk shouled be enabled before restore qos.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic981fc6d680a9be4c441c946715bf709c4e83e7b
The rkvdec2 link mode irq print should print both link status and core
status.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2fffc0935260e6f3dcb788dffc1a467e6be5a7cb
The drm core will disable than enable a crtc when is marked as
connectors_changed.
But when we attach a writeback connector to a running
crtc, we really don't need this disable/enable, which
will black a running screen.
Change-Id: I636615f27424bc60496ffc487c218f60fb95d719
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>