Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: BSD-3-Clause */ |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 2 | /* |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 3 | * Altera SoCFPGA Clock and PLL configuration |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 4 | */ |
| 5 | |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 6 | #ifndef __SOCFPGA_PLL_CONFIG_H__ |
| 7 | #define __SOCFPGA_PLL_CONFIG_H__ |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 8 | |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 9 | #define CONFIG_HPS_DBCTRL_STAYOSC1 1 |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 10 | |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 11 | #define CONFIG_HPS_MAINPLLGRP_VCO_DENOM 0 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 12 | #define CONFIG_HPS_MAINPLLGRP_VCO_NUMER 73 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 13 | #define CONFIG_HPS_MAINPLLGRP_MPUCLK_CNT 0 |
| 14 | #define CONFIG_HPS_MAINPLLGRP_MAINCLK_CNT 0 |
| 15 | #define CONFIG_HPS_MAINPLLGRP_DBGATCLK_CNT 0 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 16 | #define CONFIG_HPS_MAINPLLGRP_MAINQSPICLK_CNT 4 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 17 | #define CONFIG_HPS_MAINPLLGRP_MAINNANDSDMMCCLK_CNT 511 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 18 | #define CONFIG_HPS_MAINPLLGRP_CFGS2FUSER0CLK_CNT 14 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 19 | #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3MPCLK 1 |
| 20 | #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3SPCLK 1 |
| 21 | #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4MPCLK 1 |
| 22 | #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4SPCLK 1 |
| 23 | #define CONFIG_HPS_MAINPLLGRP_DBGDIV_DBGATCLK 0 |
| 24 | #define CONFIG_HPS_MAINPLLGRP_DBGDIV_DBGCLK 1 |
| 25 | #define CONFIG_HPS_MAINPLLGRP_TRACEDIV_TRACECLK 0 |
| 26 | #define CONFIG_HPS_MAINPLLGRP_L4SRC_L4MP 1 |
| 27 | #define CONFIG_HPS_MAINPLLGRP_L4SRC_L4SP 1 |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 28 | |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 29 | #define CONFIG_HPS_PERPLLGRP_VCO_DENOM 0 |
| 30 | #define CONFIG_HPS_PERPLLGRP_VCO_NUMER 39 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 31 | #define CONFIG_HPS_PERPLLGRP_VCO_PSRC 0 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 32 | #define CONFIG_HPS_PERPLLGRP_EMAC0CLK_CNT 511 |
shengjiangwu | c213f63 | 2015-12-22 15:22:02 +0800 | [diff] [blame] | 33 | #define CONFIG_HPS_PERPLLGRP_EMAC1CLK_CNT 3 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 34 | #define CONFIG_HPS_PERPLLGRP_PERQSPICLK_CNT 511 |
| 35 | #define CONFIG_HPS_PERPLLGRP_PERNANDSDMMCCLK_CNT 4 |
| 36 | #define CONFIG_HPS_PERPLLGRP_PERBASECLK_CNT 4 |
| 37 | #define CONFIG_HPS_PERPLLGRP_S2FUSER1CLK_CNT 511 |
| 38 | #define CONFIG_HPS_PERPLLGRP_DIV_USBCLK 0 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 39 | #define CONFIG_HPS_PERPLLGRP_DIV_SPIMCLK 0 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 40 | #define CONFIG_HPS_PERPLLGRP_DIV_CAN0CLK 1 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 41 | #define CONFIG_HPS_PERPLLGRP_DIV_CAN1CLK 4 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 42 | #define CONFIG_HPS_PERPLLGRP_GPIODIV_GPIODBCLK 6249 |
| 43 | #define CONFIG_HPS_PERPLLGRP_SRC_SDMMC 2 |
| 44 | #define CONFIG_HPS_PERPLLGRP_SRC_NAND 2 |
| 45 | #define CONFIG_HPS_PERPLLGRP_SRC_QSPI 1 |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 46 | |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 47 | #define CONFIG_HPS_SDRPLLGRP_VCO_DENOM 0 |
| 48 | #define CONFIG_HPS_SDRPLLGRP_VCO_NUMER 31 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 49 | #define CONFIG_HPS_SDRPLLGRP_VCO_SSRC 0 |
| 50 | #define CONFIG_HPS_SDRPLLGRP_DDRDQSCLK_CNT 1 |
| 51 | #define CONFIG_HPS_SDRPLLGRP_DDRDQSCLK_PHASE 0 |
| 52 | #define CONFIG_HPS_SDRPLLGRP_DDR2XDQSCLK_CNT 0 |
| 53 | #define CONFIG_HPS_SDRPLLGRP_DDR2XDQSCLK_PHASE 0 |
| 54 | #define CONFIG_HPS_SDRPLLGRP_DDRDQCLK_CNT 1 |
| 55 | #define CONFIG_HPS_SDRPLLGRP_DDRDQCLK_PHASE 4 |
| 56 | #define CONFIG_HPS_SDRPLLGRP_S2FUSER2CLK_CNT 5 |
| 57 | #define CONFIG_HPS_SDRPLLGRP_S2FUSER2CLK_PHASE 0 |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 58 | |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 59 | #define CONFIG_HPS_CLK_OSC1_HZ 25000000 |
| 60 | #define CONFIG_HPS_CLK_OSC2_HZ 25000000 |
| 61 | #define CONFIG_HPS_CLK_F2S_SDR_REF_HZ 0 |
| 62 | #define CONFIG_HPS_CLK_F2S_PER_REF_HZ 0 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 63 | #define CONFIG_HPS_CLK_MAINVCO_HZ 1850000000 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 64 | #define CONFIG_HPS_CLK_PERVCO_HZ 1000000000 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 65 | #define CONFIG_HPS_CLK_SDRVCO_HZ 800000000 |
| 66 | #define CONFIG_HPS_CLK_EMAC0_HZ 1953125 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 67 | #define CONFIG_HPS_CLK_EMAC1_HZ 250000000 |
| 68 | #define CONFIG_HPS_CLK_USBCLK_HZ 200000000 |
| 69 | #define CONFIG_HPS_CLK_NAND_HZ 50000000 |
| 70 | #define CONFIG_HPS_CLK_SDMMC_HZ 200000000 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 71 | #define CONFIG_HPS_CLK_QSPI_HZ 370000000 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 72 | #define CONFIG_HPS_CLK_SPIM_HZ 200000000 |
| 73 | #define CONFIG_HPS_CLK_CAN0_HZ 100000000 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 74 | #define CONFIG_HPS_CLK_CAN1_HZ 12500000 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 75 | #define CONFIG_HPS_CLK_GPIODB_HZ 32000 |
| 76 | #define CONFIG_HPS_CLK_L4_MP_HZ 100000000 |
| 77 | #define CONFIG_HPS_CLK_L4_SP_HZ 100000000 |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 78 | |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 79 | #define CONFIG_HPS_ALTERAGRP_MPUCLK 1 |
Dinh Nguyen | d28f4a7 | 2016-05-10 15:13:59 -0500 | [diff] [blame] | 80 | #define CONFIG_HPS_ALTERAGRP_MAINCLK 4 |
| 81 | #define CONFIG_HPS_ALTERAGRP_DBGATCLK 4 |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 82 | |
Chin Liang See | cb35060 | 2014-03-04 22:13:53 -0600 | [diff] [blame] | 83 | |
Marek Vasut | 372f70d | 2015-08-10 21:21:07 +0200 | [diff] [blame] | 84 | #endif /* __SOCFPGA_PLL_CONFIG_H__ */ |