Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * U-Boot additions |
| 4 | * |
| 5 | * Copyright (C) 2024 Intel Corporation <www.intel.com> |
Tien Fong Chee | c7e3112 | 2025-02-18 16:34:56 +0800 | [diff] [blame] | 6 | * Copyright (C) 2025 Altera Corporation <www.altera.com> |
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include "socfpga_agilex5-u-boot.dtsi" |
| 10 | |
| 11 | /{ |
| 12 | aliases { |
| 13 | spi0 = &qspi; |
| 14 | freeze_br0 = &freeze_controller; |
| 15 | }; |
| 16 | |
| 17 | soc { |
| 18 | freeze_controller: freeze_controller@0x20000450 { |
| 19 | compatible = "altr,freeze-bridge-controller"; |
| 20 | reg = <0x20000450 0x00000010>; |
| 21 | status = "disabled"; |
| 22 | }; |
| 23 | }; |
| 24 | |
Tingting Meng | a1a24f1 | 2025-02-21 21:49:41 +0800 | [diff] [blame] | 25 | /* |
| 26 | * Both Memory base address and size default info is retrieved from HW setting. |
| 27 | * Reconfiguration / Overwrite these info can be done with examples below. |
Tingting Meng | dc6c927 | 2025-04-15 14:50:51 +0800 | [diff] [blame] | 28 | * |
| 29 | * When LPDDR ECC is enabled, the last 1/8 of the memory region must |
| 30 | * be reserved for the Inline ECC buffer. |
| 31 | * |
Tingting Meng | a1a24f1 | 2025-02-21 21:49:41 +0800 | [diff] [blame] | 32 | * Example for memory size with 2GB: |
| 33 | * memory { |
| 34 | * reg = <0x0 0x80000000 0x0 0x80000000>; |
| 35 | * }; |
Tingting Meng | dc6c927 | 2025-04-15 14:50:51 +0800 | [diff] [blame] | 36 | * |
Tingting Meng | a1a24f1 | 2025-02-21 21:49:41 +0800 | [diff] [blame] | 37 | * Example for memory size with 8GB: |
| 38 | * memory { |
| 39 | * reg = <0x0 0x80000000 0x0 0x80000000>, |
| 40 | * <0x8 0x80000000 0x1 0x80000000>; |
| 41 | * }; |
Tingting Meng | dc6c927 | 2025-04-15 14:50:51 +0800 | [diff] [blame] | 42 | * |
Tingting Meng | a1a24f1 | 2025-02-21 21:49:41 +0800 | [diff] [blame] | 43 | * Example for memory size with 32GB: |
| 44 | * memory { |
| 45 | * reg = <0x0 0x80000000 0x0 0x80000000>, |
| 46 | * <0x8 0x80000000 0x7 0x80000000>; |
| 47 | * }; |
Tingting Meng | dc6c927 | 2025-04-15 14:50:51 +0800 | [diff] [blame] | 48 | * |
Tingting Meng | a1a24f1 | 2025-02-21 21:49:41 +0800 | [diff] [blame] | 49 | * Example for memory size with 512GB: |
| 50 | * memory { |
| 51 | * reg = <0x0 0x80000000 0x0 0x80000000>, |
| 52 | * <0x8 0x80000000 0x7 0x80000000>, |
| 53 | * <0x88 0x00000000 0x78 0x00000000>; |
| 54 | * }; |
Tingting Meng | dc6c927 | 2025-04-15 14:50:51 +0800 | [diff] [blame] | 55 | * |
| 56 | * Example for memory size with 2GB with LPDDR Inline ECC ON: |
| 57 | * memory { |
| 58 | * reg = <0x0 0x80000000 0x0 0x70000000>; |
| 59 | * }; |
| 60 | * |
| 61 | * Example for memory size with 8GB with LPDDR Inline ECC ON: |
| 62 | * memory { |
| 63 | * reg = <0x0 0x80000000 0x0 0x80000000>, |
| 64 | * <0x8 0x80000000 0x1 0x40000000>; |
| 65 | * }; |
Tingting Meng | a1a24f1 | 2025-02-21 21:49:41 +0800 | [diff] [blame] | 66 | */ |
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 67 | |
| 68 | chosen { |
| 69 | stdout-path = "serial0:115200n8"; |
| 70 | u-boot,spl-boot-order = &mmc,&flash0,"/memory"; |
| 71 | }; |
| 72 | }; |
| 73 | |
| 74 | &flash0 { |
| 75 | compatible = "jedec,spi-nor"; |
| 76 | spi-tx-bus-width = <4>; |
| 77 | spi-rx-bus-width = <4>; |
| 78 | bootph-all; |
| 79 | /delete-property/ cdns,read-delay; |
| 80 | }; |
| 81 | |
Dinesh Maniyam | 2636895 | 2025-02-27 00:18:16 +0800 | [diff] [blame] | 82 | &flash1 { |
| 83 | bootph-all; |
| 84 | }; |
| 85 | |
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 86 | &i3c0 { |
| 87 | bootph-all; |
| 88 | }; |
| 89 | |
| 90 | &i3c1 { |
| 91 | bootph-all; |
| 92 | }; |
| 93 | |
| 94 | &mmc { |
| 95 | status = "okay"; |
| 96 | bus-width = <4>; |
| 97 | sd-uhs-sdr50; |
| 98 | cap-mmc-highspeed; |
| 99 | bootph-all; |
| 100 | }; |
| 101 | |
| 102 | &combophy0 { |
| 103 | status = "okay"; |
| 104 | bootph-all; |
| 105 | cdns,phy-use-ext-lpbk-dqs = <1>; |
| 106 | cdns,phy-use-lpbk-dqs = <1>; |
| 107 | cdns,phy-use-phony-dqs = <1>; |
| 108 | cdns,phy-use-phony-dqs-cmd = <1>; |
| 109 | cdns,phy-io-mask-always-on = <0>; |
| 110 | cdns,phy-io-mask-end = <5>; |
| 111 | cdns,phy-io-mask-start = <0>; |
| 112 | cdns,phy-data-select-oe-end = <1>; |
| 113 | cdns,phy-sync-method = <1>; |
| 114 | cdns,phy-sw-half-cycle-shift = <0>; |
| 115 | cdns,phy-rd-del-sel = <52>; |
| 116 | cdns,phy-underrun-suppress = <1>; |
| 117 | cdns,phy-gate-cfg-always-on = <1>; |
| 118 | cdns,phy-param-dll-bypass-mode = <1>; |
| 119 | cdns,phy-param-phase-detect-sel = <2>; |
| 120 | cdns,phy-param-dll-start-point = <254>; |
| 121 | cdns,phy-read-dqs-cmd-delay = <0>; |
| 122 | cdns,phy-clk-wrdqs-delay = <0>; |
| 123 | cdns,phy-clk-wr-delay = <0>; |
| 124 | cdns,phy-read-dqs-delay = <0>; |
| 125 | cdns,phy-phony-dqs-timing = <0>; |
| 126 | cdns,hrs09-rddata-en = <1>; |
| 127 | cdns,hrs09-rdcmd-en = <1>; |
| 128 | cdns,hrs09-extended-wr-mode = <1>; |
| 129 | cdns,hrs09-extended-rd-mode = <1>; |
| 130 | cdns,hrs10-hcsdclkadj = <3>; |
| 131 | cdns,hrs16-wrdata1-sdclk-dly = <0>; |
| 132 | cdns,hrs16-wrdata0-sdclk-dly = <0>; |
| 133 | cdns,hrs16-wrcmd1-sdclk-dly = <0>; |
| 134 | cdns,hrs16-wrcmd0-sdclk-dly = <0>; |
| 135 | cdns,hrs16-wrdata1-dly = <0>; |
| 136 | cdns,hrs16-wrdata0-dly = <0>; |
| 137 | cdns,hrs16-wrcmd1-dly = <0>; |
| 138 | cdns,hrs16-wrcmd0-dly = <0>; |
| 139 | cdns,hrs07-rw-compensate = <10>; |
| 140 | cdns,hrs07-idelay-val = <0>; |
| 141 | }; |
| 142 | |
| 143 | &qspi { |
| 144 | status = "okay"; |
| 145 | }; |
| 146 | |
Dinesh Maniyam | 2636895 | 2025-02-27 00:18:16 +0800 | [diff] [blame] | 147 | &nand { |
| 148 | bootph-all; |
| 149 | }; |
| 150 | |
Jit Loon Lim | 977071e | 2024-03-12 22:01:03 +0800 | [diff] [blame] | 151 | &timer0 { |
| 152 | bootph-all; |
| 153 | }; |
| 154 | |
| 155 | &timer1 { |
| 156 | bootph-all; |
| 157 | }; |
| 158 | |
| 159 | &timer2 { |
| 160 | bootph-all; |
| 161 | }; |
| 162 | |
| 163 | &timer3 { |
| 164 | bootph-all; |
| 165 | }; |
| 166 | |
| 167 | &watchdog0 { |
| 168 | bootph-all; |
| 169 | }; |
| 170 | |
Tien Fong Chee | c7e3112 | 2025-02-18 16:34:56 +0800 | [diff] [blame] | 171 | &gmac0 { |
| 172 | status = "okay"; |
| 173 | phy-mode = "rgmii"; |
| 174 | phy-handle = <&emac0_phy0>; |
| 175 | |
| 176 | max-frame-size = <9000>; |
| 177 | |
| 178 | mdio0 { |
| 179 | #address-cells = <1>; |
| 180 | #size-cells = <0>; |
| 181 | compatible = "snps,dwxgmac-mdio"; |
| 182 | emac0_phy0: ethernet-phy@0 { |
| 183 | reg = <0>; |
| 184 | }; |
| 185 | }; |
| 186 | }; |
| 187 | |
| 188 | &gmac2 { |
| 189 | status = "okay"; |
| 190 | phy-mode = "rgmii"; |
| 191 | phy-handle = <&emac2_phy0>; |
| 192 | |
| 193 | max-frame-size = <9000>; |
| 194 | |
| 195 | mdio0 { |
| 196 | #address-cells = <1>; |
| 197 | #size-cells = <0>; |
| 198 | compatible = "snps,dwxgmac-mdio"; |
| 199 | emac2_phy0: ethernet-phy@0 { |
| 200 | reg = <0>; |
| 201 | }; |
| 202 | }; |
| 203 | }; |