T-Mobile got the ball rolling with nationwide rollout of 5G after its acquisition of Sprint earlier this year, but AT&T and Verizon weren't far behind. Now the marketing campaigns have begun with a fervor, touting "free" 5G access with unlimited data plans to get consumers to purchase a new 5G-enabled phone.  

While this upgrade cycle is the most visible part of the next-gen wireless network, there is much more going on behind the scenes. Three stocks to buy now for the long 5G haul are Xilinx (XLNX), Uniti Group (UNIT -1.65%), and Xiaomi (XIACF -2.87%).

Four people standing against a wall using smartphones

Image source: Getty Images.

A flexible chip for 5G infrastructure

Nicholas Rossolillo (Xilinx): Xilinx recently made headlines on rumors that AMD was interested in purchasing it in its quest to chase down more of Intel's business. It remains to be seen if anything comes of the whispers, but either way I think Xilinx is a buy. 

This semiconductor company was the inventor and is the leading designer of field programmable gate arrays ( FPGAs), a chip type that can be programmed in the field by an engineer to accomplish a wide variety of tasks. Due to its flexible use and affordable build (since they aren't a custom design), FPGAs have found their way into 5G equipment like antennas that create wireless signals. Additionally, FPGAs are being utilized in data centers and other networking infrastructure -- also key to the propagation of 5G as that ultrafast signal needs to come from somewhere before it gets sent out over the airwaves.

Xilinx recently released financials for the three months ended Sept. 26, 2020, reporting an 8% year-over-year decline in revenue to $767 million. So why recommend the stock now? Xilinx is coming off a difficult year-and-a-half stretch in which it was deeply impacted by the U.S.-China trade war. But it's beginning to lap the worst of that period and is forecasting a return to year-over-year growth in the next quarter. It also had record sales for its data center segment -- the first time its data center end market has exceeded $100 million in a quarter. And though sales to 5G hardware manufacturers are in a slump this year, much of that is due to a cyclical pause as the next generation of 5G hardware begins to deploy to telecoms around the globe.

Plus, even though the recent past has been far from smooth sailing, this remains a highly profitable chip designer. Free cash flow (revenue less cash operating and capital expenses) increased 22% in the last quarter to $232 million -- in spite of the drop in revenue and good for a free-cash-flow profit margin of 30%. Shares trade for 25 times trailing 12-month free cash flow generation, a real long-term value on this 5G hardware stock.

A 5G-powered turnaround

Anders Bylund (Uniti Group): The networking infrastructure division of troubled telecom Windstream (WINMQ) is now known as Uniti Group, and it's a much healthier business than the bankrupt ex-parent. As a matter of fact, Uniti has weathered the worst of Windstream's bankruptcy storm and stands ready to deliver impressive growth in the era of 5G networks.

Windstream remains Uniti's largest customer and a difficult one at that, working its way through a bankruptcy settlement that was years in the making. But Uniti has found plenty of financially stable customers elsewhere over the last five years, and the long-term goal of collecting more than half of Uniti's total sales from clients not named Windstream is now "within reach," according to recent earnings call comments by CEO Kenny Gunderman.

5G rollouts will help Uniti achieve that goal. The company manages 6.5 million strand miles of fiber-optic networks across the country, and 5G towers need to use high-speed fiber networks to connect to the internet backbone.

Don't forget about Uniti's tax-slashing status as a real estate investment trust (REIT). The company needs to pay out at least 90% of its taxable income in the form of dividends if it wants to keep the REIT designation, which works out to a generous dividend yield of 6.7% today.

The last five years have been tough for us Uniti shareholders. The stock crashed several times as Windstream's financial difficulties developed, erasing as much as 83% of Uniti's value on the spinoff in 2015. All of that is behind us now, and it's time for a long-term rebound. The recovery will be powered by 5G installations and long-haul networks, and Windstream's influence on Uniti's quarter-by-quarter results will continue to shrink. Uniti is clearly the better half of the original Windstream business, and the stock is poised for big gains from this deep trough -- with a beefy dividend yield to boot.

This 5G upstart could capitalize on Huawei's troubles

Billy Duberstein (Xiaomi): Chinese smartphone vendor Xiaomi is an emerging 5G smartphone player that could benefit handsomely if rival Huawei is cut off from U.S. semiconductors. According to research firm IDC, Xiaomi was fourth in China with about 10.4% smartphone market share, behind Huawei, Oppo, and Vivo. Huawei was far and away the leader, with 45.2% market share in the second quarter. Therefore, any decrease for Huawei could open up a lot of the market to other players.

But Xiaomi isn't only a China story. In fact, last quarter, Xiaomi retained its position as the leading smartphone vendor in India for the 12th straight quarter, and its market share in Europe of 16.8% grew to exceed that in China, good for third overall.

Xiaomi's phones have caught on overseas thanks to a low-priced strategy that offers phones with leading technology at reasonable prices. That's because the company has pledged not to make more than a 5% net margin on its hardware. That not only includes phones but also connected consumer Internet of Things devices all under the Xiaomi brand, from smart TVs to home appliances to streaming sticks and set-top boxes.

This all bodes well for Xiaomi in the 5G era, when higher component costs might give some consumers sticker shock. In that environment, Xiaomi's high-value proposition may become even more pronounced.

In fact, while succeeding in selling affordable 5G phones under its low-priced Redmi brand, Xiaomi has also recently shown success selling higher-priced premium 5G phones like the new 10X. Last quarter, the company's average selling price for phones increased 11.8% year over year, thanks to the recent success of premium 5G models.

Though Xiaomi is growing its phone base with low-margin models, it expects an outsize portion of future profits to come from internet services, including advertising, gaming, e-commerce, and fintech. That strategy seems to be working: Last quarter, services outgrew hardware sales at 29%. While internet services made up only 11% of revenue, the segment also provided 46.2% of gross profits.

In other words, Xiaomi isn't just a phone vendor but increasingly an ecosystem. Meanwhile, the 5G transition, coupled with Huawei's troubles, gives Xiaomi a chance to steal more market share in the medium term.