linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: am57xx-beagle-x15: Add dual ethernet
@ 2014-12-04 20:53 Felipe Balbi
  2014-12-04 20:55 ` Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2014-12-04 20:53 UTC (permalink / raw)
  To: linux-arm-kernel

Make CPSW work - BeagleBoard-X15 has two network ports

MUX_MODE15 means "driver off". Pins are turned off
conserving more power.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 arch/arm/boot/dts/am57xx-beagle-x15.dts | 106 ++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 49edbda..da1b24c 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -140,6 +140,86 @@
 		>;
 	};
 
+	cpsw_pins_default: cpsw_pins_default {
+		pinctrl-single,pins = <
+			/* Slave 1 */
+			0x250 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tclk */
+			0x254 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tctl */
+			0x258 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td3 */
+			0x25c (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td2 */
+			0x260 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td1 */
+			0x264 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td0 */
+			0x268 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rclk */
+			0x26c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rctl */
+			0x270 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd3 */
+			0x274 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd2 */
+			0x278 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd1 */
+			0x27c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd0 */
+
+			/* Slave 2 */
+			0x198 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tclk */
+			0x19c (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tctl */
+			0x1a0 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td3 */
+			0x1a4 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td2 */
+			0x1a8 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td1 */
+			0x1ac (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td0 */
+			0x1b0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rclk */
+			0x1b4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rctl */
+			0x1b8 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd3 */
+			0x1bc (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd2 */
+			0x1c0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd1 */
+			0x1c4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd0 */
+		>;
+
+	};
+
+	cpsw_pins_sleep: cpsw_pins_sleep {
+		pinctrl-single,pins = <
+			/* Slave 1 */
+			0x250 (PIN_INPUT | MUX_MODE15)
+			0x254 (PIN_INPUT | MUX_MODE15)
+			0x258 (PIN_INPUT | MUX_MODE15)
+			0x25c (PIN_INPUT | MUX_MODE15)
+			0x260 (PIN_INPUT | MUX_MODE15)
+			0x264 (PIN_INPUT | MUX_MODE15)
+			0x268 (PIN_INPUT | MUX_MODE15)
+			0x26c (PIN_INPUT | MUX_MODE15)
+			0x270 (PIN_INPUT | MUX_MODE15)
+			0x274 (PIN_INPUT | MUX_MODE15)
+			0x278 (PIN_INPUT | MUX_MODE15)
+			0x27c (PIN_INPUT | MUX_MODE15)
+
+			/* Slave 1 */
+			0x198 (PIN_INPUT | MUX_MODE15)
+			0x19c (PIN_INPUT | MUX_MODE15)
+			0x1a0 (PIN_INPUT | MUX_MODE15)
+			0x1a4 (PIN_INPUT | MUX_MODE15)
+			0x1a8 (PIN_INPUT | MUX_MODE15)
+			0x1ac (PIN_INPUT | MUX_MODE15)
+			0x1b0 (PIN_INPUT | MUX_MODE15)
+			0x1b4 (PIN_INPUT | MUX_MODE15)
+			0x1b8 (PIN_INPUT | MUX_MODE15)
+			0x1bc (PIN_INPUT | MUX_MODE15)
+			0x1c0 (PIN_INPUT | MUX_MODE15)
+			0x1c4 (PIN_INPUT | MUX_MODE15)
+		>;
+	};
+
+	davinci_mdio_pins_default: davinci_mdio_pins_default {
+		pinctrl-single,pins = <
+			/* MDIO */
+			0x23c (PIN_OUTPUT_PULLUP | MUX_MODE0)	/* mdio_mclk */
+			0x240 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mdio_d */
+		>;
+	};
+
+	davinci_mdio_pins_sleep: davinci_mdio_pins_sleep {
+		pinctrl-single,pins = <
+			0x23c (PIN_INPUT | MUX_MODE15)
+			0x240 (PIN_INPUT | MUX_MODE15)
+		>;
+	};
+
 	tps659038_pins_default: tps659038_pins_default {
 		pinctrl-single,pins = <
 			0x418 (PIN_INPUT_PULLUP | MUX_MODE14)	/* wakeup0.gpio1_0 */
@@ -365,6 +445,32 @@
 	pinctrl-0 = <&uart3_pins_default>;
 };
 
+&mac {
+	status = "okay";
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&cpsw_pins_default>;
+	pinctrl-1 = <&cpsw_pins_sleep>;
+	dual_emac;
+};
+
+&cpsw_emac0 {
+	phy_id = <&davinci_mdio>, <1>;
+	phy-mode = "rgmii";
+	dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+	phy_id = <&davinci_mdio>, <2>;
+	phy-mode = "rgmii";
+	dual_emac_res_vlan = <2>;
+};
+
+&davinci_mdio {
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&davinci_mdio_pins_default>;
+	pinctrl-1 = <&davinci_mdio_pins_sleep>;
+};
+
 &mmc1 {
 	status = "okay";
 
-- 
2.1.0.GIT

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] ARM: dts: am57xx-beagle-x15: Add dual ethernet
  2014-12-04 20:53 [PATCH] ARM: dts: am57xx-beagle-x15: Add dual ethernet Felipe Balbi
@ 2014-12-04 20:55 ` Felipe Balbi
  2014-12-04 20:58   ` Nishanth Menon
  0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2014-12-04 20:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 04, 2014 at 02:53:38PM -0600, Felipe Balbi wrote:
> Make CPSW work - BeagleBoard-X15 has two network ports
> 
> MUX_MODE15 means "driver off". Pins are turned off
> conserving more power.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>

grrr, not sure why it signed again... I guess git cherry-pick -s isn't
very smart after all. Tony, let me know if you prefer that I resend
fixing this SoB detail. In any case:

boot logs http://hastebin.com/joxiweleyi

> ---
>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 106 ++++++++++++++++++++++++++++++++
>  1 file changed, 106 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> index 49edbda..da1b24c 100644
> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> @@ -140,6 +140,86 @@
>  		>;
>  	};
>  
> +	cpsw_pins_default: cpsw_pins_default {
> +		pinctrl-single,pins = <
> +			/* Slave 1 */
> +			0x250 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tclk */
> +			0x254 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tctl */
> +			0x258 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td3 */
> +			0x25c (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td2 */
> +			0x260 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td1 */
> +			0x264 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td0 */
> +			0x268 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rclk */
> +			0x26c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rctl */
> +			0x270 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd3 */
> +			0x274 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd2 */
> +			0x278 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd1 */
> +			0x27c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd0 */
> +
> +			/* Slave 2 */
> +			0x198 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tclk */
> +			0x19c (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tctl */
> +			0x1a0 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td3 */
> +			0x1a4 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td2 */
> +			0x1a8 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td1 */
> +			0x1ac (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td0 */
> +			0x1b0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rclk */
> +			0x1b4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rctl */
> +			0x1b8 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd3 */
> +			0x1bc (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd2 */
> +			0x1c0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd1 */
> +			0x1c4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd0 */
> +		>;
> +
> +	};
> +
> +	cpsw_pins_sleep: cpsw_pins_sleep {
> +		pinctrl-single,pins = <
> +			/* Slave 1 */
> +			0x250 (PIN_INPUT | MUX_MODE15)
> +			0x254 (PIN_INPUT | MUX_MODE15)
> +			0x258 (PIN_INPUT | MUX_MODE15)
> +			0x25c (PIN_INPUT | MUX_MODE15)
> +			0x260 (PIN_INPUT | MUX_MODE15)
> +			0x264 (PIN_INPUT | MUX_MODE15)
> +			0x268 (PIN_INPUT | MUX_MODE15)
> +			0x26c (PIN_INPUT | MUX_MODE15)
> +			0x270 (PIN_INPUT | MUX_MODE15)
> +			0x274 (PIN_INPUT | MUX_MODE15)
> +			0x278 (PIN_INPUT | MUX_MODE15)
> +			0x27c (PIN_INPUT | MUX_MODE15)
> +
> +			/* Slave 1 */
> +			0x198 (PIN_INPUT | MUX_MODE15)
> +			0x19c (PIN_INPUT | MUX_MODE15)
> +			0x1a0 (PIN_INPUT | MUX_MODE15)
> +			0x1a4 (PIN_INPUT | MUX_MODE15)
> +			0x1a8 (PIN_INPUT | MUX_MODE15)
> +			0x1ac (PIN_INPUT | MUX_MODE15)
> +			0x1b0 (PIN_INPUT | MUX_MODE15)
> +			0x1b4 (PIN_INPUT | MUX_MODE15)
> +			0x1b8 (PIN_INPUT | MUX_MODE15)
> +			0x1bc (PIN_INPUT | MUX_MODE15)
> +			0x1c0 (PIN_INPUT | MUX_MODE15)
> +			0x1c4 (PIN_INPUT | MUX_MODE15)
> +		>;
> +	};
> +
> +	davinci_mdio_pins_default: davinci_mdio_pins_default {
> +		pinctrl-single,pins = <
> +			/* MDIO */
> +			0x23c (PIN_OUTPUT_PULLUP | MUX_MODE0)	/* mdio_mclk */
> +			0x240 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mdio_d */
> +		>;
> +	};
> +
> +	davinci_mdio_pins_sleep: davinci_mdio_pins_sleep {
> +		pinctrl-single,pins = <
> +			0x23c (PIN_INPUT | MUX_MODE15)
> +			0x240 (PIN_INPUT | MUX_MODE15)
> +		>;
> +	};
> +
>  	tps659038_pins_default: tps659038_pins_default {
>  		pinctrl-single,pins = <
>  			0x418 (PIN_INPUT_PULLUP | MUX_MODE14)	/* wakeup0.gpio1_0 */
> @@ -365,6 +445,32 @@
>  	pinctrl-0 = <&uart3_pins_default>;
>  };
>  
> +&mac {
> +	status = "okay";
> +	pinctrl-names = "default", "sleep";
> +	pinctrl-0 = <&cpsw_pins_default>;
> +	pinctrl-1 = <&cpsw_pins_sleep>;
> +	dual_emac;
> +};
> +
> +&cpsw_emac0 {
> +	phy_id = <&davinci_mdio>, <1>;
> +	phy-mode = "rgmii";
> +	dual_emac_res_vlan = <1>;
> +};
> +
> +&cpsw_emac1 {
> +	phy_id = <&davinci_mdio>, <2>;
> +	phy-mode = "rgmii";
> +	dual_emac_res_vlan = <2>;
> +};
> +
> +&davinci_mdio {
> +	pinctrl-names = "default", "sleep";
> +	pinctrl-0 = <&davinci_mdio_pins_default>;
> +	pinctrl-1 = <&davinci_mdio_pins_sleep>;
> +};
> +
>  &mmc1 {
>  	status = "okay";
>  
> -- 
> 2.1.0.GIT
> 

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141204/3e8353b1/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ARM: dts: am57xx-beagle-x15: Add dual ethernet
  2014-12-04 20:55 ` Felipe Balbi
