Commit graph

1499 commits

Author SHA1 Message Date
Linux Build Service Account
daa18ac311 Merge "drivers: net: ipq6018: Removing the additional rx buffer allocation" 2022-09-10 00:51:40 -07:00
devi priya
067984e4b5 drivers: net: ipq6018: Removing the additional rx buffer allocation
During long run tests on image download in u-boot, 
EDMA crash was observed as the SKB buffer address 
returned by the RX descriptor was corrupted and was 
pointing to an invalid address:
clean_rx: p: 14 c: 0 skb: 61763b10
WARN: src_info_type:0x0. Drop skb:61763b10

The reason for corruption seems to be the RX buffer allocation that was
happening twice before initiating the EDMA for the next transaction.
This change removes the additional allocation of the Rx buffer which is
not needed.

Change-Id: I4a5b404527469ff3b981749aa4e05080f55807cd
Signed-off-by: devi priya <quic_devipriy@quicinc.com>
2022-09-08 12:54:07 +05:30
devi priya
2ff1847823 drivers: net: ipq9574: Removing the additional rx buffer allocation
During long run tests on image download in u-boot, 
EDMA crash was observed as the SKB buffer address 
returned by the RX descriptor was corrupted and was 
pointing to an invalid address:
clean_rx: p: 14 c: 0 skb: 61763b10
WARN: src_info_type:0x0. Drop skb:61763b10

The reason for corruption seems to be the RX buffer allocation that was
happening twice before initiating the EDMA for the next transaction.
This change removes the additional allocation of the Rx buffer which is
not needed.

Change-Id: I919024df8131fe87640ecc0d481b61012742efbf
Signed-off-by: devi priya <quic_devipriy@quicinc.com>
2022-09-08 12:52:01 +05:30
Ram Kumar D
8142f374a4 ipq: updated 32-bit RW support for mii & mdio utils
Change-Id: I50e2bf13cfde82e46cc9068e241f89aa7944bbe6
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-08-02 22:08:44 -07:00
Linux Build Service Account
e2b3415a66 Merge "drivers: net: ipq6018: Add optional active_port env support" 2022-07-22 13:47:23 -07:00
Linux Build Service Account
4550a00065 Merge "drivers: net: ipq807x: Add optional active_port env support" 2022-07-22 10:06:23 -07:00
Ram Kumar D
b5cd432c3a driver: net: ipq6018: add port 5 non-bridged support
vsi port configuration for the port 5 was missed out.
So added it.

Change-Id: I5180112786eb0a6d96ac71246beb0b39f5e166aa
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-20 11:11:12 +05:30
Ram Kumar D
17e16a28d3 drivers: net: ipq6018: Add optional active_port env support
This patch adds support for active_port env. With this
change in ipq6018, the end user has an option to
enable & maintain only 1 active ethernet port. There
are no multi-port use case in U-Boot and when multiple
ports were enabled for Kernel usecases, there were some
timeout issues in some special cases during crashdump
collection.

active_port can be used to configure the port which
will be used for TFTP download/upload in u-boot in
those setups. Example: To set Port2 as active_port
following command can be used:

setenv active_port 2 && savee

Note that, the active_port range is from 0 to 4 (there
are a total of 5 ports in ipq6018).

Change-Id: I5e41269ebab8eef96efeeb65f1324cacc9d56710
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-19 13:22:08 +05:30
Ram Kumar D
157ffcfdd2 drivers: net: ipq807x: Add optional active_port env support
This patch adds support for active_port env. With this
change in ipq807x, the end user has an option to
enable & maintain only 1 active ethernet port. There
are no multi-port use case in U-Boot and when multiple
ports were enabled for Kernel usecases, there were some
timeout issues in some special cases during crashdump
collection.

active_port can be used to configure the port which
will be used for TFTP download/upload in u-boot in
those setups. Example: To set Port2 as active_port
following command can be used:

setenv active_port 2 && savee

