|
| 1 | +/* |
| 2 | + * Copyright (c) 2021 BrainCo Inc. |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +#include <arm/armv7-m.dtsi> |
| 8 | +#include <dt-bindings/gpio/gpio.h> |
| 9 | + |
| 10 | +/ { |
| 11 | + cpus { |
| 12 | + #address-cells = <1>; |
| 13 | + #size-cells = <0>; |
| 14 | + |
| 15 | + cpu0: cpu@0 { |
| 16 | + clock-frequency = <108000000>; |
| 17 | + device_type = "cpu"; |
| 18 | + compatible = "arm,cortex-m4f"; |
| 19 | + reg = <0>; |
| 20 | + }; |
| 21 | + }; |
| 22 | + |
| 23 | + soc { |
| 24 | + sram0: memory@20000000 { |
| 25 | + compatible = "mmio-sram"; |
| 26 | + }; |
| 27 | + |
| 28 | + fmc: flash-controller@40022000 { |
| 29 | + compatible = "gd,gd32-flash-controller"; |
| 30 | + label = "FMC"; |
| 31 | + reg = <0x40022000 0x400>; |
| 32 | + |
| 33 | + #address-cells = <1>; |
| 34 | + #size-cells = <1>; |
| 35 | + |
| 36 | + flash0: flash@8000000 { |
| 37 | + compatible = "soc-nv-flash"; |
| 38 | + label = "FLASH_0"; |
| 39 | + }; |
| 40 | + }; |
| 41 | + |
| 42 | + usart0: usart@40013800 { |
| 43 | + compatible = "gd,gd32-usart"; |
| 44 | + reg = <0x40013800 0x400>; |
| 45 | + interrupts = <27 0>; |
| 46 | + rcu-periph-clock = <0x060e>; |
| 47 | + status = "disabled"; |
| 48 | + label = "USART_0"; |
| 49 | + }; |
| 50 | + |
| 51 | + usart1: usart@40004400 { |
| 52 | + compatible = "gd,gd32-usart"; |
| 53 | + reg = <0x40004400 0x400>; |
| 54 | + interrupts = <28 0>; |
| 55 | + rcu-periph-clock = <0x0711>; |
| 56 | + status = "disabled"; |
| 57 | + label = "USART_1"; |
| 58 | + }; |
| 59 | + |
| 60 | + pinctrl: pin-controller@48000000 { |
| 61 | + compatible = "gd,gd32-pinctrl-af"; |
| 62 | + reg = <0x48000000 0x1800>; |
| 63 | + #address-cells = <1>; |
| 64 | + #size-cells = <1>; |
| 65 | + status = "okay"; |
| 66 | + label = "PINCTRL"; |
| 67 | + |
| 68 | + gpioa: gpio@48000000 { |
| 69 | + compatible = "gd,gd32-gpio"; |
| 70 | + gpio-controller; |
| 71 | + #gpio-cells = <2>; |
| 72 | + reg = <0x48000000 0x400>; |
| 73 | + rcu-periph-clock = <0x511>; |
| 74 | + status = "disabled"; |
| 75 | + label = "GPIOA"; |
| 76 | + }; |
| 77 | + |
| 78 | + gpiob: gpio@48000400 { |
| 79 | + compatible = "gd,gd32-gpio"; |
| 80 | + gpio-controller; |
| 81 | + #gpio-cells = <2>; |
| 82 | + reg = <0x48000400 0x400>; |
| 83 | + rcu-periph-clock = <0x512>; |
| 84 | + status = "disabled"; |
| 85 | + label = "GPIOB"; |
| 86 | + }; |
| 87 | + |
| 88 | + gpioc: gpio@48000800 { |
| 89 | + compatible = "gd,gd32-gpio"; |
| 90 | + gpio-controller; |
| 91 | + #gpio-cells = <2>; |
| 92 | + reg = <0x48000800 0x400>; |
| 93 | + rcu-periph-clock = <0x513>; |
| 94 | + status = "disabled"; |
| 95 | + label = "GPIOC"; |
| 96 | + }; |
| 97 | + |
| 98 | + gpiod: gpio@48000c00 { |
| 99 | + compatible = "gd,gd32-gpio"; |
| 100 | + gpio-controller; |
| 101 | + #gpio-cells = <2>; |
| 102 | + reg = <0x48000c00 0x400>; |
| 103 | + rcu-periph-clock = <0x514>; |
| 104 | + status = "disabled"; |
| 105 | + label = "GPIOD"; |
| 106 | + }; |
| 107 | + |
| 108 | + gpiof: gpio@48001400 { |
| 109 | + compatible = "gd,gd32-gpio"; |
| 110 | + gpio-controller; |
| 111 | + #gpio-cells = <2>; |
| 112 | + reg = <0x48001400 0x400>; |
| 113 | + rcu-periph-clock = <0x516>; |
| 114 | + status = "disabled"; |
| 115 | + label = "GPIOF"; |
| 116 | + }; |
| 117 | + }; |
| 118 | + }; |
| 119 | +}; |
| 120 | + |
| 121 | +&nvic { |
| 122 | + arm,num-irq-priority-bits = <4>; |
| 123 | +}; |
0 commit comments