Changes

Jump to navigation Jump to search
13,374 bytes added ,  21:17, 25 November 2021
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+]
+
| 8 || [2.0.0-9.2.0] [[#CreateWakeupTimer]]
 
|-
 
|-
| 9 || [2.0.0+]
+
| 9 || [2.0.0-9.2.0] [[#CancelWakeupTimer]]
 
|-
 
|-
| 10 || [2.0.0+]
+
| 10 || [2.0.0-9.2.0] [[#EnableWakeupTimerOnDevice]]
 
|-
 
|-
| 11 || [3.0.0+]
+
| 11 || [3.0.0-9.2.0] [[#CreateWakeupTimerEx]]
 
|-
 
|-
| 12 || [3.0.0+]
+
| 12 || [3.0.0-9.2.0] [[#GetLastEnabledWakeupTimerType]]
 
|-
 
|-
| 13 || [3.0.0+]
+
| 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 ==
 +
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 44: Line 98:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || GetExternalRtcValue
+
| 0 || [[#GetRtcTime]]
 
|-
 
|-
| 1 || SetExternalRtcValue
+
| 1 || [[#SetRtcTime]]
 
|-
 
|-
| 2 || ReadExternalRtcResetFlag
+
| 2 || [[#GetRtcResetDetected]]
 
|-
 
|-
| 3 || [2.0.0+] ClearExternalRtcResetFlag
+
| 3 || [2.0.0+] [[#ClearRtcResetDetected]]
 
|-
 
|-
| 4 || [3.0.0+]
+
| 4 || [3.0.0+] [[#SetUpRtcResetOnShutdown]]
 
|}
 
|}
   −
GetExternalRtcValue / SetExternalRtcValue 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 64: 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
+
| 0 || [[#GetSleepButtonState]]
 
|-
 
|-
| [1.0.0-7.0.1] 8 || SetVoltageEnabled
+
| 1 || [[#GetPowerEvent]]
 +
|}
 +
 
 +
= bpc:w =
 +
This is "nn::bpc::IWakeupConfigManager".
 +
 
 +
[2.0.0+] This service was merged into [[#bpc|bpc]].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| [1.0.0-7.0.1] 9 || GetVoltageEnabled
+
! Cmd || Name
 
|-
 
|-
| [1.0.0-7.0.1] 10 || GetVoltageRange
+
| 0 || [[#CreateWakeupTimer]]
 
|-
 
|-
| [1.0.0-7.0.1] 11 || SetVoltageValue
+
| 1 || [[#CancelWakeupTimer]]
 
|-
 
|-
| [1.0.0-7.0.1] 12 || GetVoltageValue
+
| 2 || [[#EnableWakeupTimerOnDevice]]
 +
|}
 +
 
 +
= pcv =
 +
This is "nn::pcv::detail::IPcvService".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| [1.0.0-7.0.1] 13 || GetTemperatureThresholds
+
! Cmd || Name
 
|-
 
|-
| [1.0.0-7.0.1] 14 || SetTemperature
+
| [1.0.0-7.0.1] 0 || [[#SetPowerEnabled]]
 
|-
 
|-
| [1.0.0-5.1.0] 15 || Initialize
+
| [1.0.0-7.0.1] 1 || [[#SetClockEnabled]]
 
|-
 
|-
| [1.0.0-5.1.0] 16 || IsInitialized
+
| [1.0.0-7.0.1] 2 || [[#SetClockRate]]
 
|-
 
|-
| [1.0.0-5.1.0] 17 || Finalize
+
| [1.0.0-7.0.1] 3 || [[#GetClockRate]]
 
|-
 
|-
| [3.0.0-7.0.1] 18 || PowerOn
+
| [1.0.0-7.0.1] 4 || [[#GetState]]
 
|-
 
|-
| [3.0.0-7.0.1] 19 || PowerOff
+
| [1.0.0-7.0.1] 5 || [[#GetPossibleClockRates]]
 
|-
 
|-
| [3.0.0-7.0.1] 20 || ChangeVoltage
+
| [1.0.0-7.0.1] 6 || [[#SetMinVClockRate]]
 
|-
 
|-
| [3.0.0-7.0.1] 21 || GetPowerClockInfoEvent
+
| [1.0.0-7.0.1] 7 || [[#SetReset]]
 
|-
 
|-
| [3.0.0-7.0.1] 22 || GetOscillatorClock
+
| [1.0.0-7.0.1] 8 || [[#SetVoltageEnabled]]
 
|-
 
|-
| [3.0.0-7.0.1] 23 || GetDvfsTable
+
| [1.0.0-7.0.1] 9 || [[#GetVoltageEnabled]]
 
|-
 
|-
| [3.0.0-7.0.1] 24 || GetModuleStateTable
+
| [1.0.0-7.0.1] 10 || [[#GetVoltageRange]]
 
|-
 
|-
| [3.0.0-7.0.1] 25 || GetPowerDomainStateTable
+
| [1.0.0-7.0.1] 11 || [[#SetVoltageValue]]
 
|-
 
|-
| 26 || [3.0.0+] GetFuseInfo
+
| [1.0.0-7.0.1] 12 || [[#GetVoltageValue]]
 
|-
 
|-
| 27 || [5.0.0+]
+
| [1.0.0-7.0.1] 13 || [[#GetTemperatureThresholds]]
 
|-
 
|-
| [6.0.0-7.0.1] 28 ||
+
| [1.0.0-7.0.1] 14 || [[#SetTemperature]]
 
|-
 
|-
| [6.0.0-7.0.1] 29 ||
+
| [1.0.0-5.1.0] 15 || [[#Initialize]]
|}
  −
 
  −
[7.0.0+] The type-0xA output buffers were replaced with type-0x22 output buffers, for the following: GetDvfsTable, GetModuleStateTable, and GetPowerDomainStateTable.
  −
 
  −
== User Name to Block Maps ==
  −
=== Power Switch / Clocking / Reset ===
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Name || Block || Rail || Notes
+
| [1.0.0-5.1.0] 16 || [[#IsInitialized]]
 
|-
 
|-
| 0 || CpuBus || vdd_cpu ||
+
| [1.0.0-5.1.0] 17 || [[#Finalize]]
 
|-
 
|-
| 1 || GPU || vdd_gpu ||
+
| [3.0.0-7.0.1] 18 || [[#PowerOn]]
 
|-
 
|-
| 2 || I2S1 || vdd_soc ||
+
| [3.0.0-7.0.1] 19 || [[#PowerOff]]
 
|-
 
|-
| 3 || I2S2 || vdd_soc ||
+
| [3.0.0-7.0.1] 20 || [[#ChangeVoltage]]
 
|-
 
|-
| 4 || I2S3 || vdd_soc ||
+
| [3.0.0-7.0.1] 21 || [[#GetPowerClockInfoEvent]]
 
|-
 
|-
| 5 || PWM || vdd_soc ||
+
| [3.0.0-7.0.1] 22 || [[#GetOscillatorClock]]
 
|-
 
|-
| 6 || I2C1 || vdd_soc ||
+
| [3.0.0-7.0.1] 23 || [[#GetDvfsTable]]
 
|-
 
|-
| 7 || I2C2 || vdd_soc ||
+
| [3.0.0-7.0.1] 24 || [[#GetModuleStateTable]]
 
|-
 
|-
| 8 || I2C3 || vdd_soc ||
+
| [3.0.0-7.0.1] 25 || [[#GetPowerDomainStateTable]]
 
|-
 
|-
| 9 || I2C4 || vdd_soc ||
+
| 26 || [3.0.0+] [[#GetFuseInfo]]
 
|-
 
|-
| 10 || I2C5 || vdd_soc ||
+
| 27 || [5.0.0+] [[#GetDramId]]
 
|-
 
|-
| 11 || I2C6 || vdd_soc ||
+
| [6.0.0-7.0.1] 28 || [[#IsPoweredOn]]
 
|-
 
|-
| 12 || SPI1 || vdd_soc ||
+
| [6.0.0-7.0.1] 29 || [[#GetVoltage]]
 +
|}
 +
 
 +
== SetPowerEnabled ==
 +
Takes an input [[#Module|ModuleId]] and an input bool '''Enabled'''. No output.
 +
 
 +
== SetClockEnabled ==
 +
Takes an input [[#Module|ModuleId]] and an input bool '''Enabled'''. No output.
 +
 
 +
== SetClockRate ==
 +
Takes an input [[#Module|ModuleId]] and an input u32 '''ClockRateHz'''. No output.
 +
 
 +
== GetClockRate ==
 +
Takes an input [[#Module|ModuleId]]. Returns an output u32 '''ClockRateHz'''.
 +
 
 +
== GetState ==
 +
Takes an input [[#Module|ModuleId]]. Returns an output [[#ModuleState|ModuleState]].
 +
 
 +
== 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'''.
 +
 
 +
== SetMinVClockRate ==
 +
Takes an input [[#Module|ModuleId]] and an input u32 '''ClockRateHz'''. No output.
 +
 
 +
== SetReset ==
 +
Takes an input [[#Module|ModuleId]] and an input bool '''Asserted'''. No output.
 +
 
 +
== SetVoltageEnabled ==
 +
Takes an input [[#PowerDomain|PowerDomain]] and an input bool '''Enabled'''. No output.
 +
 
 +
== GetVoltageEnabled ==
 +
Takes an input [[#PowerDomain|PowerDomain]]. Returns an output bool '''Enabled'''.
 +
 
 +
== GetVoltageRange ==
 +
Takes an input [[#PowerDomain|PowerDomain]]. Returns three output s32s '''MinVolt''', '''MaxVolt''' and '''StepVolt'''.
 +
 
 +
== SetVoltageValue ==
 +
Takes an input [[#PowerDomain|PowerDomain]] and an input s32 '''MicroVolt'''. No output.
 +
 
 +
== GetVoltageValue ==
 +
Takes an input [[#PowerDomain|PowerDomain]]. Returns an output s32 '''MicroVolt'''.
 +
 
 +
== 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.
 +
 
 +
== GetVoltage ==
 +
Takes an input [[#PowerControlTarget|PowerControlTarget]]. Returns an output s32.
 +
 
 +
= pcv:arb =
 +
This is "nn::pcv::IArbitrationManager".
 +
 
 +
This service no longer exists in [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 13 || SPI2 || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 14 || SPI3 || vdd_soc ||
+
| 0 || [[#ReleaseControl]]
 +
|}
 +
 
 +
== ReleaseControl ==
 +
Takes an input [[#Module|ModuleId]]. No output.
 +
 
 +
= pcv:imm =
 +
This is "nn::pcv::IImmediateManager".
 +
 
 +
This service no longer exists in [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 15 || SPI4 || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 16 || DISP1 || vdd_soc ||
+
| 0 || [[#SetClockRate]]
 +
|}
 +
 
 +
= clkrst, clkrst:i =
 +
These are "nn::clkrst::IClkrstManager" and "nn::clkrst::IImmediateManager".
 +
 
 +
These were added with [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 17 || DISP2 || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 20 || SDMMC1 || vdd_soc ||
+
| 0 || [[#OpenSession]]
 
|-
 
|-
| 21 || SDMMC2 || vdd_soc ||
+
| 1 || [[#GetTemperatureThresholds]]
 
|-
 
|-
| 22 || SDMMC3 || vdd_soc ||
+
| 2 || [[#SetTemperature]]
 
|-
 
|-
| 23 || SDMMC4 || vdd_soc ||
+
| 3 || [[#GetModuleStateTable]]
 
|-
 
|-
| 24 || - || - || Not actual block. Used for debug and stuff.
+
| 4 || GetModuleStateTableEvent
 
|-
 
|-
| 25 || CSITE || vdd_soc ||
+
| 5 || [[#GetModuleStateTableMaxCount]]
 +
|}
 +
 
 +
== OpenSession ==
 +
Takes an input [[#Module|DeviceCode]] and an input u32. Returns an [[#IClkrstSession]].
 +
 
 +
== GetModuleStateTableMaxCount ==
 +
Unofficial name.
 +
 
 +
Returns 0x1A.
 +
 
 +
== IClkrstSession ==
 +
This is "nn::clkrst::IClkrstSession".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 26 || TSEC || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 27 || MSELECT || vdd_soc ||
+
| 0 || SetClockEnabled
 
|-
 
|-
| 28 || HDA2CODEC_2X || vdd_soc ||
+
| 1 || SetClockDisabled
 
|-
 
|-
| 29 || ACTMON || vdd_soc ||
+
| 2 || SetResetAsserted
 
|-
 
|-
| 30 || I2C_SLOW || vdd_soc ||
+
| 3 || SetResetDeasserted
 
|-
 
|-
| 31 || SOR1 || vdd_soc ||
+
| 4 || SetPowerEnabled
 
|-
 
|-
| 33 || HDA || vdd_soc ||
+
| 5 || SetPowerDisabled
 
|-
 
|-
| 34 || XUSB_CORE_HOST || vdd_soc ||
+
| 6 || GetState
 
|-
 
|-
| 35 || XUSB_FALCON || vdd_soc ||
+
| 7 || SetClockRate
 
|-
 
|-
| 36 || XUSB_FS || vdd_soc ||
+
| 8 || GetClockRate
 
|-
 
|-
| 37 || XUSB_CORE_DEV || vdd_soc ||
+
| 9 || SetMinVClockRate
 
|-
 
|-
| 38 || XUSB_SS_HOSTDEV || vdd_soc ||
+
| 10 || GetPossibleClockRates
 
|-
 
|-
| 39 || UARTA || vdd_soc ||
+
| 11 || GetDvfsTable
 +
|}
 +
 
 +
= clkrst:a =
 +
This is "nn::clkrst::IArbitrationManager".
 +
 
 +
This was added with [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 40 || UARTB || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 41 || UARTC || vdd_soc ||
+
| 0 || [[#ReleaseControl_2|ReleaseControl]]
 +
|}
 +
 
 +
== ReleaseControl ==
 +
Takes an input [[#Module|DeviceCode]]. No output.
 +
 
 +
= rgltr =
 +
This is "nn::regulator::IRegulatorManager".
 +
 
 +
This was added with [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 42 || UARTD || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 43 || HOST1X || vdd_soc ||
+
| 0 || [[#OpenSession]]
 
|-
 
|-
| 44 || ENTROPY || vdd_soc ||
+
| 1 || [[#GetPowerDomainStateTable]]
 
|-
 
|-
| 45 || SOC_THERM || vdd_soc ||
+
| 2 || GetPowerDomainStateTableEvent
 
|-
 
|-
| 46 || VIC || vdd_soc ||
+
| 3 || [[#GetPowerDomainStateTableMaxCount]]
 +
|}
 +
 
 +
== OpenSession ==
 +
Takes an input [[#PowerDomain|DeviceCode]] and returns an [[#IRegulatorSession]].
 +
 
 +
== GetPowerDomainStateTableMaxCount ==
 +
Unofficial name.
 +
 
 +
Returns 0x3.
 +
 
 +
== IRegulatorSession ==
 +
This is "nn::regulator::IRegulatorSession".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 47 || NVENC || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 48 || NVJPG || vdd_soc ||
+
| 0 || SetVoltageEnabled
 
|-
 
|-
| 49 || NVDEC || vdd_soc ||
+
| 1 || PowerOn
 
|-
 
|-
| 50 || QSPI || vdd_soc ||
+
| 2 || GetVoltageEnabled
 
|-
 
|-
| 52 || TSECB || vdd_soc ||
+
| 3 || GetVoltageRange
 
|-
 
|-
| 53 || APE || vdd_soc ||
+
| 4 || GetVoltage
 
|-
 
|-
| 54 || ACLK || vdd_soc ||
+
| 5 || SetVoltageValue
 
|-
 
|-
| 55 || UARTAPE || vdd_soc ||
+
| 6 || PowerOff
 
|-
 
|-
| 56 || EMC || vdd_soc ||
+
| 7 || [13.0.0+]
 
|-
 
|-
| 57 || PLLE0 || vdd_soc ||
+
| 8 || [13.0.0+]
 
|-
 
|-
| 58 || PLLE0 || vdd_soc ||
+
| 9 || [13.0.0+]
 +
|}
 +
 
 +
= rtc =
 +
This was added with [8.0.0+].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 59 || DSI || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 60 || MAUD || vdd_soc ||
+
| 0 || [[#GetRtcTime_2|GetRtcTime]]
 
|-
 
|-
| 61 || DPAUX1 || vdd_soc ||
+
| 1 || [[#SetRtcTime_2|SetRtcTime]]
 
|-
 
|-
| 62 || MIPI_CAL || vdd_soc ||
+
| 2 || [[#SetUpRtcResetOnShutdown_2|SetUpRtcResetOnShutdown]]
 
|-
 
|-
| 63 || UART_FST_MIPI_CAL || vdd_soc ||
+
| 3 || [[#GetRtcResetDetected_2|GetRtcResetDetected]]
 
|-
 
|-
| 64 || OSC || vdd_soc ||
+
| 4 || [[#ClearRtcResetDetected_2|ClearRtcResetDetected]]
 
|-
 
|-
| 65 || SCLK || vdd_soc ||
+
| 10 || [10.0.0+] [[#EnableRtcAlarm|EnableRtcAlarm]]
 +
|-
 +
| 11 || [10.0.0+] [[#DisableRtcAlarm|DisableRtcAlarm]]
 +
|}
 +
 
 +
== 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).
 +
 
 +
== 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 =
 +
This is "nn::timesrv::detail::service::IStaticService".
 +
 
 +
[9.0.0+] These services were moved to [[Glue_services|Glue]] and [[PSC_services|PSC]].
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 66 || SOR_SAFE || vdd_soc ||
+
! Cmd || Name
 
|-
 
|-
| 67 || XUSB_SS || vdd_soc ||
+
| 0 || [[#GetStandardUserSystemClock]]
 
|-
 
|-
| 68 || XUSB_HOST || vdd_soc ||
+
| 1 || [[#GetStandardNetworkSystemClock]]
 
|-
 
|-
| 69 || XUSB_DEV || vdd_soc ||
+
| 2 || [[#GetStandardSteadyClock]]
 
|-
 
|-
| 70 || EXTPERIPH1 || vdd_soc ||
+
| 3 || [[#GetTimeZoneService]]
 
|-
 
|-
| 71 || AHUB || vdd_soc ||
+
| 4 || [[#GetStandardLocalSystemClock]]
 
|-
 
|-
| 72 || HDA2HDMICODEC || vdd_soc ||
+
| 5 || [4.0.0+] [[#GetEphemeralNetworkSystemClock]]
 
|-
 
|-
| 73 || PLLP5 || vdd_soc ||
+
| 20 || [6.0.0+] GetSharedMemoryNativeHandle
 
|-
 
|-
| 74 || USBD || vdd_soc ||
+
| 30 || [6.0.0+] GetStandardNetworkClockOperationEventReadableHandle
 
|-
 
|-
| 75 || USB2 || vdd_soc ||
+
| 31 || [6.0.0+] GetEphemeralNetworkClockOperationEventReadableHandle
 
|-
 
|-
| 76 || PCIE || vdd_soc ||
+
| 50 || [4.0.0+] SetStandardSteadyClockInternalOffset
 
|-
 
|-
| 77 || AFI || vdd_soc ||
+
| 100 || IsStandardUserSystemClockAutomaticCorrectionEnabled
 
|-
 
|-
| 78 || PCIEXCLK || vdd_soc ||
+
| 101 || SetStandardUserSystemClockAutomaticCorrectionEnabled
 
|-
 
|-
| 79 || PEX_USB_UPHY || vdd_soc ||
+
| 102 || [5.0.0+] GetStandardUserSystemClockInitialYear
 
|-
 
|-
| 80 || XUSB_PADCTL || vdd_soc ||
+
| 200 || [3.0.0+] IsStandardNetworkSystemClockAccuracySufficient
 
|-
 
|-
| 81 || APBDMA || vdd_soc ||
+
| 201 || [6.0.0+] GetStandardUserSystemClockAutomaticCorrectionUpdatedTime
 
|-
 
|-
| 82 || USB2_TRK || vdd_soc ||
+
| 300 || [4.0.0+] CalculateMonotonicSystemClockBaseTimePoint
 
|-
 
|-
| 83 || PLLE0 || vdd_soc ||
+
| 400 || [4.0.0+] GetClockSnapshot
 
|-
 
|-
| 84 || PLLE0 || vdd_soc ||
+
| 401 || [4.0.0+] GetClockSnapshotFromSystemClockContext
 
|-
 
|-
| 85 || CEC || vdd_soc ||
+
| 500 || [4.0.0+] CalculateStandardUserSystemClockDifferenceByUser
 
|-
 
|-
| [6.0.0+] 86 || EXTPERIPH2 || vdd_soc ||
+
| 501 || [4.0.0+] CalculateSpanBetween
 
|}
 
|}
   −
=== Voltage ===
+
== 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 ==
 +
This is "nn::timesrv::detail::service::ISteadyClock".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Name || Block || Notes
+
! Cmd || Name
 
|-
 
|-
| 0 || max77620_sd0 ||
+
| 0 || [[#GetCurrentTimePoint]]
 
|-
 
|-
| 1 || max77620_sd1 ||  
+
| 2 || [[#GetTestOffset]]
 
|-
 
|-
| 2 || max77620_sd2 ||  
+
| 3 || [[#SetTestOffset]]
 
|-
 
|-
| 3 || max77620_sd3 ||  
+
| 100 || [2.0.0+] [[#GetRtcValue]]
 
|-
 
|-
| 4 || max77620_ldo0 || 1.2v
+
| 101 || [2.0.0+] [[#IsRtcResetDetected]]
 
|-
 
|-
| 5 || max77620_ldo1 ||  
+
| 102 || [2.0.0+] [[#GetSetupResultValue]]
 
|-
 
|-
| 6 || max77620_ldo2 || SDcard power, 1.8v - 3.3v
+
| 200 || [3.0.0+] [[#GetInternalOffset]]
 
|-
 
|-
| 7 || max77620_ldo3 || GC ASIC 3.1v
+
| 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"
 
|-
 
|-
| 8 || max77620_ldo4 || RTC power, 0.85v
+
! Cmd || Name
|-
  −
|  9 || max77620_ldo5 || GC ASIC 1.8v
   
|-
 
|-
| 10 || max77620_ldo6 || AVDD touchscreen, 2.9v
+
| 0 || [[#GetCurrentTime]]
 
|-
 
|-
| 11 || max77620_ldo7 ||  
+
| 1 || [[#SetCurrentTime]]
 
|-
 
|-
| 12 || max77620_ldo8 || DisplayPort, 1.05v
+
| 2 || [[#GetSystemClockContext]]
 
|-
 
|-
| 13 || max77621_cpu ||  
+
| 3 || [[#SetSystemClockContext]]
 
|-
 
|-
| 14 || max77621_gpu ||  
+
| 4 || [9.0.0+] GetOperationEventReadableHandle
 
|}
 
|}
   −
Note: max77620 GPIOs are only used internally by the driver during init, and not exposed via an API.
+
=== GetCurrentTime ===
 +
No input. Returns an output [[#PosixTime]].
 +
 
 +
=== SetCurrentTime ===
 +
Takes an input [[#PosixTime]]. No output.
 +
 
 +
=== GetSystemClockContext ===
 +
No input. Returns an output [[#SystemClockContext]].
   −
= pcv:arb =
+
=== SetSystemClockContext ===
This is "nn::pcv::IArbitrationManager".
+
Takes an input [[#SystemClockContext]]. No output.
   −
This service no longer exists in [8.0.0+].  
+
== ITimeZoneService ==
 +
This is "nn::timesrv::detail::service::ITimeZoneService".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 347: Line 698:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || ReleaseControl
+
| 0 || [[#GetDeviceLocationName]]
 +
|-
 +
| 1 || [[#SetDeviceLocationName]]
 +
|-
 +
| 2 || [[#GetTotalLocationNameCount]]
 +
|-
 +
| 3 || [[#LoadLocationNameList]]
 +
|-
 +
| 4 || [[#LoadTimeZoneRule]]
 +
|-
 +
| 5 || [2.0.0+] [[#GetTimeZoneRuleVersion]]
 +
|-
 +
| 6 || [5.0.0+] GetDeviceLocationNameAndUpdatedTime
 +
|-
 +
| 100 || [[#ToCalendarTime]]
 +
|-
 +
| 101 || [[#ToCalendarTimeWithMyRule]]
 +
|-
 +
| 201 || [[#ToPosixTime]]
 +
|-
 +
| 202 || [[#ToPosixTimeWithMyRule]]
 
|}
 
|}
   −
= pcv:imm =
+
=== GetDeviceLocationName ===
This is "nn::pcv::IImmediateManager".
+
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.
   −
This service no longer exists in [8.0.0+].  
+
= BoardPowerControlEventTarget =
 +
This is "nn::bpc::BoardPowerControlEventTarget".
   −
{| class="wikitable" border="1"
+
= SleepButtonState =
|-
+
This is "nn::bpc::SleepButtonState".
! Cmd || Name
  −
|-
  −
| 0 || SetClockRate
  −
|}
     −
= clkrst, clkrst:i =
+
= EventTarget =
These are "nn::clkrst::IClkrstManager" and "nn::clkrst::IClkrstImmediateManager".
+
This is "nn::bpc::EventTarget".
   −
These were added with [8.0.0+].
+
= Module =
 +
This is "nn::pcv::Module".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name
+
! 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
 
|-
 
|-
| 0 || OpenSession
+
| 48 || Nvjpg || 0x40000031 || VddSoc
 
|-
 
|-
| 1 || GetTemperatureThresholds
+
| 49 || Nvdec || 0x40000032 || VddSoc
 
|-
 
|-
| 2 || SetTemperature
+
| 50 || Qspi || 0x40000033 || VddSoc
 
|-
 
|-
| 3 || GetPossibleClockRates
+
| 51 || ViI2c || 0x40000034 || None
 
|-
 
|-
| 4 || GetPowerClockInfoEvent
+
| 52 || Tsecb || 0x40000035 || VddSoc
 
|-
 
|-
| 5 ||
+
| 53 || Ape || 0x40000036 || VddSoc
|}
  −
 
  −
== IClkrstSession ==
  −
This is "nn::clkrst::IClkrstSession".
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name
+
| 54 || AudioDsp || 0x40000037 || VddSoc
 
|-
 
|-
| 0 || SetClockEnabled
+
| 55 || AudioUart || 0x40000038 || VddSoc
 
|-
 
|-
| 1 || SetClockDisabled
+
| 56 || Emc || 0x40000039 || VddSoc
 
|-
 
|-
| 2 || SetResetAsserted
+
| 57 || Plle || 0x4000003A || VddSoc
 
|-
 
|-
| 3 || SetResetDeasserted
+
| 58 || PlleHwSeq || 0x4000003B || VddSoc
 
|-
 
|-
| 4 || SetPowerEnabled
+
| 59 || Dsi || 0x4000003C || VddSoc
 
|-
 
|-
| 5 || SetPowerDisabled
+
| 60 || Maud || 0x4000003D || VddSoc
 
|-
 
|-
| 6 || GetState
+
| 61 || Dpaux1 || 0x4000003E || VddSoc
 
|-
 
|-
| 7 || SetClockRate
+
| 62 || MipiCal || 0x4000003F || VddSoc
 
|-
 
|-
| 8 || GetClockRate
+
| 63 || UartFstMipiCal || 0x40000040 || VddSoc
 
|-
 
|-
| 9 || SetMinVClockRate
+
| 64 || Osc || 0x40000041 || VddSoc
 
|-
 
|-
| 10 || GetPossibleClockRates
+
| 65 || SysBus || 0x40000042 || VddSoc
 
|-
 
|-
| 11 || GetDvfsTable
+
| 66 || SorSafe || 0x40000043 || VddSoc
|}
  −
 
  −
= clkrst:a =
  −
This is "nn::clkrst::IClkrstArbitrationManager".
  −
 
  −
This was added with [8.0.0+].
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name
+
| 67 || XusbSs || 0x40000044 || VddSoc
 
|-
 
|-
| 0 ||  
+
| 68 || XusbHost || 0x40000045 || VddSoc
|}
  −
 
  −
= rgltr =
  −
This is "nn::regulator::IRegulatorManager".
  −
 
  −
This was added with [8.0.0+].
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name
+
| 69 || XusbDevice || 0x40000046 || VddSoc
 
|-
 
|-
| 0 || OpenSession
+
| 70 || Extperiph1 || 0x40000047 || VddSoc
 
|-
 
|-
| 1 ||
+
| 71 || Ahub || 0x40000048 || VddSoc
 
|-
 
|-
| 2 ||
+
| 72 || Hda2hdmicodec || 0x40000049 || VddSoc
 
|-
 
|-
| 3 ||
+
| 73 || Gpuaux || 0x4000004A || VddSoc
|}
  −
 
  −
== IRegulatorSession ==
  −
This is "nn::regulator::IRegulatorSession".
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name || Notes
+
| 74 || UsbD || 0x4000004B || VddSoc
 
|-
 
|-
| 0 || [[#SetVoltageEnabled]]
+
| 75 || Usb2 || 0x4000004C || VddSoc
 
|-
 
|-
| 1 ||
+
| 76 || Pcie || 0x4000004D || VddSoc
 
|-
 
|-
| 2 || [[#GetVoltageEnabled]]
+
| 77 || Afi || 0x4000004E || VddSoc
 
|-
 
|-
| 3 || GetVoltageRange
+
| 78 || PciExClk || 0x4000004F || VddSoc
 
|-
 
|-
| 4 || GetVoltageValue
+
| 79 || PExUsbPhy || 0x40000050 || VddSoc
 
|-
 
|-
| 5 || [[#SetVoltageValue]]
+
| 80 || XUsbPadCtl || 0x40000051 || VddSoc
 
|-
 
|-
| 6 ||
+
| 81 || Apbdma || 0x40000052 || VddSoc
|}
  −
 
  −
=== SetVoltageEnabled ===
  −
Takes a bool. Enables the LDO this session was opened for.
  −
 
  −
=== GetVoltageEnabled ===
  −
Returns a bool. True if voltage is enabled, false if not.
  −
 
  −
=== SetVoltageValue ===
  −
Takes in a voltage and sets the LDO to this voltage.
  −
 
  −
= rtc =
  −
This was added with [8.0.0+].
  −
 
  −
{| class="wikitable" border="1"
   
|-
 
|-
! Cmd || Name
+
| 82 || Usb2TrkClk || 0x40000053 || VddSoc
 
|-
 
|-
| 0 ||
+
| 83 || XUsbIoPll || 0x40000054 || VddSoc
 
|-
 
|-
| 1 ||
+
| 84 || XUsbIoPllHwSeq || 0x40000055 || VddSoc
 
|-
 
|-
| 2 ||
+
| 85 || Cec || 0x40000056 || VddSoc
 
|-
 
|-
| 3 ||
+
| [6.0.0+] 86 || Extperiph2 || 0x40000057 || VddSoc
 
|-
 
|-
| 4 ||
+
| [8.0.0+] - || OscClk || 0x40000080 || None
 
|}
 
|}
   −
= time:u, time:a, time:s =
+
= PowerDomain =
This is "nn::timesrv::detail::service::IStaticService".
+
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)
 
|-
 
|-
| 0 || GetStandardUserSystemClock || Returns an [[#ISystemClock]].
+
| 3 || Max77620_Sd3 || 0x3A000083 || Reserved (1.8v)
 
|-
 
|-
| 1 || GetStandardNetworkSystemClock || Returns an [[#ISystemClock]].
+
| 4 || Max77620_Ldo0 || 0x3A0000A0 || Panel (1.2v)
 
|-
 
|-
| 2 || GetStandardSteadyClock || Returns an [[#ISteadyClock]].
+
| 5 || Max77620_Ldo1 || 0x3A0000A1 || Xusb, PCIe (1.05v)
 
|-
 
|-
| 3 || GetTimeZoneService || Returns an [[#ITimeZoneService]].
+
| 6 || Max77620_Ldo2 || 0x3A0000A2 || SdCard (1.8v, 3.3v)
 
|-
 
|-
| 4 || GetStandardLocalSystemClock || Returns an [[#ISystemClock]].
+
| 7 || Max77620_Ldo3 || 0x3A0000A3 || GcCard (3.1v)
 
|-
 
|-
| 5 || [4.0.0+] GetEphemeralNetworkSystemClock || Returns an [[#ISystemClock]].
+
| 8 || Max77620_Ldo4 || 0x3A0000A4 || Rtc (0.85v)
 
|-
 
|-
| 20 || [6.0.0+] GetSharedMemoryNativeHandle ||  
+
| 9 || Max77620_Ldo5 || 0x3A0000A5 || GcCard (1.8v)
 
|-
 
|-
| 30 || [6.0.0+] GetStandardNetworkClockOperationEventReadableHandle ||  
+
| 10 || Max77620_Ldo6 || 0x3A0000A6 || TouchPanel, ALS (2.9v)
 
|-
 
|-
| 31 || [6.0.0+] GetEphemeralNetworkClockOperationEventReadableHandle ||  
+
| 11 || Max77620_Ldo7 || 0x3A0000A7 || Xusb (1.05v)
 
|-
 
|-
| 50 || [4.0.0+] SetStandardSteadyClockInternalOffset ||  
+
| 12 || Max77620_Ldo8 || 0x3A0000A8 || DisplayPort, HDMI, SioMcu (1.05v)
 
|-
 
|-
| 100 || IsStandardUserSystemClockAutomaticCorrectionEnabled ||  
+
| 13 || Max77621_Cpu || 0x3A000003 ||
 
|-
 
|-
| 101 || SetStandardUserSystemClockAutomaticCorrectionEnabled ||  
+
| 14 || Max77621_Gpu || 0x3A000004 ||
 
|-
 
|-
| 102 || [5.0.0+] GetStandardUserSystemClockInitialYear ||  
+
| [6.0.0+] 15 || Max77812_Cpu || 0x3A000003 ||
 
|-
 
|-
| 200 || [3.0.0+] IsStandardNetworkSystemClockAccuracySufficient ||  
+
| [6.0.0+] 16 || Max77812_Gpu || 0x3A000004 ||
 
|-
 
|-
| 201 || [6.0.0+] GetStandardUserSystemClockAutomaticCorrectionUpdatedTime ||  
+
| [6.0.0+] 17 || Max77812_Dram || 0x3A000005 ||
 +
|}
 +
 
 +
= PowerControlTarget =
 +
This is "nn::pcv::PowerControlTarget".
 +
 
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 300 || [4.0.0+] CalculateMonotonicSystemClockBaseTimePoint ||  
+
! Value || Name || DeviceCode || Description
 
|-
 
|-
| 400 || [4.0.0+] GetClockSnapshot ||  
+
| 0 || || 0x3C000004 || SdCard (Ldo2)
 
|-
 
|-
| 401 || [4.0.0+] GetClockSnapshotFromSystemClockContext ||  
+
| 1 || || 0x34000007 || DisplayPort, HDMI (Ldo8)
 
|-
 
|-
| 500 || [4.0.0+] CalculateStandardUserSystemClockDifferenceByUser ||  
+
| 2 || || || Invalid (Ldo7)
 
|-
 
|-
| 501 || [4.0.0+] CalculateSpanBetween ||  
+
| 3 || || 0x3500041A || SioMcu (Ldo8)
 
|}
 
|}
   −
== ISteadyClock ==
+
= ModuleState =
This is "nn::timesrv::detail::service::ISteadyClock".
+
This is "nn::pcv::ModuleState".
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Offset || Size || Description
 
|-
 
|-
| 0 || GetCurrentTimePoint || No input, returns an output [[#SteadyClockTimePoint]].
+
| 0x0 || 0x4 || ClockFrequency
 
|-
 
|-
| 2 || GetTestOffset || No input, returns an output [[#TimeSpanType]].
+
| 0x4 || 0x1 || ClockEnabled
 
|-
 
|-
| 3 || SetTestOffset || Takes an input [[#TimeSpanType]], no output.
+
| 0x5 || 0x1 || PowerEnabled
 
|-
 
|-
| 100 || [2.0.0+] GetRtcValue || No input, returns an output s64.
+
| 0x6 || 0x1 || ResetAsserted
 
|-
 
|-
| 101 || [2.0.0+] IsRtcResetDetected || No input, returns an output u8 bool.
+
| 0x7 || 0x1 || Reserved
 
|-
 
|-
| 102 || [2.0.0+] GetSetupResultValue || No input, returns an output u32.
+
| 0x8 || 0x4 || MinVClockRate
 +
|}
 +
 
 +
= PowerDomainState =
 +
This is "nn::pcv::PowerDomainState".
 +
 
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset || Size || Description
 
|-
 
|-
| 200 || [3.0.0+] GetInternalOffset || No input, returns an output [[#TimeSpanType]].
+
| 0x0 || 0x1 || Enabled
 
|-
 
|-
| 201 || [3.0.0-3.0.2] SetInternalOffset || Takes an input [[#TimeSpanType]], no output.
+
| 0x1 || 0x3 || Reserved
 +
|-
 +
| 0x4 || 0x4 || Voltage
 
|}
 
|}
   −
=== SteadyClockTimePoint ===
+
= TemperatureThreshold =
 +
This is "nn::pcv::TemperatureThreshold".
 +
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
 
! Offset || Size || Description
 
! Offset || Size || Description
 
|-
 
|-
| 0x0 || 0x8|| A u64 representing a point in time.
+
| 0x0 || 0x4 || MinMilliC
 
|-
 
|-
| 0x8 || 0x10 || An ID representing the clock source.
+
| 0x4 || 0x4 || MaxMilliC
 
|}
 
|}
   −
This is a 0x18-byte struct.
+
= ClockRatesListType =
 +
This is "nn::pcv::ClockRatesListType".
   −
=== TimeSpanType ===
+
{| class="wikitable" border="1"
This is an u64.
+
|-
 +
! Value || Description
 +
|-
 +
| 0 || Invalid
 +
|-
 +
| 1 || Discrete
 +
|-
 +
| 2 || Range
 +
|}
   −
== ISystemClock ==
+
= SteadyClockTimePoint =
This is "nn::timesrv::detail::service::ISystemClock".
+
This is a 0x18-byte struct.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Offset || Size || Description
 
|-
 
|-
| 0 || GetCurrentTime || Returns an output [[#PosixTime]].
+
| 0x0 || 0x8 || A u64 representing a point in time.
 
|-
 
|-
| 1 || SetCurrentTime || Takes an input [[#PosixTime]].
+
| 0x8 || 0x10 || An ID representing the clock source.
|-
  −
| 2 || GetSystemClockContext || Returns an output [[#SystemClockContext]].
  −
|-
  −
| 3 || SetSystemClockContext  || Takes an input [[#SystemClockContext]].
   
|}
 
|}
   −
=== PosixTime ===
+
= TimeSpanType =
This is an u64 for UTC POSIX time.
+
This is an u64.
   −
=== SystemClockContext ===
+
= PosixTime =
 +
This is an s64 for UTC POSIX time.
 +
 
 +
= SystemClockContext =
 
This is an 0x20-byte struct.
 
This is an 0x20-byte struct.
   Line 613: Line 1,094:  
|}
 
|}
   −
== ITimeZoneService ==
+
= LocationName =
This is "nn::timesrv::detail::service::ITimeZoneService".
+
This contains a TimeZone location string with a max size of 0x24 bytes.
 +
 
 +
= TimeZoneRule =
 +
This is an 0x4000-byte struct. Official sw uses fixed-size 0x4000 for the buffer size with the above commands.
 +
 
 +
This is loaded from the [[Title_list|TimeZoneBinary]] title with the specified LocationName under the zoneinfo/ directory, the content is then converted into this TimeZoneRule structure.
 +
 
 +
The files contained under zoneinfo/ directory are Tzif2 files without Tzif1 header and data at the begining of them (see [https://tools.ietf.org/html/rfc8536 RFC8536] for more information).
 +
 
 +
The conversion of a Tzif2 file to a TimeZoneRule structure is based on [https://github.com/eggert/tz/blob/master/localtime.c tz database code] with some custom modifications (Leap seconds aren't handled, no usage of "posixrules" and Tzif1 support stripped out).
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
! Cmd || Name || Notes
+
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || timecnt
 
|-
 
|-
| 0 || GetDeviceLocationName || No input, returns an output [[#LocationName]].
+
| 0x4 || 0x4 || typecnt
 
|-
 
|-
| 1 || SetDeviceLocationName || Takes an input [[#LocationName]], no output.
+
| 0x8 || 0x4 || charcnt
 
|-
 
|-
| 2 || GetTotalLocationNameCount || No input, returns an output s32.
+
| 0xC || 0x1 || goback
 
|-
 
|-
| 3 || LoadLocationNameList ||  
+
| 0xD || 0x1 || goahead
 
|-
 
|-
| 4 || LoadTimeZoneRule || Takes an input [[#LocationName]] and a type-0x16 output buffer for [[#TimeZoneRule]], no output.
+
| 0xE || 0x2 || Padding
 
|-
 
|-
| 5 || [2.0.0+] GetTimeZoneRuleVersion || No input, returns an output [[#TimeZoneRuleVersion]].
+
| 0x10 || 0x8 * 1000 || ats
 
|-
 
|-
| 6 || [5.0.0+] GetDeviceLocationNameAndUpdatedTime ||  
+
| 0x1f50 || 0x1 * 1000 || types
 
|-
 
|-
| 100 || ToCalendarTime || Takes an input [[#PosixTime]] and a type-0x15 input buffer for [[#TimeZoneRule]], returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfo]].
+
| 0x2338 || 0x10 * 128 || ttis (time type information), struct ttinfo[1000]
 
|-
 
|-
| 101 || ToCalendarTimeWithMyRule || Takes an input [[#PosixTime]], returns an output [[#CalendarTime]] and [[#CalendarAdditionalInfo]].
+
| 0x2b38 || 0x1 * 512 || chars
 
|-
 
|-
| 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.
+
| 0x2d38 || 0x4 || defaulttype
 
|-
 
|-
| 202 || ToPosixTimeWithMyRule || Takes an input [[#CalendarTime]], an type-0xA output buffer for [[#PosixTime]] array, and returns an output s32.
+
| 0x2d3c || 0x12c4 || Reserved / Unused
 
|}
 
|}
   −
=== LoadLocationNameList ===
+
= ttinfo =
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 0x10-byte struct. Represents a Time Type Information used in [[#TimeZoneRule]].
   −
=== LocationName ===
+
{| class="wikitable" border="1"
This contains a TimeZone location string with a max size of 0x24 bytes.
+
|-
 +
! Offset || Size || Description
 +
|-
 +
| 0x0 || 0x4 || tt_gmtoff
 +
|-
 +
| 0x4 || 0x1 || tt_isdst
 +
|-
 +
| 0x5 || 0x3 || Padding
 +
|-
 +
| 0x8 || 0x4 || tt_abbrind
 +
|-
 +
| 0xC || 0x1 || tt_ttisstd
 +
|-
 +
| 0xD || 0x1 || tt_ttisgmt
 +
|-
 +
| 0xE || 0x2 || Padding
 +
|}
   −
=== TimeZoneRule ===
+
= TimeZoneRuleVersion =
This is an 0x4000-byte struct. Official sw uses fixed-size 0x4000 for the buffer size with the above commands.
+
This is an u128.
   −
This is loaded from the [[Title_list|TimeZoneBinary]] title with the specified LocationName under the zoneinfo/ directory, the content is then converted into this TimeZoneRule structure.
+
= CalendarTime =
 +
This is an 0x8-byte struct.
   −
=== TimeZoneRuleVersion ===
  −
This is an u128.
  −
  −
=== CalendarTime ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 677: Line 1,182:  
|}
 
|}
   −
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 694: Line 1,199:  
| 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