Note that, the active_port range is from 0 to 5 (there
are a total of 6 ports in ipq807x).

Change-Id: I1840cbeb2529cb2d47547852283a215aea551a4f
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-19 11:43:07 +05:30
Ram Kumar D
b8611c7623 driver: net: qca8084: add seperate configs for PHY & switch
Currently if CONFIG_QCA8084_PHY is enabled means, it will build
all qca8084 functions required for both PHY & switch mode. But,
some ipq devices might uses anyone of them. So, add configs to
seperate the PHY & switch mode and define it in corresponding
defconfig file as per the need.

Also, some of the qca8084 functions will be used only for debug
purpose, those functions are moved under the config QCA8084_DEBUG.

Thereby, we can save some space in the u-boot.

Change-Id: I7e5f53869629a0c7cbbb12daf04ed782c9693623
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-11 13:15:03 +05:30
Ram Kumar D
5fa35de070 driver: net: qca8084: reduce clk identifier string size
This size of clock identifier string is large, so which
in-turn reflects in the size of the qca8084_clk object file,
and thus increase uboot size. By reducing the clk identifier
string size, we can save around 0.9K.

Change-Id: Ic986155b6cc2692d67e9c855928ce8039d294d3f
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-11 10:55:15 +05:30
Ram Kumar D
75bc424247 driver: net: qca8084: change inline func to non-inline func
Currently, bottom level apis such as qca8084 clk and pinconf
functions are defined as inline functions, which took around
1.3K memory in the uboot. So, update those functions to non-
inline functions to save that space.

Change-Id: I2972ca80d7df80a72d4a027e790400f391546d4b
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-11 10:54:48 +05:30
Ram Kumar D
b717c79249 drivers: net: devsoc: enable init non-cache buf support
This changes initialize non-cache buffer every time
before edma configuration.

Change-Id: I3a4f84076516feeb7b578a7543d6e68d788c8931
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-08 08:54:45 +05:30
Ram Kumar D
9a6c369849 driver: net: devsoc: add support for S17C switch
Change-Id: If7ccaf9b63b68b0635f955228b161040ab5618cb
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-05 09:01:13 +05:30
Ram Kumar D
498754d0eb drivers: net: devsoc: Add support for QCA8084 switch mode
Change-Id: Ibc6517c39f0f9a24e18e62a6810b529b2d60afcf
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-05 09:01:13 +05:30
Ram Kumar D
3a42e3475f drivers: net: devsoc: add aquantia PHY support
Change-Id: I4671838eae0d0d7d47bb15a31235b686dc34dccb
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-05 09:01:13 +05:30
Ram Kumar D
b9cbde2bac driver: net: devsoc: removed the extra ports and uniphy
In devsoc, we have 2 ports and 2 uniphys, so removed the extra
ports and uniphy configurations from the source. Also, updated
the clock src configuration with respect available uniphys and
removed the SFP port support.

Change-Id: I557bd6d215508c190a3e733a0304873ecd02eb24
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-07-05 09:01:13 +05:30
Ram Kumar D
5fc0b17e2f driver: net: ipq9574: change the qca8084 link update logic
In qca8084 phy mode, each phy is assigned to one mac in the ipq9574,
where as in the switch mode, only mac1 will used for all the 4 ports
of the qca8084, mac2-4 will be left unused. So, updated the
logic to update the link status of the individual ports, when qca8084
is in switch mode.

