Chunfeng Yun
bd4ba730ff
phy: mediatek: mipi: mt8173: use common helper to access registers
...
Use MediaTek phy's common helper to access registers, then we can remove
mipi-dsi's I/O helpers.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-16-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:50 +05:30
Chunfeng Yun
993aa53ed0
phy: mediatek: mipi: mt8173: use FIELD_PREP to prepare bits field
...
Use FIELD_PREP() macro to prepare bits field value, then no need define
macros of bits offset.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-15-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:50 +05:30
Chunfeng Yun
7bd7271432
phy: mediatek: mipi: mt8173: use GENMASK to generate bits mask
...
Use GENMASK() macro to generate bits mask
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-14-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:50 +05:30
Chunfeng Yun
299a9c72ac
phy: mediatek: hdmi: remove register access helpers
...
Remove private register access helpers, use the common ones instead.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-13-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:50 +05:30
Chunfeng Yun
0fb5e57e67
phy: mediatek: hdmi: mt8173: use common helper to access registers
...
Use MediaTek phy's common helper to access registers, then we can remove
hdmi's I/O helpers.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-12-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:50 +05:30
Chunfeng Yun
309b4fec53
phy: mediatek: hdmi: mt8173: use FIELD_PREP to prepare bits field
...
Use FIELD_PREP() macro to prepare bits field value, then no need define
macros of bits offset.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-11-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:50 +05:30
Chunfeng Yun
a8a78274c6
phy: mediatek: hdmi: mt8173: use GENMASK to generate bits mask
...
Use GENMASK() macro to generate bits mask
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-10-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:50 +05:30
Chunfeng Yun
cff81a618a
phy: mediatek: hdmi: mt2701: use common helper to access registers
...
Use MediaTek phy's common helper to access registers, then we can remove
hdmi's I/O helpers.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-9-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:50 +05:30
Chunfeng Yun
a98d935eac
phy: mediatek: hdmi: mt2701: use FIELD_PREP to prepare bits field
...
Use FIELD_PREP() macro to prepare bits field value, then no need define
macros of bits offset.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-8-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:50 +05:30
Chunfeng Yun
b0870c0151
phy: mediatek: hdmi: mt2701: use GENMASK and BIT to generate mask and bits
...
Use GENMASK() and BIT() macros to generate mask and bits
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-7-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:49 +05:30
Chunfeng Yun
d87f2b8373
phy: mediatek: pcie: use new helper to update register bits
...
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 <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-6-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:49 +05:30
Chunfeng Yun
2b0c004384
phy: mediatek: ufs: use common register access helpers
...
No need define private register access helpers, use common ones defined
in phy-mtk-io.h
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220920090038.15133-5-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:49 +05:30
Chunfeng Yun
c221baa355
phy: mediatek: xsphy: remove macros used to prepare bitfield value
...
Prefer to make use of FIELD_PREP() macro to prepare bitfield value,
then no need local ones anymore.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Link: https://lore.kernel.org/r/20220920090038.15133-4-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:49 +05:30
Chunfeng Yun
6b5ef19461
phy: mediatek: tphy: remove macros to prepare bitfield value
...
Prefer to make use of FIELD_PREP() macro to prepare bitfield value,
then no need local ones anymore.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Link: https://lore.kernel.org/r/20220920090038.15133-3-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:49 +05:30
Chunfeng Yun
29c0747755
phy: mediatek: add a new helper to update bitfield
...
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 <chunfeng.yun@mediatek.com >
Link: https://lore.kernel.org/r/20220920090038.15133-2-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 11:57:49 +05:30
Johan Hovold
9d94396191
phy: qcom-qmp-combo: drop redundant DP config flag
...
Drop the DP_COM control block flag from the configuration data, which is
set for all combo PHYs and hence no longer needed since the QMP driver
split.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-18-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:58 +05:30
Johan Hovold
a73a19ea38
phy: qcom-qmp-usb: consolidate lane config
...
For legacy reasons, there are two configuration parameters that appear
to describe the number of lanes a PHY has, even if "nlanes" was actually
used for a different purpose.
Replace them both with a new field simply named "lanes".
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-17-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
07d386bf6d
phy: qcom-qmp-ufs: consolidate lane config
...
For legacy reasons, there are two configuration parameters that describe
the number of lanes a PHY has.
Replace them both with a new field simply named "lanes".
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-16-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
099155615a
phy: qcom-qmp-combo: consolidate lane config
...
For legacy reasons, there are two configuration parameters that appear
to describe the number of lanes a PHY has, even if "nlanes" was actually
used for a different purpose.
Replace them both with a new field simply named "lanes".
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-15-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
0d316ce5c0
phy: qcom-qmp-pcie-msm8996: rename nlanes config
...
The nlanes configuration parameter is really the number of PHYs provided
by this QMP block on MSM8996. Rename it accordingly.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-14-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
f02543fa5b
phy: qcom-qmp-pcie: consolidate lane config
...
For legacy reasons, there are two configuration parameters that describe
the number of lanes a PHY has.
Replace them both with a new field simply named "lanes".
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-13-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
b4e9da4d96
phy: qcom-qmp: drop unused index field
...
Only the MSM8996 PCIe QMP driver uses the index field so drop it from
the other drivers.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-12-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
a4683acfa4
phy: qcom-qmp-pcie: drop unused config field
...
Drop the unused mask_com_pcs_ready field from struct qmp_phy_cfg.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-11-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
96da759b53
phy: qcom-qmp-pcie: drop unused mode field
...
Drop the unused mode field from struct qmp_phy.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-10-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
7dbea6093d
phy: qcom-qmp-pcie-msm8996: drop unused kernel doc
...
Drop the removed mode field from the struct qmp_phy kernel doc.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-9-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
ec1f303b3e
phy: qcom-qmp: drop unused forward declarations
...
Only the combo QMP driver needs a forward declaration of struct qmp_phy.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-8-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
fe2da191f1
phy: qcom-qmp-usb: drop init and exit wrappers
...
Drop the unnecessary PHY init and exit callback wrappers.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-7-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
91174e2c52
phy: qcom-qmp-pcie: drop init and exit wrappers
...
Drop the unnecessary PHY init and exit callback wrappers.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-6-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
44d1b5ad17
phy: qcom-qmp-usb: drop unused type from config
...
The configuration PHY type is no longer needed since the QMP driver
split so drop it from the configuration and suspend callbacks.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-5-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
877f3debb3
phy: qcom-qmp-ufs: drop unused type from config
...
The configuration PHY type is no longer used since the QMP driver split
so drop it from the configuration.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-4-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
7a114df1f2
phy: qcom-qmp-pcie-msm8996: drop unused type from config
...
The configuration PHY type is no longer used since the QMP driver split
so drop it from the configuration.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
61ab46fe2a
phy: qcom-qmp-pcie: drop unused type from config
...
The configuration PHY type is no longer used since the QMP driver split
so drop it from the configurations.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:55 +05:30
Matt Ranostay
1fbef61bea
phy: ti: phy-j721e-wiz: stop name conflict if multiple serdes are initialized
...
When multiple serdes instances are initialized the first will succeed but
additional will conflict over clocks names and probing fails.
Signed-off-by: Matt Ranostay <mranostay@ti.com >
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com >
Link: https://lore.kernel.org/r/20220909200026.3422-1-mranostay@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 12:16:52 +05:30
Chunfeng Yun
931c05a8cb
phy: phy-mtk-tphy: fix the phy type setting issue
...
The PHY type is not set if the index is non zero, prepare type
value according to the index, like as mask value.
Fixes: 39099a4433 ("phy: phy-mtk-tphy: support type switch by pericfg")
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220914060746.10004-7-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:59:06 +05:30
Chunfeng Yun
1e77f026eb
phy: phy-mtk-tphy: set utmi 0 register in init() ops
...
No need repeat to clear utmi 0 register in ->power_on() and
->power_off(), just do it in ->init()
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220914060746.10004-6-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:59:05 +05:30
Chunfeng Yun
3fbbb75c40
phy: phy-mtk-tphy: disable gpio mode for all usb2 phys
...
Disable DP/DM's GPIO mode for all usb2 phy, not only for the first
usb2 phy which usually supports dual-role mode.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220914060746.10004-5-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:59:05 +05:30
Chunfeng Yun
8da71ebad8
phy: phy-mtk-tphy: disable hardware efuse when set INTR
...
INTR's value is able autoload from hardware efuse by default, when
software tries to update its value, should disable hardware efuse
firstly.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Link: https://lore.kernel.org/r/20220914060746.10004-4-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:59:05 +05:30
Chunfeng Yun
930981b425
phy: phy-mtk-tphy: add property to set pre-emphasis
...
Add a property to set usb2 phy's pre-emphasis, it's disabled by default
on some SoCs.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://lore.kernel.org/r/20220914060746.10004-3-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:59:05 +05:30
Chunfeng Yun
54511f207c
dt-bindings: phy: mediatek,tphy: add property to set pre-emphasis
...
Add a property to set usb2 phy's pre-emphasis, which used to widen eye
opening and boost eye swing.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Link: https://lore.kernel.org/r/20220914060746.10004-2-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:59:05 +05:30
Chunfeng Yun
0d14f49126
dt-bindings: phy: mediatek,tphy: add support type of SGMII
...
Add support ethernet SGMII, forgot to update type supported.
Fixes: c01608b3b4 ("dt-bindings: phy: mediatek: tphy: support type switch by pericfg")
Acked-by: Rob Herring <robh@kernel.org >
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com >
Link: https://lore.kernel.org/r/20220914060746.10004-1-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:59:05 +05:30
Yang Yingliang
8b8934ac6d
phy: rockchip-snps-pcie3: Use devm_platform_get_and_ioremap_resource()
...
Use devm_platform_get_and_ioremap_resource() to simplify
code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com >
Link: https://lore.kernel.org/r/20220914133728.3781160-1-yangyingliang@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:57:24 +05:30
Liang He
c4c349be07
phy: amlogic: phy-meson-axg-mipi-pcie-analog: Hold reference returned by of_get_parent()
...
As the of_get_parent() will increase the refcount of the node->parent
and the reference will be discarded, so we should hold the reference
with which we can decrease the refcount when done.
Fixes: 8eff8b4e22 ("phy: amlogic: phy-meson-axg-mipi-pcie-analog: add support for MIPI DSI analog")
Signed-off-by: Liang He <windhl@126.com >
Link: https://lore.kernel.org/r/20220915093506.4009456-1-windhl@126.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:56:38 +05:30
Geert Uytterhoeven
92086b884c
dt-bindings: phy: renesas,rcar-gen2-usb-phy: Convert to json-schema
...
Convert the Renesas R-Car Gen2 USB PHY Device Tree binding documentation
to json-schema.
Add missing properties.
Rename the device node from "usb-phy" to "usb-phy-controller", as it
does not represent a USB PHY itself, and thus does not have a
"#phy-cells" property.
Rename the child nodes from "usb-channel" to "usb-phy", as these do
represent USB PHYs.
Drop the second example, as it doesn't add any value.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/dbdcffd009302734fe2fb895ce04b72fa1ea4355.1663165000.git.geert+renesas@glider.be
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:51:44 +05:30
Johan Hovold
f5d6b5d613
phy: qcom-qmp-combo: fix sc8280xp PCS_USB offset
...
The PCS_USB register block lives at an offset of 0x300 from the PCS
region on SC8280XP so add the missing offset to avoid corrupting
unrelated registers on runtime suspend.
Note that this region should probably be described separately in the
binding.
Fixes: a2e927b0e5 ("phy: qcom-qmp-combo: Add sc8280xp USB/DP combo phys")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220919095700.2228-1-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:44:10 +05:30
Chris Morgan
b8ecfbaf2e
phy: rockchip: inno-dsidphy: Add support for rk3568
...
Add support for the Rockchip RK3568 DSI-DPHY. Registers were taken from
the BSP kernel driver and wherever possible cross referenced with the
TRM.
Refactor the code to allow the different compatible strings to set
either a max 1GHz timing table (all existing hardware) or a max 2.5GHz
timing table (the new RK356x). This works (for me) on both an RK3326
(PX30) and a new RK3566 device.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com >
Link: https://lore.kernel.org/r/20220919164616.12492-3-macroalpha82@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:39:47 +05:30
Chris Morgan
4b507195a4
dt-bindings: phy-rockchip-inno-dsidphy: add compatible for rk3568
...
Add a compatible string for the rk3568 dsi-dphy.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com >
Acked-by: Rob Herring <robh@kernel.org >
Reviewed-by: Heiko Stuebner <heiko@sntech.de >
Link: https://lore.kernel.org/r/20220919164616.12492-2-macroalpha82@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:39:40 +05:30
Iskren Chernev
be7038238b
dt-bindings: phy: qcom,qmp-ufs: Fix SM6115 clocks, regs
...
The Sm6115 UFS PHY has 2 clocks and 3 regs.
Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20220919180618.1840194-6-iskren.chernev@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:36:39 +05:30
Johan Hovold
264dac74e7
phy: qcom-qmp-usb: drop legacy DT workaround
...
Commit 5e17b95d98 ("phy: qcom-qmp: Utilize fully-specified DT
registers") added a workaround for legacy devicetrees which did not
specify register regions for the second lane of some dual-lane PHYs.
At the time, the only two dual-lane PHYs supported by mainline were
"qcom,sdm845-qmp-usb3-phy" and "qcom,sdm845-qmp-ufs-phy" and they had
been added to the binding less than six months before the binding was
fixed.
Presumably no one is using four-year old SDM845 dtbs with mainline
anymore so drop the workaround for malformed devicetrees. In the
unlikely event that anyone complains, we can consider reverting.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220916102340.11520-12-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:31:17 +05:30
Johan Hovold
6382555874
phy: qcom-qmp-ufs: drop legacy DT workaround
...
Commit 5e17b95d98 ("phy: qcom-qmp: Utilize fully-specified DT
registers") added a workaround for legacy devicetrees which did not
specify register regions for the second lane of some dual-lane PHYs.
At the time, the only two dual-lane PHYs supported by mainline were
"qcom,sdm845-qmp-usb3-phy" and "qcom,sdm845-qmp-ufs-phy" and they had
been added to the binding less than six months before the binding was
fixed.
Presumably no one is using four-year old SDM845 dtbs with mainline
anymore so drop the workaround for malformed devicetrees. In the
unlikely event that anyone complains, we can consider reverting.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220916102340.11520-11-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:31:17 +05:30
Johan Hovold
064bbdba4f
phy: qcom-qmp-combo: drop unused legacy DT workaround
...
Commit 5e17b95d98 ("phy: qcom-qmp: Utilize fully-specified DT
registers") added a workaround for legacy devicetrees which did not
specify register regions for the second lane of some dual-lane PHYs.
At the time, the only two dual-lane PHYs supported by mainline were
"qcom,sdm845-qmp-usb3-phy" and "qcom,sdm845-qmp-ufs-phy", neither
of which is a combo PHY.
Drop the workaround for malformed devicetrees, which should no longer be
needed since the QMP driver split.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220916102340.11520-10-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:31:16 +05:30