Chen-Yu Tsai | ff37d2c | 2017-12-07 21:00:45 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org> |
| 3 | * |
| 4 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 5 | */ |
| 6 | |
| 7 | /dts-v1/; |
| 8 | #include "sun8i-h3.dtsi" |
| 9 | |
| 10 | #include <dt-bindings/gpio/gpio.h> |
| 11 | #include <dt-bindings/input/input.h> |
| 12 | |
| 13 | / { |
| 14 | model = "Libre Computer Board ALL-H3-CC H3"; |
| 15 | compatible = "libretech,all-h3-cc-h3", "allwinner,sun8i-h3"; |
| 16 | |
| 17 | aliases { |
| 18 | ethernet0 = &emac; |
| 19 | serial0 = &uart0; |
| 20 | }; |
| 21 | |
| 22 | chosen { |
| 23 | stdout-path = "serial0:115200n8"; |
| 24 | }; |
| 25 | |
| 26 | leds { |
| 27 | compatible = "gpio-leds"; |
| 28 | |
| 29 | pwr_led { |
| 30 | label = "librecomputer:green:pwr"; |
| 31 | gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ |
| 32 | default-state = "on"; |
| 33 | }; |
| 34 | |
| 35 | status_led { |
| 36 | label = "librecomputer:blue:status"; |
| 37 | gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */ |
| 38 | }; |
| 39 | }; |
| 40 | |
| 41 | gpio_keys { |
| 42 | compatible = "gpio-keys"; |
| 43 | |
| 44 | power { |
| 45 | label = "power"; |
| 46 | linux,code = <KEY_POWER>; |
| 47 | gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ |
| 48 | }; |
| 49 | }; |
| 50 | |
| 51 | reg_vcc1v2: vcc1v2 { |
| 52 | compatible = "regulator-fixed"; |
| 53 | regulator-name = "vcc1v2"; |
| 54 | regulator-min-microvolt = <3300000>; |
| 55 | regulator-max-microvolt = <3300000>; |
| 56 | regulator-always-on; |
| 57 | regulator-boot-on; |
| 58 | vin-supply = <®_vcc5v0>; |
| 59 | gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ |
| 60 | enable-active-high; |
| 61 | }; |
| 62 | |
| 63 | reg_vcc3v3: vcc3v3 { |
| 64 | compatible = "regulator-fixed"; |
| 65 | regulator-name = "vcc3v3"; |
| 66 | regulator-min-microvolt = <3300000>; |
| 67 | regulator-max-microvolt = <3300000>; |
| 68 | vin-supply = <®_vcc5v0>; |
| 69 | }; |
| 70 | |
| 71 | /* This represents the board's 5V input */ |
| 72 | reg_vcc5v0: vcc5v0 { |
| 73 | compatible = "regulator-fixed"; |
| 74 | regulator-name = "vcc5v0"; |
| 75 | regulator-min-microvolt = <5000000>; |
| 76 | regulator-max-microvolt = <5000000>; |
| 77 | }; |
| 78 | |
| 79 | reg_vcc_dram: vcc-dram { |
| 80 | compatible = "regulator-fixed"; |
| 81 | regulator-name = "vcc-dram"; |
| 82 | regulator-min-microvolt = <1500000>; |
| 83 | regulator-max-microvolt = <1500000>; |
| 84 | regulator-always-on; |
| 85 | regulator-boot-on; |
| 86 | vin-supply = <®_vcc5v0>; |
| 87 | gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */ |
| 88 | enable-active-high; |
| 89 | }; |
| 90 | |
| 91 | reg_vcc_io: vcc-io { |
| 92 | compatible = "regulator-fixed"; |
| 93 | regulator-name = "vcc-io"; |
| 94 | regulator-min-microvolt = <3300000>; |
| 95 | regulator-max-microvolt = <3300000>; |
| 96 | regulator-always-on; |
| 97 | regulator-boot-on; |
| 98 | vin-supply = <®_vcc3v3>; |
| 99 | gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */ |
| 100 | }; |
| 101 | |
| 102 | reg_vdd_cpux: vdd-cpux { |
| 103 | compatible = "regulator-fixed"; |
| 104 | regulator-name = "vdd-cpux"; |
| 105 | regulator-min-microvolt = <3300000>; |
| 106 | regulator-max-microvolt = <3300000>; |
| 107 | regulator-always-on; |
| 108 | regulator-boot-on; |
| 109 | vin-supply = <®_vcc5v0>; |
| 110 | gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ |
| 111 | enable-active-high; |
| 112 | }; |
| 113 | }; |
| 114 | |
| 115 | &ehci1 { |
| 116 | status = "okay"; |
| 117 | }; |
| 118 | |
| 119 | &ehci2 { |
| 120 | status = "okay"; |
| 121 | }; |
| 122 | |
| 123 | &ehci3 { |
| 124 | status = "okay"; |
| 125 | }; |
| 126 | |
| 127 | &emac { |
| 128 | phy = <&phy1>; |
| 129 | phy-mode = "mii"; |
| 130 | allwinner,use-internal-phy; |
| 131 | allwinner,leds-active-low; |
| 132 | status = "okay"; |
| 133 | |
| 134 | phy1: ethernet-phy@1 { |
| 135 | reg = <1>; |
| 136 | }; |
| 137 | }; |
| 138 | |
| 139 | &ir { |
| 140 | pinctrl-names = "default"; |
| 141 | pinctrl-0 = <&ir_pins_a>; |
| 142 | status = "okay"; |
| 143 | }; |
| 144 | |
| 145 | &mmc0 { |
| 146 | pinctrl-names = "default"; |
| 147 | pinctrl-0 = <&mmc0_pins_a>; |
| 148 | vmmc-supply = <®_vcc_io>; |
| 149 | bus-width = <4>; |
| 150 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ |
| 151 | cd-inverted; |
| 152 | status = "okay"; |
| 153 | }; |
| 154 | |
| 155 | &ohci1 { |
| 156 | status = "okay"; |
| 157 | }; |
| 158 | |
| 159 | &ohci2 { |
| 160 | status = "okay"; |
| 161 | }; |
| 162 | |
| 163 | &ohci3 { |
| 164 | status = "okay"; |
| 165 | }; |
| 166 | |
| 167 | &uart0 { |
| 168 | pinctrl-names = "default"; |
| 169 | pinctrl-0 = <&uart0_pins_a>; |
| 170 | status = "okay"; |
| 171 | }; |
| 172 | |
| 173 | &usbphy { |
| 174 | /* VBUS on USB ports are always on */ |
| 175 | usb0_vbus-supply = <®_vcc5v0>; |
| 176 | usb1_vbus-supply = <®_vcc5v0>; |
| 177 | usb2_vbus-supply = <®_vcc5v0>; |
| 178 | usb3_vbus-supply = <®_vcc5v0>; |
| 179 | status = "okay"; |
| 180 | }; |