xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pinctrl/nvidia,tegra20-pinmux.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunNVIDIA Tegra20 pinmux controller
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun- compatible: "nvidia,tegra20-pinmux"
5*4882a593Smuzhiyun- reg: Should contain the register physical address and length for each of
6*4882a593Smuzhiyun  the tri-state, mux, pull-up/down, and pad control register sets.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunPlease refer to pinctrl-bindings.txt in this directory for details of the
9*4882a593Smuzhiyuncommon pinctrl bindings used by client devices, including the meaning of the
10*4882a593Smuzhiyunphrase "pin configuration node".
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunTegra's pin configuration nodes act as a container for an arbitrary number of
13*4882a593Smuzhiyunsubnodes. Each of these subnodes represents some desired configuration for a
14*4882a593Smuzhiyunpin, a group, or a list of pins or groups. This configuration can include the
15*4882a593Smuzhiyunmux function to select on those pin(s)/group(s), and various pin configuration
16*4882a593Smuzhiyunparameters, such as pull-up, tristate, drive strength, etc.
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunThe name of each subnode is not important; all subnodes should be enumerated
19*4882a593Smuzhiyunand processed purely based on their content.
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunEach subnode only affects those parameters that are explicitly listed. In
22*4882a593Smuzhiyunother words, a subnode that lists a mux function but no pin configuration
23*4882a593Smuzhiyunparameters implies no information about any pin configuration parameters.
24*4882a593SmuzhiyunSimilarly, a pin subnode that describes a pullup parameter implies no
25*4882a593Smuzhiyuninformation about e.g. the mux function or tristate parameter. For this
26*4882a593Smuzhiyunreason, even seemingly boolean values are actually tristates in this binding:
27*4882a593Smuzhiyununspecified, off, or on. Unspecified is represented as an absent property,
28*4882a593Smuzhiyunand off/on are represented as integer values 0 and 1.
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunRequired subnode-properties:
31*4882a593Smuzhiyun- nvidia,pins : An array of strings. Each string contains the name of a pin or
32*4882a593Smuzhiyun    group. Valid values for these names are listed below.
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunOptional subnode-properties:
35*4882a593Smuzhiyun- nvidia,function: A string containing the name of the function to mux to the
36*4882a593Smuzhiyun  pin or group. Valid values for function names are listed below. See the Tegra
37*4882a593Smuzhiyun  TRM to determine which are valid for each pin or group.
38*4882a593Smuzhiyun- nvidia,pull: Integer, representing the pull-down/up to apply to the pin.
39*4882a593Smuzhiyun    0: none, 1: down, 2: up.
40*4882a593Smuzhiyun- nvidia,tristate: Integer.
41*4882a593Smuzhiyun    0: drive, 1: tristate.
42*4882a593Smuzhiyun- nvidia,high-speed-mode: Integer. Enable high speed mode the pins.
43*4882a593Smuzhiyun    0: no, 1: yes.
44*4882a593Smuzhiyun- nvidia,schmitt: Integer. Enables Schmitt Trigger on the input.
45*4882a593Smuzhiyun    0: no, 1: yes.
46*4882a593Smuzhiyun- nvidia,low-power-mode: Integer. Valid values 0-3. 0 is least power, 3 is
47*4882a593Smuzhiyun    most power. Controls the drive power or current. See "Low Power Mode"
48*4882a593Smuzhiyun    or "LPMD1" and "LPMD0" in the Tegra TRM.
49*4882a593Smuzhiyun- nvidia,pull-down-strength: Integer. Controls drive strength. 0 is weakest.
50*4882a593Smuzhiyun    The range of valid values depends on the pingroup. See "CAL_DRVDN" in the
51*4882a593Smuzhiyun    Tegra TRM.
52*4882a593Smuzhiyun- nvidia,pull-up-strength: Integer. Controls drive strength. 0 is weakest.
53*4882a593Smuzhiyun    The range of valid values depends on the pingroup. See "CAL_DRVUP" in the
54*4882a593Smuzhiyun    Tegra TRM.
55*4882a593Smuzhiyun- nvidia,slew-rate-rising: Integer. Controls rising signal slew rate. 0 is
56*4882a593Smuzhiyun    fastest. The range of valid values depends on the pingroup. See
57*4882a593Smuzhiyun    "DRVDN_SLWR" in the Tegra TRM.
58*4882a593Smuzhiyun- nvidia,slew-rate-falling: Integer. Controls falling signal slew rate. 0 is
59*4882a593Smuzhiyun    fastest. The range of valid values depends on the pingroup. See
60*4882a593Smuzhiyun    "DRVUP_SLWF" in the Tegra TRM.
61*4882a593Smuzhiyun
62*4882a593SmuzhiyunNote that many of these properties are only valid for certain specific pins
63*4882a593Smuzhiyunor groups. See the Tegra TRM and various pinmux spreadsheets for complete
64*4882a593Smuzhiyundetails regarding which groups support which functionality. The Linux pinctrl
65*4882a593Smuzhiyundriver may also be a useful reference, since it consolidates, disambiguates,
66*4882a593Smuzhiyunand corrects data from all those sources.
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunValid values for pin and group names are:
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun  mux groups:
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun    These all support nvidia,function, nvidia,tristate, and many support
73*4882a593Smuzhiyun    nvidia,pull.
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun    ata, atb, atc, atd, ate, cdev1, cdev2, crtp, csus, dap1, dap2, dap3, dap4,
76*4882a593Smuzhiyun    ddc, dta, dtb, dtc, dtd, dte, dtf, gma, gmb, gmc, gmd, gme, gpu, gpu7,
77*4882a593Smuzhiyun    gpv, hdint, i2cp, irrx, irtx, kbca, kbcb, kbcc, kbcd, kbce, kbcf, lcsn,
78*4882a593Smuzhiyun    ld0, ld1, ld2, ld3, ld4, ld5, ld6, ld7, ld8, ld9, ld10, ld11, ld12, ld13,
79*4882a593Smuzhiyun    ld14, ld15, ld16, ld17, ldc, ldi, lhp0, lhp1, lhp2, lhs, lm0, lm1, lpp,
80*4882a593Smuzhiyun    lpw0, lpw1, lpw2, lsc0, lsc1, lsck, lsda, lsdi, lspi, lvp0, lvp1, lvs,
81*4882a593Smuzhiyun    owc, pmc, pta, rm, sdb, sdc, sdd, sdio1, slxa, slxc, slxd, slxk, spdi,
82*4882a593Smuzhiyun    spdo, spia, spib, spic, spid, spie, spif, spig, spih, uaa, uab, uac, uad,
83*4882a593Smuzhiyun    uca, ucb, uda.
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun  tristate groups:
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun    These only support nvidia,pull.
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun    ck32, ddrc, pmca, pmcb, pmcc, pmcd, pmce, xm2c, xm2d, ls, lc, ld17_0,
90*4882a593Smuzhiyun    ld19_18, ld21_20, ld23_22.
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun  drive groups:
93*4882a593Smuzhiyun
94*4882a593Smuzhiyun    With some exceptions, these support nvidia,high-speed-mode,
95*4882a593Smuzhiyun    nvidia,schmitt, nvidia,low-power-mode, nvidia,pull-down-strength,
96*4882a593Smuzhiyun    nvidia,pull-up-strength, nvidia,slew-rate-rising, nvidia,slew-rate-falling.
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun    drive_ao1, drive_ao2, drive_at1, drive_at2, drive_cdev1, drive_cdev2,
99*4882a593Smuzhiyun    drive_csus, drive_dap1, drive_dap2, drive_dap3, drive_dap4, drive_dbg,
100*4882a593Smuzhiyun    drive_lcd1, drive_lcd2, drive_sdmmc2, drive_sdmmc3, drive_spi, drive_uaa,
101*4882a593Smuzhiyun    drive_uab, drive_uart2, drive_uart3, drive_vi1, drive_vi2, drive_xm2a,
102*4882a593Smuzhiyun    drive_xm2c, drive_xm2d, drive_xm2clk, drive_sdio1, drive_crt, drive_ddc,
103*4882a593Smuzhiyun    drive_gma, drive_gmb, drive_gmc, drive_gmd, drive_gme, drive_owr,
104*4882a593Smuzhiyun    drive_uda.
105*4882a593Smuzhiyun
106*4882a593SmuzhiyunValid values for nvidia,functions are:
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun  ahb_clk, apb_clk, audio_sync, crt, dap1, dap2, dap3, dap4, dap5,
109*4882a593Smuzhiyun  displaya, displayb, emc_test0_dll, emc_test1_dll, gmi, gmi_int,
110*4882a593Smuzhiyun  hdmi, i2cp, i2c1, i2c2, i2c3, ide, irda, kbc, mio, mipi_hs, nand,
111*4882a593Smuzhiyun  osc, owr, pcie, plla_out, pllc_out1, pllm_out1, pllp_out2, pllp_out3,
112*4882a593Smuzhiyun  pllp_out4, pwm, pwr_intr, pwr_on, rsvd1, rsvd2, rsvd3, rsvd4, rtck,
113*4882a593Smuzhiyun  sdio1, sdio2, sdio3, sdio4, sflash, spdif, spi1, spi2, spi2_alt,
114*4882a593Smuzhiyun  spi3, spi4, trace, twc, uarta, uartb, uartc, uartd, uarte, ulpi,
115*4882a593Smuzhiyun  vi, vi_sensor_clk, xio
116*4882a593Smuzhiyun
117*4882a593SmuzhiyunExample:
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun	pinctrl@70000000 {
120*4882a593Smuzhiyun		compatible = "nvidia,tegra20-pinmux";
121*4882a593Smuzhiyun		reg = < 0x70000014 0x10    /* Tri-state registers */
122*4882a593Smuzhiyun			0x70000080 0x20    /* Mux registers */
123*4882a593Smuzhiyun			0x700000a0 0x14    /* Pull-up/down registers */
124*4882a593Smuzhiyun			0x70000868 0xa8 >; /* Pad control registers */
125*4882a593Smuzhiyun	};
126*4882a593Smuzhiyun
127*4882a593SmuzhiyunExample board file extract:
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun	pinctrl@70000000 {
130*4882a593Smuzhiyun		sdio4_default: sdio4_default {
131*4882a593Smuzhiyun			atb {
132*4882a593Smuzhiyun				nvidia,pins = "atb", "gma", "gme";
133*4882a593Smuzhiyun				nvidia,function = "sdio4";
134*4882a593Smuzhiyun				nvidia,pull = <0>;
135*4882a593Smuzhiyun				nvidia,tristate = <0>;
136*4882a593Smuzhiyun			};
137*4882a593Smuzhiyun		};
138*4882a593Smuzhiyun	};
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun	sdhci@c8000600 {
141*4882a593Smuzhiyun		pinctrl-names = "default";
142*4882a593Smuzhiyun		pinctrl-0 = <&sdio4_default>;
143*4882a593Smuzhiyun	};
144