Re: [PATCH v2 10/12] phy: mediatek: add support for phy-mtk-hdmi-mt8195

2022-10-21 Thread Chunfeng Yun
On Fri, 2022-10-14 at 17:16 +0200, Guillaume Ranquet wrote: > Add basic support for the mediatek hdmi phy on MT8195 SoC > > Signed-off-by: Guillaume Ranquet > --- > drivers/phy/mediatek/Makefile | 1 + > drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 546 > ++

Re: [PATCH v1 14/17] phy: mediatek: add support for phy-mtk-hdmi-mt8195

2022-09-27 Thread Chunfeng Yun
On Tue, 2022-09-27 at 06:23 -0700, Guillaume Ranquet wrote: > On Tue, 20 Sep 2022 09:46, Chunfeng Yun > wrote: > > On Mon, 2022-09-19 at 18:56 +0200, Guillaume Ranquet wrote: > > > Add basic support for the mediatek hdmi phy on MT8195 SoC > > > > >

Re: [PATCH 01/18] phy: mediatek: add a new helper to update bitfield

2022-09-22 Thread Chunfeng Yun
On Thu, 2022-09-22 at 09:17 +0200, AngeloGioacchino Del Regno wrote: > Il 22/09/22 04:36, Chunfeng Yun ha scritto: > > On Wed, 2022-09-21 at 10:15 +0200, AngeloGioacchino Del Regno > > wrote: > > > Il 20/09/22 11:00, Chunfeng Yun ha scritto: > > > > Due to FIELD

Re: [PATCH 01/18] phy: mediatek: add a new helper to update bitfield

2022-09-21 Thread Chunfeng Yun
On Wed, 2022-09-21 at 10:15 +0200, AngeloGioacchino Del Regno wrote: > Il 20/09/22 11:00, Chunfeng Yun ha scritto: > > Due to FIELD_PREP() macro can be used to prepare a bitfield value, > > local ones can be remove; add the new helper to make bitfield > > update > > eas

[PATCH 18/18] phy: mediatek: mipi: remove register access helpers

2022-09-20 Thread Chunfeng Yun
Remove private register access helpers, use the common ones instead. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 24 drivers/phy/mediatek/phy-mtk-mipi-dsi.h | 5 - 2 files changed, 29 deletions(-) diff --git a/drivers/phy/mediatek/phy

[PATCH 04/18] phy: mediatek: ufs: use common register access helpers

2022-09-20 Thread Chunfeng Yun
No need define private register access helpers, use common ones defined in phy-mtk-io.h Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-ufs.c | 78 +++--- 1 file changed, 28 insertions(+), 50 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-ufs.c b

[PATCH 08/18] phy: mediatek: hdmi: mt2701: use common helper to access registers

2022-09-20 Thread Chunfeng Yun
Use MediaTek phy's common helper to access registers, then we can remove hdmi's I/O helpers. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c | 146 ++--- 1 file changed, 71 insertions(+), 75 deletions(-) diff --git a/drivers/phy/mediatek/ph

[PATCH 12/18] phy: mediatek: hdmi: remove register access helpers

2022-09-20 Thread Chunfeng Yun
Remove private register access helpers, use the common ones instead. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-hdmi.c | 33 - drivers/phy/mediatek/phy-mtk-hdmi.h | 7 -- 2 files changed, 40 deletions(-) diff --git a/drivers/phy/mediatek/phy

[PATCH 17/18] phy: mediatek: mipi: mt8183: use common helper to access registers

2022-09-20 Thread Chunfeng Yun
Use MediaTek phy's common helper to access registers, then we can remove mipi-dsi's I/O helpers. Signed-off-by: Chunfeng Yun --- .../phy/mediatek/phy-mtk-mipi-dsi-mt8183.c| 68 +-- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/phy/mediat

[PATCH 10/18] phy: mediatek: hdmi: mt8173: use FIELD_PREP to prepare bits field

2022-09-20 Thread Chunfeng Yun
Use FIELD_PREP() macro to prepare bits field value, then no need define macros of bits offset. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c | 70 -- 1 file changed, 26 insertions(+), 44 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk

[PATCH 07/18] phy: mediatek: hdmi: mt2701: use FIELD_PREP to prepare bits field

2022-09-20 Thread Chunfeng Yun
Use FIELD_PREP() macro to prepare bits field value, then no need define macros of bits offset. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c | 60 -- 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk

[PATCH 15/18] phy: mediatek: mipi: mt8173: use common helper to access registers

2022-09-20 Thread Chunfeng Yun
Use MediaTek phy's common helper to access registers, then we can remove mipi-dsi's I/O helpers. Signed-off-by: Chunfeng Yun --- .../phy/mediatek/phy-mtk-mipi-dsi-mt8173.c| 117 -- 1 file changed, 55 insertions(+), 62 deletions(-) diff --git a/drivers/phy/mediat

