Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 2 | /* |
| 3 | * hardware_am43xx.h |
| 4 | * |
| 5 | * AM43xx hardware specific header |
| 6 | * |
Nishanth Menon | eaa39c6 | 2023-11-01 15:56:03 -0500 | [diff] [blame] | 7 | * Copyright (C) 2013, Texas Instruments, Incorporated - https://www.ti.com/ |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __AM43XX_HARDWARE_AM43XX_H |
| 11 | #define __AM43XX_HARDWARE_AM43XX_H |
| 12 | |
Simon Glass | 4dcacfc | 2020-05-10 11:40:13 -0600 | [diff] [blame] | 13 | #ifndef __ASSEMBLY__ |
| 14 | #include <linux/bitops.h> |
| 15 | #endif |
| 16 | |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 17 | /* Module base addresses */ |
| 18 | |
Cooper Jr., Franklin | df25e35 | 2014-06-27 13:31:15 -0500 | [diff] [blame] | 19 | /* L3 Fast Configuration Bandwidth Limiter Base Address */ |
| 20 | #define L3F_CFG_BWLIMITER 0x44005200 |
| 21 | |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 22 | /* UART Base Address */ |
| 23 | #define UART0_BASE 0x44E09000 |
| 24 | |
| 25 | /* GPIO Base address */ |
| 26 | #define GPIO2_BASE 0x481AC000 |
| 27 | |
| 28 | /* Watchdog Timer */ |
| 29 | #define WDT_BASE 0x44E35000 |
| 30 | |
| 31 | /* Control Module Base Address */ |
| 32 | #define CTRL_BASE 0x44E10000 |
| 33 | #define CTRL_DEVICE_BASE 0x44E10600 |
| 34 | |
| 35 | /* PRCM Base Address */ |
| 36 | #define PRCM_BASE 0x44DF0000 |
| 37 | #define CM_WKUP 0x44DF2800 |
| 38 | #define CM_PER 0x44DF8800 |
Lokesh Vutla | 1c1a281 | 2013-12-10 15:02:11 +0530 | [diff] [blame] | 39 | #define CM_DPLL 0x44DF4200 |
| 40 | #define CM_RTC 0x44DF8500 |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 41 | |
| 42 | #define PRM_RSTCTRL (PRCM_BASE + 0x4000) |
| 43 | #define PRM_RSTST (PRM_RSTCTRL + 4) |
| 44 | |
| 45 | /* VTP Base address */ |
| 46 | #define VTP0_CTRL_ADDR 0x44E10E0C |
TENART Antoine | 35c7e52 | 2013-07-02 12:05:59 +0200 | [diff] [blame] | 47 | #define VTP1_CTRL_ADDR 0x48140E10 |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 48 | |
Felipe Balbi | d8d0b2f | 2014-06-23 17:18:24 -0500 | [diff] [blame] | 49 | /* USB CTRL Base Address */ |
| 50 | #define USB1_CTRL 0x44e10628 |
| 51 | #define USB1_CTRL_CM_PWRDN BIT(0) |
| 52 | #define USB1_CTRL_OTG_PWRDN BIT(1) |
| 53 | |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 54 | /* DDR Base address */ |
| 55 | #define DDR_PHY_CMD_ADDR 0x44E12000 |
| 56 | #define DDR_PHY_DATA_ADDR 0x44E120C8 |
TENART Antoine | 35c7e52 | 2013-07-02 12:05:59 +0200 | [diff] [blame] | 57 | #define DDR_PHY_CMD_ADDR2 0x47C0C800 |
| 58 | #define DDR_PHY_DATA_ADDR2 0x47C0C8C8 |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 59 | #define DDR_DATA_REGS_NR 2 |
| 60 | |
| 61 | /* CPSW Config space */ |
| 62 | #define CPSW_MDIO_BASE 0x4A101000 |
| 63 | |
| 64 | /* RTC base address */ |
| 65 | #define RTC_BASE 0x44E3E000 |
| 66 | |
Kishon Vijay Abraham I | 08ff0fd | 2015-02-23 18:40:21 +0530 | [diff] [blame] | 67 | /* USB OTG */ |
| 68 | #define USB_OTG_SS1_BASE 0x48390000 |
| 69 | #define USB_OTG_SS1_GLUE_BASE 0x48380000 |
| 70 | #define USB2_PHY1_POWER 0x44E10620 |
| 71 | |
| 72 | #define USB_OTG_SS2_BASE 0x483D0000 |
| 73 | #define USB_OTG_SS2_GLUE_BASE 0x483C0000 |
| 74 | #define USB2_PHY2_POWER 0x44E10628 |
| 75 | |
Dan Murphy | 6044db3 | 2013-10-11 12:28:18 -0500 | [diff] [blame] | 76 | /* USB Clock Control */ |
| 77 | #define PRM_PER_USB_OTG_SS0_CLKCTRL (CM_PER + 0x260) |
| 78 | #define PRM_PER_USB_OTG_SS1_CLKCTRL (CM_PER + 0x268) |
Dan Murphy | 2c57e31 | 2013-12-05 07:19:17 -0600 | [diff] [blame] | 79 | #define USBOTGSSX_CLKCTRL_MODULE_EN (1 << 1) |
Dan Murphy | 6044db3 | 2013-10-11 12:28:18 -0500 | [diff] [blame] | 80 | #define USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960 (1 << 8) |
| 81 | |
| 82 | #define PRM_PER_USBPHYOCP2SCP0_CLKCTRL (CM_PER + 0x5b8) |
| 83 | #define PRM_PER_USBPHYOCP2SCP1_CLKCTRL (CM_PER + 0x5c0) |
Dan Murphy | 2c57e31 | 2013-12-05 07:19:17 -0600 | [diff] [blame] | 84 | #define USBPHYOCPSCP_MODULE_EN (1 << 1) |
Lokesh Vutla | a82d4e1 | 2013-12-10 15:02:22 +0530 | [diff] [blame] | 85 | #define CM_DEVICE_INST 0x44df4100 |
James Doublesin | 53c723b | 2014-12-22 16:26:11 -0600 | [diff] [blame] | 86 | #define PRM_DEVICE_INST 0x44df4000 |
Dan Murphy | 6044db3 | 2013-10-11 12:28:18 -0500 | [diff] [blame] | 87 | |
Kishon Vijay Abraham I | ac75bb1 | 2015-02-23 18:39:45 +0530 | [diff] [blame] | 88 | #define USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960 (1 << 8) |
| 89 | #define USBPHY0_CLKCTRL_OPTFCLKEN_CLK32K (1 << 8) |
| 90 | |
Vignesh R | 63ff6f1 | 2015-11-10 11:52:11 +0530 | [diff] [blame] | 91 | /* EDMA3 Base Address */ |
| 92 | #define EDMA3_BASE 0x49000000 |
| 93 | |
Lokesh Vutla | 83269d0 | 2013-07-30 11:36:28 +0530 | [diff] [blame] | 94 | #endif /* __AM43XX_HARDWARE_AM43XX_H */ |