Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1774dac0 authored by Abhijit Kulkarni's avatar Abhijit Kulkarni Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: add secure smmu cb node for sdm845



This change adds the secure context bank child node in mdss
driver, this is required for having both the secure and non-secure
smmu context bank support in the driver. This change also renames
the child nodes to avoid compilation issues on the builds, where
fb driver mdss device file is also present. As a part of this
change the smmu driver registration is called as a part of
msm driver probe.

CRs-Fixed: 2050484
Change-Id: I90cd31fd792b0fd9772689dc6561bb0b429e1e3a
Signed-off-by: default avatarAbhijit Kulkarni <kabhijit@codeaurora.org>
parent 50d69440
Loading
Loading
Loading
Loading
+26 −10
Original line number Diff line number Diff line
@@ -361,17 +361,23 @@ Bus Scaling Data:
				* Current values of src & dst are defined at
				include/linux/msm-bus-board.h

SMMU Subnodes:
- smmu_sde_****:		Child nodes representing sde smmu virtual
				devices

Subnode properties:
- compatible :          Compatible name used in smmu v2.
                        smmu_v2 names should be:
                        "qcom,smmu-mdp-unsec"   - smmu context bank device for
                                                unsecure mdp domain.
                        "qcom,smmu-rot-unsec"   - smmu context bank device for
                                                unsecure rotation domain.
                        "qcom,smmu-mdp-sec"     - smmu context bank device for
                                                secure mdp domain.
                        "qcom,smmu-rot-sec"     - smmu context bank device for
                                                secure rotation domain.
- compatible:			Compatible names used for smmu devices.
				names should be:
				"qcom,smmu_sde_unsec": smmu context bank device
				for unsecure sde real time domain.
				"qcom,smmu_sde_sec": smmu context bank device
				for secure sde real time domain.
				"qcom,smmu_sde_nrt_unsec": smmu context bank device
				for unsecure sde non-real time domain.
				"qcom,smmu_sde_nrt_sec": smmu context bank device
				for secure sde non-real time domain.


Please refer to ../../interrupt-controller/interrupts.txt for a general
description of interrupt bindings.

@@ -673,4 +679,14 @@ Example:
              <1 590 0 160000>,
              <1 590 0 320000>;
        };

    smmu_kms_unsec: qcom,smmu_kms_unsec_cb {
        compatible = "qcom,smmu_sde_unsec";
        iommus = <&mmss_smmu 0>;
    };

    smmu_kms_sec: qcom,smmu_kms_sec_cb {
        compatible = "qcom,smmu_sde_sec";
        iommus = <&mmss_smmu 1>;
    };
  };
+6 −0
Original line number Diff line number Diff line
@@ -207,6 +207,12 @@
			};
		};

		smmu_sde_sec: qcom,smmu_sde_sec_cb {
			compatible = "qcom,smmu_sde_sec";
			iommus = <&apps_smmu 0x881 0x8>,
			       <&apps_smmu 0xc81 0x8>;
		};

		/* data and reg bus scale settings */
		qcom,sde-data-bus {
			qcom,msm-bus,name = "mdss_sde_mnoc";
+2 −0
Original line number Diff line number Diff line
@@ -2054,6 +2054,7 @@ void __exit adreno_unregister(void)
static int __init msm_drm_register(void)
{
	DBG("init");
	msm_smmu_driver_init();
	msm_dsi_register();
	msm_edp_register();
	msm_hdmi_register();
@@ -2069,6 +2070,7 @@ static void __exit msm_drm_unregister(void)
	adreno_unregister();
	msm_edp_unregister();
	msm_dsi_unregister();
	msm_smmu_driver_cleanup();
}

module_init(msm_drm_register);
+4 −0
Original line number Diff line number Diff line
@@ -63,4 +63,8 @@ struct msm_mmu *msm_iommu_new(struct device *dev, struct iommu_domain *domain);
struct msm_mmu *msm_smmu_new(struct device *dev,
	enum msm_mmu_domain_type domain);

/* SDE smmu driver initialize and cleanup functions */
int __init msm_smmu_driver_init(void);
void __exit msm_smmu_driver_cleanup(void);

#endif /* __MSM_MMU_H__ */
+6 −8
Original line number Diff line number Diff line
@@ -305,13 +305,13 @@ static struct msm_smmu_domain msm_smmu_domains[MSM_SMMU_DOMAIN_MAX] = {
};

static const struct of_device_id msm_smmu_dt_match[] = {
	{ .compatible = "qcom,smmu-mdp-unsec",
	{ .compatible = "qcom,smmu_sde_unsec",
		.data = &msm_smmu_domains[MSM_SMMU_DOMAIN_UNSECURE] },
	{ .compatible = "qcom,smmu-mdp-sec",
	{ .compatible = "qcom,smmu_sde_sec",
		.data = &msm_smmu_domains[MSM_SMMU_DOMAIN_SECURE] },
	{ .compatible = "qcom,smmu-rot-unsec",
	{ .compatible = "qcom,smmu_sde_nrt_unsec",
		.data = &msm_smmu_domains[MSM_SMMU_DOMAIN_NRT_UNSECURE] },
	{ .compatible = "qcom,smmu-rot-sec",
	{ .compatible = "qcom,smmu_sde_nrt_sec",
		.data = &msm_smmu_domains[MSM_SMMU_DOMAIN_NRT_SECURE] },
	{}
};
@@ -535,7 +535,7 @@ static struct platform_driver msm_smmu_driver = {
	},
};

static int __init msm_smmu_driver_init(void)
int __init msm_smmu_driver_init(void)
{
	int ret;

@@ -545,13 +545,11 @@ static int __init msm_smmu_driver_init(void)

	return ret;
}
module_init(msm_smmu_driver_init);

static void __exit msm_smmu_driver_cleanup(void)
void __exit msm_smmu_driver_cleanup(void)
{
	platform_driver_unregister(&msm_smmu_driver);
}
module_exit(msm_smmu_driver_cleanup);

MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("MSM SMMU driver");