pinmux: implement updated initial config api

This commit is contained in:
Michael Scire 2020-11-09 02:01:29 -08:00 committed by SciresM
parent 68f42a14c8
commit d9350d24a9
37 changed files with 2837 additions and 2117 deletions

View file

@ -64,6 +64,7 @@
#include <stratosphere/patcher.hpp>
#include <stratosphere/pcv.hpp>
#include <stratosphere/pgl.hpp>
#include <stratosphere/pinmux.hpp>
#include <stratosphere/powctl.hpp>
#include <stratosphere/psc.hpp>
#include <stratosphere/pm.hpp>

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stratosphere/pinmux/pinmux_api.hpp>
#include <stratosphere/pinmux/driver/pinmux_driver_api.hpp>

View file

@ -0,0 +1,27 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours.hpp>
namespace ams::pinmux::driver {
void Initialize();
void Finalize();
void SetInitialConfig();
void SetInitialDrivePadConfig();
}

View file

@ -0,0 +1,23 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours.hpp>
namespace ams::pinmux {
/* ... */
}

View file

@ -0,0 +1,138 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stratosphere.hpp>
#include "pinmux_pad_index.hpp"
#include "pinmux_board_driver_api.hpp"
#include "pinmux_platform_pads.hpp"
namespace ams::pinmux::driver::board::nintendo_nx {
namespace {
constinit bool g_initialized = false;
#include "pinmux_initial_pad_config_icosa.inc"
#include "pinmux_initial_pad_config_hoag.inc"
#include "pinmux_initial_pad_config_iowa.inc"
#include "pinmux_initial_pad_config_calcio.inc"
#include "pinmux_initial_pad_config_five.inc"
#include "pinmux_initial_drive_pad_config.inc"
#include "pinmux_initial_drive_pad_config_hoag.inc"
}
bool IsInitialized() {
return g_initialized;
}
void Initialize() {
InitializePlatformPads();
g_initialized = true;
}
void Finalize() {
/* ... */
}
void SetInitialConfig() {
const PinmuxPadConfig *configs = nullptr;
size_t num_configs = 0;
bool is_mariko = false;
switch (spl::GetHardwareType()) {
case spl::HardwareType::Icosa:
configs = PinmuxPadConfigsIcosa;
num_configs = NumPinmuxPadConfigsIcosa;
is_mariko = false;
break;
case spl::HardwareType::Hoag:
configs = PinmuxPadConfigsHoag;
num_configs = NumPinmuxPadConfigsHoag;
is_mariko = true;
break;
case spl::HardwareType::Iowa:
configs = PinmuxPadConfigsIowa;
num_configs = NumPinmuxPadConfigsIowa;
is_mariko = true;
break;
case spl::HardwareType::Calcio:
configs = PinmuxPadConfigsCalcio;
num_configs = NumPinmuxPadConfigsCalcio;
is_mariko = true;
break;
case spl::HardwareType::_Five_:
configs = PinmuxPadConfigsFive;
num_configs = NumPinmuxPadConfigsFive;
is_mariko = true;
break;
AMS_UNREACHABLE_DEFAULT_CASE();
}
AMS_ABORT_UNLESS(configs != nullptr);
for (size_t i = 0; i < num_configs; ++i) {
UpdateSinglePinmuxPad(configs[i]);
}
if (is_mariko) {
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Clk, 0x2000, 0x2000 });
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Cmd, 0x2000, 0x2000 });
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Dat0, 0x2000, 0x2000 });
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Dat1, 0x2000, 0x2000 });
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Dat2, 0x2000, 0x2000 });
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Dat3, 0x2000, 0x2000 });
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Dat4, 0x2000, 0x2000 });
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Dat5, 0x2000, 0x2000 });
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Dat6, 0x2000, 0x2000 });
UpdateSinglePinmuxPad({ PinmuxPadIndex_Sdmmc2Dat7, 0x2000, 0x2000 });
}
}
void SetInitialDrivePadConfig() {
const PinmuxDrivePadConfig *configs = nullptr;
size_t num_configs = 0;
switch (spl::GetHardwareType()) {
case spl::HardwareType::Icosa:
configs = PinmuxDrivePadConfigs;
num_configs = NumPinmuxDrivePadConfigs;
break;
case spl::HardwareType::Hoag:
configs = PinmuxDrivePadConfigsHoag;
num_configs = NumPinmuxDrivePadConfigsHoag;
break;
case spl::HardwareType::Iowa:
configs = PinmuxDrivePadConfigs;
num_configs = NumPinmuxDrivePadConfigs;
break;
case spl::HardwareType::Calcio:
configs = PinmuxDrivePadConfigs;
num_configs = NumPinmuxDrivePadConfigs;
break;
case spl::HardwareType::_Five_:
configs = PinmuxDrivePadConfigs;
num_configs = NumPinmuxDrivePadConfigs;
break;
AMS_UNREACHABLE_DEFAULT_CASE();
}
AMS_ABORT_UNLESS(configs != nullptr);
for (size_t i = 0; i < num_configs; ++i) {
UpdateSinglePinmuxDrivePad(configs[i]);
}
}
}

View file

