0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (C) 2020 Manivannan Sadhasivam
0004 */
0005
0006 /dts-v1/;
0007
0008 #include "stm32mp157.dtsi"
0009 #include "stm32mp15-pinctrl.dtsi"
0010 #include "stm32mp15xxac-pinctrl.dtsi"
0011 #include <dt-bindings/gpio/gpio.h>
0012 #include <dt-bindings/mfd/st,stpmic1.h>
0013
0014 / {
0015 aliases {
0016 mmc0 = &sdmmc1;
0017 serial0 = &uart4;
0018 serial1 = &uart7;
0019 serial2 = &usart2;
0020 spi0 = &spi4;
0021 };
0022
0023 chosen {
0024 stdout-path = "serial1:115200n8";
0025 };
0026
0027 memory@c0000000 {
0028 device_type = "memory";
0029 reg = <0xc0000000 0x10000000>;
0030 };
0031
0032 led {
0033 compatible = "gpio-leds";
0034
0035 led1 {
0036 label = "green:user1";
0037 gpios = <&gpioa 13 GPIO_ACTIVE_HIGH>;
0038 linux,default-trigger = "heartbeat";
0039 default-state = "off";
0040 };
0041
0042 led2 {
0043 label = "green:user2";
0044 gpios = <&gpioh 3 GPIO_ACTIVE_HIGH>;
0045 linux,default-trigger = "mmc0";
0046 default-state = "off";
0047 };
0048
0049 led3 {
0050 label = "green:user3";
0051 gpios = <&gpioh 2 GPIO_ACTIVE_HIGH>;
0052 linux,default-trigger = "mmc1";
0053 default-state = "off";
0054 };
0055
0056 led4 {
0057 label = "green:user4";
0058 gpios = <&gpiof 12 GPIO_ACTIVE_HIGH>;
0059 linux,default-trigger = "none";
0060 default-state = "off";
0061 panic-indicator;
0062 };
0063 };
0064
0065 sd_switch: regulator-sd_switch {
0066 compatible = "regulator-gpio";
0067 regulator-name = "sd_switch";
0068 regulator-min-microvolt = <1800000>;
0069 regulator-max-microvolt = <2900000>;
0070 regulator-type = "voltage";
0071 regulator-always-on;
0072
0073 gpios = <&gpioa 8 GPIO_ACTIVE_HIGH>;
0074 gpios-states = <0>;
0075 states = <1800000 0x1>,
0076 <2900000 0x0>;
0077 };
0078 };
0079
0080 /* Only headless mode is supported */
0081 &gpu {
0082 status = "disabled";
0083 };
0084
0085 /* LS-I2C0 */
0086 &i2c2 {
0087 pinctrl-names = "default";
0088 pinctrl-0 = <&i2c2_pins_a>;
0089 i2c-scl-rising-time-ns = <1000>;
0090 i2c-scl-falling-time-ns = <300>;
0091 status = "okay";
0092 /delete-property/dmas;
0093 /delete-property/dma-names;
0094 };
0095
0096 &i2c4 {
0097 pinctrl-names = "default";
0098 pinctrl-0 = <&i2c4_pins_a>;
0099 i2c-scl-rising-time-ns = <185>;
0100 i2c-scl-falling-time-ns = <20>;
0101 status = "okay";
0102 /delete-property/dmas;
0103 /delete-property/dma-names;
0104
0105 pmic: stpmic@33 {
0106 compatible = "st,stpmic1";
0107 reg = <0x33>;
0108 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
0109 interrupt-controller;
0110 #interrupt-cells = <2>;
0111 status = "okay";
0112
0113 regulators {
0114 compatible = "st,stpmic1-regulators";
0115
0116 ldo1-supply = <&v3v3>;
0117 ldo2-supply = <&v3v3>;
0118 ldo3-supply = <&vdd_ddr>;
0119 ldo5-supply = <&v3v3>;
0120 ldo6-supply = <&v3v3>;
0121 pwr_sw1-supply = <&bst_out>;
0122 pwr_sw2-supply = <&bst_out>;
0123
0124 vddcore: buck1 {
0125 regulator-name = "vddcore";
0126 regulator-min-microvolt = <1200000>;
0127 regulator-max-microvolt = <1350000>;
0128 regulator-always-on;
0129 regulator-initial-mode = <0>;
0130 regulator-over-current-protection;
0131 };
0132
0133 vdd_ddr: buck2 {
0134 regulator-name = "vdd_ddr";
0135 regulator-min-microvolt = <1500000>;
0136 regulator-max-microvolt = <1500000>;
0137 regulator-always-on;
0138 regulator-initial-mode = <0>;
0139 regulator-over-current-protection;
0140 };
0141
0142 vdd: buck3 {
0143 regulator-name = "vdd";
0144 regulator-min-microvolt = <1800000>;
0145 regulator-max-microvolt = <1800000>;
0146 regulator-always-on;
0147 st,mask-reset;
0148 regulator-initial-mode = <0>;
0149 regulator-over-current-protection;
0150 };
0151
0152 v3v3: buck4 {
0153 regulator-name = "v3v3";
0154 regulator-min-microvolt = <3300000>;
0155 regulator-max-microvolt = <3300000>;
0156 regulator-always-on;
0157 regulator-over-current-protection;
0158 regulator-initial-mode = <0>;
0159 };
0160
0161 vdda: ldo1 {
0162 regulator-name = "vdda";
0163 regulator-min-microvolt = <1800000>;
0164 regulator-max-microvolt = <1800000>;
0165 regulator-always-on;
0166 interrupts = <IT_CURLIM_LDO1 0>;
0167 };
0168
0169 v2v9: ldo2 {
0170 regulator-name = "v2v9";
0171 regulator-min-microvolt = <2900000>;
0172 regulator-max-microvolt = <2900000>;
0173 regulator-always-on;
0174 interrupts = <IT_CURLIM_LDO2 0>;
0175 };
0176
0177 vtt_ddr: ldo3 {
0178 regulator-name = "vtt_ddr";
0179 regulator-min-microvolt = <500000>;
0180 regulator-max-microvolt = <750000>;
0181 regulator-always-on;
0182 regulator-over-current-protection;
0183 };
0184
0185 vdd_usb: ldo4 {
0186 regulator-name = "vdd_usb";
0187 interrupts = <IT_CURLIM_LDO4 0>;
0188 };
0189
0190 vdd_sd: ldo5 {
0191 regulator-name = "vdd_sd";
0192 regulator-min-microvolt = <2900000>;
0193 regulator-max-microvolt = <2900000>;
0194 interrupts = <IT_CURLIM_LDO5 0>;
0195 regulator-boot-on;
0196 };
0197
0198 v1v8: ldo6 {
0199 regulator-name = "v1v8";
0200 regulator-min-microvolt = <1800000>;
0201 regulator-max-microvolt = <1800000>;
0202 regulator-always-on;
0203 interrupts = <IT_CURLIM_LDO6 0>;
0204 };
0205
0206 vref_ddr: vref_ddr {
0207 regulator-name = "vref_ddr";
0208 regulator-always-on;
0209 };
0210
0211 bst_out: boost {
0212 regulator-name = "bst_out";
0213 interrupts = <IT_OCP_BOOST 0>;
0214 };
0215
0216 vbus_otg: pwr_sw1 {
0217 regulator-name = "vbus_otg";
0218 interrupts = <IT_OCP_OTG 0>;
0219 regulator-active-discharge = <1>;
0220 };
0221
0222 vbus_sw: pwr_sw2 {
0223 regulator-name = "vbus_sw";
0224 interrupts = <IT_OCP_SWOUT 0>;
0225 regulator-active-discharge = <1>;
0226 };
0227 };
0228
0229 onkey {
0230 compatible = "st,stpmic1-onkey";
0231 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
0232 interrupt-names = "onkey-falling", "onkey-rising";
0233 status = "okay";
0234 };
0235
0236 watchdog {
0237 compatible = "st,stpmic1-wdt";
0238 status = "disabled";
0239 };
0240 };
0241 };
0242
0243 &iwdg2 {
0244 timeout-sec = <32>;
0245 status = "okay";
0246 };
0247
0248 &pwr_regulators {
0249 vdd-supply = <&vdd>;
0250 vdd_3v3_usbfs-supply = <&vdd_usb>;
0251 };
0252
0253 &rng1 {
0254 status = "okay";
0255 };
0256
0257 &rtc {
0258 status = "okay";
0259 };
0260
0261 &sdmmc1 {
0262 pinctrl-names = "default", "opendrain", "sleep";
0263 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
0264 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
0265 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
0266 broken-cd;
0267 disable-wp;
0268 st,sig-dir;
0269 st,neg-edge;
0270 st,use-ckin;
0271 bus-width = <4>;
0272 vmmc-supply = <&vdd_sd>;
0273 vqmmc-supply = <&sd_switch>;
0274 status = "okay";
0275 };
0276
0277 /* LS-SPI0 */
0278 &spi4 {
0279 pinctrl-names = "default";
0280 pinctrl-0 = <&spi4_pins_a>;
0281 cs-gpios = <&gpioe 11 GPIO_ACTIVE_HIGH>;
0282 status = "okay";
0283 };
0284
0285 /* BG96 */
0286 &usart2 {
0287 pinctrl-names = "default", "sleep";
0288 pinctrl-0 = <&usart2_pins_b>;
0289 pinctrl-1 = <&usart2_sleep_pins_b>;
0290 st,hw-flow-ctrl;
0291 /delete-property/dmas;
0292 /delete-property/dma-names;
0293 status = "okay";
0294 };
0295
0296 /* LS-UART0 */
0297 &uart4 {
0298 pinctrl-names = "default";
0299 pinctrl-0 = <&uart4_pins_c>;
0300 st,hw-flow-ctrl;
0301 /delete-property/dmas;
0302 /delete-property/dma-names;
0303 status = "okay";
0304 };
0305
0306 /* Debug console */
0307 &uart7 {
0308 pinctrl-names = "default";
0309 pinctrl-0 = <&uart7_pins_b>;
0310 /delete-property/dmas;
0311 /delete-property/dma-names;
0312 status = "okay";
0313 };
0314
0315 &usbh_ehci {
0316 phys = <&usbphyc_port0>;
0317 phy-names = "usb";
0318 status = "okay";
0319 };
0320
0321 &usbotg_hs {
0322 dr_mode = "peripheral";
0323 pinctrl-0 = <&usbotg_hs_pins_a>;
0324 pinctrl-names = "default";
0325 phy-names = "usb2-phy";
0326 phys = <&usbphyc_port1 0>;
0327 vbus-supply = <&vbus_otg>;
0328 status = "okay";
0329 };
0330
0331 &usbphyc {
0332 status = "okay";
0333 };
0334
0335 &usbphyc_port0 {
0336 phy-supply = <&vdd_usb>;
0337 };
0338
0339 &usbphyc_port1 {
0340 phy-supply = <&vdd_usb>;
0341 };