1c66ec88fSEmmanuel Vadot /* SPDX-License-Identifier: GPL-2.0-only */ 2c66ec88fSEmmanuel Vadot /* 3c66ec88fSEmmanuel Vadot * Copyright 2017 Texas Instruments, Inc. 4c66ec88fSEmmanuel Vadot */ 5c66ec88fSEmmanuel Vadot #ifndef __DT_BINDINGS_CLK_AM4_H 6c66ec88fSEmmanuel Vadot #define __DT_BINDINGS_CLK_AM4_H 7c66ec88fSEmmanuel Vadot 8c66ec88fSEmmanuel Vadot #define AM4_CLKCTRL_OFFSET 0x20 9c66ec88fSEmmanuel Vadot #define AM4_CLKCTRL_INDEX(offset) ((offset) - AM4_CLKCTRL_OFFSET) 10c66ec88fSEmmanuel Vadot 11c66ec88fSEmmanuel Vadot /* l3s_tsc clocks */ 12c66ec88fSEmmanuel Vadot #define AM4_L3S_TSC_CLKCTRL_OFFSET 0x120 13c66ec88fSEmmanuel Vadot #define AM4_L3S_TSC_CLKCTRL_INDEX(offset) ((offset) - AM4_L3S_TSC_CLKCTRL_OFFSET) 14c66ec88fSEmmanuel Vadot #define AM4_L3S_TSC_ADC_TSC_CLKCTRL AM4_L3S_TSC_CLKCTRL_INDEX(0x120) 15c66ec88fSEmmanuel Vadot 16c66ec88fSEmmanuel Vadot /* l4_wkup_aon clocks */ 17c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_AON_CLKCTRL_OFFSET 0x228 18c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_AON_CLKCTRL_INDEX(offset) ((offset) - AM4_L4_WKUP_AON_CLKCTRL_OFFSET) 19c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_AON_WKUP_M3_CLKCTRL AM4_L4_WKUP_AON_CLKCTRL_INDEX(0x228) 20c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_AON_COUNTER_32K_CLKCTRL AM4_L4_WKUP_AON_CLKCTRL_INDEX(0x230) 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel Vadot /* l4_wkup clocks */ 23c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_CLKCTRL_OFFSET 0x220 24c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_CLKCTRL_INDEX(offset) ((offset) - AM4_L4_WKUP_CLKCTRL_OFFSET) 25c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_L4_WKUP_CLKCTRL AM4_L4_WKUP_CLKCTRL_INDEX(0x220) 26c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_TIMER1_CLKCTRL AM4_L4_WKUP_CLKCTRL_INDEX(0x328) 27c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_WD_TIMER2_CLKCTRL AM4_L4_WKUP_CLKCTRL_INDEX(0x338) 28c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_I2C1_CLKCTRL AM4_L4_WKUP_CLKCTRL_INDEX(0x340) 29c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_UART1_CLKCTRL AM4_L4_WKUP_CLKCTRL_INDEX(0x348) 30c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_SMARTREFLEX0_CLKCTRL AM4_L4_WKUP_CLKCTRL_INDEX(0x350) 31c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_SMARTREFLEX1_CLKCTRL AM4_L4_WKUP_CLKCTRL_INDEX(0x358) 32c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_CONTROL_CLKCTRL AM4_L4_WKUP_CLKCTRL_INDEX(0x360) 33c66ec88fSEmmanuel Vadot #define AM4_L4_WKUP_GPIO1_CLKCTRL AM4_L4_WKUP_CLKCTRL_INDEX(0x368) 34c66ec88fSEmmanuel Vadot 35c66ec88fSEmmanuel Vadot /* mpu clocks */ 36c66ec88fSEmmanuel Vadot #define AM4_MPU_MPU_CLKCTRL AM4_CLKCTRL_INDEX(0x20) 37c66ec88fSEmmanuel Vadot 38c66ec88fSEmmanuel Vadot /* gfx_l3 clocks */ 39c66ec88fSEmmanuel Vadot #define AM4_GFX_L3_GFX_CLKCTRL AM4_CLKCTRL_INDEX(0x20) 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel Vadot /* l4_rtc clocks */ 42c66ec88fSEmmanuel Vadot #define AM4_L4_RTC_RTC_CLKCTRL AM4_CLKCTRL_INDEX(0x20) 43c66ec88fSEmmanuel Vadot 44c66ec88fSEmmanuel Vadot /* l3 clocks */ 45c66ec88fSEmmanuel Vadot #define AM4_L3_L3_MAIN_CLKCTRL AM4_CLKCTRL_INDEX(0x20) 46c66ec88fSEmmanuel Vadot #define AM4_L3_AES_CLKCTRL AM4_CLKCTRL_INDEX(0x28) 47c66ec88fSEmmanuel Vadot #define AM4_L3_DES_CLKCTRL AM4_CLKCTRL_INDEX(0x30) 48c66ec88fSEmmanuel Vadot #define AM4_L3_L3_INSTR_CLKCTRL AM4_CLKCTRL_INDEX(0x40) 49c66ec88fSEmmanuel Vadot #define AM4_L3_OCMCRAM_CLKCTRL AM4_CLKCTRL_INDEX(0x50) 50c66ec88fSEmmanuel Vadot #define AM4_L3_SHAM_CLKCTRL AM4_CLKCTRL_INDEX(0x58) 51c66ec88fSEmmanuel Vadot #define AM4_L3_TPCC_CLKCTRL AM4_CLKCTRL_INDEX(0x78) 52c66ec88fSEmmanuel Vadot #define AM4_L3_TPTC0_CLKCTRL AM4_CLKCTRL_INDEX(0x80) 53c66ec88fSEmmanuel Vadot #define AM4_L3_TPTC1_CLKCTRL AM4_CLKCTRL_INDEX(0x88) 54c66ec88fSEmmanuel Vadot #define AM4_L3_TPTC2_CLKCTRL AM4_CLKCTRL_INDEX(0x90) 55c66ec88fSEmmanuel Vadot #define AM4_L3_L4_HS_CLKCTRL AM4_CLKCTRL_INDEX(0xa0) 56c66ec88fSEmmanuel Vadot 57c66ec88fSEmmanuel Vadot /* l3s clocks */ 58c66ec88fSEmmanuel Vadot #define AM4_L3S_CLKCTRL_OFFSET 0x68 59c66ec88fSEmmanuel Vadot #define AM4_L3S_CLKCTRL_INDEX(offset) ((offset) - AM4_L3S_CLKCTRL_OFFSET) 60c66ec88fSEmmanuel Vadot #define AM4_L3S_VPFE0_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x68) 61c66ec88fSEmmanuel Vadot #define AM4_L3S_VPFE1_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x70) 62c66ec88fSEmmanuel Vadot #define AM4_L3S_GPMC_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x220) 63*8cc087a1SEmmanuel Vadot #define AM4_L3S_ADC1_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x230) 64c66ec88fSEmmanuel Vadot #define AM4_L3S_MCASP0_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x238) 65c66ec88fSEmmanuel Vadot #define AM4_L3S_MCASP1_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x240) 66c66ec88fSEmmanuel Vadot #define AM4_L3S_MMC3_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x248) 67c66ec88fSEmmanuel Vadot #define AM4_L3S_QSPI_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x258) 68c66ec88fSEmmanuel Vadot #define AM4_L3S_USB_OTG_SS0_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x260) 69c66ec88fSEmmanuel Vadot #define AM4_L3S_USB_OTG_SS1_CLKCTRL AM4_L3S_CLKCTRL_INDEX(0x268) 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot /* pruss_ocp clocks */ 72c66ec88fSEmmanuel Vadot #define AM4_PRUSS_OCP_CLKCTRL_OFFSET 0x320 73c66ec88fSEmmanuel Vadot #define AM4_PRUSS_OCP_CLKCTRL_INDEX(offset) ((offset) - AM4_PRUSS_OCP_CLKCTRL_OFFSET) 74c66ec88fSEmmanuel Vadot #define AM4_PRUSS_OCP_PRUSS_CLKCTRL AM4_PRUSS_OCP_CLKCTRL_INDEX(0x320) 75c66ec88fSEmmanuel Vadot 76c66ec88fSEmmanuel Vadot /* l4ls clocks */ 77c66ec88fSEmmanuel Vadot #define AM4_L4LS_CLKCTRL_OFFSET 0x420 78c66ec88fSEmmanuel Vadot #define AM4_L4LS_CLKCTRL_INDEX(offset) ((offset) - AM4_L4LS_CLKCTRL_OFFSET) 79c66ec88fSEmmanuel Vadot #define AM4_L4LS_L4_LS_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x420) 80c66ec88fSEmmanuel Vadot #define AM4_L4LS_D_CAN0_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x428) 81c66ec88fSEmmanuel Vadot #define AM4_L4LS_D_CAN1_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x430) 82c66ec88fSEmmanuel Vadot #define AM4_L4LS_EPWMSS0_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x438) 83c66ec88fSEmmanuel Vadot #define AM4_L4LS_EPWMSS1_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x440) 84c66ec88fSEmmanuel Vadot #define AM4_L4LS_EPWMSS2_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x448) 85c66ec88fSEmmanuel Vadot #define AM4_L4LS_EPWMSS3_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x450) 86c66ec88fSEmmanuel Vadot #define AM4_L4LS_EPWMSS4_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x458) 87c66ec88fSEmmanuel Vadot #define AM4_L4LS_EPWMSS5_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x460) 88c66ec88fSEmmanuel Vadot #define AM4_L4LS_ELM_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x468) 89c66ec88fSEmmanuel Vadot #define AM4_L4LS_GPIO2_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x478) 90c66ec88fSEmmanuel Vadot #define AM4_L4LS_GPIO3_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x480) 91c66ec88fSEmmanuel Vadot #define AM4_L4LS_GPIO4_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x488) 92c66ec88fSEmmanuel Vadot #define AM4_L4LS_GPIO5_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x490) 93c66ec88fSEmmanuel Vadot #define AM4_L4LS_GPIO6_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x498) 94c66ec88fSEmmanuel Vadot #define AM4_L4LS_HDQ1W_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x4a0) 95c66ec88fSEmmanuel Vadot #define AM4_L4LS_I2C2_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x4a8) 96c66ec88fSEmmanuel Vadot #define AM4_L4LS_I2C3_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x4b0) 97c66ec88fSEmmanuel Vadot #define AM4_L4LS_MAILBOX_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x4b8) 98c66ec88fSEmmanuel Vadot #define AM4_L4LS_MMC1_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x4c0) 99c66ec88fSEmmanuel Vadot #define AM4_L4LS_MMC2_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x4c8) 100c66ec88fSEmmanuel Vadot #define AM4_L4LS_RNG_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x4e0) 101c66ec88fSEmmanuel Vadot #define AM4_L4LS_SPI0_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x500) 102c66ec88fSEmmanuel Vadot #define AM4_L4LS_SPI1_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x508) 103c66ec88fSEmmanuel Vadot #define AM4_L4LS_SPI2_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x510) 104c66ec88fSEmmanuel Vadot #define AM4_L4LS_SPI3_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x518) 105c66ec88fSEmmanuel Vadot #define AM4_L4LS_SPI4_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x520) 106c66ec88fSEmmanuel Vadot #define AM4_L4LS_SPINLOCK_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x528) 107c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER2_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x530) 108c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER3_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x538) 109c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER4_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x540) 110c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER5_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x548) 111c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER6_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x550) 112c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER7_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x558) 113c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER8_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x560) 114c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER9_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x568) 115c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER10_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x570) 116c66ec88fSEmmanuel Vadot #define AM4_L4LS_TIMER11_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x578) 117c66ec88fSEmmanuel Vadot #define AM4_L4LS_UART2_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x580) 118c66ec88fSEmmanuel Vadot #define AM4_L4LS_UART3_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x588) 119c66ec88fSEmmanuel Vadot #define AM4_L4LS_UART4_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x590) 120c66ec88fSEmmanuel Vadot #define AM4_L4LS_UART5_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x598) 121c66ec88fSEmmanuel Vadot #define AM4_L4LS_UART6_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x5a0) 122c66ec88fSEmmanuel Vadot #define AM4_L4LS_OCP2SCP0_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x5b8) 123c66ec88fSEmmanuel Vadot #define AM4_L4LS_OCP2SCP1_CLKCTRL AM4_L4LS_CLKCTRL_INDEX(0x5c0) 124c66ec88fSEmmanuel Vadot 125c66ec88fSEmmanuel Vadot /* emif clocks */ 126c66ec88fSEmmanuel Vadot #define AM4_EMIF_CLKCTRL_OFFSET 0x720 127c66ec88fSEmmanuel Vadot #define AM4_EMIF_CLKCTRL_INDEX(offset) ((offset) - AM4_EMIF_CLKCTRL_OFFSET) 128c66ec88fSEmmanuel Vadot #define AM4_EMIF_EMIF_CLKCTRL AM4_EMIF_CLKCTRL_INDEX(0x720) 129c66ec88fSEmmanuel Vadot 130c66ec88fSEmmanuel Vadot /* dss clocks */ 131c66ec88fSEmmanuel Vadot #define AM4_DSS_CLKCTRL_OFFSET 0xa20 132c66ec88fSEmmanuel Vadot #define AM4_DSS_CLKCTRL_INDEX(offset) ((offset) - AM4_DSS_CLKCTRL_OFFSET) 133c66ec88fSEmmanuel Vadot #define AM4_DSS_DSS_CORE_CLKCTRL AM4_DSS_CLKCTRL_INDEX(0xa20) 134c66ec88fSEmmanuel Vadot 135c66ec88fSEmmanuel Vadot /* cpsw_125mhz clocks */ 136c66ec88fSEmmanuel Vadot #define AM4_CPSW_125MHZ_CLKCTRL_OFFSET 0xb20 137c66ec88fSEmmanuel Vadot #define AM4_CPSW_125MHZ_CLKCTRL_INDEX(offset) ((offset) - AM4_CPSW_125MHZ_CLKCTRL_OFFSET) 138c66ec88fSEmmanuel Vadot #define AM4_CPSW_125MHZ_CPGMAC0_CLKCTRL AM4_CPSW_125MHZ_CLKCTRL_INDEX(0xb20) 139c66ec88fSEmmanuel Vadot 140c66ec88fSEmmanuel Vadot #endif 141