0001 // SPDX-License-Identifier: GPL-2.0+
0002 /*
0003 * Device Tree file for the Kontron SMARC-sAL28 board.
0004 *
0005 * Copyright (C) 2021 Michael Walle <michael@walle.cc>
0006 *
0007 */
0008
0009 /dts-v1/;
0010 #include "fsl-ls1028a.dtsi"
0011 #include <dt-bindings/interrupt-controller/irq.h>
0012 #include <dt-bindings/gpio/gpio.h>
0013 #include <dt-bindings/input/input.h>
0014
0015 / {
0016 model = "Kontron SMARC-sAL28";
0017 compatible = "kontron,sl28", "fsl,ls1028a";
0018
0019 aliases {
0020 crypto = &crypto;
0021 serial0 = &duart0;
0022 serial1 = &duart1;
0023 serial2 = &lpuart1;
0024 spi0 = &fspi;
0025 spi1 = &dspi2;
0026 mmc0 = &esdhc1;
0027 mmc1 = &esdhc;
0028 rtc0 = &rtc;
0029 rtc1 = &ftm_alarm0;
0030 };
0031
0032 buttons0 {
0033 compatible = "gpio-keys";
0034
0035 power-button {
0036 interrupts-extended = <&sl28cpld_intc
0037 4 IRQ_TYPE_EDGE_BOTH>;
0038 linux,code = <KEY_POWER>;
0039 label = "Power";
0040 };
0041
0042 sleep-button {
0043 interrupts-extended = <&sl28cpld_intc
0044 5 IRQ_TYPE_EDGE_BOTH>;
0045 linux,code = <KEY_SLEEP>;
0046 label = "Sleep";
0047 };
0048 };
0049
0050 buttons1 {
0051 compatible = "gpio-keys-polled";
0052 poll-interval = <200>;
0053
0054 lid-switch {
0055 linux,input-type = <EV_SW>;
0056 linux,code = <SW_LID>;
0057 gpios = <&sl28cpld_gpio3 4 GPIO_ACTIVE_LOW>;
0058 label = "Lid";
0059 };
0060 };
0061
0062 chosen {
0063 stdout-path = "serial0:115200n8";
0064 };
0065 };
0066
0067 &can0 {
0068 status = "okay";
0069 };
0070
0071 &dspi2 {
0072 status = "okay";
0073 };
0074
0075 &duart0 {
0076 status = "okay";
0077 };
0078
0079 &duart1 {
0080 status = "okay";
0081 };
0082
0083 &enetc_mdio_pf3 {
0084 phy0: ethernet-phy@5 {
0085 reg = <0x5>;
0086 eee-broken-1000t;
0087 eee-broken-100tx;
0088 };
0089 };
0090
0091 &enetc_port0 {
0092 phy-handle = <&phy0>;
0093 phy-mode = "sgmii";
0094 managed = "in-band-status";
0095 status = "okay";
0096 };
0097
0098 &esdhc {
0099 sd-uhs-sdr104;
0100 sd-uhs-sdr50;
0101 sd-uhs-sdr25;
0102 sd-uhs-sdr12;
0103 status = "okay";
0104 };
0105
0106 &esdhc1 {
0107 mmc-hs200-1_8v;
0108 mmc-hs400-1_8v;
0109 bus-width = <8>;
0110 status = "okay";
0111 };
0112
0113 &fspi {
0114 status = "okay";
0115
0116 flash@0 {
0117 compatible = "jedec,spi-nor";
0118 m25p,fast-read;
0119 spi-max-frequency = <133000000>;
0120 reg = <0>;
0121 /* The following setting enables 1-1-2 (CMD-ADDR-DATA) mode */
0122 spi-rx-bus-width = <2>; /* 2 SPI Rx lines */
0123 spi-tx-bus-width = <1>; /* 1 SPI Tx line */
0124
0125 partitions {
0126 compatible = "fixed-partitions";
0127 #address-cells = <1>;
0128 #size-cells = <1>;
0129
0130 partition@0 {
0131 reg = <0x000000 0x010000>;
0132 label = "rcw";
0133 read-only;
0134 };
0135
0136 partition@10000 {
0137 reg = <0x010000 0x1d0000>;
0138 label = "failsafe bootloader";
0139 read-only;
0140 };
0141
0142 partition@200000 {
0143 reg = <0x200000 0x010000>;
0144 label = "configuration store";
0145 };
0146
0147 partition@210000 {
0148 reg = <0x210000 0x1d0000>;
0149 label = "bootloader";
0150 };
0151
0152 partition@3e0000 {
0153 reg = <0x3e0000 0x020000>;
0154 label = "bootloader environment";
0155 };
0156 };
0157 };
0158 };
0159
0160 &ftm_alarm0 {
0161 status = "okay";
0162 };
0163
0164 &gpio1 {
0165 gpio-line-names =
0166 "", "", "", "", "", "", "", "",
0167 "", "", "", "", "", "", "", "",
0168 "", "", "", "", "", "", "TDO", "TCK",
0169 "", "", "", "", "", "", "", "";
0170 };
0171
0172 &gpio2 {
0173 gpio-line-names =
0174 "", "", "", "", "", "", "TMS", "TDI",
0175 "", "", "", "", "", "", "", "",
0176 "", "", "", "", "", "", "", "",
0177 "", "", "", "", "", "", "", "";
0178 };
0179
0180 &i2c0 {
0181 status = "okay";
0182
0183 rtc: rtc@32 {
0184 compatible = "microcrystal,rv8803";
0185 reg = <0x32>;
0186 };
0187
0188 sl28cpld@4a {
0189 compatible = "kontron,sl28cpld";
0190 reg = <0x4a>;
0191 #address-cells = <1>;
0192 #size-cells = <0>;
0193
0194 watchdog@4 {
0195 compatible = "kontron,sl28cpld-wdt";
0196 reg = <0x4>;
0197 kontron,assert-wdt-timeout-pin;
0198 };
0199
0200 hwmon@b {
0201 compatible = "kontron,sl28cpld-fan";
0202 reg = <0xb>;
0203 };
0204
0205 sl28cpld_pwm0: pwm@c {
0206 compatible = "kontron,sl28cpld-pwm";
0207 reg = <0xc>;
0208 #pwm-cells = <2>;
0209 };
0210
0211 sl28cpld_pwm1: pwm@e {
0212 compatible = "kontron,sl28cpld-pwm";
0213 reg = <0xe>;
0214 #pwm-cells = <2>;
0215 };
0216
0217 sl28cpld_gpio0: gpio@10 {
0218 compatible = "kontron,sl28cpld-gpio";
0219 reg = <0x10>;
0220 interrupts-extended = <&gpio2 6
0221 IRQ_TYPE_EDGE_FALLING>;
0222
0223 gpio-controller;
0224 #gpio-cells = <2>;
0225 gpio-line-names =
0226 "GPIO0_CAM0_PWR_N", "GPIO1_CAM1_PWR_N",
0227 "GPIO2_CAM0_RST_N", "GPIO3_CAM1_RST_N",
0228 "GPIO4_HDA_RST_N", "GPIO5_PWM_OUT",
0229 "GPIO6_TACHIN", "GPIO7";
0230
0231 interrupt-controller;
0232 #interrupt-cells = <2>;
0233 };
0234
0235 sl28cpld_gpio1: gpio@15 {
0236 compatible = "kontron,sl28cpld-gpio";
0237 reg = <0x15>;
0238 interrupts-extended = <&gpio2 6
0239 IRQ_TYPE_EDGE_FALLING>;
0240
0241 gpio-controller;
0242 #gpio-cells = <2>;
0243 gpio-line-names =
0244 "GPIO8", "GPIO9", "GPIO10", "GPIO11",
0245 "", "", "", "";
0246
0247 interrupt-controller;
0248 #interrupt-cells = <2>;
0249 };
0250
0251 sl28cpld_gpio2: gpio@1a {
0252 compatible = "kontron,sl28cpld-gpo";
0253 reg = <0x1a>;
0254
0255 gpio-controller;
0256 #gpio-cells = <2>;
0257 gpio-line-names =
0258 "LCD0 voltage enable",
0259 "LCD0 backlight enable",
0260 "eMMC reset", "LVDS bridge reset",
0261 "LVDS bridge power-down",
0262 "SDIO power enable",
0263 "", "";
0264 };
0265
0266 sl28cpld_gpio3: gpio@1b {
0267 compatible = "kontron,sl28cpld-gpi";
0268 reg = <0x1b>;
0269
0270 gpio-controller;
0271 #gpio-cells = <2>;
0272 gpio-line-names =
0273 "Power button", "Force recovery", "Sleep",
0274 "Battery low", "Lid state", "Charging",
0275 "Charger present", "";
0276 };
0277
0278 sl28cpld_intc: interrupt-controller@1c {
0279 compatible = "kontron,sl28cpld-intc";
0280 reg = <0x1c>;
0281 interrupts-extended = <&gpio2 6
0282 IRQ_TYPE_EDGE_FALLING>;
0283
0284 interrupt-controller;
0285 #interrupt-cells = <2>;
0286 };
0287 };
0288
0289 eeprom@50 {
0290 compatible = "atmel,24c32";
0291 reg = <0x50>;
0292 pagesize = <32>;
0293 };
0294 };
0295
0296 &i2c3 {
0297 status = "okay";
0298 };
0299
0300 &i2c4 {
0301 status = "okay";
0302
0303 eeprom@50 {
0304 compatible = "atmel,24c32";
0305 reg = <0x50>;
0306 pagesize = <32>;
0307 };
0308 };
0309
0310 &lpuart1 {
0311 status = "okay";
0312 };
0313
0314 &mscc_felix_port4 {
0315 dsa-tag-protocol = "ocelot-8021q";
0316 };
0317
0318 &mscc_felix_port5 {
0319 dsa-tag-protocol = "ocelot-8021q";
0320 };
0321
0322 &usb0 {
0323 status = "okay";
0324 };
0325
0326 &usb1 {
0327 dr_mode = "host";
0328 status = "okay";
0329 };