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

Merge tag 'arm-soc/for-5.13/drivers' of https://github.com/Broadcom/stblinux into arm/drivers

This pull request contains Broadcom ARM/ARM64/MIPS based SoCs drivers
changes for 5.13, please pull the following:

- Rafal updates the Broadcom PMB binding to support BCM63138 and updates
the code to support resetting the 63138 SATA controller

* tag 'arm-soc/for-5.13/drivers' of https://github.com/Broadcom/stblinux:
soc: bcm: bcm-pmb: add BCM63138 SATA support
dt-bindings: power: bcm-pmb: add BCM63138 binding

Link: https://lore.kernel.org/r/20210330184006.1451315-3-f.fainelli@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+32
+1
Documentation/devicetree/bindings/power/brcm,bcm-pmb.yaml
··· 16 16 compatible: 17 17 enum: 18 18 - brcm,bcm4908-pmb 19 + - brcm,bcm63138-pmb 19 20 20 21 reg: 21 22 description: register space of one or more buses
+30
drivers/soc/bcm/bcm63xx/bcm-pmb.c
··· 209 209 return err; 210 210 } 211 211 212 + static int bcm_pmb_power_on_sata(struct bcm_pmb *pmb, int bus, u8 device) 213 + { 214 + int err; 215 + 216 + err = bcm_pmb_power_on_zone(pmb, bus, device, 0); 217 + if (err) 218 + return err; 219 + 220 + /* Does not apply to the BCM963158 */ 221 + err = bcm_pmb_bpcm_write(pmb, bus, device, BPCM_MISC_CONTROL, 0); 222 + if (err) 223 + return err; 224 + 225 + err = bcm_pmb_bpcm_write(pmb, bus, device, BPCM_SR_CONTROL, 0xffffffff); 226 + if (err) 227 + return err; 228 + 229 + err = bcm_pmb_bpcm_write(pmb, bus, device, BPCM_SR_CONTROL, 0); 230 + 231 + return err; 232 + } 233 + 212 234 static int bcm_pmb_power_on(struct generic_pm_domain *genpd) 213 235 { 214 236 struct bcm_pmb_pm_domain *pd = container_of(genpd, struct bcm_pmb_pm_domain, genpd); ··· 244 222 return bcm_pmb_power_on_zone(pmb, data->bus, data->device, 0); 245 223 case BCM_PMB_HOST_USB: 246 224 return bcm_pmb_power_on_device(pmb, data->bus, data->device); 225 + case BCM_PMB_SATA: 226 + return bcm_pmb_power_on_sata(pmb, data->bus, data->device); 247 227 default: 248 228 dev_err(pmb->dev, "unsupported device id: %d\n", data->id); 249 229 return -EINVAL; ··· 341 317 { }, 342 318 }; 343 319 320 + static const struct bcm_pmb_pd_data bcm_pmb_bcm63138_data[] = { 321 + { .name = "sata", .id = BCM_PMB_SATA, .bus = 0, .device = 3, }, 322 + { }, 323 + }; 324 + 344 325 static const struct of_device_id bcm_pmb_of_match[] = { 345 326 { .compatible = "brcm,bcm4908-pmb", .data = &bcm_pmb_bcm4908_data, }, 327 + { .compatible = "brcm,bcm63138-pmb", .data = &bcm_pmb_bcm63138_data, }, 346 328 { }, 347 329 }; 348 330
+1
include/dt-bindings/soc/bcm-pmb.h
··· 7 7 #define BCM_PMB_PCIE1 0x02 8 8 #define BCM_PMB_PCIE2 0x03 9 9 #define BCM_PMB_HOST_USB 0x04 10 + #define BCM_PMB_SATA 0x05 10 11 11 12 #endif