1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun%YAML 1.2 3*4882a593Smuzhiyun--- 4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/arm/tegra/nvidia,tegra20-pmc.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: Tegra Power Management Controller (PMC) 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunmaintainers: 10*4882a593Smuzhiyun - Thierry Reding <thierry.reding@gmail.com> 11*4882a593Smuzhiyun - Jonathan Hunter <jonathanh@nvidia.com> 12*4882a593Smuzhiyun 13*4882a593Smuzhiyunproperties: 14*4882a593Smuzhiyun compatible: 15*4882a593Smuzhiyun enum: 16*4882a593Smuzhiyun - nvidia,tegra20-pmc 17*4882a593Smuzhiyun - nvidia,tegra20-pmc 18*4882a593Smuzhiyun - nvidia,tegra30-pmc 19*4882a593Smuzhiyun - nvidia,tegra114-pmc 20*4882a593Smuzhiyun - nvidia,tegra124-pmc 21*4882a593Smuzhiyun - nvidia,tegra210-pmc 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun reg: 24*4882a593Smuzhiyun maxItems: 1 25*4882a593Smuzhiyun description: 26*4882a593Smuzhiyun Offset and length of the register set for the device. 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun clock-names: 29*4882a593Smuzhiyun items: 30*4882a593Smuzhiyun - const: pclk 31*4882a593Smuzhiyun - const: clk32k_in 32*4882a593Smuzhiyun description: 33*4882a593Smuzhiyun Must includes entries pclk and clk32k_in. 34*4882a593Smuzhiyun pclk is the Tegra clock of that name and clk32k_in is 32KHz clock 35*4882a593Smuzhiyun input to Tegra. 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun clocks: 38*4882a593Smuzhiyun maxItems: 2 39*4882a593Smuzhiyun description: 40*4882a593Smuzhiyun Must contain an entry for each entry in clock-names. 41*4882a593Smuzhiyun See ../clocks/clocks-bindings.txt for details. 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun '#clock-cells': 44*4882a593Smuzhiyun const: 1 45*4882a593Smuzhiyun description: 46*4882a593Smuzhiyun Tegra PMC has clk_out_1, clk_out_2, and clk_out_3. 47*4882a593Smuzhiyun PMC also has blink control which allows 32Khz clock output to 48*4882a593Smuzhiyun Tegra blink pad. 49*4882a593Smuzhiyun Consumer of PMC clock should specify the desired clock by having 50*4882a593Smuzhiyun the clock ID in its "clocks" phandle cell with pmc clock provider. 51*4882a593Smuzhiyun See include/dt-bindings/soc/tegra-pmc.h for the list of Tegra PMC 52*4882a593Smuzhiyun clock IDs. 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun '#interrupt-cells': 55*4882a593Smuzhiyun const: 2 56*4882a593Smuzhiyun description: 57*4882a593Smuzhiyun Specifies number of cells needed to encode an interrupt source. 58*4882a593Smuzhiyun The value must be 2. 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun interrupt-controller: true 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun nvidia,invert-interrupt: 63*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 64*4882a593Smuzhiyun description: Inverts the PMU interrupt signal. 65*4882a593Smuzhiyun The PMU is an external Power Management Unit, whose interrupt output 66*4882a593Smuzhiyun signal is fed into the PMC. This signal is optionally inverted, and 67*4882a593Smuzhiyun then fed into the ARM GIC. The PMC is not involved in the detection 68*4882a593Smuzhiyun or handling of this interrupt signal, merely its inversion. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun nvidia,core-power-req-active-high: 71*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 72*4882a593Smuzhiyun description: Core power request active-high. 73*4882a593Smuzhiyun 74*4882a593Smuzhiyun nvidia,sys-clock-req-active-high: 75*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 76*4882a593Smuzhiyun description: System clock request active-high. 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun nvidia,combined-power-req: 79*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 80*4882a593Smuzhiyun description: combined power request for CPU and Core. 81*4882a593Smuzhiyun 82*4882a593Smuzhiyun nvidia,cpu-pwr-good-en: 83*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 84*4882a593Smuzhiyun description: 85*4882a593Smuzhiyun CPU power good signal from external PMIC to PMC is enabled. 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun nvidia,suspend-mode: 88*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 89*4882a593Smuzhiyun enum: [0, 1, 2] 90*4882a593Smuzhiyun description: 91*4882a593Smuzhiyun The suspend mode that the platform should use. 92*4882a593Smuzhiyun Mode 0 is for LP0, CPU + Core voltage off and DRAM in self-refresh 93*4882a593Smuzhiyun Mode 1 is for LP1, CPU voltage off and DRAM in self-refresh 94*4882a593Smuzhiyun Mode 2 is for LP2, CPU voltage off 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun nvidia,cpu-pwr-good-time: 97*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 98*4882a593Smuzhiyun description: CPU power good time in uSec. 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun nvidia,cpu-pwr-off-time: 101*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 102*4882a593Smuzhiyun description: CPU power off time in uSec. 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun nvidia,core-pwr-good-time: 105*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-array 106*4882a593Smuzhiyun description: 107*4882a593Smuzhiyun <Oscillator-stable-time Power-stable-time> 108*4882a593Smuzhiyun Core power good time in uSec. 109*4882a593Smuzhiyun 110*4882a593Smuzhiyun nvidia,core-pwr-off-time: 111*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 112*4882a593Smuzhiyun description: Core power off time in uSec. 113*4882a593Smuzhiyun 114*4882a593Smuzhiyun nvidia,lp0-vec: 115*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32-array 116*4882a593Smuzhiyun description: 117*4882a593Smuzhiyun <start length> Starting address and length of LP0 vector. 118*4882a593Smuzhiyun The LP0 vector contains the warm boot code that is executed 119*4882a593Smuzhiyun by AVP when resuming from the LP0 state. 120*4882a593Smuzhiyun The AVP (Audio-Video Processor) is an ARM7 processor and 121*4882a593Smuzhiyun always being the first boot processor when chip is power on 122*4882a593Smuzhiyun or resume from deep sleep mode. When the system is resumed 123*4882a593Smuzhiyun from the deep sleep mode, the warm boot code will restore 124*4882a593Smuzhiyun some PLLs, clocks and then brings up CPU0 for resuming the 125*4882a593Smuzhiyun system. 126*4882a593Smuzhiyun 127*4882a593Smuzhiyun i2c-thermtrip: 128*4882a593Smuzhiyun type: object 129*4882a593Smuzhiyun description: 130*4882a593Smuzhiyun On Tegra30, Tegra114 and Tegra124 if i2c-thermtrip subnode exists, 131*4882a593Smuzhiyun hardware-triggered thermal reset will be enabled. 132*4882a593Smuzhiyun 133*4882a593Smuzhiyun properties: 134*4882a593Smuzhiyun nvidia,i2c-controller-id: 135*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 136*4882a593Smuzhiyun description: 137*4882a593Smuzhiyun ID of I2C controller to send poweroff command to PMU. 138*4882a593Smuzhiyun Valid values are described in section 9.2.148 139*4882a593Smuzhiyun "APBDEV_PMC_SCRATCH53_0" of the Tegra K1 Technical Reference 140*4882a593Smuzhiyun Manual. 141*4882a593Smuzhiyun 142*4882a593Smuzhiyun nvidia,bus-addr: 143*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 144*4882a593Smuzhiyun description: Bus address of the PMU on the I2C bus. 145*4882a593Smuzhiyun 146*4882a593Smuzhiyun nvidia,reg-addr: 147*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 148*4882a593Smuzhiyun description: PMU I2C register address to issue poweroff command. 149*4882a593Smuzhiyun 150*4882a593Smuzhiyun nvidia,reg-data: 151*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 152*4882a593Smuzhiyun description: Poweroff command to write to PMU. 153*4882a593Smuzhiyun 154*4882a593Smuzhiyun nvidia,pinmux-id: 155*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 156*4882a593Smuzhiyun description: 157*4882a593Smuzhiyun Pinmux used by the hardware when issuing Poweroff command. 158*4882a593Smuzhiyun Defaults to 0. Valid values are described in section 12.5.2 159*4882a593Smuzhiyun "Pinmux Support" of the Tegra4 Technical Reference Manual. 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun required: 162*4882a593Smuzhiyun - nvidia,i2c-controller-id 163*4882a593Smuzhiyun - nvidia,bus-addr 164*4882a593Smuzhiyun - nvidia,reg-addr 165*4882a593Smuzhiyun - nvidia,reg-data 166*4882a593Smuzhiyun 167*4882a593Smuzhiyun additionalProperties: false 168*4882a593Smuzhiyun 169*4882a593Smuzhiyun powergates: 170*4882a593Smuzhiyun type: object 171*4882a593Smuzhiyun description: | 172*4882a593Smuzhiyun This node contains a hierarchy of power domain nodes, which should 173*4882a593Smuzhiyun match the powergates on the Tegra SoC. Each powergate node 174*4882a593Smuzhiyun represents a power-domain on the Tegra SoC that can be power-gated 175*4882a593Smuzhiyun by the Tegra PMC. 176*4882a593Smuzhiyun Hardware blocks belonging to a power domain should contain 177*4882a593Smuzhiyun "power-domains" property that is a phandle pointing to corresponding 178*4882a593Smuzhiyun powergate node. 179*4882a593Smuzhiyun The name of the powergate node should be one of the below. Note that 180*4882a593Smuzhiyun not every powergate is applicable to all Tegra devices and the following 181*4882a593Smuzhiyun list shows which powergates are applicable to which devices. 182*4882a593Smuzhiyun Please refer to Tegra TRM for mode details on the powergate nodes to 183*4882a593Smuzhiyun use for each power-gate block inside Tegra. 184*4882a593Smuzhiyun Name Description Devices Applicable 185*4882a593Smuzhiyun 3d 3D Graphics Tegra20/114/124/210 186*4882a593Smuzhiyun 3d0 3D Graphics 0 Tegra30 187*4882a593Smuzhiyun 3d1 3D Graphics 1 Tegra30 188*4882a593Smuzhiyun aud Audio Tegra210 189*4882a593Smuzhiyun dfd Debug Tegra210 190*4882a593Smuzhiyun dis Display A Tegra114/124/210 191*4882a593Smuzhiyun disb Display B Tegra114/124/210 192*4882a593Smuzhiyun heg 2D Graphics Tegra30/114/124/210 193*4882a593Smuzhiyun iram Internal RAM Tegra124/210 194*4882a593Smuzhiyun mpe MPEG Encode All 195*4882a593Smuzhiyun nvdec NVIDIA Video Decode Engine Tegra210 196*4882a593Smuzhiyun nvjpg NVIDIA JPEG Engine Tegra210 197*4882a593Smuzhiyun pcie PCIE Tegra20/30/124/210 198*4882a593Smuzhiyun sata SATA Tegra30/124/210 199*4882a593Smuzhiyun sor Display interfaces Tegra124/210 200*4882a593Smuzhiyun ve2 Video Encode Engine 2 Tegra210 201*4882a593Smuzhiyun venc Video Encode Engine All 202*4882a593Smuzhiyun vdec Video Decode Engine Tegra20/30/114/124 203*4882a593Smuzhiyun vic Video Imaging Compositor Tegra124/210 204*4882a593Smuzhiyun xusba USB Partition A Tegra114/124/210 205*4882a593Smuzhiyun xusbb USB Partition B Tegra114/124/210 206*4882a593Smuzhiyun xusbc USB Partition C Tegra114/124/210 207*4882a593Smuzhiyun 208*4882a593Smuzhiyun patternProperties: 209*4882a593Smuzhiyun "^[a-z0-9]+$": 210*4882a593Smuzhiyun type: object 211*4882a593Smuzhiyun 212*4882a593Smuzhiyun patternProperties: 213*4882a593Smuzhiyun clocks: 214*4882a593Smuzhiyun minItems: 1 215*4882a593Smuzhiyun maxItems: 8 216*4882a593Smuzhiyun description: 217*4882a593Smuzhiyun Must contain an entry for each clock required by the PMC 218*4882a593Smuzhiyun for controlling a power-gate. 219*4882a593Smuzhiyun See ../clocks/clock-bindings.txt document for more details. 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun resets: 222*4882a593Smuzhiyun minItems: 1 223*4882a593Smuzhiyun maxItems: 8 224*4882a593Smuzhiyun description: 225*4882a593Smuzhiyun Must contain an entry for each reset required by the PMC 226*4882a593Smuzhiyun for controlling a power-gate. 227*4882a593Smuzhiyun See ../reset/reset.txt for more details. 228*4882a593Smuzhiyun 229*4882a593Smuzhiyun '#power-domain-cells': 230*4882a593Smuzhiyun const: 0 231*4882a593Smuzhiyun description: Must be 0. 232*4882a593Smuzhiyun 233*4882a593Smuzhiyun required: 234*4882a593Smuzhiyun - clocks 235*4882a593Smuzhiyun - resets 236*4882a593Smuzhiyun - '#power-domain-cells' 237*4882a593Smuzhiyun 238*4882a593Smuzhiyun additionalProperties: false 239*4882a593Smuzhiyun 240*4882a593SmuzhiyunpatternProperties: 241*4882a593Smuzhiyun "^[a-f0-9]+-[a-f0-9]+$": 242*4882a593Smuzhiyun type: object 243*4882a593Smuzhiyun description: 244*4882a593Smuzhiyun This is a Pad configuration node. On Tegra SOCs a pad is a set of 245*4882a593Smuzhiyun pins which are configured as a group. The pin grouping is a fixed 246*4882a593Smuzhiyun attribute of the hardware. The PMC can be used to set pad power state 247*4882a593Smuzhiyun and signaling voltage. A pad can be either in active or power down mode. 248*4882a593Smuzhiyun The support for power state and signaling voltage configuration varies 249*4882a593Smuzhiyun depending on the pad in question. 3.3V and 1.8V signaling voltages 250*4882a593Smuzhiyun are supported on pins where software controllable signaling voltage 251*4882a593Smuzhiyun switching is available. 252*4882a593Smuzhiyun 253*4882a593Smuzhiyun The pad configuration state nodes are placed under the pmc node and they 254*4882a593Smuzhiyun are referred to by the pinctrl client properties. For more information 255*4882a593Smuzhiyun see Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt. 256*4882a593Smuzhiyun The pad name should be used as the value of the pins property in pin 257*4882a593Smuzhiyun configuration nodes. 258*4882a593Smuzhiyun 259*4882a593Smuzhiyun The following pads are present on Tegra124 and Tegra132 260*4882a593Smuzhiyun audio, bb, cam, comp, csia, csb, cse, dsi, dsib, dsic, dsid, hdmi, hsic, 261*4882a593Smuzhiyun hv, lvds, mipi-bias, nand, pex-bias, pex-clk1, pex-clk2, pex-cntrl, 262*4882a593Smuzhiyun sdmmc1, sdmmc3, sdmmc4, sys_ddc, uart, usb0, usb1, usb2, usb_bias. 263*4882a593Smuzhiyun 264*4882a593Smuzhiyun The following pads are present on Tegra210 265*4882a593Smuzhiyun audio, audio-hv, cam, csia, csib, csic, csid, csie, csif, dbg, 266*4882a593Smuzhiyun debug-nonao, dmic, dp, dsi, dsib, dsic, dsid, emmc, emmc2, gpio, hdmi, 267*4882a593Smuzhiyun hsic, lvds, mipi-bias, pex-bias, pex-clk1, pex-clk2, pex-cntrl, sdmmc1, 268*4882a593Smuzhiyun sdmmc3, spi, spi-hv, uart, usb0, usb1, usb2, usb3, usb-bias. 269*4882a593Smuzhiyun 270*4882a593Smuzhiyun properties: 271*4882a593Smuzhiyun pins: 272*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/string 273*4882a593Smuzhiyun description: Must contain name of the pad(s) to be configured. 274*4882a593Smuzhiyun 275*4882a593Smuzhiyun low-power-enable: 276*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 277*4882a593Smuzhiyun description: Configure the pad into power down mode. 278*4882a593Smuzhiyun 279*4882a593Smuzhiyun low-power-disable: 280*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/flag 281*4882a593Smuzhiyun description: Configure the pad into active mode. 282*4882a593Smuzhiyun 283*4882a593Smuzhiyun power-source: 284*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 285*4882a593Smuzhiyun description: 286*4882a593Smuzhiyun Must contain either TEGRA_IO_PAD_VOLTAGE_1V8 or 287*4882a593Smuzhiyun TEGRA_IO_PAD_VOLTAGE_3V3 to select between signaling voltages. 288*4882a593Smuzhiyun The values are defined in 289*4882a593Smuzhiyun include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h. 290*4882a593Smuzhiyun Power state can be configured on all Tegra124 and Tegra132 291*4882a593Smuzhiyun pads. None of the Tegra124 or Tegra132 pads support signaling 292*4882a593Smuzhiyun voltage switching. 293*4882a593Smuzhiyun All of the listed Tegra210 pads except pex-cntrl support power 294*4882a593Smuzhiyun state configuration. Signaling voltage switching is supported 295*4882a593Smuzhiyun on below Tegra210 pads. 296*4882a593Smuzhiyun audio, audio-hv, cam, dbg, dmic, gpio, pex-cntrl, sdmmc1, 297*4882a593Smuzhiyun sdmmc3, spi, spi-hv, and uart. 298*4882a593Smuzhiyun 299*4882a593Smuzhiyun required: 300*4882a593Smuzhiyun - pins 301*4882a593Smuzhiyun 302*4882a593Smuzhiyun additionalProperties: false 303*4882a593Smuzhiyun 304*4882a593Smuzhiyunrequired: 305*4882a593Smuzhiyun - compatible 306*4882a593Smuzhiyun - reg 307*4882a593Smuzhiyun - clock-names 308*4882a593Smuzhiyun - clocks 309*4882a593Smuzhiyun - '#clock-cells' 310*4882a593Smuzhiyun 311*4882a593SmuzhiyunadditionalProperties: false 312*4882a593Smuzhiyun 313*4882a593Smuzhiyundependencies: 314*4882a593Smuzhiyun "nvidia,suspend-mode": ["nvidia,core-pwr-off-time", "nvidia,cpu-pwr-off-time"] 315*4882a593Smuzhiyun "nvidia,core-pwr-off-time": ["nvidia,core-pwr-good-time"] 316*4882a593Smuzhiyun "nvidia,cpu-pwr-off-time": ["nvidia,cpu-pwr-good-time"] 317*4882a593Smuzhiyun 318*4882a593Smuzhiyunexamples: 319*4882a593Smuzhiyun - | 320*4882a593Smuzhiyun 321*4882a593Smuzhiyun #include <dt-bindings/clock/tegra210-car.h> 322*4882a593Smuzhiyun #include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h> 323*4882a593Smuzhiyun #include <dt-bindings/soc/tegra-pmc.h> 324*4882a593Smuzhiyun 325*4882a593Smuzhiyun tegra_pmc: pmc@7000e400 { 326*4882a593Smuzhiyun compatible = "nvidia,tegra210-pmc"; 327*4882a593Smuzhiyun reg = <0x7000e400 0x400>; 328*4882a593Smuzhiyun clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>; 329*4882a593Smuzhiyun clock-names = "pclk", "clk32k_in"; 330*4882a593Smuzhiyun #clock-cells = <1>; 331*4882a593Smuzhiyun 332*4882a593Smuzhiyun nvidia,invert-interrupt; 333*4882a593Smuzhiyun nvidia,suspend-mode = <0>; 334*4882a593Smuzhiyun nvidia,cpu-pwr-good-time = <0>; 335*4882a593Smuzhiyun nvidia,cpu-pwr-off-time = <0>; 336*4882a593Smuzhiyun nvidia,core-pwr-good-time = <4587 3876>; 337*4882a593Smuzhiyun nvidia,core-pwr-off-time = <39065>; 338*4882a593Smuzhiyun nvidia,core-power-req-active-high; 339*4882a593Smuzhiyun nvidia,sys-clock-req-active-high; 340*4882a593Smuzhiyun 341*4882a593Smuzhiyun powergates { 342*4882a593Smuzhiyun pd_audio: aud { 343*4882a593Smuzhiyun clocks = <&tegra_car TEGRA210_CLK_APE>, 344*4882a593Smuzhiyun <&tegra_car TEGRA210_CLK_APB2APE>; 345*4882a593Smuzhiyun resets = <&tegra_car 198>; 346*4882a593Smuzhiyun #power-domain-cells = <0>; 347*4882a593Smuzhiyun }; 348*4882a593Smuzhiyun 349*4882a593Smuzhiyun pd_xusbss: xusba { 350*4882a593Smuzhiyun clocks = <&tegra_car TEGRA210_CLK_XUSB_SS>; 351*4882a593Smuzhiyun resets = <&tegra_car TEGRA210_CLK_XUSB_SS>; 352*4882a593Smuzhiyun #power-domain-cells = <0>; 353*4882a593Smuzhiyun }; 354*4882a593Smuzhiyun }; 355*4882a593Smuzhiyun }; 356