Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
0002 /*
0003  * Copyright (C) 2022 Marek Vasut <marex@denx.de>
0004  */
0005 
0006 / {
0007         aliases {
0008                 ethernet0 = &ethernet0;
0009                 ethernet1 = &ksz8851;
0010                 mmc0 = &sdmmc1;
0011                 rtc0 = &hwrtc;
0012                 rtc1 = &rtc;
0013                 serial0 = &uart4;
0014                 serial1 = &uart8;
0015                 serial2 = &usart3;
0016                 serial3 = &uart5;
0017                 spi0 = &qspi;
0018         };
0019 
0020         chosen {
0021                 stdout-path = "serial0:115200n8";
0022         };
0023 
0024         led {
0025                 compatible = "gpio-leds";
0026                 led1 {
0027                         label = "yellow:user0";
0028                         gpios = <&gpioz 6 GPIO_ACTIVE_LOW>;
0029                         default-state = "off";
0030                 };
0031 
0032                 led2 {
0033                         label = "red:user1";
0034                         gpios = <&gpioz 3 GPIO_ACTIVE_LOW>;
0035                         default-state = "off";
0036                 };
0037         };
0038 
0039         ethernet_vio: vioregulator {
0040                 compatible = "regulator-fixed";
0041                 regulator-name = "vio";
0042                 regulator-min-microvolt = <3300000>;
0043                 regulator-max-microvolt = <3300000>;
0044                 gpio = <&gpioh 2 GPIO_ACTIVE_LOW>;
0045                 regulator-always-on;
0046                 regulator-boot-on;
0047                 vin-supply = <&vdd>;
0048         };
0049 };
0050 
0051 &adc {  /* X11 ADC inputs */
0052         pinctrl-names = "default";
0053         pinctrl-0 = <&adc12_ain_pins_b>;
0054         vdd-supply = <&vdd>;
0055         vdda-supply = <&vdda>;
0056         vref-supply = <&vdda>;
0057         status = "okay";
0058 
0059         adc1: adc@0 {
0060                 st,adc-channels = <0 1 6>;
0061                 st,min-sample-time-nsecs = <5000>;
0062                 status = "okay";
0063         };
0064 
0065         adc2: adc@100 {
0066                 st,adc-channels = <0 1 2>;
0067                 st,min-sample-time-nsecs = <5000>;
0068                 status = "okay";
0069         };
0070 };
0071 
0072 &ethernet0 {
0073         status = "okay";
0074         pinctrl-0 = <&ethernet0_rgmii_pins_c>;
0075         pinctrl-1 = <&ethernet0_rgmii_sleep_pins_c>;
0076         pinctrl-names = "default", "sleep";
0077         phy-mode = "rgmii";
0078         max-speed = <1000>;
0079         phy-handle = <&phy0>;
0080 
0081         mdio0 {
0082                 #address-cells = <1>;
0083                 #size-cells = <0>;
0084                 compatible = "snps,dwmac-mdio";
0085                 reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
0086                 reset-delay-us = <1000>;
0087                 reset-post-delay-us = <1000>;
0088 
0089                 phy0: ethernet-phy@7 {
0090                         reg = <7>;
0091 
0092                         rxc-skew-ps = <1500>;
0093                         rxdv-skew-ps = <540>;
0094                         rxd0-skew-ps = <420>;
0095                         rxd1-skew-ps = <420>;
0096                         rxd2-skew-ps = <420>;
0097                         rxd3-skew-ps = <420>;
0098 
0099                         txc-skew-ps = <1440>;
0100                         txen-skew-ps = <540>;
0101                         txd0-skew-ps = <420>;
0102                         txd1-skew-ps = <420>;
0103                         txd2-skew-ps = <420>;
0104                         txd3-skew-ps = <420>;
0105                 };
0106         };
0107 };
0108 
0109 &fmc {
0110         pinctrl-names = "default", "sleep";
0111         pinctrl-0 = <&fmc_pins_b>;
0112         pinctrl-1 = <&fmc_sleep_pins_b>;
0113         status = "okay";
0114 
0115         ksz8851: ethernet@1,0 {
0116                 compatible = "micrel,ks8851-mll";
0117                 reg = <1 0x0 0x2>, <1 0x2 0x20000>;
0118                 interrupt-parent = <&gpioc>;
0119                 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
0120                 bank-width = <2>;
0121 
0122                 /* Timing values are in nS */
0123                 st,fmc2-ebi-cs-mux-enable;
0124                 st,fmc2-ebi-cs-transaction-type = <4>;
0125                 st,fmc2-ebi-cs-buswidth = <16>;
0126                 st,fmc2-ebi-cs-address-setup-ns = <5>;
0127                 st,fmc2-ebi-cs-address-hold-ns = <5>;
0128                 st,fmc2-ebi-cs-bus-turnaround-ns = <5>;
0129                 st,fmc2-ebi-cs-data-setup-ns = <45>;
0130                 st,fmc2-ebi-cs-data-hold-ns = <1>;
0131                 st,fmc2-ebi-cs-write-address-setup-ns = <5>;
0132                 st,fmc2-ebi-cs-write-address-hold-ns = <5>;
0133                 st,fmc2-ebi-cs-write-bus-turnaround-ns = <5>;
0134                 st,fmc2-ebi-cs-write-data-setup-ns = <45>;
0135                 st,fmc2-ebi-cs-write-data-hold-ns = <1>;
0136         };
0137 };
0138 
0139 &gpioa {
0140         gpio-line-names = "", "", "", "",
0141                           "DRCC-VAR2", "", "", "",
0142                           "", "", "", "",
0143                           "", "", "", "";
0144 };
0145 
0146 &gpioe {
0147         gpio-line-names = "", "", "", "",
0148                           "", "DRCC-GPIO0", "", "",
0149                           "", "", "", "",
0150                           "", "", "", "";
0151 };
0152 
0153 &gpiog {
0154         gpio-line-names = "", "", "", "",
0155                           "", "", "", "",
0156                           "", "", "", "",
0157                           "DRCC-GPIO5", "", "", "";
0158 };
0159 
0160 &gpioh {
0161         gpio-line-names = "", "", "", "DRCC-HW2",
0162                           "DRCC-GPIO4", "", "", "",
0163                           "DRCC-HW1", "DRCC-HW0", "", "DRCC-VAR1",
0164                           "DRCC-VAR0", "", "", "DRCC-GPIO6";
0165 };
0166 
0167 &gpioi {
0168         gpio-line-names = "", "", "", "",
0169                           "", "", "", "DRCC-GPIO2",
0170                           "", "DRCC-GPIO1", "", "",
0171                           "", "", "", "";
0172 };
0173 
0174 &i2c1 { /* X11 I2C1 */
0175         pinctrl-names = "default";
0176         pinctrl-0 = <&i2c1_pins_b>;
0177         i2c-scl-rising-time-ns = <185>;
0178         i2c-scl-falling-time-ns = <20>;
0179         status = "okay";
0180         /delete-property/dmas;
0181         /delete-property/dma-names;
0182 };
0183 
0184 &i2c4 {
0185         hwrtc: rtc@32 {
0186                 compatible = "microcrystal,rv8803";
0187                 reg = <0x32>;
0188         };
0189 
0190         eeprom@50 {
0191                 compatible = "atmel,24c04";
0192                 reg = <0x50>;
0193                 pagesize = <16>;
0194         };
0195 };
0196 
0197 &sdmmc1 {       /* MicroSD */
0198         pinctrl-names = "default", "opendrain", "sleep";
0199         pinctrl-0 = <&sdmmc1_b4_pins_a>;
0200         pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
0201         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
0202         cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
0203         disable-wp;
0204         st,neg-edge;
0205         bus-width = <4>;
0206         vmmc-supply = <&vdd>;
0207         vqmmc-supply = <&vdd>;
0208         status = "okay";
0209 };
0210 
0211 &sdmmc2 {       /* eMMC */
0212         pinctrl-names = "default", "opendrain", "sleep";
0213         pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_c>;
0214         pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_c>;
0215         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_c>;
0216         bus-width = <8>;
0217         no-sd;
0218         no-sdio;
0219         non-removable;
0220         st,neg-edge;
0221         vmmc-supply = <&v3v3>;
0222         vqmmc-supply = <&vdd>;
0223         status = "okay";
0224 };
0225 
0226 &sdmmc3 {       /* SDIO Wi-Fi */
0227         pinctrl-names = "default", "opendrain", "sleep";
0228         pinctrl-0 = <&sdmmc3_b4_pins_a>;
0229         pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
0230         pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
0231         broken-cd;
0232         bus-width = <4>;
0233         mmc-ddr-3_3v;
0234         st,neg-edge;
0235         vmmc-supply = <&v3v3>;
0236         vqmmc-supply = <&v3v3>;
0237         status = "okay";
0238 };
0239 
0240 &spi2 { /* X11 SPI */
0241         pinctrl-names = "default";
0242         pinctrl-0 = <&spi2_pins_b>;
0243         cs-gpios = <&gpioi 0 0>;
0244         status = "disabled";
0245         /delete-property/dmas;
0246         /delete-property/dma-names;
0247 };
0248 
0249 &uart4 {
0250         label = "UART0";
0251         pinctrl-names = "default";
0252         pinctrl-0 = <&uart4_pins_d>;
0253         /delete-property/dmas;
0254         /delete-property/dma-names;
0255         status = "okay";
0256 };
0257 
0258 &uart5 {        /* X11 UART */
0259         label = "X11-UART5";
0260         pinctrl-names = "default";
0261         pinctrl-0 = <&uart5_pins_a>;
0262         /delete-property/dmas;
0263         /delete-property/dma-names;
0264         status = "okay";
0265 };
0266 
0267 &uart8 {
0268         label = "RS485-1";
0269         pinctrl-names = "default";
0270         pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>;
0271         uart-has-rtscts;
0272         /delete-property/dmas;
0273         /delete-property/dma-names;
0274         status = "okay";
0275 };
0276 
0277 &usart3 {       /* RS485 or RS232 */
0278         label = "RS485-2";
0279         pinctrl-names = "default", "sleep";
0280         pinctrl-0 = <&usart3_pins_e>;
0281         pinctrl-1 = <&usart3_sleep_pins_e>;
0282         uart-has-rtscts;
0283         /delete-property/dmas;
0284         /delete-property/dma-names;
0285         status = "okay";
0286 };
0287 
0288 &usbh_ehci {
0289         phys = <&usbphyc_port0>;
0290         status = "okay";
0291 };
0292 
0293 &usbh_ohci {
0294         phys = <&usbphyc_port0>;
0295         status = "okay";
0296 };
0297 
0298 &usbotg_hs {
0299         dr_mode = "otg";
0300         pinctrl-0 = <&usbotg_hs_pins_a>;
0301         pinctrl-names = "default";
0302         phy-names = "usb2-phy";
0303         phys = <&usbphyc_port1 0>;
0304         vbus-supply = <&vbus_otg>;
0305         status = "okay";
0306 };
0307 
0308 &usbphyc {
0309         status = "okay";
0310 };
0311 
0312 &usbphyc_port0 {
0313         phy-supply = <&vdd_usb>;
0314         connector {
0315                 compatible = "usb-a-connector";
0316                 vbus-supply = <&vbus_sw>;
0317         };
0318 };
0319 
0320 &usbphyc_port1 {
0321         phy-supply = <&vdd_usb>;
0322 };