2019-05-19 13:07:45 +01:00
# SPDX-License-Identifier: GPL-2.0-only
2017-08-03 18:01:02 +08:00
#
# Phy drivers for Mediatek devices
#
config PHY_MTK_TPHY
2020-01-03 17:47:09 +01:00
tristate "MediaTek T-PHY Driver"
2020-01-03 17:47:10 +01:00
depends on ARCH_MEDIATEK || COMPILE_TEST
phy: mediatek: Make PHY_MTK_{XSPHY, TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors
devm_ioremap_resource() will be not built in lib/devres.c if
CONFIG_HAS_IOMEM is not set, of_address_to_resource() will be
not built in drivers/of/address.c if CONFIG_OF_ADDRESS is not
set, and then there exists two build errors about undefined
reference to "devm_ioremap_resource" and "of_address_to_resource"
in phy-mtk-xsphy.c under COMPILE_TEST and CONFIG_PHY_MTK_XSPHY,
make PHY_MTK_XSPHY depend on HAS_IOMEM and OF_ADDRESS to fix it.
The above issue is reported by kernel test robot <lkp@intel.com>,
through the discussion in the v1 patch, as Chunfeng said we need
also do this for config PHY_MTK_TPHY:
drivers/phy/mediatek/phy-mtk-tphy.c:1157: retval = of_address_to_resource(child_np, 0, &res);
drivers/phy/mediatek/phy-mtk-tphy.c:1123: tphy->sif_base = devm_ioremap_resource(dev, sif_res);
drivers/phy/mediatek/phy-mtk-tphy.c:1164: instance->port_base = devm_ioremap_resource(&phy->dev, &res);
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1606289865-692-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-11-25 15:37:45 +08:00
depends on OF && OF_ADDRESS
depends on HAS_IOMEM
2020-01-03 17:47:09 +01:00
select GENERIC_PHY
help
Say 'Y' here to add support for MediaTek T-PHY driver,
it supports multiple usb2.0, usb3.0 ports, PCIe and
2017-08-03 18:01:02 +08:00
SATA, and meanwhile supports two version T-PHY which have
different banks layout, the T-PHY with shared banks between
2020-11-14 12:05:18 +00:00
multi-ports is first version, otherwise is second version,
2017-08-03 18:01:02 +08:00
so you can easily distinguish them by banks layout.
2018-05-10 14:10:29 +08:00
2019-03-16 13:04:46 +08:00
config PHY_MTK_UFS
tristate "MediaTek UFS M-PHY driver"
2020-01-03 17:47:10 +01:00
depends on ARCH_MEDIATEK || COMPILE_TEST
depends on OF
2019-03-16 13:04:46 +08:00
select GENERIC_PHY
help
Support for UFS M-PHY on MediaTek chipsets.
Enable this to provide vendor-specific probing,
initialization, power on and power off flow of
specified M-PHYs.
2018-05-10 14:10:29 +08:00
config PHY_MTK_XSPHY
2020-01-03 17:47:09 +01:00
tristate "MediaTek XS-PHY Driver"
2020-01-03 17:47:10 +01:00
depends on ARCH_MEDIATEK || COMPILE_TEST
phy: mediatek: Make PHY_MTK_{XSPHY, TPHY} depend on HAS_IOMEM and OF_ADDRESS to fix build errors
devm_ioremap_resource() will be not built in lib/devres.c if
CONFIG_HAS_IOMEM is not set, of_address_to_resource() will be
not built in drivers/of/address.c if CONFIG_OF_ADDRESS is not
set, and then there exists two build errors about undefined
reference to "devm_ioremap_resource" and "of_address_to_resource"
in phy-mtk-xsphy.c under COMPILE_TEST and CONFIG_PHY_MTK_XSPHY,
make PHY_MTK_XSPHY depend on HAS_IOMEM and OF_ADDRESS to fix it.
The above issue is reported by kernel test robot <lkp@intel.com>,
through the discussion in the v1 patch, as Chunfeng said we need
also do this for config PHY_MTK_TPHY:
drivers/phy/mediatek/phy-mtk-tphy.c:1157: retval = of_address_to_resource(child_np, 0, &res);
drivers/phy/mediatek/phy-mtk-tphy.c:1123: tphy->sif_base = devm_ioremap_resource(dev, sif_res);
drivers/phy/mediatek/phy-mtk-tphy.c:1164: instance->port_base = devm_ioremap_resource(&phy->dev, &res);
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1606289865-692-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-11-25 15:37:45 +08:00
depends on OF && OF_ADDRESS
depends on HAS_IOMEM
2020-01-03 17:47:09 +01:00
select GENERIC_PHY
help
2018-05-10 14:10:29 +08:00
Enable this to support the SuperSpeedPlus XS-PHY transceiver for
USB3.1 GEN2 controllers on MediaTek chips. The driver supports
multiple USB2.0, USB3.1 GEN2 ports.
2019-05-13 10:22:25 +08:00
config PHY_MTK_HDMI
tristate "MediaTek HDMI-PHY Driver"
2020-12-04 14:56:43 +01:00
depends on ARCH_MEDIATEK || COMPILE_TEST
depends on COMMON_CLK
depends on OF
2019-05-13 10:22:25 +08:00
select GENERIC_PHY
help
Support HDMI PHY for Mediatek SoCs.
2020-10-06 07:37:07 +08:00
config PHY_MTK_MIPI_DSI
tristate "MediaTek MIPI-DSI Driver"
2021-01-03 14:55:17 +01:00
depends on ARCH_MEDIATEK || COMPILE_TEST
depends on COMMON_CLK
depends on OF
2020-10-06 07:37:07 +08:00
select GENERIC_PHY
help
Support MIPI DSI for Mediatek SoCs.