Add a driver for the Motorcomm yt8511 phy that will be used in the
production Pine64 rk3566-quartz64 development board.
It supports gigabit transfer speeds, rgmii, and 125mhz clk output.
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry-pick from commit 48e8c6f1612b3d2dccaea2285231def830cc5b8e)
Change-Id: If0af67cda0ad607e4a31f126804547e9d8b3df50
Add macros for PHYID matching to be used in PHY driver configs.
By using these macros some boilerplate code can be avoided.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry-pick from commit aa2af2eb447c9a21c8c9e8d2336672bb620cf900)
Change-Id: I1d276ce31725d4e410f5879654c03e690da48d7e
This patch enable SAI which act as I2S/PCM/TDM, and much more
flexible protocol.
Change-Id: I6352ce2edbcf8b049f8402bc097cc5b302225795
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch fix crash in mpp_dev_release.
In multi-instance case the session on deinit is attached to session_detach
and trigger the taskqueue to release session. But the session is
released just after unlock and before trigger then the session and
invalid and the session->mpp is also invalid.
The crash log is shown below:
[71267.807643] Call trace:
[71267.810099] do_raw_spin_lock+0x20/0xd8
[71267.813937] _raw_spin_lock_irqsave+0x28/0x38
[71267.818292] kthread_queue_work+0x2c/0x80
[71267.822298] mpp_dev_release+0x118/0x154
[71267.826219] __fput+0xf4/0x1a8
[71267.829272] ____fput+0x20/0x2c
[71267.832409] task_work_run+0x88/0xb0
[71267.835982] do_notify_resume+0xe8/0x10c
[71267.839902] work_pending+0x8/0x10
[71267.843306] Code: aa1e03e0 d503201f 5289d5a0 72bbd5a0 (b9400661)
[71267.849396] ---[ end trace d8082e9114a3a9da ]---
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib9825de2f1bc9f7999bdfe193aa440fd85d41448
The rk3568 usb dwc3 controller has phy management at its
own driver to cover both device and host mode. And for
usb otg0, it enable device wakeup that make the usb hcd
core to keep the phy initialized so the device can wake
up the system. However, most of rk3568 platforms power
off the logic and cause phy grf lost power, thus we need
to add quirk-skip-phy-init to reinit phy grf upon system
resume.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I14061e3b8bad05818e8496d4710695ef31deed9f
Adds "quirk-skip-phy-init" property that can configure in DT to
support skip PHY initialization quirk in HCD core.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ifd85bbfc5a39a28961e551d2ded5ddb1a904a7f5
The "skip_phy_initialization" property in usb_hcd structure means
that do not manage the PHY state in the HCD core and handle it by
the controller's driver. This commit adds "quirk-skip-phy-init"
quirk which can configure the property in DT to support it.
For Rockchip DWC3 dual role scheme, we enabled the device wakeup
capability in dwc3 runtime resume that would cause the PHY exit
failed in "usb_phy_roothub_exit()" at PM suspend stage. So this
commit is also a workaround to fix it.
Fixes: f1636eb0fd02 ("usb: dwc3: fix failed to enter suspend")
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ibc9885669f25d2aeea18a9d22d49a204eb346ea1
In the past, USB PHY handling has been moved in the HCD core. Some
host controller drivers needing more control of the PHYs, they have
been granted the freedom to handle themselves the PHY states and to
prevent the HCD core to do so in commit 4e88d4c083 ("usb: add a flag
to skip PHY initialization to struct usb_hcd"). With this change, any
USB host controller could set the hcd->skip_phy_initialization flag so
that the HCD core would just skip the PHY initialization sequence.
However, in the USB subsystem, there are currently two entirely
different forms of PHY: one is called 'usb_phy' and is
USB-subsystem-wide, while there is also the generic and kernel-wide
'phy' from the (recent) generic PHY framework.
When the commit above was introduced, both type of PHYs where handled
by the HCD core.
Later, commit bc40f53417 ("USB: core: hcd: drop support for legacy
phys") removed the support for the former type of PHYs in the HCD
core. These 'usb_phy' are still present though, but managed from the
controller drivers only. Hence, setting the
hcd->skip_phy_initialization flag just because a 'usb_phy' is
initialized by a controller driver is a non-sense.
For instance on Armada CP110, a 'usb_phy' is there to enable the power
supply to the USB host, while there is also a COMPHY block providing
SERDES lanes configuration that is referenced as a PHY from the common
PHY framework.
Right now, users of the xhci-plat.c driver either use a 'usb_phy' only
and do not care about the attempt of generic PHY initialization within
the HCD core (as there is none); or they use a single 'phy' and the
code flow does not pass through the block setting
hcd->skip_phy_initialization anyway.
While there is not users of both PHY types at the same time, drop this
limitation from the xhci-plat.c driver. Note that the tegra driver
probably has the same limitation and could definitely benefit from a
similar change.
Cc: Johan Hovold <johan@kernel.org>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20190731121150.2253-1-miquel.raynal@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ib81ce9e77f3e7455ce8f04d7c3b593b687bcea6d
sleep-mode-config-mem-lite = <...> is mode_config for mem_lite.
wakeup-config-mem-lite = <...> is wakeup_config for mem_lite.
sleep-mode-config-mem-ultra = <...> is mode_config for mem_ultra.
wakeup-config-mem-ultra = <...> is wakeup_config for mem_ultra.
Change-Id: If41ef73d8075c9e74b87a0ebf1634622e5625db3
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
support buffer rearrange for panel ES107KC1 1920x2560,
panel node add "panel,rearrange = <1>;" to support
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I6daa677815361de2415775ea732848133274cf2a
Tested it with the below:
export CROSS_COMPILE=arm-linux-gnueabihf-
make ARCH=arm rockchip_linux_defconfig
make ARCH=arm rk3288-evb-rk808-linux.img -j1
Have the built error as follows.
CC drivers/media/platform/rockchip/cif/capture.o
drivers/media/platform/rockchip/cif/capture.c: In function 'rkcif_dvp_g_ch_id':
drivers/media/platform/rockchip/cif/capture.c:6850:17: warning: this 'if'
clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:capture.c:6850
6850 | if ((frm_stat & DVP_CHANNEL2_FRM_READ) ==
| ^~
drivers/media/platform/rockchip/cif/capture.c:6853:25: note: ...this statement,
but the latter is misleadingly indented as if it were guarded by the 'if'
6853 | *intstat &= ~DVP_FRAME_END_ID2;
| ^
Change-Id: I5339a6b6d3641dde71a17139b415852117e97574
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Tested it with the below:
export CROSS_COMPILE=arm-linux-gnueabihf-
make ARCH=arm rockchip_linux_defconfig
make ARCH=arm rk3288-evb-rk808-linux.img -j1
Have the built error as follows.
CC drivers/video/rockchip/rga3/rga_policy.o
drivers/video/rockchip/rga3/rga_policy.c: In function 'rga_job_assign':
drivers/video/rockchip/rga3/rga_policy.c:243:25: warning: this 'if'
clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rga_policy.c:243
243 | if (DEBUGGER_EN(MSG))
| ^~
drivers/video/rockchip/rga3/rga_policy.c:245:33: note: ...this statement,
but the latter is misleadingly indented as if it were guarded by the 'if'
245 | continue;
| ^~~~~~~~
Change-Id: Ia39abe5fab5f857490b4709de516d97c5db567c0
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
In hdmirx audio the cpu dai may act as slave
And there also will be multi dai cells to select
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I9b68a064204bb443b7e1e6fdc6e7f9e23b70e902
It is possible that there is no correct unmap for txbuffer, which may
cause some unknown problems.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ibbbe4d541c6bdd695c862a51a66b9ab511a74c0a
Refactor conversion operation to support new saradc, separate
start, read, powerdown in respective hooks.
Change-Id: Iacb043d14f7867b45bf0c4c74c2bedd21d398944
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Add the ability to also support access via (triggered) buffers
next to the existing direct mode.
Device in question is the Odroid Go Advance that connects a joystick
to two of the saradc channels for X and Y axis and the new (and still
pending) adc joystick driver of course wants to use triggered buffers
from the iio subsystem.
Change-Id: Ib0498591ec190ada86b489528970e908d337f7bd
Signed-off-by: Simon Xue <xxm@rock-chips.com>
[some simplifications and added commit description]
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 4e130dc7b41348b13684f0758c26cc6cf72a3449)
As suggested give the current ADC_CHANNEL constant a distinct
and consistent prefix.
Change-Id: Ie966d2a34ea214587c7746ede77d853db3a3f90e
Suggested-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
(cherry picked from commit 71eb7c855bd0cd168541305e3d6dab16bf0b0dfe)
For most scenarios, especially when a usb cable is connected,
enabling the ADC dither can get a better SNR.
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Iedc0c6bd6aa9139feea9feb5ffa91a67373964fc
Use the same calculation method as uboot for dphy_ timing, fixed some LP
transfer failed.
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Change-Id: Ia279b213820170e2781c678fe6fdc420561d0a6c
This patch aims to add UVC_GUID_FORMAT_H265
High Efficiency Video Coding (HEVC), also known as H.265 and MPEG-H Part 2.
They describe the same video encoding method.
So for handling their behavior is the same.
However, when external camera device describes this encoding method,
some use hevc, some use h265.
There is no uniform specification to describe this encoding method.
So if an external camera device use h265 to describe this encoding method,
driver will not recognize it.
Therefore, this patch is to enable driver to read HEVC/H265
and convert it to V4L2_PIX_FMT_HEVC.
Change-Id: I8316ccbf09014d38eb1becbc3c5f54f29ad497b6
Signed-off-by: James_Lin <Ping-lei.Lin@mediatek.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit be938c70e292731f81226917fc214683e66da577)
Enable the following macros for AMP system:
CONFIG_ROCKCHIP_AMP=y
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ie8335e429d0da4414994df553351611351c24704
This patch add support for rockchip sai controller:
* support flexible timing creation, e.g. I2S, PCM, TDM...
* support up to 128 slots per lane
* support up to 4 lanes per direction
* support slot mask
* support mono transfer and receive
* support digital loopback
* support data counter for flow control
* support clk sync among controllers which varies on chips
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I3cd5eb1c1178cc3ca3b6069863787d1fa040b60c
Since commit "drivers: provide devm_platform_ioremap_resource()",
it was wrap platform_get_resource() and devm_ioremap_resource() as
single helper devm_platform_ioremap_resource(). but now, many drivers
still used platform_get_resource() and devm_ioremap_resource()
together in the kernel tree. The reason can not be replaced is they
still need use the resource variables obtained by platform_get_resource().
so provide this helper.
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Suggested-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Link: https://lore.kernel.org/r/20200323160612.17277-2-zhengdejin5@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 890cc39a879906b63912482dfc41944579df2dc6)
Change-Id: I2a7b632d7c60cb7b7bc365ee4d6603f306453f6b
This patch adds a macro 'regmap_read_poll_timeout_atomic' that works
similar to 'readx_poll_timeout_atomic' defined in linux/iopoll.h; This
is atomic version of already available 'regmap_read_poll_timeout' macro.
It should be noted that above atomic macro cannot be used by all regmaps.
If the regmap is set up for atomic use (flat or no cache and MMIO) then
only it can use.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1578546590-24737-1-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 50816a4c39263913d8cfd1ee32f90102679606c6)
Change-Id: I45b96c81d472d5887104690584aafbabd4a06f1d
There is a compatibility problem between the RK3588 and some eMMC devices
with HS400ES mode.
log:
mmc2: mmc_ select_ hs400es failed, error -84
mmc2: error -84 whilst initialising MMC card
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ib617b25ed404000ff2c890a423d74c15cd1a60db