|
| 1 | +/* |
| 2 | + * Copyright (c) 2021 YuLong Yao < [email protected]> |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +#include <arm/armv7-m.dtsi> |
| 8 | + |
| 9 | +/ { |
| 10 | + cpus { |
| 11 | + #address-cells = <1>; |
| 12 | + #size-cells = <0>; |
| 13 | + |
| 14 | + cpu0: cpu@0 { |
| 15 | + clock-frequency = <120000000>; |
| 16 | + device_type = "cpu"; |
| 17 | + compatible = "arm,cortex-m4f"; |
| 18 | + reg = <0>; |
| 19 | + #address-cells = <1>; |
| 20 | + #size-cells = <1>; |
| 21 | + }; |
| 22 | + }; |
| 23 | + |
| 24 | + soc { |
| 25 | + sram0: memory@20000000 { |
| 26 | + compatible = "mmio-sram"; |
| 27 | + }; |
| 28 | + |
| 29 | + FMC: flash-controller@40022000 { |
| 30 | + compatible = "gd,gd32-flash-controller"; |
| 31 | + label = "FLASH_CTRL"; |
| 32 | + reg = <0x40022000 0x400>; |
| 33 | + peripheral-id = <6>; |
| 34 | + |
| 35 | + #address-cells = <1>; |
| 36 | + #size-cells = <1>; |
| 37 | + |
| 38 | + flash0: flash@8000000 { |
| 39 | + compatible = "soc-nv-flash"; |
| 40 | + label = "FLASH_0"; |
| 41 | + }; |
| 42 | + }; |
| 43 | + |
| 44 | + usart0: usart@40013800 { |
| 45 | + compatible = "gd,gd32-usart"; |
| 46 | + reg = <0x40013800 0x400>; |
| 47 | + interrupts = <37 0>; |
| 48 | + rcu-periph-clock = <0x60e>; |
| 49 | + status = "disabled"; |
| 50 | + label = "USART_0"; |
| 51 | + }; |
| 52 | + |
| 53 | + usart1: usart@40004400 { |
| 54 | + compatible = "gd,gd32-usart"; |
| 55 | + reg = <0x40004400 0x400>; |
| 56 | + interrupts = <38 0>; |
| 57 | + rcu-periph-clock = <0x711>; |
| 58 | + status = "disabled"; |
| 59 | + label = "USART_1"; |
| 60 | + }; |
| 61 | + |
| 62 | + usart2: usart@40004800 { |
| 63 | + compatible = "gd,gd32-usart"; |
| 64 | + reg = <0x40004800 0x400>; |
| 65 | + interrupts = <39 0>; |
| 66 | + rcu-periph-clock = <0x712>; |
| 67 | + status = "disabled"; |
| 68 | + label = "USART_2"; |
| 69 | + }; |
| 70 | + |
| 71 | + uart3: usart@40004c00 { |
| 72 | + compatible = "gd,gd32-usart"; |
| 73 | + reg = <0x40004c00 0x400>; |
| 74 | + interrupts = <52 0>; |
| 75 | + rcu-periph-clock = <0x713>; |
| 76 | + status = "disabled"; |
| 77 | + label = "USART_3"; |
| 78 | + }; |
| 79 | + |
| 80 | + uart4: usart@40005000 { |
| 81 | + compatible = "gd,gd32-usart"; |
| 82 | + reg = <0x40005000 0x400>; |
| 83 | + interrupts = <53 0>; |
| 84 | + rcu-periph-clock = <0x714>; |
| 85 | + status = "disabled"; |
| 86 | + label = "USART_4"; |
| 87 | + }; |
| 88 | + |
| 89 | + afio: afio@40010000 { |
| 90 | + compatible = "gd,gd32-afio"; |
| 91 | + reg = <0x40010000 0x400>; |
| 92 | + rcu-periph-clock = <0x600>; |
| 93 | + status = "okay"; |
| 94 | + label = "AFIO"; |
| 95 | + }; |
| 96 | + |
| 97 | + pinctrl: pin-controller@40010800 { |
| 98 | + compatible = "gd,gd32-pinctrl-afio"; |
| 99 | + reg = <0x40010800 0x1c00>; |
| 100 | + #address-cells = <1>; |
| 101 | + #size-cells = <1>; |
| 102 | + status = "okay"; |
| 103 | + label = "PINCTRL"; |
| 104 | + |
| 105 | + gpioa: gpio@40010800 { |
| 106 | + compatible = "gd,gd32-gpio"; |
| 107 | + reg = <0x40010800 0x400>; |
| 108 | + rcu-periph-clock = <0x602>; |
| 109 | + status = "disabled"; |
| 110 | + label = "GPIOA"; |
| 111 | + }; |
| 112 | + |
| 113 | + gpiob: gpio@40010c00 { |
| 114 | + compatible = "gd,gd32-gpio"; |
| 115 | + reg = <0x40010c00 0x400>; |
| 116 | + rcu-periph-clock = <0x603>; |
| 117 | + status = "disabled"; |
| 118 | + label = "GPIOB"; |
| 119 | + }; |
| 120 | + |
| 121 | + gpioc: gpio@40011000 { |
| 122 | + compatible = "gd,gd32-gpio"; |
| 123 | + reg = <0x40011000 0x400>; |
| 124 | + rcu-periph-clock = <0x604>; |
| 125 | + status = "disabled"; |
| 126 | + label = "GPIOC"; |
| 127 | + }; |
| 128 | + |
| 129 | + gpiod: gpio@40011400 { |
| 130 | + compatible = "gd,gd32-gpio"; |
| 131 | + reg = <0x40011400 0x400>; |
| 132 | + rcu-periph-clock = <0x605>; |
| 133 | + status = "disabled"; |
| 134 | + label = "GPIOD"; |
| 135 | + }; |
| 136 | + |
| 137 | + gpioe: gpio@40011800 { |
| 138 | + compatible = "gd,gd32-gpio"; |
| 139 | + reg = <0x40011800 0x400>; |
| 140 | + rcu-periph-clock = <0x606>; |
| 141 | + status = "disabled"; |
| 142 | + label = "GPIOE"; |
| 143 | + }; |
| 144 | + }; |
| 145 | + |
| 146 | + }; |
| 147 | +}; |
| 148 | + |
| 149 | +&nvic { |
| 150 | + arm,num-irq-priority-bits = <4>; |
| 151 | +}; |
0 commit comments