SoC driver for Broadcom STB DPFE
Subsystems (2)
v2 cover SoC driver for Broadcom STB DPFE
From: Markus Mayer <[email protected]>
This series introduces a driver to interact with the Broadcom STB DDR PHY Front End (DPFE), specifically to communicate with the DCPU that is part of the DDR PHY and which is running its own firmware.
The DCPU provides information such as DRAM refresh rate, which can be used as indirect indicator for the DRAM temperature (the higher the refresh rate, the hotter the RAM).
The series was previously submitted as HWMON driver[1]. It has been removed from that subsystem, because it doesn't provide any standard HWMON data due to hardware design properties, and is now implemented as SoC driver.
Changes since v1:
- binding simplified to use one node with three memory regions instead of three nodes with one region
- no longer part of the HWMON subsystem
- better error handling and error reporting to userland
- uses [readl|writel]_relaxed() directly, since there is no need for wrappers doing endian conversion
- re-download firmware upon "resume"
- minor changes to improve clarity
[1] https://lkml.org/lkml/2017/4/18/640
Markus Mayer (2):
dt/bindings: Add bindings for Broadcom STB DRAM Sensors
soc: brcmstb: Add driver for DPFE
.../devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt | 27 + MAINTAINERS | 8 + drivers/soc/bcm/brcmstb/Makefile | 2 +- drivers/soc/bcm/brcmstb/dpfe.c | 689 +++++++++++++++++++++ 4 files changed, 725 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt create mode 100644 drivers/soc/bcm/brcmstb/dpfe.c
Signature · 1 line
2.7.4
PATCH v2 1/2 dt/bindings: Add bindings for Broadcom STB DRAM Sensors
From: Markus Mayer <[email protected]>
Provide bindings for the Broadcom STB DDR PHY Front End (DPFE).
--- .../devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt
Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt new file +27 -0
@@ -0,0 +1,27 @@ +DDR PHY Front End (DPFE) for Broadcom STB +========================================= + +DPFE and the DPFE firmware provide an interface for the host CPU to +communicate with the DCPU, which resides inside the DDR PHY. + +There are three memory regions for interacting with the DCPU. These are +specified in a single reg property. + +Required properties: + - compatible: must be "brcm,bcm7271-dpfe-cpu", "brcm,bcm7268-dpfe-cpu" + or "brcm,dpfe-cpu" + - reg: must reference three register ranges + - start address and length of the DCPU register space + - start address and length of the DCPU data memory space + - start address and length of the DCPU instruction memory space + - reg-names: must contain "dpfe-cpu", "dpfe-dmem", and "dpfe-imem"; + they must be in the same order as the register declarations + +Example: + dpfe_cpu0: dpfe-cpu at f1132000 { + compatible = "brcm,bcm7271-dpfe-cpu", "brcm,dpfe-cpu"; + reg = <0xf1132000 0x180 + 0xf1134000 0x1000 + 0xf1138000 0x4000>; + reg-names = "dpfe-cpu", "dpfe-dmem", "dpfe-imem"; + };
Signature · 1 line
2.7.4
Re: [PATCH v2 1/2] dt/bindings: Add bindings for Broadcom STB DRAM Sensors
Quoted 9 lines · Markus Mayer
From: Markus Mayer <[email protected]>
Provide bindings for the Broadcom STB DDR PHY Front End (DPFE).
Signed-off-by Markus Mayer <[email protected]>--- .../devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt
Re: [PATCH v2 1/2] dt/bindings: Add bindings for Broadcom STB DRAM Sensors
Quoted 5 lines · Rob Herring
Quoted 4 lines · Markus Mayer
From: Markus Mayer <[email protected]>
Provide bindings for the Broadcom STB DDR PHY Front End (DPFE).
Quoted 7 lines
Quoted 5 lines
Signed-off-by Markus Mayer <[email protected]>--- .../devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txtAcked-by Rob Herring <[email protected]>
Thanks, Rob.
To bring up the previous discussion regarding enumerating multiple nodes (so far we need two dpfe nodes for some platforms), how should we go about this? We were originally proposing to use "cell-index", but you said this was OpenFirmware only and couldn't be used in device tree. See https://lkml.org/lkml/2017/4/27/574.
We do need to use something, because the driver needs to know if it should be accessing dpfe0 or dpfe1. What should we use?
Thanks,
-Markus
Re: [PATCH v2 1/2] dt/bindings: Add bindings for Broadcom STB DRAM Sensors
Quoted 16 lines · Markus Mayer
Quoted 5 lines · Rob Herring
Quoted 4 lines · Markus Mayer
From: Markus Mayer <[email protected]>
Provide bindings for the Broadcom STB DDR PHY Front End (DPFE).
Quoted 7 lines
Quoted 5 lines
Signed-off-by Markus Mayer <[email protected]>--- .../devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txtAcked-by Rob Herring <[email protected]>Thanks, Rob.
Quoted 8 lines
To bring up the previous discussion regarding enumerating multiple nodes (so far we need two dpfe nodes for some platforms), how should we go about this? We were originally proposing to use "cell-index", but you said this was OpenFirmware only and couldn't be used in device tree. See https://lkml.org/lkml/2017/4/27/574.
We do need to use something, because the driver needs to know if it should be accessing dpfe0 or dpfe1. What should we use?
Would aliases work for instance for that purpose?
Signature · 1 line
Florian
Re: [PATCH v2 1/2] dt/bindings: Add bindings for Broadcom STB DRAM Sensors
In reply to Markus MayerQuoted 5 lines · Markus Mayer
From: Markus Mayer <[email protected]>
Provide bindings for the Broadcom STB DDR PHY Front End (DPFE).
Signed-off-by Markus Mayer <[email protected]>
Applied with Rob's ack, thanks!
Signature · 1 line
Florian
PATCH v2 2/2 soc: brcmstb: Add driver for DPFE
In reply to Markus MayerFrom: Markus Mayer <[email protected]>
This driver allows access to DRAM properties, such as the refresh rate, via the Broadcom STB DDR PHY Front End (DPFE). The refresh rate can be used as indirect indicator of the DRAM temperature.
The driver also allows setting of the sampling interval.
--- MAINTAINERS | 8 + drivers/soc/bcm/brcmstb/Makefile | 2 +- drivers/soc/bcm/brcmstb/dpfe.c | 689 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 698 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/bcm/brcmstb/dpfe.c
MAINTAINERS +8 -0
@@ -2864,6 +2864,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt F: drivers/cpufreq/brcmstb* +BROADCOM STB SOC DPFE DRIVER +M: Markus Mayer <[email protected]> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt +F: drivers/misc/brcmstb-dpfe.c + BROADCOM SPECIFIC AMBA DRIVER (BCMA) M: Rafa? Mi?ecki <[email protected]> L: linux-wireless at vger.kernel.org
drivers/soc/bcm/brcmstb/Makefile +1 -1
@@ -1 +1 @@ -obj-y += common.o biuctrl.o +obj-y += common.o biuctrl.o dpfe.o
drivers/soc/bcm/brcmstb/dpfe.c new file +689 -0
689 lines not on this page · raw message
Signature · 1 line
2.7.4
Re: [PATCH v2 2/2] soc: brcmstb: Add driver for DPFE
Hi Markus,
Quoted 21 lines · Markus Mayer
From: Markus Mayer <[email protected]>
This driver allows access to DRAM properties, such as the refresh rate, via the Broadcom STB DDR PHY Front End (DPFE). The refresh rate can be used as indirect indicator of the DRAM temperature.
The driver also allows setting of the sampling interval.
Signed-off-by Markus Mayer <[email protected]>--- MAINTAINERS | 8 + drivers/soc/bcm/brcmstb/Makefile | 2 +- drivers/soc/bcm/brcmstb/dpfe.c | 689 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 698 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/bcm/brcmstb/dpfe.cMAINTAINERS +0
-0
MAINTAINERS S: Maintained · line 2873
Quoted 10 lines
MAINTAINERS +7
-0@@ -2864,6 +2864,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt F: drivers/cpufreq/brcmstb* +BROADCOM STB SOC DPFE DRIVER +M: Markus Mayer <[email protected]> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt +F: drivers/misc/brcmstb-dpfe.c
Just one nit: this should be drivers/soc/bcm/brcmstb/dpfe.c, other than that, I just need an Ack from Rob on the binding, and I will queue this up, thanks!
Signature · 1 line
Florian
Re: [PATCH v2 2/2] soc: brcmstb: Add driver for DPFE
Quoted 27 lines · Florian Fainelli
Hi Markus,
Quoted 24 lines · Markus Mayer
From: Markus Mayer <[email protected]>
This driver allows access to DRAM properties, such as the refresh rate, via the Broadcom STB DDR PHY Front End (DPFE). The refresh rate can be used as indirect indicator of the DRAM temperature.
The driver also allows setting of the sampling interval.
Signed-off-by Markus Mayer <[email protected]>--- MAINTAINERS | 8 + drivers/soc/bcm/brcmstb/Makefile | 2 +- drivers/soc/bcm/brcmstb/dpfe.c | 689 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 698 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/bcm/brcmstb/dpfe.cMAINTAINERS +0
-0@@ -2864,6 +2864,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt F: drivers/cpufreq/brcmstb*
Quoted 11 lines
MAINTAINERS S: Maintained · line 2873
Quoted 7 lines
MAINTAINERS +7
-0+BROADCOM STB SOC DPFE DRIVER +M: Markus Mayer <[email protected]> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt +F: drivers/misc/brcmstb-dpfe.cJust one nit: this should be
drivers/soc/bcm/brcmstb/dpfe.c, other than that, I just need an Ack from Rob on the binding, and I will queue this up, thanks!
Oops. Thanks for catching that. Would you like me to re-send or will you fix up that path on your end?
Quoted 2 lines
--
Florian
Re: [PATCH v2 2/2] soc: brcmstb: Add driver for DPFE
Quoted 40 lines · Markus Mayer
Quoted 27 lines · Florian Fainelli
Hi Markus,
Quoted 24 lines · Markus Mayer
From: Markus Mayer <[email protected]>
This driver allows access to DRAM properties, such as the refresh rate, via the Broadcom STB DDR PHY Front End (DPFE). The refresh rate can be used as indirect indicator of the DRAM temperature.
The driver also allows setting of the sampling interval.
Signed-off-by Markus Mayer <[email protected]>--- MAINTAINERS | 8 + drivers/soc/bcm/brcmstb/Makefile | 2 +- drivers/soc/bcm/brcmstb/dpfe.c | 689 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 698 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/bcm/brcmstb/dpfe.cMAINTAINERS +0
-0@@ -2864,6 +2864,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt F: drivers/cpufreq/brcmstb*Quoted 11 lines
MAINTAINERS S: Maintained · line 2873
Quoted 7 lines
MAINTAINERS +7
-0+BROADCOM STB SOC DPFE DRIVER +M: Markus Mayer <[email protected]> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt +F: drivers/misc/brcmstb-dpfe.cJust one nit: this should be
drivers/soc/bcm/brcmstb/dpfe.c, other than that, I just need an Ack from Rob on the binding, and I will queue this up, thanks!
Quoted 2 lines
Oops. Thanks for catching that. Would you like me to re-send or will you fix up that path on your end?
I can fix it up if Rob is happy with the current binding, if you need to resubmit, please fix that as well. Thanks!
Signature · 2 lines
-- Florian
Re: [PATCH v2 2/2] soc: brcmstb: Add driver for DPFE
Quoted 41 lines · Florian Fainelli
Quoted 40 lines · Markus Mayer
Quoted 38 lines · Florian Fainelli
Hi Markus,
Quoted 21 lines · Markus Mayer
From: Markus Mayer <[email protected]>
This driver allows access to DRAM properties, such as the refresh rate, via the Broadcom STB DDR PHY Front End (DPFE). The refresh rate can be used as indirect indicator of the DRAM temperature.
The driver also allows setting of the sampling interval.
Signed-off-by Markus Mayer <[email protected]>--- MAINTAINERS | 8 + drivers/soc/bcm/brcmstb/Makefile | 2 +- drivers/soc/bcm/brcmstb/dpfe.c | 689 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 698 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/bcm/brcmstb/dpfe.cMAINTAINERS +0
-0MAINTAINERS S: Maintained · line 2873
Quoted 10 lines
MAINTAINERS +7
-0@@ -2864,6 +2864,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt F: drivers/cpufreq/brcmstb* +BROADCOM STB SOC DPFE DRIVER +M: Markus Mayer <[email protected]> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt +F: drivers/misc/brcmstb-dpfe.cJust one nit: this should be
drivers/soc/bcm/brcmstb/dpfe.c, other than that, I just need an Ack from Rob on the binding, and I will queue this up, thanks!
Quoted 5 lines
Quoted 2 lines
Oops. Thanks for catching that. Would you like me to re-send or will you fix up that path on your end?
I can fix it up if Rob is happy with the current binding, if you need to resubmit, please fix that as well. Thanks!
Can you respin a v2 with the MAINTAINERS file as well as the downstream kernel fixes that implement suspend/resume support?
Thank you
Quoted 1 line
Signature · 1 line
Florian
Re: [PATCH v2 2/2] soc: brcmstb: Add driver for DPFE
Quoted 42 lines · Florian Fainelli
Quoted 41 lines · Florian Fainelli
Quoted 40 lines · Markus Mayer
Quoted 38 lines · Florian Fainelli
Hi Markus,
Quoted 21 lines · Markus Mayer
From: Markus Mayer <[email protected]>
This driver allows access to DRAM properties, such as the refresh rate, via the Broadcom STB DDR PHY Front End (DPFE). The refresh rate can be used as indirect indicator of the DRAM temperature.
The driver also allows setting of the sampling interval.
Signed-off-by Markus Mayer <[email protected]>--- MAINTAINERS | 8 + drivers/soc/bcm/brcmstb/Makefile | 2 +- drivers/soc/bcm/brcmstb/dpfe.c | 689 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 698 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/bcm/brcmstb/dpfe.cMAINTAINERS +0
-0MAINTAINERS S: Maintained · line 2873
Quoted 10 lines
MAINTAINERS +7
-0@@ -2864,6 +2864,14 @@ S: Maintained F: Documentation/devicetree/bindings/cpufreq/brcm,stb-avs-cpu-freq.txt F: drivers/cpufreq/brcmstb* +BROADCOM STB SOC DPFE DRIVER +M: Markus Mayer <[email protected]> +M: bcm-kernel-feedback-list at broadcom.com +L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/soc/bcm/brcm,dpfe-cpu.txt +F: drivers/misc/brcmstb-dpfe.cJust one nit: this should be
drivers/soc/bcm/brcmstb/dpfe.c, other than that, I just need an Ack from Rob on the binding, and I will queue this up, thanks!
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Oops. Thanks for catching that. Would you like me to re-send or will you fix up that path on your end?
I can fix it up if Rob is happy with the current binding, if you need to resubmit, please fix that as well. Thanks!
Can you respin a v2 with the
MAINTAINERSfile as well as the downstream kernel fixes that implement suspend/resume support?
Never mind, I grepped for the wrong thing, applied
Signature · 1 line
Florian