1*c66ec88fSEmmanuel VadotRenesas RZ/N1 SoC Pinctrl node description. 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotPin controller node 4*c66ec88fSEmmanuel Vadot------------------- 5*c66ec88fSEmmanuel VadotRequired properties: 6*c66ec88fSEmmanuel Vadot- compatible: SoC-specific compatible string "renesas,<soc-specific>-pinctrl" 7*c66ec88fSEmmanuel Vadot followed by "renesas,rzn1-pinctrl" as fallback. The SoC-specific compatible 8*c66ec88fSEmmanuel Vadot strings must be one of: 9*c66ec88fSEmmanuel Vadot "renesas,r9a06g032-pinctrl" for RZ/N1D 10*c66ec88fSEmmanuel Vadot "renesas,r9a06g033-pinctrl" for RZ/N1S 11*c66ec88fSEmmanuel Vadot- reg: Address base and length of the memory area where the pin controller 12*c66ec88fSEmmanuel Vadot hardware is mapped to. 13*c66ec88fSEmmanuel Vadot- clocks: phandle for the clock, see the description of clock-names below. 14*c66ec88fSEmmanuel Vadot- clock-names: Contains the name of the clock: 15*c66ec88fSEmmanuel Vadot "bus", the bus clock, sometimes described as pclk, for register accesses. 16*c66ec88fSEmmanuel Vadot 17*c66ec88fSEmmanuel VadotExample: 18*c66ec88fSEmmanuel Vadot pinctrl: pin-controller@40067000 { 19*c66ec88fSEmmanuel Vadot compatible = "renesas,r9a06g032-pinctrl", "renesas,rzn1-pinctrl"; 20*c66ec88fSEmmanuel Vadot reg = <0x40067000 0x1000>, <0x51000000 0x480>; 21*c66ec88fSEmmanuel Vadot clocks = <&sysctrl R9A06G032_HCLK_PINCONFIG>; 22*c66ec88fSEmmanuel Vadot clock-names = "bus"; 23*c66ec88fSEmmanuel Vadot }; 24*c66ec88fSEmmanuel Vadot 25*c66ec88fSEmmanuel VadotSub-nodes 26*c66ec88fSEmmanuel Vadot--------- 27*c66ec88fSEmmanuel Vadot 28*c66ec88fSEmmanuel VadotThe child nodes of the pin controller node describe a pin multiplexing 29*c66ec88fSEmmanuel Vadotfunction. 30*c66ec88fSEmmanuel Vadot 31*c66ec88fSEmmanuel Vadot- Pin multiplexing sub-nodes: 32*c66ec88fSEmmanuel Vadot A pin multiplexing sub-node describes how to configure a set of 33*c66ec88fSEmmanuel Vadot (or a single) pin in some desired alternate function mode. 34*c66ec88fSEmmanuel Vadot A single sub-node may define several pin configurations. 35*c66ec88fSEmmanuel Vadot Please refer to pinctrl-bindings.txt to get to know more on generic 36*c66ec88fSEmmanuel Vadot pin properties usage. 37*c66ec88fSEmmanuel Vadot 38*c66ec88fSEmmanuel Vadot The allowed generic formats for a pin multiplexing sub-node are the 39*c66ec88fSEmmanuel Vadot following ones: 40*c66ec88fSEmmanuel Vadot 41*c66ec88fSEmmanuel Vadot node-1 { 42*c66ec88fSEmmanuel Vadot pinmux = <PIN_ID_AND_MUX>, <PIN_ID_AND_MUX>, ... ; 43*c66ec88fSEmmanuel Vadot GENERIC_PINCONFIG; 44*c66ec88fSEmmanuel Vadot }; 45*c66ec88fSEmmanuel Vadot 46*c66ec88fSEmmanuel Vadot node-2 { 47*c66ec88fSEmmanuel Vadot sub-node-1 { 48*c66ec88fSEmmanuel Vadot pinmux = <PIN_ID_AND_MUX>, <PIN_ID_AND_MUX>, ... ; 49*c66ec88fSEmmanuel Vadot GENERIC_PINCONFIG; 50*c66ec88fSEmmanuel Vadot }; 51*c66ec88fSEmmanuel Vadot 52*c66ec88fSEmmanuel Vadot sub-node-2 { 53*c66ec88fSEmmanuel Vadot pinmux = <PIN_ID_AND_MUX>, <PIN_ID_AND_MUX>, ... ; 54*c66ec88fSEmmanuel Vadot GENERIC_PINCONFIG; 55*c66ec88fSEmmanuel Vadot }; 56*c66ec88fSEmmanuel Vadot 57*c66ec88fSEmmanuel Vadot ... 58*c66ec88fSEmmanuel Vadot 59*c66ec88fSEmmanuel Vadot sub-node-n { 60*c66ec88fSEmmanuel Vadot pinmux = <PIN_ID_AND_MUX>, <PIN_ID_AND_MUX>, ... ; 61*c66ec88fSEmmanuel Vadot GENERIC_PINCONFIG; 62*c66ec88fSEmmanuel Vadot }; 63*c66ec88fSEmmanuel Vadot }; 64*c66ec88fSEmmanuel Vadot 65*c66ec88fSEmmanuel Vadot node-3 { 66*c66ec88fSEmmanuel Vadot pinmux = <PIN_ID_AND_MUX>, <PIN_ID_AND_MUX>, ... ; 67*c66ec88fSEmmanuel Vadot GENERIC_PINCONFIG; 68*c66ec88fSEmmanuel Vadot 69*c66ec88fSEmmanuel Vadot sub-node-1 { 70*c66ec88fSEmmanuel Vadot pinmux = <PIN_ID_AND_MUX>, <PIN_ID_AND_MUX>, ... ; 71*c66ec88fSEmmanuel Vadot GENERIC_PINCONFIG; 72*c66ec88fSEmmanuel Vadot }; 73*c66ec88fSEmmanuel Vadot 74*c66ec88fSEmmanuel Vadot ... 75*c66ec88fSEmmanuel Vadot 76*c66ec88fSEmmanuel Vadot sub-node-n { 77*c66ec88fSEmmanuel Vadot pinmux = <PIN_ID_AND_MUX>, <PIN_ID_AND_MUX>, ... ; 78*c66ec88fSEmmanuel Vadot GENERIC_PINCONFIG; 79*c66ec88fSEmmanuel Vadot }; 80*c66ec88fSEmmanuel Vadot }; 81*c66ec88fSEmmanuel Vadot 82*c66ec88fSEmmanuel Vadot Use the latter two formats when pins part of the same logical group need to 83*c66ec88fSEmmanuel Vadot have different generic pin configuration flags applied. Note that the generic 84*c66ec88fSEmmanuel Vadot pinconfig in node-3 does not apply to the sub-nodes. 85*c66ec88fSEmmanuel Vadot 86*c66ec88fSEmmanuel Vadot Client sub-nodes shall refer to pin multiplexing sub-nodes using the phandle 87*c66ec88fSEmmanuel Vadot of the most external one. 88*c66ec88fSEmmanuel Vadot 89*c66ec88fSEmmanuel Vadot Eg. 90*c66ec88fSEmmanuel Vadot 91*c66ec88fSEmmanuel Vadot client-1 { 92*c66ec88fSEmmanuel Vadot ... 93*c66ec88fSEmmanuel Vadot pinctrl-0 = <&node-1>; 94*c66ec88fSEmmanuel Vadot ... 95*c66ec88fSEmmanuel Vadot }; 96*c66ec88fSEmmanuel Vadot 97*c66ec88fSEmmanuel Vadot client-2 { 98*c66ec88fSEmmanuel Vadot ... 99*c66ec88fSEmmanuel Vadot pinctrl-0 = <&node-2>; 100*c66ec88fSEmmanuel Vadot ... 101*c66ec88fSEmmanuel Vadot }; 102*c66ec88fSEmmanuel Vadot 103*c66ec88fSEmmanuel Vadot Required properties: 104*c66ec88fSEmmanuel Vadot - pinmux: 105*c66ec88fSEmmanuel Vadot integer array representing pin number and pin multiplexing configuration. 106*c66ec88fSEmmanuel Vadot When a pin has to be configured in alternate function mode, use this 107*c66ec88fSEmmanuel Vadot property to identify the pin by its global index, and provide its 108*c66ec88fSEmmanuel Vadot alternate function configuration number along with it. 109*c66ec88fSEmmanuel Vadot When multiple pins are required to be configured as part of the same 110*c66ec88fSEmmanuel Vadot alternate function they shall be specified as members of the same 111*c66ec88fSEmmanuel Vadot argument list of a single "pinmux" property. 112*c66ec88fSEmmanuel Vadot Integers values in the "pinmux" argument list are assembled as: 113*c66ec88fSEmmanuel Vadot (PIN | MUX_FUNC << 8) 114*c66ec88fSEmmanuel Vadot where PIN directly corresponds to the pl_gpio pin number and MUX_FUNC is 115*c66ec88fSEmmanuel Vadot one of the alternate function identifiers defined in: 116*c66ec88fSEmmanuel Vadot <include/dt-bindings/pinctrl/rzn1-pinctrl.h> 117*c66ec88fSEmmanuel Vadot These identifiers collapse the IO Multiplex Configuration Level 1 and 118*c66ec88fSEmmanuel Vadot Level 2 numbers that are detailed in the hardware reference manual into a 119*c66ec88fSEmmanuel Vadot single number. The identifiers for Level 2 are simply offset by 10. 120*c66ec88fSEmmanuel Vadot Additional identifiers are provided to specify the MDIO source peripheral. 121*c66ec88fSEmmanuel Vadot 122*c66ec88fSEmmanuel Vadot Optional generic pinconf properties: 123*c66ec88fSEmmanuel Vadot - bias-disable - disable any pin bias 124*c66ec88fSEmmanuel Vadot - bias-pull-up - pull up the pin with 50 KOhm 125*c66ec88fSEmmanuel Vadot - bias-pull-down - pull down the pin with 50 KOhm 126*c66ec88fSEmmanuel Vadot - bias-high-impedance - high impedance mode 127*c66ec88fSEmmanuel Vadot - drive-strength - sink or source at most 4, 6, 8 or 12 mA 128*c66ec88fSEmmanuel Vadot 129*c66ec88fSEmmanuel Vadot Example: 130*c66ec88fSEmmanuel Vadot A serial communication interface with a TX output pin and an RX input pin. 131*c66ec88fSEmmanuel Vadot 132*c66ec88fSEmmanuel Vadot &pinctrl { 133*c66ec88fSEmmanuel Vadot pins_uart0: pins_uart0 { 134*c66ec88fSEmmanuel Vadot pinmux = < 135*c66ec88fSEmmanuel Vadot RZN1_PINMUX(103, RZN1_FUNC_UART0_I) /* UART0_TXD */ 136*c66ec88fSEmmanuel Vadot RZN1_PINMUX(104, RZN1_FUNC_UART0_I) /* UART0_RXD */ 137*c66ec88fSEmmanuel Vadot >; 138*c66ec88fSEmmanuel Vadot }; 139*c66ec88fSEmmanuel Vadot }; 140*c66ec88fSEmmanuel Vadot 141*c66ec88fSEmmanuel Vadot Example 2: 142*c66ec88fSEmmanuel Vadot Here we set the pull up on the RXD pin of the UART. 143*c66ec88fSEmmanuel Vadot 144*c66ec88fSEmmanuel Vadot &pinctrl { 145*c66ec88fSEmmanuel Vadot pins_uart0: pins_uart0 { 146*c66ec88fSEmmanuel Vadot pinmux = <RZN1_PINMUX(103, RZN1_FUNC_UART0_I)>; /* TXD */ 147*c66ec88fSEmmanuel Vadot 148*c66ec88fSEmmanuel Vadot pins_uart6_rx { 149*c66ec88fSEmmanuel Vadot pinmux = <RZN1_PINMUX(104, RZN1_FUNC_UART0_I)>; /* RXD */ 150*c66ec88fSEmmanuel Vadot bias-pull-up; 151*c66ec88fSEmmanuel Vadot }; 152*c66ec88fSEmmanuel Vadot }; 153*c66ec88fSEmmanuel Vadot }; 154