|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
| 2 | +/* |
| 3 | + * Copyright(C) 2022, Intel Corporation |
| 4 | + */ |
| 5 | + |
| 6 | +/* Add this piece of dtsi fragment as #include "fm87_ftile_25g_ptp.dtsi" |
| 7 | + * in the file socfpga_fm87_ftile_25g_ptp.dts. Compile it in the kernel along with |
| 8 | + * socfpga_agilex.dtsi |
| 9 | + */ |
| 10 | + |
| 11 | +/{ |
| 12 | + soc { |
| 13 | + agilex_hps_bridges: bus@88000000 { |
| 14 | + compatible = "simple-bus"; |
| 15 | + reg = <0x80000000 0x60000000>, |
| 16 | + <0xf9000000 0x00100000>; |
| 17 | + reg-names = "axi_h2f", "axi_h2f_lw"; |
| 18 | + #address-cells = <2>; |
| 19 | + #size-cells = <1>; |
| 20 | + ranges = <0x00000000 0x00000000 0xf9000000 0x00001000>, |
| 21 | + <0x00000001 0x00000000 0x80000000 0x00040000>, |
| 22 | + <0x00000001 0x04040050 0x84040050 0x00000010>, |
| 23 | + <0x00000001 0x04040040 0x84040040 0x00000010>; |
| 24 | + |
| 25 | + |
| 26 | + qsfp_eth0: qsfp-eth0 { |
| 27 | + compatible = "sff,qsfp"; |
| 28 | + i2c-bus = <&i2c0>; |
| 29 | + qsfpdd_initmode-gpio = <&qsfpdd_ctrl_pio 1 GPIO_ACTIVE_HIGH>; |
| 30 | + qsfpdd_modseln-gpio = <&qsfpdd_ctrl_pio 2 GPIO_ACTIVE_LOW>; |
| 31 | + qsfpdd_modprsn-gpio = <&qsfpdd_status_pio 0 GPIO_ACTIVE_LOW>; |
| 32 | + qsfpdd_resetn-gpio = <&qsfpdd_ctrl_pio 0 GPIO_ACTIVE_HIGH>; |
| 33 | + qsfpdd_intn-gpio = <&qsfpdd_status_pio 1 GPIO_ACTIVE_LOW>; |
| 34 | + agilex_hps_spim = <&qsfpdd_ctrl_pio 3 GPIO_ACTIVE_HIGH>; |
| 35 | + maximum-power-milliwatt = <1000>; |
| 36 | + status = "disable"; |
| 37 | +/* status = "okay"; */ |
| 38 | + }; |
| 39 | + |
| 40 | + qsfpdd_status_pio: gpio@4040050 { |
| 41 | + compatible = "altr,pio-1.0"; |
| 42 | + reg = <0x00000001 0x04040050 0x10>; |
| 43 | + interrupt-parent = <&intc>; |
| 44 | + interrupts = <0 22 4>; |
| 45 | + altr,gpio-bank-width = <4>; |
| 46 | + altr,interrupt-type = <2>; |
| 47 | + |
| 48 | + altr,interrupt_type = <2>; |
| 49 | + #gpio-cells = <2>; |
| 50 | + gpio-controller; |
| 51 | + status = "okay"; |
| 52 | + /*status = "disable";*/ |
| 53 | + }; |
| 54 | + |
| 55 | + qsfpdd_ctrl_pio: gpio@4040040 { |
| 56 | + compatible = "altr,pio-1.0"; |
| 57 | + reg = <0x00000001 0x04040040 0x10>; |
| 58 | + interrupt-parent = <&intc>; |
| 59 | + interrupts = <0 23 4>; |
| 60 | + altr,gpio-bank-width = <4>; |
| 61 | + altr,interrupt-type = <2>; |
| 62 | + altr,interrupt_type = <2>; |
| 63 | + #gpio-cells = <2>; |
| 64 | + gpio-controller; |
| 65 | + status = "okay"; |
| 66 | + /*status = "disable"; */ |
| 67 | + }; |
| 68 | + |
| 69 | + }; |
| 70 | + clocks { |
| 71 | + tod_in_clock: tod_in_clock { |
| 72 | + #clock-cells = <0>; |
| 73 | + compatible = "fixed-clock"; |
| 74 | + clock-frequency = <156250000>; |
| 75 | + clock-output-names = "tod_in_clock"; |
| 76 | + }; |
| 77 | + }; |
| 78 | + |
| 79 | + ptp_clockcleaner: ptp_clockcleaner { |
| 80 | + compatible = "intel, freq-steering-zl-i2c"; |
| 81 | + dpll-name = "zl30733"; |
| 82 | + interface = "i2c"; |
| 83 | + bus-num = <1>; |
| 84 | + bus-address = <0x70>; |
| 85 | + }; |
| 86 | + |
| 87 | + tod_0_clk: tod_0_clk { |
| 88 | + compatible = "intel, tod"; |
| 89 | + reg-names = "tod_ctrl", |
| 90 | + "pps_ctrl"; |
| 91 | + reg = <0x84040000 0x00000040>, |
| 92 | + <0x84040100 0x00000040>; |
| 93 | + interrupt-parent = <&intc>; |
| 94 | + interrupt-names = "pps_irq"; |
| 95 | + interrupts = <0 19 4>; |
| 96 | + clocks = <&tod_in_clock>; |
| 97 | + clock-names = "tod_clock"; |
| 98 | + status = "okay"; |
| 99 | + altr,has-ptp-clockcleaner; |
| 100 | + clock-cleaner = <&ptp_clockcleaner>; |
| 101 | + }; |
| 102 | + |
| 103 | + hssiss_0_hssiss: hssiss_0_hssiss { |
| 104 | + compatible = "intel, hssiss-1.0"; |
| 105 | + reg-names = "sscsr"; |
| 106 | + reg = <0x88000000 0x04000000>; |
| 107 | + reset-mode ="reg"; |
| 108 | + }; |
| 109 | + hssi_0_eth: hssi_0_eth@88000000 { |
| 110 | + reg-names = "tx_pref" , |
| 111 | + "tx_csr" , |
| 112 | + "tx_fifo" , |
| 113 | + "rx_pref" , |
| 114 | + "rx_csr" , |
| 115 | + "rx_fifo" ; |
| 116 | + |
| 117 | + reg = <0x8c480000 0x00000020>, |
| 118 | + <0x8c480020 0x00000020>, |
| 119 | + <0x8c480040 0x00000020>, |
| 120 | + <0x8c480080 0x00000020>, |
| 121 | + <0x8c4800A0 0x00000020>, |
| 122 | + <0x8c4800C0 0x00000010>; |
| 123 | + |
| 124 | + compatible = "altr,hssi-ftile-1.0"; |
| 125 | + tile_chan = <0x8>; |
| 126 | + hssi_port = <0x8>; |
| 127 | + phy-mode = "10gbase-r"; |
| 128 | + tod = <&tod_0_clk>; |
| 129 | + hssiss = <&hssiss_0_hssiss>; |
| 130 | + pma_type = <0x0>; // FGT - 0x00, FHT = 0x1000 |
| 131 | + altr,tx-pma-delay-ns = <0xD>; |
| 132 | + altr,rx-pma-delay-ns = <0x8>; |
| 133 | + altr,tx-pma-delay-fns = <0x24D>; |
| 134 | + altr,rx-pma-delay-fns = <0x3E97>; |
| 135 | + altr,tx-external-phy-delay-ns = <0x0>; |
| 136 | + altr,rx-external-phy-delay-ns = <0x0>; |
| 137 | + fec-cw-pos-rx = <0x0>; |
| 138 | + fec-type="no-fec"; |
| 139 | + interrupt-parent = <&intc>; |
| 140 | + interrupt-names = "tx_irq", "rx_irq"; |
| 141 | + interrupts = <0 24 4>, <0 25 4>; |
| 142 | + qsfp-lane = <0x0>; |
| 143 | + rx-fifo-depth = <0x4000>; |
| 144 | + tx-fifo-depth = <0x1000>; |
| 145 | + rx-fifo-almost-full = <0x2000>; |
| 146 | + rx-fifo-almost-empty = <0x1000>; |
| 147 | + altr,has-ptp; |
| 148 | + ptp_accu_mode = "Advanced"; |
| 149 | + ptp_tx_routing_adj = <0xDE9F>; //56,991 |
| 150 | + ptp_rx_routing_adj = <0xD625>; //54,821 |
| 151 | + status = "okay"; |
| 152 | + fixed-link { |
| 153 | + speed =<10000>; |
| 154 | + full-duplex; |
| 155 | + }; |
| 156 | + }; |
| 157 | + hssi_1_eth: hssi_1_eth@88000000 { |
| 158 | + reg-names = "tx_pref" , |
| 159 | + "tx_csr" , |
| 160 | + "tx_fifo" , |
| 161 | + "rx_pref" , |
| 162 | + "rx_csr" , |
| 163 | + "rx_fifo" ; |
| 164 | + |
| 165 | + reg = <0x8c4C0000 0x00000020>, |
| 166 | + <0x8c4C0020 0x00000020>, |
| 167 | + <0x8c4C0040 0x00000020>, |
| 168 | + <0x8c4C0080 0x00000020>, |
| 169 | + <0x8c4C00A0 0x00000020>, |
| 170 | + <0x8c4C00C0 0x00000010>; |
| 171 | + |
| 172 | + compatible = "altr,hssi-ftile-1.0"; |
| 173 | + tile_chan = <0x9>; |
| 174 | + hssi_port = <0x9>; |
| 175 | + phy-mode = "10gbase-r"; |
| 176 | + tod = <&tod_0_clk>; |
| 177 | + hssiss = <&hssiss_0_hssiss>; |
| 178 | + pma_type = <0x0>; // FGT - 0x00, FHT = 0x1000 |
| 179 | + altr,tx-pma-delay-ns = <0xD>; |
| 180 | + altr,rx-pma-delay-ns = <0x8>; |
| 181 | + altr,tx-pma-delay-fns = <0x24D>; |
| 182 | + altr,rx-pma-delay-fns = <0x3E97>; |
| 183 | + altr,tx-external-phy-delay-ns = <0x0>; |
| 184 | + altr,rx-external-phy-delay-ns = <0x0>; |
| 185 | + fec-cw-pos-rx = <0x0>; |
| 186 | + fec-type="no-fec"; |
| 187 | + interrupt-parent = <&intc>; |
| 188 | + interrupt-names = "tx_irq", "rx_irq"; |
| 189 | + interrupts = <0 26 4>, <0 27 4>; |
| 190 | + qsfp-lane = <0x0>; |
| 191 | + rx-fifo-depth = <0x4000>; |
| 192 | + tx-fifo-depth = <0x1000>; |
| 193 | + rx-fifo-almost-full = <0x2000>; |
| 194 | + rx-fifo-almost-empty = <0x1000>; |
| 195 | + altr,has-ptp; |
| 196 | + ptp_accu_mode = "Advanced"; |
| 197 | + ptp_tx_routing_adj = <0xDE3C>; //56,892 |
| 198 | + ptp_rx_routing_adj = <0xD73F>; //55,103 |
| 199 | + status = "okay"; |
| 200 | + fixed-link { |
| 201 | + speed =<10000>; |
| 202 | + full-duplex; |
| 203 | + }; |
| 204 | + }; |
| 205 | + }; |
| 206 | +}; |
0 commit comments