Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 1 | /* |
| 2 | * hardware_am43xx.h |
| 3 | * |
| 4 | * AM43xx hardware specific header |
| 5 | * |
| 6 | * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/ |
| 7 | * |
| 8 | * SPDX-License-Identifier: GPL-2.0+ |
| 9 | */ |
| 10 | |
| 11 | #ifndef __AM43XX_HARDWARE_AM43XX_H |
| 12 | #define __AM43XX_HARDWARE_AM43XX_H |
| 13 | |
| 14 | /* Module base addresses */ |
| 15 | |
Cooper Jr., Franklin | df25e35 | 2014-06-27 13:31:15 -0500 | [diff] [blame] | 16 | /* L3 Fast Configuration Bandwidth Limiter Base Address */ |
| 17 | #define L3F_CFG_BWLIMITER 0x44005200 |
| 18 | |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 19 | /* UART Base Address */ |
| 20 | #define UART0_BASE 0x44E09000 |
| 21 | |
| 22 | /* GPIO Base address */ |
| 23 | #define GPIO2_BASE 0x481AC000 |
| 24 | |
| 25 | /* Watchdog Timer */ |
| 26 | #define WDT_BASE 0x44E35000 |
| 27 | |
| 28 | /* Control Module Base Address */ |
| 29 | #define CTRL_BASE 0x44E10000 |
| 30 | #define CTRL_DEVICE_BASE 0x44E10600 |
| 31 | |
| 32 | /* PRCM Base Address */ |
| 33 | #define PRCM_BASE 0x44DF0000 |
| 34 | #define CM_WKUP 0x44DF2800 |
| 35 | #define CM_PER 0x44DF8800 |
Lokesh Vutla | 1c1a281 | 2013-12-10 15:02:11 +0530 | [diff] [blame] | 36 | #define CM_DPLL 0x44DF4200 |
| 37 | #define CM_RTC 0x44DF8500 |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 38 | |
| 39 | #define PRM_RSTCTRL (PRCM_BASE + 0x4000) |
| 40 | #define PRM_RSTST (PRM_RSTCTRL + 4) |
| 41 | |
| 42 | /* VTP Base address */ |
| 43 | #define VTP0_CTRL_ADDR 0x44E10E0C |
TENART Antoine | 35c7e52 | 2013-07-02 12:05:59 +0200 | [diff] [blame] | 44 | #define VTP1_CTRL_ADDR 0x48140E10 |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 45 | |
Felipe Balbi | d8d0b2f | 2014-06-23 17:18:24 -0500 | [diff] [blame] | 46 | /* USB CTRL Base Address */ |
| 47 | #define USB1_CTRL 0x44e10628 |
| 48 | #define USB1_CTRL_CM_PWRDN BIT(0) |
| 49 | #define USB1_CTRL_OTG_PWRDN BIT(1) |
| 50 | |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 51 | /* DDR Base address */ |
| 52 | #define DDR_PHY_CMD_ADDR 0x44E12000 |
| 53 | #define DDR_PHY_DATA_ADDR 0x44E120C8 |
TENART Antoine | 35c7e52 | 2013-07-02 12:05:59 +0200 | [diff] [blame] | 54 | #define DDR_PHY_CMD_ADDR2 0x47C0C800 |
| 55 | #define DDR_PHY_DATA_ADDR2 0x47C0C8C8 |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 56 | #define DDR_DATA_REGS_NR 2 |
| 57 | |
| 58 | /* CPSW Config space */ |
| 59 | #define CPSW_MDIO_BASE 0x4A101000 |
| 60 | |
| 61 | /* RTC base address */ |
| 62 | #define RTC_BASE 0x44E3E000 |
| 63 | |
Dan Murphy | 6044db3 | 2013-10-11 12:28:18 -0500 | [diff] [blame] | 64 | /* USB Clock Control */ |
| 65 | #define PRM_PER_USB_OTG_SS0_CLKCTRL (CM_PER + 0x260) |
| 66 | #define PRM_PER_USB_OTG_SS1_CLKCTRL (CM_PER + 0x268) |
Dan Murphy | 2c57e31 | 2013-12-05 07:19:17 -0600 | [diff] [blame] | 67 | #define USBOTGSSX_CLKCTRL_MODULE_EN (1 << 1) |
Dan Murphy | 6044db3 | 2013-10-11 12:28:18 -0500 | [diff] [blame] | 68 | #define USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960 (1 << 8) |
| 69 | |
| 70 | #define PRM_PER_USBPHYOCP2SCP0_CLKCTRL (CM_PER + 0x5b8) |
| 71 | #define PRM_PER_USBPHYOCP2SCP1_CLKCTRL (CM_PER + 0x5c0) |
Dan Murphy | 2c57e31 | 2013-12-05 07:19:17 -0600 | [diff] [blame] | 72 | #define USBPHYOCPSCP_MODULE_EN (1 << 1) |
Lokesh Vutla | a82d4e1 | 2013-12-10 15:02:22 +0530 | [diff] [blame] | 73 | #define CM_DEVICE_INST 0x44df4100 |
James Doublesin | 53c723b | 2014-12-22 16:26:11 -0600 | [diff] [blame] | 74 | #define PRM_DEVICE_INST 0x44df4000 |
Dan Murphy | 6044db3 | 2013-10-11 12:28:18 -0500 | [diff] [blame] | 75 | |
Lokesh Vutla | 42c213a | 2013-12-10 15:02:20 +0530 | [diff] [blame] | 76 | /* Control status register */ |
| 77 | #define CTRL_CRYSTAL_FREQ_SRC_MASK (1 << 31) |
| 78 | #define CTRL_CRYSTAL_FREQ_SRC_SHIFT 31 |
| 79 | #define CTRL_CRYSTAL_FREQ_SELECTION_MASK (0x3 << 29) |
| 80 | #define CTRL_CRYSTAL_FREQ_SELECTION_SHIFT 29 |
| 81 | #define CTRL_SYSBOOT_15_14_MASK (0x3 << 22) |
| 82 | #define CTRL_SYSBOOT_15_14_SHIFT 22 |
| 83 | |
| 84 | #define CTRL_CRYSTAL_FREQ_SRC_SYSBOOT 0x0 |
| 85 | #define CTRL_CRYSTAL_FREQ_SRC_EFUSE 0x1 |
| 86 | |
| 87 | #define NUM_CRYSTAL_FREQ 0x4 |
| 88 | |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 89 | #endif /* __AM43XX_HARDWARE_AM43XX_H */ |