@ -16,16 +16,14 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::pinmux {
namespace ams::pinmux::driver::board::nintendo_nx {
/* Pinmux Utilities. */
u32 UpdatePark(u32 pinmux_name);
u32 UpdatePad(u32 pinmux_name, u32 config_val, u32 config_mask);
u32 UpdateDrivePad(u32 pinmux_drivepad_name, u32 config_val, u32 config_mask);
u32 DummyReadDrivePad(u32 pinmux_drivepad_name);
bool IsInitialized();
/* Helper API. */
void UpdateAllParks();
void DummyReadAllDrivePads();
void Initialize();
void Finalize();
void SetInitialConfig();
void SetInitialDrivePadConfig();
}

View file

@ -0,0 +1,170 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pinmux_character_gen.py, do not edit manually. */
constexpr inline const PinmuxDrivePadCharacter PinmuxDrivePadCharacters[] = {
{ PinmuxDrivePadIndex_AlsProxInt, 0x01F1F000, "AlsProxInt" },
{ PinmuxDrivePadIndex_ApReady, 0x01F1F000, "ApReady" },
{ PinmuxDrivePadIndex_ApWakeBt, 0x01F1F000, "ApWakeBt" },
{ PinmuxDrivePadIndex_ApWakeNfc, 0x01F1F000, "ApWakeNfc" },
{ PinmuxDrivePadIndex_AudMclk, 0x01F1F000, "AudMclk" },
{ PinmuxDrivePadIndex_BattBcl, 0x01F1F000, "BattBcl" },
{ PinmuxDrivePadIndex_BtRst, 0x01F1F000, "BtRst" },
{ PinmuxDrivePadIndex_BtWakeAp, 0x01F1F000, "BtWakeAp" },
{ PinmuxDrivePadIndex_ButtonHome, 0x01F1F000, "ButtonHome" },
{ PinmuxDrivePadIndex_ButtonPowerOn, 0x01F1F000, "ButtonPowerOn" },
{ PinmuxDrivePadIndex_ButtonSlideSw, 0x01F1F000, "ButtonSlideSw" },
{ PinmuxDrivePadIndex_ButtonVolDown, 0x01F1F000, "ButtonVolDown" },
{ PinmuxDrivePadIndex_ButtonVolUp, 0x01F1F000, "ButtonVolUp" },
{ PinmuxDrivePadIndex_Cam1Mclk, 0x01F1F000, "Cam1Mclk" },
{ PinmuxDrivePadIndex_Cam1Pwdn, 0x01F1F000, "Cam1Pwdn" },
{ PinmuxDrivePadIndex_Cam1Strobe, 0x01F1F000, "Cam1Strobe" },
{ PinmuxDrivePadIndex_Cam2Mclk, 0x01F1F000, "Cam2Mclk" },
{ PinmuxDrivePadIndex_Cam2Pwdn, 0x01F1F000, "Cam2Pwdn" },
{ PinmuxDrivePadIndex_CamAfEn, 0x01F1F000, "CamAfEn" },
{ PinmuxDrivePadIndex_CamFlashEn, 0x01F1F000, "CamFlashEn" },
{ PinmuxDrivePadIndex_CamI2cScl, 0x01F1F000, "CamI2cScl" },
{ PinmuxDrivePadIndex_CamI2cSda, 0x01F1F000, "CamI2cSda" },
{ PinmuxDrivePadIndex_CamRst, 0x01F1F000, "CamRst" },
{ PinmuxDrivePadIndex_Clk32kIn, 0x01F1F000, "Clk32kIn" },
{ PinmuxDrivePadIndex_Clk32kOut, 0x01F1F000, "Clk32kOut" },
{ PinmuxDrivePadIndex_ClkReq, 0x01F1F000, "ClkReq" },
{ PinmuxDrivePadIndex_CorePwrReq, 0x01F1F000, "CorePwrReq" },
{ PinmuxDrivePadIndex_CpuPwrReq, 0x01F1F000, "CpuPwrReq" },
{ PinmuxDrivePadIndex_Dap1Din, 0xF0000000, "Dap1Din" },
{ PinmuxDrivePadIndex_Dap1Dout, 0xF0000000, "Dap1Dout" },
{ PinmuxDrivePadIndex_Dap1Fs, 0xF0000000, "Dap1Fs" },
{ PinmuxDrivePadIndex_Dap1Sclk, 0xF0000000, "Dap1Sclk" },
{ PinmuxDrivePadIndex_Dap2Din, 0xF0000000, "Dap2Din" },
{ PinmuxDrivePadIndex_Dap2Dout, 0xF0000000, "Dap2Dout" },
{ PinmuxDrivePadIndex_Dap2Fs, 0xF0000000, "Dap2Fs" },
{ PinmuxDrivePadIndex_Dap2Sclk, 0xF0000000, "Dap2Sclk" },
{ PinmuxDrivePadIndex_Dap4Din, 0x01F1F000, "Dap4Din" },
{ PinmuxDrivePadIndex_Dap4Dout, 0x01F1F000, "Dap4Dout" },
{ PinmuxDrivePadIndex_Dap4Fs, 0x01F1F000, "Dap4Fs" },
{ PinmuxDrivePadIndex_Dap4Sclk, 0x01F1F000, "Dap4Sclk" },
{ PinmuxDrivePadIndex_Dmic1Clk, 0x01F1F000, "Dmic1Clk" },
{ PinmuxDrivePadIndex_Dmic1Dat, 0x01F1F000, "Dmic1Dat" },
{ PinmuxDrivePadIndex_Dmic2Clk, 0x01F1F000, "Dmic2Clk" },
{ PinmuxDrivePadIndex_Dmic2Dat, 0x01F1F000, "Dmic2Dat" },
{ PinmuxDrivePadIndex_Dmic3Clk, 0x01F1F000, "Dmic3Clk" },
{ PinmuxDrivePadIndex_Dmic3Dat, 0x01F1F000, "Dmic3Dat" },
{ PinmuxDrivePadIndex_DpHpd, 0x01F1F000, "DpHpd" },
{ PinmuxDrivePadIndex_DvfsClk, 0x01F1F000, "DvfsClk" },
{ PinmuxDrivePadIndex_DvfsPwm, 0x01F1F000, "DvfsPwm" },
{ PinmuxDrivePadIndex_Gen1I2cScl, 0x01F1F000, "Gen1I2cScl" },
{ PinmuxDrivePadIndex_Gen1I2cSda, 0x01F1F000, "Gen1I2cSda" },
{ PinmuxDrivePadIndex_Gen2I2cScl, 0x01F1F000, "Gen2I2cScl" },
{ PinmuxDrivePadIndex_Gen2I2cSda, 0x01F1F000, "Gen2I2cSda" },
{ PinmuxDrivePadIndex_Gen3I2cScl, 0x01F1F000, "Gen3I2cScl" },
{ PinmuxDrivePadIndex_Gen3I2cSda, 0x01F1F000, "Gen3I2cSda" },
{ PinmuxDrivePadIndex_GpioPa6, 0x01F1F000, "GpioPa6" },
{ PinmuxDrivePadIndex_GpioPcc7, 0x01F1F000, "GpioPcc7" },
{ PinmuxDrivePadIndex_GpioPe6, 0x01F1F000, "GpioPe6" },
{ PinmuxDrivePadIndex_GpioPe7, 0x01F1F000, "GpioPe7" },
{ PinmuxDrivePadIndex_GpioPh6, 0x01F1F000, "GpioPh6" },
{ PinmuxDrivePadIndex_GpioPk0, 0xF0000000, "GpioPk0" },
{ PinmuxDrivePadIndex_GpioPk1, 0xF0000000, "GpioPk1" },
{ PinmuxDrivePadIndex_GpioPk2, 0xF0000000, "GpioPk2" },
{ PinmuxDrivePadIndex_GpioPk3, 0xF0000000, "GpioPk3" },
{ PinmuxDrivePadIndex_GpioPk4, 0xF0000000, "GpioPk4" },
{ PinmuxDrivePadIndex_GpioPk5, 0xF0000000, "GpioPk5" },
{ PinmuxDrivePadIndex_GpioPk6, 0xF0000000, "GpioPk6" },
{ PinmuxDrivePadIndex_GpioPk7, 0xF0000000, "GpioPk7" },
{ PinmuxDrivePadIndex_GpioPl0, 0xF0000000, "GpioPl0" },
{ PinmuxDrivePadIndex_GpioPl1, 0xF0000000, "GpioPl1" },
{ PinmuxDrivePadIndex_GpioPz0, 0x07F7F000, "GpioPz0" },
{ PinmuxDrivePadIndex_GpioPz1, 0x07F7F000, "GpioPz1" },
{ PinmuxDrivePadIndex_GpioPz2, 0x07F7F000, "GpioPz2" },
{ PinmuxDrivePadIndex_GpioPz3, 0x07F7F000, "GpioPz3" },
{ PinmuxDrivePadIndex_GpioPz4, 0x07F7F000, "GpioPz4" },
{ PinmuxDrivePadIndex_GpioPz5, 0x07F7F000, "GpioPz5" },
{ PinmuxDrivePadIndex_GpioX1Aud, 0x01F1F000, "GpioX1Aud" },
{ PinmuxDrivePadIndex_GpioX3Aud, 0x01F1F000, "GpioX3Aud" },
{ PinmuxDrivePadIndex_GpsEn, 0x01F1F000, "GpsEn" },
{ PinmuxDrivePadIndex_GpsRst, 0x01F1F000, "GpsRst" },
{ PinmuxDrivePadIndex_HdmiCec, 0x01F1F000, "HdmiCec" },
{ PinmuxDrivePadIndex_HdmiIntDpHpd, 0x01F1F000, "HdmiIntDpHpd" },
{ PinmuxDrivePadIndex_JtagRtck, 0x01F1F000, "JtagRtck" },
{ PinmuxDrivePadIndex_LcdBlEn, 0x01F1F000, "LcdBlEn" },
{ PinmuxDrivePadIndex_LcdBlPwm, 0x01F1F000, "LcdBlPwm" },
{ PinmuxDrivePadIndex_LcdGpio1, 0x01F1F000, "LcdGpio1" },
{ PinmuxDrivePadIndex_LcdGpio2, 0x01F1F000, "LcdGpio2" },
{ PinmuxDrivePadIndex_LcdRst, 0x01F1F000, "LcdRst" },
{ PinmuxDrivePadIndex_LcdTe, 0x01F1F000, "LcdTe" },
{ PinmuxDrivePadIndex_ModemWakeAp, 0x01F1F000, "ModemWakeAp" },
{ PinmuxDrivePadIndex_MotionInt, 0x01F1F000, "MotionInt" },
{ PinmuxDrivePadIndex_NfcEn, 0x01F1F000, "NfcEn" },
{ PinmuxDrivePadIndex_NfcInt, 0x01F1F000, "NfcInt" },
{ PinmuxDrivePadIndex_PexL0ClkReqN, 0x01F1F000, "PexL0ClkReqN" },
{ PinmuxDrivePadIndex_PexL0RstN, 0x01F1F000, "PexL0RstN" },
{ PinmuxDrivePadIndex_PexL1ClkreqN, 0x01F1F000, "PexL1ClkreqN" },
{ PinmuxDrivePadIndex_PexL1RstN, 0x01F1F000, "PexL1RstN" },
{ PinmuxDrivePadIndex_PexWakeN, 0x01F1F000, "PexWakeN" },
{ PinmuxDrivePadIndex_PwrI2cScl, 0x01F1F000, "PwrI2cScl" },
{ PinmuxDrivePadIndex_PwrI2cSda, 0x01F1F000, "PwrI2cSda" },
{ PinmuxDrivePadIndex_PwrIntN, 0x01F1F000, "PwrIntN" },
{ PinmuxDrivePadIndex_QspiComp, 0x07F7F000, "QspiComp" },
{ PinmuxDrivePadIndex_QspiSck, 0xF0000000, "QspiSck" },
{ PinmuxDrivePadIndex_SataLedActive, 0x01F1F000, "SataLedActive" },
{ PinmuxDrivePadIndex_Sdmmc1Pad, 0xF7F7F000, "Sdmmc1Pad" },
{ PinmuxDrivePadIndex_Sdmmc3Pad, 0xF7F7F000, "Sdmmc3Pad" },
{ PinmuxDrivePadIndex_Shutdown, 0x01F1F000, "Shutdown" },
{ PinmuxDrivePadIndex_SpdifIn, 0x01F1F000, "SpdifIn" },
{ PinmuxDrivePadIndex_SpdifOut, 0x01F1F000, "SpdifOut" },
{ PinmuxDrivePadIndex_Spi1Cs0, 0xF0000000, "Spi1Cs0" },
{ PinmuxDrivePadIndex_Spi1Cs1, 0xF0000000, "Spi1Cs1" },
{ PinmuxDrivePadIndex_Spi1Miso, 0xF0000000, "Spi1Miso" },
{ PinmuxDrivePadIndex_Spi1Mosi, 0xF0000000, "Spi1Mosi" },
{ PinmuxDrivePadIndex_Spi1Sck, 0xF0000000, "Spi1Sck" },
{ PinmuxDrivePadIndex_Spi2Cs0, 0xF0000000, "Spi2Cs0" },
{ PinmuxDrivePadIndex_Spi2Cs1, 0xF0000000, "Spi2Cs1" },
{ PinmuxDrivePadIndex_Spi2Miso, 0xF0000000, "Spi2Miso" },
{ PinmuxDrivePadIndex_Spi2Mosi, 0xF0000000, "Spi2Mosi" },
{ PinmuxDrivePadIndex_Spi2Sck, 0xF0000000, "Spi2Sck" },
{ PinmuxDrivePadIndex_Spi4Cs0, 0xF0000000, "Spi4Cs0" },
{ PinmuxDrivePadIndex_Spi4Miso, 0xF0000000, "Spi4Miso" },
{ PinmuxDrivePadIndex_Spi4Mosi, 0xF0000000, "Spi4Mosi" },
{ PinmuxDrivePadIndex_Spi4Sck, 0xF0000000, "Spi4Sck" },
{ PinmuxDrivePadIndex_TempAlert, 0x01F1F000, "TempAlert" },
{ PinmuxDrivePadIndex_TouchClk, 0x01F1F000, "TouchClk" },
{ PinmuxDrivePadIndex_TouchInt, 0x01F1F000, "TouchInt" },
{ PinmuxDrivePadIndex_TouchRst, 0x01F1F000, "TouchRst" },
{ PinmuxDrivePadIndex_Uart1Cts, 0x01F1F000, "Uart1Cts" },
{ PinmuxDrivePadIndex_Uart1Rts, 0x01F1F000, "Uart1Rts" },
{ PinmuxDrivePadIndex_Uart1Rx, 0x01F1F000, "Uart1Rx" },
{ PinmuxDrivePadIndex_Uart1Tx, 0x01F1F000, "Uart1Tx" },
{ PinmuxDrivePadIndex_Uart2Cts, 0x01F1F000, "Uart2Cts" },
{ PinmuxDrivePadIndex_Uart2Rts, 0x01F1F000, "Uart2Rts" },
{ PinmuxDrivePadIndex_Uart2Rx, 0x01F1F000, "Uart2Rx" },
{ PinmuxDrivePadIndex_Uart2Tx, 0x01F1F000, "Uart2Tx" },
{ PinmuxDrivePadIndex_Uart3Cts, 0x01F1F000, "Uart3Cts" },
{ PinmuxDrivePadIndex_Uart3Rts, 0x01F1F000, "Uart3Rts" },
{ PinmuxDrivePadIndex_Uart3Rx, 0x01F1F000, "Uart3Rx" },
{ PinmuxDrivePadIndex_Uart3Tx, 0x01F1F000, "Uart3Tx" },
{ PinmuxDrivePadIndex_Uart4Cts, 0x01F1F000, "Uart4Cts" },
{ PinmuxDrivePadIndex_Uart4Rts, 0x01F1F000, "Uart4Rts" },
{ PinmuxDrivePadIndex_Uart4Rx, 0x01F1F000, "Uart4Rx" },
{ PinmuxDrivePadIndex_Uart4Tx, 0x01F1F000, "Uart4Tx" },
{ PinmuxDrivePadIndex_UsbVbusEn0, 0x01F1F000, "UsbVbusEn0" },
{ PinmuxDrivePadIndex_UsbVbusEn1, 0x01F1F000, "UsbVbusEn1" },
{ PinmuxDrivePadIndex_WifiEn, 0x01F1F000, "WifiEn" },
{ PinmuxDrivePadIndex_WifiRst, 0x01F1F000, "WifiRst" },
{ PinmuxDrivePadIndex_WifiWakeAp, 0x01F1F000, "WifiWakeAp" },
};
constexpr inline size_t NumPinmuxDrivePadCharacters = util::size(PinmuxDrivePadCharacters);

View file

@ -0,0 +1,69 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by drive_pad_initial_config.py, do not edit manually. */
constexpr inline const PinmuxDrivePadConfig PinmuxDrivePadConfigs[] = {
{ PinmuxDrivePadIndex_AudMclk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Cam1Mclk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Cam2Mclk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_CamAfEn, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_CamFlashEn, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_CamI2cScl, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_CamI2cSda, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dap4Din, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dap4Dout, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dap4Fs, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dap4Sclk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic1Clk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic1Dat, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic2Clk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic2Dat, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic3Clk, 0x01F1F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic3Dat, 0x01F1F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_DvfsClk, 0x01F1F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_DvfsPwm, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen1I2cScl, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen1I2cSda, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen2I2cScl, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen2I2cSda, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen3I2cScl, 0x00007000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen3I2cSda, 0x00007000, 0x01F1F000 },
{ PinmuxDrivePadIndex_GpioPz0, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_GpioPz1, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_GpioX1Aud, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_GpioX3Aud, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_PwrI2cScl, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_PwrI2cSda, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_TouchClk, 0x01414000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Uart3Cts, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Uart3Rts, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Uart3Rx, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Uart3Tx, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Spi1Cs0, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi1Cs1, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi1Miso, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi1Mosi, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi1Sck, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Cs0, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Cs1, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Miso, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Mosi, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Sck, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Sdmmc3Pad, 0x51212000, 0xF1F1F000 },
};
constexpr inline const size_t NumPinmuxDrivePadConfigs = util::size(PinmuxDrivePadConfigs);

View file

@ -0,0 +1,69 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by drive_pad_initial_config.py, do not edit manually. */
constexpr inline const PinmuxDrivePadConfig PinmuxDrivePadConfigsHoag[] = {
{ PinmuxDrivePadIndex_AudMclk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Cam1Mclk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Cam2Mclk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_CamAfEn, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_CamFlashEn, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_CamI2cScl, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_CamI2cSda, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dap4Din, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dap4Dout, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dap4Fs, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dap4Sclk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic1Clk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic1Dat, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic2Clk, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic2Dat, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic3Clk, 0x01F1F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Dmic3Dat, 0x01F1F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_DvfsClk, 0x01F1F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_DvfsPwm, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen1I2cScl, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen1I2cSda, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen2I2cScl, 0x00004000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen2I2cSda, 0x00004000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen3I2cScl, 0x00007000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Gen3I2cSda, 0x00007000, 0x01F1F000 },
{ PinmuxDrivePadIndex_GpioPz0, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_GpioPz1, 0x01010000, 0x01F1F000 },
{ PinmuxDrivePadIndex_GpioX1Aud, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_GpioX3Aud, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_PwrI2cScl, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_PwrI2cSda, 0x0001F000, 0x01F1F000 },
{ PinmuxDrivePadIndex_TouchClk, 0x01414000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Uart3Cts, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Uart3Rts, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Uart3Rx, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Uart3Tx, 0x01404000, 0x01F1F000 },
{ PinmuxDrivePadIndex_Spi1Cs0, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi1Cs1, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi1Miso, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi1Mosi, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi1Sck, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Cs0, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Cs1, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Miso, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Mosi, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Spi2Sck, 0x00000000, 0xF0000000 },
{ PinmuxDrivePadIndex_Sdmmc3Pad, 0x51212000, 0xF1F1F000 },
};
constexpr inline const size_t NumPinmuxDrivePadConfigsHoag = util::size(PinmuxDrivePadConfigsHoag);

View file

@ -0,0 +1,196 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pinmux_initial_config.py, do not edit manually. */
constexpr inline const PinmuxPadConfig PinmuxPadConfigsCalcio[] = {
{ PinmuxPadIndex_PexL0ClkreqN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_PexL0RstN, 0x00000000, 0x0000027F },
{ PinmuxPadIndex_PexL1ClkreqN, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PexL1RstN, 0x00000000, 0x0000027F },
{ PinmuxPadIndex_PexWakeN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_Sdmmc1Clk, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Cmd, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat0, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat1, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat2, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat3, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Shutdown, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_LcdGpio2, 0x00000001, 0x0000007F },
{ PinmuxPadIndex_PwrI2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PwrI2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Clk32kIn, 0x00000020, 0x00000078 },
{ PinmuxPadIndex_Clk32kOut, 0x00000001, 0x0000007F },
{ PinmuxPadIndex_CorePwrReq, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_PwrIntN, 0x00000020, 0x00000078 },
{ PinmuxPadIndex_Gen1I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen1I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Uart1Tx, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart1Rx, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Uart1Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart1Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_JtagRtck, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Uart4Tx, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart4Rx, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Uart4Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart4Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap2Din, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap2Dout, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap2Fs, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap2Sclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_HdmiCec, 0x00000240, 0x0000027F },
{ PinmuxPadIndex_Dmic1Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic1Dat, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic2Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic2Dat, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic3Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPe6, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_Gen3I2cSda, 0x00000204, 0x0000027F },
{ PinmuxPadIndex_Cam1Pwdn, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_TempAlert, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonPowerOn, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ButtonVolUp, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonVolDown, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonHome, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ApReady, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPz1, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz3, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPk0, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk1, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk2, 0x00000044, 0x0000007F },
{ PinmuxPadIndex_GpioPk4, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPk6, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_Spi1Mosi, 0x0000000C, 0x0000007F },
{ PinmuxPadIndex_Spi1Miso, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_Spi1Sck, 0x0000000C, 0x0000007F },
{ PinmuxPadIndex_WifiEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_WifiRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_WifiWakeAp, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_ApWakeBt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtWakeAp, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPh6, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ApWakeNfc, 0x00000004, 0x0000007F },
{ PinmuxPadIndex_DpHpd0, 0x00000004, 0x0000007F },
{ PinmuxPadIndex_HdmiIntDpHpd, 0x00000024, 0x0000027F },
{ PinmuxPadIndex_AudMclk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_DvfsPwm, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_DvfsClk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioX1Aud, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioX3Aud, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap1Din, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap1Dout, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap1Fs, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap1Sclk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic3Dat, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPe7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Gen3I2cScl, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamI2cScl, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamI2cSda, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam1Mclk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam2Mclk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamAfEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamFlashEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam2Pwdn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam1Strobe, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_SataLedActive, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPa6, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Clk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Clkb, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Cmd, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dat0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dat1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dat2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dat3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dat4, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dat5, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dat6, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dat7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dqs, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dqsb, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Clk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Cmd, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_AlsProxInt, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_MotionInt, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_TouchRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_TouchClk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_TouchInt, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ModemWakeAp, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ButtonSlideSw, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdTe, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdBlPwm, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdBlEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdGpio1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPz0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPz2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPz4, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPz5, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ClkReq, 0x00000000, 0x00000018 },
{ PinmuxPadIndex_CpuPwrReq, 0x00000000, 0x00000018 },
{ PinmuxPadIndex_Dap4Din, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap4Dout, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap4Fs, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap4Sclk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Gen2I2cScl, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Gen2I2cSda, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart2Tx, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart2Rx, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart2Rts, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart2Cts, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPk3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPk5, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPk7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPl0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPl1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi4Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi4Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi4Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi4Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart3Tx, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart3Rx, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart3Rts, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart3Cts, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_NfcEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_NfcInt, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiSck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiCsN, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPcc7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_SpdifOut, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_SpdifIn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_UsbVbusEn0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_UsbVbusEn1, 0x00000005, 0x00000007 },
};
constexpr inline const size_t NumPinmuxPadConfigsCalcio = util::size(PinmuxPadConfigsCalcio);

View file

@ -0,0 +1,196 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pinmux_initial_config.py, do not edit manually. */
constexpr inline const PinmuxPadConfig PinmuxPadConfigsFive[] = {
{ PinmuxPadIndex_AudMclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap1Din, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap1Dout, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap1Fs, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap1Sclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Gen3I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen3I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PexL0ClkreqN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_PexL0RstN, 0x00000000, 0x0000027F },
{ PinmuxPadIndex_PexL1ClkreqN, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PexL1RstN, 0x00000000, 0x0000027F },
{ PinmuxPadIndex_PexWakeN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_Sdmmc1Clk, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Cmd, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat0, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat1, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat2, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat3, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Clk, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Cmd, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat0, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat1, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat2, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat3, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat4, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat5, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat6, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat7, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Shutdown, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_LcdGpio2, 0x00000001, 0x0000007F },
{ PinmuxPadIndex_PwrI2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PwrI2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Clk32kIn, 0x00000020, 0x00000078 },
{ PinmuxPadIndex_Clk32kOut, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_CorePwrReq, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_PwrIntN, 0x00000020, 0x00000078 },
{ PinmuxPadIndex_Gen1I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen1I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen2I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen2I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Uart2Rx, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart2Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart2Cts, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart1Tx, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart1Rx, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Uart1Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart1Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_JtagRtck, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_GpioPl1, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Spi4Mosi, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Spi4Miso, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Spi4Sck, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Spi4Cs0, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart3Rx, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart3Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart3Cts, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Uart4Tx, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart4Rx, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Uart4Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart4Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap2Din, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap2Dout, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap2Fs, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap2Sclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_HdmiIntDpHpd, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_GpioX1Aud, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioX3Aud, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_Dmic1Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic1Dat, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic2Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic2Dat, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic3Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPe6, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_CamI2cSda, 0x00000034, 0x0000027F },
{ PinmuxPadIndex_Cam2Mclk, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_CamFlashEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Cam1Pwdn, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_SataLedActive, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_AlsProxInt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_TempAlert, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_MotionInt, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_TouchRst, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_TouchInt, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonPowerOn, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ButtonVolUp, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonVolDown, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonSlideSw, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ButtonHome, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_LcdRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_ApReady, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPz0, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPz1, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz3, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz4, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dap4Sclk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Uart2Tx, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPk0, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk1, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk2, 0x00000044, 0x0000007F },
{ PinmuxPadIndex_GpioPk3, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPk4, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPk5, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPk6, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_Uart3Tx, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_WifiEn, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_WifiRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_WifiWakeAp, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_ApWakeBt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtWakeAp, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPh6, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ApWakeNfc, 0x00000004, 0x0000007F },
{ PinmuxPadIndex_SpdifIn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_DvfsPwm, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_DvfsClk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic3Dat, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPe7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamI2cScl, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam1Mclk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamAfEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam2Pwdn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam1Strobe, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPa6, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Clkb, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dqs, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dqsb, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Clk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Cmd, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_TouchClk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ModemWakeAp, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdTe, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdBlPwm, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdBlEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdGpio1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPz2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPz5, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ClkReq, 0x00000000, 0x00000000 },
{ PinmuxPadIndex_CpuPwrReq, 0x00000000, 0x00000000 },
{ PinmuxPadIndex_Dap4Din, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap4Dout, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap4Fs, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPk7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPl0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_NfcEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_NfcInt, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiSck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiCsN, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPcc7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_SpdifOut, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_UsbVbusEn0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_UsbVbusEn1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_DpHpd0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_HdmiCec, 0x00000005, 0x00000007 },
};
constexpr inline const size_t NumPinmuxPadConfigsFive = util::size(PinmuxPadConfigsFive);

View file

@ -0,0 +1,196 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pinmux_initial_config.py, do not edit manually. */
constexpr inline const PinmuxPadConfig PinmuxPadConfigsHoag[] = {
{ PinmuxPadIndex_AudMclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap1Din, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap1Dout, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap1Fs, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap1Sclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Gen3I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen3I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PexL0ClkreqN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_PexL0RstN, 0x00000000, 0x0000027F },
{ PinmuxPadIndex_PexL1ClkreqN, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PexL1RstN, 0x00000000, 0x0000027F },
{ PinmuxPadIndex_PexWakeN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_Sdmmc1Clk, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Cmd, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat0, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat1, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat2, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat3, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Clk, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Cmd, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat0, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat1, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat2, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat3, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat4, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat5, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat6, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat7, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_TouchClk, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Shutdown, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_LcdBlPwm, 0x00000001, 0x00000067 },
{ PinmuxPadIndex_LcdGpio2, 0x00000001, 0x0000007F },
{ PinmuxPadIndex_PwrI2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PwrI2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Clk32kIn, 0x00000020, 0x00000078 },
{ PinmuxPadIndex_Clk32kOut, 0x00000001, 0x0000007F },
{ PinmuxPadIndex_CorePwrReq, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_PwrIntN, 0x00000020, 0x00000078 },
{ PinmuxPadIndex_Gen1I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen1I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen2I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen2I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Uart1Tx, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart1Rx, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Uart1Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart1Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_JtagRtck, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_GpioPl1, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Uart3Tx, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart3Rx, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart3Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart3Cts, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Uart4Tx, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart4Rx, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Uart4Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart4Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap2Din, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap2Dout, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap2Fs, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap2Sclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_GpioX1Aud, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioX3Aud, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_Dmic1Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic1Dat, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic2Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic2Dat, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic3Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPe6, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPe7, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_CamI2cSda, 0x00000034, 0x0000027F },
{ PinmuxPadIndex_Cam2Mclk, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_CamFlashEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Cam1Pwdn, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Cam2Pwdn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Cam1Strobe, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_SataLedActive, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_AlsProxInt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_TempAlert, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_MotionInt, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_TouchRst, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_TouchInt, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonPowerOn, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ButtonVolUp, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonVolDown, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonSlideSw, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ButtonHome, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_LcdBlEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_LcdRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_LcdGpio1, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ApReady, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPz0, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPz1, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz3, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz4, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dap4Dout, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dap4Fs, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_Dap4Sclk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPk0, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk1, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk2, 0x00000044, 0x0000007F },
{ PinmuxPadIndex_GpioPk4, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPk5, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPk6, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPk7, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Spi4Mosi, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Spi4Miso, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Spi4Sck, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Spi4Cs0, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_WifiEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_WifiRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_WifiWakeAp, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_ApWakeBt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtWakeAp, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPh6, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ApWakeNfc, 0x00000004, 0x0000007F },
{ PinmuxPadIndex_NfcEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_NfcInt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_UsbVbusEn1, 0x00000204, 0x00000267 },
{ PinmuxPadIndex_DvfsPwm, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_DvfsClk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic3Dat, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamI2cScl, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam1Mclk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamAfEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPa6, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Clkb, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dqs, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dqsb, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Clk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Cmd, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Dat3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ModemWakeAp, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdTe, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPz2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPz5, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ClkReq, 0x00000000, 0x00000000 },
{ PinmuxPadIndex_CpuPwrReq, 0x00000000, 0x00000000 },
{ PinmuxPadIndex_Dap4Din, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart2Tx, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart2Rx, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart2Rts, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Uart2Cts, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPk3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPl0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiSck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiCsN, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPcc7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_SpdifOut, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_SpdifIn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_UsbVbusEn0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_DpHpd0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_HdmiIntDpHpd, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_HdmiCec, 0x00000005, 0x00000007 },
};
constexpr inline const size_t NumPinmuxPadConfigsHoag = util::size(PinmuxPadConfigsHoag);

View file

@ -0,0 +1,183 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pinmux_initial_config.py, do not edit manually. */
constexpr inline const PinmuxPadConfig PinmuxPadConfigsIcosa[] = {
{ PinmuxPadIndex_AudMclk, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Dap1Din, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap1Dout, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Dap1Fs, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Dap1Sclk, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Gen3I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen3I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PexL0ClkreqN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_PexL0RstN, 0x00000000, 0x00000267 },
{ PinmuxPadIndex_PexL1ClkreqN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_PexL1RstN, 0x00000000, 0x00000267 },
{ PinmuxPadIndex_PexWakeN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_Sdmmc1Clk, 0x00000048, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Cmd, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat0, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat1, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat2, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat3, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Shutdown, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_LcdBlPwm, 0x00000001, 0x00000067 },
{ PinmuxPadIndex_LcdGpio2, 0x00000001, 0x0000007F },
{ PinmuxPadIndex_PwrI2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PwrI2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Clk32kIn, 0x00000020, 0x00000078 },
{ PinmuxPadIndex_Clk32kOut, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_GpioPz5, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_CorePwrReq, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_CpuPwrReq, 0x00000000, 0x00000060 },
{ PinmuxPadIndex_PwrIntN, 0x00000030, 0x00000078 },
{ PinmuxPadIndex_Gen1I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen1I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen2I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen2I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Uart2Rx, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart2Rts, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Uart2Cts, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart1Tx, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Uart1Rx, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Uart1Rts, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Uart1Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_JtagRtck, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_GpioPl1, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Spi4Mosi, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Spi4Miso, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Spi4Sck, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Spi4Cs0, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Uart3Rx, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart3Rts, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Uart3Cts, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart4Tx, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Uart4Rx, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Uart4Rts, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Uart4Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_QspiIo0, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_QspiIo1, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_QspiSck, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_QspiCsN, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Dap2Din, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap2Dout, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Dap2Fs, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_Dap2Sclk, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_HdmiIntDpHpd, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_DvfsClk, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioX1Aud, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioX3Aud, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_Dmic3Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dmic3Dat, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPe6, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_CamI2cSda, 0x00000034, 0x0000027F },
{ PinmuxPadIndex_Cam1Mclk, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_Cam2Mclk, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_CamFlashEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Cam1Pwdn, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_SataLedActive, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Sdmmc3Clk, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_Sdmmc3Dat0, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Sdmmc3Dat1, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Sdmmc3Dat2, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Sdmmc3Dat3, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_TempAlert, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_MotionInt, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_TouchRst, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_TouchInt, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonPowerOn, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonVolUp, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonVolDown, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonSlideSw, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonHome, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_LcdBlEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_LcdRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_ApReady, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPz0, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz1, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz2, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_GpioPz3, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz4, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dap4Din, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dap4Sclk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Uart2Tx, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPk0, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk1, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk2, 0x00000044, 0x0000007F },
{ PinmuxPadIndex_GpioPk3, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPk4, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPk5, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPk6, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPk7, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPl0, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Uart3Tx, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_WifiEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_WifiRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_WifiWakeAp, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_ApWakeBt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtWakeAp, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPh6, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ApWakeNfc, 0x00000004, 0x0000007F },
{ PinmuxPadIndex_NfcEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_NfcInt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_SpdifOut, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_SpdifIn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_UsbVbusEn0, 0x00000004, 0x00000267 },
{ PinmuxPadIndex_DvfsPwm, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic1Clk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic1Dat, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic2Clk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic2Dat, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPe7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamI2cScl, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamAfEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam2Pwdn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam1Strobe, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPa6, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Cmd, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_AlsProxInt, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_TouchClk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ModemWakeAp, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdTe, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdGpio1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ClkReq, 0x00000000, 0x00000000 },
{ PinmuxPadIndex_Dap4Dout, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap4Fs, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPcc7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_UsbVbusEn1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_DpHpd0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_HdmiCec, 0x00000005, 0x00000007 },
};
constexpr inline const size_t NumPinmuxPadConfigsIcosa = util::size(PinmuxPadConfigsIcosa);

View file

@ -0,0 +1,196 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pinmux_initial_config.py, do not edit manually. */
constexpr inline const PinmuxPadConfig PinmuxPadConfigsIowa[] = {
{ PinmuxPadIndex_AudMclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap1Din, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap1Dout, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap1Fs, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap1Sclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Gen3I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen3I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PexL0ClkreqN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_PexL0RstN, 0x00000000, 0x0000027F },
{ PinmuxPadIndex_PexL1ClkreqN, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PexL1RstN, 0x00000000, 0x0000027F },
{ PinmuxPadIndex_PexWakeN, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_Sdmmc1Clk, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Cmd, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat0, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat1, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat2, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc1Dat3, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Clk, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Cmd, 0x00000040, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat0, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat1, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat2, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat3, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat4, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat5, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat6, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Sdmmc2Dat7, 0x00000050, 0x0000007F },
{ PinmuxPadIndex_Shutdown, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_LcdBlPwm, 0x00000001, 0x00000067 },
{ PinmuxPadIndex_LcdGpio2, 0x00000001, 0x0000007F },
{ PinmuxPadIndex_PwrI2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_PwrI2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Clk32kIn, 0x00000020, 0x00000078 },
{ PinmuxPadIndex_Clk32kOut, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_GpioPz5, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_CorePwrReq, 0x00000000, 0x00000078 },
{ PinmuxPadIndex_PwrIntN, 0x00000020, 0x00000078 },
{ PinmuxPadIndex_Gen1I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen1I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen2I2cScl, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Gen2I2cSda, 0x00000040, 0x0000027F },
{ PinmuxPadIndex_Uart2Rx, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart2Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart2Cts, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart1Tx, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart1Rx, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Uart1Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart1Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_JtagRtck, 0x00000000, 0x00000067 },
{ PinmuxPadIndex_GpioPl1, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Spi4Mosi, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Spi4Miso, 0x00000030, 0x0000007F },
{ PinmuxPadIndex_Spi4Sck, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Spi4Cs0, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart3Rx, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart3Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart3Cts, 0x00000020, 0x0000007F },
{ PinmuxPadIndex_Uart4Tx, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart4Rx, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Uart4Rts, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Uart4Cts, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap2Din, 0x00000028, 0x0000007F },
{ PinmuxPadIndex_Dap2Dout, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap2Fs, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_Dap2Sclk, 0x00000000, 0x0000007F },
{ PinmuxPadIndex_HdmiIntDpHpd, 0x00000020, 0x0000027F },
{ PinmuxPadIndex_DvfsClk, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioX1Aud, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioX3Aud, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_Dmic3Clk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPe6, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_CamI2cSda, 0x00000034, 0x0000027F },
{ PinmuxPadIndex_Cam1Mclk, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_Cam2Mclk, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_CamFlashEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Cam1Pwdn, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_SataLedActive, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Sdmmc3Clk, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_Sdmmc3Dat0, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Sdmmc3Dat1, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Sdmmc3Dat2, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_Sdmmc3Dat3, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_AlsProxInt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_TempAlert, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_MotionInt, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_TouchRst, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_TouchInt, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonPowerOn, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ButtonVolUp, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonVolDown, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_ButtonSlideSw, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ButtonHome, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_LcdBlEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_LcdRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_ApReady, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPz0, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPz1, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz2, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_GpioPz3, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPz4, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dap4Din, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Dap4Sclk, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Uart2Tx, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPk0, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk1, 0x0000004C, 0x0000007F },
{ PinmuxPadIndex_GpioPk2, 0x00000044, 0x0000007F },
{ PinmuxPadIndex_GpioPk3, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPk4, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPk5, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_GpioPk6, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_GpioPl0, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_Uart3Tx, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_WifiEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_WifiRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_WifiWakeAp, 0x0000002C, 0x0000007F },
{ PinmuxPadIndex_ApWakeBt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtRst, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_BtWakeAp, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_GpioPh6, 0x00000024, 0x0000007F },
{ PinmuxPadIndex_ApWakeNfc, 0x00000004, 0x0000007F },
{ PinmuxPadIndex_NfcEn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_NfcInt, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_SpdifOut, 0x00000034, 0x0000007F },
{ PinmuxPadIndex_SpdifIn, 0x00000004, 0x00000067 },
{ PinmuxPadIndex_UsbVbusEn0, 0x00000004, 0x00000267 },
{ PinmuxPadIndex_DvfsPwm, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi2Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic1Clk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic1Dat, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic2Clk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic2Dat, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dmic3Dat, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPe7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamI2cScl, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_CamAfEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam2Pwdn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Cam1Strobe, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPa6, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Clkb, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dqs, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc2Dqsb, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Sdmmc3Cmd, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_TouchClk, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ModemWakeAp, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdTe, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_LcdGpio1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_ClkReq, 0x00000000, 0x00000000 },
{ PinmuxPadIndex_CpuPwrReq, 0x00000000, 0x00000000 },
{ PinmuxPadIndex_Dap4Dout, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Dap4Fs, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPk7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Mosi, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Miso, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Sck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_Spi1Cs1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsEn, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpsRst, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiSck, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiCsN, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo2, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_QspiIo3, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_GpioPcc7, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_UsbVbusEn1, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_DpHpd0, 0x00000005, 0x00000007 },
{ PinmuxPadIndex_HdmiCec, 0x00000005, 0x00000007 },
};
constexpr inline const size_t NumPinmuxPadConfigsIowa = util::size(PinmuxPadConfigsIowa);

View file

@ -0,0 +1,197 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pinmux_character_gen.py, do not edit manually. */
constexpr inline const PinmuxPadCharacter PinmuxPadCharacters[] = {
{ PinmuxPadIndex_Sdmmc1Clk, 0x072FF, 0x01, "Sdmmc1Clk" },
{ PinmuxPadIndex_Sdmmc1Cmd, 0x072FF, 0x02, "Sdmmc1Cmd" },
{ PinmuxPadIndex_Sdmmc1Dat3, 0x072FF, 0x02, "Sdmmc1Dat3" },
{ PinmuxPadIndex_Sdmmc1Dat2, 0x072FF, 0x02, "Sdmmc1Dat2" },
{ PinmuxPadIndex_Sdmmc1Dat1, 0x072FF, 0x02, "Sdmmc1Dat1" },
{ PinmuxPadIndex_Sdmmc1Dat0, 0x072FF, 0x01, "Sdmmc1Dat0" },
{ PinmuxPadIndex_Sdmmc3Clk, 0x072FF, 0x01, "Sdmmc3Clk" },
{ PinmuxPadIndex_Sdmmc3Cmd, 0x072FF, 0x01, "Sdmmc3Cmd" },
{ PinmuxPadIndex_Sdmmc3Dat0, 0x072FF, 0x01, "Sdmmc3Dat0" },
{ PinmuxPadIndex_Sdmmc3Dat1, 0x072FF, 0x01, "Sdmmc3Dat1" },
{ PinmuxPadIndex_Sdmmc3Dat2, 0x072FF, 0x01, "Sdmmc3Dat2" },
{ PinmuxPadIndex_Sdmmc3Dat3, 0x072FF, 0x01, "Sdmmc3Dat3" },
{ PinmuxPadIndex_PexL0RstN, 0x01DFF, 0x01, "PexL0RstN" },
{ PinmuxPadIndex_PexL0ClkreqN, 0x01DFF, 0x01, "PexL0ClkreqN" },
{ PinmuxPadIndex_PexWakeN, 0x01DFF, 0x01, "PexWakeN" },
{ PinmuxPadIndex_PexL1RstN, 0x01DFF, 0x01, "PexL1RstN" },
{ PinmuxPadIndex_PexL1ClkreqN, 0x01DFF, 0x01, "PexL1ClkreqN" },
{ PinmuxPadIndex_SataLedActive, 0x019FF, 0x01, "SataLedActive" },
{ PinmuxPadIndex_Spi1Mosi, 0x1F2FF, 0x01, "Spi1Mosi" },
{ PinmuxPadIndex_Spi1Miso, 0x1F2FF, 0x01, "Spi1Miso" },
{ PinmuxPadIndex_Spi1Sck, 0x1F2FF, 0x01, "Spi1Sck" },
{ PinmuxPadIndex_Spi1Cs0, 0x1F2FF, 0x01, "Spi1Cs0" },
{ PinmuxPadIndex_Spi1Cs1, 0x1F2FF, 0x01, "Spi1Cs1" },
{ PinmuxPadIndex_Spi2Mosi, 0x072FF, 0x02, "Spi2Mosi" },
{ PinmuxPadIndex_Spi2Miso, 0x072FF, 0x02, "Spi2Miso" },
{ PinmuxPadIndex_Spi2Sck, 0x072FF, 0x02, "Spi2Sck" },
{ PinmuxPadIndex_Spi2Cs0, 0x072FF, 0x02, "Spi2Cs0" },
{ PinmuxPadIndex_Spi2Cs1, 0x072FF, 0x01, "Spi2Cs1" },
{ PinmuxPadIndex_Spi4Mosi, 0x1F2FF, 0x01, "Spi4Mosi" },
{ PinmuxPadIndex_Spi4Miso, 0x1F2FF, 0x01, "Spi4Miso" },
{ PinmuxPadIndex_Spi4Sck, 0x1F2FF, 0x01, "Spi4Sck" },
{ PinmuxPadIndex_Spi4Cs0, 0x1F2FF, 0x01, "Spi4Cs0" },
{ PinmuxPadIndex_QspiSck, 0x072FF, 0x01, "QspiSck" },
{ PinmuxPadIndex_QspiCsN, 0x072FF, 0x01, "QspiCsN" },
{ PinmuxPadIndex_QspiIo0, 0x072FF, 0x01, "QspiIo0" },
{ PinmuxPadIndex_QspiIo1, 0x072FF, 0x01, "QspiIo1" },
{ PinmuxPadIndex_QspiIo2, 0x072FF, 0x01, "QspiIo2" },
{ PinmuxPadIndex_QspiIo3, 0x072FF, 0x01, "QspiIo3" },
{ PinmuxPadIndex_Dmic1Clk, 0x019FF, 0x02, "Dmic1Clk" },
{ PinmuxPadIndex_Dmic1Dat, 0x019FF, 0x02, "Dmic1Dat" },
{ PinmuxPadIndex_Dmic2Clk, 0x019FF, 0x02, "Dmic2Clk" },
{ PinmuxPadIndex_Dmic2Dat, 0x019FF, 0x02, "Dmic2Dat" },
{ PinmuxPadIndex_Dmic3Clk, 0x019FF, 0x02, "Dmic3Clk" },
{ PinmuxPadIndex_Dmic3Dat, 0x019FF, 0x02, "Dmic3Dat" },
{ PinmuxPadIndex_Gen1I2cScl, 0x01DFF, 0x01, "Gen1I2cScl" },
{ PinmuxPadIndex_Gen1I2cSda, 0x01DFF, 0x01, "Gen1I2cSda" },
{ PinmuxPadIndex_Gen2I2cScl, 0x01DFF, 0x01, "Gen2I2cScl" },
{ PinmuxPadIndex_Gen2I2cSda, 0x01DFF, 0x01, "Gen2I2cSda" },
{ PinmuxPadIndex_Gen3I2cScl, 0x01DFF, 0x01, "Gen3I2cScl" },
{ PinmuxPadIndex_Gen3I2cSda, 0x01DFF, 0x01, "Gen3I2cSda" },
{ PinmuxPadIndex_CamI2cScl, 0x01DFF, 0x02, "CamI2cScl" },
{ PinmuxPadIndex_CamI2cSda, 0x01DFF, 0x02, "CamI2cSda" },
{ PinmuxPadIndex_PwrI2cScl, 0x01DFF, 0x01, "PwrI2cScl" },
{ PinmuxPadIndex_PwrI2cSda, 0x01DFF, 0x01, "PwrI2cSda" },
{ PinmuxPadIndex_Uart1Tx, 0x019FF, 0x01, "Uart1Tx" },
{ PinmuxPadIndex_Uart1Rx, 0x019FF, 0x01, "Uart1Rx" },
{ PinmuxPadIndex_Uart1Rts, 0x019FF, 0x01, "Uart1Rts" },
{ PinmuxPadIndex_Uart1Cts, 0x019FF, 0x01, "Uart1Cts" },
{ PinmuxPadIndex_Uart2Tx, 0x019FF, 0x00, "Uart2Tx" },
{ PinmuxPadIndex_Uart2Rx, 0x019FF, 0x00, "Uart2Rx" },
{ PinmuxPadIndex_Uart2Rts, 0x019FF, 0x02, "Uart2Rts" },
{ PinmuxPadIndex_Uart2Cts, 0x019FF, 0x02, "Uart2Cts" },
{ PinmuxPadIndex_Uart3Tx, 0x019FF, 0x02, "Uart3Tx" },
{ PinmuxPadIndex_Uart3Rx, 0x019FF, 0x02, "Uart3Rx" },
{ PinmuxPadIndex_Uart3Rts, 0x019FF, 0x02, "Uart3Rts" },
{ PinmuxPadIndex_Uart3Cts, 0x019FF, 0x02, "Uart3Cts" },
{ PinmuxPadIndex_Uart4Tx, 0x019FF, 0x02, "Uart4Tx" },
{ PinmuxPadIndex_Uart4Rx, 0x019FF, 0x02, "Uart4Rx" },
{ PinmuxPadIndex_Uart4Rts, 0x019FF, 0x02, "Uart4Rts" },
{ PinmuxPadIndex_Uart4Cts, 0x019FF, 0x02, "Uart4Cts" },
{ PinmuxPadIndex_Dap1Fs, 0x072FF, 0x01, "Dap1Fs" },
{ PinmuxPadIndex_Dap1Din, 0x072FF, 0x01, "Dap1Din" },
{ PinmuxPadIndex_Dap1Dout, 0x072FF, 0x01, "Dap1Dout" },
{ PinmuxPadIndex_Dap1Sclk, 0x072FF, 0x01, "Dap1Sclk" },
{ PinmuxPadIndex_Dap2Fs, 0x072FF, 0x01, "Dap2Fs" },
{ PinmuxPadIndex_Dap2Din, 0x072FF, 0x01, "Dap2Din" },
{ PinmuxPadIndex_Dap2Dout, 0x072FF, 0x01, "Dap2Dout" },
{ PinmuxPadIndex_Dap2Sclk, 0x072FF, 0x01, "Dap2Sclk" },
{ PinmuxPadIndex_Dap4Fs, 0x072FF, 0x01, "Dap4Fs" },
{ PinmuxPadIndex_Dap4Din, 0x072FF, 0x01, "Dap4Din" },
{ PinmuxPadIndex_Dap4Dout, 0x072FF, 0x01, "Dap4Dout" },
{ PinmuxPadIndex_Dap4Sclk, 0x072FF, 0x01, "Dap4Sclk" },
{ PinmuxPadIndex_Cam1Mclk, 0x072FF, 0x01, "Cam1Mclk" },
{ PinmuxPadIndex_Cam2Mclk, 0x072FF, 0x01, "Cam2Mclk" },
{ PinmuxPadIndex_JtagRtck, 0x072FF, 0x01, "JtagRtck" },
{ PinmuxPadIndex_Clk32kIn, 0x0118C, 0xFF, "Clk32kIn" },
{ PinmuxPadIndex_Clk32kOut, 0x072FF, 0x02, "Clk32kOut" },
{ PinmuxPadIndex_BattBcl, 0x01DFF, 0x01, "BattBcl" },
{ PinmuxPadIndex_ClkReq, 0x011CC, 0xFF, "ClkReq" },
{ PinmuxPadIndex_CpuPwrReq, 0x011CC, 0xFF, "CpuPwrReq" },
{ PinmuxPadIndex_PwrIntN, 0x011CC, 0xFF, "PwrIntN" },
{ PinmuxPadIndex_Shutdown, 0x011CC, 0xFF, "Shutdown" },
{ PinmuxPadIndex_CorePwrReq, 0x011CC, 0xFF, "CorePwrReq" },
{ PinmuxPadIndex_AudMclk, 0x019FF, 0x01, "AudMclk" },
{ PinmuxPadIndex_DvfsPwm, 0x019FF, 0x00, "DvfsPwm" },
{ PinmuxPadIndex_DvfsClk, 0x019FF, 0x00, "DvfsClk" },
{ PinmuxPadIndex_GpioX1Aud, 0x019FF, 0x00, "GpioX1Aud" },
{ PinmuxPadIndex_GpioX3Aud, 0x019FF, 0x00, "GpioX3Aud" },
{ PinmuxPadIndex_GpioPcc7, 0x01DFF, 0x00, "GpioPcc7" },
{ PinmuxPadIndex_HdmiCec, 0x01DFF, 0x01, "HdmiCec" },
{ PinmuxPadIndex_HdmiIntDpHpd, 0x01DFF, 0x01, "HdmiIntDpHpd" },
{ PinmuxPadIndex_SpdifOut, 0x019FF, 0x01, "SpdifOut" },
{ PinmuxPadIndex_SpdifIn, 0x019FF, 0x01, "SpdifIn" },
{ PinmuxPadIndex_UsbVbusEn0, 0x01DFF, 0x01, "UsbVbusEn0" },
{ PinmuxPadIndex_UsbVbusEn1, 0x01DFF, 0x01, "UsbVbusEn1" },
{ PinmuxPadIndex_DpHpd0, 0x019FF, 0x01, "DpHpd0" },
{ PinmuxPadIndex_WifiEn, 0x019FF, 0x00, "WifiEn" },
{ PinmuxPadIndex_WifiRst, 0x019FF, 0x00, "WifiRst" },
{ PinmuxPadIndex_WifiWakeAp, 0x019FF, 0x00, "WifiWakeAp" },
{ PinmuxPadIndex_ApWakeBt, 0x019FF, 0x00, "ApWakeBt" },
{ PinmuxPadIndex_BtRst, 0x019FF, 0x00, "BtRst" },
{ PinmuxPadIndex_BtWakeAp, 0x019FF, 0x00, "BtWakeAp" },
{ PinmuxPadIndex_ApWakeNfc, 0x019FF, 0x00, "ApWakeNfc" },
{ PinmuxPadIndex_NfcEn, 0x019FF, 0x00, "NfcEn" },
{ PinmuxPadIndex_NfcInt, 0x019FF, 0x00, "NfcInt" },
{ PinmuxPadIndex_GpsEn, 0x019FF, 0x00, "GpsEn" },
{ PinmuxPadIndex_GpsRst, 0x019FF, 0x00, "GpsRst" },
{ PinmuxPadIndex_CamRst, 0x019FF, 0x01, "CamRst" },
{ PinmuxPadIndex_CamAfEn, 0x019FF, 0x02, "CamAfEn" },
{ PinmuxPadIndex_CamFlashEn, 0x019FF, 0x02, "CamFlashEn" },
{ PinmuxPadIndex_Cam1Pwdn, 0x019FF, 0x01, "Cam1Pwdn" },
{ PinmuxPadIndex_Cam2Pwdn, 0x019FF, 0x01, "Cam2Pwdn" },
{ PinmuxPadIndex_Cam1Strobe, 0x019FF, 0x01, "Cam1Strobe" },
{ PinmuxPadIndex_LcdTe, 0x019FF, 0x01, "LcdTe" },
{ PinmuxPadIndex_LcdBlPwm, 0x019FF, 0x03, "LcdBlPwm" },
{ PinmuxPadIndex_LcdBlEn, 0x019FF, 0x00, "LcdBlEn" },
{ PinmuxPadIndex_LcdRst, 0x019FF, 0x00, "LcdRst" },
{ PinmuxPadIndex_LcdGpio1, 0x019FF, 0x01, "LcdGpio1" },
{ PinmuxPadIndex_LcdGpio2, 0x019FF, 0x02, "LcdGpio2" },
{ PinmuxPadIndex_ApReady, 0x019FF, 0x00, "ApReady" },
{ PinmuxPadIndex_TouchRst, 0x019FF, 0x00, "TouchRst" },
{ PinmuxPadIndex_TouchClk, 0x019FF, 0x01, "TouchClk" },
{ PinmuxPadIndex_ModemWakeAp, 0x019FF, 0x00, "ModemWakeAp" },
{ PinmuxPadIndex_TouchInt, 0x019FF, 0x00, "TouchInt" },
{ PinmuxPadIndex_MotionInt, 0x019FF, 0x00, "MotionInt" },
{ PinmuxPadIndex_AlsProxInt, 0x019FF, 0x00, "AlsProxInt" },
{ PinmuxPadIndex_TempAlert, 0x019FF, 0x00, "TempAlert" },
{ PinmuxPadIndex_ButtonPowerOn, 0x019FF, 0x00, "ButtonPowerOn" },
{ PinmuxPadIndex_ButtonVolUp, 0x019FF, 0x00, "ButtonVolUp" },
{ PinmuxPadIndex_ButtonVolDown, 0x019FF, 0x00, "ButtonVolDown" },
{ PinmuxPadIndex_ButtonSlideSw, 0x019FF, 0x00, "ButtonSlideSw" },
{ PinmuxPadIndex_ButtonHome, 0x019FF, 0x00, "ButtonHome" },
{ PinmuxPadIndex_GpioPa6, 0x019FF, 0x01, "GpioPa6" },
{ PinmuxPadIndex_GpioPe6, 0x019FF, 0x00, "GpioPe6" },
{ PinmuxPadIndex_GpioPe7, 0x019FF, 0x00, "GpioPe7" },
{ PinmuxPadIndex_GpioPh6, 0x019FF, 0x00, "GpioPh6" },
{ PinmuxPadIndex_GpioPk0, 0x072FF, 0x02, "GpioPk0" },
{ PinmuxPadIndex_GpioPk1, 0x072FF, 0x02, "GpioPk1" },
{ PinmuxPadIndex_GpioPk2, 0x072FF, 0x02, "GpioPk2" },
{ PinmuxPadIndex_GpioPk3, 0x072FF, 0x02, "GpioPk3" },
{ PinmuxPadIndex_GpioPk4, 0x072FF, 0x01, "GpioPk4" },
{ PinmuxPadIndex_GpioPk5, 0x072FF, 0x01, "GpioPk5" },
{ PinmuxPadIndex_GpioPk6, 0x072FF, 0x01, "GpioPk6" },
{ PinmuxPadIndex_GpioPk7, 0x072FF, 0x01, "GpioPk7" },
{ PinmuxPadIndex_GpioPl0, 0x072FF, 0x00, "GpioPl0" },
{ PinmuxPadIndex_GpioPl1, 0x072FF, 0x01, "GpioPl1" },
{ PinmuxPadIndex_GpioPz0, 0x072FF, 0x01, "GpioPz0" },
{ PinmuxPadIndex_GpioPz1, 0x072FF, 0x02, "GpioPz1" },
{ PinmuxPadIndex_GpioPz2, 0x072FF, 0x02, "GpioPz2" },
{ PinmuxPadIndex_GpioPz3, 0x072FF, 0x01, "GpioPz3" },
{ PinmuxPadIndex_GpioPz4, 0x072FF, 0x01, "GpioPz4" },
{ PinmuxPadIndex_GpioPz5, 0x072FF, 0x01, "GpioPz5" },
{ PinmuxPadIndex_Sdmmc2Dat0, 0x1F2FF, 0x02, "Sdmmc2Dat0" },
{ PinmuxPadIndex_Sdmmc2Dat1, 0x1F2FF, 0x02, "Sdmmc2Dat1" },
{ PinmuxPadIndex_Sdmmc2Dat2, 0x1F2FF, 0x02, "Sdmmc2Dat2" },
{ PinmuxPadIndex_Sdmmc2Dat3, 0x1F2FF, 0x02, "Sdmmc2Dat3" },
{ PinmuxPadIndex_Sdmmc2Dat4, 0x1F2FF, 0x02, "Sdmmc2Dat4" },
{ PinmuxPadIndex_Sdmmc2Dat5, 0x1F2FF, 0x02, "Sdmmc2Dat5" },
{ PinmuxPadIndex_Sdmmc2Dat6, 0x1F2FF, 0x02, "Sdmmc2Dat6" },
{ PinmuxPadIndex_Sdmmc2Dat7, 0x1F2FF, 0x02, "Sdmmc2Dat7" },
{ PinmuxPadIndex_Sdmmc2Clk, 0x1F2FF, 0x02, "Sdmmc2Clk" },
{ PinmuxPadIndex_Sdmmc2Clkb, 0x1F2FF, 0x00, "Sdmmc2Clkb" },
{ PinmuxPadIndex_Sdmmc2Cmd, 0x1F2FF, 0x02, "Sdmmc2Cmd" },
{ PinmuxPadIndex_Sdmmc2Dqs, 0x1F2FF, 0x00, "Sdmmc2Dqs" },
{ PinmuxPadIndex_Sdmmc2Dqsb, 0x1F2FF, 0x00, "Sdmmc2Dqsb" },
};
constexpr inline size_t NumPinmuxPadCharacters = util::size(PinmuxPadCharacters);

View file

@ -0,0 +1,348 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pinmux_character_gen.py, do not edit manually. */
#pragma once
enum PinmuxPadIndex {
PinmuxPadIndex_Sdmmc1Clk = 0,
PinmuxPadIndex_Sdmmc1Cmd = 1,
PinmuxPadIndex_Sdmmc1Dat3 = 2,
PinmuxPadIndex_Sdmmc1Dat2 = 3,
PinmuxPadIndex_Sdmmc1Dat1 = 4,
PinmuxPadIndex_Sdmmc1Dat0 = 5,
PinmuxPadIndex_Sdmmc3Clk = 6,
PinmuxPadIndex_Sdmmc3Cmd = 7,
PinmuxPadIndex_Sdmmc3Dat0 = 8,
PinmuxPadIndex_Sdmmc3Dat1 = 9,
PinmuxPadIndex_Sdmmc3Dat2 = 10,
PinmuxPadIndex_Sdmmc3Dat3 = 11,
PinmuxPadIndex_PexL0RstN = 12,
PinmuxPadIndex_PexL0ClkreqN = 13,
PinmuxPadIndex_PexWakeN = 14,
PinmuxPadIndex_PexL1RstN = 15,
PinmuxPadIndex_PexL1ClkreqN = 16,
PinmuxPadIndex_SataLedActive = 17,
PinmuxPadIndex_Spi1Mosi = 18,
PinmuxPadIndex_Spi1Miso = 19,
PinmuxPadIndex_Spi1Sck = 20,
PinmuxPadIndex_Spi1Cs0 = 21,
PinmuxPadIndex_Spi1Cs1 = 22,
PinmuxPadIndex_Spi2Mosi = 23,
PinmuxPadIndex_Spi2Miso = 24,
PinmuxPadIndex_Spi2Sck = 25,
PinmuxPadIndex_Spi2Cs0 = 26,
PinmuxPadIndex_Spi2Cs1 = 27,
PinmuxPadIndex_Spi4Mosi = 28,
PinmuxPadIndex_Spi4Miso = 29,
PinmuxPadIndex_Spi4Sck = 30,
PinmuxPadIndex_Spi4Cs0 = 31,
PinmuxPadIndex_QspiSck = 32,
PinmuxPadIndex_QspiCsN = 33,
PinmuxPadIndex_QspiIo0 = 34,
PinmuxPadIndex_QspiIo1 = 35,
PinmuxPadIndex_QspiIo2 = 36,
PinmuxPadIndex_QspiIo3 = 37,
PinmuxPadIndex_Dmic1Clk = 38,
PinmuxPadIndex_Dmic1Dat = 39,
PinmuxPadIndex_Dmic2Clk = 40,
PinmuxPadIndex_Dmic2Dat = 41,
PinmuxPadIndex_Dmic3Clk = 42,
PinmuxPadIndex_Dmic3Dat = 43,
PinmuxPadIndex_Gen1I2cScl = 44,
PinmuxPadIndex_Gen1I2cSda = 45,
PinmuxPadIndex_Gen2I2cScl = 46,
PinmuxPadIndex_Gen2I2cSda = 47,
PinmuxPadIndex_Gen3I2cScl = 48,
PinmuxPadIndex_Gen3I2cSda = 49,
PinmuxPadIndex_CamI2cScl = 50,
PinmuxPadIndex_CamI2cSda = 51,
PinmuxPadIndex_PwrI2cScl = 52,
PinmuxPadIndex_PwrI2cSda = 53,
PinmuxPadIndex_Uart1Tx = 54,
PinmuxPadIndex_Uart1Rx = 55,
PinmuxPadIndex_Uart1Rts = 56,
PinmuxPadIndex_Uart1Cts = 57,
PinmuxPadIndex_Uart2Tx = 58,
PinmuxPadIndex_Uart2Rx = 59,
PinmuxPadIndex_Uart2Rts = 60,
PinmuxPadIndex_Uart2Cts = 61,
PinmuxPadIndex_Uart3Tx = 62,
PinmuxPadIndex_Uart3Rx = 63,
PinmuxPadIndex_Uart3Rts = 64,
PinmuxPadIndex_Uart3Cts = 65,
PinmuxPadIndex_Uart4Tx = 66,
PinmuxPadIndex_Uart4Rx = 67,
PinmuxPadIndex_Uart4Rts = 68,
PinmuxPadIndex_Uart4Cts = 69,
PinmuxPadIndex_Dap1Fs = 70,
PinmuxPadIndex_Dap1Din = 71,
PinmuxPadIndex_Dap1Dout = 72,
PinmuxPadIndex_Dap1Sclk = 73,
PinmuxPadIndex_Dap2Fs = 74,
PinmuxPadIndex_Dap2Din = 75,
PinmuxPadIndex_Dap2Dout = 76,
PinmuxPadIndex_Dap2Sclk = 77,
PinmuxPadIndex_Dap4Fs = 78,
PinmuxPadIndex_Dap4Din = 79,
PinmuxPadIndex_Dap4Dout = 80,
PinmuxPadIndex_Dap4Sclk = 81,
PinmuxPadIndex_Cam1Mclk = 82,
PinmuxPadIndex_Cam2Mclk = 83,
PinmuxPadIndex_JtagRtck = 84,
PinmuxPadIndex_Clk32kIn = 85,
PinmuxPadIndex_Clk32kOut = 86,
PinmuxPadIndex_BattBcl = 87,
PinmuxPadIndex_ClkReq = 88,
PinmuxPadIndex_CpuPwrReq = 89,
PinmuxPadIndex_PwrIntN = 90,
PinmuxPadIndex_Shutdown = 91,
PinmuxPadIndex_CorePwrReq = 92,
PinmuxPadIndex_AudMclk = 93,
PinmuxPadIndex_DvfsPwm = 94,
PinmuxPadIndex_DvfsClk = 95,
PinmuxPadIndex_GpioX1Aud = 96,
PinmuxPadIndex_GpioX3Aud = 97,
PinmuxPadIndex_GpioPcc7 = 98,
PinmuxPadIndex_HdmiCec = 99,
PinmuxPadIndex_HdmiIntDpHpd = 100,
PinmuxPadIndex_SpdifOut = 101,
PinmuxPadIndex_SpdifIn = 102,
PinmuxPadIndex_UsbVbusEn0 = 103,
PinmuxPadIndex_UsbVbusEn1 = 104,
PinmuxPadIndex_DpHpd0 = 105,
PinmuxPadIndex_WifiEn = 106,
PinmuxPadIndex_WifiRst = 107,
PinmuxPadIndex_WifiWakeAp = 108,
PinmuxPadIndex_ApWakeBt = 109,
PinmuxPadIndex_BtRst = 110,
PinmuxPadIndex_BtWakeAp = 111,
PinmuxPadIndex_ApWakeNfc = 112,
PinmuxPadIndex_NfcEn = 113,
PinmuxPadIndex_NfcInt = 114,
PinmuxPadIndex_GpsEn = 115,
PinmuxPadIndex_GpsRst = 116,
PinmuxPadIndex_CamRst = 117,
PinmuxPadIndex_CamAfEn = 118,
PinmuxPadIndex_CamFlashEn = 119,
PinmuxPadIndex_Cam1Pwdn = 120,
PinmuxPadIndex_Cam2Pwdn = 121,
PinmuxPadIndex_Cam1Strobe = 122,
PinmuxPadIndex_LcdTe = 123,
PinmuxPadIndex_LcdBlPwm = 124,
PinmuxPadIndex_LcdBlEn = 125,
PinmuxPadIndex_LcdRst = 126,
PinmuxPadIndex_LcdGpio1 = 127,
PinmuxPadIndex_LcdGpio2 = 128,
PinmuxPadIndex_ApReady = 129,
PinmuxPadIndex_TouchRst = 130,
PinmuxPadIndex_TouchClk = 131,
PinmuxPadIndex_ModemWakeAp = 132,
PinmuxPadIndex_TouchInt = 133,
PinmuxPadIndex_MotionInt = 134,
PinmuxPadIndex_AlsProxInt = 135,
PinmuxPadIndex_TempAlert = 136,
PinmuxPadIndex_ButtonPowerOn = 137,
PinmuxPadIndex_ButtonVolUp = 138,
PinmuxPadIndex_ButtonVolDown = 139,
PinmuxPadIndex_ButtonSlideSw = 140,
PinmuxPadIndex_ButtonHome = 141,
PinmuxPadIndex_GpioPa6 = 142,
PinmuxPadIndex_GpioPe6 = 143,
PinmuxPadIndex_GpioPe7 = 144,
PinmuxPadIndex_GpioPh6 = 145,
PinmuxPadIndex_GpioPk0 = 146,
PinmuxPadIndex_GpioPk1 = 147,
PinmuxPadIndex_GpioPk2 = 148,
PinmuxPadIndex_GpioPk3 = 149,
PinmuxPadIndex_GpioPk4 = 150,
PinmuxPadIndex_GpioPk5 = 151,
PinmuxPadIndex_GpioPk6 = 152,
PinmuxPadIndex_GpioPk7 = 153,
PinmuxPadIndex_GpioPl0 = 154,
PinmuxPadIndex_GpioPl1 = 155,
PinmuxPadIndex_GpioPz0 = 156,
PinmuxPadIndex_GpioPz1 = 157,
PinmuxPadIndex_GpioPz2 = 158,
PinmuxPadIndex_GpioPz3 = 159,
PinmuxPadIndex_GpioPz4 = 160,
PinmuxPadIndex_GpioPz5 = 161,
PinmuxPadIndex_Sdmmc2Dat0 = 162,
PinmuxPadIndex_Sdmmc2Dat1 = 163,
PinmuxPadIndex_Sdmmc2Dat2 = 164,
PinmuxPadIndex_Sdmmc2Dat3 = 165,
PinmuxPadIndex_Sdmmc2Dat4 = 166,
PinmuxPadIndex_Sdmmc2Dat5 = 167,
PinmuxPadIndex_Sdmmc2Dat6 = 168,
PinmuxPadIndex_Sdmmc2Dat7 = 169,
PinmuxPadIndex_Sdmmc2Clk = 170,
PinmuxPadIndex_Sdmmc2Clkb = 171,
PinmuxPadIndex_Sdmmc2Cmd = 172,
PinmuxPadIndex_Sdmmc2Dqs = 173,
PinmuxPadIndex_Sdmmc2Dqsb = 174,
};
enum PinmuxDrivePadIndex {
PinmuxDrivePadIndex_AlsProxInt = 0,
PinmuxDrivePadIndex_ApReady = 1,
PinmuxDrivePadIndex_ApWakeBt = 2,
PinmuxDrivePadIndex_ApWakeNfc = 3,
PinmuxDrivePadIndex_AudMclk = 4,
PinmuxDrivePadIndex_BattBcl = 5,
PinmuxDrivePadIndex_BtRst = 6,
PinmuxDrivePadIndex_BtWakeAp = 7,
PinmuxDrivePadIndex_ButtonHome = 8,
PinmuxDrivePadIndex_ButtonPowerOn = 9,
PinmuxDrivePadIndex_ButtonSlideSw = 10,
PinmuxDrivePadIndex_ButtonVolDown = 11,
PinmuxDrivePadIndex_ButtonVolUp = 12,
PinmuxDrivePadIndex_Cam1Mclk = 13,
PinmuxDrivePadIndex_Cam1Pwdn = 14,
PinmuxDrivePadIndex_Cam1Strobe = 15,
PinmuxDrivePadIndex_Cam2Mclk = 16,
PinmuxDrivePadIndex_Cam2Pwdn = 17,
PinmuxDrivePadIndex_CamAfEn = 18,
PinmuxDrivePadIndex_CamFlashEn = 19,
PinmuxDrivePadIndex_CamI2cScl = 20,
PinmuxDrivePadIndex_CamI2cSda = 21,
PinmuxDrivePadIndex_CamRst = 22,
PinmuxDrivePadIndex_Clk32kIn = 23,
PinmuxDrivePadIndex_Clk32kOut = 24,
PinmuxDrivePadIndex_ClkReq = 25,
PinmuxDrivePadIndex_CorePwrReq = 26,
PinmuxDrivePadIndex_CpuPwrReq = 27,
PinmuxDrivePadIndex_Dap1Din = 28,
PinmuxDrivePadIndex_Dap1Dout = 29,
PinmuxDrivePadIndex_Dap1Fs = 30,
PinmuxDrivePadIndex_Dap1Sclk = 31,
PinmuxDrivePadIndex_Dap2Din = 32,
PinmuxDrivePadIndex_Dap2Dout = 33,
PinmuxDrivePadIndex_Dap2Fs = 34,
PinmuxDrivePadIndex_Dap2Sclk = 35,
PinmuxDrivePadIndex_Dap4Din = 36,
PinmuxDrivePadIndex_Dap4Dout = 37,
PinmuxDrivePadIndex_Dap4Fs = 38,
PinmuxDrivePadIndex_Dap4Sclk = 39,
PinmuxDrivePadIndex_Dmic1Clk = 40,
PinmuxDrivePadIndex_Dmic1Dat = 41,
PinmuxDrivePadIndex_Dmic2Clk = 42,
PinmuxDrivePadIndex_Dmic2Dat = 43,
PinmuxDrivePadIndex_Dmic3Clk = 44,
PinmuxDrivePadIndex_Dmic3Dat = 45,
PinmuxDrivePadIndex_DpHpd = 46,
PinmuxDrivePadIndex_DvfsClk = 47,
PinmuxDrivePadIndex_DvfsPwm = 48,
PinmuxDrivePadIndex_Gen1I2cScl = 49,
PinmuxDrivePadIndex_Gen1I2cSda = 50,
PinmuxDrivePadIndex_Gen2I2cScl = 51,
PinmuxDrivePadIndex_Gen2I2cSda = 52,
PinmuxDrivePadIndex_Gen3I2cScl = 53,
PinmuxDrivePadIndex_Gen3I2cSda = 54,
PinmuxDrivePadIndex_GpioPa6 = 55,
PinmuxDrivePadIndex_GpioPcc7 = 56,
PinmuxDrivePadIndex_GpioPe6 = 57,
PinmuxDrivePadIndex_GpioPe7 = 58,
PinmuxDrivePadIndex_GpioPh6 = 59,
PinmuxDrivePadIndex_GpioPk0 = 60,
PinmuxDrivePadIndex_GpioPk1 = 61,
PinmuxDrivePadIndex_GpioPk2 = 62,
PinmuxDrivePadIndex_GpioPk3 = 63,
PinmuxDrivePadIndex_GpioPk4 = 64,
PinmuxDrivePadIndex_GpioPk5 = 65,
PinmuxDrivePadIndex_GpioPk6 = 66,
PinmuxDrivePadIndex_GpioPk7 = 67,
PinmuxDrivePadIndex_GpioPl0 = 68,
PinmuxDrivePadIndex_GpioPl1 = 69,
PinmuxDrivePadIndex_GpioPz0 = 70,
PinmuxDrivePadIndex_GpioPz1 = 71,
PinmuxDrivePadIndex_GpioPz2 = 72,
PinmuxDrivePadIndex_GpioPz3 = 73,
PinmuxDrivePadIndex_GpioPz4 = 74,
PinmuxDrivePadIndex_GpioPz5 = 75,
PinmuxDrivePadIndex_GpioX1Aud = 76,
PinmuxDrivePadIndex_GpioX3Aud = 77,
PinmuxDrivePadIndex_GpsEn = 78,
PinmuxDrivePadIndex_GpsRst = 79,
PinmuxDrivePadIndex_HdmiCec = 80,
PinmuxDrivePadIndex_HdmiIntDpHpd = 81,
PinmuxDrivePadIndex_JtagRtck = 82,
PinmuxDrivePadIndex_LcdBlEn = 83,
PinmuxDrivePadIndex_LcdBlPwm = 84,
PinmuxDrivePadIndex_LcdGpio1 = 85,
PinmuxDrivePadIndex_LcdGpio2 = 86,
PinmuxDrivePadIndex_LcdRst = 87,
PinmuxDrivePadIndex_LcdTe = 88,
PinmuxDrivePadIndex_ModemWakeAp = 89,
PinmuxDrivePadIndex_MotionInt = 90,
PinmuxDrivePadIndex_NfcEn = 91,
PinmuxDrivePadIndex_NfcInt = 92,
PinmuxDrivePadIndex_PexL0ClkReqN = 93,
PinmuxDrivePadIndex_PexL0RstN = 94,
PinmuxDrivePadIndex_PexL1ClkreqN = 95,
PinmuxDrivePadIndex_PexL1RstN = 96,
PinmuxDrivePadIndex_PexWakeN = 97,
PinmuxDrivePadIndex_PwrI2cScl = 98,
PinmuxDrivePadIndex_PwrI2cSda = 99,
PinmuxDrivePadIndex_PwrIntN = 100,
PinmuxDrivePadIndex_QspiComp = 101,
PinmuxDrivePadIndex_QspiSck = 102,
PinmuxDrivePadIndex_SataLedActive = 103,
PinmuxDrivePadIndex_Sdmmc1Pad = 104,
PinmuxDrivePadIndex_Sdmmc3Pad = 105,
PinmuxDrivePadIndex_Shutdown = 106,
PinmuxDrivePadIndex_SpdifIn = 107,
PinmuxDrivePadIndex_SpdifOut = 108,
PinmuxDrivePadIndex_Spi1Cs0 = 109,
PinmuxDrivePadIndex_Spi1Cs1 = 110,
PinmuxDrivePadIndex_Spi1Miso = 111,
PinmuxDrivePadIndex_Spi1Mosi = 112,
PinmuxDrivePadIndex_Spi1Sck = 113,
PinmuxDrivePadIndex_Spi2Cs0 = 114,
PinmuxDrivePadIndex_Spi2Cs1 = 115,
PinmuxDrivePadIndex_Spi2Miso = 116,
PinmuxDrivePadIndex_Spi2Mosi = 117,
PinmuxDrivePadIndex_Spi2Sck = 118,
PinmuxDrivePadIndex_Spi4Cs0 = 119,
PinmuxDrivePadIndex_Spi4Miso = 120,
PinmuxDrivePadIndex_Spi4Mosi = 121,
PinmuxDrivePadIndex_Spi4Sck = 122,
PinmuxDrivePadIndex_TempAlert = 123,
PinmuxDrivePadIndex_TouchClk = 124,
PinmuxDrivePadIndex_TouchInt = 125,
PinmuxDrivePadIndex_TouchRst = 126,
PinmuxDrivePadIndex_Uart1Cts = 127,
PinmuxDrivePadIndex_Uart1Rts = 128,
PinmuxDrivePadIndex_Uart1Rx = 129,
PinmuxDrivePadIndex_Uart1Tx = 130,
PinmuxDrivePadIndex_Uart2Cts = 131,
PinmuxDrivePadIndex_Uart2Rts = 132,
PinmuxDrivePadIndex_Uart2Rx = 133,
PinmuxDrivePadIndex_Uart2Tx = 134,
PinmuxDrivePadIndex_Uart3Cts = 135,
PinmuxDrivePadIndex_Uart3Rts = 136,
PinmuxDrivePadIndex_Uart3Rx = 137,
PinmuxDrivePadIndex_Uart3Tx = 138,
PinmuxDrivePadIndex_Uart4Cts = 139,
PinmuxDrivePadIndex_Uart4Rts = 140,
PinmuxDrivePadIndex_Uart4Rx = 141,
PinmuxDrivePadIndex_Uart4Tx = 142,
PinmuxDrivePadIndex_UsbVbusEn0 = 143,
PinmuxDrivePadIndex_UsbVbusEn1 = 144,
PinmuxDrivePadIndex_WifiEn = 145,
PinmuxDrivePadIndex_WifiRst = 146,
PinmuxDrivePadIndex_WifiWakeAp = 147,
};

View file

@ -0,0 +1,641 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stratosphere.hpp>
#include "pinmux_pad_index.hpp"
#include "pinmux_board_driver_api.hpp"
#include "pinmux_platform_pads.hpp"
namespace ams::pinmux::driver::board::nintendo_nx {
namespace {
uintptr_t g_apb_misc_virtual_address = dd::QueryIoMapping(0x70000000, 0x4000);
enum PinmuxPadMask : u32 {
PinmuxPadMask_Pm = 0x3,
PinmuxPadMask_Pupd = 0xC,
PinmuxPadMask_Tristate = 0x10,
PinmuxPadMask_Park = 0x20,
PinmuxPadMask_EInput = 0x40,
PinmuxPadMask_Lock = 0x80,
PinmuxPadMask_ELpdr = 0x100,
PinmuxPadMask_EHsm = 0x200,
PinmuxPadMask_EIoHv = 0x400,
PinmuxPadMask_EOd = 0x800,
PinmuxPadMask_ESchmt = 0x1000,
PinmuxPadMask_DrvType = 0x6000,
PinmuxPadMask_Preemp = 0x8000,
PinmuxPadMask_IoReset = 0x10000,
};
enum PinmuxPadBitOffset : u32 {
PinmuxPadBitOffset_Pm = 0x0,
PinmuxPadBitOffset_Pupd = 0x2,
PinmuxPadBitOffset_Tristate = 0x4,
PinmuxPadBitOffset_Park = 0x5,
PinmuxPadBitOffset_EInput = 0x6,
PinmuxPadBitOffset_Lock = 0x7,
PinmuxPadBitOffset_ELpdr = 0x8,
PinmuxPadBitOffset_EHsm = 0x9,
PinmuxPadBitOffset_EIoHv = 0xA,
PinmuxPadBitOffset_EOd = 0xB,
PinmuxPadBitOffset_ESchmt = 0xC,
PinmuxPadBitOffset_DrvType = 0xD,
PinmuxPadBitOffset_Preemp = 0xF,
PinmuxPadBitOffset_IoReset = 0x10,
};
enum PinmuxOptBitMask : u32 {
PinmuxOptBitMask_Pm = 0x7,
PinmuxOptBitMask_Pupd = 0x18,
PinmuxOptBitMask_Dir = 0x60,
PinmuxOptBitMask_Lock = 0x80,
PinmuxOptBitMask_IoReset = 0x100,
PinmuxOptBitMask_IoHv = 0x200,
PinmuxOptBitMask_Park = 0x400,
PinmuxOptBitMask_Lpdr = 0x800,
PinmuxOptBitMask_Hsm = 0x1000,
PinmuxOptBitMask_Schmt = 0x2000,
PinmuxOptBitMask_DrvType = 0xC000,
PinmuxOptBitMask_Preemp = 0x10000,
};
enum PinmuxOptBitOffset {
PinmuxOptBitOffset_Pm = 0x0,
PinmuxOptBitOffset_Pupd = 0x3,
PinmuxOptBitOffset_Dir = 0x5,
PinmuxOptBitOffset_Lock = 0x7,
PinmuxOptBitOffset_IoReset = 0x8,
PinmuxOptBitOffset_IoHv = 0x9,
PinmuxOptBitOffset_Park = 0xA,
PinmuxOptBitOffset_Lpdr = 0xB,
PinmuxOptBitOffset_Hsm = 0xC,
PinmuxOptBitOffset_Schmt = 0xD,
PinmuxOptBitOffset_DrvType = 0xE,
PinmuxOptBitOffset_Preemp = 0x10,
};
enum PinmuxDrivePadMask : u32{
PinmuxDrivePadMask_DrvDn = 0x0001F000,
PinmuxDrivePadMask_DrvUp = 0x01F00000,
PinmuxDrivePadMask_CzDrvDn = 0x0007F000,
PinmuxDrivePadMask_CzDrvUp = 0x07F00000,
PinmuxDrivePadMask_SlwR = 0x30000000,
PinmuxDrivePadMask_SlwF = 0xC0000000,
};
enum PinmuxDrivePadBitOffset : u32 {
PinmuxDrivePadBitOffset_DrvDn = 12,
PinmuxDrivePadBitOffset_DrvUp = 20,
PinmuxDrivePadBitOffset_CzDrvDn = 12,
PinmuxDrivePadBitOffset_CzDrvUp = 20,
PinmuxDrivePadBitOffset_SlwR = 28,
PinmuxDrivePadBitOffset_SlwF = 30,
};
enum PinmuxDriveOptBitMask : u32 {
PinmuxDriveOptBitMask_DrvDn = 0x0001F000,
PinmuxDriveOptBitMask_DrvUp = 0x01F00000,
PinmuxDriveOptBitMask_CzDrvDn = 0x0007F000,
PinmuxDriveOptBitMask_CzDrvUp = 0x07F00000,
PinmuxDriveOptBitMask_SlwR = 0x30000000,
PinmuxDriveOptBitMask_SlwF = 0xC0000000,
};
enum PinmuxDriveOptBitOffset : u32 {
PinmuxDriveOptBitOffset_DrvDn = 12,
PinmuxDriveOptBitOffset_DrvUp = 20,
PinmuxDriveOptBitOffset_CzDrvDn = 12,
PinmuxDriveOptBitOffset_CzDrvUp = 20,
PinmuxDriveOptBitOffset_SlwR = 28,
PinmuxDriveOptBitOffset_SlwF = 30,
};
enum PinmuxOpt : u32 {
/* Pm */
PinmuxOpt_Gpio = 0x4,
PinmuxOpt_Unused = 0x5,
/* Pupd */
PinmuxOpt_NoPupd = 0x0,
PinmuxOpt_PullDown = 0x8,
PinmuxOpt_PullUp = 0x10,
/* Dir */
PinmuxOpt_Output = 0x0,
PinmuxOpt_Input = 0x20,
PinmuxOpt_Bidirection = 0x40,
PinmuxOpt_OpenDrain = 0x60,
/* Lock */
PinmuxOpt_Unlock = 0x0,
PinmuxOpt_Lock = 0x80,
/* IoReset */
PinmuxOpt_DisableIoReset = 0x0,
PinmuxOpt_EnableIoReset = 0x100,
/* IoHv */
PinmuxOpt_NormalVoltage = 0x0,
PinmuxOpt_HighVoltage = 0x200,
/* Park */
PinmuxOpt_ResetOnLowPower = 0x0,
PinmuxOpt_ParkOnLowPower = 0x400,
/* Lpdr */
PinmuxOpt_DisableBaseDriver = 0x0,
PinmuxOpt_EnableBaseDriver = 0x800,
/* Hsm */
PinmuxOpt_DisableHighSpeedMode = 0x0,
PinmuxOpt_EnableHighSpeedMode = 0x1000,
/* Schmt */
PinmuxOpt_CmosMode = 0x0,
PinmuxOpt_SchmittTrigger = 0x2000,
/* DrvType */
PinmuxOpt_DrvType1X = 0x0,
PinmuxOpt_DrvType2X = 0x4000,
PinmuxOpt_DrvType3X = 0x8000,
PinmuxOpt_DrvType4X = 0xC000,
/* Preemp */
PinmuxOpt_DisablePreemp = 0x0,
PinmuxOpt_EnablePreemp = 0x10000,
};
enum PinmuxPadPm : u32 {
PinmuxPadPm_Default = 0xFFFFFFFF,
PinmuxPadPm_Pm0 = 0x0,
PinmuxPadPm_Pm1 = 0x1,
PinmuxPadPm_Pm2 = 0x2,
PinmuxPadPm_Pm3 = 0x3,
PinmuxPadPm_Safe = 0x4,
};
struct PinmuxPadCharacter {
u32 reg_offset;
u32 reg_mask;
u8 safe_func;
const char *pad_name;
};
struct PinmuxDrivePadCharacter {
u32 reg_offset;
u32 reg_mask;
const char *pad_name;
};
#include "pinmux_pad_characters.inc"
#include "pinmux_drive_pad_characters.inc"
class PinmuxPad {
private:
u32 reg_address;
u32 reg_mask;
u32 reg_value;
u8 safe_func;
const char *pad_name;
private:
bool IsValidRegisterAddress() const {
return this->reg_address - 0x70003000 <= 0x2C4;
}
uintptr_t GetRegisterAddress() const {
return g_apb_misc_virtual_address + (this->reg_address - 0x70000000);
}
bool UpdateBits(u32 value, u32 offset, u32 mask) {
if ((this->reg_mask & mask) != 0) {
if ((value & (mask >> offset)) != ((this->reg_value & mask) >> offset)) {
this->reg_value = (this->reg_value & ~mask) | ((value << offset) & mask);
}
return true;
} else {
return false;
}
}
u32 ReadReg() const {
if (this->IsValidRegisterAddress()) {
return reg::Read(this->GetRegisterAddress());
} else {
return 0;
}
}
void WriteReg() const {
if (this->IsValidRegisterAddress()) {
reg::Write(this->GetRegisterAddress(), this->reg_value);
}
}
bool IsLocked() const {
return (this->reg_value & PinmuxPadMask_Lock) != 0;
}
void UpdatePm(u8 v) {
if (v != 0xFF) {
if (v == PinmuxPadPm_Safe) {
v = this->safe_func;
}
this->UpdateBits(v, PinmuxPadBitOffset_Pm, PinmuxPadMask_Pm);
}
}
void UpdatePupd(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_Pupd, PinmuxPadMask_Pupd);
}
}
void UpdateTristate(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_Tristate, PinmuxPadMask_Tristate);
}
}
void UpdateEInput(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_EInput, PinmuxPadMask_EInput);
}
}
void UpdateEOd(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_EOd, PinmuxPadMask_EOd);
}
}
void UpdateLock(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_Lock, PinmuxPadMask_Lock);
}
}
void UpdateIoReset(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_IoReset, PinmuxPadMask_IoReset);
}
}
void UpdatePark(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_Park, PinmuxPadMask_Park);
}
}
void UpdateELpdr(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_ELpdr, PinmuxPadMask_ELpdr);
}
}
void UpdateEHsm(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_EHsm, PinmuxPadMask_EHsm);
}
}
void UpdateEIoHv(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_EIoHv, PinmuxPadMask_EIoHv);
}
}
void UpdateESchmt(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_ESchmt, PinmuxPadMask_ESchmt);
}
}
void UpdatePreemp(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_Preemp, PinmuxPadMask_Preemp);
}
}
void UpdateDrvType(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxPadBitOffset_DrvType, PinmuxPadMask_DrvType);
}
}
public:
constexpr PinmuxPad() : reg_address(), reg_mask(), reg_value(), safe_func(), pad_name() { /* ... */ }
void UpdatePinmuxPad(u32 config, u32 config_mask) {
/* Update register value. */
this->reg_value = this->ReadReg();
/* Check if we're locked. */
if (this->IsLocked()) {
return;
}
/* Update PM. */
if ((config_mask & PinmuxOptBitMask_Pm) != 0) {
const auto opt = (config & PinmuxOptBitMask_Pm);
u8 pm = PinmuxPadPm_Safe;
if (opt != PinmuxOpt_Gpio) {
if (opt == PinmuxOpt_Unused) {
this->UpdatePupd(true);
this->UpdateTristate(true);
this->UpdateEInput(0);
} else if (opt <= PinmuxOpt_Unused) {
pm = opt >> PinmuxOptBitOffset_Pm;
}
}
this->UpdatePm(pm);
}
/* Update pupd. */
if ((config_mask & PinmuxOptBitMask_Pupd) != 0) {
const auto opt = (config & PinmuxOptBitMask_Pupd);
if (opt == PinmuxOpt_NoPupd || opt == PinmuxOpt_PullDown || opt == PinmuxOpt_PullUp) {
this->UpdatePupd(opt >> PinmuxOptBitOffset_Pupd);
}
}
/* Update direction. */
if ((config_mask & PinmuxOptBitMask_Dir) != 0) {
const auto opt = (config & PinmuxOptBitMask_Dir);
if (opt == PinmuxOpt_Output) {
this->UpdateTristate(false);
this->UpdateEInput(false);
if ((this->reg_mask & PinmuxPadMask_EOd) != 0) {
this->UpdateEOd(false);
}
} else if (opt == PinmuxOpt_Input) {
this->UpdateTristate(true);
this->UpdateEInput(true);
if ((this->reg_mask & PinmuxPadMask_EOd) != 0) {
this->UpdateEOd(false);
}
} else if (opt == PinmuxOpt_Bidirection) {
this->UpdateTristate(false);
this->UpdateEInput(true);
if ((this->reg_mask & PinmuxPadMask_EOd) != 0) {
this->UpdateEOd(false);
}
} else if (opt == PinmuxOpt_OpenDrain) {
this->UpdateTristate(false);
this->UpdateEInput(true);
this->UpdateEOd(true);
}
}
/* Update Lock. */
if ((config_mask & PinmuxOptBitMask_Lock) != 0) {
const auto opt = (config & PinmuxOptBitMask_Lock);
this->UpdateLock(opt != 0);
}
/* Update IoReset. */
if ((config_mask & PinmuxOptBitMask_IoReset) != 0) {
const auto opt = (config & PinmuxOptBitMask_IoReset);
this->UpdateIoReset(opt != 0);
}
/* Update Park. */
if ((config_mask & PinmuxOptBitMask_Park) != 0) {
const auto opt = (config & PinmuxOptBitMask_Park);
this->UpdatePark(opt != 0);
}
/* Update Lpdr. */
if ((config_mask & PinmuxOptBitMask_Lpdr) != 0) {
const auto opt = (config & PinmuxOptBitMask_Lpdr);
this->UpdateELpdr(opt != 0);
}
/* Update Hsm. */
if ((config_mask & PinmuxOptBitMask_Hsm) != 0) {
const auto opt = (config & PinmuxOptBitMask_Hsm);
this->UpdateEHsm(opt != 0);
}
/* Update IoHv. */
if ((config_mask & PinmuxOptBitMask_IoHv) != 0) {
const auto opt = (config & PinmuxOptBitMask_IoHv);
this->UpdateEIoHv(opt != 0);
}
/* Update Schmt. */
if ((config_mask & PinmuxOptBitMask_Schmt) != 0) {
const auto opt = (config & PinmuxOptBitMask_Schmt);
this->UpdateESchmt(opt != 0);
}
/* Update Preemp. */
if ((config_mask & PinmuxOptBitMask_Preemp) != 0) {
const auto opt = (config & PinmuxOptBitMask_Preemp);
this->UpdatePreemp(opt != 0);
}
/* Update drive type. */
if ((config_mask & PinmuxOptBitMask_DrvType) != 0) {
const auto opt = (config & PinmuxOptBitMask_DrvType);
this->UpdateDrvType(opt >> PinmuxOptBitOffset_DrvType);
}
/* Write the updated register value. */
this->WriteReg();
}
void SetCharacter(const PinmuxPadCharacter &character) {
this->reg_address = character.reg_offset + 0x70000000;
this->reg_mask = character.reg_mask;
this->safe_func = character.safe_func;
this->reg_value = this->ReadReg();
this->pad_name = character.pad_name;
if ((this->reg_mask & this->reg_value & PinmuxPadMask_Park) != 0) {
this->reg_value &= ~(PinmuxPadMask_Park);
}
this->WriteReg();
}
};
class PinmuxDrivePad {
private:
u32 reg_address;
u32 reg_mask;
u32 reg_value;
u8 safe_func;
const char *pad_name;
private:
bool IsValidRegisterAddress() const {
return this->reg_address - 0x700008E4 <= 0x288;
}
uintptr_t GetRegisterAddress() const {
return g_apb_misc_virtual_address + (this->reg_address - 0x70000000);
}
bool UpdateBits(u32 value, u32 offset, u32 mask) {
if ((this->reg_mask & mask) != 0) {
if ((value & (mask >> offset)) != ((this->reg_value & mask) >> offset)) {
this->reg_value = (this->reg_value & ~mask) | ((value << offset) & mask);
}
return true;
} else {
return false;
}
}
u32 ReadReg() const {
if (this->IsValidRegisterAddress()) {
return reg::Read(this->GetRegisterAddress());
} else {
return 0;
}
}
void WriteReg() const {
if (this->IsValidRegisterAddress()) {
reg::Write(this->GetRegisterAddress(), this->reg_value);
}
}
bool IsCzDrvDn() const {
return (this->reg_mask & PinmuxDrivePadMask_CzDrvDn) == PinmuxDrivePadMask_CzDrvDn;
}
bool IsCzDrvUp() const {
return (this->reg_mask & PinmuxDrivePadMask_CzDrvUp) == PinmuxDrivePadMask_CzDrvUp;
}
void UpdateDrvDn(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxDrivePadBitOffset_DrvDn, PinmuxDrivePadMask_DrvDn);
}
}
void UpdateDrvUp(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxDrivePadBitOffset_DrvUp, PinmuxDrivePadMask_DrvUp);
}
}
void UpdateCzDrvDn(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxDrivePadBitOffset_CzDrvDn, PinmuxDrivePadMask_CzDrvDn);
}
}
void UpdateCzDrvUp(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxDrivePadBitOffset_CzDrvUp, PinmuxDrivePadMask_CzDrvUp);
}
}
void UpdateSlwR(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxDrivePadBitOffset_SlwR, PinmuxDrivePadMask_SlwR);
}
}
void UpdateSlwF(u8 v) {
if (v != 0xFF) {
this->UpdateBits(v, PinmuxDrivePadBitOffset_SlwF, PinmuxDrivePadMask_SlwF);
}
}
public:
constexpr PinmuxDrivePad() : reg_address(), reg_mask(), reg_value(), pad_name() { /* ... */ }
void UpdatePinmuxDrivePad(u32 config, u32 config_mask) {
/* Update register value. */
this->reg_value = this->ReadReg();
/* Update drvdn. */
if ((config_mask & PinmuxDriveOptBitMask_DrvDn) != 0) {
if (this->IsCzDrvDn()) {
const auto opt = (config & PinmuxDriveOptBitMask_CzDrvDn);
this->UpdateCzDrvDn(opt >> PinmuxDriveOptBitOffset_CzDrvDn);
} else {
const auto opt = (config & PinmuxDriveOptBitMask_DrvDn);
this->UpdateDrvDn(opt >> PinmuxDriveOptBitOffset_DrvDn);
}
}
/* Update drvup. */
if ((config_mask & PinmuxDriveOptBitMask_DrvUp) != 0) {
if (this->IsCzDrvUp()) {
const auto opt = (config & PinmuxDriveOptBitMask_CzDrvUp);
this->UpdateCzDrvUp(opt >> PinmuxDriveOptBitOffset_CzDrvUp);
} else {
const auto opt = (config & PinmuxDriveOptBitMask_DrvUp);
this->UpdateDrvUp(opt >> PinmuxDriveOptBitOffset_DrvUp);
}
}
/* Update slwr */
if ((config_mask & PinmuxDriveOptBitMask_SlwR) != 0) {
const auto opt = (config & PinmuxDriveOptBitMask_SlwR);
this->UpdateSlwR(opt >> PinmuxDriveOptBitOffset_SlwR);
}
/* Update slwf */
if ((config_mask & PinmuxDriveOptBitMask_SlwR) != 0) {
const auto opt = (config & PinmuxDriveOptBitMask_SlwF);
this->UpdateSlwF(opt >> PinmuxDriveOptBitOffset_SlwF);
}
/* Write the updated register value. */
this->WriteReg();
}
void SetCharacter(const PinmuxDrivePadCharacter &character) {
this->reg_address = character.reg_offset + 0x70000000;
this->reg_mask = character.reg_mask;
this->reg_value = this->ReadReg();
this->pad_name = character.pad_name;
}
};
constinit std::array<PinmuxPad, NumPinmuxPadCharacters> g_pinmux_pads{};
constinit std::array<PinmuxDrivePad, NumPinmuxDrivePadCharacters> g_pinmux_drive_pads{};
}
void InitializePlatformPads() {
/* Initialize all pads. */
for (size_t i = 0; i < NumPinmuxPadCharacters; ++i) {
g_pinmux_pads[i].SetCharacter(PinmuxPadCharacters[i]);
}
/* Update all drive pads. */
for (size_t i = 0; i < NumPinmuxDrivePadCharacters; ++i) {
g_pinmux_drive_pads[i].SetCharacter(PinmuxDrivePadCharacters[i]);
}
}
void UpdateSinglePinmuxPad(const PinmuxPadConfig &config) {
if (IsInitialized()) {
g_pinmux_pads[config.index].UpdatePinmuxPad(config.option, config.option_mask);
}
}
void UpdateSinglePinmuxDrivePad(const PinmuxDrivePadConfig &config) {
if (IsInitialized()) {
g_pinmux_drive_pads[config.index].UpdatePinmuxDrivePad(config.option, config.option_mask);
}
}
}

