|
3 | 3 | * Copyright (C) 2024 Yangyu Chen < [email protected]>
|
4 | 4 | */
|
5 | 5 |
|
| 6 | +#include <dt-bindings/clock/spacemit,k1-syscon.h> |
| 7 | + |
6 | 8 | /dts-v1/;
|
7 | 9 | / {
|
8 | 10 | #address-cells = <2>;
|
|
306 | 308 | };
|
307 | 309 | };
|
308 | 310 |
|
| 311 | + clocks { |
| 312 | + vctcxo_1m: clock-1m { |
| 313 | + compatible = "fixed-clock"; |
| 314 | + clock-frequency = <1000000>; |
| 315 | + clock-output-names = "vctcxo_1m"; |
| 316 | + #clock-cells = <0>; |
| 317 | + }; |
| 318 | + |
| 319 | + vctcxo_24m: clock-24m { |
| 320 | + compatible = "fixed-clock"; |
| 321 | + clock-frequency = <24000000>; |
| 322 | + clock-output-names = "vctcxo_24m"; |
| 323 | + #clock-cells = <0>; |
| 324 | + }; |
| 325 | + |
| 326 | + vctcxo_3m: clock-3m { |
| 327 | + compatible = "fixed-clock"; |
| 328 | + clock-frequency = <3000000>; |
| 329 | + clock-output-names = "vctcxo_3m"; |
| 330 | + #clock-cells = <0>; |
| 331 | + }; |
| 332 | + |
| 333 | + osc_32k: clock-32k { |
| 334 | + compatible = "fixed-clock"; |
| 335 | + clock-frequency = <32000>; |
| 336 | + clock-output-names = "osc_32k"; |
| 337 | + #clock-cells = <0>; |
| 338 | + }; |
| 339 | + }; |
| 340 | + |
309 | 341 | soc {
|
310 | 342 | compatible = "simple-bus";
|
311 | 343 | interrupt-parent = <&plic>;
|
|
314 | 346 | dma-noncoherent;
|
315 | 347 | ranges;
|
316 | 348 |
|
| 349 | + syscon_apbc: system-controller@d4015000 { |
| 350 | + compatible = "spacemit,k1-syscon-apbc"; |
| 351 | + reg = <0x0 0xd4015000 0x0 0x1000>; |
| 352 | + clocks = <&osc_32k>, <&vctcxo_1m>, <&vctcxo_3m>, |
| 353 | + <&vctcxo_24m>; |
| 354 | + clock-names = "osc", "vctcxo_1m", "vctcxo_3m", |
| 355 | + "vctcxo_24m"; |
| 356 | + #clock-cells = <1>; |
| 357 | + #reset-cells = <1>; |
| 358 | + }; |
| 359 | + |
317 | 360 | uart0: serial@d4017000 {
|
318 | 361 | compatible = "spacemit,k1-uart", "intel,xscale-uart";
|
319 | 362 | reg = <0x0 0xd4017000 0x0 0x100>;
|
| 363 | + clocks = <&syscon_apbc CLK_UART0>, |
| 364 | + <&syscon_apbc CLK_UART0_BUS>; |
| 365 | + clock-names = "core", "bus"; |
320 | 366 | interrupts = <42>;
|
321 |
| - clock-frequency = <14857000>; |
322 | 367 | reg-shift = <2>;
|
323 | 368 | reg-io-width = <4>;
|
324 | 369 | status = "disabled";
|
|
327 | 372 | uart2: serial@d4017100 {
|
328 | 373 | compatible = "spacemit,k1-uart", "intel,xscale-uart";
|
329 | 374 | reg = <0x0 0xd4017100 0x0 0x100>;
|
| 375 | + clocks = <&syscon_apbc CLK_UART2>, |
| 376 | + <&syscon_apbc CLK_UART2_BUS>; |
| 377 | + clock-names = "core", "bus"; |
330 | 378 | interrupts = <44>;
|
331 |
| - clock-frequency = <14857000>; |
332 | 379 | reg-shift = <2>;
|
333 | 380 | reg-io-width = <4>;
|
334 | 381 | status = "disabled";
|
|
337 | 384 | uart3: serial@d4017200 {
|
338 | 385 | compatible = "spacemit,k1-uart", "intel,xscale-uart";
|
339 | 386 | reg = <0x0 0xd4017200 0x0 0x100>;
|
| 387 | + clocks = <&syscon_apbc CLK_UART3>, |
| 388 | + <&syscon_apbc CLK_UART3_BUS>; |
| 389 | + clock-names = "core", "bus"; |
340 | 390 | interrupts = <45>;
|
341 |
| - clock-frequency = <14857000>; |
342 | 391 | reg-shift = <2>;
|
343 | 392 | reg-io-width = <4>;
|
344 | 393 | status = "disabled";
|
|
347 | 396 | uart4: serial@d4017300 {
|
348 | 397 | compatible = "spacemit,k1-uart", "intel,xscale-uart";
|
349 | 398 | reg = <0x0 0xd4017300 0x0 0x100>;
|
| 399 | + clocks = <&syscon_apbc CLK_UART4>, |
| 400 | + <&syscon_apbc CLK_UART4_BUS>; |
| 401 | + clock-names = "core", "bus"; |
350 | 402 | interrupts = <46>;
|
351 |
| - clock-frequency = <14857000>; |
352 | 403 | reg-shift = <2>;
|
353 | 404 | reg-io-width = <4>;
|
354 | 405 | status = "disabled";
|
|
357 | 408 | uart5: serial@d4017400 {
|
358 | 409 | compatible = "spacemit,k1-uart", "intel,xscale-uart";
|
359 | 410 | reg = <0x0 0xd4017400 0x0 0x100>;
|
| 411 | + clocks = <&syscon_apbc CLK_UART5>, |
| 412 | + <&syscon_apbc CLK_UART5_BUS>; |
| 413 | + clock-names = "core", "bus"; |
360 | 414 | interrupts = <47>;
|
361 |
| - clock-frequency = <14857000>; |
362 | 415 | reg-shift = <2>;
|
363 | 416 | reg-io-width = <4>;
|
364 | 417 | status = "disabled";
|
|
367 | 420 | uart6: serial@d4017500 {
|
368 | 421 | compatible = "spacemit,k1-uart", "intel,xscale-uart";
|
369 | 422 | reg = <0x0 0xd4017500 0x0 0x100>;
|
| 423 | + clocks = <&syscon_apbc CLK_UART6>, |
| 424 | + <&syscon_apbc CLK_UART6_BUS>; |
| 425 | + clock-names = "core", "bus"; |
370 | 426 | interrupts = <48>;
|
371 |
| - clock-frequency = <14857000>; |
372 | 427 | reg-shift = <2>;
|
373 | 428 | reg-io-width = <4>;
|
374 | 429 | status = "disabled";
|
|
377 | 432 | uart7: serial@d4017600 {
|
378 | 433 | compatible = "spacemit,k1-uart", "intel,xscale-uart";
|
379 | 434 | reg = <0x0 0xd4017600 0x0 0x100>;
|
| 435 | + clocks = <&syscon_apbc CLK_UART7>, |
| 436 | + <&syscon_apbc CLK_UART7_BUS>; |
| 437 | + clock-names = "core", "bus"; |
380 | 438 | interrupts = <49>;
|
381 |
| - clock-frequency = <14857000>; |
382 | 439 | reg-shift = <2>;
|
383 | 440 | reg-io-width = <4>;
|
384 | 441 | status = "disabled";
|
|
387 | 444 | uart8: serial@d4017700 {
|
388 | 445 | compatible = "spacemit,k1-uart", "intel,xscale-uart";
|
389 | 446 | reg = <0x0 0xd4017700 0x0 0x100>;
|
| 447 | + clocks = <&syscon_apbc CLK_UART8>, |
| 448 | + <&syscon_apbc CLK_UART8_BUS>; |
| 449 | + clock-names = "core", "bus"; |
390 | 450 | interrupts = <50>;
|
391 |
| - clock-frequency = <14857000>; |
392 | 451 | reg-shift = <2>;
|
393 | 452 | reg-io-width = <4>;
|
394 | 453 | status = "disabled";
|
|
397 | 456 | uart9: serial@d4017800 {
|
398 | 457 | compatible = "spacemit,k1-uart", "intel,xscale-uart";
|
399 | 458 | reg = <0x0 0xd4017800 0x0 0x100>;
|
| 459 | + clocks = <&syscon_apbc CLK_UART9>, |
| 460 | + <&syscon_apbc CLK_UART9_BUS>; |
| 461 | + clock-names = "core", "bus"; |
400 | 462 | interrupts = <51>;
|
401 |
| - clock-frequency = <14857000>; |
402 | 463 | reg-shift = <2>;
|
403 | 464 | reg-io-width = <4>;
|
404 | 465 | status = "disabled";
|
405 | 466 | };
|
406 | 467 |
|
| 468 | + gpio: gpio@d4019000 { |
| 469 | + compatible = "spacemit,k1-gpio"; |
| 470 | + reg = <0x0 0xd4019000 0x0 0x100>; |
| 471 | + clocks = <&syscon_apbc CLK_GPIO>, |
| 472 | + <&syscon_apbc CLK_GPIO_BUS>; |
| 473 | + clock-names = "core", "bus"; |
| 474 | + gpio-controller; |
| 475 | + #gpio-cells = <3>; |
| 476 | + interrupts = <58>; |
| 477 | + interrupt-parent = <&plic>; |
| 478 | + interrupt-controller; |
| 479 | + #interrupt-cells = <3>; |
| 480 | + gpio-ranges = <&pinctrl 0 0 0 32>, |
| 481 | + <&pinctrl 1 0 32 32>, |
| 482 | + <&pinctrl 2 0 64 32>, |
| 483 | + <&pinctrl 3 0 96 32>; |
| 484 | + }; |
| 485 | + |
407 | 486 | pinctrl: pinctrl@d401e000 {
|
408 | 487 | compatible = "spacemit,k1-pinctrl";
|
409 | 488 | reg = <0x0 0xd401e000 0x0 0x400>;
|
| 489 | + clocks = <&syscon_apbc CLK_AIB>, |
| 490 | + <&syscon_apbc CLK_AIB_BUS>; |
| 491 | + clock-names = "func", "bus"; |
| 492 | + }; |
| 493 | + |
| 494 | + syscon_mpmu: system-controller@d4050000 { |
| 495 | + compatible = "spacemit,k1-syscon-mpmu"; |
| 496 | + reg = <0x0 0xd4050000 0x0 0x209c>; |
| 497 | + clocks = <&osc_32k>, <&vctcxo_1m>, <&vctcxo_3m>, |
| 498 | + <&vctcxo_24m>; |
| 499 | + clock-names = "osc", "vctcxo_1m", "vctcxo_3m", |
| 500 | + "vctcxo_24m"; |
| 501 | + #clock-cells = <1>; |
| 502 | + #power-domain-cells = <1>; |
| 503 | + #reset-cells = <1>; |
| 504 | + }; |
| 505 | + |
| 506 | + pll: clock-controller@d4090000 { |
| 507 | + compatible = "spacemit,k1-pll"; |
| 508 | + reg = <0x0 0xd4090000 0x0 0x1000>; |
| 509 | + clocks = <&vctcxo_24m>; |
| 510 | + spacemit,mpmu = <&syscon_mpmu>; |
| 511 | + #clock-cells = <1>; |
| 512 | + }; |
| 513 | + |
| 514 | + syscon_apmu: system-controller@d4282800 { |
| 515 | + compatible = "spacemit,k1-syscon-apmu"; |
| 516 | + reg = <0x0 0xd4282800 0x0 0x400>; |
| 517 | + clocks = <&osc_32k>, <&vctcxo_1m>, <&vctcxo_3m>, |
| 518 | + <&vctcxo_24m>; |
| 519 | + clock-names = "osc", "vctcxo_1m", "vctcxo_3m", |
| 520 | + "vctcxo_24m"; |
| 521 | + #clock-cells = <1>; |
| 522 | + #power-domain-cells = <1>; |
| 523 | + #reset-cells = <1>; |
410 | 524 | };
|
411 | 525 |
|
412 | 526 | plic: interrupt-controller@e0000000 {
|
|
0 commit comments