0001 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
0002 /*
0003 * Copyright (C) 2019-2020 Marek Vasut <marex@denx.de>
0004 */
0005
0006 #include "stm32mp15-pinctrl.dtsi"
0007 #include "stm32mp15xxaa-pinctrl.dtsi"
0008 #include <dt-bindings/gpio/gpio.h>
0009 #include <dt-bindings/mfd/st,stpmic1.h>
0010
0011 / {
0012 aliases {
0013 ethernet0 = ðernet0;
0014 ethernet1 = &ksz8851;
0015 rtc0 = &hwrtc;
0016 rtc1 = &rtc;
0017 };
0018
0019 memory@c0000000 {
0020 device_type = "memory";
0021 reg = <0xC0000000 0x40000000>;
0022 };
0023
0024 reserved-memory {
0025 #address-cells = <1>;
0026 #size-cells = <1>;
0027 ranges;
0028
0029 mcuram2: mcuram2@10000000 {
0030 compatible = "shared-dma-pool";
0031 reg = <0x10000000 0x40000>;
0032 no-map;
0033 };
0034
0035 vdev0vring0: vdev0vring0@10040000 {
0036 compatible = "shared-dma-pool";
0037 reg = <0x10040000 0x1000>;
0038 no-map;
0039 };
0040
0041 vdev0vring1: vdev0vring1@10041000 {
0042 compatible = "shared-dma-pool";
0043 reg = <0x10041000 0x1000>;
0044 no-map;
0045 };
0046
0047 vdev0buffer: vdev0buffer@10042000 {
0048 compatible = "shared-dma-pool";
0049 reg = <0x10042000 0x4000>;
0050 no-map;
0051 };
0052
0053 mcuram: mcuram@30000000 {
0054 compatible = "shared-dma-pool";
0055 reg = <0x30000000 0x40000>;
0056 no-map;
0057 };
0058
0059 retram: retram@38000000 {
0060 compatible = "shared-dma-pool";
0061 reg = <0x38000000 0x10000>;
0062 no-map;
0063 };
0064 };
0065
0066 ethernet_vio: vioregulator {
0067 compatible = "regulator-fixed";
0068 regulator-name = "vio";
0069 regulator-min-microvolt = <3300000>;
0070 regulator-max-microvolt = <3300000>;
0071 gpio = <&gpiog 3 GPIO_ACTIVE_LOW>;
0072 regulator-always-on;
0073 regulator-boot-on;
0074 vin-supply = <&vdd>;
0075 };
0076 };
0077
0078 &adc {
0079 vdd-supply = <&vdd>;
0080 vdda-supply = <&vdda>;
0081 vref-supply = <&vdda>;
0082 status = "okay";
0083
0084 adc1: adc@0 {
0085 st,min-sample-time-nsecs = <5000>;
0086 st,adc-channels = <0>;
0087 status = "okay";
0088 };
0089
0090 adc2: adc@100 {
0091 st,adc-channels = <1>;
0092 st,min-sample-time-nsecs = <5000>;
0093 status = "okay";
0094 };
0095 };
0096
0097 &crc1 {
0098 status = "okay";
0099 };
0100
0101 &dac {
0102 pinctrl-names = "default";
0103 pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
0104 vref-supply = <&vdda>;
0105 status = "okay";
0106
0107 dac1: dac@1 {
0108 status = "okay";
0109 };
0110 dac2: dac@2 {
0111 status = "okay";
0112 };
0113 };
0114
0115 &dts {
0116 status = "okay";
0117 };
0118
0119 ðernet0 {
0120 status = "okay";
0121 pinctrl-0 = <ðernet0_rmii_pins_c &mco2_pins_a>;
0122 pinctrl-1 = <ðernet0_rmii_sleep_pins_c &mco2_sleep_pins_a>;
0123 pinctrl-names = "default", "sleep";
0124 phy-mode = "rmii";
0125 max-speed = <100>;
0126 phy-handle = <&phy0>;
0127
0128 mdio0 {
0129 #address-cells = <1>;
0130 #size-cells = <0>;
0131 compatible = "snps,dwmac-mdio";
0132
0133 phy0: ethernet-phy@1 {
0134 reg = <1>;
0135 /* LAN8710Ai */
0136 compatible = "ethernet-phy-id0007.c0f0",
0137 "ethernet-phy-ieee802.3-c22";
0138 clocks = <&rcc CK_MCO2>;
0139 reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
0140 reset-assert-us = <500>;
0141 reset-deassert-us = <500>;
0142 smsc,disable-energy-detect;
0143 interrupt-parent = <&gpioi>;
0144 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
0145 };
0146 };
0147 };
0148
0149 &fmc {
0150 pinctrl-names = "default", "sleep";
0151 pinctrl-0 = <&fmc_pins_b>;
0152 pinctrl-1 = <&fmc_sleep_pins_b>;
0153 status = "okay";
0154
0155 ksz8851: ethernet@1,0 {
0156 compatible = "micrel,ks8851-mll";
0157 reg = <1 0x0 0x2>, <1 0x2 0x20000>;
0158 interrupt-parent = <&gpioc>;
0159 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
0160 bank-width = <2>;
0161
0162 /* Timing values are in nS */
0163 st,fmc2-ebi-cs-mux-enable;
0164 st,fmc2-ebi-cs-transaction-type = <4>;
0165 st,fmc2-ebi-cs-buswidth = <16>;
0166 st,fmc2-ebi-cs-address-setup-ns = <5>;
0167 st,fmc2-ebi-cs-address-hold-ns = <5>;
0168 st,fmc2-ebi-cs-bus-turnaround-ns = <5>;
0169 st,fmc2-ebi-cs-data-setup-ns = <45>;
0170 st,fmc2-ebi-cs-data-hold-ns = <1>;
0171 st,fmc2-ebi-cs-write-address-setup-ns = <5>;
0172 st,fmc2-ebi-cs-write-address-hold-ns = <5>;
0173 st,fmc2-ebi-cs-write-bus-turnaround-ns = <5>;
0174 st,fmc2-ebi-cs-write-data-setup-ns = <45>;
0175 st,fmc2-ebi-cs-write-data-hold-ns = <1>;
0176 };
0177 };
0178
0179 &gpioa {
0180 gpio-line-names = "", "", "", "",
0181 "", "", "DHCOM-K", "",
0182 "", "", "", "",
0183 "", "", "", "";
0184 };
0185
0186 &gpiob {
0187 gpio-line-names = "", "", "", "",
0188 "", "", "", "",
0189 "DHCOM-Q", "", "", "",
0190 "", "", "", "";
0191 };
0192
0193 &gpioc {
0194 gpio-line-names = "", "", "", "",
0195 "", "", "DHCOM-E", "",
0196 "", "", "", "",
0197 "", "", "", "";
0198 };
0199
0200 &gpiod {
0201 gpio-line-names = "", "", "", "",
0202 "", "", "DHCOM-B", "",
0203 "", "", "", "DHCOM-F",
0204 "DHCOM-D", "", "", "";
0205 };
0206
0207 &gpioe {
0208 gpio-line-names = "", "", "", "",
0209 "", "", "DHCOM-P", "",
0210 "", "", "", "",
0211 "", "", "", "";
0212 };
0213
0214 &gpiof {
0215 gpio-line-names = "", "", "", "DHCOM-A",
0216 "", "", "", "",
0217 "", "", "", "",
0218 "", "", "", "";
0219 };
0220
0221 &gpiog {
0222 gpio-line-names = "DHCOM-C", "", "", "",
0223 "", "", "", "",
0224 "DHCOM-L", "", "", "",
0225 "", "", "", "";
0226 };
0227
0228 &gpioh {
0229 gpio-line-names = "", "", "", "",
0230 "", "", "", "DHCOM-N",
0231 "DHCOM-J", "DHCOM-W", "DHCOM-V", "DHCOM-U",
0232 "DHCOM-T", "", "DHCOM-S", "";
0233 };
0234
0235 &gpioi {
0236 gpio-line-names = "DHCOM-G", "DHCOM-O", "DHCOM-H", "DHCOM-I",
0237 "DHCOM-R", "DHCOM-M", "", "",
0238 "", "", "", "",
0239 "", "", "", "";
0240 };
0241
0242 &i2c4 {
0243 pinctrl-names = "default";
0244 pinctrl-0 = <&i2c4_pins_a>;
0245 i2c-scl-rising-time-ns = <185>;
0246 i2c-scl-falling-time-ns = <20>;
0247 status = "okay";
0248 /* spare dmas for other usage */
0249 /delete-property/dmas;
0250 /delete-property/dma-names;
0251
0252 hwrtc: rtc@32 {
0253 compatible = "microcrystal,rv8803";
0254 reg = <0x32>;
0255 };
0256
0257 pmic: stpmic@33 {
0258 compatible = "st,stpmic1";
0259 reg = <0x33>;
0260 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
0261 interrupt-controller;
0262 #interrupt-cells = <2>;
0263 status = "okay";
0264
0265 regulators {
0266 compatible = "st,stpmic1-regulators";
0267 ldo1-supply = <&v3v3>;
0268 ldo2-supply = <&v3v3>;
0269 ldo3-supply = <&vdd_ddr>;
0270 ldo5-supply = <&v3v3>;
0271 ldo6-supply = <&v3v3>;
0272 pwr_sw1-supply = <&bst_out>;
0273 pwr_sw2-supply = <&bst_out>;
0274
0275 vddcore: buck1 {
0276 regulator-name = "vddcore";
0277 regulator-min-microvolt = <800000>;
0278 regulator-max-microvolt = <1350000>;
0279 regulator-always-on;
0280 regulator-initial-mode = <0>;
0281 regulator-over-current-protection;
0282 };
0283
0284 vdd_ddr: buck2 {
0285 regulator-name = "vdd_ddr";
0286 regulator-min-microvolt = <1350000>;
0287 regulator-max-microvolt = <1350000>;
0288 regulator-always-on;
0289 regulator-initial-mode = <0>;
0290 regulator-over-current-protection;
0291 };
0292
0293 vdd: buck3 {
0294 regulator-name = "vdd";
0295 regulator-min-microvolt = <3300000>;
0296 regulator-max-microvolt = <3300000>;
0297 regulator-always-on;
0298 st,mask-reset;
0299 regulator-initial-mode = <0>;
0300 regulator-over-current-protection;
0301 };
0302
0303 v3v3: buck4 {
0304 regulator-name = "v3v3";
0305 regulator-min-microvolt = <3300000>;
0306 regulator-max-microvolt = <3300000>;
0307 regulator-always-on;
0308 regulator-over-current-protection;
0309 regulator-initial-mode = <0>;
0310 };
0311
0312 vdda: ldo1 {
0313 regulator-name = "vdda";
0314 regulator-always-on;
0315 regulator-min-microvolt = <2900000>;
0316 regulator-max-microvolt = <2900000>;
0317 interrupts = <IT_CURLIM_LDO1 0>;
0318 };
0319
0320 v2v8: ldo2 {
0321 regulator-name = "v2v8";
0322 regulator-min-microvolt = <2800000>;
0323 regulator-max-microvolt = <2800000>;
0324 interrupts = <IT_CURLIM_LDO2 0>;
0325 };
0326
0327 vtt_ddr: ldo3 {
0328 regulator-name = "vtt_ddr";
0329 regulator-min-microvolt = <500000>;
0330 regulator-max-microvolt = <750000>;
0331 regulator-always-on;
0332 regulator-over-current-protection;
0333 };
0334
0335 vdd_usb: ldo4 {
0336 regulator-name = "vdd_usb";
0337 interrupts = <IT_CURLIM_LDO4 0>;
0338 };
0339
0340 vdd_sd: ldo5 {
0341 regulator-name = "vdd_sd";
0342 regulator-min-microvolt = <2900000>;
0343 regulator-max-microvolt = <2900000>;
0344 interrupts = <IT_CURLIM_LDO5 0>;
0345 regulator-boot-on;
0346 };
0347
0348 v1v8: ldo6 {
0349 regulator-name = "v1v8";
0350 regulator-min-microvolt = <1800000>;
0351 regulator-max-microvolt = <1800000>;
0352 interrupts = <IT_CURLIM_LDO6 0>;
0353 };
0354
0355 vref_ddr: vref_ddr {
0356 regulator-name = "vref_ddr";
0357 regulator-always-on;
0358 };
0359
0360 bst_out: boost {
0361 regulator-name = "bst_out";
0362 interrupts = <IT_OCP_BOOST 0>;
0363 };
0364
0365 vbus_otg: pwr_sw1 {
0366 regulator-name = "vbus_otg";
0367 interrupts = <IT_OCP_OTG 0>;
0368 };
0369
0370 vbus_sw: pwr_sw2 {
0371 regulator-name = "vbus_sw";
0372 interrupts = <IT_OCP_SWOUT 0>;
0373 regulator-active-discharge = <1>;
0374 };
0375 };
0376
0377 onkey {
0378 compatible = "st,stpmic1-onkey";
0379 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
0380 interrupt-names = "onkey-falling", "onkey-rising";
0381 power-off-time-sec = <10>;
0382 status = "okay";
0383 };
0384
0385 watchdog {
0386 compatible = "st,stpmic1-wdt";
0387 status = "disabled";
0388 };
0389 };
0390
0391 touchscreen@49 {
0392 compatible = "ti,tsc2004";
0393 reg = <0x49>;
0394 vio-supply = <&v3v3>;
0395 interrupts-extended = <&gpioh 15 IRQ_TYPE_EDGE_FALLING>;
0396 };
0397
0398 eeprom@50 {
0399 compatible = "atmel,24c02";
0400 reg = <0x50>;
0401 pagesize = <16>;
0402 };
0403 };
0404
0405 &ipcc {
0406 status = "okay";
0407 };
0408
0409 &iwdg2 {
0410 timeout-sec = <32>;
0411 status = "okay";
0412 };
0413
0414 &m4_rproc {
0415 memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
0416 <&vdev0vring1>, <&vdev0buffer>;
0417 mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
0418 mbox-names = "vq0", "vq1", "shutdown";
0419 interrupt-parent = <&exti>;
0420 interrupts = <68 1>;
0421 status = "okay";
0422 };
0423
0424 &pwr_regulators {
0425 vdd-supply = <&vdd>;
0426 vdd_3v3_usbfs-supply = <&vdd_usb>;
0427 };
0428
0429 &qspi {
0430 pinctrl-names = "default", "sleep";
0431 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
0432 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
0433 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
0434 #address-cells = <1>;
0435 #size-cells = <0>;
0436 status = "okay";
0437
0438 flash0: flash@0 {
0439 compatible = "jedec,spi-nor";
0440 reg = <0>;
0441 spi-rx-bus-width = <4>;
0442 spi-max-frequency = <108000000>;
0443 #address-cells = <1>;
0444 #size-cells = <1>;
0445 };
0446 };
0447
0448 &rcc {
0449 /* Connect MCO2 output to ETH_RX_CLK input via pad-pad connection */
0450 clocks = <&rcc CK_MCO2>;
0451 clock-names = "ETH_RX_CLK/ETH_REF_CLK";
0452
0453 /*
0454 * Set PLL4P output to 100 MHz to supply SDMMC with faster clock,
0455 * set MCO2 output to 50 MHz to supply ETHRX clock with PLL4P/2,
0456 * so that MCO2 behaves as a divider for the ETHRX clock here.
0457 */
0458 assigned-clocks = <&rcc CK_MCO2>, <&rcc PLL4_P>;
0459 assigned-clock-parents = <&rcc PLL4_P>;
0460 assigned-clock-rates = <50000000>, <100000000>;
0461 };
0462
0463 &rng1 {
0464 status = "okay";
0465 };
0466
0467 &rtc {
0468 status = "okay";
0469 };
0470
0471 &sdmmc1 {
0472 pinctrl-names = "default", "opendrain", "sleep", "init";
0473 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
0474 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
0475 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
0476 pinctrl-3 = <&sdmmc1_b4_init_pins_a &sdmmc1_dir_init_pins_a>;
0477 cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
0478 disable-wp;
0479 st,sig-dir;
0480 st,neg-edge;
0481 st,use-ckin;
0482 st,cmd-gpios = <&gpiod 2 0>;
0483 st,ck-gpios = <&gpioc 12 0>;
0484 st,ckin-gpios = <&gpioe 4 0>;
0485 bus-width = <4>;
0486 vmmc-supply = <&vdd_sd>;
0487 status = "okay";
0488 };
0489
0490 &sdmmc1_b4_pins_a {
0491 /*
0492 * SD bus pull-up resistors:
0493 * - optional on SoMs with SD voltage translator
0494 * - mandatory on SoMs without SD voltage translator
0495 */
0496 pins1 {
0497 bias-pull-up;
0498 };
0499 pins2 {
0500 bias-pull-up;
0501 };
0502 };
0503
0504 &sdmmc2 {
0505 pinctrl-names = "default", "opendrain", "sleep";
0506 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
0507 pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
0508 pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
0509 non-removable;
0510 no-sd;
0511 no-sdio;
0512 st,neg-edge;
0513 bus-width = <8>;
0514 vmmc-supply = <&v3v3>;
0515 vqmmc-supply = <&v3v3>;
0516 mmc-ddr-3_3v;
0517 status = "okay";
0518 };
0519
0520 &sdmmc3 {
0521 pinctrl-names = "default", "opendrain", "sleep";
0522 pinctrl-0 = <&sdmmc3_b4_pins_a>;
0523 pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
0524 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
0525 broken-cd;
0526 st,neg-edge;
0527 bus-width = <4>;
0528 vmmc-supply = <&v3v3>;
0529 vqmmc-supply = <&v3v3>;
0530 mmc-ddr-3_3v;
0531 status = "okay";
0532 };
0533
0534 &uart4 {
0535 pinctrl-names = "default";
0536 pinctrl-0 = <&uart4_pins_a>;
0537 /delete-property/dmas;
0538 /delete-property/dma-names;
0539 status = "okay";
0540 };