Commit Graph
54 Commits
Author SHA1 Message Date
logicog c8e21b394b Add forgotten register RTL837X_REG_LED3_2_SET3
The register had been forgotten in the LED configuration registers,
add the register definition and print out the content in leds_dump().
2026-04-24 10:50:53 +02:00
logicog 1836c7dcb6 Add Bandwidth control for ingress/egreess at port 2026-03-08 19:04:48 +01:00
TylerDurden-23 90be2f47a3 Merge branch 'logicog:main' into fix-link-speed 2026-02-11 12:30:26 +01:00
chriz 859a50bd82 fix-link-speed 2026-02-10 23:17:04 +01:00
logicog 59894e68cb Add LED-pad mapping 2026-02-08 20:24:58 +01:00
logicog 9424aa3a3b LED configuration support 2026-02-08 20:23:30 +01:00
logicog 7a57416e4c Add MACHINE_HG0402XG_V1_1 2026-02-08 20:23:29 +01:00
logicog ea230615f9 Use a MAC address based on the SoC's UUID
We use the SoC's UUID to generate a fixed MAC for a particular
switch device. The MAC generated uses a Realtek prefix and then
is followed by 3 bytes genertaed from the first 3 bytes of the
UUID xored with the last byte in order to prevent being able
to deduce the UUID from the public MAC.
2026-02-08 15:49:49 +01:00
chriz ed37d75aba Enable EEE on boot, do not reset interfaces immediately to save boot time. 2026-02-05 17:23:50 +01:00
René van Dorst b7b4594406 N-type SOC need to swap some Serdes lines to make it work.
Without this fix N-type SOC devices like RTL8372N, RTL8383N and also the
4-port PHY RTL8224N, don't have a functional Serdes. Although the SOC
sees a link, there is no packet flow on both SFP-port nor RTL8224 ports.

Added helper functions to read/write to the RTL8224.
RTL8224 has the same register layout so we can use the same register
defines as for the main SOC.
2026-01-25 17:22:51 +01:00
René van Dorst aa750d8ff1 Detect SOC type and use detected SOC type to init the hardware.
Detect the SOC type and variant. RTL8372 vs RTL8373 and also is it as
non-N/N variant of the SOC.
Even if the machine profile is wrong the hardware will be initilised on
the detected type.
2026-01-25 16:55:43 +01:00
feelfree69 0345bf7bf2 Use DIO mode for normal operation; disable DIO before flashing. Use SYS_LED for indicating booting (slow), flashing (fast) and normal operation (on) 2026-01-22 19:38:17 +01:00
logicog 73a355cff5 Add L2-table access method defintions 2026-01-17 12:56:43 +01:00
René van Dorst 00b42db5da Merge pull request #78 from logicog/nic_demagic
MIB Counter fixes and Detailed Display
2026-01-15 18:45:38 +00:00
logicog 66c58a50df Fix typo in register address for RLDP Leds 2026-01-13 18:02:21 +01:00
logicog d2d7ab7ff1 De-magic NIC rx and tx registers, cleanup 2026-01-11 07:51:18 +01:00
logicog 2b364943c2 Fix system clock 2025-12-25 10:27:37 +01:00
logicog c8c524b71f Add an implementation for IGMP
This adds an implementation for trapping IGMP packets to the CPU
which will identify IGMPv1/2/3 packets, but handle only v3.
The implementation then inserts/updates/deletes L3 MC entries
in the L3 lookup table. The entries consist of an Ipv4
Destination IP (the IPv4 MC address), a Source IP (0.0.0.0) and
a Portmask. Note that this implementation is not VLAN aware,
as there is no hardware support in the device.

An alternative strategy is to control switching of the L2-MC packets
in which the IPv4-MC packets are transported (dst-MaC is
01:00:5e:xx:yy:zz, with xx:yy:zz corresponding to bits in the Ipv4-MC
address). This will allow to use VLAN-aware packet switching. While
code support is there for table insert/update/deletes, some further
L2 configuration is missing.

