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