[PATCH 16/18] phy: mediatek: mipi: mt8183: use GENMASK to generate bits mask

2022-09-20 Thread Chunfeng Yun
Use GENMASK() macro to generate bits mask Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8183.c

[PATCH 02/18] phy: mediatek: tphy: remove macros to prepare bitfield value

2022-09-20 Thread Chunfeng Yun
Prefer to make use of FIELD_PREP() macro to prepare bitfield value, then no need local ones anymore. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 193 ++-- 1 file changed, 67 insertions(+), 126 deletions(-) diff --git a/drivers/phy/mediatek/phy

[PATCH 06/18] phy: mediatek: hdmi: mt2701: use GENMASK and BIT to generate mask and bits

2022-09-20 Thread Chunfeng Yun
Use GENMASK() and BIT() macros to generate mask and bits Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c | 56 +++--- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c b/drivers/phy/mediatek/phy

[PATCH 03/18] phy: mediatek: xsphy: remove macros used to prepare bitfield value

2022-09-20 Thread Chunfeng Yun
Prefer to make use of FIELD_PREP() macro to prepare bitfield value, then no need local ones anymore. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-xsphy.c | 46 ++-- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/drivers/phy/mediatek/phy

[PATCH 13/18] phy: mediatek: mipi: mt8173: use GENMASK to generate bits mask

2022-09-20 Thread Chunfeng Yun
Use GENMASK() macro to generate bits mask Signed-off-by: Chunfeng Yun --- .../phy/mediatek/phy-mtk-mipi-dsi-mt8173.c| 53 ++- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c b/drivers/phy/mediatek/phy-mtk-mipi

[PATCH 09/18] phy: mediatek: hdmi: mt8173: use GENMASK to generate bits mask

2022-09-20 Thread Chunfeng Yun
Use GENMASK() macro to generate bits mask Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c | 88 +++--- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c b/drivers/phy/mediatek/phy-mtk-hdmi

[PATCH 14/18] phy: mediatek: mipi: mt8173: use FIELD_PREP to prepare bits field

2022-09-20 Thread Chunfeng Yun
Use FIELD_PREP() macro to prepare bits field value, then no need define macros of bits offset. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-mipi-dsi-mt8173.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi

[PATCH 05/18] phy: mediatek: pcie: use new helper to update register bits

2022-09-20 Thread Chunfeng Yun
The new helper will use FIELD_PREP() macro to prepare bits value according to mask, then we no need do it anymore. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-pcie.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/phy/mediatek/phy

[PATCH 11/18] phy: mediatek: hdmi: mt8173: use common helper to access registers

2022-09-20 Thread Chunfeng Yun
Use MediaTek phy's common helper to access registers, then we can remove hdmi's I/O helpers. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c | 140 ++--- 1 file changed, 65 insertions(+), 75 deletions(-) diff --git a/drivers/phy/mediatek/ph

[PATCH 01/18] phy: mediatek: add a new helper to update bitfield

2022-09-20 Thread Chunfeng Yun
Due to FIELD_PREP() macro can be used to prepare a bitfield value, local ones can be remove; add the new helper to make bitfield update easier. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-io.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/phy/mediatek/phy

[PATCH 00/18] unify register access and macros

2022-09-20 Thread Chunfeng Yun
No need to define new macros to generate bits, mask and bitfield, use common ones instead, e.g. BIT, GENMASK and FIELD_PREP etc. Due to common register access helpers are defined for MediaTek's phy drivers, the similar helpers defined by ufs, hdmi and mipi phy drivers can be removed. Chunfen

Re: [PATCH v1 14/17] phy: mediatek: add support for phy-mtk-hdmi-mt8195

2022-09-20 Thread Chunfeng Yun
On Mon, 2022-09-19 at 18:56 +0200, Guillaume Ranquet wrote: > Add basic support for the mediatek hdmi phy on MT8195 SoC > > Signed-off-by: Guillaume Ranquet > > diff --git a/drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c > b/drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c > index bb7593ea4c86..0157acdce5

Re: [PATCH 3/3] phy: mediatek: phy-mtk-mipi-dsi: Simplify with dev_err_probe()

2022-01-13 Thread Chunfeng Yun
On Fri, 2022-01-07 at 10:23 +0100, AngeloGioacchino Del Regno wrote: > Il 06/01/22 10:13, Chunfeng Yun ha scritto: > > On Mon, 2022-01-03 at 15:53 +0100, AngeloGioacchino Del Regno > > wrote: > > > Use the dev_err_probe() helper to simplify error handling during > >

Re: [PATCH 2/4] phy: mediatek: phy-mtk-hdmi: Reorder to remove forward declarations

