|
| 1 | +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | +/* |
| 3 | + * Copyright (c) 2018 Martin Blumenstingl < [email protected]>. |
| 4 | + */ |
| 5 | + |
| 6 | +/dts-v1/; |
| 7 | + |
| 8 | +#include <dt-bindings/gpio/gpio.h> |
| 9 | +#include <dt-bindings/input/input.h> |
| 10 | + |
| 11 | +#include "meson8b.dtsi" |
| 12 | + |
| 13 | +/ { |
| 14 | + model = "Endless Computers Endless Mini"; |
| 15 | + compatible = "endless,ec100", "amlogic,meson8b"; |
| 16 | + |
| 17 | + aliases { |
| 18 | + serial0 = &uart_AO; |
| 19 | + }; |
| 20 | + |
| 21 | + chosen { |
| 22 | + stdout-path = "serial0:115200n8"; |
| 23 | + }; |
| 24 | + |
| 25 | + memory { |
| 26 | + reg = <0x40000000 0x40000000>; |
| 27 | + }; |
| 28 | + |
| 29 | + gpio-keys { |
| 30 | + compatible = "gpio-keys-polled"; |
| 31 | + #address-cells = <1>; |
| 32 | + #size-cells = <0>; |
| 33 | + poll-interval = <100>; |
| 34 | + |
| 35 | + pal-switch { |
| 36 | + label = "pal"; |
| 37 | + linux,input-type = <EV_SW>; |
| 38 | + linux,code = <KEY_SWITCHVIDEOMODE>; |
| 39 | + gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>; |
| 40 | + }; |
| 41 | + |
| 42 | + ntsc-switch { |
| 43 | + label = "ntsc"; |
| 44 | + linux,input-type = <EV_SW>; |
| 45 | + linux,code = <KEY_SWITCHVIDEOMODE>; |
| 46 | + gpios = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>; |
| 47 | + }; |
| 48 | + |
| 49 | + power-button { |
| 50 | + label = "power"; |
| 51 | + linux,code = <KEY_POWER>; |
| 52 | + gpios = <&gpio GPIOH_9 GPIO_ACTIVE_LOW>; |
| 53 | + }; |
| 54 | + }; |
| 55 | + |
| 56 | + gpio-poweroff { |
| 57 | + compatible = "gpio-poweroff"; |
| 58 | + /* |
| 59 | + * shutdown is managed by the EC (embedded micro-controller) |
| 60 | + * which is configured through GPIOAO_2 (poweroff GPIO) and |
| 61 | + * GPIOAO_7 (power LED, which has to go LOW as well). |
| 62 | + */ |
| 63 | + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; |
| 64 | + timeout-ms = <20000>; |
| 65 | + }; |
| 66 | + |
| 67 | + leds { |
| 68 | + compatible = "gpio-leds"; |
| 69 | + |
| 70 | + power { |
| 71 | + label = "ec100:red:power"; |
| 72 | + /* |
| 73 | + * Needs to go LOW (together with the poweroff GPIO) |
| 74 | + * during shutdown to allow the EC (embedded |
| 75 | + * micro-controller) to shutdown the system. Setting |
| 76 | + * the output to LOW signals the EC to start a |
| 77 | + * "breathing"/pulsing effect until the power is fully |
| 78 | + * turned off. |
| 79 | + */ |
| 80 | + gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>; |
| 81 | + default-state = "on"; |
| 82 | + }; |
| 83 | + }; |
| 84 | + |
| 85 | + usb_vbus: regulator-usb-vbus { |
| 86 | + compatible = "regulator-fixed"; |
| 87 | + |
| 88 | + regulator-name = "USB_VBUS"; |
| 89 | + |
| 90 | + regulator-min-microvolt = <5000000>; |
| 91 | + regulator-max-microvolt = <5000000>; |
| 92 | + |
| 93 | + gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; |
| 94 | + enable-active-high; |
| 95 | + }; |
| 96 | + |
| 97 | + vcc_5v: regulator-vcc5v { |
| 98 | + compatible = "regulator-fixed"; |
| 99 | + |
| 100 | + regulator-name = "VCC5V"; |
| 101 | + |
| 102 | + regulator-min-microvolt = <5000000>; |
| 103 | + regulator-max-microvolt = <5000000>; |
| 104 | + |
| 105 | + gpio = <&gpio GPIODV_29 GPIO_ACTIVE_LOW>; |
| 106 | + |
| 107 | + regulator-boot-on; |
| 108 | + regulator-always-on; |
| 109 | + }; |
| 110 | + |
| 111 | + vcck: regulator-vcck { |
| 112 | + compatible = "pwm-regulator"; |
| 113 | + |
| 114 | + regulator-name = "VCCK"; |
| 115 | + regulator-min-microvolt = <860000>; |
| 116 | + regulator-max-microvolt = <1140000>; |
| 117 | + |
| 118 | + pwms = <&pwm_cd 0 1148 0>; |
| 119 | + pwm-dutycycle-range = <100 0>; |
| 120 | + |
| 121 | + regulator-boot-on; |
| 122 | + regulator-always-on; |
| 123 | + }; |
| 124 | + |
| 125 | + vcc_1v8: regulator-vcc1v8 { |
| 126 | + compatible = "regulator-fixed"; |
| 127 | + |
| 128 | + regulator-name = "VCC1V8"; |
| 129 | + regulator-min-microvolt = <1800000>; |
| 130 | + regulator-max-microvolt = <1800000>; |
| 131 | + }; |
| 132 | + |
| 133 | + vcc_3v3: regulator-vcc3v3 { |
| 134 | + compatible = "regulator-fixed"; |
| 135 | + |
| 136 | + regulator-name = "VCC3V3"; |
| 137 | + regulator-min-microvolt = <3300000>; |
| 138 | + regulator-max-microvolt = <3300000>; |
| 139 | + }; |
| 140 | +}; |
| 141 | + |
| 142 | +&cpu0 { |
| 143 | + cpu-supply = <&vcck>; |
| 144 | +}; |
| 145 | + |
| 146 | +ðmac { |
| 147 | + status = "okay"; |
| 148 | + |
| 149 | + pinctrl-0 = <ð_rmii_pins>; |
| 150 | + pinctrl-names = "default"; |
| 151 | + |
| 152 | + phy-handle = <ð_phy0>; |
| 153 | + phy-mode = "rmii"; |
| 154 | + |
| 155 | + snps,reset-gpio = <&gpio GPIOH_4 0>; |
| 156 | + snps,reset-delays-us = <0 10000 1000000>; |
| 157 | + snps,reset-active-low; |
| 158 | + |
| 159 | + mdio { |
| 160 | + compatible = "snps,dwmac-mdio"; |
| 161 | + #address-cells = <1>; |
| 162 | + #size-cells = <0>; |
| 163 | + |
| 164 | + eth_phy0: ethernet-phy@0 { |
| 165 | + /* IC Plus IP101A/G (0x02430c54) */ |
| 166 | + reg = <0>; |
| 167 | + }; |
| 168 | + }; |
| 169 | +}; |
| 170 | + |
| 171 | +&i2c_A { |
| 172 | + status = "okay"; |
| 173 | + pinctrl-0 = <&i2c_a_pins>; |
| 174 | + pinctrl-names = "default"; |
| 175 | + |
| 176 | + rt5640: codec@1c { |
| 177 | + compatible = "realtek,rt5640"; |
| 178 | + reg = <0x1c>; |
| 179 | + interrupt-parent = <&gpio_intc>; |
| 180 | + interrupts = <13 IRQ_TYPE_EDGE_BOTH>; /* GPIOAO_13 */ |
| 181 | + realtek,in1-differential; |
| 182 | + }; |
| 183 | +}; |
| 184 | + |
| 185 | +&saradc { |
| 186 | + status = "okay"; |
| 187 | + vref-supply = <&vcc_1v8>; |
| 188 | +}; |
| 189 | + |
| 190 | +&sdio { |
| 191 | + status = "okay"; |
| 192 | + |
| 193 | + pinctrl-0 = <&sd_b_pins>; |
| 194 | + pinctrl-names = "default"; |
| 195 | + |
| 196 | + /* SD card */ |
| 197 | + sd_card_slot: slot@1 { |
| 198 | + compatible = "mmc-slot"; |
| 199 | + reg = <1>; |
| 200 | + status = "okay"; |
| 201 | + |
| 202 | + bus-width = <4>; |
| 203 | + no-sdio; |
| 204 | + cap-mmc-highspeed; |
| 205 | + cap-sd-highspeed; |
| 206 | + disable-wp; |
| 207 | + |
| 208 | + cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; |
| 209 | + cd-inverted; |
| 210 | + |
| 211 | + vmmc-supply = <&vcc_3v3>; |
| 212 | + }; |
| 213 | +}; |
| 214 | + |
| 215 | +&pwm_cd { |
| 216 | + status = "okay"; |
| 217 | + pinctrl-0 = <&pwm_c1_pins>; |
| 218 | + pinctrl-names = "default"; |
| 219 | + clocks = <&clkc CLKID_XTAL>; |
| 220 | + clock-names = "clkin0"; |
| 221 | +}; |
| 222 | + |
| 223 | +/* exposed through the pin headers labeled "URDUG1" on the top of the PCB */ |
| 224 | +&uart_AO { |
| 225 | + status = "okay"; |
| 226 | + pinctrl-0 = <&uart_ao_a_pins>; |
| 227 | + pinctrl-names = "default"; |
| 228 | +}; |
| 229 | + |
| 230 | +/* |
| 231 | + * connected to the Bluetooth part of the RTL8723BS SDIO wifi / Bluetooth |
| 232 | + * combo chip. This is only available on the variant with 2GB RAM. |
| 233 | + */ |
| 234 | +&uart_B { |
| 235 | + status = "okay"; |
| 236 | + pinctrl-0 = <&uart_b0_pins>, <&uart_b0_cts_rts_pins>; |
| 237 | + pinctrl-names = "default"; |
| 238 | + uart-has-rtscts; |
| 239 | +}; |
| 240 | + |
| 241 | +&usb1 { |
| 242 | + status = "okay"; |
| 243 | + vbus-supply = <&usb_vbus>; |
| 244 | +}; |
| 245 | + |
| 246 | +&usb1_phy { |
| 247 | + status = "okay"; |
| 248 | +}; |
0 commit comments