1c66ec88fSEmmanuel Vadot* Freescale i.MX7 Dual IOMUX Controller 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotiMX7D supports two iomuxc controllers, fsl,imx7d-iomuxc controller is similar 4c66ec88fSEmmanuel Vadotas previous iMX SoC generation and fsl,imx7d-iomuxc-lpsr which provides low 5c66ec88fSEmmanuel Vadotpower state retention capabilities on gpios that are part of iomuxc-lpsr 6c66ec88fSEmmanuel Vadot(GPIO1_IO7..GPIO1_IO0). While iomuxc-lpsr provides its own set of registers for 7c66ec88fSEmmanuel Vadotmux and pad control settings, it shares the input select register from main 8c66ec88fSEmmanuel Vadotiomuxc controller for daisy chain settings, the fsl,input-sel property extends 9c66ec88fSEmmanuel Vadotfsl,imx-pinctrl driver to support iomuxc-lpsr controller. 10c66ec88fSEmmanuel Vadot 11c66ec88fSEmmanuel Vadotiomuxc_lpsr: iomuxc-lpsr@302c0000 { 12c66ec88fSEmmanuel Vadot compatible = "fsl,imx7d-iomuxc-lpsr"; 13c66ec88fSEmmanuel Vadot reg = <0x302c0000 0x10000>; 14c66ec88fSEmmanuel Vadot fsl,input-sel = <&iomuxc>; 15c66ec88fSEmmanuel Vadot}; 16c66ec88fSEmmanuel Vadot 17c66ec88fSEmmanuel Vadotiomuxc: iomuxc@30330000 { 18c66ec88fSEmmanuel Vadot compatible = "fsl,imx7d-iomuxc"; 19c66ec88fSEmmanuel Vadot reg = <0x30330000 0x10000>; 20c66ec88fSEmmanuel Vadot}; 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel VadotPeripherals using pads from iomuxc-lpsr support low state retention power 23c66ec88fSEmmanuel Vadotstate, under LPSR mode GPIO's state of pads are retain. 24c66ec88fSEmmanuel Vadot 25c66ec88fSEmmanuel VadotPlease refer to fsl,imx-pinctrl.txt in this directory for common binding part 26c66ec88fSEmmanuel Vadotand usage. 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel VadotRequired properties: 29c66ec88fSEmmanuel Vadot- compatible: "fsl,imx7d-iomuxc" for main IOMUXC controller, or 30c66ec88fSEmmanuel Vadot "fsl,imx7d-iomuxc-lpsr" for Low Power State Retention IOMUXC controller. 31c66ec88fSEmmanuel Vadot- fsl,pins: each entry consists of 6 integers and represents the mux and config 32c66ec88fSEmmanuel Vadot setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val 33c66ec88fSEmmanuel Vadot input_val> are specified using a PIN_FUNC_ID macro, which can be found in 34c66ec88fSEmmanuel Vadot imx7d-pinfunc.h under device tree source folder. The last integer CONFIG is 35c66ec88fSEmmanuel Vadot the pad setting value like pull-up on this pin. Please refer to i.MX7 Dual 36c66ec88fSEmmanuel Vadot Reference Manual for detailed CONFIG settings. 37c66ec88fSEmmanuel Vadot- fsl,input-sel: required property for iomuxc-lpsr controller, this property is 38c66ec88fSEmmanuel Vadot a phandle for main iomuxc controller which shares the input select register for 39c66ec88fSEmmanuel Vadot daisy chain settings. 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel VadotCONFIG bits definition: 42c66ec88fSEmmanuel VadotPAD_CTL_PUS_100K_DOWN (0 << 5) 43c66ec88fSEmmanuel VadotPAD_CTL_PUS_5K_UP (1 << 5) 44c66ec88fSEmmanuel VadotPAD_CTL_PUS_47K_UP (2 << 5) 45c66ec88fSEmmanuel VadotPAD_CTL_PUS_100K_UP (3 << 5) 46c66ec88fSEmmanuel VadotPAD_CTL_PUE (1 << 4) 47c66ec88fSEmmanuel VadotPAD_CTL_HYS (1 << 3) 48c66ec88fSEmmanuel VadotPAD_CTL_SRE_SLOW (1 << 2) 49c66ec88fSEmmanuel VadotPAD_CTL_SRE_FAST (0 << 2) 50c66ec88fSEmmanuel VadotPAD_CTL_DSE_X1 (0 << 0) 51c66ec88fSEmmanuel VadotPAD_CTL_DSE_X4 (1 << 0) 52c66ec88fSEmmanuel VadotPAD_CTL_DSE_X2 (2 << 0) 53c66ec88fSEmmanuel VadotPAD_CTL_DSE_X6 (3 << 0) 54c66ec88fSEmmanuel Vadot 55c66ec88fSEmmanuel VadotExamples: 56c66ec88fSEmmanuel VadotWhile iomuxc-lpsr is intended to be used by dedicated peripherals to take 57c66ec88fSEmmanuel Vadotadvantages of LPSR power mode, is also possible that an IP to use pads from 58c66ec88fSEmmanuel Vadotany of the iomux controllers. For example the I2C1 IP can use SCL pad from 59c66ec88fSEmmanuel Vadotiomuxc-lpsr controller and SDA pad from iomuxc controller as: 60c66ec88fSEmmanuel Vadot 61c66ec88fSEmmanuel Vadoti2c1: i2c@30a20000 { 62c66ec88fSEmmanuel Vadot pinctrl-names = "default"; 63*5def4c47SEmmanuel Vadot pinctrl-0 = <&pinctrl_i2c1_1>, <&pinctrl_i2c1_2>; 64c66ec88fSEmmanuel Vadot}; 65c66ec88fSEmmanuel Vadot 66c66ec88fSEmmanuel Vadotiomuxc-lpsr@302c0000 { 67c66ec88fSEmmanuel Vadot compatible = "fsl,imx7d-iomuxc-lpsr"; 68c66ec88fSEmmanuel Vadot reg = <0x302c0000 0x10000>; 69c66ec88fSEmmanuel Vadot fsl,input-sel = <&iomuxc>; 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot pinctrl_i2c1_1: i2c1grp-1 { 72c66ec88fSEmmanuel Vadot fsl,pins = < 73c66ec88fSEmmanuel Vadot MX7D_PAD_GPIO1_IO04__I2C1_SCL 0x4000007f 74c66ec88fSEmmanuel Vadot >; 75c66ec88fSEmmanuel Vadot }; 76c66ec88fSEmmanuel Vadot}; 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel Vadotiomuxc@30330000 { 79c66ec88fSEmmanuel Vadot compatible = "fsl,imx7d-iomuxc"; 80c66ec88fSEmmanuel Vadot reg = <0x30330000 0x10000>; 81c66ec88fSEmmanuel Vadot 82c66ec88fSEmmanuel Vadot pinctrl_i2c1_2: i2c1grp-2 { 83c66ec88fSEmmanuel Vadot fsl,pins = < 84c66ec88fSEmmanuel Vadot MX7D_PAD_I2C1_SDA__I2C1_SDA 0x4000007f 85c66ec88fSEmmanuel Vadot >; 86c66ec88fSEmmanuel Vadot }; 87c66ec88fSEmmanuel Vadot}; 88