cringovic revised this gist . Go to revision
1 file changed, 253 insertions
dts.dts(file created)
| @@ -0,0 +1,253 @@ | |||
| 1 | + | /* | |
| 2 | + | * Copyright (C) 2015 Chen-Yu Tsai <wens@csie.org> | |
| 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 as | |
| 11 | + | * published by the Free Software Foundation; either version 2 of the | |
| 12 | + | * License, or (at your option) any later version. | |
| 13 | + | * | |
| 14 | + | * This file is distributed in the hope that it will be useful, | |
| 15 | + | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | + | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 | + | * GNU General Public License for more details. | |
| 18 | + | * | |
| 19 | + | * Or, alternatively, | |
| 20 | + | * | |
| 21 | + | * b) Permission is hereby granted, free of charge, to any person | |
| 22 | + | * obtaining a copy of this software and associated documentation | |
| 23 | + | * files (the "Software"), to deal in the Software without | |
| 24 | + | * restriction, including without limitation the rights to use, | |
| 25 | + | * copy, modify, merge, publish, distribute, sublicense, and/or | |
| 26 | + | * sell copies of the Software, and to permit persons to whom the | |
| 27 | + | * Software is furnished to do so, subject to the following | |
| 28 | + | * conditions: | |
| 29 | + | * | |
| 30 | + | * The above copyright notice and this permission notice shall be | |
| 31 | + | * included in all copies or substantial portions of the Software. | |
| 32 | + | * | |
| 33 | + | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
| 34 | + | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |
| 35 | + | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
| 36 | + | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
| 37 | + | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
| 38 | + | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 39 | + | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
| 40 | + | * OTHER DEALINGS IN THE SOFTWARE. | |
| 41 | + | */ | |
| 42 | + | ||
| 43 | + | /dts-v1/; | |
| 44 | + | #include "sun8i-h3.dtsi" | |
| 45 | + | #include "sunxi-common-regulators.dtsi" | |
| 46 | + | ||
| 47 | + | #include <dt-bindings/gpio/gpio.h> | |
| 48 | + | #include <dt-bindings/input/input.h> | |
| 49 | + | ||
| 50 | + | / { | |
| 51 | + | model = "Xunlong Orange Pi PC"; | |
| 52 | + | compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3"; | |
| 53 | + | ||
| 54 | + | ||
| 55 | + | aliases { | |
| 56 | + | ethernet0 = &emac; | |
| 57 | + | serial0 = &uart0; | |
| 58 | + | spi0 = &spi0; | |
| 59 | + | }; | |
| 60 | + | ||
| 61 | + | chosen { | |
| 62 | + | stdout-path = "serial0:115200n8"; | |
| 63 | + | }; | |
| 64 | + | ||
| 65 | + | connector { | |
| 66 | + | compatible = "hdmi-connector"; | |
| 67 | + | type = "a"; | |
| 68 | + | ||
| 69 | + | port { | |
| 70 | + | hdmi_con_in: endpoint { | |
| 71 | + | remote-endpoint = <&hdmi_out_con>; | |
| 72 | + | }; | |
| 73 | + | }; | |
| 74 | + | }; | |
| 75 | + | ||
| 76 | + | leds { | |
| 77 | + | compatible = "gpio-leds"; | |
| 78 | + | ||
| 79 | + | pwr_led { | |
| 80 | + | label = "orangepi:green:pwr"; | |
| 81 | + | gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; | |
| 82 | + | default-state = "on"; | |
| 83 | + | }; | |
| 84 | + | ||
| 85 | + | status_led { | |
| 86 | + | label = "orangepi:red:status"; | |
| 87 | + | gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; | |
| 88 | + | }; | |
| 89 | + | }; | |
| 90 | + | ||
| 91 | + | gpio-keys { | |
| 92 | + | compatible = "gpio-keys"; | |
| 93 | + | ||
| 94 | + | switch-4 { | |
| 95 | + | label = "sw4"; | |
| 96 | + | linux,code = <KEY_POWER>; | |
| 97 | + | gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; | |
| 98 | + | wakeup-source; | |
| 99 | + | }; | |
| 100 | + | }; | |
| 101 | + | }; | |
| 102 | + | ||
| 103 | + | &codec { | |
| 104 | + | allwinner,audio-routing = | |
| 105 | + | "Line Out", "LINEOUT", | |
| 106 | + | "MIC1", "Mic", | |
| 107 | + | "Mic", "MBIAS"; | |
| 108 | + | status = "okay"; | |
| 109 | + | }; | |
| 110 | + | ||
| 111 | + | &de { | |
| 112 | + | status = "okay"; | |
| 113 | + | }; | |
| 114 | + | ||
| 115 | + | &cpu0 { | |
| 116 | + | cpu-supply = <®_vdd_cpux>; | |
| 117 | + | }; | |
| 118 | + | ||
| 119 | + | &ehci0 { | |
| 120 | + | status = "okay"; | |
| 121 | + | }; | |
| 122 | + | ||
| 123 | + | &ehci1 { | |
| 124 | + | status = "okay"; | |
| 125 | + | }; | |
| 126 | + | ||
| 127 | + | &ehci2 { | |
| 128 | + | status = "okay"; | |
| 129 | + | }; | |
| 130 | + | ||
| 131 | + | &ehci3 { | |
| 132 | + | status = "okay"; | |
| 133 | + | }; | |
| 134 | + | ||
| 135 | + | &emac { | |
| 136 | + | phy-handle = <&int_mii_phy>; | |
| 137 | + | phy-mode = "mii"; | |
| 138 | + | allwinner,leds-active-low; | |
| 139 | + | status = "okay"; | |
| 140 | + | }; | |
| 141 | + | &spi0 { | |
| 142 | + | status = "okay"; | |
| 143 | + | #address-cells = <1>; | |
| 144 | + | #size-cells = <1>; | |
| 145 | + | flash@0 { | |
| 146 | + | compatible = "jedec,spi-nor"; | |
| 147 | + | reg = <0>; | |
| 148 | + | spi-max-frequency = <10000000>; | |
| 149 | + | }; | |
| 150 | + | }; | |
| 151 | + | &hdmi { | |
| 152 | + | status = "okay"; | |
| 153 | + | }; | |
| 154 | + | ||
| 155 | + | &hdmi_out { | |
| 156 | + | hdmi_out_con: endpoint { | |
| 157 | + | remote-endpoint = <&hdmi_con_in>; | |
| 158 | + | }; | |
| 159 | + | }; | |
| 160 | + | ||
| 161 | + | &ir { | |
| 162 | + | pinctrl-names = "default"; | |
| 163 | + | pinctrl-0 = <&r_ir_rx_pin>; | |
| 164 | + | status = "okay"; | |
| 165 | + | }; | |
| 166 | + | ||
| 167 | + | &mmc0 { | |
| 168 | + | vmmc-supply = <®_vcc3v3>; | |
| 169 | + | bus-width = <4>; | |
| 170 | + | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ | |
| 171 | + | status = "okay"; | |
| 172 | + | }; | |
| 173 | + | ||
| 174 | + | &ohci0 { | |
| 175 | + | status = "okay"; | |
| 176 | + | }; | |
| 177 | + | ||
| 178 | + | &ohci1 { | |
| 179 | + | status = "okay"; | |
| 180 | + | }; | |
| 181 | + | ||
| 182 | + | &ohci2 { | |
| 183 | + | status = "okay"; | |
| 184 | + | }; | |
| 185 | + | ||
| 186 | + | &ohci3 { | |
| 187 | + | status = "okay"; | |
| 188 | + | }; | |
| 189 | + | ||
| 190 | + | &r_i2c { | |
| 191 | + | status = "okay"; | |
| 192 | + | ||
| 193 | + | reg_vdd_cpux: regulator@65 { | |
| 194 | + | compatible = "silergy,sy8106a"; | |
| 195 | + | reg = <0x65>; | |
| 196 | + | regulator-name = "vdd-cpux"; | |
| 197 | + | silergy,fixed-microvolt = <1200000>; | |
| 198 | + | /* | |
| 199 | + | * The datasheet uses 1.1V as the minimum value of VDD-CPUX, | |
| 200 | + | * however both the Armbian DVFS table and the official one | |
| 201 | + | * have operating points with voltage under 1.1V, and both | |
| 202 | + | * DVFS table are known to work properly at the lowest | |
| 203 | + | * operating point. | |
| 204 | + | * | |
| 205 | + | * Use 1.0V as the minimum voltage instead. | |
| 206 | + | */ | |
| 207 | + | regulator-min-microvolt = <1000000>; | |
| 208 | + | regulator-max-microvolt = <1300000>; | |
| 209 | + | regulator-boot-on; | |
| 210 | + | regulator-always-on; | |
| 211 | + | }; | |
| 212 | + | }; | |
| 213 | + | ||
| 214 | + | ®_usb0_vbus { | |
| 215 | + | gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ | |
| 216 | + | status = "okay"; | |
| 217 | + | }; | |
| 218 | + | ||
| 219 | + | &uart0 { | |
| 220 | + | pinctrl-names = "default"; | |
| 221 | + | pinctrl-0 = <&uart0_pa_pins>; | |
| 222 | + | status = "okay"; | |
| 223 | + | }; | |
| 224 | + | ||
| 225 | + | &uart1 { | |
| 226 | + | pinctrl-names = "default"; | |
| 227 | + | pinctrl-0 = <&uart1_pins>; | |
| 228 | + | status = "disabled"; | |
| 229 | + | }; | |
| 230 | + | ||
| 231 | + | &uart2 { | |
| 232 | + | pinctrl-names = "default"; | |
| 233 | + | pinctrl-0 = <&uart2_pins>; | |
| 234 | + | status = "disabled"; | |
| 235 | + | }; | |
| 236 | + | ||
| 237 | + | &uart3 { | |
| 238 | + | pinctrl-names = "default"; | |
| 239 | + | pinctrl-0 = <&uart3_pins>; | |
| 240 | + | status = "disabled"; | |
| 241 | + | }; | |
| 242 | + | ||
| 243 | + | &usb_otg { | |
| 244 | + | dr_mode = "otg"; | |
| 245 | + | status = "okay"; | |
| 246 | + | }; | |
| 247 | + | ||
| 248 | + | &usbphy { | |
| 249 | + | usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ | |
| 250 | + | usb0_vbus-supply = <®_usb0_vbus>; | |
| 251 | + | /* VBUS on USB host ports are always on */ | |
| 252 | + | status = "okay"; | |
| 253 | + | }; | |
Newer
Older