Change-Id: I128c3eafb7c85c0db9d252e047457ea8820df368
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-06-29 12:01:54 +05:30
Ram Kumar D
0b04ce17b5 drivers: net: ipq9574: Add support for QCA8084 switch mode
Change-Id: I315fd246c59bf134e41752e01d2866589c64aeb8
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-06-15 23:09:38 -07:00
Ram Kumar D
cfc0877b85 drivers: net: Add switch mode support for QCA8084
Change-Id: I3e00ee6e54dadcae9c45bc157c6391e6f0dbda55
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-06-15 23:09:14 -07:00
Ram Kumar D
0782010934 drivers: net: ipq: correct the efuse for ES QCA8084 chip
Change-Id: Ice70f4b1b16eb43e7224bbc8f258ec1dae452f23
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-06-13 11:43:24 +05:30
Ram Kumar D
a95cba141c drivers: net: devsoc: added eth support for devsoc
Change-Id: I4d646c1a89d90febd573ae92980e0c665b1dc060
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-05-31 23:52:34 +05:30
Selvam Sathappan Periakaruppan
207cf5ff59 drivers: net: ipq: Update mdio macros
This patch renames the GCC macro which was added
for QCA8084 PHY to fix the conflict with similar
macro defined in ipq5018 platform.

Additionally, this patch also moves all QCA8084
macro definitions in MDIO driver under QCA8084_PHY
config.

Change-Id: Icd62bf260ffeae64bf67c0c1a58afb6ac4999e22
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-05-25 19:03:43 +05:30
Selvam Sathappan Periakaruppan
1c409bd8d6 drivers: net: ipq9574: Add support for qca8084
This patch adds support for qca8084 PHY based
ports. Accordingly, updates the uniphy, ppe, clock
configurations as required for qca8084 ports.

Change-Id: I2e687c10adba579b0d47d8f5b529fe920b7d0d7c
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-05-25 04:08:36 -07:00
Selvam Sathappan Periakaruppan
18d2b93ab3 drivers: net: Add support for QCA8084 PHY
This patch adds initial support for qca8084 PHY
which is based on qca8081 PHY.

qca8084 PHY has support for 4x2.5G.

Change-Id: Ic767c19fad050e5ee9a97ad7fa50c1b6b27893dd
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-05-25 04:08:31 -07:00
Selvam Sathappan Periakaruppan
3b4467169c drivers: net: ipq9574: Add optional active_port env
This patch adds support for active_port env. With this
change in ipq9574, the end user has an option to
enable & maintain only 1 active ethernet port. There
are no multi-port use case in U-Boot and when multiple
ports were enabled for Kernel usecases, there were some
timeout issues in some special cases during crashdump
collection.

active_port can be used to configure the port which
will be used for TFTP download/upload in u-boot in
those setups. Example: To set Port2 as active_port
following command can be used:

setenv active_port 2 && savee

Note that, the active_port range is from 0 to 5 (there
are a total of 6 ports in ipq9574).

Change-Id: Ia2fc58abda7640f67afadfa01d0a5994aa48ea51
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-05-18 01:04:26 -07:00
Selvam Sathappan Periakaruppan
80ba1efa0e drivers: net: ipq9574: Remove desc/ring buffer freeing
The ring/desc's used non-cached memory which cannot
be free'd. Remove these free API's.

1 MB of memory is marked as non-cached and that is used
for EDMA rings/desc's and the same needn't be free'd. It
will be re-init each time during edma init.

Change-Id: Iac1e616db7c929d640c559024e4f65c6ad515400
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-29 19:19:56 +05:30
Selvam Sathappan Periakaruppan
c3b7374d76 drivers: net: ipq9574: Fix qca8075 phy inits
This patch moves the qca8075 phy inits inside the
config. Without this patch, when we disable the
QCA8075 config, then there will be compilation
errors.

Change-Id: Ibed0517c52f896f2af54773aa31260068e116479
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-29 19:19:44 +05:30
Selvam Sathappan Periakaruppan
088df08ece drivers: net: ipq: Optimize mdio read/write
This patch removes the redundant udelay's and
ipq_mdio_wait_busy calls which in turn reduces
the overall AQ FW Load time.

Change-Id: I31f3a940d743528ed212e8cccab522ac249a5a5a
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-29 19:19:39 +05:30
Vandhiadevan Karunamoorthy
805db1253b drivers: net: ipq9574: add init non-cache buf support
This changes initialize non-cache buffer every time
before edma configuration.

