[PATCH v4 0/2] Add an interface to get current DDR data rate
Crystal Guo
crystal.guo at mediatek.com
Wed Apr 2 23:48:46 PDT 2025
This series is based on linux-next, tag: next-20250402.
Vcore DVFS feature need know the current DDR data rate.
Add MediaTek DRAMC driver to provide an interface that can
obtain current DDR data rate.
---
Changes in v4:
- Rename "mediatek,dramc.yaml" to "mediatek,mt8196-dramc.yaml";
- Refine Kconfig for MediaTek memory controller by removing the
redundant explanation;
- Move the function 'read_reg_field()' to before mtk_dramc_probe();
- Rename struct 'mtk_dramc_dev_t' to 'mtk_dramc';
- Align the comments to kerneldoc;
- Simplify the function 'mtk_dramc_get_data_rate' by removing the
redundant error handling process.
---
Changes in v3:
- Move register offset, register mask and other SoC-dependent variables
to the platform data;
- Correct the spelling error.
Link to v3:
https://patchwork.kernel.org/patch/14029756
---
Changes in v2:
- Remove pr_info and pr_err, use dev_err or dev_err_probe to print
error message;
- Replace module_init by module_platform_driver;
- Remove unnecessary global variables;
- Change fmeter-verison to platform data;
- Remove mtk-dramc.h;
- Refine compatible to "mediatek,mt8196-dramc";
- Refine CONFIG name to MEDIATEK_MC;
- Fix yaml build errors, remove unnecessary properties on yaml file.
Link to v2:
https://patchwork.kernel.org/patch/13964208
Crystal Guo (2):
dt-bindings: memory-controllers: Add MediaTek DRAM controller
interface
memory/mediatek: Add an interface to get current DDR data rate
.../mediatek,mt8196-dramc.yaml | 44 ++++
drivers/memory/Kconfig | 1 +
drivers/memory/Makefile | 1 +
drivers/memory/mediatek/Kconfig | 20 ++
drivers/memory/mediatek/Makefile | 2 +
drivers/memory/mediatek/mtk-dramc.c | 223 ++++++++++++++++++
6 files changed, 291 insertions(+)
create mode 100644 Documentation/devicetree/bindings/memory-controllers/mediatek,mt8196-dramc.yaml
create mode 100644 drivers/memory/mediatek/Kconfig
create mode 100644 drivers/memory/mediatek/Makefile
create mode 100644 drivers/memory/mediatek/mtk-dramc.c
--
2.18.0
More information about the Linux-mediatek
mailing list