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

Commit bb466b09 authored by Stepan Moskovchenko's avatar Stepan Moskovchenko
Browse files

ARM: dts: msm: Add KS8851 device for APQ8084 CDP



Add the device definition and associated GPIO configuration
for the KS8851 SPI Ethernet controller on the APQ8084 CDP
platform.

Change-Id: Ib407a753b0e74c66295a6a279c2321dfb32c14ad
Signed-off-by: default avatarStepan Moskovchenko <stepanm@codeaurora.org>
parent 4bb26321
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -498,3 +498,16 @@
		};
	};
};

&spi_0 {
	ethernet-switch@2 {
		compatible = "micrel,ks8851";
		reg = <2>;
		interrupt-parent = <&msmgpio>;
		interrupts = <60 0>;
		spi-max-frequency = <4800000>;
		rst-gpio = <&msmgpio 59 0>;
		vdd-io-supply = <&spi_eth_vreg>;
		vdd-phy-supply = <&spi_eth_vreg>;
	};
};
+1 −0
Original line number Diff line number Diff line
@@ -1706,6 +1706,7 @@
		qcom,gpio-miso = <&msmgpio 1 0>;
		qcom,gpio-clk  = <&msmgpio 3 0>;
		qcom,gpio-cs0  = <&msmgpio 0 0>;
		qcom,gpio-cs2  = <&msmgpio 117 0>;

		qcom,infinite-mode = <0>;
		qcom,use-bam;
+35 −0
Original line number Diff line number Diff line
@@ -297,6 +297,35 @@ static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
	}
};

#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
static struct gpiomux_setting gpio_eth_config = {
	.pull = GPIOMUX_PULL_UP,
	.drv = GPIOMUX_DRV_2MA,
	.func = GPIOMUX_FUNC_GPIO,
};

static struct msm_gpiomux_config msm_eth_configs[] __initdata = {
	{
		.gpio	  = 60,			/* SPI IRQ */
		.settings = {
			[GPIOMUX_SUSPENDED] = &gpio_eth_config,
		}
	},
	{
		.gpio	  = 116,		/* CS */
		.settings = {
			[GPIOMUX_SUSPENDED] = &gpio_eth_config,
		}
	},
	{
		.gpio      = 117,		/* BLSP1 QUP1 SPI_CS2 */
		.settings = {
			[GPIOMUX_SUSPENDED] = &gpio_spi_config,
		},
	},
};
#endif

static struct msm_gpiomux_config msm_blsp1_uart6_configs[] __initdata = {
	{
		.gpio      = 43,		/* BLSP1 UART6 TX */
@@ -889,4 +918,10 @@ void __init apq8084_init_gpiomux(void)
	if (of_board_is_cdp())
		msm_gpiomux_install(eth_pwr, ARRAY_SIZE(eth_pwr));
	msm_gpiomux_install(msm_sensor_configs, ARRAY_SIZE(msm_sensor_configs));

#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
	if (of_board_is_cdp())
		msm_gpiomux_install(msm_eth_configs,
			ARRAY_SIZE(msm_eth_configs));
#endif
}