1*c66ec88fSEmmanuel VadotST Ericsson Nomadik pinmux controller 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotRequired properties: 4*c66ec88fSEmmanuel Vadot- compatible: "stericsson,db8500-pinctrl", "stericsson,db8540-pinctrl", 5*c66ec88fSEmmanuel Vadot "stericsson,stn8815-pinctrl" 6*c66ec88fSEmmanuel Vadot- nomadik-gpio-chips: array of phandles to the corresponding GPIO chips 7*c66ec88fSEmmanuel Vadot (these have the register ranges used by the pin controller). 8*c66ec88fSEmmanuel Vadot- prcm: phandle to the PRCMU managing the back end of this pin controller 9*c66ec88fSEmmanuel Vadot 10*c66ec88fSEmmanuel VadotPlease refer to pinctrl-bindings.txt in this directory for details of the 11*c66ec88fSEmmanuel Vadotcommon pinctrl bindings used by client devices, including the meaning of the 12*c66ec88fSEmmanuel Vadotphrase "pin configuration node". 13*c66ec88fSEmmanuel Vadot 14*c66ec88fSEmmanuel VadotST Ericsson's pin configuration nodes act as a container for an arbitrary number of 15*c66ec88fSEmmanuel Vadotsubnodes. Each of these subnodes represents some desired configuration for a 16*c66ec88fSEmmanuel Vadotpin, a group, or a list of pins or groups. This configuration can include the 17*c66ec88fSEmmanuel Vadotmux function to select on those pin(s)/group(s), and various pin configuration 18*c66ec88fSEmmanuel Vadotparameters, such as input, output, pull up, pull down... 19*c66ec88fSEmmanuel Vadot 20*c66ec88fSEmmanuel VadotThe name of each subnode is not important; all subnodes should be enumerated 21*c66ec88fSEmmanuel Vadotand processed purely based on their content. The subnodes use the generic 22*c66ec88fSEmmanuel Vadotpin multiplexing node layout from the standard pin control bindings 23*c66ec88fSEmmanuel Vadot(see pinctrl-bindings.txt): 24*c66ec88fSEmmanuel Vadot 25*c66ec88fSEmmanuel VadotRequired pin multiplexing subnode properties: 26*c66ec88fSEmmanuel Vadot- function: A string containing the name of the function to mux to the 27*c66ec88fSEmmanuel Vadot pin or group. 28*c66ec88fSEmmanuel Vadot- groups : An array of strings. Each string contains the name of a pin 29*c66ec88fSEmmanuel Vadot group that will be combined with the function to form a multiplexing 30*c66ec88fSEmmanuel Vadot set-up. 31*c66ec88fSEmmanuel Vadot 32*c66ec88fSEmmanuel VadotRequired pin configuration subnode properties: 33*c66ec88fSEmmanuel Vadot- pins: A string array describing the pins affected by the configuration 34*c66ec88fSEmmanuel Vadot in the node. 35*c66ec88fSEmmanuel Vadot- ste,config: Handle of pin configuration node 36*c66ec88fSEmmanuel Vadot (e.g. ste,config = <&slpm_in_wkup_pdis>) 37*c66ec88fSEmmanuel Vadot 38*c66ec88fSEmmanuel Vadot- ste,input : <0/1/2> 39*c66ec88fSEmmanuel Vadot 0: input with no pull 40*c66ec88fSEmmanuel Vadot 1: input with pull up, 41*c66ec88fSEmmanuel Vadot 2: input with pull down, 42*c66ec88fSEmmanuel Vadot 43*c66ec88fSEmmanuel Vadot- ste,output: <0/1/2> 44*c66ec88fSEmmanuel Vadot 0: output low, 45*c66ec88fSEmmanuel Vadot 1: output high, 46*c66ec88fSEmmanuel Vadot 2: output (value is not specified). 47*c66ec88fSEmmanuel Vadot 48*c66ec88fSEmmanuel Vadot- ste,sleep: <0/1> 49*c66ec88fSEmmanuel Vadot 0: sleep mode disable, 50*c66ec88fSEmmanuel Vadot 1: sleep mode enable. 51*c66ec88fSEmmanuel Vadot 52*c66ec88fSEmmanuel Vadot- ste,sleep-input: <0/1/2/3> 53*c66ec88fSEmmanuel Vadot 0: sleep input with no pull, 54*c66ec88fSEmmanuel Vadot 1: sleep input with pull up, 55*c66ec88fSEmmanuel Vadot 2: sleep input with pull down. 56*c66ec88fSEmmanuel Vadot 3: sleep input and keep last input configuration (no pull, pull up or pull down). 57*c66ec88fSEmmanuel Vadot 58*c66ec88fSEmmanuel Vadot- ste,sleep-output: <0/1/2> 59*c66ec88fSEmmanuel Vadot 0: sleep output low, 60*c66ec88fSEmmanuel Vadot 1: sleep output high, 61*c66ec88fSEmmanuel Vadot 2: sleep output (value is not specified). 62*c66ec88fSEmmanuel Vadot 63*c66ec88fSEmmanuel Vadot- ste,sleep-gpio: <0/1> 64*c66ec88fSEmmanuel Vadot 0: disable sleep gpio mode, 65*c66ec88fSEmmanuel Vadot 1: enable sleep gpio mode. 66*c66ec88fSEmmanuel Vadot 67*c66ec88fSEmmanuel Vadot- ste,sleep-wakeup: <0/1> 68*c66ec88fSEmmanuel Vadot 0: wake-up detection enabled, 69*c66ec88fSEmmanuel Vadot 1: wake-up detection disabled. 70*c66ec88fSEmmanuel Vadot 71*c66ec88fSEmmanuel Vadot- ste,sleep-pull-disable: <0/1> 72*c66ec88fSEmmanuel Vadot 0: GPIO pull-up or pull-down resistor is enabled, when pin is an input, 73*c66ec88fSEmmanuel Vadot 1: GPIO pull-up and pull-down resistor are disabled. 74*c66ec88fSEmmanuel Vadot 75*c66ec88fSEmmanuel VadotExample board file extract: 76*c66ec88fSEmmanuel Vadot 77*c66ec88fSEmmanuel Vadot pinctrl@80157000 { 78*c66ec88fSEmmanuel Vadot compatible = "stericsson,db8500-pinctrl"; 79*c66ec88fSEmmanuel Vadot nomadik-gpio-chips = <&gpio0>, <&gpio1>, <&gpio2>, <&gpio3>; 80*c66ec88fSEmmanuel Vadot prcm = <&prcmu>; 81*c66ec88fSEmmanuel Vadot 82*c66ec88fSEmmanuel Vadot pinctrl-names = "default"; 83*c66ec88fSEmmanuel Vadot 84*c66ec88fSEmmanuel Vadot slpm_in_wkup_pdis: slpm_in_wkup_pdis { 85*c66ec88fSEmmanuel Vadot ste,sleep = <1>; 86*c66ec88fSEmmanuel Vadot ste,sleep-input = <3>; 87*c66ec88fSEmmanuel Vadot ste,sleep-wakeup = <1>; 88*c66ec88fSEmmanuel Vadot ste,sleep-pull-disable = <0>; 89*c66ec88fSEmmanuel Vadot }; 90*c66ec88fSEmmanuel Vadot 91*c66ec88fSEmmanuel Vadot slpm_out_hi_wkup_pdis: slpm_out_hi_wkup_pdis { 92*c66ec88fSEmmanuel Vadot ste,sleep = <1>; 93*c66ec88fSEmmanuel Vadot ste,sleep-output = <1>; 94*c66ec88fSEmmanuel Vadot ste,sleep-wakeup = <1>; 95*c66ec88fSEmmanuel Vadot ste,sleep-pull-disable = <0>; 96*c66ec88fSEmmanuel Vadot }; 97*c66ec88fSEmmanuel Vadot 98*c66ec88fSEmmanuel Vadot slpm_out_wkup_pdis: slpm_out_wkup_pdis { 99*c66ec88fSEmmanuel Vadot ste,sleep = <1>; 100*c66ec88fSEmmanuel Vadot ste,sleep-output = <2>; 101*c66ec88fSEmmanuel Vadot ste,sleep-wakeup = <1>; 102*c66ec88fSEmmanuel Vadot ste,sleep-pull-disable = <0>; 103*c66ec88fSEmmanuel Vadot }; 104*c66ec88fSEmmanuel Vadot 105*c66ec88fSEmmanuel Vadot uart0 { 106*c66ec88fSEmmanuel Vadot uart0_default_mux: uart0_mux { 107*c66ec88fSEmmanuel Vadot u0_default_mux { 108*c66ec88fSEmmanuel Vadot function = "u0"; 109*c66ec88fSEmmanuel Vadot pins = "u0_a_1"; 110*c66ec88fSEmmanuel Vadot }; 111*c66ec88fSEmmanuel Vadot }; 112*c66ec88fSEmmanuel Vadot uart0_default_mode: uart0_default { 113*c66ec88fSEmmanuel Vadot uart0_default_cfg1 { 114*c66ec88fSEmmanuel Vadot pins = "GPIO0", "GPIO2"; 115*c66ec88fSEmmanuel Vadot ste,input = <1>; 116*c66ec88fSEmmanuel Vadot }; 117*c66ec88fSEmmanuel Vadot 118*c66ec88fSEmmanuel Vadot uart0_default_cfg2 { 119*c66ec88fSEmmanuel Vadot pins = "GPIO1", "GPIO3"; 120*c66ec88fSEmmanuel Vadot ste,output = <1>; 121*c66ec88fSEmmanuel Vadot }; 122*c66ec88fSEmmanuel Vadot }; 123*c66ec88fSEmmanuel Vadot uart0_sleep_mode: uart0_sleep { 124*c66ec88fSEmmanuel Vadot uart0_sleep_cfg1 { 125*c66ec88fSEmmanuel Vadot pins = "GPIO0", "GPIO2"; 126*c66ec88fSEmmanuel Vadot ste,config = <&slpm_in_wkup_pdis>; 127*c66ec88fSEmmanuel Vadot }; 128*c66ec88fSEmmanuel Vadot uart0_sleep_cfg2 { 129*c66ec88fSEmmanuel Vadot pins = "GPIO1"; 130*c66ec88fSEmmanuel Vadot ste,config = <&slpm_out_hi_wkup_pdis>; 131*c66ec88fSEmmanuel Vadot }; 132*c66ec88fSEmmanuel Vadot uart0_sleep_cfg3 { 133*c66ec88fSEmmanuel Vadot pins = "GPIO3"; 134*c66ec88fSEmmanuel Vadot ste,config = <&slpm_out_wkup_pdis>; 135*c66ec88fSEmmanuel Vadot }; 136*c66ec88fSEmmanuel Vadot }; 137*c66ec88fSEmmanuel Vadot }; 138*c66ec88fSEmmanuel Vadot }; 139*c66ec88fSEmmanuel Vadot 140*c66ec88fSEmmanuel Vadot uart@80120000 { 141*c66ec88fSEmmanuel Vadot compatible = "arm,pl011", "arm,primecell"; 142*c66ec88fSEmmanuel Vadot reg = <0x80120000 0x1000>; 143*c66ec88fSEmmanuel Vadot interrupts = <0 11 0x4>; 144*c66ec88fSEmmanuel Vadot 145*c66ec88fSEmmanuel Vadot pinctrl-names = "default","sleep"; 146*c66ec88fSEmmanuel Vadot pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>; 147*c66ec88fSEmmanuel Vadot pinctrl-1 = <&uart0_sleep_mode>; 148*c66ec88fSEmmanuel Vadot }; 149