SoC driver for Broadcom STB DPFE
Subsystems (4)
v3 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 v2:
- moved driver from drivers/soc/bcm/brcmstb to drivers/memory
- renamed the driver from dpfe.c to brcmstb_dpfe.c
- added le32_to_cpu() in a few places (where be32_to_cpu() calls already existed)
- added a little blurb what the le32_to_cpu()/be32_to_cpu() business is all about
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
memory: brcmstb: Add driver for DPFE
.../bindings/memory-controllers/brcm,dpfe-cpu.txt | 27 + MAINTAINERS | 8 + drivers/memory/Makefile | 1 + drivers/memory/brcmstb_dpfe.c | 701 +++++++++++++++++++++ 4 files changed, 737 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.txt create mode 100644 drivers/memory/brcmstb_dpfe.c
Signature · 1 line
2.7.4
PATCH v3 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).
--- .../bindings/memory-controllers/brcm,dpfe-cpu.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/brcm,dpfe-cpu.txt
Documentation/devicetree/bindings/memory-controllers/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
PATCH v3 2/2 memory: 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/memory/Makefile | 1 + drivers/memory/brcmstb_dpfe.c | 701 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 710 insertions(+) create mode 100644 drivers/memory/brcmstb_dpfe.c
MAINTAINERS +8 -0
@@ -2935,6 +2935,14 @@ S: Maintained F: drivers/bcma/ F: include/linux/bcma/ +BROADCOM STB 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/memory-controllers/brcm,dpfe-cpu.txt +F: drivers/memory/brcmstb_dpfe.c + BROADCOM SYSTEMPORT ETHERNET DRIVER M: Florian Fainelli <[email protected]> L: netdev at vger.kernel.org
drivers/memory/Makefile +1 -0
@@ -8,6 +8,7 @@ endif obj-$(CONFIG_ARM_PL172_MPMC) += pl172.o obj-$(CONFIG_ATMEL_SDRAMC) += atmel-sdramc.o obj-$(CONFIG_ATMEL_EBI) += atmel-ebi.o +obj-$(CONFIG_ARCH_BRCMSTB) += brcmstb_dpfe.o obj-$(CONFIG_TI_AEMIF) += ti-aemif.o obj-$(CONFIG_TI_EMIF) += emif.o obj-$(CONFIG_OMAP_GPMC) += omap-gpmc.o
drivers/memory/brcmstb_dpfe.c new file +701 -0
701 lines not on this page · raw message
Signature · 1 line
2.7.4
Florian Fainelli
AppliedQuoted 33 lines · Markus Mayer
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 v2:
- moved driver fromdrivers/soc/bcm/brcmstbtodrivers/memory
- renamed the driver fromdpfe.ctobrcmstb_dpfe.c
- addedle32_to_cpu()in a few places (wherebe32_to_cpu()calls already existed)
- added a little blurb what the le32_to_cpu()/be32_to_cpu() business is all aboutChanges 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
Quoted 1 line
Applied, thanks Markus! Will get that resubmitted in a short while:
https://github.com/Broadcom/stblinux/commits/drivers/next
Signature · 1 line
Florian