blob: f86efd0ccc4047021662011948b9a593ea872643 [file] [log] [blame]
Russell King208d7baf2013-09-27 20:07:26 +01001/*
2 * Copyright (C) 2013,2014 Russell King
Russell King42919c52015-03-02 20:00:50 +00003 *
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
Fabio Estevamf4b59392015-05-20 15:57:02 -030010 * modify it under the terms of the GNU General Public License
11 * version 2 as published by the Free Software Foundation.
Russell King42919c52015-03-02 20:00:50 +000012 *
Alexandre Belloni13283622017-01-03 11:27:13 +010013 * This file is distributed in the hope that it will be useful,
Russell King42919c52015-03-02 20:00:50 +000014 * 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 *
Alexandre Belloni13283622017-01-03 11:27:13 +010018 * Or, alternatively,
Russell King42919c52015-03-02 20:00:50 +000019 *
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
Alexandre Belloni13283622017-01-03 11:27:13 +010023 * restriction, including without limitation the rights to use,
Russell King42919c52015-03-02 20:00:50 +000024 * 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 *
Alexandre Belloni13283622017-01-03 11:27:13 +010032 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Russell King42919c52015-03-02 20:00:50 +000033 * 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
Alexandre Belloni13283622017-01-03 11:27:13 +010036 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
Russell King42919c52015-03-02 20:00:50 +000037 * 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.
Russell King208d7baf2013-09-27 20:07:26 +010040 */
Fabio Estevamdca97ce2015-05-11 12:38:33 -030041#include <dt-bindings/gpio/gpio.h>
Russell King208d7baf2013-09-27 20:07:26 +010042
Russell King84de7af2017-11-28 15:02:35 +000043/ {
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
Russell King76dc3402017-11-28 15:02:05 +000053&fec {
54 pinctrl-names = "default";
55 pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
Fabio Estevam0672d222019-04-03 19:12:41 -030056 phy-mode = "rgmii-id";
Maxime Chevallierfd8e8382021-06-25 14:13:53 +020057
58 /*
59 * The PHY seems to require a long-enough reset duration to avoid
60 * some rare issues where the PHY gets stuck in an inconsistent and
61 * non-functional state at boot-up. 10ms proved to be fine .
62 */
63 phy-reset-duration = <10>;
Russell King76dc3402017-11-28 15:02:05 +000064 phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
65 status = "okay";
Russell King86b08bd2020-04-15 16:44:17 +010066
67 mdio {
68 #address-cells = <1>;
69 #size-cells = <0>;
70
Russell King2cc0bfc2021-01-14 10:53:06 +000071 /*
72 * The PHY can appear at either address 0 or 4 due to the
73 * configuration (LED) pin not being pulled sufficiently.
74 */
75 ethernet-phy@0 {
Russell King86b08bd2020-04-15 16:44:17 +010076 reg = <0>;
77 qca,clk-out-frequency = <125000000>;
Russell Kingb73d5382021-01-15 23:36:44 +000078 qca,smarteee-tw-us-1g = <24>;
Russell King86b08bd2020-04-15 16:44:17 +010079 };
Russell King2cc0bfc2021-01-14 10:53:06 +000080
81 ethernet-phy@4 {
82 reg = <4>;
83 qca,clk-out-frequency = <125000000>;
Russell Kingb73d5382021-01-15 23:36:44 +000084 qca,smarteee-tw-us-1g = <24>;
Russell King2cc0bfc2021-01-14 10:53:06 +000085 };
Russell King86b08bd2020-04-15 16:44:17 +010086 };
Russell King76dc3402017-11-28 15:02:05 +000087};
88
Russell King208d7baf2013-09-27 20:07:26 +010089&iomuxc {
90 microsom {
Russell King76dc3402017-11-28 15:02:05 +000091 pinctrl_microsom_enet_ar8035: microsom-enet-ar8035 {
92 fsl,pins = <
93 MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b8b0
94 MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
95 /* AR8035 reset */
96 MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x130b0
97 /* AR8035 interrupt */
Russell King42b769f2017-11-28 15:02:20 +000098 MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x1b0b0
Russell King76dc3402017-11-28 15:02:05 +000099 /* GPIO16 -> AR8035 25MHz */
Russell King42b769f2017-11-28 15:02:20 +0000100 MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0b0
101 MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x13030
Russell King76dc3402017-11-28 15:02:05 +0000102 MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b030
103 MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b030
104 MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b030
105 MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b030
106 MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b030
107 /* AR8035 CLK_25M --> ENET_REF_CLK (V22) */
108 MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x0a0b1
109 /* AR8035 pin strapping: IO voltage: pull up */
110 MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b030
111 /* AR8035 pin strapping: PHYADDR#0: pull down */
112 MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x13030
113 /* AR8035 pin strapping: PHYADDR#1: pull down */
114 MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x13030
115 /* AR8035 pin strapping: MODE#1: pull up */
116 MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030
117 /* AR8035 pin strapping: MODE#3: pull up */
118 MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030
119 /* AR8035 pin strapping: MODE#0: pull down */
120 MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x13030
121
122 /*
123 * As the RMII pins are also connected to RGMII
124 * so that an AR8030 can be placed, set these
125 * to high-z with the same pulls as above.
126 * Use the GPIO settings to avoid changing the
127 * input select registers.
128 */
129 MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x03000
130 MX6QDL_PAD_ENET_RXD0__GPIO1_IO27 0x03000
131 MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x03000
132 >;
133 };
134
Russell King208d7baf2013-09-27 20:07:26 +0100135 pinctrl_microsom_uart1: microsom-uart1 {
136 fsl,pins = <
137 MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
138 MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
139 >;
140 };
Russell King208d7baf2013-09-27 20:07:26 +0100141 };
142};
143
144&uart1 {
145 pinctrl-names = "default";
146 pinctrl-0 = <&pinctrl_microsom_uart1>;
147 status = "okay";
148};