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