How to configure the device tree to set FMAN in independent mode and how to disable/bypass PAMU?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure the device tree to set FMAN in independent mode and how to disable/bypass PAMU?

Jump to solution
1,712 Views
paramahansapolo
Contributor I

Hello all,

    I'm using a customized board based on P4080.

   For debugging purposes I would like to set FMAN in independent mode and to disable/bypass PAMU.

   Is there a way to do that???

   How should I configure the device tree to set FMAN in independent mode???

   My board has 4-dtsec ports ports connected to an external ethernet switch (Marvell 98DX106) using SGMII and one dtsec port connected to an external PHY (Marvell Alaska 88E1512) using RGMII.

   Many thanks in advance,

  -Paramahansa

0 Kudos
1 Solution
1,084 Views
bpe
NXP Employee
NXP Employee

Linux DPAA Ethernet driver does not support independent mode, you cannot configure for it. As of PAMU, unselect "Freescale IOMMU Support " (option CONFIG_FSL_PAMU) under "IOMMU Support" in the kernel configuration menu and rebuild. 


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
1,083 Views
paramahansapolo
Contributor I

Hi Platon,

 Thank you for your quick and very helpful reply.
 As a feedback for reference, the problem I was observing was big delays on some of network packets. I observed delays of up to 8 seconds. However, no packets drops and no errors were accounted in the error counter registers.  As a consecuence of the delays, after a while, I was always getting a "sndmsg buffer full" message.  And no more packet were seen in the network for a some time after which transfer resumed intermitently (ie, the behavior repeated again and again).

 Removing the PAMU support (CONFIG_FSL_PAMU) from the kernel seemed to fix the problem.  So far my tests are running smooth.

 Now, the remaining question is how to properly configure PAMU.
 I would apprecite any suggestion.
 Below is the configuration I'm using for PAMU and for the DTSEC I'm using (connected to external PHY using RGMII).

              fman0: fman@400000 {
                        #address-cells = <0x1>;
                        #size-cells = <0x1>;
                        cell-index = <0x0>;
                        clock-frequency = <0x11e1a300>;
                        clock-names = "fmanclk";
                        clocks = <0x2 0x3 0x0>;
                        compatible = "fsl,fman", "simple-bus";
                        fsl,qman-channel-range = <0x40 0xc>;
                        interrupts = <0x60 0x2 0x0 0x0 0x10 0x2 0x1 0x1>;
                        linux,phandle = <0x5c>;
                        phandle = <0x5c>;
                        ranges = <0x0 0x400000 0x100000>;
                        reg = <0x400000 0x100000>;

                       enet0: ethernet@e0000 {
                                cell-index = <0x0>;
                                compatible = "fsl,fman-1g-mac";
                                fsl,port-handles = <&fman0_rx0 &fman0_tx0>;
                                linux,phandle = <0x4f>;
                                local-mac-address = [00 04 9f 02 1f bb];
                                phandle = <0x4f>;
                                phy-connection-type = "rgmii-id";
                                phy-handle = <&phy0>;
                                phy-mode = "rgmii-id";
                                ptimer-handle = <&ptp_timer0>;
                                reg = <0xe0000 0x1000>;
                        };

                        mdio0: mdio@e1120 {
                                #address-cells = <0x1>;
                                #size-cells = <0x0>;
                                compatible = "fsl,fman-mdio";
                                linux,phandle = <0x4d>;
                                phandle = <0x4d>;
                                reg = <0xe1120 0xee0>;

                                phy0: ethernet-phy@0 {
                                        compatible = "marvell,88e1510";
                                        device_type = "ethernet-phy";
                                        linux,phandle = <0x19>;
                                        phandle = <0x19>;
                                        reg = <0x0>;
                                };
                        };

                        fman0_rx0: port@88000 {
                                cell-index = <0x0>;
                                compatible = "fsl,fman-port-1g-rx";
                                fsl,liodn = <0x2b>;
                                linux,phandle = <0x1a>;
                                phandle = <0x1a>;
                                reg = <0x88000 0x1000>;
                        };

                        fman0_tx0: port@a8000 {
                                cell-index = <0x0>;
                                compatible = "fsl,fman-port-1g-tx";
                                fsl,qman-channel-id = <0x41>;
                                linux,phandle = <0x1b>;
                                phandle = <0x1b>;
                                reg = <0xa8000 0x1000>;
                        };

                        ptp_timer0: rtc@fe000 {
                                compatible = "fsl,fman-rtc";
                                linux,phandle = <0x1c>;
                                phandle = <0x1c>;
                                reg = <0xfe000 0x1000>;

                        ....
                        ....
                        ....
                    };

               iommu@20000 {
                        #address-cells = <0x1>;
                        #size-cells = <0x1>;
                        compatible = "fsl,pamu-v1.0", "fsl,pamu";
                        fsl,portid-mapping = <0xf80000>;
                        interrupts = <0x18 0x2 0x0 0x0 0x10 0x2 0x1 0x1e>;
                        ranges = <0x0 0x20000 0x5000>;
                        reg = <0x20000 0x5000>;

                        pamu0: pamu@0 {
                                fsl,primary-cache-geometry = <0x20 0x1>;
                                fsl,secondary-cache-geometry = <0x80 0x2>;
                                linux,phandle = <0x40>;
                                phandle = <0x40>;
                                reg = <0x0 0x1000>;
                        };

                        pamu1: pamu@1000 {
                                fsl,primary-cache-geometry = <0x20 0x1>;
                                fsl,secondary-cache-geometry = <0x80 0x2>;
                                linux,phandle = <0x16>;
                                phandle = <0x16>;
                                reg = <0x1000 0x1000>;
                        };

                        pamu2: pamu@2000 {
                                fsl,primary-cache-geometry = <0x20 0x1>;
                                fsl,secondary-cache-geometry = <0x80 0x2>;
                                reg = <0x2000 0x1000>;
                        };

                        pamu3: pamu@3000 {
                                fsl,primary-cache-geometry = <0x20 0x1>;
                                fsl,secondary-cache-geometry = <0x80 0x2>;
                                reg = <0x3000 0x1000>;
                        };

                        pamu4: pamu@4000 {
                                fsl,primary-cache-geometry = <0x20 0x1>;
                                fsl,secondary-cache-geometry = <0x80 0x2>;
                                reg = <0x4000 0x1000>;
                        };
                };

   Many thanks in advance,

   -Paramahansa

0 Kudos
1,085 Views
bpe
NXP Employee
NXP Employee

Linux DPAA Ethernet driver does not support independent mode, you cannot configure for it. As of PAMU, unselect "Freescale IOMMU Support " (option CONFIG_FSL_PAMU) under "IOMMU Support" in the kernel configuration menu and rebuild. 


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos