diff options
author | Daniel Golle <daniel@makrotopia.org> | 2023-06-01 10:32:19 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2023-06-09 19:23:03 +0100 |
commit | 4494791fc7ce0e55234e07a90d31902d39a17066 (patch) | |
tree | 15fd28f6c3f626aeee5083303eb575f0e0aeab30 | |
parent | c4c14e9ce80d7a9981fb1fd3997addfb5104edde (diff) | |
download | upstream-4494791fc7ce0e55234e07a90d31902d39a17066.tar.gz upstream-4494791fc7ce0e55234e07a90d31902d39a17066.tar.bz2 upstream-4494791fc7ce0e55234e07a90d31902d39a17066.zip |
mediatek: use existing I2C clock names
PCK and MCK should really be P=PMIC and M=MEM, which means that they
should effectively be CLK_PMIC and CLK_ARB.
Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 0580747adab2094862c18b5e762c908dd3b43236)
-rw-r--r-- | target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi | 2 | ||||
-rw-r--r-- | target/linux/mediatek/patches-5.15/855-pending-i2c-mt65xx-add-additional-clocks.patch | 55 |
2 files changed, 1 insertions, 56 deletions
diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi index 17038a2484..304566810a 100644 --- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi +++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7981.dtsi @@ -327,7 +327,7 @@ <&infracfg CLK_INFRA_AP_DMA_CK>, <&infracfg CLK_INFRA_I2C_MCK_CK>, <&infracfg CLK_INFRA_I2C_PCK_CK>; - clock-names = "main", "dma", "mck", "pck"; + clock-names = "main", "dma", "arb", "pmic"; #address-cells = <1>; #size-cells = <0>; status = "disabled"; diff --git a/target/linux/mediatek/patches-5.15/855-pending-i2c-mt65xx-add-additional-clocks.patch b/target/linux/mediatek/patches-5.15/855-pending-i2c-mt65xx-add-additional-clocks.patch deleted file mode 100644 index 1ed8d1a96a..0000000000 --- a/target/linux/mediatek/patches-5.15/855-pending-i2c-mt65xx-add-additional-clocks.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 94bf61df9201195d6d8ce82e299fb231b31fbaae Mon Sep 17 00:00:00 2001 -From: Daniel Golle <daniel@makrotopia.org> -Date: Fri, 26 May 2023 10:29:45 +0100 -Subject: [PATCH] i2c: mt65xx: add additional clocks - -On MT7981 additional clocks are required when accessing I2C registers. -Add MCK and PCK optional clocks to i2c-mt65xx driver so we don't have -to always have them enabled, but really only if I2C is used. - -Signed-off-by: Daniel Golle <daniel@makrotopia.org> ---- - drivers/i2c/busses/i2c-mt65xx.c | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - ---- a/drivers/i2c/busses/i2c-mt65xx.c -+++ b/drivers/i2c/busses/i2c-mt65xx.c -@@ -93,6 +93,8 @@ - * @I2C_MT65XX_CLK_DMA: DMA clock for i2c via DMA - * @I2C_MT65XX_CLK_PMIC: PMIC clock for i2c from PMIC - * @I2C_MT65XX_CLK_ARB: Arbitrator clock for i2c -+ * @I2C_MT65XX_CLK_MCK: MCK clock for i2c -+ * @I2C_MT65XX_CLK_PCK: PCK clock for i2c - * @I2C_MT65XX_CLK_MAX: Number of supported clocks - */ - enum i2c_mt65xx_clks { -@@ -100,11 +102,13 @@ enum i2c_mt65xx_clks { - I2C_MT65XX_CLK_DMA, - I2C_MT65XX_CLK_PMIC, - I2C_MT65XX_CLK_ARB, -+ I2C_MT65XX_CLK_MCK, -+ I2C_MT65XX_CLK_PCK, - I2C_MT65XX_CLK_MAX - }; - - static const char * const i2c_mt65xx_clk_ids[I2C_MT65XX_CLK_MAX] = { -- "main", "dma", "pmic", "arb" -+ "main", "dma", "pmic", "arb", "mck", "pck" - }; - - enum DMA_REGS_OFFSET { -@@ -1444,6 +1448,14 @@ static int mtk_i2c_probe(struct platform - if (IS_ERR(i2c->clocks[I2C_MT65XX_CLK_ARB].clk)) - return PTR_ERR(i2c->clocks[I2C_MT65XX_CLK_ARB].clk); - -+ i2c->clocks[I2C_MT65XX_CLK_MCK].clk = devm_clk_get_optional(&pdev->dev, "mck"); -+ if (IS_ERR(i2c->clocks[I2C_MT65XX_CLK_MCK].clk)) -+ return PTR_ERR(i2c->clocks[I2C_MT65XX_CLK_MCK].clk); -+ -+ i2c->clocks[I2C_MT65XX_CLK_PCK].clk = devm_clk_get_optional(&pdev->dev, "pck"); -+ if (IS_ERR(i2c->clocks[I2C_MT65XX_CLK_PCK].clk)) -+ return PTR_ERR(i2c->clocks[I2C_MT65XX_CLK_PCK].clk); -+ - if (i2c->have_pmic) { - i2c->clocks[I2C_MT65XX_CLK_PMIC].clk = devm_clk_get(&pdev->dev, "pmic"); - if (IS_ERR(i2c->clocks[I2C_MT65XX_CLK_PMIC].clk)) { |