]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/include/asm/arch-am33xx/cpu.h
TX6 Release 2013-04-22
[karo-tx-uboot.git] / arch / arm / include / asm / arch-am33xx / cpu.h
index 963b01fb2b90cb0aeffb40f63d3398ae08f4e703..f10cffb292d8a906db6be2f07a93cf1df0882982 100644 (file)
 #define PRM_RSTCTRL                    0x44E00F00
 #define PRM_RSTST                      0x44E00F08
 #define PRM_RSTCTRL_RESET              0x01
+#define PRM_RSTST_WARM_RESET_MASK      0x232
 
 #ifndef __KERNEL_STRICT_NAMES
 #ifndef __ASSEMBLY__
+struct gpmc_cs {
+       u32 config1;            /* 0x00 */
+       u32 config2;            /* 0x04 */
+       u32 config3;            /* 0x08 */
+       u32 config4;            /* 0x0C */
+       u32 config5;            /* 0x10 */
+       u32 config6;            /* 0x14 */
+       u32 config7;            /* 0x18 */
+       u32 nand_cmd;           /* 0x1C */
+       u32 nand_adr;           /* 0x20 */
+       u32 nand_dat;           /* 0x24 */
+       u8 res[8];              /* blow up to 0x30 byte */
+};
+
+struct bch_res_0_3 {
+       u32 bch_result_x[4];
+};
+
+struct gpmc {
+       u8 res1[0x10];
+       u32 sysconfig;          /* 0x10 */
+       u8 res2[0x4];
+       u32 irqstatus;          /* 0x18 */
+       u32 irqenable;          /* 0x1C */
+       u8 res3[0x20];
+       u32 timeout_control;    /* 0x40 */
+       u8 res4[0xC];
+       u32 config;             /* 0x50 */
+       u32 status;             /* 0x54 */
+       u8 res5[0x8];           /* 0x58 */
+       struct gpmc_cs cs[8];   /* 0x60, 0x90, .. */
+       u8 res6[0x14];          /* 0x1E0 */
+       u32 ecc_config;         /* 0x1F4 */
+       u32 ecc_control;        /* 0x1F8 */
+       u32 ecc_size_config;    /* 0x1FC */
+       u32 ecc1_result;        /* 0x200 */
+       u32 ecc2_result;        /* 0x204 */
+       u32 ecc3_result;        /* 0x208 */
+       u32 ecc4_result;        /* 0x20C */
+       u32 ecc5_result;        /* 0x210 */
+       u32 ecc6_result;        /* 0x214 */
+       u32 ecc7_result;        /* 0x218 */
+       u32 ecc8_result;        /* 0x21C */
+       u32 ecc9_result;        /* 0x220 */
+       u8 res7[12];            /* 0x224 */
+       u32 testmomde_ctrl;     /* 0x230 */
+       u8 res8[12];            /* 0x234 */
+       struct bch_res_0_3 bch_result_0_3[2];   /* 0x240 */
+};
+
+/* Used for board specific gpmc initialization */
+extern struct gpmc *gpmc_cfg;
+
 /* Encapsulating core pll registers */
 struct cm_wkuppll {
        unsigned int wkclkstctrl;       /* offset 0x00 */
        unsigned int wkctrlclkctrl;     /* offset 0x04 */
-       unsigned int gpio0clkctrl;
+       unsigned int wkgpio0clkctrl;    /* offset 0x08 */
        unsigned int wkl4wkclkctrl;     /* offset 0x0c */
        unsigned int resv2[4];
        unsigned int idlestdpllmpu;     /* offset 0x20 */
@@ -81,7 +135,8 @@ struct cm_wkuppll {
        unsigned int clkseldpllcore;    /* offset 0x68 */
        unsigned int resv9[1];
        unsigned int idlestdpllper;     /* offset 0x70 */
-       unsigned int resv10[3];
+       unsigned int resv10[2];
+       unsigned int clkdcoldodpllper;  /* offset 0x7c */
        unsigned int divm4dpllcore;     /* offset 0x80 */
        unsigned int divm5dpllcore;     /* offset 0x84 */
        unsigned int clkmoddpllmpu;     /* offset 0x88 */
@@ -113,13 +168,14 @@ struct cm_perpll {
        unsigned int l3clkstctrl;       /* offset 0x0c */
        unsigned int resv1;
        unsigned int cpgmac0clkctrl;    /* offset 0x14 */
-       unsigned int lcdcclkctrl;       /* offset 0x18 */
+       unsigned int lcdclkctrl;        /* offset 0x18 */
        unsigned int usb0clkctrl;       /* offset 0x1c */
-       unsigned int resv2[2];
+       unsigned int resv2;
+       unsigned int tptc0clkctrl;      /* offset 0x24 */
        unsigned int emifclkctrl;       /* offset 0x28 */
        unsigned int ocmcramclkctrl;    /* offset 0x2c */
        unsigned int gpmcclkctrl;       /* offset 0x30 */
-       unsigned int resv3[1];          /* offset 0x34 */
+       unsigned int mcasp0clkctrl;     /* offset 0x34 */
        unsigned int uart5clkctrl;      /* offset 0x38 */
        unsigned int mmc0clkctrl;       /* offset 0x3C */
        unsigned int elmclkctrl;        /* offset 0x40 */
@@ -127,33 +183,39 @@ struct cm_perpll {
        unsigned int i2c1clkctrl;       /* offset 0x48 */
        unsigned int spi0clkctrl;       /* offset 0x4C */
        unsigned int spi1clkctrl;       /* offset 0x50 */
-       unsigned int resv4[3];
+       unsigned int resv3[3];
        unsigned int l4lsclkctrl;       /* offset 0x60 */
        unsigned int l4fwclkctrl;       /* offset 0x64 */
        unsigned int mcasp1clkctrl;     /* offset 0x68 */
-       unsigned int uart1clkctrl;      /* offset 0x6c */
+       unsigned int uart1clkctrl;      /* offset 0x6C */
        unsigned int uart2clkctrl;      /* offset 0x70 */
        unsigned int uart3clkctrl;      /* offset 0x74 */
        unsigned int uart4clkctrl;      /* offset 0x78 */
-       unsigned int timer7clkctrl;     /* offset 0x7c */
+       unsigned int timer7clkctrl;     /* offset 0x7C */
        unsigned int timer2clkctrl;     /* offset 0x80 */
-       unsigned int resv6[10];
+       unsigned int timer3clkctrl;     /* offset 0x84 */
+       unsigned int timer4clkctrl;     /* offset 0x88 */
+       unsigned int resv4[8];
        unsigned int gpio1clkctrl;      /* offset 0xAC */
        unsigned int gpio2clkctrl;      /* offset 0xB0 */
        unsigned int gpio3clkctrl;      /* offset 0xB4 */
-       unsigned int resv7[6];
+       unsigned int resv5;
+       unsigned int tpccclkctrl;       /* offset 0xBC */
+       unsigned int dcan0clkctrl;      /* offset 0xC0 */
+       unsigned int dcan1clkctrl;      /* offset 0xC4 */
+       unsigned int resv6[2];
        unsigned int emiffwclkctrl;     /* offset 0xD0 */
-       unsigned int resv8[2];
+       unsigned int resv7[2];
        unsigned int l3instrclkctrl;    /* offset 0xDC */
        unsigned int l3clkctrl;         /* Offset 0xE0 */
-       unsigned int resv8a[4];
-       unsigned int mmc1clkctrl;       /* Offset 0xF4 */
-       unsigned int mmc2clkctrl;       /* Offset 0xF8 */
+       unsigned int resv8[4];
+       unsigned int mmc1clkctrl;       /* offset 0xF4 */
+       unsigned int mmc2clkctrl;       /* offset 0xF8 */
        unsigned int resv9[8];
        unsigned int l4hsclkstctrl;     /* offset 0x11C */
        unsigned int l4hsclkctrl;       /* offset 0x120 */
        unsigned int resv10[8];
-       unsigned int cpswclkctrl;       /* offset 0x144 */
+       unsigned int cpswclkstctrl;     /* offset 0x144 */
 };
 
 /* Encapsulating Display pll registers */
@@ -162,6 +224,12 @@ struct cm_dpll {
        unsigned int clktimer2clk;      /* offset 0x08 */
 };
 
+/* Control Module RTC registers */
+struct cm_rtc {
+       unsigned int rtcclkctrl;        /* offset 0x0 */
+       unsigned int clkstctrl;         /* offset 0x4 */
+};
+
 /* Watchdog timer registers */
 struct wd_timer {
        unsigned int resv1[4];
@@ -211,6 +279,15 @@ struct gptimer {
        unsigned int tcar2;             /* offset 0x58 */
 };
 
+/* RTC Registers */
+struct rtc_regs {
+       unsigned int res[21];
+       unsigned int osc;               /* offset 0x54 */
+       unsigned int res2[5];
+       unsigned int kick0r;            /* offset 0x6c */
+       unsigned int kick1r;            /* offset 0x70 */
+};
+
 /* UART Registers */
 struct uart_sys {
        unsigned int resv1[21];
@@ -227,58 +304,43 @@ struct vtp_reg {
 struct ctrl_stat {
        unsigned int resv1[16];
        unsigned int statusreg;         /* ofset 0x40 */
+       unsigned int resv2[51];
+       unsigned int secure_emif_sdram_config;  /* offset 0x0110 */
 };
 
-struct gpmc_cs {
-       u32 config1;            /* 0x00 */
-       u32 config2;            /* 0x04 */
-       u32 config3;            /* 0x08 */
-       u32 config4;            /* 0x0C */
-       u32 config5;            /* 0x10 */
-       u32 config6;            /* 0x14 */
-       u32 config7;            /* 0x18 */
-       u32 nand_cmd;           /* 0x1C */
-       u32 nand_adr;           /* 0x20 */
-       u32 nand_dat;           /* 0x24 */
-       u8 res[8];              /* blow up to 0x30 byte */
-};
+/* AM33XX GPIO registers */
+#define OMAP_GPIO_REVISION             0x0000
+#define OMAP_GPIO_SYSCONFIG            0x0010
+#define OMAP_GPIO_SYSSTATUS            0x0114
+#define OMAP_GPIO_IRQSTATUS1           0x002c
+#define OMAP_GPIO_IRQSTATUS2           0x0030
+#define OMAP_GPIO_CTRL                 0x0130
+#define OMAP_GPIO_OE                   0x0134
+#define OMAP_GPIO_DATAIN               0x0138
+#define OMAP_GPIO_DATAOUT              0x013c
+#define OMAP_GPIO_LEVELDETECT0         0x0140
+#define OMAP_GPIO_LEVELDETECT1         0x0144
+#define OMAP_GPIO_RISINGDETECT         0x0148
+#define OMAP_GPIO_FALLINGDETECT                0x014c
+#define OMAP_GPIO_DEBOUNCE_EN          0x0150
+#define OMAP_GPIO_DEBOUNCE_VAL         0x0154
+#define OMAP_GPIO_CLEARDATAOUT         0x0190
+#define OMAP_GPIO_SETDATAOUT           0x0194
 
-struct bch_res_0_3 {
-       u32 bch_result_x[4];
-};
-
-
-
-struct gpmc {
-       u8 res1[0x10];
-       u32 sysconfig;          /* 0x10 */
-       u8 res2[0x4];
-       u32 irqstatus;          /* 0x18 */
-       u32 irqenable;          /* 0x1C */
-       u8 res3[0x20];
-       u32 timeout_control;    /* 0x40 */
-       u8 res4[0xC];
-       u32 config;             /* 0x50 */
-       u32 status;             /* 0x54 */
-       u8 res5[0x8];           /* 0x58 */
-       struct gpmc_cs cs[8];   /* 0x60, 0x90, .. */
-       u8 res6[0x14];          /* 0x1E0 */
-       u32 ecc_config;         /* 0x1F4 */
-       u32 ecc_control;        /* 0x1F8 */
-       u32 ecc_size_config;    /* 0x1FC */
-       u32 ecc1_result;        /* 0x200 */
-       u32 ecc2_result;        /* 0x204 */
-       u32 ecc3_result;        /* 0x208 */
-       u32 ecc4_result;        /* 0x20C */
-       u32 ecc5_result;        /* 0x210 */
-       u32 ecc6_result;        /* 0x214 */
-       u32 ecc7_result;        /* 0x218 */
-       u32 ecc8_result;        /* 0x21C */
-       u32 ecc9_result;        /* 0x220 */
-       u8 res7[12];            /* 0x224 */
-       u32 testmomde_ctrl;     /* 0x230 */
-       u8 res8[12];            /* 0x234 */
-       struct bch_res_0_3 bch_result_0_3[2];   /* 0x240 */
+/* Control Device Register */
+struct ctrl_dev {
+       unsigned int deviceid;          /* offset 0x00 */
+       unsigned int resv1[7];
+       unsigned int usb_ctrl0;         /* offset 0x20 */
+       unsigned int resv2;
+       unsigned int usb_ctrl1;         /* offset 0x28 */
+       unsigned int resv3;
+       unsigned int macid0l;           /* offset 0x30 */
+       unsigned int macid0h;           /* offset 0x34 */
+       unsigned int macid1l;           /* offset 0x38 */
+       unsigned int macid1h;           /* offset 0x3c */
+       unsigned int resv4[4];
+       unsigned int miisel;            /* offset 0x50 */
 };
 
 void init_timer(void);
@@ -289,6 +351,8 @@ void init_timer(void);
 
 unsigned long __clk_get_rate(u32 m_n, u32 div_m2);
 
+unsigned long lcdc_clk_rate(void);
+
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */