Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
0002 /*
0003  * Copyright (C) Linaro Ltd 2019 - All Rights Reserved
0004  * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
0005  * Copyright (C) 2020 Marek Vasut <marex@denx.de>
0006  */
0007 
0008 /* Avenger96 uses DHCOR SoM configured for 1V8 IO operation */
0009 #include "stm32mp15xx-dhcor-io1v8.dtsi"
0010 
0011 / {
0012         aliases {
0013                 ethernet0 = &ethernet0;
0014                 mmc0 = &sdmmc1;
0015                 serial0 = &uart4;
0016                 serial1 = &uart7;
0017                 serial2 = &usart2;
0018                 spi0 = &qspi;
0019         };
0020 
0021         /* XTal Q1 */
0022         cec_clock: clk-cec-fixed {
0023                 #clock-cells = <0>;
0024                 compatible = "fixed-clock";
0025                 clock-frequency = <24000000>;
0026         };
0027 
0028         chosen {
0029                 stdout-path = "serial0:115200n8";
0030         };
0031 
0032         hdmi-out {
0033                 compatible = "hdmi-connector";
0034                 type = "a";
0035 
0036                 port {
0037                         hdmi_con: endpoint {
0038                                 remote-endpoint = <&adv7513_out>;
0039                         };
0040                 };
0041         };
0042 
0043         led {
0044                 compatible = "gpio-leds";
0045                 led1 {
0046                         label = "green:user0";
0047                         gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
0048                         linux,default-trigger = "heartbeat";
0049                         default-state = "off";
0050                 };
0051 
0052                 led2 {
0053                         label = "green:user1";
0054                         gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
0055                         linux,default-trigger = "mmc0";
0056                         default-state = "off";
0057                 };
0058 
0059                 led3 {
0060                         label = "green:user2";
0061                         gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
0062                         linux,default-trigger = "mmc1";
0063                         default-state = "off";
0064                 };
0065 
0066                 led4 {
0067                         label = "green:user3";
0068                         gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
0069                         linux,default-trigger = "none";
0070                         default-state = "off";
0071                         panic-indicator;
0072                 };
0073         };
0074 
0075         sd_switch: regulator-sd_switch {
0076                 compatible = "regulator-gpio";
0077                 regulator-name = "sd_switch";
0078                 regulator-min-microvolt = <1800000>;
0079                 regulator-max-microvolt = <2900000>;
0080                 regulator-type = "voltage";
0081                 regulator-always-on;
0082 
0083                 gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
0084                 gpios-states = <0>;
0085                 states = <1800000 0x1>,
0086                          <2900000 0x0>;
0087         };
0088 
0089         sound {
0090                 compatible = "audio-graph-card";
0091                 label = "STM32MP1-AV96-HDMI";
0092                 dais = <&sai2a_port>;
0093                 status = "okay";
0094         };
0095 
0096         wlan_pwr: regulator-wlan {
0097                 compatible = "regulator-fixed";
0098 
0099                 regulator-name = "wl-reg";
0100                 regulator-min-microvolt = <3300000>;
0101                 regulator-max-microvolt = <3300000>;
0102 
0103                 gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
0104                 enable-active-high;
0105         };
0106 };
0107 
0108 &adc {
0109         pinctrl-names = "default";
0110         pinctrl-0 = <&adc12_ain_pins_b>;
0111         vdd-supply = <&vdd>;
0112         vdda-supply = <&vdda>;
0113         vref-supply = <&vdda>;
0114         status = "okay";
0115 
0116         adc1: adc@0 {
0117                 st,adc-channels = <0 1 6>;
0118                 st,min-sample-time-nsecs = <5000>;
0119                 status = "okay";
0120         };
0121 
0122         adc2: adc@100 {
0123                 st,adc-channels = <0 1 2>;
0124                 st,min-sample-time-nsecs = <5000>;
0125                 status = "okay";
0126         };
0127 };
0128 
0129 &dcmi {
0130         pinctrl-names = "default", "sleep";
0131         pinctrl-0 = <&dcmi_pins_c>;
0132         pinctrl-1 = <&dcmi_sleep_pins_c>;
0133         status = "disabled";
0134 
0135         port {
0136                 dcmi_0: endpoint {
0137                         remote-endpoint = <&stmipi_2>;
0138                         bus-type = <5>;
0139                         bus-width = <8>;
0140                         pclk-sample = <0>;
0141                 };
0142         };
0143 };
0144 
0145 &ethernet0 {
0146         status = "okay";
0147         pinctrl-0 = <&ethernet0_rgmii_pins_c>;
0148         pinctrl-1 = <&ethernet0_rgmii_sleep_pins_c>;
0149         pinctrl-names = "default", "sleep";
0150         phy-mode = "rgmii";
0151         max-speed = <1000>;
0152         phy-handle = <&phy0>;
0153 
0154         mdio0 {
0155                 #address-cells = <1>;
0156                 #size-cells = <0>;
0157                 compatible = "snps,dwmac-mdio";
0158                 reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
0159                 reset-delay-us = <1000>;
0160                 reset-post-delay-us = <1000>;
0161 
0162                 phy0: ethernet-phy@7 {
0163                         reg = <7>;
0164 
0165                         rxc-skew-ps = <1500>;
0166                         rxdv-skew-ps = <540>;
0167                         rxd0-skew-ps = <420>;
0168                         rxd1-skew-ps = <420>;
0169                         rxd2-skew-ps = <420>;
0170                         rxd3-skew-ps = <420>;
0171 
0172                         txc-skew-ps = <1440>;
0173                         txen-skew-ps = <540>;
0174                         txd0-skew-ps = <420>;
0175                         txd1-skew-ps = <420>;
0176                         txd2-skew-ps = <420>;
0177                         txd3-skew-ps = <420>;
0178                 };
0179         };
0180 };
0181 
0182 &gpioa {
0183         gpio-line-names = "", "", "", "",
0184                           "", "", "", "",
0185                           "", "", "", "AV96-K",
0186                           "AV96-I", "", "AV96-A", "";
0187 };
0188 
0189 &gpiob {
0190         gpio-line-names = "", "", "", "",
0191                           "", "AV96-J", "", "",
0192                           "", "", "", "AV96-B",
0193                           "", "AV96-L", "", "";
0194 };
0195 
0196 &gpioc {
0197         gpio-line-names = "", "", "", "AV96-C",
0198                           "", "", "", "",
0199                           "", "", "", "",
0200                           "", "", "", "";
0201 };
0202 
0203 &gpiod {
0204         gpio-line-names = "", "", "", "",
0205                           "", "", "", "",
0206                           "AV96-D", "", "", "",
0207                           "", "", "AV96-E", "AV96-F";
0208 };
0209 
0210 &gpiof {
0211         gpio-line-names = "", "", "", "",
0212                           "", "", "", "",
0213                           "", "", "", "",
0214                           "AV96-G", "AV96-H", "", "";
0215 };
0216 
0217 &i2c1 { /* X6 I2C1 */
0218         pinctrl-names = "default";
0219         pinctrl-0 = <&i2c1_pins_b>;
0220         i2c-scl-rising-time-ns = <185>;
0221         i2c-scl-falling-time-ns = <20>;
0222         status = "okay";
0223         /delete-property/dmas;
0224         /delete-property/dma-names;
0225 };
0226 
0227 &i2c2 { /* X6 I2C2 */
0228         pinctrl-names = "default";
0229         pinctrl-0 = <&i2c2_pins_c>;
0230         i2c-scl-rising-time-ns = <185>;
0231         i2c-scl-falling-time-ns = <20>;
0232         status = "okay";
0233         /delete-property/dmas;
0234         /delete-property/dma-names;
0235 };
0236 
0237 &i2c4 {
0238         stmipi: stmipi@14 {
0239                 compatible = "st,st-mipid02";
0240                 pinctrl-names = "default", "sleep";
0241                 pinctrl-0 = <&mco1_pins_a>;
0242                 pinctrl-1 = <&mco1_sleep_pins_a>;
0243                 reg = <0x14>;
0244                 clocks = <&rcc CK_MCO1>;
0245                 clock-names = "xclk";
0246                 assigned-clocks = <&rcc CK_MCO1>;
0247                 assigned-clock-parents = <&rcc CK_HSE>;
0248                 assigned-clock-rates = <24000000>;
0249                 VDDE-supply = <&v1v8>;
0250                 VDDIN-supply = <&v1v8>;
0251                 reset-gpios = <&gpioz 0 GPIO_ACTIVE_LOW>;
0252                 status = "disabled";
0253 
0254                 ports {
0255                         #address-cells = <1>;
0256                         #size-cells = <0>;
0257 
0258                         port@0 {
0259                                 reg = <0>;
0260                                 stmipi_0: endpoint {
0261                                 };
0262                         };
0263 
0264                         port@2 {
0265                                 reg = <2>;
0266                                 stmipi_2: endpoint {
0267                                         bus-width = <8>;
0268                                         hsync-active = <0>;
0269                                         vsync-active = <0>;
0270                                         pclk-sample = <0>;
0271                                         remote-endpoint = <&dcmi_0>;
0272                                 };
0273                         };
0274                 };
0275         };
0276 
0277         hdmi-transmitter@3d {
0278                 compatible = "adi,adv7513";
0279                 reg = <0x3d>, <0x4d>, <0x2d>, <0x5d>;
0280                 reg-names = "main", "edid", "cec", "packet";
0281                 clocks = <&cec_clock>;
0282                 clock-names = "cec";
0283 
0284                 avdd-supply = <&v3v3>;
0285                 dvdd-supply = <&v3v3>;
0286                 pvdd-supply = <&v3v3>;
0287                 dvdd-3v-supply = <&v3v3>;
0288                 bgvdd-supply = <&v3v3>;
0289 
0290                 interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
0291                 interrupt-parent = <&gpiog>;
0292 
0293                 status = "okay";
0294 
0295                 adi,input-depth = <8>;
0296                 adi,input-colorspace = "rgb";
0297                 adi,input-clock = "1x";
0298 
0299                 ports {
0300                         #address-cells = <1>;
0301                         #size-cells = <0>;
0302 
0303                         port@0 {
0304                                 reg = <0>;
0305                                 adv7513_in: endpoint {
0306                                         remote-endpoint = <&ltdc_ep0_out>;
0307                                 };
0308                         };
0309 
0310                         port@1 {
0311                                 reg = <1>;
0312                                 adv7513_out: endpoint {
0313                                         remote-endpoint = <&hdmi_con>;
0314                                 };
0315                         };
0316 
0317                         port@2 {
0318                                 reg = <2>;
0319                                 adv7513_i2s0: endpoint {
0320                                         remote-endpoint = <&sai2a_endpoint>;
0321                                 };
0322                         };
0323                 };
0324         };
0325 };
0326 
0327 &ltdc {
0328         pinctrl-names = "default", "sleep";
0329         pinctrl-0 = <&ltdc_pins_d>;
0330         pinctrl-1 = <&ltdc_sleep_pins_d>;
0331         status = "okay";
0332 
0333         port {
0334                 #address-cells = <1>;
0335                 #size-cells = <0>;
0336 
0337                 ltdc_ep0_out: endpoint@0 {
0338                         reg = <0>;
0339                         remote-endpoint = <&adv7513_in>;
0340                 };
0341         };
0342 };
0343 
0344 &sai2 {
0345         clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
0346         pinctrl-names = "default", "sleep";
0347         pinctrl-0 = <&sai2a_pins_c>;
0348         pinctrl-1 = <&sai2a_sleep_pins_c>;
0349         clock-names = "pclk", "x8k", "x11k";
0350         status = "okay";
0351 
0352         sai2a: audio-controller@4400b004 {
0353                 #clock-cells = <0>;
0354                 dma-names = "tx";
0355                 clocks = <&rcc SAI2_K>;
0356                 clock-names = "sai_ck";
0357                 status = "okay";
0358 
0359                 sai2a_port: port {
0360                         sai2a_endpoint: endpoint {
0361                                 remote-endpoint = <&adv7513_i2s0>;
0362                                 format = "i2s";
0363                                 mclk-fs = <256>;
0364                         };
0365                 };
0366         };
0367 };
0368 
0369 &sdmmc1 {
0370         pinctrl-names = "default", "opendrain", "sleep";
0371         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
0372         pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
0373         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
0374         cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
0375         disable-wp;
0376         st,sig-dir;
0377         st,neg-edge;
0378         st,use-ckin;
0379         bus-width = <4>;
0380         vmmc-supply = <&vdd_sd>;
0381         vqmmc-supply = <&sd_switch>;
0382         status = "okay";
0383 };
0384 
0385 &sdmmc2 {
0386         pinctrl-names = "default", "opendrain", "sleep";
0387         pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_c>;
0388         pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_c>;
0389         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_c>;
0390         bus-width = <8>;
0391         mmc-ddr-1_8v;
0392         no-sd;
0393         no-sdio;
0394         non-removable;
0395         st,neg-edge;
0396         vmmc-supply = <&v3v3>;
0397         vqmmc-supply = <&vdd_io>;
0398         status = "okay";
0399 };
0400 
0401 &sdmmc3 {
0402         pinctrl-names = "default", "opendrain", "sleep";
0403         pinctrl-0 = <&sdmmc3_b4_pins_b>;
0404         pinctrl-1 = <&sdmmc3_b4_od_pins_b>;
0405         pinctrl-2 = <&sdmmc3_b4_sleep_pins_b>;
0406         broken-cd;
0407         non-removable;
0408         st,neg-edge;
0409         bus-width = <4>;
0410         vmmc-supply = <&wlan_pwr>;
0411         status = "okay";
0412 
0413         #address-cells = <1>;
0414         #size-cells = <0>;
0415         brcmf: bcrmf@1 {
0416                 reg = <1>;
0417                 compatible = "brcm,bcm4329-fmac";
0418         };
0419 };
0420 
0421 &spi2 {
0422         pinctrl-names = "default";
0423         pinctrl-0 = <&spi2_pins_a>;
0424         cs-gpios = <&gpioi 0 0>;
0425         status = "disabled";
0426         /delete-property/dmas;
0427         /delete-property/dma-names;
0428 };
0429 
0430 &uart4 {
0431         /* On Low speed expansion header */
0432         label = "LS-UART1";
0433         pinctrl-names = "default";
0434         pinctrl-0 = <&uart4_pins_b>;
0435         /delete-property/dmas;
0436         /delete-property/dma-names;
0437         status = "okay";
0438 };
0439 
0440 &uart7 {
0441         /* On Low speed expansion header */
0442         label = "LS-UART0";
0443         pinctrl-names = "default";
0444         pinctrl-0 = <&uart7_pins_a>;
0445         uart-has-rtscts;
0446         /delete-property/dmas;
0447         /delete-property/dma-names;
0448         status = "okay";
0449 };
0450 
0451 /* Bluetooth */
0452 &usart2 {
0453         pinctrl-names = "default", "sleep";
0454         pinctrl-0 = <&usart2_pins_a>;
0455         pinctrl-1 = <&usart2_sleep_pins_a>;
0456         st,hw-flow-ctrl;
0457         /delete-property/dmas;
0458         /delete-property/dma-names;
0459         status = "okay";
0460 
0461         bluetooth {
0462                 compatible = "brcm,bcm43438-bt";
0463                 max-speed = <3000000>;
0464                 shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
0465         };
0466 };
0467 
0468 &usbh_ehci {
0469         phys = <&usbphyc_port0>;
0470         phy-names = "usb";
0471         status = "okay";
0472 };
0473 
0474 &usbotg_hs {
0475         pinctrl-0 = <&usbotg_hs_pins_a>;
0476         pinctrl-names = "default";
0477         phy-names = "usb2-phy";
0478         phys = <&usbphyc_port1 0>;
0479         status = "okay";
0480         vbus-supply = <&vbus_otg>;
0481 };
0482 
0483 &usbphyc {
0484         status = "okay";
0485 };
0486 
0487 &usbphyc_port0 {
0488         phy-supply = <&vdd_usb>;
0489 };
0490 
0491 &usbphyc_port1 {
0492         phy-supply = <&vdd_usb>;
0493 };