@ 2014-12-04 20:58   ` Nishanth Menon
  2014-12-04 21:02     ` [PATCH v2] " Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: Nishanth Menon @ 2014-12-04 20:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/04/2014 02:55 PM, Felipe Balbi wrote:
> On Thu, Dec 04, 2014 at 02:53:38PM -0600, Felipe Balbi wrote:
>> Make CPSW work - BeagleBoard-X15 has two network ports
>>
>> MUX_MODE15 means "driver off". Pins are turned off
>> conserving more power.
>>
>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>> Signed-off-by: Nishanth Menon <nm@ti.com>
>> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
>> Signed-off-by: Felipe Balbi <balbi@ti.com>
> 
> grrr, not sure why it signed again... I guess git cherry-pick -s isn't
> very smart after all. Tony, let me know if you prefer that I resend
> fixing this SoB detail. In any case:
> 
> boot logs http://hastebin.com/joxiweleyi
> 
>> ---
>>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 106 ++++++++++++++++++++++++++++++++
>>  1 file changed, 106 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
>> index 49edbda..da1b24c 100644
>> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
>> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
>> @@ -140,6 +140,86 @@
>>  		>;
>>  	};
>>  
>> +	cpsw_pins_default: cpsw_pins_default {
>> +		pinctrl-single,pins = <
>> +			/* Slave 1 */
>> +			0x250 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tclk */
>> +			0x254 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tctl */
>> +			0x258 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td3 */
>> +			0x25c (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td2 */
>> +			0x260 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td1 */
>> +			0x264 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td0 */
>> +			0x268 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rclk */
>> +			0x26c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rctl */
>> +			0x270 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd3 */
>> +			0x274 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd2 */
>> +			0x278 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd1 */
>> +			0x27c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd0 */
>> +
>> +			/* Slave 2 */
>> +			0x198 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tclk */
>> +			0x19c (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tctl */
>> +			0x1a0 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td3 */
>> +			0x1a4 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td2 */
>> +			0x1a8 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td1 */
>> +			0x1ac (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td0 */
>> +			0x1b0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rclk */
>> +			0x1b4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rctl */
>> +			0x1b8 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd3 */
>> +			0x1bc (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd2 */
>> +			0x1c0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd1 */
>> +			0x1c4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd0 */
>> +		>;
>> +
>> +	};
>> +
>> +	cpsw_pins_sleep: cpsw_pins_sleep {
>> +		pinctrl-single,pins = <
>> +			/* Slave 1 */
>> +			0x250 (PIN_INPUT | MUX_MODE15)
>> +			0x254 (PIN_INPUT | MUX_MODE15)
>> +			0x258 (PIN_INPUT | MUX_MODE15)
>> +			0x25c (PIN_INPUT | MUX_MODE15)
>> +			0x260 (PIN_INPUT | MUX_MODE15)
>> +			0x264 (PIN_INPUT | MUX_MODE15)
>> +			0x268 (PIN_INPUT | MUX_MODE15)
>> +			0x26c (PIN_INPUT | MUX_MODE15)
>> +			0x270 (PIN_INPUT | MUX_MODE15)
>> +			0x274 (PIN_INPUT | MUX_MODE15)
>> +			0x278 (PIN_INPUT | MUX_MODE15)
>> +			0x27c (PIN_INPUT | MUX_MODE15)
>> +
>> +			/* Slave 1 */

Slave 2?

>> +			0x198 (PIN_INPUT | MUX_MODE15)
>> +			0x19c (PIN_INPUT | MUX_MODE15)
>> +			0x1a0 (PIN_INPUT | MUX_MODE15)
>> +			0x1a4 (PIN_INPUT | MUX_MODE15)
>> +			0x1a8 (PIN_INPUT | MUX_MODE15)
>> +			0x1ac (PIN_INPUT | MUX_MODE15)
>> +			0x1b0 (PIN_INPUT | MUX_MODE15)
>> +			0x1b4 (PIN_INPUT | MUX_MODE15)
>> +			0x1b8 (PIN_INPUT | MUX_MODE15)
>> +			0x1bc (PIN_INPUT | MUX_MODE15)
>> +			0x1c0 (PIN_INPUT | MUX_MODE15)
>> +			0x1c4 (PIN_INPUT | MUX_MODE15)
>> +		>;
>> +	};
>> +
>> +	davinci_mdio_pins_default: davinci_mdio_pins_default {
>> +		pinctrl-single,pins = <
>> +			/* MDIO */
>> +			0x23c (PIN_OUTPUT_PULLUP | MUX_MODE0)	/* mdio_mclk */
>> +			0x240 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mdio_d */
>> +		>;
>> +	};
>> +
>> +	davinci_mdio_pins_sleep: davinci_mdio_pins_sleep {
>> +		pinctrl-single,pins = <
>> +			0x23c (PIN_INPUT | MUX_MODE15)
>> +			0x240 (PIN_INPUT | MUX_MODE15)
>> +		>;
>> +	};
>> +
>>  	tps659038_pins_default: tps659038_pins_default {
>>  		pinctrl-single,pins = <
>>  			0x418 (PIN_INPUT_PULLUP | MUX_MODE14)	/* wakeup0.gpio1_0 */
>> @@ -365,6 +445,32 @@
>>  	pinctrl-0 = <&uart3_pins_default>;
>>  };
>>  
>> +&mac {
>> +	status = "okay";
>> +	pinctrl-names = "default", "sleep";
>> +	pinctrl-0 = <&cpsw_pins_default>;
>> +	pinctrl-1 = <&cpsw_pins_sleep>;
>> +	dual_emac;
>> +};
>> +
>> +&cpsw_emac0 {
>> +	phy_id = <&davinci_mdio>, <1>;
>> +	phy-mode = "rgmii";
>> +	dual_emac_res_vlan = <1>;
>> +};
>> +
>> +&cpsw_emac1 {
>> +	phy_id = <&davinci_mdio>, <2>;
>> +	phy-mode = "rgmii";
>> +	dual_emac_res_vlan = <2>;
>> +};
>> +
>> +&davinci_mdio {
>> +	pinctrl-names = "default", "sleep";
>> +	pinctrl-0 = <&davinci_mdio_pins_default>;
>> +	pinctrl-1 = <&davinci_mdio_pins_sleep>;
>> +};
>> +
>>  &mmc1 {
>>  	status = "okay";
>>  
>> -- 
>> 2.1.0.GIT
>>
> 


-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] ARM: dts: am57xx-beagle-x15: Add dual ethernet
  2014-12-04 20:58   ` Nishanth Menon
@ 2014-12-04 21:02     ` Felipe Balbi
  2014-12-04 21:59       ` Nishanth Menon
  2015-01-07 23:43       ` Tony Lindgren
  0 siblings, 2 replies; 6+ messages in thread
From: Felipe Balbi @ 2014-12-04 21:02 UTC (permalink / raw)
  To: linux-arm-kernel

Add CPSW DT binding to beagle X15 DTS in order to
get ethernet working with this board.

Note that we're also adding sleep state which will
place all pins in mux mode 15 - which means "driver
off" - thus conserving power.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---

Changes since v1:
	- removed duplicated SoB from myself
	- Fixed s/Slave 1/Slave2/ in one comment
	- slightly improved commit log

 arch/arm/boot/dts/am57xx-beagle-x15.dts | 106 ++++++++++++++++++++++++++++++++
 1 file changed, 106 insertions(+)

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index 49edbda..6c2e8e4 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -140,6 +140,86 @@
 		>;
 	};
 
+	cpsw_pins_default: cpsw_pins_default {
+		pinctrl-single,pins = <
+			/* Slave 1 */
+			0x250 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tclk */
+			0x254 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tctl */
+			0x258 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td3 */
+			0x25c (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td2 */
+			0x260 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td1 */
+			0x264 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td0 */
+			0x268 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rclk */
+			0x26c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rctl */
+			0x270 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd3 */
+			0x274 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd2 */
+			0x278 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd1 */
+			0x27c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd0 */
+
+			/* Slave 2 */
+			0x198 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tclk */
+			0x19c (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tctl */
+			0x1a0 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td3 */
+			0x1a4 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td2 */
+			0x1a8 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td1 */
+			0x1ac (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td0 */
+			0x1b0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rclk */
+			0x1b4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rctl */
+			0x1b8 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd3 */
+			0x1bc (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd2 */
+			0x1c0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd1 */
+			0x1c4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd0 */
+		>;
+
+	};
+
+	cpsw_pins_sleep: cpsw_pins_sleep {
+		pinctrl-single,pins = <
+			/* Slave 1 */
+			0x250 (PIN_INPUT | MUX_MODE15)
+			0x254 (PIN_INPUT | MUX_MODE15)
+			0x258 (PIN_INPUT | MUX_MODE15)
+			0x25c (PIN_INPUT | MUX_MODE15)
+			0x260 (PIN_INPUT | MUX_MODE15)
+			0x264 (PIN_INPUT | MUX_MODE15)
+			0x268 (PIN_INPUT | MUX_MODE15)
+			0x26c (PIN_INPUT | MUX_MODE15)
+			0x270 (PIN_INPUT | MUX_MODE15)
+			0x274 (PIN_INPUT | MUX_MODE15)
+			0x278 (PIN_INPUT | MUX_MODE15)
+			0x27c (PIN_INPUT | MUX_MODE15)
+
+			/* Slave 2 */
+			0x198 (PIN_INPUT | MUX_MODE15)
+			0x19c (PIN_INPUT | MUX_MODE15)
+			0x1a0 (PIN_INPUT | MUX_MODE15)
+			0x1a4 (PIN_INPUT | MUX_MODE15)
+			0x1a8 (PIN_INPUT | MUX_MODE15)
+			0x1ac (PIN_INPUT | MUX_MODE15)
+			0x1b0 (PIN_INPUT | MUX_MODE15)
+			0x1b4 (PIN_INPUT | MUX_MODE15)
+			0x1b8 (PIN_INPUT | MUX_MODE15)
+			0x1bc (PIN_INPUT | MUX_MODE15)
+			0x1c0 (PIN_INPUT | MUX_MODE15)
+			0x1c4 (PIN_INPUT | MUX_MODE15)
+		>;
+	};
+
+	davinci_mdio_pins_default: davinci_mdio_pins_default {
+		pinctrl-single,pins = <
+			/* MDIO */
+			0x23c (PIN_OUTPUT_PULLUP | MUX_MODE0)	/* mdio_mclk */
+			0x240 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mdio_d */
+		>;
+	};
+
+	davinci_mdio_pins_sleep: davinci_mdio_pins_sleep {
+		pinctrl-single,pins = <
+			0x23c (PIN_INPUT | MUX_MODE15)
+			0x240 (PIN_INPUT | MUX_MODE15)
+		>;
+	};
+
 	tps659038_pins_default: tps659038_pins_default {
 		pinctrl-single,pins = <
 			0x418 (PIN_INPUT_PULLUP | MUX_MODE14)	/* wakeup0.gpio1_0 */
@@ -365,6 +445,32 @@
 	pinctrl-0 = <&uart3_pins_default>;
 };
 
+&mac {
+	status = "okay";
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&cpsw_pins_default>;
+	pinctrl-1 = <&cpsw_pins_sleep>;
+	dual_emac;
+};
+
+&cpsw_emac0 {
+	phy_id = <&davinci_mdio>, <1>;
+	phy-mode = "rgmii";
+	dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+	phy_id = <&davinci_mdio>, <2>;
+	phy-mode = "rgmii";
+	dual_emac_res_vlan = <2>;
+};
+
+&davinci_mdio {
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&davinci_mdio_pins_default>;
+	pinctrl-1 = <&davinci_mdio_pins_sleep>;
+};
+
 &mmc1 {
 	status = "okay";
 
-- 
2.1.0.GIT

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] ARM: dts: am57xx-beagle-x15: Add dual ethernet
  2014-12-04 21:02     ` [PATCH v2] " Felipe Balbi
@ 2014-12-04 21:59       ` Nishanth Menon
  2015-01-07 23:43       ` Tony Lindgren
  1 sibling, 0 replies; 6+ messages in thread
From: Nishanth Menon @ 2014-12-04 21:59 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/04/2014 03:02 PM, Felipe Balbi wrote:
> Add CPSW DT binding to beagle X15 DTS in order to
> get ethernet working with this board.
> 
> Note that we're also adding sleep state which will
> place all pins in mux mode 15 - which means "driver
> off" - thus conserving power.
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> 
> Changes since v1:
> 	- removed duplicated SoB from myself
> 	- Fixed s/Slave 1/Slave2/ in one comment
> 	- slightly improved commit log
> 
>  arch/arm/boot/dts/am57xx-beagle-x15.dts | 106 ++++++++++++++++++++++++++++++++
>  1 file changed, 106 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> index 49edbda..6c2e8e4 100644
> --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
> +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
> @@ -140,6 +140,86 @@
>  		>;
>  	};
>  
> +	cpsw_pins_default: cpsw_pins_default {
> +		pinctrl-single,pins = <
> +			/* Slave 1 */
> +			0x250 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tclk */
> +			0x254 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_tctl */
> +			0x258 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td3 */
> +			0x25c (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td2 */
> +			0x260 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td1 */
> +			0x264 (PIN_OUTPUT | MUX_MODE0)	/* rgmii1_td0 */
> +			0x268 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rclk */
> +			0x26c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rctl */
> +			0x270 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd3 */
> +			0x274 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd2 */
> +			0x278 (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd1 */
> +			0x27c (PIN_INPUT | MUX_MODE0)	/* rgmii1_rd0 */
> +
> +			/* Slave 2 */
> +			0x198 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tclk */
> +			0x19c (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_tctl */
> +			0x1a0 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td3 */
> +			0x1a4 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td2 */
> +			0x1a8 (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td1 */
> +			0x1ac (PIN_OUTPUT | MUX_MODE3)	/* rgmii2_td0 */
> +			0x1b0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rclk */
> +			0x1b4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rctl */
> +			0x1b8 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd3 */
> +			0x1bc (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd2 */
> +			0x1c0 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd1 */
> +			0x1c4 (PIN_INPUT | MUX_MODE3)	/* rgmii2_rd0 */
> +		>;
> +
> +	};
> +
> +	cpsw_pins_sleep: cpsw_pins_sleep {
> +		pinctrl-single,pins = <
> +			/* Slave 1 */
> +			0x250 (PIN_INPUT | MUX_MODE15)
> +			0x254 (PIN_INPUT | MUX_MODE15)
> +			0x258 (PIN_INPUT | MUX_MODE15)
> +			0x25c (PIN_INPUT | MUX_MODE15)
> +			0x260 (PIN_INPUT | MUX_MODE15)
> +			0x264 (PIN_INPUT | MUX_MODE15)
> +			0x268 (PIN_INPUT | MUX_MODE15)
> +			0x26c (PIN_INPUT | MUX_MODE15)
> +			0x270 (PIN_INPUT | MUX_MODE15)
> +			0x274 (PIN_INPUT | MUX_MODE15)
> +			0x278 (PIN_INPUT | MUX_MODE15)
> +			0x27c (PIN_INPUT | MUX_MODE15)
> +
> +			/* Slave 2 */
> +			0x198 (PIN_INPUT | MUX_MODE15)
> +			0x19c (PIN_INPUT | MUX_MODE15)
> +			0x1a0 (PIN_INPUT | MUX_MODE15)
> +			0x1a4 (PIN_INPUT | MUX_MODE15)
> +			0x1a8 (PIN_INPUT | MUX_MODE15)
> +			0x1ac (PIN_INPUT | MUX_MODE15)
> +			0x1b0 (PIN_INPUT | MUX_MODE15)
> +			0x1b4 (PIN_INPUT | MUX_MODE15)
> +			0x1b8 (PIN_INPUT | MUX_MODE15)
> +			0x1bc (PIN_INPUT | MUX_MODE15)
> +			0x1c0 (PIN_INPUT | MUX_MODE15)
> +			0x1c4 (PIN_INPUT | MUX_MODE15)
> +		>;
> +	};
> +
> +	davinci_mdio_pins_default: davinci_mdio_pins_default {
> +		pinctrl-single,pins = <
> +			/* MDIO */
> +			0x23c (PIN_OUTPUT_PULLUP | MUX_MODE0)	/* mdio_mclk */
> +			0x240 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mdio_d */
> +		>;
> +	};
> +
> +	davinci_mdio_pins_sleep: davinci_mdio_pins_sleep {
> +		pinctrl-single,pins = <
> +			0x23c (PIN_INPUT | MUX_MODE15)
> +			0x240 (PIN_INPUT | MUX_MODE15)
> +		>;
> +	};
> +
>  	tps659038_pins_default: tps659038_pins_default {
>  		pinctrl-single,pins = <
>  			0x418 (PIN_INPUT_PULLUP | MUX_MODE14)	/* wakeup0.gpio1_0 */
> @@ -365,6 +445,32 @@
>  	pinctrl-0 = <&uart3_pins_default>;
>  };
>  
> +&mac {
> +	status = "okay";
> +	pinctrl-names = "default", "sleep";
> +	pinctrl-0 = <&cpsw_pins_default>;
> +	pinctrl-1 = <&cpsw_pins_sleep>;
> +	dual_emac;
> +};
> +
> +&cpsw_emac0 {
> +	phy_id = <&davinci_mdio>, <1>;
> +	phy-mode = "rgmii";
> +	dual_emac_res_vlan = <1>;
> +};
> +
> +&cpsw_emac1 {
> +	phy_id = <&davinci_mdio>, <2>;
> +	phy-mode = "rgmii";
> +	dual_emac_res_vlan = <2>;
> +};
> +
> +&davinci_mdio {
> +	pinctrl-names = "default", "sleep";
> +	pinctrl-0 = <&davinci_mdio_pins_default>;
> +	pinctrl-1 = <&davinci_mdio_pins_sleep>;
> +};
> +
>  &mmc1 {
>  	status = "okay";
>  
> 
Yep, looks better thanks.

depends on the ethernet dts and x15 patches queued previously for 3.19.

https://git.kernel.org/cgit/linux/kernel/git/tmlind/linux-omap.git/log/?h=omap-for-v3.19/dt-v2


-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] ARM: dts: am57xx-beagle-x15: Add dual ethernet
  2014-12-04 21:02     ` [PATCH v2] " Felipe Balbi
  2014-12-04 21:59       ` Nishanth Menon
@ 2015-01-07 23:43       ` Tony Lindgren
  1 sibling, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2015-01-07 23:43 UTC (permalink / raw)
  To: linux-arm-kernel

* Felipe Balbi <balbi@ti.com> [141204 13:05]:
> Add CPSW DT binding to beagle X15 DTS in order to
> get ethernet working with this board.
> 
> Note that we're also adding sleep state which will
> place all pins in mux mode 15 - which means "driver
> off" - thus conserving power.
> 
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> 
> Changes since v1:
> 	- removed duplicated SoB from myself
> 	- Fixed s/Slave 1/Slave2/ in one comment
> 	- slightly improved commit log
> 

Applying into omap-for-v3.20/dt thanks.

Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-07 23:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04 20:53 [PATCH] ARM: dts: am57xx-beagle-x15: Add dual ethernet Felipe Balbi
2014-12-04 20:55 ` Felipe Balbi
2014-12-04 20:58   ` Nishanth Menon
2014-12-04 21:02     ` [PATCH v2] " Felipe Balbi
2014-12-04 21:59       ` Nishanth Menon
2015-01-07 23:43       ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).