1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2d0f8516dSPeng Fan /* 3d0f8516dSPeng Fan * Copyright (C) 2016 Freescale Semiconductor, Inc. 4d0f8516dSPeng Fan */ 5d0f8516dSPeng Fan 6d0f8516dSPeng Fan #ifndef _ASM_ARCH_PCC_H 7d0f8516dSPeng Fan #define _ASM_ARCH_PCC_H 8d0f8516dSPeng Fan 9d0f8516dSPeng Fan #include <common.h> 10d0f8516dSPeng Fan #include <asm/arch/scg.h> 11d0f8516dSPeng Fan 12d0f8516dSPeng Fan /* PCC2 */ 13d0f8516dSPeng Fan 14d0f8516dSPeng Fan enum pcc2_entry { 15d0f8516dSPeng Fan /* On-Platform (32 entries) */ 16d0f8516dSPeng Fan RSVD0_PCC2_SLOT = 0, 17d0f8516dSPeng Fan RSVD1_PCC2_SLOT = 1, 18d0f8516dSPeng Fan CA7_GIC_PCC2_SLOT = 2, 19d0f8516dSPeng Fan RSVD3_PCC2_SLOT = 3, 20d0f8516dSPeng Fan RSVD4_PCC2_SLOT = 4, 21d0f8516dSPeng Fan RSVD5_PCC2_SLOT = 5, 22d0f8516dSPeng Fan RSVD6_PCC2_SLOT = 6, 23d0f8516dSPeng Fan RSVD7_PCC2_SLOT = 7, 24d0f8516dSPeng Fan DMA1_PCC2_SLOT = 8, 25d0f8516dSPeng Fan RSVD9_PCC2_SLOT = 9, 26d0f8516dSPeng Fan RSVD10_PCC2_SLOT = 10, 27d0f8516dSPeng Fan RSVD11_PCC2_SLOT = 11, 28d0f8516dSPeng Fan RSVD12_PCC2_SLOT = 12, 29d0f8516dSPeng Fan RSVD13_PCC2_SLOT = 13, 30d0f8516dSPeng Fan RSVD14_PCC2_SLOT = 14, 31d0f8516dSPeng Fan RGPIO1_PCC2_SLOT = 15, 32d0f8516dSPeng Fan FLEXBUS0_PCC2_SLOT = 16, 33d0f8516dSPeng Fan RSVD17_PCC2_SLOT = 17, 34d0f8516dSPeng Fan RSVD18_PCC2_SLOT = 18, 35d0f8516dSPeng Fan RSVD19_PCC2_SLOT = 19, 36d0f8516dSPeng Fan RSVD20_PCC2_SLOT = 20, 37d0f8516dSPeng Fan RSVD21_PCC2_SLOT = 21, 38d0f8516dSPeng Fan RSVD22_PCC2_SLOT = 22, 39d0f8516dSPeng Fan RSVD23_PCC2_SLOT = 23, 40d0f8516dSPeng Fan RSVD24_PCC2_SLOT = 24, 41d0f8516dSPeng Fan RSVD25_PCC2_SLOT = 25, 42d0f8516dSPeng Fan RSVD26_PCC2_SLOT = 26, 43d0f8516dSPeng Fan SEMA42_1_PCC2_SLOT = 27, 44d0f8516dSPeng Fan RSVD28_PCC2_SLOT = 28, 45d0f8516dSPeng Fan RSVD29_PCC2_SLOT = 29, 46d0f8516dSPeng Fan RSVD30_PCC2_SLOT = 30, 47d0f8516dSPeng Fan RSVD31_PCC2_SLOT = 31, 48d0f8516dSPeng Fan 49d0f8516dSPeng Fan /* Off-Platform (96 entries) */ 50d0f8516dSPeng Fan RSVD32_PCC2_SLOT = 32, 51d0f8516dSPeng Fan DMA1_CH_MUX0_PCC2_SLOT = 33, 52d0f8516dSPeng Fan MU_B_PCC2_SLOT = 34, 53d0f8516dSPeng Fan SNVS_PCC2_SLOT = 35, 54d0f8516dSPeng Fan CAAM_PCC2_SLOT = 36, 55d0f8516dSPeng Fan LPTPM4_PCC2_SLOT = 37, 56d0f8516dSPeng Fan LPTPM5_PCC2_SLOT = 38, 57d0f8516dSPeng Fan LPIT1_PCC2_SLOT = 39, 58d0f8516dSPeng Fan RSVD40_PCC2_SLOT = 40, 59d0f8516dSPeng Fan LPSPI2_PCC2_SLOT = 41, 60d0f8516dSPeng Fan LPSPI3_PCC2_SLOT = 42, 61d0f8516dSPeng Fan LPI2C4_PCC2_SLOT = 43, 62d0f8516dSPeng Fan LPI2C5_PCC2_SLOT = 44, 63d0f8516dSPeng Fan LPUART4_PCC2_SLOT = 45, 64d0f8516dSPeng Fan LPUART5_PCC2_SLOT = 46, 65d0f8516dSPeng Fan RSVD47_PCC2_SLOT = 47, 66d0f8516dSPeng Fan RSVD48_PCC2_SLOT = 48, 67d0f8516dSPeng Fan FLEXIO1_PCC2_SLOT = 49, 68d0f8516dSPeng Fan RSVD50_PCC2_SLOT = 50, 69d0f8516dSPeng Fan USBOTG0_PCC2_SLOT = 51, 70d0f8516dSPeng Fan USBOTG1_PCC2_SLOT = 52, 71d0f8516dSPeng Fan USBPHY_PCC2_SLOT = 53, 72d0f8516dSPeng Fan USB_PL301_PCC2_SLOT = 54, 73d0f8516dSPeng Fan USDHC0_PCC2_SLOT = 55, 74d0f8516dSPeng Fan USDHC1_PCC2_SLOT = 56, 75d0f8516dSPeng Fan RSVD57_PCC2_SLOT = 57, 76d0f8516dSPeng Fan TRGMUX1_PCC2_SLOT = 58, 77d0f8516dSPeng Fan RSVD59_PCC2_SLOT = 59, 78d0f8516dSPeng Fan RSVD60_PCC2_SLOT = 60, 79d0f8516dSPeng Fan WDG1_PCC2_SLOT = 61, 80d0f8516dSPeng Fan SCG1_PCC2_SLOT = 62, 81d0f8516dSPeng Fan PCC2_PCC2_SLOT = 63, 82d0f8516dSPeng Fan PMC1_PCC2_SLOT = 64, 83d0f8516dSPeng Fan SMC1_PCC2_SLOT = 65, 84d0f8516dSPeng Fan RCM1_PCC2_SLOT = 66, 85d0f8516dSPeng Fan WDG2_PCC2_SLOT = 67, 86d0f8516dSPeng Fan RSVD68_PCC2_SLOT = 68, 87d0f8516dSPeng Fan TEST_SPACE1_PCC2_SLOT = 69, 88d0f8516dSPeng Fan TEST_SPACE2_PCC2_SLOT = 70, 89d0f8516dSPeng Fan TEST_SPACE3_PCC2_SLOT = 71, 90d0f8516dSPeng Fan RSVD72_PCC2_SLOT = 72, 91d0f8516dSPeng Fan RSVD73_PCC2_SLOT = 73, 92d0f8516dSPeng Fan RSVD74_PCC2_SLOT = 74, 93d0f8516dSPeng Fan RSVD75_PCC2_SLOT = 75, 94d0f8516dSPeng Fan RSVD76_PCC2_SLOT = 76, 95d0f8516dSPeng Fan RSVD77_PCC2_SLOT = 77, 96d0f8516dSPeng Fan RSVD78_PCC2_SLOT = 78, 97d0f8516dSPeng Fan RSVD79_PCC2_SLOT = 79, 98d0f8516dSPeng Fan RSVD80_PCC2_SLOT = 80, 99d0f8516dSPeng Fan RSVD81_PCC2_SLOT = 81, 100d0f8516dSPeng Fan RSVD82_PCC2_SLOT = 82, 101d0f8516dSPeng Fan RSVD83_PCC2_SLOT = 83, 102d0f8516dSPeng Fan RSVD84_PCC2_SLOT = 84, 103d0f8516dSPeng Fan RSVD85_PCC2_SLOT = 85, 104d0f8516dSPeng Fan RSVD86_PCC2_SLOT = 86, 105d0f8516dSPeng Fan RSVD87_PCC2_SLOT = 87, 106d0f8516dSPeng Fan RSVD88_PCC2_SLOT = 88, 107d0f8516dSPeng Fan RSVD89_PCC2_SLOT = 89, 108d0f8516dSPeng Fan RSVD90_PCC2_SLOT = 90, 109d0f8516dSPeng Fan RSVD91_PCC2_SLOT = 91, 110d0f8516dSPeng Fan RSVD92_PCC2_SLOT = 92, 111d0f8516dSPeng Fan RSVD93_PCC2_SLOT = 93, 112d0f8516dSPeng Fan RSVD94_PCC2_SLOT = 94, 113d0f8516dSPeng Fan RSVD95_PCC2_SLOT = 95, 114d0f8516dSPeng Fan RSVD96_PCC2_SLOT = 96, 115d0f8516dSPeng Fan RSVD97_PCC2_SLOT = 97, 116d0f8516dSPeng Fan RSVD98_PCC2_SLOT = 98, 117d0f8516dSPeng Fan RSVD99_PCC2_SLOT = 99, 118d0f8516dSPeng Fan RSVD100_PCC2_SLOT = 100, 119d0f8516dSPeng Fan RSVD101_PCC2_SLOT = 101, 120d0f8516dSPeng Fan RSVD102_PCC2_SLOT = 102, 121d0f8516dSPeng Fan RSVD103_PCC2_SLOT = 103, 122d0f8516dSPeng Fan RSVD104_PCC2_SLOT = 104, 123d0f8516dSPeng Fan RSVD105_PCC2_SLOT = 105, 124d0f8516dSPeng Fan RSVD106_PCC2_SLOT = 106, 125d0f8516dSPeng Fan RSVD107_PCC2_SLOT = 107, 126d0f8516dSPeng Fan RSVD108_PCC2_SLOT = 108, 127d0f8516dSPeng Fan RSVD109_PCC2_SLOT = 109, 128d0f8516dSPeng Fan RSVD110_PCC2_SLOT = 110, 129d0f8516dSPeng Fan RSVD111_PCC2_SLOT = 111, 130d0f8516dSPeng Fan RSVD112_PCC2_SLOT = 112, 131d0f8516dSPeng Fan RSVD113_PCC2_SLOT = 113, 132d0f8516dSPeng Fan RSVD114_PCC2_SLOT = 114, 133d0f8516dSPeng Fan RSVD115_PCC2_SLOT = 115, 134d0f8516dSPeng Fan RSVD116_PCC2_SLOT = 116, 135d0f8516dSPeng Fan RSVD117_PCC2_SLOT = 117, 136d0f8516dSPeng Fan RSVD118_PCC2_SLOT = 118, 137d0f8516dSPeng Fan RSVD119_PCC2_SLOT = 119, 138d0f8516dSPeng Fan RSVD120_PCC2_SLOT = 120, 139d0f8516dSPeng Fan RSVD121_PCC2_SLOT = 121, 140d0f8516dSPeng Fan RSVD122_PCC2_SLOT = 122, 141d0f8516dSPeng Fan RSVD123_PCC2_SLOT = 123, 142d0f8516dSPeng Fan RSVD124_PCC2_SLOT = 124, 143d0f8516dSPeng Fan RSVD125_PCC2_SLOT = 125, 144d0f8516dSPeng Fan RSVD126_PCC2_SLOT = 126, 145d0f8516dSPeng Fan RSVD127_PCC2_SLOT = 127, 146d0f8516dSPeng Fan }; 147d0f8516dSPeng Fan 148d0f8516dSPeng Fan enum pcc3_entry { 149d0f8516dSPeng Fan /* On-Platform (32 entries) */ 150d0f8516dSPeng Fan RSVD0_PCC3_SLOT = 0, 151d0f8516dSPeng Fan RSVD1_PCC3_SLOT = 1, 152d0f8516dSPeng Fan RSVD2_PCC3_SLOT = 2, 153d0f8516dSPeng Fan RSVD3_PCC3_SLOT = 3, 154d0f8516dSPeng Fan RSVD4_PCC3_SLOT = 4, 155d0f8516dSPeng Fan RSVD5_PCC3_SLOT = 5, 156d0f8516dSPeng Fan RSVD6_PCC3_SLOT = 6, 157d0f8516dSPeng Fan RSVD7_PCC3_SLOT = 7, 158d0f8516dSPeng Fan RSVD8_PCC3_SLOT = 8, 159d0f8516dSPeng Fan RSVD9_PCC3_SLOT = 9, 160d0f8516dSPeng Fan RSVD10_PCC3_SLOT = 10, 161d0f8516dSPeng Fan RSVD11_PCC3_SLOT = 11, 162d0f8516dSPeng Fan RSVD12_PCC3_SLOT = 12, 163d0f8516dSPeng Fan RSVD13_PCC3_SLOT = 13, 164d0f8516dSPeng Fan RSVD14_PCC3_SLOT = 14, 165d0f8516dSPeng Fan RSVD15_PCC3_SLOT = 15, 166d0f8516dSPeng Fan ROMCP1_PCC3_SLOT = 16, 167d0f8516dSPeng Fan RSVD17_PCC3_SLOT = 17, 168d0f8516dSPeng Fan RSVD18_PCC3_SLOT = 18, 169d0f8516dSPeng Fan RSVD19_PCC3_SLOT = 19, 170d0f8516dSPeng Fan RSVD20_PCC3_SLOT = 20, 171d0f8516dSPeng Fan RSVD21_PCC3_SLOT = 21, 172d0f8516dSPeng Fan RSVD22_PCC3_SLOT = 22, 173d0f8516dSPeng Fan RSVD23_PCC3_SLOT = 23, 174d0f8516dSPeng Fan RSVD24_PCC3_SLOT = 24, 175d0f8516dSPeng Fan RSVD25_PCC3_SLOT = 25, 176d0f8516dSPeng Fan RSVD26_PCC3_SLOT = 26, 177d0f8516dSPeng Fan RSVD27_PCC3_SLOT = 27, 178d0f8516dSPeng Fan RSVD28_PCC3_SLOT = 28, 179d0f8516dSPeng Fan RSVD29_PCC3_SLOT = 29, 180d0f8516dSPeng Fan RSVD30_PCC3_SLOT = 30, 181d0f8516dSPeng Fan RSVD31_PCC3_SLOT = 31, 182d0f8516dSPeng Fan 183d0f8516dSPeng Fan /* Off-Platform (96 entries) */ 184d0f8516dSPeng Fan RSVD32_PCC3_SLOT = 32, 185d0f8516dSPeng Fan LPTPM6_PCC3_SLOT = 33, 186d0f8516dSPeng Fan LPTPM7_PCC3_SLOT = 34, 187d0f8516dSPeng Fan RSVD35_PCC3_SLOT = 35, 188d0f8516dSPeng Fan LPI2C6_PCC3_SLOT = 36, 189d0f8516dSPeng Fan LPI2C7_PCC3_SLOT = 37, 190d0f8516dSPeng Fan LPUART6_PCC3_SLOT = 38, 191d0f8516dSPeng Fan LPUART7_PCC3_SLOT = 39, 192d0f8516dSPeng Fan VIU0_PCC3_SLOT = 40, 193d0f8516dSPeng Fan DSI0_PCC3_SLOT = 41, 194d0f8516dSPeng Fan LCDIF0_PCC3_SLOT = 42, 195d0f8516dSPeng Fan MMDC0_PCC3_SLOT = 43, 196d0f8516dSPeng Fan IOMUXC1_PCC3_SLOT = 44, 197d0f8516dSPeng Fan IOMUXC_DDR_PCC3_SLOT = 45, 198d0f8516dSPeng Fan PORTC_PCC3_SLOT = 46, 199d0f8516dSPeng Fan PORTD_PCC3_SLOT = 47, 200d0f8516dSPeng Fan PORTE_PCC3_SLOT = 48, 201d0f8516dSPeng Fan PORTF_PCC3_SLOT = 49, 202d0f8516dSPeng Fan RSVD50_PCC3_SLOT = 50, 203d0f8516dSPeng Fan PCC3_PCC3_SLOT = 51, 204d0f8516dSPeng Fan RSVD52_PCC3_SLOT = 52, 205d0f8516dSPeng Fan WKPU_PCC3_SLOT = 53, 206d0f8516dSPeng Fan RSVD54_PCC3_SLOT = 54, 207d0f8516dSPeng Fan RSVD55_PCC3_SLOT = 55, 208d0f8516dSPeng Fan RSVD56_PCC3_SLOT = 56, 209d0f8516dSPeng Fan RSVD57_PCC3_SLOT = 57, 210d0f8516dSPeng Fan RSVD58_PCC3_SLOT = 58, 211d0f8516dSPeng Fan RSVD59_PCC3_SLOT = 59, 212d0f8516dSPeng Fan RSVD60_PCC3_SLOT = 60, 213d0f8516dSPeng Fan RSVD61_PCC3_SLOT = 61, 214d0f8516dSPeng Fan RSVD62_PCC3_SLOT = 62, 215d0f8516dSPeng Fan RSVD63_PCC3_SLOT = 63, 216d0f8516dSPeng Fan RSVD64_PCC3_SLOT = 64, 217d0f8516dSPeng Fan RSVD65_PCC3_SLOT = 65, 218d0f8516dSPeng Fan RSVD66_PCC3_SLOT = 66, 219d0f8516dSPeng Fan RSVD67_PCC3_SLOT = 67, 220d0f8516dSPeng Fan RSVD68_PCC3_SLOT = 68, 221d0f8516dSPeng Fan RSVD69_PCC3_SLOT = 69, 222d0f8516dSPeng Fan RSVD70_PCC3_SLOT = 70, 223d0f8516dSPeng Fan RSVD71_PCC3_SLOT = 71, 224d0f8516dSPeng Fan RSVD72_PCC3_SLOT = 72, 225d0f8516dSPeng Fan RSVD73_PCC3_SLOT = 73, 226d0f8516dSPeng Fan RSVD74_PCC3_SLOT = 74, 227d0f8516dSPeng Fan RSVD75_PCC3_SLOT = 75, 228d0f8516dSPeng Fan RSVD76_PCC3_SLOT = 76, 229d0f8516dSPeng Fan RSVD77_PCC3_SLOT = 77, 230d0f8516dSPeng Fan RSVD78_PCC3_SLOT = 78, 231d0f8516dSPeng Fan RSVD79_PCC3_SLOT = 79, 232d0f8516dSPeng Fan RSVD80_PCC3_SLOT = 80, 233d0f8516dSPeng Fan GPU3D_PCC3_SLOT = 81, 234d0f8516dSPeng Fan GPU2D_PCC3_SLOT = 82, 235d0f8516dSPeng Fan RSVD83_PCC3_SLOT = 83, 236d0f8516dSPeng Fan RSVD84_PCC3_SLOT = 84, 237d0f8516dSPeng Fan RSVD85_PCC3_SLOT = 85, 238d0f8516dSPeng Fan RSVD86_PCC3_SLOT = 86, 239d0f8516dSPeng Fan RSVD87_PCC3_SLOT = 87, 240d0f8516dSPeng Fan RSVD88_PCC3_SLOT = 88, 241d0f8516dSPeng Fan RSVD89_PCC3_SLOT = 89, 242d0f8516dSPeng Fan RSVD90_PCC3_SLOT = 90, 243d0f8516dSPeng Fan RSVD91_PCC3_SLOT = 91, 244d0f8516dSPeng Fan RSVD92_PCC3_SLOT = 92, 245d0f8516dSPeng Fan RSVD93_PCC3_SLOT = 93, 246d0f8516dSPeng Fan RSVD94_PCC3_SLOT = 94, 247d0f8516dSPeng Fan RSVD95_PCC3_SLOT = 95, 248d0f8516dSPeng Fan RSVD96_PCC3_SLOT = 96, 249d0f8516dSPeng Fan RSVD97_PCC3_SLOT = 97, 250d0f8516dSPeng Fan RSVD98_PCC3_SLOT = 98, 251d0f8516dSPeng Fan RSVD99_PCC3_SLOT = 99, 252d0f8516dSPeng Fan RSVD100_PCC3_SLOT = 100, 253d0f8516dSPeng Fan RSVD101_PCC3_SLOT = 101, 254d0f8516dSPeng Fan RSVD102_PCC3_SLOT = 102, 255d0f8516dSPeng Fan RSVD103_PCC3_SLOT = 103, 256d0f8516dSPeng Fan RSVD104_PCC3_SLOT = 104, 257d0f8516dSPeng Fan RSVD105_PCC3_SLOT = 105, 258d0f8516dSPeng Fan RSVD106_PCC3_SLOT = 106, 259d0f8516dSPeng Fan RSVD107_PCC3_SLOT = 107, 260d0f8516dSPeng Fan RSVD108_PCC3_SLOT = 108, 261d0f8516dSPeng Fan RSVD109_PCC3_SLOT = 109, 262d0f8516dSPeng Fan RSVD110_PCC3_SLOT = 110, 263d0f8516dSPeng Fan RSVD111_PCC3_SLOT = 111, 264d0f8516dSPeng Fan RSVD112_PCC3_SLOT = 112, 265d0f8516dSPeng Fan RSVD113_PCC3_SLOT = 113, 266d0f8516dSPeng Fan RSVD114_PCC3_SLOT = 114, 267d0f8516dSPeng Fan RSVD115_PCC3_SLOT = 115, 268d0f8516dSPeng Fan RSVD116_PCC3_SLOT = 116, 269d0f8516dSPeng Fan RSVD117_PCC3_SLOT = 117, 270d0f8516dSPeng Fan RSVD118_PCC3_SLOT = 118, 271d0f8516dSPeng Fan RSVD119_PCC3_SLOT = 119, 272d0f8516dSPeng Fan RSVD120_PCC3_SLOT = 120, 273d0f8516dSPeng Fan RSVD121_PCC3_SLOT = 121, 274d0f8516dSPeng Fan RSVD122_PCC3_SLOT = 122, 275d0f8516dSPeng Fan RSVD123_PCC3_SLOT = 123, 276d0f8516dSPeng Fan RSVD124_PCC3_SLOT = 124, 277d0f8516dSPeng Fan RSVD125_PCC3_SLOT = 125, 278d0f8516dSPeng Fan RSVD126_PCC3_SLOT = 126, 279d0f8516dSPeng Fan RSVD127_PCC3_SLOT = 127, 280d0f8516dSPeng Fan }; 281d0f8516dSPeng Fan 282d0f8516dSPeng Fan 283d0f8516dSPeng Fan /* PCC registers */ 284d0f8516dSPeng Fan #define PCC_PR_OFFSET 31 285d0f8516dSPeng Fan #define PCC_PR_MASK (0x1 << PCC_PR_OFFSET) 286d0f8516dSPeng Fan #define PCC_CGC_OFFSET 30 287d0f8516dSPeng Fan #define PCC_CGC_MASK (0x1 << PCC_CGC_OFFSET) 288d0f8516dSPeng Fan #define PCC_INUSE_OFFSET 29 289d0f8516dSPeng Fan #define PCC_INUSE_MASK (0x1 << PCC_INUSE_OFFSET) 290d0f8516dSPeng Fan #define PCC_PCS_OFFSET 24 291d0f8516dSPeng Fan #define PCC_PCS_MASK (0x7 << PCC_PCS_OFFSET) 292d0f8516dSPeng Fan #define PCC_FRAC_OFFSET 4 293d0f8516dSPeng Fan #define PCC_FRAC_MASK (0x1 << PCC_FRAC_OFFSET) 294d0f8516dSPeng Fan #define PCC_PCD_OFFSET 0 295d0f8516dSPeng Fan #define PCC_PCD_MASK (0xf << PCC_PCD_OFFSET) 296d0f8516dSPeng Fan 297d0f8516dSPeng Fan 298d0f8516dSPeng Fan enum pcc_clksrc_type { 299d0f8516dSPeng Fan CLKSRC_PER_PLAT = 0, 300d0f8516dSPeng Fan CLKSRC_PER_BUS = 1, 301d0f8516dSPeng Fan CLKSRC_NO_PCS = 2, 302d0f8516dSPeng Fan }; 303d0f8516dSPeng Fan 304d0f8516dSPeng Fan enum pcc_div_type { 305d0f8516dSPeng Fan PCC_HAS_DIV, 306d0f8516dSPeng Fan PCC_NO_DIV, 307d0f8516dSPeng Fan }; 308d0f8516dSPeng Fan 309d0f8516dSPeng Fan /* All peripheral clocks on A7 PCCs */ 310d0f8516dSPeng Fan enum pcc_clk { 311d0f8516dSPeng Fan /*PCC2 clocks*/ 312d0f8516dSPeng Fan PER_CLK_DMA1 = 0, 313d0f8516dSPeng Fan PER_CLK_RGPIO2P1, 314d0f8516dSPeng Fan PER_CLK_FLEXBUS, 315d0f8516dSPeng Fan PER_CLK_SEMA42_1, 316d0f8516dSPeng Fan PER_CLK_DMA_MUX1, 317d0f8516dSPeng Fan PER_CLK_SNVS, 318d0f8516dSPeng Fan PER_CLK_CAAM, 319d0f8516dSPeng Fan PER_CLK_LPTPM4, 320d0f8516dSPeng Fan PER_CLK_LPTPM5, 321d0f8516dSPeng Fan PER_CLK_LPIT1, 322d0f8516dSPeng Fan PER_CLK_LPSPI2, 323d0f8516dSPeng Fan PER_CLK_LPSPI3, 324d0f8516dSPeng Fan PER_CLK_LPI2C4, 325d0f8516dSPeng Fan PER_CLK_LPI2C5, 326d0f8516dSPeng Fan PER_CLK_LPUART4, 327d0f8516dSPeng Fan PER_CLK_LPUART5, 328d0f8516dSPeng Fan PER_CLK_FLEXIO1, 329d0f8516dSPeng Fan PER_CLK_USB0, 330d0f8516dSPeng Fan PER_CLK_USB1, 331d0f8516dSPeng Fan PER_CLK_USB_PHY, 332d0f8516dSPeng Fan PER_CLK_USB_PL301, 333d0f8516dSPeng Fan PER_CLK_USDHC0, 334d0f8516dSPeng Fan PER_CLK_USDHC1, 335d0f8516dSPeng Fan PER_CLK_WDG1, 336d0f8516dSPeng Fan PER_CLK_WDG2, 337d0f8516dSPeng Fan 338d0f8516dSPeng Fan /*PCC3 clocks*/ 339d0f8516dSPeng Fan PER_CLK_LPTPM6, 340d0f8516dSPeng Fan PER_CLK_LPTPM7, 341d0f8516dSPeng Fan PER_CLK_LPI2C6, 342d0f8516dSPeng Fan PER_CLK_LPI2C7, 343d0f8516dSPeng Fan PER_CLK_LPUART6, 344d0f8516dSPeng Fan PER_CLK_LPUART7, 345d0f8516dSPeng Fan PER_CLK_VIU, 346d0f8516dSPeng Fan PER_CLK_DSI, 347d0f8516dSPeng Fan PER_CLK_LCDIF, 348d0f8516dSPeng Fan PER_CLK_MMDC, 349d0f8516dSPeng Fan PER_CLK_PCTLC, 350d0f8516dSPeng Fan PER_CLK_PCTLD, 351d0f8516dSPeng Fan PER_CLK_PCTLE, 352d0f8516dSPeng Fan PER_CLK_PCTLF, 353d0f8516dSPeng Fan PER_CLK_GPU3D, 354d0f8516dSPeng Fan PER_CLK_GPU2D, 355d0f8516dSPeng Fan }; 356d0f8516dSPeng Fan 357d0f8516dSPeng Fan 358d0f8516dSPeng Fan /* This structure keeps info for each pcc slot */ 359d0f8516dSPeng Fan struct pcc_entry { 360d0f8516dSPeng Fan u32 pcc_base; 361d0f8516dSPeng Fan u32 pcc_slot; 362d0f8516dSPeng Fan enum pcc_clksrc_type clksrc; 363d0f8516dSPeng Fan enum pcc_div_type div; 364d0f8516dSPeng Fan }; 365d0f8516dSPeng Fan 366d0f8516dSPeng Fan int pcc_clock_enable(enum pcc_clk clk, bool enable); 367d0f8516dSPeng Fan int pcc_clock_sel(enum pcc_clk clk, enum scg_clk src); 368d0f8516dSPeng Fan int pcc_clock_div_config(enum pcc_clk clk, bool frac, u8 div); 369d0f8516dSPeng Fan bool pcc_clock_is_enable(enum pcc_clk clk); 370d0f8516dSPeng Fan int pcc_clock_get_clksrc(enum pcc_clk clk, enum scg_clk *src); 371d0f8516dSPeng Fan u32 pcc_clock_get_rate(enum pcc_clk clk); 372d0f8516dSPeng Fan #endif 373