Lines Matching +full:a0 +full:- +full:low
4 * SPDX-License-Identifier: Apache-2.0
48 #define PRV_DATA(ctx) ((struct ksz8xxx_data *const)(ctx)->prv_data)
75 spi_write_dt(&pdev->spi, &tx); in dsa_ksz8xxx_write_reg()
113 if (!spi_transceive_dt(&pdev->spi, &tx, &rx)) { in dsa_ksz8xxx_read_reg()
154 * Wait for SPI of KSZ8794 being fully operational - up to 10 ms
157 tmp != KSZ8XXX_CHIP_ID0_ID_DEFAULT && timeout > 0; timeout--) {
164 return -ENODEV;
183 return -ENODEV;
196 * According to KSZ8794 manual - write to static mac address table
254 * According to KSZ8794 manual - read from static mac address table
323 * Loop through ports - The same setup when tail tagging is enabled or
362 * Loop through ports - The same setup when tail tagging is enabled or
401 * Loop through ports - The same setup when tail tagging is enabled or
446 * https://microchipsupport.force.com/s/article/Solution-for-Short-Cable-
447 * Problems-with-the-KSZ8795-Family
452 * 2) There may be a link-up issue in the capacitor AC coupling mode for port
460 * coming in to get more accurate readings from low amplitude signals.
461 * When using some type of short cable (for example, CAT-6 cable with low
462 * attenuation to high frequencies signal vs. CAT-5 cable) or board to board
464 * is amplified too much and cause the link-up failed with same boost setting in
470 * w 6e a0 //write the indirect register
472 * w a0 15 //write 0x15 to REG (0x3c) to optimize the EQ. The default is 0x0a.
477 * The indirect DSP register (0x3c) is an 8-bit register, the bits describe as
482 * 7-5 Reserved RO 000 000
487 * 3-1 Cpu_EQ_CP_Points Control of EQ training is
488 * over-boosted or
489 * [2:0] under-boosted, that means to
505 * Ethernet short cables like CAT-5, CAT-5e without any problem.
525 * Solution for Using CAT-5E or CAT-6 Short Cable with a Link Issue for the
529 * Solution for Using CAT-5E or CAT-6 Short Cable with a Link Issue for the
531 * https://microchipsupport.force.com/s/article/Solution-for-Using-CAT-5E-or
532 * -CAT-6-Short-Cable- with-a-Link-Issue-for-the-KSZ8795-Family
538 * short CAT-5E or CAT-6 cable (about <=30 meter). The failure rate may be about
539 * 2-5%.
543 * Basically, KSZ8795 10/100 Ethernet switch family was designed based on CAT-5
545 * cables of CAT-5E and CAT-6, both cables have wider bandwidth that has
546 * different frequency characteristics than CAT-5 cable. More higher frequency
547 * component of the CAT-5E or CAT-6 will be amplified in the receiving amplifier
549 * components receiving signal amplitude and cause the link-up failure with
554 * Based on the root cause above, adjust the receiver low pass filter to reduce
556 * range when using CAT-5E and CAT-6 cable.
558 * Set the indirect register as follows for the receiver low pass filter.
559 * Format is w [Register address] [8-bit data]
560 * w 6e a0 //write the indirect register
562 * w a0 40 //write 0x40 to indirect register (0x4c) to reduce low pass filter
565 * The register 0x4c bits [7:6] for receiver low pass filter bandwidth control.
569 * solve the link issue if using CAT-5E and CAT-6 short cables.
571 * The indirect register (0x4C) is an 8-bit register. The bits [7:6] are
577 * 7-6 RX BW control Low pass filter bandwidth R/W 00 01
582 * 5 Enable Near-end loopback R/W 0 0
583 * 4-3 BTRT Additional reduce R/W 00 00
585 * 1-0 FXD reference setting 1.7V, 2V,
591 * For the wider bandwidth cables or on-board capacitor AC coupling
595 * short cable or on-board capacitors AC coupling application.
598 * Format is w [Register address] [8-bit data]
599 * w 6e a0 //write the indirect register
601 * w a0 00 //write 0x00 to indirect register (0x08) to make EQ initial value
606 * The indirect DSP register (0x08) is an 8-bit register. The bits [5:0] are
613 * 5-0 Cpu_EQ_Index Equalizer index control
617 * Due to CAT-5E and CAT-6 cable having wider bandwidth, more high frequency
618 * components will pass the low pass filter into the receiving amplifier and
620 * Reducing the receiver low pass filter bandwidth will be the best way to
621 * reduce the high frequency components to meet CAT-5E and CAT-6 short cable
622 * link issue and doesn’t affect CAT-5 cable because CAT-5 is not a wider
628 * using very short cable or an on-board direct connection like capacitors AC
646 LOG_INF("apply workarkound 0x02 link issue CAT-5E/6 on KSZ8794");
659 LOG_INF("apply workarkound 0x04 link issue CAT-5E/6 on KSZ8794");
715 ret = -1;
722 /* set Low-Speed Interface Drive Strength for MII and RMMI */
743 return -ENODEV;
754 /* Low level initialization code for DSA PHY */
759 if (pdev->is_init) {
772 if (!spi_is_ready_dt(&pdev->spi)) {
774 pdev->spi.bus->name);
775 return -ENODEV;
806 pdev->is_init = true;
821 /* Skip Switch <-> CPU Port */
827 if (link_state && !context->link_up[i]) {
829 net_eth_carrier_on(context->iface_slave[i]);
830 } else if (!link_state && context->link_up[i]) {
832 net_eth_carrier_off(context->iface_slave[i]);
834 context->link_up[i] = link_state;
837 k_work_reschedule(&context->dsa_work, DSA_STATUS_PERIOD_MS);
842 struct dsa_context *data = dev->data;
853 struct dsa_context *data = dev->data;
864 struct dsa_context *data = dev->data;
888 struct dsa_context *data = dev->data;
892 return -EINVAL;
914 struct dsa_context *data = dev->data;
941 (void)net_linkaddr_create(&lladst, hdr->dst.addr, sizeof(hdr->dst.addr),
949 if (len < (DSA_MIN_L2_FRAME_SIZE - DSA_L2_FCS_SIZE)) {
951 pad = DSA_MIN_L2_FRAME_SIZE - DSA_L2_FCS_SIZE - len;
954 buf = net_buf_alloc_len(net_buf_pool_get(pkt->buffer->pool_id),
965 dbuf = net_buf_simple_tail(&(buf->b));
969 * For master port (eth0) set the bit 7 to use look-up table to pass
973 * bit 0 -> eth1, bit 1 -> eth2. bit 2 -> eth3
982 port_idx = (1 << (ctx->dsa_port_idx));
985 LOG_DBG("TT - port: 0x%x[%p] LEN: %d 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x",
996 net_buf_frag_add(pkt->buffer, buf);
1011 * - Pointer to struct net_if
1030 net_pkt_skip(pkt, plen - DSA_KSZ8794_EGRESS_TAG_LEN);
1033 net_pkt_update_length(pkt, plen - DSA_KSZ8794_EGRESS_TAG_LEN);
1048 LOG_DBG("TT - plen: %d pnum: %d pos: 0x%p dsa_port_idx: %d",
1049 plen - DSA_KSZ8794_EGRESS_TAG_LEN, pnum,
1050 net_pkt_cursor_get_pos(pkt), ctx->dsa_port_idx);
1059 net_if_get_device(iface)->config;
1062 struct dsa_context *context = dev->data;
1065 int i = pdev->iface_init_count;
1068 if (context->iface_master == NULL) {
1070 context->iface_master = net_if_lookup_by_dev(dm);
1071 if (context->iface_master == NULL) {
1080 ctx_master = net_if_l2_data(context->iface_master);
1081 ctx_master->dsa_ctx = context;
1084 if (context->iface_slave[i] == NULL) {
1085 context->iface_slave[i] = iface;
1086 net_if_set_link_addr(iface, cfg->mac_addr,
1087 sizeof(cfg->mac_addr),
1089 ctx->dsa_port_idx = i;
1090 ctx->dsa_ctx = context;
1099 pdev->iface_init_count++;
1107 if (pdev->iface_init_count == context->num_slave_ports) {
1108 k_work_init_delayable(&context->dsa_work, dsa_delayed_work);
1109 k_work_reschedule(&context->dsa_work, DSA_STATUS_PERIOD_MS);
1141 * To make the code simpler - the special care needs to be put on
1142 * the proper placement of eth0, lan1, lan2, lan3, etc - to avoid
1147 * available for use - let's use it.
1151 * objdump -dst ./zephyr/CMakeFiles/zephyr.dir/drivers/ethernet/eth_mcux.c.obj\