Re: [PATCH v5 4/4] phy: airoha: Add support for Airoha AN7581 USB PHY

From: kernel test robot

Date: Thu Mar 05 2026 - 04:25:23 EST


Hi Christian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20260303]
[cannot apply to robh/for-next linus/master v7.0-rc2 v7.0-rc1 v6.19 v7.0-rc2]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Christian-Marangi/dt-bindings-soc-Add-bindings-for-Airoha-SCU-Serdes-lines/20260304-090107
base: next-20260303
patch link: https://lore.kernel.org/r/20260304005843.2680-5-ansuelsmth%40gmail.com
patch subject: [PATCH v5 4/4] phy: airoha: Add support for Airoha AN7581 USB PHY
config: powerpc64-randconfig-r131-20260305 (https://download.01.org/0day-ci/archive/20260305/202603051725.x2cR2ynI-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 9a109fbb6e184ec9bcce10615949f598f4c974a9)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260305/202603051725.x2cR2ynI-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603051725.x2cR2ynI-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/phy/airoha/phy-an7581-usb.c:569:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *base @@ got void [noderef] __iomem * @@
drivers/phy/airoha/phy-an7581-usb.c:569:14: sparse: expected void *base
drivers/phy/airoha/phy-an7581-usb.c:569:14: sparse: got void [noderef] __iomem *
>> drivers/phy/airoha/phy-an7581-usb.c:573:24: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void [noderef] __iomem *regs @@ got void *base @@
drivers/phy/airoha/phy-an7581-usb.c:573:24: sparse: expected void [noderef] __iomem *regs
drivers/phy/airoha/phy-an7581-usb.c:573:24: sparse: got void *base

vim +569 drivers/phy/airoha/phy-an7581-usb.c

545
546 static int an7581_usb_phy_probe(struct platform_device *pdev)
547 {
548 struct phy_provider *phy_provider;
549 struct an7581_usb_phy_priv *priv;
550 struct device *dev = &pdev->dev;
551 unsigned int index;
552 void *base;
553 int ret;
554
555 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
556 if (!priv)
557 return -ENOMEM;
558
559 priv->dev = dev;
560
561 ret = of_property_read_u32(dev->of_node, "airoha,usb2-monitor-clk-sel",
562 &priv->monclk_sel);
563 if (ret)
564 return dev_err_probe(dev, ret, "Monitor clock selection is mandatory for USB PHY calibration\n");
565
566 if (priv->monclk_sel > 3)
567 return dev_err_probe(dev, -EINVAL, "only 4 Monitor clock are selectable on the SoC\n");
568
> 569 base = devm_platform_ioremap_resource(pdev, 0);
570 if (IS_ERR(base))
571 return PTR_ERR(base);
572
> 573 priv->regmap = devm_regmap_init_mmio(dev, base, &an7581_usb_phy_regmap_config);
574 if (IS_ERR(priv->regmap))
575 return PTR_ERR(priv->regmap);
576
577 platform_set_drvdata(pdev, priv);
578
579 for (index = 0; index < AIROHA_PHY_USB_MAX; index++) {
580 enum an7581_usb_phy_instance_type phy_type;
581 struct an7581_usb_phy_instance *instance;
582
583 switch (index) {
584 case AIROHA_PHY_USB2:
585 phy_type = PHY_TYPE_USB2;
586 break;
587 case AIROHA_PHY_USB3:
588 phy_type = PHY_TYPE_USB3;
589 break;
590 }
591
592 if (phy_type == PHY_TYPE_USB3) {
593 ret = of_property_read_u32(dev->of_node, "airoha,usb3-serdes",
594 &priv->serdes_port);
595 if (ret)
596 return dev_err_probe(dev, ret, "missing serdes line for USB 3.0\n");
597
598 priv->scu = syscon_regmap_lookup_by_compatible("airoha,en7581-scu");
599 if (IS_ERR(priv->scu))
600 return dev_err_probe(dev, PTR_ERR(priv->scu), "failed to get SCU syscon\n");
601 }
602
603 instance = devm_kzalloc(dev, sizeof(*instance), GFP_KERNEL);
604 if (!instance)
605 return -ENOMEM;
606
607 instance->type = phy_type;
608 priv->phys[index] = instance;
609
610 instance->phy = devm_phy_create(dev, NULL, &airoha_phy);
611 if (IS_ERR(instance->phy))
612 return dev_err_probe(dev, PTR_ERR(instance->phy), "failed to create phy\n");
613
614 phy_set_drvdata(instance->phy, instance);
615 }
616
617 phy_provider = devm_of_phy_provider_register(&pdev->dev, an7581_usb_phy_xlate);
618
619 return PTR_ERR_OR_ZERO(phy_provider);
620 }
621

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki