1 From 004eb24e939b5b31f828333f37fb5cb2a877d6f2 Mon Sep 17 00:00:00 2001
2 From: Kristian Evensen <kristian.evensen@gmail.com>
3 Date: Sun, 17 Jun 2018 14:41:47 +0200
4 Subject: [PATCH] arm: dts: Add Unielec U7623 DTS
7 arch/arm/boot/dts/Makefile | 1 +
8 .../dts/mt7623a-unielec-u7623-02-emmc-512M.dts | 18 +
9 .../boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi | 366 +++++++++++++++++++++
10 3 files changed, 385 insertions(+)
11 create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
12 create mode 100644 arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
14 --- a/arch/arm/boot/dts/Makefile
15 +++ b/arch/arm/boot/dts/Makefile
16 @@ -1193,6 +1193,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
17 mt7623a-rfb-nand.dtb \
18 mt7623n-rfb-emmc.dtb \
19 mt7623n-bananapi-bpi-r2.dtb \
20 + mt7623a-unielec-u7623-02-emmc-512M.dtb \
23 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
25 +++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc-512M.dts
28 + * Copyright 2018 Kristian Evensen <kristian.evensen@gmail.com>
30 + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
34 +#include "mt7623a-unielec-u7623-02-emmc.dtsi"
37 + model = "UniElec U7623-02 eMMC (512M RAM)";
38 + compatible = "unielec,u7623-02-emmc-512m", "unielec,u7623-02-emmc", "mediatek,mt7623";
41 + device_type = "memory";
42 + reg = <0 0x80000000 0 0x20000000>;
46 +++ b/arch/arm/boot/dts/mt7623a-unielec-u7623-02-emmc.dtsi
49 + * Copyright 2018 Kristian Evensen <kristian.evensen@gmail.com>
51 + * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
54 +#include <dt-bindings/input/input.h>
55 +#include "mt7623.dtsi"
56 +#include "mt6323.dtsi"
59 + compatible = "unielec,u7623-02-emmc", "mediatek,mt7623";
66 + bootargs = "root=/dev/mmcblk0p2 rootfstype=squashfs,f2fs";
67 + stdout-path = "serial2:115200n8";
72 + proc-supply = <&mt6323_vproc_reg>;
76 + proc-supply = <&mt6323_vproc_reg>;
80 + proc-supply = <&mt6323_vproc_reg>;
84 + proc-supply = <&mt6323_vproc_reg>;
88 + reg_1p8v: regulator-1p8v {
89 + compatible = "regulator-fixed";
90 + regulator-name = "fixed-1.8V";
91 + regulator-min-microvolt = <1800000>;
92 + regulator-max-microvolt = <1800000>;
94 + regulator-always-on;
97 + reg_3p3v: regulator-3p3v {
98 + compatible = "regulator-fixed";
99 + regulator-name = "fixed-3.3V";
100 + regulator-min-microvolt = <3300000>;
101 + regulator-max-microvolt = <3300000>;
103 + regulator-always-on;
106 + reg_5v: regulator-5v {
107 + compatible = "regulator-fixed";
108 + regulator-name = "fixed-5V";
109 + regulator-min-microvolt = <5000000>;
110 + regulator-max-microvolt = <5000000>;
112 + regulator-always-on;
116 + compatible = "gpio-keys";
117 + pinctrl-names = "default";
118 + pinctrl-0 = <&key_pins_a>;
122 + linux,code = <KEY_RESTART>;
123 + gpios = <&pio 256 GPIO_ACTIVE_LOW>;
128 + compatible = "gpio-leds";
129 + pinctrl-names = "default";
130 + pinctrl-0 = <&led_pins_unielec>;
133 + label = "u7623-01:green:led3";
134 + gpios = <&pio 14 GPIO_ACTIVE_LOW>;
135 + default-state = "off";
139 + label = "u7623-01:green:led4";
140 + gpios = <&pio 15 GPIO_ACTIVE_LOW>;
141 + default-state = "off";
146 + compatible = "mediatek,mt7530";
147 + #address-cells = <1>;
160 + compatible = "mediatek,eth-mac";
162 + phy-mode = "trgmii";
172 + #address-cells = <1>;
174 + phy5: ethernet-phy@5 {
176 + phy-mode = "rgmii-rxid";
182 + compatible = "mediatek,mt7530";
183 + #address-cells = <1>;
186 + pinctrl-names = "default";
188 + resets = <ðsys 2>;
189 + reset-names = "mcm";
190 + core-supply = <&mt6323_vpa_reg>;
191 + io-supply = <&mt6323_vemc3v3_reg>;
193 + dsa,mii-bus = <&mdio>;
196 + #address-cells = <1>;
203 + cpu = <&cpu_port0>;
209 + cpu = <&cpu_port0>;
215 + cpu = <&cpu_port0>;
221 + cpu = <&cpu_port0>;
227 + cpu = <&cpu_port0>;
230 + cpu_port0: port@6 {
233 + ethernet = <&gmac0>;
234 + phy-mode = "trgmii";
245 + pinctrl-names = "default", "state_uhs";
246 + pinctrl-0 = <&mmc0_pins_default>;
247 + pinctrl-1 = <&mmc0_pins_uhs>;
250 + max-frequency = <50000000>;
252 + vmmc-supply = <®_3p3v>;
253 + vqmmc-supply = <®_1p8v>;
258 + key_pins_a: keys-alt {
260 + pinmux = <MT7623_PIN_256_GPIO256_FUNC_GPIO256>,
261 + <MT7623_PIN_257_GPIO257_FUNC_GPIO257>;
266 + led_pins_unielec: leds-unielec {
268 + pinmux = <MT7623_PIN_14_GPIO14_FUNC_GPIO14>,
269 + <MT7623_PIN_15_GPIO15_FUNC_GPIO15>;
273 + mmc0_pins_default: mmc0default {
275 + pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
276 + <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
277 + <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
278 + <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
279 + <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
280 + <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
281 + <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
282 + <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
283 + <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
289 + pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
294 + pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
299 + mmc0_pins_uhs: mmc0 {
301 + pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
302 + <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
303 + <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
304 + <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
305 + <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
306 + <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
307 + <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
308 + <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
309 + <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
311 + drive-strength = <MTK_DRIVE_2mA>;
312 + bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
316 + pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
317 + drive-strength = <MTK_DRIVE_2mA>;
318 + bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
322 + pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
327 + pwm_pins_a: pwm@0 {
329 + pinmux = <MT7623_PIN_203_PWM0_FUNC_PWM0>,
330 + <MT7623_PIN_204_PWM1_FUNC_PWM1>,
331 + <MT7623_PIN_205_PWM2_FUNC_PWM2>,
332 + <MT7623_PIN_206_PWM3_FUNC_PWM3>,
333 + <MT7623_PIN_207_PWM4_FUNC_PWM4>;
337 + uart2_pins_b: uart@2 {
339 + pinmux = <MT7623_PIN_200_URXD2_FUNC_URXD2>,
340 + <MT7623_PIN_201_UTXD2_FUNC_UTXD2>;
344 + pcie_default: pcie_pin_default {
346 + pinmux = <MT7623_PIN_208_AUD_EXT_CK1_FUNC_PCIE0_PERST_N>,
347 + <MT7623_PIN_209_AUD_EXT_CK2_FUNC_PCIE1_PERST_N>;
354 + pinctrl-names = "default";
355 + pinctrl-0 = <&pwm_pins_a>;
362 + compatible = "mediatek,mt6323-led";
363 + #address-cells = <1>;
369 + default-state = "off";
376 + pinctrl-names = "default";
377 + pinctrl-0 = <&uart2_pins_b>;
382 + vusb33-supply = <®_3p3v>;
383 + vbus-supply = <®_3p3v>;
393 + mediatek,phy-switch = <&hifsys>;
397 + pinctrl-names = "default";
398 + pinctrl-0 = <&pcie_default>;