Skip to contentSkip to conversation

soc: bcm: brcmstb: Updates to support newer controllers

PATCH Applied Florian Fainelli 2 participants 8 messages May 11, 2018 – Jun 4, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover soc: bcm: brcmstb: Updates to support newer controllers

Hi all,

This patch series adds support for newer reveisions of the memory controller which is necessary to make sure we do use the right programming sequence to enter S2 and S3 suspend/resume modes.

Doug Berger (1):
soc: bcm: brcmstb: pm: Add support for newer rev B3.0 controllers

Florian Fainelli (1):
soc: bcm: brcmstb: Add missing DDR MEMC compatible strings

 .../devicetree/bindings/arm/bcm/brcm,brcmstb.txt         |  4 ++++
 drivers/soc/bcm/brcmstb/pm/pm-arm.c                      | 16 ++++++++++++++++
 2 files changed, 20 insertions(+)
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/2 soc: bcm: brcmstb: pm: Add support for newer rev B3.0 controllers

From: Doug Berger <[email protected]>

Update the Device Tree binding document and add a matching entry for the MEMC DDR controller revision B3.0 which is found on chips like 7278A0 and newer.

[florian: tweak commit message, make it apply to upstream kernel]
---
 Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt | 1 +
 drivers/soc/bcm/brcmstb/pm/pm-arm.c                        | 4 ++++
 2 files changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt +1 -0
index c052caad36e8..fb762059e68e 100644
@@ -190,6 +190,7 @@ Power-Down (SRPD), among other things.
 Required properties:
 - compatible     : should contain one of these
 	"brcm,brcmstb-memc-ddr-rev-b.2.2"
+	"brcm,brcmstb-memc-ddr-rev-b.3.0"
 	"brcm,brcmstb-memc-ddr"
 - reg            : the MEMC DDR register range
 
drivers/soc/bcm/brcmstb/pm/pm-arm.c +4 -0
index dcf8c8065508..ade724677238 100644
@@ -631,6 +631,10 @@ static const struct of_device_id brcmstb_memc_of_match[] = {
 		.compatible = "brcm,brcmstb-memc-ddr-rev-b.2.2",
 		.data = &ddr_seq_b22,
 	},
