first and last commit
This commit is contained in:
commit
1bf4efd552
2612 files changed
+636500
No files matched your search
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2015 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_v2_tuneable adbe_tuneables[] = {
|
||||
{
|
||||
.name = "ipad6d",
|
||||
.adbe0_vblank_pos_vbi_pulse = 0x0132,
|
||||
.adbe0_vblank_clk_gate_wakeup = 0x07,
|
||||
.adbe0_vblank_clk_gate_idle = 0x0000,
|
||||
.adbe0_vblank_busy_finish = 2,
|
||||
.adbe0_tunable_mode_ctrl = (DBEMODECNTL_PMGR_CLK_GATE_ENABLE |
|
||||
DBEMODECNTL_DYN_CLK_GATE_ENABLE |
|
||||
DBEMODECNTL_BLK_CLK_GATE_ENABLE),
|
||||
.adbe0_aap_support = 1,
|
||||
.adbe0_aap_format_control_reg1 = (AAP_FORMAT_CONTROL_REG1_AUTOPOS |
|
||||
AAP_FORMAT_CONTROL_REG1_FCMODE(2) |
|
||||
AAP_FORMAT_CONTROL_REG1_RSVD(0) |
|
||||
AAP_FORMAT_CONTROL_REG1_VS_POL),
|
||||
},
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 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.
|
||||
*/
|
||||
#ifndef TARGET_BOARDID_H
|
||||
#define TARGET_BOARDID_H
|
||||
|
||||
// Board ids
|
||||
#define TARGET_BOARD_ID_J98aAP (0x10)
|
||||
#define TARGET_BOARD_ID_J98aDEV (0x11)
|
||||
|
||||
#define TARGET_BOARD_ID_J99aAP (0x12)
|
||||
#define TARGET_BOARD_ID_J99aDEV (0x13)
|
||||
|
||||
// Board revs
|
||||
#define J99a_DEV0_BOARD_REV (0x0)
|
||||
#define J99a_DEV1_BOARD_REV (0x1)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 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.
|
||||
*/
|
||||
|
||||
// <rdar://problem/19636728> Revert applicable Elba targets to 4 GB when kernel supports 4 GB
|
||||
// will require removing chnldec from the table below, as well as
|
||||
// setting DCS_NUM_CHANNELS to 8. In addition, the SDRAM_LEN and TEXT_BASE will have to be increased
|
||||
static inline
|
||||
void dcs_init_config_fixup_params(dcs_config_params_t *dcs_params, dcs_target_t targtype)
|
||||
{
|
||||
dcs_params->chnldec = 0x00050110;
|
||||
|
||||
#if DCS_DRAM_800MHZ
|
||||
dcs_params->freq[0].clk_period = CLK_PERIOD_800;
|
||||
dcs_params->freq[0].freqchngctl[3] = 0xae015202;
|
||||
dcs_params->freq[1].freqchngctl[3] = 0xae011202;
|
||||
dcs_params->freq[0].lat = 0x001031c6;
|
||||
dcs_params->freq[0].phyrdwrtim = 0x00050c05;
|
||||
dcs_params->freq[0].caspch = 0x43d10408;
|
||||
dcs_params->freq[0].act = 0x10040908;
|
||||
dcs_params->freq[0].autoref = 0x24480078;
|
||||
dcs_params->freq[0].selfref = 0x5004b012;
|
||||
dcs_params->modereg = 0x0e0c6084;
|
||||
dcs_params->pdn = 0x72273263;
|
||||
dcs_params->freq[0].derate = 0x28835488;
|
||||
dcs_params->freq[0].lat2 = 0x001121c6;
|
||||
dcs_params->freq[0].tat = 0x01312222;
|
||||
dcs_params->rdwrdqcaltiming_f0 = 0x01040401;
|
||||
dcs_params->rdwrdqcaltiming_f3 = 0x01040408;
|
||||
dcs_params->rdwrdqcaltimingctrl2 = 0x010f0a01;
|
||||
dcs_params->maxrddqssdllmulfactor = 0x00a00b0b;
|
||||
dcs_params->maxwrdqssdllmulfactor = 0xa0a00808;
|
||||
dcs_params->freq[0].rdcapcfg = 0x0100070a;
|
||||
dcs_params->freq[0].autoref2 = 0x24480049;
|
||||
dcs_params->mr2cmd_step11 = 0x52;
|
||||
dcs_params->mr1cmd_step11 = 0xae;
|
||||
dcs_params->rdsdllctrl_step15 = 0x00280004;
|
||||
dcs_params->qbrparam = 0x00000000;
|
||||
#endif
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 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.
|
||||
*/
|
||||
#ifndef __TARGET_GPIODEF_H
|
||||
#define __TARGET_GPIODEF_H
|
||||
|
||||
/* ipad6,x specific gpio -> pin mappings */
|
||||
|
||||
#include <platform/gpio.h>
|
||||
|
||||
// XXX: Update all of this
|
||||
|
||||
/* define target-specific gpios in a generic fashion here. */
|
||||
|
||||
/* Board Revision */
|
||||
#define GPIO_BOARD_REV0 GPIO(14, 4) // 116 : GPIO[44]
|
||||
#define GPIO_BOARD_REV1 GPIO(14, 5) // 117 : GPIO[45]
|
||||
#define GPIO_BOARD_REV2 GPIO(14, 6) // 118 : GPIO[46]
|
||||
#define GPIO_BOARD_REV3 GPIO(15, 1) // 121 : GPIO[49]
|
||||
|
||||
/* Miscellaneous Pins */
|
||||
#define GPIO_DISPLAY_HPD GPIO(24, 2) // 194: EPD_HPD0 -> LPDP_TCON_TO_SOC_HPD
|
||||
|
||||
#define GPIO_S3E_BOOT_FROM_HOST GPIO_ID(76) // 76 : GPIO[2] -> GPIO_SOC_TO_NAND_FW_STRAP (formerly AP_TO_NAND_FW_STRAP)
|
||||
|
||||
/* which IICs to initialize */
|
||||
#define IICS_MASK (7)
|
||||
|
||||
/* Switch to this when i2c3 is enabled */
|
||||
//#define IICS_MASK (0xF)
|
||||
|
||||
#define TRISTAR_IIC_BUS (0)
|
||||
#define BACKLIGHT_IIC_BUS (0)
|
||||
#define DISPLAY_PMU_IIC_BUS (0)
|
||||
|
||||
#define GPIO_PMU_LCD_PWR_EN (17) // PMU GPIO 18 - GPIO_PMU_TO_LCD_PWREN
|
||||
#define GPIO_PMU_NAND_LOW_POWER_MODE (15) // PMU GPIO 16 - GPIO_PMU_TO_NAND_LOW_BATT_L
|
||||
|
||||
#endif /* ! __TARGET_GPIODEF_H */
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 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.
|
||||
*/
|
||||
#ifndef LPDP_SETTINGS_H
|
||||
#define LPDP_SETTINGS_H
|
||||
|
||||
static struct lpdp_port_calibration lpdp_port_calibration_table[1][1] = {
|
||||
{ {LPDP_PHY_LANE_VREG_ADJ_450_mV, 0}, },
|
||||
};
|
||||
|
||||
#define LPDP_PORT_CALIBRATION_TABLE_FIXED (true)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,140 @@
|
||||
#ifndef __TARGET_POWERCONFIG_H
|
||||
#define __TARGET_POWERCONFIG_H
|
||||
|
||||
// Configuration per target
|
||||
|
||||
#define PMU_IIC_BUS 0
|
||||
|
||||
// This configuration is very PMU specific and must be included exactly
|
||||
// once in power.c
|
||||
#ifdef POWERCONFIG_PMU_SETUP
|
||||
|
||||
static const struct pmu_setup_struct pmu_ldo_warm_setup[] =
|
||||
{
|
||||
};
|
||||
|
||||
static const struct pmu_setup_struct pmu_ldo_cold_setup[] =
|
||||
{
|
||||
{ PMU_IIC_BUS, kD2257_EN_CMD0, (1<<7)|(1<<3)|(1<<2)|(1<<1)|(1<<0) },
|
||||
{ PMU_IIC_BUS, kD2257_EN_CMD1, (1<<0) }, // buck8
|
||||
{ PMU_IIC_BUS, kD2257_EN_CMD2, 1 }, // enable WLED SPI access
|
||||
{ PMU_IIC_BUS, kD2257_SPI_CTRL, 1 } // enable SPI access
|
||||
};
|
||||
|
||||
static const struct pmu_setup_struct pmu_warm_init[] =
|
||||
{
|
||||
};
|
||||
|
||||
static const struct pmu_setup_struct pmu_cold_init[] =
|
||||
{
|
||||
// TODO :This is a Bringup Hack, remove
|
||||
{ PMU_IIC_BUS, kD2257_BUCK0_VSEL, 0xc0}, // CPU rail
|
||||
{ PMU_IIC_BUS, kD2257_BUCK1_VSEL, 0xc0}, // GPU rail
|
||||
{ PMU_IIC_BUS, kD2257_PWRONOFF_BUCK1_EN, 0xf}, // GPU power rail (see <rdar://problem/19733370>)
|
||||
{ PMU_IIC_BUS, kD2257_PWRONOFF_BUCK8_EN, 0xf}, // GPU RAM power rail (see <rdar://problem/19733370>)
|
||||
// TODO :This is a Bringup Hack, remove
|
||||
|
||||
{ PMU_IIC_BUS, kD2257_PWRONOFF_LDO4_EN, 0x1}, // Enable PP3V0_ALS
|
||||
{ PMU_IIC_BUS, kD2257_PWRONOFF_LDO7_EN, 0x1}, // Enable PP3V3_USB3
|
||||
|
||||
{ PMU_IIC_BUS, kD2257_LDO2_BYPASS, 0x1}, // bypass when Active rdar://19773152
|
||||
|
||||
// Drive GPIO_PMU_TO_1V1_EXT_SW_ON (PMU GPIO 20) to enable PP1V1_S1_EXT_SW
|
||||
// which inturn is SNSI_PP1V1_S1_DDR_VDDQ_x.
|
||||
//
|
||||
// Should be ON by default via OTP.
|
||||
|
||||
// Drive GPIO_PMU_TO_1V8_EXT_SW2_ON (PMU GPIO 21) to enable PP1V8_S2_EXT_SW2
|
||||
// which inturn is PP1V8_S2_IO_EXPANDER.
|
||||
//
|
||||
// Should be ON by default via OTP.
|
||||
|
||||
{ PMU_IIC_BUS, 0x7000, 0x1D }, // Enable Test Mode
|
||||
{ PMU_IIC_BUS, kD2257_EN_CMD3, 0}, // Enable SPI access for BUCKx (x=3)
|
||||
{ PMU_IIC_BUS, 0x7000, 0x0 }, // Disable Test Mode
|
||||
|
||||
#if SUB_TARGET_J98a
|
||||
{ PMU_IIC_BUS, kD2257_GPIO5_CONF1, 0x14},
|
||||
{ PMU_IIC_BUS, kD2257_GPIO5_CONF2, 0x0F},
|
||||
{ PMU_IIC_BUS, kD2257_GPIO9_CONF1, 0x14},
|
||||
{ PMU_IIC_BUS, kD2257_GPIO9_CONF2, 0x0F}
|
||||
#endif
|
||||
|
||||
// ElbaRefUI uses PMU_GPIO19 as GPIO_BEACON_EN_R (J99a uses UART7_RXD as GPIO_SOC_TO_BEACON_EN)
|
||||
{ PMU_IIC_BUS, kD2257_GPIO19_CONF1, (2<<6)|(0<<3)|(0<<1)|(1<<0) }, // 0x80 Output(Push-Pull), Level, no PU/PD, High
|
||||
{ PMU_IIC_BUS, kD2257_GPIO19_CONF2, (1<<3)|(0<<0) }, // 0x08 VBUCK3, no DEB
|
||||
};
|
||||
|
||||
static const struct pmu_setup_struct pmu_backlight_enable[] =
|
||||
{
|
||||
{ PMU_IIC_BUS, kDIALOG_WLED_ISET, 0xff }, // 50% value from OS
|
||||
{ PMU_IIC_BUS, kDIALOG_WLED_ISET2, 0x7f },
|
||||
{ PMU_IIC_BUS, kD2257_WLED_CTRL1, // enable all LED strings
|
||||
(kDIALOG_WLED_CONTROL_WLED_ENABLE1 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE2 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE3 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE4 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE5 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE6) },
|
||||
{ PMU_IIC_BUS, kD2257_WLED_CTRL2, // enable all LED strings
|
||||
(kDIALOG_WLED_CONTROL_WLED_ENABLE1 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE2 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE3 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE4 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE5 |
|
||||
kDIALOG_WLED_CONTROL_WLED_ENABLE6) },
|
||||
{ PMU_IIC_BUS, kD2257_PWRONOFF_WLEDA_EN, 0x1f }, // enable LED Power
|
||||
{ PMU_IIC_BUS, kD2257_PWRONOFF_WLEDB_EN, 0x1f }, // enable LED Power
|
||||
};
|
||||
|
||||
static const struct pmu_setup_struct pmu_backlight_disable[] =
|
||||
{
|
||||
{ PMU_IIC_BUS, kD2257_PWRONOFF_WLEDA_EN, 0x0 }, // disable LED Power
|
||||
{ PMU_IIC_BUS, kD2257_PWRONOFF_WLEDB_EN, 0x0 }, // disable LED Power
|
||||
};
|
||||
|
||||
static const struct core_rails_struct soc_rails[] =
|
||||
{
|
||||
{ PMU_IIC_BUS, 0, kD2257_BUCK2_VSEL }
|
||||
};
|
||||
|
||||
static const struct core_rails_struct cpu_rails[] =
|
||||
{
|
||||
{ PMU_IIC_BUS, 0, kD2257_BUCK0_VSEL }
|
||||
};
|
||||
|
||||
// It's VDD FIXED! used for RAM inside the SOC
|
||||
static const struct core_rails_struct ram_rails[] =
|
||||
{
|
||||
{ PMU_IIC_BUS, 0, kD2257_BUCK5_VSEL }
|
||||
};
|
||||
|
||||
// This is indexed with POWER_RAIL_*, I really just need to use the
|
||||
// index in LDO[]
|
||||
target_rails_t target_rails = {
|
||||
{ 0x10, 450, 1250, 3125 }, // POWER_RAIL_CPU, BUCK0
|
||||
{ 0x15, 600, 1400, 3125 }, // POWER_RAIL_VDD_FIXED BUCK5
|
||||
{ 0x12, 600, 1400, 3125 }, // POWER_RAIL_SOC, BUCK2
|
||||
|
||||
{ 0x17, 600, 1400, 3125 }, // POWER_RAIL_CPU_RAM, BUCK7
|
||||
{ 0x11, 450, 1250, 3125 }, // POWER_RAIL_GPU, BUCK1
|
||||
{ 0x18, 600, 1400, 3125 }, // POWER_RAIL_GPU_RAM, BUCK8
|
||||
};
|
||||
|
||||
#endif // POWERCONFIG_PMU_SETUP
|
||||
|
||||
#define NO_BATTERY_VOLTAGE 2700
|
||||
#define MIN_BOOT_BATTERY_VOLTAGE 3600
|
||||
#define TARGET_BOOT_BATTERY_VOLTAGE 3700
|
||||
#define TARGET_BOOT_BATTERY_CAPACITY 50
|
||||
#define PRECHARGE_BACKLIGHT_LEVEL 824
|
||||
#define ALWAYS_BOOT_BATTERY_VOLTAGE (TARGET_BOOT_BATTERY_VOLTAGE + 100)
|
||||
#define TARGET_MAX_USB_INPUT_CURRENT 2400
|
||||
|
||||
#define TARGET_PRECHARGE_ALWAYS_DISPLAY_IDLE 1
|
||||
|
||||
#define ACC_PWR_LDO (6)
|
||||
|
||||
#define GASGAUGE_BATTERYID_BLOCK 1
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 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.
|
||||
*/
|
||||
#ifndef __TARGET_UARTCONFIG_H
|
||||
#define __TARGET_UARTCONFIG_H
|
||||
|
||||
/* define one debug serial ports */
|
||||
#define DEBUG_SERIAL_PORT (0)
|
||||
|
||||
#define HDQGAUGE_SERIAL_PORT (5)
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user