summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-01-09 11:35:10 +0800
committerTom Rini <trini@konsulko.com>2020-01-16 09:39:45 -0500
commitce0069ed9599d6e42f89b272f618c305fad039e3 (patch)
treea81096da9e1303cd9e1d6eb03552392bb0c383df
parent3b6351a47594d1f97d63085b7dac9fbae1e7aabe (diff)
phy: phy-mtk-tphy: make ref clock optional
If make the ref clock optional, no need refer to fixed-clock when the ref clock is always on or comes from oscillator directly. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
-rw-r--r--drivers/phy/phy-mtk-tphy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index c4fb404f20..fd33062ae4 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -338,7 +338,8 @@ static int mtk_tphy_probe(struct udevice *dev)
tphy->phys[index] = instance;
index++;
- err = clk_get_by_index_nodev(subnode, 0, &instance->ref_clk);
+ err = clk_get_optional_nodev(subnode, "ref",
+ &instance->ref_clk);
if (err)
return err;
}