1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Device Tree file for the Kontron SMARC-sAL28 board. 4 * 5 * Copyright (C) 2019 Michael Walle <michael@walle.cc> 6 * 7 */ 8 9/dts-v1/; 10#include "fsl-ls1028a.dtsi" 11#include <dt-bindings/interrupt-controller/irq.h> 12#include <dt-bindings/gpio/gpio.h> 13#include <dt-bindings/input/input.h> 14 15/ { 16 model = "Kontron SMARC-sAL28"; 17 compatible = "kontron,sl28", "fsl,ls1028a"; 18 19 aliases { 20 crypto = &crypto; 21 serial0 = &duart0; 22 serial1 = &duart1; 23 serial2 = &lpuart1; 24 spi0 = &fspi; 25 spi1 = &dspi2; 26 mmc0 = &esdhc1; 27 mmc1 = &esdhc; 28 rtc0 = &rtc; 29 rtc1 = &ftm_alarm0; 30 }; 31 32 buttons0 { 33 compatible = "gpio-keys"; 34 35 power-button { 36 interrupts-extended = <&sl28cpld_intc 37 4 IRQ_TYPE_EDGE_BOTH>; 38 linux,code = <KEY_POWER>; 39 label = "Power"; 40 }; 41 42 sleep-button { 43 interrupts-extended = <&sl28cpld_intc 44 5 IRQ_TYPE_EDGE_BOTH>; 45 linux,code = <KEY_SLEEP>; 46 label = "Sleep"; 47 }; 48 }; 49 50 buttons1 { 51 compatible = "gpio-keys-polled"; 52 poll-interval = <200>; 53 54 lid-switch { 55 linux,input-type = <EV_SW>; 56 linux,code = <SW_LID>; 57 gpios = <&sl28cpld_gpio3 4 GPIO_ACTIVE_LOW>; 58 label = "Lid"; 59 }; 60 }; 61 62 chosen { 63 stdout-path = "serial0:115200n8"; 64 }; 65}; 66 67&can0 { 68 status = "okay"; 69}; 70 71&dspi2 { 72 status = "okay"; 73}; 74 75&duart0 { 76 status = "okay"; 77}; 78 79&duart1 { 80 status = "okay"; 81}; 82 83&enetc_port0 { 84 phy-handle = <&phy0>; 85 phy-connection-type = "sgmii"; 86 managed = "in-band-status"; 87 status = "okay"; 88 89 mdio { 90 #address-cells = <1>; 91 #size-cells = <0>; 92 93 phy0: ethernet-phy@5 { 94 reg = <0x5>; 95 eee-broken-1000t; 96 eee-broken-100tx; 97 }; 98 }; 99}; 100 101&esdhc { 102 sd-uhs-sdr104; 103 sd-uhs-sdr50; 104 sd-uhs-sdr25; 105 sd-uhs-sdr12; 106 status = "okay"; 107}; 108 109&esdhc1 { 110 mmc-hs200-1_8v; 111 mmc-hs400-1_8v; 112 bus-width = <8>; 113 status = "okay"; 114}; 115 116&fspi { 117 status = "okay"; 118 119 flash@0 { 120 compatible = "jedec,spi-nor"; 121 m25p,fast-read; 122 spi-max-frequency = <133000000>; 123 reg = <0>; 124 /* The following setting enables 1-1-2 (CMD-ADDR-DATA) mode */ 125 spi-rx-bus-width = <2>; /* 2 SPI Rx lines */ 126 spi-tx-bus-width = <1>; /* 1 SPI Tx line */ 127 128 partitions { 129 compatible = "fixed-partitions"; 130 #address-cells = <1>; 131 #size-cells = <1>; 132 133 partition@0 { 134 reg = <0x000000 0x010000>; 135 label = "rcw"; 136 read-only; 137 }; 138 139 partition@10000 { 140 reg = <0x010000 0x1d0000>; 141 label = "failsafe bootloader"; 142 read-only; 143 }; 144 145 partition@200000 { 146 reg = <0x200000 0x010000>; 147 label = "configuration store"; 148 }; 149 150 partition@210000 { 151 reg = <0x210000 0x1d0000>; 152 label = "bootloader"; 153 }; 154 155 partition@3e0000 { 156 reg = <0x3e0000 0x020000>; 157 label = "bootloader environment"; 158 }; 159 }; 160 }; 161}; 162 163&gpio1 { 164 gpio-line-names = 165 "", "", "", "", "", "", "", "", 166 "", "", "", "", "", "", "", "", 167 "", "", "", "", "", "", "TDO", "TCK", 168 "", "", "", "", "", "", "", ""; 169}; 170 171&gpio2 { 172 gpio-line-names = 173 "", "", "", "", "", "", "TMS", "TDI", 174 "", "", "", "", "", "", "", "", 175 "", "", "", "", "", "", "", "", 176 "", "", "", "", "", "", "", ""; 177}; 178 179&i2c0 { 180 status = "okay"; 181 182 rtc: rtc@32 { 183 compatible = "microcrystal,rv8803"; 184 reg = <0x32>; 185 }; 186 187 sl28cpld@4a { 188 compatible = "kontron,sl28cpld"; 189 reg = <0x4a>; 190 #address-cells = <1>; 191 #size-cells = <0>; 192 193 watchdog@4 { 194 compatible = "kontron,sl28cpld-wdt"; 195 reg = <0x4>; 196 kontron,assert-wdt-timeout-pin; 197 }; 198 199 hwmon@b { 200 compatible = "kontron,sl28cpld-fan"; 201 reg = <0xb>; 202 }; 203 204 sl28cpld_pwm0: pwm@c { 205 compatible = "kontron,sl28cpld-pwm"; 206 reg = <0xc>; 207 #pwm-cells = <2>; 208 }; 209 210 sl28cpld_pwm1: pwm@e { 211 compatible = "kontron,sl28cpld-pwm"; 212 reg = <0xe>; 213 #pwm-cells = <2>; 214 }; 215 216 sl28cpld_gpio0: gpio@10 { 217 compatible = "kontron,sl28cpld-gpio"; 218 reg = <0x10>; 219 interrupts-extended = <&gpio2 6 220 IRQ_TYPE_EDGE_FALLING>; 221 222 gpio-controller; 223 #gpio-cells = <2>; 224 gpio-line-names = 225 "GPIO0_CAM0_PWR_N", "GPIO1_CAM1_PWR_N", 226 "GPIO2_CAM0_RST_N", "GPIO3_CAM1_RST_N", 227 "GPIO4_HDA_RST_N", "GPIO5_PWM_OUT", 228 "GPIO6_TACHIN", "GPIO7"; 229 230 interrupt-controller; 231 #interrupt-cells = <2>; 232 }; 233 234 sl28cpld_gpio1: gpio@15 { 235 compatible = "kontron,sl28cpld-gpio"; 236 reg = <0x15>; 237 interrupts-extended = <&gpio2 6 238 IRQ_TYPE_EDGE_FALLING>; 239 240 gpio-controller; 241 #gpio-cells = <2>; 242 gpio-line-names = 243 "GPIO8", "GPIO9", "GPIO10", "GPIO11", 244 "", "", "", ""; 245 246 interrupt-controller; 247 #interrupt-cells = <2>; 248 }; 249 250 sl28cpld_gpio2: gpio@1a { 251 compatible = "kontron,sl28cpld-gpo"; 252 reg = <0x1a>; 253 254 gpio-controller; 255 #gpio-cells = <2>; 256 gpio-line-names = 257 "LCD0 voltage enable", 258 "LCD0 backlight enable", 259 "eMMC reset", "LVDS bridge reset", 260 "LVDS bridge power-down", 261 "SDIO power enable", 262 "", ""; 263 }; 264 265 sl28cpld_gpio3: gpio@1b { 266 compatible = "kontron,sl28cpld-gpi"; 267 reg = <0x1b>; 268 269 gpio-controller; 270 #gpio-cells = <2>; 271 gpio-line-names = 272 "Power button", "Force recovery", "Sleep", 273 "Battery low", "Lid state", "Charging", 274 "Charger present", ""; 275 }; 276 277 sl28cpld_intc: interrupt-controller@1c { 278 compatible = "kontron,sl28cpld-intc"; 279 reg = <0x1c>; 280 interrupts-extended = <&gpio2 6 281 IRQ_TYPE_EDGE_FALLING>; 282 283 interrupt-controller; 284 #interrupt-cells = <2>; 285 }; 286 }; 287 288 eeprom@50 { 289 compatible = "atmel,24c32"; 290 reg = <0x50>; 291 pagesize = <32>; 292 }; 293}; 294 295&i2c3 { 296 status = "okay"; 297}; 298 299&i2c4 { 300 status = "okay"; 301 302 eeprom@50 { 303 compatible = "atmel,24c32"; 304 reg = <0x50>; 305 pagesize = <32>; 306 }; 307}; 308 309&lpuart1 { 310 status = "okay"; 311}; 312