104342817SThierry Reding# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 204342817SThierry Reding%YAML 1.2 304342817SThierry Reding--- 404342817SThierry Reding$id: http://devicetree.org/schemas/soc/tegra/nvidia,tegra20-pmc.yaml# 504342817SThierry Reding$schema: http://devicetree.org/meta-schemas/core.yaml# 604342817SThierry Reding 704342817SThierry Redingtitle: Tegra Power Management Controller (PMC) 804342817SThierry Reding 904342817SThierry Redingmaintainers: 1004342817SThierry Reding - Thierry Reding <thierry.reding@gmail.com> 1104342817SThierry Reding - Jonathan Hunter <jonathanh@nvidia.com> 1204342817SThierry Reding 1304342817SThierry Redingproperties: 1404342817SThierry Reding compatible: 1504342817SThierry Reding enum: 1604342817SThierry Reding - nvidia,tegra20-pmc 1704342817SThierry Reding - nvidia,tegra30-pmc 1804342817SThierry Reding - nvidia,tegra114-pmc 1904342817SThierry Reding - nvidia,tegra124-pmc 2004342817SThierry Reding - nvidia,tegra210-pmc 2104342817SThierry Reding 2204342817SThierry Reding reg: 2304342817SThierry Reding maxItems: 1 2404342817SThierry Reding 2504342817SThierry Reding clock-names: 2604342817SThierry Reding items: 2704342817SThierry Reding # Tegra clock of the same name 2804342817SThierry Reding - const: pclk 2904342817SThierry Reding # 32 KHz clock input 3004342817SThierry Reding - const: clk32k_in 3104342817SThierry Reding 3204342817SThierry Reding clocks: 3304342817SThierry Reding maxItems: 2 3404342817SThierry Reding 3504342817SThierry Reding '#clock-cells': 3604342817SThierry Reding const: 1 3704342817SThierry Reding description: | 3804342817SThierry Reding Tegra PMC has clk_out_1, clk_out_2, and clk_out_3. PMC also has blink 3904342817SThierry Reding control which allows 32Khz clock output to Tegra blink pad. 4004342817SThierry Reding 4104342817SThierry Reding Consumer of PMC clock should specify the desired clock by having the 4204342817SThierry Reding clock ID in its "clocks" phandle cell with PMC clock provider. See 4304342817SThierry Reding include/dt-bindings/soc/tegra-pmc.h for the list of Tegra PMC clock IDs. 4404342817SThierry Reding 4504342817SThierry Reding '#interrupt-cells': 4604342817SThierry Reding const: 2 4704342817SThierry Reding description: Specifies number of cells needed to encode an interrupt 4804342817SThierry Reding source. 4904342817SThierry Reding 5004342817SThierry Reding interrupt-controller: true 5104342817SThierry Reding 5204342817SThierry Reding nvidia,invert-interrupt: 5304342817SThierry Reding $ref: /schemas/types.yaml#/definitions/flag 5404342817SThierry Reding description: Inverts the PMU interrupt signal. The PMU is an external Power 5504342817SThierry Reding Management Unit, whose interrupt output signal is fed into the PMC. This 5604342817SThierry Reding signal is optionally inverted, and then fed into the ARM GIC. The PMC is 5704342817SThierry Reding not involved in the detection or handling of this interrupt signal, 5804342817SThierry Reding merely its inversion. 5904342817SThierry Reding 6004342817SThierry Reding nvidia,core-power-req-active-high: 6104342817SThierry Reding $ref: /schemas/types.yaml#/definitions/flag 6204342817SThierry Reding description: core power request active-high 6304342817SThierry Reding 6404342817SThierry Reding nvidia,sys-clock-req-active-high: 6504342817SThierry Reding $ref: /schemas/types.yaml#/definitions/flag 6604342817SThierry Reding description: system clock request active-high 6704342817SThierry Reding 6804342817SThierry Reding nvidia,combined-power-req: 6904342817SThierry Reding $ref: /schemas/types.yaml#/definitions/flag 7004342817SThierry Reding description: combined power request for CPU and core 7104342817SThierry Reding 7204342817SThierry Reding nvidia,cpu-pwr-good-en: 7304342817SThierry Reding $ref: /schemas/types.yaml#/definitions/flag 7404342817SThierry Reding description: CPU power good signal from external PMIC to PMC is enabled 7504342817SThierry Reding 7604342817SThierry Reding nvidia,suspend-mode: 7704342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 7804342817SThierry Reding description: the suspend mode that the platform should use 7904342817SThierry Reding oneOf: 8004342817SThierry Reding - description: LP0, CPU + Core voltage off and DRAM in self-refresh 8104342817SThierry Reding const: 0 8204342817SThierry Reding - description: LP1, CPU voltage off and DRAM in self-refresh 8304342817SThierry Reding const: 1 8404342817SThierry Reding - description: LP2, CPU voltage off 8504342817SThierry Reding const: 2 8604342817SThierry Reding 8704342817SThierry Reding nvidia,cpu-pwr-good-time: 8804342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 8904342817SThierry Reding description: CPU power good time in microseconds 9004342817SThierry Reding 9104342817SThierry Reding nvidia,cpu-pwr-off-time: 9204342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 9304342817SThierry Reding description: CPU power off time in microseconds 9404342817SThierry Reding 9504342817SThierry Reding nvidia,core-pwr-good-time: 9604342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32-array 9704342817SThierry Reding description: core power good time in microseconds 9804342817SThierry Reding items: 9904342817SThierry Reding - description: oscillator stable time 10004342817SThierry Reding - description: power stable time 10104342817SThierry Reding 10204342817SThierry Reding nvidia,core-pwr-off-time: 10304342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 10404342817SThierry Reding description: core power off time in microseconds 10504342817SThierry Reding 10604342817SThierry Reding nvidia,lp0-vec: 10704342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32-array 10804342817SThierry Reding description: | 10904342817SThierry Reding Starting address and length of LP0 vector. The LP0 vector contains the 11004342817SThierry Reding warm boot code that is executed by AVP when resuming from the LP0 state. 11104342817SThierry Reding The AVP (Audio-Video Processor) is an ARM7 processor and always being 11204342817SThierry Reding the first boot processor when chip is power on or resume from deep sleep 11304342817SThierry Reding mode. When the system is resumed from the deep sleep mode, the warm boot 11404342817SThierry Reding code will restore some PLLs, clocks and then brings up CPU0 for resuming 11504342817SThierry Reding the system. 11604342817SThierry Reding items: 11704342817SThierry Reding - description: starting address of LP0 vector 11804342817SThierry Reding - description: length of LP0 vector 11904342817SThierry Reding 12004342817SThierry Reding core-supply: 12104342817SThierry Reding description: phandle to voltage regulator connected to the SoC core power 12204342817SThierry Reding rail 12304342817SThierry Reding 12404342817SThierry Reding core-domain: 12504342817SThierry Reding type: object 12604342817SThierry Reding description: The vast majority of hardware blocks of Tegra SoC belong to a 12704342817SThierry Reding core power domain, which has a dedicated voltage rail that powers the 12804342817SThierry Reding blocks. 12904342817SThierry Reding additionalProperties: false 13004342817SThierry Reding properties: 13104342817SThierry Reding operating-points-v2: 13204342817SThierry Reding description: Should contain level, voltages and opp-supported-hw 13304342817SThierry Reding property. The supported-hw is a bitfield indicating SoC speedo or 13404342817SThierry Reding process ID mask. 13504342817SThierry Reding 13604342817SThierry Reding "#power-domain-cells": 13704342817SThierry Reding const: 0 13804342817SThierry Reding 13904342817SThierry Reding required: 14004342817SThierry Reding - operating-points-v2 14104342817SThierry Reding - "#power-domain-cells" 14204342817SThierry Reding 14304342817SThierry Reding i2c-thermtrip: 14404342817SThierry Reding type: object 14504342817SThierry Reding description: On Tegra30, Tegra114 and Tegra124 if i2c-thermtrip subnode 14604342817SThierry Reding exists, hardware-triggered thermal reset will be enabled. 14704342817SThierry Reding additionalProperties: false 14804342817SThierry Reding properties: 14904342817SThierry Reding nvidia,i2c-controller-id: 15004342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 15104342817SThierry Reding description: ID of I2C controller to send poweroff command to PMU. 15204342817SThierry Reding Valid values are described in section 9.2.148 "APBDEV_PMC_SCRATCH53_0" 15304342817SThierry Reding of the Tegra K1 Technical Reference Manual. 15404342817SThierry Reding 15504342817SThierry Reding nvidia,bus-addr: 15604342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 15704342817SThierry Reding description: bus address of the PMU on the I2C bus 15804342817SThierry Reding 15904342817SThierry Reding nvidia,reg-addr: 16004342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 16104342817SThierry Reding description: PMU I2C register address to issue poweroff command 16204342817SThierry Reding 16304342817SThierry Reding nvidia,reg-data: 16404342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 16504342817SThierry Reding description: power-off command to write to PMU 16604342817SThierry Reding 16704342817SThierry Reding nvidia,pinmux-id: 16804342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 16904342817SThierry Reding description: Pinmux used by the hardware when issuing power-off command. 17004342817SThierry Reding Defaults to 0. Valid values are described in section 12.5.2 "Pinmux 17104342817SThierry Reding Support" of the Tegra4 Technical Reference Manual. 17204342817SThierry Reding 17304342817SThierry Reding required: 17404342817SThierry Reding - nvidia,i2c-controller-id 17504342817SThierry Reding - nvidia,bus-addr 17604342817SThierry Reding - nvidia,reg-addr 17704342817SThierry Reding - nvidia,reg-data 17804342817SThierry Reding 17904342817SThierry Reding powergates: 18004342817SThierry Reding type: object 18104342817SThierry Reding additionalProperties: false 18204342817SThierry Reding description: | 18304342817SThierry Reding This node contains a hierarchy of power domain nodes, which should match 18404342817SThierry Reding the powergates on the Tegra SoC. Each powergate node represents a power- 18504342817SThierry Reding domain on the Tegra SoC that can be power-gated by the Tegra PMC. 18604342817SThierry Reding 18704342817SThierry Reding Hardware blocks belonging to a power domain should contain "power-domains" 18804342817SThierry Reding property that is a phandle pointing to corresponding powergate node. 18904342817SThierry Reding 19004342817SThierry Reding The name of the powergate node should be one of the below. Note that not 19104342817SThierry Reding every powergate is applicable to all Tegra devices and the following list 19204342817SThierry Reding shows which powergates are applicable to which devices. 19304342817SThierry Reding 19404342817SThierry Reding Please refer to Tegra TRM for mode details on the powergate nodes to use 19504342817SThierry Reding for each power-gate block inside Tegra. 19604342817SThierry Reding 19704342817SThierry Reding Name Description Devices Applicable 19804342817SThierry Reding -------------------------------------------------------------- 19904342817SThierry Reding 3d 3D Graphics Tegra20/114/124/210 20004342817SThierry Reding 3d0 3D Graphics 0 Tegra30 20104342817SThierry Reding 3d1 3D Graphics 1 Tegra30 20204342817SThierry Reding aud Audio Tegra210 20304342817SThierry Reding dfd Debug Tegra210 20404342817SThierry Reding dis Display A Tegra114/124/210 20504342817SThierry Reding disb Display B Tegra114/124/210 20604342817SThierry Reding heg 2D Graphics Tegra30/114/124/210 20704342817SThierry Reding iram Internal RAM Tegra124/210 20804342817SThierry Reding mpe MPEG Encode All 20904342817SThierry Reding nvdec NVIDIA Video Decode Engine Tegra210 21004342817SThierry Reding nvjpg NVIDIA JPEG Engine Tegra210 21104342817SThierry Reding pcie PCIE Tegra20/30/124/210 21204342817SThierry Reding sata SATA Tegra30/124/210 21304342817SThierry Reding sor Display interfaces Tegra124/210 21404342817SThierry Reding ve2 Video Encode Engine 2 Tegra210 21504342817SThierry Reding venc Video Encode Engine All 21604342817SThierry Reding vdec Video Decode Engine Tegra20/30/114/124 21704342817SThierry Reding vic Video Imaging Compositor Tegra124/210 21804342817SThierry Reding xusba USB Partition A Tegra114/124/210 21904342817SThierry Reding xusbb USB Partition B Tegra114/124/210 22004342817SThierry Reding xusbc USB Partition C Tegra114/124/210 22104342817SThierry Reding 22204342817SThierry Reding patternProperties: 22304342817SThierry Reding "^[a-z0-9]+$": 22404342817SThierry Reding type: object 22504342817SThierry Reding additionalProperties: false 22604342817SThierry Reding properties: 22704342817SThierry Reding clocks: 22804342817SThierry Reding minItems: 1 22904342817SThierry Reding maxItems: 10 23004342817SThierry Reding 23104342817SThierry Reding resets: 23204342817SThierry Reding minItems: 1 23304342817SThierry Reding maxItems: 8 23404342817SThierry Reding 23504342817SThierry Reding power-domains: 23604342817SThierry Reding maxItems: 1 23704342817SThierry Reding 23804342817SThierry Reding '#power-domain-cells': 23904342817SThierry Reding const: 0 24004342817SThierry Reding description: Must be 0. 24104342817SThierry Reding 24204342817SThierry Reding required: 24304342817SThierry Reding - clocks 24404342817SThierry Reding - resets 24504342817SThierry Reding - '#power-domain-cells' 24604342817SThierry Reding 24704342817SThierry Reding pinmux: 24804342817SThierry Reding type: object 24904342817SThierry Reding additionalProperties: 25004342817SThierry Reding type: object 25104342817SThierry Reding description: | 25204342817SThierry Reding This is a pad configuration node. On Tegra SoCs a pad is a set of pins 25304342817SThierry Reding which are configured as a group. The pin grouping is a fixed attribute 25404342817SThierry Reding of the hardware. The PMC can be used to set pad power state and 25504342817SThierry Reding signaling voltage. A pad can be either in active or power down mode. 25604342817SThierry Reding The support for power state and signaling voltage configuration varies 25704342817SThierry Reding depending on the pad in question. 3.3V and 1.8V signaling voltages are 25804342817SThierry Reding supported on pins where software controllable signaling voltage 25904342817SThierry Reding switching is available. 26004342817SThierry Reding 26104342817SThierry Reding The pad configuration state nodes are placed under the pmc node and 26204342817SThierry Reding they are referred to by the pinctrl client properties. For more 26304342817SThierry Reding information see: 26404342817SThierry Reding 26504342817SThierry Reding Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt 26604342817SThierry Reding 26704342817SThierry Reding The pad name should be used as the value of the pins property in pin 26804342817SThierry Reding configuration nodes. 26904342817SThierry Reding 27004342817SThierry Reding The following pads are present on Tegra124 and Tegra132: 27104342817SThierry Reding 27204342817SThierry Reding audio, bb, cam, comp, csia, csb, cse, dsi, dsib, dsic, dsid, hdmi, 27304342817SThierry Reding hsic, hv, lvds, mipi-bias, nand, pex-bias, pex-clk1, pex-clk2, 27404342817SThierry Reding pex-cntrl, sdmmc1, sdmmc3, sdmmc4, sys_ddc, uart, usb0, usb1, usb2, 27504342817SThierry Reding usb_bias 27604342817SThierry Reding 27704342817SThierry Reding The following pads are present on Tegra210: 27804342817SThierry Reding 27904342817SThierry Reding audio, audio-hv, cam, csia, csib, csic, csid, csie, csif, dbg, 28004342817SThierry Reding debug-nonao, dmic, dp, dsi, dsib, dsic, dsid, emmc, emmc2, gpio, 28104342817SThierry Reding hdmi, hsic, lvds, mipi-bias, pex-bias, pex-clk1, pex-clk2, pex-cntrl, 28204342817SThierry Reding sdmmc1, sdmmc3, spi, spi-hv, uart, usb0, usb1, usb2, usb3, usb-bias 28304342817SThierry Reding additionalProperties: false 28404342817SThierry Reding properties: 28504342817SThierry Reding pins: 28604342817SThierry Reding $ref: /schemas/types.yaml#/definitions/string-array 28704342817SThierry Reding description: Must contain name of the pad(s) to be configured. 28804342817SThierry Reding 28904342817SThierry Reding low-power-enable: 29004342817SThierry Reding $ref: /schemas/types.yaml#/definitions/flag 29104342817SThierry Reding description: Configure the pad into power down mode. 29204342817SThierry Reding 29304342817SThierry Reding low-power-disable: 29404342817SThierry Reding $ref: /schemas/types.yaml#/definitions/flag 29504342817SThierry Reding description: Configure the pad into active mode. 29604342817SThierry Reding 29704342817SThierry Reding power-source: 29804342817SThierry Reding $ref: /schemas/types.yaml#/definitions/uint32 29904342817SThierry Reding description: | 30004342817SThierry Reding Must contain either TEGRA_IO_PAD_VOLTAGE_1V8 or 30104342817SThierry Reding TEGRA_IO_PAD_VOLTAGE_3V3 to select between signaling voltages. The 30204342817SThierry Reding values are defined in: 30304342817SThierry Reding 30404342817SThierry Reding include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h 30504342817SThierry Reding 30604342817SThierry Reding Power state can be configured on all Tegra124 and Tegra132 pads. 30704342817SThierry Reding None of the Tegra124 or Tegra132 pads support signaling voltage 30804342817SThierry Reding switching. All of the listed Tegra210 pads except pex-cntrl support 30904342817SThierry Reding power state configuration. Signaling voltage switching is supported 31004342817SThierry Reding on the following Tegra210 pads: 31104342817SThierry Reding 31204342817SThierry Reding audio, audio-hv, cam, dbg, dmic, gpio, pex-cntrl, sdmmc1, sdmmc3, 31304342817SThierry Reding spi, spi-hv, uart 31404342817SThierry Reding 31504342817SThierry Reding required: 31604342817SThierry Reding - pins 31704342817SThierry Reding 31804342817SThierry Redingrequired: 31904342817SThierry Reding - compatible 32004342817SThierry Reding - reg 32104342817SThierry Reding - clock-names 32204342817SThierry Reding - clocks 32304342817SThierry Reding - '#clock-cells' 32404342817SThierry Reding 32504342817SThierry RedingallOf: 32604342817SThierry Reding - if: 32704342817SThierry Reding properties: 32804342817SThierry Reding compatible: 32904342817SThierry Reding contains: 33004342817SThierry Reding const: nvidia,tegra124-pmc 33104342817SThierry Reding then: 33204342817SThierry Reding properties: 33304342817SThierry Reding pinmux: 33404342817SThierry Reding additionalProperties: 33504342817SThierry Reding type: object 33604342817SThierry Reding properties: 33704342817SThierry Reding pins: 33804342817SThierry Reding items: 33904342817SThierry Reding enum: [ audio, bb, cam, comp, csia, csb, cse, dsi, dsib, 34004342817SThierry Reding dsic, dsid, hdmi, hsic, hv, lvds, mipi-bias, nand, 34104342817SThierry Reding pex-bias, pex-clk1, pex-clk2, pex-cntrl, sdmmc1, 34204342817SThierry Reding sdmmc3, sdmmc4, sys_ddc, uart, usb0, usb1, usb2, 34304342817SThierry Reding usb_bias ] 34404342817SThierry Reding 34504342817SThierry Reding - if: 34604342817SThierry Reding properties: 34704342817SThierry Reding compatible: 34804342817SThierry Reding contains: 34904342817SThierry Reding const: nvidia,tegra210-pmc 35004342817SThierry Reding then: 35104342817SThierry Reding properties: 35204342817SThierry Reding pinmux: 35304342817SThierry Reding additionalProperties: 35404342817SThierry Reding type: object 35504342817SThierry Reding properties: 35604342817SThierry Reding pins: 35704342817SThierry Reding items: 35804342817SThierry Reding enum: [ audio, audio-hv, cam, csia, csib, csic, csid, csie, 35904342817SThierry Reding csif, dbg, debug-nonao, dmic, dp, dsi, dsib, dsic, 36004342817SThierry Reding dsid, emmc, emmc2, gpio, hdmi, hsic, lvds, mipi-bias, 36104342817SThierry Reding pex-bias, pex-clk1, pex-clk2, pex-cntrl, sdmmc1, 36204342817SThierry Reding sdmmc3, spi, spi-hv, uart, usb0, usb1, usb2, usb3, 36304342817SThierry Reding usb-bias ] 36404342817SThierry Reding 36504342817SThierry RedingadditionalProperties: false 36604342817SThierry Reding 36704342817SThierry Redingdependencies: 368*15be4f7cSRob Herring (Arm) nvidia,suspend-mode: ["nvidia,core-pwr-off-time", "nvidia,cpu-pwr-off-time"] 369*15be4f7cSRob Herring (Arm) nvidia,core-pwr-off-time: ["nvidia,core-pwr-good-time"] 370*15be4f7cSRob Herring (Arm) nvidia,cpu-pwr-off-time: ["nvidia,cpu-pwr-good-time"] 37104342817SThierry Reding 37204342817SThierry Redingexamples: 37304342817SThierry Reding - | 37404342817SThierry Reding #include <dt-bindings/clock/tegra210-car.h> 37504342817SThierry Reding #include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h> 37604342817SThierry Reding #include <dt-bindings/soc/tegra-pmc.h> 37704342817SThierry Reding 37804342817SThierry Reding pmc@7000e400 { 37904342817SThierry Reding compatible = "nvidia,tegra210-pmc"; 38004342817SThierry Reding reg = <0x7000e400 0x400>; 38104342817SThierry Reding core-supply = <®ulator>; 38204342817SThierry Reding clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>; 38304342817SThierry Reding clock-names = "pclk", "clk32k_in"; 38404342817SThierry Reding #clock-cells = <1>; 38504342817SThierry Reding 38604342817SThierry Reding nvidia,invert-interrupt; 38704342817SThierry Reding nvidia,suspend-mode = <0>; 38804342817SThierry Reding nvidia,cpu-pwr-good-time = <0>; 38904342817SThierry Reding nvidia,cpu-pwr-off-time = <0>; 39004342817SThierry Reding nvidia,core-pwr-good-time = <4587 3876>; 39104342817SThierry Reding nvidia,core-pwr-off-time = <39065>; 39204342817SThierry Reding nvidia,core-power-req-active-high; 39304342817SThierry Reding nvidia,sys-clock-req-active-high; 39404342817SThierry Reding 39504342817SThierry Reding pd_core: core-domain { 39604342817SThierry Reding operating-points-v2 = <&core_opp_table>; 39704342817SThierry Reding #power-domain-cells = <0>; 39804342817SThierry Reding }; 39904342817SThierry Reding 40004342817SThierry Reding powergates { 40104342817SThierry Reding pd_audio: aud { 40204342817SThierry Reding clocks = <&tegra_car TEGRA210_CLK_APE>, 40304342817SThierry Reding <&tegra_car TEGRA210_CLK_APB2APE>; 40404342817SThierry Reding resets = <&tegra_car 198>; 40504342817SThierry Reding power-domains = <&pd_core>; 40604342817SThierry Reding #power-domain-cells = <0>; 40704342817SThierry Reding }; 40804342817SThierry Reding 40904342817SThierry Reding pd_xusbss: xusba { 41004342817SThierry Reding clocks = <&tegra_car TEGRA210_CLK_XUSB_SS>; 41104342817SThierry Reding resets = <&tegra_car TEGRA210_CLK_XUSB_SS>; 41204342817SThierry Reding power-domains = <&pd_core>; 41304342817SThierry Reding #power-domain-cells = <0>; 41404342817SThierry Reding }; 41504342817SThierry Reding }; 41604342817SThierry Reding }; 417