Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014 MediaTek Inc. |
| 3 | * Author: Eddie Huang <eddie.huang@mediatek.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
Sascha Hauer | f2ce701 | 2015-05-20 15:32:44 +0200 | [diff] [blame] | 14 | #include <dt-bindings/clock/mt8173-clk.h> |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 15 | #include <dt-bindings/interrupt-controller/irq.h> |
| 16 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
Sascha Hauer | 6cf15fc | 2015-05-20 15:32:46 +0200 | [diff] [blame^] | 17 | #include <dt-bindings/reset-controller/mt8173-resets.h> |
Hongzhou Yang | 359f936 | 2015-03-09 21:54:39 -0700 | [diff] [blame] | 18 | #include "mt8173-pinfunc.h" |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 19 | |
| 20 | / { |
| 21 | compatible = "mediatek,mt8173"; |
| 22 | interrupt-parent = <&sysirq>; |
| 23 | #address-cells = <2>; |
| 24 | #size-cells = <2>; |
| 25 | |
| 26 | cpus { |
| 27 | #address-cells = <1>; |
| 28 | #size-cells = <0>; |
| 29 | |
| 30 | cpu-map { |
| 31 | cluster0 { |
| 32 | core0 { |
| 33 | cpu = <&cpu0>; |
| 34 | }; |
| 35 | core1 { |
| 36 | cpu = <&cpu1>; |
| 37 | }; |
| 38 | }; |
| 39 | |
| 40 | cluster1 { |
| 41 | core0 { |
| 42 | cpu = <&cpu2>; |
| 43 | }; |
| 44 | core1 { |
| 45 | cpu = <&cpu3>; |
| 46 | }; |
| 47 | }; |
| 48 | }; |
| 49 | |
| 50 | cpu0: cpu@0 { |
| 51 | device_type = "cpu"; |
| 52 | compatible = "arm,cortex-a53"; |
| 53 | reg = <0x000>; |
| 54 | }; |
| 55 | |
| 56 | cpu1: cpu@1 { |
| 57 | device_type = "cpu"; |
| 58 | compatible = "arm,cortex-a53"; |
| 59 | reg = <0x001>; |
| 60 | enable-method = "psci"; |
| 61 | }; |
| 62 | |
| 63 | cpu2: cpu@100 { |
| 64 | device_type = "cpu"; |
| 65 | compatible = "arm,cortex-a57"; |
| 66 | reg = <0x100>; |
| 67 | enable-method = "psci"; |
| 68 | }; |
| 69 | |
| 70 | cpu3: cpu@101 { |
| 71 | device_type = "cpu"; |
| 72 | compatible = "arm,cortex-a57"; |
| 73 | reg = <0x101>; |
| 74 | enable-method = "psci"; |
| 75 | }; |
| 76 | }; |
| 77 | |
| 78 | psci { |
| 79 | compatible = "arm,psci"; |
| 80 | method = "smc"; |
| 81 | cpu_suspend = <0x84000001>; |
| 82 | cpu_off = <0x84000002>; |
| 83 | cpu_on = <0x84000003>; |
| 84 | }; |
| 85 | |
Sascha Hauer | f2ce701 | 2015-05-20 15:32:44 +0200 | [diff] [blame] | 86 | clk26m: oscillator@0 { |
| 87 | compatible = "fixed-clock"; |
| 88 | #clock-cells = <0>; |
| 89 | clock-frequency = <26000000>; |
| 90 | clock-output-names = "clk26m"; |
| 91 | }; |
| 92 | |
| 93 | clk32k: oscillator@1 { |
| 94 | compatible = "fixed-clock"; |
| 95 | #clock-cells = <0>; |
| 96 | clock-frequency = <32000>; |
| 97 | clock-output-names = "clk32k"; |
| 98 | }; |
| 99 | |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 100 | timer { |
| 101 | compatible = "arm,armv8-timer"; |
| 102 | interrupt-parent = <&gic>; |
| 103 | interrupts = <GIC_PPI 13 |
Daniel Kurtz | e881ad1 | 2015-05-20 18:20:07 +0800 | [diff] [blame] | 104 | (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 105 | <GIC_PPI 14 |
Daniel Kurtz | e881ad1 | 2015-05-20 18:20:07 +0800 | [diff] [blame] | 106 | (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 107 | <GIC_PPI 11 |
Daniel Kurtz | e881ad1 | 2015-05-20 18:20:07 +0800 | [diff] [blame] | 108 | (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 109 | <GIC_PPI 10 |
Daniel Kurtz | e881ad1 | 2015-05-20 18:20:07 +0800 | [diff] [blame] | 110 | (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 111 | }; |
| 112 | |
| 113 | soc { |
| 114 | #address-cells = <2>; |
| 115 | #size-cells = <2>; |
| 116 | compatible = "simple-bus"; |
| 117 | ranges; |
| 118 | |
Sascha Hauer | f2ce701 | 2015-05-20 15:32:44 +0200 | [diff] [blame] | 119 | topckgen: clock-controller@10000000 { |
| 120 | compatible = "mediatek,mt8173-topckgen"; |
| 121 | reg = <0 0x10000000 0 0x1000>; |
| 122 | #clock-cells = <1>; |
| 123 | }; |
| 124 | |
| 125 | infracfg: power-controller@10001000 { |
| 126 | compatible = "mediatek,mt8173-infracfg", "syscon"; |
| 127 | reg = <0 0x10001000 0 0x1000>; |
| 128 | #clock-cells = <1>; |
| 129 | #reset-cells = <1>; |
| 130 | }; |
| 131 | |
| 132 | pericfg: power-controller@10003000 { |
| 133 | compatible = "mediatek,mt8173-pericfg", "syscon"; |
| 134 | reg = <0 0x10003000 0 0x1000>; |
| 135 | #clock-cells = <1>; |
| 136 | #reset-cells = <1>; |
| 137 | }; |
| 138 | |
| 139 | syscfg_pctl_a: syscfg_pctl_a@10005000 { |
| 140 | compatible = "mediatek,mt8173-pctl-a-syscfg", "syscon"; |
| 141 | reg = <0 0x10005000 0 0x1000>; |
| 142 | }; |
| 143 | |
| 144 | pio: pinctrl@0x10005000 { |
Hongzhou Yang | 359f936 | 2015-03-09 21:54:39 -0700 | [diff] [blame] | 145 | compatible = "mediatek,mt8173-pinctrl"; |
Yingjoe Chen | 6769b93 | 2015-05-01 14:49:31 +0800 | [diff] [blame] | 146 | reg = <0 0x1000b000 0 0x1000>; |
Hongzhou Yang | 359f936 | 2015-03-09 21:54:39 -0700 | [diff] [blame] | 147 | mediatek,pctl-regmap = <&syscfg_pctl_a>; |
| 148 | pins-are-numbered; |
| 149 | gpio-controller; |
| 150 | #gpio-cells = <2>; |
| 151 | interrupt-controller; |
| 152 | #interrupt-cells = <2>; |
| 153 | interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>, |
Yingjoe Chen | 6769b93 | 2015-05-01 14:49:31 +0800 | [diff] [blame] | 154 | <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>, |
| 155 | <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>; |
| 156 | }; |
| 157 | |
| 158 | syscfg_pctl_a: syscfg_pctl_a@10005000 { |
| 159 | compatible = "mediatek,mt8173-pctl-a-syscfg", "syscon"; |
| 160 | reg = <0 0x10005000 0 0x1000>; |
Hongzhou Yang | 359f936 | 2015-03-09 21:54:39 -0700 | [diff] [blame] | 161 | }; |
| 162 | |
Sascha Hauer | 6cf15fc | 2015-05-20 15:32:46 +0200 | [diff] [blame^] | 163 | pwrap: pwrap@1000d000 { |
| 164 | compatible = "mediatek,mt8173-pwrap"; |
| 165 | reg = <0 0x1000d000 0 0x1000>; |
| 166 | reg-names = "pwrap"; |
| 167 | interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>; |
| 168 | resets = <&infracfg MT8173_INFRA_PMIC_WRAP_RST>; |
| 169 | reset-names = "pwrap"; |
| 170 | clocks = <&infracfg CLK_INFRA_PMICSPI>, <&infracfg CLK_INFRA_PMICWRAP>; |
| 171 | clock-names = "spi", "wrap"; |
| 172 | }; |
| 173 | |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 174 | sysirq: intpol-controller@10200620 { |
| 175 | compatible = "mediatek,mt8173-sysirq", |
Daniel Kurtz | e881ad1 | 2015-05-20 18:20:07 +0800 | [diff] [blame] | 176 | "mediatek,mt6577-sysirq"; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 177 | interrupt-controller; |
| 178 | #interrupt-cells = <3>; |
| 179 | interrupt-parent = <&gic>; |
| 180 | reg = <0 0x10200620 0 0x20>; |
| 181 | }; |
| 182 | |
Sascha Hauer | f2ce701 | 2015-05-20 15:32:44 +0200 | [diff] [blame] | 183 | apmixedsys: clock-controller@10209000 { |
| 184 | compatible = "mediatek,mt8173-apmixedsys"; |
| 185 | reg = <0 0x10209000 0 0x1000>; |
| 186 | #clock-cells = <1>; |
| 187 | }; |
| 188 | |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 189 | gic: interrupt-controller@10220000 { |
| 190 | compatible = "arm,gic-400"; |
| 191 | #interrupt-cells = <3>; |
| 192 | interrupt-parent = <&gic>; |
| 193 | interrupt-controller; |
| 194 | reg = <0 0x10221000 0 0x1000>, |
| 195 | <0 0x10222000 0 0x2000>, |
| 196 | <0 0x10224000 0 0x2000>, |
| 197 | <0 0x10226000 0 0x2000>; |
| 198 | interrupts = <GIC_PPI 9 |
| 199 | (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; |
| 200 | }; |
| 201 | |
| 202 | uart0: serial@11002000 { |
| 203 | compatible = "mediatek,mt8173-uart", |
Daniel Kurtz | e881ad1 | 2015-05-20 18:20:07 +0800 | [diff] [blame] | 204 | "mediatek,mt6577-uart"; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 205 | reg = <0 0x11002000 0 0x400>; |
| 206 | interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_LOW>; |
Sascha Hauer | 0e84faa | 2015-05-20 15:32:45 +0200 | [diff] [blame] | 207 | clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>; |
| 208 | clock-names = "baud", "bus"; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 209 | status = "disabled"; |
| 210 | }; |
| 211 | |
| 212 | uart1: serial@11003000 { |
| 213 | compatible = "mediatek,mt8173-uart", |
Daniel Kurtz | e881ad1 | 2015-05-20 18:20:07 +0800 | [diff] [blame] | 214 | "mediatek,mt6577-uart"; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 215 | reg = <0 0x11003000 0 0x400>; |
| 216 | interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>; |
Sascha Hauer | 0e84faa | 2015-05-20 15:32:45 +0200 | [diff] [blame] | 217 | clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>; |
| 218 | clock-names = "baud", "bus"; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 219 | status = "disabled"; |
| 220 | }; |
| 221 | |
| 222 | uart2: serial@11004000 { |
| 223 | compatible = "mediatek,mt8173-uart", |
Daniel Kurtz | e881ad1 | 2015-05-20 18:20:07 +0800 | [diff] [blame] | 224 | "mediatek,mt6577-uart"; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 225 | reg = <0 0x11004000 0 0x400>; |
| 226 | interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>; |
Sascha Hauer | 0e84faa | 2015-05-20 15:32:45 +0200 | [diff] [blame] | 227 | clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>; |
| 228 | clock-names = "baud", "bus"; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 229 | status = "disabled"; |
| 230 | }; |
| 231 | |
| 232 | uart3: serial@11005000 { |
| 233 | compatible = "mediatek,mt8173-uart", |
Daniel Kurtz | e881ad1 | 2015-05-20 18:20:07 +0800 | [diff] [blame] | 234 | "mediatek,mt6577-uart"; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 235 | reg = <0 0x11005000 0 0x400>; |
| 236 | interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>; |
Sascha Hauer | 0e84faa | 2015-05-20 15:32:45 +0200 | [diff] [blame] | 237 | clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>; |
| 238 | clock-names = "baud", "bus"; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 239 | status = "disabled"; |
| 240 | }; |
| 241 | }; |
Eddie Huang | b3a3724 | 2015-12-01 10:14:00 +0100 | [diff] [blame] | 242 | }; |
| 243 | |