Change-Id: If7692f9671f6b63f19ae38326bd76320c54766cc
Signed-off-by: Vandhiadevan Karunamoorthy <quic_vkarunam@quicinc.com>
2022-03-24 03:44:30 -07:00
Selvam Sathappan Periakaruppan
a03d622d6c drivers: net: ipq9574: Remove unused code
Change-Id: Id5e1c33c2438c982dc218561798c588db80c2cab
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-22 03:08:40 -07:00
Selvam Sathappan Periakaruppan
b30791ddf4 drivers: net: ipq9574: Disable FDB Learning
This patch is a temporary WAR to fix timeout issues
observed in particular setups during dump collection.
This patch disables FDB Learning for ports 1-6.

Change-Id: I7987bb0286df129c56a07f1708600f78ebf42039
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-17 20:42:11 -07:00
Selvam Sathappan Periakaruppan
ae49e8da88 drivers: net: ipq9574: Clean up PPE Driver
Change-Id: I1bd4af5c322b0de29ae07bbaa317773c9539e418
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-17 20:42:06 -07:00
Selvam Sathappan Periakaruppan
eb21dc09bc drivers: net: ipq9574: Clean up EDMA driver
Change-Id: Ibd2afc13a0b2129d8e11767c3956078d5a4737f5
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-17 20:42:01 -07:00
Selvam Sathappan Periakaruppan
03705eecee drivers: net: ipq9574: Remove SC PPE BYPASS EDMA Config
Setting this bit will not allow PPE to take any action on the
packets. Remove this configuration as its not needed in U-Boot
EDMA.

Change-Id: I45cb93a4f5072dd882179eca5a14bc4a25624f26
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-17 20:41:24 -07:00
Selvam Sathappan Periakaruppan
e9bcf6323b drivers: net: ipq9574: Enable TX/RX port counters
Change-Id: I92717794a5fb81fcbfad64d48b39d0115a953a21
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-17 20:41:19 -07:00
Selvam Sathappan Periakaruppan
d909c4b4ad drivers: net: ipq9574: Drop DA MAC rule
This patch adds DA MAC rule. This rule can be used
if we want to drop packets with a particular DA MAC
address.

Change-Id: I32ef53ada1518f6880faa7402ccaaedb5b32a90b
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-17 16:27:06 +05:30
Selvam Sathappan Periakaruppan
1cbcdb8fcb drivers: net: ipq9574: Add src_mac drop acl
This patch adds ACL to drop the packets with src
mac address.

Change-Id: Ib944154ffb53b9bf67a178a5ab08cd9f12866b4a
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-15 22:37:10 -07:00
Selvam Sathappan Periakaruppan
7b03faafe8 drivers: net: ipq9574: Enable queue ac and counter
Change-Id: I954d5316cf1636afa5b9622ede63554066969d8f
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-15 22:37:06 -07:00
Selvam Sathappan Periakaruppan
be07da4a76 drivers: net: ipq9574: Update PPE TDM/Sched Config
Change-Id: I992de44db5dd5a6d28b3bd54ddcc005d0c46acc9
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-15 22:37:01 -07:00
Selvam Sathappan Periakaruppan
1f1a5ed7b6 drivers: net: ipq9574: Fix VSI configuration
Change-Id: Ia7f9d23ad991738cb9f55a14e7c310791a837ea5
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-15 22:36:54 -07:00
Selvam Sathappan Periakaruppan
a8ed69675d ipq: Change qca808x mode to SGMII by default
This patch updates the default uniphy mode to SGMII
for the qca808x ports. If suppose, the phy is capable
of supporting 2.5G, then it will reconfigure the
uniphy mode to SGMII_PLUS at that time based on the
link speed detected.