View file

@ -0,0 +1,38 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stratosphere.hpp>
namespace ams::pinmux::driver::board::nintendo_nx {
struct PinmuxPadConfig {
u32 index;
u32 option;
u32 option_mask;
};
struct PinmuxDrivePadConfig {
u32 index;
u32 option;
u32 option_mask;
};
void InitializePlatformPads();
void UpdateSinglePinmuxPad(const PinmuxPadConfig &config);
void UpdateSinglePinmuxDrivePad(const PinmuxDrivePadConfig &config);
}

View file

@ -0,0 +1,55 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stratosphere.hpp>
#include "pinmux_select_board_impl.hpp"
namespace ams::pinmux::driver {
namespace {
constinit os::SdkMutex g_init_mutex;
constinit int g_init_count = 0;
}
void Initialize() {
std::scoped_lock lk(g_init_mutex);
if ((g_init_count++) == 0) {
if (!board::IsInitialized()) {
board::Initialize();
}
}
}
void Finalize() {
std::scoped_lock lk(g_init_mutex);
if ((--g_init_count) == 0) {
AMS_ASSERT(board::IsInitialized());
board::Finalize();
}
}
void SetInitialConfig() {
board::SetInitialConfig();
}
void SetInitialDrivePadConfig() {
board::SetInitialDrivePadConfig();
}
}