2022-01-06 Thread Chunfeng Yun
_off, > + .owner = THIS_MODULE, > +}; > + > static const struct phy_ops * > mtk_hdmi_phy_dev_get_ops(const struct mtk_hdmi_phy *hdmi_phy) > { Reviewed-by: Chunfeng Yun Thanks a lot

Re: [PATCH 3/4] phy: mediatek: phy-mtk-hdmi: Reorder and stop implicit header inclusion

2022-01-06 Thread Chunfeng Yun
On Mon, 2022-01-03 at 16:30 +0100, AngeloGioacchino Del Regno wrote: > All the headers for phy-mtk-{hdmi,hdmi-mt2701,hdmi-mt8183}.c were > included from phy-mtk-mipi-dsi.h, but this isn't optimal: in order to > increase readability and sensibly reduce build times, the inclusions > should be done pe

Re: [PATCH 4/4] phy: mediatek: phy-mtk-hdmi: Simplify with dev_err_probe()

2022-01-06 Thread Chunfeng Yun
On Mon, 2022-01-03 at 16:30 +0100, AngeloGioacchino Del Regno wrote: > Use the dev_err_probe() helper to simplify error handling during > probe. > > Signed-off-by: AngeloGioacchino Del Regno < > angelogioacchino.delre...@collabora.com> > --- > drivers/phy/mediatek/phy-mtk-hdmi.c | 50 +++-

Re: [PATCH 3/3] phy: mediatek: phy-mtk-mipi-dsi: Simplify with dev_err_probe()

2022-01-06 Thread Chunfeng Yun
On Mon, 2022-01-03 at 15:53 +0100, AngeloGioacchino Del Regno wrote: > Use the dev_err_probe() helper to simplify error handling during > probe. > > Signed-off-by: AngeloGioacchino Del Regno < > angelogioacchino.delre...@collabora.com> > --- > drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 29

Re: [PATCH 2/3] phy: mediatek: phy-mtk-mipi-dsi: Reorder and stop implicit header inclusion

2022-01-06 Thread Chunfeng Yun
On Mon, 2022-01-03 at 15:53 +0100, AngeloGioacchino Del Regno wrote: > All the headers for phy-mtk-mipi-{dsi,dsi-mt8173,dsi-mt8183}.c were > included from phy-mtk-mipi-dsi.h, but this isn't optimal: in order to > increase readability and sensibly reduce build times, the inclusions > should be done

Re: [PATCH 1/4] phy: mediatek: phy-mtk-hdmi: Switch to regmap for mmio access

2022-01-06 Thread Chunfeng Yun
On Mon, 2022-01-03 at 16:30 +0100, AngeloGioacchino Del Regno wrote: > Switch to using the generic regmap API instead of calls to > readl/writel > for MMIO register access, removing custom crafted > update/set/clear_bits > functions and also allowing us to reduce code size. Using readl/writel is si

Re: [PATCH 1/3] phy: mediatek: phy-mtk-mipi-dsi: Switch to regmap for mmio access

2022-01-06 Thread Chunfeng Yun
On Mon, 2022-01-03 at 15:53 +0100, AngeloGioacchino Del Regno wrote: > Switch to using the generic regmap API instead of calls to > readl/writel > for MMIO register access, removing custom crafted > update/set/clear_bits > functions and also allowing us to reduce code size. It seems make the driver

Re: [PATCH] phy: mediatek: Fix missing check in mtk_mipi_tx_probe

2021-12-29 Thread Chunfeng Yun
orm_ioremap_resource(pdev, 0); > if (IS_ERR(mipi_tx->regs)) Acked-by: Chunfeng Yun Thanks

Re: [PATCH v6 6/7] phy: phy-mtk-dp: Add driver for DP phy

2021-11-12 Thread Chunfeng Yun
On Wed, 2021-11-10 at 14:06 +0100, Guillaume Ranquet wrote: > From: Markus Schneider-Pargmann > > This is a new driver that supports the integrated DisplayPort phy for > mediatek SoCs, especially the mt8195. The phy is integrated into the > DisplayPort controller and will be created by the mtk-dp

Re: [PATCH 2/4] drm/mediatek: add mt8195 hdmi TX support

2021-09-22 Thread Chunfeng Yun
On Tue, 2021-09-07 at 10:37 +0200, Guillaume Ranquet wrote: > Add basic hdmi TX support for the mediatek mt8195 SoCs > > Signed-off-by: Guillaume Ranquet > --- > drivers/gpu/drm/mediatek/Kconfig | 10 + > drivers/gpu/drm/mediatek/Makefile |4 +- > drivers/gpu/drm/m

Re: [PATCH 1/4] phy: mediatek: add support for phy-mtk-hdmi-mt8195

2021-09-22 Thread Chunfeng Yun
On Tue, 2021-09-07 at 10:37 +0200, Guillaume Ranquet wrote: > Add basic support for the mediatek hdmi phy on MT8195 SoC > > Signed-off-by: Guillaume Ranquet > --- > drivers/phy/mediatek/Makefile | 1 + > drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 777 > + > d

[PATCH v3 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource

2021-08-17 Thread Chunfeng Yun
Use devm_platform_ioremap_resource to simplify code Acked-by: Chun-Kuang Hu Signed-off-by: Chunfeng Yun --- v3: no changes v2: add acked-by CK --- drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c

[PATCH v3 8/9] phy: phy-mtk-mipi-dsi: remove dummy assignment of error number

2021-08-17 Thread Chunfeng Yun
Return the error number directly without assignment Acked-by: Chun-Kuang Hu Signed-off-by: Chunfeng Yun --- v3: no changes v2: add acked-by CK --- drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi

[PATCH v3 6/9] phy: phy-mtk-ufs: use clock bulk to get clocks

2021-08-17 Thread Chunfeng Yun
Use clock bulk helpers to get/enable/disable clocks Reviewed-by: Stanley Chu Signed-off-by: Chunfeng Yun --- v3: add reviewed-by Stanley v2: no changes --- drivers/phy/mediatek/phy-mtk-ufs.c | 44 -- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a

[PATCH v3 9/9] phy: phy-mtk-mipi-dsi: convert to devm_platform_ioremap_resource

2021-08-17 Thread Chunfeng Yun
Use devm_platform_ioremap_resource to simplify code Acked-by: Chun-Kuang Hu Signed-off-by: Chunfeng Yun --- v3: no changes v2: add acked-by CK --- drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk

[PATCH v3 3/9] phy: phy-mtk-tphy: support type switch by pericfg

2021-08-17 Thread Chunfeng Yun
Add support type switch between USB3, PCIe, SATA and SGMII by pericfg register, this is used to take the place of efuse or jumper. Signed-off-by: Chunfeng Yun --- v2~3: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 84 - 1 file changed, 82 insertions(+), 2

[PATCH v3 5/9] phy: phy-mtk-tphy: remove error log of ioremap failure

2021-08-17 Thread Chunfeng Yun
devm_ioremap_resource() will print log if error happens. Signed-off-by: Chunfeng Yun --- v2~3: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 9d4b34298137

[PATCH v3 2/9] phy: phy-mtk-tphy: use clock bulk to get clocks

2021-08-17 Thread Chunfeng Yun
Use clock bulk helpers to get/enable/disable clocks Signed-off-by: Chunfeng Yun --- v2~3: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 43 + 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy

[PATCH v3 4/9] phy: phy-mtk-tphy: print error log using child device

2021-08-17 Thread Chunfeng Yun
Print error log using child devices instead of parent device. Signed-off-by: Chunfeng Yun --- v2~3: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy

[PATCH v3 1/9] dt-bindings: phy: mediatek: tphy: support type switch by pericfg

2021-08-17 Thread Chunfeng Yun
Add support type switch by pericfg register between USB3, PCIe, SATA, SGMII, this is used to replace the way through efuse or jumper. Reviewed-by: Rob Herring Signed-off-by: Chunfeng Yun --- v3: no changes v2: add reviewed-by Rob --- .../devicetree/bindings/phy/mediatek,tphy.yaml | 16

[PATCH v2 4/9] phy: phy-mtk-tphy: print error log using child device

2021-08-11 Thread Chunfeng Yun
Print error log using child devices instead of parent device. Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk

[PATCH v2 8/9] phy: phy-mtk-mipi-dsi: remove dummy assignment of error number

2021-08-11 Thread Chunfeng Yun
Return the error number directly without assignment Acked-by: Chun-Kuang Hu Signed-off-by: Chunfeng Yun --- v2: add acked-by CK --- drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b

[PATCH v2 2/9] phy: phy-mtk-tphy: use clock bulk to get clocks

2021-08-11 Thread Chunfeng Yun
Use clock bulk helpers to get/enable/disable clocks Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 43 + 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy

[PATCH v2 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource

2021-08-11 Thread Chunfeng Yun
Use devm_platform_ioremap_resource to simplify code Acked-by: Chun-Kuang Hu Signed-off-by: Chunfeng Yun --- v2: add acked-by CK --- drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy

[PATCH v2 9/9] phy: phy-mtk-mipi-dsi: convert to devm_platform_ioremap_resource

2021-08-11 Thread Chunfeng Yun
Use devm_platform_ioremap_resource to simplify code Acked-by: Chun-Kuang Hu Signed-off-by: Chunfeng Yun --- v2: add acked-by CK --- drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b

[PATCH v2 5/9] phy: phy-mtk-tphy: remove error log of ioremap failure

2021-08-11 Thread Chunfeng Yun
devm_ioremap_resource() will print log if error happens. Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 9d4b34298137

[PATCH v2 3/9] phy: phy-mtk-tphy: support type switch by pericfg

2021-08-11 Thread Chunfeng Yun
Add support type switch between USB3, PCIe, SATA and SGMII by pericfg register, this is used to take the place of efuse or jumper. Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/phy/mediatek/phy-mtk-tphy.c | 84 - 1 file changed, 82 insertions(+), 2

[PATCH v2 6/9] phy: phy-mtk-ufs: use clock bulk to get clocks

2021-08-11 Thread Chunfeng Yun
Use clock bulk helpers to get/enable/disable clocks Signed-off-by: Chunfeng Yun --- v2: no changes --- drivers/phy/mediatek/phy-mtk-ufs.c | 44 -- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-ufs.c b/drivers/phy

[PATCH v2 1/9] dt-bindings: phy: mediatek: tphy: support type switch by pericfg

2021-08-11 Thread Chunfeng Yun
Add support type switch by pericfg register between USB3, PCIe, SATA, SGMII, this is used to replace the way through efuse or jumper. Reviewed-by: Rob Herring Signed-off-by: Chunfeng Yun --- v2: add reviewed-by Rob --- .../devicetree/bindings/phy/mediatek,tphy.yaml | 16 1

[PATCH 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource

2021-07-28 Thread Chunfeng Yun
Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c index 8ad8f717ef43

[PATCH 9/9] phy: phy-mtk-mipi-dsi: convert to devm_platform_ioremap_resource

2021-07-28 Thread Chunfeng Yun
Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c index

[PATCH 8/9] phy: phy-mtk-mipi-dsi: remove dummy assignment of error number

2021-07-28 Thread Chunfeng Yun
Return the error number directly without assignment Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c index

[PATCH 2/9] phy: phy-mtk-tphy: use clock bulk to get clocks

2021-07-28 Thread Chunfeng Yun
Use clock bulk helpers to get/enable/disable clocks Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 43 + 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c

[PATCH 6/9] phy: phy-mtk-ufs: use clock bulk to get clocks

2021-07-28 Thread Chunfeng Yun
Use clock bulk helpers to get/enable/disable clocks Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-ufs.c | 44 -- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-ufs.c b/drivers/phy/mediatek/phy-mtk-ufs.c

[PATCH 5/9] phy: phy-mtk-tphy: remove error log of ioremap failure

2021-07-28 Thread Chunfeng Yun
devm_ioremap_resource() will print log if error happens. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index 9d4b34298137..cdcef865fe9e 100644

[PATCH 4/9] phy: phy-mtk-tphy: print error log using child device

2021-07-28 Thread Chunfeng Yun
Print error log using child devices instead of parent device. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c index

[PATCH 1/9] dt-bindings: phy: mediatek: tphy: support type switch by pericfg

2021-07-28 Thread Chunfeng Yun
Add support type switch by pericfg register between USB3, PCIe, SATA, SGMII, this is used to replace the way through efuse or jumper. Signed-off-by: Chunfeng Yun --- .../devicetree/bindings/phy/mediatek,tphy.yaml | 16 1 file changed, 16 insertions(+) diff --git a

[PATCH 3/9] phy: phy-mtk-tphy: support type switch by pericfg

2021-07-28 Thread Chunfeng Yun
Add support type switch between USB3, PCIe, SATA and SGMII by pericfg register, this is used to take the place of efuse or jumper. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 84 - 1 file changed, 82 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v2 -next] phy: phy-mtk-hdmi: Remove redundant dev_err call in mtk_hdmi_phy_probe()

2021-04-08 Thread Chunfeng Yun
hdmi_phy->regs = devm_ioremap_resource(dev, mem); > if (IS_ERR(hdmi_phy->regs)) { > - ret = PTR_ERR(hdmi_phy->regs); > - dev_err(dev, "Failed to get memory resource: %d\n", ret); > - return ret; > + return PTR_

Re: [PATCH -next] phy: mediatek: Mark mtk_mipi_tx_driver with static keyword

2021-01-14 Thread Chunfeng Yun
x_probe, > .remove = mtk_mipi_tx_remove, > .driver = { Acked-by: Chunfeng Yun Thanks ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v5 11/11] MAINTAINERS: update MediaTek PHY/USB entry

2020-12-25 Thread Chunfeng Yun
Due to the phy/usb bindings are converted into YAML schema and also renamed, update entries. Meanwhile add drivers/usb/host/mtk-xhci* files. Signed-off-by: Chunfeng Yun --- v3~v5: no changes v2: new patch --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH v4 01/11] dt-bindings: usb: convert usb-device.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
On Mon, 2020-12-21 at 12:09 -0700, Rob Herring wrote: > On Wed, Dec 16, 2020 at 05:30:02PM +0800, Chunfeng Yun wrote: > > Convert usb-device.txt to YAML schema usb-device.yaml > > > > Signed-off-by: Chunfeng Yun > > --- > > v4: no changes, updat

[PATCH v5 03/11] dt-bindings: phy: convert phy-mtk-xsphy.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
Convert phy-mtk-xsphy.txt to YAML schema mediatek,xsphy.yaml Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v5: no changes v4: add Reviewed-by Rob v3: 1. remove type for property with standard unit suffix suggested by Rob 2. remove '|' for descritpion 3. fix yamlli

[PATCH v5 10/11] dt-bindings: usb: convert mediatek, mtu3.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
Convert mediatek,mtu3.txt to YAML schema mediatek,mtu3.yaml Signed-off-by: Chunfeng Yun --- v5: changes suggested by Rob 1. remove unnecessary maxItems 2. define all phys supported v4: 1. refer to usb-drd.yaml insstead of usb/generic.txt the following ones suggested by Rob: 2. add the

[PATCH v5 05/11] dt-bindings: phy: convert phy-mtk-ufs.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
Convert phy-mtk-ufs.txt to YAML schema mediatek,ufs-phy.yaml Cc: Stanley Chu Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Reviewed-by: Stanley Chu --- v5: no changes v4: add Reviewed-by Stanley v3: add Reviewed-by Rob v2: fix binding check warning of reg in example --- .../bindings

[PATCH v5 04/11] dt-bindings: phy: convert phy-mtk-tphy.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
Convert phy-mtk-tphy.txt to YAML schema mediatek,tphy.yaml Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v5: no changes v4: add Reviewed-by Rob v3: 1. fix dt_binding_check error in example after add mtu3.yaml Changes suggested by Rob: 2. fix wrong indentation 3. remove

[PATCH v5 08/11] dt-bindings: usb: convert mediatek, musb.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
Convert mediatek,musb.txt to YAML schema mediatek,musb.yaml Cc: Min Guo Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v4~v5: no changes v3: add Reviewed-by Rob v2: new patch --- .../devicetree/bindings/usb/mediatek,musb.txt | 57 - .../bindings/usb/mediatek,musb.yaml

[PATCH v5 02/11] dt-bindings: net: btusb: change reference file name

2020-12-25 Thread Chunfeng Yun
Due to usb-device.txt is converted into usb-device.yaml, so modify reference file names at the same time. Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- v5: add Acked-by Rob v2~v4: no changes --- Documentation/devicetree/bindings/net/btusb.txt | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v4 10/11] dt-bindings: usb: convert mediatek,mtu3.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
On Mon, 2020-12-21 at 12:26 -0700, Rob Herring wrote: > On Wed, Dec 16, 2020 at 05:30:11PM +0800, Chunfeng Yun wrote: > > Convert mediatek,mtu3.txt to YAML schema mediatek,mtu3.yaml > > > > Signed-off-by: Chunfeng Yun > > --- > > v4: > > 1. refer to u

[PATCH v5 07/11] dt-bindings: phy: convert MIPI DSI PHY binding to YAML schema

2020-12-25 Thread Chunfeng Yun
Convert MIPI DSI PHY binding to YAML schema mediatek,dsi-phy.yaml Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Reviewed-by: Chun-Kuang Hu --- v5: add Reviewed-by Rob & Chun-Kuang v4: 1. add maintainer Philipp add support mt8183 suggested by

Re: [PATCH v4 09/11] dt-bindings: usb: convert mediatek,mtk-xhci.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
On Mon, 2020-12-21 at 12:23 -0700, Rob Herring wrote: > On Wed, Dec 16, 2020 at 05:30:10PM +0800, Chunfeng Yun wrote: > > Convert mediatek,mtk-xhci.txt to YAML schema mediatek,mtk-xhci.yaml > > > > Signed-off-by: Chunfeng Yun > > --- > > v4: update it acco

[PATCH v5 06/11] dt-bindings: phy: convert HDMI PHY binding to YAML schema

2020-12-25 Thread Chunfeng Yun
Convert HDMI PHY binding to YAML schema mediatek,hdmi-phy.yaml Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Reviewed-by: Chun-Kuang Hu --- v5: add Reviewed-by Chun-Kuang v4: add maintainer Philipp v3: add Reviewed-by Rob v2: fix binding check

[PATCH v5 09/11] dt-bindings: usb: convert mediatek, mtk-xhci.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
Convert mediatek,mtk-xhci.txt to YAML schema mediatek,mtk-xhci.yaml Signed-off-by: Chunfeng Yun --- v5: changes suggested by Rob 1. refer to usb-xhci.yaml instead of usb-hcd.yaml 2. remove unnecessary maxItems 3. add items for all phys may be supported 4. change pattern, and limit

[PATCH v5 01/11] dt-bindings: usb: convert usb-device.txt to YAML schema

2020-12-25 Thread Chunfeng Yun
Convert usb-device.txt to YAML schema usb-device.yaml Signed-off-by: Chunfeng Yun --- v5: changes suggested by Rob: 1. limit the pattern length 2. remove properties description for hard wired USB devices in usb-hcd.yaml depends on series: https://patchwork.kernel.org/project/linux

[PATCH v4 08/11] dt-bindings: usb: convert mediatek, musb.txt to YAML schema

2020-12-17 Thread Chunfeng Yun
Convert mediatek,musb.txt to YAML schema mediatek,musb.yaml Cc: Min Guo Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v4: no changes v3: add Reviewed-by Rob v2: new patch --- .../devicetree/bindings/usb/mediatek,musb.txt | 57 - .../bindings/usb/mediatek,musb.yaml

[PATCH v4 04/11] dt-bindings: phy: convert phy-mtk-tphy.txt to YAML schema

2020-12-17 Thread Chunfeng Yun
Convert phy-mtk-tphy.txt to YAML schema mediatek,tphy.yaml Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v4: add Reviewed-by Rob v3: 1. fix dt_binding_check error in example after add mtu3.yaml Changes suggested by Rob: 2. fix wrong indentation 3. remove '|'

[PATCH v4 10/11] dt-bindings: usb: convert mediatek, mtu3.txt to YAML schema

2020-12-17 Thread Chunfeng Yun
Convert mediatek,mtu3.txt to YAML schema mediatek,mtu3.yaml Signed-off-by: Chunfeng Yun --- v4: 1. refer to usb-drd.yaml insstead of usb/generic.txt the following ones suggested by Rob: 2. add the number of phys supported 3. fix indentation of wakeup 4. add examples for port and

[PATCH v4 06/11] dt-bindings: phy: convert HDMI PHY binding to YAML schema

2020-12-17 Thread Chunfeng Yun
Convert HDMI PHY binding to YAML schema mediatek,hdmi-phy.yaml Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v4: add maintainer Philipp v3: add Reviewed-by Rob v2: fix binding check warning of reg in example --- .../display/mediatek/mediatek

[PATCH v4 02/11] dt-bindings: net: btusb: change reference file name

2020-12-17 Thread Chunfeng Yun
Due to usb-device.txt is converted into usb-device.yaml, so modify reference file names at the same time. Signed-off-by: Chunfeng Yun --- v2~v4: no changes --- Documentation/devicetree/bindings/net/btusb.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation

[PATCH v4 01/11] dt-bindings: usb: convert usb-device.txt to YAML schema

2020-12-17 Thread Chunfeng Yun
Convert usb-device.txt to YAML schema usb-device.yaml Signed-off-by: Chunfeng Yun --- v4: no changes, update dependent series: https://patchwork.kernel.org/project/linux-usb/list/?series=399561 [v6,00/19] dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema v3: 1. remove

[PATCH v4 05/11] dt-bindings: phy: convert phy-mtk-ufs.txt to YAML schema

2020-12-17 Thread Chunfeng Yun
Convert phy-mtk-ufs.txt to YAML schema mediatek,ufs-phy.yaml Cc: Stanley Chu Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Reviewed-by: Stanley Chu --- v4: add Reviewed-by Stanley v3: add Reviewed-by Rob v2: fix binding check warning of reg in example --- .../bindings/phy/mediatek,ufs

[PATCH v4 03/11] dt-bindings: phy: convert phy-mtk-xsphy.txt to YAML schema

2020-12-17 Thread Chunfeng Yun
Convert phy-mtk-xsphy.txt to YAML schema mediatek,xsphy.yaml Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v4: add Reviewed-by Rob v3: 1. remove type for property with standard unit suffix suggested by Rob 2. remove '|' for descritpion 3. fix yamllint warning v2:

[PATCH v4 11/11] MAINTAINERS: update MediaTek PHY/USB entry

2020-12-17 Thread Chunfeng Yun
Due to the phy/usb bindings are converted into YAML schema and also renamed, update entries. Meanwhile add drivers/usb/host/mtk-xhci* files. Signed-off-by: Chunfeng Yun --- v3~v4: no changes v2: new patch --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

[PATCH v4 07/11] dt-bindings: phy: convert MIPI DSI PHY binding to YAML schema

2020-12-17 Thread Chunfeng Yun
Convert MIPI DSI PHY binding to YAML schema mediatek,dsi-phy.yaml Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Chunfeng Yun --- v4: 1. add maintainer Philipp add support mt8183 suggested by Chun-Kuang 2. use keyword multipleOf suggested by Rob 3. fix typo of 'MIPI' in

[PATCH v4 09/11] dt-bindings: usb: convert mediatek, mtk-xhci.txt to YAML schema

2020-12-17 Thread Chunfeng Yun
Convert mediatek,mtk-xhci.txt to YAML schema mediatek,mtk-xhci.yaml Signed-off-by: Chunfeng Yun --- v4: update it according to Rob's suggestion 1. modify dictionary of phys 2. fix endentation in "mediatek,syscon-wakeup" items 3. remove reference to usb-hcd.yaml v3:

Re: [PATCH v3 09/11] dt-bindings: usb: convert mediatek,mtk-xhci.txt to YAML schema

2020-12-09 Thread Chunfeng Yun
On Mon, 2020-12-07 at 15:24 -0600, Rob Herring wrote: > On Wed, Nov 18, 2020 at 04:21:24PM +0800, Chunfeng Yun wrote: > > Convert mediatek,mtk-xhci.txt to YAML schema mediatek,mtk-xhci.yaml > > > > Signed-off-by: Chunfeng Yun > > --- > > v3: > > 1. fix y

Re: [PATCH v3 10/11] dt-bindings: usb: convert mediatek,mtu3.txt to YAML schema

2020-12-09 Thread Chunfeng Yun
On Mon, 2020-12-07 at 15:30 -0600, Rob Herring wrote: > On Wed, Nov 18, 2020 at 04:21:25PM +0800, Chunfeng Yun wrote: > > Convert mediatek,mtu3.txt to YAML schema mediatek,mtu3.yaml > > > > Signed-off-by: Chunfeng Yun > > --- > > v3: > > 1. fix y

Re: [PATCH v3 07/11] dt-bindings: phy: convert MIP DSI PHY binding to YAML schema

2020-12-08 Thread Chunfeng Yun
On Mon, 2020-12-07 at 15:19 -0600, Rob Herring wrote: > On Wed, Nov 18, 2020 at 04:21:22PM +0800, Chunfeng Yun wrote: > > Convert MIPI DSI PHY binding to YAML schema mediatek,dsi-phy.yaml > > > > Cc: Chun-Kuang Hu > > Signed-off-by: Chunfeng Yun

Re: [PATCH][next] drm/mediatek: avoid dereferencing a null hdmi_phy on an error message

2020-12-08 Thread Chunfeng Yun
On Mon, 2020-12-07 at 15:09 +, Colin King wrote: > From: Colin Ian King > > Currently there is a null pointer check for hdmi_phy that implies it > may be null, however a dev_err messages dereferences this potential null > pointer. Avoid a null pointer dereference by only emitting the dev_err

Re: [PATCH v3 06/11] dt-bindings: phy: convert HDMI PHY binding to YAML schema

2020-11-20 Thread Chunfeng Yun
On Fri, 2020-11-20 at 07:42 +0800, Chun-Kuang Hu wrote: > Hi, Chunfeng: > > Chunfeng Yun 於 2020年11月18日 週三 下午4:21寫道: > > > > Convert HDMI PHY binding to YAML schema mediatek,hdmi-phy.yaml > > > > Cc: Chun-Kuang Hu > > Signed-off-by: Chunfeng Yun > >

Re: [PATCH v3 07/11] dt-bindings: phy: convert MIP DSI PHY binding to YAML schema

2020-11-20 Thread Chunfeng Yun
On Fri, 2020-11-20 at 07:38 +0800, Chun-Kuang Hu wrote: > Hi, Chunfeng: > > Chunfeng Yun 於 2020年11月18日 週三 下午4:21寫道: > > > > Convert MIPI DSI PHY binding to YAML schema mediatek,dsi-phy.yaml > > > > Cc: Chun-Kuang Hu > > Signed-off-by:

[PATCH v3 09/11] dt-bindings: usb: convert mediatek, mtk-xhci.txt to YAML schema

2020-11-19 Thread Chunfeng Yun
Convert mediatek,mtk-xhci.txt to YAML schema mediatek,mtk-xhci.yaml Signed-off-by: Chunfeng Yun --- v3: 1. fix yamllint warning 2. remove pinctrl* properties supported by default suggested by Rob 3. drop unused labels 4. modify description of mediatek,syscon-wakeup 5. remove type of

[PATCH v3 06/11] dt-bindings: phy: convert HDMI PHY binding to YAML schema

2020-11-19 Thread Chunfeng Yun
Convert HDMI PHY binding to YAML schema mediatek,hdmi-phy.yaml Cc: Chun-Kuang Hu Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v3: add Reviewed-by Rob v2: fix binding check warning of reg in example --- .../display/mediatek/mediatek,hdmi.txt| 18 +--- .../bindings/phy

[PATCH v3 11/11] MAINTAINERS: update MediaTek PHY/USB entry

2020-11-19 Thread Chunfeng Yun
Due to the phy/usb bindings are converted into YAML schema and also renamed, update entries. Meanwhile add drivers/usb/host/mtk-xhci* files. Signed-off-by: Chunfeng Yun --- v3: no changes v2: new patch --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

[PATCH v3 01/11] dt-bindings: usb: convert usb-device.txt to YAML schema

2020-11-19 Thread Chunfeng Yun
Convert usb-device.txt to YAML schema usb-device.yaml Signed-off-by: Chunfeng Yun --- v3: 1. remove $nodenmae and items key word for compatilbe; 2. add additionalProperties; The followings are suggested by Rob: 3. merge the following patch [v2,1/4] dt-bindings: usb: convert usb

  1   2   >