aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/patches-4.14
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mediatek/patches-4.14')
-rw-r--r--target/linux/mediatek/patches-4.14/0012-clk-dont-disable-unused-clocks.patch2
-rw-r--r--target/linux/mediatek/patches-4.14/0101-reset-mediatek-add-reset-controller-dt-bindings-requ.patch6
-rw-r--r--target/linux/mediatek/patches-4.14/0102-soc-mediatek-pwrap-fixup-warnings-from-coding-style.patch11
-rw-r--r--target/linux/mediatek/patches-4.14/0104-usb-mtu3-support-option-to-disable-usb3-ports.patch21
-rw-r--r--target/linux/mediatek/patches-4.14/0105-usb-mtu3-remove-dummy-wakeup-debounce-clocks.patch13
-rw-r--r--target/linux/mediatek/patches-4.14/0106-usb-mtu3-add-optional-mcu-and-dma-bus-clocks.patch28
-rw-r--r--target/linux/mediatek/patches-4.14/0107-usb-mtu3-support-36-bit-DMA-address.patch29
-rw-r--r--target/linux/mediatek/patches-4.14/0108-usb-mtu3-use-FORCE-RG_IDDIG-to-implement-manual-DRD-.patch40
-rw-r--r--target/linux/mediatek/patches-4.14/0109-usb-mtu3-add-support-for-usb3.1-IP.patch33
-rw-r--r--target/linux/mediatek/patches-4.14/0110-usb-mtu3-get-optional-vbus-for-host-only-mode.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0112-usb-mtu3-set-otg_sel-for-u2port-only-if-works-as-dua.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0113-dt-bindings-usb-mtu3-add-a-optional-property-to-disa.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0114-dt-bindings-usb-mtu3-remove-dummy-clocks-and-add-opt.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0115-dt-bindings-usb-mtu3-remove-optional-pinctrls.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0116-dt-bindings-arm-mediatek-add-MT7622-string-to-the-PM.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0117-soc-mediatek-pwrap-add-pwrap_read32-for-reading-in-3.patch15
-rw-r--r--target/linux/mediatek/patches-4.14/0118-soc-mediatek-pwrap-add-pwrap_write32-for-writing-in-.patch11
-rw-r--r--target/linux/mediatek/patches-4.14/0119-soc-mediatek-pwrap-refactor-pwrap_init-for-the-vario.patch21
-rw-r--r--target/linux/mediatek/patches-4.14/0120-soc-mediatek-pwrap-add-MediaTek-MT6380-as-one-slave-.patch17
-rw-r--r--target/linux/mediatek/patches-4.14/0121-soc-mediatek-pwrap-add-common-way-for-setup-CS-timin.patch31
-rw-r--r--target/linux/mediatek/patches-4.14/0122-soc-mediatek-pwrap-add-support-for-MT7622-SoC.patch13
-rw-r--r--target/linux/mediatek/patches-4.14/0123-soc-mediatek-place-Kconfig-for-all-SoC-drivers-under.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0124-arm64-mediatek-cleanup-message-for-platform-selectio.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0125-phy-phy-mtk-tphy-add-set_mode-callback.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0126-usb-xhci-mtk-use-dma_set_mask_and_coherent-in-probe-.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0127-usb-xhci-mtk-use-ports-count-from-xhci-in-xhci_mtk_s.patch13
-rw-r--r--target/linux/mediatek/patches-4.14/0128-usb-xhci-mtk-check-clock-stability-of-U3_MAC.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0129-usb-xhci-mtk-support-option-to-disable-usb3-ports.patch17
-rw-r--r--target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch13
-rw-r--r--target/linux/mediatek/patches-4.14/0131-usb-xhci-mtk-add-optional-mcu-and-dma-bus-clocks.patch13
-rw-r--r--target/linux/mediatek/patches-4.14/0132-usb-host-modify-description-for-MTK-xHCI-config.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0133-dt-bindings-usb-mtk-xhci-add-a-optional-property-to-.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0134-dt-bindings-usb-mtk-xhci-remove-dummy-clocks-and-add.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0135-dt-bindings-mtd-add-new-compatible-strings-and-impro.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0136-mtd-mtk-nor-add-suspend-resume-support.patch15
-rw-r--r--target/linux/mediatek/patches-4.14/0137-dt-bindings-rtc-mediatek-add-bindings-for-MediaTek-S.patch6
-rw-r--r--target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch12
-rw-r--r--target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0140-mtd-nand-mtk-change-the-compile-sequence-of-mtk_nand.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0142-mmc-dt-bindings-Add-reg-source_cg-latch-ck-for-Media.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0143-mmc-mediatek-add-support-of-mt2701-mt2712.patch19
-rw-r--r--target/linux/mediatek/patches-4.14/0144-dt-bindings-ARM-Mediatek-Document-bindings-for-MT271.patch32
-rw-r--r--target/linux/mediatek/patches-4.14/0145-clk-mediatek-Add-dt-bindings-for-MT2712-clocks.patch6
-rw-r--r--target/linux/mediatek/patches-4.14/0146-clk-mediatek-Add-MT2712-clock-support.patch43
-rw-r--r--target/linux/mediatek/patches-4.14/0147-dt-bindings-clock-mediatek-document-clk-bindings-for.patch27
-rw-r--r--target/linux/mediatek/patches-4.14/0149-clk-mediatek-add-clocks-dt-bindings-required-header-.patch6
-rw-r--r--target/linux/mediatek/patches-4.14/0150-clk-mediatek-add-clock-support-for-MT7622-SoC.patch21
-rw-r--r--target/linux/mediatek/patches-4.14/0151-arm64-dts-mt8173-remove-mediatek-mt8135-mmc-from-mmc.patch13
-rw-r--r--target/linux/mediatek/patches-4.14/0152-mmc-mediatek-make-hs400_tune_response-only-for-mt817.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0153-mmc-mediatek-add-pad_tune0-support.patch39
-rw-r--r--target/linux/mediatek/patches-4.14/0154-mmc-mediatek-add-async-fifo-and-data-tune-support.patch19
-rw-r--r--target/linux/mediatek/patches-4.14/0155-mmc-mediatek-add-busy_check-support.patch15
-rw-r--r--target/linux/mediatek/patches-4.14/0156-mmc-mediatek-add-stop_clk-fix-and-enhance_rx-support.patch19
-rw-r--r--target/linux/mediatek/patches-4.14/0157-mmc-mediatek-add-support-of-source_cg-clock.patch15
-rw-r--r--target/linux/mediatek/patches-4.14/0158-mmc-mediatek-add-latch-ck-support.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0159-mmc-mediatek-improve-eMMC-hs400-mode-read-performanc.patch11
-rw-r--r--target/linux/mediatek/patches-4.14/0160-mmc-mediatek-perfer-to-use-rise-edge-latching-for-cm.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0161-pwm-mediatek-Add-MT2712-MT7622-support.patch15
-rw-r--r--target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0164-cpufreq-mediatek-add-mt2712-into-compatible-list.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0165-mtd-nand-mtk-update-DT-bindings.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0166-mtd-nand-mtk-Support-different-MTK-NAND-flash-contro.patch45
-rw-r--r--target/linux/mediatek/patches-4.14/0167-mtd-nand-mtk-Support-MT7622-NAND-flash-controller.patch17
-rw-r--r--target/linux/mediatek/patches-4.14/0168-mmc-dt-bindings-add-mmc-support-to-MT7623-SoC.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0169-dt-bindings-pinctrl-add-bindings-for-MediaTek-MT7622.patch6
-rw-r--r--target/linux/mediatek/patches-4.14/0170-pinctrl-mediatek-cleanup-for-placing-all-drivers-und.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0171-pinctrl-mediatek-add-pinctrl-driver-for-MT7622-SoC.patch17
-rw-r--r--target/linux/mediatek/patches-4.14/0172-clk-mediatek-group-drivers-under-indpendent-menu.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0173-clk-mediatek-fixup-test-building-of-MediaTek-clock-d.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0174-dt-bindings-net-mediatek-add-condition-to-property-m.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0175-net-mediatek-remove-superfluous-pin-setup-for-MT7622.patch12
-rw-r--r--target/linux/mediatek/patches-4.14/0176-clk-mediatek-Fix-all-warnings-for-missing-struct-clk.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0177-phy-phy-mtk-tphy-use-auto-instead-of-force-to-bypass.patch13
-rw-r--r--target/linux/mediatek/patches-4.14/0178-phy-phy-mtk-tphy-make-shared-banks-optional-for-V1-T.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0179-phy-phy-mtk-tphy-use-of_device_get_match_data.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0180-ASoC-mediatek-fix-error-handling-in-mt2701_afe_pcm_d.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0181-ASoC-mediatek-rework-clock-functions-for-MT2701.patch87
-rw-r--r--target/linux/mediatek/patches-4.14/0182-ASoC-mediatek-cleanup-audio-driver-for-MT2701.patch51
-rw-r--r--target/linux/mediatek/patches-4.14/0183-ASoC-mediatek-update-clock-related-properties-of-MT2.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0184-ASoC-mediatek-add-some-core-clocks-for-MT2701-AFE.patch13
-rw-r--r--target/linux/mediatek/patches-4.14/0185-ASoC-mediatek-modify-MT2701-AFE-driver-to-adapt-mfd-.patch21
-rw-r--r--target/linux/mediatek/patches-4.14/0186-ASoC-mediatek-update-MT2701-AFE-documentation-to-ada.patch87
-rw-r--r--target/linux/mediatek/patches-4.14/0187-usb-mtu3-fix-error-code-for-getting-extcon-device.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0188-usb-mtu3-supports-remote-wakeup-for-mt2712-with-two-.patch26
-rw-r--r--target/linux/mediatek/patches-4.14/0189-dt-bindings-usb-mtu3-update-USB-wakeup-properties.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0190-usb-xhci-mtk-supports-remote-wakeup-for-mt2712-with-.patch94
-rw-r--r--target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch27
-rw-r--r--target/linux/mediatek/patches-4.14/0192-dt-bindings-usb-mtk-xhci-update-USB-wakeup-propertie.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0193-clk-mediatek-adjust-dependency-of-reset.c-to-avoid-u.patch18
-rw-r--r--target/linux/mediatek/patches-4.14/0194-pinctrl-mediatek-mt7622-fix-potential-uninitialized-.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0195-pinctrl-mediatek-mt7622-align-error-handling-of-mtk_.patch11
-rw-r--r--target/linux/mediatek/patches-4.14/0196-mtd-mtk-nor-modify-functions-name-more-generally.patch23
-rw-r--r--target/linux/mediatek/patches-4.14/0197-hwrng-mediatek-Setup-default-RNG-quality.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0198-dt-bindings-thermal-add-binding-for-MT7622-SoC.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0199-thermal-mtk-Cleanup-unused-defines.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0200-thermal-mediatek-add-support-for-MT7622-SoC.patch11
-rw-r--r--target/linux/mediatek/patches-4.14/0201-dt-bindings-clock-mediatek-add-missing-required-rese.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0202-mmc-dt-bindings-add-support-for-MT7622-SoC.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0203-mmc-mediatek-add-support-for-MT7622-SoC.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0204-dt-bindings-dmaengine-Add-MediaTek-High-Speed-DMA-co.patch6
-rw-r--r--target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch18
-rw-r--r--target/linux/mediatek/patches-4.14/0206-dt-bindings-clock-mediatek-update-audsys-documentati.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0207-dt-bindings-clock-mediatek-add-audsys-support-for-MT.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0208-clk-mediatek-update-missing-clock-data-for-MT7622-au.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0209-clk-mediatek-add-devm_of_platform_populate-for-MT762.patch9
-rw-r--r--target/linux/mediatek/patches-4.14/0210-arm64-dts-mt7622-add-clock-controller-device-nodes.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0211-arm64-dts-mt7622-add-power-domain-controller-device-.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0212-arm64-dts-mt7622-add-pinctrl-related-device-nodes.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0213-arm64-dts-mt7622-add-PMIC-MT6380-related-nodes.patch10
-rw-r--r--target/linux/mediatek/patches-4.14/0214-arm64-dts-mt7622-add-cpufreq-related-device-nodes.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0215-arm64-dts-mt7622-turn-uart0-clock-to-real-ones.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0216-arm64-dts-mt7622-add-SoC-and-peripheral-related-devi.patch15
-rw-r--r--target/linux/mediatek/patches-4.14/0217-arm64-dts-mt7622-add-flash-related-device-nodes.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0218-arm64-dts-mt7622-add-ethernet-device-nodes.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0219-arm64-dts-mt7622-add-PCIe-device-nodes.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0220-arm64-dts-mt7622-add-SATA-device-nodes.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0221-arm64-dts-mt7622-add-usb-device-nodes.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0222-arm64-dts-mt7622-add-High-Speed-DMA-device-nodes.patch5
-rw-r--r--target/linux/mediatek/patches-4.14/0223-arm64-dts-mt7622-add-mmc-related-device-nodes.patch7
-rw-r--r--target/linux/mediatek/patches-4.14/0224-add-mt7622-defconfig-for-testing-these-new-drivers.patch6
121 files changed, 440 insertions, 1271 deletions
diff --git a/target/linux/mediatek/patches-4.14/0012-clk-dont-disable-unused-clocks.patch b/target/linux/mediatek/patches-4.14/0012-clk-dont-disable-unused-clocks.patch
index ed4111dce3..33ede7d3a6 100644
--- a/target/linux/mediatek/patches-4.14/0012-clk-dont-disable-unused-clocks.patch
+++ b/target/linux/mediatek/patches-4.14/0012-clk-dont-disable-unused-clocks.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
-@@ -796,7 +796,7 @@ unlock_out:
+@@ -797,7 +797,7 @@ unlock_out:
clk_core_disable_unprepare(core->parent);
}
diff --git a/target/linux/mediatek/patches-4.14/0101-reset-mediatek-add-reset-controller-dt-bindings-requ.patch b/target/linux/mediatek/patches-4.14/0101-reset-mediatek-add-reset-controller-dt-bindings-requ.patch
index 64f3107162..123af60118 100644
--- a/target/linux/mediatek/patches-4.14/0101-reset-mediatek-add-reset-controller-dt-bindings-requ.patch
+++ b/target/linux/mediatek/patches-4.14/0101-reset-mediatek-add-reset-controller-dt-bindings-requ.patch
@@ -15,9 +15,6 @@ Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 file changed, 94 insertions(+)
create mode 100644 include/dt-bindings/reset/mt7622-reset.h
-diff --git a/include/dt-bindings/reset/mt7622-reset.h b/include/dt-bindings/reset/mt7622-reset.h
-new file mode 100644
-index 000000000000..234052f80417
--- /dev/null
+++ b/include/dt-bindings/reset/mt7622-reset.h
@@ -0,0 +1,94 @@
@@ -115,6 +112,3 @@ index 000000000000..234052f80417
+#define MT7622_ETHSYS_PPE_RST 31
+
+#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7622 */
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0102-soc-mediatek-pwrap-fixup-warnings-from-coding-style.patch b/target/linux/mediatek/patches-4.14/0102-soc-mediatek-pwrap-fixup-warnings-from-coding-style.patch
index 408de3af9f..a66fa34934 100644
--- a/target/linux/mediatek/patches-4.14/0102-soc-mediatek-pwrap-fixup-warnings-from-coding-style.patch
+++ b/target/linux/mediatek/patches-4.14/0102-soc-mediatek-pwrap-fixup-warnings-from-coding-style.patch
@@ -13,11 +13,9 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index c2048382830f..f095faac1e04 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
-@@ -827,7 +827,8 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -827,7 +827,8 @@ static int pwrap_init_cipher(struct pmic
/* wait for cipher data ready@PMIC */
ret = pwrap_wait_for_state(wrp, pwrap_is_pmic_cipher_ready);
if (ret) {
@@ -27,7 +25,7 @@ index c2048382830f..f095faac1e04 100644
return ret;
}
-@@ -1159,23 +1160,27 @@ static int pwrap_probe(struct platform_device *pdev)
+@@ -1159,23 +1160,27 @@ static int pwrap_probe(struct platform_d
if (IS_ERR(wrp->bridge_base))
return PTR_ERR(wrp->bridge_base);
@@ -59,7 +57,7 @@ index c2048382830f..f095faac1e04 100644
return PTR_ERR(wrp->clk_wrap);
}
-@@ -1220,8 +1225,9 @@ static int pwrap_probe(struct platform_device *pdev)
+@@ -1220,8 +1225,9 @@ static int pwrap_probe(struct platform_d
pwrap_writel(wrp, wrp->master->int_en_all, PWRAP_INT_EN);
irq = platform_get_irq(pdev, 0);
@@ -71,6 +69,3 @@ index c2048382830f..f095faac1e04 100644
if (ret)
goto err_out2;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0104-usb-mtu3-support-option-to-disable-usb3-ports.patch b/target/linux/mediatek/patches-4.14/0104-usb-mtu3-support-option-to-disable-usb3-ports.patch
index 51b5bcffc5..4b72094fc7 100644
--- a/target/linux/mediatek/patches-4.14/0104-usb-mtu3-support-option-to-disable-usb3-ports.patch
+++ b/target/linux/mediatek/patches-4.14/0104-usb-mtu3-support-option-to-disable-usb3-ports.patch
@@ -15,8 +15,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 8 ++++++--
3 files changed, 22 insertions(+), 5 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index b26fffc58446..112723d6e7bc 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -210,6 +210,8 @@ struct otg_switch_mtk {
@@ -36,11 +34,9 @@ index b26fffc58446..112723d6e7bc 100644
struct dentry *dbgfs_root;
/* usb wakeup for host mode */
bool wakeup_en;
-diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
-index e42d308b8dc2..4dd9508a60b5 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
-@@ -151,6 +151,7 @@ int ssusb_host_enable(struct ssusb_mtk *ssusb)
+@@ -151,6 +151,7 @@ int ssusb_host_enable(struct ssusb_mtk *
void __iomem *ibase = ssusb->ippc_base;
int num_u3p = ssusb->u3_ports;
int num_u2p = ssusb->u2_ports;
@@ -48,7 +44,7 @@ index e42d308b8dc2..4dd9508a60b5 100644
u32 check_clk;
u32 value;
int i;
-@@ -158,8 +159,14 @@ int ssusb_host_enable(struct ssusb_mtk *ssusb)
+@@ -158,8 +159,14 @@ int ssusb_host_enable(struct ssusb_mtk *
/* power on host ip */
mtu3_clrbits(ibase, U3D_SSUSB_IP_PW_CTRL1, SSUSB_IP_HOST_PDN);
@@ -64,7 +60,7 @@ index e42d308b8dc2..4dd9508a60b5 100644
value = mtu3_readl(ibase, SSUSB_U3_CTRL(i));
value &= ~(SSUSB_U3_PORT_PDN | SSUSB_U3_PORT_DIS);
value |= SSUSB_U3_PORT_HOST_SEL;
-@@ -175,7 +182,7 @@ int ssusb_host_enable(struct ssusb_mtk *ssusb)
+@@ -175,7 +182,7 @@ int ssusb_host_enable(struct ssusb_mtk *
}
check_clk = SSUSB_XHCI_RST_B_STS;
@@ -73,7 +69,7 @@ index e42d308b8dc2..4dd9508a60b5 100644
check_clk = SSUSB_U3_MAC_RST_B_STS;
return ssusb_check_clocks(ssusb, check_clk);
-@@ -190,8 +197,11 @@ int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend)
+@@ -190,8 +197,11 @@ int ssusb_host_disable(struct ssusb_mtk
int ret;
int i;
@@ -86,11 +82,9 @@ index e42d308b8dc2..4dd9508a60b5 100644
value = mtu3_readl(ibase, SSUSB_U3_CTRL(i));
value |= SSUSB_U3_PORT_PDN;
value |= suspend ? 0 : SSUSB_U3_PORT_DIS;
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 088e3e685c4f..9edad30c8ae5 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -276,6 +276,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -276,6 +276,10 @@ static int get_ssusb_rscs(struct platfor
if (ret)
return ret;
@@ -101,7 +95,7 @@ index 088e3e685c4f..9edad30c8ae5 100644
if (ssusb->dr_mode != USB_DR_MODE_OTG)
return 0;
-@@ -304,8 +308,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -304,8 +308,8 @@ static int get_ssusb_rscs(struct platfor
}
}
@@ -112,6 +106,3 @@ index 088e3e685c4f..9edad30c8ae5 100644
return 0;
}
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0105-usb-mtu3-remove-dummy-wakeup-debounce-clocks.patch b/target/linux/mediatek/patches-4.14/0105-usb-mtu3-remove-dummy-wakeup-debounce-clocks.patch
index adf1cec90b..aaefc0e6eb 100644
--- a/target/linux/mediatek/patches-4.14/0105-usb-mtu3-remove-dummy-wakeup-debounce-clocks.patch
+++ b/target/linux/mediatek/patches-4.14/0105-usb-mtu3-remove-dummy-wakeup-debounce-clocks.patch
@@ -13,8 +13,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_host.c | 57 ++++----------------------------------------
2 files changed, 4 insertions(+), 57 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index 112723d6e7bc..6d3278e46431 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -214,8 +214,6 @@ struct otg_switch_mtk {
@@ -35,11 +33,9 @@ index 112723d6e7bc..6d3278e46431 100644
struct regmap *pericfg;
};
-diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
-index 4dd9508a60b5..edcc59148171 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
-@@ -79,20 +79,6 @@ int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb,
+@@ -79,20 +79,6 @@ int ssusb_wakeup_of_property_parse(struc
if (!ssusb->wakeup_en)
return 0;
@@ -60,7 +56,7 @@ index 4dd9508a60b5..edcc59148171 100644
ssusb->pericfg = syscon_regmap_lookup_by_phandle(dn,
"mediatek,syscon-wakeup");
if (IS_ERR(ssusb->pericfg)) {
-@@ -103,36 +89,6 @@ int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb,
+@@ -103,36 +89,6 @@ int ssusb_wakeup_of_property_parse(struc
return 0;
}
@@ -97,7 +93,7 @@ index 4dd9508a60b5..edcc59148171 100644
static void host_ports_num_get(struct ssusb_mtk *ssusb)
{
u32 xhci_cap;
-@@ -286,19 +242,14 @@ void ssusb_host_exit(struct ssusb_mtk *ssusb)
+@@ -286,19 +242,14 @@ void ssusb_host_exit(struct ssusb_mtk *s
int ssusb_wakeup_enable(struct ssusb_mtk *ssusb)
{
@@ -121,6 +117,3 @@ index 4dd9508a60b5..edcc59148171 100644
- ssusb_wakeup_clks_disable(ssusb);
- }
}
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0106-usb-mtu3-add-optional-mcu-and-dma-bus-clocks.patch b/target/linux/mediatek/patches-4.14/0106-usb-mtu3-add-optional-mcu-and-dma-bus-clocks.patch
index 93a8c65294..9b68caa367 100644
--- a/target/linux/mediatek/patches-4.14/0106-usb-mtu3-add-optional-mcu-and-dma-bus-clocks.patch
+++ b/target/linux/mediatek/patches-4.14/0106-usb-mtu3-add-optional-mcu-and-dma-bus-clocks.patch
@@ -13,8 +13,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 121 +++++++++++++++++++++++++++++--------------
2 files changed, 86 insertions(+), 40 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index 6d3278e46431..2795294ec92a 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -206,6 +206,9 @@ struct otg_switch_mtk {
@@ -36,11 +34,9 @@ index 6d3278e46431..2795294ec92a 100644
/* otg */
struct otg_switch_mtk otg_switch;
enum usb_dr_mode dr_mode;
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 9edad30c8ae5..fb8992011bde 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -110,15 +110,9 @@ static void ssusb_phy_power_off(struct ssusb_mtk *ssusb)
+@@ -110,15 +110,9 @@ static void ssusb_phy_power_off(struct s
phy_power_off(ssusb->phys[i]);
}
@@ -58,7 +54,7 @@ index 9edad30c8ae5..fb8992011bde 100644
ret = clk_prepare_enable(ssusb->sys_clk);
if (ret) {
-@@ -132,6 +126,52 @@ static int ssusb_rscs_init(struct ssusb_mtk *ssusb)
+@@ -132,6 +126,52 @@ static int ssusb_rscs_init(struct ssusb_
goto ref_clk_err;
}
@@ -111,7 +107,7 @@ index 9edad30c8ae5..fb8992011bde 100644
ret = ssusb_phy_init(ssusb);
if (ret) {
dev_err(ssusb->dev, "failed to init phy\n");
-@@ -149,20 +189,16 @@ static int ssusb_rscs_init(struct ssusb_mtk *ssusb)
+@@ -149,20 +189,16 @@ static int ssusb_rscs_init(struct ssusb_
phy_err:
ssusb_phy_exit(ssusb);
phy_init_err:
@@ -135,7 +131,7 @@ index 9edad30c8ae5..fb8992011bde 100644
regulator_disable(ssusb->vusb33);
ssusb_phy_power_off(ssusb);
ssusb_phy_exit(ssusb);
-@@ -203,6 +239,19 @@ static int get_iddig_pinctrl(struct ssusb_mtk *ssusb)
+@@ -203,6 +239,19 @@ static int get_iddig_pinctrl(struct ssus
return 0;
}
@@ -155,7 +151,7 @@ index 9edad30c8ae5..fb8992011bde 100644
static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
{
struct device_node *node = pdev->dev.of_node;
-@@ -225,18 +274,17 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -225,18 +274,17 @@ static int get_ssusb_rscs(struct platfor
return PTR_ERR(ssusb->sys_clk);
}
@@ -168,12 +164,13 @@ index 9edad30c8ae5..fb8992011bde 100644
- if (IS_ERR(ssusb->ref_clk)) {
- if (PTR_ERR(ssusb->ref_clk) == -EPROBE_DEFER)
- return -EPROBE_DEFER;
+-
+- ssusb->ref_clk = NULL;
+- }
+ ssusb->ref_clk = get_optional_clk(dev, "ref_ck");
+ if (IS_ERR(ssusb->ref_clk))
+ return PTR_ERR(ssusb->ref_clk);
-
-- ssusb->ref_clk = NULL;
-- }
++
+ ssusb->mcu_clk = get_optional_clk(dev, "mcu_ck");
+ if (IS_ERR(ssusb->mcu_clk))
+ return PTR_ERR(ssusb->mcu_clk);
@@ -184,7 +181,7 @@ index 9edad30c8ae5..fb8992011bde 100644
ssusb->num_phys = of_count_phandle_with_args(node,
"phys", "#phy-cells");
-@@ -451,8 +499,7 @@ static int __maybe_unused mtu3_suspend(struct device *dev)
+@@ -451,8 +499,7 @@ static int __maybe_unused mtu3_suspend(s
ssusb_host_disable(ssusb, true);
ssusb_phy_power_off(ssusb);
@@ -194,7 +191,7 @@ index 9edad30c8ae5..fb8992011bde 100644
ssusb_wakeup_enable(ssusb);
return 0;
-@@ -470,27 +517,21 @@ static int __maybe_unused mtu3_resume(struct device *dev)
+@@ -470,27 +517,21 @@ static int __maybe_unused mtu3_resume(st
return 0;
ssusb_wakeup_disable(ssusb);
@@ -228,6 +225,3 @@ index 9edad30c8ae5..fb8992011bde 100644
return ret;
}
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0107-usb-mtu3-support-36-bit-DMA-address.patch b/target/linux/mediatek/patches-4.14/0107-usb-mtu3-support-36-bit-DMA-address.patch
index 652116d0da..d2633c1ca8 100644
--- a/target/linux/mediatek/patches-4.14/0107-usb-mtu3-support-36-bit-DMA-address.patch
+++ b/target/linux/mediatek/patches-4.14/0107-usb-mtu3-support-36-bit-DMA-address.patch
@@ -16,8 +16,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_qmu.c | 102 +++++++++++++++++++++++++++++++++-------
4 files changed, 142 insertions(+), 21 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index 2795294ec92a..ef2dc92a2109 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -46,6 +46,9 @@ struct mtu3_request;
@@ -66,8 +64,6 @@ index 2795294ec92a..ef2dc92a2109 100644
__u8 ext_flag;
} __packed;
-diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
-index 947579842ad7..cd4528f5f337 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
@@ -17,6 +17,7 @@
@@ -78,7 +74,7 @@ index 947579842ad7..cd4528f5f337 100644
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_address.h>
-@@ -759,7 +760,31 @@ static void mtu3_hw_exit(struct mtu3 *mtu)
+@@ -759,7 +760,31 @@ static void mtu3_hw_exit(struct mtu3 *mt
mtu3_mem_free(mtu);
}
@@ -111,7 +107,7 @@ index 947579842ad7..cd4528f5f337 100644
int ssusb_gadget_init(struct ssusb_mtk *ssusb)
{
-@@ -820,6 +845,12 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
+@@ -820,6 +845,12 @@ int ssusb_gadget_init(struct ssusb_mtk *
return ret;
}
@@ -124,7 +120,7 @@ index 947579842ad7..cd4528f5f337 100644
ret = devm_request_irq(dev, mtu->irq, mtu3_irq, 0, dev_name(dev), mtu);
if (ret) {
dev_err(dev, "request irq %d failed!\n", mtu->irq);
-@@ -845,6 +876,7 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
+@@ -845,6 +876,7 @@ int ssusb_gadget_init(struct ssusb_mtk *
gadget_err:
device_init_wakeup(dev, false);
@@ -132,8 +128,6 @@ index 947579842ad7..cd4528f5f337 100644
irq_err:
mtu3_hw_exit(mtu);
ssusb->u3d = NULL;
-diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h
-index 06b29664470f..b6059752dc12 100644
--- a/drivers/usb/mtu3/mtu3_hw_regs.h
+++ b/drivers/usb/mtu3/mtu3_hw_regs.h
@@ -58,6 +58,8 @@
@@ -167,8 +161,6 @@ index 06b29664470f..b6059752dc12 100644
#define VBUS_ON BIT(1)
#define VBUS_FRC_EN BIT(0)
-diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c
-index 7d9ba8a52368..42145a3f1422 100644
--- a/drivers/usb/mtu3/mtu3_qmu.c
+++ b/drivers/usb/mtu3/mtu3_qmu.c
@@ -40,7 +40,58 @@
@@ -230,7 +222,7 @@ index 7d9ba8a52368..42145a3f1422 100644
static struct qmu_gpd *gpd_dma_to_virt(struct mtu3_gpd_ring *ring,
dma_addr_t dma_addr)
-@@ -193,21 +244,27 @@ static int mtu3_prepare_tx_gpd(struct mtu3_ep *mep, struct mtu3_request *mreq)
+@@ -193,21 +244,27 @@ static int mtu3_prepare_tx_gpd(struct mt
struct mtu3_gpd_ring *ring = &mep->gpd_ring;
struct qmu_gpd *gpd = ring->enqueue;
struct usb_request *req = &mreq->request;
@@ -262,7 +254,7 @@ index 7d9ba8a52368..42145a3f1422 100644
if (req->zero)
gpd->ext_flag |= GPD_EXT_FLAG_ZLP;
-@@ -226,21 +283,27 @@ static int mtu3_prepare_rx_gpd(struct mtu3_ep *mep, struct mtu3_request *mreq)
+@@ -226,21 +283,27 @@ static int mtu3_prepare_rx_gpd(struct mt
struct mtu3_gpd_ring *ring = &mep->gpd_ring;
struct qmu_gpd *gpd = ring->enqueue;
struct usb_request *req = &mreq->request;
@@ -316,7 +308,7 @@ index 7d9ba8a52368..42145a3f1422 100644
mtu3_setbits(mbase, U3D_QCR0, QMU_RX_CS_EN(epnum));
/* don't expect ZLP */
mtu3_clrbits(mbase, U3D_QCR3, QMU_RX_ZLP(epnum));
-@@ -353,9 +416,9 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum)
+@@ -353,9 +416,9 @@ static void qmu_tx_zlp_error_handler(str
struct mtu3_gpd_ring *ring = &mep->gpd_ring;
void __iomem *mbase = mtu->mac_base;
struct qmu_gpd *gpd_current = NULL;
@@ -327,7 +319,7 @@ index 7d9ba8a52368..42145a3f1422 100644
u32 txcsr = 0;
int ret;
-@@ -365,7 +428,8 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum)
+@@ -365,7 +428,8 @@ static void qmu_tx_zlp_error_handler(str
else
return;
@@ -337,7 +329,7 @@ index 7d9ba8a52368..42145a3f1422 100644
if (le16_to_cpu(gpd_current->buf_len) != 0) {
dev_err(mtu->dev, "TX EP%d buffer length error(!=0)\n", epnum);
-@@ -408,12 +472,13 @@ static void qmu_done_tx(struct mtu3 *mtu, u8 epnum)
+@@ -408,12 +472,13 @@ static void qmu_done_tx(struct mtu3 *mtu
void __iomem *mbase = mtu->mac_base;
struct qmu_gpd *gpd = ring->dequeue;
struct qmu_gpd *gpd_current = NULL;
@@ -353,7 +345,7 @@ index 7d9ba8a52368..42145a3f1422 100644
dev_dbg(mtu->dev, "%s EP%d, last=%p, current=%p, enq=%p\n",
__func__, epnum, gpd, gpd_current, ring->enqueue);
-@@ -446,11 +511,12 @@ static void qmu_done_rx(struct mtu3 *mtu, u8 epnum)
+@@ -446,11 +511,12 @@ static void qmu_done_rx(struct mtu3 *mtu
void __iomem *mbase = mtu->mac_base;
struct qmu_gpd *gpd = ring->dequeue;
struct qmu_gpd *gpd_current = NULL;
@@ -368,6 +360,3 @@ index 7d9ba8a52368..42145a3f1422 100644
dev_dbg(mtu->dev, "%s EP%d, last=%p, current=%p, enq=%p\n",
__func__, epnum, gpd, gpd_current, ring->enqueue);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0108-usb-mtu3-use-FORCE-RG_IDDIG-to-implement-manual-DRD-.patch b/target/linux/mediatek/patches-4.14/0108-usb-mtu3-use-FORCE-RG_IDDIG-to-implement-manual-DRD-.patch
index ce454feb23..6ff80e446f 100644
--- a/target/linux/mediatek/patches-4.14/0108-usb-mtu3-use-FORCE-RG_IDDIG-to-implement-manual-DRD-.patch
+++ b/target/linux/mediatek/patches-4.14/0108-usb-mtu3-use-FORCE-RG_IDDIG-to-implement-manual-DRD-.patch
@@ -19,8 +19,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 38 ++-----------------------
6 files changed, 74 insertions(+), 56 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index ef2dc92a2109..b0c2b5dca045 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -115,6 +115,19 @@ enum mtu3_g_ep0_state {
@@ -62,11 +60,9 @@ index ef2dc92a2109..b0c2b5dca045 100644
bool manual_drd_enabled;
};
-diff --git a/drivers/usb/mtu3/mtu3_dr.c b/drivers/usb/mtu3/mtu3_dr.c
-index 560256115b23..ec442cd5a1ad 100644
--- a/drivers/usb/mtu3/mtu3_dr.c
+++ b/drivers/usb/mtu3/mtu3_dr.c
-@@ -261,21 +261,22 @@ static void extcon_register_dwork(struct work_struct *work)
+@@ -261,21 +261,22 @@ static void extcon_register_dwork(struct
* depending on user input.
* This is useful in special cases, such as uses TYPE-A receptacle but also
* wants to support dual-role mode.
@@ -97,7 +93,7 @@ index 560256115b23..ec442cd5a1ad 100644
static int ssusb_mode_show(struct seq_file *sf, void *unused)
{
struct ssusb_mtk *ssusb = sf->private;
-@@ -388,17 +389,45 @@ static void ssusb_debugfs_exit(struct ssusb_mtk *ssusb)
+@@ -388,17 +389,45 @@ static void ssusb_debugfs_exit(struct ss
debugfs_remove_recursive(ssusb->dbgfs_root);
}
@@ -133,13 +129,12 @@ index 560256115b23..ec442cd5a1ad 100644
- if (otg_sx->manual_drd_enabled)
+ if (otg_sx->manual_drd_enabled) {
ssusb_debugfs_init(ssusb);
--
-- /* It is enough to delay 1s for waiting for host initialization */
-- schedule_delayed_work(&otg_sx->extcon_reg_dwork, HZ);
+ } else {
+ INIT_DELAYED_WORK(&otg_sx->extcon_reg_dwork,
+ extcon_register_dwork);
-+
+
+- /* It is enough to delay 1s for waiting for host initialization */
+- schedule_delayed_work(&otg_sx->extcon_reg_dwork, HZ);
+ /*
+ * It is enough to delay 1s for waiting for
+ * host initialization
@@ -149,7 +144,7 @@ index 560256115b23..ec442cd5a1ad 100644
return 0;
}
-@@ -407,8 +436,8 @@ void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb)
+@@ -407,8 +436,8 @@ void ssusb_otg_switch_exit(struct ssusb_
{
struct otg_switch_mtk *otg_sx = &ssusb->otg_switch;
@@ -160,11 +155,9 @@ index 560256115b23..ec442cd5a1ad 100644
+ else
+ cancel_delayed_work(&otg_sx->extcon_reg_dwork);
}
-diff --git a/drivers/usb/mtu3/mtu3_dr.h b/drivers/usb/mtu3/mtu3_dr.h
-index 9b228b5811b0..0f0cbac00192 100644
--- a/drivers/usb/mtu3/mtu3_dr.h
+++ b/drivers/usb/mtu3/mtu3_dr.h
-@@ -87,6 +87,8 @@ static inline void ssusb_gadget_exit(struct ssusb_mtk *ssusb)
+@@ -87,6 +87,8 @@ static inline void ssusb_gadget_exit(str
int ssusb_otg_switch_init(struct ssusb_mtk *ssusb);
void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb);
int ssusb_set_vbus(struct otg_switch_mtk *otg_sx, int is_on);
@@ -173,7 +166,7 @@ index 9b228b5811b0..0f0cbac00192 100644
#else
-@@ -103,6 +105,10 @@ static inline int ssusb_set_vbus(struct otg_switch_mtk *otg_sx, int is_on)
+@@ -103,6 +105,10 @@ static inline int ssusb_set_vbus(struct
return 0;
}
@@ -184,11 +177,9 @@ index 9b228b5811b0..0f0cbac00192 100644
#endif
#endif /* _MTU3_DR_H_ */
-diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
-index edcc59148171..ec76b86dd887 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
-@@ -189,6 +189,8 @@ int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend)
+@@ -189,6 +189,8 @@ int ssusb_host_disable(struct ssusb_mtk
static void ssusb_host_setup(struct ssusb_mtk *ssusb)
{
@@ -197,7 +188,7 @@ index edcc59148171..ec76b86dd887 100644
host_ports_num_get(ssusb);
/*
-@@ -197,6 +199,9 @@ static void ssusb_host_setup(struct ssusb_mtk *ssusb)
+@@ -197,6 +199,9 @@ static void ssusb_host_setup(struct ssus
*/
ssusb_host_enable(ssusb);
@@ -207,8 +198,6 @@ index edcc59148171..ec76b86dd887 100644
/* if port0 supports dual-role, works as host mode by default */
ssusb_set_vbus(&ssusb->otg_switch, 1);
}
-diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h
-index b6059752dc12..a7e35f6ad90a 100644
--- a/drivers/usb/mtu3/mtu3_hw_regs.h
+++ b/drivers/usb/mtu3/mtu3_hw_regs.h
@@ -472,6 +472,8 @@
@@ -220,8 +209,6 @@ index b6059752dc12..a7e35f6ad90a 100644
#define SSUSB_U2_PORT_VBUSVALID BIT(9)
#define SSUSB_U2_PORT_OTG_SEL BIT(7)
#define SSUSB_U2_PORT_HOST BIT(2)
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index fb8992011bde..1e473b068650 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -21,7 +21,6 @@
@@ -232,7 +219,7 @@ index fb8992011bde..1e473b068650 100644
#include <linux/platform_device.h>
#include "mtu3.h"
-@@ -212,33 +211,6 @@ static void ssusb_ip_sw_reset(struct ssusb_mtk *ssusb)
+@@ -212,33 +211,6 @@ static void ssusb_ip_sw_reset(struct ssu
mtu3_clrbits(ssusb->ippc_base, U3D_SSUSB_IP_PW_CTRL0, SSUSB_IP_SW_RST);
}
@@ -266,7 +253,7 @@ index fb8992011bde..1e473b068650 100644
/* ignore the error if the clock does not exist */
static struct clk *get_optional_clk(struct device *dev, const char *id)
{
-@@ -349,15 +321,11 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -349,15 +321,11 @@ static int get_ssusb_rscs(struct platfor
dev_err(ssusb->dev, "couldn't get extcon device\n");
return -EPROBE_DEFER;
}
@@ -285,6 +272,3 @@ index fb8992011bde..1e473b068650 100644
return 0;
}
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0109-usb-mtu3-add-support-for-usb3.1-IP.patch b/target/linux/mediatek/patches-4.14/0109-usb-mtu3-add-support-for-usb3.1-IP.patch
index 020dabf782..c17a77be5c 100644
--- a/target/linux/mediatek/patches-4.14/0109-usb-mtu3-add-support-for-usb3.1-IP.patch
+++ b/target/linux/mediatek/patches-4.14/0109-usb-mtu3-add-support-for-usb3.1-IP.patch
@@ -15,8 +15,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_hw_regs.h | 1 +
5 files changed, 23 insertions(+), 12 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index b0c2b5dca045..d80e4e813248 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -94,6 +94,7 @@ enum mtu3_speed {
@@ -27,11 +25,9 @@ index b0c2b5dca045..d80e4e813248 100644
};
/**
-diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
-index cd4528f5f337..67f7a309aba7 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
-@@ -237,7 +237,7 @@ void mtu3_ep_stall_set(struct mtu3_ep *mep, bool set)
+@@ -237,7 +237,7 @@ void mtu3_ep_stall_set(struct mtu3_ep *m
void mtu3_dev_on_off(struct mtu3 *mtu, int is_on)
{
@@ -40,7 +36,7 @@ index cd4528f5f337..67f7a309aba7 100644
mtu3_ss_func_set(mtu, is_on);
else
mtu3_hs_softconn_set(mtu, is_on);
-@@ -547,6 +547,9 @@ static void mtu3_set_speed(struct mtu3 *mtu)
+@@ -547,6 +547,9 @@ static void mtu3_set_speed(struct mtu3 *
mtu3_clrbits(mbase, U3D_USB3_CONFIG, USB3_EN);
/* HS/FS detected by HW */
mtu3_setbits(mbase, U3D_POWER_MANAGEMENT, HS_ENABLE);
@@ -50,7 +46,7 @@ index cd4528f5f337..67f7a309aba7 100644
}
dev_info(mtu->dev, "max_speed: %s\n",
-@@ -624,6 +627,10 @@ static irqreturn_t mtu3_link_isr(struct mtu3 *mtu)
+@@ -624,6 +627,10 @@ static irqreturn_t mtu3_link_isr(struct
udev_speed = USB_SPEED_SUPER;
maxpkt = 512;
break;
@@ -61,7 +57,7 @@ index cd4528f5f337..67f7a309aba7 100644
default:
udev_speed = USB_SPEED_UNKNOWN;
break;
-@@ -825,14 +832,15 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb)
+@@ -825,14 +832,15 @@ int ssusb_gadget_init(struct ssusb_mtk *
case USB_SPEED_FULL:
case USB_SPEED_HIGH:
case USB_SPEED_SUPER:
@@ -79,11 +75,9 @@ index cd4528f5f337..67f7a309aba7 100644
break;
}
-diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c
-index 434fca58143c..b495471f689f 100644
--- a/drivers/usb/mtu3/mtu3_gadget.c
+++ b/drivers/usb/mtu3/mtu3_gadget.c
-@@ -89,6 +89,7 @@ static int mtu3_ep_enable(struct mtu3_ep *mep)
+@@ -89,6 +89,7 @@ static int mtu3_ep_enable(struct mtu3_ep
switch (mtu->g.speed) {
case USB_SPEED_SUPER:
@@ -91,7 +85,7 @@ index 434fca58143c..b495471f689f 100644
if (usb_endpoint_xfer_int(desc) ||
usb_endpoint_xfer_isoc(desc)) {
interval = desc->bInterval;
-@@ -456,7 +457,7 @@ static int mtu3_gadget_wakeup(struct usb_gadget *gadget)
+@@ -456,7 +457,7 @@ static int mtu3_gadget_wakeup(struct usb
return -EOPNOTSUPP;
spin_lock_irqsave(&mtu->lock, flags);
@@ -100,11 +94,9 @@ index 434fca58143c..b495471f689f 100644
mtu3_setbits(mtu->mac_base, U3D_LINK_POWER_CONTROL, UX_EXIT);
} else {
mtu3_setbits(mtu->mac_base, U3D_POWER_MANAGEMENT, RESUME);
-diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c
-index 958d74dd2b78..020b25314a68 100644
--- a/drivers/usb/mtu3/mtu3_gadget_ep0.c
+++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c
-@@ -212,8 +212,8 @@ ep0_get_status(struct mtu3 *mtu, const struct usb_ctrlrequest *setup)
+@@ -212,8 +212,8 @@ ep0_get_status(struct mtu3 *mtu, const s
case USB_RECIP_DEVICE:
result[0] = mtu->is_self_powered << USB_DEVICE_SELF_POWERED;
result[0] |= mtu->may_wakeup << USB_DEVICE_REMOTE_WAKEUP;
@@ -115,7 +107,7 @@ index 958d74dd2b78..020b25314a68 100644
result[0] |= mtu->u1_enable << USB_DEV_STAT_U1_ENABLED;
result[0] |= mtu->u2_enable << USB_DEV_STAT_U2_ENABLED;
}
-@@ -329,8 +329,8 @@ static int ep0_handle_feature_dev(struct mtu3 *mtu,
+@@ -329,8 +329,8 @@ static int ep0_handle_feature_dev(struct
handled = handle_test_mode(mtu, setup);
break;
case USB_DEVICE_U1_ENABLE:
@@ -126,7 +118,7 @@ index 958d74dd2b78..020b25314a68 100644
break;
lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL);
-@@ -344,8 +344,8 @@ static int ep0_handle_feature_dev(struct mtu3 *mtu,
+@@ -344,8 +344,8 @@ static int ep0_handle_feature_dev(struct
handled = 1;
break;
case USB_DEVICE_U2_ENABLE:
@@ -137,7 +129,7 @@ index 958d74dd2b78..020b25314a68 100644
break;
lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL);
-@@ -384,8 +384,8 @@ static int ep0_handle_feature(struct mtu3 *mtu,
+@@ -384,8 +384,8 @@ static int ep0_handle_feature(struct mtu
break;
case USB_RECIP_INTERFACE:
/* superspeed only */
@@ -148,8 +140,6 @@ index 958d74dd2b78..020b25314a68 100644
/*
* forward the request because function drivers
* should handle it
-diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h
-index a7e35f6ad90a..6953436a1688 100644
--- a/drivers/usb/mtu3/mtu3_hw_regs.h
+++ b/drivers/usb/mtu3/mtu3_hw_regs.h
@@ -467,6 +467,7 @@
@@ -160,6 +150,3 @@ index a7e35f6ad90a..6953436a1688 100644
#define SSUSB_U3_PORT_HOST_SEL BIT(2)
#define SSUSB_U3_PORT_PDN BIT(1)
#define SSUSB_U3_PORT_DIS BIT(0)
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0110-usb-mtu3-get-optional-vbus-for-host-only-mode.patch b/target/linux/mediatek/patches-4.14/0110-usb-mtu3-get-optional-vbus-for-host-only-mode.patch
index d55fe7dbe2..4bd367d80b 100644
--- a/target/linux/mediatek/patches-4.14/0110-usb-mtu3-get-optional-vbus-for-host-only-mode.patch
+++ b/target/linux/mediatek/patches-4.14/0110-usb-mtu3-get-optional-vbus-for-host-only-mode.patch
@@ -14,11 +14,9 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 1e473b068650..7ca81f4e78a3 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -300,10 +300,6 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -300,10 +300,6 @@ static int get_ssusb_rscs(struct platfor
of_property_read_u32(node, "mediatek,u3p-dis-msk",
&ssusb->u3p_dis_msk);
@@ -29,7 +27,7 @@ index 1e473b068650..7ca81f4e78a3 100644
vbus = devm_regulator_get(&pdev->dev, "vbus");
if (IS_ERR(vbus)) {
dev_err(dev, "failed to get vbus\n");
-@@ -311,6 +307,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -311,6 +307,10 @@ static int get_ssusb_rscs(struct platfor
}
otg_sx->vbus = vbus;
@@ -40,6 +38,3 @@ index 1e473b068650..7ca81f4e78a3 100644
otg_sx->is_u3_drd = of_property_read_bool(node, "mediatek,usb3-drd");
otg_sx->manual_drd_enabled =
of_property_read_bool(node, "enable-manual-drd");
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch b/target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch
index 1c23d15eca..c7d94aa7fd 100644
--- a/target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch
+++ b/target/linux/mediatek/patches-4.14/0111-usb-mtu3-set-invalid-dr_mode-as-dual-role-mode.patch
@@ -12,11 +12,9 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 7ca81f4e78a3..9ff33579b42e 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platfor
return PTR_ERR(ssusb->ippc_base);
ssusb->dr_mode = usb_get_dr_mode(dev);
@@ -29,6 +27,3 @@ index 7ca81f4e78a3..9ff33579b42e 100644
if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL)
return 0;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0112-usb-mtu3-set-otg_sel-for-u2port-only-if-works-as-dua.patch b/target/linux/mediatek/patches-4.14/0112-usb-mtu3-set-otg_sel-for-u2port-only-if-works-as-dua.patch
index 3a74fe534f..a1be0e20f3 100644
--- a/target/linux/mediatek/patches-4.14/0112-usb-mtu3-set-otg_sel-for-u2port-only-if-works-as-dua.patch
+++ b/target/linux/mediatek/patches-4.14/0112-usb-mtu3-set-otg_sel-for-u2port-only-if-works-as-dua.patch
@@ -17,11 +17,9 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_core.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
-index 67f7a309aba7..7c149a7da14e 100644
--- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c
-@@ -115,7 +115,9 @@ static int mtu3_device_enable(struct mtu3 *mtu)
+@@ -115,7 +115,9 @@ static int mtu3_device_enable(struct mtu
mtu3_clrbits(ibase, SSUSB_U2_CTRL(0),
(SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN |
SSUSB_U2_PORT_HOST_SEL));
@@ -32,7 +30,7 @@ index 67f7a309aba7..7c149a7da14e 100644
return ssusb_check_clocks(mtu->ssusb, check_clk);
}
-@@ -130,7 +132,10 @@ static void mtu3_device_disable(struct mtu3 *mtu)
+@@ -130,7 +132,10 @@ static void mtu3_device_disable(struct m
mtu3_setbits(ibase, SSUSB_U2_CTRL(0),
SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN);
@@ -44,6 +42,3 @@ index 67f7a309aba7..7c149a7da14e 100644
mtu3_setbits(ibase, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN);
}
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0113-dt-bindings-usb-mtu3-add-a-optional-property-to-disa.patch b/target/linux/mediatek/patches-4.14/0113-dt-bindings-usb-mtu3-add-a-optional-property-to-disa.patch
index c45f7d2e1c..21d65e565d 100644
--- a/target/linux/mediatek/patches-4.14/0113-dt-bindings-usb-mtu3-add-a-optional-property-to-disa.patch
+++ b/target/linux/mediatek/patches-4.14/0113-dt-bindings-usb-mtu3-add-a-optional-property-to-disa.patch
@@ -12,8 +12,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
-index 49f54767cd21..7c611d14a0a0 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -44,6 +44,8 @@ Optional properties:
@@ -25,6 +23,3 @@ index 49f54767cd21..7c611d14a0a0 100644
Sub-nodes:
The xhci should be added as subnode to mtu3 as shown in the following example
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0114-dt-bindings-usb-mtu3-remove-dummy-clocks-and-add-opt.patch b/target/linux/mediatek/patches-4.14/0114-dt-bindings-usb-mtu3-remove-dummy-clocks-and-add-opt.patch
index 71e44b31f6..c52de97c16 100644
--- a/target/linux/mediatek/patches-4.14/0114-dt-bindings-usb-mtu3-remove-dummy-clocks-and-add-opt.patch
+++ b/target/linux/mediatek/patches-4.14/0114-dt-bindings-usb-mtu3-remove-dummy-clocks-and-add-opt.patch
@@ -13,8 +13,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
-index 7c611d14a0a0..49c982bb5bfc 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -14,9 +14,9 @@ Required properties:
@@ -41,6 +39,3 @@ index 7c611d14a0a0..49c982bb5bfc 100644
vusb33-supply = <&mt6397_vusb_reg>;
vbus-supply = <&usb_p0_vbus>;
extcon = <&extcon_usb>;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0115-dt-bindings-usb-mtu3-remove-optional-pinctrls.patch b/target/linux/mediatek/patches-4.14/0115-dt-bindings-usb-mtu3-remove-optional-pinctrls.patch
index ea5cf5f8af..f1f083ddb9 100644
--- a/target/linux/mediatek/patches-4.14/0115-dt-bindings-usb-mtu3-remove-optional-pinctrls.patch
+++ b/target/linux/mediatek/patches-4.14/0115-dt-bindings-usb-mtu3-remove-optional-pinctrls.patch
@@ -12,8 +12,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
-index 49c982bb5bfc..b2271d8e6b50 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -30,9 +30,10 @@ Optional properties:
@@ -30,6 +28,3 @@ index 49c982bb5bfc..b2271d8e6b50 100644
- pinctrl-0 : pin control group
See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0116-dt-bindings-arm-mediatek-add-MT7622-string-to-the-PM.patch b/target/linux/mediatek/patches-4.14/0116-dt-bindings-arm-mediatek-add-MT7622-string-to-the-PM.patch
index 540c1273a4..919e6af8c8 100644
--- a/target/linux/mediatek/patches-4.14/0116-dt-bindings-arm-mediatek-add-MT7622-string-to-the-PM.patch
+++ b/target/linux/mediatek/patches-4.14/0116-dt-bindings-arm-mediatek-add-MT7622-string-to-the-PM.patch
@@ -12,8 +12,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
-diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
-index 107700d00df4..bf80e3f96f8c 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
@@ -19,6 +19,7 @@ IP Pairing
@@ -24,7 +22,7 @@ index 107700d00df4..bf80e3f96f8c 100644
"mediatek,mt8135-pwrap" for MT8135 SoCs
"mediatek,mt8173-pwrap" for MT8173 SoCs
- interrupts: IRQ for pwrap in SOC
-@@ -36,9 +37,12 @@ Required properties in pwrap device node.
+@@ -36,9 +37,12 @@ Required properties in pwrap device node
- clocks: Must contain an entry for each entry in clock-names.
Optional properities:
@@ -38,6 +36,3 @@ index 107700d00df4..bf80e3f96f8c 100644
Example:
pwrap: pwrap@1000f000 {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0117-soc-mediatek-pwrap-add-pwrap_read32-for-reading-in-3.patch b/target/linux/mediatek/patches-4.14/0117-soc-mediatek-pwrap-add-pwrap_read32-for-reading-in-3.patch
index c178ddca7a..ce0b0fe473 100644
--- a/target/linux/mediatek/patches-4.14/0117-soc-mediatek-pwrap-add-pwrap_read32-for-reading-in-3.patch
+++ b/target/linux/mediatek/patches-4.14/0117-soc-mediatek-pwrap-add-pwrap_read32-for-reading-in-3.patch
@@ -18,8 +18,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 55 +++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index f095faac1e04..06930e2ebe4c 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -487,6 +487,7 @@ static int mt8135_regs[] = {
@@ -47,7 +45,7 @@ index f095faac1e04..06930e2ebe4c 100644
};
struct pmic_wrapper {
-@@ -609,7 +617,7 @@ static int pwrap_write(struct pmic_wrapper *wrp, u32 adr, u32 wdata)
+@@ -609,7 +617,7 @@ static int pwrap_write(struct pmic_wrapp
return 0;
}
@@ -56,7 +54,7 @@ index f095faac1e04..06930e2ebe4c 100644
{
int ret;
-@@ -632,6 +640,39 @@ static int pwrap_read(struct pmic_wrapper *wrp, u32 adr, u32 *rdata)
+@@ -632,6 +640,39 @@ static int pwrap_read(struct pmic_wrappe
return 0;
}
@@ -96,7 +94,7 @@ index f095faac1e04..06930e2ebe4c 100644
static int pwrap_regmap_read(void *context, u32 adr, u32 *rdata)
{
return pwrap_read(context, adr, rdata);
-@@ -752,6 +793,8 @@ static int pwrap_mt2701_init_reg_clock(struct pmic_wrapper *wrp)
+@@ -752,6 +793,8 @@ static int pwrap_mt2701_init_reg_clock(s
pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_START);
pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_END);
break;
@@ -105,7 +103,7 @@ index f095faac1e04..06930e2ebe4c 100644
}
return 0;
-@@ -815,6 +858,8 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -815,6 +858,8 @@ static int pwrap_init_cipher(struct pmic
pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_EN],
0x1);
break;
@@ -114,7 +112,7 @@ index f095faac1e04..06930e2ebe4c 100644
}
/* wait for cipher data ready@AP */
-@@ -1036,11 +1081,19 @@ static const struct regmap_config pwrap_regmap_config = {
+@@ -1036,11 +1081,19 @@ static const struct regmap_config pwrap_
static const struct pwrap_slv_type pmic_mt6323 = {
.dew_regs = mt6323_regs,
.type = PMIC_MT6323,
@@ -134,6 +132,3 @@ index f095faac1e04..06930e2ebe4c 100644
};
static const struct of_device_id of_slave_match_tbl[] = {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0118-soc-mediatek-pwrap-add-pwrap_write32-for-writing-in-.patch b/target/linux/mediatek/patches-4.14/0118-soc-mediatek-pwrap-add-pwrap_write32-for-writing-in-.patch
index 6048d6e40b..0fb60f37bb 100644
--- a/target/linux/mediatek/patches-4.14/0118-soc-mediatek-pwrap-add-pwrap_write32-for-writing-in-.patch
+++ b/target/linux/mediatek/patches-4.14/0118-soc-mediatek-pwrap-add-pwrap_write32-for-writing-in-.patch
@@ -18,8 +18,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 70 +++++++++++++++++++++++++++---------
1 file changed, 54 insertions(+), 16 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index 06930e2ebe4c..2d3a8faae124 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -507,6 +507,7 @@ struct pwrap_slv_type {
@@ -30,7 +28,7 @@ index 06930e2ebe4c..2d3a8faae124 100644
};
struct pmic_wrapper {
-@@ -601,22 +602,6 @@ static int pwrap_wait_for_state(struct pmic_wrapper *wrp,
+@@ -601,22 +602,6 @@ static int pwrap_wait_for_state(struct p
} while (1);
}
@@ -53,7 +51,7 @@ index 06930e2ebe4c..2d3a8faae124 100644
static int pwrap_read16(struct pmic_wrapper *wrp, u32 adr, u32 *rdata)
{
int ret;
-@@ -673,6 +658,56 @@ static int pwrap_read(struct pmic_wrapper *wrp, u32 adr, u32 *rdata)
+@@ -673,6 +658,56 @@ static int pwrap_read(struct pmic_wrappe
return wrp->slave->pwrap_read(wrp, adr, rdata);
}
@@ -110,7 +108,7 @@ index 06930e2ebe4c..2d3a8faae124 100644
static int pwrap_regmap_read(void *context, u32 adr, u32 *rdata)
{
return pwrap_read(context, adr, rdata);
-@@ -1082,18 +1117,21 @@ static const struct pwrap_slv_type pmic_mt6323 = {
+@@ -1082,18 +1117,21 @@ static const struct pwrap_slv_type pmic_
.dew_regs = mt6323_regs,
.type = PMIC_MT6323,
.pwrap_read = pwrap_read16,
@@ -132,6 +130,3 @@ index 06930e2ebe4c..2d3a8faae124 100644
};
static const struct of_device_id of_slave_match_tbl[] = {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0119-soc-mediatek-pwrap-refactor-pwrap_init-for-the-vario.patch b/target/linux/mediatek/patches-4.14/0119-soc-mediatek-pwrap-refactor-pwrap_init-for-the-vario.patch
index c730fb1eec..a9f720c90a 100644
--- a/target/linux/mediatek/patches-4.14/0119-soc-mediatek-pwrap-refactor-pwrap_init-for-the-vario.patch
+++ b/target/linux/mediatek/patches-4.14/0119-soc-mediatek-pwrap-refactor-pwrap_init-for-the-vario.patch
@@ -19,8 +19,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 130 ++++++++++++++++++++++++-----------
1 file changed, 90 insertions(+), 40 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index 2d3a8faae124..e3398e37a7a6 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -70,6 +70,12 @@
@@ -45,7 +43,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
/*
* pwrap operations are highly associated with the PMIC types,
* so the pointers added increases flexibility allowing determination
-@@ -787,6 +795,37 @@ static int pwrap_init_sidly(struct pmic_wrapper *wrp)
+@@ -787,6 +795,37 @@ static int pwrap_init_sidly(struct pmic_
return 0;
}
@@ -83,7 +81,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
static int pwrap_mt8135_init_reg_clock(struct pmic_wrapper *wrp)
{
pwrap_writel(wrp, 0x4, PWRAP_CSHEXT);
-@@ -935,6 +974,30 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -935,6 +974,30 @@ static int pwrap_init_cipher(struct pmic
return 0;
}
@@ -114,7 +112,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
static int pwrap_mt8135_init_soc_specific(struct pmic_wrapper *wrp)
{
/* enable pwrap events and pwrap bridge in AP side */
-@@ -995,7 +1058,6 @@ static int pwrap_mt2701_init_soc_specific(struct pmic_wrapper *wrp)
+@@ -995,7 +1058,6 @@ static int pwrap_mt2701_init_soc_specifi
static int pwrap_init(struct pmic_wrapper *wrp)
{
int ret;
@@ -122,7 +120,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
reset_control_reset(wrp->rstc);
if (wrp->rstc_bridge)
-@@ -1007,10 +1069,12 @@ static int pwrap_init(struct pmic_wrapper *wrp)
+@@ -1007,10 +1069,12 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 0, PWRAP_DCM_DBC_PRD);
}
@@ -139,7 +137,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
pwrap_writel(wrp, 1, PWRAP_WRAP_EN);
-@@ -1022,45 +1086,26 @@ static int pwrap_init(struct pmic_wrapper *wrp)
+@@ -1022,45 +1086,26 @@ static int pwrap_init(struct pmic_wrappe
if (ret)
return ret;
@@ -201,7 +199,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
if (wrp->master->type == PWRAP_MT8135)
pwrap_writel(wrp, 0x7, PWRAP_RRARB_EN);
-@@ -1116,6 +1161,8 @@ static const struct regmap_config pwrap_regmap_config = {
+@@ -1116,6 +1161,8 @@ static const struct regmap_config pwrap_
static const struct pwrap_slv_type pmic_mt6323 = {
.dew_regs = mt6323_regs,
.type = PMIC_MT6323,
@@ -210,7 +208,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
.pwrap_read = pwrap_read16,
.pwrap_write = pwrap_write16,
};
-@@ -1123,6 +1170,7 @@ static const struct pwrap_slv_type pmic_mt6323 = {
+@@ -1123,6 +1170,7 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6380 = {
.dew_regs = NULL,
.type = PMIC_MT6380,
@@ -218,7 +216,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
.pwrap_read = pwrap_read32,
.pwrap_write = pwrap_write32,
};
-@@ -1130,6 +1178,8 @@ static const struct pwrap_slv_type pmic_mt6380 = {
+@@ -1130,6 +1178,8 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6397 = {
.dew_regs = mt6397_regs,
.type = PMIC_MT6397,
@@ -227,6 +225,3 @@ index 2d3a8faae124..e3398e37a7a6 100644
.pwrap_read = pwrap_read16,
.pwrap_write = pwrap_write16,
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0120-soc-mediatek-pwrap-add-MediaTek-MT6380-as-one-slave-.patch b/target/linux/mediatek/patches-4.14/0120-soc-mediatek-pwrap-add-MediaTek-MT6380-as-one-slave-.patch
index 532c42c40c..8ace9150a4 100644
--- a/target/linux/mediatek/patches-4.14/0120-soc-mediatek-pwrap-add-MediaTek-MT6380-as-one-slave-.patch
+++ b/target/linux/mediatek/patches-4.14/0120-soc-mediatek-pwrap-add-MediaTek-MT6380-as-one-slave-.patch
@@ -16,8 +16,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index e3398e37a7a6..45c3e44d8f40 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -507,6 +507,7 @@ struct pmic_wrapper;
@@ -28,7 +26,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
/* Flags indicating the capability for the target slave */
u32 caps;
/*
-@@ -1149,7 +1150,7 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id)
+@@ -1149,7 +1150,7 @@ static irqreturn_t pwrap_interrupt(int i
return IRQ_HANDLED;
}
@@ -37,7 +35,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
.reg_bits = 16,
.val_bits = 16,
.reg_stride = 2,
-@@ -1158,9 +1159,19 @@ static const struct regmap_config pwrap_regmap_config = {
+@@ -1158,9 +1159,19 @@ static const struct regmap_config pwrap_
.max_register = 0xffff,
};
@@ -57,7 +55,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
.caps = PWRAP_SLV_CAP_SPI | PWRAP_SLV_CAP_DUALIO |
PWRAP_SLV_CAP_SECURITY,
.pwrap_read = pwrap_read16,
-@@ -1170,6 +1181,7 @@ static const struct pwrap_slv_type pmic_mt6323 = {
+@@ -1170,6 +1181,7 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6380 = {
.dew_regs = NULL,
.type = PMIC_MT6380,
@@ -65,7 +63,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
.caps = 0,
.pwrap_read = pwrap_read32,
.pwrap_write = pwrap_write32,
-@@ -1178,6 +1190,7 @@ static const struct pwrap_slv_type pmic_mt6380 = {
+@@ -1178,6 +1190,7 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6397 = {
.dew_regs = mt6397_regs,
.type = PMIC_MT6397,
@@ -73,7 +71,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
.caps = PWRAP_SLV_CAP_SPI | PWRAP_SLV_CAP_DUALIO |
PWRAP_SLV_CAP_SECURITY,
.pwrap_read = pwrap_read16,
-@@ -1189,9 +1202,14 @@ static const struct of_device_id of_slave_match_tbl[] = {
+@@ -1189,9 +1202,14 @@ static const struct of_device_id of_slav
.compatible = "mediatek,mt6323",
.data = &pmic_mt6323,
}, {
@@ -89,7 +87,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
/* sentinel */
}
};
-@@ -1372,7 +1390,7 @@ static int pwrap_probe(struct platform_device *pdev)
+@@ -1372,7 +1390,7 @@ static int pwrap_probe(struct platform_d
if (ret)
goto err_out2;
@@ -98,6 +96,3 @@ index e3398e37a7a6..45c3e44d8f40 100644
if (IS_ERR(wrp->regmap)) {
ret = PTR_ERR(wrp->regmap);
goto err_out2;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0121-soc-mediatek-pwrap-add-common-way-for-setup-CS-timin.patch b/target/linux/mediatek/patches-4.14/0121-soc-mediatek-pwrap-add-common-way-for-setup-CS-timin.patch
index cab2178e2b..7b60c68e4b 100644
--- a/target/linux/mediatek/patches-4.14/0121-soc-mediatek-pwrap-add-common-way-for-setup-CS-timin.patch
+++ b/target/linux/mediatek/patches-4.14/0121-soc-mediatek-pwrap-add-common-way-for-setup-CS-timin.patch
@@ -17,15 +17,21 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 59 ++++++++++++++++++++++--------------
1 file changed, 37 insertions(+), 22 deletions(-)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index 45c3e44d8f40..cbc3f0e82337 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
-@@ -827,23 +827,44 @@ static int pwrap_init_dual_io(struct pmic_wrapper *wrp)
+@@ -827,23 +827,44 @@ static int pwrap_init_dual_io(struct pmi
return 0;
}
-static int pwrap_mt8135_init_reg_clock(struct pmic_wrapper *wrp)
+-{
+- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT);
+- pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_WRITE);
+- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ);
+- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_START);
+- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_END);
+-
+- return 0;
+/*
+ * pwrap_init_chip_select_ext is used to configure CS extension time for each
+ * phase during data transactions on the pwrap bus.
@@ -33,12 +39,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
+static void pwrap_init_chip_select_ext(struct pmic_wrapper *wrp, u8 hext_write,
+ u8 hext_read, u8 lext_start,
+ u8 lext_end)
- {
-- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT);
-- pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_WRITE);
-- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ);
-- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_START);
-- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_END);
++{
+ /*
+ * After finishing a write and read transaction, extends CS high time
+ * to be at least xT of BUS CLK as hext_write and hext_read specifies
@@ -46,8 +47,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
+ */
+ pwrap_writel(wrp, hext_write, PWRAP_CSHEXT_WRITE);
+ pwrap_writel(wrp, hext_read, PWRAP_CSHEXT_READ);
-
-- return 0;
++
+ /*
+ * Extends CS low time after CSL and before CSH command to be at
+ * least xT of BUS CLK as lext_start and lext_end specifies
@@ -78,7 +78,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
return 0;
}
-@@ -853,20 +874,14 @@ static int pwrap_mt2701_init_reg_clock(struct pmic_wrapper *wrp)
+@@ -853,20 +874,14 @@ static int pwrap_mt2701_init_reg_clock(s
switch (wrp->slave->type) {
case PMIC_MT6397:
pwrap_writel(wrp, 0xc, PWRAP_RDDMY);
@@ -101,7 +101,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
break;
default:
break;
-@@ -1235,7 +1250,7 @@ static const struct pmic_wrapper_type pwrap_mt8135 = {
+@@ -1235,7 +1250,7 @@ static const struct pmic_wrapper_type pw
.spi_w = PWRAP_MAN_CMD_SPI_WRITE,
.wdt_src = PWRAP_WDT_SRC_MASK_ALL,
.has_bridge = 1,
@@ -110,7 +110,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
.init_soc_specific = pwrap_mt8135_init_soc_specific,
};
-@@ -1247,7 +1262,7 @@ static const struct pmic_wrapper_type pwrap_mt8173 = {
+@@ -1247,7 +1262,7 @@ static const struct pmic_wrapper_type pw
.spi_w = PWRAP_MAN_CMD_SPI_WRITE,
.wdt_src = PWRAP_WDT_SRC_MASK_NO_STAUPD,
.has_bridge = 0,
@@ -119,6 +119,3 @@ index 45c3e44d8f40..cbc3f0e82337 100644
.init_soc_specific = pwrap_mt8173_init_soc_specific,
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0122-soc-mediatek-pwrap-add-support-for-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0122-soc-mediatek-pwrap-add-support-for-MT7622-SoC.patch
index 6556444108..b0ec04afc8 100644
--- a/target/linux/mediatek/patches-4.14/0122-soc-mediatek-pwrap-add-support-for-MT7622-SoC.patch
+++ b/target/linux/mediatek/patches-4.14/0122-soc-mediatek-pwrap-add-support-for-MT7622-SoC.patch
@@ -14,8 +14,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 170 +++++++++++++++++++++++++++++++++++
1 file changed, 170 insertions(+)
-diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
-index cbc3f0e82337..5d61d127e1d7 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -214,6 +214,36 @@ enum pwrap_regs {
@@ -182,7 +180,7 @@ index cbc3f0e82337..5d61d127e1d7 100644
PWRAP_MT8135,
PWRAP_MT8173,
};
-@@ -927,6 +1070,9 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+@@ -927,6 +1070,9 @@ static int pwrap_init_cipher(struct pmic
case PWRAP_MT8173:
pwrap_writel(wrp, 1, PWRAP_CIPHER_EN);
break;
@@ -192,7 +190,7 @@ index cbc3f0e82337..5d61d127e1d7 100644
}
/* Config cipher mode @PMIC */
-@@ -1071,6 +1217,15 @@ static int pwrap_mt2701_init_soc_specific(struct pmic_wrapper *wrp)
+@@ -1071,6 +1217,15 @@ static int pwrap_mt2701_init_soc_specifi
return 0;
}
@@ -208,7 +206,7 @@ index cbc3f0e82337..5d61d127e1d7 100644
static int pwrap_init(struct pmic_wrapper *wrp)
{
int ret;
-@@ -1242,6 +1397,18 @@ static const struct pmic_wrapper_type pwrap_mt2701 = {
+@@ -1242,6 +1397,18 @@ static const struct pmic_wrapper_type pw
.init_soc_specific = pwrap_mt2701_init_soc_specific,
};
@@ -227,7 +225,7 @@ index cbc3f0e82337..5d61d127e1d7 100644
static const struct pmic_wrapper_type pwrap_mt8135 = {
.regs = mt8135_regs,
.type = PWRAP_MT8135,
-@@ -1271,6 +1438,9 @@ static const struct of_device_id of_pwrap_match_tbl[] = {
+@@ -1271,6 +1438,9 @@ static const struct of_device_id of_pwra
.compatible = "mediatek,mt2701-pwrap",
.data = &pwrap_mt2701,
}, {
@@ -237,6 +235,3 @@ index cbc3f0e82337..5d61d127e1d7 100644
.compatible = "mediatek,mt8135-pwrap",
.data = &pwrap_mt8135,
}, {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0123-soc-mediatek-place-Kconfig-for-all-SoC-drivers-under.patch b/target/linux/mediatek/patches-4.14/0123-soc-mediatek-place-Kconfig-for-all-SoC-drivers-under.patch
index 4735f845be..26a9eceaba 100644
--- a/target/linux/mediatek/patches-4.14/0123-soc-mediatek-place-Kconfig-for-all-SoC-drivers-under.patch
+++ b/target/linux/mediatek/patches-4.14/0123-soc-mediatek-place-Kconfig-for-all-SoC-drivers-under.patch
@@ -18,8 +18,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/Kconfig | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
-diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
-index 609bb3424c14..a7d0667338f2 100644
--- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig
@@ -1,9 +1,11 @@
@@ -57,6 +55,3 @@ index 609bb3424c14..a7d0667338f2 100644
driver.
+
+endmenu
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0124-arm64-mediatek-cleanup-message-for-platform-selectio.patch b/target/linux/mediatek/patches-4.14/0124-arm64-mediatek-cleanup-message-for-platform-selectio.patch
index 0e7fa9c1d3..6af0ae8316 100644
--- a/target/linux/mediatek/patches-4.14/0124-arm64-mediatek-cleanup-message-for-platform-selectio.patch
+++ b/target/linux/mediatek/patches-4.14/0124-arm64-mediatek-cleanup-message-for-platform-selectio.patch
@@ -14,8 +14,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/Kconfig.platforms | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
-index 6b54ee8c1262..ab69f5fce261 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -91,12 +91,13 @@ config ARCH_HISI
@@ -34,6 +32,3 @@ index 6b54ee8c1262..ab69f5fce261 100644
config ARCH_MESON
bool "Amlogic Platforms"
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0125-phy-phy-mtk-tphy-add-set_mode-callback.patch b/target/linux/mediatek/patches-4.14/0125-phy-phy-mtk-tphy-add-set_mode-callback.patch
index 75b3908c8d..a9481f3d6f 100644
--- a/target/linux/mediatek/patches-4.14/0125-phy-phy-mtk-tphy-add-set_mode-callback.patch
+++ b/target/linux/mediatek/patches-4.14/0125-phy-phy-mtk-tphy-add-set_mode-callback.patch
@@ -12,8 +12,6 @@ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/mediatek/phy-mtk-tphy.c | 39 +++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
-diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
-index 721a2a1c97ef..402385f2562a 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -96,9 +96,11 @@
@@ -28,7 +26,7 @@ index 721a2a1c97ef..402385f2562a 100644
#define U3P_U3_CHIP_GPIO_CTLD 0x0c
#define P3C_REG_IP_SW_RST BIT(31)
-@@ -585,6 +587,31 @@ static void u2_phy_instance_exit(struct mtk_tphy *tphy,
+@@ -585,6 +587,31 @@ static void u2_phy_instance_exit(struct
}
}
@@ -78,7 +76,7 @@ index 721a2a1c97ef..402385f2562a 100644
static struct phy *mtk_phy_xlate(struct device *dev,
struct of_phandle_args *args)
{
-@@ -931,6 +969,7 @@ static const struct phy_ops mtk_tphy_ops = {
+@@ -931,6 +969,7 @@ static const struct phy_ops mtk_tphy_ops
.exit = mtk_phy_exit,
.power_on = mtk_phy_power_on,
.power_off = mtk_phy_power_off,
@@ -86,6 +84,3 @@ index 721a2a1c97ef..402385f2562a 100644
.owner = THIS_MODULE,
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0126-usb-xhci-mtk-use-dma_set_mask_and_coherent-in-probe-.patch b/target/linux/mediatek/patches-4.14/0126-usb-xhci-mtk-use-dma_set_mask_and_coherent-in-probe-.patch
index 70ed474d05..26c7515943 100644
--- a/target/linux/mediatek/patches-4.14/0126-usb-xhci-mtk-use-dma_set_mask_and_coherent-in-probe-.patch
+++ b/target/linux/mediatek/patches-4.14/0126-usb-xhci-mtk-use-dma_set_mask_and_coherent-in-probe-.patch
@@ -14,11 +14,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 8fb60657ed4f..c197a6d9e157 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -606,15 +606,10 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -606,15 +606,10 @@ static int xhci_mtk_probe(struct platfor
}
/* Initialize dma_mask and coherent_dma_mask to 32-bits */
@@ -35,6 +33,3 @@ index 8fb60657ed4f..c197a6d9e157 100644
hcd = usb_create_hcd(driver, dev, dev_name(dev));
if (!hcd) {
ret = -ENOMEM;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0127-usb-xhci-mtk-use-ports-count-from-xhci-in-xhci_mtk_s.patch b/target/linux/mediatek/patches-4.14/0127-usb-xhci-mtk-use-ports-count-from-xhci-in-xhci_mtk_s.patch
index 67fc84ed3d..15c1b29dca 100644
--- a/target/linux/mediatek/patches-4.14/0127-usb-xhci-mtk-use-ports-count-from-xhci-in-xhci_mtk_s.patch
+++ b/target/linux/mediatek/patches-4.14/0127-usb-xhci-mtk-use-ports-count-from-xhci-in-xhci_mtk_s.patch
@@ -15,11 +15,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.c | 3 ---
2 files changed, 2 insertions(+), 4 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c
-index 6e7ddf6cafae..bfc51bc902b8 100644
--- a/drivers/usb/host/xhci-mtk-sch.c
+++ b/drivers/usb/host/xhci-mtk-sch.c
-@@ -287,12 +287,13 @@ static bool need_bw_sch(struct usb_host_endpoint *ep,
+@@ -287,12 +287,13 @@ static bool need_bw_sch(struct usb_host_
int xhci_mtk_sch_init(struct xhci_hcd_mtk *mtk)
{
@@ -34,11 +32,9 @@ index 6e7ddf6cafae..bfc51bc902b8 100644
sch_array = kcalloc(num_usb_bus, sizeof(*sch_array), GFP_KERNEL);
if (sch_array == NULL)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index c197a6d9e157..9502ca408f01 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -492,7 +492,6 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci)
+@@ -492,7 +492,6 @@ static void xhci_mtk_quirks(struct devic
/* called during probe() after chip reset completes */
static int xhci_mtk_setup(struct usb_hcd *hcd)
{
@@ -46,7 +42,7 @@ index c197a6d9e157..9502ca408f01 100644
struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd);
int ret;
-@@ -507,8 +506,6 @@ static int xhci_mtk_setup(struct usb_hcd *hcd)
+@@ -507,8 +506,6 @@ static int xhci_mtk_setup(struct usb_hcd
return ret;
if (usb_hcd_is_primary_hcd(hcd)) {
@@ -55,6 +51,3 @@ index c197a6d9e157..9502ca408f01 100644
ret = xhci_mtk_sch_init(mtk);
if (ret)
return ret;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0128-usb-xhci-mtk-check-clock-stability-of-U3_MAC.patch b/target/linux/mediatek/patches-4.14/0128-usb-xhci-mtk-check-clock-stability-of-U3_MAC.patch
index d046574216..ebd0ea10dd 100644
--- a/target/linux/mediatek/patches-4.14/0128-usb-xhci-mtk-check-clock-stability-of-U3_MAC.patch
+++ b/target/linux/mediatek/patches-4.14/0128-usb-xhci-mtk-check-clock-stability-of-U3_MAC.patch
@@ -14,8 +14,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.c | 4 ++++
1 file changed, 4 insertions(+)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 9502ca408f01..7a92bb782e5c 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -43,6 +43,7 @@
@@ -26,7 +24,7 @@ index 9502ca408f01..7a92bb782e5c 100644
#define STS1_XHCI_RST BIT(11)
#define STS1_SYS125_RST BIT(10)
#define STS1_REF_RST BIT(8)
-@@ -125,6 +126,9 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
+@@ -125,6 +126,9 @@ static int xhci_mtk_host_enable(struct x
check_val = STS1_SYSPLL_STABLE | STS1_REF_RST |
STS1_SYS125_RST | STS1_XHCI_RST;
@@ -36,6 +34,3 @@ index 9502ca408f01..7a92bb782e5c 100644
ret = readl_poll_timeout(&ippc->ip_pw_sts1, value,
(check_val == (value & check_val)), 100, 20000);
if (ret) {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0129-usb-xhci-mtk-support-option-to-disable-usb3-ports.patch b/target/linux/mediatek/patches-4.14/0129-usb-xhci-mtk-support-option-to-disable-usb3-ports.patch
index 90e2aed441..d5e48c7d01 100644
--- a/target/linux/mediatek/patches-4.14/0129-usb-xhci-mtk-support-option-to-disable-usb3-ports.patch
+++ b/target/linux/mediatek/patches-4.14/0129-usb-xhci-mtk-support-option-to-disable-usb3-ports.patch
@@ -16,11 +16,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.h | 1 +
2 files changed, 16 insertions(+), 3 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 7a92bb782e5c..97ba51e4e149 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -92,6 +92,7 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
+@@ -92,6 +92,7 @@ static int xhci_mtk_host_enable(struct x
{
struct mu3c_ippc_regs __iomem *ippc = mtk->ippc_regs;
u32 value, check_val;
@@ -28,7 +26,7 @@ index 7a92bb782e5c..97ba51e4e149 100644
int ret;
int i;
-@@ -103,8 +104,13 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
+@@ -103,8 +104,13 @@ static int xhci_mtk_host_enable(struct x
value &= ~CTRL1_IP_HOST_PDN;
writel(value, &ippc->ip_pw_ctr1);
@@ -43,7 +41,7 @@ index 7a92bb782e5c..97ba51e4e149 100644
value = readl(&ippc->u3_ctrl_p[i]);
value &= ~(CTRL_U3_PORT_PDN | CTRL_U3_PORT_DIS);
value |= CTRL_U3_PORT_HOST_SEL;
-@@ -126,7 +132,7 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
+@@ -126,7 +132,7 @@ static int xhci_mtk_host_enable(struct x
check_val = STS1_SYSPLL_STABLE | STS1_REF_RST |
STS1_SYS125_RST | STS1_XHCI_RST;
@@ -52,7 +50,7 @@ index 7a92bb782e5c..97ba51e4e149 100644
check_val |= STS1_U3_MAC_RST;
ret = readl_poll_timeout(&ippc->ip_pw_sts1, value,
-@@ -149,8 +155,11 @@ static int xhci_mtk_host_disable(struct xhci_hcd_mtk *mtk)
+@@ -149,8 +155,11 @@ static int xhci_mtk_host_disable(struct
if (!mtk->has_ippc)
return 0;
@@ -65,7 +63,7 @@ index 7a92bb782e5c..97ba51e4e149 100644
value = readl(&ippc->u3_ctrl_p[i]);
value |= CTRL_U3_PORT_PDN;
writel(value, &ippc->u3_ctrl_p[i]);
-@@ -573,6 +582,9 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -573,6 +582,9 @@ static int xhci_mtk_probe(struct platfor
}
mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
@@ -75,8 +73,6 @@ index 7a92bb782e5c..97ba51e4e149 100644
ret = usb_wakeup_of_property_parse(mtk, node);
if (ret)
-diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
-index 3aa5e1d25064..db55a12f1585 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -121,6 +121,7 @@ struct xhci_hcd_mtk {
@@ -87,6 +83,3 @@ index 3aa5e1d25064..db55a12f1585 100644
struct regulator *vusb33;
struct regulator *vbus;
struct clk *sys_clk; /* sys and mac clock */
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch b/target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch
index cb595ff7de..85ee07baae 100644
--- a/target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch
+++ b/target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch
@@ -15,11 +15,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.h | 2 --
2 files changed, 35 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 97ba51e4e149..d60463c07c54 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
+@@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct x
goto sys_clk_err;
}
@@ -45,7 +43,7 @@ index 97ba51e4e149..d60463c07c54 100644
sys_clk_err:
clk_disable_unprepare(mtk->ref_clk);
ref_clk_err:
-@@ -264,10 +247,6 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
+@@ -264,10 +247,6 @@ ref_clk_err:
static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
{
@@ -56,7 +54,7 @@ index 97ba51e4e149..d60463c07c54 100644
clk_disable_unprepare(mtk->sys_clk);
clk_disable_unprepare(mtk->ref_clk);
}
-@@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
+@@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(
if (!mtk->wakeup_src)
return 0;
@@ -75,8 +73,6 @@ index 97ba51e4e149..d60463c07c54 100644
mtk->pericfg = syscon_regmap_lookup_by_phandle(dn,
"mediatek,syscon-wakeup");
if (IS_ERR(mtk->pericfg)) {
-diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
-index db55a12f1585..67783a7af509 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -126,8 +126,6 @@ struct xhci_hcd_mtk {
@@ -88,6 +84,3 @@ index db55a12f1585..67783a7af509 100644
struct regmap *pericfg;
struct phy **phys;
int num_phys;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0131-usb-xhci-mtk-add-optional-mcu-and-dma-bus-clocks.patch b/target/linux/mediatek/patches-4.14/0131-usb-xhci-mtk-add-optional-mcu-and-dma-bus-clocks.patch
index a533826937..264cd25e7f 100644
--- a/target/linux/mediatek/patches-4.14/0131-usb-xhci-mtk-add-optional-mcu-and-dma-bus-clocks.patch
+++ b/target/linux/mediatek/patches-4.14/0131-usb-xhci-mtk-add-optional-mcu-and-dma-bus-clocks.patch
@@ -15,11 +15,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.h | 2 ++
2 files changed, 62 insertions(+), 19 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index d60463c07c54..e5caabe7eebe 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -221,6 +221,44 @@ static int xhci_mtk_ssusb_config(struct xhci_hcd_mtk *mtk)
+@@ -221,6 +221,44 @@ static int xhci_mtk_ssusb_config(struct
return xhci_mtk_host_enable(mtk);
}
@@ -64,7 +62,7 @@ index d60463c07c54..e5caabe7eebe 100644
static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
{
int ret;
-@@ -237,16 +275,34 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
+@@ -237,16 +275,34 @@ static int xhci_mtk_clks_enable(struct x
goto sys_clk_err;
}
@@ -100,7 +98,7 @@ index d60463c07c54..e5caabe7eebe 100644
clk_disable_unprepare(mtk->sys_clk);
clk_disable_unprepare(mtk->ref_clk);
}
-@@ -529,24 +585,9 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -529,24 +585,9 @@ static int xhci_mtk_probe(struct platfor
return PTR_ERR(mtk->vusb33);
}
@@ -128,8 +126,6 @@ index d60463c07c54..e5caabe7eebe 100644
mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
/* optional property, ignore the error if it does not exist */
-diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
-index 67783a7af509..45ff5c67efb5 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -126,6 +126,8 @@ struct xhci_hcd_mtk {
@@ -141,6 +137,3 @@ index 67783a7af509..45ff5c67efb5 100644
struct regmap *pericfg;
struct phy **phys;
int num_phys;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0132-usb-host-modify-description-for-MTK-xHCI-config.patch b/target/linux/mediatek/patches-4.14/0132-usb-host-modify-description-for-MTK-xHCI-config.patch
index 87e1b3daa9..e62a3e39dd 100644
--- a/target/linux/mediatek/patches-4.14/0132-usb-host-modify-description-for-MTK-xHCI-config.patch
+++ b/target/linux/mediatek/patches-4.14/0132-usb-host-modify-description-for-MTK-xHCI-config.patch
@@ -13,8 +13,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
-index fa5692dec832..bc09a2e4faeb 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -45,12 +45,12 @@ config USB_XHCI_PLATFORM
@@ -32,6 +30,3 @@ index fa5692dec832..bc09a2e4faeb 100644
If unsure, say N.
config USB_XHCI_MVEBU
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0133-dt-bindings-usb-mtk-xhci-add-a-optional-property-to-.patch b/target/linux/mediatek/patches-4.14/0133-dt-bindings-usb-mtk-xhci-add-a-optional-property-to-.patch
index e59f46a1fe..5124bbaa48 100644
--- a/target/linux/mediatek/patches-4.14/0133-dt-bindings-usb-mtk-xhci-add-a-optional-property-to-.patch
+++ b/target/linux/mediatek/patches-4.14/0133-dt-bindings-usb-mtk-xhci-add-a-optional-property-to-.patch
@@ -12,8 +12,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
-index 5611a2e4ddf0..2d9b459bd890 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -38,6 +38,8 @@ Optional properties:
@@ -25,6 +23,3 @@ index 5611a2e4ddf0..2d9b459bd890 100644
- vbus-supply : reference to the VBUS regulator;
- usb3-lpm-capable : supports USB3.0 LPM
- pinctrl-names : a pinctrl state named "default" must be defined
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0134-dt-bindings-usb-mtk-xhci-remove-dummy-clocks-and-add.patch b/target/linux/mediatek/patches-4.14/0134-dt-bindings-usb-mtk-xhci-remove-dummy-clocks-and-add.patch
index 9d196ab498..24fd1260ee 100644
--- a/target/linux/mediatek/patches-4.14/0134-dt-bindings-usb-mtk-xhci-remove-dummy-clocks-and-add.patch
+++ b/target/linux/mediatek/patches-4.14/0134-dt-bindings-usb-mtk-xhci-remove-dummy-clocks-and-add.patch
@@ -15,8 +15,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
.../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
-index 2d9b459bd890..30595964876a 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -26,10 +26,11 @@ Required properties:
@@ -58,6 +56,3 @@ index 2d9b459bd890..30595964876a 100644
Optional properties:
- vbus-supply : reference to the VBUS regulator;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0135-dt-bindings-mtd-add-new-compatible-strings-and-impro.patch b/target/linux/mediatek/patches-4.14/0135-dt-bindings-mtd-add-new-compatible-strings-and-impro.patch
index 4c699860c8..53b33fa5ac 100644
--- a/target/linux/mediatek/patches-4.14/0135-dt-bindings-mtd-add-new-compatible-strings-and-impro.patch
+++ b/target/linux/mediatek/patches-4.14/0135-dt-bindings-mtd-add-new-compatible-strings-and-impro.patch
@@ -15,8 +15,6 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
-diff --git a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt b/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
-index 840f9405dcf0..56d3668e2c50 100644
--- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
+++ b/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
@@ -1,13 +1,16 @@
@@ -42,6 +40,3 @@ index 840f9405dcf0..56d3668e2c50 100644
- reg: physical base address and length of the controller's register
- clocks: the phandle of the clocks needed by the nor controller
- clock-names: the names of the clocks
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0136-mtd-mtk-nor-add-suspend-resume-support.patch b/target/linux/mediatek/patches-4.14/0136-mtd-mtk-nor-add-suspend-resume-support.patch
index 248e195f45..8bfba8953d 100644
--- a/target/linux/mediatek/patches-4.14/0136-mtd-mtk-nor-add-suspend-resume-support.patch
+++ b/target/linux/mediatek/patches-4.14/0136-mtd-mtk-nor-add-suspend-resume-support.patch
@@ -13,11 +13,9 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
drivers/mtd/spi-nor/mtk-quadspi.c | 70 ++++++++++++++++++++++++++++++++-------
1 file changed, 58 insertions(+), 12 deletions(-)
-diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c
-index c258c7adf1c5..abe455ccd68b 100644
--- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c
-@@ -404,6 +404,29 @@ static int mt8173_nor_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf,
+@@ -404,6 +404,29 @@ static int mt8173_nor_write_reg(struct s
return ret;
}
@@ -47,7 +45,7 @@ index c258c7adf1c5..abe455ccd68b 100644
static int mtk_nor_init(struct mt8173_nor *mt8173_nor,
struct device_node *flash_node)
{
-@@ -468,15 +491,11 @@ static int mtk_nor_drv_probe(struct platform_device *pdev)
+@@ -468,15 +491,11 @@ static int mtk_nor_drv_probe(struct plat
return PTR_ERR(mt8173_nor->nor_clk);
mt8173_nor->dev = &pdev->dev;
@@ -65,7 +63,7 @@ index c258c7adf1c5..abe455ccd68b 100644
/* only support one attached flash */
flash_np = of_get_next_available_child(pdev->dev.of_node, NULL);
if (!flash_np) {
-@@ -487,10 +506,9 @@ static int mtk_nor_drv_probe(struct platform_device *pdev)
+@@ -487,10 +506,9 @@ static int mtk_nor_drv_probe(struct plat
ret = mtk_nor_init(mt8173_nor, flash_np);
nor_free:
@@ -79,7 +77,7 @@ index c258c7adf1c5..abe455ccd68b 100644
return ret;
}
-@@ -498,11 +516,38 @@ static int mtk_nor_drv_remove(struct platform_device *pdev)
+@@ -498,11 +516,38 @@ static int mtk_nor_drv_remove(struct pla
{
struct mt8173_nor *mt8173_nor = platform_get_drvdata(pdev);
@@ -120,7 +118,7 @@ index c258c7adf1c5..abe455ccd68b 100644
static const struct of_device_id mtk_nor_of_ids[] = {
{ .compatible = "mediatek,mt8173-nor"},
{ /* sentinel */ }
-@@ -514,6 +559,7 @@ static struct platform_driver mtk_nor_driver = {
+@@ -514,6 +559,7 @@ static struct platform_driver mtk_nor_dr
.remove = mtk_nor_drv_remove,
.driver = {
.name = "mtk-nor",
@@ -128,6 +126,3 @@ index c258c7adf1c5..abe455ccd68b 100644
.of_match_table = mtk_nor_of_ids,
},
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0137-dt-bindings-rtc-mediatek-add-bindings-for-MediaTek-S.patch b/target/linux/mediatek/patches-4.14/0137-dt-bindings-rtc-mediatek-add-bindings-for-MediaTek-S.patch
index 2488276b69..a003bd78a8 100644
--- a/target/linux/mediatek/patches-4.14/0137-dt-bindings-rtc-mediatek-add-bindings-for-MediaTek-S.patch
+++ b/target/linux/mediatek/patches-4.14/0137-dt-bindings-rtc-mediatek-add-bindings-for-MediaTek-S.patch
@@ -15,9 +15,6 @@ Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
1 file changed, 21 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
-diff --git a/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt b/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
-new file mode 100644
-index 000000000000..09fe8f51476f
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
@@ -0,0 +1,21 @@
@@ -42,6 +39,3 @@ index 000000000000..09fe8f51476f
+ clocks = <&topckgen CLK_TOP_RTC>;
+ clock-names = "rtc";
+};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch
index 6be78ac4ca..8cf900d143 100644
--- a/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch
+++ b/target/linux/mediatek/patches-4.14/0138-rtc-mediatek-add-driver-for-RTC-on-MT7622-SoC.patch
@@ -15,8 +15,6 @@ Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
3 files changed, 433 insertions(+)
create mode 100644 drivers/rtc/rtc-mt7622.c
-diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
-index e0e58f3b1420..322752ebc5a7 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1715,6 +1715,16 @@ config RTC_DRV_MT6397
@@ -36,11 +34,9 @@ index e0e58f3b1420..322752ebc5a7 100644
config RTC_DRV_XGENE
tristate "APM X-Gene RTC"
depends on HAS_IOMEM
-diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
-index 7230014c92af..5ec891a81f4f 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
-@@ -102,6 +102,7 @@ obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc5121.o
+@@ -103,6 +103,7 @@ obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc
obj-$(CONFIG_RTC_DRV_VRTC) += rtc-mrst.o
obj-$(CONFIG_RTC_DRV_MSM6242) += rtc-msm6242.o
obj-$(CONFIG_RTC_DRV_MT6397) += rtc-mt6397.o
@@ -48,9 +44,6 @@ index 7230014c92af..5ec891a81f4f 100644
obj-$(CONFIG_RTC_DRV_MV) += rtc-mv.o
obj-$(CONFIG_RTC_DRV_MXC) += rtc-mxc.o
obj-$(CONFIG_RTC_DRV_NUC900) += rtc-nuc900.o
-diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c
-new file mode 100644
-index 000000000000..d79b9ae4d237
--- /dev/null
+++ b/drivers/rtc/rtc-mt7622.c
@@ -0,0 +1,422 @@
@@ -476,6 +469,3 @@ index 000000000000..d79b9ae4d237
+MODULE_DESCRIPTION("MediaTek SoC based RTC Driver");
+MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>");
+MODULE_LICENSE("GPL");
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch b/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch
index d492731669..0513a085ac 100644
--- a/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch
+++ b/target/linux/mediatek/patches-4.14/0139-rtc-mediatek-enhance-the-description-for-MediaTek-PM.patch
@@ -16,8 +16,6 @@ Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
-index 322752ebc5a7..616fe53c788e 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1706,14 +1706,14 @@ config RTC_DRV_MOXART
@@ -39,6 +37,3 @@ index 322752ebc5a7..616fe53c788e 100644
config RTC_DRV_MT7622
tristate "MediaTek SoC based RTC"
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0140-mtd-nand-mtk-change-the-compile-sequence-of-mtk_nand.patch b/target/linux/mediatek/patches-4.14/0140-mtd-nand-mtk-change-the-compile-sequence-of-mtk_nand.patch
index 6a31a60b28..2afb956efe 100644
--- a/target/linux/mediatek/patches-4.14/0140-mtd-nand-mtk-change-the-compile-sequence-of-mtk_nand.patch
+++ b/target/linux/mediatek/patches-4.14/0140-mtd-nand-mtk-change-the-compile-sequence-of-mtk_nand.patch
@@ -18,11 +18,9 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
-index ade5fc4c3819..57f4cdedf137 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
-@@ -58,7 +58,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_nand.o
+@@ -59,7 +59,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_n
obj-$(CONFIG_MTD_NAND_HISI504) += hisi504_nand.o
obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/
obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o
@@ -31,6 +29,3 @@ index ade5fc4c3819..57f4cdedf137 100644
nand-objs := nand_base.o nand_bbt.o nand_timings.o nand_ids.o
nand-objs += nand_amd.o
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0142-mmc-dt-bindings-Add-reg-source_cg-latch-ck-for-Media.patch b/target/linux/mediatek/patches-4.14/0142-mmc-dt-bindings-Add-reg-source_cg-latch-ck-for-Media.patch
index 77190abd76..2750a2cc20 100644
--- a/target/linux/mediatek/patches-4.14/0142-mmc-dt-bindings-Add-reg-source_cg-latch-ck-for-Media.patch
+++ b/target/linux/mediatek/patches-4.14/0142-mmc-dt-bindings-Add-reg-source_cg-latch-ck-for-Media.patch
@@ -23,11 +23,9 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
-diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
-index 4182ea36ca5b..72d2a734ab85 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
-@@ -7,10 +7,18 @@ This file documents differences between the core properties in mmc.txt
+@@ -7,10 +7,18 @@ This file documents differences between
and the properties used by the msdc driver.
Required properties:
@@ -60,6 +58,3 @@ index 4182ea36ca5b..72d2a734ab85 100644
Examples:
mmc0: mmc@11230000 {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0143-mmc-mediatek-add-support-of-mt2701-mt2712.patch b/target/linux/mediatek/patches-4.14/0143-mmc-mediatek-add-support-of-mt2701-mt2712.patch
index d315eda865..9b43df80e0 100644
--- a/target/linux/mediatek/patches-4.14/0143-mmc-mediatek-add-support-of-mt2701-mt2712.patch
+++ b/target/linux/mediatek/patches-4.14/0143-mmc-mediatek-add-support-of-mt2701-mt2712.patch
@@ -14,8 +14,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 82 +++++++++++++++++++++++++++++++++++++++--------
1 file changed, 69 insertions(+), 13 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 267f7ab08420..643c795f1bdd 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -95,6 +95,9 @@
@@ -79,7 +77,7 @@ index 267f7ab08420..643c795f1bdd 100644
static void sdr_set_bits(void __iomem *reg, u32 bs)
{
u32 val = readl(reg);
-@@ -509,7 +542,12 @@ static void msdc_set_timeout(struct msdc_host *host, u32 ns, u32 clks)
+@@ -509,7 +542,12 @@ static void msdc_set_timeout(struct msdc
timeout = (ns + clk_ns - 1) / clk_ns + clks;
/* in 1048576 sclk cycle unit */
timeout = (timeout + (0x1 << 20) - 1) >> 20;
@@ -93,7 +91,7 @@ index 267f7ab08420..643c795f1bdd 100644
/*DDR mode will double the clk cycles for data timeout */
timeout = mode >= 2 ? timeout * 2 : timeout;
timeout = timeout > 1 ? timeout - 1 : 0;
-@@ -548,7 +586,11 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -548,7 +586,11 @@ static void msdc_set_mclk(struct msdc_ho
flags = readl(host->base + MSDC_INTEN);
sdr_clr_bits(host->base + MSDC_INTEN, flags);
@@ -106,7 +104,7 @@ index 267f7ab08420..643c795f1bdd 100644
if (timing == MMC_TIMING_UHS_DDR50 ||
timing == MMC_TIMING_MMC_DDR52 ||
timing == MMC_TIMING_MMC_HS400) {
-@@ -568,8 +610,12 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -568,8 +610,12 @@ static void msdc_set_mclk(struct msdc_ho
if (timing == MMC_TIMING_MMC_HS400 &&
hz >= (host->src_clk_freq >> 1)) {
@@ -121,7 +119,7 @@ index 267f7ab08420..643c795f1bdd 100644
sclk = host->src_clk_freq >> 1;
div = 0; /* div is ignore when bit18 is set */
}
-@@ -587,8 +633,15 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -587,8 +633,15 @@ static void msdc_set_mclk(struct msdc_ho
sclk = (host->src_clk_freq >> 2) / div;
}
}
@@ -139,7 +137,7 @@ index 267f7ab08420..643c795f1bdd 100644
sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_CKPDN);
while (!(readl(host->base + MSDC_CFG) & MSDC_CFG_CKSTB))
cpu_relax();
-@@ -1617,12 +1670,17 @@ static int msdc_drv_probe(struct platform_device *pdev)
+@@ -1617,12 +1670,17 @@ static int msdc_drv_probe(struct platfor
struct mmc_host *mmc;
struct msdc_host *host;
struct resource *res;
@@ -157,7 +155,7 @@ index 267f7ab08420..643c795f1bdd 100644
/* Allocate MMC host for this device */
mmc = mmc_alloc_host(sizeof(struct msdc_host), &pdev->dev);
if (!mmc)
-@@ -1686,11 +1744,15 @@ static int msdc_drv_probe(struct platform_device *pdev)
+@@ -1686,11 +1744,15 @@ static int msdc_drv_probe(struct platfor
msdc_of_property_parse(pdev, host);
host->dev = &pdev->dev;
@@ -174,7 +172,7 @@ index 267f7ab08420..643c795f1bdd 100644
mmc->caps |= MMC_CAP_ERASE | MMC_CAP_CMD23;
/* MMC core transfer sizes tunable parameters */
-@@ -1839,12 +1901,6 @@ static const struct dev_pm_ops msdc_dev_pm_ops = {
+@@ -1839,12 +1901,6 @@ static const struct dev_pm_ops msdc_dev_
SET_RUNTIME_PM_OPS(msdc_runtime_suspend, msdc_runtime_resume, NULL)
};
@@ -187,6 +185,3 @@ index 267f7ab08420..643c795f1bdd 100644
static struct platform_driver mt_msdc_driver = {
.probe = msdc_drv_probe,
.remove = msdc_drv_remove,
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0144-dt-bindings-ARM-Mediatek-Document-bindings-for-MT271.patch b/target/linux/mediatek/patches-4.14/0144-dt-bindings-ARM-Mediatek-Document-bindings-for-MT271.patch
index 901e6757ae..132ae8f4fb 100644
--- a/target/linux/mediatek/patches-4.14/0144-dt-bindings-ARM-Mediatek-Document-bindings-for-MT271.patch
+++ b/target/linux/mediatek/patches-4.14/0144-dt-bindings-ARM-Mediatek-Document-bindings-for-MT271.patch
@@ -29,8 +29,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
-index cd977db7630c..19fc116346d6 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
@@ -7,6 +7,7 @@ Required Properties:
@@ -41,8 +39,6 @@ index cd977db7630c..19fc116346d6 100644
- "mediatek,mt6797-apmixedsys"
- "mediatek,mt8135-apmixedsys"
- "mediatek,mt8173-apmixedsys"
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
-index 4137196dd686..4010e37c53a0 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
@@ -7,6 +7,7 @@ Required Properties:
@@ -53,8 +49,6 @@ index 4137196dd686..4010e37c53a0 100644
- #clock-cells: Must be 1
The bdpsys controller uses the common clk binding from
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
-index 047b11ae5f45..868bd51a98be 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
@@ -7,6 +7,7 @@ Required Properties:
@@ -65,8 +59,6 @@ index 047b11ae5f45..868bd51a98be 100644
- "mediatek,mt6797-imgsys", "syscon"
- "mediatek,mt8173-imgsys", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
-index 58d58e2006b8..a3430cd96d0f 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
@@ -8,6 +8,7 @@ Required Properties:
@@ -77,9 +69,6 @@ index 58d58e2006b8..a3430cd96d0f 100644
- "mediatek,mt6797-infracfg", "syscon"
- "mediatek,mt8135-infracfg", "syscon"
- "mediatek,mt8173-infracfg", "syscon"
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt
-new file mode 100644
-index 000000000000..2df799cd06a7
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt
@@ -0,0 +1,22 @@
@@ -105,9 +94,6 @@ index 000000000000..2df799cd06a7
+ reg = <0 0x19000000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt
-new file mode 100644
-index 000000000000..b8fb03f3613e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt
@@ -0,0 +1,22 @@
@@ -133,9 +119,6 @@ index 000000000000..b8fb03f3613e
+ reg = <0 0x10220000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt
-new file mode 100644
-index 000000000000..859e67b416d5
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt
@@ -0,0 +1,22 @@
@@ -161,8 +144,6 @@ index 000000000000..859e67b416d5
+ reg = <0 0x13000000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
-index 70529e0b58e9..4eb8bbe15c01 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
@@ -7,6 +7,7 @@ Required Properties:
@@ -173,8 +154,6 @@ index 70529e0b58e9..4eb8bbe15c01 100644
- "mediatek,mt6797-mmsys", "syscon"
- "mediatek,mt8173-mmsys", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
-index e494366782aa..d9f092eb3550 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
@@ -8,6 +8,7 @@ Required Properties:
@@ -185,8 +164,6 @@ index e494366782aa..d9f092eb3550 100644
- "mediatek,mt8135-pericfg", "syscon"
- "mediatek,mt8173-pericfg", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
-index ec93ecbb9f3c..2024fc909d69 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
@@ -7,6 +7,7 @@ Required Properties:
@@ -197,8 +174,6 @@ index ec93ecbb9f3c..2024fc909d69 100644
- "mediatek,mt6797-topckgen"
- "mediatek,mt8135-topckgen"
- "mediatek,mt8173-topckgen"
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
-index d150104f928a..ea40d05089f8 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
@@ -7,6 +7,7 @@ Required Properties:
@@ -209,11 +184,9 @@ index d150104f928a..ea40d05089f8 100644
- "mediatek,mt6797-vdecsys", "syscon"
- "mediatek,mt8173-vdecsys", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
-index 8a93be643647..851545357e94 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
-@@ -6,6 +6,7 @@ The Mediatek vencsys controller provides various clocks to the system.
+@@ -6,6 +6,7 @@ The Mediatek vencsys controller provides
Required Properties:
- compatible: Should be one of:
@@ -221,6 +194,3 @@ index 8a93be643647..851545357e94 100644
- "mediatek,mt6797-vencsys", "syscon"
- "mediatek,mt8173-vencsys", "syscon"
- #clock-cells: Must be 1
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0145-clk-mediatek-Add-dt-bindings-for-MT2712-clocks.patch b/target/linux/mediatek/patches-4.14/0145-clk-mediatek-Add-dt-bindings-for-MT2712-clocks.patch
index 9405732563..fb86c81bc2 100644
--- a/target/linux/mediatek/patches-4.14/0145-clk-mediatek-Add-dt-bindings-for-MT2712-clocks.patch
+++ b/target/linux/mediatek/patches-4.14/0145-clk-mediatek-Add-dt-bindings-for-MT2712-clocks.patch
@@ -14,9 +14,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 file changed, 427 insertions(+)
create mode 100644 include/dt-bindings/clock/mt2712-clk.h
-diff --git a/include/dt-bindings/clock/mt2712-clk.h b/include/dt-bindings/clock/mt2712-clk.h
-new file mode 100644
-index 000000000000..48a8e797a617
--- /dev/null
+++ b/include/dt-bindings/clock/mt2712-clk.h
@@ -0,0 +1,427 @@
@@ -447,6 +444,3 @@ index 000000000000..48a8e797a617
+#define CLK_JPGDEC_NR_CLK 2
+
+#endif /* _DT_BINDINGS_CLK_MT2712_H */
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0146-clk-mediatek-Add-MT2712-clock-support.patch b/target/linux/mediatek/patches-4.14/0146-clk-mediatek-Add-MT2712-clock-support.patch
index 5876541d8b..98ddbd6af2 100644
--- a/target/linux/mediatek/patches-4.14/0146-clk-mediatek-Add-MT2712-clock-support.patch
+++ b/target/linux/mediatek/patches-4.14/0146-clk-mediatek-Add-MT2712-clock-support.patch
@@ -32,8 +32,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
create mode 100644 drivers/clk/mediatek/clk-mt2712-venc.c
create mode 100644 drivers/clk/mediatek/clk-mt2712.c
-diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
-index 28739a9a6e37..300dbb551bf7 100644
--- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig
@@ -50,6 +50,56 @@ config COMMON_CLK_MT2701_BDPSYS
@@ -93,11 +91,9 @@ index 28739a9a6e37..300dbb551bf7 100644
config COMMON_CLK_MT6797
bool "Clock driver for Mediatek MT6797"
depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
-diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
-index 2a755b5fb51b..a4e5c47c73a4 100644
--- a/drivers/clk/mediatek/Makefile
+++ b/drivers/clk/mediatek/Makefile
-@@ -12,5 +12,13 @@ obj-$(CONFIG_COMMON_CLK_MT2701_HIFSYS) += clk-mt2701-hif.o
+@@ -13,5 +13,13 @@ obj-$(CONFIG_COMMON_CLK_MT2701_HIFSYS) +
obj-$(CONFIG_COMMON_CLK_MT2701_IMGSYS) += clk-mt2701-img.o
obj-$(CONFIG_COMMON_CLK_MT2701_MMSYS) += clk-mt2701-mm.o
obj-$(CONFIG_COMMON_CLK_MT2701_VDECSYS) += clk-mt2701-vdec.o
@@ -111,9 +107,6 @@ index 2a755b5fb51b..a4e5c47c73a4 100644
+obj-$(CONFIG_COMMON_CLK_MT2712_VENCSYS) += clk-mt2712-venc.o
obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o
-diff --git a/drivers/clk/mediatek/clk-mt2712-bdp.c b/drivers/clk/mediatek/clk-mt2712-bdp.c
-new file mode 100644
-index 000000000000..5fe4728c076e
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-bdp.c
@@ -0,0 +1,102 @@
@@ -219,9 +212,6 @@ index 000000000000..5fe4728c076e
+};
+
+builtin_platform_driver(clk_mt2712_bdp_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-img.c b/drivers/clk/mediatek/clk-mt2712-img.c
-new file mode 100644
-index 000000000000..139ff55d495e
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-img.c
@@ -0,0 +1,80 @@
@@ -305,9 +295,6 @@ index 000000000000..139ff55d495e
+};
+
+builtin_platform_driver(clk_mt2712_img_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-jpgdec.c b/drivers/clk/mediatek/clk-mt2712-jpgdec.c
-new file mode 100644
-index 000000000000..c7d4aada4892
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-jpgdec.c
@@ -0,0 +1,76 @@
@@ -387,9 +374,6 @@ index 000000000000..c7d4aada4892
+};
+
+builtin_platform_driver(clk_mt2712_jpgdec_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-mfg.c b/drivers/clk/mediatek/clk-mt2712-mfg.c
-new file mode 100644
-index 000000000000..570f72d48d4d
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-mfg.c
@@ -0,0 +1,75 @@
@@ -468,9 +452,6 @@ index 000000000000..570f72d48d4d
+};
+
+builtin_platform_driver(clk_mt2712_mfg_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-mm.c b/drivers/clk/mediatek/clk-mt2712-mm.c
-new file mode 100644
-index 000000000000..a8b4b6d42488
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-mm.c
@@ -0,0 +1,170 @@
@@ -644,9 +625,6 @@ index 000000000000..a8b4b6d42488
+};
+
+builtin_platform_driver(clk_mt2712_mm_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-vdec.c b/drivers/clk/mediatek/clk-mt2712-vdec.c
-new file mode 100644
-index 000000000000..55c64ee8cc91
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-vdec.c
@@ -0,0 +1,94 @@
@@ -744,9 +722,6 @@ index 000000000000..55c64ee8cc91
+};
+
+builtin_platform_driver(clk_mt2712_vdec_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712-venc.c b/drivers/clk/mediatek/clk-mt2712-venc.c
-new file mode 100644
-index 000000000000..ccbfe98777c8
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-venc.c
@@ -0,0 +1,77 @@
@@ -827,9 +802,6 @@ index 000000000000..ccbfe98777c8
+};
+
+builtin_platform_driver(clk_mt2712_venc_drv);
-diff --git a/drivers/clk/mediatek/clk-mt2712.c b/drivers/clk/mediatek/clk-mt2712.c
-new file mode 100644
-index 000000000000..498d13799388
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712.c
@@ -0,0 +1,1435 @@
@@ -2268,8 +2240,6 @@ index 000000000000..498d13799388
+}
+
+arch_initcall(clk_mt2712_init);
-diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
-index f5d6b70ce189..f48df75cc901 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -207,6 +207,8 @@ struct mtk_pll_data {
@@ -2281,8 +2251,6 @@ index f5d6b70ce189..f48df75cc901 100644
int pd_shift;
unsigned int flags;
const struct clk_ops *ops;
-diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c
-index a409142e9346..3c546bae6955 100644
--- a/drivers/clk/mediatek/clk-pll.c
+++ b/drivers/clk/mediatek/clk-pll.c
@@ -47,6 +47,7 @@ struct mtk_clk_pll {
@@ -2293,7 +2261,7 @@ index a409142e9346..3c546bae6955 100644
void __iomem *pcw_addr;
const struct mtk_pll_data *data;
};
-@@ -227,7 +228,10 @@ static int mtk_pll_prepare(struct clk_hw *hw)
+@@ -227,7 +228,10 @@ static int mtk_pll_prepare(struct clk_hw
r |= pll->data->en_mask;
writel(r, pll->base_addr + REG_CON0);
@@ -2305,7 +2273,7 @@ index a409142e9346..3c546bae6955 100644
r = readl(pll->tuner_addr) | AUDPLL_TUNER_EN;
writel(r, pll->tuner_addr);
}
-@@ -254,7 +258,10 @@ static void mtk_pll_unprepare(struct clk_hw *hw)
+@@ -254,7 +258,10 @@ static void mtk_pll_unprepare(struct clk
writel(r, pll->base_addr + REG_CON0);
}
@@ -2317,7 +2285,7 @@ index a409142e9346..3c546bae6955 100644
r = readl(pll->tuner_addr) & ~AUDPLL_TUNER_EN;
writel(r, pll->tuner_addr);
}
-@@ -297,6 +304,8 @@ static struct clk *mtk_clk_register_pll(const struct mtk_pll_data *data,
+@@ -297,6 +304,8 @@ static struct clk *mtk_clk_register_pll(
pll->pcw_addr = base + data->pcw_reg;
if (data->tuner_reg)
pll->tuner_addr = base + data->tuner_reg;
@@ -2326,6 +2294,3 @@ index a409142e9346..3c546bae6955 100644
pll->hw.init = &init;
pll->data = data;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0147-dt-bindings-clock-mediatek-document-clk-bindings-for.patch b/target/linux/mediatek/patches-4.14/0147-dt-bindings-clock-mediatek-document-clk-bindings-for.patch
index 7cdb4168bd..7b2401f525 100644
--- a/target/linux/mediatek/patches-4.14/0147-dt-bindings-clock-mediatek-document-clk-bindings-for.patch
+++ b/target/linux/mediatek/patches-4.14/0147-dt-bindings-clock-mediatek-document-clk-bindings-for.patch
@@ -28,8 +28,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
-index 19fc116346d6..b404d592ce58 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
@@ -9,6 +9,7 @@ Required Properties:
@@ -40,9 +38,6 @@ index 19fc116346d6..b404d592ce58 100644
- "mediatek,mt8135-apmixedsys"
- "mediatek,mt8173-apmixedsys"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-new file mode 100644
-index 000000000000..9b8f578d5e19
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
@@ -0,0 +1,22 @@
@@ -68,8 +63,6 @@ index 000000000000..9b8f578d5e19
+ reg = <0 0x11220000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
-index 768f3a5bc055..7aa3fa167668 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
@@ -7,6 +7,7 @@ Required Properties:
@@ -80,8 +73,6 @@ index 768f3a5bc055..7aa3fa167668 100644
- #clock-cells: Must be 1
The ethsys controller uses the common clk binding from
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
-index beed7b594cea..f5629d64cef2 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
@@ -8,6 +8,7 @@ Required Properties:
@@ -92,8 +83,6 @@ index beed7b594cea..f5629d64cef2 100644
- #clock-cells: Must be 1
The hifsys controller uses the common clk binding from
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
-index a3430cd96d0f..566f153f9f83 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
@@ -10,6 +10,7 @@ Required Properties:
@@ -104,9 +93,6 @@ index a3430cd96d0f..566f153f9f83 100644
- "mediatek,mt8135-infracfg", "syscon"
- "mediatek,mt8173-infracfg", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
-new file mode 100644
-index 000000000000..d5d5f1227665
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
@@ -0,0 +1,22 @@
@@ -132,8 +118,6 @@ index 000000000000..d5d5f1227665
+ reg = <0 0x1a100800 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
-index d9f092eb3550..fb58ca8c2770 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
@@ -9,6 +9,7 @@ Required Properties:
@@ -144,9 +128,6 @@ index d9f092eb3550..fb58ca8c2770 100644
- "mediatek,mt8135-pericfg", "syscon"
- "mediatek,mt8173-pericfg", "syscon"
- #clock-cells: Must be 1
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt
-new file mode 100644
-index 000000000000..d113b8e741f3
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt
@@ -0,0 +1,22 @@
@@ -172,9 +153,6 @@ index 000000000000..d113b8e741f3
+ reg = <0 0x1b128000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
-new file mode 100644
-index 000000000000..00760019da00
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
@@ -0,0 +1,22 @@
@@ -200,8 +178,6 @@ index 000000000000..00760019da00
+ reg = <0 0x1a000000 0 0x1000>;
+ #clock-cells = <1>;
+};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
-index 2024fc909d69..24014a7e2332 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
@@ -9,6 +9,7 @@ Required Properties:
@@ -212,6 +188,3 @@ index 2024fc909d69..24014a7e2332 100644
- "mediatek,mt8135-topckgen"
- "mediatek,mt8173-topckgen"
- #clock-cells: Must be 1
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0149-clk-mediatek-add-clocks-dt-bindings-required-header-.patch b/target/linux/mediatek/patches-4.14/0149-clk-mediatek-add-clocks-dt-bindings-required-header-.patch
index fea00f32b0..d82baa7580 100644
--- a/target/linux/mediatek/patches-4.14/0149-clk-mediatek-add-clocks-dt-bindings-required-header-.patch
+++ b/target/linux/mediatek/patches-4.14/0149-clk-mediatek-add-clocks-dt-bindings-required-header-.patch
@@ -16,9 +16,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 file changed, 289 insertions(+)
create mode 100644 include/dt-bindings/clock/mt7622-clk.h
-diff --git a/include/dt-bindings/clock/mt7622-clk.h b/include/dt-bindings/clock/mt7622-clk.h
-new file mode 100644
-index 000000000000..3e514ed51d15
--- /dev/null
+++ b/include/dt-bindings/clock/mt7622-clk.h
@@ -0,0 +1,289 @@
@@ -311,6 +308,3 @@ index 000000000000..3e514ed51d15
+
+#endif /* _DT_BINDINGS_CLK_MT7622_H */
+
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0150-clk-mediatek-add-clock-support-for-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0150-clk-mediatek-add-clock-support-for-MT7622-SoC.patch
index ea015e8d6a..e993106feb 100644
--- a/target/linux/mediatek/patches-4.14/0150-clk-mediatek-add-clock-support-for-MT7622-SoC.patch
+++ b/target/linux/mediatek/patches-4.14/0150-clk-mediatek-add-clock-support-for-MT7622-SoC.patch
@@ -23,8 +23,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
create mode 100644 drivers/clk/mediatek/clk-mt7622-hif.c
create mode 100644 drivers/clk/mediatek/clk-mt7622.c
-diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
-index 300dbb551bf7..59dc0aad553c 100644
--- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig
@@ -132,6 +132,36 @@ config COMMON_CLK_MT6797_VENCSYS
@@ -64,11 +62,9 @@ index 300dbb551bf7..59dc0aad553c 100644
config COMMON_CLK_MT8135
bool "Clock driver for Mediatek MT8135"
depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
-diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
-index a4e5c47c73a4..de8c3d0bb4ca 100644
--- a/drivers/clk/mediatek/Makefile
+++ b/drivers/clk/mediatek/Makefile
-@@ -20,5 +20,9 @@ obj-$(CONFIG_COMMON_CLK_MT2712_MFGCFG) += clk-mt2712-mfg.o
+@@ -21,5 +21,9 @@ obj-$(CONFIG_COMMON_CLK_MT2712_MFGCFG) +
obj-$(CONFIG_COMMON_CLK_MT2712_MMSYS) += clk-mt2712-mm.o
obj-$(CONFIG_COMMON_CLK_MT2712_VDECSYS) += clk-mt2712-vdec.o
obj-$(CONFIG_COMMON_CLK_MT2712_VENCSYS) += clk-mt2712-venc.o
@@ -78,9 +74,6 @@ index a4e5c47c73a4..de8c3d0bb4ca 100644
+obj-$(CONFIG_COMMON_CLK_MT7622_AUDSYS) += clk-mt7622-aud.o
obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o
-diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
-new file mode 100644
-index 000000000000..fad7d9fc53ba
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
@@ -0,0 +1,195 @@
@@ -279,9 +272,6 @@ index 000000000000..fad7d9fc53ba
+};
+
+builtin_platform_driver(clk_mt7622_aud_drv);
-diff --git a/drivers/clk/mediatek/clk-mt7622-eth.c b/drivers/clk/mediatek/clk-mt7622-eth.c
-new file mode 100644
-index 000000000000..6328127bbb3c
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622-eth.c
@@ -0,0 +1,156 @@
@@ -441,9 +431,6 @@ index 000000000000..6328127bbb3c
+};
+
+builtin_platform_driver(clk_mt7622_eth_drv);
-diff --git a/drivers/clk/mediatek/clk-mt7622-hif.c b/drivers/clk/mediatek/clk-mt7622-hif.c
-new file mode 100644
-index 000000000000..a6e8534276c6
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622-hif.c
@@ -0,0 +1,169 @@
@@ -616,9 +603,6 @@ index 000000000000..a6e8534276c6
+};
+
+builtin_platform_driver(clk_mt7622_hif_drv);
-diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
-new file mode 100644
-index 000000000000..92f7e32770c6
--- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -0,0 +1,780 @@
@@ -1402,6 +1386,3 @@ index 000000000000..92f7e32770c6
+}
+
+arch_initcall(clk_mt7622_init);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0151-arm64-dts-mt8173-remove-mediatek-mt8135-mmc-from-mmc.patch b/target/linux/mediatek/patches-4.14/0151-arm64-dts-mt8173-remove-mediatek-mt8135-mmc-from-mmc.patch
index 6c8c3c081f..b30604f90f 100644
--- a/target/linux/mediatek/patches-4.14/0151-arm64-dts-mt8173-remove-mediatek-mt8135-mmc-from-mmc.patch
+++ b/target/linux/mediatek/patches-4.14/0151-arm64-dts-mt8173-remove-mediatek-mt8135-mmc-from-mmc.patch
@@ -17,11 +17,9 @@ Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
-diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
-index b99a27372965..26396ef53bde 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
-@@ -682,8 +682,7 @@
+@@ -684,8 +684,7 @@
};
mmc0: mmc@11230000 {
@@ -31,7 +29,7 @@ index b99a27372965..26396ef53bde 100644
reg = <0 0x11230000 0 0x1000>;
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_0>,
-@@ -693,8 +692,7 @@
+@@ -695,8 +694,7 @@
};
mmc1: mmc@11240000 {
@@ -41,7 +39,7 @@ index b99a27372965..26396ef53bde 100644
reg = <0 0x11240000 0 0x1000>;
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_1>,
-@@ -704,8 +702,7 @@
+@@ -706,8 +704,7 @@
};
mmc2: mmc@11250000 {
@@ -51,7 +49,7 @@ index b99a27372965..26396ef53bde 100644
reg = <0 0x11250000 0 0x1000>;
interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_2>,
-@@ -715,8 +712,7 @@
+@@ -717,8 +714,7 @@
};
mmc3: mmc@11260000 {
@@ -61,6 +59,3 @@ index b99a27372965..26396ef53bde 100644
reg = <0 0x11260000 0 0x1000>;
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_3>,
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0152-mmc-mediatek-make-hs400_tune_response-only-for-mt817.patch b/target/linux/mediatek/patches-4.14/0152-mmc-mediatek-make-hs400_tune_response-only-for-mt817.patch
index 3c665dc317..cb7f8ffb2b 100644
--- a/target/linux/mediatek/patches-4.14/0152-mmc-mediatek-make-hs400_tune_response-only-for-mt817.patch
+++ b/target/linux/mediatek/patches-4.14/0152-mmc-mediatek-make-hs400_tune_response-only-for-mt817.patch
@@ -15,8 +15,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 643c795f1bdd..ab2fbbbdfda3 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -300,6 +300,7 @@ struct msdc_save_para {
@@ -50,7 +48,7 @@ index 643c795f1bdd..ab2fbbbdfda3 100644
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -666,7 +671,8 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -666,7 +671,8 @@ static void msdc_set_mclk(struct msdc_ho
host->base + PAD_CMD_TUNE);
}
@@ -60,7 +58,7 @@ index 643c795f1bdd..ab2fbbbdfda3 100644
sdr_set_field(host->base + PAD_CMD_TUNE,
MSDC_PAD_TUNE_CMDRRDLY,
host->hs400_cmd_int_delay);
-@@ -1594,7 +1600,8 @@ static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode)
+@@ -1594,7 +1600,8 @@ static int msdc_execute_tuning(struct mm
struct msdc_host *host = mmc_priv(mmc);
int ret;
@@ -70,6 +68,3 @@ index 643c795f1bdd..ab2fbbbdfda3 100644
ret = hs400_tune_response(mmc, opcode);
else
ret = msdc_tune_response(mmc, opcode);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0153-mmc-mediatek-add-pad_tune0-support.patch b/target/linux/mediatek/patches-4.14/0153-mmc-mediatek-add-pad_tune0-support.patch
index d0f81be5a8..8c4bbd261e 100644
--- a/target/linux/mediatek/patches-4.14/0153-mmc-mediatek-add-pad_tune0-support.patch
+++ b/target/linux/mediatek/patches-4.14/0153-mmc-mediatek-add-pad_tune0-support.patch
@@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 51 ++++++++++++++++++++++++++++++-----------------
1 file changed, 33 insertions(+), 18 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index ab2fbbbdfda3..bcd83d6f2b86 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -75,6 +75,7 @@
@@ -59,7 +57,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -581,6 +587,7 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -581,6 +587,7 @@ static void msdc_set_mclk(struct msdc_ho
u32 flags;
u32 div;
u32 sclk;
@@ -67,7 +65,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
if (!hz) {
dev_dbg(host->dev, "set mclk to 0\n");
-@@ -663,10 +670,10 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -663,10 +670,10 @@ static void msdc_set_mclk(struct msdc_ho
*/
if (host->sclk <= 52000000) {
writel(host->def_tune_para.iocon, host->base + MSDC_IOCON);
@@ -80,7 +78,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
writel(host->saved_tune_para.pad_cmd_tune,
host->base + PAD_CMD_TUNE);
}
-@@ -1224,6 +1231,7 @@ static irqreturn_t msdc_irq(int irq, void *dev_id)
+@@ -1224,6 +1231,7 @@ static irqreturn_t msdc_irq(int irq, voi
static void msdc_init_hw(struct msdc_host *host)
{
u32 val;
@@ -88,7 +86,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
/* Configure to MMC/SD mode, clock free running */
sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN);
-@@ -1239,7 +1247,7 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1239,7 +1247,7 @@ static void msdc_init_hw(struct msdc_hos
val = readl(host->base + MSDC_INT);
writel(val, host->base + MSDC_INT);
@@ -97,7 +95,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
writel(0, host->base + MSDC_IOCON);
sdr_set_field(host->base + MSDC_IOCON, MSDC_IOCON_DDLSEL, 0);
writel(0x403c0046, host->base + MSDC_PATCH_BIT);
-@@ -1259,7 +1267,7 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1259,7 +1267,7 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + SDC_CFG, SDC_CFG_DTOC, 3);
host->def_tune_para.iocon = readl(host->base + MSDC_IOCON);
@@ -106,7 +104,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
dev_dbg(host->dev, "init hardware done!");
}
-@@ -1402,18 +1410,19 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1402,18 +1410,19 @@ static int msdc_tune_response(struct mmc
struct msdc_delay_phase internal_delay_phase;
u8 final_delay, final_maxlen;
u32 internal_delay = 0;
@@ -128,7 +126,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
MSDC_PAD_TUNE_CMDRDLY, i);
/*
* Using the same parameters, it may sometimes pass the test,
-@@ -1437,7 +1446,7 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1437,7 +1446,7 @@ static int msdc_tune_response(struct mmc
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
for (i = 0; i < PAD_DELAY_MAX; i++) {
@@ -137,7 +135,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
MSDC_PAD_TUNE_CMDRDLY, i);
/*
* Using the same parameters, it may sometimes pass the test,
-@@ -1462,12 +1471,12 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1462,12 +1471,12 @@ skip_fall:
final_maxlen = final_fall_delay.maxlen;
if (final_maxlen == final_rise_delay.maxlen) {
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
@@ -152,7 +150,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
final_fall_delay.final_phase);
final_delay = final_fall_delay.final_phase;
}
-@@ -1475,7 +1484,7 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1475,7 +1484,7 @@ skip_fall:
goto skip_internal;
for (i = 0; i < PAD_DELAY_MAX; i++) {
@@ -161,7 +159,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
MSDC_PAD_TUNE_CMDRRDLY, i);
mmc_send_tuning(mmc, opcode, &cmd_err);
if (!cmd_err)
-@@ -1483,7 +1492,7 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1483,7 +1492,7 @@ skip_fall:
}
dev_dbg(host->dev, "Final internal delay: 0x%x\n", internal_delay);
internal_delay_phase = get_best_delay(host, internal_delay);
@@ -170,7 +168,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
internal_delay_phase.final_phase);
skip_internal:
dev_dbg(host->dev, "Final cmd pad delay: %x\n", final_delay);
-@@ -1545,12 +1554,13 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode)
+@@ -1545,12 +1554,13 @@ static int msdc_tune_data(struct mmc_hos
u32 rise_delay = 0, fall_delay = 0;
struct msdc_delay_phase final_rise_delay, final_fall_delay = { 0,};
u8 final_delay, final_maxlen;
@@ -185,7 +183,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
MSDC_PAD_TUNE_DATRRDLY, i);
ret = mmc_send_tuning(mmc, opcode, NULL);
if (!ret)
-@@ -1565,7 +1575,7 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode)
+@@ -1565,7 +1575,7 @@ static int msdc_tune_data(struct mmc_hos
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL);
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL);
for (i = 0; i < PAD_DELAY_MAX; i++) {
@@ -194,7 +192,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
MSDC_PAD_TUNE_DATRRDLY, i);
ret = mmc_send_tuning(mmc, opcode, NULL);
if (!ret)
-@@ -1578,14 +1588,14 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode)
+@@ -1578,14 +1588,14 @@ skip_fall:
if (final_maxlen == final_rise_delay.maxlen) {
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL);
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL);
@@ -211,7 +209,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
MSDC_PAD_TUNE_DATRRDLY,
final_fall_delay.final_phase);
final_delay = final_fall_delay.final_phase;
-@@ -1599,6 +1609,7 @@ static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode)
+@@ -1599,6 +1609,7 @@ static int msdc_execute_tuning(struct mm
{
struct msdc_host *host = mmc_priv(mmc);
int ret;
@@ -219,7 +217,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
if (host->hs400_mode &&
host->dev_comp->hs400_tune)
-@@ -1616,7 +1627,7 @@ static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode)
+@@ -1616,7 +1627,7 @@ static int msdc_execute_tuning(struct mm
}
host->saved_tune_para.iocon = readl(host->base + MSDC_IOCON);
@@ -228,7 +226,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
host->saved_tune_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
return ret;
}
-@@ -1857,10 +1868,12 @@ static int msdc_drv_remove(struct platform_device *pdev)
+@@ -1857,10 +1868,12 @@ static int msdc_drv_remove(struct platfo
#ifdef CONFIG_PM
static void msdc_save_reg(struct msdc_host *host)
{
@@ -242,7 +240,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
host->save_para.patch_bit0 = readl(host->base + MSDC_PATCH_BIT);
host->save_para.patch_bit1 = readl(host->base + MSDC_PATCH_BIT1);
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
-@@ -1870,10 +1883,12 @@ static void msdc_save_reg(struct msdc_host *host)
+@@ -1870,10 +1883,12 @@ static void msdc_save_reg(struct msdc_ho
static void msdc_restore_reg(struct msdc_host *host)
{
@@ -256,6 +254,3 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
writel(host->save_para.patch_bit0, host->base + MSDC_PATCH_BIT);
writel(host->save_para.patch_bit1, host->base + MSDC_PATCH_BIT1);
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0154-mmc-mediatek-add-async-fifo-and-data-tune-support.patch b/target/linux/mediatek/patches-4.14/0154-mmc-mediatek-add-async-fifo-and-data-tune-support.patch
index 0bd5ca13bc..abb263b712 100644
--- a/target/linux/mediatek/patches-4.14/0154-mmc-mediatek-add-async-fifo-and-data-tune-support.patch
+++ b/target/linux/mediatek/patches-4.14/0154-mmc-mediatek-add-async-fifo-and-data-tune-support.patch
@@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 52 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 50 insertions(+), 2 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index bcd83d6f2b86..8113bacc1540 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -74,6 +74,7 @@
@@ -63,7 +61,7 @@ index bcd83d6f2b86..8113bacc1540 100644
};
struct msdc_tune_para {
-@@ -365,24 +378,32 @@ static const struct mtk_mmc_compatible mt8135_compat = {
+@@ -365,24 +378,32 @@ static const struct mtk_mmc_compatible m
.clk_div_bits = 8,
.hs400_tune = false,
.pad_tune_reg = MSDC_PAD_TUNE,
@@ -96,7 +94,7 @@ index bcd83d6f2b86..8113bacc1540 100644
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -1252,8 +1273,29 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1252,8 +1273,29 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + MSDC_IOCON, MSDC_IOCON_DDLSEL, 0);
writel(0x403c0046, host->base + MSDC_PATCH_BIT);
sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1);
@@ -127,7 +125,7 @@ index bcd83d6f2b86..8113bacc1540 100644
/* Configure to enable SDIO mode.
* it's must otherwise sdio cmd5 failed
-@@ -1268,6 +1310,8 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1268,6 +1310,8 @@ static void msdc_init_hw(struct msdc_hos
host->def_tune_para.iocon = readl(host->base + MSDC_IOCON);
host->def_tune_para.pad_tune = readl(host->base + tune_reg);
@@ -136,7 +134,7 @@ index bcd83d6f2b86..8113bacc1540 100644
dev_dbg(host->dev, "init hardware done!");
}
-@@ -1480,7 +1524,7 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1480,7 +1524,7 @@ skip_fall:
final_fall_delay.final_phase);
final_delay = final_fall_delay.final_phase;
}
@@ -145,7 +143,7 @@ index bcd83d6f2b86..8113bacc1540 100644
goto skip_internal;
for (i = 0; i < PAD_DELAY_MAX; i++) {
-@@ -1638,6 +1682,8 @@ static int msdc_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios)
+@@ -1638,6 +1682,8 @@ static int msdc_prepare_hs400_tuning(str
host->hs400_mode = true;
writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE);
@@ -154,7 +152,7 @@ index bcd83d6f2b86..8113bacc1540 100644
return 0;
}
-@@ -1876,6 +1922,7 @@ static void msdc_save_reg(struct msdc_host *host)
+@@ -1876,6 +1922,7 @@ static void msdc_save_reg(struct msdc_ho
host->save_para.pad_tune = readl(host->base + tune_reg);
host->save_para.patch_bit0 = readl(host->base + MSDC_PATCH_BIT);
host->save_para.patch_bit1 = readl(host->base + MSDC_PATCH_BIT1);
@@ -162,7 +160,7 @@ index bcd83d6f2b86..8113bacc1540 100644
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0);
-@@ -1891,6 +1938,7 @@ static void msdc_restore_reg(struct msdc_host *host)
+@@ -1891,6 +1938,7 @@ static void msdc_restore_reg(struct msdc
writel(host->save_para.pad_tune, host->base + tune_reg);
writel(host->save_para.patch_bit0, host->base + MSDC_PATCH_BIT);
writel(host->save_para.patch_bit1, host->base + MSDC_PATCH_BIT1);
@@ -170,6 +168,3 @@ index bcd83d6f2b86..8113bacc1540 100644
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE);
writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0155-mmc-mediatek-add-busy_check-support.patch b/target/linux/mediatek/patches-4.14/0155-mmc-mediatek-add-busy_check-support.patch
index 1e7aa7e7d7..3bb2df6b5b 100644
--- a/target/linux/mediatek/patches-4.14/0155-mmc-mediatek-add-busy_check-support.patch
+++ b/target/linux/mediatek/patches-4.14/0155-mmc-mediatek-add-busy_check-support.patch
@@ -14,8 +14,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 7 +++++++
1 file changed, 7 insertions(+)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 8113bacc1540..eceaee86ba4d 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -316,6 +316,7 @@ struct mtk_mmc_compatible {
@@ -26,7 +24,7 @@ index 8113bacc1540..eceaee86ba4d 100644
};
struct msdc_tune_para {
-@@ -380,6 +381,7 @@ static const struct mtk_mmc_compatible mt8135_compat = {
+@@ -380,6 +381,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE,
.async_fifo = false,
.data_tune = false,
@@ -34,7 +32,7 @@ index 8113bacc1540..eceaee86ba4d 100644
};
static const struct mtk_mmc_compatible mt8173_compat = {
-@@ -388,6 +390,7 @@ static const struct mtk_mmc_compatible mt8173_compat = {
+@@ -388,6 +390,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE,
.async_fifo = false,
.data_tune = false,
@@ -42,7 +40,7 @@ index 8113bacc1540..eceaee86ba4d 100644
};
static const struct mtk_mmc_compatible mt2701_compat = {
-@@ -396,6 +399,7 @@ static const struct mtk_mmc_compatible mt2701_compat = {
+@@ -396,6 +399,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE0,
.async_fifo = true,
.data_tune = true,
@@ -50,7 +48,7 @@ index 8113bacc1540..eceaee86ba4d 100644
};
static const struct mtk_mmc_compatible mt2712_compat = {
-@@ -404,6 +408,7 @@ static const struct mtk_mmc_compatible mt2712_compat = {
+@@ -404,6 +408,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE0,
.async_fifo = true,
.data_tune = true,
@@ -58,7 +56,7 @@ index 8113bacc1540..eceaee86ba4d 100644
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -1275,6 +1280,8 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1275,6 +1280,8 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1);
writel(0xffff4089, host->base + MSDC_PATCH_BIT1);
sdr_set_bits(host->base + EMMC50_CFG0, EMMC50_CFG_CFCSTS_SEL);
@@ -67,6 +65,3 @@ index 8113bacc1540..eceaee86ba4d 100644
if (host->dev_comp->async_fifo) {
sdr_set_field(host->base + MSDC_PATCH_BIT2,
MSDC_PB2_RESPWAIT, 3);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0156-mmc-mediatek-add-stop_clk-fix-and-enhance_rx-support.patch b/target/linux/mediatek/patches-4.14/0156-mmc-mediatek-add-stop_clk-fix-and-enhance_rx-support.patch
index 04c4ca5216..8db0a279e9 100644
--- a/target/linux/mediatek/patches-4.14/0156-mmc-mediatek-add-stop_clk-fix-and-enhance_rx-support.patch
+++ b/target/linux/mediatek/patches-4.14/0156-mmc-mediatek-add-stop_clk-fix-and-enhance_rx-support.patch
@@ -14,8 +14,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 47 +++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 43 insertions(+), 4 deletions(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index eceaee86ba4d..94d16a3a8d94 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -67,6 +67,7 @@
@@ -80,7 +78,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
};
struct msdc_tune_para {
-@@ -382,6 +395,8 @@ static const struct mtk_mmc_compatible mt8135_compat = {
+@@ -382,6 +395,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = false,
.data_tune = false,
.busy_check = false,
@@ -89,7 +87,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
};
static const struct mtk_mmc_compatible mt8173_compat = {
-@@ -391,6 +406,8 @@ static const struct mtk_mmc_compatible mt8173_compat = {
+@@ -391,6 +406,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = false,
.data_tune = false,
.busy_check = false,
@@ -98,7 +96,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
};
static const struct mtk_mmc_compatible mt2701_compat = {
-@@ -400,6 +417,8 @@ static const struct mtk_mmc_compatible mt2701_compat = {
+@@ -400,6 +417,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = true,
.data_tune = true,
.busy_check = false,
@@ -107,7 +105,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
};
static const struct mtk_mmc_compatible mt2712_compat = {
-@@ -409,6 +428,8 @@ static const struct mtk_mmc_compatible mt2712_compat = {
+@@ -409,6 +428,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = true,
.data_tune = true,
.busy_check = true,
@@ -116,7 +114,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
};
static const struct of_device_id msdc_of_ids[] = {
-@@ -1280,15 +1301,31 @@ static void msdc_init_hw(struct msdc_host *host)
+@@ -1280,15 +1301,31 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1);
writel(0xffff4089, host->base + MSDC_PATCH_BIT1);
sdr_set_bits(host->base + EMMC50_CFG0, EMMC50_CFG_CFCSTS_SEL);
@@ -152,7 +150,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
/* use async fifo, then no need tune internal delay */
sdr_clr_bits(host->base + MSDC_PATCH_BIT2,
MSDC_PATCH_BIT2_CFGRESP);
-@@ -1933,6 +1970,7 @@ static void msdc_save_reg(struct msdc_host *host)
+@@ -1933,6 +1970,7 @@ static void msdc_save_reg(struct msdc_ho
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0);
@@ -160,7 +158,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
}
static void msdc_restore_reg(struct msdc_host *host)
-@@ -1949,6 +1987,7 @@ static void msdc_restore_reg(struct msdc_host *host)
+@@ -1949,6 +1987,7 @@ static void msdc_restore_reg(struct msdc
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE);
writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0);
@@ -168,6 +166,3 @@ index eceaee86ba4d..94d16a3a8d94 100644
}
static int msdc_runtime_suspend(struct device *dev)
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0157-mmc-mediatek-add-support-of-source_cg-clock.patch b/target/linux/mediatek/patches-4.14/0157-mmc-mediatek-add-support-of-source_cg-clock.patch
index 89cb7c8617..8a183ceb54 100644
--- a/target/linux/mediatek/patches-4.14/0157-mmc-mediatek-add-support-of-source_cg-clock.patch
+++ b/target/linux/mediatek/patches-4.14/0157-mmc-mediatek-add-support-of-source_cg-clock.patch
@@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 94d16a3a8d94..a2f26c9b17b4 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -372,6 +372,7 @@ struct msdc_host {
@@ -25,7 +23,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
u32 mclk; /* mmc subsystem clock frequency */
u32 src_clk_freq; /* source clock frequency */
u32 sclk; /* SD/MS bus clock frequency */
-@@ -616,6 +617,7 @@ static void msdc_set_timeout(struct msdc_host *host, u32 ns, u32 clks)
+@@ -616,6 +617,7 @@ static void msdc_set_timeout(struct msdc
static void msdc_gate_clock(struct msdc_host *host)
{
@@ -33,7 +31,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
clk_disable_unprepare(host->src_clk);
clk_disable_unprepare(host->h_clk);
}
-@@ -624,6 +626,7 @@ static void msdc_ungate_clock(struct msdc_host *host)
+@@ -624,6 +626,7 @@ static void msdc_ungate_clock(struct msd
{
clk_prepare_enable(host->h_clk);
clk_prepare_enable(host->src_clk);
@@ -41,7 +39,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
while (!(readl(host->base + MSDC_CFG) & MSDC_CFG_CKSTB))
cpu_relax();
}
-@@ -692,6 +695,15 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -692,6 +695,15 @@ static void msdc_set_mclk(struct msdc_ho
sclk = (host->src_clk_freq >> 2) / div;
}
}
@@ -57,7 +55,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
if (host->dev_comp->clk_div_bits == 8)
sdr_set_field(host->base + MSDC_CFG,
MSDC_CFG_CKMOD | MSDC_CFG_CKDIV,
-@@ -700,10 +712,14 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz)
+@@ -700,10 +712,14 @@ static void msdc_set_mclk(struct msdc_ho
sdr_set_field(host->base + MSDC_CFG,
MSDC_CFG_CKMOD_EXTRA | MSDC_CFG_CKDIV_EXTRA,
(mode << 12) | div);
@@ -73,7 +71,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
host->sclk = sclk;
host->mclk = hz;
host->timing = timing;
-@@ -1822,6 +1838,11 @@ static int msdc_drv_probe(struct platform_device *pdev)
+@@ -1822,6 +1838,11 @@ static int msdc_drv_probe(struct platfor
goto host_free;
}
@@ -85,6 +83,3 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
host->irq = platform_get_irq(pdev, 0);
if (host->irq < 0) {
ret = -EINVAL;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0158-mmc-mediatek-add-latch-ck-support.patch b/target/linux/mediatek/patches-4.14/0158-mmc-mediatek-add-latch-ck-support.patch
index c2c00e8712..cad45f6cf8 100644
--- a/target/linux/mediatek/patches-4.14/0158-mmc-mediatek-add-latch-ck-support.patch
+++ b/target/linux/mediatek/patches-4.14/0158-mmc-mediatek-add-latch-ck-support.patch
@@ -14,8 +14,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 6 ++++++
1 file changed, 6 insertions(+)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index a2f26c9b17b4..d75a93d6803f 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -378,6 +378,7 @@ struct msdc_host {
@@ -26,7 +24,7 @@ index a2f26c9b17b4..d75a93d6803f 100644
u32 hs400_ds_delay;
u32 hs200_cmd_int_delay; /* cmd internal delay for HS200/SDR104 */
u32 hs400_cmd_int_delay; /* cmd internal delay for HS400 */
-@@ -1661,6 +1662,8 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode)
+@@ -1661,6 +1662,8 @@ static int msdc_tune_data(struct mmc_hos
u32 tune_reg = host->dev_comp->pad_tune_reg;
int i, ret;
@@ -35,7 +33,7 @@ index a2f26c9b17b4..d75a93d6803f 100644
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL);
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL);
for (i = 0 ; i < PAD_DELAY_MAX; i++) {
-@@ -1773,6 +1776,9 @@ static const struct mmc_host_ops mt_msdc_ops = {
+@@ -1773,6 +1776,9 @@ static const struct mmc_host_ops mt_msdc
static void msdc_of_property_parse(struct platform_device *pdev,
struct msdc_host *host)
{
@@ -45,6 +43,3 @@ index a2f26c9b17b4..d75a93d6803f 100644
of_property_read_u32(pdev->dev.of_node, "hs400-ds-delay",
&host->hs400_ds_delay);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0159-mmc-mediatek-improve-eMMC-hs400-mode-read-performanc.patch b/target/linux/mediatek/patches-4.14/0159-mmc-mediatek-improve-eMMC-hs400-mode-read-performanc.patch
index 9fd4f553ec..63aef198c2 100644
--- a/target/linux/mediatek/patches-4.14/0159-mmc-mediatek-improve-eMMC-hs400-mode-read-performanc.patch
+++ b/target/linux/mediatek/patches-4.14/0159-mmc-mediatek-improve-eMMC-hs400-mode-read-performanc.patch
@@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 9 +++++++++
1 file changed, 9 insertions(+)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index d75a93d6803f..95759bba0dd0 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -81,6 +81,7 @@
@@ -42,7 +40,7 @@ index d75a93d6803f..95759bba0dd0 100644
u32 sdc_fifo_cfg;
};
-@@ -1747,6 +1751,9 @@ static int msdc_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios)
+@@ -1747,6 +1751,9 @@ static int msdc_prepare_hs400_tuning(str
writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE);
/* hs400 mode must set it to 0 */
sdr_clr_bits(host->base + MSDC_PATCH_BIT2, MSDC_PATCH_BIT2_CFGCRCSTS);
@@ -52,7 +50,7 @@ index d75a93d6803f..95759bba0dd0 100644
return 0;
}
-@@ -1997,6 +2004,7 @@ static void msdc_save_reg(struct msdc_host *host)
+@@ -1997,6 +2004,7 @@ static void msdc_save_reg(struct msdc_ho
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0);
@@ -60,7 +58,7 @@ index d75a93d6803f..95759bba0dd0 100644
host->save_para.sdc_fifo_cfg = readl(host->base + SDC_FIFO_CFG);
}
-@@ -2014,6 +2022,7 @@ static void msdc_restore_reg(struct msdc_host *host)
+@@ -2014,6 +2022,7 @@ static void msdc_restore_reg(struct msdc
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE);
writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0);
@@ -68,6 +66,3 @@ index d75a93d6803f..95759bba0dd0 100644
writel(host->save_para.sdc_fifo_cfg, host->base + SDC_FIFO_CFG);
}
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0160-mmc-mediatek-perfer-to-use-rise-edge-latching-for-cm.patch b/target/linux/mediatek/patches-4.14/0160-mmc-mediatek-perfer-to-use-rise-edge-latching-for-cm.patch
index c34bf12445..6da13bec6e 100644
--- a/target/linux/mediatek/patches-4.14/0160-mmc-mediatek-perfer-to-use-rise-edge-latching-for-cm.patch
+++ b/target/linux/mediatek/patches-4.14/0160-mmc-mediatek-perfer-to-use-rise-edge-latching-for-cm.patch
@@ -14,11 +14,9 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 95759bba0dd0..27a62254f12f 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
-@@ -1550,7 +1550,8 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode)
+@@ -1550,7 +1550,8 @@ static int msdc_tune_response(struct mmc
}
final_rise_delay = get_best_delay(host, rise_delay);
/* if rising edge has enough margin, then do not scan falling edge */
@@ -28,6 +26,3 @@ index 95759bba0dd0..27a62254f12f 100644
goto skip_fall;
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0161-pwm-mediatek-Add-MT2712-MT7622-support.patch b/target/linux/mediatek/patches-4.14/0161-pwm-mediatek-Add-MT2712-MT7622-support.patch
index 2d91ab98a9..bca6ed5bbb 100644
--- a/target/linux/mediatek/patches-4.14/0161-pwm-mediatek-Add-MT2712-MT7622-support.patch
+++ b/target/linux/mediatek/patches-4.14/0161-pwm-mediatek-Add-MT2712-MT7622-support.patch
@@ -15,8 +15,6 @@ Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-mediatek.c | 53 ++++++++++++++++++++++++++++++++++++++--------
1 file changed, 44 insertions(+), 9 deletions(-)
-diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c
-index b52f3afb2ba1..f5d97e0ad52b 100644
--- a/drivers/pwm/pwm-mediatek.c
+++ b/drivers/pwm/pwm-mediatek.c
@@ -16,6 +16,7 @@
@@ -60,7 +58,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
static inline struct mtk_pwm_chip *to_mtk_pwm_chip(struct pwm_chip *chip)
{
return container_of(chip, struct mtk_pwm_chip, chip);
-@@ -103,14 +116,14 @@ static void mtk_pwm_clk_disable(struct pwm_chip *chip, struct pwm_device *pwm)
+@@ -103,14 +116,14 @@ static void mtk_pwm_clk_disable(struct p
static inline u32 mtk_pwm_readl(struct mtk_pwm_chip *chip, unsigned int num,
unsigned int offset)
{
@@ -77,7 +75,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
}
static int mtk_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
-@@ -185,6 +198,7 @@ static const struct pwm_ops mtk_pwm_ops = {
+@@ -185,6 +198,7 @@ static const struct pwm_ops mtk_pwm_ops
static int mtk_pwm_probe(struct platform_device *pdev)
{
@@ -85,7 +83,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
struct mtk_pwm_chip *pc;
struct resource *res;
unsigned int i;
-@@ -194,15 +208,22 @@ static int mtk_pwm_probe(struct platform_device *pdev)
+@@ -194,15 +208,22 @@ static int mtk_pwm_probe(struct platform
if (!pc)
return -ENOMEM;
@@ -110,7 +108,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
}
platform_set_drvdata(pdev, pc);
-@@ -210,7 +231,7 @@ static int mtk_pwm_probe(struct platform_device *pdev)
+@@ -210,7 +231,7 @@ static int mtk_pwm_probe(struct platform
pc->chip.dev = &pdev->dev;
pc->chip.ops = &mtk_pwm_ops;
pc->chip.base = -1;
@@ -119,7 +117,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
ret = pwmchip_add(&pc->chip);
if (ret < 0) {
-@@ -228,9 +249,23 @@ static int mtk_pwm_remove(struct platform_device *pdev)
+@@ -228,9 +249,23 @@ static int mtk_pwm_remove(struct platfor
return pwmchip_remove(&pc->chip);
}
@@ -145,6 +143,3 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
};
MODULE_DEVICE_TABLE(of, mtk_pwm_of_match);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch b/target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch
index df2bd3056f..d27209292a 100644
--- a/target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch
+++ b/target/linux/mediatek/patches-4.14/0162-mtd-nand-mtk-use-nand_reset-to-reset-NAND-devices-in.patch
@@ -15,11 +15,9 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_nand.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
-diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
-index d86a7d131cc0..6d0101e13ef6 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
-@@ -1540,7 +1540,6 @@ static int mtk_nfc_resume(struct device *dev)
+@@ -1540,7 +1540,6 @@ static int mtk_nfc_resume(struct device
struct mtk_nfc *nfc = dev_get_drvdata(dev);
struct mtk_nfc_nand_chip *chip;
struct nand_chip *nand;
@@ -27,7 +25,7 @@ index d86a7d131cc0..6d0101e13ef6 100644
int ret;
u32 i;
-@@ -1553,11 +1552,8 @@ static int mtk_nfc_resume(struct device *dev)
+@@ -1553,11 +1552,8 @@ static int mtk_nfc_resume(struct device
/* reset NAND chip if VCC was powered off */
list_for_each_entry(chip, &nfc->chips, node) {
nand = &chip->nand;
@@ -41,6 +39,3 @@ index d86a7d131cc0..6d0101e13ef6 100644
}
return 0;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0164-cpufreq-mediatek-add-mt2712-into-compatible-list.patch b/target/linux/mediatek/patches-4.14/0164-cpufreq-mediatek-add-mt2712-into-compatible-list.patch
index f44eabfe7c..865e82ee1d 100644
--- a/target/linux/mediatek/patches-4.14/0164-cpufreq-mediatek-add-mt2712-into-compatible-list.patch
+++ b/target/linux/mediatek/patches-4.14/0164-cpufreq-mediatek-add-mt2712-into-compatible-list.patch
@@ -12,11 +12,9 @@ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/mediatek-cpufreq.c | 1 +
1 file changed, 1 insertion(+)
-diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
-index 18c4bd9a5c65..62aec5cdbb26 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c
-@@ -574,6 +574,7 @@ static struct platform_driver mtk_cpufreq_platdrv = {
+@@ -574,6 +574,7 @@ static struct platform_driver mtk_cpufre
/* List of machines supported by this driver */
static const struct of_device_id mtk_cpufreq_machines[] __initconst = {
{ .compatible = "mediatek,mt2701", },
@@ -24,6 +22,3 @@ index 18c4bd9a5c65..62aec5cdbb26 100644
{ .compatible = "mediatek,mt7622", },
{ .compatible = "mediatek,mt7623", },
{ .compatible = "mediatek,mt817x", },
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0165-mtd-nand-mtk-update-DT-bindings.patch b/target/linux/mediatek/patches-4.14/0165-mtd-nand-mtk-update-DT-bindings.patch
index d60383eadd..d49f8cba09 100644
--- a/target/linux/mediatek/patches-4.14/0165-mtd-nand-mtk-update-DT-bindings.patch
+++ b/target/linux/mediatek/patches-4.14/0165-mtd-nand-mtk-update-DT-bindings.patch
@@ -12,8 +12,6 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Documentation/devicetree/bindings/mtd/mtk-nand.txt | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
-diff --git a/Documentation/devicetree/bindings/mtd/mtk-nand.txt b/Documentation/devicetree/bindings/mtd/mtk-nand.txt
-index dbf9e054c11c..0025bc4c94a0 100644
--- a/Documentation/devicetree/bindings/mtd/mtk-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/mtk-nand.txt
@@ -12,8 +12,10 @@ tree nodes.
@@ -41,6 +39,3 @@ index dbf9e054c11c..0025bc4c94a0 100644
- reg: Base physical address and size of ECC.
- interrupts: Interrupts of ECC.
- clocks: ECC required clocks.
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0166-mtd-nand-mtk-Support-different-MTK-NAND-flash-contro.patch b/target/linux/mediatek/patches-4.14/0166-mtd-nand-mtk-Support-different-MTK-NAND-flash-contro.patch
index b890a8d766..437901c943 100644
--- a/target/linux/mediatek/patches-4.14/0166-mtd-nand-mtk-Support-different-MTK-NAND-flash-contro.patch
+++ b/target/linux/mediatek/patches-4.14/0166-mtd-nand-mtk-Support-different-MTK-NAND-flash-contro.patch
@@ -30,8 +30,6 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_nand.c | 27 ++++++++----
3 files changed, 89 insertions(+), 41 deletions(-)
-diff --git a/drivers/mtd/nand/mtk_ecc.c b/drivers/mtd/nand/mtk_ecc.c
-index c51d214d169e..6610eefaa92b 100644
--- a/drivers/mtd/nand/mtk_ecc.c
+++ b/drivers/mtd/nand/mtk_ecc.c
@@ -34,34 +34,28 @@
@@ -72,7 +70,7 @@ index c51d214d169e..6610eefaa92b 100644
int pg_irq_sel;
};
-@@ -89,6 +83,33 @@ static const u8 ecc_strength_mt2712[] = {
+@@ -89,6 +83,33 @@ static const u8 ecc_strength_mt2712[] =
40, 44, 48, 52, 56, 60, 68, 72, 80
};
@@ -106,7 +104,7 @@ index c51d214d169e..6610eefaa92b 100644
static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc,
enum mtk_ecc_operation op)
{
-@@ -107,32 +128,30 @@ static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc,
+@@ -107,32 +128,30 @@ static inline void mtk_ecc_wait_idle(str
static irqreturn_t mtk_ecc_irq(int irq, void *id)
{
struct mtk_ecc *ecc = id;
@@ -147,7 +145,7 @@ index c51d214d169e..6610eefaa92b 100644
}
return IRQ_HANDLED;
-@@ -160,7 +179,7 @@ static int mtk_ecc_config(struct mtk_ecc *ecc, struct mtk_ecc_config *config)
+@@ -160,7 +179,7 @@ static int mtk_ecc_config(struct mtk_ecc
/* configure ECC encoder (in bits) */
enc_sz = config->len << 3;
@@ -156,7 +154,7 @@ index c51d214d169e..6610eefaa92b 100644
reg |= (enc_sz << ECC_MS_SHIFT);
writel(reg, ecc->regs + ECC_ENCCNFG);
-@@ -171,9 +190,9 @@ static int mtk_ecc_config(struct mtk_ecc *ecc, struct mtk_ecc_config *config)
+@@ -171,9 +190,9 @@ static int mtk_ecc_config(struct mtk_ecc
} else {
/* configure ECC decoder (in bits) */
dec_sz = (config->len << 3) +
@@ -168,7 +166,7 @@ index c51d214d169e..6610eefaa92b 100644
reg |= (dec_sz << ECC_MS_SHIFT) | DEC_CNFG_CORRECT;
reg |= DEC_EMPTY_EN;
writel(reg, ecc->regs + ECC_DECCNFG);
-@@ -291,7 +310,12 @@ int mtk_ecc_enable(struct mtk_ecc *ecc, struct mtk_ecc_config *config)
+@@ -291,7 +310,12 @@ int mtk_ecc_enable(struct mtk_ecc *ecc,
*/
if (ecc->caps->pg_irq_sel && config->mode == ECC_NFI_MODE)
reg_val |= ECC_PG_IRQ_SEL;
@@ -182,7 +180,7 @@ index c51d214d169e..6610eefaa92b 100644
}
writew(ECC_OP_ENABLE, ecc->regs + ECC_CTL_REG(op));
-@@ -310,13 +334,17 @@ void mtk_ecc_disable(struct mtk_ecc *ecc)
+@@ -310,13 +334,17 @@ void mtk_ecc_disable(struct mtk_ecc *ecc
/* disable it */
mtk_ecc_wait_idle(ecc, op);
@@ -203,7 +201,7 @@ index c51d214d169e..6610eefaa92b 100644
writew(ECC_OP_DISABLE, ecc->regs + ECC_CTL_REG(op));
mutex_unlock(&ecc->lock);
-@@ -367,11 +395,11 @@ int mtk_ecc_encode(struct mtk_ecc *ecc, struct mtk_ecc_config *config,
+@@ -367,11 +395,11 @@ int mtk_ecc_encode(struct mtk_ecc *ecc,
mtk_ecc_wait_idle(ecc, ECC_ENCODE);
/* Program ECC bytes to OOB: per sector oob = FDM + ECC + SPARE */
@@ -217,7 +215,7 @@ index c51d214d169e..6610eefaa92b 100644
round_up(len, 4));
/* copy into possibly unaligned OOB region with actual length */
-@@ -404,19 +432,29 @@ void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p)
+@@ -404,19 +432,29 @@ void mtk_ecc_adjust_strength(struct mtk_
}
EXPORT_SYMBOL(mtk_ecc_adjust_strength);
@@ -249,7 +247,7 @@ index c51d214d169e..6610eefaa92b 100644
.pg_irq_sel = 1,
};
-@@ -452,7 +490,7 @@ static int mtk_ecc_probe(struct platform_device *pdev)
+@@ -452,7 +490,7 @@ static int mtk_ecc_probe(struct platform
max_eccdata_size = ecc->caps->num_ecc_strength - 1;
max_eccdata_size = ecc->caps->ecc_strength[max_eccdata_size];
@@ -258,8 +256,6 @@ index c51d214d169e..6610eefaa92b 100644
max_eccdata_size = round_up(max_eccdata_size, 4);
ecc->eccdata = devm_kzalloc(dev, max_eccdata_size, GFP_KERNEL);
if (!ecc->eccdata)
-diff --git a/drivers/mtd/nand/mtk_ecc.h b/drivers/mtd/nand/mtk_ecc.h
-index d245c14f1b80..a455df080952 100644
--- a/drivers/mtd/nand/mtk_ecc.h
+++ b/drivers/mtd/nand/mtk_ecc.h
@@ -14,8 +14,6 @@
@@ -271,7 +267,7 @@ index d245c14f1b80..a455df080952 100644
enum mtk_ecc_mode {ECC_DMA_MODE = 0, ECC_NFI_MODE = 1};
enum mtk_ecc_operation {ECC_ENCODE, ECC_DECODE};
-@@ -43,6 +41,7 @@ int mtk_ecc_wait_done(struct mtk_ecc *, enum mtk_ecc_operation);
+@@ -43,6 +41,7 @@ int mtk_ecc_wait_done(struct mtk_ecc *,
int mtk_ecc_enable(struct mtk_ecc *, struct mtk_ecc_config *);
void mtk_ecc_disable(struct mtk_ecc *);
void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p);
@@ -279,8 +275,6 @@ index d245c14f1b80..a455df080952 100644
struct mtk_ecc *of_mtk_ecc_get(struct device_node *);
void mtk_ecc_release(struct mtk_ecc *);
-diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
-index 6d0101e13ef6..7349aa846f9a 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -97,7 +97,6 @@
@@ -300,7 +294,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
};
struct mtk_nfc_bad_mark_ctl {
-@@ -450,7 +451,7 @@ static inline u8 mtk_nfc_read_byte(struct mtd_info *mtd)
+@@ -450,7 +451,7 @@ static inline u8 mtk_nfc_read_byte(struc
* set to max sector to allow the HW to continue reading over
* unaligned accesses
*/
@@ -309,7 +303,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
nfi_writel(nfc, reg, NFI_CON);
/* trigger to fetch data */
-@@ -481,7 +482,7 @@ static void mtk_nfc_write_byte(struct mtd_info *mtd, u8 byte)
+@@ -481,7 +482,7 @@ static void mtk_nfc_write_byte(struct mt
reg = nfi_readw(nfc, NFI_CNFG) | CNFG_BYTE_RW;
nfi_writew(nfc, reg, NFI_CNFG);
@@ -318,7 +312,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
nfi_writel(nfc, reg, NFI_CON);
nfi_writew(nfc, STAR_EN, NFI_STRDATA);
-@@ -1126,9 +1127,11 @@ static void mtk_nfc_set_fdm(struct mtk_nfc_fdm *fdm, struct mtd_info *mtd)
+@@ -1126,9 +1127,11 @@ static void mtk_nfc_set_fdm(struct mtk_n
{
struct nand_chip *nand = mtd_to_nand(mtd);
struct mtk_nfc_nand_chip *chip = to_mtk_nand(nand);
@@ -331,7 +325,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
fdm->reg_size = chip->spare_per_sector - ecc_bytes;
if (fdm->reg_size > NFI_FDM_MAX_SIZE)
-@@ -1208,7 +1211,8 @@ static int mtk_nfc_ecc_init(struct device *dev, struct mtd_info *mtd)
+@@ -1208,7 +1211,8 @@ static int mtk_nfc_ecc_init(struct devic
* this controller only supports 512 and 1024 sizes
*/
if (nand->ecc.size < 1024) {
@@ -341,7 +335,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
nand->ecc.size = 1024;
nand->ecc.strength <<= 1;
} else {
-@@ -1223,7 +1227,8 @@ static int mtk_nfc_ecc_init(struct device *dev, struct mtd_info *mtd)
+@@ -1223,7 +1227,8 @@ static int mtk_nfc_ecc_init(struct devic
return ret;
/* calculate oob bytes except ecc parity data */
@@ -351,7 +345,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
free = spare - free;
/*
-@@ -1233,10 +1238,12 @@ static int mtk_nfc_ecc_init(struct device *dev, struct mtd_info *mtd)
+@@ -1233,10 +1238,12 @@ static int mtk_nfc_ecc_init(struct devic
*/
if (free > NFI_FDM_MAX_SIZE) {
spare -= NFI_FDM_MAX_SIZE;
@@ -366,7 +360,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
}
}
-@@ -1389,6 +1396,8 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2701 = {
+@@ -1389,6 +1396,8 @@ static const struct mtk_nfc_caps mtk_nfc
.num_spare_size = 16,
.pageformat_spare_shift = 4,
.nfi_clk_div = 1,
@@ -375,7 +369,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
};
static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = {
-@@ -1396,6 +1405,8 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = {
+@@ -1396,6 +1405,8 @@ static const struct mtk_nfc_caps mtk_nfc
.num_spare_size = 19,
.pageformat_spare_shift = 16,
.nfi_clk_div = 2,
@@ -384,6 +378,3 @@ index 6d0101e13ef6..7349aa846f9a 100644
};
static const struct of_device_id mtk_nfc_id_table[] = {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0167-mtd-nand-mtk-Support-MT7622-NAND-flash-controller.patch b/target/linux/mediatek/patches-4.14/0167-mtd-nand-mtk-Support-MT7622-NAND-flash-controller.patch
index d7550ee7e8..7763e0644d 100644
--- a/target/linux/mediatek/patches-4.14/0167-mtd-nand-mtk-Support-MT7622-NAND-flash-controller.patch
+++ b/target/linux/mediatek/patches-4.14/0167-mtd-nand-mtk-Support-MT7622-NAND-flash-controller.patch
@@ -12,11 +12,9 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_nand.c | 16 ++++++++++++++++
2 files changed, 42 insertions(+)
-diff --git a/drivers/mtd/nand/mtk_ecc.c b/drivers/mtd/nand/mtk_ecc.c
-index 6610eefaa92b..40d86a861a70 100644
--- a/drivers/mtd/nand/mtk_ecc.c
+++ b/drivers/mtd/nand/mtk_ecc.c
-@@ -83,6 +83,10 @@ static const u8 ecc_strength_mt2712[] = {
+@@ -83,6 +83,10 @@ static const u8 ecc_strength_mt2712[] =
40, 44, 48, 52, 56, 60, 68, 72, 80
};
@@ -43,7 +41,7 @@ index 6610eefaa92b..40d86a861a70 100644
static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc,
enum mtk_ecc_operation op)
{
-@@ -458,6 +471,16 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = {
+@@ -458,6 +471,16 @@ static const struct mtk_ecc_caps mtk_ecc
.pg_irq_sel = 1,
};
@@ -60,7 +58,7 @@ index 6610eefaa92b..40d86a861a70 100644
static const struct of_device_id mtk_ecc_dt_match[] = {
{
.compatible = "mediatek,mt2701-ecc",
-@@ -465,6 +488,9 @@ static const struct of_device_id mtk_ecc_dt_match[] = {
+@@ -465,6 +488,9 @@ static const struct of_device_id mtk_ecc
}, {
.compatible = "mediatek,mt2712-ecc",
.data = &mtk_ecc_caps_mt2712,
@@ -70,8 +68,6 @@ index 6610eefaa92b..40d86a861a70 100644
},
{},
};
-diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
-index 7349aa846f9a..8f71b405d639 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -174,6 +174,10 @@ static const u8 spare_size_mt2712[] = {
@@ -85,7 +81,7 @@ index 7349aa846f9a..8f71b405d639 100644
static inline struct mtk_nfc_nand_chip *to_mtk_nand(struct nand_chip *nand)
{
return container_of(nand, struct mtk_nfc_nand_chip, nand);
-@@ -1409,6 +1413,15 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = {
+@@ -1409,6 +1413,15 @@ static const struct mtk_nfc_caps mtk_nfc
.max_sector_size = 1024,
};
@@ -101,7 +97,7 @@ index 7349aa846f9a..8f71b405d639 100644
static const struct of_device_id mtk_nfc_id_table[] = {
{
.compatible = "mediatek,mt2701-nfc",
-@@ -1416,6 +1429,9 @@ static const struct of_device_id mtk_nfc_id_table[] = {
+@@ -1416,6 +1429,9 @@ static const struct of_device_id mtk_nfc
}, {
.compatible = "mediatek,mt2712-nfc",
.data = &mtk_nfc_caps_mt2712,
@@ -111,6 +107,3 @@ index 7349aa846f9a..8f71b405d639 100644
},
{}
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0168-mmc-dt-bindings-add-mmc-support-to-MT7623-SoC.patch b/target/linux/mediatek/patches-4.14/0168-mmc-dt-bindings-add-mmc-support-to-MT7623-SoC.patch
index c68b21fdbd..d167281249 100644
--- a/target/linux/mediatek/patches-4.14/0168-mmc-dt-bindings-add-mmc-support-to-MT7623-SoC.patch
+++ b/target/linux/mediatek/patches-4.14/0168-mmc-dt-bindings-add-mmc-support-to-MT7623-SoC.patch
@@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
-index 72d2a734ab85..9b8017670870 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -12,6 +12,8 @@ Required properties:
@@ -26,6 +24,3 @@ index 72d2a734ab85..9b8017670870 100644
- reg: physical base address of the controller and length
- interrupts: Should contain MSDC interrupt number
- clocks: Should contain phandle for the clock feeding the MMC controller
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0169-dt-bindings-pinctrl-add-bindings-for-MediaTek-MT7622.patch b/target/linux/mediatek/patches-4.14/0169-dt-bindings-pinctrl-add-bindings-for-MediaTek-MT7622.patch
index b8679be22d..769de29bc3 100644
--- a/target/linux/mediatek/patches-4.14/0169-dt-bindings-pinctrl-add-bindings-for-MediaTek-MT7622.patch
+++ b/target/linux/mediatek/patches-4.14/0169-dt-bindings-pinctrl-add-bindings-for-MediaTek-MT7622.patch
@@ -15,9 +15,6 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 file changed, 351 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
-diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
-new file mode 100644
-index 000000000000..f18ed99f6e14
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
@@ -0,0 +1,351 @@
@@ -372,6 +369,3 @@ index 000000000000..f18ed99f6e14
+ };
+ };
+ };
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0170-pinctrl-mediatek-cleanup-for-placing-all-drivers-und.patch b/target/linux/mediatek/patches-4.14/0170-pinctrl-mediatek-cleanup-for-placing-all-drivers-und.patch
index 264cfda099..780cc10868 100644
--- a/target/linux/mediatek/patches-4.14/0170-pinctrl-mediatek-cleanup-for-placing-all-drivers-und.patch
+++ b/target/linux/mediatek/patches-4.14/0170-pinctrl-mediatek-cleanup-for-placing-all-drivers-und.patch
@@ -15,8 +15,6 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
-index fac9866311f3..03b3023d5fe5 100644
--- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig
@@ -1,4 +1,5 @@
@@ -32,6 +30,3 @@ index fac9866311f3..03b3023d5fe5 100644
-endif
+endmenu
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0171-pinctrl-mediatek-add-pinctrl-driver-for-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0171-pinctrl-mediatek-add-pinctrl-driver-for-MT7622-SoC.patch
index 312900ca37..c3a09f2720 100644
--- a/target/linux/mediatek/patches-4.14/0171-pinctrl-mediatek-add-pinctrl-driver-for-MT7622-SoC.patch
+++ b/target/linux/mediatek/patches-4.14/0171-pinctrl-mediatek-add-pinctrl-driver-for-MT7622-SoC.patch
@@ -32,19 +32,15 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
4 files changed, 1608 insertions(+), 2 deletions(-)
create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt7622.c
-diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
-index c16e27900dbb..3a798d5b0900 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
-@@ -63,5 +63,5 @@ obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/
+@@ -64,5 +64,5 @@ obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/
obj-y += ti/
obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/
obj-$(CONFIG_ARCH_VT8500) += vt8500/
-obj-$(CONFIG_PINCTRL_MTK) += mediatek/
+obj-y += mediatek/
obj-$(CONFIG_PINCTRL_ZX) += zte/
-diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
-index 03b3023d5fe5..3e598740b379 100644
--- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig
@@ -32,6 +32,16 @@ config PINCTRL_MT8127
@@ -64,11 +60,10 @@ index 03b3023d5fe5..3e598740b379 100644
config PINCTRL_MT8173
bool "Mediatek MT8173 pin control"
depends on OF
-diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile
-index e59c613d4ddd..6e3ca6bbda7a 100644
--- a/drivers/pinctrl/mediatek/Makefile
+++ b/drivers/pinctrl/mediatek/Makefile
-@@ -1,9 +1,10 @@
+@@ -1,10 +1,11 @@
+ # SPDX-License-Identifier: GPL-2.0
# Core
-obj-y += pinctrl-mtk-common.o
+obj-$(CONFIG_PINCTRL_MTK) += pinctrl-mtk-common.o
@@ -80,9 +75,6 @@ index e59c613d4ddd..6e3ca6bbda7a 100644
+obj-$(CONFIG_PINCTRL_MT7622) += pinctrl-mt7622.o
obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o
obj-$(CONFIG_PINCTRL_MT6397) += pinctrl-mt6397.o
-diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
-new file mode 100644
-index 000000000000..3824d82888ac
--- /dev/null
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -0,0 +1,1595 @@
@@ -1681,6 +1673,3 @@ index 000000000000..3824d82888ac
+ return platform_driver_register(&mtk_pinctrl_driver);
+}
+arch_initcall(mtk_pinctrl_init);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0172-clk-mediatek-group-drivers-under-indpendent-menu.patch b/target/linux/mediatek/patches-4.14/0172-clk-mediatek-group-drivers-under-indpendent-menu.patch
index ce16723af7..2e4c233e87 100644
--- a/target/linux/mediatek/patches-4.14/0172-clk-mediatek-group-drivers-under-indpendent-menu.patch
+++ b/target/linux/mediatek/patches-4.14/0172-clk-mediatek-group-drivers-under-indpendent-menu.patch
@@ -14,8 +14,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/mediatek/Kconfig | 96 +++++++++++++++++++++++---------------------
1 file changed, 50 insertions(+), 46 deletions(-)
-diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
-index 59dc0aad553c..7338f816c603 100644
--- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig
@@ -1,136 +1,139 @@
@@ -223,6 +221,3 @@ index 59dc0aad553c..7338f816c603 100644
- This driver supports Mediatek MT8173 clocks.
+ This driver supports MediaTek MT8173 clocks.
+endmenu
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0173-clk-mediatek-fixup-test-building-of-MediaTek-clock-d.patch b/target/linux/mediatek/patches-4.14/0173-clk-mediatek-fixup-test-building-of-MediaTek-clock-d.patch
index 386a15a568..f8a755003a 100644
--- a/target/linux/mediatek/patches-4.14/0173-clk-mediatek-fixup-test-building-of-MediaTek-clock-d.patch
+++ b/target/linux/mediatek/patches-4.14/0173-clk-mediatek-fixup-test-building-of-MediaTek-clock-d.patch
@@ -14,11 +14,9 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
-index c99f363826f0..838000f92b69 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
-@@ -66,7 +66,7 @@ obj-$(CONFIG_ARCH_MXC) += imx/
+@@ -67,7 +67,7 @@ obj-$(CONFIG_ARCH_MXC) += imx/
obj-$(CONFIG_MACH_INGENIC) += ingenic/
obj-$(CONFIG_ARCH_KEYSTONE) += keystone/
obj-$(CONFIG_MACH_LOONGSON32) += loongson1/
@@ -27,6 +25,3 @@ index c99f363826f0..838000f92b69 100644
obj-$(CONFIG_COMMON_CLK_AMLOGIC) += meson/
obj-$(CONFIG_MACH_PIC32) += microchip/
ifeq ($(CONFIG_COMMON_CLK), y)
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0174-dt-bindings-net-mediatek-add-condition-to-property-m.patch b/target/linux/mediatek/patches-4.14/0174-dt-bindings-net-mediatek-add-condition-to-property-m.patch
index aed5ec59f3..ae63b2f50b 100644
--- a/target/linux/mediatek/patches-4.14/0174-dt-bindings-net-mediatek-add-condition-to-property-m.patch
+++ b/target/linux/mediatek/patches-4.14/0174-dt-bindings-net-mediatek-add-condition-to-property-m.patch
@@ -14,8 +14,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/devicetree/bindings/net/mediatek-net.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Documentation/devicetree/bindings/net/mediatek-net.txt b/Documentation/devicetree/bindings/net/mediatek-net.txt
-index 214eaa9a6683..53c13ee384a4 100644
--- a/Documentation/devicetree/bindings/net/mediatek-net.txt
+++ b/Documentation/devicetree/bindings/net/mediatek-net.txt
@@ -28,7 +28,7 @@ Required properties:
@@ -27,6 +25,3 @@ index 214eaa9a6683..53c13ee384a4 100644
Optional properties:
- interrupt-parent: Should be the phandle for the interrupt controller
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0175-net-mediatek-remove-superfluous-pin-setup-for-MT7622.patch b/target/linux/mediatek/patches-4.14/0175-net-mediatek-remove-superfluous-pin-setup-for-MT7622.patch
index 3116f03f06..86354973b1 100644
--- a/target/linux/mediatek/patches-4.14/0175-net-mediatek-remove-superfluous-pin-setup-for-MT7622.patch
+++ b/target/linux/mediatek/patches-4.14/0175-net-mediatek-remove-superfluous-pin-setup-for-MT7622.patch
@@ -16,10 +16,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 +++
2 files changed, 24 insertions(+), 14 deletions(-)
-Index: linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-===================================================================
---- linux-4.14.37.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1976,14 +1976,16 @@ static int mtk_hw_init(struct mtk_eth *e
}
regmap_write(eth->ethsys, ETHSYS_SYSCFG0, val);
@@ -86,10 +84,8 @@ Index: linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.c
};
const struct of_device_id of_mtk_match[] = {
-Index: linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-===================================================================
---- linux-4.14.37.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-+++ linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -574,10 +574,13 @@ struct mtk_rx_ring {
* @caps Flags shown the extra capability for the SoC
* @required_clks Flags shown the bitmap for required clocks on
diff --git a/target/linux/mediatek/patches-4.14/0176-clk-mediatek-Fix-all-warnings-for-missing-struct-clk.patch b/target/linux/mediatek/patches-4.14/0176-clk-mediatek-Fix-all-warnings-for-missing-struct-clk.patch
index 911082bf4d..ee196a73e9 100644
--- a/target/linux/mediatek/patches-4.14/0176-clk-mediatek-Fix-all-warnings-for-missing-struct-clk.patch
+++ b/target/linux/mediatek/patches-4.14/0176-clk-mediatek-Fix-all-warnings-for-missing-struct-clk.patch
@@ -56,8 +56,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/mediatek/clk-mtk.h | 1 +
1 file changed, 1 insertion(+)
-diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
-index f10250dcece4..bf8006d41861 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -20,6 +20,7 @@
@@ -68,6 +66,3 @@ index f10250dcece4..bf8006d41861 100644
#define MAX_MUX_GATE_BIT 31
#define INVALID_MUX_GATE_BIT (MAX_MUX_GATE_BIT + 1)
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0177-phy-phy-mtk-tphy-use-auto-instead-of-force-to-bypass.patch b/target/linux/mediatek/patches-4.14/0177-phy-phy-mtk-tphy-use-auto-instead-of-force-to-bypass.patch
index 4b230cd622..fc993c3266 100644
--- a/target/linux/mediatek/patches-4.14/0177-phy-phy-mtk-tphy-use-auto-instead-of-force-to-bypass.patch
+++ b/target/linux/mediatek/patches-4.14/0177-phy-phy-mtk-tphy-use-auto-instead-of-force-to-bypass.patch
@@ -16,11 +16,9 @@ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/mediatek/phy-mtk-tphy.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
-diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
-index 402385f2562a..54cc44b2d289 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
-@@ -440,9 +440,9 @@ static void u2_phy_instance_init(struct mtk_tphy *tphy,
+@@ -440,9 +440,9 @@ static void u2_phy_instance_init(struct
u32 index = instance->index;
u32 tmp;
@@ -32,7 +30,7 @@ index 402385f2562a..54cc44b2d289 100644
tmp |= P2C_RG_XCVRSEL_VAL(1) | P2C_RG_DATAIN_VAL(0);
writel(tmp, com + U3P_U2PHYDTM0);
-@@ -502,10 +502,8 @@ static void u2_phy_instance_power_on(struct mtk_tphy *tphy,
+@@ -502,10 +502,8 @@ static void u2_phy_instance_power_on(str
u32 index = instance->index;
u32 tmp;
@@ -44,7 +42,7 @@ index 402385f2562a..54cc44b2d289 100644
writel(tmp, com + U3P_U2PHYDTM0);
/* OTG Enable */
-@@ -540,7 +538,6 @@ static void u2_phy_instance_power_off(struct mtk_tphy *tphy,
+@@ -540,7 +538,6 @@ static void u2_phy_instance_power_off(st
tmp = readl(com + U3P_U2PHYDTM0);
tmp &= ~(P2C_RG_XCVRSEL | P2C_RG_DATAIN);
@@ -52,7 +50,7 @@ index 402385f2562a..54cc44b2d289 100644
writel(tmp, com + U3P_U2PHYDTM0);
/* OTG Disable */
-@@ -548,18 +545,16 @@ static void u2_phy_instance_power_off(struct mtk_tphy *tphy,
+@@ -548,18 +545,16 @@ static void u2_phy_instance_power_off(st
tmp &= ~PA6_RG_U2_OTG_VBUSCMP_EN;
writel(tmp, com + U3P_USBPHYACR6);
@@ -75,6 +73,3 @@ index 402385f2562a..54cc44b2d289 100644
tmp = readl(com + U3D_U2PHYDCR0);
tmp &= ~P2C_RG_SIF_U2PLL_FORCE_ON;
writel(tmp, com + U3D_U2PHYDCR0);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0178-phy-phy-mtk-tphy-make-shared-banks-optional-for-V1-T.patch b/target/linux/mediatek/patches-4.14/0178-phy-phy-mtk-tphy-make-shared-banks-optional-for-V1-T.patch
index 78e913ea6f..31e4ade08b 100644
--- a/target/linux/mediatek/patches-4.14/0178-phy-phy-mtk-tphy-make-shared-banks-optional-for-V1-T.patch
+++ b/target/linux/mediatek/patches-4.14/0178-phy-phy-mtk-tphy-make-shared-banks-optional-for-V1-T.patch
@@ -13,11 +13,9 @@ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/mediatek/phy-mtk-tphy.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
-diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
-index 54cc44b2d289..11cab1d84a02 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
-@@ -1023,9 +1023,10 @@ static int mtk_tphy_probe(struct platform_device *pdev)
+@@ -1023,9 +1023,10 @@ static int mtk_tphy_probe(struct platfor
tphy->dev = dev;
platform_set_drvdata(pdev, tphy);
@@ -30,6 +28,3 @@ index 54cc44b2d289..11cab1d84a02 100644
tphy->sif_base = devm_ioremap_resource(dev, sif_res);
if (IS_ERR(tphy->sif_base)) {
dev_err(dev, "failed to remap sif regs\n");
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0179-phy-phy-mtk-tphy-use-of_device_get_match_data.patch b/target/linux/mediatek/patches-4.14/0179-phy-phy-mtk-tphy-use-of_device_get_match_data.patch
index e28ab55c3a..db77ca299e 100644
--- a/target/linux/mediatek/patches-4.14/0179-phy-phy-mtk-tphy-use-of_device_get_match_data.patch
+++ b/target/linux/mediatek/patches-4.14/0179-phy-phy-mtk-tphy-use-of_device_get_match_data.patch
@@ -11,8 +11,6 @@ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/mediatek/phy-mtk-tphy.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
-diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
-index 11cab1d84a02..1e96d0740ef5 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -20,6 +20,7 @@
@@ -23,7 +21,7 @@ index 11cab1d84a02..1e96d0740ef5 100644
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
-@@ -995,7 +996,6 @@ MODULE_DEVICE_TABLE(of, mtk_tphy_id_table);
+@@ -995,7 +996,6 @@ MODULE_DEVICE_TABLE(of, mtk_tphy_id_tabl
static int mtk_tphy_probe(struct platform_device *pdev)
{
@@ -31,7 +29,7 @@ index 11cab1d84a02..1e96d0740ef5 100644
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct device_node *child_np;
-@@ -1005,15 +1005,14 @@ static int mtk_tphy_probe(struct platform_device *pdev)
+@@ -1005,15 +1005,14 @@ static int mtk_tphy_probe(struct platfor
struct resource res;
int port, retval;
@@ -51,6 +49,3 @@ index 11cab1d84a02..1e96d0740ef5 100644
tphy->nphys = of_get_child_count(np);
tphy->phys = devm_kcalloc(dev, tphy->nphys,
sizeof(*tphy->phys), GFP_KERNEL);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0180-ASoC-mediatek-fix-error-handling-in-mt2701_afe_pcm_d.patch b/target/linux/mediatek/patches-4.14/0180-ASoC-mediatek-fix-error-handling-in-mt2701_afe_pcm_d.patch
index 074baa04b2..358f3d3ab9 100644
--- a/target/linux/mediatek/patches-4.14/0180-ASoC-mediatek-fix-error-handling-in-mt2701_afe_pcm_d.patch
+++ b/target/linux/mediatek/patches-4.14/0180-ASoC-mediatek-fix-error-handling-in-mt2701_afe_pcm_d.patch
@@ -14,11 +14,9 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 31 ++++++++++++++----------------
1 file changed, 14 insertions(+), 17 deletions(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-index 8fda182f849b..a7362d1cda1b 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-@@ -1590,12 +1590,16 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1590,12 +1590,16 @@ static int mt2701_afe_pcm_dev_probe(stru
}
platform_set_drvdata(pdev, afe);
@@ -40,7 +38,7 @@ index 8fda182f849b..a7362d1cda1b 100644
if (ret) {
dev_warn(dev, "err_platform\n");
goto err_platform;
-@@ -1610,35 +1614,28 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1610,35 +1614,28 @@ static int mt2701_afe_pcm_dev_probe(stru
goto err_dai_component;
}
@@ -81,6 +79,3 @@ index 8fda182f849b..a7362d1cda1b 100644
return 0;
}
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0181-ASoC-mediatek-rework-clock-functions-for-MT2701.patch b/target/linux/mediatek/patches-4.14/0181-ASoC-mediatek-rework-clock-functions-for-MT2701.patch
index 579749038c..59a98a6c80 100644
--- a/target/linux/mediatek/patches-4.14/0181-ASoC-mediatek-rework-clock-functions-for-MT2701.patch
+++ b/target/linux/mediatek/patches-4.14/0181-ASoC-mediatek-rework-clock-functions-for-MT2701.patch
@@ -30,8 +30,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 45 +-
4 files changed, 200 insertions(+), 442 deletions(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
-index affa7fb25dd9..75ccdca5811d 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -21,442 +21,256 @@
@@ -96,15 +94,14 @@ index affa7fb25dd9..75ccdca5811d 100644
{
struct mt2701_afe_private *afe_priv = afe->platform_priv;
- int i = 0;
--
++ int i;
+
- for (i = 0; i < MT2701_CLOCK_NUM; i++) {
- afe_priv->clocks[i] = devm_clk_get(afe->dev, aud_clks[i]);
- if (IS_ERR(afe_priv->clocks[i])) {
- dev_warn(afe->dev, "%s devm_clk_get %s fail\n",
- __func__, aud_clks[i]);
- return PTR_ERR(aud_clks[i]);
-+ int i;
-+
+ for (i = 0; i < MT2701_BASE_CLK_NUM; i++) {
+ afe_priv->base_ck[i] = devm_clk_get(afe->dev, base_clks[i]);
+ if (IS_ERR(afe_priv->base_ck[i])) {
@@ -119,10 +116,7 @@ index affa7fb25dd9..75ccdca5811d 100644
+ for (i = 0; i < MT2701_I2S_NUM; i++) {
+ struct mt2701_i2s_path *i2s_path = &afe_priv->i2s_path[i];
+ char name[13];
-
--int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
--{
-- int ret = 0;
++
+ snprintf(name, sizeof(name), "i2s%d_src_sel", i);
+ i2s_path->sel_ck = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->sel_ck)) {
@@ -130,12 +124,9 @@ index affa7fb25dd9..75ccdca5811d 100644
+ return PTR_ERR(i2s_path->sel_ck);
+ }
-- ret = mt2701_turn_on_a1sys_clock(afe);
-- if (ret) {
-- dev_err(afe->dev, "%s turn_on_a1sys_clock fail %d\n",
-- __func__, ret);
-- return ret;
-- }
+-int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
+-{
+- int ret = 0;
+ snprintf(name, sizeof(name), "i2s%d_src_div", i);
+ i2s_path->div_ck = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->div_ck)) {
@@ -143,11 +134,10 @@ index affa7fb25dd9..75ccdca5811d 100644
+ return PTR_ERR(i2s_path->div_ck);
+ }
-- ret = mt2701_turn_on_a2sys_clock(afe);
+- ret = mt2701_turn_on_a1sys_clock(afe);
- if (ret) {
-- dev_err(afe->dev, "%s turn_on_a2sys_clock fail %d\n",
+- dev_err(afe->dev, "%s turn_on_a1sys_clock fail %d\n",
- __func__, ret);
-- mt2701_turn_off_a1sys_clock(afe);
- return ret;
- }
+ snprintf(name, sizeof(name), "i2s%d_mclk_en", i);
@@ -157,20 +147,27 @@ index affa7fb25dd9..75ccdca5811d 100644
+ return PTR_ERR(i2s_path->mclk_ck);
+ }
-- ret = mt2701_turn_on_afe_clock(afe);
+- ret = mt2701_turn_on_a2sys_clock(afe);
- if (ret) {
-- dev_err(afe->dev, "%s turn_on_afe_clock fail %d\n",
+- dev_err(afe->dev, "%s turn_on_a2sys_clock fail %d\n",
- __func__, ret);
- mt2701_turn_off_a1sys_clock(afe);
-- mt2701_turn_off_a2sys_clock(afe);
- return ret;
+- }
+ snprintf(name, sizeof(name), "i2so%d_hop_ck", i);
+ i2s_path->hop_ck[I2S_OUT] = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->hop_ck[I2S_OUT])) {
+ dev_err(afe->dev, "failed to get %s\n", name);
+ return PTR_ERR(i2s_path->hop_ck[I2S_OUT]);
+ }
-+
+
+- ret = mt2701_turn_on_afe_clock(afe);
+- if (ret) {
+- dev_err(afe->dev, "%s turn_on_afe_clock fail %d\n",
+- __func__, ret);
+- mt2701_turn_off_a1sys_clock(afe);
+- mt2701_turn_off_a2sys_clock(afe);
+- return ret;
+ snprintf(name, sizeof(name), "i2si%d_hop_ck", i);
+ i2s_path->hop_ck[I2S_IN] = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->hop_ck[I2S_IN])) {
@@ -455,7 +452,9 @@ index affa7fb25dd9..75ccdca5811d 100644
- /* enable INFRA_SYS */
- ret = clk_prepare_enable(afe_priv->clocks[MT2701_AUD_INFRA_SYS_AUDIO]);
-- if (ret) {
++ /* Enable audio system */
++ ret = mt2701_afe_enable_audsys(afe);
+ if (ret) {
- dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
- __func__, aud_clks[MT2701_AUD_INFRA_SYS_AUDIO], ret);
- goto AFE_AUD_INFRA_ERR;
@@ -497,9 +496,7 @@ index affa7fb25dd9..75ccdca5811d 100644
-
- /* Set MT2701_AUD_ASM_M_SEL to MT2701_AUD_UNIVPLL2_D4 */
- ret = clk_prepare_enable(afe_priv->clocks[MT2701_AUD_ASM_M_SEL]);
-+ /* Enable audio system */
-+ ret = mt2701_afe_enable_audsys(afe);
- if (ret) {
+- if (ret) {
- dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
- __func__, aud_clks[MT2701_AUD_ASM_M_SEL], ret);
- goto AFE_AUD_ASM_M_ERR;
@@ -560,7 +557,8 @@ index affa7fb25dd9..75ccdca5811d 100644
+ AFE_DAC_CON0_AFE_ON, 0);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_INFRA_SYS_AUDIO]);
--
++ mt2701_afe_disable_audsys(afe);
+
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_AUDINTBUS]);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_ASM_H_SEL]);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_ASM_M_SEL]);
@@ -579,8 +577,6 @@ index affa7fb25dd9..75ccdca5811d 100644
- regmap_update_bits(afe->regmap, AUDIO_TOP_CON4,
- AUDIO_TOP_CON4_PDN_AFE_CONN,
- AUDIO_TOP_CON4_PDN_AFE_CONN);
-+ mt2701_afe_disable_audsys(afe);
-+
+ return 0;
}
@@ -643,8 +639,6 @@ index affa7fb25dd9..75ccdca5811d 100644
}
MODULE_DESCRIPTION("MT2701 afe clock control");
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
-index 6497d570cf09..15417d9d6597 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
@@ -21,16 +21,15 @@ struct mtk_base_afe;
@@ -671,8 +665,6 @@ index 6497d570cf09..15417d9d6597 100644
void mt2701_mclk_configuration(struct mtk_base_afe *afe, int id, int domain,
int mclk);
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-common.h b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
-index c19430e98adf..ce5bd4dc864d 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
@@ -69,53 +69,14 @@ enum {
@@ -764,11 +756,9 @@ index c19430e98adf..ce5bd4dc864d 100644
bool mrg_enable[MT2701_STREAM_DIR_NUM];
};
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-index a7362d1cda1b..33f809228f25 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-@@ -97,21 +97,12 @@ static int mt2701_afe_i2s_startup(struct snd_pcm_substream *substream,
+@@ -97,21 +97,12 @@ static int mt2701_afe_i2s_startup(struct
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform);
@@ -791,7 +781,7 @@ index a7362d1cda1b..33f809228f25 100644
}
static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream,
-@@ -151,9 +142,9 @@ static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream,
+@@ -151,9 +142,9 @@ static int mt2701_afe_i2s_path_shutdown(
/* disable i2s */
regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg,
ASYS_I2S_CON_I2S_EN, 0);
@@ -804,7 +794,7 @@ index a7362d1cda1b..33f809228f25 100644
return 0;
}
-@@ -165,7 +156,6 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream,
+@@ -165,7 +156,6 @@ static void mt2701_afe_i2s_shutdown(stru
struct mt2701_afe_private *afe_priv = afe->platform_priv;
int i2s_num = mt2701_dai_num_to_i2s(afe, dai->id);
struct mt2701_i2s_path *i2s_path;
@@ -812,7 +802,7 @@ index a7362d1cda1b..33f809228f25 100644
if (i2s_num < 0)
return;
-@@ -185,7 +175,7 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream,
+@@ -185,7 +175,7 @@ static void mt2701_afe_i2s_shutdown(stru
I2S_UNSTART:
/* disable mclk */
@@ -821,7 +811,7 @@ index a7362d1cda1b..33f809228f25 100644
}
static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream,
-@@ -251,9 +241,7 @@ static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream,
+@@ -251,9 +241,7 @@ static int mt2701_i2s_path_prepare_enabl
fs << i2s_data->i2s_asrc_fs_shift);
/* enable i2s */
@@ -832,7 +822,7 @@ index a7362d1cda1b..33f809228f25 100644
/* reset i2s hw status before enable */
regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg,
-@@ -339,9 +327,11 @@ static int mt2701_btmrg_startup(struct snd_pcm_substream *substream,
+@@ -339,9 +327,11 @@ static int mt2701_btmrg_startup(struct s
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform);
struct mt2701_afe_private *afe_priv = afe->platform_priv;
@@ -846,7 +836,7 @@ index a7362d1cda1b..33f809228f25 100644
afe_priv->mrg_enable[substream->stream] = 1;
return 0;
-@@ -406,9 +396,7 @@ static void mt2701_btmrg_shutdown(struct snd_pcm_substream *substream,
+@@ -406,9 +396,7 @@ static void mt2701_btmrg_shutdown(struct
AFE_MRGIF_CON_MRG_EN, 0);
regmap_update_bits(afe->regmap, AFE_MRGIF_CON,
AFE_MRGIF_CON_MRG_I2S_EN, 0);
@@ -857,7 +847,7 @@ index a7362d1cda1b..33f809228f25 100644
}
afe_priv->mrg_enable[substream->stream] = 0;
}
-@@ -1386,14 +1374,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1386,14 +1374,12 @@ static const struct mt2701_i2s_data mt27
{
{
.i2s_ctrl_reg = ASYS_I2SO1_CON,
@@ -872,7 +862,7 @@ index a7362d1cda1b..33f809228f25 100644
.i2s_asrc_fs_shift = 0,
.i2s_asrc_fs_mask = 0x1f,
-@@ -1402,14 +1388,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1402,14 +1388,12 @@ static const struct mt2701_i2s_data mt27
{
{
.i2s_ctrl_reg = ASYS_I2SO2_CON,
@@ -887,7 +877,7 @@ index a7362d1cda1b..33f809228f25 100644
.i2s_asrc_fs_shift = 5,
.i2s_asrc_fs_mask = 0x1f,
-@@ -1418,14 +1402,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1418,14 +1402,12 @@ static const struct mt2701_i2s_data mt27
{
{
.i2s_ctrl_reg = ASYS_I2SO3_CON,
@@ -902,7 +892,7 @@ index a7362d1cda1b..33f809228f25 100644
.i2s_asrc_fs_shift = 10,
.i2s_asrc_fs_mask = 0x1f,
-@@ -1434,14 +1416,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1434,14 +1416,12 @@ static const struct mt2701_i2s_data mt27
{
{
.i2s_ctrl_reg = ASYS_I2SO4_CON,
@@ -917,7 +907,7 @@ index a7362d1cda1b..33f809228f25 100644
.i2s_asrc_fs_shift = 15,
.i2s_asrc_fs_mask = 0x1f,
-@@ -1483,8 +1463,7 @@ static int mt2701_afe_runtime_suspend(struct device *dev)
+@@ -1483,8 +1463,7 @@ static int mt2701_afe_runtime_suspend(st
{
struct mtk_base_afe *afe = dev_get_drvdata(dev);
@@ -927,6 +917,3 @@ index a7362d1cda1b..33f809228f25 100644
}
static int mt2701_afe_runtime_resume(struct device *dev)
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0182-ASoC-mediatek-cleanup-audio-driver-for-MT2701.patch b/target/linux/mediatek/patches-4.14/0182-ASoC-mediatek-cleanup-audio-driver-for-MT2701.patch
index ee439ff531..afd535c696 100644
--- a/target/linux/mediatek/patches-4.14/0182-ASoC-mediatek-cleanup-audio-driver-for-MT2701.patch
+++ b/target/linux/mediatek/patches-4.14/0182-ASoC-mediatek-cleanup-audio-driver-for-MT2701.patch
@@ -15,8 +15,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-reg.h | 41 +---------
4 files changed, 24 insertions(+), 145 deletions(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
-index 75ccdca5811d..56a057c78c9a 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -14,10 +14,6 @@
@@ -30,7 +28,7 @@ index 75ccdca5811d..56a057c78c9a 100644
#include "mt2701-afe-common.h"
#include "mt2701-afe-clock-ctrl.h"
-@@ -223,8 +219,8 @@ int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
+@@ -223,8 +219,8 @@ int mt2701_afe_enable_clock(struct mtk_b
}
regmap_update_bits(afe->regmap, ASYS_TOP_CON,
@@ -41,7 +39,7 @@ index 75ccdca5811d..56a057c78c9a 100644
regmap_update_bits(afe->regmap, AFE_DAC_CON0,
AFE_DAC_CON0_AFE_ON,
AFE_DAC_CON0_AFE_ON);
-@@ -239,7 +235,7 @@ int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
+@@ -239,7 +235,7 @@ int mt2701_afe_enable_clock(struct mtk_b
int mt2701_afe_disable_clock(struct mtk_base_afe *afe)
{
regmap_update_bits(afe->regmap, ASYS_TOP_CON,
@@ -50,7 +48,7 @@ index 75ccdca5811d..56a057c78c9a 100644
regmap_update_bits(afe->regmap, AFE_DAC_CON0,
AFE_DAC_CON0_AFE_ON, 0);
-@@ -272,7 +268,3 @@ void mt2701_mclk_configuration(struct mtk_base_afe *afe, int id, int domain,
+@@ -272,7 +268,3 @@ void mt2701_mclk_configuration(struct mt
if (ret)
dev_err(afe->dev, "failed to set mclk divider %d\n", ret);
}
@@ -58,8 +56,6 @@ index 75ccdca5811d..56a057c78c9a 100644
-MODULE_DESCRIPTION("MT2701 afe clock control");
-MODULE_AUTHOR("Garlic Tseng <garlic.tseng@mediatek.com>");
-MODULE_LICENSE("GPL v2");
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-common.h b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
-index ce5bd4dc864d..9a2b301a4c21 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
@@ -16,6 +16,7 @@
@@ -98,7 +94,7 @@ index ce5bd4dc864d..9a2b301a4c21 100644
MT2701_IRQ_ASYS_IRQ2,
MT2701_IRQ_ASYS_IRQ3,
MT2701_IRQ_ASYS_END,
-@@ -100,9 +91,6 @@ static const unsigned int mt2701_afe_backup_list[] = {
+@@ -100,9 +91,6 @@ static const unsigned int mt2701_afe_bac
AFE_MEMIF_PBUF_SIZE,
};
@@ -117,8 +113,6 @@ index ce5bd4dc864d..9a2b301a4c21 100644
struct clk *hop_ck[I2S_DIR_NUM];
struct clk *sel_ck;
struct clk *div_ck;
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-index 33f809228f25..0edadca12a5e 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -20,16 +20,12 @@
@@ -138,7 +132,7 @@ index 33f809228f25..0edadca12a5e 100644
static const struct snd_pcm_hardware mt2701_afe_hardware = {
.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED
| SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID,
-@@ -107,21 +103,16 @@ static int mt2701_afe_i2s_startup(struct snd_pcm_substream *substream,
+@@ -107,21 +103,16 @@ static int mt2701_afe_i2s_startup(struct
static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai,
@@ -162,7 +156,7 @@ index 33f809228f25..0edadca12a5e 100644
if (dir_invert) {
if (stream_dir == SNDRV_PCM_STREAM_PLAYBACK)
stream_dir = SNDRV_PCM_STREAM_CAPTURE;
-@@ -167,11 +158,11 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream,
+@@ -167,11 +158,11 @@ static void mt2701_afe_i2s_shutdown(stru
else
goto I2S_UNSTART;
@@ -176,7 +170,7 @@ index 33f809228f25..0edadca12a5e 100644
I2S_UNSTART:
/* disable mclk */
-@@ -180,24 +171,19 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream,
+@@ -180,24 +171,19 @@ I2S_UNSTART:
static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai,
@@ -203,7 +197,7 @@ index 33f809228f25..0edadca12a5e 100644
if (dir_invert) {
if (stream_dir == SNDRV_PCM_STREAM_PLAYBACK)
stream_dir = SNDRV_PCM_STREAM_CAPTURE;
-@@ -288,13 +274,13 @@ static int mt2701_afe_i2s_prepare(struct snd_pcm_substream *substream,
+@@ -288,13 +274,13 @@ static int mt2701_afe_i2s_prepare(struct
mt2701_mclk_configuration(afe, i2s_num, clk_domain, mclk_rate);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
@@ -220,7 +214,7 @@ index 33f809228f25..0edadca12a5e 100644
}
return 0;
-@@ -562,7 +548,6 @@ static const struct snd_soc_dai_ops mt2701_single_memif_dai_ops = {
+@@ -562,7 +548,6 @@ static const struct snd_soc_dai_ops mt27
.hw_free = mtk_afe_fe_hw_free,
.prepare = mtk_afe_fe_prepare,
.trigger = mtk_afe_fe_trigger,
@@ -228,7 +222,7 @@ index 33f809228f25..0edadca12a5e 100644
};
static const struct snd_soc_dai_ops mt2701_dlm_memif_dai_ops = {
-@@ -903,31 +888,6 @@ static const struct snd_kcontrol_new mt2701_afe_multi_ch_out_i2s4[] = {
+@@ -903,31 +888,6 @@ static const struct snd_kcontrol_new mt2
PWR2_TOP_CON, 19, 1, 0),
};
@@ -260,7 +254,7 @@ index 33f809228f25..0edadca12a5e 100644
static const struct snd_soc_dapm_widget mt2701_afe_pcm_widgets[] = {
/* inter-connections */
SND_SOC_DAPM_MIXER("I00", SND_SOC_NOPM, 0, 0, NULL, 0),
-@@ -987,19 +947,6 @@ static const struct snd_soc_dapm_widget mt2701_afe_pcm_widgets[] = {
+@@ -987,19 +947,6 @@ static const struct snd_soc_dapm_widget
SND_SOC_DAPM_MIXER("I18I19", SND_SOC_NOPM, 0, 0,
mt2701_afe_multi_ch_out_i2s3,
ARRAY_SIZE(mt2701_afe_multi_ch_out_i2s3)),
@@ -280,7 +274,7 @@ index 33f809228f25..0edadca12a5e 100644
};
static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
-@@ -1009,7 +956,6 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
+@@ -1009,7 +956,6 @@ static const struct snd_soc_dapm_route m
{"I2S0 Playback", NULL, "O15"},
{"I2S0 Playback", NULL, "O16"},
@@ -288,7 +282,7 @@ index 33f809228f25..0edadca12a5e 100644
{"I2S1 Playback", NULL, "O17"},
{"I2S1 Playback", NULL, "O18"},
{"I2S2 Playback", NULL, "O19"},
-@@ -1026,7 +972,6 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
+@@ -1026,7 +972,6 @@ static const struct snd_soc_dapm_route m
{"I00", NULL, "I2S0 Capture"},
{"I01", NULL, "I2S0 Capture"},
@@ -296,7 +290,7 @@ index 33f809228f25..0edadca12a5e 100644
{"I02", NULL, "I2S1 Capture"},
{"I03", NULL, "I2S1 Capture"},
/* I02,03 link to UL2, also need to open I2S0 */
-@@ -1034,15 +979,10 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
+@@ -1034,15 +979,10 @@ static const struct snd_soc_dapm_route m
{"I26", NULL, "BT Capture"},
@@ -316,7 +310,7 @@ index 33f809228f25..0edadca12a5e 100644
{ "I12", NULL, "I12I13" },
{ "I13", NULL, "I12I13" },
-@@ -1067,7 +1007,6 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
+@@ -1067,7 +1007,6 @@ static const struct snd_soc_dapm_route m
{ "O21", "I18 Switch", "I18" },
{ "O22", "I19 Switch", "I19" },
{ "O31", "I35 Switch", "I35" },
@@ -324,7 +318,7 @@ index 33f809228f25..0edadca12a5e 100644
};
static const struct snd_soc_component_driver mt2701_afe_pcm_dai_component = {
-@@ -1484,12 +1423,13 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1484,12 +1423,13 @@ static int mt2701_afe_pcm_dev_probe(stru
afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
if (!afe)
return -ENOMEM;
@@ -339,7 +333,7 @@ index 33f809228f25..0edadca12a5e 100644
afe->dev = &pdev->dev;
dev = afe->dev;
-@@ -1524,7 +1464,6 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1524,7 +1464,6 @@ static int mt2701_afe_pcm_dev_probe(stru
afe->memif_size = MT2701_MEMIF_NUM;
afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
GFP_KERNEL);
@@ -347,7 +341,7 @@ index 33f809228f25..0edadca12a5e 100644
if (!afe->memif)
return -ENOMEM;
-@@ -1537,7 +1476,6 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1537,7 +1476,6 @@ static int mt2701_afe_pcm_dev_probe(stru
afe->irqs_size = MT2701_IRQ_ASYS_END;
afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs),
GFP_KERNEL);
@@ -355,7 +349,7 @@ index 33f809228f25..0edadca12a5e 100644
if (!afe->irqs)
return -ENOMEM;
-@@ -1555,7 +1493,6 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1555,7 +1493,6 @@ static int mt2701_afe_pcm_dev_probe(stru
afe->mtk_afe_hardware = &mt2701_afe_hardware;
afe->memif_fs = mt2701_memif_fs;
afe->irq_fs = mt2701_irq_fs;
@@ -363,13 +357,11 @@ index 33f809228f25..0edadca12a5e 100644
afe->reg_back_up_list = mt2701_afe_backup_list;
afe->reg_back_up_list_num = ARRAY_SIZE(mt2701_afe_backup_list);
afe->runtime_resume = mt2701_afe_runtime_resume;
-@@ -1646,4 +1583,3 @@ module_platform_driver(mt2701_afe_pcm_driver);
+@@ -1646,4 +1583,3 @@ module_platform_driver(mt2701_afe_pcm_dr
MODULE_DESCRIPTION("Mediatek ALSA SoC AFE platform driver for 2701");
MODULE_AUTHOR("Garlic Tseng <garlic.tseng@mediatek.com>");
MODULE_LICENSE("GPL v2");
-
-diff --git a/sound/soc/mediatek/mt2701/mt2701-reg.h b/sound/soc/mediatek/mt2701/mt2701-reg.h
-index bb62b1c55957..f17c76f37b5f 100644
--- a/sound/soc/mediatek/mt2701/mt2701-reg.h
+++ b/sound/soc/mediatek/mt2701/mt2701-reg.h
@@ -17,17 +17,6 @@
@@ -434,6 +426,3 @@ index bb62b1c55957..f17c76f37b5f 100644
/* PWR2_ASM_CON1 (0x1070) */
#define PWR2_ASM_CON1_INIT_VAL (0x492492)
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0183-ASoC-mediatek-update-clock-related-properties-of-MT2.patch b/target/linux/mediatek/patches-4.14/0183-ASoC-mediatek-update-clock-related-properties-of-MT2.patch
index 7aa20b76e7..cfb0e47e05 100644
--- a/target/linux/mediatek/patches-4.14/0183-ASoC-mediatek-update-clock-related-properties-of-MT2.patch
+++ b/target/linux/mediatek/patches-4.14/0183-ASoC-mediatek-update-clock-related-properties-of-MT2.patch
@@ -17,8 +17,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
.../devicetree/bindings/sound/mt2701-afe-pcm.txt | 207 +++++++++------------
1 file changed, 91 insertions(+), 116 deletions(-)
-diff --git a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
-index 77a57f84bed4..0450baad2813 100644
--- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
+++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
@@ -6,51 +6,44 @@ Required properties:
@@ -258,6 +256,3 @@ index 77a57f84bed4..0450baad2813 100644
+ <&topckgen CLK_TOP_AUD2PLL_90M>;
+ assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0184-ASoC-mediatek-add-some-core-clocks-for-MT2701-AFE.patch b/target/linux/mediatek/patches-4.14/0184-ASoC-mediatek-add-some-core-clocks-for-MT2701-AFE.patch
index d64d5a7072..937232ed16 100644
--- a/target/linux/mediatek/patches-4.14/0184-ASoC-mediatek-add-some-core-clocks-for-MT2701-AFE.patch
+++ b/target/linux/mediatek/patches-4.14/0184-ASoC-mediatek-add-some-core-clocks-for-MT2701-AFE.patch
@@ -12,8 +12,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-afe-common.h | 3 +++
2 files changed, 32 insertions(+), 1 deletion(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
-index 56a057c78c9a..949fc3a1d025 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -18,8 +18,11 @@
@@ -28,7 +26,7 @@ index 56a057c78c9a..949fc3a1d025 100644
[MT2701_AUDSYS_AFE] = "audio_afe_pd",
[MT2701_AUDSYS_AFE_CONN] = "audio_afe_conn_pd",
[MT2701_AUDSYS_A1SYS] = "audio_a1sys_pd",
-@@ -169,10 +172,26 @@ static int mt2701_afe_enable_audsys(struct mtk_base_afe *afe)
+@@ -169,10 +172,26 @@ static int mt2701_afe_enable_audsys(stru
struct mt2701_afe_private *afe_priv = afe->platform_priv;
int ret;
@@ -56,7 +54,7 @@ index 56a057c78c9a..949fc3a1d025 100644
ret = clk_prepare_enable(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]);
if (ret)
goto err_audio_a1sys;
-@@ -193,6 +212,12 @@ static int mt2701_afe_enable_audsys(struct mtk_base_afe *afe)
+@@ -193,6 +212,12 @@ err_audio_a2sys:
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]);
err_audio_a1sys:
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_AFE]);
@@ -69,7 +67,7 @@ index 56a057c78c9a..949fc3a1d025 100644
return ret;
}
-@@ -205,6 +230,9 @@ static void mt2701_afe_disable_audsys(struct mtk_base_afe *afe)
+@@ -205,6 +230,9 @@ static void mt2701_afe_disable_audsys(st
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A2SYS]);
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]);
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_AFE]);
@@ -79,8 +77,6 @@ index 56a057c78c9a..949fc3a1d025 100644
}
int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-common.h b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
-index 9a2b301a4c21..ae8ddeacfbfe 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
@@ -61,8 +61,11 @@ enum {
@@ -95,6 +91,3 @@ index 9a2b301a4c21..ae8ddeacfbfe 100644
MT2701_AUDSYS_AFE,
MT2701_AUDSYS_AFE_CONN,
MT2701_AUDSYS_A1SYS,
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0185-ASoC-mediatek-modify-MT2701-AFE-driver-to-adapt-mfd-.patch b/target/linux/mediatek/patches-4.14/0185-ASoC-mediatek-modify-MT2701-AFE-driver-to-adapt-mfd-.patch
index fe5f9d398e..462cbbc13b 100644
--- a/target/linux/mediatek/patches-4.14/0185-ASoC-mediatek-modify-MT2701-AFE-driver-to-adapt-mfd-.patch
+++ b/target/linux/mediatek/patches-4.14/0185-ASoC-mediatek-modify-MT2701-AFE-driver-to-adapt-mfd-.patch
@@ -13,8 +13,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-reg.h | 1 -
2 files changed, 20 insertions(+), 26 deletions(-)
-diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
-index 0edadca12a5e..f0cd08fa5c5d 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -17,6 +17,7 @@
@@ -25,7 +23,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/pm_runtime.h>
-@@ -1368,14 +1369,6 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = {
+@@ -1368,14 +1369,6 @@ static const struct mt2701_i2s_data mt27
},
};
@@ -40,7 +38,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
static irqreturn_t mt2701_asys_isr(int irq_id, void *dev)
{
int id;
-@@ -1414,9 +1407,9 @@ static int mt2701_afe_runtime_resume(struct device *dev)
+@@ -1414,9 +1407,9 @@ static int mt2701_afe_runtime_resume(str
static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
{
@@ -51,7 +49,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
struct device *dev;
int i, irq_id, ret;
-@@ -1446,17 +1439,11 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1446,17 +1439,11 @@ static int mt2701_afe_pcm_dev_probe(stru
return ret;
}
@@ -74,7 +72,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
mutex_init(&afe->irq_alloc_lock);
-@@ -1490,6 +1477,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1490,6 +1477,12 @@ static int mt2701_afe_pcm_dev_probe(stru
= &mt2701_i2s_data[i][I2S_IN];
}
@@ -87,7 +85,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
afe->mtk_afe_hardware = &mt2701_afe_hardware;
afe->memif_fs = mt2701_memif_fs;
afe->irq_fs = mt2701_irq_fs;
-@@ -1502,7 +1495,7 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1502,7 +1495,7 @@ static int mt2701_afe_pcm_dev_probe(stru
ret = mt2701_init_clock(afe);
if (ret) {
dev_err(dev, "init clock error\n");
@@ -96,7 +94,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
}
platform_set_drvdata(pdev, afe);
-@@ -1521,10 +1514,10 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1521,10 +1514,10 @@ static int mt2701_afe_pcm_dev_probe(stru
goto err_platform;
}
@@ -111,7 +109,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
if (ret) {
dev_warn(dev, "err_dai_component\n");
goto err_dai_component;
-@@ -1538,6 +1531,8 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
+@@ -1538,6 +1531,8 @@ err_platform:
pm_runtime_put_sync(dev);
err_pm_disable:
pm_runtime_disable(dev);
@@ -120,8 +118,6 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
return ret;
}
-diff --git a/sound/soc/mediatek/mt2701/mt2701-reg.h b/sound/soc/mediatek/mt2701/mt2701-reg.h
-index f17c76f37b5f..18e676974f22 100644
--- a/sound/soc/mediatek/mt2701/mt2701-reg.h
+++ b/sound/soc/mediatek/mt2701/mt2701-reg.h
@@ -145,5 +145,4 @@
@@ -130,6 +126,3 @@ index f17c76f37b5f..18e676974f22 100644
-#define AFE_END_ADDR 0x15e0
#endif
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0186-ASoC-mediatek-update-MT2701-AFE-documentation-to-ada.patch b/target/linux/mediatek/patches-4.14/0186-ASoC-mediatek-update-MT2701-AFE-documentation-to-ada.patch
index 3d515402b5..87a6158b40 100644
--- a/target/linux/mediatek/patches-4.14/0186-ASoC-mediatek-update-MT2701-AFE-documentation-to-ada.patch
+++ b/target/linux/mediatek/patches-4.14/0186-ASoC-mediatek-update-MT2701-AFE-documentation-to-ada.patch
@@ -13,8 +13,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
.../devicetree/bindings/sound/mt2701-afe-pcm.txt | 171 +++++++++++----------
1 file changed, 93 insertions(+), 78 deletions(-)
-diff --git a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
-index 0450baad2813..6df87b97f7cb 100644
--- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
+++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
@@ -2,15 +2,17 @@ Mediatek AFE PCM controller for mt2701
@@ -84,6 +82,46 @@ index 0450baad2813..6df87b97f7cb 100644
- <&audiosys CLK_AUD_A1SYS>,
- <&audiosys CLK_AUD_A2SYS>,
- <&audiosys CLK_AUD_AFE_MRGIF>;
+-
+- clock-names = "top_audio_mux1_sel",
+- "top_audio_mux2_sel",
+- "i2s0_src_sel",
+- "i2s1_src_sel",
+- "i2s2_src_sel",
+- "i2s3_src_sel",
+- "i2s0_src_div",
+- "i2s1_src_div",
+- "i2s2_src_div",
+- "i2s3_src_div",
+- "i2s0_mclk_en",
+- "i2s1_mclk_en",
+- "i2s2_mclk_en",
+- "i2s3_mclk_en",
+- "i2so0_hop_ck",
+- "i2so1_hop_ck",
+- "i2so2_hop_ck",
+- "i2so3_hop_ck",
+- "i2si0_hop_ck",
+- "i2si1_hop_ck",
+- "i2si2_hop_ck",
+- "i2si3_hop_ck",
+- "asrc0_out_ck",
+- "asrc1_out_ck",
+- "asrc2_out_ck",
+- "asrc3_out_ck",
+- "audio_afe_pd",
+- "audio_afe_conn_pd",
+- "audio_a1sys_pd",
+- "audio_a2sys_pd",
+- "audio_mrgif_pd";
+-
+- assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
+- <&topckgen CLK_TOP_AUD_MUX2_SEL>,
+- <&topckgen CLK_TOP_AUD_MUX1_DIV>,
+- <&topckgen CLK_TOP_AUD_MUX2_DIV>;
+- assigned-clock-parents = <&topckgen CLK_TOP_AUD1PLL_98M>,
+- <&topckgen CLK_TOP_AUD2PLL_90M>;
+- assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
+ audsys: audio-subsystem@11220000 {
+ compatible = "mediatek,mt2701-audsys", "syscon", "simple-mfd";
+ ...
@@ -129,38 +167,7 @@ index 0450baad2813..6df87b97f7cb 100644
+ <&audsys CLK_AUD_A1SYS>,
+ <&audsys CLK_AUD_A2SYS>,
+ <&audsys CLK_AUD_AFE_MRGIF>;
-
-- clock-names = "top_audio_mux1_sel",
-- "top_audio_mux2_sel",
-- "i2s0_src_sel",
-- "i2s1_src_sel",
-- "i2s2_src_sel",
-- "i2s3_src_sel",
-- "i2s0_src_div",
-- "i2s1_src_div",
-- "i2s2_src_div",
-- "i2s3_src_div",
-- "i2s0_mclk_en",
-- "i2s1_mclk_en",
-- "i2s2_mclk_en",
-- "i2s3_mclk_en",
-- "i2so0_hop_ck",
-- "i2so1_hop_ck",
-- "i2so2_hop_ck",
-- "i2so3_hop_ck",
-- "i2si0_hop_ck",
-- "i2si1_hop_ck",
-- "i2si2_hop_ck",
-- "i2si3_hop_ck",
-- "asrc0_out_ck",
-- "asrc1_out_ck",
-- "asrc2_out_ck",
-- "asrc3_out_ck",
-- "audio_afe_pd",
-- "audio_afe_conn_pd",
-- "audio_a1sys_pd",
-- "audio_a2sys_pd",
-- "audio_mrgif_pd";
++
+ clock-names = "infra_sys_audio_clk",
+ "top_audio_mux1_sel",
+ "top_audio_mux2_sel",
@@ -195,14 +202,7 @@ index 0450baad2813..6df87b97f7cb 100644
+ "audio_a1sys_pd",
+ "audio_a2sys_pd",
+ "audio_mrgif_pd";
-
-- assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
-- <&topckgen CLK_TOP_AUD_MUX2_SEL>,
-- <&topckgen CLK_TOP_AUD_MUX1_DIV>,
-- <&topckgen CLK_TOP_AUD_MUX2_DIV>;
-- assigned-clock-parents = <&topckgen CLK_TOP_AUD1PLL_98M>,
-- <&topckgen CLK_TOP_AUD2PLL_90M>;
-- assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
++
+ assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
+ <&topckgen CLK_TOP_AUD_MUX2_SEL>,
+ <&topckgen CLK_TOP_AUD_MUX1_DIV>,
@@ -212,6 +212,3 @@ index 0450baad2813..6df87b97f7cb 100644
+ assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
+ };
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0187-usb-mtu3-fix-error-code-for-getting-extcon-device.patch b/target/linux/mediatek/patches-4.14/0187-usb-mtu3-fix-error-code-for-getting-extcon-device.patch
index 4d79623e5d..2a105eb664 100644
--- a/target/linux/mediatek/patches-4.14/0187-usb-mtu3-fix-error-code-for-getting-extcon-device.patch
+++ b/target/linux/mediatek/patches-4.14/0187-usb-mtu3-fix-error-code-for-getting-extcon-device.patch
@@ -13,11 +13,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_plat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index 9ff33579b42e..a2523ead46cf 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -317,7 +317,7 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -317,7 +317,7 @@ static int get_ssusb_rscs(struct platfor
otg_sx->edev = extcon_get_edev_by_phandle(ssusb->dev, 0);
if (IS_ERR(otg_sx->edev)) {
dev_err(ssusb->dev, "couldn't get extcon device\n");
@@ -26,6 +24,3 @@ index 9ff33579b42e..a2523ead46cf 100644
}
}
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0188-usb-mtu3-supports-remote-wakeup-for-mt2712-with-two-.patch b/target/linux/mediatek/patches-4.14/0188-usb-mtu3-supports-remote-wakeup-for-mt2712-with-two-.patch
index 105d6f156b..2e3f0bd125 100644
--- a/target/linux/mediatek/patches-4.14/0188-usb-mtu3-supports-remote-wakeup-for-mt2712-with-two-.patch
+++ b/target/linux/mediatek/patches-4.14/0188-usb-mtu3-supports-remote-wakeup-for-mt2712-with-two-.patch
@@ -18,8 +18,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_plat.c | 8 +--
4 files changed, 70 insertions(+), 67 deletions(-)
-diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
-index d80e4e813248..ed3aec46eda1 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -238,7 +238,10 @@ struct otg_switch_mtk {
@@ -47,11 +45,9 @@ index d80e4e813248..ed3aec46eda1 100644
};
/**
-diff --git a/drivers/usb/mtu3/mtu3_dr.h b/drivers/usb/mtu3/mtu3_dr.h
-index 0f0cbac00192..1fa62ce136b6 100644
--- a/drivers/usb/mtu3/mtu3_dr.h
+++ b/drivers/usb/mtu3/mtu3_dr.h
-@@ -27,8 +27,7 @@ int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb,
+@@ -27,8 +27,7 @@ int ssusb_wakeup_of_property_parse(struc
struct device_node *dn);
int ssusb_host_enable(struct ssusb_mtk *ssusb);
int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend);
@@ -61,8 +57,6 @@ index 0f0cbac00192..1fa62ce136b6 100644
#else
-diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
-index ec76b86dd887..1a1b6cf432a1 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
@@ -27,66 +27,77 @@
@@ -101,7 +95,8 @@ index ec76b86dd887..1a1b6cf432a1 100644
{
- u32 tmp;
- struct regmap *pericfg = ssusb->pericfg;
--
++ u32 reg, msk, val;
+
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_P;
- tmp &= ~(UWK_CTL1_IS_C(0xf));
@@ -121,8 +116,6 @@ index ec76b86dd887..1a1b6cf432a1 100644
- regmap_read(ssusb->pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_E;
- regmap_write(ssusb->pericfg, PERI_WK_CTRL1, tmp);
-+ u32 reg, msk, val;
-+
+ switch (ssusb->uwk_vers) {
+ case SSUSB_UWK_V1:
+ reg = ssusb->uwk_reg_base + PERI_WK_CTRL1;
@@ -188,7 +181,7 @@ index ec76b86dd887..1a1b6cf432a1 100644
}
static void host_ports_num_get(struct ssusb_mtk *ssusb)
-@@ -244,17 +255,3 @@ void ssusb_host_exit(struct ssusb_mtk *ssusb)
+@@ -244,17 +255,3 @@ void ssusb_host_exit(struct ssusb_mtk *s
of_platform_depopulate(ssusb->dev);
ssusb_host_cleanup(ssusb);
}
@@ -206,11 +199,9 @@ index ec76b86dd887..1a1b6cf432a1 100644
- if (ssusb->wakeup_en)
- ssusb_wakeup_ip_sleep_dis(ssusb);
-}
-diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
-index a2523ead46cf..4cafd4ca8457 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
-@@ -291,8 +291,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
+@@ -291,8 +291,10 @@ static int get_ssusb_rscs(struct platfor
/* if host role is supported */
ret = ssusb_wakeup_of_property_parse(ssusb, node);
@@ -222,7 +213,7 @@ index a2523ead46cf..4cafd4ca8457 100644
/* optional property, ignore the error if it does not exist */
of_property_read_u32(node, "mediatek,u3p-dis-msk",
-@@ -466,7 +468,7 @@ static int __maybe_unused mtu3_suspend(struct device *dev)
+@@ -466,7 +468,7 @@ static int __maybe_unused mtu3_suspend(s
ssusb_host_disable(ssusb, true);
ssusb_phy_power_off(ssusb);
ssusb_clks_disable(ssusb);
@@ -231,7 +222,7 @@ index a2523ead46cf..4cafd4ca8457 100644
return 0;
}
-@@ -482,7 +484,7 @@ static int __maybe_unused mtu3_resume(struct device *dev)
+@@ -482,7 +484,7 @@ static int __maybe_unused mtu3_resume(st
if (!ssusb->is_host)
return 0;
@@ -240,6 +231,3 @@ index a2523ead46cf..4cafd4ca8457 100644
ret = ssusb_clks_enable(ssusb);
if (ret)
goto clks_err;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0189-dt-bindings-usb-mtu3-update-USB-wakeup-properties.patch b/target/linux/mediatek/patches-4.14/0189-dt-bindings-usb-mtu3-update-USB-wakeup-properties.patch
index 30de3dd162..393127e67c 100644
--- a/target/linux/mediatek/patches-4.14/0189-dt-bindings-usb-mtu3-update-USB-wakeup-properties.patch
+++ b/target/linux/mediatek/patches-4.14/0189-dt-bindings-usb-mtu3-update-USB-wakeup-properties.patch
@@ -14,8 +14,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
-index b2271d8e6b50..d589a1ef96a1 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -42,9 +42,14 @@ Optional properties:
@@ -47,6 +45,3 @@ index b2271d8e6b50..d589a1ef96a1 100644
#address-cells = <2>;
#size-cells = <2>;
ranges;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0190-usb-xhci-mtk-supports-remote-wakeup-for-mt2712-with-.patch b/target/linux/mediatek/patches-4.14/0190-usb-xhci-mtk-supports-remote-wakeup-for-mt2712-with-.patch
index ba7b834f84..2ae76eda17 100644
--- a/target/linux/mediatek/patches-4.14/0190-usb-xhci-mtk-supports-remote-wakeup-for-mt2712-with-.patch
+++ b/target/linux/mediatek/patches-4.14/0190-usb-xhci-mtk-supports-remote-wakeup-for-mt2712-with-.patch
@@ -21,8 +21,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.h | 6 +-
2 files changed, 65 insertions(+), 118 deletions(-)
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index e5caabe7eebe..8e51b3fec386 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -66,26 +66,21 @@
@@ -67,7 +65,7 @@ index e5caabe7eebe..8e51b3fec386 100644
};
static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
-@@ -308,112 +303,58 @@ static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
+@@ -308,112 +303,58 @@ static void xhci_mtk_clks_disable(struct
}
/* only clocks can be turn off for ip-sleep wakeup mode */
@@ -76,7 +74,8 @@ index e5caabe7eebe..8e51b3fec386 100644
{
- u32 tmp;
- struct regmap *pericfg = mtk->pericfg;
--
++ u32 reg, msk, val;
+
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_P;
- tmp &= ~(UWK_CTL1_IS_C(0xf));
@@ -87,8 +86,15 @@ index e5caabe7eebe..8e51b3fec386 100644
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- dev_dbg(mtk->dev, "%s(): WK_CTRL1[P6,E25,C26:29]=%#x\n",
- __func__, tmp);
-+ u32 reg, msk, val;
-+
+-}
+-
+-static void usb_wakeup_ip_sleep_dis(struct xhci_hcd_mtk *mtk)
+-{
+- u32 tmp;
+-
+- regmap_read(mtk->pericfg, PERI_WK_CTRL1, &tmp);
+- tmp &= ~UWK_CTL1_IS_E;
+- regmap_write(mtk->pericfg, PERI_WK_CTRL1, tmp);
+ switch (mtk->uwk_vers) {
+ case SSUSB_UWK_V1:
+ reg = mtk->uwk_reg_base + PERI_WK_CTRL1;
@@ -106,29 +112,14 @@ index e5caabe7eebe..8e51b3fec386 100644
+ regmap_update_bits(mtk->uwk, reg, msk, val);
}
--static void usb_wakeup_ip_sleep_dis(struct xhci_hcd_mtk *mtk)
-+static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
-+ struct device_node *dn)
- {
-- u32 tmp;
-+ struct of_phandle_args args;
-+ int ret;
-
-- regmap_read(mtk->pericfg, PERI_WK_CTRL1, &tmp);
-- tmp &= ~UWK_CTL1_IS_E;
-- regmap_write(mtk->pericfg, PERI_WK_CTRL1, tmp);
--}
-+ /* Wakeup function is optional */
-+ mtk->uwk_en = of_property_read_bool(dn, "wakeup-source");
-+ if (!mtk->uwk_en)
-+ return 0;
-
-/*
-* for line-state wakeup mode, phy's power should not power-down
-* and only support cable plug in/out
-*/
-static void usb_wakeup_line_state_en(struct xhci_hcd_mtk *mtk)
--{
++static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
++ struct device_node *dn)
+ {
- u32 tmp;
- struct regmap *pericfg = mtk->pericfg;
-
@@ -140,7 +131,9 @@ index e5caabe7eebe..8e51b3fec386 100644
- regmap_write(pericfg, PERI_WK_CTRL1, tmp);
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- regmap_write(pericfg, PERI_WK_CTRL1, tmp | UWK_CTL1_0P_LS_E);
--
++ struct of_phandle_args args;
++ int ret;
+
- /* line-state of u2-port1 */
- regmap_read(pericfg, PERI_WK_CTRL0, &tmp);
- tmp &= ~(UWK_CTL1_1P_LS_C(0xf));
@@ -148,26 +141,24 @@ index e5caabe7eebe..8e51b3fec386 100644
- regmap_write(pericfg, PERI_WK_CTRL0, tmp);
- regmap_write(pericfg, PERI_WK_CTRL0, tmp | UWK_CTL1_1P_LS_E);
-}
-+ ret = of_parse_phandle_with_fixed_args(dn,
-+ "mediatek,syscon-wakeup", 2, 0, &args);
-+ if (ret)
-+ return ret;
++ /* Wakeup function is optional */
++ mtk->uwk_en = of_property_read_bool(dn, "wakeup-source");
++ if (!mtk->uwk_en)
++ return 0;
-static void usb_wakeup_line_state_dis(struct xhci_hcd_mtk *mtk)
-{
- u32 tmp;
- struct regmap *pericfg = mtk->pericfg;
--
++ ret = of_parse_phandle_with_fixed_args(dn,
++ "mediatek,syscon-wakeup", 2, 0, &args);
++ if (ret)
++ return ret;
+
- /* line-state of u2-port0 */
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_0P_LS_E;
- regmap_write(pericfg, PERI_WK_CTRL1, tmp);
--
-- /* line-state of u2-port1 */
-- regmap_read(pericfg, PERI_WK_CTRL0, &tmp);
-- tmp &= ~UWK_CTL1_1P_LS_E;
-- regmap_write(pericfg, PERI_WK_CTRL0, tmp);
--}
+ mtk->uwk_reg_base = args.args[0];
+ mtk->uwk_vers = args.args[1];
+ mtk->uwk = syscon_node_to_regmap(args.np);
@@ -175,27 +166,33 @@ index e5caabe7eebe..8e51b3fec386 100644
+ dev_info(mtk->dev, "uwk - reg:0x%x, version:%d\n",
+ mtk->uwk_reg_base, mtk->uwk_vers);
+- /* line-state of u2-port1 */
+- regmap_read(pericfg, PERI_WK_CTRL0, &tmp);
+- tmp &= ~UWK_CTL1_1P_LS_E;
+- regmap_write(pericfg, PERI_WK_CTRL0, tmp);
+-}
++ return PTR_ERR_OR_ZERO(mtk->uwk);
+
-static void usb_wakeup_enable(struct xhci_hcd_mtk *mtk)
-{
- if (mtk->wakeup_src == SSUSB_WK_IP_SLEEP)
- usb_wakeup_ip_sleep_en(mtk);
- else if (mtk->wakeup_src == SSUSB_WK_LINE_STATE)
- usb_wakeup_line_state_en(mtk);
--}
-+ return PTR_ERR_OR_ZERO(mtk->uwk);
+ }
-static void usb_wakeup_disable(struct xhci_hcd_mtk *mtk)
--{
++static void usb_wakeup_set(struct xhci_hcd_mtk *mtk, bool enable)
+ {
- if (mtk->wakeup_src == SSUSB_WK_IP_SLEEP)
- usb_wakeup_ip_sleep_dis(mtk);
- else if (mtk->wakeup_src == SSUSB_WK_LINE_STATE)
- usb_wakeup_line_state_dis(mtk);
- }
-
+-}
+-
-static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
- struct device_node *dn)
-+static void usb_wakeup_set(struct xhci_hcd_mtk *mtk, bool enable)
- {
+-{
- struct device *dev = mtk->dev;
-
- /*
@@ -220,7 +217,7 @@ index e5caabe7eebe..8e51b3fec386 100644
}
static int xhci_mtk_setup(struct usb_hcd *hcd);
-@@ -595,8 +536,10 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -595,8 +536,10 @@ static int xhci_mtk_probe(struct platfor
&mtk->u3p_dis_msk);
ret = usb_wakeup_of_property_parse(mtk, node);
@@ -232,7 +229,7 @@ index e5caabe7eebe..8e51b3fec386 100644
mtk->num_phys = of_count_phandle_with_args(node,
"phys", "#phy-cells");
-@@ -780,7 +723,7 @@ static int __maybe_unused xhci_mtk_suspend(struct device *dev)
+@@ -780,7 +723,7 @@ static int __maybe_unused xhci_mtk_suspe
xhci_mtk_host_disable(mtk);
xhci_mtk_phy_power_off(mtk);
xhci_mtk_clks_disable(mtk);
@@ -241,7 +238,7 @@ index e5caabe7eebe..8e51b3fec386 100644
return 0;
}
-@@ -790,7 +733,7 @@ static int __maybe_unused xhci_mtk_resume(struct device *dev)
+@@ -790,7 +733,7 @@ static int __maybe_unused xhci_mtk_resum
struct usb_hcd *hcd = mtk->hcd;
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
@@ -250,8 +247,6 @@ index e5caabe7eebe..8e51b3fec386 100644
xhci_mtk_clks_enable(mtk);
xhci_mtk_phy_power_on(mtk);
xhci_mtk_host_enable(mtk);
-diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
-index 45ff5c67efb5..85c007ee1f52 100644
--- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h
@@ -131,8 +131,12 @@ struct xhci_hcd_mtk {
@@ -268,6 +263,3 @@ index 45ff5c67efb5..85c007ee1f52 100644
};
static inline struct xhci_hcd_mtk *hcd_to_mtk(struct usb_hcd *hcd)
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
index 8bb6d5c51e..c48db55d7f 100644
--- a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
+++ b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
@@ -38,8 +38,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.h | 2 ++
7 files changed, 23 insertions(+), 5 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
-index 30595964876a..9ff560298498 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -46,6 +46,7 @@ Optional properties:
@@ -58,11 +56,9 @@ index 30595964876a..9ff560298498 100644
};
2nd: dual-role mode with xHCI driver
-diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-index 2d80b60eeabe..2390ae58636b 100644
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-@@ -28,6 +28,7 @@ Optional properties:
+@@ -29,6 +29,7 @@ Optional properties:
- clocks: reference to a clock
- usb3-lpm-capable: determines if platform is USB3 LPM capable
- quirk-broken-port-ped: set if the controller has broken port disable mechanism
@@ -70,11 +66,9 @@ index 2d80b60eeabe..2390ae58636b 100644
Example:
usb@f0931000 {
-diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
-index 8e51b3fec386..8e4495be6592 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
-@@ -629,6 +629,15 @@ static int xhci_mtk_probe(struct platform_device *pdev)
+@@ -629,6 +629,15 @@ static int xhci_mtk_probe(struct platfor
xhci = hcd_to_xhci(hcd);
xhci->main_hcd = hcd;
@@ -90,11 +84,9 @@ index 8e51b3fec386..8e4495be6592 100644
xhci->shared_hcd = usb_create_shared_hcd(driver, dev,
dev_name(dev), hcd);
if (!xhci->shared_hcd) {
-diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
-index 8071c8fdd15e..cdd7d7bdfc0f 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
-@@ -258,6 +258,9 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
+@@ -266,6 +266,9 @@ static int xhci_pci_setup(struct usb_hcd
if (!xhci->sbrn)
pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn);
@@ -104,11 +96,9 @@ index 8071c8fdd15e..cdd7d7bdfc0f 100644
retval = xhci_gen_setup(hcd, xhci_pci_quirks);
if (retval)
return retval;
-diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
-index 163bafde709f..47230453a876 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
-@@ -265,6 +265,11 @@ static int xhci_plat_probe(struct platform_device *pdev)
+@@ -269,6 +269,11 @@ static int xhci_plat_probe(struct platfo
if (device_property_read_bool(&pdev->dev, "quirk-broken-port-ped"))
xhci->quirks |= XHCI_BROKEN_PORT_PED;
@@ -120,8 +110,6 @@ index 163bafde709f..47230453a876 100644
hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0);
if (IS_ERR(hcd->usb_phy)) {
ret = PTR_ERR(hcd->usb_phy);
-diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
-index b2ff1ff1a02f..ac1b26a81e77 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -597,11 +597,7 @@ int xhci_run(struct usb_hcd *hcd)
@@ -137,11 +125,9 @@ index b2ff1ff1a02f..ac1b26a81e77 100644
writel(temp, &xhci->ir_set->irq_control);
/* Set the HCD state before we enable the irqs */
-diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
-index 2abaa4d6d39d..614380af0f96 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
-@@ -1723,6 +1723,8 @@ struct xhci_hcd {
+@@ -1726,6 +1726,8 @@ struct xhci_hcd {
u8 max_interrupters;
u8 max_ports;
u8 isoc_threshold;
@@ -150,6 +136,3 @@ index 2abaa4d6d39d..614380af0f96 100644
int event_ring_max;
/* 4KB min, 128MB max */
int page_size;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0192-dt-bindings-usb-mtk-xhci-update-USB-wakeup-propertie.patch b/target/linux/mediatek/patches-4.14/0192-dt-bindings-usb-mtk-xhci-update-USB-wakeup-propertie.patch
index 250d647a98..13d5a2cd05 100644
--- a/target/linux/mediatek/patches-4.14/0192-dt-bindings-usb-mtk-xhci-update-USB-wakeup-propertie.patch
+++ b/target/linux/mediatek/patches-4.14/0192-dt-bindings-usb-mtk-xhci-update-USB-wakeup-propertie.patch
@@ -15,8 +15,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
.../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
-diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
-index 9ff560298498..88d9f4a4b280 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -35,10 +35,14 @@ Required properties:
@@ -49,6 +47,3 @@ index 9ff560298498..88d9f4a4b280 100644
imod-interval-ns = <10000>;
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0193-clk-mediatek-adjust-dependency-of-reset.c-to-avoid-u.patch b/target/linux/mediatek/patches-4.14/0193-clk-mediatek-adjust-dependency-of-reset.c-to-avoid-u.patch
index 19527f1a06..ee7d035fd8 100644
--- a/target/linux/mediatek/patches-4.14/0193-clk-mediatek-adjust-dependency-of-reset.c-to-avoid-u.patch
+++ b/target/linux/mediatek/patches-4.14/0193-clk-mediatek-adjust-dependency-of-reset.c-to-avoid-u.patch
@@ -32,10 +32,8 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/mediatek/clk-mtk.h | 7 -------
3 files changed, 3 insertions(+), 9 deletions(-)
-Index: linux-4.14.25/drivers/clk/mediatek/Kconfig
-===================================================================
---- linux-4.14.25.orig/drivers/clk/mediatek/Kconfig
-+++ linux-4.14.25/drivers/clk/mediatek/Kconfig
+--- a/drivers/clk/mediatek/Kconfig
++++ b/drivers/clk/mediatek/Kconfig
@@ -6,6 +6,7 @@ menu "Clock driver for MediaTek SoC"
config COMMON_CLK_MEDIATEK
@@ -44,10 +42,8 @@ Index: linux-4.14.25/drivers/clk/mediatek/Kconfig
---help---
MediaTek SoCs' clock support.
-Index: linux-4.14.25/drivers/clk/mediatek/Makefile
-===================================================================
---- linux-4.14.25.orig/drivers/clk/mediatek/Makefile
-+++ linux-4.14.25/drivers/clk/mediatek/Makefile
+--- a/drivers/clk/mediatek/Makefile
++++ b/drivers/clk/mediatek/Makefile
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_COMMON_CLK_MEDIATEK) += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o clk-cpumux.o
@@ -56,10 +52,8 @@ Index: linux-4.14.25/drivers/clk/mediatek/Makefile
obj-$(CONFIG_COMMON_CLK_MT6797) += clk-mt6797.o
obj-$(CONFIG_COMMON_CLK_MT6797_IMGSYS) += clk-mt6797-img.o
obj-$(CONFIG_COMMON_CLK_MT6797_MMSYS) += clk-mt6797-mm.o
-Index: linux-4.14.25/drivers/clk/mediatek/clk-mtk.h
-===================================================================
---- linux-4.14.25.orig/drivers/clk/mediatek/clk-mtk.h
-+++ linux-4.14.25/drivers/clk/mediatek/clk-mtk.h
+--- a/drivers/clk/mediatek/clk-mtk.h
++++ b/drivers/clk/mediatek/clk-mtk.h
@@ -229,14 +229,7 @@ void mtk_clk_register_plls(struct device
struct clk *mtk_clk_register_ref2usb_tx(const char *name,
const char *parent_name, void __iomem *reg);
diff --git a/target/linux/mediatek/patches-4.14/0194-pinctrl-mediatek-mt7622-fix-potential-uninitialized-.patch b/target/linux/mediatek/patches-4.14/0194-pinctrl-mediatek-mt7622-fix-potential-uninitialized-.patch
index a71af5005c..fc6c2b9150 100644
--- a/target/linux/mediatek/patches-4.14/0194-pinctrl-mediatek-mt7622-fix-potential-uninitialized-.patch
+++ b/target/linux/mediatek/patches-4.14/0194-pinctrl-mediatek-mt7622-fix-potential-uninitialized-.patch
@@ -31,8 +31,6 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
-diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
-index 3824d82888ac..dc32e3c3bd73 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -1412,9 +1412,11 @@ static struct pinctrl_desc mtk_desc = {
@@ -49,6 +47,3 @@ index 3824d82888ac..dc32e3c3bd73 100644
return !!value;
}
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0195-pinctrl-mediatek-mt7622-align-error-handling-of-mtk_.patch b/target/linux/mediatek/patches-4.14/0195-pinctrl-mediatek-mt7622-align-error-handling-of-mtk_.patch
index 31f25df2f3..49842dddb7 100644
--- a/target/linux/mediatek/patches-4.14/0195-pinctrl-mediatek-mt7622-align-error-handling-of-mtk_.patch
+++ b/target/linux/mediatek/patches-4.14/0195-pinctrl-mediatek-mt7622-align-error-handling-of-mtk_.patch
@@ -14,11 +14,9 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
-index dc32e3c3bd73..06e8406c4440 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
-@@ -1160,7 +1160,7 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
+@@ -1160,7 +1160,7 @@ static int mtk_pinconf_get(struct pinctr
case PIN_CONFIG_OUTPUT_ENABLE:
err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_DIR, &val);
if (err)
@@ -27,7 +25,7 @@ index dc32e3c3bd73..06e8406c4440 100644
/* HW takes input mode as zero; output mode as non-zero */
if ((val && param == PIN_CONFIG_INPUT_ENABLE) ||
-@@ -1184,11 +1184,11 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
+@@ -1184,11 +1184,11 @@ static int mtk_pinconf_get(struct pinctr
case PIN_CONFIG_DRIVE_STRENGTH:
err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_E4, &val);
if (err)
@@ -41,7 +39,7 @@ index dc32e3c3bd73..06e8406c4440 100644
/* 4mA when (e8, e4) = (0, 0); 8mA when (e8, e4) = (0, 1)
* 12mA when (e8, e4) = (1, 0); 16mA when (e8, e4) = (1, 1)
-@@ -1203,7 +1203,7 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
+@@ -1203,7 +1203,7 @@ static int mtk_pinconf_get(struct pinctr
err = mtk_hw_get_value(hw, pin, reg, &val);
if (err)
@@ -50,6 +48,3 @@ index dc32e3c3bd73..06e8406c4440 100644
ret = val;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0196-mtd-mtk-nor-modify-functions-name-more-generally.patch b/target/linux/mediatek/patches-4.14/0196-mtd-mtk-nor-modify-functions-name-more-generally.patch
index 0840f7678e..19466bad63 100644
--- a/target/linux/mediatek/patches-4.14/0196-mtd-mtk-nor-modify-functions-name-more-generally.patch
+++ b/target/linux/mediatek/patches-4.14/0196-mtd-mtk-nor-modify-functions-name-more-generally.patch
@@ -14,8 +14,6 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
drivers/mtd/spi-nor/mtk-quadspi.c | 240 +++++++++++++++++++-------------------
1 file changed, 120 insertions(+), 120 deletions(-)
-diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c
-index abe455ccd68b..5442993b71ff 100644
--- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c
@@ -110,7 +110,7 @@
@@ -90,7 +88,7 @@ index abe455ccd68b..5442993b71ff 100644
{
int len = 1 + txlen + rxlen;
int i, ret, idx;
-@@ -167,26 +167,26 @@ static int mt8173_nor_do_tx_rx(struct mt8173_nor *mt8173_nor, u8 op,
+@@ -167,26 +167,26 @@ static int mt8173_nor_do_tx_rx(struct mt
if (len > MTK_NOR_MAX_SHIFT)
return -EINVAL;
@@ -122,7 +120,7 @@ index abe455ccd68b..5442993b71ff 100644
if (ret)
return ret;
-@@ -195,20 +195,20 @@ static int mt8173_nor_do_tx_rx(struct mt8173_nor *mt8173_nor, u8 op,
+@@ -195,20 +195,20 @@ static int mt8173_nor_do_tx_rx(struct mt
/* read out RX data */
for (i = 0; i < rxlen; i++, idx--)
@@ -149,7 +147,7 @@ index abe455ccd68b..5442993b71ff 100644
{
u8 reg;
-@@ -216,27 +216,27 @@ static int mt8173_nor_write_buffer_enable(struct mt8173_nor *mt8173_nor)
+@@ -216,27 +216,27 @@ static int mt8173_nor_write_buffer_enabl
* 0: pre-fetch buffer use for read
* 1: pre-fetch buffer use for page program
*/
@@ -185,7 +183,7 @@ index abe455ccd68b..5442993b71ff 100644
switch (nor->addr_width) {
case 3:
-@@ -246,115 +246,115 @@ static void mt8173_nor_set_addr_width(struct mt8173_nor *mt8173_nor)
+@@ -246,115 +246,115 @@ static void mt8173_nor_set_addr_width(st
val |= MTK_NOR_4B_ADDR_EN;
break;
default:
@@ -336,7 +334,7 @@ index abe455ccd68b..5442993b71ff 100644
return ret;
}
}
-@@ -362,72 +362,72 @@ static ssize_t mt8173_nor_write(struct spi_nor *nor, loff_t to, size_t len,
+@@ -362,72 +362,72 @@ static ssize_t mt8173_nor_write(struct s
return len;
}
@@ -429,7 +427,7 @@ index abe455ccd68b..5442993b71ff 100644
struct device_node *flash_node)
{
const struct spi_nor_hwcaps hwcaps = {
-@@ -439,18 +439,18 @@ static int mtk_nor_init(struct mt8173_nor *mt8173_nor,
+@@ -439,18 +439,18 @@ static int mtk_nor_init(struct mt8173_no
struct spi_nor *nor;
/* initialize controller to accept commands */
@@ -456,7 +454,7 @@ index abe455ccd68b..5442993b71ff 100644
nor->mtd.name = "mtk_nor";
/* initialized with NULL */
ret = spi_nor_scan(nor, NULL, &hwcaps);
-@@ -465,34 +465,34 @@ static int mtk_nor_drv_probe(struct platform_device *pdev)
+@@ -465,34 +465,34 @@ static int mtk_nor_drv_probe(struct plat
struct device_node *flash_np;
struct resource *res;
int ret;
@@ -506,7 +504,7 @@ index abe455ccd68b..5442993b71ff 100644
if (ret)
return ret;
-@@ -503,20 +503,20 @@ static int mtk_nor_drv_probe(struct platform_device *pdev)
+@@ -503,20 +503,20 @@ static int mtk_nor_drv_probe(struct plat
ret = -ENODEV;
goto nor_free;
}
@@ -531,7 +529,7 @@ index abe455ccd68b..5442993b71ff 100644
return 0;
}
-@@ -524,18 +524,18 @@ static int mtk_nor_drv_remove(struct platform_device *pdev)
+@@ -524,18 +524,18 @@ static int mtk_nor_drv_remove(struct pla
#ifdef CONFIG_PM_SLEEP
static int mtk_nor_suspend(struct device *dev)
{
@@ -554,6 +552,3 @@ index abe455ccd68b..5442993b71ff 100644
}
static const struct dev_pm_ops mtk_nor_dev_pm_ops = {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0197-hwrng-mediatek-Setup-default-RNG-quality.patch b/target/linux/mediatek/patches-4.14/0197-hwrng-mediatek-Setup-default-RNG-quality.patch
index a766169cc2..71b097596d 100644
--- a/target/linux/mediatek/patches-4.14/0197-hwrng-mediatek-Setup-default-RNG-quality.patch
+++ b/target/linux/mediatek/patches-4.14/0197-hwrng-mediatek-Setup-default-RNG-quality.patch
@@ -13,11 +13,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/mtk-rng.c | 1 +
1 file changed, 1 insertion(+)
-diff --git a/drivers/char/hw_random/mtk-rng.c b/drivers/char/hw_random/mtk-rng.c
-index 8da7bcf54105..7f99cd52b40e 100644
--- a/drivers/char/hw_random/mtk-rng.c
+++ b/drivers/char/hw_random/mtk-rng.c
-@@ -135,6 +135,7 @@ static int mtk_rng_probe(struct platform_device *pdev)
+@@ -135,6 +135,7 @@ static int mtk_rng_probe(struct platform
#endif
priv->rng.read = mtk_rng_read;
priv->rng.priv = (unsigned long)&pdev->dev;
@@ -25,6 +23,3 @@ index 8da7bcf54105..7f99cd52b40e 100644
priv->clk = devm_clk_get(&pdev->dev, "rng");
if (IS_ERR(priv->clk)) {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0198-dt-bindings-thermal-add-binding-for-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0198-dt-bindings-thermal-add-binding-for-MT7622-SoC.patch
index 068dafda70..a16e01b10f 100644
--- a/target/linux/mediatek/patches-4.14/0198-dt-bindings-thermal-add-binding-for-MT7622-SoC.patch
+++ b/target/linux/mediatek/patches-4.14/0198-dt-bindings-thermal-add-binding-for-MT7622-SoC.patch
@@ -14,8 +14,6 @@ Reviewed-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/thermal/mediatek-thermal.txt | 1 +
1 file changed, 1 insertion(+)
-diff --git a/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt b/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
-index 0d73ea5e9c0c..41d6a443ad66 100644
--- a/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
@@ -12,6 +12,7 @@ Required properties:
@@ -26,6 +24,3 @@ index 0d73ea5e9c0c..41d6a443ad66 100644
- reg: Address range of the thermal controller
- interrupts: IRQ for the thermal controller
- clocks, clock-names: Clocks needed for the thermal controller. required
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0199-thermal-mtk-Cleanup-unused-defines.patch b/target/linux/mediatek/patches-4.14/0199-thermal-mtk-Cleanup-unused-defines.patch
index d028e4586c..a7288acdf1 100644
--- a/target/linux/mediatek/patches-4.14/0199-thermal-mtk-Cleanup-unused-defines.patch
+++ b/target/linux/mediatek/patches-4.14/0199-thermal-mtk-Cleanup-unused-defines.patch
@@ -13,8 +13,6 @@ Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/mtk_thermal.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
-diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c
-index 1e61c09153c9..c75661a3801a 100644
--- a/drivers/thermal/mtk_thermal.c
+++ b/drivers/thermal/mtk_thermal.c
@@ -32,15 +32,10 @@
@@ -42,7 +40,7 @@ index 1e61c09153c9..c75661a3801a 100644
struct mtk_thermal;
struct thermal_bank_cfg {
-@@ -765,7 +758,7 @@ static struct platform_driver mtk_thermal_driver = {
+@@ -765,7 +758,7 @@ static struct platform_driver mtk_therma
.probe = mtk_thermal_probe,
.remove = mtk_thermal_remove,
.driver = {
@@ -51,6 +49,3 @@ index 1e61c09153c9..c75661a3801a 100644
.of_match_table = mtk_thermal_of_match,
},
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0200-thermal-mediatek-add-support-for-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0200-thermal-mediatek-add-support-for-MT7622-SoC.patch
index 4f31eb8d65..731bd163d8 100644
--- a/target/linux/mediatek/patches-4.14/0200-thermal-mediatek-add-support-for-MT7622-SoC.patch
+++ b/target/linux/mediatek/patches-4.14/0200-thermal-mediatek-add-support-for-MT7622-SoC.patch
@@ -14,8 +14,6 @@ Signed-off-by: Shunli Wang <shunli.wang@mediatek.com>
drivers/thermal/mtk_thermal.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
-diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c
-index c75661a3801a..e709acb2235e 100644
--- a/drivers/thermal/mtk_thermal.c
+++ b/drivers/thermal/mtk_thermal.c
@@ -153,6 +153,12 @@
@@ -31,7 +29,7 @@ index c75661a3801a..e709acb2235e 100644
struct mtk_thermal;
struct thermal_bank_cfg {
-@@ -242,6 +248,12 @@ static const int mt2712_adcpnp[MT2712_NUM_SENSORS_PER_ZONE] = {
+@@ -242,6 +248,12 @@ static const int mt2712_adcpnp[MT2712_NU
static const int mt2712_mux_values[MT2712_NUM_SENSORS] = { 0, 1, 2, 3 };
@@ -44,7 +42,7 @@ index c75661a3801a..e709acb2235e 100644
/**
* The MT8173 thermal controller has four banks. Each bank can read up to
* four temperature sensors simultaneously. The MT8173 has a total of 5
-@@ -329,6 +341,25 @@ static const struct mtk_thermal_data mt2712_thermal_data = {
+@@ -329,6 +341,25 @@ static const struct mtk_thermal_data mt2
.sensor_mux_values = mt2712_mux_values,
};
@@ -70,7 +68,7 @@ index c75661a3801a..e709acb2235e 100644
/**
* raw_to_mcelsius - convert a raw ADC value to mcelsius
* @mt: The thermal controller
-@@ -631,6 +662,10 @@ static const struct of_device_id mtk_thermal_of_match[] = {
+@@ -631,6 +662,10 @@ static const struct of_device_id mtk_the
{
.compatible = "mediatek,mt2712-thermal",
.data = (void *)&mt2712_thermal_data,
@@ -81,6 +79,3 @@ index c75661a3801a..e709acb2235e 100644
}, {
},
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0201-dt-bindings-clock-mediatek-add-missing-required-rese.patch b/target/linux/mediatek/patches-4.14/0201-dt-bindings-clock-mediatek-add-missing-required-rese.patch
index 601e5b9855..6f22dc2411 100644
--- a/target/linux/mediatek/patches-4.14/0201-dt-bindings-clock-mediatek-add-missing-required-rese.patch
+++ b/target/linux/mediatek/patches-4.14/0201-dt-bindings-clock-mediatek-add-missing-required-rese.patch
@@ -20,8 +20,6 @@ Reviewed-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt | 2 ++
3 files changed, 5 insertions(+)
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
-index 7aa3fa167668..52757adf86bb 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
@@ -9,6 +9,7 @@ Required Properties:
@@ -32,8 +30,6 @@ index 7aa3fa167668..52757adf86bb 100644
The ethsys controller uses the common clk binding from
Documentation/devicetree/bindings/clock/clock-bindings.txt
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
-index d5d5f1227665..7fe5dc6097a6 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
@@ -8,6 +8,7 @@ Required Properties:
@@ -50,8 +46,6 @@ index d5d5f1227665..7fe5dc6097a6 100644
#clock-cells = <1>;
+ #reset-cells = <1>;
};
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
-index 00760019da00..b8184da2508c 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
@@ -8,6 +8,7 @@ Required Properties:
@@ -68,6 +62,3 @@ index 00760019da00..b8184da2508c 100644
#clock-cells = <1>;
+ #reset-cells = <1>;
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0202-mmc-dt-bindings-add-support-for-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0202-mmc-dt-bindings-add-support-for-MT7622-SoC.patch
index 4d19ead2c1..0e641b475b 100644
--- a/target/linux/mediatek/patches-4.14/0202-mmc-dt-bindings-add-support-for-MT7622-SoC.patch
+++ b/target/linux/mediatek/patches-4.14/0202-mmc-dt-bindings-add-support-for-MT7622-SoC.patch
@@ -10,8 +10,6 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 1 +
1 file changed, 1 insertion(+)
-diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
-index 9b8017670870..f33467a54a05 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -12,6 +12,7 @@ Required properties:
@@ -22,6 +20,3 @@ index 9b8017670870..f33467a54a05 100644
"mediatek,mt7623-mmc", "mediatek,mt2701-mmc": for MT7623 SoC
- reg: physical base address of the controller and length
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0203-mmc-mediatek-add-support-for-MT7622-SoC.patch b/target/linux/mediatek/patches-4.14/0203-mmc-mediatek-add-support-for-MT7622-SoC.patch
index 242e5045fa..613adbc897 100644
--- a/target/linux/mediatek/patches-4.14/0203-mmc-mediatek-add-support-for-MT7622-SoC.patch
+++ b/target/linux/mediatek/patches-4.14/0203-mmc-mediatek-add-support-for-MT7622-SoC.patch
@@ -14,11 +14,9 @@ Tested-by: Jumin Li <jumin.li@mediatek.com>
drivers/mmc/host/mtk-sd.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
-diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
-index 27a62254f12f..f5e0662f2590 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
-@@ -438,11 +438,23 @@ static const struct mtk_mmc_compatible mt2712_compat = {
+@@ -438,11 +438,23 @@ static const struct mtk_mmc_compatible m
.enhance_rx = true,
};
@@ -42,6 +40,3 @@ index 27a62254f12f..f5e0662f2590 100644
{}
};
MODULE_DEVICE_TABLE(of, msdc_of_ids);
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0204-dt-bindings-dmaengine-Add-MediaTek-High-Speed-DMA-co.patch b/target/linux/mediatek/patches-4.14/0204-dt-bindings-dmaengine-Add-MediaTek-High-Speed-DMA-co.patch
index edb3852ce5..b05903e9ed 100644
--- a/target/linux/mediatek/patches-4.14/0204-dt-bindings-dmaengine-Add-MediaTek-High-Speed-DMA-co.patch
+++ b/target/linux/mediatek/patches-4.14/0204-dt-bindings-dmaengine-Add-MediaTek-High-Speed-DMA-co.patch
@@ -13,9 +13,6 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
1 file changed, 33 insertions(+)
create mode 100644 Documentation/devicetree/bindings/dma/mtk-hsdma.txt
-diff --git a/Documentation/devicetree/bindings/dma/mtk-hsdma.txt b/Documentation/devicetree/bindings/dma/mtk-hsdma.txt
-new file mode 100644
-index 000000000000..4bb317359dc6
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/mtk-hsdma.txt
@@ -0,0 +1,33 @@
@@ -52,6 +49,3 @@ index 000000000000..4bb317359dc6
+ };
+
+DMA clients must use the format described in dma/dma.txt file.
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch b/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch
index cd6e1004fb..6fd4cdef48 100644
--- a/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch
+++ b/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch
@@ -27,8 +27,6 @@ Cc: Julia Lawall <julia.lawall@lip6.fr>
create mode 100644 drivers/dma/mediatek/Makefile
create mode 100644 drivers/dma/mediatek/mtk-hsdma.c
-diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
-index fadc4d8783bd..3100b6dfa6e8 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -604,6 +604,8 @@ config ZX_DMA
@@ -40,20 +38,15 @@ index fadc4d8783bd..3100b6dfa6e8 100644
source "drivers/dma/qcom/Kconfig"
source "drivers/dma/dw/Kconfig"
-diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
-index f08f8de1b567..26b0ef43a8f9 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
-@@ -71,5 +71,6 @@ obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
+@@ -72,5 +72,6 @@ obj-$(CONFIG_XGENE_DMA) += xgene-dma.o
obj-$(CONFIG_ZX_DMA) += zx_dma.o
obj-$(CONFIG_ST_FDMA) += st_fdma.o
+obj-y += mediatek/
obj-y += qcom/
obj-y += xilinx/
-diff --git a/drivers/dma/mediatek/Kconfig b/drivers/dma/mediatek/Kconfig
-new file mode 100644
-index 000000000000..27bac0bba09e
--- /dev/null
+++ b/drivers/dma/mediatek/Kconfig
@@ -0,0 +1,13 @@
@@ -70,16 +63,10 @@ index 000000000000..27bac0bba09e
+ This controller provides the channels which is dedicated to
+ memory-to-memory transfer to offload from CPU through ring-
+ based descriptor management.
-diff --git a/drivers/dma/mediatek/Makefile b/drivers/dma/mediatek/Makefile
-new file mode 100644
-index 000000000000..6e778f842f01
--- /dev/null
+++ b/drivers/dma/mediatek/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_MTK_HSDMA) += mtk-hsdma.o
-diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c
-new file mode 100644
-index 000000000000..b7ec56ae02a6
--- /dev/null
+++ b/drivers/dma/mediatek/mtk-hsdma.c
@@ -0,0 +1,1056 @@
@@ -1139,6 +1126,3 @@ index 000000000000..b7ec56ae02a6
+MODULE_DESCRIPTION("MediaTek High-Speed DMA Controller Driver");
+MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>");
+MODULE_LICENSE("GPL v2");
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0206-dt-bindings-clock-mediatek-update-audsys-documentati.patch b/target/linux/mediatek/patches-4.14/0206-dt-bindings-clock-mediatek-update-audsys-documentati.patch
index d92c0c50fb..649a74d1ad 100644
--- a/target/linux/mediatek/patches-4.14/0206-dt-bindings-clock-mediatek-update-audsys-documentati.patch
+++ b/target/linux/mediatek/patches-4.14/0206-dt-bindings-clock-mediatek-update-audsys-documentati.patch
@@ -16,11 +16,9 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
.../bindings/arm/mediatek/mediatek,audsys.txt | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-index 9b8f578d5e19..97b304eaa47c 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-@@ -13,10 +13,19 @@ The AUDSYS controller uses the common clk binding from
+@@ -13,10 +13,19 @@ The AUDSYS controller uses the common cl
Documentation/devicetree/bindings/clock/clock-bindings.txt
The available clocks are defined in dt-bindings/clock/mt*-clk.h.
@@ -45,6 +43,3 @@ index 9b8f578d5e19..97b304eaa47c 100644
+ ...
+ };
+ };
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0207-dt-bindings-clock-mediatek-add-audsys-support-for-MT.patch b/target/linux/mediatek/patches-4.14/0207-dt-bindings-clock-mediatek-add-audsys-support-for-MT.patch
index 8349b85ae4..fde11b9231 100644
--- a/target/linux/mediatek/patches-4.14/0207-dt-bindings-clock-mediatek-add-audsys-support-for-MT.patch
+++ b/target/linux/mediatek/patches-4.14/0207-dt-bindings-clock-mediatek-add-audsys-support-for-MT.patch
@@ -11,11 +11,9 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt | 1 +
1 file changed, 1 insertion(+)
-diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-index 97b304eaa47c..34a69ba67f13 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
-@@ -6,6 +6,7 @@ The MediaTek AUDSYS controller provides various clocks to the system.
+@@ -6,6 +6,7 @@ The MediaTek AUDSYS controller provides
Required Properties:
- compatible: Should be one of:
@@ -23,6 +21,3 @@ index 97b304eaa47c..34a69ba67f13 100644
- "mediatek,mt7622-audsys", "syscon"
- #clock-cells: Must be 1
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0208-clk-mediatek-update-missing-clock-data-for-MT7622-au.patch b/target/linux/mediatek/patches-4.14/0208-clk-mediatek-update-missing-clock-data-for-MT7622-au.patch
index c1f7682eec..d396bd93bf 100644
--- a/target/linux/mediatek/patches-4.14/0208-clk-mediatek-update-missing-clock-data-for-MT7622-au.patch
+++ b/target/linux/mediatek/patches-4.14/0208-clk-mediatek-update-missing-clock-data-for-MT7622-au.patch
@@ -14,11 +14,9 @@ Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
include/dt-bindings/clock/mt7622-clk.h | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
-diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
-index fad7d9fc53ba..13f752de7adc 100644
--- a/drivers/clk/mediatek/clk-mt7622-aud.c
+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
-@@ -106,6 +106,7 @@ static const struct mtk_gate audio_clks[] = {
+@@ -106,6 +106,7 @@ static const struct mtk_gate audio_clks[
GATE_AUDIO1(CLK_AUDIO_INTDIR, "audio_intdir", "intdir_sel", 20),
GATE_AUDIO1(CLK_AUDIO_A1SYS, "audio_a1sys", "a1sys_hp_sel", 21),
GATE_AUDIO1(CLK_AUDIO_A2SYS, "audio_a2sys", "a2sys_hp_sel", 22),
@@ -26,8 +24,6 @@ index fad7d9fc53ba..13f752de7adc 100644
/* AUDIO2 */
GATE_AUDIO2(CLK_AUDIO_UL1, "audio_ul1", "a1sys_hp_sel", 0),
GATE_AUDIO2(CLK_AUDIO_UL2, "audio_ul2", "a1sys_hp_sel", 1),
-diff --git a/include/dt-bindings/clock/mt7622-clk.h b/include/dt-bindings/clock/mt7622-clk.h
-index 3e514ed51d15..e9d77f0e8bce 100644
--- a/include/dt-bindings/clock/mt7622-clk.h
+++ b/include/dt-bindings/clock/mt7622-clk.h
@@ -235,7 +235,8 @@
@@ -40,6 +36,3 @@ index 3e514ed51d15..e9d77f0e8bce 100644
/* SSUSBSYS */
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0209-clk-mediatek-add-devm_of_platform_populate-for-MT762.patch b/target/linux/mediatek/patches-4.14/0209-clk-mediatek-add-devm_of_platform_populate-for-MT762.patch
index 610dcab7c0..affd9a62b0 100644
--- a/target/linux/mediatek/patches-4.14/0209-clk-mediatek-add-devm_of_platform_populate-for-MT762.patch
+++ b/target/linux/mediatek/patches-4.14/0209-clk-mediatek-add-devm_of_platform_populate-for-MT762.patch
@@ -12,11 +12,9 @@ Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
drivers/clk/mediatek/clk-mt7622-aud.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
-diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
-index 13f752de7adc..0a1109ff65b9 100644
--- a/drivers/clk/mediatek/clk-mt7622-aud.c
+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
-@@ -142,6 +142,7 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev)
+@@ -142,6 +142,7 @@ static int clk_mt7622_audiosys_init(stru
{
struct clk_onecell_data *clk_data;
struct device_node *node = pdev->dev.of_node;
@@ -24,7 +22,7 @@ index 13f752de7adc..0a1109ff65b9 100644
int r;
clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK);
-@@ -150,12 +151,15 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev)
+@@ -150,12 +151,15 @@ static int clk_mt7622_audiosys_init(stru
clk_data);
r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
@@ -42,6 +40,3 @@ index 13f752de7adc..0a1109ff65b9 100644
}
static const struct of_device_id of_match_clk_mt7622_aud[] = {
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0210-arm64-dts-mt7622-add-clock-controller-device-nodes.patch b/target/linux/mediatek/patches-4.14/0210-arm64-dts-mt7622-add-clock-controller-device-nodes.patch
index 5d892118ec..12f71a3e55 100644
--- a/target/linux/mediatek/patches-4.14/0210-arm64-dts-mt7622-add-clock-controller-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0210-arm64-dts-mt7622-add-clock-controller-device-nodes.patch
@@ -17,8 +17,6 @@ Cc: Stephen Boyd <sboyd@codeaurora.org>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 76 ++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index b111fec2ed9d..73e5d628a8c8 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -8,6 +8,8 @@
@@ -130,6 +128,3 @@ index b111fec2ed9d..73e5d628a8c8 100644
+ #clock-cells = <1>;
+ };
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0211-arm64-dts-mt7622-add-power-domain-controller-device-.patch b/target/linux/mediatek/patches-4.14/0211-arm64-dts-mt7622-add-power-domain-controller-device-.patch
index 362d40db15..c996c608df 100644
--- a/target/linux/mediatek/patches-4.14/0211-arm64-dts-mt7622-add-power-domain-controller-device-.patch
+++ b/target/linux/mediatek/patches-4.14/0211-arm64-dts-mt7622-add-power-domain-controller-device-.patch
@@ -12,8 +12,6 @@ Cc: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 73e5d628a8c8..81207e652d59 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -9,6 +9,7 @@
@@ -45,6 +43,3 @@ index 73e5d628a8c8..81207e652d59 100644
sysirq: interrupt-controller@10200620 {
compatible = "mediatek,mt7622-sysirq",
"mediatek,mt6577-sysirq";
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0212-arm64-dts-mt7622-add-pinctrl-related-device-nodes.patch b/target/linux/mediatek/patches-4.14/0212-arm64-dts-mt7622-add-pinctrl-related-device-nodes.patch
index 9858790450..21dbb3aceb 100644
--- a/target/linux/mediatek/patches-4.14/0212-arm64-dts-mt7622-add-pinctrl-related-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0212-arm64-dts-mt7622-add-pinctrl-related-device-nodes.patch
@@ -13,8 +13,6 @@ Cc: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 7 +
2 files changed, 207 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index c08309df2cc7..fc8ef78a0a34 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -7,6 +7,8 @@
@@ -236,8 +234,6 @@ index c08309df2cc7..fc8ef78a0a34 100644
&uart0 {
status = "okay";
};
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 81207e652d59..8211bf72ccaa 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -147,6 +147,13 @@
@@ -254,6 +250,3 @@ index 81207e652d59..8211bf72ccaa 100644
gic: interrupt-controller@10300000 {
compatible = "arm,gic-400";
interrupt-controller;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0213-arm64-dts-mt7622-add-PMIC-MT6380-related-nodes.patch b/target/linux/mediatek/patches-4.14/0213-arm64-dts-mt7622-add-PMIC-MT6380-related-nodes.patch
index f02f4b31c4..02c0ad89f1 100644
--- a/target/linux/mediatek/patches-4.14/0213-arm64-dts-mt7622-add-PMIC-MT6380-related-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0213-arm64-dts-mt7622-add-PMIC-MT6380-related-nodes.patch
@@ -19,9 +19,6 @@ Acked-by: Philippe Ombredanne <pombredanne@nexb.com>
3 files changed, 106 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt6380.dtsi
-diff --git a/arch/arm64/boot/dts/mediatek/mt6380.dtsi b/arch/arm64/boot/dts/mediatek/mt6380.dtsi
-new file mode 100644
-index 000000000000..53b335d2de5f
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt6380.dtsi
@@ -0,0 +1,86 @@
@@ -111,8 +108,6 @@ index 000000000000..53b335d2de5f
+ };
+ };
+};
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index fc8ef78a0a34..42bd3a4c9a93 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -10,6 +10,7 @@
@@ -137,8 +132,6 @@ index fc8ef78a0a34..42bd3a4c9a93 100644
&uart0 {
status = "okay";
};
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 8211bf72ccaa..c387c4cb7d3e 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -102,6 +102,18 @@
@@ -160,6 +153,3 @@ index 8211bf72ccaa..c387c4cb7d3e 100644
pericfg: pericfg@10002000 {
compatible = "mediatek,mt7622-pericfg",
"syscon";
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0214-arm64-dts-mt7622-add-cpufreq-related-device-nodes.patch b/target/linux/mediatek/patches-4.14/0214-arm64-dts-mt7622-add-cpufreq-related-device-nodes.patch
index 43692d4344..413c7baa42 100644
--- a/target/linux/mediatek/patches-4.14/0214-arm64-dts-mt7622-add-cpufreq-related-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0214-arm64-dts-mt7622-add-cpufreq-related-device-nodes.patch
@@ -14,8 +14,6 @@ Cc: Viresh Kumar <viresh.kumar@linaro.org>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 52 ++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index 42bd3a4c9a93..b3878656475c 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -20,6 +20,18 @@
@@ -37,8 +35,6 @@ index 42bd3a4c9a93..b3878656475c 100644
gpio-keys {
compatible = "gpio-keys-polled";
poll-interval = <100>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index c387c4cb7d3e..7256879de4c9 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -18,6 +18,50 @@
@@ -114,6 +110,3 @@ index c387c4cb7d3e..7256879de4c9 100644
enable-method = "psci";
clock-frequency = <1300000000>;
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0215-arm64-dts-mt7622-turn-uart0-clock-to-real-ones.patch b/target/linux/mediatek/patches-4.14/0215-arm64-dts-mt7622-turn-uart0-clock-to-real-ones.patch
index 541c46bf47..39e0a2f00c 100644
--- a/target/linux/mediatek/patches-4.14/0215-arm64-dts-mt7622-turn-uart0-clock-to-real-ones.patch
+++ b/target/linux/mediatek/patches-4.14/0215-arm64-dts-mt7622-turn-uart0-clock-to-real-ones.patch
@@ -12,8 +12,6 @@ Cc: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 7256879de4c9..d8a17d10e2ff 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -91,18 +91,6 @@
@@ -45,6 +43,3 @@ index 7256879de4c9..d8a17d10e2ff 100644
clock-names = "baud", "bus";
status = "disabled";
};
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0216-arm64-dts-mt7622-add-SoC-and-peripheral-related-devi.patch b/target/linux/mediatek/patches-4.14/0216-arm64-dts-mt7622-add-SoC-and-peripheral-related-devi.patch
index 5db0584122..6bef230413 100644
--- a/target/linux/mediatek/patches-4.14/0216-arm64-dts-mt7622-add-SoC-and-peripheral-related-devi.patch
+++ b/target/linux/mediatek/patches-4.14/0216-arm64-dts-mt7622-add-SoC-and-peripheral-related-devi.patch
@@ -19,8 +19,6 @@ Cc: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 264 +++++++++++++++++++++++++++
2 files changed, 318 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index b3878656475c..ba6a79caca21 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -235,6 +235,34 @@
@@ -91,8 +89,6 @@ index b3878656475c..ba6a79caca21 100644
+ pinctrl-0 = <&watchdog_pins>;
status = "okay";
};
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index d8a17d10e2ff..448cd366995b 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -11,6 +11,7 @@
@@ -258,10 +254,11 @@ index d8a17d10e2ff..448cd366995b 100644
uart0: serial@11002000 {
compatible = "mediatek,mt7622-uart",
"mediatek,mt6577-uart";
-@@ -228,6 +335,163 @@
+@@ -227,6 +334,163 @@
+ clock-names = "baud", "bus";
status = "disabled";
};
-
++
+ uart1: serial@11003000 {
+ compatible = "mediatek,mt7622-uart",
+ "mediatek,mt6577-uart";
@@ -418,10 +415,6 @@ index d8a17d10e2ff..448cd366995b 100644
+ clock-names = "baud", "bus";
+ status = "disabled";
+ };
-+
+
ssusbsys: ssusbsys@1a000000 {
compatible = "mediatek,mt7622-ssusbsys",
- "syscon";
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0217-arm64-dts-mt7622-add-flash-related-device-nodes.patch b/target/linux/mediatek/patches-4.14/0217-arm64-dts-mt7622-add-flash-related-device-nodes.patch
index fd11853c4a..85812878ab 100644
--- a/target/linux/mediatek/patches-4.14/0217-arm64-dts-mt7622-add-flash-related-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0217-arm64-dts-mt7622-add-flash-related-device-nodes.patch
@@ -14,8 +14,6 @@ Cc: Guochun Mao <guochun.mao@mediatek.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 34 ++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index ba6a79caca21..48c5ba472721 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -235,6 +235,10 @@
@@ -53,8 +51,6 @@ index ba6a79caca21..48c5ba472721 100644
&pwm {
pinctrl-names = "default";
pinctrl-0 = <&pwm7_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 448cd366995b..d287d75e1a54 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -468,6 +468,40 @@
@@ -98,6 +94,3 @@ index 448cd366995b..d287d75e1a54 100644
spi1: spi@11016000 {
compatible = "mediatek,mt7622-spi";
reg = <0 0x11016000 0 0x100>;
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0218-arm64-dts-mt7622-add-ethernet-device-nodes.patch b/target/linux/mediatek/patches-4.14/0218-arm64-dts-mt7622-add-ethernet-device-nodes.patch
index 82b523c9d1..2986cc740a 100644
--- a/target/linux/mediatek/patches-4.14/0218-arm64-dts-mt7622-add-ethernet-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0218-arm64-dts-mt7622-add-ethernet-device-nodes.patch
@@ -11,8 +11,6 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 31 ++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index 48c5ba472721..e2bd93e1b49b 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -249,6 +249,28 @@
@@ -44,8 +42,6 @@ index 48c5ba472721..e2bd93e1b49b 100644
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index d287d75e1a54..95f947eb824c 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -550,6 +550,37 @@
@@ -86,6 +82,3 @@ index d287d75e1a54..95f947eb824c 100644
sgmiisys: sgmiisys@1b128000 {
compatible = "mediatek,mt7622-sgmiisys",
"syscon";
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0219-arm64-dts-mt7622-add-PCIe-device-nodes.patch b/target/linux/mediatek/patches-4.14/0219-arm64-dts-mt7622-add-PCIe-device-nodes.patch
index 83ba63ab96..4908edab86 100644
--- a/target/linux/mediatek/patches-4.14/0219-arm64-dts-mt7622-add-PCIe-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0219-arm64-dts-mt7622-add-PCIe-device-nodes.patch
@@ -12,8 +12,6 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 74 ++++++++++++++++++++++++++++
2 files changed, 84 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index e2bd93e1b49b..72ef4434bcef 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -54,6 +54,16 @@
@@ -33,8 +31,6 @@ index e2bd93e1b49b..72ef4434bcef 100644
&pio {
/* eMMC is shared pin with parallel NAND */
emmc_pins_default: emmc-pins-default {
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 95f947eb824c..cc026ebda2f4 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -542,6 +542,80 @@
@@ -118,6 +114,3 @@ index 95f947eb824c..cc026ebda2f4 100644
ethsys: syscon@1b000000 {
compatible = "mediatek,mt7622-ethsys",
"syscon";
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0220-arm64-dts-mt7622-add-SATA-device-nodes.patch b/target/linux/mediatek/patches-4.14/0220-arm64-dts-mt7622-add-SATA-device-nodes.patch
index 83abf609c9..18f3e63ac5 100644
--- a/target/linux/mediatek/patches-4.14/0220-arm64-dts-mt7622-add-SATA-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0220-arm64-dts-mt7622-add-SATA-device-nodes.patch
@@ -12,8 +12,6 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 40 ++++++++++++++++++++++++++++
2 files changed, 48 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index 72ef4434bcef..6715ffa5c15e 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -323,6 +323,14 @@
@@ -31,8 +29,6 @@ index 72ef4434bcef..6715ffa5c15e 100644
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spic0_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index cc026ebda2f4..881bc17f8f0d 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -9,6 +9,7 @@
@@ -89,6 +85,3 @@ index cc026ebda2f4..881bc17f8f0d 100644
ethsys: syscon@1b000000 {
compatible = "mediatek,mt7622-ethsys",
"syscon";
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0221-arm64-dts-mt7622-add-usb-device-nodes.patch b/target/linux/mediatek/patches-4.14/0221-arm64-dts-mt7622-add-usb-device-nodes.patch
index 9258093cb2..03982c96d7 100644
--- a/target/linux/mediatek/patches-4.14/0221-arm64-dts-mt7622-add-usb-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0221-arm64-dts-mt7622-add-usb-device-nodes.patch
@@ -13,8 +13,6 @@ Tested-by: Jumin Li <jumin.li@mediatek.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 51 ++++++++++++++++++++++++++++
2 files changed, 79 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index 6715ffa5c15e..cc89e2e3c597 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -52,6 +52,24 @@
@@ -59,8 +57,6 @@ index 6715ffa5c15e..cc89e2e3c597 100644
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index 881bc17f8f0d..bad1e997359a 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -535,6 +535,57 @@
@@ -121,6 +117,3 @@ index 881bc17f8f0d..bad1e997359a 100644
pciesys: pciesys@1a100800 {
compatible = "mediatek,mt7622-pciesys",
"syscon";
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0222-arm64-dts-mt7622-add-High-Speed-DMA-device-nodes.patch b/target/linux/mediatek/patches-4.14/0222-arm64-dts-mt7622-add-High-Speed-DMA-device-nodes.patch
index 8d22510c8c..5c83ff6ade 100644
--- a/target/linux/mediatek/patches-4.14/0222-arm64-dts-mt7622-add-High-Speed-DMA-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0222-arm64-dts-mt7622-add-High-Speed-DMA-device-nodes.patch
@@ -10,8 +10,6 @@ Signed-off-by: Sean Wang <sean.wang@mediatek.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index bad1e997359a..ffb934b0a097 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -715,6 +715,16 @@
@@ -31,6 +29,3 @@ index bad1e997359a..ffb934b0a097 100644
eth: ethernet@1b100000 {
compatible = "mediatek,mt7622-eth",
"mediatek,mt2701-eth",
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0223-arm64-dts-mt7622-add-mmc-related-device-nodes.patch b/target/linux/mediatek/patches-4.14/0223-arm64-dts-mt7622-add-mmc-related-device-nodes.patch
index c7c437ac28..7d28e2b567 100644
--- a/target/linux/mediatek/patches-4.14/0223-arm64-dts-mt7622-add-mmc-related-device-nodes.patch
+++ b/target/linux/mediatek/patches-4.14/0223-arm64-dts-mt7622-add-mmc-related-device-nodes.patch
@@ -12,8 +12,6 @@ Signed-off-by: Jimin Wang <jimin.wang@mediatek.com>
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 20 +++++
2 files changed, 126 insertions(+)
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-index cc89e2e3c597..45d8655ee423 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -8,6 +8,7 @@
@@ -171,8 +169,6 @@ index cc89e2e3c597..45d8655ee423 100644
&nandc {
pinctrl-names = "default";
pinctrl-0 = <&parallel_nand_pins>;
-diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-index ffb934b0a097..0f1ebddd6619 100644
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -527,6 +527,26 @@
@@ -202,6 +198,3 @@ index ffb934b0a097..0f1ebddd6619 100644
ssusbsys: ssusbsys@1a000000 {
compatible = "mediatek,mt7622-ssusbsys",
"syscon";
---
-2.11.0
-
diff --git a/target/linux/mediatek/patches-4.14/0224-add-mt7622-defconfig-for-testing-these-new-drivers.patch b/target/linux/mediatek/patches-4.14/0224-add-mt7622-defconfig-for-testing-these-new-drivers.patch
index ba128fcc01..a39c5267cc 100644
--- a/target/linux/mediatek/patches-4.14/0224-add-mt7622-defconfig-for-testing-these-new-drivers.patch
+++ b/target/linux/mediatek/patches-4.14/0224-add-mt7622-defconfig-for-testing-these-new-drivers.patch
@@ -8,9 +8,6 @@ Subject: [PATCH 224/224] add mt7622 defconfig for testing these new drivers
1 file changed, 275 insertions(+)
create mode 100644 arch/arm64/configs/mt7622_rfb1_defconfig
-diff --git a/arch/arm64/configs/mt7622_rfb1_defconfig b/arch/arm64/configs/mt7622_rfb1_defconfig
-new file mode 100644
-index 000000000000..1870c601cc0f
--- /dev/null
+++ b/arch/arm64/configs/mt7622_rfb1_defconfig
@@ -0,0 +1,275 @@
@@ -289,6 +286,3 @@ index 000000000000..1870c601cc0f
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_FTRACE is not set
---
-2.11.0
-