View file

@ -0,0 +1,30 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stratosphere.hpp>
#if defined(ATMOSPHERE_BOARD_NINTENDO_NX)
#include "board/nintendo_nx/pinmux_board_driver_api.hpp"
namespace ams::pinmux::driver::board {
using namespace ams::pinmux::driver::board::nintendo_nx;
}
#else
#error "Unknown board for pinmux driver"
#endif

View file

@ -39,7 +39,7 @@ namespace ams::boot {
dd::ReadModifyWriteIoRegister(PmcPwrDetVal, 0, VoltageChangeMask);
/* Sleep for 100 us. */
svcSleepThread(100'000ul);
os::SleepThread(TimeSpan::FromMicroSeconds(100));
}
}

View file

@ -35,7 +35,8 @@ namespace ams::boot {
/* Helpers. */
bool IsUsbClockValid() {
uintptr_t car_regs = dd::GetIoMapping(0x60006000ul, os::MemoryPageSize);
uintptr_t car_regs = dd::QueryIoMapping(0x60006000ul, os::MemoryPageSize);
AMS_ASSERT(car_regs != 0);
const u32 pllu = reg::Read(car_regs + 0xC0);
const u32 utmip = reg::Read(car_regs + 0x480);
@ -47,7 +48,7 @@ namespace ams::boot {
void CheckClock() {
if (!IsUsbClockValid()) {
/* Sleep for 1s, then reboot. */
svcSleepThread(1'000'000'000ul);
os::SleepThread(TimeSpan::FromSeconds(1));
RebootSystem();
}
}

View file

@ -556,8 +556,6 @@ namespace ams::boot {
os::SleepThread(TimeSpan::FromMilliSeconds(10));
}
svcSleepThread(10'000'000ul);
/* Vendor specific shutdown. */
switch (g_lcd_vendor) {
case 0x10: /* Japan Display Inc screens. */

View file

@ -21,11 +21,10 @@
#include "boot_clock_initial_configuration.hpp"
#include "boot_driver_management.hpp"
#include "boot_fan_enable.hpp"
#include "boot_pinmux_initial_configuration.hpp"
#include "boot_repair_boot_images.hpp"
#include "boot_splash_screen.hpp"
#include "pinmux/pinmux_initial_configuration.hpp"
#include "boot_power_utils.hpp"
using namespace ams;
@ -218,7 +217,7 @@ int main(int argc, char **argv)
}
/* Configure pinmux + drive pads. */
pinmux::SetInitialConfiguration();
boot::SetInitialPinmuxConfiguration();
/* Configure the PMC wake pin settings. */
gpio::driver::SetInitialWakePinConfig();

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stratosphere.hpp>
#include "boot_pinmux_initial_configuration.hpp"
namespace ams::boot {
void SetInitialPinmuxConfiguration() {
pinmux::driver::Initialize();
pinmux::driver::SetInitialConfig();
pinmux::driver::SetInitialDrivePadConfig();
pinmux::driver::Finalize();
}
}

View file

@ -16,8 +16,8 @@
#pragma once
#include <stratosphere.hpp>
namespace ams::pinmux {
namespace ams::boot {
void SetInitialConfiguration();
void SetInitialPinmuxConfiguration();
}

View file

@ -22,7 +22,7 @@ namespace ams::boot {
const u8 update_addr = 0x04;
const u8 update_val = 0x10;
R_TRY(WriteI2cRegister(this->i2c_session, &update_val, sizeof(update_val), &update_addr, sizeof(update_addr)));
svcSleepThread(16'000'000ul);
os::SleepThread(TimeSpan::FromMilliSeconds(16));
return ReadI2cRegister(this->i2c_session, out, sizeof(*out), &address, sizeof(address));
}

View file

@ -1,135 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stratosphere.hpp>
#include "pinmux_initial_configuration.hpp"
#include "pinmux_utils.hpp"
namespace ams::pinmux {
namespace {
struct InitialConfig {
u32 name;
u32 val;
u32 mask;
};
/* Include all initial configuration definitions. */
#include "pinmux_initial_configuration_icosa.inc"
#include "pinmux_initial_configuration_copper.inc"
#include "pinmux_initial_configuration_hoag.inc"
#include "pinmux_initial_configuration_iowa.inc"
#include "pinmux_initial_configuration_calcio.inc"
#include "pinmux_initial_drive_pad_configuration.inc"
#include "pinmux_initial_drive_pad_configuration_hoag.inc"
/* Configuration helpers. */
void ConfigureInitialPads() {
const InitialConfig *configs = nullptr;
size_t num_configs = 0;
const auto hw_type = spl::GetHardwareType();
switch (hw_type) {
case spl::HardwareType::Icosa:
configs = InitialConfigsIcosa;
num_configs = NumInitialConfigsIcosa;
break;
case spl::HardwareType::Copper:
configs = InitialConfigsCopper;
num_configs = NumInitialConfigsCopper;
break;
case spl::HardwareType::Hoag:
configs = InitialConfigsHoag;
num_configs = NumInitialConfigsHoag;
break;
case spl::HardwareType::Iowa:
configs = InitialConfigsIowa;
num_configs = NumInitialConfigsIowa;
break;
case spl::HardwareType::Calcio:
configs = InitialConfigsCalcio;
num_configs = NumInitialConfigsCalcio;
break;
/* Unknown hardware type, we can't proceed. */
AMS_UNREACHABLE_DEFAULT_CASE();
}
/* Ensure we found an appropriate config. */
AMS_ABORT_UNLESS(configs != nullptr);
for (size_t i = 0; i < num_configs; i++) {
UpdatePad(configs[i].name, configs[i].val, configs[i].mask);
}
/* Extra configs for mariko only. */
if (hw_type == spl::HardwareType::Hoag || hw_type == spl::HardwareType::Iowa || hw_type == spl::HardwareType::Calcio) {
static constexpr u32 ExtraMarikoPadNames[] = {
0xAA, 0xAC, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9
};
for (size_t i = 0; i < util::size(ExtraMarikoPadNames); i++) {
UpdatePad(ExtraMarikoPadNames[i], 0x2000, 0x2000);
}
}
}
void ConfigureInitialDrivePads() {
const InitialConfig *configs = nullptr;
size_t num_configs = 0;
const auto hw_type = spl::GetHardwareType();
switch (hw_type) {
case spl::HardwareType::Icosa:
case spl::HardwareType::Copper:
case spl::HardwareType::Iowa:
case spl::HardwareType::Calcio:
configs = InitialDrivePadConfigs;
num_configs = NumInitialDrivePadConfigs;
break;
case spl::HardwareType::Hoag:
configs = InitialDrivePadConfigsHoag;
num_configs = NumInitialDrivePadConfigsHoag;
break;
/* Unknown hardware type, we can't proceed. */
AMS_UNREACHABLE_DEFAULT_CASE();
}
/* Ensure we found an appropriate config. */
AMS_ABORT_UNLESS(configs != nullptr);
for (size_t i = 0; i < num_configs; i++) {
UpdateDrivePad(configs[i].name, configs[i].val, configs[i].mask);
}
}
}
void SetInitialConfiguration() {
/* Update all parks. */
UpdateAllParks();
/* Dummy read all drive pads. */
DummyReadAllDrivePads();
/* Set initial pad configs. */
ConfigureInitialPads();
/* Set initial drive pad configs. */
ConfigureInitialDrivePads();
}
}

View file

@ -1,194 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
constexpr InitialConfig InitialConfigsCalcio[] = {
{0x0D, 0x20, 0x27F},
{0x0C, 0x00, 0x27F},
{0x10, 0x40, 0x27F},
{0x0F, 0x00, 0x27F},
{0x0E, 0x20, 0x27F},
{0x00, 0x40, 0x7F},
{0x01, 0x50, 0x7F},
{0x05, 0x50, 0x7F},
{0x04, 0x50, 0x7F},
{0x03, 0x50, 0x7F},
{0x02, 0x50, 0x7F},
{0x5B, 0x00, 0x78},
{0x80, 0x01, 0x7F},
{0x34, 0x40, 0x27F},
{0x35, 0x40, 0x27F},
{0x55, 0x20, 0x78},
{0x56, 0x01, 0x7F},
{0x5C, 0x00, 0x78},
{0x5A, 0x20, 0x78},
{0x2C, 0x40, 0x27F},
{0x2D, 0x40, 0x27F},
{0x36, 0x00, 0x7F},
{0x37, 0x30, 0x7F},
{0x38, 0x00, 0x7F},
{0x39, 0x28, 0x7F},
{0x54, 0x00, 0x67},
{0x42, 0x00, 0x7F},
{0x43, 0x28, 0x7F},
{0x44, 0x00, 0x7F},
{0x45, 0x28, 0x7F},
{0x4B, 0x28, 0x7F},
{0x4C, 0x00, 0x7F},
{0x4A, 0x00, 0x7F},
{0x4D, 0x00, 0x7F},
{0x63, 0x240, 0x27F},
{0x26, 0x04, 0x67},
{0x27, 0x04, 0x67},
{0x28, 0x04, 0x67},
{0x29, 0x04, 0x67},
{0x2A, 0x04, 0x67},
{0x78, 0x24, 0x7F},
{0x88, 0x34, 0x7F},
{0x89, 0x24, 0x7F},
{0x8A, 0x34, 0x7F},
{0x8B, 0x34, 0x7F},
{0x8D, 0x34, 0x7F},
{0x81, 0x04, 0x67},
{0x9D, 0x34, 0x7F},
{0x9F, 0x34, 0x7F},
{0x92, 0x4C, 0x7F},
{0x93, 0x4C, 0x7F},
{0x94, 0x44, 0x7F},
{0x96, 0x34, 0x7F},
{0x98, 0x34, 0x7F},
{0x12, 0x0C, 0x7F},
{0x13, 0x34, 0x7F},
{0x14, 0x0C, 0x7F},
{0x6A, 0x04, 0x67},
{0x6B, 0x04, 0x67},
{0x6C, 0x2C, 0x7F},
{0x6D, 0x04, 0x67},
{0x6E, 0x04, 0x67},
{0x6F, 0x24, 0x7F},
{0x70, 0x04, 0x7F},
{0x69, 0x0C, 0x7F},
{0x64, 0x24, 0x27F},
{0x5D, 0x05, 0x07},
{0x5E, 0x05, 0x07},
{0x5F, 0x05, 0x07},
{0x60, 0x05, 0x07},
{0x61, 0x05, 0x07},
{0x47, 0x05, 0x07},
{0x48, 0x05, 0x07},
{0x46, 0x05, 0x07},
{0x49, 0x05, 0x07},
{0x17, 0x05, 0x07},
{0x18, 0x05, 0x07},
{0x19, 0x05, 0x07},
{0x1A, 0x05, 0x07},
{0x1B, 0x05, 0x07},
{0x2B, 0x05, 0x07},
{0x8F, 0x05, 0x07},
{0x90, 0x05, 0x07},
{0x30, 0x05, 0x07},
{0x31, 0x05, 0x07},
{0x32, 0x05, 0x07},
{0x33, 0x05, 0x07},
{0x52, 0x05, 0x07},
{0x53, 0x05, 0x07},
{0x75, 0x05, 0x07},
{0x76, 0x05, 0x07},
{0x77, 0x05, 0x07},
{0x79, 0x05, 0x07},
{0x7A, 0x05, 0x07},
{0x11, 0x05, 0x07},
{0x8E, 0x05, 0x07},
{0xAA, 0x05, 0x07},
{0xAB, 0x05, 0x07},
{0xAC, 0x05, 0x07},
{0xA2, 0x05, 0x07},
{0xA3, 0x05, 0x07},
{0xA4, 0x05, 0x07},
{0xA5, 0x05, 0x07},
{0xA6, 0x05, 0x07},
{0xA7, 0x05, 0x07},
{0xA8, 0x05, 0x07},
{0xA9, 0x05, 0x07},
{0xAD, 0x05, 0x07},
{0xAE, 0x05, 0x07},
{0x06, 0x05, 0x07},
{0x07, 0x05, 0x07},
{0x08, 0x05, 0x07},
{0x09, 0x05, 0x07},
{0x0A, 0x05, 0x07},
{0x0B, 0x05, 0x07},
{0x87, 0x05, 0x07},
{0x86, 0x05, 0x07},
{0x82, 0x05, 0x07},
{0x83, 0x05, 0x07},
{0x85, 0x05, 0x07},
{0x84, 0x05, 0x07},
{0x8C, 0x05, 0x07},
{0x7B, 0x05, 0x07},
{0x7C, 0x05, 0x07},
{0x7D, 0x05, 0x07},
{0x7E, 0x05, 0x07},
{0x7F, 0x05, 0x07},
{0x9C, 0x05, 0x07},
{0x9E, 0x05, 0x07},
{0xA0, 0x05, 0x07},
{0xA1, 0x05, 0x07},
{0x58, 0x00, 0x18},
{0x59, 0x00, 0x18},
{0x4F, 0x05, 0x07},
{0x50, 0x05, 0x07},
{0x4E, 0x05, 0x07},
{0x51, 0x05, 0x07},
{0x2E, 0x05, 0x07},
{0x2F, 0x05, 0x07},
{0x3A, 0x05, 0x07},
{0x3B, 0x05, 0x07},
{0x3C, 0x05, 0x07},
{0x3D, 0x05, 0x07},
{0x95, 0x05, 0x07},
{0x97, 0x05, 0x07},
{0x99, 0x05, 0x07},
{0x9A, 0x05, 0x07},
{0x9B, 0x05, 0x07},
{0x15, 0x05, 0x07},
{0x16, 0x05, 0x07},
{0x1C, 0x05, 0x07},
{0x1D, 0x05, 0x07},
{0x1E, 0x05, 0x07},
{0x1F, 0x05, 0x07},
{0x3E, 0x05, 0x07},
{0x3F, 0x05, 0x07},
{0x40, 0x05, 0x07},
{0x41, 0x05, 0x07},
{0x91, 0x05, 0x07},
{0x71, 0x05, 0x07},
{0x72, 0x05, 0x07},
{0x73, 0x05, 0x07},
{0x74, 0x05, 0x07},
{0x22, 0x05, 0x07},
{0x23, 0x05, 0x07},
{0x20, 0x05, 0x07},
{0x21, 0x05, 0x07},
{0x24, 0x05, 0x07},
{0x25, 0x05, 0x07},
{0x62, 0x05, 0x07},
{0x65, 0x05, 0x07},
{0x66, 0x05, 0x07},
{0x67, 0x05, 0x07},
{0x68, 0x05, 0x07},
};
constexpr u32 NumInitialConfigsCalcio = util::size(InitialConfigsCalcio);

View file

@ -1,181 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
constexpr InitialConfig InitialConfigsCopper[] = {
{0x10, 0x20, 0x27F},
{0x0F, 0x00, 0x267},
{0x0E, 0x20, 0x27F},
{0x5B, 0x00, 0x00},
{0x80, 0x01, 0x7F},
{0x34, 0x40, 0x267},
{0x35, 0x40, 0x267},
{0x55, 0x00, 0x18},
{0x56, 0x01, 0x67},
{0x5C, 0x00, 0x00},
{0x59, 0x00, 0x00},
{0x5A, 0x10, 0x18},
{0x2C, 0x40, 0x267},
{0x2D, 0x40, 0x267},
{0x2E, 0x40, 0x267},
{0x2F, 0x40, 0x267},
{0x36, 0x00, 0x67},
{0x37, 0x30, 0x7F},
{0x38, 0x00, 0x67},
{0x39, 0x28, 0x7F},
{0x54, 0x00, 0x67},
{0x9B, 0x30, 0x7F},
{0x42, 0x00, 0x67},
{0x43, 0x28, 0x7F},
{0x44, 0x00, 0x67},
{0x45, 0x28, 0x7F},
{0x4B, 0x28, 0x7F},
{0x4C, 0x00, 0x67},
{0x4A, 0x00, 0x67},
{0x4D, 0x00, 0x67},
{0x64, 0x20, 0x27F},
{0x63, 0x40, 0x267},
{0x5E, 0x04, 0x67},
{0x60, 0x04, 0x67},
{0x17, 0x24, 0x7F},
{0x18, 0x24, 0x7F},
{0x27, 0x04, 0x67},
{0x2A, 0x04, 0x67},
{0x2B, 0x04, 0x67},
{0x90, 0x24, 0x7F},
{0x32, 0x24, 0x27F},
{0x33, 0x34, 0x27F},
{0x76, 0x04, 0x67},
{0x79, 0x04, 0x67},
{0x08, 0x24, 0x7F},
{0x09, 0x24, 0x7F},
{0x0A, 0x24, 0x7F},
{0x0B, 0x24, 0x7F},
{0x88, 0x34, 0x7F},
{0x89, 0x24, 0x7F},
{0x8A, 0x34, 0x7F},
{0x8B, 0x34, 0x7F},
{0x8D, 0x34, 0x7F},
{0x81, 0x04, 0x67},
{0x9D, 0x34, 0x7F},
{0x9F, 0x34, 0x7F},
{0xA1, 0x34, 0x7F},
{0x92, 0x4C, 0x7F},
{0x93, 0x4C, 0x7F},
{0x94, 0x44, 0x7F},
{0x96, 0x34, 0x7F},
{0x98, 0x34, 0x7F},
{0x99, 0x34, 0x7F},
{0x12, 0x04, 0x7F},
{0x13, 0x04, 0x67},
{0x14, 0x04, 0x7F},
{0x6A, 0x04, 0x67},
{0x6B, 0x04, 0x67},
{0x6C, 0x2C, 0x7F},
{0x6D, 0x04, 0x67},
{0x6E, 0x04, 0x67},
{0x6F, 0x24, 0x7F},
{0x70, 0x04, 0x7F},
{0x73, 0x04, 0x67},
{0x69, 0x24, 0x7F},
{0x5D, 0x05, 0x07},
{0x5F, 0x05, 0x07},
{0x61, 0x05, 0x07},
{0x47, 0x05, 0x07},
{0x48, 0x05, 0x07},
{0x46, 0x05, 0x07},
{0x49, 0x05, 0x07},
{0x19, 0x05, 0x07},
{0x1A, 0x05, 0x07},
{0x1B, 0x05, 0x07},
{0x26, 0x05, 0x07},
{0x28, 0x05, 0x07},
{0x29, 0x05, 0x07},
{0x8F, 0x05, 0x07},
{0x30, 0x05, 0x07},
{0x31, 0x05, 0x07},
{0x52, 0x05, 0x07},
{0x53, 0x05, 0x07},
{0x75, 0x05, 0x07},
{0x77, 0x05, 0x07},
{0x78, 0x05, 0x07},
{0x7A, 0x05, 0x07},
{0x0D, 0x05, 0x07},
{0x0C, 0x05, 0x07},
{0x11, 0x05, 0x07},
{0x8E, 0x05, 0x07},
{0x00, 0x05, 0x07},
{0x01, 0x05, 0x07},
{0x05, 0x05, 0x07},
{0x04, 0x05, 0x07},
{0x03, 0x05, 0x07},
{0x02, 0x05, 0x07},
{0x06, 0x05, 0x07},
{0x07, 0x05, 0x07},
{0x87, 0x05, 0x07},
{0x86, 0x05, 0x07},
{0x82, 0x05, 0x07},
{0x83, 0x05, 0x07},
{0x85, 0x05, 0x07},
{0x84, 0x05, 0x07},
{0x8C, 0x05, 0x07},
{0x7B, 0x05, 0x07},
{0x7C, 0x05, 0x07},
{0x7D, 0x05, 0x07},
{0x7E, 0x05, 0x07},
{0x7F, 0x05, 0x07},
{0x9C, 0x05, 0x07},
{0x9E, 0x05, 0x07},
{0xA0, 0x05, 0x07},
{0x58, 0x00, 0x00},
{0x4F, 0x05, 0x07},
{0x50, 0x05, 0x07},
{0x4E, 0x05, 0x07},
{0x51, 0x05, 0x07},
{0x3A, 0x05, 0x07},
{0x3B, 0x05, 0x07},
{0x3C, 0x05, 0x07},
{0x3D, 0x05, 0x07},
{0x95, 0x05, 0x07},
{0x97, 0x05, 0x07},
{0x9A, 0x05, 0x07},
{0x15, 0x05, 0x07},
{0x16, 0x05, 0x07},
{0x1C, 0x05, 0x07},
{0x1D, 0x05, 0x07},
{0x1E, 0x05, 0x07},
{0x1F, 0x05, 0x07},
{0x3E, 0x05, 0x07},
{0x3F, 0x05, 0x07},
{0x40, 0x05, 0x07},
{0x41, 0x05, 0x07},
{0x91, 0x05, 0x07},
{0x71, 0x05, 0x07},
{0x72, 0x05, 0x07},
{0x74, 0x05, 0x07},
{0x22, 0x05, 0x07},
{0x23, 0x05, 0x07},
{0x20, 0x05, 0x07},
{0x21, 0x05, 0x07},
{0x24, 0x05, 0x07},
{0x25, 0x05, 0x07},
{0x62, 0x05, 0x07},
{0x65, 0x05, 0x07},
{0x66, 0x05, 0x07},
{0x67, 0x05, 0x07},
{0x68, 0x05, 0x07},
};
constexpr u32 NumInitialConfigsCopper = util::size(InitialConfigsCopper);

View file

@ -1,194 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
constexpr InitialConfig InitialConfigsHoag[] = {
{0x5D, 0x00, 0x7F},
{0x47, 0x28, 0x7F},
{0x48, 0x00, 0x7F},
{0x46, 0x00, 0x7F},
{0x49, 0x00, 0x7F},
{0x30, 0x40, 0x27F},
{0x31, 0x40, 0x27F},
{0x0D, 0x20, 0x27F},
{0x0C, 0x00, 0x27F},
{0x10, 0x40, 0x27F},
{0x0F, 0x00, 0x27F},
{0x0E, 0x20, 0x27F},
{0x00, 0x40, 0x7F},
{0x01, 0x50, 0x7F},
{0x05, 0x50, 0x7F},
{0x04, 0x50, 0x7F},
{0x03, 0x50, 0x7F},
{0x02, 0x50, 0x7F},
{0xAA, 0x40, 0x7F},
{0xAC, 0x40, 0x7F},
{0xA2, 0x50, 0x7F},
{0xA3, 0x50, 0x7F},
{0xA4, 0x50, 0x7F},
{0xA5, 0x50, 0x7F},
{0xA6, 0x50, 0x7F},
{0xA7, 0x50, 0x7F},
{0xA8, 0x50, 0x7F},
{0xA9, 0x50, 0x7F},
{0x83, 0x00, 0x67},
{0x5B, 0x00, 0x78},
{0x7C, 0x01, 0x67},
{0x80, 0x01, 0x7F},
{0x34, 0x40, 0x27F},
{0x35, 0x40, 0x27F},
{0x55, 0x20, 0x78},
{0x56, 0x01, 0x7F},
{0x5C, 0x00, 0x78},
{0x5A, 0x20, 0x78},
{0x2C, 0x40, 0x27F},
{0x2D, 0x40, 0x27F},
{0x2E, 0x40, 0x27F},
{0x2F, 0x40, 0x27F},
{0x36, 0x00, 0x7F},
{0x37, 0x30, 0x7F},
{0x38, 0x00, 0x7F},
{0x39, 0x28, 0x7F},
{0x54, 0x00, 0x67},
{0x9B, 0x30, 0x7F},
{0x3E, 0x00, 0x7F},
{0x3F, 0x20, 0x7F},
{0x40, 0x00, 0x7F},
{0x41, 0x30, 0x7F},
{0x42, 0x00, 0x7F},
{0x43, 0x28, 0x7F},
{0x44, 0x00, 0x7F},
{0x45, 0x28, 0x7F},
{0x4B, 0x28, 0x7F},
{0x4C, 0x00, 0x7F},
{0x4A, 0x00, 0x7F},
{0x4D, 0x00, 0x7F},
{0x60, 0x04, 0x67},
{0x61, 0x2C, 0x7F},
{0x26, 0x04, 0x67},
{0x27, 0x04, 0x67},
{0x28, 0x04, 0x67},
{0x29, 0x04, 0x67},
{0x2A, 0x04, 0x67},
{0x8F, 0x24, 0x7F},
{0x90, 0x34, 0x7F},
{0x33, 0x34, 0x27F},
{0x53, 0x24, 0x7F},
{0x77, 0x04, 0x67},
{0x78, 0x24, 0x7F},
{0x79, 0x04, 0x67},
{0x7A, 0x04, 0x67},
{0x11, 0x04, 0x67},
{0x87, 0x04, 0x67},
{0x88, 0x34, 0x7F},
{0x86, 0x2C, 0x7F},
{0x82, 0x24, 0x7F},
{0x85, 0x34, 0x7F},
{0x89, 0x24, 0x7F},
{0x8A, 0x34, 0x7F},
{0x8B, 0x34, 0x7F},
{0x8C, 0x24, 0x7F},
{0x8D, 0x34, 0x7F},
{0x7D, 0x04, 0x67},
{0x7E, 0x04, 0x67},
{0x7F, 0x34, 0x7F},
{0x81, 0x04, 0x67},
{0x9C, 0x24, 0x7F},
{0x9D, 0x34, 0x7F},
{0x9F, 0x34, 0x7F},
{0xA0, 0x04, 0x67},
{0x50, 0x04, 0x67},
{0x4E, 0x2C, 0x7F},
{0x51, 0x04, 0x67},
{0x92, 0x4C, 0x7F},
{0x93, 0x4C, 0x7F},
{0x94, 0x44, 0x7F},
{0x96, 0x34, 0x7F},
{0x97, 0x04, 0x67},
{0x98, 0x34, 0x7F},
{0x99, 0x04, 0x67},
{0x1C, 0x24, 0x7F},
{0x1D, 0x24, 0x7F},
{0x1E, 0x24, 0x7F},
{0x1F, 0x24, 0x7F},
{0x6A, 0x04, 0x67},
{0x6B, 0x04, 0x67},
{0x6C, 0x2C, 0x7F},
{0x6D, 0x04, 0x67},
{0x6E, 0x04, 0x67},
{0x6F, 0x24, 0x7F},
{0x91, 0x24, 0x7F},
{0x70, 0x04, 0x7F},
{0x71, 0x04, 0x67},
{0x72, 0x04, 0x67},
{0x68, 0x204, 0x267},
{0x5E, 0x05, 0x07},
{0x5F, 0x05, 0x07},
{0x17, 0x05, 0x07},
{0x18, 0x05, 0x07},
{0x19, 0x05, 0x07},
{0x1A, 0x05, 0x07},
{0x1B, 0x05, 0x07},
{0x2B, 0x05, 0x07},
{0x32, 0x05, 0x07},
{0x52, 0x05, 0x07},
{0x75, 0x05, 0x07},
{0x76, 0x05, 0x07},
{0x8E, 0x05, 0x07},
{0xAB, 0x05, 0x07},
{0xAD, 0x05, 0x07},
{0xAE, 0x05, 0x07},
{0x06, 0x05, 0x07},
{0x07, 0x05, 0x07},
{0x08, 0x05, 0x07},
{0x09, 0x05, 0x07},
{0x0A, 0x05, 0x07},
{0x0B, 0x05, 0x07},
{0x84, 0x05, 0x07},
{0x7B, 0x05, 0x07},
{0x9E, 0x05, 0x07},
{0xA1, 0x05, 0x07},
{0x58, 0x00, 0x00},
{0x59, 0x00, 0x00},
{0x4F, 0x05, 0x07},
{0x3A, 0x05, 0x07},
{0x3B, 0x05, 0x07},
{0x3C, 0x05, 0x07},
{0x3D, 0x05, 0x07},
{0x95, 0x05, 0x07},
{0x9A, 0x05, 0x07},
{0x12, 0x05, 0x07},
{0x13, 0x05, 0x07},
{0x14, 0x05, 0x07},
{0x15, 0x05, 0x07},
{0x16, 0x05, 0x07},
{0x73, 0x05, 0x07},
{0x74, 0x05, 0x07},
{0x22, 0x05, 0x07},
{0x23, 0x05, 0x07},
{0x20, 0x05, 0x07},
{0x21, 0x05, 0x07},
{0x24, 0x05, 0x07},
{0x25, 0x05, 0x07},
{0x62, 0x05, 0x07},
{0x65, 0x05, 0x07},
{0x66, 0x05, 0x07},
{0x67, 0x05, 0x07},
{0x69, 0x05, 0x07},
{0x64, 0x05, 0x07},
{0x63, 0x05, 0x07},
};
constexpr u32 NumInitialConfigsHoag = util::size(InitialConfigsHoag);

View file

@ -1,181 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
constexpr InitialConfig InitialConfigsIcosa[] = {
{0x5D, 0x00, 0x67},
{0x47, 0x28, 0x7F},
{0x48, 0x00, 0x67},
{0x46, 0x00, 0x67},
{0x49, 0x00, 0x67},
{0x30, 0x40, 0x27F},
{0x31, 0x40, 0x27F},
{0x0D, 0x20, 0x27F},
{0x0C, 0x00, 0x267},
{0x10, 0x20, 0x27F},
{0x0F, 0x00, 0x267},
{0x0E, 0x20, 0x27F},
{0x00, 0x48, 0x7F},
{0x01, 0x50, 0x7F},
{0x05, 0x50, 0x7F},
{0x04, 0x50, 0x7F},
{0x03, 0x50, 0x7F},
{0x02, 0x50, 0x7F},
{0x5B, 0x00, 0x78},
{0x7C, 0x01, 0x67},
{0x80, 0x01, 0x7F},
{0x34, 0x40, 0x27F},
{0x35, 0x40, 0x27F},
{0x55, 0x20, 0x78},
{0x56, 0x20, 0x7F},
{0xA1, 0x30, 0x7F},
{0x5C, 0x00, 0x78},
{0x59, 0x00, 0x60},
{0x5A, 0x30, 0x78},
{0x2C, 0x40, 0x27F},
{0x2D, 0x40, 0x27F},
{0x2E, 0x40, 0x27F},
{0x2F, 0x40, 0x27F},
{0x3B, 0x20, 0x7F},
{0x3C, 0x00, 0x67},
{0x3D, 0x20, 0x7F},
{0x36, 0x00, 0x67},
{0x37, 0x30, 0x7F},
{0x38, 0x00, 0x67},
{0x39, 0x28, 0x7F},
{0x54, 0x00, 0x67},
{0x9B, 0x30, 0x7F},
{0x1C, 0x00, 0x67},
{0x1D, 0x30, 0x7F},
{0x1E, 0x00, 0x67},
{0x1F, 0x00, 0x67},
{0x3F, 0x20, 0x7F},
{0x40, 0x00, 0x67},
{0x41, 0x20, 0x7F},
{0x42, 0x00, 0x67},
{0x43, 0x28, 0x7F},
{0x44, 0x00, 0x67},
{0x45, 0x28, 0x7F},
{0x22, 0x00, 0x67},
{0x23, 0x28, 0x7F},
{0x20, 0x00, 0x67},
{0x21, 0x00, 0x67},
{0x4B, 0x28, 0x7F},
{0x4C, 0x00, 0x67},
{0x4A, 0x00, 0x67},
{0x4D, 0x00, 0x67},
{0x64, 0x20, 0x27F},
{0x5F, 0x34, 0x7F},
{0x60, 0x04, 0x67},
{0x61, 0x2C, 0x7F},
{0x2A, 0x04, 0x67},
{0x2B, 0x04, 0x67},
{0x8F, 0x24, 0x7F},
{0x33, 0x34, 0x27F},
{0x52, 0x2C, 0x7F},
{0x53, 0x24, 0x7F},
{0x77, 0x04, 0x67},
{0x78, 0x34, 0x7F},
{0x11, 0x04, 0x67},
{0x06, 0x2C, 0x7F},
{0x08, 0x24, 0x7F},
{0x09, 0x24, 0x7F},
{0x0A, 0x24, 0x7F},
{0x0B, 0x24, 0x7F},
{0x88, 0x34, 0x7F},
{0x86, 0x2C, 0x7F},
{0x82, 0x24, 0x7F},
{0x85, 0x34, 0x7F},
{0x89, 0x34, 0x7F},
{0x8A, 0x34, 0x7F},
{0x8B, 0x34, 0x7F},
{0x8C, 0x34, 0x7F},
{0x8D, 0x24, 0x7F},
{0x7D, 0x04, 0x67},
{0x7E, 0x04, 0x67},
{0x81, 0x04, 0x67},
{0x9C, 0x34, 0x7F},
{0x9D, 0x34, 0x7F},
{0x9E, 0x2C, 0x7F},
{0x9F, 0x34, 0x7F},
{0xA0, 0x04, 0x67},
{0x4F, 0x04, 0x67},
{0x51, 0x04, 0x67},
{0x3A, 0x24, 0x7F},
{0x92, 0x4C, 0x7F},
{0x93, 0x4C, 0x7F},
{0x94, 0x44, 0x7F},
{0x95, 0x04, 0x67},
{0x96, 0x34, 0x7F},
{0x97, 0x04, 0x67},
{0x98, 0x34, 0x7F},
{0x99, 0x34, 0x7F},
{0x9A, 0x04, 0x67},
{0x3E, 0x24, 0x7F},
{0x6A, 0x04, 0x67},
{0x6B, 0x04, 0x67},
{0x6C, 0x2C, 0x7F},
{0x6D, 0x04, 0x67},
{0x6E, 0x04, 0x67},
{0x6F, 0x24, 0x7F},
{0x91, 0x24, 0x7F},
{0x70, 0x04, 0x7F},
{0x71, 0x04, 0x67},
{0x72, 0x04, 0x67},
{0x65, 0x34, 0x7F},
{0x66, 0x04, 0x67},
{0x67, 0x04, 0x267},
{0x5E, 0x05, 0x07},
{0x17, 0x05, 0x07},
{0x18, 0x05, 0x07},
{0x19, 0x05, 0x07},
{0x1A, 0x05, 0x07},
{0x1B, 0x05, 0x07},
{0x26, 0x05, 0x07},
{0x27, 0x05, 0x07},
{0x28, 0x05, 0x07},
{0x29, 0x05, 0x07},
{0x90, 0x05, 0x07},
{0x32, 0x05, 0x07},
{0x75, 0x05, 0x07},
{0x76, 0x05, 0x07},
{0x79, 0x05, 0x07},
{0x7A, 0x05, 0x07},
{0x8E, 0x05, 0x07},
{0x07, 0x05, 0x07},
{0x87, 0x05, 0x07},
{0x83, 0x05, 0x07},
{0x84, 0x05, 0x07},
{0x7B, 0x05, 0x07},
{0x7F, 0x05, 0x07},
{0x58, 0x00, 0x00},
{0x50, 0x05, 0x07},
{0x4E, 0x05, 0x07},
{0x12, 0x05, 0x07},
{0x13, 0x05, 0x07},
{0x14, 0x05, 0x07},
{0x15, 0x05, 0x07},
{0x16, 0x05, 0x07},
{0x73, 0x05, 0x07},
{0x74, 0x05, 0x07},
{0x24, 0x05, 0x07},
{0x25, 0x05, 0x07},
{0x62, 0x05, 0x07},
{0x68, 0x05, 0x07},
{0x69, 0x05, 0x07},
{0x63, 0x05, 0x07},
};
constexpr u32 NumInitialConfigsIcosa = util::size(InitialConfigsIcosa);

View file

@ -1,194 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
constexpr InitialConfig InitialConfigsIowa[] = {
{0x5D, 0x00, 0x7F},
{0x47, 0x28, 0x7F},
{0x48, 0x00, 0x7F},
{0x46, 0x00, 0x7F},
{0x49, 0x00, 0x7F},
{0x30, 0x40, 0x27F},
{0x31, 0x40, 0x27F},
{0x0D, 0x20, 0x27F},
{0x0C, 0x00, 0x27F},
{0x10, 0x40, 0x27F},
{0x0F, 0x00, 0x27F},
{0x0E, 0x20, 0x27F},
{0x00, 0x40, 0x7F},
{0x01, 0x50, 0x7F},
{0x05, 0x50, 0x7F},
{0x04, 0x50, 0x7F},
{0x03, 0x50, 0x7F},
{0x02, 0x50, 0x7F},
{0xAA, 0x40, 0x7F},
{0xAC, 0x40, 0x7F},
{0xA2, 0x50, 0x7F},
{0xA3, 0x50, 0x7F},
{0xA4, 0x50, 0x7F},
{0xA5, 0x50, 0x7F},
{0xA6, 0x50, 0x7F},
{0xA7, 0x50, 0x7F},
{0xA8, 0x50, 0x7F},
{0xA9, 0x50, 0x7F},
{0x5B, 0x00, 0x78},
{0x7C, 0x01, 0x67},
{0x80, 0x01, 0x7F},
{0x34, 0x40, 0x27F},
{0x35, 0x40, 0x27F},
{0x55, 0x20, 0x78},
{0x56, 0x20, 0x7F},
{0xA1, 0x30, 0x7F},
{0x5C, 0x00, 0x78},
{0x5A, 0x20, 0x78},
{0x2C, 0x40, 0x27F},
{0x2D, 0x40, 0x27F},
{0x2E, 0x40, 0x27F},
{0x2F, 0x40, 0x27F},
{0x3B, 0x20, 0x7F},
{0x3C, 0x00, 0x7F},
{0x3D, 0x20, 0x7F},
{0x36, 0x00, 0x7F},
{0x37, 0x30, 0x7F},
{0x38, 0x00, 0x7F},
{0x39, 0x28, 0x7F},
{0x54, 0x00, 0x67},
{0x9B, 0x30, 0x7F},
{0x1C, 0x00, 0x7F},
{0x1D, 0x30, 0x7F},
{0x1E, 0x00, 0x7F},
{0x1F, 0x00, 0x7F},
{0x3F, 0x20, 0x7F},
{0x40, 0x00, 0x7F},
{0x41, 0x20, 0x7F},
{0x42, 0x00, 0x7F},
{0x43, 0x28, 0x7F},
{0x44, 0x00, 0x7F},
{0x45, 0x28, 0x7F},
{0x4B, 0x28, 0x7F},
{0x4C, 0x00, 0x7F},
{0x4A, 0x00, 0x7F},
{0x4D, 0x00, 0x7F},
{0x64, 0x20, 0x27F},
{0x5F, 0x34, 0x7F},
{0x60, 0x04, 0x67},
{0x61, 0x2C, 0x7F},
{0x2A, 0x04, 0x67},
{0x8F, 0x24, 0x7F},
{0x33, 0x34, 0x27F},
{0x52, 0x2C, 0x7F},
{0x53, 0x24, 0x7F},
{0x77, 0x04, 0x67},
{0x78, 0x24, 0x7F},
{0x11, 0x04, 0x67},
{0x06, 0x2C, 0x7F},
{0x08, 0x24, 0x7F},
{0x09, 0x24, 0x7F},
{0x0A, 0x24, 0x7F},
{0x0B, 0x24, 0x7F},
{0x87, 0x04, 0x67},
{0x88, 0x34, 0x7F},
{0x86, 0x2C, 0x7F},
{0x82, 0x24, 0x7F},
{0x85, 0x34, 0x7F},
{0x89, 0x24, 0x7F},
{0x8A, 0x34, 0x7F},
{0x8B, 0x34, 0x7F},
{0x8C, 0x24, 0x7F},
{0x8D, 0x24, 0x7F},
{0x7D, 0x04, 0x67},
{0x7E, 0x04, 0x67},
{0x81, 0x04, 0x67},
{0x9C, 0x24, 0x7F},
{0x9D, 0x34, 0x7F},
{0x9E, 0x2C, 0x7F},
{0x9F, 0x34, 0x7F},
{0xA0, 0x04, 0x67},
{0x4F, 0x04, 0x67},
{0x51, 0x04, 0x67},
{0x3A, 0x24, 0x7F},
{0x92, 0x4C, 0x7F},
{0x93, 0x4C, 0x7F},
{0x94, 0x44, 0x7F},
{0x95, 0x04, 0x67},
{0x96, 0x34, 0x7F},
{0x97, 0x04, 0x67},
{0x98, 0x34, 0x7F},
{0x9A, 0x04, 0x67},
{0x3E, 0x24, 0x7F},
{0x6A, 0x04, 0x67},
{0x6B, 0x04, 0x67},
{0x6C, 0x2C, 0x7F},
{0x6D, 0x04, 0x67},
{0x6E, 0x04, 0x67},
{0x6F, 0x24, 0x7F},
{0x91, 0x24, 0x7F},
{0x70, 0x04, 0x7F},
{0x71, 0x04, 0x67},
{0x72, 0x04, 0x67},
{0x65, 0x34, 0x7F},
{0x66, 0x04, 0x67},
{0x67, 0x04, 0x267},
{0x5E, 0x05, 0x07},
{0x17, 0x05, 0x07},
{0x18, 0x05, 0x07},
{0x19, 0x05, 0x07},
{0x1A, 0x05, 0x07},
{0x1B, 0x05, 0x07},
{0x26, 0x05, 0x07},
{0x27, 0x05, 0x07},
{0x28, 0x05, 0x07},
{0x29, 0x05, 0x07},
{0x2B, 0x05, 0x07},
{0x90, 0x05, 0x07},
{0x32, 0x05, 0x07},
{0x75, 0x05, 0x07},
{0x76, 0x05, 0x07},
{0x79, 0x05, 0x07},
{0x7A, 0x05, 0x07},
{0x8E, 0x05, 0x07},
{0xAB, 0x05, 0x07},
{0xAD, 0x05, 0x07},
{0xAE, 0x05, 0x07},
{0x07, 0x05, 0x07},
{0x83, 0x05, 0x07},
{0x84, 0x05, 0x07},
{0x7B, 0x05, 0x07},
{0x7F, 0x05, 0x07},
{0x58, 0x00, 0x00},
{0x59, 0x00, 0x00},
{0x50, 0x05, 0x07},
{0x4E, 0x05, 0x07},
{0x99, 0x05, 0x07},
{0x12, 0x05, 0x07},
{0x13, 0x05, 0x07},
{0x14, 0x05, 0x07},
{0x15, 0x05, 0x07},
{0x16, 0x05, 0x07},
{0x73, 0x05, 0x07},
{0x74, 0x05, 0x07},
{0x22, 0x05, 0x07},
{0x23, 0x05, 0x07},
{0x20, 0x05, 0x07},
{0x21, 0x05, 0x07},
{0x24, 0x05, 0x07},
{0x25, 0x05, 0x07},
{0x62, 0x05, 0x07},
{0x68, 0x05, 0x07},
{0x69, 0x05, 0x07},
{0x63, 0x05, 0x07},
};
constexpr u32 NumInitialConfigsIowa = util::size(InitialConfigsIowa);

View file

@ -1,67 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
constexpr InitialConfig InitialDrivePadConfigs[] = {
{0x04, 0x01010000, 0x01F1F000},
{0x0D, 0x01010000, 0x01F1F000},
{0x10, 0x01010000, 0x01F1F000},
{0x12, 0x01010000, 0x01F1F000},
{0x13, 0x01010000, 0x01F1F000},
{0x14, 0x0001F000, 0x01F1F000},
{0x15, 0x0001F000, 0x01F1F000},
{0x24, 0x01010000, 0x01F1F000},
{0x25, 0x01010000, 0x01F1F000},
{0x26, 0x01010000, 0x01F1F000},
{0x27, 0x01010000, 0x01F1F000},
{0x28, 0x01010000, 0x01F1F000},
{0x29, 0x01010000, 0x01F1F000},
{0x2A, 0x01010000, 0x01F1F000},
{0x2B, 0x01010000, 0x01F1F000},
{0x2C, 0x01F1F000, 0x01F1F000},
{0x2D, 0x01F1F000, 0x01F1F000},
{0x2F, 0x01F1F000, 0x01F1F000},
{0x30, 0x01404000, 0x01F1F000},
{0x31, 0x0001F000, 0x01F1F000},
{0x32, 0x0001F000, 0x01F1F000},
{0x33, 0x0001F000, 0x01F1F000},
{0x34, 0x0001F000, 0x01F1F000},
{0x35, 0x00007000, 0x01F1F000},
{0x36, 0x00007000, 0x01F1F000},
{0x46, 0x01010000, 0x01F1F000},
{0x47, 0x01010000, 0x01F1F000},
{0x4C, 0x01404000, 0x01F1F000},
{0x4D, 0x01404000, 0x01F1F000},
{0x62, 0x0001F000, 0x01F1F000},
{0x63, 0x0001F000, 0x01F1F000},
{0x7C, 0x01414000, 0x01F1F000},
{0x87, 0x01404000, 0x01F1F000},
{0x88, 0x01404000, 0x01F1F000},
{0x89, 0x01404000, 0x01F1F000},
{0x8A, 0x01404000, 0x01F1F000},
{0x6D, 0x00000000, 0xF0000000},
{0x6E, 0x00000000, 0xF0000000},
{0x6F, 0x00000000, 0xF0000000},
{0x70, 0x00000000, 0xF0000000},
{0x71, 0x00000000, 0xF0000000},
{0x72, 0x00000000, 0xF0000000},
{0x73, 0x00000000, 0xF0000000},
{0x74, 0x00000000, 0xF0000000},
{0x75, 0x00000000, 0xF0000000},
{0x76, 0x00000000, 0xF0000000},
{0x69, 0x51212000, 0xF1F1F000},
};
constexpr u32 NumInitialDrivePadConfigs = util::size(InitialDrivePadConfigs);

View file

@ -1,67 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
constexpr InitialConfig InitialDrivePadConfigsHoag[] = {
{0x04, 0x01010000, 0x01F1F000},
{0x0D, 0x01010000, 0x01F1F000},
{0x10, 0x01010000, 0x01F1F000},
{0x12, 0x01010000, 0x01F1F000},
{0x13, 0x01010000, 0x01F1F000},
{0x14, 0x0001F000, 0x01F1F000},
{0x15, 0x0001F000, 0x01F1F000},
{0x24, 0x01010000, 0x01F1F000},
{0x25, 0x01010000, 0x01F1F000},
{0x26, 0x01010000, 0x01F1F000},
{0x27, 0x01010000, 0x01F1F000},
{0x28, 0x01010000, 0x01F1F000},
{0x29, 0x01010000, 0x01F1F000},
{0x2A, 0x01010000, 0x01F1F000},
{0x2B, 0x01010000, 0x01F1F000},
{0x2C, 0x01F1F000, 0x01F1F000},
{0x2D, 0x01F1F000, 0x01F1F000},
{0x2F, 0x01F1F000, 0x01F1F000},
{0x30, 0x01404000, 0x01F1F000},
{0x31, 0x0001F000, 0x01F1F000},
{0x32, 0x0001F000, 0x01F1F000},
{0x33, 0x00004000, 0x01F1F000},
{0x34, 0x00004000, 0x01F1F000},
{0x35, 0x00007000, 0x01F1F000},
{0x36, 0x00007000, 0x01F1F000},
{0x46, 0x01010000, 0x01F1F000},
{0x47, 0x01010000, 0x01F1F000},
{0x4C, 0x01404000, 0x01F1F000},
{0x4D, 0x01404000, 0x01F1F000},
{0x62, 0x0001F000, 0x01F1F000},
{0x63, 0x0001F000, 0x01F1F000},
{0x7C, 0x01414000, 0x01F1F000},
{0x87, 0x01404000, 0x01F1F000},
{0x88, 0x01404000, 0x01F1F000},
{0x89, 0x01404000, 0x01F1F000},
{0x8A, 0x01404000, 0x01F1F000},
{0x6D, 0x00000000, 0xF0000000},
{0x6E, 0x00000000, 0xF0000000},
{0x6F, 0x00000000, 0xF0000000},
{0x70, 0x00000000, 0xF0000000},
{0x71, 0x00000000, 0xF0000000},
{0x72, 0x00000000, 0xF0000000},
{0x73, 0x00000000, 0xF0000000},
{0x74, 0x00000000, 0xF0000000},
{0x75, 0x00000000, 0xF0000000},
{0x76, 0x00000000, 0xF0000000},
{0x69, 0x51212000, 0xF1F1F000},
};
constexpr u32 NumInitialDrivePadConfigsHoag = util::size(InitialDrivePadConfigsHoag);

View file

@ -1,361 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
struct Definition {
u32 reg_offset;
u32 mask_val;
u32 pm_val;
};
struct DrivePadDefinition {
u32 reg_offset;
u32 mask_val;
};
constexpr Definition Map[] = {
{0x00003000, 0x72FF, 0x01}, /* Sdmmc1Clk */
{0x00003004, 0x72FF, 0x02}, /* Sdmmc1Cmd */
{0x00003008, 0x72FF, 0x02}, /* Sdmmc1Dat3 */
{0x0000300C, 0x72FF, 0x02}, /* Sdmmc1Dat2 */
{0x00003010, 0x72FF, 0x02}, /* Sdmmc1Dat1 */
{0x00003014, 0x72FF, 0x01}, /* Sdmmc1Dat0 */
{0x0000301C, 0x72FF, 0x01}, /* Sdmmc3Clk */
{0x00003020, 0x72FF, 0x01}, /* Sdmmc3Cmd */
{0x00003024, 0x72FF, 0x01}, /* Sdmmc3Dat0 */
{0x00003028, 0x72FF, 0x01}, /* Sdmmc3Dat1 */
{0x0000302C, 0x72FF, 0x01}, /* Sdmmc3Dat2 */
{0x00003030, 0x72FF, 0x01}, /* Sdmmc3Dat3 */
{0x00003038, 0x1DFF, 0x01}, /* PexL0RstN */
{0x0000303C, 0x1DFF, 0x01}, /* PexL0ClkreqN */
{0x00003040, 0x1DFF, 0x01}, /* PexWakeN */
{0x00003044, 0x1DFF, 0x01}, /* PexL1RstN */
{0x00003048, 0x1DFF, 0x01}, /* PexL1ClkreqN */
{0x0000304C, 0x19FF, 0x01}, /* SataLedActive */
{0x00003050, 0x1F2FF, 0x01}, /* Spi1Mosi */
{0x00003054, 0x1F2FF, 0x01}, /* Spi1Miso */
{0x00003058, 0x1F2FF, 0x01}, /* Spi1Sck */
{0x0000305C, 0x1F2FF, 0x01}, /* Spi1Cs0 */
{0x00003060, 0x1F2FF, 0x01}, /* Spi1Cs1 */
{0x00003064, 0x72FF, 0x02}, /* Spi2Mosi */
{0x00003068, 0x72FF, 0x02}, /* Spi2Miso */
{0x0000306C, 0x72FF, 0x02}, /* Spi2Sck */
{0x00003070, 0x72FF, 0x02}, /* Spi2Cs0 */
{0x00003074, 0x72FF, 0x01}, /* Spi2Cs1 */
{0x00003078, 0x1F2FF, 0x01}, /* Spi4Mosi */
{0x0000307C, 0x1F2FF, 0x01}, /* Spi4Miso */
{0x00003080, 0x1F2FF, 0x01}, /* Spi4Sck */
{0x00003084, 0x1F2FF, 0x01}, /* Spi4Cs0 */
{0x00003088, 0x72FF, 0x01}, /* QspiSck */
{0x0000308C, 0x72FF, 0x01}, /* QspiCsN */
{0x00003090, 0x72FF, 0x01}, /* QspiIo0 */
{0x00003094, 0x72FF, 0x01}, /* QspiIo1 */
{0x00003098, 0x72FF, 0x01}, /* QspiIo2 */
{0x0000309C, 0x72FF, 0x01}, /* QspiIo3 */
{0x000030A4, 0x19FF, 0x02}, /* Dmic1Clk */
{0x000030A8, 0x19FF, 0x02}, /* Dmic1Dat */
{0x000030AC, 0x19FF, 0x02}, /* Dmic2Clk */
{0x000030B0, 0x19FF, 0x02}, /* Dmic2Dat */
{0x000030B4, 0x19FF, 0x02}, /* Dmic3Clk */
{0x000030B8, 0x19FF, 0x02}, /* Dmic3Dat */
{0x000030BC, 0x1DFF, 0x01}, /* Gen1I2cScl */
{0x000030C0, 0x1DFF, 0x01}, /* Gen1I2cSda */
{0x000030C4, 0x1DFF, 0x01}, /* Gen2I2cScl */
{0x000030C8, 0x1DFF, 0x01}, /* Gen2I2cSda */
{0x000030CC, 0x1DFF, 0x01}, /* Gen3I2cScl */
{0x000030D0, 0x1DFF, 0x01}, /* Gen3I2cSda */
{0x000030D4, 0x1DFF, 0x02}, /* CamI2cScl */
{0x000030D8, 0x1DFF, 0x02}, /* CamI2cSda */
{0x000030DC, 0x1DFF, 0x01}, /* PwrI2cScl */
{0x000030E0, 0x1DFF, 0x01}, /* PwrI2cSda */
{0x000030E4, 0x19FF, 0x01}, /* Uart1Tx */
{0x000030E8, 0x19FF, 0x01}, /* Uart1Rx */
{0x000030EC, 0x19FF, 0x01}, /* Uart1Rts */
{0x000030F0, 0x19FF, 0x01}, /* Uart1Cts */
{0x000030F4, 0x19FF, 0x00}, /* Uart2Tx */
{0x000030F8, 0x19FF, 0x00}, /* Uart2Rx */
{0x000030FC, 0x19FF, 0x02}, /* Uart2Rts */
{0x00003100, 0x19FF, 0x02}, /* Uart2Cts */
{0x00003104, 0x19FF, 0x02}, /* Uart3Tx */
{0x00003108, 0x19FF, 0x02}, /* Uart3Rx */
{0x0000310C, 0x19FF, 0x02}, /* Uart3Rts */
{0x00003110, 0x19FF, 0x02}, /* Uart3Cts */
{0x00003114, 0x19FF, 0x02}, /* Uart4Tx */
{0x00003118, 0x19FF, 0x02}, /* Uart4Rx */
{0x0000311C, 0x19FF, 0x02}, /* Uart4Rts */
{0x00003120, 0x19FF, 0x02}, /* Uart4Cts */
{0x00003124, 0x72FF, 0x01}, /* Dap1Fs */
{0x00003128, 0x72FF, 0x01}, /* Dap1Din */
{0x0000312C, 0x72FF, 0x01}, /* Dap1Dout */
{0x00003130, 0x72FF, 0x01}, /* Dap1Sclk */
{0x00003134, 0x72FF, 0x01}, /* Dap2Fs */
{0x00003138, 0x72FF, 0x01}, /* Dap2Din */
{0x0000313C, 0x72FF, 0x01}, /* Dap2Dout */
{0x00003140, 0x72FF, 0x01}, /* Dap2Sclk */
{0x00003144, 0x72FF, 0x01}, /* Dap4Fs */
{0x00003148, 0x72FF, 0x01}, /* Dap4Din */
{0x0000314C, 0x72FF, 0x01}, /* Dap4Dout */
{0x00003150, 0x72FF, 0x01}, /* Dap4Sclk */
{0x00003154, 0x72FF, 0x01}, /* Cam1Mclk */
{0x00003158, 0x72FF, 0x01}, /* Cam2Mclk */
{0x0000315C, 0x72FF, 0x01}, /* JtagRtck */
{0x00003160, 0x118C, 0xFF}, /* Clk32kIn */
{0x00003164, 0x72FF, 0x02}, /* Clk32kOut */
{0x00003168, 0x1DFF, 0x01}, /* BattBcl */
{0x0000316C, 0x11CC, 0xFF}, /* ClkReq */
{0x00003170, 0x11CC, 0xFF}, /* CpuPwrReq */
{0x00003174, 0x11CC, 0xFF}, /* PwrIntN */
{0x00003178, 0x11CC, 0xFF}, /* Shutdown */
{0x0000317C, 0x11CC, 0xFF}, /* CorePwrReq */
{0x00003180, 0x19FF, 0x01}, /* AudMclk */
{0x00003184, 0x19FF, 0x00}, /* DvfsPwm */
{0x00003188, 0x19FF, 0x00}, /* DvfsClk */
{0x0000318C, 0x19FF, 0x00}, /* GpioX1Aud */
{0x00003190, 0x19FF, 0x00}, /* GpioX3Aud */
{0x00003194, 0x1DFF, 0x00}, /* GpioPcc7 */
{0x00003198, 0x1DFF, 0x01}, /* HdmiCec */
{0x0000319C, 0x1DFF, 0x01}, /* HdmiIntDpHpd */
{0x000031A0, 0x19FF, 0x01}, /* SpdifOut */
{0x000031A4, 0x19FF, 0x01}, /* SpdifIn */
{0x000031A8, 0x1DFF, 0x01}, /* UsbVbusEn0 */
{0x000031AC, 0x1DFF, 0x01}, /* UsbVbusEn1 */
{0x000031B0, 0x19FF, 0x01}, /* DpHpd0 */
{0x000031B4, 0x19FF, 0x00}, /* WifiEn */
{0x000031B8, 0x19FF, 0x00}, /* WifiRst */
{0x000031BC, 0x19FF, 0x00}, /* WifiWakeAp */
{0x000031C0, 0x19FF, 0x00}, /* ApWakeBt */
{0x000031C4, 0x19FF, 0x00}, /* BtRst */
{0x000031C8, 0x19FF, 0x00}, /* BtWakeAp */
{0x000031CC, 0x19FF, 0x00}, /* ApWakeNfc */
{0x000031D0, 0x19FF, 0x00}, /* NfcEn */
{0x000031D4, 0x19FF, 0x00}, /* NfcInt */
{0x000031D8, 0x19FF, 0x00}, /* GpsEn */
{0x000031DC, 0x19FF, 0x00}, /* GpsRst */
{0x000031E0, 0x19FF, 0x01}, /* CamRst */
{0x000031E4, 0x19FF, 0x02}, /* CamAfEn */
{0x000031E8, 0x19FF, 0x02}, /* CamFlashEn */
{0x000031EC, 0x19FF, 0x01}, /* Cam1Pwdn */
{0x000031F0, 0x19FF, 0x01}, /* Cam2Pwdn */
{0x000031F4, 0x19FF, 0x01}, /* Cam1Strobe */
{0x000031F8, 0x19FF, 0x01}, /* LcdTe */
{0x000031FC, 0x19FF, 0x03}, /* LcdBlPwm */
{0x00003200, 0x19FF, 0x00}, /* LcdBlEn */
{0x00003204, 0x19FF, 0x00}, /* LcdRst */
{0x00003208, 0x19FF, 0x01}, /* LcdGpio1 */
{0x0000320C, 0x19FF, 0x02}, /* LcdGpio2 */
{0x00003210, 0x19FF, 0x00}, /* ApReady */
{0x00003214, 0x19FF, 0x00}, /* TouchRst */
{0x00003218, 0x19FF, 0x01}, /* TouchClk */
{0x0000321C, 0x19FF, 0x00}, /* ModemWakeAp */
{0x00003220, 0x19FF, 0x00}, /* TouchInt */
{0x00003224, 0x19FF, 0x00}, /* MotionInt */
{0x00003228, 0x19FF, 0x00}, /* AlsProxInt */
{0x0000322C, 0x19FF, 0x00}, /* TempAlert */
{0x00003230, 0x19FF, 0x00}, /* ButtonPowerOn */
{0x00003234, 0x19FF, 0x00}, /* ButtonVolUp */
{0x00003238, 0x19FF, 0x00}, /* ButtonVolDown */
{0x0000323C, 0x19FF, 0x00}, /* ButtonSlideSw */
{0x00003240, 0x19FF, 0x00}, /* ButtonHome */
{0x00003244, 0x19FF, 0x01}, /* GpioPa6 */
{0x00003248, 0x19FF, 0x00}, /* GpioPe6 */
{0x0000324C, 0x19FF, 0x00}, /* GpioPe7 */
{0x00003250, 0x19FF, 0x00}, /* GpioPh6 */
{0x00003254, 0x72FF, 0x02}, /* GpioPk0 */
{0x00003258, 0x72FF, 0x02}, /* GpioPk1 */
{0x0000325C, 0x72FF, 0x02}, /* GpioPk2 */
{0x00003260, 0x72FF, 0x02}, /* GpioPk3 */
{0x00003264, 0x72FF, 0x01}, /* GpioPk4 */
{0x00003268, 0x72FF, 0x01}, /* GpioPk5 */
{0x0000326C, 0x72FF, 0x01}, /* GpioPk6 */
{0x00003270, 0x72FF, 0x01}, /* GpioPk7 */
{0x00003274, 0x72FF, 0x00}, /* GpioPl0 */
{0x00003278, 0x72FF, 0x01}, /* GpioPl1 */
{0x0000327C, 0x72FF, 0x01}, /* GpioPz0 */
{0x00003280, 0x72FF, 0x02}, /* GpioPz1 */
{0x00003284, 0x72FF, 0x02}, /* GpioPz2 */
{0x00003288, 0x72FF, 0x01}, /* GpioPz3 */
{0x0000328C, 0x72FF, 0x01}, /* GpioPz4 */
{0x00003290, 0x72FF, 0x01}, /* GpioPz5 */
/* 5.0.0+ only */
{0x00003294, 0x1F2FF, 0x02}, /* Sdmmc2Dat0 */
{0x00003298, 0x1F2FF, 0x02}, /* Sdmmc2Dat1 */
{0x0000329C, 0x1F2FF, 0x02}, /* Sdmmc2Dat2 */
{0x000032A0, 0x1F2FF, 0x02}, /* Sdmmc2Dat3 */
{0x000032A4, 0x1F2FF, 0x02}, /* Sdmmc2Dat4 */
{0x000032A8, 0x1F2FF, 0x02}, /* Sdmmc2Dat5 */
{0x000032AC, 0x1F2FF, 0x02}, /* Sdmmc2Dat6 */
{0x000032B0, 0x1F2FF, 0x02}, /* Sdmmc2Dat7 */
{0x000032B4, 0x1F2FF, 0x02}, /* Sdmmc2Clk */
{0x000032B8, 0x1F2FF, 0x00}, /* Sdmmc2Clkb */
{0x000032BC, 0x1F2FF, 0x02}, /* Sdmmc2Cmd */
{0x000032C0, 0x1F2FF, 0x00}, /* Sdmmc2Dqs */
{0x000032C4, 0x1F2FF, 0x00}, /* Sdmmc2Dqsb */
};
constexpr u32 PadNameMax = util::size(Map);
constexpr DrivePadDefinition DrivePadMap[] = {
{0x000008E4, 0x01F1F000}, /* AlsProxInt */
{0x000008E8, 0x01F1F000}, /* ApReady */
{0x000008EC, 0x01F1F000}, /* ApWakeBt */
{0x000008F0, 0x01F1F000}, /* ApWakeNfc */
{0x000008F4, 0x01F1F000}, /* AudMclk */
{0x000008F8, 0x01F1F000}, /* BattBcl */
{0x000008FC, 0x01F1F000}, /* BtRst */
{0x00000900, 0x01F1F000}, /* BtWakeAp */
{0x00000904, 0x01F1F000}, /* ButtonHome */
{0x00000908, 0x01F1F000}, /* ButtonPowerOn */
{0x0000090C, 0x01F1F000}, /* ButtonSlideSw */
{0x00000910, 0x01F1F000}, /* ButtonVolDown */
{0x00000914, 0x01F1F000}, /* ButtonVolUp */
{0x00000918, 0x01F1F000}, /* Cam1Mclk */
{0x0000091C, 0x01F1F000}, /* Cam1Pwdn */
{0x00000920, 0x01F1F000}, /* Cam1Strobe */
{0x00000924, 0x01F1F000}, /* Cam2Mclk */
{0x00000928, 0x01F1F000}, /* Cam2Pwdn */
{0x0000092C, 0x01F1F000}, /* CamAfEn */
{0x00000930, 0x01F1F000}, /* CamFlashEn */
{0x00000934, 0x01F1F000}, /* CamI2cScl */
{0x00000938, 0x01F1F000}, /* CamI2cSda */
{0x0000093C, 0x01F1F000}, /* CamRst */
{0x00000940, 0x01F1F000}, /* Clk32kIn */
{0x00000944, 0x01F1F000}, /* Clk32kOut */
{0x00000948, 0x01F1F000}, /* ClkReq */
{0x0000094C, 0x01F1F000}, /* CorePwrReq */
{0x00000950, 0x01F1F000}, /* CpuPwrReq */
{0x00000954, 0xF0000000}, /* Dap1Din */
{0x00000958, 0xF0000000}, /* Dap1Dout */
{0x0000095C, 0xF0000000}, /* Dap1Fs */
{0x00000960, 0xF0000000}, /* Dap1Sclk */
{0x00000964, 0xF0000000}, /* Dap2Din */
{0x00000968, 0xF0000000}, /* Dap2Dout */
{0x0000096C, 0xF0000000}, /* Dap2Fs */
{0x00000970, 0xF0000000}, /* Dap2Sclk */
{0x00000974, 0x01F1F000}, /* Dap4Din */
{0x00000978, 0x01F1F000}, /* Dap4Dout */
{0x0000097C, 0x01F1F000}, /* Dap4Fs */
{0x00000980, 0x01F1F000}, /* Dap4Sclk */
{0x00000984, 0x01F1F000}, /* Dmic1Clk */
{0x00000988, 0x01F1F000}, /* Dmic1Dat */
{0x0000098C, 0x01F1F000}, /* Dmic2Clk */
{0x00000990, 0x01F1F000}, /* Dmic2Dat */
{0x00000994, 0x01F1F000}, /* Dmic3Clk */
{0x00000998, 0x01F1F000}, /* Dmic3Dat */
{0x0000099C, 0x01F1F000}, /* DpHpd */
{0x000009A0, 0x01F1F000}, /* DvfsClk */
{0x000009A4, 0x01F1F000}, /* DvfsPwm */
{0x000009A8, 0x01F1F000}, /* Gen1I2cScl */
{0x000009AC, 0x01F1F000}, /* Gen1I2cSda */
{0x000009B0, 0x01F1F000}, /* Gen2I2cScl */
{0x000009B4, 0x01F1F000}, /* Gen2I2cSda */
{0x000009B8, 0x01F1F000}, /* Gen3I2cScl */
{0x000009BC, 0x01F1F000}, /* Gen3I2cSda */
{0x000009C0, 0x01F1F000}, /* GpioPa6 */
{0x000009C4, 0x01F1F000}, /* GpioPcc7 */
{0x000009C8, 0x01F1F000}, /* GpioPe6 */
{0x000009CC, 0x01F1F000}, /* GpioPe7 */
{0x000009D0, 0x01F1F000}, /* GpioPh6 */
{0x000009D4, 0xF0000000}, /* GpioPk0 */
{0x000009D8, 0xF0000000}, /* GpioPk1 */
{0x000009DC, 0xF0000000}, /* GpioPk2 */
{0x000009E0, 0xF0000000}, /* GpioPk3 */
{0x000009E4, 0xF0000000}, /* GpioPk4 */
{0x000009E8, 0xF0000000}, /* GpioPk5 */
{0x000009EC, 0xF0000000}, /* GpioPk6 */
{0x000009F0, 0xF0000000}, /* GpioPk7 */
{0x000009F4, 0xF0000000}, /* GpioPl0 */
{0x000009F8, 0xF0000000}, /* GpioPl1 */
{0x000009FC, 0x07F7F000}, /* GpioPz0 */
{0x00000A00, 0x07F7F000}, /* GpioPz1 */
{0x00000A04, 0x07F7F000}, /* GpioPz2 */
{0x00000A08, 0x07F7F000}, /* GpioPz3 */
{0x00000A0C, 0x07F7F000}, /* GpioPz4 */
{0x00000A10, 0x07F7F000}, /* GpioPz5 */
{0x00000A14, 0x01F1F000}, /* GpioX1Aud */
{0x00000A18, 0x01F1F000}, /* GpioX3Aud */
{0x00000A1C, 0x01F1F000}, /* GpsEn */
{0x00000A20, 0x01F1F000}, /* GpsRst */
{0x00000A24, 0x01F1F000}, /* HdmiCec */
{0x00000A28, 0x01F1F000}, /* HdmiIntDpHpd */
{0x00000A2C, 0x01F1F000}, /* JtagRtck */
{0x00000A30, 0x01F1F000}, /* LcdBlEn */
{0x00000A34, 0x01F1F000}, /* LcdBlPwm */
{0x00000A38, 0x01F1F000}, /* LcdGpio1 */
{0x00000A3C, 0x01F1F000}, /* LcdGpio2 */
{0x00000A40, 0x01F1F000}, /* LcdRst */
{0x00000A44, 0x01F1F000}, /* LcdTe */
{0x00000A48, 0x01F1F000}, /* ModemWakeAp */
{0x00000A4C, 0x01F1F000}, /* MotionInt */
{0x00000A50, 0x01F1F000}, /* NfcEn */
{0x00000A54, 0x01F1F000}, /* NfcInt */
{0x00000A58, 0x01F1F000}, /* PexL0ClkReqN */
{0x00000A5C, 0x01F1F000}, /* PexL0RstN */
{0x00000A60, 0x01F1F000}, /* PexL1ClkreqN */
{0x00000A64, 0x01F1F000}, /* PexL1RstN */
{0x00000A68, 0x01F1F000}, /* PexWakeN */
{0x00000A6C, 0x01F1F000}, /* PwrI2cScl */
{0x00000A70, 0x01F1F000}, /* PwrI2cSda */
{0x00000A74, 0x01F1F000}, /* PwrIntN */
{0x00000A78, 0x07F7F000}, /* QspiComp */
{0x00000A90, 0xF0000000}, /* QspiSck */
{0x00000A94, 0x01F1F000}, /* SataLedActive */
{0x00000A98, 0xF7F7F000}, /* Sdmmc1Pad */
{0x00000AB0, 0xF7F7F000}, /* Sdmmc3Pad */
{0x00000AC8, 0x01F1F000}, /* Shutdown */
{0x00000ACC, 0x01F1F000}, /* SpdifIn */
{0x00000AD0, 0x01F1F000}, /* SpdifOut */
{0x00000AD4, 0xF0000000}, /* Spi1Cs0 */
{0x00000AD8, 0xF0000000}, /* Spi1Cs1 */
{0x00000ADC, 0xF0000000}, /* Spi1Miso */
{0x00000AE0, 0xF0000000}, /* Spi1Mosi */
{0x00000AE4, 0xF0000000}, /* Spi1Sck */
{0x00000AE8, 0xF0000000}, /* Spi2Cs0 */
{0x00000AEC, 0xF0000000}, /* Spi2Cs1 */
{0x00000AF0, 0xF0000000}, /* Spi2Miso */
{0x00000AF4, 0xF0000000}, /* Spi2Mosi */
{0x00000AF8, 0xF0000000}, /* Spi2Sck */
{0x00000AFC, 0xF0000000}, /* Spi4Cs0 */
{0x00000B00, 0xF0000000}, /* Spi4Miso */
{0x00000B04, 0xF0000000}, /* Spi4Mosi */
{0x00000B08, 0xF0000000}, /* Spi4Sck */
{0x00000B0C, 0x01F1F000}, /* TempAlert */
{0x00000B10, 0x01F1F000}, /* TouchClk */
{0x00000B14, 0x01F1F000}, /* TouchInt */
{0x00000B18, 0x01F1F000}, /* TouchRst */
{0x00000B1C, 0x01F1F000}, /* Uart1Cts */
{0x00000B20, 0x01F1F000}, /* Uart1Rts */
{0x00000B24, 0x01F1F000}, /* Uart1Rx */
{0x00000B28, 0x01F1F000}, /* Uart1Tx */
{0x00000B2C, 0x01F1F000}, /* Uart2Cts */
{0x00000B30, 0x01F1F000}, /* Uart2Rts */
{0x00000B34, 0x01F1F000}, /* Uart2Rx */
{0x00000B38, 0x01F1F000}, /* Uart2Tx */
{0x00000B3C, 0x01F1F000}, /* Uart3Cts */
{0x00000B40, 0x01F1F000}, /* Uart3Rts */
{0x00000B44, 0x01F1F000}, /* Uart3Rx */
{0x00000B48, 0x01F1F000}, /* Uart3Tx */
{0x00000B4C, 0x01F1F000}, /* Uart4Cts */
{0x00000B50, 0x01F1F000}, /* Uart4Rts */
{0x00000B54, 0x01F1F000}, /* Uart4Rx */
{0x00000B58, 0x01F1F000}, /* Uart4Tx */
{0x00000B5C, 0x01F1F000}, /* UsbVbusEn0 */
{0x00000B60, 0x01F1F000}, /* UsbVbusEn1 */
{0x00000B64, 0x01F1F000}, /* WifiEn */
{0x00000B68, 0x01F1F000}, /* WifiRst */
{0x00000B6C, 0x01F1F000}, /* WifiWakeAp */
};
constexpr u32 DrivePadNameMax = util::size(DrivePadMap);

View file

@ -1,523 +0,0 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stratosphere.hpp>
#include "pinmux_utils.hpp"
namespace ams::pinmux {
namespace {
/* Pull in Pinmux map definitions. */
#include "pinmux_map.inc"
constexpr u32 ApbMiscPhysicalBase = 0x70000000;
/* Globals. */
bool g_initialized_pinmux_vaddr = false;
uintptr_t g_pinmux_vaddr = 0;
/* Helpers. */
inline const Definition *GetDefinition(u32 pinmux_name) {
AMS_ABORT_UNLESS(pinmux_name < PadNameMax);
return &Map[pinmux_name];
}
inline const DrivePadDefinition *GetDrivePadDefinition(u32 drivepad_name) {
AMS_ABORT_UNLESS(drivepad_name < DrivePadNameMax);
return &DrivePadMap[drivepad_name];
}
uintptr_t GetBaseAddress() {
if (!g_initialized_pinmux_vaddr) {
g_pinmux_vaddr = dd::GetIoMapping(ApbMiscPhysicalBase, 0x4000);
g_initialized_pinmux_vaddr = true;
}
return g_pinmux_vaddr;
}
}
u32 UpdatePark(u32 pinmux_name) {
const uintptr_t pinmux_base_vaddr = GetBaseAddress();
const Definition *pinmux_def = GetDefinition(pinmux_name);
/* Fetch this PINMUX's register offset */
u32 pinmux_reg_offset = pinmux_def->reg_offset;
/* Fetch this PINMUX's mask value */
u32 pinmux_mask_val = pinmux_def->mask_val;
/* Get current register ptr. */
uintptr_t pinmux_reg = pinmux_base_vaddr + pinmux_reg_offset;
/* Read from the PINMUX register */
u32 pinmux_val = reg::Read(pinmux_reg);
/* This PINMUX supports park change */
if (pinmux_mask_val & 0x20) {
/* Clear park status if set */
if (pinmux_val & 0x20) {
pinmux_val &= ~(0x20);
}
}
/* Write to the appropriate PINMUX register */
reg::Write(pinmux_reg, pinmux_val);
/* Do a dummy read from the PINMUX register */
pinmux_val = reg::Read(pinmux_reg);
return pinmux_val;
}
u32 UpdatePad(u32 pinmux_name, u32 pinmux_config_val, u32 pinmux_config_mask_val) {
const uintptr_t pinmux_base_vaddr = GetBaseAddress();
const Definition *pinmux_def = GetDefinition(pinmux_name);
/* Fetch this PINMUX's register offset */
u32 pinmux_reg_offset = pinmux_def->reg_offset;
/* Fetch this PINMUX's mask value */
u32 pinmux_mask_val = pinmux_def->mask_val;
/* Get current register ptr. */
uintptr_t pinmux_reg = pinmux_base_vaddr + pinmux_reg_offset;
/* Read from the PINMUX register */
u32 pinmux_val = reg::Read(pinmux_reg);
/* This PINMUX register is locked */
AMS_ABORT_UNLESS((pinmux_val & 0x80) == 0);
u32 pm_val = (pinmux_config_val & 0x07);
/* Adjust PM */
if (pinmux_config_mask_val & 0x07) {
/* Apply additional changes first */
if (pm_val == 0x05) {
/* This pin supports PUPD change */
if (pinmux_mask_val & 0x0C) {
/* Change PUPD */
if ((pinmux_val & 0x0C) != 0x04) {
pinmux_val &= 0xFFFFFFF3;
pinmux_val |= 0x04;
}
}
/* This pin supports Tristate change */
if (pinmux_mask_val & 0x10) {
/* Change Tristate */
if (!(pinmux_val & 0x10)) {
pinmux_val |= 0x10;
}
}
/* This pin supports EInput change */
if (pinmux_mask_val & 0x40) {
/* Change EInput */
if (pinmux_val & 0x40) {
pinmux_val &= 0xFFFFFFBF;
}
}
} else if (pm_val >= 0x06) {
/* Default to safe value */
pm_val = 0x04;
}
/* Translate PM value if necessary */
if (pm_val == 0x04 || pm_val == 0x05) {
pm_val = pinmux_def->pm_val;
}
/* This pin supports PM change */
if (pinmux_mask_val & 0x03) {
/* Change PM */
if ((pinmux_val & 0x03) != (pm_val & 0x03)) {
pinmux_val &= 0xFFFFFFFC;
pinmux_val |= (pm_val & 0x03);
}
}
}
u32 pupd_config_val = (pinmux_config_val & 0x18);
/* Adjust PUPD */
if (pinmux_config_mask_val & 0x18) {
if (pupd_config_val < 0x11) {
/* This pin supports PUPD change */
if (pinmux_mask_val & 0x0C) {
/* Change PUPD */
if (((pinmux_val >> 0x02) & 0x03) != (pupd_config_val >> 0x03)) {
pinmux_val &= 0xFFFFFFF3;
pinmux_val |= (pupd_config_val >> 0x01);
}
}
}
}
u32 eod_config_val = (pinmux_config_val & 0x60);
/* Adjust EOd field */
if (pinmux_config_mask_val & 0x60) {
if (eod_config_val == 0x20) {
/* This pin supports Tristate change */
if (pinmux_mask_val & 0x10) {
/* Change Tristate */
if (!(pinmux_val & 0x10)) {
pinmux_val |= 0x10;
}
}
/* This pin supports EInput change */
if (pinmux_mask_val & 0x40) {
/* Change EInput */
if (!(pinmux_val & 0x40)) {
pinmux_val |= 0x40;
}
}
/* This pin supports EOd change */
if (pinmux_mask_val & 0x800) {
/* Change EOd */
if (pinmux_val & 0x800) {
pinmux_val &= 0xFFFFF7FF;
}
}
} else if (eod_config_val == 0x40) {
/* This pin supports Tristate change */
if (pinmux_mask_val & 0x10) {
/* Change Tristate */
if (pinmux_val & 0x10) {
pinmux_val &= 0xFFFFFFEF;
}
}
/* This pin supports EInput change */
if (pinmux_mask_val & 0x40) {
/* Change EInput */
if (!(pinmux_val & 0x40)) {
pinmux_val |= 0x40;
}
}
/* This pin supports EOd change */
if (pinmux_mask_val & 0x800) {
/* Change EOd */
if (pinmux_val & 0x800) {
pinmux_val &= 0xFFFFF7FF;
}
}
} else if (eod_config_val == 0x60) {
/* This pin supports Tristate change */
if (pinmux_mask_val & 0x10) {
/* Change Tristate */
if (pinmux_val & 0x10) {
pinmux_val &= 0xFFFFFFEF;
}
}
/* This pin supports EInput change */
if (pinmux_mask_val & 0x40) {
/* Change EInput */
if (!(pinmux_val & 0x40)) {
pinmux_val |= 0x40;
}
}
/* This pin supports EOd change */
if (pinmux_mask_val & 0x800) {
/* Change EOd */
if (!(pinmux_val & 0x800)) {
pinmux_val |= 0x800;
}
}
} else {
/* This pin supports Tristate change */
if (pinmux_mask_val & 0x10) {
/* Change Tristate */
if (pinmux_val & 0x10) {
pinmux_val &= 0xFFFFFFEF;
}
}
/* This pin supports EInput change */
if (pinmux_mask_val & 0x40) {
/* Change EInput */
if (pinmux_val & 0x40) {
pinmux_val &= 0xFFFFFFBF;
}
}
/* This pin supports EOd change */
if (pinmux_mask_val & 0x800) {
/* Change EOd */
if (pinmux_val & 0x800) {
pinmux_val &= 0xFFFFF7FF;
}
}
}
}
u32 lock_config_val = (pinmux_config_val & 0x80);
/* Adjust Lock */
if (pinmux_config_mask_val & 0x80) {
/* This pin supports Lock change */
if (pinmux_mask_val & 0x80) {
/* Change Lock */
if ((pinmux_val ^ pinmux_config_val) & 0x80) {
pinmux_val &= 0xFFFFFF7F;
pinmux_val |= lock_config_val;
}
}
}
u32 ioreset_config_val = (((pinmux_config_val >> 0x08) & 0x1) << 0x10);
/* Adjust IoReset */
if (pinmux_config_mask_val & 0x100) {
/* This pin supports IoReset change */
if (pinmux_mask_val & 0x10000) {
/* Change IoReset */
if (((pinmux_val >> 0x10) ^ (pinmux_config_val >> 0x08)) & 0x01) {
pinmux_val &= 0xFFFEFFFF;
pinmux_val |= ioreset_config_val;
}
}
}
u32 park_config_val = (((pinmux_config_val >> 0x0A) & 0x1) << 0x5);
/* Adjust Park */
if (pinmux_config_mask_val & 0x400) {
/* This pin supports Park change */
if (pinmux_mask_val & 0x20) {
/* Change Park */
if (((pinmux_val >> 0x05) ^ (pinmux_config_val >> 0x0A)) & 0x01) {
pinmux_val &= 0xFFFFFFDF;
pinmux_val |= park_config_val;
}
}
}
u32 elpdr_config_val = (((pinmux_config_val >> 0x0B) & 0x1) << 0x08);
/* Adjust ELpdr */
if (pinmux_config_mask_val & 0x800) {
/* This pin supports ELpdr change */
if (pinmux_mask_val & 0x100) {
/* Change ELpdr */
if (((pinmux_val >> 0x08) ^ (pinmux_config_val >> 0x0B)) & 0x01) {
pinmux_val &= 0xFFFFFEFF;
pinmux_val |= elpdr_config_val;
}
}
}
u32 ehsm_config_val = (((pinmux_config_val >> 0x0C) & 0x1) << 0x09);
/* Adjust EHsm */
if (pinmux_config_mask_val & 0x1000) {
/* This pin supports EHsm change */
if (pinmux_mask_val & 0x200) {
/* Change EHsm */
if (((pinmux_val >> 0x09) ^ (pinmux_config_val >> 0x0C)) & 0x01) {
pinmux_val &= 0xFFFFFDFF;
pinmux_val |= ehsm_config_val;
}
}
}
u32 eiohv_config_val = (((pinmux_config_val >> 0x09) & 0x1) << 0x0A);
/* Adjust EIoHv */
if (pinmux_config_mask_val & 0x200) {
/* This pin supports EIoHv change */
if (pinmux_mask_val & 0x400) {
/* Change EIoHv */
if (((pinmux_val >> 0x0A) ^ (pinmux_config_val >> 0x09)) & 0x01) {
pinmux_val &= 0xFFFFFBFF;
pinmux_val |= eiohv_config_val;
}
}
}
u32 eschmt_config_val = (((pinmux_config_val >> 0x0D) & 0x1) << 0x0C);
/* Adjust ESchmt */
if (pinmux_config_mask_val & 0x2000) {
/* This pin supports ESchmt change */
if (pinmux_mask_val & 0x1000) {
/* Change ESchmt */
if (((pinmux_val >> 0x0C) ^ (pinmux_config_val >> 0x0D)) & 0x01) {
pinmux_val &= 0xFFFFEFFF;
pinmux_val |= eschmt_config_val;
}
}
}
u32 preemp_config_val = (((pinmux_config_val >> 0x10) & 0x1) << 0xF);
/* Adjust Preemp */
if (pinmux_config_mask_val & 0x10000) {
/* This pin supports Preemp change */
if (pinmux_mask_val & 0x8000) {
/* Change Preemp */
if (((pinmux_val >> 0x0F) ^ (pinmux_config_val >> 0x10)) & 0x01) {
pinmux_val &= 0xFFFF7FFF;
pinmux_val |= preemp_config_val;
}
}
}
u32 drvtype_config_val = (((pinmux_config_val >> 0x0E) & 0x3) << 0xD);
/* Adjust DrvType */
if (pinmux_config_mask_val & 0xC000) {
/* This pin supports DrvType change */
if (pinmux_mask_val & 0x6000) {
/* Change DrvType */
if (((pinmux_val >> 0x0D) ^ (pinmux_config_val >> 0x0E)) & 0x03) {
pinmux_val &= 0xFFFF9FFF;
pinmux_val |= drvtype_config_val;
}
}
}
/* Write to the appropriate PINMUX register */
reg::Write(pinmux_reg, pinmux_val);
/* Do a dummy read from the PINMUX register */
pinmux_val = reg::Read(pinmux_reg);
return pinmux_val;
}
u32 UpdateDrivePad(u32 pinmux_drivepad_name, u32 pinmux_drivepad_config_val, u32 pinmux_drivepad_config_mask_val) {
const uintptr_t pinmux_base_vaddr = GetBaseAddress();
const DrivePadDefinition *pinmux_drivepad_def = GetDrivePadDefinition(pinmux_drivepad_name);
/* Fetch this PINMUX drive group's register offset */
u32 pinmux_drivepad_reg_offset = pinmux_drivepad_def->reg_offset;
/* Fetch this PINMUX drive group's mask value */
u32 pinmux_drivepad_mask_val = pinmux_drivepad_def->mask_val;
/* Get current register ptr. */
uintptr_t pinmux_drivepad_reg = pinmux_base_vaddr + pinmux_drivepad_reg_offset;
/* Read from the PINMUX drive group register */
u32 pinmux_drivepad_val = reg::Read(pinmux_drivepad_reg);
/* Adjust DriveDownStrength */
if (pinmux_drivepad_config_mask_val & 0x1F000) {
u32 mask_val = 0x7F000;
/* Adjust mask value */
if ((pinmux_drivepad_mask_val & 0x7F000) != 0x7F000)
mask_val = 0x1F000;
/* This drive group supports DriveDownStrength change */
if (pinmux_drivepad_mask_val & mask_val) {
/* Change DriveDownStrength */
if (((pinmux_drivepad_config_val & 0x7F000) & mask_val) != (pinmux_drivepad_val & mask_val)) {
pinmux_drivepad_val &= ~(mask_val);
pinmux_drivepad_val |= ((pinmux_drivepad_config_val & 0x7F000) & mask_val);
}
}
}
/* Adjust DriveUpStrength */
if (pinmux_drivepad_config_mask_val & 0x1F00000) {
u32 mask_val = 0x7F00000;
/* Adjust mask value */
if ((pinmux_drivepad_mask_val & 0x7F00000) != 0x7F00000)
mask_val = 0x1F00000;
/* This drive group supports DriveUpStrength change */
if (pinmux_drivepad_mask_val & mask_val) {
/* Change DriveUpStrength */
if (((pinmux_drivepad_config_val & 0x7F00000) & mask_val) != (pinmux_drivepad_val & mask_val)) {
pinmux_drivepad_val &= ~(mask_val);
pinmux_drivepad_val |= ((pinmux_drivepad_config_val & 0x7F00000) & mask_val);
}
}
}
/* Adjust DriveDownSlew */
if (pinmux_drivepad_config_mask_val & 0x30000000) {
/* This drive group supports DriveDownSlew change */
if (pinmux_drivepad_mask_val & 0x30000000) {
/* Change DriveDownSlew */
if ((pinmux_drivepad_val ^ pinmux_drivepad_config_val) & 0x30000000) {
pinmux_drivepad_val &= 0xCFFFFFFF;
pinmux_drivepad_val |= (pinmux_drivepad_config_val & 0x30000000);
}
}
}
/* Adjust DriveUpSlew */
if (pinmux_drivepad_config_mask_val & 0xC0000000) {
/* This drive group supports DriveUpSlew change */
if (pinmux_drivepad_mask_val & 0xC0000000) {
/* Change DriveUpSlew */
if ((pinmux_drivepad_val ^ pinmux_drivepad_config_val) & 0xC0000000) {
pinmux_drivepad_val &= 0x3FFFFFFF;
pinmux_drivepad_val |= (pinmux_drivepad_config_val & 0xC0000000);
}
}
}
/* Write to the appropriate PINMUX drive group register */
reg::Write(pinmux_drivepad_reg, pinmux_drivepad_val);
/* Do a dummy read from the PINMUX drive group register */
pinmux_drivepad_val = reg::Read(pinmux_drivepad_reg);
return pinmux_drivepad_val;
}
u32 DummyReadDrivePad(u32 pinmux_drivepad_name) {
const uintptr_t pinmux_base_vaddr = GetBaseAddress();
const DrivePadDefinition *pinmux_drivepad_def = GetDrivePadDefinition(pinmux_drivepad_name);
/* Fetch this PINMUX drive group's register offset */
u32 pinmux_drivepad_reg_offset = pinmux_drivepad_def->reg_offset;
/* Get current register ptr. */
uintptr_t pinmux_drivepad_reg = pinmux_base_vaddr + pinmux_drivepad_reg_offset;
return reg::Read(pinmux_drivepad_reg);
}
void UpdateAllParks() {
/* Update parks. */
for (size_t i = 0; i < PadNameMax; i++) {
UpdatePark(static_cast<u32>(i));
}
}
void DummyReadAllDrivePads() {
/* Dummy read all drive pads. */
for (size_t i = 0; i < DrivePadNameMax; i++) {
DummyReadDrivePad(static_cast<u32>(i));
}
}
}