AM3352: Upgrading Kernel from 3.14 to 5.4, Ethernet operating differently

48 views
Skip to first unread message

anthony....@gmail.com

unread,
Nov 6, 2020, 2:01:20 PM11/6/20
to BeagleBoard
Hello,


In 2015 my company developed a custom board based on the Beaglebone Black (AM3352) using the 3.14 kernel from https://github.com/beagleboard/linux. We now need to update to the 5.4 kernel. We have attempted to port our kernel source and device tree customization into the 5.4.0 kernel that we got from https://github.com/beagleboard/linux, and are currently configuring the 5.4 kernel with the same config file we used for 3.14.


Not surprisingly, various components in our system were not working, and we are slowly working through these issues.

I have recently gotten the Ethernet functioning, but in 3.14 we had setup the Ethernet to be interrupt driven. In 5.4, it appears that the Ethernet is using polling:

cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
Generic PHY 4a101000.mdio:03: attached PHY driver [Generic PHY] (mii_bus:phy_addr=4a101000.mdio:03, irq=POLL)
cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
net eth1: initializing cpsw version 1.12 (0)
Generic PHY 4a101000.mdio:07: attached PHY driver [Generic PHY] (mii_bus:phy_addr=4a101000.mdio:07, irq=POLL)

Also, in /proc/interrupts I do not see interrupts setup for the Ethernet. In our previous 3.14 kernel, interrupts are setup for 40-43.


Here is the relevant piece of my device tree taken from am33xx-l4.dtsi

            mac: ethernet@0 {
                dual_emac = <1>;
                compatible = "ti,am335x-cpsw","ti,cpsw";
                //ti,hwmods = "cpgmac0";
                clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
                clock-names = "fck", "cpts";
                cpdma_channels = <8>;
                ale_entries = <1024>;
                bd_ram_size = <0x2000>;
                mac_control = <0x20>;
                slaves = <2>;
                active_slave = <0>;
                cpts_clock_mult = <0x80000000>;
                cpts_clock_shift = <29>;
                reg = <0x0 0x800
                       0x1200 0x100>;
                #address-cells = <1>;
                #size-cells = <1>;
                                interrupt-parent = <&intc>;
                /*
                 * c0_rx_thresh_pend
                 * c0_rx_pend
                 * c0_tx_pend
                 * c0_misc_pend
                 */
                interrupts = <40 41 42 43>;
                ranges = <0 0 0x8000>;
                syscon = <&scm_conf>;

                davinci_mdio: mdio@1000 {
                    compatible = "ti,cpsw-mdio","ti,davinci_mdio";
                    clocks = <&cpsw_125mhz_clkctrl AM3_CPSW_125MHZ_CPGMAC0_CLKCTRL 0>;
                    clock-names = "fck";
                    #address-cells = <1>;
                    #size-cells = <0>;
                    bus_freq = <1000000>;
                    reg = <0x1000 0x100>;
                };

                cpsw_emac0: slave@200 {
                    /* Filled in by U-Boot */
                    mac-address = [ 00 00 00 00 00 00 ];
                                           dual_emac_res_vlan = <1>;
                    phys = <&phy_gmii_sel 1 1>;
                };

                cpsw_emac1: slave@300 {
                    /* Filled in by U-Boot */
                    mac-address = [ 00 00 00 00 00 00 ];
                    dual_emac_res_vlan = <2>;
                    phys = <&phy_gmii_sel 2 1>;
                };
            };


This block was ported in from our 3.14 kernel, with modifications we felt needed. You can see that the block references our interrupt controller intc, and interrupts 40-43 are defined. If anyone has any tips on what I might be doing wrong here it would be greatly appreciated, thank you in advance! - Anthony

Reply all
Reply to author
Forward
0 new messages