first and last commit
This commit is contained in:
commit
1bf4efd552
2612 files changed
+636500
No files matched your search
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Computer, 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 __TARGET_ADBE_SETTINGS_H
|
||||
#define __TARGET_ADBE_SETTINGS_H
|
||||
|
||||
static struct adbe_v1_tuneable adbe_tuneables[] = {
|
||||
{
|
||||
.name = "default",
|
||||
.adbe0_vblank_pos_vbi_pulse = 0x0000,
|
||||
.adbe0_vblank_clk_gate_wakeup = 0x0000,
|
||||
.adbe0_vblank_clk_gate_idle = 0x0001,
|
||||
.adbe0_vblank_blk_idle_dpb = 0x0000,
|
||||
.adbe0_vblank_blk_idle_aap = 0x0000,
|
||||
.adbe0_tunable_mode_ctrl = (DBEMODECNTL_DYN_CLK_GATE_ENABLE | DBEMODECNTL_AFC_TEARDOWN_ENABLE | DBEMODECNTL_PMGR_CLK_GATE_ENABL| DBEMODECNTL_BLK_CLK_GATE_ENABLE),
|
||||
.adbe0_aap_support = 1,
|
||||
},
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The amc_param struct is defined in drivers/apple/amc/amc.h, and this
|
||||
* file should only by included from amc.c.
|
||||
*/
|
||||
|
||||
#define AMC_PARAMS_AP_DEV (1)
|
||||
|
||||
static const struct amc_param amc_params_dev = {
|
||||
.flags = (FLAG_AMC_PARAM_BUSTAT23),
|
||||
|
||||
.tREFi = 0x11,
|
||||
.longsrcnt = 0x2008,
|
||||
.srextrarefcnt = 0x00020000,
|
||||
.rdlat = 4,
|
||||
.wrlat = 2,
|
||||
.phyrdlat = 10,
|
||||
.phywrlat = 1,
|
||||
.pdn = 0x22000203,
|
||||
.read = 0x00000101,
|
||||
.bustat = 0x0022221b,
|
||||
.bustat2 = 0x0022221b,
|
||||
.derate = 0x04110111,
|
||||
.mcphyupdate = 0x05030000,
|
||||
.autoref_params = 0x00000021,
|
||||
.pwrmngtparam_small = 0x00011000,
|
||||
.pwrmngtparam_guided = 0x01801000,
|
||||
.chnldec = 0x00050000,
|
||||
.arefparam = 0x0c00a000,
|
||||
.aref_freq0 = 0x00000110,
|
||||
.schen_default = 0x00000110,
|
||||
.mr1 = 0x44,
|
||||
.mr2 = 0x1a,
|
||||
.pwrmngten_default = 0x00100000,
|
||||
|
||||
.freq = {
|
||||
{ // 522MHz
|
||||
.cas = 0x00000203,
|
||||
.pch = 0x00020303,
|
||||
.act = 0x08020303,
|
||||
.autoref = 0x01020000,
|
||||
.selfref = 0x00002030,
|
||||
.modereg = 0x00010772,
|
||||
.mifcassch = 0x001f0110,
|
||||
},
|
||||
{ // 400MHz
|
||||
.cas = 0x00000003,
|
||||
.pch = 0x00000003,
|
||||
.act = 0x08020303,
|
||||
.autoref = 0x01020000,
|
||||
.selfref = 0x00002000,
|
||||
.modereg = 0x00010000,
|
||||
.mifcassch = 0x00000000,
|
||||
},
|
||||
{ // 200MHz
|
||||
.cas = 0x00000003,
|
||||
.pch = 0x00000003,
|
||||
.act = 0x08020303,
|
||||
.autoref = 0x01020000,
|
||||
.selfref = 0x00002000,
|
||||
.modereg = 0x00010000,
|
||||
.mifcassch = 0x00000000,
|
||||
},
|
||||
{ // 50 & 24MHz
|
||||
.cas = 0x00000003,
|
||||
.pch = 0x00000003,
|
||||
.act = 0x08020303,
|
||||
.autoref = 0x01020000,
|
||||
.selfref = 0x00002000,
|
||||
.modereg = 0x00010000,
|
||||
.mifcassch = 0x00000000,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static const struct amc_param amc_params_ap = {
|
||||
.flags = (FLAG_AMC_PARAM_BUSTAT23 | FLAG_AMC_PARAM_SLOW_BOOT),
|
||||
|
||||
.tREFi = 0x5d,
|
||||
.longsrcnt = 0x2008,
|
||||
.srextrarefcnt = 0x00020000,
|
||||
.rdlat = 6,
|
||||
.wrlat = 3,
|
||||
.phyrdlat = 10,
|
||||
.phywrlat = 2,
|
||||
.pdn = 0x22000403,
|
||||
.read = 0x00000203,
|
||||
.bustat = 0x0022221b,
|
||||
.bustat2 = 0x0022221b,
|
||||
.derate = 0x2483135b,
|
||||
.mcphyupdate = 0x05030000,
|
||||
.autoref_params = 0x00000021,
|
||||
.pwrmngtparam_small = 0x00011000,
|
||||
.pwrmngtparam_guided = 0x01801000,
|
||||
.chnldec = 0x00050000,
|
||||
.arefparam = 0x0c00a000,
|
||||
.aref_freq0 = 0x00000110,
|
||||
.schen_default = 0x00000110,
|
||||
.mr1 = 0x44,
|
||||
.mr2 = 0x1a,
|
||||
.pwrmngten_default = 0x00100000,
|
||||
|
||||
.freq = {
|
||||
{ // 522MHz
|
||||
.cas = 0x00000308,
|
||||
.pch = 0x00030612,
|
||||
.act = 0x14040908,
|
||||
.autoref = 0x19350000,
|
||||
.selfref = 0x00039060,
|
||||
.modereg = 0x40250772,
|
||||
.mifcassch = 0x001f0110,
|
||||
},
|
||||
{ // 400MHz
|
||||
.cas = 0x00000005,
|
||||
.pch = 0x00000009,
|
||||
.act = 0x0a020505,
|
||||
.autoref = 0x0d1b0000,
|
||||
.selfref = 0x0001d000,
|
||||
.modereg = 0x00130000,
|
||||
.mifcassch = 0x00000000,
|
||||
},
|
||||
{ // 200MHz
|
||||
.cas = 0x00000003,
|
||||
.pch = 0x00000005,
|
||||
.act = 0x08020303,
|
||||
.autoref = 0x070e0000,
|
||||
.selfref = 0x0000f000,
|
||||
.modereg = 0x000a0000,
|
||||
.mifcassch = 0x00000000,
|
||||
},
|
||||
{ // 50
|
||||
.cas = 0x00000003,
|
||||
.pch = 0x00000003,
|
||||
.act = 0x08020303,
|
||||
.autoref = 0x02040000,
|
||||
.selfref = 0x00004000,
|
||||
.modereg = 0x00030000,
|
||||
.mifcassch = 0x00000000,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static const struct amc_tunable amc_tunables[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The amc_param struct is defined in drivers/apple/amp/amp.h, and this
|
||||
* file should only by included from that amp.c.
|
||||
*/
|
||||
|
||||
static struct amp_params amc_phy_params = {
|
||||
.freq = {
|
||||
{
|
||||
.caoutdllscl = 0x00000008,
|
||||
.dqsindllscl = 0x00000008,
|
||||
.rdcapcfg = 0x0002040a
|
||||
},
|
||||
{
|
||||
.caoutdllscl = 0x00000010,
|
||||
.dqsindllscl = 0x00000010,
|
||||
.rdcapcfg = 0x20020308
|
||||
},
|
||||
{
|
||||
.caoutdllscl = 0x00000020,
|
||||
.dqsindllscl = 0x00000020,
|
||||
.rdcapcfg = 0x40020308
|
||||
},
|
||||
{
|
||||
.caoutdllscl = 0x0000003f,
|
||||
.dqsindllscl = 0x0000003f,
|
||||
.rdcapcfg = 0x60020308
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Computer, 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 __TARGET_ASPNANDCONFIG_H
|
||||
#define __TARGET_ASPNANDCONFIG_H
|
||||
|
||||
//MLC devices
|
||||
#define ASPNAND_MLC_WRITE_DIES_IN_PARALLEL 4
|
||||
#define ASPNAND_SLC_WRITE_DIES_IN_PARALLEL 2
|
||||
#define ASPNAND_ERASE_DIES_IN_PARALLEL 4
|
||||
#define ASPNAND_READ_DIES_IN_PARALLEL 4
|
||||
#define ASPNAND_MLC_WRITE_LOW_POWER_DIES_IN_PARALLEL 2
|
||||
#define ASPNAND_SLC_WRITE_LOW_POWER_DIES_IN_PARALLEL 2
|
||||
#define ASPNAND_ERASE_LOW_POWER_DIES_IN_PARALLEL 2
|
||||
#define ASPNAND_READ_LOW_POWER_DIES_IN_PARALLEL 2
|
||||
|
||||
//TLC devices
|
||||
#define ASPNAND_TLC_TLC_WRITE_DIES_IN_PARALLEL 8
|
||||
#define ASPNAND_TLC_SLC_WRITE_DIES_IN_PARALLEL 8
|
||||
#define ASPNAND_TLC_ERASE_DIES_IN_PARALLEL 2
|
||||
#define ASPNAND_TLC_READ_DIES_IN_PARALLEL 8
|
||||
#define ASPNAND_TLC_TLC_WRITE_LOW_POWER_DIES_IN_PARALLEL 2
|
||||
#define ASPNAND_TLC_SLC_WRITE_LOW_POWER_DIES_IN_PARALLEL 2
|
||||
#define ASPNAND_TLC_ERASE_LOW_POWER_DIES_IN_PARALLEL 2
|
||||
#define ASPNAND_TLC_READ_LOW_POWER_DIES_IN_PARALLEL 2
|
||||
|
||||
// rdar://problem/18371949 - these values should be the same for post-OkemoTaos targets
|
||||
#define ASPNAND_INDIRECTION_MEMORY (2*1024*1024)
|
||||
#define ASPNAND_LEGACY_INDIRECTION_MEMORY (2*1024*1024)
|
||||
|
||||
#endif
|
||||
@@ -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 __TARGET_GPIODEF_H
|
||||
#define __TARGET_GPIODEF_H
|
||||
|
||||
/* Cyclonic specific gpio -> pin mappings */
|
||||
|
||||
#include <platform/gpio.h>
|
||||
|
||||
/* define target-specific gpios in a generic fashion here. */
|
||||
|
||||
#endif /* ! __TARGET_GPIODEF_H */
|
||||
@@ -0,0 +1,153 @@
|
||||
|
||||
// Copyright (C) 2008-2010 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.
|
||||
//
|
||||
// NOTE: This is a generated file and should not be hand-edited!
|
||||
//
|
||||
|
||||
// =============================================================================
|
||||
// Nand Geometry Table
|
||||
|
||||
static NandGeometry _nandGeometryTable[] =
|
||||
{
|
||||
{
|
||||
/* chipId */ { 0x98, 0xE7, 0x94, 0x32 },
|
||||
/* blocksPerCS */ 4100,
|
||||
/* pagesPerBlock */ 128,
|
||||
/* dataBytesPerPage */ 8192,
|
||||
/* spareBytesPerPage */ 448,
|
||||
/* eccPer512Bytes */ 16,
|
||||
/* initialBBType */ INIT_BBT_TOSHIBA_MLC,
|
||||
/* diesPerCS */ 1
|
||||
}
|
||||
};
|
||||
|
||||
// =============================================================================
|
||||
// Nand Timing Table
|
||||
|
||||
static NandTiming _nandTimingTable[] =
|
||||
{
|
||||
{
|
||||
/* configId */
|
||||
{
|
||||
/* connectedBusCnt */ 2,
|
||||
/* packageCnt */ 1,
|
||||
/* packageIds[] */
|
||||
{
|
||||
{
|
||||
/* chipId */ { 0x98, 0xE7, 0x94, 0x32 },
|
||||
/* ceCnt */ 2
|
||||
}
|
||||
}
|
||||
},
|
||||
/* writeCycleNanosecs */ 25,
|
||||
/* writeSetupNanosecs */ 12,
|
||||
/* writeHoldNanosecs */ 10,
|
||||
/* readCycleNanosecs */ 25,
|
||||
/* readSetupNanosecs */ 12,
|
||||
/* readHoldNanosecs */ 10,
|
||||
/* readDelayNanosecs */ 20,
|
||||
/* readValidNanosecs */ 25
|
||||
}
|
||||
};
|
||||
|
||||
#if (defined (AND_ENABLE_NAND_DESCRIPTION_TEXT) || AND_ENABLE_NAND_DESCRIPTION_TEXT)
|
||||
// =============================================================================
|
||||
// NandChipId Description
|
||||
const NandChipIdDescription _nandChipIdDescriptionTable[] =
|
||||
{
|
||||
{
|
||||
/* chipId */ { 0x98, 0xE7, 0x94, 0x32 },
|
||||
/* die */ "32nm",
|
||||
/* vendor_name */ "Toshiba"
|
||||
}
|
||||
};
|
||||
|
||||
// =============================================================================
|
||||
// Nand Description Table
|
||||
|
||||
static const NandDescription _nandDescriptionTable[] =
|
||||
{
|
||||
{
|
||||
/* packageId */
|
||||
{
|
||||
/* chipId */ { 0x98, 0xE7, 0x94, 0x32 },
|
||||
/* ceCnt */ 2
|
||||
},
|
||||
/* appleName */ "335S0700",
|
||||
/* vendor_part_num */ "TH58NVG6D2FLA49",
|
||||
/* package_type */ "DDP",
|
||||
/* package_size */ "1.00mm LGA"
|
||||
}
|
||||
};
|
||||
const UInt32 _nandDescriptionTableSize = sizeof(_nandDescriptionTable) / sizeof(NandDescription);
|
||||
|
||||
#endif // (defined(AND_ENABLE_NAND_DESCRIPTION_TEXT) || AND_ENABLE_NAND_DESCRIPTION_TEXT)
|
||||
|
||||
// =============================================================================
|
||||
// Nand Board Support Table
|
||||
|
||||
static NandBoardSupport _nandBoardSupportTable[] =
|
||||
{
|
||||
{
|
||||
/* configId */
|
||||
{
|
||||
/* connectedBusCnt */ 2,
|
||||
/* packageCnt */ 1,
|
||||
/* packageIds[] */
|
||||
{
|
||||
{
|
||||
/* deviceId */ { 0x98, 0xE7, 0x94, 0x32 },
|
||||
/* ceCnt */ 2
|
||||
}
|
||||
}
|
||||
},
|
||||
/* vsType */ FIL_VS_TOSHIBA_2P_EXT
|
||||
}
|
||||
};
|
||||
|
||||
// =============================================================================
|
||||
// Nand Board Timing Table
|
||||
|
||||
static NandBoardInfo _nandBoardInfo =
|
||||
{
|
||||
/* controlDstr */ NAND_DRIVE_STRENGTH_DEFAULT,
|
||||
/* dataDstr */ NAND_DRIVE_STRENGTH_DEFAULT,
|
||||
/* chipEnableDstr */ NAND_DRIVE_STRENGTH_DEFAULT,
|
||||
|
||||
/* socToNandRiseNanosecs */ 10,
|
||||
/* socToNandFallNanosecs */ 10,
|
||||
/* nandToSocRiseNanosecs */ 10,
|
||||
/* nandToSocFallNanosecs */ 10,
|
||||
|
||||
/* landing map */
|
||||
{
|
||||
0x00000303
|
||||
},
|
||||
|
||||
/* useToggleMode */ 0,
|
||||
/* useDiffDQSMode */ 0,
|
||||
/* useDiffREMode */ 0,
|
||||
/* useVref */ 0
|
||||
};
|
||||
|
||||
static NandFormat _nandFormatPpn =
|
||||
{
|
||||
/* metaPerLogicalPage */ 16,
|
||||
/* validMetaPerLogicalPage */ 16,
|
||||
/* logicalPageSize */ 0
|
||||
};
|
||||
|
||||
static NandFormat _nandFormatRaw =
|
||||
{
|
||||
/* metaPerLogicalPage */ 12,
|
||||
/* validMetaPerLogicalPage */ 10,
|
||||
/* logicalPageSize */ 0
|
||||
};
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Apple Inc. All rights reserved.
|
||||
*
|
||||
* This document is the property of Apple Computer, 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 __TARGET_POWERCONFIG_H
|
||||
#define __TARGET_POWERCONFIG_H
|
||||
|
||||
// Minimal definitions to make lib/power.c happy
|
||||
#define TARGET_POWER_NO_BATTERY 1
|
||||
#define PRECHARGE_BACKLIGHT_LEVEL 824
|
||||
#define ALWAYS_BOOT_BATTERY_VOLTAGE (5000)
|
||||
|
||||
// This fake SoC block takes the place of the external PMU in Fastsim
|
||||
#define SWIFTER_PMU_BASE 0x20F050000
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* 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 __TARGET_UARTCONFIG_H
|
||||
#define __TARGET_UARTCONFIG_H
|
||||
|
||||
/* define two debug serial ports */
|
||||
#define DEBUG_SERIAL_PORT (0)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
* Copyright (C) 2011-2015 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.
|
||||
*/
|
||||
#include <debug.h>
|
||||
#include <drivers/flash_nor.h>
|
||||
#include <lib/devicetree.h>
|
||||
#include <lib/env.h>
|
||||
#include <lib/mib.h>
|
||||
#include <platform.h>
|
||||
#include <platform/gpiodef.h>
|
||||
#include <platform/memmap.h>
|
||||
#include <sys.h>
|
||||
#include <sys/menu.h>
|
||||
#include <sys/task.h>
|
||||
#include <target.h>
|
||||
|
||||
MIB_CONSTANT(kMIBTargetOsPictureScale, kOIDTypeUInt32, 2);
|
||||
MIB_CONSTANT(kMIBTargetPictureRotate, kOIDTypeInt32, 0);
|
||||
uint32_t display_config;
|
||||
|
||||
void target_early_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
void target_late_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
void target_init(void)
|
||||
{
|
||||
#if WITH_HW_FLASH_NOR
|
||||
flash_nor_init(SPI_NOR0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void target_quiesce_hardware(void)
|
||||
{
|
||||
}
|
||||
|
||||
void target_poweroff(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int target_bootprep(enum boot_target target)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool target_should_recover(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool target_should_poweron(bool *cold_button_boot)
|
||||
{
|
||||
*cold_button_boot = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool target_should_poweroff(bool at_boot)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !PRODUCT_LLB
|
||||
bool target_get_property(enum target_property prop, void *data, int maxdata, int *retlen)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
void * target_get_display_configuration(void)
|
||||
{
|
||||
|
||||
display_config = 0x00000da2;
|
||||
return ((void *)(&display_config));
|
||||
}
|
||||
|
||||
#if WITH_ENV
|
||||
|
||||
void target_setup_default_environment(void)
|
||||
{
|
||||
env_set("boot-args", "debug=0x14e serial=3 amfi=0x83 cs_enforcement_disable=1 fips_mode=0 -disable_aslr", ENV_PERSISTENT);
|
||||
env_set("boot-device", "asp_nand", 0);
|
||||
env_set("display-color-space","RGB888", 0);
|
||||
env_set("display-timing", "n51", 0);
|
||||
env_set("idle-off", "false", 0);
|
||||
env_set("kaslr-slide", "0x10000000", 0);
|
||||
env_set("wifiaddr", "12:22:33:44:55:66", 0);
|
||||
env_set("ethaddr", "12:22:33:44:55:77", 0);
|
||||
env_set("btaddr", "00:00:00:00:00:00", 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if WITH_DEVICETREE
|
||||
|
||||
#define ROOT_DTPATH ""
|
||||
int target_update_device_tree(void)
|
||||
{
|
||||
DTNode *node;
|
||||
uint32_t propSize;
|
||||
char *propName;
|
||||
void *propData;
|
||||
|
||||
// Overwrite the serial-number with data from the simplertc fastsim model
|
||||
if (FindNode(0, ROOT_DTPATH, &node)) {
|
||||
propName = "serial-number";
|
||||
if (FindProperty(node, &propName, &propData, &propSize)) {
|
||||
if (propSize != 0x20) {
|
||||
dprintf(DEBUG_CRITICAL, "serial-number property size 0x%x (expected 0x20)\n", propSize);
|
||||
return -1;
|
||||
}
|
||||
uint64_t *serial = (uint64_t *)propData;
|
||||
serial[0] = *(volatile uint64_t *)0x20f050040;
|
||||
serial[1] = *(volatile uint64_t *)0x20f050048;
|
||||
serial[2] = *(volatile uint64_t *)0x20f050050;
|
||||
serial[3] = *(volatile uint64_t *)0x20f050058;
|
||||
}
|
||||
}
|
||||
|
||||
// Overwrite the region-info with data from the simplertc fastsim model
|
||||
if (FindNode(0, ROOT_DTPATH, &node)) {
|
||||
propName = "region-info";
|
||||
if (FindProperty(node, &propName, &propData, &propSize)) {
|
||||
if (propSize != 0x20) {
|
||||
dprintf(DEBUG_CRITICAL, "region-info property size 0x%x (expected 0x20)\n", propSize);
|
||||
return -1;
|
||||
}
|
||||
uint64_t *region = (uint64_t *)propData;
|
||||
region[0] = *(volatile uint64_t *)0x20f050060;
|
||||
region[1] = *(volatile uint64_t *)0x20f050068;
|
||||
region[2] = *(volatile uint64_t *)0x20f050070;
|
||||
region[3] = *(volatile uint64_t *)0x20f050078;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if !WITH_HW_POWER
|
||||
|
||||
bool power_needs_precharge(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void power_cancel_buttonwait(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool power_do_chargetrap(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool power_is_suspended(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void power_will_resume(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool power_has_usb(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int power_read_dock_id(unsigned *id)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool power_get_diags_dock(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
u_int32_t power_get_boot_battery_level(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int power_get_nvram(u_int8_t key, u_int8_t *data)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int power_set_nvram(u_int8_t key, u_int8_t data)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int power_set_soc_voltage(unsigned mv, int override)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool force_usb_power = false;
|
||||
|
||||
void power_set_usb_state(bool configured, bool suspended)
|
||||
{
|
||||
}
|
||||
|
||||
int power_backlight_enable(u_int32_t backlight_level)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* ! WITH_HW_POWER */
|
||||
@@ -0,0 +1,272 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
#include <drivers/apple/gpio.h>
|
||||
#include <platform/soc/hwregbase.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* Pin configuration for FPGA */
|
||||
|
||||
static const uint32_t gpio_default_cfg[GPIO_GROUP_COUNT * GPIOPADPINS] = {
|
||||
/* Port 0 */
|
||||
CFG_DISABLED, // TST_CLKOUT ->
|
||||
CFG_DISABLED, // WDOG ->
|
||||
CFG_IN, // GPIO0 -> MENU_KEY (REQUEST_DFU2)
|
||||
CFG_IN, // GPIO1 -> HOLD_KEY (REQUEST_DFU1)
|
||||
CFG_DISABLED, // GPIO2 ->
|
||||
CFG_DISABLED, // GPIO3 ->
|
||||
CFG_DISABLED, // GPIO4 ->
|
||||
CFG_DISABLED, // GPIO5 ->
|
||||
|
||||
/* Port 1 */
|
||||
CFG_DISABLED, // GPIO6 ->
|
||||
CFG_DISABLED, // GPIO7 ->
|
||||
CFG_DISABLED, // GPIO8 ->
|
||||
CFG_DISABLED, // GPIO9 ->
|
||||
CFG_DISABLED, // GPIO10 ->
|
||||
CFG_DISABLED, // GPIO11 ->
|
||||
CFG_DISABLED, // GPIO12 ->
|
||||
CFG_DISABLED, // GPIO13 ->
|
||||
|
||||
/* Port 2 */
|
||||
CFG_DISABLED, // GPIO14 ->
|
||||
CFG_DISABLED, // GPIO15 ->
|
||||
CFG_DISABLED, // GPIO16 -> BOARD_ID[3]
|
||||
CFG_DISABLED, // GPIO17 ->
|
||||
CFG_DISABLED, // GPIO18 -> BOOT_CONFIG[0]
|
||||
CFG_DISABLED, // GPIO19 ->
|
||||
CFG_DISABLED, // GPIO20 ->
|
||||
CFG_DISABLED, // GPIO21 ->
|
||||
|
||||
/* Port 3 */
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 4 */
|
||||
CFG_DISABLED, // UART1_TXD ->
|
||||
CFG_DISABLED, // UART1_RXD ->
|
||||
CFG_DISABLED, // UART1_RTSN ->
|
||||
CFG_DISABLED, // UART1_CTSN ->
|
||||
CFG_DISABLED, // UART2_TXD ->
|
||||
CFG_DISABLED, // UART2_RXD ->
|
||||
CFG_DISABLED, // UART2_RTSN ->
|
||||
CFG_DISABLED, // UART2_CTSN ->
|
||||
|
||||
/* Port 5 */
|
||||
CFG_DISABLED, // UART3_TXD ->
|
||||
CFG_DISABLED, // UART3_RXD ->
|
||||
CFG_DISABLED, // UART3_RTSN ->
|
||||
CFG_DISABLED, // UART3_CTSN ->
|
||||
CFG_DISABLED, // UART5_RXD ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 6 */
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 7 */
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 8 */
|
||||
CFG_DISABLED, // UART4_TXD ->
|
||||
CFG_DISABLED, // UART4_RXD ->
|
||||
CFG_DISABLED, // UART4_RTSN ->
|
||||
CFG_DISABLED, // UART4_CTSN ->
|
||||
CFG_DISABLED, // SPI1_SCLK ->
|
||||
CFG_DISABLED, // SPI1_MOSI ->
|
||||
CFG_DISABLED, // SPI1_MISO ->
|
||||
CFG_DISABLED, // SPI1_SSIN ->
|
||||
|
||||
/* Port 9 */
|
||||
CFG_FUNC0, // SPI0_SCLK -> SPI0_SCLK/BOARD_ID[0]
|
||||
CFG_FUNC0, // SPI0_MOSI -> SPI0_MOSI/BOARD_ID[1]
|
||||
CFG_FUNC0, // SPI0_MISO -> SPI0_MISO/BOARD_ID[2]
|
||||
CFG_OUT_1, // SPI0_SSIN ->
|
||||
CFG_DISABLED, // SPI2_SCLK ->
|
||||
CFG_DISABLED, // SPI2_MOSI ->
|
||||
CFG_DISABLED, // SPI2_MISO ->
|
||||
CFG_DISABLED, // SPI2_SSIN ->
|
||||
|
||||
/* Port 10 */
|
||||
CFG_DISABLED, // I2C0_SDA ->
|
||||
CFG_DISABLED, // I2C0_SCL ->
|
||||
CFG_DISABLED, // I2C1_SDA ->
|
||||
CFG_DISABLED, // I2C1_SCL ->
|
||||
CFG_DISABLED, // ISP0_SDA ->
|
||||
CFG_DISABLED, // ISP0_SCL ->
|
||||
CFG_DISABLED, // ISP1_SDA ->
|
||||
CFG_DISABLED, // ISP1_SCL ->
|
||||
|
||||
/* Port 11 */
|
||||
CFG_DISABLED, // SENSOR0_RST ->
|
||||
CFG_DISABLED, // SENSOR0_CLK ->
|
||||
CFG_DISABLED, // SENSOR0_XSHUTDOWN ->
|
||||
CFG_DISABLED, // SENSOR0_ISTRB ->
|
||||
CFG_DISABLED, // SENSOR1_RST ->
|
||||
CFG_DISABLED, // SENSOR1_CLK ->
|
||||
CFG_DISABLED, // SENSOR1_XSHUTDOWN ->
|
||||
CFG_DISABLED, // SENSOR1_ISTRB ->
|
||||
|
||||
/* Port 12 */
|
||||
CFG_DISABLED, // SPI3_MOSI ->
|
||||
CFG_DISABLED, // SPI3_MISO ->
|
||||
CFG_DISABLED, // SPI3_SCLK ->
|
||||
CFG_DISABLED, // SPI3_SSIN ->
|
||||
CFG_DISABLED, // I2C2_SDA ->
|
||||
CFG_DISABLED, // I2C2_SCL ->
|
||||
CFG_DISABLED, // GPIO22 ->
|
||||
CFG_DISABLED, // GPIO23 ->
|
||||
|
||||
/* Port 13 */
|
||||
CFG_DISABLED, // GPIO24 ->
|
||||
CFG_DISABLED, // GPIO25 -> BOOT_CONFIG[1]
|
||||
CFG_IN, // GPIO26 -> FORCE_DFU
|
||||
CFG_DISABLED, // GPIO27 -> DFU_STATUS
|
||||
CFG_DISABLED, // GPIO28 -> BOOT_CONFIG[2]
|
||||
CFG_DISABLED, // GPIO29 -> BOOT_CONFIG[3]
|
||||
CFG_DISABLED, // GPIO30 ->
|
||||
CFG_DISABLED, // GPIO31 ->
|
||||
|
||||
/* Port 14 */
|
||||
CFG_DISABLED, // GPIO32 ->
|
||||
CFG_DISABLED, // GPIO33 ->
|
||||
CFG_DISABLED, // GPIO34 ->
|
||||
CFG_DISABLED, // GPIO35 ->
|
||||
CFG_DISABLED, // GPIO36 ->
|
||||
CFG_DISABLED, // GPIO37 ->
|
||||
CFG_DISABLED, // GPIO38 ->
|
||||
CFG_DISABLED, // GPIO39 ->
|
||||
|
||||
/* Port 15 */
|
||||
CFG_DISABLED, // SOCHOT0 ->
|
||||
CFG_DISABLED, // SOCHOT1 ->
|
||||
CFG_FUNC0, // UART0_TXD ->
|
||||
CFG_FUNC0, // UART0_RXD ->
|
||||
CFG_DISABLED, // DWI_DI ->
|
||||
CFG_DISABLED, // DWI_D0 ->
|
||||
CFG_DISABLED, // DWI_CLK ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 16 */
|
||||
CFG_DISABLED, // I2S0_LRCK ->
|
||||
CFG_DISABLED, // I2S0_BCLK ->
|
||||
CFG_DISABLED, // I2S0_DOUT ->
|
||||
CFG_DISABLED, // I2S0_DIN ->
|
||||
CFG_DISABLED, // I2S1_MCK ->
|
||||
CFG_DISABLED, // I2S1_LRCK ->
|
||||
CFG_DISABLED, // I2S1_BCLK ->
|
||||
CFG_DISABLED, // I2S1_DOUT ->
|
||||
|
||||
/* Port 17 */
|
||||
CFG_DISABLED, // I2S1_DIN ->
|
||||
CFG_DISABLED, // I2S2_LRCK ->
|
||||
CFG_DISABLED, // I2S2_BCLK ->
|
||||
CFG_DISABLED, // I2S2_DOUT ->
|
||||
CFG_DISABLED, // I2S2_DIN ->
|
||||
CFG_DISABLED, // I2S3_MCK ->
|
||||
CFG_DISABLED, // I2S3_LRCK ->
|
||||
CFG_DISABLED, // I2S3_BCLK ->
|
||||
|
||||
/* Port 18 */
|
||||
CFG_DISABLED, // I2S3_DOUT ->
|
||||
CFG_DISABLED, // I2S3_DIN ->
|
||||
CFG_DISABLED, // I2S4_LRCK ->
|
||||
CFG_DISABLED, // I2S4_BCLK ->
|
||||
CFG_DISABLED, // I2S4_DOUT ->
|
||||
CFG_DISABLED, // I2S4_DIN ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 19 */
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 20 */
|
||||
CFG_DISABLED, // TMR32_PWM0 ->
|
||||
CFG_DISABLED, // TMR32_PWM1 ->
|
||||
CFG_DISABLED, // TMR32_PWM2 ->
|
||||
CFG_DISABLED, // SIO_7816UART0_SDA ->
|
||||
CFG_DISABLED, // SIO_7816UART0_SCL ->
|
||||
CFG_DISABLED, // SIO_7816UART0_RST ->
|
||||
CFG_DISABLED, // SIO_7816UART1_SDA ->
|
||||
CFG_DISABLED, // SIO_7816UART1_SCL ->
|
||||
|
||||
/* Port 21 */
|
||||
CFG_DISABLED, // SIO_7816UART0_RST ->
|
||||
CFG_DISABLED, // UART6_TXD ->
|
||||
CFG_DISABLED, // UART6_RXD ->
|
||||
CFG_DISABLED, // I2C3_SDA ->
|
||||
CFG_DISABLED, // I2C3_SCL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 22 */
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 23 */
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
|
||||
/* Port 24 */
|
||||
CFG_DISABLED, // EPD_HPD ->
|
||||
CFG_DISABLED, // I2S0_MCK ->
|
||||
CFG_DISABLED, // I2S2_MCK ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
CFG_DISABLED, // NULL ->
|
||||
};
|
||||
|
||||
const uint32_t *target_get_default_gpio_cfg(uint32_t gpioc)
|
||||
{
|
||||
return gpio_default_cfg;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
# Copyright (C) 2010 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.
|
||||
#
|
||||
LOCAL_DIR := $(GET_LOCAL_DIR)
|
||||
TARGET_DIR := $(LOCAL_DIR)
|
||||
|
||||
OPTIONS += \
|
||||
TARGET_BOOT_CPU_VOLTAGE=CHIPID_CPU_VOLTAGE_MED \
|
||||
TARGET_BOOT_RAM_VOLTAGE=0 \
|
||||
TARGET_BOOT_SOC_VOLTAGE=0 \
|
||||
TARGET_VID0_CLK_CFG=0x86100000 \
|
||||
DISPLAY_IPHONE_TUNABLES=1 \
|
||||
AMC_NUM_CHANNELS=2 \
|
||||
AMC_NUM_RANKS=1 \
|
||||
AMP_CALIBRATION_SKIP=1 \
|
||||
BUCK_CPU=0 \
|
||||
BUCK_GPU=1 \
|
||||
WITH_TARGET_AMC_PARAMS=1 \
|
||||
WITH_TARGET_AMP_PARAMS=1 \
|
||||
WIFI_DTPATH=\"arm-io/wlan\"
|
||||
|
||||
GLOBAL_INCLUDES += $(LOCAL_DIR)/include
|
||||
|
||||
ALL_OBJS += $(LOCAL_DIR)/init.o \
|
||||
$(LOCAL_DIR)/pinconfig.o
|
||||
Reference in new issue
Block a user