/trusted-firmware-a/drivers/brcm/ |
A D | iproc_gpio.c | 22 #define PINMUX_OFFSET(gpio) ((gpio) * 4) argument 23 #define PINCONF_OFFSET(gpio) ((gpio) * 4) argument 91 assert(gpio < g->nr_gpios); in set_direction() 93 mux_to_gpio(g, gpio); in set_direction() 102 assert(gpio < g->nr_gpios); in get_direction() 104 mux_to_gpio(g, gpio); in get_direction() 116 assert(gpio < g->nr_gpios); in get_value() 118 mux_to_gpio(g, gpio); in get_value() 136 mux_to_gpio(g, gpio); in set_value() 149 mux_to_gpio(g, gpio); in get_pull() [all …]
|
/trusted-firmware-a/fdts/ |
A D | stm32mp15xxaa-pinctrl.dtsi | 10 gpioa: gpio@50002000 { 16 gpiob: gpio@50003000 { 22 gpioc: gpio@50004000 { 28 gpiod: gpio@50005000 { 34 gpioe: gpio@50006000 { 40 gpiof: gpio@50007000 { 46 gpiog: gpio@50008000 { 52 gpioh: gpio@50009000 { 58 gpioi: gpio@5000a000 { 64 gpioj: gpio@5000b000 { [all …]
|
A D | stm32mp15xxac-pinctrl.dtsi | 10 gpioa: gpio@50002000 { 13 gpio-ranges = <&pinctrl 0 0 16>; 16 gpiob: gpio@50003000 { 22 gpioc: gpio@50004000 { 28 gpiod: gpio@50005000 { 34 gpioe: gpio@50006000 { 40 gpiof: gpio@50007000 { 46 gpiog: gpio@50008000 { 52 gpioh: gpio@50009000 { 58 gpioi: gpio@5000a000 { [all …]
|
A D | stm32mp15xxab-pinctrl.dtsi | 10 gpioa: gpio@50002000 { 13 gpio-ranges = <&pinctrl 0 0 16>; 16 gpiob: gpio@50003000 { 19 gpio-ranges = <&pinctrl 0 16 16>; 22 gpioc: gpio@50004000 { 25 gpio-ranges = <&pinctrl 0 32 16>; 28 gpiod: gpio@50005000 { 34 gpioe: gpio@50006000 { 40 gpiof: gpio@50007000 { 46 gpiog: gpio@50008000 { [all …]
|
A D | stm32mp15xxad-pinctrl.dtsi | 10 gpioa: gpio@50002000 { 13 gpio-ranges = <&pinctrl 0 0 16>; 16 gpiob: gpio@50003000 { 19 gpio-ranges = <&pinctrl 0 16 16>; 22 gpioc: gpio@50004000 { 25 gpio-ranges = <&pinctrl 0 32 16>; 28 gpiod: gpio@50005000 { 34 gpioe: gpio@50006000 { 40 gpiof: gpio@50007000 { 46 gpiog: gpio@50008000 { [all …]
|
A D | stm32mp151.dtsi | 517 gpio-controller; 528 gpio-controller; 539 gpio-controller; 550 gpio-controller; 561 gpio-controller; 572 gpio-controller; 583 gpio-controller; 594 gpio-controller; 605 gpio-controller; 616 gpio-controller; [all …]
|
/trusted-firmware-a/drivers/arm/pl061/ |
A D | pl061_gpio.c | 34 static int pl061_get_direction(int gpio); 36 static int pl061_get_value(int gpio); 53 assert((gpio >= 0) && (gpio < PLAT_PL061_MAX_GPIOS)); in pl061_get_direction() 56 offset = gpio % GPIOS_PER_PL061; in pl061_get_direction() 68 assert((gpio >= 0) && (gpio < PLAT_PL061_MAX_GPIOS)); in pl061_set_direction() 71 offset = gpio % GPIOS_PER_PL061; in pl061_set_direction() 89 static int pl061_get_value(int gpio) in pl061_get_value() argument 94 assert((gpio >= 0) && (gpio < PLAT_PL061_MAX_GPIOS)); in pl061_get_value() 97 offset = gpio % GPIOS_PER_PL061; in pl061_get_value() 113 assert((gpio >= 0) && (gpio < PLAT_PL061_MAX_GPIOS)); in pl061_set_value() [all …]
|
/trusted-firmware-a/drivers/rpi3/gpio/ |
A D | rpi3_gpio.c | 43 int rpi3_gpio_get_select(int gpio) in rpi3_gpio_get_select() argument 46 int regN = gpio / 10; in rpi3_gpio_get_select() 47 int shift = 3 * (gpio % 10); in rpi3_gpio_get_select() 71 int regN = gpio / 10; in rpi3_gpio_set_select() 72 int shift = 3 * (gpio % 10); in rpi3_gpio_set_select() 107 int regN = gpio / 32; in rpi3_gpio_get_value() 108 int shift = gpio % 32; in rpi3_gpio_get_value() 119 int regN = gpio / 32; in rpi3_gpio_set_value() 120 int shift = gpio % 32; in rpi3_gpio_set_value() 136 int regN = gpio / 32; in rpi3_gpio_set_pull() [all …]
|
/trusted-firmware-a/drivers/gpio/ |
A D | gpio.c | 26 assert(gpio >= 0); in gpio_get_direction() 36 assert(gpio >= 0); in gpio_set_direction() 41 int gpio_get_value(int gpio) in gpio_get_value() argument 45 assert(gpio >= 0); in gpio_get_value() 47 return ops->get_value(gpio); in gpio_get_value() 55 assert(gpio >= 0); in gpio_set_value() 66 assert(gpio >= 0); in gpio_set_pull() 68 ops->set_pull(gpio, pull); in gpio_set_pull() 71 int gpio_get_pull(int gpio) in gpio_get_pull() argument 75 assert(gpio >= 0); in gpio_get_pull() [all …]
|
/trusted-firmware-a/include/drivers/ |
A D | gpio.h | 23 int (*get_direction)(int gpio); 24 void (*set_direction)(int gpio, int direction); 25 int (*get_value)(int gpio); 26 void (*set_value)(int gpio, int value); 27 void (*set_pull)(int gpio, int pull); 28 int (*get_pull)(int gpio); 31 int gpio_get_direction(int gpio); 33 int gpio_get_value(int gpio); 34 void gpio_set_value(int gpio, int value); 35 void gpio_set_pull(int gpio, int pull); [all …]
|
/trusted-firmware-a/plat/rockchip/rk3399/drivers/gpio/ |
A D | rk3399_gpio.c | 160 static int get_pull(int gpio) in get_pull() argument 164 uint32_t id = GET_GPIO_ID(gpio); in get_pull() 180 gpio_put_clock(gpio, clock_state); in get_pull() 206 uint32_t id = GET_GPIO_ID(gpio); in set_pull() 239 gpio_put_clock(gpio, clock_state); in set_pull() 245 uint32_t num = GET_GPIO_NUM(gpio); in set_direction() 260 gpio_put_clock(gpio, clock_state); in set_direction() 263 static int get_direction(int gpio) in get_direction() argument 266 uint32_t num = GET_GPIO_NUM(gpio); in get_direction() 282 gpio_put_clock(gpio, clock_state); in get_direction() [all …]
|
/trusted-firmware-a/drivers/renesas/common/ddr/ |
A D | dram_sub_func.c | 42 uint32_t gpio; in rcar_dram_get_boot_status() local 47 gpio = GPIO_INDT3; in rcar_dram_get_boot_status() 50 gpio = GPIO_INDT6; in rcar_dram_get_boot_status() 53 gpio = GPIO_INDT1; in rcar_dram_get_boot_status() 56 reg_data = mmio_read_32(gpio); in rcar_dram_get_boot_status() 83 uint32_t gpio; in rcar_dram_update_boot_status() local 92 gpio = GPIO_INDT3; in rcar_dram_update_boot_status() 99 gpio = GPIO_INDT6; in rcar_dram_update_boot_status() 106 gpio = GPIO_INDT1; in rcar_dram_update_boot_status() 137 reg_data = mmio_read_32(gpio); in rcar_dram_update_boot_status()
|
/trusted-firmware-a/plat/marvell/armada/a8k/common/ |
A D | plat_pm.c | 502 unsigned int gpio; in plat_marvell_power_off_gpio() local 514 for (gpio = 0; gpio < pm_cfg->cfg.gpio.pin_count; gpio++) { in plat_marvell_power_off_gpio() 515 info = &pm_cfg->cfg.gpio.info[gpio]; in plat_marvell_power_off_gpio() 532 mdelay(pm_cfg->cfg.gpio.delay_ms); in plat_marvell_power_off_gpio() 538 tog_bits = pm_cfg->cfg.gpio.seq[idx]; in plat_marvell_power_off_gpio() 543 info = &pm_cfg->cfg.gpio.info[0]; in plat_marvell_power_off_gpio() 548 for (gpio = 0; gpio < pm_cfg->cfg.gpio.pin_count; gpio++) { in plat_marvell_power_off_gpio() 549 shift = pm_cfg->cfg.gpio.info[gpio].gpio_index % 32; in plat_marvell_power_off_gpio() 550 if (GPIO_LOW == (tog_bits & (1 << gpio))) in plat_marvell_power_off_gpio() 559 if (idx < pm_cfg->cfg.gpio.step_count - 1) { in plat_marvell_power_off_gpio() [all …]
|
/trusted-firmware-a/drivers/renesas/rcar/cpld/ |
A D | ulcb_cpld.c | 34 static void gpio_set_value(uint32_t addr, uint8_t gpio, uint32_t val) in gpio_set_value() argument 40 reg |= (1 << gpio); in gpio_set_value() 42 reg &= ~(1 << gpio); in gpio_set_value() 46 static void gpio_direction_output(uint32_t addr, uint8_t gpio) in gpio_direction_output() argument 51 reg |= (1 << gpio); in gpio_direction_output() 55 static void gpio_pfc(uint32_t addr, uint8_t gpio) in gpio_pfc() argument 60 reg &= ~(1 << gpio); in gpio_pfc()
|
/trusted-firmware-a/plat/mediatek/mt8183/drivers/gpio/ |
A D | mtgpio.c | 368 int mt_get_gpio_dir(int gpio) in mt_get_gpio_dir() argument 372 pin = (uint32_t)gpio; in mt_get_gpio_dir() 380 pin = (uint32_t)gpio; in mt_set_gpio_pull() 388 pin = (uint32_t)gpio; in mt_get_gpio_pull() 396 pin = (uint32_t)gpio; in mt_set_gpio_out() 400 int mt_get_gpio_out(int gpio) in mt_get_gpio_out() argument 404 pin = (uint32_t)gpio; in mt_get_gpio_out() 408 int mt_get_gpio_in(int gpio) in mt_get_gpio_in() argument 412 pin = (uint32_t)gpio; in mt_get_gpio_in() 420 pin = (uint32_t)gpio; in mt_set_gpio_mode() [all …]
|
A D | mtgpio.h | 138 void mt_set_gpio_dir(int gpio, int direction); 139 int mt_get_gpio_dir(int gpio); 142 void mt_set_gpio_pull(int gpio, int pull); 143 int mt_get_gpio_pull(int gpio); 146 void mt_set_gpio_out(int gpio, int value); 147 int mt_get_gpio_out(int gpio); 148 int mt_get_gpio_in(int gpio); 151 void mt_set_gpio_mode(int gpio, int mode); 152 int mt_get_gpio_mode(int gpio);
|
/trusted-firmware-a/plat/marvell/armada/a8k/a80x0/board/ |
A D | marvell_plat_config.c | 168 .cfg.gpio.pin_count = 1, 169 .cfg.gpio.info = {{0, 35} }, 170 .cfg.gpio.step_count = 7, 171 .cfg.gpio.seq = {1, 0, 1, 0, 1, 0, 1}, 172 .cfg.gpio.delay_ms = 10, 190 .info.gpio.num = 33, 191 .info.gpio.button_state = HIGH,
|
/trusted-firmware-a/plat/mediatek/common/drivers/gpio/ |
A D | mtgpio_common.c | 243 mt_set_gpio_dir_chip((uint32_t)gpio, direction); in mt_set_gpio_dir() 246 static int mt_get_gpio_dir(int gpio) in mt_get_gpio_dir() argument 250 pin = (uint32_t)gpio; in mt_get_gpio_dir() 254 static void mt_set_gpio_pull(int gpio, int pull) in mt_set_gpio_pull() argument 258 pin = (uint32_t)gpio; in mt_set_gpio_pull() 262 static int mt_get_gpio_pull(int gpio) in mt_get_gpio_pull() argument 266 pin = (uint32_t)gpio; in mt_get_gpio_pull() 270 static void mt_set_gpio_out(int gpio, int value) in mt_set_gpio_out() argument 274 pin = (uint32_t)gpio; in mt_set_gpio_out() 278 static int mt_get_gpio_in(int gpio) in mt_get_gpio_in() argument [all …]
|
/trusted-firmware-a/plat/socionext/synquacer/ |
A D | sq_psci.c | 116 volatile uint32_t *gpio = (uint32_t *)PLAT_SQ_GPIO_BASE; in sq_system_off() local 119 gpio[5] |= 0x2; /* set output */ in sq_system_off() 120 gpio[1] |= 0x2; /* set high */ in sq_system_off() 128 gpio[1] &= ~0x2; /* set low */ in sq_system_off() 133 gpio[1] |= 0x2; /* set high */ in sq_system_off()
|
/trusted-firmware-a/plat/mediatek/mt8195/ |
A D | platform.mk | 12 -I${MTK_PLAT}/common/drivers/gpio/ \ 21 -I${MTK_PLAT_SOC}/drivers/gpio/ \ 40 drivers/gpio/gpio.c \ 48 ${MTK_PLAT}/common/drivers/gpio/mtgpio_common.c \ 67 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \ 72 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
|
/trusted-firmware-a/plat/brcm/board/stingray/src/ |
A D | bl2_setup.c | 495 static uint8_t gpio_get_state(int gpio) in gpio_get_state() argument 500 gpio_set_direction(gpio, GPIO_DIR_IN); in gpio_get_state() 503 if (gpio_get_value(gpio) == GPIO_LEVEL_HIGH) in gpio_get_state() 514 gpio_set_pull(gpio, GPIO_PULL_DOWN); in gpio_get_state() 524 gpio_set_pull(gpio, GPIO_PULL_UP); in gpio_get_state() 525 if (gpio_get_value(gpio) == GPIO_LEVEL_LOW) { in gpio_get_state() 535 if (gpio_get_pull(gpio) != GPIO_PULL_NONE) in gpio_get_state() 536 gpio_set_pull(gpio, GPIO_PULL_NONE); in gpio_get_state() 545 int gpio; in board_detect_gpio() local 561 gpio = gpio_cfg_bitmap[i]; in board_detect_gpio() [all …]
|
/trusted-firmware-a/plat/mediatek/mt8192/ |
A D | platform.mk | 12 -I${MTK_PLAT}/common/drivers/gpio/ \ 24 -I${MTK_PLAT_SOC}/drivers/gpio/ \ 43 drivers/gpio/gpio.c \ 49 ${MTK_PLAT}/common/drivers/gpio/mtgpio_common.c \ 74 ${MTK_PLAT_SOC}/drivers/gpio/mtgpio.c \
|
/trusted-firmware-a/drivers/nxp/gpio/ |
A D | gpio.mk | 12 PLAT_INCLUDES += -I$(PLAT_DRIVERS_INCLUDE_PATH)/gpio 14 GPIO_SOURCES := $(PLAT_DRIVERS_PATH)/gpio/nxp_gpio.c
|
/trusted-firmware-a/include/drivers/rpi3/gpio/ |
A D | rpi3_gpio.h | 15 int rpi3_gpio_get_select(int gpio); 16 void rpi3_gpio_set_select(int gpio, int fsel);
|
/trusted-firmware-a/plat/marvell/armada/a3k/common/ |
A D | plat_pm.c | 489 static void a3700_pm_en_nb_gpio(uint32_t gpio) in a3700_pm_en_nb_gpio() argument 492 if (gpio >= 32) { in a3700_pm_en_nb_gpio() 494 mmio_clrbits_32(MVEBU_NB_GPIO_IRQ_MASK_2_REG, BIT(gpio - 32)); in a3700_pm_en_nb_gpio() 497 mmio_setbits_32(MVEBU_NB_GPIO_IRQ_EN_HIGH_REG, BIT(gpio - 32)); in a3700_pm_en_nb_gpio() 500 mmio_clrbits_32(MVEBU_NB_GPIO_IRQ_MASK_1_REG, BIT(gpio)); in a3700_pm_en_nb_gpio() 503 mmio_setbits_32(MVEBU_NB_GPIO_IRQ_EN_LOW_REG, BIT(gpio)); in a3700_pm_en_nb_gpio() 517 static void a3700_pm_en_sb_gpio(uint32_t gpio) in a3700_pm_en_sb_gpio() argument 529 mmio_clrbits_32(MVEBU_SB_GPIO_IRQ_MASK_REG, BIT(gpio)); in a3700_pm_en_sb_gpio() 532 mmio_setbits_32(MVEBU_SB_GPIO_IRQ_EN_REG, BIT(gpio)); in a3700_pm_en_sb_gpio()
|