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