Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: bcm2835-pm: Add support for BCM2711

In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
with the ISP and H264 bits, and V3D is in the same place in the new ASB
as the old one.

As per the devicetree bindings, BCM2711 will provide both the old and
new ASB resources, so get both of them and pass them into
'bcm2835-power,' which will take care of selecting which one to use
accordingly.

Since the RPiVid ASB's resources were being provided prior to formalizing
the bindings[1], also support the old DT files that didn't use
'reg-names.'

[1] See: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220625113619.15944-8-stefan.wahren@i2se.com

authored by

Stefan Wahren and committed by
Lee Jones
df762342 01e7865d

+14
+13
drivers/mfd/bcm2835-pm.c
··· 42 42 pm->asb = NULL; 43 43 } 44 44 45 + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, 46 + "rpivid_asb"); 47 + if (res) { 48 + pm->rpivid_asb = devm_ioremap_resource(&pdev->dev, res); 49 + if (IS_ERR(pm->rpivid_asb)) 50 + pm->rpivid_asb = NULL; 51 + } 52 + 45 53 return 0; 46 54 } 47 55 ··· 61 53 pm->asb = devm_platform_ioremap_resource(pdev, 1); 62 54 if (IS_ERR(pm->asb)) 63 55 pm->asb = NULL; 56 + 57 + pm->rpivid_asb = devm_platform_ioremap_resource(pdev, 2); 58 + if (IS_ERR(pm->rpivid_asb)) 59 + pm->rpivid_asb = NULL; 64 60 65 61 return 0; 66 62 } ··· 107 95 static const struct of_device_id bcm2835_pm_of_match[] = { 108 96 { .compatible = "brcm,bcm2835-pm-wdt", }, 109 97 { .compatible = "brcm,bcm2835-pm", }, 98 + { .compatible = "brcm,bcm2711-pm", }, 110 99 {}, 111 100 }; 112 101 MODULE_DEVICE_TABLE(of, bcm2835_pm_of_match);
+1
include/linux/mfd/bcm2835-pm.h
··· 9 9 struct device *dev; 10 10 void __iomem *base; 11 11 void __iomem *asb; 12 + void __iomem *rpivid_asb; 12 13 }; 13 14 14 15 #endif /* BCM2835_MFD_PM_H */