Change voltage according to logic leakage.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic9d3fcf7ab3bd2730ec2a7edb3430ffc22f7e92f
The dev_pm_opp_add() can't be used to add opp with multiple voltage
ranges, and there's no need to add new opp, just need adjust opp rate
according to the rate support by DDR.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic9dd29bedd22d0b7928110c6d0c6483414b48415
It need enable the hdmi phy pll clock function node when the hdmi
phy pll want be used.
For support dynamic switch dclk with hdmi phy pll, the hdmi phy pll
need config in display subsystem node.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I740b6154b37c1e5d9491fafd33c0b6c0c9ffd149
In uboot, a device can't be used as both phy device and clock
device. So It better to register a child device as clock device.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I6d06f3c3b0f0b48741a5c53f51df1766b2cb0740
Moving expend clk in display sub-system node, which make it
easier when add extend clk for vop.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I3175d54c8a44fc6b205fcd3623e3c5656b308fe8
The RK803 in the RMSL312 needs power control to work properly.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Icc8a60e1a87dd2c3b32bda8598dc65d73e28f917
1.If mode can't support yuv420, change color to rgb.
2.If mode is 10 bit color deep mode, tmds clk is greater than
tv's max tmds clk and mode can't support yuv420, change color
deep to 8bit.
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I947f68b75c5dedaf9e8b4db2c87bb2381186a63a
If the dwc2 controller lost power in suspend, we need to
reinit the core when the dwc2 in host mode. There are two
methods to set the dwc2 in host mode, and we need to reinit
the dwc2 to host mode separately during resume.
1. Set the dr_mode to otg, and plug in OTG cable with
the ID pin conneted to GND.
In this case, we can reinit the core to device mode
firstly, and later after do dwc2_hsotg_resume, it can
trigger the ID status change interrupt if the OTG cable
is still connected, then we can init for Host mode in
the ID status change interrupt handler.
2. Set the dr_mode to host, and force the dwc2 to Host
mode irrespective of ID input pin.
In this case, we can't depend on the ID status change,
so we do force host mode and init the core during resume.
With this patch, it can fix the kernel panic if the dr_mode
is set to host mode during resume.
[ 134.975352] Unable to handle kernel write to read-only memory at virtual address 0000000000000068
...
[ 134.981681] CPU: 0 PID: 1646 Comm: Binder:157_3 Not tainted 4.19.193 #37
[ 134.982290] Hardware name: Rockchip rk3326 S1002 avb board (DT)
[ 134.982836] pstate: 60400085 (nZCv daIf +PAN -UAO)
[ 134.983286] pc : kill_all_requests+0x20/0xe8
[ 134.983685] lr : dwc2_hsotg_core_init_disconnected+0x24/0x770
...
[ 135.098090]
[ 135.098248] Call trace:
[ 135.098503] kill_all_requests+0x20/0xe8
[ 135.098876] dwc2_hsotg_core_init_disconnected+0x24/0x770
[ 135.099377] dwc2_resume+0x108/0x110
[ 135.099722] dpm_run_callback+0x48/0x230
[ 135.100099] device_resume+0xb4/0x250
[ 135.100448] dpm_resume+0x104/0x398
[ 135.100784] dpm_resume_end+0x14/0x28
[ 135.101142] suspend_devices_and_enter+0x15c/0xa68
[ 135.101586] pm_suspend+0x458/0x6d8
[ 135.101927] state_store+0x84/0x108
[ 135.102271] kobj_attr_store+0x14/0x28
[ 135.102637] sysfs_kf_write+0x48/0x58
[ 135.102988] kernfs_fop_write+0xf4/0x220
[ 135.103367] __vfs_write+0x34/0x158
[ 135.103708] vfs_write+0xb0/0x1d0
[ 135.104027] ksys_write+0x64/0xe0
[ 135.104346] __arm64_sys_write+0x14/0x20
[ 135.104726] el0_svc_common.constprop.0+0x64/0x178
[ 135.105172] el0_svc_compat_handler+0x18/0x20
[ 135.105580] el0_svc_compat+0x8/0x34
[ 135.105929] Code: a90153f3 aa0003f6 f9001bf7 2a0203f7 (f900343f)
[ 135.106485] ---[ end trace ddc1f4a0765afacd ]---
[ 135.253494] Kernel panic - not syncing: Fatal exception
Change-Id: Ibfcd1c9176d8b4abb2fc8b3b5c8b0b6a866db4e7
Signed-off-by: William Wu <william.wu@rock-chips.com>
f_hid provides the OUT Endpoint as only way for receiving reports
from the host. SETUP/SET_REPORT method is not supported, and this causes
a number of compatibility problems with various host drivers, especially
in the case of keyboard emulation using f_hid.
- Some hosts do not support the OUT Endpoint and ignore it,
so it becomes impossible for the gadget to receive a report
from the host. In the case of a keyboard, the gadget loses
the ability to receive the status of the LEDs.
- Some BIOSes/UEFIs can't work with HID devices with the OUT Endpoint
at all. This may be due to their bugs or incomplete implementation
of the HID standard.
For example, absolutely all Apple UEFIs can't handle the OUT Endpoint
if it goes after IN Endpoint in the descriptor and require the reverse
order (OUT, IN) which is a violation of the standard.
Other hosts either do not initialize gadgets with a descriptor
containing the OUT Endpoint completely (like some HP and DELL BIOSes
and embedded firmwares like on KVM switches), or initialize them,
but will not poll the IN Endpoint.
This patch adds configfs option no_out_endpoint=1 to disable
the OUT Endpoint and allows f_hid to receive reports from the host
via SETUP/SET_REPORT.
Previously, there was such a feature in f_hid, but it was replaced
by the OUT Endpoint [1] in the commit 99c5150058 ("usb: gadget: hidg:
register OUT INT endpoint for SET_REPORT"). So this patch actually
returns the removed functionality while making it optional.
For backward compatibility reasons, the OUT Endpoint mode remains
the default behaviour.
- The OUT Endpoint mode provides the report queue and reduces
USB overhead (eliminating SETUP routine) on transmitting a report
from the host.
- If the SETUP/SET_REPORT mode is used, there is no report queue,
so the userspace will only read last report. For classic HID devices
like keyboards this is not a problem, since it's intended to transmit
the status of the LEDs and only the last report is important.
This mode provides better compatibility with strange and buggy
host drivers.
Both modes passed USBCV tests. Checking with the USB protocol analyzer
also confirmed that everything is working as it should and the new mode
ensures operability in all of the described cases.
Link: https://www.spinics.net/lists/linux-usb/msg65494.html [1]
Change-Id: I5cd93f642e5696a84e58afc63aaaaf8e27c7d514
Reviewed-by: Maciej Żenczykowski <zenczykowski@gmail.com>
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Maxim Devaev <mdevaev@gmail.com>
Link: https://lore.kernel.org/r/20210821134004.363217-1-mdevaev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit d7428bc26f)
According to comment in drm_format_info, drm_format_info_min_pitch
has better compatibility than calculate by cpp.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I246f29bc6a5482242ff8d533c0416101a04c7550
DSI may not int a connector when attach a bridge, to support
uboot/kernel logo, drivers can find possible connector from
connector_list to register a rockchip_drm_sub_dev which specify
loader_protect helper.
Change-Id: I8a72192f252e17d4003da24d89326a55f0f3f578
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Move camera node from rv1106g-smart-door-lock-rmsl-v10.dts
to rv1106-smd-cam.dtsi.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Id5ba57db302c5a20af1796cf147f186a6df34467