developer | 15adbbf | 2021-05-24 22:20:07 +0800 | [diff] [blame] | 1 | /*
|
| 2 | * Copyright (c) 2017 MediaTek Inc.
|
| 3 | * Author: Chen Zhong <chen.zhong@mediatek.com>
|
| 4 | *
|
| 5 | * This program is free software; you can redistribute it and/or modify
|
| 6 | * it under the terms of the GNU General Public License version 2 as
|
| 7 | * published by the Free Software Foundation.
|
| 8 | *
|
| 9 | * This program is distributed in the hope that it will be useful,
|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 12 | * GNU General Public License for more details.
|
| 13 | */
|
| 14 |
|
| 15 | #ifndef _DT_BINDINGS_CLK_MT7986_H
|
| 16 | #define _DT_BINDINGS_CLK_MT7986_H
|
| 17 |
|
| 18 | /* INFRACFG */
|
| 19 |
|
| 20 | #define CK_INFRA_CK_F26M 0
|
| 21 | #define CK_INFRA_UART 1
|
| 22 | #define CK_INFRA_ISPI0 2
|
| 23 | #define CK_INFRA_I2C 3
|
| 24 | #define CK_INFRA_ISPI1 4
|
| 25 | #define CK_INFRA_PWM 5
|
| 26 | #define CK_INFRA_66M_MCK 6
|
| 27 | #define CK_INFRA_CK_F32K 7
|
| 28 | #define CK_INFRA_PCIE_CK 8
|
| 29 | #define CK_INFRA_PWM_BCK 9
|
| 30 | #define CK_INFRA_PWM_CK1 10
|
| 31 | #define CK_INFRA_PWM_CK2 11
|
| 32 | #define CK_INFRA_133M_HCK 12
|
| 33 | #define CK_INFRA_EIP_CK 13
|
| 34 | #define CK_INFRA_66M_PHCK 14
|
| 35 | #define CK_INFRA_FAUD_L_CK 15
|
| 36 | #define CK_INFRA_FAUD_AUD_CK 16
|
| 37 | #define CK_INFRA_FAUD_EG2_CK 17
|
| 38 | #define CK_INFRA_I2CS_CK 18
|
| 39 | #define CK_INFRA_MUX_UART0 19
|
| 40 | #define CK_INFRA_MUX_UART1 20
|
| 41 | #define CK_INFRA_MUX_UART2 21
|
| 42 | #define CK_INFRA_NFI_CK 22
|
| 43 | #define CK_INFRA_SPINFI_CK 23
|
| 44 | #define CK_INFRA_MUX_SPI0 24
|
| 45 | #define CK_INFRA_MUX_SPI1 25
|
| 46 | #define CK_INFRA_RTC_32K 26
|
| 47 | #define CK_INFRA_FMSDC_CK 27
|
| 48 | #define CK_INFRA_FMSDC_HCK_CK 28
|
| 49 | #define CK_INFRA_PERI_133M 29
|
| 50 | #define CK_INFRA_133M_PHCK 30
|
| 51 | #define CK_INFRA_USB_SYS_CK 31
|
| 52 | #define CK_INFRA_USB_CK 32
|
| 53 | #define CK_INFRA_USB_XHCI_CK 33
|
| 54 | #define CK_INFRA_PCIE_GFMUX_TL_O_PRE 34
|
| 55 | #define CK_INFRA_F26M_CK0 35
|
developer | 9d4b4eb | 2021-06-17 10:04:26 +0800 | [diff] [blame] | 56 | #define CK_INFRA_HD_133M 36
|
| 57 | #define CLK_INFRA_NR_CLK 37
|
developer | 15adbbf | 2021-05-24 22:20:07 +0800 | [diff] [blame] | 58 |
|
| 59 | /* TOPCKGEN */
|
| 60 |
|
| 61 | #define CK_TOP_CB_CKSQ_40M 0
|
| 62 | #define CK_TOP_CB_M_416M 1
|
| 63 | #define CK_TOP_CB_M_D2 2
|
| 64 | #define CK_TOP_CB_M_D4 3
|
| 65 | #define CK_TOP_CB_M_D8 4
|
| 66 | #define CK_TOP_M_D8_D2 5
|
| 67 | #define CK_TOP_M_D3_D2 6
|
| 68 | #define CK_TOP_CB_MM_D2 7
|
| 69 | #define CK_TOP_CB_MM_D4 8
|
| 70 | #define CK_TOP_CB_MM_D8 9
|
| 71 | #define CK_TOP_MM_D8_D2 10
|
| 72 | #define CK_TOP_MM_D3_D8 11
|
| 73 | #define CK_TOP_CB_U2_PHYD_CK 12
|
| 74 | #define CK_TOP_CB_APLL2_196M 13
|
| 75 | #define CK_TOP_APLL2_D4 14
|
| 76 | #define CK_TOP_CB_NET1_D4 15
|
| 77 | #define CK_TOP_CB_NET1_D5 16
|
| 78 | #define CK_TOP_NET1_D5_D2 17
|
| 79 | #define CK_TOP_NET1_D5_D4 18
|
| 80 | #define CK_TOP_NET1_D8_D2 19
|
| 81 | #define CK_TOP_NET1_D8_D4 20
|
| 82 | #define CK_TOP_CB_NET2_800M 21
|
| 83 | #define CK_TOP_CB_NET2_D4 22
|
| 84 | #define CK_TOP_NET2_D4_D2 23
|
| 85 | #define CK_TOP_NET2_D3_D2 24
|
| 86 | #define CK_TOP_CB_WEDMCU_760M 25
|
| 87 | #define CK_TOP_WEDMCU_D5_D2 26
|
| 88 | #define CK_TOP_CB_SGM_325M 27
|
| 89 | #define CK_TOP_CB_CKSQ_40M_D2 28
|
| 90 | #define CK_TOP_CB_RTC_32K 29
|
| 91 | #define CK_TOP_CB_RTC_32P7K 30
|
| 92 | #define CK_TOP_NFI1X 31
|
| 93 | #define CK_TOP_USB_EQ_RX250M 32
|
| 94 | #define CK_TOP_USB_TX250M 33
|
| 95 | #define CK_TOP_USB_LN0_CK 34
|
| 96 | #define CK_TOP_USB_CDR_CK 35
|
| 97 | #define CK_TOP_SPINFI_BCK 36
|
| 98 | #define CK_TOP_I2C_BCK 37
|
| 99 | #define CK_TOP_PEXTP_TL 38
|
| 100 | #define CK_TOP_EMMC_250M 39
|
| 101 | #define CK_TOP_EMMC_416M 40
|
| 102 | #define CK_TOP_F_26M_ADC_CK 41
|
| 103 | #define CK_TOP_SYSAXI 42
|
| 104 | #define CK_TOP_NETSYS_WED_MCU 43
|
| 105 | #define CK_TOP_NETSYS_2X 44
|
| 106 | #define CK_TOP_SGM_325M 45
|
| 107 | #define CK_TOP_A1SYS 46
|
| 108 | #define CK_TOP_EIP_B 47
|
| 109 | #define CK_TOP_F26M 48
|
| 110 | #define CK_TOP_AUD_L 49
|
| 111 | #define CK_TOP_A_TUNER 50
|
| 112 | #define CK_TOP_U2U3_REF 51
|
| 113 | #define CK_TOP_U2U3_SYS 52
|
| 114 | #define CK_TOP_U2U3_XHCI 53
|
| 115 | #define CK_TOP_AP2CNN_HOST 54
|
| 116 | #define CK_TOP_NFI1X_SEL 55
|
| 117 | #define CK_TOP_SPINFI_SEL 56
|
| 118 | #define CK_TOP_SPI_SEL 57
|
| 119 | #define CK_TOP_SPIM_MST_SEL 58
|
| 120 | #define CK_TOP_UART_SEL 59
|
| 121 | #define CK_TOP_PWM_SEL 60
|
| 122 | #define CK_TOP_I2C_SEL 61
|
| 123 | #define CK_TOP_PEXTP_TL_SEL 62
|
| 124 | #define CK_TOP_EMMC_250M_SEL 63
|
| 125 | #define CK_TOP_EMMC_416M_SEL 64
|
| 126 | #define CK_TOP_F_26M_ADC_SEL 65
|
| 127 | #define CK_TOP_DRAMC_SEL 66
|
| 128 | #define CK_TOP_DRAMC_MD32_SEL 67
|
| 129 | #define CK_TOP_SYSAXI_SEL 68
|
| 130 | #define CK_TOP_SYSAPB_SEL 69
|
| 131 | #define CK_TOP_ARM_DB_MAIN_SEL 70
|
| 132 | #define CK_TOP_ARM_DB_JTSEL 71
|
| 133 | #define CK_TOP_NETSYS_SEL 72
|
| 134 | #define CK_TOP_NETSYS_500M_SEL 73
|
| 135 | #define CK_TOP_NETSYS_MCU_SEL 74
|
| 136 | #define CK_TOP_NETSYS_2X_SEL 75
|
| 137 | #define CK_TOP_SGM_325M_SEL 76
|
| 138 | #define CK_TOP_SGM_REG_SEL 77
|
| 139 | #define CK_TOP_A1SYS_SEL 78
|
| 140 | #define CK_TOP_CONN_MCUSYS_SEL 79
|
| 141 | #define CK_TOP_EIP_B_SEL 80
|
| 142 | #define CK_TOP_PCIE_PHY_SEL 81
|
| 143 | #define CK_TOP_USB3_PHY_SEL 82
|
| 144 | #define CK_TOP_F26M_SEL 83
|
| 145 | #define CK_TOP_AUD_L_SEL 84
|
| 146 | #define CK_TOP_A_TUNER_SEL 85
|
| 147 | #define CK_TOP_U2U3_SEL 86
|
| 148 | #define CK_TOP_U2U3_SYS_SEL 87
|
| 149 | #define CK_TOP_U2U3_XHCI_SEL 88
|
| 150 | #define CK_TOP_DA_U2_REFSEL 89
|
| 151 | #define CK_TOP_DA_U2_CK_1P_SEL 90
|
| 152 | #define CK_TOP_AP2CNN_HOST_SEL 91
|
| 153 | #define CLK_TOP_NR_CLK 92
|
| 154 |
|
| 155 | /* INFRACFG_AO */
|
| 156 |
|
| 157 | #define CK_INFRA_UART0_SEL 0
|
| 158 | #define CK_INFRA_UART1_SEL 1
|
| 159 | #define CK_INFRA_UART2_SEL 2
|
| 160 | #define CK_INFRA_SPI0_SEL 3
|
| 161 | #define CK_INFRA_SPI1_SEL 4
|
| 162 | #define CK_INFRA_PWM1_SEL 5
|
| 163 | #define CK_INFRA_PWM2_SEL 6
|
| 164 | #define CK_INFRA_PWM_BSEL 7
|
| 165 | #define CK_INFRA_PCIE_SEL 8
|
| 166 | #define CK_INFRA_GPT_STA 9
|
| 167 | #define CK_INFRA_PWM_HCK 10
|
| 168 | #define CK_INFRA_PWM_STA 11
|
| 169 | #define CK_INFRA_PWM1_CK 12
|
| 170 | #define CK_INFRA_PWM2_CK 13
|
| 171 | #define CK_INFRA_CQ_DMA_CK 14
|
| 172 | #define CK_INFRA_EIP97_CK 15
|
| 173 | #define CK_INFRA_AUD_BUS_CK 16
|
| 174 | #define CK_INFRA_AUD_26M_CK 17
|
| 175 | #define CK_INFRA_AUD_L_CK 18
|
| 176 | #define CK_INFRA_AUD_AUD_CK 19
|
| 177 | #define CK_INFRA_AUD_EG2_CK 20
|
| 178 | #define CK_INFRA_DRAMC_26M_CK 21
|
| 179 | #define CK_INFRA_DBG_CK 22
|
| 180 | #define CK_INFRA_AP_DMA_CK 23
|
| 181 | #define CK_INFRA_SEJ_CK 24
|
| 182 | #define CK_INFRA_SEJ_13M_CK 25
|
| 183 | #define CK_INFRA_THERM_CK 26
|
| 184 | #define CK_INFRA_I2CO_CK 27
|
| 185 | #define CK_INFRA_UART0_CK 28
|
| 186 | #define CK_INFRA_UART1_CK 29
|
| 187 | #define CK_INFRA_UART2_CK 30
|
| 188 | #define CK_INFRA_NFI1_CK 31
|
| 189 | #define CK_INFRA_SPINFI1_CK 32
|
| 190 | #define CK_INFRA_NFI_HCK_CK 33
|
| 191 | #define CK_INFRA_SPI0_CK 34
|
| 192 | #define CK_INFRA_SPI1_CK 35
|
| 193 | #define CK_INFRA_SPI0_HCK_CK 36
|
| 194 | #define CK_INFRA_SPI1_HCK_CK 37
|
| 195 | #define CK_INFRA_FRTC_CK 38
|
| 196 | #define CK_INFRA_MSDC_CK 39
|
| 197 | #define CK_INFRA_MSDC_HCK_CK 40
|
| 198 | #define CK_INFRA_MSDC_133M_CK 41
|
| 199 | #define CK_INFRA_MSDC_66M_CK 42
|
| 200 | #define CK_INFRA_ADC_26M_CK 43
|
| 201 | #define CK_INFRA_ADC_FRC_CK 44
|
| 202 | #define CK_INFRA_FBIST2FPC_CK 45
|
| 203 | #define CK_INFRA_IUSB_133_CK 46
|
| 204 | #define CK_INFRA_IUSB_66M_CK 47
|
| 205 | #define CK_INFRA_IUSB_SYS_CK 48
|
| 206 | #define CK_INFRA_IUSB_CK 49
|
| 207 | #define CK_INFRA_IPCIE_CK 50
|
| 208 | #define CK_INFRA_IPCIER_CK 51
|
| 209 | #define CK_INFRA_IPCIEB_CK 52
|
developer | 9d4b4eb | 2021-06-17 10:04:26 +0800 | [diff] [blame] | 210 | #define CK_INFRA_TRNG_CK 53
|
| 211 | #define CLK_INFRA_AO_NR_CLK 54
|
developer | 15adbbf | 2021-05-24 22:20:07 +0800 | [diff] [blame] | 212 |
|
| 213 | /* APMIXEDSYS */
|
| 214 |
|
| 215 | #define CK_APMIXED_ARMPLL 0
|
| 216 | #define CK_APMIXED_NET2PLL 1
|
| 217 | #define CK_APMIXED_MMPLL 2
|
| 218 | #define CK_APMIXED_SGMPLL 3
|
| 219 | #define CK_APMIXED_WEDMCUPLL 4
|
| 220 | #define CK_APMIXED_NET1PLL 5
|
| 221 | #define CK_APMIXED_MPLL 6
|
| 222 | #define CK_APMIXED_APLL2 7
|
| 223 | #define CLK_APMIXED_NR_CLK 8
|
| 224 |
|
| 225 | /* SGMIISYS_0 */
|
| 226 |
|
| 227 | #define CK_SGM0_TX_EN 0
|
| 228 | #define CK_SGM0_RX_EN 1
|
| 229 | #define CK_SGM0_CK0_EN 2
|
| 230 | #define CK_SGM0_CDR_CK0_EN 3
|
| 231 | #define CLK_SGMII0_NR_CLK 4
|
| 232 |
|
| 233 | /* SGMIISYS_1 */
|
| 234 |
|
| 235 | #define CK_SGM1_TX_EN 0
|
| 236 | #define CK_SGM1_RX_EN 1
|
| 237 | #define CK_SGM1_CK1_EN 2
|
| 238 | #define CK_SGM1_CDR_CK1_EN 3
|
| 239 | #define CLK_SGMII1_NR_CLK 4
|
| 240 |
|
| 241 | /* ETHSYS */
|
| 242 |
|
| 243 | #define CK_ETH_FE_EN 0
|
| 244 | #define CK_ETH_GP2_EN 1
|
| 245 | #define CK_ETH_GP1_EN 2
|
| 246 | #define CK_ETH_WOCPU1_EN 3
|
| 247 | #define CK_ETH_WOCPU0_EN 4
|
| 248 | #define CLK_ETH_NR_CLK 5
|
| 249 |
|
| 250 | #endif /* _DT_BINDINGS_CLK_MT7986_H */
|
| 251 |
|