Boyan Karatotev | 6ed3bf6 | 2023-07-07 13:33:19 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2023-2024, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 8 | #include <dt-bindings/interrupt-controller/irq.h> |
| 9 | |
Kshitij Sisodia | 090a6aa | 2023-11-22 17:03:45 +0000 | [diff] [blame] | 10 | /* If SCMI power domain control is enabled */ |
| 11 | #if TC_SCMI_PD_CTRL_EN |
Boyan Karatotev | 192ad5d | 2023-12-12 15:59:01 +0000 | [diff] [blame] | 12 | #define GPU_SCMI_PD_IDX (PLAT_MAX_CPUS_PER_CLUSTER + 1) |
| 13 | #define DPU_SCMI_PD_IDX (PLAT_MAX_CPUS_PER_CLUSTER + 2) |
Kshitij Sisodia | 090a6aa | 2023-11-22 17:03:45 +0000 | [diff] [blame] | 14 | #endif /* TC_SCMI_PD_CTRL_EN */ |
Boyan Karatotev | 192ad5d | 2023-12-12 15:59:01 +0000 | [diff] [blame] | 15 | |
| 16 | /* All perf is normalized against the big core */ |
| 17 | #define BIG_CAPACITY 1024 |
| 18 | |
Boyan Karatotev | 6ed3bf6 | 2023-07-07 13:33:19 +0000 | [diff] [blame] | 19 | #if TARGET_PLATFORM <= 2 |
Boyan Karatotev | 192ad5d | 2023-12-12 15:59:01 +0000 | [diff] [blame] | 20 | #if TARGET_FLAVOUR_FVP |
| 21 | #define LIT_CAPACITY 406 |
| 22 | #define MID_CAPACITY 912 |
| 23 | #else /* TARGET_FLAVOUR_FPGA */ |
| 24 | #define LIT_CAPACITY 280 |
| 25 | #define MID_CAPACITY 775 |
| 26 | /* this is an area optimized configuration of the big core */ |
| 27 | #define BIG2_CAPACITY 930 |
| 28 | #endif /* TARGET_FLAVOUR_FPGA */ |
| 29 | |
Boyan Karatotev | 6ed3bf6 | 2023-07-07 13:33:19 +0000 | [diff] [blame] | 30 | #define INT_MBOX_RX 317 |
| 31 | #define MHU_TX_ADDR(pref) pref##45000000 /* hex */ |
| 32 | #define MHU_RX_ADDR(pref) pref##45010000 /* hex */ |
| 33 | #define MPAM_ADDR 0x1 0x00010000 /* 0x1_0001_0000 */ |
| 34 | #define UARTCLK_FREQ 5000000 |
| 35 | #elif TARGET_PLATFORM == 3 |
Boyan Karatotev | 192ad5d | 2023-12-12 15:59:01 +0000 | [diff] [blame] | 36 | |
| 37 | #define LIT_CAPACITY 239 |
| 38 | #define MID_CAPACITY 686 |
| 39 | |
Boyan Karatotev | 6ed3bf6 | 2023-07-07 13:33:19 +0000 | [diff] [blame] | 40 | #define INT_MBOX_RX 300 |
| 41 | #define MHU_TX_ADDR(pref) pref##46040000 /* hex */ |
| 42 | #define MHU_RX_ADDR(pref) pref##46140000 /* hex */ |
| 43 | #define MPAM_ADDR 0x0 0x5f010000 /* 0x5f01_0000 */ |
| 44 | #define UARTCLK_FREQ 3750000 |
| 45 | #endif /* TARGET_PLATFORM == 3 */ |
| 46 | |
Boyan Karatotev | 9556276 | 2023-11-15 11:54:33 +0000 | [diff] [blame] | 47 | #if TARGET_FLAVOUR_FVP |
| 48 | #define STDOUT_PATH "serial0:115200n8" |
| 49 | #define GIC_CTRL_ADDR 2c010000 |
| 50 | #define GIC_GICR_OFFSET 0x200000 |
| 51 | #define UART_OFFSET 0x1000 |
| 52 | #define VENCODER_TIMING_CLK 25175000 |
| 53 | #define VENCODER_TIMING \ |
| 54 | clock-frequency = <VENCODER_TIMING_CLK>; \ |
| 55 | hactive = <640>; \ |
| 56 | vactive = <480>; \ |
| 57 | hfront-porch = <16>; \ |
| 58 | hback-porch = <48>; \ |
| 59 | hsync-len = <96>; \ |
| 60 | vfront-porch = <10>; \ |
| 61 | vback-porch = <33>; \ |
| 62 | vsync-len = <2> |
| 63 | #define ETH_COMPATIBLE "smsc,lan91c111" |
| 64 | #define MMC_REMOVABLE cd-gpios = <&sysreg 0 0> |
Davidson K | 938124e | 2023-12-14 12:03:23 +0530 | [diff] [blame] | 65 | #if TARGET_PLATFORM <= 2 |
| 66 | #define DPU_ADDR(pref) pref##2cc00000 |
| 67 | #define DPU_IRQ 69 |
| 68 | #else /* TARGET_PLATFORM >= 3 */ |
| 69 | #define DPU_ADDR(pref) pref##4000000000 |
| 70 | #define DPU_IRQ 579 |
| 71 | #endif /* TARGET_PLATFORM >= 3 */ |
Boyan Karatotev | 9556276 | 2023-11-15 11:54:33 +0000 | [diff] [blame] | 72 | |
| 73 | #else /* TARGET_FLAVOUR_FPGA */ |
| 74 | |
| 75 | #define STDOUT_PATH "serial0:38400n8" |
| 76 | #define GIC_CTRL_ADDR 30000000 |
| 77 | #define GIC_GICR_OFFSET 0x1000000 |
| 78 | #define UART_OFFSET 0x10000 |
| 79 | /* 1440x3200@120 framebuffer */ |
| 80 | #define VENCODER_TIMING_CLK 836000000 |
| 81 | #define VENCODER_TIMING \ |
| 82 | clock-frequency = <VENCODER_TIMING_CLK>; \ |
| 83 | hactive = <1440>; \ |
| 84 | vactive = <3200>; \ |
| 85 | hfront-porch = <136>; \ |
| 86 | hback-porch = <296>; \ |
| 87 | hsync-len = <160>; \ |
| 88 | vfront-porch = <3>; \ |
| 89 | vback-porch = <217>; \ |
| 90 | vsync-len = <10> |
| 91 | #define ETH_COMPATIBLE "smsc,lan9115" |
| 92 | #define MMC_REMOVABLE non-removable |
Davidson K | 938124e | 2023-12-14 12:03:23 +0530 | [diff] [blame] | 93 | #define DPU_ADDR(pref) pref##2cc00000 |
| 94 | #define DPU_IRQ 69 |
Boyan Karatotev | 9556276 | 2023-11-15 11:54:33 +0000 | [diff] [blame] | 95 | #endif /* TARGET_FLAVOUR_FPGA */ |
| 96 | |
| 97 | /* Use SCMI controlled clocks */ |
| 98 | #if TC_DPU_USE_SCMI_CLK |
| 99 | #define DPU_CLK_ATTR1 \ |
| 100 | clocks = <&scmi_clk 0>; \ |
| 101 | clock-names = "aclk" |
| 102 | |
| 103 | #define DPU_CLK_ATTR2 \ |
| 104 | clocks = <&scmi_clk 1>; \ |
| 105 | clock-names = "pxclk" |
| 106 | |
| 107 | #define DPU_CLK_ATTR3 \ |
| 108 | clocks = <&scmi_clk 2>; \ |
| 109 | clock-names = "pxclk" \ |
| 110 | /* Use fixed clocks */ |
| 111 | #else /* !TC_DPU_USE_SCMI_CLK */ |
| 112 | #define DPU_CLK_ATTR1 \ |
| 113 | clocks = <&dpu_aclk>; \ |
| 114 | clock-names = "aclk" |
| 115 | |
| 116 | #define DPU_CLK_ATTR2 \ |
| 117 | clocks = <&dpu_pixel_clk>, <&dpu_aclk>; \ |
| 118 | clock-names = "pxclk", "aclk" |
| 119 | |
| 120 | #define DPU_CLK_ATTR3 DPU_CLK_ATTR2 |
| 121 | #endif /* !TC_DPU_USE_SCMI_CLK */ |
| 122 | |
Boyan Karatotev | 6ed3bf6 | 2023-07-07 13:33:19 +0000 | [diff] [blame] | 123 | / { |
| 124 | #if TARGET_PLATFORM <= 2 |
| 125 | cmn-pmu { |
| 126 | compatible = "arm,ci-700"; |
| 127 | reg = <0x0 0x50000000 0x0 0x10000000>; |
| 128 | interrupts = <GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH>; |
| 129 | }; |
| 130 | #endif /* TARGET_PLATFORM <= 2 */ |
Boyan Karatotev | 9556276 | 2023-11-15 11:54:33 +0000 | [diff] [blame] | 131 | |
| 132 | #if !TC_DPU_USE_SCMI_CLK |
| 133 | dpu_aclk: dpu_aclk { |
| 134 | compatible = "fixed-clock"; |
| 135 | #clock-cells = <0>; |
| 136 | clock-frequency = <VENCODER_TIMING_CLK>; |
| 137 | clock-output-names = "fpga:dpu_aclk"; |
| 138 | }; |
| 139 | |
| 140 | dpu_pixel_clk: dpu-pixel-clk { |
| 141 | compatible = "fixed-clock"; |
| 142 | #clock-cells = <0>; |
| 143 | clock-frequency = <VENCODER_TIMING_CLK>; |
| 144 | clock-output-names = "pxclk"; |
| 145 | }; |
| 146 | #endif /* !TC_DPU_USE_SCMI_CLK */ |
Boyan Karatotev | 6ed3bf6 | 2023-07-07 13:33:19 +0000 | [diff] [blame] | 147 | }; |