summaryrefslogtreecommitdiff
path: root/arch/arm/dts/am335x-draco.dts
blob: f8faa8f7c4fa280730eccb000ce066366efbdad2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
 * Support for Siemens DRACO board
 *
 * Copyright (C) 2014 - Lukas Stockmann <lukas.stockmann@siemens.com>
 *
 * This file is licensed under the terms of the GNU General Public License
 * version 2.  This program is licensed "as is" without any warranty of any
 * kind, whether express or implied.
 */

/dts-v1/;

#include "am33xx.dtsi"
#include "am335x-draco.dtsi"
#include <dt-bindings/input/input.h>

/ {
	model = "Siemens DRACO";
	compatible = "siemens,draco", "ti,am33xx";

	/* ethernet alias is needed for the MAC address passing from U-Boot */
	aliases {
		ethernet0 = &cpsw_emac0;
		mdio-gpio0 = &mdio0;
	};

	gpio-keys {
		compatible = "gpio-keys";
		button0 {
			label = "button0";
			gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_F1>; /* button0 */
		};
		button1 {
			label = "button1";
			gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_F2>; /* button1 */
		};
	};

	ocp {
		debugss: debugss@4b000000 {
			compatible = "ti,debugss";
			ti,hwmods = "debugss";
			reg = <0x4b000000 1000000>;
			status = "disabled";
		};
	};
};

&am33xx_pinmux {
	pinctrl-names = "default";
	pinctrl-0 = <&gpio_mux_pins>;

	gpio_mux_pins: gpio_mux_pins {
		pinctrl-single,pins = <
			0x1d0 (PIN_INPUT | MUX_MODE0)	/* tms jtag */
			0x1d4 (PIN_INPUT | MUX_MODE0)	/* tdi jtag */
			0x1d8 (PIN_OUTPUT | MUX_MODE0)	/* tdo jtag */
			0x1dc (PIN_INPUT | MUX_MODE0)	/* tck jtag */
			0x1e0 (PIN_INPUT | MUX_MODE0)	/* trstn jtag */
		>;
	};

	cpsw_default: cpsw_default {
		pinctrl-single,pins = <
			0x0E8 (PIN_INPUT_PULLUP | MUX_MODE7)	/* lcd_plck FIX STO should be a OUTPUT driven high*/
			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* mii1_crs.rmii1_crs_dv */
			0x114 (PIN_OUTPUT | MUX_MODE1)		/* mii1_txen.mii1_txen */
			0x124 (PIN_OUTPUT | MUX_MODE1)		/* mii1_txd1.mii1_txd1 */
			0x128 (PIN_OUTPUT | MUX_MODE1)		/* mii1_txd0.mii1_txd0 */
			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* mii1_rxd1.mii1_rxd1 */
			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1)	/* mii1_rxd0.mii1_rxd0 */
			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0)	/* rmii1_refclk.rmii1_refclk */
		>;
	};

	cpsw_sleep: cpsw_sleep {
		pinctrl-single,pins = <
			0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
			0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
			0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
			0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
			0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
		>;
	};

	davinci_mdio_default: davinci_mdio_default {
		pinctrl-single,pins = <
			/* MDIO */
			0x148 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
			0x14c (PIN_OUTPUT | MUX_MODE0)			/* mdio_clk.mdio_clk */
		>;
	};

	davinci_mdio_sleep: davinci_mdio_sleep {
		pinctrl-single,pins = <
			/* MDIO reset value */
			0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
			0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
		>;
	};

	gpio_mdio_default: gpio_mdio_default {
		pinctrl-single,pins = <
			/* MDIO via GPIO */
			0x148 (PIN_INPUT | MUX_MODE7)	/* mdio_data.mdio_data GPIO0_0 */
			0x14c (PIN_OUTPUT | MUX_MODE7)	/* mdio_clk.mdio_clk GPIO0_1 */
		>;
	};
};

&mac {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&cpsw_default>;
	pinctrl-1 = <&cpsw_sleep>;
	slaves = <1>;			/* use only one emac if */

	mdio0: gpio {
		compatible = "virtual,mdio-gpio";
		pinctrl-names = "default";
		pinctrl-0 = <&gpio_mdio_default>;

		#address-cells = <1>;
		#size-cells = <0>;
		gpios = <&gpio0 1 GPIO_ACTIVE_HIGH	/* MDIO-CLK */
			 &gpio0 0 GPIO_ACTIVE_HIGH>;	/* MDIO-DATA */

		phy0: ethernet-phy@1 {
			reg = <0>;
		};
	};
};

/* Disable davinci/am335x mdio interface on this platform */
&davinci_mdio {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&davinci_mdio_default>;
	pinctrl-1 = <&davinci_mdio_sleep>;
	status = "disabled";
};

&cpsw_emac0 {
	phy-handle = <&phy0>;
	phy-mode = "rmii";
};

&phy_sel {
	rmii-clock-ext;
};