Heiko Schocher | 74758a9 | 2019-12-01 11:23:32 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0) |
| 2 | /* |
| 3 | * support for the imx6 based aristainetos2c board |
| 4 | * |
| 5 | * Copyright (C) 2019 Heiko Schocher <hs@denx.de> |
| 6 | * Copyright (C) 2015 Heiko Schocher <hs@denx.de> |
| 7 | * |
| 8 | */ |
| 9 | #include <dt-bindings/gpio/gpio.h> |
| 10 | #include <dt-bindings/clock/imx6qdl-clock.h> |
| 11 | |
| 12 | #include "imx6qdl-aristainetos2-common.dtsi" |
| 13 | |
| 14 | / { |
| 15 | leds { |
| 16 | compatible = "gpio-leds"; |
| 17 | pinctrl-names = "default"; |
| 18 | pinctrl-0 = <&pinctrl_gpio>; |
| 19 | |
| 20 | LED_blue { |
| 21 | label = "led_blue"; |
| 22 | gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>; |
| 23 | }; |
| 24 | |
| 25 | LED_green { |
| 26 | label = "led_green"; |
| 27 | gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>; |
| 28 | }; |
| 29 | |
| 30 | LED_red { |
| 31 | label = "led_red"; |
| 32 | gpios = <&gpio5 0 GPIO_ACTIVE_HIGH>; |
| 33 | }; |
| 34 | |
| 35 | LED_yellow { |
| 36 | label = "led_yellow"; |
| 37 | gpios = <&gpio6 16 GPIO_ACTIVE_HIGH>; |
| 38 | }; |
| 39 | |
| 40 | LED_ena { |
| 41 | label = "led_ena"; |
| 42 | gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; |
| 43 | }; |
| 44 | }; |
| 45 | }; |
| 46 | |
| 47 | &ecspi1 { |
| 48 | fsl,spi-num-chipselects = <3>; |
| 49 | cs-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH |
| 50 | &gpio4 10 GPIO_ACTIVE_HIGH |
| 51 | &gpio4 11 GPIO_ACTIVE_HIGH>; |
| 52 | pinctrl-names = "default"; |
| 53 | pinctrl-0 = <&pinctrl_ecspi1>; |
| 54 | status = "okay"; |
| 55 | pinctrl-assert-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>; |
| 56 | pinctrl-assert-gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>; |
| 57 | |
| 58 | flash: m25p80@0 { |
| 59 | #address-cells = <1>; |
| 60 | #size-cells = <1>; |
| 61 | compatible = "micron,n25q128a11", "jedec,spi-nor"; |
| 62 | spi-max-frequency = <20000000>; |
| 63 | reg = <0>; |
| 64 | }; |
| 65 | }; |
| 66 | |
| 67 | &ecspi4 { |
| 68 | fsl,spi-num-chipselects = <2>; |
| 69 | cs-gpios = <&gpio3 29 GPIO_ACTIVE_HIGH &gpio5 2 GPIO_ACTIVE_HIGH>; |
| 70 | pinctrl-names = "default"; |
| 71 | pinctrl-0 = <&pinctrl_ecspi4>; |
| 72 | status = "okay"; |
| 73 | }; |
| 74 | |
| 75 | &i2c1 { |
| 76 | tpm@20 { |
| 77 | compatible = "infineon,slb9645tt"; |
| 78 | reg = <0x20>; |
| 79 | }; |
| 80 | }; |
| 81 | |
| 82 | &can1 { |
| 83 | pinctrl-names = "default"; |
| 84 | pinctrl-0 = <&pinctrl_flexcan1>; |
| 85 | status = "okay"; |
| 86 | }; |
| 87 | |
| 88 | &can2 { |
| 89 | pinctrl-names = "default"; |
| 90 | pinctrl-0 = <&pinctrl_flexcan2>; |
| 91 | status = "okay"; |
| 92 | }; |
| 93 | |
| 94 | &usdhc1 { |
| 95 | pinctrl-names = "default"; |
| 96 | pinctrl-0 = <&pinctrl_usdhc1>; |
| 97 | cd-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; |
| 98 | wp-gpios = <&gpio4 20 GPIO_ACTIVE_HIGH>; |
| 99 | no-1-8-v; |
| 100 | status = "okay"; |
| 101 | }; |
| 102 | |
| 103 | &usdhc2 { |
| 104 | pinctrl-names = "default"; |
| 105 | pinctrl-0 = <&pinctrl_usdhc2>; |
| 106 | bus-width = <8>; |
| 107 | no-1-8-v; |
| 108 | non-removable; |
| 109 | status = "okay"; |
| 110 | }; |
| 111 | |
| 112 | &iomuxc { |
| 113 | pinctrl_ecspi1: ecspi1grp { |
| 114 | fsl,pins = < |
| 115 | MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1 |
| 116 | MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1 |
| 117 | MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1 |
| 118 | /* SS0# */ |
| 119 | MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1 |
| 120 | /* SS1# */ |
| 121 | MX6QDL_PAD_KEY_COL2__GPIO4_IO10 0x100b1 |
| 122 | /* SS2# */ |
| 123 | MX6QDL_PAD_KEY_ROW2__GPIO4_IO11 0x100b1 |
| 124 | /* WP pin NOR Flash */ |
| 125 | MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x4001b0b0 |
| 126 | /* Flash nReset */ |
| 127 | MX6QDL_PAD_EIM_EB0__GPIO2_IO28 0x4001b0b0 |
| 128 | >; |
| 129 | }; |
| 130 | |
| 131 | pinctrl_ecspi4: ecspi4grp { |
| 132 | fsl,pins = < |
| 133 | MX6QDL_PAD_EIM_D21__ECSPI4_SCLK 0x100b1 |
| 134 | MX6QDL_PAD_EIM_D22__ECSPI4_MISO 0x100b1 |
| 135 | MX6QDL_PAD_EIM_D28__ECSPI4_MOSI 0x100b1 |
| 136 | MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x100b1 /* SS0# */ |
| 137 | MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x100b1 /* SS1# */ |
| 138 | >; |
| 139 | }; |
| 140 | |
| 141 | pinctrl_gpio: gpiogrp { |
| 142 | fsl,pins = < |
| 143 | /* led enable */ |
| 144 | MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x4001b0b0 |
| 145 | /* LCD power enable */ |
| 146 | MX6QDL_PAD_NANDF_CS2__GPIO6_IO15 0x4001b0b0 |
| 147 | /* led yellow */ |
| 148 | MX6QDL_PAD_NANDF_CS3__GPIO6_IO16 0x4001b0b0 |
| 149 | /* led red */ |
| 150 | MX6QDL_PAD_EIM_WAIT__GPIO5_IO00 0x4001b0b0 |
| 151 | /* led green */ |
| 152 | MX6QDL_PAD_EIM_A24__GPIO5_IO04 0x4001b0b0 |
| 153 | /* led blue */ |
| 154 | MX6QDL_PAD_EIM_EB1__GPIO2_IO29 0x4001b0b0 |
| 155 | /* Profibus IRQ */ |
| 156 | MX6QDL_PAD_SD3_DAT5__GPIO7_IO00 0x1b0b0 |
| 157 | /* FPGA IRQ currently unused*/ |
| 158 | MX6QDL_PAD_SD3_DAT6__GPIO6_IO18 0x1b0b0 |
| 159 | /* Display reset because of clock failure */ |
| 160 | MX6QDL_PAD_SD4_DAT3__GPIO2_IO11 0x4001b0b0 |
| 161 | /* spi bus #2 SS driver enable */ |
| 162 | MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x4001b0b0 |
| 163 | /* RST_LOC# PHY reset input (has pull-down!)*/ |
| 164 | MX6QDL_PAD_GPIO_18__GPIO7_IO13 0x4001b0b0 |
| 165 | /* Touchscreen IRQ */ |
| 166 | MX6QDL_PAD_SD4_DAT1__GPIO2_IO09 0x1b0b0 |
| 167 | /* PCIe reset */ |
| 168 | MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x4001b0b0 |
| 169 | /* make sure pin is GPIO and not ENET_REF_CLK */ |
| 170 | MX6QDL_PAD_GPIO_16__GPIO7_IO11 0x4001a0b0 |
| 171 | /* TPM PP */ |
| 172 | MX6QDL_PAD_EIM_A21__GPIO2_IO17 0x4001b0b0 |
| 173 | /* TPM Reset */ |
| 174 | MX6QDL_PAD_EIM_A20__GPIO2_IO18 0x4001b0b0 |
| 175 | >; |
| 176 | }; |
| 177 | |
| 178 | pinctrl_flexcan1: flexcan1grp { |
| 179 | fsl,pins = < |
| 180 | MX6QDL_PAD_SD3_CLK__FLEXCAN1_RX 0x1b0b0 |
| 181 | MX6QDL_PAD_SD3_CMD__FLEXCAN1_TX 0x1b0b0 |
| 182 | >; |
| 183 | }; |
| 184 | |
| 185 | pinctrl_flexcan2: flexcan2grp { |
| 186 | fsl,pins = < |
| 187 | MX6QDL_PAD_SD3_DAT0__FLEXCAN2_TX 0x1b0b0 |
| 188 | MX6QDL_PAD_SD3_DAT1__FLEXCAN2_RX 0x1b0b0 |
| 189 | >; |
| 190 | }; |
| 191 | |
| 192 | pinctrl_usbotg: usbotggrp { |
| 193 | fsl,pins = < |
| 194 | MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059 |
| 195 | MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0 |
| 196 | >; |
| 197 | }; |
| 198 | |
| 199 | pinctrl_usdhc1: usdhc1grp { |
| 200 | fsl,pins = < |
| 201 | MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059 |
| 202 | MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059 |
| 203 | MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059 |
| 204 | MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059 |
| 205 | MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059 |
| 206 | MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059 |
| 207 | /* SD1 card detect input */ |
| 208 | MX6QDL_PAD_ENET_RXD0__GPIO1_IO27 0x1b0b0 |
| 209 | /* SD1 write protect input */ |
| 210 | MX6QDL_PAD_DI0_PIN4__GPIO4_IO20 0x1b0b0 |
| 211 | >; |
| 212 | }; |
| 213 | |
| 214 | pinctrl_usdhc2: usdhc2grp { |
| 215 | fsl,pins = < |
| 216 | MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059 |
| 217 | MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059 |
| 218 | MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059 |
| 219 | MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059 |
| 220 | MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059 |
| 221 | MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059 |
| 222 | MX6QDL_PAD_NANDF_D4__SD2_DATA4 0x17059 |
| 223 | MX6QDL_PAD_NANDF_D5__SD2_DATA5 0x17059 |
| 224 | MX6QDL_PAD_NANDF_D6__SD2_DATA6 0x17059 |
| 225 | MX6QDL_PAD_NANDF_D7__SD2_DATA7 0x17059 |
| 226 | >; |
| 227 | }; |
| 228 | }; |