first and last commit
This commit is contained in:
commit
1bf4efd552
2612 files changed
+636500
No files matched your search
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2011-2012 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
#ifndef __PLATFORM_GPIODEF_H
|
||||
#define __PLATFORM_GPIODEF_H
|
||||
|
||||
/* S5L8747X specific gpio -> pin mappings */
|
||||
|
||||
#include <platform/gpio.h>
|
||||
#include <platform/soc/hwregbase.h>
|
||||
|
||||
#if WITH_TARGET_CONFIG
|
||||
# include <target/gpiodef.h>
|
||||
#endif
|
||||
|
||||
/* define platform-specific gpios in a generic fashion here. */
|
||||
#define GPIO_IIC0_SCL GPIO( 1, 1)
|
||||
#define GPIO_IIC0_SDA GPIO( 1, 2)
|
||||
#define GPIO_IIC1_SCL GPIO( 3, 6)
|
||||
#define GPIO_IIC1_SDA GPIO( 3, 7)
|
||||
|
||||
#define GPIO_BOARD_ID0 GPIO( 2, 3)
|
||||
#define GPIO_BOARD_ID1 GPIO( 2, 4)
|
||||
#define GPIO_BOARD_ID2 GPIO( 2, 5)
|
||||
#define GPIO_BOARD_ID3 GPIO( 2, 6)
|
||||
|
||||
#define GPIO_BOOT_CONFIG0 GPIO( 2, 1)
|
||||
#define GPIO_BOOT_CONFIG1 GPIO( 2, 2)
|
||||
|
||||
#define GPIO_FORCE_DFU GPIO(3, 4)
|
||||
#define GPIO_DFU_STATUS GPIO(3, 5)
|
||||
|
||||
#define GPIO_CLK0_OUT GPIO( 3, 0)
|
||||
|
||||
#define SPI_NOR0 (0)
|
||||
#define SPI_NOR1 (1)
|
||||
|
||||
#if SUPPORT_FPGA
|
||||
#define GPIO_SPI0_CS GPIO(GPIO_PAD_SPI, 0)
|
||||
#define GPIO_SPI1_CS GPIO(GPIO_PAD_SPI, 1)
|
||||
#else
|
||||
#define GPIO_SPI0_CS GPIO( 1, 3)
|
||||
#define GPIO_SPI3_CS GPIO( 4, 4)
|
||||
#endif
|
||||
|
||||
#endif /* ! __PLATFORM_GPIODEF_H */
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_IMAGE_DEVICES_H
|
||||
#define __PLATFORM_IMAGE_DEVICES_H
|
||||
|
||||
static const struct image_device platform_image_devices[] = {
|
||||
{ "nor0", 0x00000 }
|
||||
};
|
||||
|
||||
#if WITH_SYSCFG
|
||||
static const struct image_device platform_syscfg_devices[] = {
|
||||
{ "nor0", 0x00000 }
|
||||
};
|
||||
#endif /* WITH_SYSCFG */
|
||||
|
||||
#endif /* ! __PLATFORM_IMAGE_DEVICES_H */
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Copyright (C) 2011-2012 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
#ifndef __PLATFORM_MEMMAP_H
|
||||
#define __PLATFORM_MEMMAP_H
|
||||
|
||||
/* S5L8747X hardware memory map */
|
||||
#define SDRAM_BASE (0x08000000ULL)
|
||||
#define SDRAM_BANK_LEN (0x10000000ULL)
|
||||
#define SDRAM_BANK_COUNT 1
|
||||
#define SDRAM_END (SDRAM_BASE + (SDRAM_BANK_LEN * SDRAM_BANK_COUNT))
|
||||
#define VROM_BASE (0x20000000ULL)
|
||||
#define VROM_BANK_LEN (0x00100000ULL)
|
||||
#define VROM_LEN (0x00020000ULL)
|
||||
#define SRAM_BASE (0x22000000ULL)
|
||||
#define SRAM_BANK_LEN (0x00400000ULL)
|
||||
#define SRAM_LEN (0x00020000ULL)
|
||||
|
||||
/* Sleep token is stored at first physical page in kernel memory */
|
||||
#define SLEEP_TOKEN_BUFFER_BASE (SDRAM_BASE)
|
||||
|
||||
/* reserved area for panic info */
|
||||
#define PANIC_SIZE (0x00004000ULL)
|
||||
#define PANIC_BASE (SDRAM_END - PANIC_SIZE)
|
||||
|
||||
/* Purple graphics memory, must be 1 MB aligned */
|
||||
#define PURPLE_GFX_MEMORY_LEN (0x09600000 - PANIC_SIZE)
|
||||
|
||||
/* reserved area for iBoot */
|
||||
#define IBOOT_SIZE (0x00100000 - PANIC_SIZE)
|
||||
#define IBOOT_BASE (PANIC_BASE - IBOOT_SIZE)
|
||||
#define PROTECTED_REGION_SIZE IBOOT_SIZE
|
||||
|
||||
/* where to stick the mmu tt, default heap and insecure memory*/
|
||||
#if APPLICATION_SECUREROM
|
||||
#define MMU_TT_SIZE (0x1000ULL)
|
||||
#define MMU_TT_BASE (SRAM_BASE + SRAM_LEN - MMU_TT_SIZE)
|
||||
#define MMU_NONCACHE0_SIZE (SRAM_BANK_LEN)
|
||||
#define MMU_NONCACHE0_PBASE (SRAM_BASE)
|
||||
#define MMU_NONCACHE0_VBASE (SRAM_BASE + SRAM_BANK_LEN)
|
||||
|
||||
#define STACK_SIZE (0x3000ULL)
|
||||
#define STACK_BASE (MMU_TT_BASE - STACK_SIZE)
|
||||
|
||||
#define HEAP_END (STACK_BASE)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#define INSECURE_MEMORY_BASE (SRAM_BASE)
|
||||
#define INSECURE_MEMORY_SIZE ((uintptr_t)__segment_start(__DATA) - INSECURE_MEMORY_BASE)
|
||||
|
||||
#endif /* ! __ASSEMBLY__ */
|
||||
|
||||
#endif /* APPLICATION_SECUREROM */
|
||||
|
||||
/* iBoot SDRAM map
|
||||
0x08000000-0x0B000000 - Load area (48 MB)
|
||||
0x0B000000-0x0DF00000 - Kernel (47 MB)
|
||||
0x0DF00000-0x0E000000 - Device tree (1 MB)
|
||||
0x0E000000-0x11000000 - Ramdisk (48 MB)
|
||||
0x11000000-0x17F00000 - Heap (111 MB)
|
||||
0x17F00000-0x17FFC000 - iBoot (unused) (1008 kB)
|
||||
0x17FFC000-0x18000000 - Panic (16kB)
|
||||
*/
|
||||
|
||||
#if APPLICATION_IBOOT
|
||||
#define MMU_TT_SIZE (0x1000ULL)
|
||||
#define MMU_TT_BASE (TEXT_BASE + TEXT_FOOTPRINT - MMU_TT_SIZE)
|
||||
#define MMU_NONCACHE0_SIZE (SRAM_BANK_LEN)
|
||||
#define MMU_NONCACHE0_PBASE (SRAM_BASE)
|
||||
#define MMU_NONCACHE0_VBASE (SRAM_BASE + SRAM_BANK_LEN)
|
||||
#define MMU_NONCACHE1_SIZE (0x10000000ULL)
|
||||
#define MMU_NONCACHE1_PBASE (0x08000000ULL)
|
||||
#define MMU_NONCACHE1_VBASE (0x28000000ULL)
|
||||
|
||||
#if WITH_DFU_MODE
|
||||
#define STACK_SIZE (0x3000ULL)
|
||||
|
||||
#define INSECURE_MEMORY_SIZE (0x00800000ULL)
|
||||
#define INSECURE_MEMORY_BASE (SDRAM_BASE + ((u_int32_t)platform_get_memory_size()) - INSECURE_MEMORY_SIZE)
|
||||
|
||||
#else /* !WITH_DFU_MODE */
|
||||
#define STACK_SIZE (0x0800ULL)
|
||||
|
||||
#define INSECURE_MEMORY_BASE (SDRAM_BASE)
|
||||
#define INSECURE_MEMORY_SIZE (DEFAULT_KERNEL_ADDRESS - SDRAM_BASE)
|
||||
#define DEFAULT_LOAD_ADDRESS (INSECURE_MEMORY_BASE)
|
||||
#define DEFAULT_LOAD_SIZE (0x03000000ULL)
|
||||
#define DEFAULT_KERNEL_ADDRESS (DEFAULT_LOAD_ADDRESS + DEFAULT_LOAD_SIZE)
|
||||
#define DEFAULT_KERNEL_SIZE (0x02F00000ULL)
|
||||
#define DEFAULT_DEVICETREE_ADDRESS (DEFAULT_KERNEL_ADDRESS + DEFAULT_KERNEL_SIZE)
|
||||
#define DEFAULT_DEVICETREE_SIZE (0x00100000ULL)
|
||||
#define DEFAULT_RAMDISK_ADDRESS (DEFAULT_DEVICETREE_ADDRESS + DEFAULT_DEVICETREE_SIZE)
|
||||
#define DEFAULT_RAMDISK_SIZE (0x03000000ULL)
|
||||
#define DEFAULT_FREE_ADDRESS (DEFAULT_RAMDISK_ADDRESS + DEFAULT_RAMDISK_SIZE)
|
||||
|
||||
#define SECURE_MEMORY_BASE (INSECURE_MEMORY_BASE + INSECURE_MEMORY_SIZE)
|
||||
#define SECURE_MEMORY_SIZE (IBOOT_BASE - SECURE_MEMORY_BASE)
|
||||
|
||||
#define HEAP_EXT_BASE (DEFAULT_FREE_ADDRESS)
|
||||
#define HEAP_EXT_SIZE (IBOOT_BASE - HEAP_EXT_BASE)
|
||||
#endif /* !WITH_DFU_MODE */
|
||||
|
||||
#define STACK_BASE (MMU_TT_BASE - STACK_SIZE)
|
||||
|
||||
/* Reserved area for boot trace */
|
||||
/* WARNING: We're really tight on SRAM on B137. So, the boot trace area overlaps
|
||||
the initial stack area. We typically only use about 500 bytes of the initial stack,
|
||||
and once we jump into main_task, we never use the initial stack again. So, as long
|
||||
as we don't do too much tracing before jumping into main_task, we'll be OK */
|
||||
#define PROFILE_BUF_SIZE (0x0800ULL)
|
||||
#define PROFILE_BUF_BASE (STACK_BASE)
|
||||
|
||||
#define HEAP_END (STACK_BASE)
|
||||
|
||||
#endif /* APPLICATION_IBOOT */
|
||||
|
||||
#endif /* ! __PLATFORM_MEMMAP_H */
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
#ifndef __PLATFORM_PINCONFIG_H
|
||||
#define __PLATFORM_PINCONFIG_H
|
||||
|
||||
/* Default S5L8747X SoC Pin Configuration */
|
||||
|
||||
static const struct gpio_default_config gpio_default_config[GPIO_GROUP_COUNT] = {
|
||||
/* P0 */ PINCONFIG(
|
||||
PCON_DISABLE, NO_PUPDN, // I2S0_MCK ->
|
||||
PCON_DISABLE, NO_PUPDN, // I2S0_LRCK ->
|
||||
PCON_DISABLE, NO_PUPDN, // I2S0_BCK ->
|
||||
PCON_DISABLE, NO_PUPDN, // I2S0_DOUT ->
|
||||
PCON_DISABLE, NO_PUPDN, // I2S0_DIN ->
|
||||
PCON_DISABLE, NO_PUPDN, // UART0_RXD ->
|
||||
PCON_DISABLE, NO_PUPDN, // UART0_TXD ->
|
||||
PCON_DISABLE, NO_PUPDN // UART0_NRTS ->
|
||||
),
|
||||
/* P1 */ PINCONFIG(
|
||||
PCON_DISABLE, NO_PUPDN, // UART0_NCTS ->
|
||||
PCON_DISABLE, NO_PUPDN, // I2C0_SCL ->
|
||||
PCON_DISABLE, NO_PUPDN, // I2C0_SDA ->
|
||||
PCON_DISABLE, PUP, // SPI0_CEN -> SPI0_CS
|
||||
PCON_DISABLE, PDN, // SPI0_CLK -> SPI0_CLK
|
||||
PCON_DISABLE, NO_PUPDN, // SPI0_MOSI -> SPI0_MOSI
|
||||
PCON_DISABLE, NO_PUPDN, // SPI0_MISO -> SPI0_MISO
|
||||
PCON_DISABLE, NO_PUPDN // - ->
|
||||
),
|
||||
/* P2 */ PINCONFIG(
|
||||
PCON_DISABLE, NO_PUPDN, // GPIO0 ->
|
||||
PCON_DISABLE, NO_PUPDN, // GPIO1 -> BOOT_CONFIG[0]
|
||||
PCON_DISABLE, NO_PUPDN, // GPIO2 -> BOOT_CONFIG[1]
|
||||
PCON_DISABLE, NO_PUPDN, // GPIO3 -> BOARD_ID[1]
|
||||
PCON_DISABLE, NO_PUPDN, // GPIO4 -> BOARD_ID[2]
|
||||
PCON_DISABLE, NO_PUPDN, // GPIO5 -> BOARD_ID[3]
|
||||
PCON_DISABLE, NO_PUPDN, // GPIO6 -> BOARD_ID[4]
|
||||
PCON_DISABLE, NO_PUPDN // GPIO7 ->
|
||||
),
|
||||
/* P3 */ PINCONFIG(
|
||||
PCON_DISABLE, NO_PUPDN, // CLK0_OUT ->
|
||||
PCON_DISABLE, NO_PUPDN, // CLK1_OUT ->
|
||||
PCON_DISABLE, NO_PUPDN, // HDMI_HPD ->
|
||||
PCON_DISABLE, NO_PUPDN, // HDMI_CEC ->
|
||||
PCON_IN, PDN, // FORCE_DFU -> FORCE_DFU
|
||||
PCON_DISABLE, PDN, // DFU_STATUS -> DFU_STATUS
|
||||
PCON_DISABLE, NO_PUPDN, // I2C1_SCL ->
|
||||
PCON_DISABLE, NO_PUPDN // I2C1_SDA ->
|
||||
),
|
||||
/* P4 */ PINCONFIG(
|
||||
PCON_DISABLE, NO_PUPDN, // UART2_RXD ->
|
||||
PCON_DISABLE, NO_PUPDN, // UART2_TXD ->
|
||||
PCON_DISABLE, NO_PUPDN, // UART2_NRTS ->
|
||||
PCON_DISABLE, NO_PUPDN, // UART2_NCTS ->
|
||||
PCON_DISABLE, NO_PUPDN, // SPI1_CEN ->
|
||||
PCON_DISABLE, NO_PUPDN, // SPI1_CLK ->
|
||||
PCON_DISABLE, NO_PUPDN, // SPI1_MOSI ->
|
||||
PCON_DISABLE, NO_PUPDN // SPI1_MISO ->
|
||||
),
|
||||
/* P5 */ PINCONFIG(
|
||||
PCON_DISABLE, NO_PUPDN, // UART1_RXD ->
|
||||
PCON_DISABLE, NO_PUPDN, // UART1_TXD ->
|
||||
PCON_DISABLE, NO_PUPDN, // UART1_NRTS ->
|
||||
PCON_DISABLE, NO_PUPDN, // UART1_NCTS ->
|
||||
PCON_DISABLE, NO_PUPDN, // VGA_VDEN ->
|
||||
PCON_DISABLE, NO_PUPDN, // VGA_HSYNC ->
|
||||
PCON_DISABLE, NO_PUPDN, // VGA_VSYNC ->
|
||||
PCON_DISABLE, NO_PUPDN // - ->
|
||||
),
|
||||
};
|
||||
|
||||
#endif /* ! __PLATFORM_PINCONFIG_H */
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_SOC_CHIPID_H
|
||||
#define __PLATFORM_SOC_CHIPID_H
|
||||
|
||||
#include <platform/chipid.h>
|
||||
#include <platform/soc/hwregbase.h>
|
||||
|
||||
#define rEFUSE_READ_DONE (*(volatile u_int32_t *)(CHIPID_BASE_ADDR + 0x00))
|
||||
#define rCHIPIDL (*(volatile u_int32_t *)(CHIPID_BASE_ADDR + 0x04))
|
||||
#define rCHIPIDH (*(volatile u_int32_t *)(CHIPID_BASE_ADDR + 0x08))
|
||||
#define rDIEIDL (*(volatile u_int32_t *)(CHIPID_BASE_ADDR + 0x0C))
|
||||
#define rDIEIDH (*(volatile u_int32_t *)(CHIPID_BASE_ADDR + 0x10))
|
||||
|
||||
extern bool chipid_get_ecid_image_personalization_required(void);
|
||||
|
||||
#endif /* __PLATFORM_SOC_CHIPID_H */
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
#ifndef __PLATFORM_SOC_CLOCKS_H
|
||||
#define __PLATFORM_SOC_CLOCKS_H
|
||||
|
||||
#include <platform/soc/hwregbase.h>
|
||||
|
||||
#define rCLKCON0 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x00))
|
||||
#define rCLKCON1 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x10))
|
||||
#define rCLKCON2 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x20))
|
||||
#define rCLKCON3 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x30))
|
||||
#define rCLKCON4 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x40))
|
||||
#define rCLKCON5 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x50))
|
||||
#define rCLKCON6 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x60))
|
||||
#define rCLKCON7 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x70))
|
||||
#define rPLL0PMS (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x100))
|
||||
#define rPLL1PMS (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x104))
|
||||
#define rPLL2PMS (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x108))
|
||||
#define rPLL3PMS (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x10C))
|
||||
#define rPLL0LCNT (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x110))
|
||||
#define rPLL1LCNT (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x114))
|
||||
#define rPLL2LCNT (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x118))
|
||||
#define rPLL3LCNT (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x11C))
|
||||
#define rPLLLOCKINT (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x150))
|
||||
#define rPLLLOCK (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x154))
|
||||
#define rPLLCON (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x158))
|
||||
#define rCGCON0 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x200))
|
||||
#define rCGCON1 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x204))
|
||||
#define rCGCON2 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x208))
|
||||
#define rCGCON3 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x20C))
|
||||
#define rCGCON4 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x210))
|
||||
#define rSWRCON (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x250))
|
||||
#define rRSTSR (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x254))
|
||||
#define rKEEPMAP (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x300))
|
||||
#define rVERSION (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0xA00))
|
||||
#define rMONITOR01 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x400))
|
||||
#define rMONITOR2 (*(volatile u_int32_t *)(CLKCON_BASE_ADDR + 0x404))
|
||||
|
||||
enum {
|
||||
CLKGEN_CLK_OSC = 0,
|
||||
CLKGEN_CLK_PLL0,
|
||||
CLKGEN_CLK_PLL1,
|
||||
CLKGEN_CLK_PLL2,
|
||||
CLKGEN_CLK_PLL3,
|
||||
CLKGEN_CLK_SCLK,
|
||||
CLKGEN_CLK_FCLK,
|
||||
CLKGEN_CLK_DCLK,
|
||||
CLKGEN_CLK_ACLK,
|
||||
CLKGEN_CLK_HCLK,
|
||||
CLKGEN_CLK_PCLK,
|
||||
CLKGEN_CLK_NCLK,
|
||||
CLKGEN_CLK_USBPHY,
|
||||
CLKGEN_CLK_VCLK0,
|
||||
CLKGEN_CLK_VCLK1,
|
||||
CLKGEN_CLK_COUNT
|
||||
};
|
||||
|
||||
|
||||
#endif /* ! __PLATFORM_SOC_CLOCKS_H */
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
#ifndef __PLATFORM_SOC_HWCLOCKS_H
|
||||
#define __PLATFORM_SOC_HWCLOCKS_H
|
||||
|
||||
#include <platform/clocks.h>
|
||||
|
||||
#if SUPPORT_FPGA
|
||||
#define OSC_FREQ (27000000UL)
|
||||
#else
|
||||
#define OSC_FREQ (24000000UL)
|
||||
#endif
|
||||
|
||||
#define CLK_FCLK (HWCLOCK_BASE+0)
|
||||
#define CLK_ACLK (HWCLOCK_BASE+1)
|
||||
#define CLK_HCLK (HWCLOCK_BASE+2)
|
||||
#define CLK_PCLK (HWCLOCK_BASE+3)
|
||||
#define CLK_VCLK0 (HWCLOCK_BASE+4)
|
||||
#define CLK_VCLK1 (HWCLOCK_BASE+5)
|
||||
#define CLK_MCLK (HWCLOCK_BASE+6)
|
||||
#define CLK_NCLK (HWCLOCK_BASE+7)
|
||||
#define CLK_USBPHYCLK (HWCLOCK_BASE+8)
|
||||
#define CLK_DCLK (HWCLOCK_BASE+9)
|
||||
|
||||
/* S5L8747X clock gate devices */
|
||||
enum {
|
||||
CLK_AES,
|
||||
CLK_CHIPID,
|
||||
CLK_DMAC0,
|
||||
CLK_DMAC1,
|
||||
CLK_GPIO,
|
||||
CLK_IIC0,
|
||||
CLK_IIC1,
|
||||
CLK_IIC2,
|
||||
CLK_PKE,
|
||||
CLK_SHA1,
|
||||
CLK_SPI0,
|
||||
CLK_SPI1,
|
||||
CLK_TIMER,
|
||||
CLK_UART0,
|
||||
CLK_UART1,
|
||||
CLK_UART2,
|
||||
CLK_USBOTG0,
|
||||
CLK_USBOTG1,
|
||||
CLK_USBPHY,
|
||||
CLK_ROSC,
|
||||
};
|
||||
|
||||
// USB PHY driver expects CLK_USBOTG, so give them what they want
|
||||
#define CLK_USBOTG CLK_USBOTG1
|
||||
|
||||
#endif /* ! __PLATFORM_SOC_HWCLOCKS_H */
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
#ifndef __PLATFORM_SOC_HWISR_H
|
||||
#define __PLATFORM_SOC_HWISR_H
|
||||
|
||||
#define EINT_G6 0 // External Interrupt 6
|
||||
#define EINT_G5 1 // External Interrupt 5
|
||||
#define EINT_G4 2 // External Interrupt 4
|
||||
#define EINT_G3 3 // External Interrupt 3
|
||||
#define INT_SWI 4 // SW Interrupt
|
||||
#define INT_CMMSTX 5 // COMMS TX Interrupt
|
||||
#define INT_CMMSRX 6 // COMMS RX Interrupt
|
||||
#define INT_TIMERFIQ 7 // TIMER FIQ Interrupt
|
||||
#define INT_TIMERIRQ 8 // TIMER IRQ Interrupt
|
||||
#define INT_SPI0 9 // SPI0 Interrupt
|
||||
#define INT_SPI1 10 // SPI1 Interrupt
|
||||
#define INT_RESERVED11 11 // Reserved
|
||||
#define INT_VP 12 // VP Interrupt
|
||||
#define INT_RGBOUT 13 // RGBOUT Interrupt
|
||||
#define INT_RESERVED14 14 // Reserved
|
||||
#define INT_RESERVED15 15 // Reserved
|
||||
#define INT_DMA0 16 // DMA0 Interrupt
|
||||
#define INT_DMA1 17 // DMA1 Interrupt
|
||||
#define INT_USB_OTG0 18 // USB OTG0 Interrupt
|
||||
#define INT_USB_OTG1 19 // USB OTG1 Interrupt
|
||||
#define INT_RESERVED20 20 // Reserved
|
||||
#define INT_IIC0 21 // IIC0 Interrupt
|
||||
#define INT_IIC1 22 // IIC1 Interrupt
|
||||
#define INT_IIC2 23 // IIC2 Interrupt
|
||||
#define INT_UART0 24 // UART0 Interrupt
|
||||
#define INT_UART1 25 // UART1 Interrupt
|
||||
#define INT_UART2 26 // UART2 Interrupt
|
||||
#define INT_RESERVED27 27 // Reserved
|
||||
#define INT_RESERVED28 28 // Reserved
|
||||
#define INT_RESERVED29 29 // Reserved
|
||||
#define INT_TVOUT 30 // TVOUT Interrupt
|
||||
#define EINT_G2 31 // External Interrupt 2
|
||||
#define EINT_G1 32 // External Interrupt 1
|
||||
#define EINT_G0 33 // External Interrupt 0
|
||||
#define INT_RESERED34 34 // Reserved
|
||||
#define INT_MFC_DEC 35 // MFC DEC Interrupt
|
||||
#define INT_PKE 36 // PKE Interrupt
|
||||
#define INT_SCALER 37 // SCALER Interrupt
|
||||
#define INT_MIXER 38 // MIXER Interrupt
|
||||
#define INT_AES 39 // AES Interrupt
|
||||
#define INT_SHA1 40 // SHA1 Interrupt
|
||||
#define INT_PRNG 41 // PRNG Interrupt
|
||||
#define INT_SHA2 42 // SHA2 Interrupt
|
||||
#define INT_RESERVED43 43 // Reserved
|
||||
#define INT_ADC 44 // ADC Interrupt
|
||||
#define INT_RESERVED45 45 // Reserved
|
||||
#define INT_I2S0 46 // I2S Interrupt
|
||||
#define INT_RESERVED47 47 // Reserved
|
||||
#define INT_RESERVED48 48 // Reserved
|
||||
#define INT_RESERVED49 49 // Reserved
|
||||
#define INT_SUSPEND 50 // SUSPEND Interrupt
|
||||
#define INT_WDT 51 // WDT Interrupt
|
||||
#define INT_SPDIF 52 // SPDIF Interrupt
|
||||
#define INT_RESERVED53 53 // Reserved
|
||||
#define INT_RESERVED54 54 // Reserved
|
||||
#define INT_RESERVED55 55 // Reserved
|
||||
#define INT_RESERVED56 56 // Reserved
|
||||
#define INT_RESERVED57 57 // Reserved
|
||||
#define INT_RESERVED58 58 // Reserved
|
||||
#define INT_HDMI_CEC 59 // HDMI CEC Interrupt
|
||||
#define INT_HDMI 60 // HDMI Interrupt
|
||||
#define INT_CLKRSTGEN 61 // CLKRSTGEN Interrupt
|
||||
#define INT_PMU 62 // PMU Interrupt
|
||||
#define INT_ARF 63 // ARF Interrupt
|
||||
|
||||
#endif /* ! __PLATFORM_SOC_HWISR_H */
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (C) 2011 - 2013 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_SOC_HWREGBASE_H
|
||||
#define __PLATFORM_SOC_HWREGBASE_H
|
||||
|
||||
#ifndef HWREG_REMAP
|
||||
# define HWREG_REMAP(_x) _x
|
||||
#endif
|
||||
|
||||
#define AIC_VERSION 0
|
||||
#define AIC_INT_COUNT (192)
|
||||
#define PMGR_WDG_VERSION 0
|
||||
|
||||
/* S5L8747X Reg Base Defs */
|
||||
|
||||
#define SHA1_BASE_ADDR HWREG_REMAP(0x38000000)
|
||||
|
||||
#define AHB_BASE_ADDR HWREG_REMAP(0x38100000)
|
||||
|
||||
#define DMAC0_BASE_ADDR HWREG_REMAP(0x38200000)
|
||||
#define DMAC1_BASE_ADDR HWREG_REMAP(0x38700000)
|
||||
|
||||
#define SHA2_BASE_ADDR HWREG_REMAP(0x38300000)
|
||||
|
||||
#define USBOTG0_BASE_ADDR HWREG_REMAP(0x38400000)
|
||||
#define USB_OHCI_BASE_ADDR HWREG_REMAP(0x38500000)
|
||||
#define USB_EHCI_BASE_ADDR HWREG_REMAP(0x39800000)
|
||||
#define USBOTG1_BASE_ADDR HWREG_REMAP(0x39900000)
|
||||
#define USBOTG_BASE_ADDR (USBOTG1_BASE_ADDR)
|
||||
#define USBPHY_BASE_ADDR HWREG_REMAP(0x3C400000)
|
||||
#define USBPHY_VERSION (1)
|
||||
|
||||
#define RGBOUT_BASE_ADDR HWREG_REMAP(0x38900000)
|
||||
|
||||
#define AES_BASE_ADDR HWREG_REMAP(0x38C00000)
|
||||
#define AES_VERSION (1)
|
||||
|
||||
#define VIC_BASE_ADDR HWREG_REMAP(0x38E00000)
|
||||
#define VIC_STRIDE (0x00001000)
|
||||
#define VICS_COUNT (2)
|
||||
|
||||
#define EDGEIC_BASE_ADDR HWREG_REMAP(0x38E02000)
|
||||
|
||||
#define SDO_BASE_ADDR HWREG_REMAP(0x39300000)
|
||||
|
||||
#define AAM_BASE_ADDR HWREG_REMAP(0x39700000)
|
||||
#define EINT_NUM_GROUPS (7)
|
||||
#define EINTS_PER_GROUP (32)
|
||||
|
||||
#define SPI0_BASE_ADDR HWREG_REMAP(0x3C300000)
|
||||
#define SPI1_BASE_ADDR HWREG_REMAP(0x3CE00000)
|
||||
#define SPI_VERSION (1)
|
||||
#define SPIS_COUNT (2)
|
||||
|
||||
#define CLKCON_BASE_ADDR HWREG_REMAP(0x3C500000)
|
||||
|
||||
#define IIC0_BASE_ADDR HWREG_REMAP(0x3C600000)
|
||||
#define IIC1_BASE_ADDR HWREG_REMAP(0x3E500000)
|
||||
#define IIC2_BASE_ADDR HWREG_REMAP(0x3E400000)
|
||||
#define IICS_COUNT (3)
|
||||
|
||||
#define TIMER_BASE_ADDR HWREG_REMAP(0x3C700000)
|
||||
#define TIMER_VERSION (1)
|
||||
|
||||
#define WDT_BASE_ADDR HWREG_REMAP(0x3C800000)
|
||||
|
||||
#define UART0_BASE_ADDR HWREG_REMAP(0x3CC00000)
|
||||
#define UART1_BASE_ADDR HWREG_REMAP(0x3DB00000)
|
||||
#define UART2_BASE_ADDR HWREG_REMAP(0x3DC00000)
|
||||
#define UART_VERSION (1)
|
||||
#define UARTS_COUNT (3)
|
||||
|
||||
#define GPIO_BASE_ADDR HWREG_REMAP(0x3CF00000)
|
||||
#define GPIO_FSEL_OFFSET (0x200)
|
||||
// There are 9 groups listed in the user manual, but the last 3
|
||||
// aren't actually implemented.
|
||||
#define GPIO_GROUP_COUNT (6)
|
||||
#define GPIO_PAD_SPI (GPIO_GROUP_COUNT)
|
||||
|
||||
#define PKE_BASE_ADDR HWREG_REMAP(0x3D000000)
|
||||
#define PKE_SW_RESET_AVAILABLE (1)
|
||||
|
||||
#define CHIPID_BASE_ADDR HWREG_REMAP(0x3D100000)
|
||||
|
||||
#define AXI_SPINE_BASE_ADDR HWREG_REMAP(0x3D500000)
|
||||
#define DREX_BASE_ADDR HWREG_REMAP(0x3D700000)
|
||||
|
||||
#define BUS_BASE_ADDR HWREG_REMAP(0x3E000000)
|
||||
|
||||
#define SRAM_MIU_BASE_ADDR HWREG_REMAP(0x3E100000)
|
||||
|
||||
#define HDMI_LINK_BASE_ADDR HWREG_REMAP(0x3E200000)
|
||||
#define DITHER_VERSION (1)
|
||||
|
||||
#define HDMI_CEC_BASE_ADDR HWREG_REMAP(0x3E300000)
|
||||
|
||||
#endif /* ! __PLATFORM_SOC_HWREGBASE_H */
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2007 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_SOC_MIU_H
|
||||
#define __PLATFORM_SOC_MIU_H
|
||||
|
||||
#include <platform/soc/hwregbase.h>
|
||||
|
||||
#define rAHB_MST0 (*(volatile u_int32_t *)(AHB_BASE_ADDR + 0x004))
|
||||
#define rAHB2AXIID_CON (*(volatile u_int32_t *)(AHB_BASE_ADDR + 0x040))
|
||||
#define rAHB2AXIID0 (*(volatile u_int32_t *)(AHB_BASE_ADDR + 0x044))
|
||||
#define rAHB2AXIID1 (*(volatile u_int32_t *)(AHB_BASE_ADDR + 0x048))
|
||||
#define rAHB2AXIID2 (*(volatile u_int32_t *)(AHB_BASE_ADDR + 0x04C))
|
||||
#define rAHB2AXIID3 (*(volatile u_int32_t *)(AHB_BASE_ADDR + 0x050))
|
||||
#define rAHB2AXIID4 (*(volatile u_int32_t *)(AHB_BASE_ADDR + 0x054))
|
||||
#define rLEVEL1SEL (*(volatile u_int32_t *)(AHB_BASE_ADDR + 0x090))
|
||||
|
||||
#define rPWRDWN_BUS (*(volatile u_int32_t *)(BUS_BASE_ADDR + 0x008))
|
||||
#define rREMAP (*(volatile u_int32_t *)(BUS_BASE_ADDR + 0x00C))
|
||||
#define rDDR1 (*(volatile u_int32_t *)(BUS_BASE_ADDR + 0x010))
|
||||
#define rMFC_ARF_CON (*(volatile u_int32_t *)(BUS_BASE_ADDR + 0x3000))
|
||||
#define rMFC_ARF_BASE_ADDR (*(volatile u_int32_t *)(BUS_BASE_ADDR + 0x3004))
|
||||
#define rMFC_ARF_ADDR_MASK (*(volatile u_int32_t *)(BUS_BASE_ADDR + 0x3008))
|
||||
|
||||
enum remap_select {
|
||||
REMAP_SRAM = 0,
|
||||
REMAP_SDRAM
|
||||
};
|
||||
|
||||
extern void miu_select_remap(enum remap_select sel);
|
||||
|
||||
#endif /* ! __PLATFORM_SOC_MIU_H */
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2007 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_SOC_POWER_H
|
||||
#define __PLATFORM_SOC_POWER_H
|
||||
|
||||
#include <platform/soc/hwregbase.h>
|
||||
|
||||
#define rPWRCONF (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x000))
|
||||
#define rPWRCMD (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x004))
|
||||
#define rOSCCNT (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x038))
|
||||
#define rPLLCNT (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x03C))
|
||||
#define rSTATESAVE0 (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x044))
|
||||
#define rSTATESAVE1 (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x048))
|
||||
#define rSTATESAVE2 (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x04C))
|
||||
#define rSTATESAVE3 (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x050))
|
||||
#define rTMCMD (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x06C))
|
||||
#define rTMDATA (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x070))
|
||||
#define rTMPRE (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x074))
|
||||
#define rTMCNT (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x078))
|
||||
#define rTMALARM (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x07C))
|
||||
#define rSECCONF (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x104))
|
||||
#define rVERSION (*(volatile u_int32_t *)(AAM_BASE_ADDR + 0x108))
|
||||
|
||||
#endif /* ! __PLATFORM_SOC_POWER_H */
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2008 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_SOC_SDO_H
|
||||
#define __PLATFORM_SOC_SDO_H
|
||||
|
||||
#include <platform/soc/hwregbase.h>
|
||||
|
||||
#define rDAC0_SCALE (*(volatile u_int32_t *)(SDO_BASE_ADDR + 0x1C))
|
||||
#define rDAC1_SCALE (*(volatile u_int32_t *)(SDO_BASE_ADDR + 0x20))
|
||||
#define rDAC2_SCALE (*(volatile u_int32_t *)(SDO_BASE_ADDR + 0x24))
|
||||
|
||||
extern int sdo_init(void);
|
||||
|
||||
#endif /* ! __PLATFORM_SOC_SDO_H */
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
#ifndef __PLATFORM_TRAMPOLINE_H
|
||||
#define __PLATFORM_TRAMPOLINE_H
|
||||
|
||||
#include <platform/memmap.h>
|
||||
#include <platform/soc/hwregbase.h>
|
||||
|
||||
#define SECURITY_REG (AAM_BASE_ADDR + 0x104)
|
||||
#define ROM_READ_DISABLE (1 << 2)
|
||||
|
||||
#endif /* ! __PLATFORM_TRAMPOLINE_H */
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2007-2009 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Inc.
|
||||
* It is considered confidential and proprietary.
|
||||
*
|
||||
* This document may not be reproduced or transmitted in any form,
|
||||
* in whole or in part, without the express written permission of
|
||||
* Apple Inc.
|
||||
*/
|
||||
#ifndef __PLATFORM_USBCONFIG_H
|
||||
#define __PLATFORM_USBCONFIG_H
|
||||
|
||||
#define USBPHY_CLK_TYPE (2) /* Use CLKCORE */
|
||||
|
||||
#define USBPHY_UOTGTUNE1 (0x347)
|
||||
#define USBPHY_UOTGTUNE2 (0xE3F)
|
||||
|
||||
#define USBOTG_AHB_DMA_BURST (DWCUSB_GAHBCFG_HBST_SINGLE)
|
||||
|
||||
#endif /* ! __PLATFORM_USBCONFIG_H */
|
||||
Reference in new issue
Block a user