10b11dbf7SMasahiro Yamada# 20b11dbf7SMasahiro Yamada# GPIO infrastructure and drivers 30b11dbf7SMasahiro Yamada# 40b11dbf7SMasahiro Yamada 50b11dbf7SMasahiro Yamadamenu "GPIO Support" 60b11dbf7SMasahiro Yamada 7da333ae7SMasahiro Yamadaconfig DM_GPIO 8da333ae7SMasahiro Yamada bool "Enable Driver Model for GPIO drivers" 9da333ae7SMasahiro Yamada depends on DM 10da333ae7SMasahiro Yamada help 11f94a1bedSSimon Glass Enable driver model for GPIO access. The standard GPIO 12f94a1bedSSimon Glass interface (gpio_get_value(), etc.) is then implemented by 13f94a1bedSSimon Glass the GPIO uclass. Drivers provide methods to query the 14f94a1bedSSimon Glass particular GPIOs that they provide. The uclass interface 15f94a1bedSSimon Glass is defined in include/asm-generic/gpio.h. 16606f7047SAlbert ARIBAUD \(3ADEV\) 1788d5ecf4SThomas Chouconfig ALTERA_PIO 1888d5ecf4SThomas Chou bool "Altera PIO driver" 1988d5ecf4SThomas Chou depends on DM_GPIO 2088d5ecf4SThomas Chou help 2188d5ecf4SThomas Chou Select this to enable PIO for Altera devices. Please find 2288d5ecf4SThomas Chou details on the "Embedded Peripherals IP User Guide" of Altera. 2388d5ecf4SThomas Chou 24e30a70c2SMarek Vasutconfig DWAPB_GPIO 25e30a70c2SMarek Vasut bool "DWAPB GPIO driver" 26e30a70c2SMarek Vasut depends on DM && DM_GPIO 27e30a70c2SMarek Vasut default n 28e30a70c2SMarek Vasut help 29e30a70c2SMarek Vasut Support for the Designware APB GPIO driver. 30e30a70c2SMarek Vasut 312c62c56aSWenyou Yangconfig ATMEL_PIO4 322c62c56aSWenyou Yang bool "ATMEL PIO4 driver" 332c62c56aSWenyou Yang depends on DM 342c62c56aSWenyou Yang default n 352c62c56aSWenyou Yang help 362c62c56aSWenyou Yang Say yes here to support the Atmel PIO4 driver. 372c62c56aSWenyou Yang The PIO4 is new version of Atmel PIO controller, which manages 382c62c56aSWenyou Yang up to 128 fully programmable input/output lines. Each I/O line 392c62c56aSWenyou Yang may be dedicated as a general purpose I/O or be assigned to 402c62c56aSWenyou Yang a function of an embedded peripheral. 412c62c56aSWenyou Yang 4264b17977SSimon Glassconfig INTEL_BROADWELL_GPIO 4364b17977SSimon Glass bool "Intel Broadwell GPIO driver" 4464b17977SSimon Glass depends on DM 4564b17977SSimon Glass help 4664b17977SSimon Glass This driver supports Broadwell U devices which have an expanded 4764b17977SSimon Glass GPIO feature set. The difference is large enough to merit a separate 4864b17977SSimon Glass driver from the common Intel ICH6 driver. It supports a total of 4964b17977SSimon Glass 95 GPIOs which can be configured from the device tree. 5064b17977SSimon Glass 51606f7047SAlbert ARIBAUD \(3ADEV\)config LPC32XX_GPIO 52606f7047SAlbert ARIBAUD \(3ADEV\) bool "LPC32XX GPIO driver" 53606f7047SAlbert ARIBAUD \(3ADEV\) depends on DM 54606f7047SAlbert ARIBAUD \(3ADEV\) default n 55606f7047SAlbert ARIBAUD \(3ADEV\) help 56606f7047SAlbert ARIBAUD \(3ADEV\) Support for the LPC32XX GPIO driver. 57d79c50afSSimon Glass 5881a87e18SMateusz Kulikowskiconfig MSM_GPIO 5981a87e18SMateusz Kulikowski bool "Qualcomm GPIO driver" 6081a87e18SMateusz Kulikowski depends on DM_GPIO 6181a87e18SMateusz Kulikowski default n 6281a87e18SMateusz Kulikowski help 6381a87e18SMateusz Kulikowski Support GPIO controllers on Qualcomm Snapdragon family of SoCs. 6481a87e18SMateusz Kulikowski This controller have single bank (default name "soc"), every 6581a87e18SMateusz Kulikowski gpio has it's own set of registers. 6681a87e18SMateusz Kulikowski Only simple GPIO operations are supported (get/set, change of 6781a87e18SMateusz Kulikowski direction and checking pin function). 6881a87e18SMateusz Kulikowski Supported devices: 6981a87e18SMateusz Kulikowski - APQ8016 7081a87e18SMateusz Kulikowski - MSM8916 7181a87e18SMateusz Kulikowski 72120800dfSMateusz Kulikowskiconfig PM8916_GPIO 73120800dfSMateusz Kulikowski bool "Qualcomm PM8916 PMIC GPIO/keypad driver" 74120800dfSMateusz Kulikowski depends on DM_GPIO && PMIC_PM8916 75120800dfSMateusz Kulikowski help 76120800dfSMateusz Kulikowski Support for GPIO pins and power/reset buttons found on 77120800dfSMateusz Kulikowski Qualcomm PM8916 PMIC. 78120800dfSMateusz Kulikowski Default name for GPIO bank is "pm8916". 79120800dfSMateusz Kulikowski Power and reset buttons are placed in "pm8916_key" bank and 80120800dfSMateusz Kulikowski have gpio numbers 0 and 1 respectively. 81120800dfSMateusz Kulikowski 821f8f7730SSimon Glassconfig ROCKCHIP_GPIO 831f8f7730SSimon Glass bool "Rockchip GPIO driver" 841f8f7730SSimon Glass depends on DM_GPIO 851f8f7730SSimon Glass help 861f8f7730SSimon Glass Support GPIO access on Rockchip SoCs. The GPIOs are arranged into 871f8f7730SSimon Glass a number of banks (different for each SoC type) each with 32 GPIOs. 881f8f7730SSimon Glass The GPIOs for a device are defined in the device tree with one node 891f8f7730SSimon Glass for each bank. 901f8f7730SSimon Glass 91d79c50afSSimon Glassconfig SANDBOX_GPIO 92d79c50afSSimon Glass bool "Enable sandbox GPIO driver" 93d79c50afSSimon Glass depends on SANDBOX && DM && DM_GPIO 94d79c50afSSimon Glass help 95d79c50afSSimon Glass This driver supports some simulated GPIOs which can be adjusted 96d79c50afSSimon Glass using 'back door' functions like sandbox_gpio_set_value(). Then the 97d79c50afSSimon Glass GPIOs can be inspected through the normal get_get_value() 98d79c50afSSimon Glass interface. The purpose of this is to allow GPIOs to be used as 99d79c50afSSimon Glass normal in sandbox, perhaps with test code actually driving the 100d79c50afSSimon Glass behaviour of those GPIOs. 101d79c50afSSimon Glass 102d79c50afSSimon Glassconfig SANDBOX_GPIO_COUNT 103d79c50afSSimon Glass int "Number of sandbox GPIOs" 104d79c50afSSimon Glass depends on SANDBOX_GPIO 105d79c50afSSimon Glass default 128 106d79c50afSSimon Glass help 107d79c50afSSimon Glass The sandbox driver can support any number of GPIOs. Generally these 108d79c50afSSimon Glass are specified using the device tree. But you can also have a number 109d79c50afSSimon Glass of 'anonymous' GPIOs that do not belong to any device or bank. 110d79c50afSSimon Glass Select a suitable value depending on your needs. 111d348a943SBhuvanchandra DV 112b9a66b63SMasahiro Yamadaconfig GPIO_UNIPHIER 113b9a66b63SMasahiro Yamada bool "UniPhier GPIO" 114b9a66b63SMasahiro Yamada depends on ARCH_UNIPHIER 115b9a66b63SMasahiro Yamada help 116b9a66b63SMasahiro Yamada Say yes here to support UniPhier GPIOs. 117b9a66b63SMasahiro Yamada 118d348a943SBhuvanchandra DVconfig VYBRID_GPIO 119d348a943SBhuvanchandra DV bool "Vybrid GPIO driver" 120d348a943SBhuvanchandra DV depends on DM 121d348a943SBhuvanchandra DV default n 122d348a943SBhuvanchandra DV help 123d348a943SBhuvanchandra DV Say yes here to support Vybrid vf610 GPIOs. 1240b11dbf7SMasahiro Yamada 125386d934eSPurna Chandra Mandalconfig PIC32_GPIO 126386d934eSPurna Chandra Mandal bool "Microchip PIC32 GPIO driver" 127386d934eSPurna Chandra Mandal depends on DM_GPIO && MACH_PIC32 128386d934eSPurna Chandra Mandal default y 129386d934eSPurna Chandra Mandal help 130386d934eSPurna Chandra Mandal Say yes here to support Microchip PIC32 GPIOs. 131386d934eSPurna Chandra Mandal 132704d9a64SStefan Roeseconfig MVEBU_GPIO 133704d9a64SStefan Roese bool "Marvell MVEBU GPIO driver" 134704d9a64SStefan Roese depends on DM_GPIO && ARCH_MVEBU 135704d9a64SStefan Roese default y 136704d9a64SStefan Roese help 137704d9a64SStefan Roese Say yes here to support Marvell MVEBU (Armada XP/38x) GPIOs. 138704d9a64SStefan Roese 1392978ae23SSiva Durga Prasad Paladuguconfig ZYNQ_GPIO 1402978ae23SSiva Durga Prasad Paladugu bool "Zynq GPIO driver" 141251ab06dSSiva Durga Prasad Paladugu depends on DM_GPIO && (ARCH_ZYNQ || ARCH_ZYNQMP) 1422978ae23SSiva Durga Prasad Paladugu default y 1432978ae23SSiva Durga Prasad Paladugu help 1442978ae23SSiva Durga Prasad Paladugu Supports GPIO access on Zynq SoC. 1452978ae23SSiva Durga Prasad Paladugu 146*9300f711SPeng Fanconfig DM_74X164 147*9300f711SPeng Fan bool "74x164 serial-in/parallel-out 8-bits shift register" 148*9300f711SPeng Fan depends on DM_GPIO 149*9300f711SPeng Fan help 150*9300f711SPeng Fan Driver for 74x164 compatible serial-in/parallel-out 8-outputs 151*9300f711SPeng Fan shift registers, such as 74lv165, 74hc595. 152*9300f711SPeng Fan This driver can be used to provide access to more gpio outputs. 153*9300f711SPeng Fan 15403773439SPeng Fanconfig DM_PCA953X 15503773439SPeng Fan bool "PCA95[357]x, PCA9698, TCA64xx, and MAX7310 I/O ports" 15603773439SPeng Fan depends on DM_GPIO 15703773439SPeng Fan help 15803773439SPeng Fan Say yes here to provide access to several register-oriented 15903773439SPeng Fan SMBus I/O expanders, made mostly by NXP or TI. Compatible 16003773439SPeng Fan models include: 16103773439SPeng Fan 16203773439SPeng Fan 4 bits: pca9536, pca9537 16303773439SPeng Fan 16403773439SPeng Fan 8 bits: max7310, max7315, pca6107, pca9534, pca9538, pca9554, 16503773439SPeng Fan pca9556, pca9557, pca9574, tca6408, xra1202 16603773439SPeng Fan 16703773439SPeng Fan 16 bits: max7312, max7313, pca9535, pca9539, pca9555, pca9575, 16803773439SPeng Fan tca6416 16903773439SPeng Fan 17003773439SPeng Fan 24 bits: tca6424 17103773439SPeng Fan 17203773439SPeng Fan 40 bits: pca9505, pca9698 17303773439SPeng Fan 17403773439SPeng Fan Now, max 24 bits chips and PCA953X compatible chips are 17503773439SPeng Fan supported 1760b11dbf7SMasahiro Yamadaendmenu 177