first and last commit

This commit is contained in:
Chris Nutter committed 2023-07-08 13:03:17 -07:00
commit 1bf4efd552
2612 files changed
+636500

No files matched your search

@@ -0,0 +1,30 @@
/*
* Copyright (C) 2013-2014 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 = "default",
.adbe0_vblank_pos_vbi_pulse = 0x000e,
.adbe0_vblank_clk_gate_wakeup = 0x000e,
.adbe0_vblank_clk_gate_idle = 0x0000,
.adbe0_vblank_busy_finish = 2,
.adbe0_tunable_mode_ctrl = (DBEMODECNTL_DPB_BUSY_MASK | \
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_RSVD(8) | AAP_FORMAT_CONTROL_REG1_VS_POL),
},
};
#endif
+103
View File
@@ -0,0 +1,103 @@
/*
* Copyright (C) 2014,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.
*/
/* Memory settings taken from j42d (2 GB), SEG signed off that they are the same (800MHz vs 792MHz) */
static const struct amc_param amc_params = {
.lat = 0x00060300,
.phyrdwrtim = 0x00020a04,
.tREFi = 0x5d,
.pdn = 0x22000403,
.derate = 0x24831359,
.read = 0x00000203,
.bustat = 0x00222209,
.bustat2 = 0x00222209,
.pwrmngten_default = 0x00100100,
.schen_default = 0x00001110,
.mcphyupdate = 0x15030000,
.mcphyupdate1 = 0x00000003,
.arefparam = 0x0ca2b532,
.longsr = 0x05022008,
.mr1 = 0x44,
.mr2 = 0x1a,
.mr3 = 0x03,
.addrcfg = 0x00030201,
.mccchnldec = 0x00060010,
.mcuchnhash = 0x0ffffd54,
.mcschnldec = 0x00010200,
.qbrparam = 0x00050200,
.odts = 0x00000320,
.addrmapmode = 0x00000601,
.readleveling = 0x00000300,
.freq = {
{ // 800MHz
.cas = 0x00000308,
.pch = 0x00030612,
.act = 0x12040908,
.autoref = 0x25550000,
.selfref = 0x00059060,
.modereg = 0x20250782,
},
{ // 400MHz
.cas = 0x00000005,
.pch = 0x00000009,
.act = 0x09020505,
.autoref = 0x132b0000,
.selfref = 0x0002d000,
.modereg = 0x00130000,
},
{ // 200MHz
.cas = 0x00000003,
.pch = 0x00000005,
.act = 0x05010303,
.autoref = 0x0a160000,
.selfref = 0x00017000,
.modereg = 0x000a0000,
},
{ // 50MHz
.cas = 0x00000002,
.pch = 0x00000002,
.act = 0x04010202,
.autoref = 0x03050000,
.selfref = 0x00006000,
.modereg = 0x00030000,
}
}
};
static const struct amc_tunable amc_tunables[] = {
{ &rAMC_MCSARBCFG, 0x00000001 },
{ &rAMC_OPIDLETMR, 0x00200000 },
{ &rAMC_OPTMRADJPARAM, 0x20400064 },
{ &rAMC_MIFACTSCH, 0x00000001 },
{ &rAMC_MIFCASSCH_FREQ(0), 0x10000010 },
{ &rAMC_PSQRQCTL0, 0xff010110 },
{ &rAMC_PSQRQCTL1, 0x00001700 },
{ &rAMC_PSQRQTIMER0, 0x00000040 },
{ &rAMC_PSQRQTIMER1, 0x00000014 },
{ &rAMC_PSQRQTIMER2, 0x00000040 },
{ &rAMC_PSQRQBRST, 0x04100410 },
{ &rAMC_PSQRQSCHCRD, 0x00101400 },
{ &rAMC_PSQWQCTL0, 0x00010100 },
#if DISPLAY_D600_TUNABLES
{ &rAMC_PSQWQCTL1, 0x00000bd4 },
#else
{ &rAMC_PSQWQCTL1, 0x00000158 },
#endif
{ &rAMC_PSQWQBRST, 0x04080410 },
{ &rAMC_PSQWQSCHCRD, 0x00101400 },
{ &rAMC_MCUQOSLLT, 0x0000011f },
#if DISPLAY_D600_TUNABLES
{ &rAMC_PWRMNGTPARAM, 0x0c003000 },
#else
{ &rAMC_PWRMNGTPARAM, 0x01803000 },
#endif
};
@@ -0,0 +1,38 @@
/*
* 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_ASPNANDCONFIG_H
#define __TARGET_ASPNANDCONFIG_H
//MLC devices
#define ASPNAND_MLC_WRITE_DIES_IN_PARALLEL 4
#define ASPNAND_SLC_WRITE_DIES_IN_PARALLEL 4
#define ASPNAND_ERASE_DIES_IN_PARALLEL 8
#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 4
#define ASPNAND_TLC_READ_DIES_IN_PARALLEL 4
#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 (4*1024*1024)
#define ASPNAND_LEGACY_INDIRECTION_MEMORY (4*1024*1024)
#endif
+19
View File
@@ -0,0 +1,19 @@
/*
* Copyright (C) 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 TARGET_BOARDID_H
#define TARGET_BOARDID_H
#define TARGET_BOARD_ID_J96AP (8)
#define TARGET_BOARD_ID_J96DEV (9)
#define TARGET_BOARD_ID_J97AP (10)
#define TARGET_BOARD_ID_J97DEV (11)
#endif
+41
View File
@@ -0,0 +1,41 @@
/*
* Copyright (C) 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 __TARGET_GPIODEF_H
#define __TARGET_GPIODEF_H
/* ipad5,x specific gpio -> pin mappings */
#include <platform/gpio.h>
/* define target-specific gpios in a generic fashion here. */
/* Board Revision */
#define GPIO_BOARD_REV0 GPIO( 14, 2) // 118 : GPIO[8]
#define GPIO_BOARD_REV1 GPIO( 14, 3) // 117 : GPIO[9]
#define GPIO_BOARD_REV2 GPIO( 14, 4) // 116 : GPIO[10]
/* Miscellaneous Pins */
#define GPIO_PMU_LCD_PWR_EN (17)
/* Ringer Switch */
#define GPIO_RINGER_AB GPIO( 5 , 7) // 131 : GPIO[4] -> gpio_btn_srl_l
/* D2207 watchdog tickle, 'KEEPACT' */
#define GPIO_WDOG_TICKLE GPIO( 6, 7) // 55 : GPIO[20] -> gpio_soc2pmu_keepact
/* which IICs to initialize */
#define IICS_MASK (0xD)
#define TRISTAR_IIC_BUS (0)
#define BACKLIGHT_IIC_BUS (0)
#endif /* ! __TARGET_GPIODEF_H */
@@ -0,0 +1,20 @@
/*
* Copyright (C) 2014 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_280_mV, 0}, },
};
#define LPDP_PORT_CALIBRATION_TABLE_FIXED (true)
#endif
+121
View File
@@ -0,0 +1,121 @@
#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, kD2207_HIBERNATE6, 0x22 }, // DVDD must be on <rdar://problem/20080758>
};
static const struct pmu_setup_struct pmu_warm_init[] =
{
};
static const struct pmu_setup_struct pmu_cold_init[] =
{
/* <rdar://problem/14957338> J96-J97 IO spreadsheet tracker */
#if TARGET_HAS_BASEBAND
{ PMU_IIC_BUS, kD2207_GPIO5, 0x09}, // PMU_GPIO_PMU2BBPMU_RST_L Out 0, Push-Pull, VBUCK3
#else
{ PMU_IIC_BUS, kD2207_GPIO5, 0xB9}, // PMU_GPIO_PMU2BBPMU_RST_L In, R Edge, PD
#endif
{ PMU_IIC_BUS, kD2207_GPIO6, 0xDA}, // UART5_BATT_TRXD In, F Edge, Wake, PD
{ PMU_IIC_BUS, kD2207_GPIO7, 0xBA}, // PMU_GPIO_BT_HOST_WAKE In, R Edge, Wake, PD
{ PMU_IIC_BUS, kD2207_GPIO8, 0x7B}, // PMU_GPIO_WLAN_HOST_WAKE In, Hi level, Wake, PD
#if TARGET_HAS_BASEBAND
{ PMU_IIC_BUS, kD2207_GPIO9, 0x8A}, // PMU_GPIO_BB2PMU_HOST_WAKE In, Active low, Wake, PU, VBUCK3
#else
{ PMU_IIC_BUS, kD2207_GPIO9, 0xB9}, // PMU_GPIO_BB2PMU_HOST_WAKE In, R Edge, PD
#endif
{ PMU_IIC_BUS, kD2207_GPIO10, 0xEA}, // PMU_GPIO_CODEC_HS_INT_L In, Any Edge, Wake, PU, VBUCK3
{ PMU_IIC_BUS, kD2207_GPIO11, 0xFA}, // PMU_GPIO_MB_HALL0_IRQ In, Any Edge, Wake, No PU
{ PMU_IIC_BUS, kD2207_GPIO12, 0x7B}, // GPIO_TS2SOC2PMU_INT In, Hi level, Wake, PD
{ PMU_IIC_BUS, kD2207_GPIO13, 0xF8}, // PMU_GPIO_MB_HALL1_IRQ In, Any Edge, NoWake, No PU
{ PMU_IIC_BUS, kD2207_GPIO14, 0xB8}, // PMU_GPIO_WLAN2PMU_PCIE_WAKE_L In, R Edge, PU
{ PMU_IIC_BUS, kD2207_GPIO16, 0x7B}, // PMU_GPIO_OSCAR2PMU_HOST_WAKE In, Hi level, Wake, PD
{ PMU_IIC_BUS, kD2207_GPIO21, 0xF8}, // PMU_GPIO_MB_HALL2_IRQ In, Any Edge, NoWake, No PU
{ PMU_IIC_BUS, kD2207_BUCK_DWI_CTRL0, 0x23}, // enable DWI for BUCK0, BUCK1, BUCK5
{ PMU_IIC_BUS, kDIALOG_SYS_CONTROL2, 0x11}, // DWI_EN HIB_32K (for WiFi/BT) <rdar://problem/16257601>
{ PMU_IIC_BUS, kDIALOG_TEST_ACCESS, kDIALOG_TEST_ACCESS_ENA}, // enable TEST Access
{ PMU_IIC_BUS, kD2207_PRE_UVLO_CONF, 0x06}, // SOCHOT0 save power in sleep, disable pull-up <rdar://21643083>
{ PMU_IIC_BUS, kDIALOG_TEST_ACCESS, kDIALOG_TEST_ACCESS_DIS}, // disable TEST Access
};
static const struct pmu_setup_struct pmu_backlight_enable[] =
{
{ PMU_IIC_BUS, kDIALOG_WLED_ISET, 0xD4 }, // 50% value from OS
{ PMU_IIC_BUS, kDIALOG_WLED_ISET2, 0x00 },
{ PMU_IIC_BUS, kDIALOG_WLED_CONTROL, // 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, kDIALOG_WLED_OPTIONS, // enable LED Power
(kDIALOG_WLED_CONTROL2_WLED_RAMP_EN |
kDIALOG_WLED_CONTROL2_WLED_DITH_EN) }
};
static const struct pmu_setup_struct pmu_backlight_disable[] =
{
{ PMU_IIC_BUS, kDIALOG_WLED_CONTROL, 0x0 } // disable LED power
};
static const struct core_rails_struct soc_rails[] =
{
{ PMU_IIC_BUS, 0, kD2207_BUCK5_VSEL }
};
static const struct core_rails_struct cpu_rails[] =
{
{ PMU_IIC_BUS, 0, kD2207_BUCK0_VSEL }
};
static const struct core_rails_struct ram_rails[] =
{
{ PMU_IIC_BUS, 0, kD2207_BUCK2_VSEL }
};
#define TARGET_USE_CHARGE_TABLE 1
static const struct power_charge_limits pmu_charge_table[16] = {
{ 4100, 1000, 1500, 1004 }, // 10 - 15C
{ 4200, 1000, 1500, 1004 },
{ USHRT_MAX, 1000, 1500, 1004 },
{ 4100, 1500, 2000, 2509 }, // 15 - 20C
{ 4200, 1500, 2000, 2007 },
{ USHRT_MAX, 1500, 2000, 1004 },
{ 4100, 2000, 4500, 2509 }, // 20 - 45C
{ 4200, 2000, 4500, 2509 },
{ USHRT_MAX, 2000, 4500, 2007 },
};
#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 60
#define PRECHARGE_BACKLIGHT_LEVEL 824
#define ALWAYS_BOOT_BATTERY_VOLTAGE (TARGET_BOOT_BATTERY_VOLTAGE + 100)
#define TARGET_PRECHARGE_ALWAYS_DISPLAY_IDLE 1
#define TARGET_MAX_USB_INPUT_CURRENT 2400
#define ACC_PWR_LDO (6)
#define GASGAUGE_BATTERYID_BLOCK 1
// no charge table
#endif
+23
View File
@@ -0,0 +1,23 @@
/*
* Copyright (C) 2013-2014 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)
#if SUPPORT_FPGA
#define UART_OVERSAMPLE_OVERRIDE (11)
#endif
#endif