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

Commit 2339b30e authored by Alok Chauhan's avatar Alok Chauhan Committed by Gerrit - the friendly Code Review server
Browse files

ARM: dts: msm: Add EMAC controller support for MDMFERMIUM



Add Ethernet support on MDMFERMIUM using SGMII interface.

Change-Id: Iec044735cdc725a81e021f97ea5a7659ddf71979
Signed-off-by: default avatarAlok Chauhan <alokc@codeaurora.org>
parent 10009877
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -51,6 +51,10 @@
	status = "ok";
	status = "ok";
};
};


&emac0 {
	status = "ok";
};

/* MPP pin 2 configs for SMB358 interrupt line */
/* MPP pin 2 configs for SMB358 interrupt line */
&pm8019_mpps {
&pm8019_mpps {
	mpp@a100 {
	mpp@a100 {
@@ -88,6 +92,17 @@
	};
	};
};
};


/* MPP pin 4 configs for SGMII */
&pm8019_mpps {
	mpp@a300 { /* MPP 4 */
		qcom,mode = <1>;		/* Digital output */
		qcom,vin-sel = <2>;		/* 1.8V */
		qcom,src-sel = <0>;		/* Constant */
		qcom,master-en = <1>;		/* Enable GPIO */
		status = "okay";
	};
};

&i2c_4 {
&i2c_4 {
	/* SMB358 charger configuration */
	/* SMB358 charger configuration */
	smb358_otg_vreg: smb358-charger@57 {
	smb358_otg_vreg: smb358-charger@57 {
+92 −0
Original line number Original line Diff line number Diff line
@@ -695,5 +695,97 @@
				};
				};
			};
			};
		};
		};

		emac0 {
			emac0_active: emac0_active {
				/* active state */
				mux {
					/* MDC MDIO */
					pins = "gpio27", "gpio28";
					function = "gmac_mdio";
				};

				config {
					pins = "gpio27", "gpio28";
					drive-strength = <16>; /* 16 MA */
					bias-pull-up;
				};
			};

			emac0_sleep: emac0_sleep {
				/* suspended state */
				mux {
					/* MDC MDIO */
					pins = "gpio27", "gpio28";
					function = "gpio";
				};

				config {
					pins = "gpio27", "gpio28";
					drive-strength = <2>; /* 2 MA */
					bias-pull-down;
				};
			};

			emac0_irq_active: emac0_irq_active {
				/* active state */
				mux {
					/* ETH IRQ */
					pins = "gpio30";
					function = "gpio";
				};

				config {
					pins = "gpio30";
					drive-strength = <16>; /* 16 MA */
					bias-pull-up;
				};
			};

			emac0_irq_sleep: emac0_irq_sleep {
				/* suspended state */
				mux {
					/* ETH IRQ */
					pins = "gpio30";
					function = "gpio";
				};

				config {
					pins = "gpio30";
					drive-strength = <2>; /* 2 MA */
					bias-pull-down;
				};
			};

			emac0_rst_active: emac0_rst_active {
				/* active state */
				mux {
					/* ETH RST */
					pins = "gpio29";
					function = "gpio";
				};

				config {
					pins = "gpio29";
					drive-strength = <16>; /* 8 MA */
					bias-pull-up;
				};
			};

			emac0_rst_sleep: emac0_rst_sleep {
				/* suspended state */
				mux {
					/* ETH RST */
					pins = "gpio29";
					function = "gpio";
				};

				config {
					pins = "gpio29";
					drive-strength = <2>; /* 2 MA */
					bias-pull-down;
				};
			};
		};
	};
	};
};
};
+9 −0
Original line number Original line Diff line number Diff line
@@ -378,6 +378,7 @@
		enable-active-high;
		enable-active-high;
		gpio = <&pm8019_gpios 4 0>;
		gpio = <&pm8019_gpios 4 0>;
	};
	};

	/* Rome 3.3V supply */
	/* Rome 3.3V supply */
	rome_vreg: rome_vreg {
	rome_vreg: rome_vreg {
		compatible = "regulator-fixed";
		compatible = "regulator-fixed";
@@ -386,4 +387,12 @@
		enable-active-high;
		enable-active-high;
		gpio = <&pm8019_gpios 3 0>;
		gpio = <&pm8019_gpios 3 0>;
	};
	};

	emac_lan_vreg: emac_lan_vreg {
		compatible = "regulator-fixed";
		regulator-name = "emac_lan_vreg";
		startup-delay-us = <250>;
		enable-active-high;
		gpio = <&pm8019_mpps 4 0>;
	};
};
};
+32 −0
Original line number Original line Diff line number Diff line
@@ -1225,6 +1225,38 @@


		status = "disabled";
		status = "disabled";
	};
	};

	emac0: qcom,emac@7c40000 {
		cell-index = <0>;
		compatible = "qcom,emac";
		reg-names = "emac", "emac_csr", "emac_1588", "emac_sgmii";
		reg = <0x7c40000 0x10000>,
			<0x7c56000 0x1000>,
			<0x7c5C000 0x4000>,
			<0x7c58000 0x400>;
		interrupts = <0 76 0>, <0 80 0>;
		interrupt-names = "emac_core0_irq", "emac_sgmii_irq";
		emac_vreg1-supply = <&mdmfermium_l1>;
		emac_vreg2-supply = <&mdmfermium_l5>;
		emac_vreg3-supply = <&emac_lan_vreg>;
		clocks = <&clock_gcc clk_gcc_emac_0_axi_clk>,
			 <&clock_gcc clk_gcc_emac_0_ahb_clk>,
			 <&clock_gcc clk_gcc_emac_0_125m_clk>,
			 <&clock_gcc clk_gcc_emac_0_sys_25m_clk>,
			 <&clock_gcc clk_gcc_emac_0_tx_clk>,
			 <&clock_gcc clk_gcc_emac_0_rx_clk>,
			 <&clock_gcc clk_gcc_emac_0_sys_clk>;
		clock-names = "axi_clk", "cfg_ahb_clk", "125m_clk",
			"25m_clk", "tx_clk", "rx_clk", "sys_clk";
		pinctrl-names = "emac_active", "emac_sleep";
		pinctrl-0 = <&emac0_active &emac0_irq_active &emac0_rst_active>;
		pinctrl-1 = <&emac0_sleep &emac0_irq_sleep &emac0_rst_sleep>;
		qcom,emac-tstamp-en;
		qcom,emac-ptp-frac-ns-adj = <125000000 1>;
		phy-mode = "sgmii";
		phy-addr = <0>;
		status = "disable";
	};
};
};


#include "mdmfermium-rpm-regulator.dtsi"
#include "mdmfermium-rpm-regulator.dtsi"