[][Add clock and pinctrl setting and i2c pwm to mt7986 DT]
[Description]
Add more pinctrl pinmux list into DT
Modify DT according to releated clock driver
Add i2c and pwm in DT
Change since v1:
Add mt7986 compatiable string to i2c and pwm driver
Enable i2c in mt7986 kernel config
Fix pwm reg info in DT
Add memory node back to prevent hang when u-boot can't carry memery size info.
Change since v2:
fix pwm clock and it's pinctrl node
Change since v3:
Add ethernet clock parent
Change since v4:
Fix ethernet clock parent
Change since v5:
Fix auxadc and ethernet (ethsys)
[Release-log]
Build Pass
Boot-up from spim-nand flash pass
Update since v1:
I2C test pass with i2cdetect command
Update since v2:
PWM test pass with blinking led
Update since V5:
Ethernet test pass with ping
auxadc test pass with cat sysfs
INFRACFG driver in pwm2_ck_sel, and pwm1_ck_sel have bug,
We got 32k instead of csw_pwm_ck, need clock owner to fix this.
--> Fix by change 4619106
Change-Id: Icac52cae356796fec6b9e3652747e14fed9cf4e0
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/4610073
diff --git a/target/linux/mediatek/patches-5.4/0900-i2c-busses-add-mt7986-support.patch b/target/linux/mediatek/patches-5.4/0900-i2c-busses-add-mt7986-support.patch
new file mode 100644
index 0000000..a375842
--- /dev/null
+++ b/target/linux/mediatek/patches-5.4/0900-i2c-busses-add-mt7986-support.patch
@@ -0,0 +1,32 @@
+diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
+index e1ef012..4fd4721 100644
+--- a/drivers/i2c/busses/i2c-mt65xx.c
++++ b/drivers/i2c/busses/i2c-mt65xx.c
+@@ -289,6 +289,19 @@ static const struct mtk_i2c_compatible mt7622_compat = {
+ .ltiming_adjust = 0,
+ };
+
++static const struct mtk_i2c_compatible mt7986_compat = {
++ .quirks = &mt7622_i2c_quirks,
++ .regs = mt_i2c_regs_v1,
++ .pmic_i2c = 0,
++ .dcm = 1,
++ .auto_restart = 1,
++ .aux_len_reg = 1,
++ .support_33bits = 0,
++ .timing_adjust = 0,
++ .dma_sync = 1,
++ .ltiming_adjust = 0,
++};
++
+ static const struct mtk_i2c_compatible mt8173_compat = {
+ .regs = mt_i2c_regs_v1,
+ .pmic_i2c = 0,
+@@ -319,6 +332,7 @@ static const struct of_device_id mtk_i2c_of_match[] = {
+ { .compatible = "mediatek,mt6577-i2c", .data = &mt6577_compat },
+ { .compatible = "mediatek,mt6589-i2c", .data = &mt6589_compat },
+ { .compatible = "mediatek,mt7622-i2c", .data = &mt7622_compat },
++ { .compatible = "mediatek,mt7986-i2c", .data = &mt7986_compat },
+ { .compatible = "mediatek,mt8173-i2c", .data = &mt8173_compat },
+ { .compatible = "mediatek,mt8183-i2c", .data = &mt8183_compat },
+ {}