There is no support for IPv6 MC, yet.
2025-12-15 06:54:41 +01:00
logicog a84c5dcd0c IGMP refactoring 2025-12-14 20:35:17 +01:00
logicog 1cdc8d2cf7 De-Magic switch init 2025-12-13 09:25:58 +01:00
logicog e9b8ab5b79 Correct handling of SFP ports in stat command
This fixes handling of the SFP ports in the stat command.
The output of the command now is for physical ports, which however are
not shown in sequence.
2025-12-08 08:39:54 +01:00
logicog 42ea80a480 Update LAG configuration registers 2025-12-05 07:38:16 +01:00
logicog 6e0e907afb Add register definitions for random number generation 2025-11-29 12:44:23 +01:00
logicog 9c7572b289 De-Magic I2C configuration for SFP-EEPROM reads 2025-11-02 09:49:13 +01:00
logicog 0d64efacb3 Add EEE status query 2025-10-20 18:35:35 +02:00
logicog 717247bc0e Add MAC-EEE functionality 2025-10-11 13:09:47 +02:00
René van Dorst f148bdad20 port: fix REG_SET() compiler warning.
Compiler
rtl837x_port.c:466: warning 116: right shifting more than size of object changed to zero

provided value is a uint16. So shifting it more then 16 cause this error.
Solution: cast the value to uint32_t.
2025-09-11 07:36:01 +02:00
logicog 44298f2b71 Add MSTP port state registers for STP
Each register holds the STP port state for one Forwarding ID (FID),
of which there 16 can be used by the RTL8372. The mapping between
FID and VLAN is done in the VLAN table. This allows the SoC
to maintain 16 different MSTP states.

In the register 2 bits per port are used to designate the following
(R)STP states
00 disable, 01 blocking, 10 learning, 11 forwarding
The STP listening state is not available.
2025-09-08 22:22:57 +02:00
René van Dorst 1b578405c0 Remove unused and not related to GPIO define 2025-09-07 14:56:13 +02:00
René van Dorst 74b8280d80 gpio: SOC only has 64 gpio not 96.
Remove BANK_A
Rename BANK_B to GPIO_00_31
Rename BACK_C to GPIO_32_63

Added also _INPUT, _DIRECTIOn registers
2025-09-06 17:04:25 +02:00
logicog 326d94f48d Add support for STP 2025-08-30 18:42:46 +02:00
logicog 963d53335c Add initial IGMP handling via ASIC 2025-08-29 17:23:14 +02:00
logicog 739ab5ef40 Cleanup of register definitions 2025-08-29 17:12:58 +02:00
logicog ef742f8f19 Cleanup and fix flushing of L2 UC entries 2025-08-24 19:26:24 +02:00
logicog 81b7e4fa87 Identify pin configuration registers 2025-08-22 09:04:34 +02:00
logicog 0a05fe923e Add port isolation methods 2025-08-22 07:15:49 +02:00
logicog ad53165351 Introduce identified RX/TX control register names 2025-08-19 09:34:14 +02:00
logicog c01014f1d8 Add more documentation on vlans and trunking 2025-07-26 19:10:24 +02:00
logicog fcd1f85eb6 Add trunking support and initial L2 setup 2025-07-25 22:50:27 +02:00
logicog 0b30019769 Use names for I2C-controller registers 2025-07-23 08:34:26 +02:00
logicog 066edd672e Add off-state for SDS 2025-07-22 09:34:40 +02:00
logicog b0a41a5af6 Add support for RTL8372-devices with 2 SFP+ ports 2025-07-17 13:25:07 +02:00
logicog 84b84f5c32 Cleanup of L2 and mirroring features 2025-07-14 07:59:31 +02:00
logicog b59f51b3ca Cleanup of initialitation, make debug code conditional 2025-06-29 11:10:29 +02:00
logicog 5faf31cdb8 Moving PHY code to BANK1 2025-06-25 15:30:50 +02:00
logicog 73a0a7d137 Add banking support 2025-06-25 13:20:06 +02:00
logicog b8352f9430 Implement ARP broadcast and make ping work 2025-06-23 17:57:54 +02:00
logicog e4d477938d Detect RTL8373 and name registers for GPIO. Enable RTL8224 2025-06-16 06:55:47 +02:00
logicog c435feee45 Add REG_SET macro 2025-06-15 18:18:36 +02:00
logicog 9a69fac07a Adding support for 2.5Gbit Ethernet modules 2025-06-14 09:52:15 +02:00