Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright (C) 2015-2017 I2SE GmbH <info@i2se.com>
0004  * Copyright (C) 2016 Michael Heimpold <mhei@heimpold.de>
0005  */
0006 
0007 /dts-v1/;
0008 #include <dt-bindings/interrupt-controller/irq.h>
0009 #include <dt-bindings/gpio/gpio.h>
0010 #include "imx28.dtsi"
0011 
0012 / {
0013         model = "I2SE Duckbill 2 485";
0014         compatible = "i2se,duckbill-2-485", "i2se,duckbill-2", "fsl,imx28";
0015 
0016         memory@40000000 {
0017                 device_type = "memory";
0018                 reg = <0x40000000 0x08000000>;
0019         };
0020 
0021         apb@80000000 {
0022                 apbh@80000000 {
0023                         ssp0: spi@80010000 {
0024                                 compatible = "fsl,imx28-mmc";
0025                                 pinctrl-names = "default";
0026                                 pinctrl-0 = <&mmc0_8bit_pins_a
0027                                         &mmc0_cd_cfg &mmc0_sck_cfg>;
0028                                 bus-width = <8>;
0029                                 vmmc-supply = <&reg_3p3v>;
0030                                 status = "okay";
0031                                 non-removable;
0032                         };
0033 
0034                         ssp2: spi@80014000 {
0035                                 compatible = "fsl,imx28-mmc";
0036                                 pinctrl-names = "default";
0037                                 pinctrl-0 = <&mmc2_4bit_pins_b
0038                                         &mmc2_cd_cfg &mmc2_sck_cfg_b>;
0039                                 bus-width = <4>;
0040                                 vmmc-supply = <&reg_3p3v>;
0041                                 status = "okay";
0042                         };
0043 
0044                         pinctrl@80018000 {
0045                                 pinctrl-names = "default";
0046                                 pinctrl-0 = <&hog_pins_a>;
0047 
0048                                 hog_pins_a: hog@0 {
0049                                         reg = <0>;
0050                                         fsl,pinmux-ids = <
0051                                                 MX28_PAD_LCD_D17__GPIO_1_17    /* Revision detection */
0052                                         >;
0053                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
0054                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
0055                                         fsl,pull-up = <MXS_PULL_DISABLE>;
0056                                 };
0057 
0058                                 mac0_phy_reset_pin: mac0-phy-reset@0 {
0059                                         reg = <0>;
0060                                         fsl,pinmux-ids = <
0061                                                 MX28_PAD_GPMI_ALE__GPIO_0_26    /* PHY Reset */
0062                                         >;
0063                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
0064                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
0065                                         fsl,pull-up = <MXS_PULL_DISABLE>;
0066                                 };
0067 
0068                                 mac0_phy_int_pin: mac0-phy-int@0 {
0069                                         reg = <0>;
0070                                         fsl,pinmux-ids = <
0071                                                 MX28_PAD_GPMI_D07__GPIO_0_7    /* PHY Interrupt */
0072                                         >;
0073                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
0074                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
0075                                         fsl,pull-up = <MXS_PULL_DISABLE>;
0076                                 };
0077 
0078                                 led_pins: leds@0 {
0079                                         reg = <0>;
0080                                         fsl,pinmux-ids = <
0081                                                 MX28_PAD_SAIF0_MCLK__GPIO_3_20
0082                                                 MX28_PAD_SAIF0_LRCLK__GPIO_3_21
0083                                                 MX28_PAD_I2C0_SCL__GPIO_3_24
0084                                                 MX28_PAD_I2C0_SDA__GPIO_3_25
0085                                         >;
0086                                         fsl,drive-strength = <MXS_DRIVE_4mA>;
0087                                         fsl,voltage = <MXS_VOLTAGE_HIGH>;
0088                                         fsl,pull-up = <MXS_PULL_DISABLE>;
0089                                 };
0090                         };
0091                 };
0092 
0093                 apbx@80040000 {
0094                         lradc@80050000 {
0095                                 status = "okay";
0096                         };
0097 
0098                         auart0: serial@8006a000 {
0099                                 pinctrl-names = "default";
0100                                 pinctrl-0 = <&auart0_2pins_a>;
0101                                 status = "okay";
0102                         };
0103 
0104                         duart: serial@80074000 {
0105                                 pinctrl-names = "default";
0106                                 pinctrl-0 = <&duart_pins_a>;
0107                                 status = "okay";
0108                         };
0109 
0110                         usbphy0: usbphy@8007c000 {
0111                                 status = "okay";
0112                         };
0113                 };
0114         };
0115 
0116         ahb@80080000 {
0117                 usb0: usb@80080000 {
0118                         status = "okay";
0119                         dr_mode = "peripheral";
0120                 };
0121 
0122                 mac0: ethernet@800f0000 {
0123                         phy-mode = "rmii";
0124                         pinctrl-names = "default";
0125                         pinctrl-0 = <&mac0_pins_a>, <&mac0_phy_reset_pin>;
0126                         phy-supply = <&reg_3p3v>;
0127                         phy-reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
0128                         phy-reset-duration = <25>;
0129                         phy-handle = <&ethphy>;
0130                         status = "okay";
0131 
0132                         mdio {
0133                                 #address-cells = <1>;
0134                                 #size-cells = <0>;
0135 
0136                                 ethphy: ethernet-phy@0 {
0137                                         compatible = "ethernet-phy-ieee802.3-c22";
0138                                         reg = <0>;
0139                                         pinctrl-names = "default";
0140                                         pinctrl-0 = <&mac0_phy_int_pin>;
0141                                         interrupt-parent = <&gpio0>;
0142                                         interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
0143                                         max-speed = <100>;
0144                                 };
0145                         };
0146                 };
0147         };
0148 
0149         reg_3p3v: regulator-3p3v {
0150                 compatible = "regulator-fixed";
0151                 regulator-name = "3P3V";
0152                 regulator-min-microvolt = <3300000>;
0153                 regulator-max-microvolt = <3300000>;
0154                 regulator-always-on;
0155         };
0156 
0157         leds {
0158                 compatible = "gpio-leds";
0159                 pinctrl-names = "default";
0160                 pinctrl-0 = <&led_pins>;
0161 
0162                 status-red {
0163                         label = "duckbill:red:status";
0164                         gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
0165                         linux,default-trigger = "default-on";
0166                 };
0167 
0168                 status-green {
0169                         label = "duckbill:green:status";
0170                         gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
0171                         linux,default-trigger = "heartbeat";
0172                 };
0173 
0174                 rs485-red {
0175                         label = "duckbill:red:rs485";
0176                         gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
0177                 };
0178 
0179                 rs485-green {
0180                         label = "duckbill:green:rs485";
0181                         gpios = <&gpio3 25 GPIO_ACTIVE_LOW>;
0182                 };
0183         };
0184 };