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