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