1// SPDX-License-Identifier: (GPL-2.0 OR MIT) 2/* 3 * Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org> 4 * Copyright (C) 2023 Drew Fustini <dfustini@baylibre.com> 5 */ 6 7/dts-v1/; 8 9#include "th1520.dtsi" 10#include <dt-bindings/gpio/gpio.h> 11#include <dt-bindings/leds/common.h> 12 13/ { 14 model = "BeagleV Ahead"; 15 compatible = "beagle,beaglev-ahead", "thead,th1520"; 16 17 aliases { 18 ethernet0 = &gmac0; 19 gpio0 = &gpio0; 20 gpio1 = &gpio1; 21 gpio2 = &gpio2; 22 gpio3 = &gpio3; 23 gpio4 = &gpio4; 24 gpio5 = &aogpio; 25 serial0 = &uart0; 26 serial1 = &uart1; 27 serial2 = &uart2; 28 serial3 = &uart3; 29 serial4 = &uart4; 30 serial5 = &uart5; 31 spi0 = &spi0; 32 }; 33 34 chosen { 35 stdout-path = "serial0:115200n8"; 36 }; 37 38 memory@0 { 39 device_type = "memory"; 40 reg = <0x0 0x00000000 0x1 0x00000000>; 41 }; 42 43 leds { 44 pinctrl-names = "default"; 45 pinctrl-0 = <&led_pins>; 46 compatible = "gpio-leds"; 47 48 led-1 { 49 gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; 50 color = <LED_COLOR_ID_BLUE>; 51 label = "led1"; 52 }; 53 54 led-2 { 55 gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>; 56 color = <LED_COLOR_ID_BLUE>; 57 label = "led2"; 58 }; 59 60 led-3 { 61 gpios = <&gpio4 10 GPIO_ACTIVE_HIGH>; 62 color = <LED_COLOR_ID_BLUE>; 63 label = "led3"; 64 }; 65 66 led-4 { 67 gpios = <&gpio4 11 GPIO_ACTIVE_HIGH>; 68 color = <LED_COLOR_ID_BLUE>; 69 label = "led4"; 70 }; 71 72 led-5 { 73 gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>; 74 color = <LED_COLOR_ID_BLUE>; 75 label = "led5"; 76 }; 77 }; 78}; 79 80&osc { 81 clock-frequency = <24000000>; 82}; 83 84&osc_32k { 85 clock-frequency = <32768>; 86}; 87 88&dmac0 { 89 status = "okay"; 90}; 91 92&emmc { 93 bus-width = <8>; 94 max-frequency = <198000000>; 95 mmc-hs400-1_8v; 96 non-removable; 97 no-sdio; 98 no-sd; 99 status = "okay"; 100}; 101 102&gmac0 { 103 pinctrl-names = "default"; 104 pinctrl-0 = <&gmac0_pins>; 105 phy-handle = <&phy0>; 106 phy-mode = "rgmii-id"; 107 status = "okay"; 108}; 109 110&mdio0 { 111 phy0: ethernet-phy@1 { 112 reg = <1>; 113 interrupt-parent = <&gpio3>; 114 interrupts = <22 IRQ_TYPE_LEVEL_LOW>; 115 reset-gpios = <&gpio3 21 GPIO_ACTIVE_LOW>; 116 reset-delay-us = <10000>; 117 reset-post-delay-us = <50000>; 118 }; 119}; 120 121&padctrl_aosys { 122 led_pins: led-0 { 123 led-pins { 124 pins = "AUDIO_PA8", /* GPIO4_8 */ 125 "AUDIO_PA9", /* GPIO4_9 */ 126 "AUDIO_PA10", /* GPIO4_10 */ 127 "AUDIO_PA11", /* GPIO4_11 */ 128 "AUDIO_PA12"; /* GPIO4_12 */ 129 bias-disable; 130 drive-strength = <3>; 131 input-disable; 132 input-schmitt-disable; 133 slew-rate = <0>; 134 }; 135 }; 136}; 137 138&padctrl0_apsys { 139 gmac0_pins: gmac0-0 { 140 tx-pins { 141 pins = "GMAC0_TX_CLK", 142 "GMAC0_TXEN", 143 "GMAC0_TXD0", 144 "GMAC0_TXD1", 145 "GMAC0_TXD2", 146 "GMAC0_TXD3"; 147 function = "gmac0"; 148 bias-disable; 149 drive-strength = <25>; 150 input-disable; 151 input-schmitt-disable; 152 slew-rate = <0>; 153 }; 154 155 rx-pins { 156 pins = "GMAC0_RX_CLK", 157 "GMAC0_RXDV", 158 "GMAC0_RXD0", 159 "GMAC0_RXD1", 160 "GMAC0_RXD2", 161 "GMAC0_RXD3"; 162 function = "gmac0"; 163 bias-disable; 164 drive-strength = <1>; 165 input-enable; 166 input-schmitt-disable; 167 slew-rate = <0>; 168 }; 169 170 mdc-pins { 171 pins = "GMAC0_MDC"; 172 function = "gmac0"; 173 bias-disable; 174 drive-strength = <13>; 175 input-disable; 176 input-schmitt-disable; 177 slew-rate = <0>; 178 }; 179 180 mdio-pins { 181 pins = "GMAC0_MDIO"; 182 function = "gmac0"; 183 bias-disable; 184 drive-strength = <13>; 185 input-enable; 186 input-schmitt-enable; 187 slew-rate = <0>; 188 }; 189 190 phy-reset-pins { 191 pins = "GMAC0_COL"; /* GPIO3_21 */ 192 bias-disable; 193 drive-strength = <3>; 194 input-disable; 195 input-schmitt-disable; 196 slew-rate = <0>; 197 }; 198 199 phy-interrupt-pins { 200 pins = "GMAC0_CRS"; /* GPIO3_22 */ 201 function = "gpio"; 202 bias-pull-up; 203 drive-strength = <1>; 204 input-enable; 205 input-schmitt-enable; 206 slew-rate = <0>; 207 }; 208 }; 209 210 uart0_pins: uart0-0 { 211 tx-pins { 212 pins = "UART0_TXD"; 213 function = "uart"; 214 bias-disable; 215 drive-strength = <3>; 216 input-disable; 217 input-schmitt-disable; 218 slew-rate = <0>; 219 }; 220 221 rx-pins { 222 pins = "UART0_RXD"; 223 function = "uart"; 224 bias-pull-up; 225 drive-strength = <1>; 226 input-enable; 227 input-schmitt-enable; 228 slew-rate = <0>; 229 }; 230 }; 231}; 232 233&sdio0 { 234 bus-width = <4>; 235 max-frequency = <198000000>; 236 status = "okay"; 237}; 238 239&uart0 { 240 pinctrl-names = "default"; 241 pinctrl-0 = <&uart0_pins>; 242 status = "okay"; 243}; 244