Changes

Jump to navigation Jump to search
8,691 bytes added ,  18:13, 30 January 2021
better names
Line 6: Line 6:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || ShutdownSystem
+
| 0 || [[#ShutdownSystem]]
 
|-
 
|-
| 1 || RebootSystem
+
| 1 || [[#RebootSystem]]
 
|-
 
|-
| 2 || GetWakeupReason
+
| 2 || [[#GetWakeupReason]]
 
|-
 
|-
| 3 || GetShutdownReason
+
| 3 || [[#GetShutdownReason]]
 
|-
 
|-
| 4 || GetAcOk
+
| 4 || [[#GetAcOk]]
 
|-
 
|-
| 5 || GetBoardPowerControlEvent
+
| 5 || [[#GetBoardPowerControlEvent]]
 
|-
 
|-
| 6 || [2.0.0+] GetSleepButtonState
+
| 6 || [2.0.0+] [[#GetSleepButtonState]]
 
|-
 
|-
| 7 || [2.0.0+] GetPowerEvent
+
| 7 || [2.0.0+] [[#GetPowerEvent]]
 
|-
 
|-
| 8 || [2.0.0+] CreateWakeupTimer
+
| 8 || [2.0.0-9.2.0] [[#CreateWakeupTimer]]
 
|-
 
|-
| 9 || [2.0.0+] CancelWakeupTimer
+
| 9 || [2.0.0-9.2.0] [[#CancelWakeupTimer]]
 
|-
 
|-
| 10 || [2.0.0+] [[#EnableWakeupTimerOnDevice]]
+
| 10 || [2.0.0-9.2.0] [[#EnableWakeupTimerOnDevice]]
 
|-
 
|-
| 11 || [3.0.0+] CreateWakeupTimerEx
+
| 11 || [3.0.0-9.2.0] [[#CreateWakeupTimerEx]]
 
|-
 
|-
| 12 || [3.0.0+] GetLastEnabledWakeupTimerType
+
| 12 || [3.0.0-9.2.0] [[#GetLastEnabledWakeupTimerType]]
 
|-
 
|-
| 13 || [3.0.0+] CleanAllWakeupTimers
+
| 13 || [3.0.0-9.2.0] [[#CleanAllWakeupTimers]]
 
|-
 
|-
| 14 || [6.0.0+]
+
| 14 || [6.0.0+] [[#GetPowerButton]]
 +
|-
 +
| 15 || [10.0.0+] [[#SetEnableWakeupTimer]]
 
|}
 
|}
 +
 +
== ShutdownSystem ==
 +
No input/output.
 +
 +
== RebootSystem ==
 +
No input/output.
 +
 +
== GetWakeupReason ==
 +
No input. Returns an output u32.
 +
 +
== GetShutdownReason ==
 +
No input. Returns an output u32.
 +
 +
== GetAcOk ==
 +
No input. Returns an output bool.
 +
 +
== GetBoardPowerControlEvent ==
 +
Takes an input [[#BoardPowerControlEventTarget|BoardPowerControlEventTarget]]. Returns an output Event handle.
 +
 +
== GetSleepButtonState ==
 +
No input. Returns an output [[#SleepButtonState|SleepButtonState]].
 +
 +
== GetPowerEvent ==
 +
Takes an input [[#EventTarget|EventTarget]]. Returns an output Event handle.
 +
 +
== CreateWakeupTimer ==
 +
Takes an input u64. Returns an output u32.
 +
 +
== CancelWakeupTimer ==
 +
Takes an input u32. No output.
    
== EnableWakeupTimerOnDevice ==
 
== EnableWakeupTimerOnDevice ==
No input, returns a total of 0x10-bytes of output. [3.0.0+] Now returns a total of 0xC-bytes of output.
+
No input. Returns an output bool '''IsEnabled''' and an output u64 '''Interval'''.
 +
 
 +
[3.0.0+] Now returns an u32 and an u64.
 +
 
 +
== CreateWakeupTimerEx ==
 +
Takes two input u64s. Returns an output u32.
 +
 
 +
== GetLastEnabledWakeupTimerType ==
 +
No input. Returns an output u32.
 +
 
 +
== CleanAllWakeupTimers ==
 +
Takes an input u32. No output.
 +
 
 +
== GetPowerButton ==
 +
No input. Returns an output bool '''IsPushed'''.
 +
 
 +
== SetEnableWakeupTimer ==
 +
Unofficial name.
 +
 
 +
No input/output. Enables an internal wakeup timer when calling [[#ShutdownSystem|ShutdownSystem]] or [[#RebootSystem|RebootSystem]].
    
= bpc:r =
 
= bpc:r =
Line 47: Line 98:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || GetRtcTime
+
| 0 || [[#GetRtcTime]]
 
|-
 
|-
| 1 || SetRtcTime
+
| 1 || [[#SetRtcTime]]
 
|-
 
|-
| 2 || GetRtcResetDetected
+
| 2 || [[#GetRtcResetDetected]]
 
|-
 
|-
| 3 || [2.0.0+] ClearRtcResetDetected
+
| 3 || [2.0.0+] [[#ClearRtcResetDetected]]
 
|-
 
|-
| 4 || [3.0.0+] SetUpRtcResetOnShutdown
+
| 4 || [3.0.0+] [[#SetUpRtcResetOnShutdown]]
 
|}
 
|}
   −
GetRtcTime / SetRtcTime directly accesses the max77620_rtc0 device.
+
== GetRtcTime ==
 +
No input. Returns an output u64.
   −
= pcv =
+
== SetRtcTime ==
This is "nn::pcv::detail::IPcvService".
+
Takes an input u64. No output.
 +
 
 +
== GetRtcResetDetected ==
 +
No input. Returns an output bool.
 +
 
 +
== ClearRtcResetDetected ==
 +
No input/output.
 +
 
 +
== SetUpRtcResetOnShutdown ==
 +
No input/output.
 +
 
 +
= bpc:c =
 +
This is "nn::bpc::IBoardPowerControlManager".
 +
 
 +
[2.0.0+] This service was replaced by [[#bpc|bpc]].
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 67: Line 133:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| [1.0.0-7.0.1] 0 || SetPowerEnabled
+
| 0 || [[#ShutdownSystem]]
 
|-
 
|-
| [1.0.0-7.0.1] 1 || SetClockEnabled
+
| 1 || [[#RebootSystem]]
 
|-
 
|-
| [1.0.0-7.0.1] 2 || SetClockRate
+
| 2 || [[#GetWakeupReason]]
 
|-
 
|-
| [1.0.0-7.0.1] 3 || GetClockRate
+
| 3 || [[#GetShutdownReason]]
 
|-
 
|-
| [1.0.0-7.0.1] 4 || GetState
+
| 4 || [[#GetAcOk]]
 
|-
 
|-
| [1.0.0-7.0.1] 5 || GetPossibleClockRates
+
| 5 || [[#GetBoardPowerControlEvent]]
 +
|}
 +
 
 +
= bpc:b =
 +
This is "nn::bpc::IPowerButtonManager".
 +
 
 +
[2.0.0+] This service was merged into [[#bpc|bpc]].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| [1.0.0-7.0.1] 6 || SetMinVClockRate
+
! Cmd || Name
|-
  −
| [1.0.0-7.0.1] 7 || SetReset
  −
|-
  −
| [1.0.0-7.0.1] 8 || SetVoltageEnabled
  −
|-
  −
| [1.0.0-7.0.1] 9 || GetVoltageEnabled
  −
|-
  −
| [1.0.0-7.0.1] 10 || GetVoltageRange
  −
|-
  −
| [1.0.0-7.0.1] 11 || SetVoltageValue
  −
|-
  −
| [1.0.0-7.0.1] 12 || GetVoltageValue
  −
|-
  −
| [1.0.0-7.0.1] 13 || GetTemperatureThresholds
  −
|-
  −
| [1.0.0-7.0.1] 14 || SetTemperature
  −
|-
  −
| [1.0.0-5.1.0] 15 || Initialize
  −
|-
  −
| [1.0.0-5.1.0] 16 || IsInitialized
  −
|-
  −
| [1.0.0-5.1.0] 17 || Finalize
  −
|-
  −
| [3.0.0-7.0.1] 18 || PowerOn
   
|-
 
|-
| [3.0.0-7.0.1] 19 || PowerOff
+
| 0 || [[#GetSleepButtonState]]
|-
  −
| [3.0.0-7.0.1] 20 || ChangeVoltage
  −
|-
  −
| [3.0.0-7.0.1] 21 || GetPowerClockInfoEvent
  −
|-
  −
| [3.0.0-7.0.1] 22 || GetOscillatorClock
  −
|-
  −
| [3.0.0-7.0.1] 23 || GetDvfsTable
  −
|-
  −
| [3.0.0-7.0.1] 24 || GetModuleStateTable
  −
|-
  −
| [3.0.0-7.0.1] 25 || GetPowerDomainStateTable
  −
|-
  −
| 26 || [3.0.0+] GetFuseInfo
  −
|-
  −
| 27 || [5.0.0+] GetDramId
  −
|-
  −
| [6.0.0-7.0.1] 28 || [[#IsPoweredOn]]
   
|-
 
|-
| [6.0.0-7.0.1] 29 || [[#GetVoltage]]
+
| 1 || [[#GetPowerEvent]]
 
|}
 
|}
   −
[7.0.0+] The type-0xA output buffers were replaced with type-0x22 output buffers, for the following: GetDvfsTable, GetModuleStateTable, and GetPowerDomainStateTable.
+
= bpc:w =
 
+
This is "nn::bpc::IWakeupConfigManager".
== IsPoweredOn ==
  −
Takes an u32 '''PowerControlTarget''' and returns a bool indicating the status of the requested [[#Voltage|voltage block]].
     −
== GetVoltage ==
+
[2.0.0+] This service was merged into [[#bpc|bpc]].
Takes an u32 '''PowerControlTarget''' and returns an u32 voltage value for the requested [[#Voltage|voltage block]].
     −
== Modules ==
  −
These are "nn::pcv::Module_X" where X is the power, clock and reset block name.
  −
  −
[8.0.0+] Every module name is now mapped to an ID.
  −
  −
=== Power Switch / Clocking / Reset ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Name || ID || Block || Rail || Notes
+
! Cmd || Name
 
|-
 
|-
| 0 || 0x40000001 || CpuBus || vdd_cpu ||
+
| 0 || [[#CreateWakeupTimer]]
 
|-
 
|-
| 1 || 0x40000002 || GPU || vdd_gpu ||
+
| 1 || [[#CancelWakeupTimer]]
 
|-
 
|-
| 2 || 0x40000003 || I2S1 || vdd_soc ||
+
| 2 || [[#EnableWakeupTimerOnDevice]]
 +
|}
 +
 
 +
= pcv =
 +
This is "nn::pcv::detail::IPcvService".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
|  3 || 0x40000004 || I2S2 || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 4 || 0x40000005 || I2S3 || vdd_soc ||
+
| [1.0.0-7.0.1] 0 || [[#SetPowerEnabled]]
 
|-
 
|-
| 5 || 0x40000006 || PWM || vdd_soc ||
+
| [1.0.0-7.0.1] 1 || [[#SetClockEnabled]]
 
|-
 
|-
| 6 || 0x02000001 || I2C1 || vdd_soc ||
+
| [1.0.0-7.0.1] 2 || [[#SetClockRate]]
 
|-
 
|-
| 7 || 0x02000002 || I2C2 || vdd_soc ||
+
| [1.0.0-7.0.1] 3 || [[#GetClockRate]]
 
|-
 
|-
| 8 || 0x02000003 || I2C3 || vdd_soc ||
+
| [1.0.0-7.0.1] 4 || [[#GetState]]
 
|-
 
|-
| 9 || 0x02000004 || I2C4 || vdd_soc ||
+
| [1.0.0-7.0.1] 5 || [[#GetPossibleClockRates]]
 
|-
 
|-
| 10 || 0x02000005 || I2C5 || vdd_soc ||
+
| [1.0.0-7.0.1] 6 || [[#SetMinVClockRate]]
 
|-
 
|-
| 11 || 0x02000006 || I2C6 || vdd_soc ||
+
| [1.0.0-7.0.1] 7 || [[#SetReset]]
 
|-
 
|-
| 12 || 0x07000000 || SPI1 || vdd_soc ||
+
| [1.0.0-7.0.1] 8 || [[#SetVoltageEnabled]]
 
|-
 
|-
| 13 || 0x07000001 || SPI2 || vdd_soc ||
+
| [1.0.0-7.0.1] 9 || [[#GetVoltageEnabled]]
 
|-
 
|-
| 14 || 0x07000002 || SPI3 || vdd_soc ||
+
| [1.0.0-7.0.1] 10 || [[#GetVoltageRange]]
 
|-
 
|-
| 15 || 0x07000003 || SPI4 || vdd_soc ||
+
| [1.0.0-7.0.1] 11 || [[#SetVoltageValue]]
 
|-
 
|-
| 16 || 0x40000011 || DISP1 || vdd_soc ||
+
| [1.0.0-7.0.1] 12 || [[#GetVoltageValue]]
 
|-
 
|-
| 17 || 0x40000012 || DISP2 || vdd_soc ||
+
| [1.0.0-7.0.1] 13 || [[#GetTemperatureThresholds]]
 
|-
 
|-
| 18 || 0x40000013 || ISP || - || Not an actual block. Used for debug.
+
| [1.0.0-7.0.1] 14 || [[#SetTemperature]]
 
|-
 
|-
| 19 || 0x40000014 || VI || - || Not an actual block. Used for debug.
+
| [1.0.0-5.1.0] 15 || [[#Initialize]]
 
|-
 
|-
| 20 || 0x40000015 || SDMMC1 || vdd_soc ||
+
| [1.0.0-5.1.0] 16 || [[#IsInitialized]]
 
|-
 
|-
| 21 || 0x40000016 || SDMMC2 || vdd_soc ||
+
| [1.0.0-5.1.0] 17 || [[#Finalize]]
 
|-
 
|-
| 22 || 0x40000017 || SDMMC3 || vdd_soc ||
+
| [3.0.0-7.0.1] 18 || [[#PowerOn]]
 
|-
 
|-
| 23 || 0x40000018 || SDMMC4 || vdd_soc ||
+
| [3.0.0-7.0.1] 19 || [[#PowerOff]]
 
|-
 
|-
| 24 || 0x40000019 || OWR || - || Not an actual block. Used for debug.
+
| [3.0.0-7.0.1] 20 || [[#ChangeVoltage]]
 
|-
 
|-
| 25 || 0x4000001A || CSITE || vdd_soc ||
+
| [3.0.0-7.0.1] 21 || [[#GetPowerClockInfoEvent]]
 
|-
 
|-
| 26 || 0x4000001B || TSEC || vdd_soc ||
+
| [3.0.0-7.0.1] 22 || [[#GetOscillatorClock]]
 
|-
 
|-
| 27 || 0x4000001C || MSELECT || vdd_soc ||
+
| [3.0.0-7.0.1] 23 || [[#GetDvfsTable]]
 
|-
 
|-
| 28 || 0x4000001D || HDA2CODEC_2X || vdd_soc ||
+
| [3.0.0-7.0.1] 24 || [[#GetModuleStateTable]]
 
|-
 
|-
| 29 || 0x4000001E || ACTMON || vdd_soc ||
+
| [3.0.0-7.0.1] 25 || [[#GetPowerDomainStateTable]]
 
|-
 
|-
| 30 || 0x4000001F || I2C_SLOW || vdd_soc ||
+
| 26 || [3.0.0+] [[#GetFuseInfo]]
 
|-
 
|-
| 31 || 0x40000020 || SOR1 || vdd_soc ||
+
| 27 || [5.0.0+] [[#GetDramId]]
 
|-
 
|-
| 32 || 0x40000021 || SATA || - || Not an actual block. Used for debug.
+
| [6.0.0-7.0.1] 28 || [[#IsPoweredOn]]
 
|-
 
|-
| 33 || 0x40000022 || HDA || vdd_soc ||
+
| [6.0.0-7.0.1] 29 || [[#GetVoltage]]
|-
  −
| 34 || 0x40000023 || XUSB_CORE_HOST || vdd_soc ||
  −
|-
  −
| 35 || 0x40000024 || XUSB_FALCON || vdd_soc ||
  −
|-
  −
| 36 || 0x40000025 || XUSB_FS || vdd_soc ||
  −
|-
  −
| 37 || 0x40000026 || XUSB_CORE_DEV || vdd_soc ||
  −
|-
  −
| 38 || 0x40000027 || XUSB_SS_HOSTDEV || vdd_soc ||
  −
|-
  −
| 39 || 0x03000001 || UARTA || vdd_soc ||
  −
|-
  −
| 40 || 0x35000405 || UARTB || vdd_soc ||
  −
|-
  −
| 41 || 0x3500040F || UARTC || vdd_soc ||
  −
|-
  −
| 42 || 0x37000001 || UARTD || vdd_soc ||
  −
|-
  −
| 43 || 0x4000002C || HOST1X || vdd_soc ||
  −
|-
  −
| 44 || 0x4000002D || ENTROPY || vdd_soc ||
  −
|-
  −
| 45 || 0x4000002E || SOC_THERM || vdd_soc ||
  −
|-
  −
| 46 || 0x4000002F || VIC || vdd_soc ||
  −
|-
  −
| 47 || 0x40000030 || NVENC || vdd_soc ||
  −
|-
  −
| 48 || 0x40000031 || NVJPG || vdd_soc ||
  −
|-
  −
| 49 || 0x40000032 || NVDEC || vdd_soc ||
  −
|-
  −
| 50 || 0x40000033 || QSPI || vdd_soc ||
  −
|-
  −
| 51 || 0x40000034 || VI_I2C || - || Not an actual block. Used for debug.
  −
|-
  −
| 52 || 0x40000035 || TSECB || vdd_soc ||
  −
|-
  −
| 53 || 0x40000036 || APE || vdd_soc ||
  −
|-
  −
| 54 || 0x40000037 || ACLK || vdd_soc ||
  −
|-
  −
| 55 || 0x40000038 || UARTAPE || vdd_soc ||
  −
|-
  −
| 56 || 0x40000039 || EMC || vdd_soc ||
  −
|-
  −
| 57 || 0x4000003A || PLLE0 || vdd_soc ||
  −
|-
  −
| 58 || 0x4000003B || PLLE0 || vdd_soc ||
  −
|-
  −
| 59 || 0x4000003C || DSI || vdd_soc ||
  −
|-
  −
| 60 || 0x4000003D || MAUD || vdd_soc ||
  −
|-
  −
| 61 || 0x4000003E || DPAUX1 || vdd_soc ||
  −
|-
  −
| 62 || 0x4000003F || MIPI_CAL || vdd_soc ||
  −
|-
  −
| 63 || 0x40000040 || UART_FST_MIPI_CAL || vdd_soc ||
  −
|-
  −
| 64 || 0x40000041 || OSC || vdd_soc ||
  −
|-
  −
| 65 || 0x40000042 || SCLK || vdd_soc ||
  −
|-
  −
| 66 || 0x40000043 || SOR_SAFE || vdd_soc ||
  −
|-
  −
| 67 || 0x40000044 || XUSB_SS || vdd_soc ||
  −
|-
  −
| 68 || 0x40000045 || XUSB_HOST || vdd_soc ||
  −
|-
  −
| 69 || 0x40000046 || XUSB_DEV || vdd_soc ||
  −
|-
  −
| 70 || 0x40000047 || EXTPERIPH1 || vdd_soc ||
  −
|-
  −
| 71 || 0x40000048 || AHUB || vdd_soc ||
  −
|-
  −
| 72 || 0x40000049 || HDA2HDMICODEC || vdd_soc ||
  −
|-
  −
| 73 || 0x4000004A || PLLP5 || vdd_soc ||
  −
|-
  −
| 74 || 0x4000004B || USBD || vdd_soc ||
  −
|-
  −
| 75 || 0x4000004C || USB2 || vdd_soc ||
  −
|-
  −
| 76 || 0x4000004D || PCIE || vdd_soc ||
  −
|-
  −
| 77 || 0x4000004E || AFI || vdd_soc ||
  −
|-
  −
| 78 || 0x4000004F || PCIEXCLK || vdd_soc ||
  −
|-
  −
| 79 || 0x40000050 || PEX_USB_UPHY || vdd_soc ||
  −
|-
  −
| 80 || 0x40000051 || XUSB_PADCTL || vdd_soc ||
  −
|-
  −
| 81 || 0x40000052 || APBDMA || vdd_soc ||
  −
|-
  −
| 82 || 0x40000053 || USB2_TRK || vdd_soc ||
  −
|-
  −
| 83 || 0x40000054 || PLLE0 || vdd_soc ||
  −
|-
  −
| 84 || 0x40000055 || PLLE0 || vdd_soc ||
  −
|-
  −
| 85 || 0x40000056 || CEC || vdd_soc ||
  −
|-
  −
| [6.0.0+] 86 || 0x40000057 || EXTPERIPH2 || vdd_soc ||
   
|}
 
|}
   −
=== Voltage ===
+
== SetPowerEnabled ==
{| class="wikitable" border="1"
+
Takes an input [[#Module|ModuleId]] and an input bool '''Enabled'''. No output.
|-
+
 
! Name || Block || Notes
+
== SetClockEnabled ==
|-
+
Takes an input [[#Module|ModuleId]] and an input bool '''Enabled'''. No output.
|  0 || max77620_sd0 ||
+
 
|-
+
== SetClockRate ==
| 1 || max77620_sd1 ||  
+
Takes an input [[#Module|ModuleId]] and an input u32 '''ClockRateHz'''. No output.
|-
+
 
|  2 || max77620_sd2 ||
+
== GetClockRate ==
|-
+
Takes an input [[#Module|ModuleId]]. Returns an output u32 '''ClockRateHz'''.
|  3 || max77620_sd3 ||  
+
 
|-
+
== GetState ==
| 4 || max77620_ldo0 || 1.2v
+
Takes an input [[#Module|ModuleId]]. Returns an output [[#ModuleState|ModuleState]].
|-
+
 
|  5 || max77620_ldo1 ||
+
== GetPossibleClockRates ==
|-
+
Takes a type-0xA output buffer of [[#ClockRatesListType|ClockRatesListType]], an input [[#Module|ModuleId]] and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount''' and an output u32 '''OutRates'''.
| 6 || max77620_ldo2 || SDcard power, 1.8v - 3.3v
+
 
|-
+
== SetMinVClockRate ==
| 7 || max77620_ldo3 || GC ASIC 3.1v
+
Takes an input [[#Module|ModuleId]] and an input u32 '''ClockRateHz'''. No output.
|-
+
 
| 8 || max77620_ldo4 || RTC power, 0.85v
+
== SetReset ==
|-
+
Takes an input [[#Module|ModuleId]] and an input bool '''Asserted'''. No output.
| 9 || max77620_ldo5 || GC ASIC 1.8v
+
 
|-
+
== SetVoltageEnabled ==
| 10 || max77620_ldo6 || AVDD touchscreen, 2.9v
+
Takes an input [[#PowerDomain|PowerDomain]] and an input bool '''Enabled'''. No output.
|-
+
 
| 11 || max77620_ldo7 ||
+
== GetVoltageEnabled ==
|-
+
Takes an input [[#PowerDomain|PowerDomain]]. Returns an output bool '''Enabled'''.
| 12 || max77620_ldo8 || DisplayPort, 1.05v
+
 
|-
+
== GetVoltageRange ==
| 13 || max77621_cpu ||
+
Takes an input [[#PowerDomain|PowerDomain]]. Returns three output s32s '''MinVolt''', '''MaxVolt''' and '''StepVolt'''.
|-
+
 
| 14 || max77621_gpu ||
+
== SetVoltageValue ==
|-
+
Takes an input [[#PowerDomain|PowerDomain]] and an input s32 '''MicroVolt'''. No output.
| [6.0.0+] 15 || max77812_cpu ||  
+
 
|-
+
== GetVoltageValue ==
| [6.0.0+] 16 || max77812_gpu ||  
+
Takes an input [[#PowerDomain|PowerDomain]]. Returns an output s32 '''MicroVolt'''.
|-
+
 
| [6.0.0+] 17 || max77812_dram ||
+
== GetTemperatureThresholds ==
|}
+
Takes a type-0xA output buffer of [[#TemperatureThreshold|TemperatureThreshold]] and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount'''.
 +
 
 +
== SetTemperature ==
 +
Takes an input s32 '''TemperatureMilliC'''. No output.
 +
 
 +
== Initialize ==
 +
No input/output.
 +
 
 +
== IsInitialized ==
 +
No input. Returns an output bool.
 +
 
 +
== Finalize ==
 +
No input/output.
 +
 
 +
== PowerOn ==
 +
Takes an input [[#PowerControlTarget|PowerControlTarget]] and an input s32 '''MicroVolt'''. No output.
 +
 
 +
== PowerOff ==
 +
Takes an input [[#PowerControlTarget|PowerControlTarget]]. No output.
 +
 
 +
== ChangeVoltage ==
 +
Takes an input [[#PowerControlTarget|PowerControlTarget]] and an input s32 '''MicroVolt'''. No output.
 +
 
 +
== GetPowerClockInfoEvent ==
 +
No input. Returns an output Event handle.
 +
 
 +
== GetOscillatorClock ==
 +
No input. Returns an output u32.
 +
 
 +
== GetDvfsTable ==
 +
Takes two type-0xA output buffers and two input s32s. Returns an output s32 '''OutCount'''.
 +
 
 +
[7.0.0+] The type-0xA output buffers were replaced with type-0x22 output buffers.
 +
 
 +
== GetModuleStateTable ==
 +
Takes a type-0xA output buffer of [[#ModuleState|ModuleState]] and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount'''.
 +
 
 +
[7.0.0+] The type-0xA output buffer was replaced with a type-0x22 output buffer.
 +
 
 +
== GetPowerDomainStateTable ==
 +
Takes a type-0xA output buffer of [[#PowerDomainState|PowerDomainState]] and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount'''.
 +
 
 +
[7.0.0+] The type-0xA output buffer was replaced with a type-0x22 output buffer.
 +
 
 +
== GetFuseInfo ==
 +
Takes a type-0xA output buffer and an input s32 '''MaxCount'''. Returns an output s32 '''OutCount'''.
 +
 
 +
== GetDramId ==
 +
No input. Returns an u32.
 +
 
 +
== IsPoweredOn ==
 +
Takes an input [[#PowerControlTarget|PowerControlTarget]]. Returns an output bool.
   −
Note: max77620 GPIOs are only used internally by the driver during init, and not exposed via an API.
+
== GetVoltage ==
 +
Takes an input [[#PowerControlTarget|PowerControlTarget]]. Returns an output s32.
    
= pcv:arb =
 
= pcv:arb =
Line 374: Line 349:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || ReleaseControl
+
| 0 || [[#ReleaseControl]]
 
|}
 
|}
 +
 +
== ReleaseControl ==
 +
Takes an input [[#Module|ModuleId]]. No output.
    
= pcv:imm =
 
= pcv:imm =
Line 386: Line 364:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || SetClockRate
+
| 0 || [[#SetClockRate]]
 
|}
 
|}
   Line 400: Line 378:  
| 0 || [[#OpenSession]]
 
| 0 || [[#OpenSession]]
 
|-
 
|-
| 1 || GetTemperatureThresholds
+
| 1 || [[#GetTemperatureThresholds]]
 
|-
 
|-
| 2 || SetTemperature
+
| 2 || [[#SetTemperature]]
 
|-
 
|-
| 3 || GetPossibleClockRates
+
| 3 || [[#GetModuleStateTable]]
 
|-
 
|-
| 4 || GetClockInfoEvent
+
| 4 || GetModuleStateTableEvent
 
|-
 
|-
| 5 || GetClockModuleNumLimit
+
| 5 || [[#GetModuleStateTableMaxCount]]
 
|}
 
|}
    
== OpenSession ==
 
== OpenSession ==
Takes an u32 '''ModuleID''', an u32 '''ModuleUnk''' and returns an [[#IClkrstSession]].
+
Takes an input [[#Module|DeviceCode]] and an input u32. Returns an [[#IClkrstSession]].
 +
 
 +
== GetModuleStateTableMaxCount ==
 +
Unofficial name.
   −
== GetClockModuleNumLimit ==
   
Returns 0x1A.
 
Returns 0x1A.
   Line 458: Line 438:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || [[#ReleaseControl]]
+
| 0 || [[#ReleaseControl_2|ReleaseControl]]
 
|}
 
|}
    
== ReleaseControl ==
 
== ReleaseControl ==
Takes an u32 '''ModuleID'''. No output.
+
Takes an input [[#Module|DeviceCode]]. No output.
    
= rgltr =
 
= rgltr =
Line 475: Line 455:  
| 0 || [[#OpenSession]]
 
| 0 || [[#OpenSession]]
 
|-
 
|-
| 1 || GetPowerDomainStateTable
+
| 1 || [[#GetPowerDomainStateTable]]
 
|-
 
|-
| 2 || GetPowerInfoEvent
+
| 2 || GetPowerDomainStateTableEvent
 
|-
 
|-
| 3 || GetPowerModuleNumLimit
+
| 3 || [[#GetPowerDomainStateTableMaxCount]]
 
|}
 
|}
    
== OpenSession ==
 
== OpenSession ==
Takes an u32 '''ModuleID''' and returns an [[#IRegulatorSession]].
+
Takes an input [[#PowerDomain|DeviceCode]] and returns an [[#IRegulatorSession]].
 +
 
 +
== GetPowerDomainStateTableMaxCount ==
 +
Unofficial name.
   −
== GetPowerModuleNumLimit ==
   
Returns 0x3.
 
Returns 0x3.
   Line 495: Line 477:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || [[#SetVoltageEnabled]]
+
| 0 || SetVoltageEnabled
 
|-
 
|-
| 1 ||
+
| 1 || PowerOn
 
|-
 
|-
| 2 || [[#GetVoltageEnabled]]
+
| 2 || GetVoltageEnabled
 
|-
 
|-
 
| 3 || GetVoltageRange
 
| 3 || GetVoltageRange
 
|-
 
|-
| 4 || GetVoltageValue
+
| 4 || GetVoltage
 
|-
 
|-
| 5 || [[#SetVoltageValue]]
+
| 5 || SetVoltageValue
 
|-
 
|-
| 6 || ChangeVoltage
+
| 6 || PowerOff
 
|}
 
|}
  −
=== SetVoltageEnabled ===
  −
Takes a bool. Enables/disables the LDO this session was opened for.
  −
  −
=== GetVoltageEnabled ===
  −
Returns a bool. True if voltage is enabled, false if not.
  −
  −
=== SetVoltageValue ===
  −
Takes in a voltage in microvolts and sets the LDO to this voltage.
      
= rtc =
 
= rtc =
Line 526: Line 499:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || GetRtcTime
+
| 0 || [[#GetRtcTime_2|GetRtcTime]]
 +
|-
 +
| 1 || [[#SetRtcTime_2|SetRtcTime]]
 +
|-
 +
| 2 || [[#SetUpRtcResetOnShutdown_2|SetUpRtcResetOnShutdown]]
 
|-
 
|-
| 1 || SetRtcTime
+
| 3 || [[#GetRtcResetDetected_2|GetRtcResetDetected]]
 
|-
 
|-
| 2 || SetRtcClientUnknownBool
+
| 4 || [[#ClearRtcResetDetected_2|ClearRtcResetDetected]]
 
|-
 
|-
| 3 || GetRtcResetDetected
+
| 10 || [10.0.0+] [[#EnableRtcAlarm|EnableRtcAlarm]]
 
|-
 
|-
| 4 || ClearRtcResetDetected
+
| 11 || [10.0.0+] [[#DisableRtcAlarm|DisableRtcAlarm]]
 
|}
 
|}
   −
Commands 0, 1, 3, 4 call the same internal functions as bpc:r, except they take an extra u32 [[Bus_services#Known_Devices_2|device code]], where bpc:r hardcodes 0x3B000001 (max77620_rtc0).
+
== GetRtcTime ==
 +
Same as [[#GetRtcTime|GetRtcTime]], but takes an input [[Bus_services#I2cDevice|DeviceCode]] ([[#bpc:r|bpc:r]] uses hardcoded value 0x3B000001).
 +
 
 +
== SetRtcTime ==
 +
Same as [[#SetRtcTime|SetRtcTime]], but takes an input [[Bus_services#I2cDevice|DeviceCode]] ([[#bpc:r|bpc:r]] uses hardcoded value 0x3B000001).
   −
Command 2 takes a u8 bool and a u32 device code; it opens an i2c session to the device code, and sets *(i2c_session_client_object + 0x38) = bool.
+
== SetUpRtcResetOnShutdown ==
 +
Takes an input bool '''DoReset''' and an input [[Bus_services#I2cDevice|DeviceCode]]. Similar to [[#SetUpRtcResetOnShutdown|SetUpRtcResetOnShutdown]], but this version assigns the provided boolean value on a per-client basis (instead of a global variable) and checks it when the current [[PSC_services#Power_Management_States|power state]] is '''ReadyShutdown'''.
 +
 
 +
== GetRtcResetDetected ==
 +
Same as [[#GetRtcResetDetected|GetRtcResetDetected]], but takes an input [[Bus_services#I2cDevice|DeviceCode]] ([[#bpc:r|bpc:r]] uses hardcoded value 0x3B000001).
 +
 
 +
== ClearRtcResetDetected ==
 +
Same as [[#ClearRtcResetDetected|ClearRtcResetDetected]], but takes an input [[Bus_services#I2cDevice|DeviceCode]] ([[#bpc:r|bpc:r]] uses hardcoded value 0x3B000001).
 +
 
 +
== EnableRtcAlarm ==
 +
Unofficial name.
 +
 
 +
Takes an input [[#Module|DeviceCode]], an input u32 '''RtcAlarmId''' (0 = RtcAlarm1, 1 = RtcAlarm2) and an u64 '''RtcAlarmTime'''. No output.
 +
 
 +
== DisableRtcAlarm ==
 +
Unofficial name.
 +
 
 +
Takes an input [[#Module|DeviceCode]] and an input u32 '''RtcAlarmId''' (0 = RtcAlarm1, 1 = RtcAlarm2). No output.
    
= time:u, time:a, time:s =
 
= time:u, time:a, time:s =
Line 548: Line 546:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 
|-
 
|-
| 0 || GetStandardUserSystemClock || Returns an [[#ISystemClock]].
+
| 0 || [[#GetStandardUserSystemClock]]
 
|-
 
|-
| 1 || GetStandardNetworkSystemClock || Returns an [[#ISystemClock]].
+
| 1 || [[#GetStandardNetworkSystemClock]]
 
|-
 
|-
| 2 || GetStandardSteadyClock || Returns an [[#ISteadyClock]].
+
| 2 || [[#GetStandardSteadyClock]]
 
|-
 
|-
| 3 || GetTimeZoneService || Returns an [[#ITimeZoneService]].
+
| 3 || [[#GetTimeZoneService]]
 
|-
 
|-
| 4 || GetStandardLocalSystemClock || Returns an [[#ISystemClock]].
+
| 4 || [[#GetStandardLocalSystemClock]]
 
|-
 
|-
| 5 || [4.0.0+] GetEphemeralNetworkSystemClock || Returns an [[#ISystemClock]].
+
| 5 || [4.0.0+] [[#GetEphemeralNetworkSystemClock]]
 
|-
 
|-
| 20 || [6.0.0+] GetSharedMemoryNativeHandle ||
+
| 20 || [6.0.0+] GetSharedMemoryNativeHandle
 
|-
 
|-
| 30 || [6.0.0+] GetStandardNetworkClockOperationEventReadableHandle ||
+
| 30 || [6.0.0+] GetStandardNetworkClockOperationEventReadableHandle
 
|-
 
|-
| 31 || [6.0.0+] GetEphemeralNetworkClockOperationEventReadableHandle ||
+
| 31 || [6.0.0+] GetEphemeralNetworkClockOperationEventReadableHandle
 
|-
 
|-
| 50 || [4.0.0+] SetStandardSteadyClockInternalOffset ||
+
| 50 || [4.0.0+] SetStandardSteadyClockInternalOffset
 
|-
 
|-
| 100 || IsStandardUserSystemClockAutomaticCorrectionEnabled ||
+
| 100 || IsStandardUserSystemClockAutomaticCorrectionEnabled
 
|-
 
|-
| 101 || SetStandardUserSystemClockAutomaticCorrectionEnabled ||
+
| 101 || SetStandardUserSystemClockAutomaticCorrectionEnabled
 
|-
 
|-
| 102 || [5.0.0+] GetStandardUserSystemClockInitialYear ||
+
| 102 || [5.0.0+] GetStandardUserSystemClockInitialYear
 
|-
 
|-
| 200 || [3.0.0+] IsStandardNetworkSystemClockAccuracySufficient ||
+
| 200 || [3.0.0+] IsStandardNetworkSystemClockAccuracySufficient
 
|-
 
|-
| 201 || [6.0.0+] GetStandardUserSystemClockAutomaticCorrectionUpdatedTime ||
+
| 201 || [6.0.0+] GetStandardUserSystemClockAutomaticCorrectionUpdatedTime
 
|-
 
|-
| 300 || [4.0.0+] CalculateMonotonicSystemClockBaseTimePoint ||
+
| 300 || [4.0.0+] CalculateMonotonicSystemClockBaseTimePoint
 
|-
 
|-
| 400 || [4.0.0+] GetClockSnapshot ||
+
| 400 || [4.0.0+] GetClockSnapshot
 
|-
 
|-
| 401 || [4.0.0+] GetClockSnapshotFromSystemClockContext ||
+
| 401 || [4.0.0+] GetClockSnapshotFromSystemClockContext
 
|-
 
|-
| 500 || [4.0.0+] CalculateStandardUserSystemClockDifferenceByUser ||
+
| 500 || [4.0.0+] CalculateStandardUserSystemClockDifferenceByUser
 
|-
 
|-
| 501 || [4.0.0+] CalculateSpanBetween ||
+
| 501 || [4.0.0+] CalculateSpanBetween
 
|}
 
|}
 +
 +
== GetStandardUserSystemClock ==
 +
No input. Returns an [[#ISystemClock]].
 +
 +
== GetStandardNetworkSystemClock ==
 +
No input. Returns an [[#ISystemClock]].
 +
 +
== GetStandardSteadyClock ==
 +
No input. Returns an [[#ISteadyClock]].
 +
 +
== GetTimeZoneService ==
 +
No input. Returns an [[#ITimeZoneService]].
 +
 +
== GetStandardLocalSystemClock  ==
 +
No input. Returns an [[#ISystemClock]].
 +
 +
== GetEphemeralNetworkSystemClock ==
 +
No input. Returns an [[#ISystemClock]].
    
== ISteadyClock ==
 
== ISteadyClock ==
Line 596: Line 612:  
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Cmd || Name
 
|-
 
|-
| 0 || GetCurrentTimePoint || No input, returns an output [[#SteadyClockTimePoint]].
+
| 0 || [[#GetCurrentTimePoint]]
 
|-
 
|-
| 2 || GetTestOffset || No input, returns an output [[#TimeSpanType]].
+
| 2 || [[#GetTestOffset]]
 +
|-
 +
| 3 || [[#SetTestOffset]]
 +
|-
 +
| 100 || [2.0.0+] [[#GetRtcValue]]
 +
|-
 +
| 101 || [2.0.0+] [[#IsRtcResetDetected]]
 +
|-
 +
| 102 || [2.0.0+] [[#GetSetupResultValue]]
 +
|-
 +
| 200 || [3.0.0+] [[#GetInternalOffset]]
 +
|-
 +
| 201 || [3.0.0-3.0.2] [[#SetInternalOffset]]
 +
|}
 +
 
 +
=== GetCurrentTimePoint ===
 +
No input. Returns an output [[#SteadyClockTimePoint]].
 +
 
 +
=== GetTestOffset ===
 +
No input. Returns an output [[#TimeSpanType]].
 +
 
 +
=== SetTestOffset ===
 +
Takes an input [[#TimeSpanType]]. No output.
 +
 
 +
=== GetRtcValue ===
 +
No input. Returns an output s64.
 +
 
 +
=== IsRtcResetDetected ===
 +
No input. Returns an output u8 bool.
 +
 
 +
=== GetSetupResultValue ===
 +
No input. Returns an output u32.
 +
 
 +
=== GetInternalOffset ===
 +
No input. Returns an output [[#TimeSpanType]].
 +
 
 +
=== SetInternalOffset ===
 +
Takes an input [[#TimeSpanType]]. No output.
 +
 
 +
== ISystemClock ==
 +
This is "nn::timesrv::detail::service::ISystemClock".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 3 || SetTestOffset || Takes an input [[#TimeSpanType]], no output.
+
! Cmd || Name
 
|-
 
|-
| 100 || [2.0.0+] GetRtcValue || No input, returns an output s64.
+
| 0 || [[#GetCurrentTime]]
 
|-
 
|-
| 101 || [2.0.0+] IsRtcResetDetected || No input, returns an output u8 bool.
+
| 1 || [[#SetCurrentTime]]
 
|-
 
|-
| 102 || [2.0.0+] GetSetupResultValue || No input, returns an output u32.
+
| 2 || [[#GetSystemClockContext]]
 
|-
 
|-
| 200 || [3.0.0+] GetInternalOffset || No input, returns an output [[#TimeSpanType]].
+
| 3 || [[#SetSystemClockContext]]
 
|-
 
|-
| 201 || [3.0.0-3.0.2] SetInternalOffset || Takes an input [[#TimeSpanType]], no output.
+
| 4 || [9.0.0+] GetOperationEventReadableHandle
 
|}
 
|}
   −
=== SteadyClockTimePoint ===
+
=== GetCurrentTime ===
 +
No input. Returns an output [[#PosixTime]].
 +
 
 +
=== SetCurrentTime ===
 +
Takes an input [[#PosixTime]]. No output.
 +
 
 +
=== GetSystemClockContext ===
 +
No input. Returns an output [[#SystemClockContext]].
 +
 
 +
=== SetSystemClockContext ===
 +
Takes an input [[#SystemClockContext]]. No output.
 +
 
 +
== ITimeZoneService ==
 +
This is "nn::timesrv::detail::service::ITimeZoneService".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Offset || Size || Description
+
! Cmd || Name
 +
|-
 +
| 0 || [[#GetDeviceLocationName]]
 +
|-
 +
| 1 || [[#SetDeviceLocationName]]
 +
|-
 +
| 2 || [[#GetTotalLocationNameCount]]
 +
|-
 +
| 3 || [[#LoadLocationNameList]]
 +
|-
 +
| 4 || [[#LoadTimeZoneRule]]
 +
|-
 +
| 5 || [2.0.0+] [[#GetTimeZoneRuleVersion]]
 +
|-
 +
| 6 || [5.0.0+] GetDeviceLocationNameAndUpdatedTime
 +
|-
 +
| 100 || [[#ToCalendarTime]]
 +
|-
 +
| 101 || [[#ToCalendarTimeWithMyRule]]
 
|-
 
|-
| 0x0 || 0x8|| A u64 representing a point in time.
+
| 201 || [[#ToPosixTime]]
 
|-
 
|-
| 0x8 || 0x10 || An ID representing the clock source.
+
| 202 || [[#ToPosixTimeWithMyRule]]
 
|}
 
|}
   −
This is a 0x18-byte struct.
+
=== GetDeviceLocationName ===
 +
No input. Returns an output [[#LocationName]].
 +
 
 +
=== SetDeviceLocationName ===
 +
Takes an input [[#LocationName]]. No output.
 +
 
 +
=== GetTotalLocationNameCount ===
 +
No input. Returns an output s32.
 +
 
 +
=== LoadLocationNameList ===
 +
Takes an input s32 LocationName_index and a type-0x6 output buffer for [[#LocationName]]. Returns an output s32 for total output entries.
 +
 
 +
=== LoadTimeZoneRule ===
 +
Takes an input [[#LocationName]] and a type-0x16 output buffer for [[#TimeZoneRule]]. No output.
 +
 
 +
=== GetTimeZoneRuleVersion ===
 +
No input. Returns an output [[#TimeZoneRuleVersion]].
 +
 
 +
=== ToCalendarTime ===
 +
Takes an input [[#PosixTime]] and a type-0x15 input buffer for [[#TimeZoneRule]]. Returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfo]].
 +
 
 +
=== ToCalendarTimeWithMyRule ===
 +
Takes an input [[#PosixTime]]. Returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfo]].
 +
 
 +
=== ToPosixTime ===
 +
Takes an input [[#CalendarTime]], a type-0x15 input buffer for [[#TimeZoneRule]], an type-0xA output buffer for [[#PosixTime]] array.R eturns an output s32.
 +
 
 +
=== ToPosixTimeWithMyRule ===
 +
Takes an input [[#CalendarTime]], an type-0xA output buffer for [[#PosixTime]] array. Returns an output s32.
 +
 
 +
= BoardPowerControlEventTarget =
 +
This is "nn::bpc::BoardPowerControlEventTarget".
 +
 
 +
= SleepButtonState =
 +
This is "nn::bpc::SleepButtonState".
 +
 
 +
= EventTarget =
 +
This is "nn::bpc::EventTarget".
 +
 
 +
= Module =
 +
This is "nn::pcv::Module".
   −
=== TimeSpanType ===
+
{| class="wikitable" border="1"
This is an u64.
+
|-
 +
! Value || Name || DeviceCode || Rail
 +
|-
 +
| 0 || Cpu || 0x40000001 || VddCpu
 +
|-
 +
| 1 || Gpu || 0x40000002 || VddGpu
 +
|-
 +
| 2 || I2s1 || 0x40000003 || VddSoc
 +
|-
 +
| 3 || I2s2 || 0x40000004 || VddSoc
 +
|-
 +
| 4 || I2s3 || 0x40000005 || VddSoc
 +
|-
 +
| 5 || Pwm || 0x40000006 || VddSoc
 +
|-
 +
| 6 || I2c1 || 0x02000001 || VddSoc
 +
|-
 +
| 7 || I2c2 || 0x02000002 || VddSoc
 +
|-
 +
| 8 || I2c3 || 0x02000003 || VddSoc
 +
|-
 +
| 9 || I2c4 || 0x02000004 || VddSoc
 +
|-
 +
| 10 || I2c5 || 0x02000005 || VddSoc
 +
|-
 +
| 11 || I2c6 || 0x02000006 || VddSoc
 +
|-
 +
| 12 || Spi1 || 0x07000000 || VddSoc
 +
|-
 +
| 13 || Spi2 || 0x07000001 || VddSoc
 +
|-
 +
| 14 || Spi3 || 0x07000002 || VddSoc
 +
|-
 +
| 15 || Spi4 || 0x07000003 || VddSoc
 +
|-
 +
| 16 || Disp1 || 0x40000011 || VddSoc
 +
|-
 +
| 17 || Disp2 || 0x40000012 || VddSoc
 +
|-
 +
| 18 || Isp || 0x40000013 || None
 +
|-
 +
| 19 || Vi || 0x40000014 || None
 +
|-
 +
| 20 || Sdmmc1 || 0x40000015 || VddSoc
 +
|-
 +
| 21 || Sdmmc2 || 0x40000016 || VddSoc
 +
|-
 +
| 22 || Sdmmc3 || 0x40000017 || VddSoc
 +
|-
 +
| 23 || Sdmmc4 || 0x40000018 || VddSoc
 +
|-
 +
| 24 || Owr || 0x40000019 || None
 +
|-
 +
| 25 || Csite || 0x4000001A || VddSoc
 +
|-
 +
| 26 || Tsec || 0x4000001B || VddSoc
 +
|-
 +
| 27 || Mselect || 0x4000001C || VddSoc
 +
|-
 +
| 28 || Hda2codec2x || 0x4000001D || VddSoc
 +
|-
 +
| 29 || Actmon || 0x4000001E || VddSoc
 +
|-
 +
| 30 || I2cSlow || 0x4000001F || VddSoc
 +
|-
 +
| 31 || Sor1 || 0x40000020 || VddSoc
 +
|-
 +
| 32 || Sata || 0x40000021 || None
 +
|-
 +
| 33 || Hda || 0x40000022 || VddSoc
 +
|-
 +
| 34 || XusbCoreHostSrc || 0x40000023 || VddSoc
 +
|-
 +
| 35 || XusbFalconSrc || 0x40000024 || VddSoc
 +
|-
 +
| 36 || XusbFsSrc || 0x40000025 || VddSoc
 +
|-
 +
| 37 || XusbCoreDevSrc || 0x40000026 || VddSoc
 +
|-
 +
| 38 || XusbSsSrc || 0x40000027 || VddSoc
 +
|-
 +
| 39 || UartA || 0x03000001 || VddSoc
 +
|-
 +
| 40 || UartB || 0x35000405 || VddSoc
 +
|-
 +
| 41 || UartC || 0x3500040F || VddSoc
 +
|-
 +
| 42 || UartD || 0x37000001 || VddSoc
 +
|-
 +
| 43 || Host1x || 0x4000002C || VddSoc
 +
|-
 +
| 44 || Entropy || 0x4000002D || VddSoc
 +
|-
 +
| 45 || SocTherm || 0x4000002E || VddSoc
 +
|-
 +
| 46 || Vic || 0x4000002F || VddSoc
 +
|-
 +
| 47 || Nvenc || 0x40000030 || VddSoc
 +
|-
 +
| 48 || Nvjpg || 0x40000031 || VddSoc
 +
|-
 +
| 49 || Nvdec || 0x40000032 || VddSoc
 +
|-
 +
| 50 || Qspi || 0x40000033 || VddSoc
 +
|-
 +
| 51 || ViI2c || 0x40000034 || None
 +
|-
 +
| 52 || Tsecb || 0x40000035 || VddSoc
 +
|-
 +
| 53 || Ape || 0x40000036 || VddSoc
 +
|-
 +
| 54 || AudioDsp || 0x40000037 || VddSoc
 +
|-
 +
| 55 || AudioUart || 0x40000038 || VddSoc
 +
|-
 +
| 56 || Emc || 0x40000039 || VddSoc
 +
|-
 +
| 57 || Plle || 0x4000003A || VddSoc
 +
|-
 +
| 58 || PlleHwSeq || 0x4000003B || VddSoc
 +
|-
 +
| 59 || Dsi || 0x4000003C || VddSoc
 +
|-
 +
| 60 || Maud || 0x4000003D || VddSoc
 +
|-
 +
| 61 || Dpaux1 || 0x4000003E || VddSoc
 +
|-
 +
| 62 || MipiCal || 0x4000003F || VddSoc
 +
|-
 +
| 63 || UartFstMipiCal || 0x40000040 || VddSoc
 +
|-
 +
| 64 || Osc || 0x40000041 || VddSoc
 +
|-
 +
| 65 || SysBus || 0x40000042 || VddSoc
 +
|-
 +
| 66 || SorSafe || 0x40000043 || VddSoc
 +
|-
 +
| 67 || XusbSs || 0x40000044 || VddSoc
 +
|-
 +
| 68 || XusbHost || 0x40000045 || VddSoc
 +
|-
 +
| 69 || XusbDevice || 0x40000046 || VddSoc
 +
|-
 +
| 70 || Extperiph1 || 0x40000047 || VddSoc
 +
|-
 +
| 71 || Ahub || 0x40000048 || VddSoc
 +
|-
 +
| 72 || Hda2hdmicodec || 0x40000049 || VddSoc
 +
|-
 +
| 73 || Gpuaux || 0x4000004A || VddSoc
 +
|-
 +
| 74 || UsbD || 0x4000004B || VddSoc
 +
|-
 +
| 75 || Usb2 || 0x4000004C || VddSoc
 +
|-
 +
| 76 || Pcie || 0x4000004D || VddSoc
 +
|-
 +
| 77 || Afi || 0x4000004E || VddSoc
 +
|-
 +
| 78 || PciExClk || 0x4000004F || VddSoc
 +
|-
 +
| 79 || PExUsbPhy || 0x40000050 || VddSoc
 +
|-
 +
| 80 || XUsbPadCtl || 0x40000051 || VddSoc
 +
|-
 +
| 81 || Apbdma || 0x40000052 || VddSoc
 +
|-
 +
| 82 || Usb2TrkClk || 0x40000053 || VddSoc
 +
|-
 +
| 83 || XUsbIoPll || 0x40000054 || VddSoc
 +
|-
 +
| 84 || XUsbIoPllHwSeq || 0x40000055 || VddSoc
 +
|-
 +
| 85 || Cec || 0x40000056 || VddSoc
 +
|-
 +
| [6.0.0+] 86 || Extperiph2 || 0x40000057 || VddSoc
 +
|-
 +
| [8.0.0+] - || OscClk || 0x40000080 || None
 +
|}
   −
== ISystemClock ==
+
= PowerDomain =
This is "nn::timesrv::detail::service::ISystemClock".
+
This is "nn::pcv::PowerDomain".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Value || Name || DeviceCode || Description
 +
|-
 +
| 0 || Max77620_Sd0 || 0x3A000080 || SoC (1.125v)
 +
|-
 +
| 1 || Max77620_Sd1 || 0x3A000081 || Dram (1.1v)
 +
|-
 +
| 2 || Max77620_Sd2 || 0x3A000082 || Ldo0, Ldo1, Ldo7, Ldo8 (1.325v)
 +
|-
 +
| 3 || Max77620_Sd3 || 0x3A000083 || Reserved (1.8v)
 +
|-
 +
| 4 || Max77620_Ldo0 || 0x3A0000A0 || Panel (1.2v)
 +
|-
 +
| 5 || Max77620_Ldo1 || 0x3A0000A1 || Xusb, PCIe (1.05v)
 +
|-
 +
| 6 || Max77620_Ldo2 || 0x3A0000A2 || SdCard (1.8v, 3.3v)
 +
|-
 +
| 7 || Max77620_Ldo3 || 0x3A0000A3 || GcAsic (3.1v)
 +
|-
 +
| 8 || Max77620_Ldo4 || 0x3A0000A4 || Rtc (0.85v)
 
|-
 
|-
| 0 || GetCurrentTime || Returns an output [[#PosixTime]].
+
| 9 || Max77620_Ldo5 || 0x3A0000A5 || GcCard (1.8v)
 
|-
 
|-
| 1 || SetCurrentTime || Takes an input [[#PosixTime]].
+
| 10 || Max77620_Ldo6 || 0x3A0000A6 || TouchPanel, ALS (2.9v)
 
|-
 
|-
| 2 || GetSystemClockContext || Returns an output [[#SystemClockContext]].
+
| 11 || Max77620_Ldo7 || 0x3A0000A7 || Xusb (1.05v)
 
|-
 
|-
| 3 || SetSystemClockContext || Takes an input [[#SystemClockContext]].
+
| 12 || Max77620_Ldo8 || 0x3A0000A8 || DisplayPort, HDMI, SioMcu (1.05v)
 
|-
 
|-
| 4 || [9.0.0+] GetOperationEventReadableHandle ||
+
| 13 || Max77621_Cpu || 0x3A000003 ||
 +
|-
 +
| 14 || Max77621_Gpu || 0x3A000004 ||
 +
|-
 +
| [6.0.0+] 15 || Max77812_Cpu || 0x3A000003 ||
 +
|-
 +
| [6.0.0+] 16 || Max77812_Gpu || 0x3A000004 ||
 +
|-
 +
| [6.0.0+] 17 || Max77812_Dram || 0x3A000005 ||
 
|}
 
|}
   −
=== PosixTime ===
+
= PowerControlTarget =
This is an s64 for UTC POSIX time.
+
This is "nn::pcv::PowerControlTarget".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value || Name || DeviceCode || Description
 +
|-
 +
| 0 || || 0x3C000004 || SdCard (Ldo2)
 +
|-
 +
| 1 || || 0x34000007 || DisplayPort, HDMI (Ldo8)
 +
|-
 +
| 2 || || || Invalid (Ldo7)
 +
|-
 +
| 3 || || 0x3500041A || SioMcu (Ldo8)
 +
|}
   −
=== SystemClockContext ===
+
= ModuleState =
This is an 0x20-byte struct.
+
This is "nn::pcv::ModuleState".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 658: Line 1,005:  
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x8|| a [[#PosixTime]] representing the system clock epoch.
+
| 0x0 || 0x4 || ClockFrequency
 +
|-
 +
| 0x4 || 0x1 || ClockEnabled
 +
|-
 +
| 0x5 || 0x1 || PowerEnabled
 +
|-
 +
| 0x6 || 0x1 || ResetAsserted
 +
|-
 +
| 0x7 || 0x1 || Reserved
 
|-
 
|-
| 0x8 || 0x18 || a [[#SteadyClockTimePoint]]
+
| 0x8 || 0x4 || MinVClockRate
 
|}
 
|}
   −
== ITimeZoneService ==
+
= PowerDomainState =
This is "nn::timesrv::detail::service::ITimeZoneService".
+
This is "nn::pcv::PowerDomainState".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x1 || Enabled
 
|-
 
|-
| 0 || GetDeviceLocationName || No input, returns an output [[#LocationName]].
+
| 0x1 || 0x3 || Reserved
 
|-
 
|-
| 1 || SetDeviceLocationName || Takes an input [[#LocationName]], no output.
+
| 0x4 || 0x4 || Voltage
 +
|}
 +
 
 +
= TemperatureThreshold =
 +
This is "nn::pcv::TemperatureThreshold".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 2 || GetTotalLocationNameCount || No input, returns an output s32.
+
! Offset || Size || Description
 
|-
 
|-
| 3 || LoadLocationNameList ||  
+
| 0x0 || 0x4 || MinMilliC
 
|-
 
|-
| 4 || LoadTimeZoneRule || Takes an input [[#LocationName]] and a type-0x16 output buffer for [[#TimeZoneRule]], no output.
+
| 0x4 || 0x4 || MaxMilliC
 +
|}
 +
 
 +
= ClockRatesListType =
 +
This is "nn::pcv::ClockRatesListType".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Value || Description
 
|-
 
|-
| 5 || [2.0.0+] GetTimeZoneRuleVersion || No input, returns an output [[#TimeZoneRuleVersion]].
+
| 0 || Invalid
 
|-
 
|-
| 6 || [5.0.0+] GetDeviceLocationNameAndUpdatedTime ||  
+
| 1 || Discrete
 
|-
 
|-
| 100 || ToCalendarTime || Takes an input [[#PosixTime]] and a type-0x15 input buffer for [[#TimeZoneRule]], returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfo]].
+
| 2 || Range
 +
|}
 +
 
 +
= SteadyClockTimePoint =
 +
This is a 0x18-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 101 || ToCalendarTimeWithMyRule || Takes an input [[#PosixTime]], returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfo]].
+
! Offset || Size || Description
 
|-
 
|-
| 201 || ToPosixTime || Takes an input [[#CalendarTime]], a type-0x15 input buffer for [[#TimeZoneRule]], an type-0xA output buffer for [[#PosixTime]] array, and returns an output s32.
+
| 0x0 || 0x8 || A u64 representing a point in time.
 
|-
 
|-
| 202 || ToPosixTimeWithMyRule || Takes an input [[#CalendarTime]], an type-0xA output buffer for [[#PosixTime]] array, and returns an output s32.
+
| 0x8 || 0x10 || An ID representing the clock source.
 
|}
 
|}
   −
=== LoadLocationNameList ===
+
= TimeSpanType =
Takes an input s32 LocationName_index and a type-0x6 output buffer for [[#LocationName]], returns an output s32 for total output entries.
+
This is an u64.
 +
 
 +
= PosixTime =
 +
This is an s64 for UTC POSIX time.
 +
 
 +
= SystemClockContext =
 +
This is an 0x20-byte struct.
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x8|| a [[#PosixTime]] representing the system clock epoch.
 +
|-
 +
| 0x8 || 0x18 || a [[#SteadyClockTimePoint]]
 +
|}
   −
=== LocationName ===
+
= LocationName =
 
This contains a TimeZone location string with a max size of 0x24 bytes.
 
This contains a TimeZone location string with a max size of 0x24 bytes.
   −
=== TimeZoneRule ===
+
= TimeZoneRule =
 
This is an 0x4000-byte struct. Official sw uses fixed-size 0x4000 for the buffer size with the above commands.
 
This is an 0x4000-byte struct. Official sw uses fixed-size 0x4000 for the buffer size with the above commands.
   Line 737: Line 1,129:  
|}
 
|}
   −
=== ttinfo ===
+
= ttinfo =
This is an 0x10-byte struct.
+
This is an 0x10-byte struct. Represents a Time Type Information used in [[#TimeZoneRule]].
Represent a Time Type Information used in [[#TimeZoneRule]].
      
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 760: Line 1,151:  
|}
 
|}
   −
=== TimeZoneRuleVersion ===
+
= TimeZoneRuleVersion =
 
This is an u128.
 
This is an u128.
   −
=== CalendarTime ===
+
= CalendarTime =
 +
This is an 0x8-byte struct.
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 783: Line 1,176:  
|}
 
|}
   −
This is an 0x8-byte struct.
+
= CalendarAdditionalInfo =
 +
This is an 0x18-byte struct. This stores timezone info.
   −
=== CalendarAdditionalInfo ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 800: Line 1,193:  
| 0x14 || 0x4 || s32 seconds relative to UTC for this timezone.
 
| 0x14 || 0x4 || s32 seconds relative to UTC for this timezone.
 
|}
 
|}
  −
This is an 0x18-byte struct. This stores timezone info.
      
[[Category:Services]]
 
[[Category:Services]]

Navigation menu