1// SPDX-License-Identifier: (GPL-2.0 OR MIT) 2 3/dts-v1/; 4 5#include <dt-bindings/pinctrl/pinctrl-sg2000.h> 6#include "sg2000.dtsi" 7 8/ { 9 model = "Milk-V Duo S"; 10 compatible = "milkv,duo-s", "sophgo,sg2000"; 11 12 aliases { 13 i2c4 = &i2c4; 14 mmc0 = &sdhci0; 15 mmc1 = &emmc; 16 mmc2 = &sdhci1; 17 serial0 = &uart0; 18 serial4 = &uart4; 19 }; 20 21 chosen { 22 stdout-path = "serial0:115200n8"; 23 }; 24 25 wifi_pwrseq: wifi-pwrseq { 26 compatible = "mmc-pwrseq-simple"; 27 reset-gpios = <&porta 15 GPIO_ACTIVE_LOW>; 28 power-off-delay-us = <50000>; 29 post-power-on-delay-ms = <200>; 30 }; 31}; 32 33&osc { 34 clock-frequency = <25000000>; 35}; 36 37&pinctrl { 38 emmc_cfg: emmc-cfg { 39 emmc-rstn-pins { 40 pinmux = <PINMUX(PIN_EMMC_RSTN, 0)>; 41 bias-pull-up; 42 drive-strength-microamp = <10800>; 43 power-source = <1800>; 44 }; 45 46 emmc-clk-pins { 47 pinmux = <PINMUX(PIN_EMMC_CLK, 0)>; 48 bias-pull-up; 49 drive-strength-microamp = <10800>; 50 power-source = <1800>; 51 }; 52 53 emmc-cmd-pins { 54 pinmux = <PINMUX(PIN_EMMC_CMD, 0)>; 55 bias-pull-up; 56 drive-strength-microamp = <10800>; 57 power-source = <1800>; 58 }; 59 60 emmc-data-pins { 61 pinmux = <PINMUX(PIN_EMMC_DAT0, 0)>, 62 <PINMUX(PIN_EMMC_DAT1, 0)>, 63 <PINMUX(PIN_EMMC_DAT2, 0)>, 64 <PINMUX(PIN_EMMC_DAT3, 0)>; 65 bias-pull-up; 66 drive-strength-microamp = <10800>; 67 power-source = <1800>; 68 }; 69 }; 70 71 i2c4_cfg: i2c4-cfg { 72 i2c4-pins { 73 pinmux = <PINMUX(PIN_VIVO_D1, 7)>, 74 <PINMUX(PIN_VIVO_D0, 7)>; 75 bias-pull-up; 76 drive-strength-microamp = <4000>; 77 power-source = <1800>; 78 }; 79 }; 80 81 sdhci0_cfg: sdhci0-cfg { 82 sdhci0-cd-pins { 83 pinmux = <PINMUX(PIN_SD0_CD, 0)>; 84 bias-pull-up; 85 drive-strength-microamp = <10800>; 86 power-source = <3300>; 87 }; 88 89 sdhci0-clk-pins { 90 pinmux = <PINMUX(PIN_SD0_CLK, 0)>; 91 bias-pull-up; 92 drive-strength-microamp = <16100>; 93 power-source = <3300>; 94 }; 95 96 sdhci0-cmd-pins { 97 pinmux = <PINMUX(PIN_SD0_CMD, 0)>; 98 bias-pull-up; 99 drive-strength-microamp = <10800>; 100 power-source = <3300>; 101 }; 102 103 sdhci0-data-pins { 104 pinmux = <PINMUX(PIN_SD0_D0, 0)>, 105 <PINMUX(PIN_SD0_D1, 0)>, 106 <PINMUX(PIN_SD0_D2, 0)>, 107 <PINMUX(PIN_SD0_D3, 0)>; 108 bias-pull-up; 109 drive-strength-microamp = <10800>; 110 power-source = <3300>; 111 }; 112 }; 113 114 sdhci1_cfg: sdhci1-cfg { 115 sdhci1-clk-pins { 116 pinmux = <PINMUX(PIN_MIPI_TXM4, 1)>; 117 bias-pull-up; 118 drive-strength-microamp = <10800>; 119 power-source = <1800>; 120 }; 121 122 sdhci1-cmd-pins { 123 pinmux = <PINMUX(PIN_MIPI_TXP4, 1)>; 124 bias-pull-up; 125 drive-strength-microamp = <10800>; 126 power-source = <1800>; 127 }; 128 129 sdhci1-data-pins { 130 pinmux = <PINMUX(PIN_MIPI_TXM3, 1)>, 131 <PINMUX(PIN_MIPI_TXP3, 1)>, 132 <PINMUX(PIN_MIPI_TXM2, 7)>, 133 <PINMUX(PIN_MIPI_TXP2, 7)>; 134 bias-pull-up; 135 drive-strength-microamp = <10800>; 136 power-source = <1800>; 137 }; 138 }; 139 140 uart0_cfg: uart0-cfg { 141 uart0-pins { 142 pinmux = <PINMUX(PIN_UART0_TX, 0)>, 143 <PINMUX(PIN_UART0_RX, 0)>; 144 bias-pull-up; 145 drive-strength-microamp = <10800>; 146 power-source = <3300>; 147 }; 148 }; 149 150 uart4_cfg: uart4-cfg { 151 uart4-data-pins { 152 pinmux = <PINMUX(PIN_UART2_TX, 5)>, 153 <PINMUX(PIN_UART2_RX, 5)>; 154 drive-strength-microamp = <10800>; 155 power-source = <3300>; 156 }; 157 158 uart4-control-pins { 159 pinmux = <PINMUX(PIN_UART2_CTS, 5)>, 160 <PINMUX(PIN_UART2_RTS, 5)>; 161 bias-pull-up; 162 drive-strength-microamp = <10800>; 163 power-source = <3300>; 164 }; 165 }; 166}; 167 168&dmac { 169 status = "okay"; 170}; 171 172&emmc { 173 bus-width = <4>; 174 no-1-8-v; 175 cap-mmc-hw-reset; 176 no-sd; 177 no-sdio; 178 non-removable; 179 pinctrl-0 = <&emmc_cfg>; 180 pinctrl-names = "default"; 181 status = "okay"; 182}; 183 184&gmac0 { 185 status = "okay"; 186}; 187 188&i2c4 { 189 pinctrl-0 = <&i2c4_cfg>; 190 pinctrl-names = "default"; 191 status = "okay"; 192}; 193 194&mdio { 195 status = "okay"; 196}; 197 198&saradc { 199 status = "okay"; 200}; 201 202&sdhci0 { 203 bus-width = <4>; 204 disable-wp; 205 no-1-8-v; 206 pinctrl-0 = <&sdhci0_cfg>; 207 pinctrl-names = "default"; 208 status = "okay"; 209}; 210 211&sdhci1 { 212 bus-width = <4>; 213 cap-sdio-irq; 214 cap-sd-highspeed; 215 keep-power-in-suspend; 216 no-mmc; 217 no-sd; 218 non-removable; 219 max-frequency = <150000000>; 220 mmc-pwrseq = <&wifi_pwrseq>; 221 pinctrl-0 = <&sdhci1_cfg>; 222 pinctrl-names = "default"; 223 sd-uhs-sdr50; 224 sd-uhs-sdr104; 225 status = "okay"; 226}; 227 228&uart0 { 229 pinctrl-0 = <&uart0_cfg>; 230 pinctrl-names = "default"; 231 status = "okay"; 232}; 233 234&uart4 { 235 pinctrl-0 = <&uart4_cfg>; 236 pinctrl-names = "default"; 237 uart-has-rtscts; 238 status = "okay"; 239}; 240 241&usb { 242 dr_mode = "host"; 243 status = "okay"; 244}; 245