Home
last modified time | relevance | path

Searched +full:lan966x +full:- +full:switch (Results 1 – 25 of 32) sorted by relevance

12

/linux-6.12.1/drivers/net/ethernet/microchip/lan966x/
Dlan966x_fdb.c1 // SPDX-License-Identifier: GPL-2.0+
12 struct lan966x *lan966x; member
24 lan966x_fdb_find_entry(struct lan966x *lan966x, in lan966x_fdb_find_entry() argument
29 list_for_each_entry(fdb_entry, &lan966x->fdb_entries, list) { in lan966x_fdb_find_entry()
30 if (fdb_entry->vid == fdb_info->vid && in lan966x_fdb_find_entry()
31 ether_addr_equal(fdb_entry->mac, fdb_info->addr)) in lan966x_fdb_find_entry()
38 static void lan966x_fdb_add_entry(struct lan966x *lan966x, in lan966x_fdb_add_entry() argument
43 fdb_entry = lan966x_fdb_find_entry(lan966x, fdb_info); in lan966x_fdb_add_entry()
45 fdb_entry->references++; in lan966x_fdb_add_entry()
53 ether_addr_copy(fdb_entry->mac, fdb_info->addr); in lan966x_fdb_add_entry()
[all …]
Dlan966x_switchdev.c1 // SPDX-License-Identifier: GPL-2.0+
13 struct lan966x *lan966x = port->lan966x; in lan966x_port_set_mcast_ip_flood() local
16 flood_mask_ip = lan_rd(lan966x, ANA_PGID(pgid_ip)); in lan966x_port_set_mcast_ip_flood()
22 if (!port->mcast_ena) { in lan966x_port_set_mcast_ip_flood()
25 flood_mask = lan_rd(lan966x, ANA_PGID(PGID_MC)); in lan966x_port_set_mcast_ip_flood()
28 if (flood_mask & BIT(port->chip_port)) in lan966x_port_set_mcast_ip_flood()
29 flood_mask_ip |= BIT(port->chip_port); in lan966x_port_set_mcast_ip_flood()
31 flood_mask_ip &= ~BIT(port->chip_port); in lan966x_port_set_mcast_ip_flood()
33 flood_mask_ip &= ~BIT(port->chip_port); in lan966x_port_set_mcast_ip_flood()
38 lan966x, ANA_PGID(pgid_ip)); in lan966x_port_set_mcast_ip_flood()
[all …]
Dlan966x_vcap_impl.c1 // SPDX-License-Identifier: GPL-2.0+
38 .vtype = VCAP_TYPE_IS1, /* IS1-0 */
47 .vtype = VCAP_TYPE_IS2, /* IS2-0 */
58 struct lan966x *lan966x; member
64 return lan_rd(cb->lan966x, VCAP_UPDATE_CTRL(cb->instance)); in lan966x_vcap_read_update_ctrl()
67 static void lan966x_vcap_wait_update(struct lan966x *lan966x, int instance) in lan966x_vcap_wait_update() argument
69 const struct lan966x_vcap_cmd_cb cb = { .lan966x = lan966x, in lan966x_vcap_wait_update()
78 static void __lan966x_vcap_range_init(struct lan966x *lan966x, in __lan966x_vcap_range_init() argument
84 VCAP_MV_CFG_MV_SIZE_SET(count - 1), in __lan966x_vcap_range_init()
85 lan966x, VCAP_MV_CFG(admin->tgt_inst)); in __lan966x_vcap_range_init()
[all …]
Dlan966x_main.c1 // SPDX-License-Identifier: GPL-2.0+
25 #define XTR_VALID_BYTES(x) (4 - (((x) >> 24) & 3))
30 { .compatible = "microchip,lan966x-switch" },
68 struct lan966x *lan966x) in lan966x_create_targets() argument
83 dev_err(&pdev->dev, "Invalid resource\n"); in lan966x_create_targets()
84 return -EINVAL; in lan966x_create_targets()
87 begin[idx] = devm_ioremap(&pdev->dev, in lan966x_create_targets()
88 iores[idx]->start, in lan966x_create_targets()
91 dev_err(&pdev->dev, "Unable to get registers: %s\n", in lan966x_create_targets()
92 iores[idx]->name); in lan966x_create_targets()
[all …]
Dlan966x_xdp.c1 // SPDX-License-Identifier: GPL-2.0+
12 struct lan966x *lan966x = port->lan966x; in lan966x_xdp_setup() local
17 if (!lan966x->fdma) { in lan966x_xdp_setup()
18 NL_SET_ERR_MSG_MOD(xdp->extack, in lan966x_xdp_setup()
20 return -EOPNOTSUPP; in lan966x_xdp_setup()
23 old_xdp = lan966x_xdp_present(lan966x); in lan966x_xdp_setup()
24 old_prog = xchg(&port->xdp_prog, xdp->prog); in lan966x_xdp_setup()
25 new_xdp = lan966x_xdp_present(lan966x); in lan966x_xdp_setup()
30 err = lan966x_fdma_reload_page_pool(lan966x); in lan966x_xdp_setup()
32 xchg(&port->xdp_prog, old_prog); in lan966x_xdp_setup()
[all …]
Dlan966x_vcap_debugfs.c1 // SPDX-License-Identifier: GPL-2.0+
12 struct lan966x *lan966x = port->lan966x; in lan966x_vcap_is1_port_keys() local
15 out->prf(out->dst, " port[%d] (%s): ", port->chip_port, in lan966x_vcap_is1_port_keys()
16 netdev_name(port->dev)); in lan966x_vcap_is1_port_keys()
18 val = lan_rd(lan966x, ANA_VCAP_CFG(port->chip_port)); in lan966x_vcap_is1_port_keys()
19 out->prf(out->dst, "\n state: "); in lan966x_vcap_is1_port_keys()
21 out->prf(out->dst, "on"); in lan966x_vcap_is1_port_keys()
23 out->prf(out->dst, "off"); in lan966x_vcap_is1_port_keys()
25 for (int l = 0; l < admin->lookups; ++l) { in lan966x_vcap_is1_port_keys()
26 out->prf(out->dst, "\n Lookup %d: ", l); in lan966x_vcap_is1_port_keys()
[all …]
DMakefile1 # SPDX-License-Identifier: GPL-2.0-only
3 # Makefile for the Microchip Lan966x network device drivers.
6 obj-$(CONFIG_LAN966X_SWITCH) += lan966x-switch.o
8 lan966x-switch-objs := lan966x_main.o lan966x_phylink.o lan966x_port.o \
18 lan966x-switch-$(CONFIG_LAN966X_DCB) += lan966x_dcb.o
19 lan966x-switch-$(CONFIG_DEBUG_FS) += lan966x_vcap_debugfs.o
22 ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/vcap
23 ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/fdma
Dlan966x_ptp.c1 // SPDX-License-Identifier: GPL-2.0+
12 * The value is calculated as following: (1/1000000)/((2^-59)/6.037735849)
57 struct lan966x *lan966x = port->lan966x; in lan966x_ptp_add_trap() local
61 vrule = vcap_get_rule(lan966x->vcap_ctrl, rule_id); in lan966x_ptp_add_trap()
68 mask &= ~BIT(port->chip_port); in lan966x_ptp_add_trap()
76 vrule = vcap_alloc_rule(lan966x->vcap_ctrl, port->dev, in lan966x_ptp_add_trap()
103 struct lan966x *lan966x = port->lan966x; in lan966x_ptp_del_trap() local
108 vrule = vcap_get_rule(lan966x->vcap_ctrl, rule_id); in lan966x_ptp_del_trap()
110 return -EEXIST; in lan966x_ptp_del_trap()
113 mask |= BIT(port->chip_port); in lan966x_ptp_del_trap()
[all …]
Dlan966x_port.c1 // SPDX-License-Identifier: GPL-2.0+
17 value = (MULTIPLIER_BIT - 1); in lan966x_wm_enc()
27 struct lan966x *lan966x = port->lan966x; in lan966x_port_link_down() local
35 lan966x, AFI_PORT_CFG(port->chip_port)); in lan966x_port_link_down()
39 val = lan_rd(lan966x, AFI_PORT_FRM_OUT(port->chip_port)); in lan966x_port_link_down()
46 pr_err("AFI timeout chip port %u", port->chip_port); in lan966x_port_link_down()
56 lan966x, DEV_CLOCK_CFG(port->chip_port)); in lan966x_port_link_down()
61 lan966x, DEV_MAC_ENA_CFG(port->chip_port)); in lan966x_port_link_down()
63 /* 3: Disable traffic being sent to or from switch port */ in lan966x_port_link_down()
66 lan966x, QSYS_SW_PORT_MODE(port->chip_port)); in lan966x_port_link_down()
[all …]
Dlan966x_lag.c1 // SPDX-License-Identifier: GPL-2.0+
7 static void lan966x_lag_set_aggr_pgids(struct lan966x *lan966x) in lan966x_lag_set_aggr_pgids() argument
9 u32 visited = GENMASK(lan966x->num_phys_ports - 1, 0); in lan966x_lag_set_aggr_pgids()
13 for (p = 0; p < lan966x->num_phys_ports; ++p) in lan966x_lag_set_aggr_pgids()
15 lan966x, ANA_PGID(p)); in lan966x_lag_set_aggr_pgids()
19 lan966x, ANA_PGID(p)); in lan966x_lag_set_aggr_pgids()
29 for (p = 0; p < lan966x->num_phys_ports; ++p) { in lan966x_lag_set_aggr_pgids()
30 struct lan966x_port *port = lan966x->ports[p]; in lan966x_lag_set_aggr_pgids()
32 if (!port || !port->bond) in lan966x_lag_set_aggr_pgids()
39 for (lag = 0; lag < lan966x->num_phys_ports; ++lag) { in lan966x_lag_set_aggr_pgids()
[all …]
Dlan966x_ets.c1 // SPDX-License-Identifier: GPL-2.0+
15 return max_t(u32, 1, res) - 1; in lan966x_ets_hw_cost()
22 struct lan966x *lan966x = port->lan966x; in lan966x_ets_add() local
29 if (qopt->parent != TC_H_ROOT) in lan966x_ets_add()
30 return -EINVAL; in lan966x_ets_add()
32 params = &qopt->replace_params; in lan966x_ets_add()
33 if (params->bands != NUM_PRIO_QUEUES) in lan966x_ets_add()
34 return -EINVAL; in lan966x_ets_add()
36 for (i = 0; i < params->bands; ++i) { in lan966x_ets_add()
37 /* In the switch the DWRR is always on the lowest consecutive in lan966x_ets_add()
[all …]
Dlan966x_taprio.c1 // SPDX-License-Identifier: GPL-2.0+
12 #define LAN966X_TAPRIO_MAX_CYCLE_TIME_NS (NSEC_PER_SEC - 1)
43 return port->chip_port * LAN966X_TAPRIO_ENTRIES_PER_PORT + entry; in lan966x_taprio_list_index()
48 struct lan966x *lan966x = port->lan966x; in lan966x_taprio_list_state_get() local
51 val = lan_rd(lan966x, QSYS_TAS_LST); in lan966x_taprio_list_state_get()
58 struct lan966x *lan966x = port->lan966x; in lan966x_taprio_list_index_state_get() local
62 lan966x, QSYS_TAS_CFG_CTRL); in lan966x_taprio_list_index_state_get()
70 struct lan966x *lan966x = port->lan966x; in lan966x_taprio_list_state_set() local
74 lan966x, QSYS_TAS_LST); in lan966x_taprio_list_state_set()
80 struct lan966x *lan966x = port->lan966x; in lan966x_taprio_list_shutdown() local
[all …]
Dlan966x_fdma.c1 // SPDX-License-Identifier: GPL-2.0+
12 struct lan966x *lan966x = (struct lan966x *)fdma->priv; in lan966x_fdma_rx_dataptr_cb() local
13 struct lan966x_rx *rx = &lan966x->rx; in lan966x_fdma_rx_dataptr_cb()
16 page = page_pool_dev_alloc_pages(rx->page_pool); in lan966x_fdma_rx_dataptr_cb()
18 return -ENOMEM; in lan966x_fdma_rx_dataptr_cb()
20 rx->page[dcb][db] = page; in lan966x_fdma_rx_dataptr_cb()
29 struct lan966x *lan966x = (struct lan966x *)fdma->priv; in lan966x_fdma_tx_dataptr_cb() local
31 *dataptr = lan966x->tx.dcbs_buf[dcb].dma_addr; in lan966x_fdma_tx_dataptr_cb()
39 struct lan966x *lan966x = (struct lan966x *)fdma->priv; in lan966x_fdma_xdp_tx_dataptr_cb() local
41 *dataptr = lan966x->tx.dcbs_buf[dcb].dma_addr + XDP_PACKET_HEADROOM; in lan966x_fdma_xdp_tx_dataptr_cb()
[all …]
Dlan966x_dcb.c1 // SPDX-License-Identifier: GPL-2.0+
25 /* Lan966x supported apptrust policies */
40 for (int i = 0; i < conf->nselectors; i++) in lan966x_dcb_apptrust_contains()
41 if (conf->selectors[i] == selector) in lan966x_dcb_apptrust_contains()
74 qos.default_prio = fls(qos.default_prio) - 1; in lan966x_dcb_app_update()
83 qos.pcp_rewr.map[i] = fls(pcp_rewr_map.map[i]) - 1; in lan966x_dcb_app_update()
93 qos.dscp_rewr.map[i] = fls64(dscp_rewr_map.map[i]) - 1; in lan966x_dcb_app_update()
97 if (lan966x_dcb_apptrust_contains(port->chip_port, DCB_APP_SEL_PCP)) { in lan966x_dcb_app_update()
105 if (lan966x_dcb_apptrust_contains(port->chip_port, IEEE_8021QAZ_APP_SEL_DSCP)) { in lan966x_dcb_app_update()
124 struct lan966x *lan966x = port->lan966x; in lan966x_dcb_ieee_dscp_setdel() local
[all …]
Dlan966x_tc_flower.c1 // SPDX-License-Identifier: GPL-2.0+
13 switch (st->admin->vtype) { in lan966x_tc_is_known_etype()
15 switch (etype) { in lan966x_tc_is_known_etype()
24 switch (etype) { in lan966x_tc_is_known_etype()
37 NL_SET_ERR_MSG_MOD(st->fco->common.extack, in lan966x_tc_is_known_etype()
48 struct netlink_ext_ack *extack = st->fco->common.extack; in lan966x_tc_flower_handler_control_usage()
52 flow_rule_match_control(st->frule, &match); in lan966x_tc_flower_handler_control_usage()
53 if (match.mask->flags & FLOW_DIS_IS_FRAGMENT) { in lan966x_tc_flower_handler_control_usage()
54 if (match.key->flags & FLOW_DIS_IS_FRAGMENT) in lan966x_tc_flower_handler_control_usage()
55 err = vcap_rule_add_key_bit(st->vrule, in lan966x_tc_flower_handler_control_usage()
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/net/
Dmicrochip,lan966x-switch.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/net/microchip,lan966x-switch.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Microchip Lan966x Ethernet switch controller
10 - Horatiu Vultur <horatiu.vultur@microchip.com>
13 The lan966x switch is a multi-port Gigabit AVB/TSN Ethernet Switch with
14 two integrated 10/100/1000Base-T PHYs. In addition to the integrated PHYs,
15 it supports up to 2RGMII/RMII, up to 3BASE-X/SERDES/2.5GBASE-X and up to
16 2 Quad-SGMII/Quad-USGMII interfaces.
[all …]
Dmscc,miim.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
13 - $ref: mdio.yaml#
18 - mscc,ocelot-miim
19 - microchip,lan966x-miim
21 "#address-cells":
24 "#size-cells":
29 - description: base address
[all …]
/linux-6.12.1/arch/arm/boot/dts/microchip/
Dlan966x.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * lan966x.dtsi - Device Tree Include file for Microchip LAN966 family SoC
11 #include <dt-bindings/interrupt-controller/irq.h>
12 #include <dt-bindings/interrupt-controller/arm-gic.h>
13 #include <dt-bindings/mfd/atmel-flexcom.h>
14 #include <dt-bindings/dma/at91.h>
15 #include <dt-bindings/gpio/gpio.h>
16 #include <dt-bindings/clock/microchip,lan966x.h>
21 interrupt-parent = <&gic>;
22 #address-cells = <1>;
[all …]
Dlan966x-pcb8290.dts1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * lan966x-pcb8290.dts - Device Tree file for LAN966X-PCB8290 board
9 /dts-v1/;
10 #include "lan966x.dtsi"
11 #include "dt-bindings/phy/phy-lan966x-serdes.h"
15 compatible = "microchip,lan9668-pcb8290", "microchip,lan9668", "microchip,lan966";
17 gpio-restart {
18 compatible = "gpio-restart";
29 miim_a_pins: mdio-pins {
35 pps_out_pins: pps-out-pins {
[all …]
Dlan966x-pcb8291.dts1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * lan966x_pcb8291.dts - Device Tree file for PCB8291
5 /dts-v1/;
6 #include "lan966x.dtsi"
7 #include "dt-bindings/phy/phy-lan966x-serdes.h"
10 model = "Microchip EVB - LAN9662";
11 compatible = "microchip,lan9662-pcb8291", "microchip,lan9662", "microchip,lan966";
14 stdout-path = "serial0:115200n8";
21 gpio-restart {
22 compatible = "gpio-restart";
[all …]
Dlan966x-pcb8309.dts1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * lan966x_pcb8309.dts - Device Tree file for PCB8309
5 /dts-v1/;
6 #include "lan966x.dtsi"
7 #include "dt-bindings/phy/phy-lan966x-serdes.h"
10 model = "Microchip EVB - LAN9662";
11 compatible = "microchip,lan9662-pcb8309", "microchip,lan9662", "microchip,lan966";
20 stdout-path = "serial0:115200n8";
23 gpio-restart {
24 compatible = "gpio-restart";
[all …]
Dlan966x-kontron-kswitch-d10-mmt.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
6 /dts-v1/;
7 #include "lan966x.dtsi"
8 #include "dt-bindings/phy/phy-lan966x-serdes.h"
16 stdout-path = "serial0:115200n8";
19 gpio-restart {
20 compatible = "gpio-restart";
21 pinctrl-0 = <&reset_pins>;
22 pinctrl-names = "default";
29 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/pinctrl/
Dmscc,ocelot-pinctrl.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/pinctrl/mscc,ocelot-pinctrl.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
11 - Lars Povlsen <lars.povlsen@microchip.com>
16 - microchip,lan966x-pinctrl
17 - microchip,sparx5-pinctrl
18 - mscc,jaguar2-pinctrl
19 - mscc,luton-pinctrl
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/reset/
Dmicrochip,rst.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Microchip Sparx5 Switch Reset Controller
10 - Steen Hegelund <steen.hegelund@microchip.com>
11 - Lars Povlsen <lars.povlsen@microchip.com>
14 The Microchip Sparx5 Switch provides reset control and implements the following
16 - One Time Switch Core Reset (Soft Reset)
20 pattern: "^reset-controller@[0-9a-f]+$"
24 - microchip,sparx5-switch-reset
[all …]
/linux-6.12.1/drivers/hwmon/
Dlan966x-hwmon.c1 // SPDX-License-Identifier: GPL-2.0-only
17 * T = -3.4627e-11*(N^4) + 1.1023e-7*(N^3) + -1.9165e-4*(N^2) +
18 * 3.0604e-1*(N^1) + -5.6197e1
20 * where [-56.197, 136.402]C and N = [0, 1023].
29 * T = -34627e-12*(N^4) + 110230e-9*(N^3) + -191650e-6*(N^2) +
30 * 306040e-3*(N^1) + -56197
32 * where T = [-56197, 136402]mC and N = [0, 1023].
37 {4, -34627, 1000, 1},
39 {2, -191650, 1000, 1},
41 {0, -56197, 1, 1}
[all …]

12