Like MSM8974 the MSM8226 SoC also contains some OCMEM but it has just
one region for graphics compared to 8974.
While adding support I found a bug in the existing driver that is being
fixed in this series also and the rest of the matches are mostly
preparations for MSM8226 support.
Signed-off-by: Luca Weiss <[email protected]>
---
Changes in v3:
- Rebase on linux-next
- Add 'else' to clk/clk-names in dt-bindings limiting to 1
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- dt-bindings: add hw version hint to msm8974 & msm8226 variant (Konrad)
- dt-bindings: add constraints for clock (Konrad)
- Pick up tags
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Luca Weiss (6):
soc: qcom: ocmem: Fix NUM_PORTS & NUM_MACROS macros
soc: qcom: ocmem: Use dev_err_probe where appropriate
soc: qcom: ocmem: make iface clock optional
dt-bindings: sram: qcom,ocmem: Add msm8226 support
soc: qcom: ocmem: Add support for msm8226
ARM: dts: qcom: msm8226: Add ocmem
.../devicetree/bindings/sram/qcom,ocmem.yaml | 26 ++++++++-
arch/arm/boot/dts/qcom-msm8226.dtsi | 17 ++++++
drivers/soc/qcom/ocmem.c | 67 ++++++++++++----------
3 files changed, 78 insertions(+), 32 deletions(-)
---
base-commit: bcbf7634663f705695e9faa80ef419c2b1589f8e
change-id: 20230506-msm8226-ocmem-bee17571e8eb
Best regards,
--
Luca Weiss <[email protected]>
The msm8226 SoC also contains OCMEM but with one region only.
Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Luca Weiss <[email protected]>
---
drivers/soc/qcom/ocmem.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index ff8d01b0ac68..2064e9512301 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -423,12 +423,18 @@ static int ocmem_dev_remove(struct platform_device *pdev)
return 0;
}
+static const struct ocmem_config ocmem_8226_config = {
+ .num_regions = 1,
+ .macro_size = SZ_128K,
+};
+
static const struct ocmem_config ocmem_8974_config = {
.num_regions = 3,
.macro_size = SZ_128K,
};
static const struct of_device_id ocmem_of_match[] = {
+ { .compatible = "qcom,msm8226-ocmem", .data = &ocmem_8226_config },
{ .compatible = "qcom,msm8974-ocmem", .data = &ocmem_8974_config },
{ }
};
--
2.41.0
Add a node for the ocmem found on msm8226. It contains one region, used
as gmu_ram.
Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Luca Weiss <[email protected]>
---
arch/arm/boot/dts/qcom-msm8226.dtsi | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index ec1b72af80aa..7670ea93d76a 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -664,6 +664,23 @@ smd-edge {
};
};
+ sram@fdd00000 {
+ compatible = "qcom,msm8226-ocmem";
+ reg = <0xfdd00000 0x2000>,
+ <0xfec00000 0x20000>;
+ reg-names = "ctrl", "mem";
+ ranges = <0 0xfec00000 0x20000>;
+ clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>;
+ clock-names = "core";
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ gmu_sram: gmu-sram@0 {
+ reg = <0x0 0x20000>;
+ };
+ };
+
sram@fe805000 {
compatible = "qcom,msm8226-imem", "syscon", "simple-mfd";
reg = <0xfe805000 0x1000>;
--
2.41.0
On Wed, 14 Jun 2023 18:35:46 +0200, Luca Weiss wrote:
> Like MSM8974 the MSM8226 SoC also contains some OCMEM but it has just
> one region for graphics compared to 8974.
>
> While adding support I found a bug in the existing driver that is being
> fixed in this series also and the rest of the matches are mostly
> preparations for MSM8226 support.
>
> [...]
Applied, thanks!
[6/6] ARM: dts: qcom: msm8226: Add ocmem
commit: 4bad24d73abcc6adf70bc4c894c29cb1d0acda05
Best regards,
--
Bjorn Andersson <[email protected]>