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

Commit 6eb5fc02 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 356d521b 2339b30e
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -51,6 +51,10 @@
	status = "ok";
};

&emac0 {
	status = "ok";
};

/* MPP pin 2 configs for SMB358 interrupt line */
&pm8019_mpps {
	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 {
	/* SMB358 charger configuration */
	smb358_otg_vreg: smb358-charger@57 {
+92 −0
Original line number 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 Diff line number Diff line
@@ -378,6 +378,7 @@
		enable-active-high;
		gpio = <&pm8019_gpios 4 0>;
	};

	/* Rome 3.3V supply */
	rome_vreg: rome_vreg {
		compatible = "regulator-fixed";
@@ -386,4 +387,12 @@
		enable-active-high;
		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 Diff line number Diff line
@@ -1225,6 +1225,38 @@

		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"
+14 −0
Original line number Diff line number Diff line
@@ -38,6 +38,13 @@
/* mdio/mdc gpios */
#define EMAC_GPIO_CNT         2

enum emac_vreg_id {
	EMAC_VREG1,
	EMAC_VREG2,
	EMAC_VREG3,
	EMAC_VREG_CNT
};

enum emac_clk_id {
	EMAC_CLK_AXI,
	EMAC_CLK_CFG_AHB,
@@ -575,6 +582,12 @@ struct emac_clk {
	bool			enabled;
};

struct emac_regulator {
	struct regulator *vreg;
	bool			enabled;
	bool			set_voltage;
};

/* emac_ring_header represents a single, contiguous block of DMA space
 * mapped for the three descriptor rings (tpd, rfd, rrd)
 */
@@ -704,6 +717,7 @@ struct emac_adapter {
	struct emac_irq_per_dev		irq[EMAC_IRQ_CNT];
	unsigned int			gpio[EMAC_GPIO_CNT];
	struct emac_clk			clk[EMAC_CLK_CNT];
	struct emac_regulator		vreg[EMAC_VREG_CNT];

	/* dma parameters */
	u64                             dma_mask;
Loading