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

Commit e8d04cb3 authored by Niranjana Vishwanathapura's avatar Niranjana Vishwanathapura
Browse files

msm: emac: change device tree binding name prefix



Add the support in the driver to change the name prefix from "qcom" to
"qti" for device tree binding.

Change-Id: I68709872af29e1d53dcef42721f89fd832af2731
Signed-off-by: default avatarNiranjana Vishwanathapura <nvishwan@codeaurora.org>
parent 7b6446cc
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ Qualcomm MSM Ethernet Controller (EMAC)

Required properties:
- cell-index : EMAC controller instance number.
- compatible : Should be "qcom,emac".
- compatible : Should be "qti,emac".
- reg : Offset and length of the register regions for the device
- reg-names : Register region names referenced in 'reg' above.
	Required register resource entries are:
@@ -10,7 +10,7 @@ Required properties:
	"emac_csr"   : EMAC wrapper register block.
	Optional register resource entries are:
	"emac_1588"      : EMAC 1588 (PTP) register block.
			   Required if 'qcom,emac-tstamp-en' is present.
			   Required if 'qti,emac-tstamp-en' is present.
	"emac_qserdes"   : EMAC SerDes register block.
			   Required if 'phy-mode' is "sgmii".
	"emac_sgmii_phy" : EMAC SGMII PHY register block.
@@ -27,15 +27,15 @@ Required properties:
			   Required if 'phy-mode' is "sgmii".
	"emac_wol_irq"   : EMAC Wake-On-LAN (WOL) interrupt.
			   Required if WOL is supported.
- qcom,emac-gpio-mdc  : GPIO pin number of the MDC line of MDIO bus.
- qcom,emac-gpio-mdio : GPIO pin number of the MDIO line of MDIO bus.
- qti,emac-gpio-mdc  : GPIO pin number of the MDC line of MDIO bus.
- qti,emac-gpio-mdio : GPIO pin number of the MDIO line of MDIO bus.
- phy-addr : Specifies phy address on MDIO bus.
- phy-mode : Specifies PHY type being used (eg., "sgmii", "rgmii", "gmii" etc).
	     For "sgmii", the "emac_sgmii" register base and
	     "emac_sgmii_irq" interrupt must be specified.

Optional properties:
- qcom,emac-tstamp-en : Enables the PTP (1588) timestamping feature.
- qti,emac-tstamp-en : Enables the PTP (1588) timestamping feature.
		        Include this only if PTP (1588) timestamping
			feature is needed. If included, "emac_1588" register
			base should be specified.
@@ -46,9 +46,9 @@ Optional properties:
		      initialization.

Example:
	emac0: qcom,emac@feb20000 {
	emac0: qti,emac@feb20000 {
		cell-index = <0>;
		compatible = "qcom,emac";
		compatible = "qti,emac";
		reg-names = "emac", "emac_csr", "emac_1588",
			    "emac_qserdes", "emac_sgmii_phy";
		reg = <0xfeb20000 0x10000>,
@@ -59,9 +59,9 @@ Example:
		interrupts = <0 76 0>, <0 77 0>, <0 78 0>, <0 79 0>;
		interrupt-names = "emac_core0_irq", "emac_core1_irq",
				  "emac_core2_irq", "emac_core3_irq";
		qcom,emac-gpio-mdc = <&msmgpio 123 0>;
		qcom,emac-gpio-mdio = <&msmgpio 124 0>;
		qcom,emac-tstamp-en;
		qti,emac-gpio-mdc = <&msmgpio 123 0>;
		qti,emac-gpio-mdio = <&msmgpio 124 0>;
		qti,emac-tstamp-en;
		phy-mode = "sgmii";
		phy-addr = <0>;
	};
+4 −4
Original line number Diff line number Diff line
@@ -86,8 +86,8 @@ static struct emac_irq_info emac_irq[EMAC_NUM_IRQ] = {
};

static struct emac_gpio_info emac_gpio[EMAC_NUM_GPIO] = {
	{ 0, "qcom,emac-gpio-mdc" },
	{ 0, "qcom,emac-gpio-mdio" },
	{ 0, "qti,emac-gpio-mdc" },
	{ 0, "qti,emac-gpio-mdio" },
};

static struct emac_clk_info emac_clk[EMAC_NUM_CLK] = {
@@ -2281,7 +2281,7 @@ static int emac_get_resources(struct platform_device *pdev,
		return retval;

	/* get time stamp enable flag */
	adpt->tstamp_en = of_property_read_bool(node, "qcom,emac-tstamp-en");
	adpt->tstamp_en = of_property_read_bool(node, "qti,emac-tstamp-en");

	/* get phy address on MDIO bus */
	retval = of_property_read_u32(node, "phy-addr", &adpt->hw.phy_addr);
@@ -2577,7 +2577,7 @@ static const struct dev_pm_ops emac_pm_ops = {

static struct of_device_id emac_dt_match[] = {
	{
		.compatible = "qcom,emac",
		.compatible = "qti,emac",
	},
	{}
};