Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | /* * Copyright 2018 Foundries.io Ltd * SPDX-License-Identifier: Apache-2.0 */ #include <dt-bindings/interrupt-controller/openisa-intmux.h> #include <dt-bindings/gpio/gpio.h> / { #address-cells = <1>; #size-cells = <1>; aliases { pcc-0 = &pcc0; pcc-1 = &pcc1; intmux = &intmux; system-lptmr = &lptmr0; pinmux-a = &pinmux_a; pinmux-b = &pinmux_b; pinmux-c = &pinmux_c; pinmux-d = &pinmux_d; pinmux-e = &pinmux_e; gpio-a = &gpioa; gpio-b = &gpiob; gpio-c = &gpioc; gpio-d = &gpiod; gpio-e = &gpioe; uart-0 = &uart0; uart-1 = &uart1; uart-2 = &uart2; uart-3 = &uart3; }; cpus { #address-cells = <1>; #size-cells = <0>; cpu@0 { device_type = "cpu"; compatible = "riscv"; reg = <0>; }; }; sram0: memory@20000000 { device_type = "memory"; compatible = "mmio-sram"; reg = <0x20000000 0x30000>; }; soc { #address-cells = <1>; #size-cells = <1>; compatible = "simple-bus"; ranges; pcc0: clock-controller@4002b000 { compatible = "openisa,rv32m1-pcc"; clock-controller; reg = <0x4002b000 0x200>; label = "PCC0"; #clock-cells = <1>; }; pcc1: clock-controller@41027000 { compatible = "openisa,rv32m1-pcc"; clock-controller; reg = <0x41027000 0x200>; label = "PCC1"; #clock-cells = <1>; }; event: interrupt-controller@e0041000 { compatible = "openisa,rv32m1-event-unit"; #interrupt-cells = <1>; interrupt-controller; reg = <0xe0041000 0x88>; }; intmux: interrupt-controller@4004f000 { compatible = "openisa,rv32m1-intmux"; #interrupt-cells = <1>; interrupt-controller; interrupt-parent = <&event>; interrupts = <INTMUX_CH0_IRQ>, <INTMUX_CH1_IRQ>, <INTMUX_CH2_IRQ>, <INTMUX_CH3_IRQ>, <INTMUX_CH4_IRQ>, <INTMUX_CH5_IRQ>, <INTMUX_CH6_IRQ>, <INTMUX_CH7_IRQ>; reg = <0x4004f000 0x20>; clocks = <&pcc0 0x13c>; label = "INTMUX0"; }; /* * INTMUX channels below are somewhat arbitrary. * * The system timer (assumed at LPTMR0) is placed on channel 0, * and peripherals are in channel 1. This can be overridden with * overlays, e.g. to manage IRQ priorities, and it'll will Just * Work, but using fewer channels here allows disabling unused * ones in Kconfig, making the binary smaller. * * Each enabled channel requires 256 bytes in _sw_isr_table, * so the savings for disabling channels can add up. */ lptmr0: timer@40032000 { compatible = "openisa,rv32m1-lptmr"; reg = <0x40032000 0x10>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH0, 7)>; label = "LPTMR_0"; }; lptmr1: timer@40033000 { compatible = "openisa,rv32m1-lptmr"; reg = <0x40033000 0x10>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH1, 8)>; label = "LPTMR_1"; }; lptmr2: timer@4102b000 { compatible = "openisa,rv32m1-lptmr"; reg = <0x4102b000 0x10>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH1, 22)>; label = "LPTMR_2"; }; pinmux_a: pinmux@40046000 { compatible = "openisa,rv32m1-pinmux"; reg = <0x40046000 0xd0>; clocks = <&pcc0 0x118>; }; pinmux_b: pinmux@40047000 { compatible = "openisa,rv32m1-pinmux"; reg = <0x40047000 0xd0>; clocks = <&pcc0 0x11c>; }; pinmux_c: pinmux@40048000 { compatible = "openisa,rv32m1-pinmux"; reg = <0x40048000 0xd0>; clocks = <&pcc0 0x120>; }; pinmux_d: pinmux@40049000 { compatible = "openisa,rv32m1-pinmux"; reg = <0x40049000 0xd0>; clocks = <&pcc0 0x124>; }; pinmux_e: pinmux@41037000 { compatible = "openisa,rv32m1-pinmux"; reg = <0x41037000 0xd0>; clocks = <&pcc1 0xdc>; }; gpioa: gpio@48020000 { compatible = "openisa,rv32m1-gpio"; reg = <0x48020000 0x14>; interrupt-parent = <&event>; interrupts = <18>; label = "GPIO_0"; gpio-controller; #gpio-cells = <2>; }; gpiob: gpio@48020040 { compatible = "openisa,rv32m1-gpio"; reg = <0x48020040 0x14>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH1, 15)>; label = "GPIO_1"; gpio-controller; #gpio-cells = <2>; }; gpioc: gpio@48020080 { compatible = "openisa,rv32m1-gpio"; reg = <0x48020080 0x14>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH1, 16)>; label = "GPIO_2"; gpio-controller; #gpio-cells = <2>; }; gpiod: gpio@480200c0 { compatible = "openisa,rv32m1-gpio"; reg = <0x480200c0 0x14>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH1, 17)>; label = "GPIO_3"; gpio-controller; #gpio-cells = <2>; }; gpioe: gpio@4100f000 { compatible = "openisa,rv32m1-gpio"; reg = <0x4100f000 0x14>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH1, 27)>; label = "GPIO_4"; gpio-controller; #gpio-cells = <2>; clocks = <&pcc1 0x3c>; }; uart0: lpuart@40042000 { compatible = "openisa,rv32m1-lpuart"; reg = <0x40042000 0x2c>; interrupt-parent = <&event>; interrupts = <17>; clocks = <&pcc0 0x108>; label = "UART_0"; status = "disabled"; }; uart1: lpuart@40043000 { compatible = "openisa,rv32m1-lpuart"; reg = <0x40043000 0x2c>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH1, 13)>; clocks = <&pcc0 0x10c>; label = "UART_1"; status = "disabled"; }; uart2: lpuart@40044000 { compatible = "openisa,rv32m1-lpuart"; reg = <0x40044000 0x2c>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH1, 14)>; clocks = <&pcc0 0x110>; label = "UART_2"; status = "disabled"; }; uart3: lpuart@41036000 { compatible = "openisa,rv32m1-lpuart"; reg = <0x41036000 0x2c>; interrupt-parent = <&intmux>; interrupts = <INTMUX_LEVEL2_IRQ(INTMUX_CH1, 26)>; clocks = <&pcc0 0xd8>; label = "UART_3"; status = "disabled"; }; }; }; |