+	{
+		.compatible = "brcm,brcmstb-memc-ddr-rev-b.3.0",
+		.data = &ddr_seq_b22,
+	},
 	{
 		.compatible = "brcm,brcmstb-memc-ddr",
 		.data = &ddr_seq,
Signature · 1 line
2.14.1
#5 lore raw

PATCH 2/2 soc: bcm: brcmstb: Add missing DDR MEMC compatible strings

In reply to Florian Fainelli

We would not be matching the following chip/compatible strings combinations, which would lead to not setting the warm boot flag correctly, fix that:

    7260A0/B0: brcm,brcmstb-memc-ddr-rev-b.2.1
    7255A0: brcm,brcmstb-memc-ddr-rev-b.2.3
    7278Bx: brcm,brcmstb-memc-ddr-rev-b.3.1

The B2.1 core (which is in 7260 A0 and B0) doesn't have the SHIMPHY_ADDR_CNTL_0_DDR_PAD_CNTRL setup in the memsys init code, nor does it have the warm boot flag re-definition on entry. Those changes were for B2.2 and later MEMSYS cores. Fall back to the previous S2/S3 entry method for these specific chips.

Fixes 0b741b8234c8 ("soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM)")
---
 Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt |  3 +++
 drivers/soc/bcm/brcmstb/pm/pm-arm.c                        | 12 ++++++++++++
 2 files changed, 15 insertions(+)
Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt +3 -0
index fb762059e68e..104cc9b41df4 100644
@@ -189,8 +189,11 @@ Power-Down (SRPD), among other things.
 
 Required properties:
 - compatible     : should contain one of these
+	"brcm,brcmstb-memc-ddr-rev-b.2.1"
 	"brcm,brcmstb-memc-ddr-rev-b.2.2"
+	"brcm,brcmstb-memc-ddr-rev-b.2.3"
 	"brcm,brcmstb-memc-ddr-rev-b.3.0"
+	"brcm,brcmstb-memc-ddr-rev-b.3.1"
 	"brcm,brcmstb-memc-ddr"
 - reg            : the MEMC DDR register range
 
drivers/soc/bcm/brcmstb/pm/pm-arm.c +12 -0
index ade724677238..a5577dd5eb08 100644
@@ -627,14 +627,26 @@ static const struct of_device_id ddr_shimphy_dt_ids[] = {
 };
 
 static const struct of_device_id brcmstb_memc_of_match[] = {
+	{
+		.compatible = "brcm,brcmstb-memc-ddr-rev-b.2.1",
+		.data = &ddr_seq,
+	},
 	{
 		.compatible = "brcm,brcmstb-memc-ddr-rev-b.2.2",
 		.data = &ddr_seq_b22,
 	},
+	{
+		.compatible = "brcm,brcmstb-memc-ddr-rev-b.2.3",
+		.data = &ddr_seq_b22,
+	},
 	{
 		.compatible = "brcm,brcmstb-memc-ddr-rev-b.3.0",
 		.data = &ddr_seq_b22,
 	},
+	{
+		.compatible = "brcm,brcmstb-memc-ddr-rev-b.3.1",
+		.data = &ddr_seq_b22,
+	},
 	{
 		.compatible = "brcm,brcmstb-memc-ddr",
 		.data = &ddr_seq,
Signature · 1 line
2.14.1
maintainer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] soc: bcm: brcmstb: pm: Add support for newer rev B3.0 controllers

In reply to Florian Fainelli
Quoted 6 lines · Florian Fainelli

From: Doug Berger <[email protected]>

Update the Device Tree binding document and add a matching entry for the MEMC DDR controller revision B3.0 which is found on chips like 7278A0 and newer.

Quoted 7 lines
[florian: tweak commit message, make it apply to upstream kernel]
---
 Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt | 1 +
 drivers/soc/bcm/brcmstb/pm/pm-arm.c                        | 4 ++++
 2 files changed, 5 insertions(+)

Side note: this should really move out of bindings/arm/ to bindings/memory-controllers/ or at least to its own file.

Rob

maintainer Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] soc: bcm: brcmstb: Add missing DDR MEMC compatible strings

In reply to Florian Fainelli
Quoted 14 lines · Florian Fainelli

We would not be matching the following chip/compatible strings combinations, which would lead to not setting the warm boot flag correctly, fix that:

    7260A0/B0: brcm,brcmstb-memc-ddr-rev-b.2.1
    7255A0: brcm,brcmstb-memc-ddr-rev-b.2.3
    7278Bx: brcm,brcmstb-memc-ddr-rev-b.3.1

The B2.1 core (which is in 7260 A0 and B0) doesn't have the SHIMPHY_ADDR_CNTL_0_DDR_PAD_CNTRL setup in the memsys init code, nor does it have the warm boot flag re-definition on entry. Those changes were for B2.2 and later MEMSYS cores. Fall back to the previous S2/S3 entry method for these specific chips.

Quoted 6 lines
Fixes 0b741b8234c8 ("soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM)")
---
 Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt |  3 +++
 drivers/soc/bcm/brcmstb/pm/pm-arm.c                        | 12 ++++++++++++
 2 files changed, 15 insertions(+)
author Applied
#4 lore raw

Re: [PATCH 1/2] soc: bcm: brcmstb: pm: Add support for newer rev B3.0 controllers

In reply to Florian Fainelli
Quoted 10 lines · Florian Fainelli

From: Doug Berger <[email protected]>

Update the Device Tree binding document and add a matching entry for the MEMC DDR controller revision B3.0 which is found on chips like 7278A0 and newer.

[florian: tweak commit message, make it apply to upstream kernel]

---

Applied to drivers/next, thanks!
--
Florian

author Applied
#7 lore raw

Re: [PATCH 2/2] soc: bcm: brcmstb: Add missing DDR MEMC compatible strings

In reply to Florian Fainelli
Quoted 14 lines · Florian Fainelli

We would not be matching the following chip/compatible strings combinations, which would lead to not setting the warm boot flag correctly, fix that:

    7260A0/B0: brcm,brcmstb-memc-ddr-rev-b.2.1
    7255A0: brcm,brcmstb-memc-ddr-rev-b.2.3
    7278Bx: brcm,brcmstb-memc-ddr-rev-b.3.1

The B2.1 core (which is in 7260 A0 and B0) doesn't have the SHIMPHY_ADDR_CNTL_0_DDR_PAD_CNTRL setup in the memsys init code, nor does it have the warm boot flag re-definition on entry. Those changes were for B2.2 and later MEMSYS cores. Fall back to the previous S2/S3 entry method for these specific chips.

Quoted 3 lines
Fixes 0b741b8234c8 ("soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM)")

---

Applied to drivers/next, thanks!
--
Florian

#3 lore raw

Re: [PATCH 1/2] soc: bcm: brcmstb: pm: Add support for newer rev B3.0 controllers

In reply to Rob Herring
Quoted 15 lines · Rob Herring
Quoted 6 lines · Florian Fainelli

From: Doug Berger <[email protected]>

Update the Device Tree binding document and add a matching entry for the MEMC DDR controller revision B3.0 which is found on chips like 7278A0 and newer.

Quoted 7 lines
[florian: tweak commit message, make it apply to upstream kernel]
---
 Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt | 1 +
 drivers/soc/bcm/brcmstb/pm/pm-arm.c                        | 4 ++++
 2 files changed, 5 insertions(+)
Quoted 4 lines

Side note: this should really move out of bindings/arm/ to bindings/memory-controllers/ or at least to its own file.

Good idea, thanks, will do that.

Signature · 2 lines
-- 
Florian