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 -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmBdAFUACgkQh9CWnEQH BwSGZhAAoUIKar0bR9ICESdeifnNmIa2sHYdWAWg153EjRDDk9Eypc18qX3D/Q2P ohK4dpsnU2cPQ5/kl5T0VlI3ITAk3Ng3zPWsLJXImBJkajS0qAwUuJZ939Z7QqeE WR5d+BEt7zEfq+Uj0k8lVX+TqM9T902X+AWbwzqrrt4Zk33ZHfgbFlKetW0AZAzd cZgzS5AESsZRMSlgmcsUdY93y3cILPWRp6WoPnSiSNa/qRCPGIL1WXLTSlekirxE lxCqq+DF7KZWGHuhxObn0VQSTmK+e0lddzjPs6vxtuI4g64JqNKKZbwkNGrZelyl +VUkgEVtXh3D3of6a3Om+vYMBcM3kL9XLYYO0415GKiVTnhhGk++RblmbHbLdt5b udxMc8ni1E+IvY5gEefcJPB5qnnMyFbwijDqj8MHhr0NEeL0H38SJx6621nZRkJE zzYZxQeDE7ouZ1etFHakg2q0MFyTaKXYk9l/b4KMaKpGHHMp+BhyK3arh///G1uw b6n1Grzp3VdscvSsY3tkO66aXlkXWmcYq5rroOv4PXR/xLLS0MZ3oeIsiRNOi0IA 0QJfVxV3yWUA5/NDEMpYD0iWW+K4S6cOcRSKQUNyTUlGbXNhd93XbAUMypMp5HP0 3ZhNwde24FqNKCeDGRqIw8EvrK7194pz4bN96bTtBxgIVrJd2XI= =M+kT -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
e9396d6b38
@ -16,6 +16,7 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- brcm,bcm4908-pmb
|
||||
- brcm,bcm63138-pmb
|
||||
|
||||
reg:
|
||||
description: register space of one or more buses
|
||||
|
@ -209,6 +209,28 @@ static int bcm_pmb_power_on_device(struct bcm_pmb *pmb, int bus, u8 device)
|
||||
return err;
|
||||
}
|
||||
|
||||
static int bcm_pmb_power_on_sata(struct bcm_pmb *pmb, int bus, u8 device)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = bcm_pmb_power_on_zone(pmb, bus, device, 0);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Does not apply to the BCM963158 */
|
||||
err = bcm_pmb_bpcm_write(pmb, bus, device, BPCM_MISC_CONTROL, 0);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = bcm_pmb_bpcm_write(pmb, bus, device, BPCM_SR_CONTROL, 0xffffffff);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = bcm_pmb_bpcm_write(pmb, bus, device, BPCM_SR_CONTROL, 0);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int bcm_pmb_power_on(struct generic_pm_domain *genpd)
|
||||
{
|
||||
struct bcm_pmb_pm_domain *pd = container_of(genpd, struct bcm_pmb_pm_domain, genpd);
|
||||
@ -222,6 +244,8 @@ static int bcm_pmb_power_on(struct generic_pm_domain *genpd)
|
||||
return bcm_pmb_power_on_zone(pmb, data->bus, data->device, 0);
|
||||
case BCM_PMB_HOST_USB:
|
||||
return bcm_pmb_power_on_device(pmb, data->bus, data->device);
|
||||
case BCM_PMB_SATA:
|
||||
return bcm_pmb_power_on_sata(pmb, data->bus, data->device);
|
||||
default:
|
||||
dev_err(pmb->dev, "unsupported device id: %d\n", data->id);
|
||||
return -EINVAL;
|
||||
@ -317,8 +341,14 @@ static const struct bcm_pmb_pd_data bcm_pmb_bcm4908_data[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct bcm_pmb_pd_data bcm_pmb_bcm63138_data[] = {
|
||||
{ .name = "sata", .id = BCM_PMB_SATA, .bus = 0, .device = 3, },
|
||||
{ },
|
||||
};
|
||||
|
||||
static const struct of_device_id bcm_pmb_of_match[] = {
|
||||
{ .compatible = "brcm,bcm4908-pmb", .data = &bcm_pmb_bcm4908_data, },
|
||||
{ .compatible = "brcm,bcm63138-pmb", .data = &bcm_pmb_bcm63138_data, },
|
||||
{ },
|
||||
};
|
||||
|
||||
|
@ -7,5 +7,6 @@
|
||||
#define BCM_PMB_PCIE1 0x02
|
||||
#define BCM_PMB_PCIE2 0x03
|
||||
#define BCM_PMB_HOST_USB 0x04
|
||||
#define BCM_PMB_SATA 0x05
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user