Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
0002 /*
0003  * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
0004  * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
0005  */
0006 /dts-v1/;
0007 
0008 #include "stm32mp157.dtsi"
0009 #include "stm32mp15xc.dtsi"
0010 #include "stm32mp15-pinctrl.dtsi"
0011 #include "stm32mp15xxaa-pinctrl.dtsi"
0012 #include <dt-bindings/gpio/gpio.h>
0013 #include <dt-bindings/mfd/st,stpmic1.h>
0014 
0015 / {
0016         model = "STMicroelectronics STM32MP157C eval daughter";
0017         compatible = "st,stm32mp157c-ed1", "st,stm32mp157";
0018 
0019         chosen {
0020                 stdout-path = "serial0:115200n8";
0021         };
0022 
0023         memory@c0000000 {
0024                 device_type = "memory";
0025                 reg = <0xC0000000 0x40000000>;
0026         };
0027 
0028         reserved-memory {
0029                 #address-cells = <1>;
0030                 #size-cells = <1>;
0031                 ranges;
0032 
0033                 mcuram2: mcuram2@10000000 {
0034                         compatible = "shared-dma-pool";
0035                         reg = <0x10000000 0x40000>;
0036                         no-map;
0037                 };
0038 
0039                 vdev0vring0: vdev0vring0@10040000 {
0040                         compatible = "shared-dma-pool";
0041                         reg = <0x10040000 0x1000>;
0042                         no-map;
0043                 };
0044 
0045                 vdev0vring1: vdev0vring1@10041000 {
0046                         compatible = "shared-dma-pool";
0047                         reg = <0x10041000 0x1000>;
0048                         no-map;
0049                 };
0050 
0051                 vdev0buffer: vdev0buffer@10042000 {
0052                         compatible = "shared-dma-pool";
0053                         reg = <0x10042000 0x4000>;
0054                         no-map;
0055                 };
0056 
0057                 mcuram: mcuram@30000000 {
0058                         compatible = "shared-dma-pool";
0059                         reg = <0x30000000 0x40000>;
0060                         no-map;
0061                 };
0062 
0063                 retram: retram@38000000 {
0064                         compatible = "shared-dma-pool";
0065                         reg = <0x38000000 0x10000>;
0066                         no-map;
0067                 };
0068 
0069                 gpu_reserved: gpu@e8000000 {
0070                         reg = <0xe8000000 0x8000000>;
0071                         no-map;
0072                 };
0073         };
0074 
0075         aliases {
0076                 serial0 = &uart4;
0077         };
0078 
0079         sd_switch: regulator-sd_switch {
0080                 compatible = "regulator-gpio";
0081                 regulator-name = "sd_switch";
0082                 regulator-min-microvolt = <1800000>;
0083                 regulator-max-microvolt = <2900000>;
0084                 regulator-type = "voltage";
0085                 regulator-always-on;
0086 
0087                 gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
0088                 gpios-states = <0>;
0089                 states = <1800000 0x1>,
0090                          <2900000 0x0>;
0091         };
0092 
0093         vin: vin {
0094                 compatible = "regulator-fixed";
0095                 regulator-name = "vin";
0096                 regulator-min-microvolt = <5000000>;
0097                 regulator-max-microvolt = <5000000>;
0098                 regulator-always-on;
0099         };
0100 };
0101 
0102 &adc {
0103         /* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
0104         pinctrl-0 = <&adc1_in6_pins_a>;
0105         pinctrl-names = "default";
0106         vdd-supply = <&vdd>;
0107         vdda-supply = <&vdda>;
0108         vref-supply = <&vdda>;
0109         status = "disabled";
0110         adc1: adc@0 {
0111                 st,adc-channels = <0 1 6>;
0112                 /* 16.5 ck_cycles sampling time */
0113                 st,min-sample-time-nsecs = <400>;
0114                 status = "okay";
0115         };
0116 };
0117 
0118 &crc1 {
0119         status = "okay";
0120 };
0121 
0122 &cryp1 {
0123         status = "okay";
0124 };
0125 
0126 &dac {
0127         pinctrl-names = "default";
0128         pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
0129         vref-supply = <&vdda>;
0130         status = "disabled";
0131         dac1: dac@1 {
0132                 status = "okay";
0133         };
0134         dac2: dac@2 {
0135                 status = "okay";
0136         };
0137 };
0138 
0139 &dts {
0140         status = "okay";
0141 };
0142 
0143 &gpu {
0144         contiguous-area = <&gpu_reserved>;
0145 };
0146 
0147 &hash1 {
0148         status = "okay";
0149 };
0150 
0151 &i2c4 {
0152         pinctrl-names = "default", "sleep";
0153         pinctrl-0 = <&i2c4_pins_a>;
0154         pinctrl-1 = <&i2c4_sleep_pins_a>;
0155         i2c-scl-rising-time-ns = <185>;
0156         i2c-scl-falling-time-ns = <20>;
0157         clock-frequency = <400000>;
0158         status = "okay";
0159         /* spare dmas for other usage */
0160         /delete-property/dmas;
0161         /delete-property/dma-names;
0162 
0163         pmic: stpmic@33 {
0164                 compatible = "st,stpmic1";
0165                 reg = <0x33>;
0166                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
0167                 interrupt-controller;
0168                 #interrupt-cells = <2>;
0169                 status = "okay";
0170 
0171                 regulators {
0172                         compatible = "st,stpmic1-regulators";
0173                         buck1-supply = <&vin>;
0174                         buck2-supply = <&vin>;
0175                         buck3-supply = <&vin>;
0176                         buck4-supply = <&vin>;
0177                         ldo1-supply = <&v3v3>;
0178                         ldo2-supply = <&v3v3>;
0179                         ldo3-supply = <&vdd_ddr>;
0180                         ldo4-supply = <&vin>;
0181                         ldo5-supply = <&v3v3>;
0182                         ldo6-supply = <&v3v3>;
0183                         vref_ddr-supply = <&vin>;
0184                         boost-supply = <&vin>;
0185                         pwr_sw1-supply = <&bst_out>;
0186                         pwr_sw2-supply = <&bst_out>;
0187 
0188                         vddcore: buck1 {
0189                                 regulator-name = "vddcore";
0190                                 regulator-min-microvolt = <1200000>;
0191                                 regulator-max-microvolt = <1350000>;
0192                                 regulator-always-on;
0193                                 regulator-initial-mode = <0>;
0194                                 regulator-over-current-protection;
0195                         };
0196 
0197                         vdd_ddr: buck2 {
0198                                 regulator-name = "vdd_ddr";
0199                                 regulator-min-microvolt = <1350000>;
0200                                 regulator-max-microvolt = <1350000>;
0201                                 regulator-always-on;
0202                                 regulator-initial-mode = <0>;
0203                                 regulator-over-current-protection;
0204                         };
0205 
0206                         vdd: buck3 {
0207                                 regulator-name = "vdd";
0208                                 regulator-min-microvolt = <3300000>;
0209                                 regulator-max-microvolt = <3300000>;
0210                                 regulator-always-on;
0211                                 st,mask-reset;
0212                                 regulator-initial-mode = <0>;
0213                                 regulator-over-current-protection;
0214                         };
0215 
0216                         v3v3: buck4 {
0217                                 regulator-name = "v3v3";
0218                                 regulator-min-microvolt = <3300000>;
0219                                 regulator-max-microvolt = <3300000>;
0220                                 regulator-always-on;
0221                                 regulator-over-current-protection;
0222                                 regulator-initial-mode = <0>;
0223                         };
0224 
0225                         vdda: ldo1 {
0226                                 regulator-name = "vdda";
0227                                 regulator-min-microvolt = <2900000>;
0228                                 regulator-max-microvolt = <2900000>;
0229                                 interrupts = <IT_CURLIM_LDO1 0>;
0230                         };
0231 
0232                         v2v8: ldo2 {
0233                                 regulator-name = "v2v8";
0234                                 regulator-min-microvolt = <2800000>;
0235                                 regulator-max-microvolt = <2800000>;
0236                                 interrupts = <IT_CURLIM_LDO2 0>;
0237                         };
0238 
0239                         vtt_ddr: ldo3 {
0240                                 regulator-name = "vtt_ddr";
0241                                 regulator-min-microvolt = <500000>;
0242                                 regulator-max-microvolt = <750000>;
0243                                 regulator-always-on;
0244                                 regulator-over-current-protection;
0245                         };
0246 
0247                         vdd_usb: ldo4 {
0248                                 regulator-name = "vdd_usb";
0249                                 interrupts = <IT_CURLIM_LDO4 0>;
0250                         };
0251 
0252                         vdd_sd: ldo5 {
0253                                 regulator-name = "vdd_sd";
0254                                 regulator-min-microvolt = <2900000>;
0255                                 regulator-max-microvolt = <2900000>;
0256                                 interrupts = <IT_CURLIM_LDO5 0>;
0257                                 regulator-boot-on;
0258                         };
0259 
0260                         v1v8: ldo6 {
0261                                 regulator-name = "v1v8";
0262                                 regulator-min-microvolt = <1800000>;
0263                                 regulator-max-microvolt = <1800000>;
0264                                 interrupts = <IT_CURLIM_LDO6 0>;
0265                         };
0266 
0267                         vref_ddr: vref_ddr {
0268                                 regulator-name = "vref_ddr";
0269                                 regulator-always-on;
0270                         };
0271 
0272                         bst_out: boost {
0273                                 regulator-name = "bst_out";
0274                                 interrupts = <IT_OCP_BOOST 0>;
0275                         };
0276 
0277                         vbus_otg: pwr_sw1 {
0278                                 regulator-name = "vbus_otg";
0279                                 interrupts = <IT_OCP_OTG 0>;
0280                          };
0281 
0282                          vbus_sw: pwr_sw2 {
0283                                 regulator-name = "vbus_sw";
0284                                 interrupts = <IT_OCP_SWOUT 0>;
0285                                 regulator-active-discharge = <1>;
0286                          };
0287                 };
0288 
0289                 onkey {
0290                         compatible = "st,stpmic1-onkey";
0291                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
0292                         interrupt-names = "onkey-falling", "onkey-rising";
0293                         power-off-time-sec = <10>;
0294                         status = "okay";
0295                 };
0296 
0297                 watchdog {
0298                         compatible = "st,stpmic1-wdt";
0299                         status = "disabled";
0300                 };
0301         };
0302 };
0303 
0304 &ipcc {
0305         status = "okay";
0306 };
0307 
0308 &iwdg2 {
0309         timeout-sec = <32>;
0310         status = "okay";
0311 };
0312 
0313 &m4_rproc {
0314         memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
0315                         <&vdev0vring1>, <&vdev0buffer>;
0316         mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
0317         mbox-names = "vq0", "vq1", "shutdown", "detach";
0318         interrupt-parent = <&exti>;
0319         interrupts = <68 1>;
0320         status = "okay";
0321 };
0322 
0323 &pwr_regulators {
0324         vdd-supply = <&vdd>;
0325         vdd_3v3_usbfs-supply = <&vdd_usb>;
0326 };
0327 
0328 &rng1 {
0329         status = "okay";
0330 };
0331 
0332 &rtc {
0333         status = "okay";
0334 };
0335 
0336 &sdmmc1 {
0337         pinctrl-names = "default", "opendrain", "sleep";
0338         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
0339         pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
0340         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
0341         cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
0342         disable-wp;
0343         st,sig-dir;
0344         st,neg-edge;
0345         st,use-ckin;
0346         bus-width = <4>;
0347         vmmc-supply = <&vdd_sd>;
0348         vqmmc-supply = <&sd_switch>;
0349         sd-uhs-sdr12;
0350         sd-uhs-sdr25;
0351         sd-uhs-sdr50;
0352         sd-uhs-ddr50;
0353         status = "okay";
0354 };
0355 
0356 &sdmmc2 {
0357         pinctrl-names = "default", "opendrain", "sleep";
0358         pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
0359         pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
0360         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
0361         non-removable;
0362         no-sd;
0363         no-sdio;
0364         st,neg-edge;
0365         bus-width = <8>;
0366         vmmc-supply = <&v3v3>;
0367         vqmmc-supply = <&vdd>;
0368         mmc-ddr-3_3v;
0369         status = "okay";
0370 };
0371 
0372 &timers6 {
0373         status = "okay";
0374         /* spare dmas for other usage */
0375         /delete-property/dmas;
0376         /delete-property/dma-names;
0377         timer@5 {
0378                 status = "okay";
0379         };
0380 };
0381 
0382 &uart4 {
0383         pinctrl-names = "default", "sleep", "idle";
0384         pinctrl-0 = <&uart4_pins_a>;
0385         pinctrl-1 = <&uart4_sleep_pins_a>;
0386         pinctrl-2 = <&uart4_idle_pins_a>;
0387         /delete-property/dmas;
0388         /delete-property/dma-names;
0389         status = "okay";
0390 };
0391 
0392 &usbotg_hs {
0393         vbus-supply = <&vbus_otg>;
0394 };
0395 
0396 &usbphyc_port0 {
0397         phy-supply = <&vdd_usb>;
0398 };
0399 
0400 &usbphyc_port1 {
0401         phy-supply = <&vdd_usb>;
0402 };