xref: /OK3568_Linux_fs/kernel/scripts/dtc/include-prefixes/arm/imx6qdl-sr-som.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun * Copyright (C) 2013,2014 Russell King
3*4882a593Smuzhiyun *
4*4882a593Smuzhiyun * This file is dual-licensed: you can use it either under the terms
5*4882a593Smuzhiyun * of the GPL or the X11 license, at your option. Note that this dual
6*4882a593Smuzhiyun * licensing only applies to this file, and not this project as a
7*4882a593Smuzhiyun * whole.
8*4882a593Smuzhiyun *
9*4882a593Smuzhiyun *  a) This file is free software; you can redistribute it and/or
10*4882a593Smuzhiyun *     modify it under the terms of the GNU General Public License
11*4882a593Smuzhiyun *     version 2 as published by the Free Software Foundation.
12*4882a593Smuzhiyun *
13*4882a593Smuzhiyun *     This file is distributed in the hope that it will be useful,
14*4882a593Smuzhiyun *     but WITHOUT ANY WARRANTY; without even the implied warranty of
15*4882a593Smuzhiyun *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16*4882a593Smuzhiyun *     GNU General Public License for more details.
17*4882a593Smuzhiyun *
18*4882a593Smuzhiyun * Or, alternatively,
19*4882a593Smuzhiyun *
20*4882a593Smuzhiyun *  b) Permission is hereby granted, free of charge, to any person
21*4882a593Smuzhiyun *     obtaining a copy of this software and associated documentation
22*4882a593Smuzhiyun *     files (the "Software"), to deal in the Software without
23*4882a593Smuzhiyun *     restriction, including without limitation the rights to use,
24*4882a593Smuzhiyun *     copy, modify, merge, publish, distribute, sublicense, and/or
25*4882a593Smuzhiyun *     sell copies of the Software, and to permit persons to whom the
26*4882a593Smuzhiyun *     Software is furnished to do so, subject to the following
27*4882a593Smuzhiyun *     conditions:
28*4882a593Smuzhiyun *
29*4882a593Smuzhiyun *     The above copyright notice and this permission notice shall be
30*4882a593Smuzhiyun *     included in all copies or substantial portions of the Software.
31*4882a593Smuzhiyun *
32*4882a593Smuzhiyun *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33*4882a593Smuzhiyun *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34*4882a593Smuzhiyun *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35*4882a593Smuzhiyun *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
36*4882a593Smuzhiyun *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37*4882a593Smuzhiyun *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
38*4882a593Smuzhiyun *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39*4882a593Smuzhiyun *     OTHER DEALINGS IN THE SOFTWARE.
40*4882a593Smuzhiyun */
41*4882a593Smuzhiyun#include <dt-bindings/gpio/gpio.h>
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun/ {
44*4882a593Smuzhiyun	vcc_3v3: regulator-vcc-3v3 {
45*4882a593Smuzhiyun		compatible = "regulator-fixed";
46*4882a593Smuzhiyun		regulator-always-on;
47*4882a593Smuzhiyun		regulator-name = "vcc_3v3";
48*4882a593Smuzhiyun		regulator-min-microvolt = <3300000>;
49*4882a593Smuzhiyun		regulator-max-microvolt = <3300000>;
50*4882a593Smuzhiyun	};
51*4882a593Smuzhiyun};
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun&fec {
54*4882a593Smuzhiyun	pinctrl-names = "default";
55*4882a593Smuzhiyun	pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
56*4882a593Smuzhiyun	phy-mode = "rgmii-id";
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun	/*
59*4882a593Smuzhiyun	 * The PHY seems to require a long-enough reset duration to avoid
60*4882a593Smuzhiyun	 * some rare issues where the PHY gets stuck in an inconsistent and
61*4882a593Smuzhiyun	 * non-functional state at boot-up. 10ms proved to be fine .
62*4882a593Smuzhiyun	 */
63*4882a593Smuzhiyun	phy-reset-duration = <10>;
64*4882a593Smuzhiyun	phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
65*4882a593Smuzhiyun	status = "okay";
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun	mdio {
68*4882a593Smuzhiyun		#address-cells = <1>;
69*4882a593Smuzhiyun		#size-cells = <0>;
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun		/*
72*4882a593Smuzhiyun		 * The PHY can appear at either address 0 or 4 due to the
73*4882a593Smuzhiyun		 * configuration (LED) pin not being pulled sufficiently.
74*4882a593Smuzhiyun		 */
75*4882a593Smuzhiyun		ethernet-phy@0 {
76*4882a593Smuzhiyun			reg = <0>;
77*4882a593Smuzhiyun			qca,clk-out-frequency = <125000000>;
78*4882a593Smuzhiyun		};
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun		ethernet-phy@4 {
81*4882a593Smuzhiyun			reg = <4>;
82*4882a593Smuzhiyun			qca,clk-out-frequency = <125000000>;
83*4882a593Smuzhiyun		};
84*4882a593Smuzhiyun	};
85*4882a593Smuzhiyun};
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun&iomuxc {
88*4882a593Smuzhiyun	microsom {
89*4882a593Smuzhiyun		pinctrl_microsom_enet_ar8035: microsom-enet-ar8035 {
90*4882a593Smuzhiyun			fsl,pins = <
91*4882a593Smuzhiyun				MX6QDL_PAD_ENET_MDIO__ENET_MDIO		0x1b8b0
92*4882a593Smuzhiyun				MX6QDL_PAD_ENET_MDC__ENET_MDC		0x1b0b0
93*4882a593Smuzhiyun				/* AR8035 reset */
94*4882a593Smuzhiyun				MX6QDL_PAD_KEY_ROW4__GPIO4_IO15		0x130b0
95*4882a593Smuzhiyun				/* AR8035 interrupt */
96*4882a593Smuzhiyun				MX6QDL_PAD_DI0_PIN2__GPIO4_IO18		0x1b0b0
97*4882a593Smuzhiyun				/* GPIO16 -> AR8035 25MHz */
98*4882a593Smuzhiyun				MX6QDL_PAD_GPIO_16__ENET_REF_CLK	0x4001b0b0
99*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_TXC__RGMII_TXC		0x13030
100*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_TD0__RGMII_TD0		0x1b030
101*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_TD1__RGMII_TD1		0x1b030
102*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_TD2__RGMII_TD2		0x1b030
103*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_TD3__RGMII_TD3		0x1b030
104*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL	0x1b030
105*4882a593Smuzhiyun				/* AR8035 CLK_25M --> ENET_REF_CLK (V22) */
106*4882a593Smuzhiyun				MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK	0x0a0b1
107*4882a593Smuzhiyun				/* AR8035 pin strapping: IO voltage: pull up */
108*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_RXC__RGMII_RXC		0x1b030
109*4882a593Smuzhiyun				/* AR8035 pin strapping: PHYADDR#0: pull down */
110*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_RD0__RGMII_RD0		0x13030
111*4882a593Smuzhiyun				/* AR8035 pin strapping: PHYADDR#1: pull down */
112*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_RD1__RGMII_RD1		0x13030
113*4882a593Smuzhiyun				/* AR8035 pin strapping: MODE#1: pull up */
114*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_RD2__RGMII_RD2		0x1b030
115*4882a593Smuzhiyun				/* AR8035 pin strapping: MODE#3: pull up */
116*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_RD3__RGMII_RD3		0x1b030
117*4882a593Smuzhiyun				/* AR8035 pin strapping: MODE#0: pull down */
118*4882a593Smuzhiyun				MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL	0x13030
119*4882a593Smuzhiyun
120*4882a593Smuzhiyun				/*
121*4882a593Smuzhiyun				 * As the RMII pins are also connected to RGMII
122*4882a593Smuzhiyun				 * so that an AR8030 can be placed, set these
123*4882a593Smuzhiyun				 * to high-z with the same pulls as above.
124*4882a593Smuzhiyun				 * Use the GPIO settings to avoid changing the
125*4882a593Smuzhiyun				 * input select registers.
126*4882a593Smuzhiyun				 */
127*4882a593Smuzhiyun				MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25	0x03000
128*4882a593Smuzhiyun				MX6QDL_PAD_ENET_RXD0__GPIO1_IO27	0x03000
129*4882a593Smuzhiyun				MX6QDL_PAD_ENET_RXD1__GPIO1_IO26	0x03000
130*4882a593Smuzhiyun			>;
131*4882a593Smuzhiyun		};
132*4882a593Smuzhiyun
133*4882a593Smuzhiyun		pinctrl_microsom_uart1: microsom-uart1 {
134*4882a593Smuzhiyun			fsl,pins = <
135*4882a593Smuzhiyun				MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA	0x1b0b1
136*4882a593Smuzhiyun				MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA	0x1b0b1
137*4882a593Smuzhiyun			>;
138*4882a593Smuzhiyun		};
139*4882a593Smuzhiyun	};
140*4882a593Smuzhiyun};
141*4882a593Smuzhiyun
142*4882a593Smuzhiyun&uart1 {
143*4882a593Smuzhiyun	pinctrl-names = "default";
144*4882a593Smuzhiyun	pinctrl-0 = <&pinctrl_microsom_uart1>;
145*4882a593Smuzhiyun	status = "okay";
146*4882a593Smuzhiyun};
147