Change-Id: I56692b19536e71cbcf3a4c31d32ecb29866c5fdc
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-02-09 02:49:24 -08:00
Selvam Sathappan Periakaruppan
1d2a2dc57a drivers: net: ipq9574: Update EDMA Driver
This patch optimizes and updates the EDMA Driver as
required for ipq9574 platform similar to the Kernel
Host EDMA Driver.

-> Config TX_MOD and RX_MOD timers
-> Config DMAR_CTRL
-> Config Service code bypass for TX_DESC
-> Update the SRCINFO and DST_PORT configs
-> Make changes to include secondary and primary DESC's
into the same corresponding ring structure
-> Increase the TX_BUFF Size to 2048
-> Update to use RX_DESC RING 23
-> Remove unused fields from the EDMA structures
-> Update the description for the EDMA structure fields

Change-Id: I3f7f1c11cdd87687c38774a4930c9bee90857203
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2021-12-15 01:11:45 +05:30
Selvam Sathappan Periakaruppan
8bf3539016 Revert "drivers: net: ipq9574: Update network config"
This reverts commit ac52f93c49.

Change-Id: I4177af51cf3a38204181069ff027225f4fdc78bc
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2021-12-15 01:10:01 +05:30
Selvam Sathappan Periakaruppan
ac52f93c49 drivers: net: ipq9574: Update network config
This patch updates the following:

1) Remove ACL configurations
2) Reduce packet size to 1024 bytes

Change-Id: I94c0024fc8efeea12fc2742bbf9b4c3d0907d0ed
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2021-12-08 01:03:01 -08:00
Selvam Sathappan Periakaruppan
e0726bab13 drivers: net: ipq9574: Fix network configurations
This patch updates the following:

1) Updates NSS NOC clock frequencies to expected clock rates
2) Add Debug prints during eth_halt which can help debug issues
3) Update ACL structure and configurations for ipq9574 platform
as required
4) Disable the MIB counters reset bit so that those counter
registers values can be dumped to check stats
5) Update VSI configurations for cases when BRIDGED_MODE config
is disabled
6) Update the VSI configuration to avoid flooding from one LAN
port to another

Change-Id: I39f20a57c08205fbeb669c93b6459cf8e184098d
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2021-12-06 04:41:12 -08:00
Selvam Sathappan Periakaruppan
ee7e19ba6e drivers: net: ipq9574: Add SFP 1G and 2.5G Support
This patch adds support for SFP 1G and 2.5G. Note that
there is no autoneg support for SFP in U-Boot and the mode needs
to be changed in DT to make it work in 1G or 2.5G.

By default SFP will be configured to work in 10G mode.

Change-Id: I1c209276fe2a586332be87ce5d49a140f4814eb2
Signed-off-by: Selvam Sathappan Periakaruppan <speriaka@codeaurora.org>
2021-10-27 06:30:57 -07:00
Selvam Sathappan Periakaruppan
47cf0fd956 drivers: net: ipq9574: Fix print msg in edma
This patch adds the phy type and phy address also as part
of the print message during error cases which will help in
quickly identifying the port configuration.

Change-Id: I6762998e8bae8be8473d32e41b81ecc7e0b94885
Signed-off-by: Selvam Sathappan Periakaruppan <speriaka@codeaurora.org>
2021-09-04 02:57:21 -07:00
Selvam Sathappan Periakaruppan
01c2d98698 drivers: net: ipq9574: Add SKU Validation
Change-Id: I0993e36938eeb79ac1e810249e273c06ed5dce54
Signed-off-by: Selvam Sathappan Periakaruppan <speriaka@codeaurora.org>
2021-08-26 07:59:25 -07:00
Selvam Sathappan Periakaruppan
56525cc2a7 drivers: net: ipq9574: Add Support for SFP
Change-Id: I8cd09a85c03405de0c7e4b5d5ed3f5fc7fee8147
Signed-off-by: Selvam Sathappan Periakaruppan <speriaka@codeaurora.org>
2021-08-26 07:56:32 -07:00