1*83d290c5STom Rini /* SPDX-License-Identifier: BSD-3-Clause */
2f0892401SMarek Vasut /*
3f6badb0dSMarek Vasut  * Altera SoCFPGA Clock and PLL configuration
4f0892401SMarek Vasut  */
5f0892401SMarek Vasut 
6f6badb0dSMarek Vasut #ifndef __SOCFPGA_PLL_CONFIG_H__
7f6badb0dSMarek Vasut #define __SOCFPGA_PLL_CONFIG_H__
8f0892401SMarek Vasut 
9f6badb0dSMarek Vasut #define CONFIG_HPS_DBCTRL_STAYOSC1 1
10f0892401SMarek Vasut 
11f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_VCO_DENOM 0
124baca920SDinh Nguyen #define CONFIG_HPS_MAINPLLGRP_VCO_NUMER 73
13f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_MPUCLK_CNT 0
14f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_MAINCLK_CNT 0
15f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_DBGATCLK_CNT 0
164baca920SDinh Nguyen #define CONFIG_HPS_MAINPLLGRP_MAINQSPICLK_CNT 4
17f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_MAINNANDSDMMCCLK_CNT 511
184baca920SDinh Nguyen #define CONFIG_HPS_MAINPLLGRP_CFGS2FUSER0CLK_CNT 14
19f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3MPCLK 1
20f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3SPCLK 1
21f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4MPCLK 1
22f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4SPCLK 1
23f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_DBGDIV_DBGATCLK 0
24f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_DBGDIV_DBGCLK 1
25f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_TRACEDIV_TRACECLK 0
26f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_L4SRC_L4MP 1
27f6badb0dSMarek Vasut #define CONFIG_HPS_MAINPLLGRP_L4SRC_L4SP 1
28f0892401SMarek Vasut 
294baca920SDinh Nguyen #define CONFIG_HPS_PERPLLGRP_VCO_DENOM 0
304baca920SDinh Nguyen #define CONFIG_HPS_PERPLLGRP_VCO_NUMER 39
31f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_VCO_PSRC 0
324baca920SDinh Nguyen #define CONFIG_HPS_PERPLLGRP_EMAC0CLK_CNT 511
33b0808b91Sshengjiangwu #define CONFIG_HPS_PERPLLGRP_EMAC1CLK_CNT 3
34f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_PERQSPICLK_CNT 511
35f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_PERNANDSDMMCCLK_CNT 4
36f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_PERBASECLK_CNT 4
37f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_S2FUSER1CLK_CNT 511
38f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_DIV_USBCLK 0
394baca920SDinh Nguyen #define CONFIG_HPS_PERPLLGRP_DIV_SPIMCLK 0
40f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_DIV_CAN0CLK 1
414baca920SDinh Nguyen #define CONFIG_HPS_PERPLLGRP_DIV_CAN1CLK 4
42f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_GPIODIV_GPIODBCLK 6249
43f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_SRC_SDMMC 2
44f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_SRC_NAND 2
45f6badb0dSMarek Vasut #define CONFIG_HPS_PERPLLGRP_SRC_QSPI 1
46f0892401SMarek Vasut 
474baca920SDinh Nguyen #define CONFIG_HPS_SDRPLLGRP_VCO_DENOM 0
484baca920SDinh Nguyen #define CONFIG_HPS_SDRPLLGRP_VCO_NUMER 31
49f6badb0dSMarek Vasut #define CONFIG_HPS_SDRPLLGRP_VCO_SSRC 0
50f6badb0dSMarek Vasut #define CONFIG_HPS_SDRPLLGRP_DDRDQSCLK_CNT 1
51f6badb0dSMarek Vasut #define CONFIG_HPS_SDRPLLGRP_DDRDQSCLK_PHASE 0
52f6badb0dSMarek Vasut #define CONFIG_HPS_SDRPLLGRP_DDR2XDQSCLK_CNT 0
53f6badb0dSMarek Vasut #define CONFIG_HPS_SDRPLLGRP_DDR2XDQSCLK_PHASE 0
54f6badb0dSMarek Vasut #define CONFIG_HPS_SDRPLLGRP_DDRDQCLK_CNT 1
55f6badb0dSMarek Vasut #define CONFIG_HPS_SDRPLLGRP_DDRDQCLK_PHASE 4
56f6badb0dSMarek Vasut #define CONFIG_HPS_SDRPLLGRP_S2FUSER2CLK_CNT 5
57f6badb0dSMarek Vasut #define CONFIG_HPS_SDRPLLGRP_S2FUSER2CLK_PHASE 0
58f0892401SMarek Vasut 
59f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_OSC1_HZ 25000000
60f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_OSC2_HZ 25000000
61f0892401SMarek Vasut #define CONFIG_HPS_CLK_F2S_SDR_REF_HZ 0
62f0892401SMarek Vasut #define CONFIG_HPS_CLK_F2S_PER_REF_HZ 0
634baca920SDinh Nguyen #define CONFIG_HPS_CLK_MAINVCO_HZ 1850000000
64f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_PERVCO_HZ 1000000000
654baca920SDinh Nguyen #define CONFIG_HPS_CLK_SDRVCO_HZ 800000000
664baca920SDinh Nguyen #define CONFIG_HPS_CLK_EMAC0_HZ 1953125
67f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_EMAC1_HZ 250000000
68f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_USBCLK_HZ 200000000
69f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_NAND_HZ 50000000
70f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_SDMMC_HZ 200000000
714baca920SDinh Nguyen #define CONFIG_HPS_CLK_QSPI_HZ 370000000
72f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_SPIM_HZ 200000000
73f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_CAN0_HZ 100000000
744baca920SDinh Nguyen #define CONFIG_HPS_CLK_CAN1_HZ 12500000
75f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_GPIODB_HZ 32000
76f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_L4_MP_HZ 100000000
77f6badb0dSMarek Vasut #define CONFIG_HPS_CLK_L4_SP_HZ 100000000
78f0892401SMarek Vasut 
79f6badb0dSMarek Vasut #define CONFIG_HPS_ALTERAGRP_MPUCLK 1
804baca920SDinh Nguyen #define CONFIG_HPS_ALTERAGRP_MAINCLK 4
814baca920SDinh Nguyen #define CONFIG_HPS_ALTERAGRP_DBGATCLK 4
82f6badb0dSMarek Vasut 
83f6badb0dSMarek Vasut 
84f6badb0dSMarek Vasut #endif /* __SOCFPGA_PLL_CONFIG_H__ */
85