Hauke Mehrtens | 76d69eb | 2018-06-09 18:34:46 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 ARM Ltd. |
| 3 | * Copyright (C) 2018 Hauke Mehrtens <hauke@hauke-m.de> |
| 4 | * |
| 5 | * SPDX-License-Identifier: (GPL-2.0+ OR X11) |
| 6 | */ |
| 7 | |
| 8 | /dts-v1/; |
| 9 | #include "sun50i-h5.dtsi" |
| 10 | |
| 11 | #include <dt-bindings/gpio/gpio.h> |
| 12 | #include <dt-bindings/input/input.h> |
| 13 | #include <dt-bindings/pinctrl/sun4i-a10.h> |
| 14 | |
| 15 | / { |
| 16 | model = "Xunlong Orange Pi Zero Plus"; |
| 17 | compatible = "xunlong,orangepi-zero-plus", "allwinner,sun50i-h5"; |
| 18 | |
| 19 | reg_vcc3v3: vcc3v3 { |
| 20 | compatible = "regulator-fixed"; |
| 21 | regulator-name = "vcc3v3"; |
| 22 | regulator-min-microvolt = <3300000>; |
| 23 | regulator-max-microvolt = <3300000>; |
| 24 | }; |
| 25 | |
| 26 | aliases { |
| 27 | ethernet0 = &emac; |
| 28 | ethernet1 = &rtl8189ftv; |
| 29 | serial0 = &uart0; |
| 30 | }; |
| 31 | |
| 32 | chosen { |
| 33 | stdout-path = "serial0:115200n8"; |
| 34 | }; |
| 35 | |
| 36 | leds { |
| 37 | compatible = "gpio-leds"; |
| 38 | |
| 39 | pwr { |
| 40 | label = "orangepi:green:pwr"; |
| 41 | gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ |
| 42 | default-state = "on"; |
| 43 | }; |
| 44 | |
| 45 | status { |
| 46 | label = "orangepi:red:status"; |
| 47 | gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */ |
| 48 | }; |
| 49 | }; |
| 50 | |
| 51 | reg_gmac_3v3: gmac-3v3 { |
| 52 | compatible = "regulator-fixed"; |
| 53 | regulator-name = "gmac-3v3"; |
| 54 | regulator-min-microvolt = <3300000>; |
| 55 | regulator-max-microvolt = <3300000>; |
| 56 | startup-delay-us = <100000>; |
| 57 | enable-active-high; |
| 58 | gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ |
| 59 | }; |
| 60 | }; |
| 61 | |
| 62 | &ehci0 { |
| 63 | status = "okay"; |
| 64 | }; |
| 65 | |
| 66 | &ehci1 { |
| 67 | status = "okay"; |
| 68 | }; |
| 69 | |
| 70 | &emac { |
| 71 | pinctrl-names = "default"; |
| 72 | pinctrl-0 = <&emac_rgmii_pins>; |
| 73 | phy-supply = <®_gmac_3v3>; |
| 74 | phy-handle = <&ext_rgmii_phy>; |
| 75 | phy-mode = "rgmii"; |
| 76 | status = "okay"; |
| 77 | }; |
| 78 | |
| 79 | &external_mdio { |
| 80 | ext_rgmii_phy: ethernet-phy@1 { |
| 81 | compatible = "ethernet-phy-ieee802.3-c22"; |
| 82 | reg = <1>; |
| 83 | }; |
| 84 | }; |
| 85 | |
| 86 | &mmc0 { |
| 87 | vmmc-supply = <®_vcc3v3>; |
| 88 | bus-width = <4>; |
| 89 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ |
| 90 | status = "okay"; |
| 91 | }; |
| 92 | |
| 93 | &mmc1 { |
| 94 | vmmc-supply = <®_vcc3v3>; |
| 95 | bus-width = <4>; |
| 96 | non-removable; |
| 97 | status = "okay"; |
| 98 | |
| 99 | /* |
| 100 | * Explicitly define the sdio device, so that we can add an ethernet |
| 101 | * alias for it (which e.g. makes u-boot set a mac-address). |
| 102 | */ |
| 103 | rtl8189ftv: sdio_wifi@1 { |
| 104 | reg = <1>; |
| 105 | }; |
| 106 | }; |
| 107 | |
| 108 | /* |
| 109 | &spi0 { |
| 110 | status = "okay"; |
| 111 | |
| 112 | flash@0 { |
| 113 | #address-cells = <1>; |
| 114 | #size-cells = <1>; |
| 115 | compatible = "mxicy,mx25l1606e", "winbond,w25q128"; |
| 116 | reg = <0>; |
| 117 | spi-max-frequency = <40000000>; |
| 118 | }; |
| 119 | }; |
| 120 | */ |
| 121 | |
| 122 | &ohci0 { |
| 123 | status = "okay"; |
| 124 | }; |
| 125 | |
| 126 | &ohci1 { |
| 127 | status = "okay"; |
| 128 | }; |
| 129 | |
| 130 | &uart0 { |
| 131 | pinctrl-names = "default"; |
| 132 | pinctrl-0 = <&uart0_pins_a>; |
| 133 | status = "okay"; |
| 134 | }; |
| 135 | |
| 136 | &usb_otg { |
| 137 | dr_mode = "peripheral"; |
| 138 | status = "okay"; |
| 139 | }; |
| 140 | |
| 141 | &usbphy { |
| 142 | /* USB Type-A ports' VBUS is always on */ |
| 143 | usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ |
| 144 | status = "okay"; |
| 145 | }; |