FreeBSD driver development (network) where to start for VisionFive2

I have a VisionFive 2 RISC-V board, but according to another thread the both gigabit network interfaces are currently not supported. So my plan if nobody started with it, I want to create an driver for it. So my question because I never created a driver for FreeBSD before, is there a good starting point?

The reason is I want use the VisionFive 2 with FreeBSD as firewall for my home network. Therefore I need network support. And is also a good for the purpose of education.

EDIT:
I think it should be possible for me to create a driver. The DTS from the network interface source from Linux for the JH7110 SoC:
C:
gmac0: ethernet@16030000 {
            compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20";
            reg = <0x0 0x16030000 0x0 0x10000>;
            clocks = <&aoncrg JH7110_AONCLK_GMAC0_AXI>,
                 <&aoncrg JH7110_AONCLK_GMAC0_AHB>,
                 <&syscrg JH7110_SYSCLK_GMAC0_PTP>,
                 <&aoncrg JH7110_AONCLK_GMAC0_TX_INV>,
                 <&syscrg JH7110_SYSCLK_GMAC0_GTXC>;
            clock-names = "stmmaceth", "pclk", "ptp_ref",
                      "tx", "gtx";
            resets = <&aoncrg JH7110_AONRST_GMAC0_AXI>,
                 <&aoncrg JH7110_AONRST_GMAC0_AHB>;
            reset-names = "stmmaceth", "ahb";
            interrupts = <7>, <6>, <5>;
            interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
            rx-fifo-depth = <2048>;
            tx-fifo-depth = <2048>;
            snps,multicast-filter-bins = <64>;
            snps,perfect-filter-entries = <256>;
            snps,fixed-burst;
            snps,no-pbl-x8;
            snps,force_thresh_dma_mode;
            snps,axi-config = <&stmmac_axi_setup>;
            snps,tso;
            snps,txpbl = <16>;
            snps,rxpbl = <16>;
            starfive,syscon = <&aon_syscon 0xc 0x12>;
            status = "disabled";
        };

Is a Synopsis compatible network interface. Are there any existing drivers which use a Synopsis network IP?

EDIT:
Yes there is an driver sys/dev/dwc/if_dwc.c. But should be version 5.20 compatible from the IP core.
 
Back
Top