1e16dbf60SMarkus Pargmann* Freescale IMX27 IOMUX Controller 2e16dbf60SMarkus Pargmann 3e16dbf60SMarkus PargmannRequired properties: 4e16dbf60SMarkus Pargmann- compatible: "fsl,imx27-iomuxc" 5e16dbf60SMarkus Pargmann 6e16dbf60SMarkus PargmannThe iomuxc driver node should define subnodes containing of pinctrl configuration subnodes. 7e16dbf60SMarkus Pargmann 8e16dbf60SMarkus PargmannRequired properties for pin configuration node: 9e16dbf60SMarkus Pargmann- fsl,pins: three integers array, represents a group of pins mux and config 10e16dbf60SMarkus Pargmann setting. The format is fsl,pins = <PIN MUX_ID CONFIG>. 11e16dbf60SMarkus Pargmann 12e16dbf60SMarkus Pargmann PIN is an integer between 0 and 0xbf. imx27 has 6 ports with 32 configurable 13e16dbf60SMarkus Pargmann configurable pins each. PIN is PORT * 32 + PORT_PIN, PORT_PIN is the pin 14e16dbf60SMarkus Pargmann number on the specific port (between 0 and 31). 15e16dbf60SMarkus Pargmann 16e16dbf60SMarkus Pargmann MUX_ID is 17e16dbf60SMarkus Pargmann function + (direction << 2) + (gpio_oconf << 4) + (gpio_iconfa << 8) + (gpio_iconfb << 10) 18e16dbf60SMarkus Pargmann 19e16dbf60SMarkus Pargmann function value is used to select the pin function. 20e16dbf60SMarkus Pargmann Possible values: 21e16dbf60SMarkus Pargmann 0 - Primary function 22e16dbf60SMarkus Pargmann 1 - Alternate function 23e16dbf60SMarkus Pargmann 2 - GPIO 24e16dbf60SMarkus Pargmann Registers: GIUS (GPIO In Use), GPR (General Purpose Register) 25e16dbf60SMarkus Pargmann 26e16dbf60SMarkus Pargmann direction defines the data direction of the pin. 27e16dbf60SMarkus Pargmann Possible values: 28e16dbf60SMarkus Pargmann 0 - Input 29e16dbf60SMarkus Pargmann 1 - Output 30e16dbf60SMarkus Pargmann Register: DDIR 31e16dbf60SMarkus Pargmann 32e16dbf60SMarkus Pargmann gpio_oconf configures the gpio submodule output signal. This does not 33e16dbf60SMarkus Pargmann have any effect unless GPIO function is selected. A/B/C_IN are output 34e16dbf60SMarkus Pargmann signals of function blocks A,B and C. Specific function blocks are 35e16dbf60SMarkus Pargmann described in the reference manual. 36e16dbf60SMarkus Pargmann Possible values: 37e16dbf60SMarkus Pargmann 0 - A_IN 38e16dbf60SMarkus Pargmann 1 - B_IN 39e16dbf60SMarkus Pargmann 2 - C_IN 40e16dbf60SMarkus Pargmann 3 - Data Register 41e16dbf60SMarkus Pargmann Registers: OCR1, OCR2 42e16dbf60SMarkus Pargmann 43e16dbf60SMarkus Pargmann gpio_iconfa/b configures the gpio submodule input to functionblocks A and 44e16dbf60SMarkus Pargmann B. GPIO function should be selected if this is configured. 45e16dbf60SMarkus Pargmann Possible values: 46e16dbf60SMarkus Pargmann 0 - GPIO_IN 47e16dbf60SMarkus Pargmann 1 - Interrupt Status Register 48e16dbf60SMarkus Pargmann 2 - Pulldown 49e16dbf60SMarkus Pargmann 3 - Pullup 50e16dbf60SMarkus Pargmann Registers ICONFA1, ICONFA2, ICONFB1 and ICONFB2 51e16dbf60SMarkus Pargmann 52e16dbf60SMarkus Pargmann CONFIG can be 0 or 1, meaning Pullup disable/enable. 53e16dbf60SMarkus Pargmann 54e16dbf60SMarkus Pargmann 55*31d610f1SMarkus PargmannThe iomux controller has gpio child nodes which are embedded in the iomux 56*31d610f1SMarkus Pargmanncontrol registers. They have to be defined as child nodes of the iomux device 57*31d610f1SMarkus Pargmannnode. If gpio subnodes are defined "#address-cells", "#size-cells" and "ranges" 58*31d610f1SMarkus Pargmannproperties for the iomux device node are required. 59e16dbf60SMarkus Pargmann 60e16dbf60SMarkus PargmannExample: 61e16dbf60SMarkus Pargmann 62e16dbf60SMarkus Pargmanniomuxc: iomuxc@10015000 { 63e16dbf60SMarkus Pargmann compatible = "fsl,imx27-iomuxc"; 64e16dbf60SMarkus Pargmann reg = <0x10015000 0x600>; 65*31d610f1SMarkus Pargmann #address-cells = <1>; 66*31d610f1SMarkus Pargmann #size-cells = <1>; 67*31d610f1SMarkus Pargmann ranges; 68*31d610f1SMarkus Pargmann 69*31d610f1SMarkus Pargmann gpio1: gpio@10015000 { 70*31d610f1SMarkus Pargmann ... 71*31d610f1SMarkus Pargmann }; 72*31d610f1SMarkus Pargmann 73*31d610f1SMarkus Pargmann ... 74e16dbf60SMarkus Pargmann 75e16dbf60SMarkus Pargmann uart { 76e16dbf60SMarkus Pargmann pinctrl_uart1: uart-1 { 77e16dbf60SMarkus Pargmann fsl,pins = < 78e16dbf60SMarkus Pargmann 0x8c 0x004 0x0 /* UART1_TXD__UART1_TXD */ 79e16dbf60SMarkus Pargmann 0x8d 0x000 0x0 /* UART1_RXD__UART1_RXD */ 80e16dbf60SMarkus Pargmann 0x8e 0x004 0x0 /* UART1_CTS__UART1_CTS */ 81e16dbf60SMarkus Pargmann 0x8f 0x000 0x0 /* UART1_RTS__UART1_RTS */ 82e16dbf60SMarkus Pargmann >; 83e16dbf60SMarkus Pargmann }; 84e16dbf60SMarkus Pargmann 85e16dbf60SMarkus Pargmann ... 86e16dbf60SMarkus Pargmann }; 87e16dbf60SMarkus Pargmann}; 88e16dbf60SMarkus Pargmann 89e16dbf60SMarkus Pargmann 90e16dbf60SMarkus PargmannFor convenience there are macros defined in imx27-pinfunc.h which provide PIN 91e16dbf60SMarkus Pargmannand MUX_ID. They are structured as MX27_PAD_<Pad name>__<Signal name>. The names 92e16dbf60SMarkus Pargmannare defined in the i.MX27 reference manual. 93e16dbf60SMarkus Pargmann 94e16dbf60SMarkus PargmannThe above example using macros: 95e16dbf60SMarkus Pargmann 96e16dbf60SMarkus Pargmanniomuxc: iomuxc@10015000 { 97e16dbf60SMarkus Pargmann compatible = "fsl,imx27-iomuxc"; 98e16dbf60SMarkus Pargmann reg = <0x10015000 0x600>; 99*31d610f1SMarkus Pargmann #address-cells = <1>; 100*31d610f1SMarkus Pargmann #size-cells = <1>; 101*31d610f1SMarkus Pargmann ranges; 102*31d610f1SMarkus Pargmann 103*31d610f1SMarkus Pargmann gpio1: gpio@10015000 { 104*31d610f1SMarkus Pargmann ... 105*31d610f1SMarkus Pargmann }; 106*31d610f1SMarkus Pargmann 107*31d610f1SMarkus Pargmann ... 108e16dbf60SMarkus Pargmann 109e16dbf60SMarkus Pargmann uart { 110e16dbf60SMarkus Pargmann pinctrl_uart1: uart-1 { 111e16dbf60SMarkus Pargmann fsl,pins = < 112e16dbf60SMarkus Pargmann MX27_PAD_UART1_TXD__UART1_TXD 0x0 113e16dbf60SMarkus Pargmann MX27_PAD_UART1_RXD__UART1_RXD 0x0 114e16dbf60SMarkus Pargmann MX27_PAD_UART1_CTS__UART1_CTS 0x0 115e16dbf60SMarkus Pargmann MX27_PAD_UART1_RTS__UART1_RTS 0x0 116e16dbf60SMarkus Pargmann >; 117e16dbf60SMarkus Pargmann }; 118e16dbf60SMarkus Pargmann 119e16dbf60SMarkus Pargmann ... 120e16dbf60SMarkus Pargmann }; 121e16dbf60SMarkus Pargmann}; 122