[Feature] add GA346 baseline version
Change-Id: Ic62933698569507dcf98240cdf5d9931ae34348f
diff --git a/src/kernel/linux/v4.19/drivers/clk/mediatek/Kconfig b/src/kernel/linux/v4.19/drivers/clk/mediatek/Kconfig
new file mode 100755
index 0000000..aefc152
--- /dev/null
+++ b/src/kernel/linux/v4.19/drivers/clk/mediatek/Kconfig
@@ -0,0 +1,563 @@
+#
+# MediaTek Clock Drivers
+#
+menu "Clock driver for MediaTek SoC"
+ depends on ARCH_MEDIATEK || COMPILE_TEST
+
+config COMMON_CLK_MEDIATEK
+ bool
+ select RESET_CONTROLLER
+ ---help---
+ MediaTek SoCs' clock support.
+
+config COMMON_CLK_MT2701
+ bool "Clock driver for MediaTek MT2701"
+ depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
+ select COMMON_CLK_MEDIATEK
+ default ARCH_MEDIATEK && ARM
+ ---help---
+ This driver supports MediaTek MT2701 basic clocks.
+
+config COMMON_CLK_MT2701_MMSYS
+ bool "Clock driver for MediaTek MT2701 mmsys"
+ depends on COMMON_CLK_MT2701
+ ---help---
+ This driver supports MediaTek MT2701 mmsys clocks.
+
+config COMMON_CLK_MT2701_IMGSYS
+ bool "Clock driver for MediaTek MT2701 imgsys"
+ depends on COMMON_CLK_MT2701
+ ---help---
+ This driver supports MediaTek MT2701 imgsys clocks.
+
+config COMMON_CLK_MT2701_VDECSYS
+ bool "Clock driver for MediaTek MT2701 vdecsys"
+ depends on COMMON_CLK_MT2701
+ ---help---
+ This driver supports MediaTek MT2701 vdecsys clocks.
+
+config COMMON_CLK_MT2701_HIFSYS
+ bool "Clock driver for MediaTek MT2701 hifsys"
+ depends on COMMON_CLK_MT2701
+ ---help---
+ This driver supports MediaTek MT2701 hifsys clocks.
+
+config COMMON_CLK_MT2701_ETHSYS
+ bool "Clock driver for MediaTek MT2701 ethsys"
+ depends on COMMON_CLK_MT2701
+ ---help---
+ This driver supports MediaTek MT2701 ethsys clocks.
+
+config COMMON_CLK_MT2701_BDPSYS
+ bool "Clock driver for MediaTek MT2701 bdpsys"
+ depends on COMMON_CLK_MT2701
+ ---help---
+ This driver supports MediaTek MT2701 bdpsys clocks.
+
+config COMMON_CLK_MT2701_AUDSYS
+ bool "Clock driver for Mediatek MT2701 audsys"
+ depends on COMMON_CLK_MT2701
+ ---help---
+ This driver supports Mediatek MT2701 audsys clocks.
+
+config COMMON_CLK_MT2701_G3DSYS
+ bool "Clock driver for MediaTek MT2701 g3dsys"
+ depends on COMMON_CLK_MT2701
+ ---help---
+ This driver supports MediaTek MT2701 g3dsys clocks.
+
+config COMMON_CLK_MT2712
+ bool "Clock driver for MediaTek MT2712"
+ depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
+ select COMMON_CLK_MEDIATEK
+ default ARCH_MEDIATEK && ARM64
+ ---help---
+ This driver supports MediaTek MT2712 basic clocks.
+
+config COMMON_CLK_MT2712_BDPSYS
+ bool "Clock driver for MediaTek MT2712 bdpsys"
+ depends on COMMON_CLK_MT2712
+ ---help---
+ This driver supports MediaTek MT2712 bdpsys clocks.
+
+config COMMON_CLK_MT2712_IMGSYS
+ bool "Clock driver for MediaTek MT2712 imgsys"
+ depends on COMMON_CLK_MT2712
+ ---help---
+ This driver supports MediaTek MT2712 imgsys clocks.
+
+config COMMON_CLK_MT2712_JPGDECSYS
+ bool "Clock driver for MediaTek MT2712 jpgdecsys"
+ depends on COMMON_CLK_MT2712
+ ---help---
+ This driver supports MediaTek MT2712 jpgdecsys clocks.
+
+config COMMON_CLK_MT2712_MFGCFG
+ bool "Clock driver for MediaTek MT2712 mfgcfg"
+ depends on COMMON_CLK_MT2712
+ ---help---
+ This driver supports MediaTek MT2712 mfgcfg clocks.
+
+config COMMON_CLK_MT2712_MMSYS
+ bool "Clock driver for MediaTek MT2712 mmsys"
+ depends on COMMON_CLK_MT2712
+ ---help---
+ This driver supports MediaTek MT2712 mmsys clocks.
+
+config COMMON_CLK_MT2712_VDECSYS
+ bool "Clock driver for MediaTek MT2712 vdecsys"
+ depends on COMMON_CLK_MT2712
+ ---help---
+ This driver supports MediaTek MT2712 vdecsys clocks.
+
+config COMMON_CLK_MT2712_VENCSYS
+ bool "Clock driver for MediaTek MT2712 vencsys"
+ depends on COMMON_CLK_MT2712
+ ---help---
+ This driver supports MediaTek MT2712 vencsys clocks.
+
+config COMMON_CLK_MT6779
+ bool "Clock driver for MediaTek MT6779"
+ depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
+ select COMMON_CLK_MEDIATEK
+ default ARCH_MEDIATEK && ARM64
+
+ help
+ This driver supports MediaTek MT6779 basic clocks,
+ which is used to control basic clock output.
+ If you wish to use clock resources from the MT6779 SOC,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_MMSYS
+ bool "Clock driver for MediaTek MT6779 mmsys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports MediaTek MT6779 mmsys clocks,
+ which is used to control mmsys clock output.
+ If you wish to use clock resources from the mmsys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_IMGSYS
+ bool "Clock driver for MediaTek MT6779 imgsys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports MediaTek MT6779 imgsys clocks,
+ which is used to control imgsys clock output.
+ If you wish to use clock resources from the imgsys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_IPESYS
+ bool "Clock driver for MediaTek MT6779 ipesys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports MediaTek MT6779 ipesys clocks,
+ which is used to control ipesys clock output.
+ If you wish to use clock resources from the ipesys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_CAMSYS
+ bool "Clock driver for MediaTek MT6779 camsys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports MediaTek MT6779 camsys clocks,
+ which is used to control camsys clock output.
+ If you wish to use clock resources from the camsys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_VDECSYS
+ bool "Clock driver for MediaTek MT6779 vdecsys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports MediaTek MT6779 vdecsys clocks,
+ which is used to control vdecsys clock output.
+ If you wish to use clock resources from the vdecsys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_VENCSYS
+ bool "Clock driver for MediaTek MT6779 vencsys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports MediaTek MT6779 vencsys clocks,
+ which is used to control vencsys clock output.
+ If you wish to use clock resources from the vencsys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_MFGCFG
+ bool "Clock driver for MediaTek MT6779 mfgcfg"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports MediaTek MT6779 mfgcfg clocks,
+ which is used to control mfgcfg clock output.
+ If you wish to use clock resources from the mfg device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_AUDSYS
+ bool "Clock driver for Mediatek MT6779 audsys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports Mediatek MT6779 audsys clocks,
+ which is used to control audsys clock output.
+ If you wish to use clock resources from the audio device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_APUVCORESYS
+ bool "Clock driver for Mediatek MT6779 apuvcoresys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports Mediatek MT6779 apuvcoresys clocks,
+ which is used to control apuvcoresys clock output.
+ If you wish to use clock resources from the apu vcore device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_APUCONNSYS
+ bool "Clock driver for Mediatek MT6779 apuconnsys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports Mediatek MT6779 apuconnsys clocks,
+ which is used to control apuconnsys clock output.
+ If you wish to use clock resources from the apu conn device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_APU0SYS
+ bool "Clock driver for Mediatek MT6779 apu0sys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports Mediatek MT6779 apu0sys clocks,
+ which is used to control apu0sys clock output.
+ If you wish to use clock resources from the apu0 device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_APU1SYS
+ bool "Clock driver for Mediatek MT6779 apu1sys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports Mediatek MT6779 apu1sys clocks,
+ which is used to control apu1sys clock output.
+ If you wish to use clock resources from the apu1 device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6779_MDLASYS
+ bool "Clock driver for Mediatek MT6779 mdlasys"
+ depends on COMMON_CLK_MT6779
+ help
+ This driver supports Mediatek MT6779 mdlasys clocks,
+ which is used to control mdlasys clock output.
+ If you wish to use clock resources from the mdla device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6797
+ bool "Clock driver for MediaTek MT6797"
+ depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
+ select COMMON_CLK_MEDIATEK
+ default ARCH_MEDIATEK && ARM64
+ ---help---
+ This driver supports MediaTek MT6797 basic clocks.
+
+config COMMON_CLK_MT6797_MMSYS
+ bool "Clock driver for MediaTek MT6797 mmsys"
+ depends on COMMON_CLK_MT6797
+ ---help---
+ This driver supports MediaTek MT6797 mmsys clocks.
+
+config COMMON_CLK_MT6797_IMGSYS
+ bool "Clock driver for MediaTek MT6797 imgsys"
+ depends on COMMON_CLK_MT6797
+ ---help---
+ This driver supports MediaTek MT6797 imgsys clocks.
+
+config COMMON_CLK_MT6797_VDECSYS
+ bool "Clock driver for MediaTek MT6797 vdecsys"
+ depends on COMMON_CLK_MT6797
+ ---help---
+ This driver supports MediaTek MT6797 vdecsys clocks.
+
+config COMMON_CLK_MT6797_VENCSYS
+ bool "Clock driver for MediaTek MT6797 vencsys"
+ depends on COMMON_CLK_MT6797
+ ---help---
+ This driver supports MediaTek MT6797 vencsys clocks.
+
+config COMMON_CLK_MT6880
+ bool "Clock driver for MediaTek MT6880"
+ select COMMON_CLK_MEDIATEK
+ ---help---
+ This driver supports MediaTek MT6880 basic clocks,
+ which is used to control basic clock output.
+ If you wish to use clock resources from the MT6880 SOC,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6880_AUDIOSYS
+ bool "Clock driver for MediaTek MT6880 audiosys"
+ depends on COMMON_CLK_MT6880
+ ---help---
+ This driver supports MediaTek MT6880 audiosys clocks,
+ which is used to control audiosys clock output.
+ If you wish to use clock resources from the audiosys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6880_DBGSYS_DEM
+ bool "Clock driver for MediaTek MT6880 dbgsys_dem"
+ depends on COMMON_CLK_MT6880
+ ---help---
+ This driver supports MediaTek MT6880 dbgsys_dem clocks,
+ which is used to control dbgsys_dem clock output.
+ If you wish to use clock resources from the dbgsys_dem device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6880_GCE
+ bool "Clock driver for MediaTek MT6880 gce"
+ depends on COMMON_CLK_MT6880
+ ---help---
+ This driver supports MediaTek MT6880 gce clocks,
+ which is used to control gce clock output.
+ If you wish to use clock resources from the gce device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6880_IMP_IIC_WRAP_E
+ bool "Clock driver for MediaTek MT6880 imp_iic_wrap_e"
+ depends on COMMON_CLK_MT6880
+ ---help---
+ This driver supports MediaTek MT6880 imp_iic_wrap_e clocks,
+ which is used to control imp_iic_wrap_e clock output.
+ If you wish to use clock resources from the imp_iic_wrap_e device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6880_MFGSYS
+ bool "Clock driver for MediaTek MT6880 mfgsys"
+ depends on COMMON_CLK_MT6880
+ ---help---
+ This driver supports MediaTek MT6880 mfgsys clocks,
+ which is used to control mfgsys clock output.
+ If you wish to use clock resources from the mfgsys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6880_MMSYS_CONFIG
+ bool "Clock driver for MediaTek MT6880 mmsys_config"
+ depends on COMMON_CLK_MT6880
+ ---help---
+ This driver supports MediaTek MT6880 mmsys_config clocks,
+ which is used to control mmsys_config clock output.
+ If you wish to use clock resources from the mmsys_config device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6890
+ bool "Clock driver for MediaTek MT6890"
+ select COMMON_CLK_MEDIATEK
+ ---help---
+ This driver supports MediaTek MT6890 basic clocks,
+ which is used to control basic clock output.
+ If you wish to use clock resources from the MT6890 SOC,
+ say Y. Otherwise, pls say N.
+
+config COMMON_CLK_MT6890_AUDIOSYS
+ bool "Clock driver for MediaTek MT6890 audiosys"
+ depends on COMMON_CLK_MT6890
+ ---help---
+ This driver supports MediaTek MT6890 audiosys clocks,
+ which is used to control audiosys clock output.
+ If you wish to use clock resources from the audiosys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6890_DBGSYS_DEM
+ bool "Clock driver for MediaTek MT6890 dbgsys_dem"
+ depends on COMMON_CLK_MT6890
+ ---help---
+ This driver supports MediaTek MT6890 dbgsys_dem clocks,
+ which is used to control dbgsys_dem clock output.
+ If you wish to use clock resources from the dbgsys_dem device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6890_GCE
+ bool "Clock driver for MediaTek MT6890 gce"
+ depends on COMMON_CLK_MT6890
+ ---help---
+ This driver supports MediaTek MT6890 gce clocks,
+ which is used to control gce clock output.
+ If you wish to use clock resources from the gce device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6890_IMP_IIC_WRAP_E
+ bool "Clock driver for MediaTek MT6890 imp_iic_wrap_e"
+ depends on COMMON_CLK_MT6890
+ ---help---
+ This driver supports MediaTek MT6890 imp_iic_wrap_e clocks,
+ which is used to control imp_iic_wrap_e clock output.
+ If you wish to use clock resources from the imp_iic_wrap_e device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6890_MFGSYS
+ bool "Clock driver for MediaTek MT6890 mfgsys"
+ depends on COMMON_CLK_MT6890
+ ---help---
+ This driver supports MediaTek MT6890 mfgsys clocks,
+ which is used to control mfgsys clock output.
+ If you wish to use clock resources from the mfgsys device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT6890_MMSYS_CONFIG
+ bool "Clock driver for MediaTek MT6890 mmsys_config"
+ depends on COMMON_CLK_MT6890
+ ---help---
+ This driver supports MediaTek MT6890 mmsys_config clocks,
+ which is used to control mmsys_config clock output.
+ If you wish to use clock resources from the mmsys_config device,
+ say Y. Otherwise, say N.
+
+config COMMON_CLK_MT7622
+ bool "Clock driver for MediaTek MT7622"
+ depends on ARCH_MEDIATEK || COMPILE_TEST
+ select COMMON_CLK_MEDIATEK
+ default ARCH_MEDIATEK
+ ---help---
+ This driver supports MediaTek MT7622 basic clocks and clocks
+ required for various periperals found on MediaTek.
+
+config COMMON_CLK_MT7622_ETHSYS
+ bool "Clock driver for MediaTek MT7622 ETHSYS"
+ depends on COMMON_CLK_MT7622
+ ---help---
+ This driver add support for clocks for Ethernet and SGMII
+ required on MediaTek MT7622 SoC.
+
+config COMMON_CLK_MT7622_HIFSYS
+ bool "Clock driver for MediaTek MT7622 HIFSYS"
+ depends on COMMON_CLK_MT7622
+ ---help---
+ This driver supports MediaTek MT7622 HIFSYS clocks providing
+ to PCI-E and USB.
+
+config COMMON_CLK_MT7622_AUDSYS
+ bool "Clock driver for MediaTek MT7622 AUDSYS"
+ depends on COMMON_CLK_MT7622
+ ---help---
+ This driver supports MediaTek MT7622 AUDSYS clocks providing
+ to audio consumers such as I2S and TDM.
+
+config COMMON_CLK_MT7629
+ bool "Clock driver for MediaTek MT7629"
+ depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
+ select COMMON_CLK_MEDIATEK
+ default ARCH_MEDIATEK && ARM
+ ---help---
+ This driver supports MediaTek MT7629 basic clocks and clocks
+ required for various periperals found on MediaTek.
+
+config COMMON_CLK_MT7629_ETHSYS
+ bool "Clock driver for MediaTek MT7629 ETHSYS"
+ depends on COMMON_CLK_MT7629
+ ---help---
+ This driver add support for clocks for Ethernet and SGMII
+ required on MediaTek MT7629 SoC.
+
+config COMMON_CLK_MT7629_HIFSYS
+ bool "Clock driver for MediaTek MT7629 HIFSYS"
+ depends on COMMON_CLK_MT7629
+ ---help---
+ This driver supports MediaTek MT7629 HIFSYS clocks providing
+ to PCI-E and USB.
+
+config COMMON_CLK_MT8135
+ bool "Clock driver for MediaTek MT8135"
+ depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
+ select COMMON_CLK_MEDIATEK
+ default ARCH_MEDIATEK && ARM
+ ---help---
+ This driver supports MediaTek MT8135 clocks.
+
+config COMMON_CLK_MT8168
+ bool "Clock driver for MediaTek MT8168"
+ depends on ARCH_MEDIATEK || COMPILE_TEST
+ select COMMON_CLK_MEDIATEK
+ default ARCH_MEDIATEK && ARM64
+ ---help---
+ This driver supports MediaTek MT8168 basic clocks.
+
+config COMMON_CLK_MT8168_APU
+ bool "Clock driver for MediaTek MT8168 apu"
+ depends on COMMON_CLK_MT8168
+ ---help---
+ This driver supports MediaTek MT8168 apu clocks.
+
+config COMMON_CLK_MT8168_CAMSYS
+ bool "Clock driver for MediaTek MT8168 camsys"
+ depends on COMMON_CLK_MT8168
+ ---help---
+ This driver supports MediaTek MT8168 camsys clocks.
+
+config COMMON_CLK_MT8168_MFGCFG
+ bool "Clock driver for MediaTek MT8168 mfgcfg"
+ depends on COMMON_CLK_MT8168
+ ---help---
+ This driver supports MediaTek MT8168 mfgcfg clocks.
+
+config COMMON_CLK_MT8168_MMSYS
+ bool "Clock driver for MediaTek MT8168 mmsys"
+ depends on COMMON_CLK_MT8168
+ ---help---
+ This driver supports MediaTek MT8168 mmsys clocks.
+
+config COMMON_CLK_MT8168_VDECSYS
+ bool "Clock driver for MediaTek MT8168 vdecsys"
+ depends on COMMON_CLK_MT8168
+ ---help---
+ This driver supports MediaTek MT8168 vdecsys clocks.
+
+config COMMON_CLK_MT8168_VENCSYS
+ bool "Clock driver for MediaTek MT8168 vencsys"
+ depends on COMMON_CLK_MT8168
+ ---help---
+ This driver supports MediaTek MT8168 vencsys clocks.
+
+config COMMON_CLK_MT8173
+ bool "Clock driver for MediaTek MT8173"
+ depends on ARCH_MEDIATEK || COMPILE_TEST
+ select COMMON_CLK_MEDIATEK
+ default ARCH_MEDIATEK
+ ---help---
+ This driver supports MediaTek MT8173 clocks.
+
+config COMMON_CLK_MTK_FREQ_HOPPING
+ tristate "MediaTek FREQHOPPING driver"
+ help
+ FREQHOPPING driver support for MediaTek SOC
+ If you want to use MediaTek FREQHOPPING driver,
+ say Y or M here.
+ If unsure, say N.
+
+config COMMON_CLK_MTK_FREQ_HOPPING_DEBUG
+ bool "Mediate Freq Hopping debug fs"
+ depends on DEBUG_FS && COMMON_CLK_MTK_FREQ_HOPPING
+ help
+ This option is for debugging purpose
+ say Y to use debugfs interface to control
+ Freqhopping.
+ Otherwise, say N
+
+config COMMON_CLK_MTK_FREQ_HOPPING_SUBSYS
+ bool
+ depends on COMMON_CLK_MTK_FREQ_HOPPING_SSPM || COMMON_CLK_MTK_FREQ_HOPPING_MCUPM
+ help
+ If FREQHOPPING HW is controlled by other processor,
+ such as SSPM, this should be set.
+
+config COMMON_CLK_MTK_FREQ_HOPPING_SSPM
+ bool "Mediatek FREQHOPPING controlled by SSPM"
+ depends on COMMON_CLK_MTK_FREQ_HOPPING && MTK_TINYSYS_SSPM_SUPPORT
+ select COMMON_CLK_MTK_FREQ_HOPPING_SUBSYS
+ help
+ If FREQHOPPING HW is controlled by SSPM,
+ say Y here.
+ Otherwise, say N.
+ Enabling this config will auto set COMMON_CLK_MTK_FREQ_HOPPING_SUBSYS
+
+config COMMON_CLK_MTK_FREQ_HOPPING_MCUPM
+ bool "Mediatek FREQHOPPING controlled by MCUPM"
+ depends on COMMON_CLK_MTK_FREQ_HOPPING && MTK_TINYSYS_MCUPM_SUPPORT
+ select COMMON_CLK_MTK_FREQ_HOPPING_SUBSYS
+ help
+ If FREQHOPPING HW is controlled by MCUPM,
+ say Y here.
+ Otherwise, say N.
+ Enabling this config will auto set COMMON_CLK_MTK_FREQ_HOPPING_SUBSYS
+
+endmenu