Lines Matching +full:coexist +full:- +full:gpio +full:- +full:pin
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Marvell 88E6xxx Ethernet switch single-chip definition
14 #include <linux/gpio/consumer.h>
30 /* PVT limits for 4-bit port and 5-bit switch */
112 * enum mv88e6xxx_edsa_support - Ethertype DSA tag support level
152 * ports 2-4 are not routet to pins.
155 /* Multi-chip Addressing Mode.
157 * when it is non-zero, and use indirect access to internal registers.
160 /* Dual-chip Addressing Mode
162 * allowing two to coexist on the same SMI interface.
364 /* Handles automatic disabling and re-enabling of the PHY
378 /* A switch may have a GPIO line tied to its reset pin. Parse
394 * off a GPIO as interrupt source
412 /* GPIO resources */
435 /* Per-port timestamping resources. */
521 #define LINK_UNFORCED -2
540 #define SPEED_UNFORCED -2
541 #define DUPLEX_UNFORCED -2
667 /* GPIO operations */
699 /* Get/set data on GPIO pin */
700 int (*get_data)(struct mv88e6xxx_chip *chip, unsigned int pin);
701 int (*set_data)(struct mv88e6xxx_chip *chip, unsigned int pin,
704 /* get/set GPIO direction */
705 int (*get_dir)(struct mv88e6xxx_chip *chip, unsigned int pin);
706 int (*set_dir)(struct mv88e6xxx_chip *chip, unsigned int pin,
709 /* get/set GPIO pin control */
710 int (*get_pctl)(struct mv88e6xxx_chip *chip, unsigned int pin,
712 int (*set_pctl)(struct mv88e6xxx_chip *chip, unsigned int pin,
717 /* Access port-scoped Precision Time Protocol registers */
738 int (*ptp_verify)(struct ptp_clock_info *ptp, unsigned int pin,
763 return chip->info->max_sid > 0 && in mv88e6xxx_has_stu()
764 chip->info->ops->stu_loadpurge && in mv88e6xxx_has_stu()
765 chip->info->ops->stu_getnext; in mv88e6xxx_has_stu()
770 return chip->info->pvt; in mv88e6xxx_has_pvt()
775 return !!chip->info->global2_addr; in mv88e6xxx_has_lag()
780 return chip->info->num_databases; in mv88e6xxx_num_databases()
785 return chip->info->num_macs; in mv88e6xxx_num_macs()
790 return chip->info->num_ports; in mv88e6xxx_num_ports()
795 return chip->info->max_vid; in mv88e6xxx_max_vid()
800 return chip->info->max_sid; in mv88e6xxx_max_sid()
805 return GENMASK((s32)mv88e6xxx_num_ports(chip) - 1, 0); in mv88e6xxx_port_mask()
810 return chip->info->num_gpio; in mv88e6xxx_num_gpio()
815 return (chip->info->invalid_port_mask & BIT(port)) != 0; in mv88e6xxx_is_invalid_port()
821 chip->ports[port].mab = mab; in mv88e6xxx_port_set_mab()
834 mutex_lock(&chip->reg_lock); in mv88e6xxx_reg_lock()
839 mutex_unlock(&chip->reg_lock); in mv88e6xxx_reg_unlock()