Commit f83ef0dac83110d20389eb71f09285f009f3d198
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
Merge tag 'mips-pull-2019-11-16' of git://git.denx.de/u-boot-mips
- MIPS: mscc: various enhancements for Luton and Ocelot platforms - MIPS: mscc: added support for Jaguar2 platform - MIPS: optimised SPL linker script - MIPS: bcm6368: fix restart flow issues - MIPS: fixed CONFIG_OF_EMBED warnings for all MIPS boards - MIPS: mt7688: small fixes and enhancements - mmc: compile-out write support if disabled
Showing 91 changed files Inline Diff
- MAINTAINERS
- arch/mips/cpu/u-boot-spl.lds
- arch/mips/cpu/u-boot.lds
- arch/mips/dts/Makefile
- arch/mips/dts/gardena-smart-gateway-mt7688.dts
- arch/mips/dts/jr2_pcb110.dts
- arch/mips/dts/jr2_pcb111.dts
- arch/mips/dts/luton_pcb090.dts
- arch/mips/dts/luton_pcb091.dts
- arch/mips/dts/mscc,jr2.dtsi
- arch/mips/dts/mscc,luton.dtsi
- arch/mips/dts/mscc,ocelot.dtsi
- arch/mips/dts/ocelot_pcb120.dts
- arch/mips/dts/ocelot_pcb123.dts
- arch/mips/dts/serval2_pcb112.dts
- arch/mips/mach-jz47xx/jz4780/u-boot-spl.lds
- arch/mips/mach-mscc/Kconfig
- arch/mips/mach-mscc/Makefile
- arch/mips/mach-mscc/cpu.c
- arch/mips/mach-mscc/dram.c
- arch/mips/mach-mscc/gpio.c
- arch/mips/mach-mscc/include/mach/common.h
- arch/mips/mach-mscc/include/mach/ddr.h
- arch/mips/mach-mscc/include/mach/jr2/jr2.h
- arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h
- arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h
- arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h
- arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h
- arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h
- arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h
- arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h
- arch/mips/mach-mscc/phy.c
- arch/mips/mach-mscc/reset.c
- board/mscc/common/Makefile
- board/mscc/common/spi.c
- board/mscc/jr2/Kconfig
- board/mscc/jr2/Makefile
- board/mscc/jr2/jr2.c
- board/mscc/luton/luton.c
- board/mscc/ocelot/ocelot.c
- configs/bcm968380gerg_ram_defconfig
- configs/boston32r2_defconfig
- configs/boston32r2el_defconfig
- configs/boston32r6_defconfig
- configs/boston32r6el_defconfig
- configs/boston64r2_defconfig
- configs/boston64r2el_defconfig
- configs/boston64r6_defconfig
- configs/boston64r6el_defconfig
- configs/ci20_mmc_defconfig
- configs/comtrend_ar5315u_ram_defconfig
- configs/comtrend_ar5387un_ram_defconfig
- configs/comtrend_ct5361_ram_defconfig
- configs/comtrend_vr3032u_ram_defconfig
- configs/comtrend_wap5813n_ram_defconfig
- configs/gardena-smart-gateway-mt7688-ram_defconfig
- configs/gardena-smart-gateway-mt7688_defconfig
- configs/huawei_hg556a_ram_defconfig
- configs/imgtec_xilfpga_defconfig
- configs/malta64_defconfig
- configs/malta64el_defconfig
- configs/malta_defconfig
- configs/maltael_defconfig
- configs/mscc_jr2_defconfig
- configs/mscc_luton_defconfig
- configs/mscc_ocelot_defconfig
- configs/mscc_ocelot_pcb120_defconfig
- configs/netgear_cg3100d_ram_defconfig
- configs/netgear_dgnd3700v2_ram_defconfig
- configs/pic32mzdask_defconfig
- configs/sagem_f@st1704_ram_defconfig
- configs/sfr_nb4-ser_ram_defconfig
- doc/device-tree-bindings/gpio/mscc_sgpio.txt
- drivers/gpio/Kconfig
- drivers/gpio/Makefile
- drivers/gpio/gpio-mscc-bitbang-spi.c
- drivers/gpio/mscc_sgpio.c
- drivers/mmc/jz_mmc.c
- drivers/mmc/mmc_write.c
- drivers/net/bcm6368-eth.c
- drivers/pinctrl/mscc/Kconfig
- drivers/pinctrl/mscc/Makefile
- drivers/pinctrl/mscc/mscc-common.c
- drivers/pinctrl/mscc/mscc-common.h
- drivers/pinctrl/mscc/pinctrl-jr2.c
- drivers/pinctrl/mscc/pinctrl-luton.c
- drivers/pinctrl/mscc/pinctrl-ocelot.c
- drivers/spi/Kconfig
- drivers/spi/Makefile
- drivers/spi/mscc_bb_spi.c
- include/configs/vcoreiii.h
MAINTAINERS
1 | Descriptions of section entries: | 1 | Descriptions of section entries: |
2 | 2 | ||
3 | P: Person (obsolete) | 3 | P: Person (obsolete) |
4 | M: Mail patches to: FullName <address@domain> | 4 | M: Mail patches to: FullName <address@domain> |
5 | R: Designated reviewer: FullName <address@domain> | 5 | R: Designated reviewer: FullName <address@domain> |
6 | These reviewers should be CCed on patches. | 6 | These reviewers should be CCed on patches. |
7 | L: Mailing list that is relevant to this area | 7 | L: Mailing list that is relevant to this area |
8 | W: Web-page with status/info | 8 | W: Web-page with status/info |
9 | Q: Patchwork web based patch tracking system site | 9 | Q: Patchwork web based patch tracking system site |
10 | T: SCM tree type and location. | 10 | T: SCM tree type and location. |
11 | Type is one of: git, hg, quilt, stgit, topgit | 11 | Type is one of: git, hg, quilt, stgit, topgit |
12 | S: Status, one of the following: | 12 | S: Status, one of the following: |
13 | Supported: Someone is actually paid to look after this. | 13 | Supported: Someone is actually paid to look after this. |
14 | Maintained: Someone actually looks after it. | 14 | Maintained: Someone actually looks after it. |
15 | Odd Fixes: It has a maintainer but they don't have time to do | 15 | Odd Fixes: It has a maintainer but they don't have time to do |
16 | much other than throw the odd patch in. See below.. | 16 | much other than throw the odd patch in. See below.. |
17 | Orphan: No current maintainer [but maybe you could take the | 17 | Orphan: No current maintainer [but maybe you could take the |
18 | role as you write your new code]. | 18 | role as you write your new code]. |
19 | Obsolete: Old code. Something tagged obsolete generally means | 19 | Obsolete: Old code. Something tagged obsolete generally means |
20 | it has been replaced by a better system and you | 20 | it has been replaced by a better system and you |
21 | should be using that. | 21 | should be using that. |
22 | F: Files and directories with wildcard patterns. | 22 | F: Files and directories with wildcard patterns. |
23 | A trailing slash includes all files and subdirectory files. | 23 | A trailing slash includes all files and subdirectory files. |
24 | F: drivers/net/ all files in and below drivers/net | 24 | F: drivers/net/ all files in and below drivers/net |
25 | F: drivers/net/* all files in drivers/net, but not below | 25 | F: drivers/net/* all files in drivers/net, but not below |
26 | F: */net/* all files in "any top level directory"/net | 26 | F: */net/* all files in "any top level directory"/net |
27 | One pattern per line. Multiple F: lines acceptable. | 27 | One pattern per line. Multiple F: lines acceptable. |
28 | N: Files and directories with regex patterns. | 28 | N: Files and directories with regex patterns. |
29 | N: [^a-z]tegra all files whose path contains the word tegra | 29 | N: [^a-z]tegra all files whose path contains the word tegra |
30 | One pattern per line. Multiple N: lines acceptable. | 30 | One pattern per line. Multiple N: lines acceptable. |
31 | scripts/get_maintainer.pl has different behavior for files that | 31 | scripts/get_maintainer.pl has different behavior for files that |
32 | match F: pattern and matches of N: patterns. By default, | 32 | match F: pattern and matches of N: patterns. By default, |
33 | get_maintainer will not look at git log history when an F: pattern | 33 | get_maintainer will not look at git log history when an F: pattern |
34 | match occurs. When an N: match occurs, git log history is used | 34 | match occurs. When an N: match occurs, git log history is used |
35 | to also notify the people that have git commit signatures. | 35 | to also notify the people that have git commit signatures. |
36 | X: Files and directories that are NOT maintained, same rules as F: | 36 | X: Files and directories that are NOT maintained, same rules as F: |
37 | Files exclusions are tested before file matches. | 37 | Files exclusions are tested before file matches. |
38 | Can be useful for excluding a specific subdirectory, for instance: | 38 | Can be useful for excluding a specific subdirectory, for instance: |
39 | F: net/ | 39 | F: net/ |
40 | X: net/ipv6/ | 40 | X: net/ipv6/ |
41 | matches all files in and below net excluding net/ipv6/ | 41 | matches all files in and below net excluding net/ipv6/ |
42 | K: Keyword perl extended regex pattern to match content in a | 42 | K: Keyword perl extended regex pattern to match content in a |
43 | patch or file. For instance: | 43 | patch or file. For instance: |
44 | K: of_get_profile | 44 | K: of_get_profile |
45 | matches patches or files that contain "of_get_profile" | 45 | matches patches or files that contain "of_get_profile" |
46 | K: \b(printk|pr_(info|err))\b | 46 | K: \b(printk|pr_(info|err))\b |
47 | matches patches or files that contain one or more of the words | 47 | matches patches or files that contain one or more of the words |
48 | printk, pr_info or pr_err | 48 | printk, pr_info or pr_err |
49 | One regex pattern per line. Multiple K: lines acceptable. | 49 | One regex pattern per line. Multiple K: lines acceptable. |
50 | 50 | ||
51 | Note: For the hard of thinking, this list is meant to remain in alphabetical | 51 | Note: For the hard of thinking, this list is meant to remain in alphabetical |
52 | order. If you could add yourselves to it in alphabetical order that would be | 52 | order. If you could add yourselves to it in alphabetical order that would be |
53 | so much easier [Ed] | 53 | so much easier [Ed] |
54 | 54 | ||
55 | Maintainers List (try to look for most precise areas first) | 55 | Maintainers List (try to look for most precise areas first) |
56 | 56 | ||
57 | ----------------------------------- | 57 | ----------------------------------- |
58 | ARC | 58 | ARC |
59 | M: Alexey Brodkin <alexey.brodkin@synopsys.com> | 59 | M: Alexey Brodkin <alexey.brodkin@synopsys.com> |
60 | M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> | 60 | M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> |
61 | S: Maintained | 61 | S: Maintained |
62 | L: uboot-snps-arc@synopsys.com | 62 | L: uboot-snps-arc@synopsys.com |
63 | T: git git://git.denx.de/u-boot-arc.git | 63 | T: git git://git.denx.de/u-boot-arc.git |
64 | F: arch/arc/ | 64 | F: arch/arc/ |
65 | F: board/synopsys/ | 65 | F: board/synopsys/ |
66 | 66 | ||
67 | ARC HSDK CGU CLOCK | 67 | ARC HSDK CGU CLOCK |
68 | M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> | 68 | M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> |
69 | S: Maintained | 69 | S: Maintained |
70 | L: uboot-snps-arc@synopsys.com | 70 | L: uboot-snps-arc@synopsys.com |
71 | F: drivers/clk/clk-hsdk-cgu.c | 71 | F: drivers/clk/clk-hsdk-cgu.c |
72 | F: include/dt-bindings/clock/snps,hsdk-cgu.h | 72 | F: include/dt-bindings/clock/snps,hsdk-cgu.h |
73 | F: doc/device-tree-bindings/clock/snps,hsdk-cgu.txt | 73 | F: doc/device-tree-bindings/clock/snps,hsdk-cgu.txt |
74 | 74 | ||
75 | ARC HSDK CREG GPIO | 75 | ARC HSDK CREG GPIO |
76 | M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> | 76 | M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> |
77 | S: Maintained | 77 | S: Maintained |
78 | L: uboot-snps-arc@synopsys.com | 78 | L: uboot-snps-arc@synopsys.com |
79 | F: doc/device-tree-bindings/gpio/snps,creg-gpio.txt | 79 | F: doc/device-tree-bindings/gpio/snps,creg-gpio.txt |
80 | F: drivers/gpio/hsdk-creg-gpio.c | 80 | F: drivers/gpio/hsdk-creg-gpio.c |
81 | 81 | ||
82 | ARM | 82 | ARM |
83 | M: Albert Aribaud <albert.u.boot@aribaud.net> | 83 | M: Albert Aribaud <albert.u.boot@aribaud.net> |
84 | S: Maintained | 84 | S: Maintained |
85 | T: git git://git.denx.de/u-boot-arm.git | 85 | T: git git://git.denx.de/u-boot-arm.git |
86 | F: arch/arm/ | 86 | F: arch/arm/ |
87 | 87 | ||
88 | ARM ALTERA SOCFPGA | 88 | ARM ALTERA SOCFPGA |
89 | M: Marek Vasut <marex@denx.de> | 89 | M: Marek Vasut <marex@denx.de> |
90 | S: Maintainted | 90 | S: Maintainted |
91 | T: git git://git.denx.de/u-boot-socfpga.git | 91 | T: git git://git.denx.de/u-boot-socfpga.git |
92 | F: arch/arm/mach-socfpga/ | 92 | F: arch/arm/mach-socfpga/ |
93 | 93 | ||
94 | ARM ATMEL AT91 | 94 | ARM ATMEL AT91 |
95 | M: Andreas Bießmann <andreas@biessmann.org> | 95 | M: Andreas Bießmann <andreas@biessmann.org> |
96 | S: Maintained | 96 | S: Maintained |
97 | T: git git://git.denx.de/u-boot-atmel.git | 97 | T: git git://git.denx.de/u-boot-atmel.git |
98 | F: arch/arm/mach-at91/ | 98 | F: arch/arm/mach-at91/ |
99 | 99 | ||
100 | ARM BROADCOM BCM283X | 100 | ARM BROADCOM BCM283X |
101 | M: Alexander Graf <agraf@suse.de> | 101 | M: Alexander Graf <agraf@suse.de> |
102 | S: Maintained | 102 | S: Maintained |
103 | F: arch/arm/mach-bcm283x/ | 103 | F: arch/arm/mach-bcm283x/ |
104 | F: drivers/gpio/bcm2835_gpio.c | 104 | F: drivers/gpio/bcm2835_gpio.c |
105 | F: drivers/mmc/bcm2835_sdhci.c | 105 | F: drivers/mmc/bcm2835_sdhci.c |
106 | F: drivers/mmc/bcm2835_sdhost.c | 106 | F: drivers/mmc/bcm2835_sdhost.c |
107 | F: drivers/serial/serial_bcm283x_mu.c | 107 | F: drivers/serial/serial_bcm283x_mu.c |
108 | F: drivers/serial/serial_bcm283x_pl011.c | 108 | F: drivers/serial/serial_bcm283x_pl011.c |
109 | F: drivers/video/bcm2835.c | 109 | F: drivers/video/bcm2835.c |
110 | F: include/dm/platform_data/serial_bcm283x_mu.h | 110 | F: include/dm/platform_data/serial_bcm283x_mu.h |
111 | F: drivers/pinctrl/broadcom/ | 111 | F: drivers/pinctrl/broadcom/ |
112 | 112 | ||
113 | ARM BROADCOM BCMSTB | 113 | ARM BROADCOM BCMSTB |
114 | M: Thomas Fitzsimmons <fitzsim@fitzsim.org> | 114 | M: Thomas Fitzsimmons <fitzsim@fitzsim.org> |
115 | S: Maintained | 115 | S: Maintained |
116 | F: arch/arm/mach-bcmstb/ | 116 | F: arch/arm/mach-bcmstb/ |
117 | F: board/broadcom/bcmstb/ | 117 | F: board/broadcom/bcmstb/ |
118 | F: configs/bcm7*_defconfig | 118 | F: configs/bcm7*_defconfig |
119 | F: doc/README.bcm7xxx | 119 | F: doc/README.bcm7xxx |
120 | F: drivers/mmc/bcmstb_sdhci.c | 120 | F: drivers/mmc/bcmstb_sdhci.c |
121 | F: drivers/spi/bcmstb_spi.c | 121 | F: drivers/spi/bcmstb_spi.c |
122 | 122 | ||
123 | ARM FREESCALE IMX | 123 | ARM FREESCALE IMX |
124 | M: Stefano Babic <sbabic@denx.de> | 124 | M: Stefano Babic <sbabic@denx.de> |
125 | M: Fabio Estevam <fabio.estevam@nxp.com> | 125 | M: Fabio Estevam <fabio.estevam@nxp.com> |
126 | R: NXP i.MX U-Boot Team <uboot-imx@nxp.com> | 126 | R: NXP i.MX U-Boot Team <uboot-imx@nxp.com> |
127 | S: Maintained | 127 | S: Maintained |
128 | T: git git://git.denx.de/u-boot-imx.git | 128 | T: git git://git.denx.de/u-boot-imx.git |
129 | F: arch/arm/cpu/arm1136/mx*/ | 129 | F: arch/arm/cpu/arm1136/mx*/ |
130 | F: arch/arm/cpu/arm926ejs/mx*/ | 130 | F: arch/arm/cpu/arm926ejs/mx*/ |
131 | F: arch/arm/cpu/armv7/vf610/ | 131 | F: arch/arm/cpu/armv7/vf610/ |
132 | F: arch/arm/mach-imx/ | 132 | F: arch/arm/mach-imx/ |
133 | F: arch/arm/include/asm/arch-imx/ | 133 | F: arch/arm/include/asm/arch-imx/ |
134 | F: arch/arm/include/asm/arch-mx*/ | 134 | F: arch/arm/include/asm/arch-mx*/ |
135 | F: arch/arm/include/asm/arch-vf610/ | 135 | F: arch/arm/include/asm/arch-vf610/ |
136 | F: arch/arm/include/asm/mach-imx/ | 136 | F: arch/arm/include/asm/mach-imx/ |
137 | F: board/freescale/*mx*/ | 137 | F: board/freescale/*mx*/ |
138 | 138 | ||
139 | ARM HISILICON | 139 | ARM HISILICON |
140 | M: Peter Griffin <peter.griffin@linaro.org> | 140 | M: Peter Griffin <peter.griffin@linaro.org> |
141 | S: Maintained | 141 | S: Maintained |
142 | F: arch/arm/cpu/armv8/hisilicon | 142 | F: arch/arm/cpu/armv8/hisilicon |
143 | F: arch/arm/include/asm/arch-hi6220/ | 143 | F: arch/arm/include/asm/arch-hi6220/ |
144 | 144 | ||
145 | ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X ARMADA-37XX | 145 | ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X ARMADA-37XX |
146 | M: Prafulla Wadaskar <prafulla@marvell.com> | 146 | M: Prafulla Wadaskar <prafulla@marvell.com> |
147 | M: Luka Perkov <luka.perkov@sartura.hr> | 147 | M: Luka Perkov <luka.perkov@sartura.hr> |
148 | M: Stefan Roese <sr@denx.de> | 148 | M: Stefan Roese <sr@denx.de> |
149 | S: Maintained | 149 | S: Maintained |
150 | T: git git://git.denx.de/u-boot-marvell.git | 150 | T: git git://git.denx.de/u-boot-marvell.git |
151 | F: arch/arm/mach-kirkwood/ | 151 | F: arch/arm/mach-kirkwood/ |
152 | F: arch/arm/mach-mvebu/ | 152 | F: arch/arm/mach-mvebu/ |
153 | F: drivers/ata/ahci_mvebu.c | 153 | F: drivers/ata/ahci_mvebu.c |
154 | F: drivers/phy/marvell/ | 154 | F: drivers/phy/marvell/ |
155 | 155 | ||
156 | ARM MARVELL PXA | 156 | ARM MARVELL PXA |
157 | M: Marek Vasut <marex@denx.de> | 157 | M: Marek Vasut <marex@denx.de> |
158 | S: Maintained | 158 | S: Maintained |
159 | T: git git://git.denx.de/u-boot-pxa.git | 159 | T: git git://git.denx.de/u-boot-pxa.git |
160 | F: arch/arm/cpu/pxa/ | 160 | F: arch/arm/cpu/pxa/ |
161 | F: arch/arm/include/asm/arch-pxa/ | 161 | F: arch/arm/include/asm/arch-pxa/ |
162 | 162 | ||
163 | ARM MEDIATEK | 163 | ARM MEDIATEK |
164 | M: Ryder Lee <ryder.lee@mediatek.com> | 164 | M: Ryder Lee <ryder.lee@mediatek.com> |
165 | M: Weijie Gao <weijie.gao@mediatek.com> | 165 | M: Weijie Gao <weijie.gao@mediatek.com> |
166 | S: Maintained | 166 | S: Maintained |
167 | F: arch/arm/mach-mediatek/ | 167 | F: arch/arm/mach-mediatek/ |
168 | F: arch/arm/include/asm/arch-mediatek/ | 168 | F: arch/arm/include/asm/arch-mediatek/ |
169 | F: board/mediatek/ | 169 | F: board/mediatek/ |
170 | F: doc/README.mediatek | 170 | F: doc/README.mediatek |
171 | F: drivers/clk/mediatek/ | 171 | F: drivers/clk/mediatek/ |
172 | F: drivers/mmc/mtk-sd.c | 172 | F: drivers/mmc/mtk-sd.c |
173 | F: drivers/pinctrl/mediatek/ | 173 | F: drivers/pinctrl/mediatek/ |
174 | F: drivers/power/domain/mtk-power-domain.c | 174 | F: drivers/power/domain/mtk-power-domain.c |
175 | F: drivers/ram/mediatek/ | 175 | F: drivers/ram/mediatek/ |
176 | F: drivers/spi/mtk_qspi.c | 176 | F: drivers/spi/mtk_qspi.c |
177 | F: drivers/timer/mtk_timer.c | 177 | F: drivers/timer/mtk_timer.c |
178 | F: drivers/watchdog/mtk_wdt.c | 178 | F: drivers/watchdog/mtk_wdt.c |
179 | F: drivers/net/mtk_eth.c | 179 | F: drivers/net/mtk_eth.c |
180 | F: drivers/reset/reset-mediatek.c | 180 | F: drivers/reset/reset-mediatek.c |
181 | F: tools/mtk_image.c | 181 | F: tools/mtk_image.c |
182 | F: tools/mtk_image.h | 182 | F: tools/mtk_image.h |
183 | N: mediatek | 183 | N: mediatek |
184 | 184 | ||
185 | ARM OWL | 185 | ARM OWL |
186 | M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 186 | M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> |
187 | S: Maintained | 187 | S: Maintained |
188 | F: arch/arm/include/asm/arch-owl/ | 188 | F: arch/arm/include/asm/arch-owl/ |
189 | F: arch/arm/mach-owl/ | 189 | F: arch/arm/mach-owl/ |
190 | F: board/ucRobotics/ | 190 | F: board/ucRobotics/ |
191 | F: drivers/clk/owl/ | 191 | F: drivers/clk/owl/ |
192 | F: drivers/serial/serial_owl.c | 192 | F: drivers/serial/serial_owl.c |
193 | 193 | ||
194 | ARM RENESAS RMOBILE/R-CAR | 194 | ARM RENESAS RMOBILE/R-CAR |
195 | M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 195 | M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> |
196 | M: Marek Vasut <marek.vasut+renesas@gmail.com> | 196 | M: Marek Vasut <marek.vasut+renesas@gmail.com> |
197 | S: Maintained | 197 | S: Maintained |
198 | T: git git://git.denx.de/u-boot-sh.git | 198 | T: git git://git.denx.de/u-boot-sh.git |
199 | F: arch/arm/mach-rmobile/ | 199 | F: arch/arm/mach-rmobile/ |
200 | 200 | ||
201 | ARM ROCKCHIP | 201 | ARM ROCKCHIP |
202 | M: Simon Glass <sjg@chromium.org> | 202 | M: Simon Glass <sjg@chromium.org> |
203 | M: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 203 | M: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
204 | S: Maintained | 204 | S: Maintained |
205 | T: git git://git.denx.de/u-boot-rockchip.git | 205 | T: git git://git.denx.de/u-boot-rockchip.git |
206 | F: arch/arm/include/asm/arch-rockchip/ | 206 | F: arch/arm/include/asm/arch-rockchip/ |
207 | F: arch/arm/mach-rockchip/ | 207 | F: arch/arm/mach-rockchip/ |
208 | F: board/rockchip/ | 208 | F: board/rockchip/ |
209 | F: drivers/clk/rockchip/ | 209 | F: drivers/clk/rockchip/ |
210 | F: drivers/gpio/rk_gpio.c | 210 | F: drivers/gpio/rk_gpio.c |
211 | F: drivers/misc/rockchip-efuse.c | 211 | F: drivers/misc/rockchip-efuse.c |
212 | F: drivers/mmc/rockchip_sdhci.c | 212 | F: drivers/mmc/rockchip_sdhci.c |
213 | F: drivers/mmc/rockchip_dw_mmc.c | 213 | F: drivers/mmc/rockchip_dw_mmc.c |
214 | F: drivers/pinctrl/rockchip/ | 214 | F: drivers/pinctrl/rockchip/ |
215 | F: drivers/ram/rockchip/ | 215 | F: drivers/ram/rockchip/ |
216 | F: drivers/sysreset/sysreset_rockchip.c | 216 | F: drivers/sysreset/sysreset_rockchip.c |
217 | F: drivers/video/rockchip/ | 217 | F: drivers/video/rockchip/ |
218 | F: tools/rkcommon.c | 218 | F: tools/rkcommon.c |
219 | F: tools/rkcommon.h | 219 | F: tools/rkcommon.h |
220 | F: tools/rkimage.c | 220 | F: tools/rkimage.c |
221 | F: tools/rksd.c | 221 | F: tools/rksd.c |
222 | F: tools/rkspi.c | 222 | F: tools/rkspi.c |
223 | 223 | ||
224 | ARM SAMSUNG | 224 | ARM SAMSUNG |
225 | M: Minkyu Kang <mk7.kang@samsung.com> | 225 | M: Minkyu Kang <mk7.kang@samsung.com> |
226 | S: Maintained | 226 | S: Maintained |
227 | T: git git://git.denx.de/u-boot-samsung.git | 227 | T: git git://git.denx.de/u-boot-samsung.git |
228 | F: arch/arm/mach-exynos/ | 228 | F: arch/arm/mach-exynos/ |
229 | F: arch/arm/mach-s5pc1xx/ | 229 | F: arch/arm/mach-s5pc1xx/ |
230 | F: arch/arm/cpu/armv7/s5p-common/ | 230 | F: arch/arm/cpu/armv7/s5p-common/ |
231 | 231 | ||
232 | ARM SNAPDRAGON | 232 | ARM SNAPDRAGON |
233 | M: Ramon Fried <ramon.fried@gmail.com> | 233 | M: Ramon Fried <ramon.fried@gmail.com> |
234 | S: Maintained | 234 | S: Maintained |
235 | F: arch/arm/mach-snapdragon/ | 235 | F: arch/arm/mach-snapdragon/ |
236 | F: drivers/gpio/msm_gpio.c | 236 | F: drivers/gpio/msm_gpio.c |
237 | F: drivers/mmc/msm_sdhci.c | 237 | F: drivers/mmc/msm_sdhci.c |
238 | F: drivers/phy/msm8916-usbh-phy.c | 238 | F: drivers/phy/msm8916-usbh-phy.c |
239 | F: drivers/serial/serial_msm.c | 239 | F: drivers/serial/serial_msm.c |
240 | F: drivers/smem/msm_smem.c | 240 | F: drivers/smem/msm_smem.c |
241 | F: drivers/usb/host/ehci-msm.c | 241 | F: drivers/usb/host/ehci-msm.c |
242 | 242 | ||
243 | ARM STI | 243 | ARM STI |
244 | M: Patrice Chotard <patrice.chotard@st.com> | 244 | M: Patrice Chotard <patrice.chotard@st.com> |
245 | S: Maintained | 245 | S: Maintained |
246 | F: arch/arm/mach-sti/ | 246 | F: arch/arm/mach-sti/ |
247 | F: arch/arm/include/asm/arch-sti*/ | 247 | F: arch/arm/include/asm/arch-sti*/ |
248 | 248 | ||
249 | ARM STM SPEAR | 249 | ARM STM SPEAR |
250 | #M: Vipin Kumar <vipin.kumar@st.com> | 250 | #M: Vipin Kumar <vipin.kumar@st.com> |
251 | S: Orphaned (Since 2016-02) | 251 | S: Orphaned (Since 2016-02) |
252 | T: git git://git.denx.de/u-boot-stm.git | 252 | T: git git://git.denx.de/u-boot-stm.git |
253 | F: arch/arm/cpu/arm926ejs/spear/ | 253 | F: arch/arm/cpu/arm926ejs/spear/ |
254 | F: arch/arm/include/asm/arch-spear/ | 254 | F: arch/arm/include/asm/arch-spear/ |
255 | 255 | ||
256 | ARM STM STM32MP | 256 | ARM STM STM32MP |
257 | M: Patrick Delaunay <patrick.delaunay@st.com> | 257 | M: Patrick Delaunay <patrick.delaunay@st.com> |
258 | M: Christophe Kerello <christophe.kerello@st.com> | 258 | M: Christophe Kerello <christophe.kerello@st.com> |
259 | M: Patrice Chotard <patrice.chotard@st.com> | 259 | M: Patrice Chotard <patrice.chotard@st.com> |
260 | L: uboot-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers) | 260 | L: uboot-stm32@st-md-mailman.stormreply.com (moderated for non-subscribers) |
261 | S: Maintained | 261 | S: Maintained |
262 | F: arch/arm/mach-stm32mp | 262 | F: arch/arm/mach-stm32mp |
263 | F: drivers/clk/clk_stm32mp1.c | 263 | F: drivers/clk/clk_stm32mp1.c |
264 | F: drivers/i2c/stm32f7_i2c.c | 264 | F: drivers/i2c/stm32f7_i2c.c |
265 | F: drivers/misc/stm32mp_fuse.c | 265 | F: drivers/misc/stm32mp_fuse.c |
266 | F: drivers/mmc/stm32_sdmmc2.c | 266 | F: drivers/mmc/stm32_sdmmc2.c |
267 | F: drivers/phy/phy-stm32-usbphyc.c | 267 | F: drivers/phy/phy-stm32-usbphyc.c |
268 | F: drivers/pinctrl/pinctrl_stm32.c | 268 | F: drivers/pinctrl/pinctrl_stm32.c |
269 | F: drivers/power/regulator/stm32-vrefbuf.c | 269 | F: drivers/power/regulator/stm32-vrefbuf.c |
270 | F: drivers/ram/stm32mp1/ | 270 | F: drivers/ram/stm32mp1/ |
271 | F: drivers/misc/stm32_rcc.c | 271 | F: drivers/misc/stm32_rcc.c |
272 | F: drivers/reset/stm32-reset.c | 272 | F: drivers/reset/stm32-reset.c |
273 | F: drivers/spi/stm32_qspi.c | 273 | F: drivers/spi/stm32_qspi.c |
274 | 274 | ||
275 | ARM STM STV0991 | 275 | ARM STM STV0991 |
276 | M: Vikas Manocha <vikas.manocha@st.com> | 276 | M: Vikas Manocha <vikas.manocha@st.com> |
277 | S: Maintained | 277 | S: Maintained |
278 | F: arch/arm/cpu/armv7/stv0991/ | 278 | F: arch/arm/cpu/armv7/stv0991/ |
279 | F: arch/arm/include/asm/arch-stv0991/ | 279 | F: arch/arm/include/asm/arch-stv0991/ |
280 | 280 | ||
281 | ARM SUNXI | 281 | ARM SUNXI |
282 | M: Jagan Teki <jagan@openedev.com> | 282 | M: Jagan Teki <jagan@openedev.com> |
283 | M: Maxime Ripard <maxime.ripard@bootlin.com> | 283 | M: Maxime Ripard <maxime.ripard@bootlin.com> |
284 | S: Maintained | 284 | S: Maintained |
285 | T: git git://git.denx.de/u-boot-sunxi.git | 285 | T: git git://git.denx.de/u-boot-sunxi.git |
286 | F: arch/arm/cpu/armv7/sunxi/ | 286 | F: arch/arm/cpu/armv7/sunxi/ |
287 | F: arch/arm/include/asm/arch-sunxi/ | 287 | F: arch/arm/include/asm/arch-sunxi/ |
288 | F: arch/arm/mach-sunxi/ | 288 | F: arch/arm/mach-sunxi/ |
289 | F: board/sunxi/ | 289 | F: board/sunxi/ |
290 | 290 | ||
291 | ARM TEGRA | 291 | ARM TEGRA |
292 | M: Tom Warren <twarren@nvidia.com> | 292 | M: Tom Warren <twarren@nvidia.com> |
293 | S: Maintained | 293 | S: Maintained |
294 | T: git git://git.denx.de/u-boot-tegra.git | 294 | T: git git://git.denx.de/u-boot-tegra.git |
295 | F: arch/arm/mach-tegra/ | 295 | F: arch/arm/mach-tegra/ |
296 | F: arch/arm/include/asm/arch-tegra*/ | 296 | F: arch/arm/include/asm/arch-tegra*/ |
297 | 297 | ||
298 | ARM TI | 298 | ARM TI |
299 | M: Tom Rini <trini@konsulko.com> | 299 | M: Tom Rini <trini@konsulko.com> |
300 | S: Maintained | 300 | S: Maintained |
301 | T: git git://git.denx.de/u-boot-ti.git | 301 | T: git git://git.denx.de/u-boot-ti.git |
302 | F: arch/arm/mach-davinci/ | 302 | F: arch/arm/mach-davinci/ |
303 | F: arch/arm/mach-k3/ | 303 | F: arch/arm/mach-k3/ |
304 | F: arch/arm/mach-keystone/ | 304 | F: arch/arm/mach-keystone/ |
305 | F: arch/arm/include/asm/arch-omap*/ | 305 | F: arch/arm/include/asm/arch-omap*/ |
306 | F: arch/arm/include/asm/ti-common/ | 306 | F: arch/arm/include/asm/ti-common/ |
307 | 307 | ||
308 | ARM UNIPHIER | 308 | ARM UNIPHIER |
309 | M: Masahiro Yamada <yamada.masahiro@socionext.com> | 309 | M: Masahiro Yamada <yamada.masahiro@socionext.com> |
310 | S: Maintained | 310 | S: Maintained |
311 | T: git git://git.denx.de/u-boot-uniphier.git | 311 | T: git git://git.denx.de/u-boot-uniphier.git |
312 | F: arch/arm/mach-uniphier/ | 312 | F: arch/arm/mach-uniphier/ |
313 | F: configs/uniphier_*_defconfig | 313 | F: configs/uniphier_*_defconfig |
314 | N: uniphier | 314 | N: uniphier |
315 | 315 | ||
316 | ARM VERSAL | 316 | ARM VERSAL |
317 | M: Michal Simek <michal.simek@xilinx.com> | 317 | M: Michal Simek <michal.simek@xilinx.com> |
318 | S: Maintained | 318 | S: Maintained |
319 | T: git git://git.denx.de/u-boot-microblaze.git | 319 | T: git git://git.denx.de/u-boot-microblaze.git |
320 | F: arch/arm/mach-versal/ | 320 | F: arch/arm/mach-versal/ |
321 | 321 | ||
322 | ARM VERSATILE EXPRESS DRIVERS | 322 | ARM VERSATILE EXPRESS DRIVERS |
323 | M: Liviu Dudau <liviu.dudau@foss.arm.com> | 323 | M: Liviu Dudau <liviu.dudau@foss.arm.com> |
324 | S: Maintained | 324 | S: Maintained |
325 | T: git git://github.com/ARM-software/u-boot.git | 325 | T: git git://github.com/ARM-software/u-boot.git |
326 | F: drivers/misc/vexpress_config.c | 326 | F: drivers/misc/vexpress_config.c |
327 | N: vexpress | 327 | N: vexpress |
328 | 328 | ||
329 | ARM ZYNQ | 329 | ARM ZYNQ |
330 | M: Michal Simek <monstr@monstr.eu> | 330 | M: Michal Simek <monstr@monstr.eu> |
331 | S: Maintained | 331 | S: Maintained |
332 | T: git git://git.denx.de/u-boot-microblaze.git | 332 | T: git git://git.denx.de/u-boot-microblaze.git |
333 | F: arch/arm/mach-zynq/ | 333 | F: arch/arm/mach-zynq/ |
334 | F: drivers/clk/clk_zynq.c | 334 | F: drivers/clk/clk_zynq.c |
335 | F: drivers/fpga/zynqpl.c | 335 | F: drivers/fpga/zynqpl.c |
336 | F: drivers/gpio/zynq_gpio.c | 336 | F: drivers/gpio/zynq_gpio.c |
337 | F: drivers/i2c/i2c-cdns.c | 337 | F: drivers/i2c/i2c-cdns.c |
338 | F: drivers/i2c/muxes/pca954x.c | 338 | F: drivers/i2c/muxes/pca954x.c |
339 | F: drivers/i2c/zynq_i2c.c | 339 | F: drivers/i2c/zynq_i2c.c |
340 | F: drivers/mmc/zynq_sdhci.c | 340 | F: drivers/mmc/zynq_sdhci.c |
341 | F: drivers/mtd/nand/raw/zynq_nand.c | 341 | F: drivers/mtd/nand/raw/zynq_nand.c |
342 | F: drivers/net/phy/xilinx_phy.c | 342 | F: drivers/net/phy/xilinx_phy.c |
343 | F: drivers/net/zynq_gem.c | 343 | F: drivers/net/zynq_gem.c |
344 | F: drivers/serial/serial_zynq.c | 344 | F: drivers/serial/serial_zynq.c |
345 | F: drivers/spi/zynq_qspi.c | 345 | F: drivers/spi/zynq_qspi.c |
346 | F: drivers/spi/zynq_spi.c | 346 | F: drivers/spi/zynq_spi.c |
347 | F: drivers/usb/host/ehci-zynq.c | 347 | F: drivers/usb/host/ehci-zynq.c |
348 | F: drivers/watchdog/cdns_wdt.c | 348 | F: drivers/watchdog/cdns_wdt.c |
349 | F: include/zynqpl.h | 349 | F: include/zynqpl.h |
350 | F: tools/zynqimage.c | 350 | F: tools/zynqimage.c |
351 | N: zynq | 351 | N: zynq |
352 | 352 | ||
353 | ARM ZYNQMP | 353 | ARM ZYNQMP |
354 | M: Michal Simek <michal.simek@xilinx.com> | 354 | M: Michal Simek <michal.simek@xilinx.com> |
355 | S: Maintained | 355 | S: Maintained |
356 | T: git git://git.denx.de/u-boot-microblaze.git | 356 | T: git git://git.denx.de/u-boot-microblaze.git |
357 | F: arch/arm/cpu/armv8/zynqmp/ | 357 | F: arch/arm/cpu/armv8/zynqmp/ |
358 | F: drivers/clk/clk_zynqmp.c | 358 | F: drivers/clk/clk_zynqmp.c |
359 | F: drivers/fpga/zynqpl.c | 359 | F: drivers/fpga/zynqpl.c |
360 | F: drivers/gpio/zynq_gpio.c | 360 | F: drivers/gpio/zynq_gpio.c |
361 | F: drivers/i2c/i2c-cdns.c | 361 | F: drivers/i2c/i2c-cdns.c |
362 | F: drivers/i2c/muxes/pca954x.c | 362 | F: drivers/i2c/muxes/pca954x.c |
363 | F: drivers/i2c/zynq_i2c.c | 363 | F: drivers/i2c/zynq_i2c.c |
364 | F: drivers/mmc/zynq_sdhci.c | 364 | F: drivers/mmc/zynq_sdhci.c |
365 | F: drivers/mtd/nand/raw/zynq_nand.c | 365 | F: drivers/mtd/nand/raw/zynq_nand.c |
366 | F: drivers/net/phy/xilinx_phy.c | 366 | F: drivers/net/phy/xilinx_phy.c |
367 | F: drivers/net/zynq_gem.c | 367 | F: drivers/net/zynq_gem.c |
368 | F: drivers/serial/serial_zynq.c | 368 | F: drivers/serial/serial_zynq.c |
369 | F: drivers/spi/zynq_qspi.c | 369 | F: drivers/spi/zynq_qspi.c |
370 | F: drivers/spi/zynq_spi.c | 370 | F: drivers/spi/zynq_spi.c |
371 | F: drivers/timer/cadence-ttc.c | 371 | F: drivers/timer/cadence-ttc.c |
372 | F: drivers/usb/host/ehci-zynq.c | 372 | F: drivers/usb/host/ehci-zynq.c |
373 | F: drivers/watchdog/cdns_wdt.c | 373 | F: drivers/watchdog/cdns_wdt.c |
374 | F: include/zynqmppl.h | 374 | F: include/zynqmppl.h |
375 | F: tools/zynqmp* | 375 | F: tools/zynqmp* |
376 | N: ultra96 | 376 | N: ultra96 |
377 | N: zynqmp | 377 | N: zynqmp |
378 | 378 | ||
379 | ARM ZYNQMP R5 | 379 | ARM ZYNQMP R5 |
380 | M: Michal Simek <michal.simek@xilinx.com> | 380 | M: Michal Simek <michal.simek@xilinx.com> |
381 | S: Maintained | 381 | S: Maintained |
382 | T: git git://git.denx.de/u-boot-microblaze.git | 382 | T: git git://git.denx.de/u-boot-microblaze.git |
383 | F: arch/arm/mach-zynqmp-r5/ | 383 | F: arch/arm/mach-zynqmp-r5/ |
384 | 384 | ||
385 | BINMAN | 385 | BINMAN |
386 | M: Simon Glass <sjg@chromium.org> | 386 | M: Simon Glass <sjg@chromium.org> |
387 | S: Maintained | 387 | S: Maintained |
388 | F: tools/binman/ | 388 | F: tools/binman/ |
389 | 389 | ||
390 | BUILDMAN | 390 | BUILDMAN |
391 | M: Simon Glass <sjg@chromium.org> | 391 | M: Simon Glass <sjg@chromium.org> |
392 | S: Maintained | 392 | S: Maintained |
393 | F: tools/buildman/ | 393 | F: tools/buildman/ |
394 | 394 | ||
395 | CFI FLASH | 395 | CFI FLASH |
396 | M: Stefan Roese <sr@denx.de> | 396 | M: Stefan Roese <sr@denx.de> |
397 | S: Maintained | 397 | S: Maintained |
398 | T: git git://git.denx.de/u-boot-cfi-flash.git | 398 | T: git git://git.denx.de/u-boot-cfi-flash.git |
399 | F: drivers/mtd/cfi_flash.c | 399 | F: drivers/mtd/cfi_flash.c |
400 | F: drivers/mtd/jedec_flash.c | 400 | F: drivers/mtd/jedec_flash.c |
401 | 401 | ||
402 | COLDFIRE | 402 | COLDFIRE |
403 | M: Huan Wang <alison.wang@nxp.com> | 403 | M: Huan Wang <alison.wang@nxp.com> |
404 | M: Angelo Dureghello <angelo@sysam.it> | 404 | M: Angelo Dureghello <angelo@sysam.it> |
405 | S: Maintained | 405 | S: Maintained |
406 | T: git git://git.denx.de/u-boot-coldfire.git | 406 | T: git git://git.denx.de/u-boot-coldfire.git |
407 | F: arch/m68k/ | 407 | F: arch/m68k/ |
408 | 408 | ||
409 | DFU | 409 | DFU |
410 | M: Lukasz Majewski <lukma@denx.de> | 410 | M: Lukasz Majewski <lukma@denx.de> |
411 | S: Maintained | 411 | S: Maintained |
412 | T: git git://git.denx.de/u-boot-dfu.git | 412 | T: git git://git.denx.de/u-boot-dfu.git |
413 | F: drivers/dfu/ | 413 | F: drivers/dfu/ |
414 | F: drivers/usb/gadget/ | 414 | F: drivers/usb/gadget/ |
415 | 415 | ||
416 | DRIVER MODEL | 416 | DRIVER MODEL |
417 | M: Simon Glass <sjg@chromium.org> | 417 | M: Simon Glass <sjg@chromium.org> |
418 | S: Maintained | 418 | S: Maintained |
419 | T: git git://git.denx.de/u-boot-dm.git | 419 | T: git git://git.denx.de/u-boot-dm.git |
420 | F: drivers/core/ | 420 | F: drivers/core/ |
421 | F: include/dm/ | 421 | F: include/dm/ |
422 | F: test/dm/ | 422 | F: test/dm/ |
423 | 423 | ||
424 | EFI PAYLOAD | 424 | EFI PAYLOAD |
425 | M: Alexander Graf <agraf@suse.de> | 425 | M: Alexander Graf <agraf@suse.de> |
426 | R: Heinrich Schuchardt <xypron.glpk@gmx.de> | 426 | R: Heinrich Schuchardt <xypron.glpk@gmx.de> |
427 | S: Maintained | 427 | S: Maintained |
428 | T: git git://github.com/agraf/u-boot.git | 428 | T: git git://github.com/agraf/u-boot.git |
429 | F: doc/README.uefi | 429 | F: doc/README.uefi |
430 | F: doc/README.iscsi | 430 | F: doc/README.iscsi |
431 | F: Documentation/efi.rst | 431 | F: Documentation/efi.rst |
432 | F: include/capitalization.h | 432 | F: include/capitalization.h |
433 | F: include/cp1250.h | 433 | F: include/cp1250.h |
434 | F: include/cp437.h | 434 | F: include/cp437.h |
435 | F: include/efi* | 435 | F: include/efi* |
436 | F: include/pe.h | 436 | F: include/pe.h |
437 | F: include/asm-generic/pe.h | 437 | F: include/asm-generic/pe.h |
438 | F: lib/charset.c | 438 | F: lib/charset.c |
439 | F: lib/efi*/ | 439 | F: lib/efi*/ |
440 | F: test/py/tests/test_efi* | 440 | F: test/py/tests/test_efi* |
441 | F: test/unicode_ut.c | 441 | F: test/unicode_ut.c |
442 | F: cmd/bootefi.c | 442 | F: cmd/bootefi.c |
443 | F: tools/file2include.c | 443 | F: tools/file2include.c |
444 | 444 | ||
445 | FPGA | 445 | FPGA |
446 | M: Michal Simek <michal.simek@xilinx.com> | 446 | M: Michal Simek <michal.simek@xilinx.com> |
447 | S: Maintained | 447 | S: Maintained |
448 | T: git git://git.denx.de/u-boot-microblaze.git | 448 | T: git git://git.denx.de/u-boot-microblaze.git |
449 | F: drivers/fpga/ | 449 | F: drivers/fpga/ |
450 | F: cmd/fpga.c | 450 | F: cmd/fpga.c |
451 | F: include/fpga.h | 451 | F: include/fpga.h |
452 | 452 | ||
453 | FLATTENED DEVICE TREE | 453 | FLATTENED DEVICE TREE |
454 | M: Simon Glass <sjg@chromium.org> | 454 | M: Simon Glass <sjg@chromium.org> |
455 | S: Maintained | 455 | S: Maintained |
456 | T: git git://git.denx.de/u-boot-fdt.git | 456 | T: git git://git.denx.de/u-boot-fdt.git |
457 | F: lib/fdtdec* | 457 | F: lib/fdtdec* |
458 | F: lib/libfdt/ | 458 | F: lib/libfdt/ |
459 | F: include/fdt* | 459 | F: include/fdt* |
460 | F: include/linux/libfdt* | 460 | F: include/linux/libfdt* |
461 | F: cmd/fdt.c | 461 | F: cmd/fdt.c |
462 | F: common/fdt_support.c | 462 | F: common/fdt_support.c |
463 | 463 | ||
464 | FREEBSD | 464 | FREEBSD |
465 | M: Rafal Jaworowski <raj@semihalf.com> | 465 | M: Rafal Jaworowski <raj@semihalf.com> |
466 | S: Maintained | 466 | S: Maintained |
467 | T: git git://git.denx.de/u-boot-freebsd.git | 467 | T: git git://git.denx.de/u-boot-freebsd.git |
468 | 468 | ||
469 | FREESCALE QORIQ | 469 | FREESCALE QORIQ |
470 | M: York Sun <york.sun@nxp.com> | 470 | M: York Sun <york.sun@nxp.com> |
471 | S: Maintained | 471 | S: Maintained |
472 | T: git git://git.denx.de/u-boot-fsl-qoriq.git | 472 | T: git git://git.denx.de/u-boot-fsl-qoriq.git |
473 | 473 | ||
474 | I2C | 474 | I2C |
475 | M: Heiko Schocher <hs@denx.de> | 475 | M: Heiko Schocher <hs@denx.de> |
476 | S: Maintained | 476 | S: Maintained |
477 | T: git git://git.denx.de/u-boot-i2c.git | 477 | T: git git://git.denx.de/u-boot-i2c.git |
478 | F: drivers/i2c/ | 478 | F: drivers/i2c/ |
479 | 479 | ||
480 | LOGGING | 480 | LOGGING |
481 | M: Simon Glass <sjg@chromium.org> | 481 | M: Simon Glass <sjg@chromium.org> |
482 | S: Maintained | 482 | S: Maintained |
483 | T: git git://git.denx.de/u-boot.git | 483 | T: git git://git.denx.de/u-boot.git |
484 | F: common/log.c | 484 | F: common/log.c |
485 | F: cmd/log.c | 485 | F: cmd/log.c |
486 | F: test/log/log_test.c | 486 | F: test/log/log_test.c |
487 | F: test/py/tests/test_log.py | 487 | F: test/py/tests/test_log.py |
488 | 488 | ||
489 | MALI DISPLAY PROCESSORS | 489 | MALI DISPLAY PROCESSORS |
490 | M: Liviu Dudau <liviu.dudau@foss.arm.com> | 490 | M: Liviu Dudau <liviu.dudau@foss.arm.com> |
491 | S: Supported | 491 | S: Supported |
492 | T: git git://github.com/ARM-software/u-boot.git | 492 | T: git git://github.com/ARM-software/u-boot.git |
493 | F: drivers/video/mali_dp.c | 493 | F: drivers/video/mali_dp.c |
494 | F: drivers/i2c/i2c-versatile.c | 494 | F: drivers/i2c/i2c-versatile.c |
495 | 495 | ||
496 | MICROBLAZE | 496 | MICROBLAZE |
497 | M: Michal Simek <monstr@monstr.eu> | 497 | M: Michal Simek <monstr@monstr.eu> |
498 | S: Maintained | 498 | S: Maintained |
499 | T: git git://git.denx.de/u-boot-microblaze.git | 499 | T: git git://git.denx.de/u-boot-microblaze.git |
500 | F: arch/microblaze/ | 500 | F: arch/microblaze/ |
501 | F: cmd/mfsl.c | 501 | F: cmd/mfsl.c |
502 | F: drivers/gpio/xilinx_gpio.c | 502 | F: drivers/gpio/xilinx_gpio.c |
503 | F: drivers/net/xilinx_axi_emac.c | 503 | F: drivers/net/xilinx_axi_emac.c |
504 | F: drivers/net/xilinx_emaclite.c | 504 | F: drivers/net/xilinx_emaclite.c |
505 | F: drivers/serial/serial_xuartlite.c | 505 | F: drivers/serial/serial_xuartlite.c |
506 | F: drivers/spi/xilinx_spi.c | 506 | F: drivers/spi/xilinx_spi.c |
507 | F: drivers/sysreset/sysreset_gpio.c | 507 | F: drivers/sysreset/sysreset_gpio.c |
508 | F: drivers/watchdog/xilinx_tb_wdt.c | 508 | F: drivers/watchdog/xilinx_tb_wdt.c |
509 | N: xilinx | 509 | N: xilinx |
510 | 510 | ||
511 | MIPS | 511 | MIPS |
512 | M: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 512 | M: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> |
513 | S: Maintained | 513 | S: Maintained |
514 | T: git git://git.denx.de/u-boot-mips.git | 514 | T: git git://git.denx.de/u-boot-mips.git |
515 | F: arch/mips/ | 515 | F: arch/mips/ |
516 | 516 | ||
517 | MIPS MSCC | 517 | MIPS MSCC |
518 | M: Gregory CLEMENT <gregory.clement@bootlin.com> | 518 | M: Gregory CLEMENT <gregory.clement@bootlin.com> |
519 | M: Lars Povlsen <lars.povlsen@microchip.com> | 519 | M: Lars Povlsen <lars.povlsen@microchip.com> |
520 | M: Horatiu Vultur <horatiu.vultur@microchip.com> | 520 | M: Horatiu Vultur <horatiu.vultur@microchip.com> |
521 | S: Maintained | 521 | S: Maintained |
522 | F: arch/mips/mach-mscc/ | 522 | F: arch/mips/mach-mscc/ |
523 | F: arch/mips/dts/luton* | 523 | F: arch/mips/dts/luton* |
524 | F: arch/mips/dts/mscc* | 524 | F: arch/mips/dts/mscc* |
525 | F: arch/mips/dts/ocelot* | 525 | F: arch/mips/dts/ocelot* |
526 | F: arch/mips/dts/jr2* | ||
527 | F: arch/mips/dts/serval* | ||
526 | F: board/mscc/ | 528 | F: board/mscc/ |
527 | F: configs/mscc* | 529 | F: configs/mscc* |
530 | F: drivers/gpio/mscc_sgpio.c | ||
531 | F: drivers/spi/mscc_bb_spi.c | ||
528 | F: include/configs/vcoreiii.h | 532 | F: include/configs/vcoreiii.h |
533 | F: drivers/pinctrl/mscc/ | ||
529 | 534 | ||
530 | MIPS JZ4780 | 535 | MIPS JZ4780 |
531 | M: Ezequiel Garcia <ezequiel@collabora.com> | 536 | M: Ezequiel Garcia <ezequiel@collabora.com> |
532 | S: Maintained | 537 | S: Maintained |
533 | F: arch/mips/mach-jz47xx/ | 538 | F: arch/mips/mach-jz47xx/ |
534 | 539 | ||
535 | MMC | 540 | MMC |
536 | M: Jaehoon Chung <jh80.chung@samsung.com> | 541 | M: Jaehoon Chung <jh80.chung@samsung.com> |
537 | S: Maintained | 542 | S: Maintained |
538 | T: git git://git.denx.de/u-boot-mmc.git | 543 | T: git git://git.denx.de/u-boot-mmc.git |
539 | F: drivers/mmc/ | 544 | F: drivers/mmc/ |
540 | 545 | ||
541 | NAND FLASH | 546 | NAND FLASH |
542 | #M: Scott Wood <oss@buserror.net> | 547 | #M: Scott Wood <oss@buserror.net> |
543 | S: Orphaned (Since 2018-07) | 548 | S: Orphaned (Since 2018-07) |
544 | T: git git://git.denx.de/u-boot-nand-flash.git | 549 | T: git git://git.denx.de/u-boot-nand-flash.git |
545 | F: drivers/mtd/nand/raw/ | 550 | F: drivers/mtd/nand/raw/ |
546 | 551 | ||
547 | NDS32 | 552 | NDS32 |
548 | M: Macpaul Lin <macpaul@andestech.com> | 553 | M: Macpaul Lin <macpaul@andestech.com> |
549 | S: Maintained | 554 | S: Maintained |
550 | T: git git://git.denx.de/u-boot-nds32.git | 555 | T: git git://git.denx.de/u-boot-nds32.git |
551 | F: arch/nds32/ | 556 | F: arch/nds32/ |
552 | 557 | ||
553 | NETWORK | 558 | NETWORK |
554 | M: Joe Hershberger <joe.hershberger@ni.com> | 559 | M: Joe Hershberger <joe.hershberger@ni.com> |
555 | S: Maintained | 560 | S: Maintained |
556 | T: git git://git.denx.de/u-boot-net.git | 561 | T: git git://git.denx.de/u-boot-net.git |
557 | F: drivers/net/ | 562 | F: drivers/net/ |
558 | F: net/ | 563 | F: net/ |
559 | 564 | ||
560 | NIOS | 565 | NIOS |
561 | M: Thomas Chou <thomas@wytron.com.tw> | 566 | M: Thomas Chou <thomas@wytron.com.tw> |
562 | S: Maintained | 567 | S: Maintained |
563 | T: git git://git.denx.de/u-boot-nios.git | 568 | T: git git://git.denx.de/u-boot-nios.git |
564 | F: arch/nios2/ | 569 | F: arch/nios2/ |
565 | 570 | ||
566 | ONENAND | 571 | ONENAND |
567 | #M: Lukasz Majewski <l.majewski@majess.pl> | 572 | #M: Lukasz Majewski <l.majewski@majess.pl> |
568 | S: Orphaned (Since 2017-01) | 573 | S: Orphaned (Since 2017-01) |
569 | T: git git://git.denx.de/u-boot-onenand.git | 574 | T: git git://git.denx.de/u-boot-onenand.git |
570 | F: drivers/mtd/onenand/ | 575 | F: drivers/mtd/onenand/ |
571 | 576 | ||
572 | PATMAN | 577 | PATMAN |
573 | M: Simon Glass <sjg@chromium.org> | 578 | M: Simon Glass <sjg@chromium.org> |
574 | S: Maintained | 579 | S: Maintained |
575 | F: tools/patman/ | 580 | F: tools/patman/ |
576 | 581 | ||
577 | POWER | 582 | POWER |
578 | M: Jaehoon Chung <jh80.chung@samsung.com> | 583 | M: Jaehoon Chung <jh80.chung@samsung.com> |
579 | S: Maintained | 584 | S: Maintained |
580 | T: git git://git.denx.de/u-boot-pmic.git | 585 | T: git git://git.denx.de/u-boot-pmic.git |
581 | F: drivers/power/ | 586 | F: drivers/power/ |
582 | 587 | ||
583 | POWERPC | 588 | POWERPC |
584 | M: Wolfgang Denk <wd@denx.de> | 589 | M: Wolfgang Denk <wd@denx.de> |
585 | S: Maintained | 590 | S: Maintained |
586 | F: arch/powerpc/ | 591 | F: arch/powerpc/ |
587 | 592 | ||
588 | POWERPC MPC8XX | 593 | POWERPC MPC8XX |
589 | M: Christophe Leroy <christophe.leroy@c-s.fr> | 594 | M: Christophe Leroy <christophe.leroy@c-s.fr> |
590 | S: Maintained | 595 | S: Maintained |
591 | T: git git://git.denx.de/u-boot-mpc8xx.git | 596 | T: git git://git.denx.de/u-boot-mpc8xx.git |
592 | F: arch/powerpc/cpu/mpc8xx/ | 597 | F: arch/powerpc/cpu/mpc8xx/ |
593 | 598 | ||
594 | POWERPC MPC83XX | 599 | POWERPC MPC83XX |
595 | M: Mario Six <mario.six@gdsys.cc> | 600 | M: Mario Six <mario.six@gdsys.cc> |
596 | S: Maintained | 601 | S: Maintained |
597 | T: git git://git.denx.de/u-boot-mpc83xx.git | 602 | T: git git://git.denx.de/u-boot-mpc83xx.git |
598 | F: drivers/ram/mpc83xx_sdram.c | 603 | F: drivers/ram/mpc83xx_sdram.c |
599 | F: include/dt-bindings/memory/mpc83xx-sdram.h | 604 | F: include/dt-bindings/memory/mpc83xx-sdram.h |
600 | F: drivers/sysreset/sysreset_mpc83xx.c | 605 | F: drivers/sysreset/sysreset_mpc83xx.c |
601 | F: drivers/sysreset/sysreset_mpc83xx.h | 606 | F: drivers/sysreset/sysreset_mpc83xx.h |
602 | F: drivers/clk/mpc83xx_clk.c | 607 | F: drivers/clk/mpc83xx_clk.c |
603 | F: drivers/clk/mpc83xx_clk.h | 608 | F: drivers/clk/mpc83xx_clk.h |
604 | F: include/dt-bindings/clk/mpc83xx-clk.h | 609 | F: include/dt-bindings/clk/mpc83xx-clk.h |
605 | F: drivers/timer/mpc83xx_timer.c | 610 | F: drivers/timer/mpc83xx_timer.c |
606 | F: drivers/cpu/mpc83xx_cpu.c | 611 | F: drivers/cpu/mpc83xx_cpu.c |
607 | F: drivers/cpu/mpc83xx_cpu.h | 612 | F: drivers/cpu/mpc83xx_cpu.h |
608 | F: drivers/misc/mpc83xx_serdes.c | 613 | F: drivers/misc/mpc83xx_serdes.c |
609 | F: arch/powerpc/cpu/mpc83xx/ | 614 | F: arch/powerpc/cpu/mpc83xx/ |
610 | F: arch/powerpc/include/asm/arch-mpc83xx/ | 615 | F: arch/powerpc/include/asm/arch-mpc83xx/ |
611 | 616 | ||
612 | POWERPC MPC85XX | 617 | POWERPC MPC85XX |
613 | M: York Sun <york.sun@nxp.com> | 618 | M: York Sun <york.sun@nxp.com> |
614 | S: Maintained | 619 | S: Maintained |
615 | T: git git://git.denx.de/u-boot-mpc85xx.git | 620 | T: git git://git.denx.de/u-boot-mpc85xx.git |
616 | F: arch/powerpc/cpu/mpc85xx/ | 621 | F: arch/powerpc/cpu/mpc85xx/ |
617 | 622 | ||
618 | POWERPC MPC86XX | 623 | POWERPC MPC86XX |
619 | M: York Sun <york.sun@nxp.com> | 624 | M: York Sun <york.sun@nxp.com> |
620 | S: Maintained | 625 | S: Maintained |
621 | T: git git://git.denx.de/u-boot-mpc86xx.git | 626 | T: git git://git.denx.de/u-boot-mpc86xx.git |
622 | F: arch/powerpc/cpu/mpc86xx/ | 627 | F: arch/powerpc/cpu/mpc86xx/ |
623 | 628 | ||
624 | RISC-V | 629 | RISC-V |
625 | M: Rick Chen <rick@andestech.com> | 630 | M: Rick Chen <rick@andestech.com> |
626 | S: Maintained | 631 | S: Maintained |
627 | T: git git://git.denx.de/u-boot-riscv.git | 632 | T: git git://git.denx.de/u-boot-riscv.git |
628 | F: arch/riscv/ | 633 | F: arch/riscv/ |
629 | F: tools/prelink-riscv.c | 634 | F: tools/prelink-riscv.c |
630 | 635 | ||
631 | ROCKUSB | 636 | ROCKUSB |
632 | M: Eddie Cai <eddie.cai.linux@gmail.com> | 637 | M: Eddie Cai <eddie.cai.linux@gmail.com> |
633 | S: Maintained | 638 | S: Maintained |
634 | F: drivers/usb/gadget/f_rockusb.c | 639 | F: drivers/usb/gadget/f_rockusb.c |
635 | F: cmd/rockusb.c | 640 | F: cmd/rockusb.c |
636 | F: doc/README.rockusb | 641 | F: doc/README.rockusb |
637 | 642 | ||
638 | SANDBOX | 643 | SANDBOX |
639 | M: Simon Glass <sjg@chromium.org> | 644 | M: Simon Glass <sjg@chromium.org> |
640 | S: Maintained | 645 | S: Maintained |
641 | F: arch/sandbox/ | 646 | F: arch/sandbox/ |
642 | 647 | ||
643 | SH | 648 | SH |
644 | M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 649 | M: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> |
645 | S: Maintained | 650 | S: Maintained |
646 | T: git git://git.denx.de/u-boot-sh.git | 651 | T: git git://git.denx.de/u-boot-sh.git |
647 | F: arch/sh/ | 652 | F: arch/sh/ |
648 | 653 | ||
649 | SPI | 654 | SPI |
650 | M: Jagan Teki <jagan@openedev.com> | 655 | M: Jagan Teki <jagan@openedev.com> |
651 | S: Maintained | 656 | S: Maintained |
652 | T: git git://git.denx.de/u-boot-spi.git | 657 | T: git git://git.denx.de/u-boot-spi.git |
653 | F: drivers/mtd/spi/ | 658 | F: drivers/mtd/spi/ |
654 | F: drivers/spi/ | 659 | F: drivers/spi/ |
655 | F: include/spi* | 660 | F: include/spi* |
656 | 661 | ||
657 | SPMI | 662 | SPMI |
658 | M: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> | 663 | M: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> |
659 | S: Maintained | 664 | S: Maintained |
660 | F: drivers/spmi/ | 665 | F: drivers/spmi/ |
661 | F: include/spmi/ | 666 | F: include/spmi/ |
662 | 667 | ||
663 | TDA19988 HDMI ENCODER | 668 | TDA19988 HDMI ENCODER |
664 | M: Liviu Dudau <liviu.dudau@foss.arm.com> | 669 | M: Liviu Dudau <liviu.dudau@foss.arm.com> |
665 | S: Maintained | 670 | S: Maintained |
666 | F: drivers/video/tda19988.c | 671 | F: drivers/video/tda19988.c |
667 | 672 | ||
668 | TI SYSTEM SECURITY | 673 | TI SYSTEM SECURITY |
669 | M: Andrew F. Davis <afd@ti.com> | 674 | M: Andrew F. Davis <afd@ti.com> |
670 | S: Supported | 675 | S: Supported |
671 | F: arch/arm/mach-omap2/omap5/sec_entry_cpu1.S | 676 | F: arch/arm/mach-omap2/omap5/sec_entry_cpu1.S |
672 | F: arch/arm/mach-omap2/sec-common.c | 677 | F: arch/arm/mach-omap2/sec-common.c |
673 | F: arch/arm/mach-omap2/config_secure.mk | 678 | F: arch/arm/mach-omap2/config_secure.mk |
674 | F: configs/am335x_hs_evm_defconfig | 679 | F: configs/am335x_hs_evm_defconfig |
675 | F: configs/am335x_hs_evm_uart_defconfig | 680 | F: configs/am335x_hs_evm_uart_defconfig |
676 | F: configs/am43xx_hs_evm_defconfig | 681 | F: configs/am43xx_hs_evm_defconfig |
677 | F: configs/am57xx_hs_evm_defconfig | 682 | F: configs/am57xx_hs_evm_defconfig |
678 | F: configs/dra7xx_hs_evm_defconfig | 683 | F: configs/dra7xx_hs_evm_defconfig |
679 | F: configs/k2hk_hs_evm_defconfig | 684 | F: configs/k2hk_hs_evm_defconfig |
680 | F: configs/k2e_hs_evm_defconfig | 685 | F: configs/k2e_hs_evm_defconfig |
681 | F: configs/k2g_hs_evm_defconfig | 686 | F: configs/k2g_hs_evm_defconfig |
682 | F: configs/k2l_hs_evm_defconfig | 687 | F: configs/k2l_hs_evm_defconfig |
683 | 688 | ||
684 | TQ GROUP | 689 | TQ GROUP |
685 | #M: Martin Krause <martin.krause@tq-systems.de> | 690 | #M: Martin Krause <martin.krause@tq-systems.de> |
686 | S: Orphaned (Since 2016-02) | 691 | S: Orphaned (Since 2016-02) |
687 | T: git git://git.denx.de/u-boot-tq-group.git | 692 | T: git git://git.denx.de/u-boot-tq-group.git |
688 | 693 | ||
689 | TEE | 694 | TEE |
690 | M: Jens Wiklander <jens.wiklander@linaro.org> | 695 | M: Jens Wiklander <jens.wiklander@linaro.org> |
691 | S: Maintained | 696 | S: Maintained |
692 | F: drivers/tee/ | 697 | F: drivers/tee/ |
693 | F: include/tee.h | 698 | F: include/tee.h |
694 | F: include/tee/ | 699 | F: include/tee/ |
695 | 700 | ||
696 | UBI | 701 | UBI |
697 | M: Kyungmin Park <kmpark@infradead.org> | 702 | M: Kyungmin Park <kmpark@infradead.org> |
698 | M: Heiko Schocher <hs@denx.de> | 703 | M: Heiko Schocher <hs@denx.de> |
699 | S: Maintained | 704 | S: Maintained |
700 | T: git git://git.denx.de/u-boot-ubi.git | 705 | T: git git://git.denx.de/u-boot-ubi.git |
701 | F: drivers/mtd/ubi/ | 706 | F: drivers/mtd/ubi/ |
702 | 707 | ||
703 | USB | 708 | USB |
704 | M: Marek Vasut <marex@denx.de> | 709 | M: Marek Vasut <marex@denx.de> |
705 | S: Maintained | 710 | S: Maintained |
706 | T: git git://git.denx.de/u-boot-usb.git | 711 | T: git git://git.denx.de/u-boot-usb.git |
707 | F: drivers/usb/ | 712 | F: drivers/usb/ |
708 | 713 | ||
709 | USB xHCI | 714 | USB xHCI |
710 | M: Bin Meng <bmeng.cn@gmail.com> | 715 | M: Bin Meng <bmeng.cn@gmail.com> |
711 | S: Maintained | 716 | S: Maintained |
712 | T: git git://git.denx.de/u-boot-usb.git topic-xhci | 717 | T: git git://git.denx.de/u-boot-usb.git topic-xhci |
713 | F: drivers/usb/host/xhci* | 718 | F: drivers/usb/host/xhci* |
714 | 719 | ||
715 | VIDEO | 720 | VIDEO |
716 | M: Anatolij Gustschin <agust@denx.de> | 721 | M: Anatolij Gustschin <agust@denx.de> |
717 | S: Maintained | 722 | S: Maintained |
718 | T: git git://git.denx.de/u-boot-video.git | 723 | T: git git://git.denx.de/u-boot-video.git |
719 | F: drivers/video/ | 724 | F: drivers/video/ |
720 | F: common/lcd*.c | 725 | F: common/lcd*.c |
721 | F: include/lcd*.h | 726 | F: include/lcd*.h |
722 | F: include/video*.h | 727 | F: include/video*.h |
723 | 728 | ||
724 | X86 | 729 | X86 |
725 | M: Simon Glass <sjg@chromium.org> | 730 | M: Simon Glass <sjg@chromium.org> |
726 | M: Bin Meng <bmeng.cn@gmail.com> | 731 | M: Bin Meng <bmeng.cn@gmail.com> |
727 | S: Maintained | 732 | S: Maintained |
728 | T: git git://git.denx.de/u-boot-x86.git | 733 | T: git git://git.denx.de/u-boot-x86.git |
729 | F: arch/x86/ | 734 | F: arch/x86/ |
730 | 735 | ||
731 | XTENSA | 736 | XTENSA |
732 | M: Max Filippov <jcmvbkbc@gmail.com> | 737 | M: Max Filippov <jcmvbkbc@gmail.com> |
733 | S: Maintained | 738 | S: Maintained |
734 | F: arch/xtensa/ | 739 | F: arch/xtensa/ |
735 | 740 | ||
736 | THE REST | 741 | THE REST |
737 | M: Tom Rini <trini@konsulko.com> | 742 | M: Tom Rini <trini@konsulko.com> |
738 | L: u-boot@lists.denx.de | 743 | L: u-boot@lists.denx.de |
739 | Q: http://patchwork.ozlabs.org/project/uboot/list/ | 744 | Q: http://patchwork.ozlabs.org/project/uboot/list/ |
740 | S: Maintained | 745 | S: Maintained |
741 | T: git git://git.denx.de/u-boot.git | 746 | T: git git://git.denx.de/u-boot.git |
742 | F: configs/tools-only_defconfig | 747 | F: configs/tools-only_defconfig |
743 | F: * | 748 | F: * |
744 | F: */ | 749 | F: */ |
745 | 750 |
arch/mips/cpu/u-boot-spl.lds
1 | /* SPDX-License-Identifier: GPL-2.0+ */ | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
2 | 2 | ||
3 | MEMORY { .spl_mem : ORIGIN = CONFIG_SPL_TEXT_BASE, \ | 3 | MEMORY { .spl_mem : ORIGIN = CONFIG_SPL_TEXT_BASE, \ |
4 | LENGTH = CONFIG_SPL_MAX_SIZE } | 4 | LENGTH = CONFIG_SPL_MAX_SIZE } |
5 | MEMORY { .bss_mem : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ | 5 | MEMORY { .bss_mem : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ |
6 | LENGTH = CONFIG_SPL_BSS_MAX_SIZE } | 6 | LENGTH = CONFIG_SPL_BSS_MAX_SIZE } |
7 | 7 | ||
8 | OUTPUT_ARCH(mips) | 8 | OUTPUT_ARCH(mips) |
9 | ENTRY(_start) | 9 | ENTRY(_start) |
10 | SECTIONS | 10 | SECTIONS |
11 | { | 11 | { |
12 | . = 0x00000000; | 12 | . = 0x00000000; |
13 | 13 | ||
14 | . = ALIGN(4); | 14 | . = ALIGN(4); |
15 | .text : { | 15 | .text : { |
16 | *(.text*) | 16 | *(.text*) |
17 | } > .spl_mem | 17 | } > .spl_mem |
18 | 18 | ||
19 | . = ALIGN(4); | 19 | . = ALIGN(4); |
20 | .rodata : { | 20 | .rodata : { |
21 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | 21 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
22 | } > .spl_mem | 22 | } > .spl_mem |
23 | 23 | ||
24 | . = ALIGN(4); | 24 | . = ALIGN(4); |
25 | .data : { | 25 | .data : { |
26 | *(SORT_BY_ALIGNMENT(.data*)) | 26 | *(SORT_BY_ALIGNMENT(.data*)) |
27 | *(SORT_BY_ALIGNMENT(.sdata*)) | 27 | *(SORT_BY_ALIGNMENT(.sdata*)) |
28 | } > .spl_mem | 28 | } > .spl_mem |
29 | 29 | ||
30 | #ifdef CONFIG_SPL_DM | 30 | #ifdef CONFIG_SPL_DM |
31 | . = ALIGN(4); | 31 | . = ALIGN(4); |
32 | .u_boot_list : { | 32 | .u_boot_list : { |
33 | KEEP(*(SORT(.u_boot_list*))); | 33 | KEEP(*(SORT(.u_boot_list*))); |
34 | } > .spl_mem | 34 | } > .spl_mem |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | . = ALIGN(4); | 37 | . = ALIGN(4); |
38 | __image_copy_end = .; | 38 | __image_copy_end = .; |
39 | 39 | ||
40 | .bss (NOLOAD) : { | 40 | .bss (NOLOAD) : { |
41 | __bss_start = .; | 41 | __bss_start = .; |
42 | *(.bss*) | 42 | *(.bss*) |
43 | *(.sbss*) | 43 | *(.sbss*) |
44 | *(COMMON) | 44 | *(COMMON) |
45 | . = ALIGN(4); | 45 | . = ALIGN(4); |
46 | __bss_end = .; | 46 | __bss_end = .; |
47 | } > .bss_mem | 47 | } > .bss_mem |
48 | 48 | ||
49 | .rel.dyn (NOLOAD) : { | 49 | /* These mark the ABI of U-Boot for debuggers. */ |
50 | *(.rel.dyn) | 50 | .mdebug.abi32 : { |
51 | KEEP(*(.mdebug.abi32)) | ||
51 | } | 52 | } |
52 | 53 | .mdebug.abi64 : { | |
53 | .dynsym : { | 54 | KEEP(*(.mdebug.abi64)) |
54 | *(.dynsym) | ||
55 | } | 55 | } |
56 | 56 | ||
57 | .dynbss : { | 57 | /* This is the MIPS specific mdebug section. */ |
58 | *(.dynbss) | 58 | .mdebug : { *(.mdebug) } |
59 | } | ||
60 | 59 | ||
61 | .dynstr : { | 60 | /* Stabs debugging sections. */ |
62 | *(.dynstr) | 61 | .stab 0 : { *(.stab) } |
63 | } | 62 | .stabstr 0 : { *(.stabstr) } |
63 | .stab.excl 0 : { *(.stab.excl) } | ||
64 | .stab.exclstr 0 : { *(.stab.exclstr) } | ||
65 | .stab.index 0 : { *(.stab.index) } | ||
66 | .stab.indexstr 0 : { *(.stab.indexstr) } | ||
67 | .comment 0 : { *(.comment) } | ||
64 | 68 | ||
65 | .dynamic : { | 69 | /* |
66 | *(.dynamic) | 70 | * DWARF debug sections. |
71 | * Symbols in the DWARF debugging sections are relative to | ||
72 | * the beginning of the section so we begin them at 0. | ||
73 | */ | ||
74 | /* DWARF 1 */ | ||
75 | .debug 0 : { *(.debug) } | ||
76 | .line 0 : { *(.line) } | ||
77 | /* GNU DWARF 1 extensions */ | ||
78 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | ||
79 | .debug_sfnames 0 : { *(.debug_sfnames) } | ||
80 | /* DWARF 1.1 and DWARF 2 */ | ||
81 | .debug_aranges 0 : { *(.debug_aranges) } | ||
82 | .debug_pubnames 0 : { *(.debug_pubnames) } | ||
83 | /* DWARF 2 */ | ||
84 | .debug_info 0 : { | ||
85 | *(.debug_info | ||
86 | .gnu.linkonce.wi.*) | ||
67 | } | 87 | } |
88 | .debug_abbrev 0 : { *(.debug_abbrev) } | ||
89 | .debug_line 0 : { *(.debug_line) } | ||
90 | .debug_frame 0 : { *(.debug_frame) } | ||
91 | .debug_str 0 : { *(.debug_str) } | ||
92 | .debug_loc 0 : { *(.debug_loc) } | ||
93 | .debug_macinfo 0 : { *(.debug_macinfo) } | ||
94 | .debug_pubtypes 0 : { *(.debug_pubtypes) } | ||
95 | /* DWARF 3 */ | ||
96 | .debug_ranges 0 : { *(.debug_ranges) } | ||
97 | /* SGI/MIPS DWARF 2 extensions */ | ||
98 | .debug_weaknames 0 : { *(.debug_weaknames) } | ||
99 | .debug_funcnames 0 : { *(.debug_funcnames) } | ||
100 | .debug_typenames 0 : { *(.debug_typenames) } | ||
101 | .debug_varnames 0 : { *(.debug_varnames) } | ||
102 | /* GNU DWARF 2 extensions */ | ||
103 | .debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) } | ||
104 | .debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) } | ||
105 | /* DWARF 4 */ | ||
106 | .debug_types 0 : { *(.debug_types) } | ||
107 | /* DWARF 5 */ | ||
108 | .debug_macro 0 : { *(.debug_macro) } | ||
109 | .debug_addr 0 : { *(.debug_addr) } | ||
68 | 110 | ||
69 | .plt : { | 111 | /DISCARD/ : { |
70 | *(.plt) | 112 | /* ABI crap starts here */ |
71 | } | 113 | *(.MIPS.abiflags) |
72 | 114 | *(.MIPS.options) | |
73 | .interp : { | 115 | *(.options) |
74 | *(.interp) | 116 | *(.pdr) |
75 | } | 117 | *(.reginfo) |
76 | 118 | *(.eh_frame) | |
77 | .gnu : { |
arch/mips/cpu/u-boot.lds
1 | /* SPDX-License-Identifier: GPL-2.0+ */ | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
2 | /* | 2 | /* |
3 | * (C) Copyright 2003 | 3 | * (C) Copyright 2003 |
4 | * Wolfgang Denk Engineering, <wd@denx.de> | 4 | * Wolfgang Denk Engineering, <wd@denx.de> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | OUTPUT_ARCH(mips) | 7 | OUTPUT_ARCH(mips) |
8 | ENTRY(_start) | 8 | ENTRY(_start) |
9 | SECTIONS | 9 | SECTIONS |
10 | { | 10 | { |
11 | . = 0x00000000; | 11 | . = 0x00000000; |
12 | 12 | ||
13 | . = ALIGN(4); | 13 | . = ALIGN(4); |
14 | .text : { | 14 | .text : { |
15 | __text_start = .; | 15 | __text_start = .; |
16 | *(.text*) | 16 | *(.text*) |
17 | __text_end = .; | 17 | __text_end = .; |
18 | } | 18 | } |
19 | 19 | ||
20 | . = ALIGN(4); | 20 | . = ALIGN(4); |
21 | .rodata : { | 21 | .rodata : { |
22 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) | 22 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
23 | } | 23 | } |
24 | 24 | ||
25 | . = ALIGN(4); | 25 | . = ALIGN(4); |
26 | .data : { | 26 | .data : { |
27 | *(.data*) | 27 | *(.data*) |
28 | } | 28 | } |
29 | 29 | ||
30 | . = ALIGN(4); | 30 | . = ALIGN(4); |
31 | .sdata : { | 31 | .sdata : { |
32 | *(.sdata*) | 32 | *(.sdata*) |
33 | } | 33 | } |
34 | 34 | ||
35 | . = ALIGN(4); | 35 | . = ALIGN(4); |
36 | .u_boot_list : { | 36 | .u_boot_list : { |
37 | KEEP(*(SORT(.u_boot_list*))); | 37 | KEEP(*(SORT(.u_boot_list*))); |
38 | } | 38 | } |
39 | 39 | ||
40 | . = ALIGN(4); | 40 | . = ALIGN(4); |
41 | __image_copy_end = .; | 41 | __image_copy_end = .; |
42 | __init_end = .; | 42 | __init_end = .; |
43 | 43 | ||
44 | .data.reloc : { | 44 | .data.reloc : { |
45 | __rel_start = .; | 45 | __rel_start = .; |
46 | /* | 46 | /* |
47 | * Space for relocation table | 47 | * Space for relocation table |
48 | * This needs to be filled so that the | 48 | * This needs to be filled so that the |
49 | * mips-reloc tool can overwrite the content. | 49 | * mips-reloc tool can overwrite the content. |
50 | * An invalid value is left at the start of the | 50 | * An invalid value is left at the start of the |
51 | * section to abort relocation if the table | 51 | * section to abort relocation if the table |
52 | * has not been filled in. | 52 | * has not been filled in. |
53 | */ | 53 | */ |
54 | LONG(0xFFFFFFFF); | 54 | LONG(0xFFFFFFFF); |
55 | FILL(0); | 55 | FILL(0); |
56 | . += CONFIG_MIPS_RELOCATION_TABLE_SIZE - 4; | 56 | . += CONFIG_MIPS_RELOCATION_TABLE_SIZE - 4; |
57 | } | 57 | } |
58 | 58 | ||
59 | . = ALIGN(4); | 59 | . = ALIGN(4); |
60 | _end = .; | 60 | _end = .; |
61 | 61 | ||
62 | .bss __rel_start (OVERLAY) : { | 62 | .bss __rel_start (OVERLAY) : { |
63 | __bss_start = .; | 63 | __bss_start = .; |
64 | *(.sbss.*) | 64 | *(.sbss.*) |
65 | *(.bss.*) | 65 | *(.bss.*) |
66 | *(COMMON) | 66 | *(COMMON) |
67 | . = ALIGN(4); | 67 | . = ALIGN(4); |
68 | __bss_end = .; | 68 | __bss_end = .; |
69 | } | 69 | } |
70 | 70 | ||
71 | .dynsym _end : { | 71 | /* These mark the ABI of U-Boot for debuggers. */ |
72 | *(.dynsym) | 72 | .mdebug.abi32 : { |
73 | KEEP(*(.mdebug.abi32)) | ||
73 | } | 74 | } |
74 | 75 | .mdebug.abi64 : { | |
75 | .dynbss : { | 76 | KEEP(*(.mdebug.abi64)) |
76 | *(.dynbss) | ||
77 | } | 77 | } |
78 | 78 | ||
79 | .dynstr : { | 79 | /* This is the MIPS specific mdebug section. */ |
80 | *(.dynstr) | 80 | .mdebug : { *(.mdebug) } |
81 | } | ||
82 | 81 | ||
83 | .dynamic : { | 82 | /* Stabs debugging sections. */ |
84 | *(.dynamic) | 83 | .stab 0 : { *(.stab) } |
85 | } | 84 | .stabstr 0 : { *(.stabstr) } |
85 | .stab.excl 0 : { *(.stab.excl) } | ||
86 | .stab.exclstr 0 : { *(.stab.exclstr) } | ||
87 | .stab.index 0 : { *(.stab.index) } | ||
88 | .stab.indexstr 0 : { *(.stab.indexstr) } | ||
89 | .comment 0 : { *(.comment) } | ||
86 | 90 | ||
87 | .plt : { | 91 | /* |
88 | *(.plt) | 92 | * DWARF debug sections. |
93 | * Symbols in the DWARF debugging sections are relative to | ||
94 | * the beginning of the section so we begin them at 0. | ||
95 | */ | ||
96 | /* DWARF 1 */ | ||
97 | .debug 0 : { *(.debug) } | ||
98 | .line 0 : { *(.line) } | ||
99 | /* GNU DWARF 1 extensions */ | ||
100 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | ||
101 | .debug_sfnames 0 : { *(.debug_sfnames) } | ||
102 | /* DWARF 1.1 and DWARF 2 */ | ||
103 | .debug_aranges 0 : { *(.debug_aranges) } | ||
104 | .debug_pubnames 0 : { *(.debug_pubnames) } | ||
105 | /* DWARF 2 */ | ||
106 | .debug_info 0 : { | ||
107 | *(.debug_info | ||
108 | .gnu.linkonce.wi.*) | ||
89 | } | 109 | } |
110 | .debug_abbrev 0 : { *(.debug_abbrev) } | ||
111 | .debug_line 0 : { *(.debug_line) } | ||
112 | .debug_frame 0 : { *(.debug_frame) } | ||
113 | .debug_str 0 : { *(.debug_str) } | ||
114 | .debug_loc 0 : { *(.debug_loc) } | ||
115 | .debug_macinfo 0 : { *(.debug_macinfo) } | ||
116 | .debug_pubtypes 0 : { *(.debug_pubtypes) } | ||
117 | /* DWARF 3 */ | ||
118 | .debug_ranges 0 : { *(.debug_ranges) } | ||
119 | /* SGI/MIPS DWARF 2 extensions */ | ||
120 | .debug_weaknames 0 : { *(.debug_weaknames) } | ||
121 | .debug_funcnames 0 : { *(.debug_funcnames) } | ||
122 | .debug_typenames 0 : { *(.debug_typenames) } | ||
123 | .debug_varnames 0 : { *(.debug_varnames) } | ||
124 | /* GNU DWARF 2 extensions */ | ||
125 | .debug_gnu_pubnames 0 : { *(.debug_gnu_pubnames) } | ||
126 | .debug_gnu_pubtypes 0 : { *(.debug_gnu_pubtypes) } | ||
127 | /* DWARF 4 */ | ||
128 | .debug_types 0 : { *(.debug_types) } | ||
129 | /* DWARF 5 */ | ||
130 | .debug_macro 0 : { *(.debug_macro) } | ||
131 | .debug_addr 0 : { *(.debug_addr) } | ||
90 | 132 | ||
91 | .interp : { | 133 | /DISCARD/ : { |
92 | *(.interp) | 134 | /* ABI crap starts here */ |
93 | } | 135 | *(.MIPS.abiflags) |
94 | 136 | *(.MIPS.options) | |
95 | .gnu : { | 137 | *(.options) |
96 | *(.gnu*) | 138 | *(.pdr) |
97 | } | 139 | *(.reginfo) |
98 | 140 | *(.eh_frame) | |
99 | .MIPS.stubs : { |
arch/mips/dts/Makefile
1 | # SPDX-License-Identifier: GPL-2.0+ | 1 | # SPDX-License-Identifier: GPL-2.0+ |
2 | 2 | ||
3 | dtb-$(CONFIG_TARGET_AP121) += ap121.dtb | 3 | dtb-$(CONFIG_TARGET_AP121) += ap121.dtb |
4 | dtb-$(CONFIG_TARGET_AP143) += ap143.dtb | 4 | dtb-$(CONFIG_TARGET_AP143) += ap143.dtb |
5 | dtb-$(CONFIG_TARGET_BOSTON) += img,boston.dtb | 5 | dtb-$(CONFIG_TARGET_BOSTON) += img,boston.dtb |
6 | dtb-$(CONFIG_TARGET_MALTA) += mti,malta.dtb | 6 | dtb-$(CONFIG_TARGET_MALTA) += mti,malta.dtb |
7 | dtb-$(CONFIG_TARGET_PIC32MZDASK) += pic32mzda_sk.dtb | 7 | dtb-$(CONFIG_TARGET_PIC32MZDASK) += pic32mzda_sk.dtb |
8 | dtb-$(CONFIG_TARGET_XILFPGA) += nexys4ddr.dtb | 8 | dtb-$(CONFIG_TARGET_XILFPGA) += nexys4ddr.dtb |
9 | dtb-$(CONFIG_BOARD_COMTREND_AR5315U) += comtrend,ar-5315u.dtb | 9 | dtb-$(CONFIG_BOARD_COMTREND_AR5315U) += comtrend,ar-5315u.dtb |
10 | dtb-$(CONFIG_BOARD_COMTREND_AR5387UN) += comtrend,ar-5387un.dtb | 10 | dtb-$(CONFIG_BOARD_COMTREND_AR5387UN) += comtrend,ar-5387un.dtb |
11 | dtb-$(CONFIG_BOARD_COMTREND_CT5361) += comtrend,ct-5361.dtb | 11 | dtb-$(CONFIG_BOARD_COMTREND_CT5361) += comtrend,ct-5361.dtb |
12 | dtb-$(CONFIG_BOARD_COMTREND_VR3032U) += comtrend,vr-3032u.dtb | 12 | dtb-$(CONFIG_BOARD_COMTREND_VR3032U) += comtrend,vr-3032u.dtb |
13 | dtb-$(CONFIG_BOARD_COMTREND_WAP5813N) += comtrend,wap-5813n.dtb | 13 | dtb-$(CONFIG_BOARD_COMTREND_WAP5813N) += comtrend,wap-5813n.dtb |
14 | dtb-$(CONFIG_BOARD_HUAWEI_HG556A) += huawei,hg556a.dtb | 14 | dtb-$(CONFIG_BOARD_HUAWEI_HG556A) += huawei,hg556a.dtb |
15 | dtb-$(CONFIG_BOARD_NETGEAR_CG3100D) += netgear,cg3100d.dtb | 15 | dtb-$(CONFIG_BOARD_NETGEAR_CG3100D) += netgear,cg3100d.dtb |
16 | dtb-$(CONFIG_BOARD_NETGEAR_DGND3700V2) += netgear,dgnd3700v2.dtb | 16 | dtb-$(CONFIG_BOARD_NETGEAR_DGND3700V2) += netgear,dgnd3700v2.dtb |
17 | dtb-$(CONFIG_BOARD_SAGEM_FAST1704) += sagem,f@st1704.dtb | 17 | dtb-$(CONFIG_BOARD_SAGEM_FAST1704) += sagem,f@st1704.dtb |
18 | dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb | 18 | dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb |
19 | dtb-$(CONFIG_TARGET_JZ4780_CI20) += ci20.dtb | 19 | dtb-$(CONFIG_TARGET_JZ4780_CI20) += ci20.dtb |
20 | dtb-$(CONFIG_SOC_LUTON) += luton_pcb090.dtb luton_pcb091.dtb | ||
21 | dtb-$(CONFIG_SOC_OCELOT) += ocelot_pcb120.dtb ocelot_pcb123.dtb | ||
22 | dtb-$(CONFIG_SOC_JR2) += jr2_pcb110.dtb jr2_pcb111.dtb serval2_pcb112.dtb | ||
20 | 23 | ||
21 | targets += $(dtb-y) | 24 | targets += $(dtb-y) |
22 | 25 | ||
23 | # Add any required device tree compiler flags here | 26 | # Add any required device tree compiler flags here |
24 | DTC_FLAGS += | 27 | DTC_FLAGS += |
25 | 28 | ||
26 | PHONY += dtbs | 29 | PHONY += dtbs |
27 | dtbs: $(addprefix $(obj)/, $(dtb-y)) | 30 | dtbs: $(addprefix $(obj)/, $(dtb-y)) |
28 | @: | 31 | @: |
29 | 32 | ||
30 | clean-files := *.dtb | 33 | clean-files := *.dtb |
31 | 34 |
arch/mips/dts/gardena-smart-gateway-mt7688.dts
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | /* | 2 | /* |
3 | * Copyright (C) 2018 Stefan Roese <sr@denx.de> | 3 | * Copyright (C) 2018 Stefan Roese <sr@denx.de> |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /dts-v1/; | 6 | /dts-v1/; |
7 | 7 | ||
8 | #include "mt7628a.dtsi" | 8 | #include "mt7628a.dtsi" |
9 | #include <dt-bindings/gpio/gpio.h> | 9 | #include <dt-bindings/gpio/gpio.h> |
10 | 10 | ||
11 | / { | 11 | / { |
12 | compatible = "gardena,smart-gateway-mt7688", "ralink,mt7628a-soc"; | 12 | compatible = "gardena,smart-gateway-mt7688", "ralink,mt7628a-soc"; |
13 | model = "Gardena smart-Gateway-MT7688"; | 13 | model = "Gardena smart-Gateway-MT7688"; |
14 | 14 | ||
15 | aliases { | 15 | aliases { |
16 | serial0 = &uart0; | 16 | serial0 = &uart0; |
17 | spi0 = &spi0; | 17 | spi0 = &spi0; |
18 | }; | 18 | }; |
19 | 19 | ||
20 | memory@0 { | 20 | memory@0 { |
21 | device_type = "memory"; | 21 | device_type = "memory"; |
22 | reg = <0x0 0x08000000>; | 22 | reg = <0x0 0x08000000>; |
23 | }; | 23 | }; |
24 | 24 | ||
25 | leds { | 25 | leds { |
26 | compatible = "gpio-leds"; | 26 | compatible = "gpio-leds"; |
27 | 27 | ||
28 | power_blue { | 28 | power_blue { |
29 | label = "smartgw:power:blue"; | 29 | label = "smartgw:power:blue"; |
30 | gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>; | 30 | gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>; |
31 | default-state = "off"; | 31 | default-state = "off"; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | power_green { | 34 | power_green { |
35 | label = "smartgw:power:green"; | 35 | label = "smartgw:power:green"; |
36 | gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; | 36 | gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; |
37 | default-state = "off"; | 37 | default-state = "on"; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | power_red { | 40 | power_red { |
41 | label = "smartgw:power:red"; | 41 | label = "smartgw:power:red"; |
42 | gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; | 42 | gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; |
43 | default-state = "off"; | 43 | default-state = "off"; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | radio_blue { | 46 | radio_blue { |
47 | label = "smartgw:radio:blue"; | 47 | label = "smartgw:radio:blue"; |
48 | gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; | 48 | gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; |
49 | default-state = "off"; | 49 | default-state = "off"; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | radio_green { | 52 | radio_green { |
53 | label = "smartgw:radio:green"; | 53 | label = "smartgw:radio:green"; |
54 | gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; | 54 | gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; |
55 | default-state = "off"; | 55 | default-state = "off"; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | radio_red { | 58 | radio_red { |
59 | label = "smartgw:radio:red"; | 59 | label = "smartgw:radio:red"; |
60 | gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; | 60 | gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; |
61 | default-state = "off"; | 61 | default-state = "off"; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | internet_blue { | 64 | internet_blue { |
65 | label = "smartgw:internet:blue"; | 65 | label = "smartgw:internet:blue"; |
66 | gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; | 66 | gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; |
67 | default-state = "off"; | 67 | default-state = "off"; |
68 | }; | 68 | }; |
69 | 69 | ||
70 | internet_green { | 70 | internet_green { |
71 | label = "smartgw:internet:green"; | 71 | label = "smartgw:internet:green"; |
72 | gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; | 72 | gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; |
73 | default-state = "off"; | 73 | default-state = "off"; |
74 | }; | 74 | }; |
75 | 75 | ||
76 | internet_red { | 76 | internet_red { |
77 | label = "smartgw:internet:red"; | 77 | label = "smartgw:internet:red"; |
78 | gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; | 78 | gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; |
79 | default-state = "off"; | 79 | default-state = "off"; |
80 | }; | 80 | }; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | chosen { | 83 | chosen { |
84 | stdout-path = &uart0; | 84 | stdout-path = &uart0; |
85 | }; | 85 | }; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | &uart0 { | 88 | &uart0 { |
89 | status = "okay"; | 89 | status = "okay"; |
90 | clock-frequency = <40000000>; | 90 | clock-frequency = <40000000>; |
91 | }; | 91 | }; |
92 | 92 | ||
93 | &spi0 { | 93 | &spi0 { |
94 | status = "okay"; | 94 | status = "okay"; |
95 | num-cs = <2>; | 95 | num-cs = <2>; |
96 | 96 | ||
97 | spi-flash@0 { | 97 | spi-flash@0 { |
98 | #address-cells = <1>; | 98 | #address-cells = <1>; |
99 | #size-cells = <1>; | 99 | #size-cells = <1>; |
100 | compatible = "spi-flash", "jedec,spi-nor"; | 100 | compatible = "spi-flash", "jedec,spi-nor"; |
101 | spi-max-frequency = <40000000>; | 101 | spi-max-frequency = <40000000>; |
102 | reg = <0>; | 102 | reg = <0>; |
103 | }; | 103 | }; |
104 | 104 | ||
105 | spi-nand@1 { | 105 | spi-nand@1 { |
106 | #address-cells = <1>; | 106 | #address-cells = <1>; |
107 | #size-cells = <1>; | 107 | #size-cells = <1>; |
108 | compatible = "spi-nand"; | 108 | compatible = "spi-nand"; |
109 | spi-max-frequency = <40000000>; | 109 | spi-max-frequency = <40000000>; |
110 | reg = <1>; | 110 | reg = <1>; |
111 | }; | 111 | }; |
112 | }; | 112 | }; |
113 | 113 |
arch/mips/dts/jr2_pcb110.dts
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | #include "mscc,jr2.dtsi" | ||
8 | |||
9 | / { | ||
10 | model = "Jaguar2 Cu8-Sfp16 PCB110 Reference Board"; | ||
11 | compatible = "mscc,jr2-pcb110", "mscc,jr2"; | ||
12 | |||
13 | aliases { | ||
14 | spi0 = &spi0; | ||
15 | serial0 = &uart0; | ||
16 | }; | ||
17 | |||
18 | chosen { | ||
19 | stdout-path = "serial0:115200n8"; | ||
20 | }; | ||
21 | |||
22 | gpio-leds { | ||
23 | compatible = "gpio-leds"; | ||
24 | |||
25 | status_green { | ||
26 | label = "pcb110:green:status"; | ||
27 | gpios = <&gpio 12 0>; | ||
28 | default-state = "on"; | ||
29 | }; | ||
30 | |||
31 | status_red { | ||
32 | label = "pcb110:red:status"; | ||
33 | gpios = <&gpio 13 0>; | ||
34 | default-state = "off"; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | &uart0 { | ||
40 | status = "okay"; | ||
41 | }; | ||
42 | |||
43 | &spi0 { | ||
44 | status = "okay"; | ||
45 | spi-flash@0 { | ||
46 | compatible = "spi-flash"; | ||
47 | spi-max-frequency = <18000000>; /* input clock */ | ||
48 | reg = <0>; /* CS0 */ | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | &gpio { | ||
53 | /* SPIO only use DO, CLK, no inputs */ | ||
54 | sgpio1_pins: sgpio1-pins { | ||
55 | pins = "GPIO_4", "GPIO_5"; | ||
56 | function = "sg1"; | ||
57 | }; | ||
58 | }; | ||
59 | |||
60 | &sgpio { | ||
61 | status = "okay"; | ||
62 | sgpio-ports = <0x00ffffff>; | ||
63 | }; | ||
64 | |||
65 | &sgpio1 { | ||
66 | status = "okay"; | ||
67 | sgpio-ports = <0x00ff0000>; | ||
68 | }; | ||
69 | |||
70 | &sgpio2 { | ||
71 | status = "okay"; | ||
72 | sgpio-ports = <0x3f00ffff>; | ||
73 | gpio-ranges = <&sgpio2 0 0 96>; | ||
74 | }; | ||
75 |
arch/mips/dts/jr2_pcb111.dts
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | #include "mscc,jr2.dtsi" | ||
8 | |||
9 | / { | ||
10 | model = "Jaguar2 Cu48 PCB111 Reference Board"; | ||
11 | compatible = "mscc,jr2-pcb111", "mscc,jr2"; | ||
12 | |||
13 | aliases { | ||
14 | spi0 = &spi0; | ||
15 | serial0 = &uart0; | ||
16 | }; | ||
17 | |||
18 | chosen { | ||
19 | stdout-path = "serial0:115200n8"; | ||
20 | }; | ||
21 | |||
22 | gpio-leds { | ||
23 | compatible = "gpio-leds"; | ||
24 | |||
25 | status_green { | ||
26 | label = "pcb111:green:status"; | ||
27 | gpios = <&gpio 12 0>; | ||
28 | default-state = "on"; | ||
29 | }; | ||
30 | |||
31 | status_red { | ||
32 | label = "pcb111:red:status"; | ||
33 | gpios = <&gpio 13 0>; | ||
34 | default-state = "off"; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | &uart0 { | ||
40 | status = "okay"; | ||
41 | }; | ||
42 | |||
43 | &spi0 { | ||
44 | status = "okay"; | ||
45 | spi-flash@0 { | ||
46 | compatible = "spi-flash"; | ||
47 | spi-max-frequency = <18000000>; /* input clock */ | ||
48 | reg = <0>; /* CS0 */ | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | &gpio { | ||
53 | /* SPIO only use DO, CLK, no inputs */ | ||
54 | sgpio1_pins: sgpio1-pins { | ||
55 | pins = "GPIO_4", "GPIO_5"; | ||
56 | function = "sg1"; | ||
57 | }; | ||
58 | }; | ||
59 | |||
60 | &sgpio { | ||
61 | status = "okay"; | ||
62 | sgpio-ports = <0xffffffff>; | ||
63 | }; | ||
64 | |||
65 | &sgpio1 { | ||
66 | status = "okay"; | ||
67 | sgpio-ports = <0x001effff>; | ||
68 | }; | ||
69 | |||
70 | &sgpio2 { | ||
71 | status = "okay"; | ||
72 | sgpio-ports = <0xff000000>; | ||
73 | gpio-ranges = <&sgpio2 0 0 96>; | ||
74 | }; | ||
75 |
arch/mips/dts/luton_pcb090.dts
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | #include "mscc,luton.dtsi" | ||
8 | |||
9 | / { | ||
10 | model = "Luton26 PCB090 Reference Board"; | ||
11 | compatible = "mscc,luton-pcb090", "mscc,luton"; | ||
12 | |||
13 | aliases { | ||
14 | serial0 = &uart0; | ||
15 | spi0 = &spi0; | ||
16 | }; | ||
17 | |||
18 | chosen { | ||
19 | stdout-path = "serial0:115200n8"; | ||
20 | }; | ||
21 | |||
22 | gpio-leds { | ||
23 | compatible = "gpio-leds"; | ||
24 | |||
25 | status_green { | ||
26 | label = "pcb090:green:status"; | ||
27 | gpios = <&sgpio 64 GPIO_ACTIVE_HIGH>; /* p0.2 */ | ||
28 | default-state = "on"; | ||
29 | }; | ||
30 | |||
31 | status_red { | ||
32 | label = "pcb090:red:status"; | ||
33 | gpios = <&sgpio 65 GPIO_ACTIVE_HIGH>; /* p1.2 */ | ||
34 | default-state = "off"; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | &sgpio { | ||
40 | status = "okay"; | ||
41 | gpio-ranges = <&sgpio 0 0 96>; | ||
42 | }; | ||
43 | |||
44 | &uart0 { | ||
45 | status = "okay"; | ||
46 | }; | ||
47 | |||
48 | &spi0 { | ||
49 | status = "okay"; | ||
50 | spi-flash@0 { | ||
51 | compatible = "spi-flash"; | ||
52 | spi-max-frequency = <18000000>; /* input clock */ | ||
53 | reg = <0>; /* CS0 */ | ||
54 | spi-cs-high; | ||
55 | }; | ||
56 | }; | ||
57 | |||
58 |
arch/mips/dts/luton_pcb091.dts
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /dts-v1/; | 6 | /dts-v1/; |
7 | #include "mscc,luton.dtsi" | 7 | #include "mscc,luton.dtsi" |
8 | 8 | ||
9 | / { | 9 | / { |
10 | model = "Luton10 PCB091 Reference Board"; | 10 | model = "Luton10 PCB091 Reference Board"; |
11 | compatible = "mscc,luton-pcb091", "mscc,luton"; | 11 | compatible = "mscc,luton-pcb091", "mscc,luton"; |
12 | 12 | ||
13 | aliases { | 13 | aliases { |
14 | serial0 = &uart0; | 14 | serial0 = &uart0; |
15 | spi0 = &spi0; | 15 | spi0 = &spi0; |
16 | }; | 16 | }; |
17 | 17 | ||
18 | chosen { | 18 | chosen { |
19 | stdout-path = "serial0:115200n8"; | 19 | stdout-path = "serial0:115200n8"; |
20 | }; | 20 | }; |
21 | |||
22 | gpio-leds { | ||
23 | compatible = "gpio-leds"; | ||
24 | |||
25 | top_dimmer { | ||
26 | label = "pcb091:top:dimmer"; | ||
27 | gpios = <&gpio 29 GPIO_ACTIVE_LOW>; | ||
28 | default-state = "on"; | ||
29 | }; | ||
30 | |||
31 | status_green { | ||
32 | label = "pcb091:green:status"; | ||
33 | gpios = <&sgpio 26 GPIO_ACTIVE_HIGH>; /* p26.0 */ | ||
34 | default-state = "on"; | ||
35 | }; | ||
36 | |||
37 | status_red { | ||
38 | label = "pcb091:red:status"; | ||
39 | gpios = <&sgpio 58 GPIO_ACTIVE_HIGH>; /* p26.1 */ | ||
40 | default-state = "off"; | ||
41 | }; | ||
42 | }; | ||
43 | }; | ||
44 | |||
45 | &sgpio { | ||
46 | status = "okay"; | ||
47 | mscc,sgpio-ports = <0xFFF000FF>; | ||
21 | }; | 48 | }; |
22 | 49 | ||
23 | &uart0 { | 50 | &uart0 { |
24 | status = "okay"; | 51 | status = "okay"; |
25 | }; | 52 | }; |
26 | 53 | ||
27 | &spi0 { | 54 | &spi0 { |
28 | status = "okay"; | 55 | status = "okay"; |
29 | spi-flash@0 { | 56 | spi-flash@0 { |
30 | compatible = "spi-flash"; | 57 | compatible = "spi-flash"; |
31 | spi-max-frequency = <18000000>; /* input clock */ | 58 | spi-max-frequency = <18000000>; /* input clock */ |
32 | reg = <0>; /* CS0 */ | 59 | reg = <0>; /* CS0 */ |
33 | spi-cs-high; | 60 | spi-cs-high; |
34 | }; | 61 | }; |
35 | }; | 62 | }; |
36 | 63 | ||
37 | 64 |
arch/mips/dts/mscc,jr2.dtsi
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | / { | ||
7 | #address-cells = <1>; | ||
8 | #size-cells = <1>; | ||
9 | compatible = "mscc,jr2"; | ||
10 | |||
11 | cpus { | ||
12 | #address-cells = <1>; | ||
13 | #size-cells = <0>; | ||
14 | |||
15 | cpu@0 { | ||
16 | compatible = "mips,mips24KEc"; | ||
17 | device_type = "cpu"; | ||
18 | clocks = <&cpu_clk>; | ||
19 | reg = <0>; | ||
20 | }; | ||
21 | }; | ||
22 | |||
23 | aliases { | ||
24 | serial0 = &uart0; | ||
25 | }; | ||
26 | |||
27 | cpuintc: interrupt-controller@0 { | ||
28 | #address-cells = <0>; | ||
29 | #interrupt-cells = <1>; | ||
30 | interrupt-controller; | ||
31 | compatible = "mti,cpu-interrupt-controller"; | ||
32 | }; | ||
33 | |||
34 | cpu_clk: cpu-clock { | ||
35 | compatible = "fixed-clock"; | ||
36 | #clock-cells = <0>; | ||
37 | clock-frequency = <500000000>; | ||
38 | }; | ||
39 | |||
40 | ahb_clk: ahb-clk { | ||
41 | compatible = "fixed-clock"; | ||
42 | #clock-cells = <0>; | ||
43 | clock-frequency = <250000000>; | ||
44 | }; | ||
45 | |||
46 | ahb { | ||
47 | compatible = "simple-bus"; | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <1>; | ||
50 | ranges = <0 0x70000000 0x2000000>; | ||
51 | |||
52 | interrupt-parent = <&intc>; | ||
53 | |||
54 | cpu_ctrl: syscon@0 { | ||
55 | compatible = "mscc,jr2-cpu-syscon", "syscon"; | ||
56 | reg = <0x0 0x2c>; | ||
57 | }; | ||
58 | |||
59 | intc: interrupt-controller@70 { | ||
60 | compatible = "mscc,jr2-icpu-intr"; | ||
61 | reg = <0x70 0x94>; | ||
62 | #interrupt-cells = <1>; | ||
63 | interrupt-controller; | ||
64 | interrupt-parent = <&cpuintc>; | ||
65 | interrupts = <2>; | ||
66 | }; | ||
67 | |||
68 | uart0: serial@100000 { | ||
69 | pinctrl-0 = <&uart_pins>; | ||
70 | pinctrl-names = "default"; | ||
71 | compatible = "ns16550a"; | ||
72 | reg = <0x100000 0x20>; | ||
73 | interrupts = <6>; | ||
74 | clocks = <&ahb_clk>; | ||
75 | reg-io-width = <4>; | ||
76 | reg-shift = <2>; | ||
77 | |||
78 | status = "disabled"; | ||
79 | }; | ||
80 | |||
81 | uart2: serial@100800 { | ||
82 | pinctrl-0 = <&uart2_pins>; | ||
83 | pinctrl-names = "default"; | ||
84 | compatible = "ns16550a"; | ||
85 | reg = <0x100800 0x20>; | ||
86 | interrupts = <7>; | ||
87 | clocks = <&ahb_clk>; | ||
88 | reg-io-width = <4>; | ||
89 | reg-shift = <2>; | ||
90 | |||
91 | status = "disabled"; | ||
92 | }; | ||
93 | |||
94 | spi0: spi-master@101000 { | ||
95 | #address-cells = <1>; | ||
96 | #size-cells = <0>; | ||
97 | compatible = "snps,dw-apb-ssi"; | ||
98 | reg = <0x101000 0x40>; | ||
99 | num-chipselect = <4>; | ||
100 | bus-num = <0>; | ||
101 | reg-io-width = <4>; | ||
102 | reg-shift = <2>; | ||
103 | spi-max-frequency = <18000000>; /* input clock */ | ||
104 | clocks = <&ahb_clk>; | ||
105 | |||
106 | status = "disabled"; | ||
107 | }; | ||
108 | |||
109 | reset@1010008 { | ||
110 | compatible = "mscc,jr2-chip-reset"; | ||
111 | reg = <0x1010008 0x4>; | ||
112 | }; | ||
113 | |||
114 | gpio: pinctrl@1070034 { | ||
115 | compatible = "mscc,jaguar2-pinctrl"; | ||
116 | reg = <0x1010038 0x90>; | ||
117 | gpio-controller; | ||
118 | #gpio-cells = <2>; | ||
119 | gpio-ranges = <&gpio 0 0 64>; | ||
120 | |||
121 | sgpio_pins: sgpio-pins { | ||
122 | pins = "GPIO_0", "GPIO_1", "GPIO_2", "GPIO_3"; | ||
123 | function = "sg0"; | ||
124 | }; | ||
125 | |||
126 | sgpio1_pins: sgpio1-pins { | ||
127 | pins = "GPIO_4", "GPIO_5", "GPIO_12", "GPIO_13"; | ||
128 | function = "sg1"; | ||
129 | }; | ||
130 | |||
131 | sgpio2_pins: sgpio2-pins { | ||
132 | pins = "GPIO_30", "GPIO_31", | ||
133 | "GPIO_32", "GPIO_33"; | ||
134 | function = "sg2"; | ||
135 | }; | ||
136 | |||
137 | uart_pins: uart-pins { | ||
138 | pins = "GPIO_10", "GPIO_11"; | ||
139 | function = "uart"; | ||
140 | }; | ||
141 | |||
142 | uart2_pins: uart2-pins { | ||
143 | pins = "GPIO_24", "GPIO_25"; | ||
144 | function = "uart2"; | ||
145 | }; | ||
146 | }; | ||
147 | |||
148 | sgpio: gpio@1010150 { | ||
149 | compatible = "mscc,ocelot-sgpio"; | ||
150 | status = "disabled"; | ||
151 | pinctrl-0 = <&sgpio_pins>; | ||
152 | pinctrl-names = "default"; | ||
153 | reg = <0x1010150 0x100>; | ||
154 | gpio-controller; | ||
155 | #gpio-cells = <2>; | ||
156 | gpio-ranges = <&sgpio 0 0 64>; | ||
157 | gpio-bank-name = "sgpio0_"; | ||
158 | sgpio-clock = <0x14>; | ||
159 | }; | ||
160 | |||
161 | sgpio1: gpio@101025c { | ||
162 | compatible = "mscc,ocelot-sgpio"; | ||
163 | status = "disabled"; | ||
164 | pinctrl-0 = <&sgpio1_pins>; | ||
165 | pinctrl-names = "default"; | ||
166 | reg = <0x101025c 0x100>; | ||
167 | gpio-controller; | ||
168 | #gpio-cells = <2>; | ||
169 | gpio-ranges = <&sgpio1 0 0 64>; | ||
170 | gpio-bank-name = "sgpio1_"; | ||
171 | sgpio-clock = <0x14>; | ||
172 | }; | ||
173 | |||
174 | sgpio2: gpio@1010368 { | ||
175 | compatible = "mscc,ocelot-sgpio"; | ||
176 | status = "disabled"; | ||
177 | pinctrl-0 = <&sgpio2_pins>; | ||
178 | pinctrl-names = "default"; | ||
179 | reg = <0x1010368 0x100>; | ||
180 | gpio-controller; | ||
181 | #gpio-cells = <2>; | ||
182 | gpio-ranges = <&sgpio2 0 0 64>; | ||
183 | gpio-bank-name = "sgpio2_"; | ||
184 | sgpio-clock = <0x14>; | ||
185 | }; | ||
186 | }; | ||
187 | }; | ||
188 |
arch/mips/dts/mscc,luton.dtsi
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <dt-bindings/gpio/gpio.h> | 6 | #include <dt-bindings/gpio/gpio.h> |
7 | 7 | ||
8 | / { | 8 | / { |
9 | #address-cells = <1>; | 9 | #address-cells = <1>; |
10 | #size-cells = <1>; | 10 | #size-cells = <1>; |
11 | compatible = "mscc,luton"; | 11 | compatible = "mscc,luton"; |
12 | 12 | ||
13 | cpus { | 13 | cpus { |
14 | #address-cells = <1>; | 14 | #address-cells = <1>; |
15 | #size-cells = <0>; | 15 | #size-cells = <0>; |
16 | 16 | ||
17 | cpu@0 { | 17 | cpu@0 { |
18 | compatible = "mips,mips24KEc"; | 18 | compatible = "mips,mips24KEc"; |
19 | device_type = "cpu"; | 19 | device_type = "cpu"; |
20 | reg = <0>; | 20 | reg = <0>; |
21 | }; | 21 | }; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | aliases { | 24 | aliases { |
25 | serial0 = &uart0; | 25 | serial0 = &uart0; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | sys_clk: sys-clk { | ||
29 | compatible = "fixed-clock"; | ||
30 | #clock-cells = <0>; | ||
31 | clock-frequency = <250000000>; | ||
32 | }; | ||
28 | ahb_clk: ahb-clk { | 33 | ahb_clk: ahb-clk { |
29 | compatible = "fixed-clock"; | 34 | compatible = "fixed-clock"; |
30 | #clock-cells = <0>; | 35 | #clock-cells = <0>; |
31 | clock-frequency = <208333333>; | 36 | clock-frequency = <208333333>; |
32 | }; | 37 | }; |
33 | 38 | ||
34 | ahb { | 39 | ahb { |
35 | compatible = "simple-bus"; | 40 | compatible = "simple-bus"; |
36 | #address-cells = <1>; | 41 | #address-cells = <1>; |
37 | #size-cells = <1>; | 42 | #size-cells = <1>; |
38 | ranges = <0 0x60000000 0x10200000>; | 43 | ranges = <0 0x60000000 0x10200000>; |
39 | 44 | ||
40 | uart0: serial@10100000 { | 45 | uart0: serial@10100000 { |
41 | pinctrl-0 = <&uart_pins>; | 46 | pinctrl-0 = <&uart_pins>; |
42 | pinctrl-names = "default"; | 47 | pinctrl-names = "default"; |
43 | 48 | ||
44 | compatible = "ns16550a"; | 49 | compatible = "ns16550a"; |
45 | reg = <0x10100000 0x20>; | 50 | reg = <0x10100000 0x20>; |
46 | clocks = <&ahb_clk>; | 51 | clocks = <&ahb_clk>; |
47 | reg-io-width = <4>; | 52 | reg-io-width = <4>; |
48 | reg-shift = <2>; | 53 | reg-shift = <2>; |
49 | 54 | ||
50 | status = "disabled"; | 55 | status = "disabled"; |
51 | }; | 56 | }; |
52 | 57 | ||
53 | gpio: pinctrl@70068 { | 58 | gpio: pinctrl@70068 { |
54 | compatible = "mscc,luton-pinctrl"; | 59 | compatible = "mscc,luton-pinctrl"; |
55 | reg = <0x70068 0x68>; | 60 | reg = <0x70068 0x68>; |
56 | gpio-controller; | 61 | gpio-controller; |
57 | #gpio-cells = <2>; | 62 | #gpio-cells = <2>; |
58 | gpio-ranges = <&gpio 0 0 32>; | 63 | gpio-ranges = <&gpio 0 0 32>; |
59 | 64 | ||
65 | sgpio_pins: sgpio-pins { | ||
66 | pins = "GPIO_0", "GPIO_1", "GPIO_2", "GPIO_3"; | ||
67 | function = "sio"; | ||
68 | }; | ||
60 | uart_pins: uart-pins { | 69 | uart_pins: uart-pins { |
61 | pins = "GPIO_30", "GPIO_31"; | 70 | pins = "GPIO_30", "GPIO_31"; |
62 | function = "uart"; | 71 | function = "uart"; |
63 | }; | 72 | }; |
64 | |||
65 | }; | 73 | }; |
66 | 74 | ||
67 | gpio_spi_bitbang: gpio@10000064 { | 75 | sgpio: gpio@70130 { |
68 | compatible = "mscc,spi-bitbang-gpio"; | 76 | compatible = "mscc,luton-sgpio"; |
69 | reg = <0x10000064 0x4>; | 77 | status = "disabled"; |
78 | clocks = <&sys_clk>; | ||
79 | pinctrl-0 = <&sgpio_pins>; | ||
80 | pinctrl-names = "default"; | ||
81 | reg = <0x0070130 0x100>; | ||
70 | gpio-controller; | 82 | gpio-controller; |
71 | #gpio-cells = <2>; | 83 | #gpio-cells = <2>; |
72 | 84 | gpio-ranges = <&sgpio 0 0 64>; | |
73 | }; | 85 | }; |
74 | 86 | ||
75 | spi0: spi-bitbang { | 87 | spi0: spi-bitbang { |
76 | compatible = "spi-gpio"; | 88 | compatible = "mscc,luton-bb-spi"; |
77 | status = "okay"; | 89 | status = "okay"; |
78 | gpio-sck = <&gpio_spi_bitbang 6 0>; | 90 | reg = <0x10000064 0x4>; |
79 | gpio-miso = <&gpio_spi_bitbang 0 0>; | ||
80 | gpio-mosi = <&gpio_spi_bitbang 5 0>; | ||
81 | cs-gpios = <&gpio_spi_bitbang 1 0>; | ||
82 | num-chipselects = <1>; | 91 | num-chipselects = <1>; |
83 | #address-cells = <1>; | 92 | #address-cells = <1>; |
84 | #size-cells = <0>; | 93 | #size-cells = <0>; |
arch/mips/dts/mscc,ocelot.dtsi
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | / { | 6 | / { |
7 | #address-cells = <1>; | 7 | #address-cells = <1>; |
8 | #size-cells = <1>; | 8 | #size-cells = <1>; |
9 | compatible = "mscc,ocelot"; | 9 | compatible = "mscc,ocelot"; |
10 | 10 | ||
11 | cpus { | 11 | cpus { |
12 | #address-cells = <1>; | 12 | #address-cells = <1>; |
13 | #size-cells = <0>; | 13 | #size-cells = <0>; |
14 | 14 | ||
15 | cpu@0 { | 15 | cpu@0 { |
16 | compatible = "mips,mips24KEc"; | 16 | compatible = "mips,mips24KEc"; |
17 | device_type = "cpu"; | 17 | device_type = "cpu"; |
18 | clocks = <&cpu_clk>; | 18 | clocks = <&cpu_clk>; |
19 | reg = <0>; | 19 | reg = <0>; |
20 | }; | 20 | }; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | aliases { | 23 | aliases { |
24 | serial0 = &uart0; | 24 | serial0 = &uart0; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | cpuintc: interrupt-controller@0 { | 27 | cpuintc: interrupt-controller@0 { |
28 | #address-cells = <0>; | 28 | #address-cells = <0>; |
29 | #interrupt-cells = <1>; | 29 | #interrupt-cells = <1>; |
30 | interrupt-controller; | 30 | interrupt-controller; |
31 | compatible = "mti,cpu-interrupt-controller"; | 31 | compatible = "mti,cpu-interrupt-controller"; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | cpu_clk: cpu-clock { | 34 | cpu_clk: cpu-clock { |
35 | compatible = "fixed-clock"; | 35 | compatible = "fixed-clock"; |
36 | #clock-cells = <0>; | 36 | #clock-cells = <0>; |
37 | clock-frequency = <500000000>; | 37 | clock-frequency = <500000000>; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | sys_clk: sys-clk { | ||
41 | compatible = "fixed-clock"; | ||
42 | #clock-cells = <0>; | ||
43 | clock-frequency = <250000000>; | ||
44 | }; | ||
45 | |||
40 | ahb_clk: ahb-clk { | 46 | ahb_clk: ahb-clk { |
41 | compatible = "fixed-clock"; | 47 | compatible = "fixed-clock"; |
42 | #clock-cells = <0>; | 48 | #clock-cells = <0>; |
43 | clock-frequency = <250000000>; | 49 | clock-frequency = <250000000>; |
44 | }; | 50 | }; |
45 | 51 | ||
46 | ahb { | 52 | ahb { |
47 | compatible = "simple-bus"; | 53 | compatible = "simple-bus"; |
48 | #address-cells = <1>; | 54 | #address-cells = <1>; |
49 | #size-cells = <1>; | 55 | #size-cells = <1>; |
50 | ranges = <0 0x70000000 0x2000000>; | 56 | ranges = <0 0x70000000 0x2000000>; |
51 | 57 | ||
52 | interrupt-parent = <&intc>; | 58 | interrupt-parent = <&intc>; |
53 | 59 | ||
54 | cpu_ctrl: syscon@0 { | 60 | cpu_ctrl: syscon@0 { |
55 | compatible = "mscc,ocelot-cpu-syscon", "syscon"; | 61 | compatible = "mscc,ocelot-cpu-syscon", "syscon"; |
56 | reg = <0x0 0x2c>; | 62 | reg = <0x0 0x2c>; |
57 | }; | 63 | }; |
58 | 64 | ||
59 | intc: interrupt-controller@70 { | 65 | intc: interrupt-controller@70 { |
60 | compatible = "mscc,ocelot-icpu-intr"; | 66 | compatible = "mscc,ocelot-icpu-intr"; |
61 | reg = <0x70 0x70>; | 67 | reg = <0x70 0x70>; |
62 | #interrupt-cells = <1>; | 68 | #interrupt-cells = <1>; |
63 | interrupt-controller; | 69 | interrupt-controller; |
64 | interrupt-parent = <&cpuintc>; | 70 | interrupt-parent = <&cpuintc>; |
65 | interrupts = <2>; | 71 | interrupts = <2>; |
66 | }; | 72 | }; |
67 | 73 | ||
68 | uart0: serial@100000 { | 74 | uart0: serial@100000 { |
69 | pinctrl-0 = <&uart_pins>; | 75 | pinctrl-0 = <&uart_pins>; |
70 | pinctrl-names = "default"; | 76 | pinctrl-names = "default"; |
71 | compatible = "ns16550a"; | 77 | compatible = "ns16550a"; |
72 | reg = <0x100000 0x20>; | 78 | reg = <0x100000 0x20>; |
73 | interrupts = <6>; | 79 | interrupts = <6>; |
74 | clocks = <&ahb_clk>; | 80 | clocks = <&ahb_clk>; |
75 | reg-io-width = <4>; | 81 | reg-io-width = <4>; |
76 | reg-shift = <2>; | 82 | reg-shift = <2>; |
77 | 83 | ||
78 | status = "disabled"; | 84 | status = "disabled"; |
79 | }; | 85 | }; |
80 | 86 | ||
81 | uart2: serial@100800 { | 87 | uart2: serial@100800 { |
82 | pinctrl-0 = <&uart2_pins>; | 88 | pinctrl-0 = <&uart2_pins>; |
83 | pinctrl-names = "default"; | 89 | pinctrl-names = "default"; |
84 | compatible = "ns16550a"; | 90 | compatible = "ns16550a"; |
85 | reg = <0x100800 0x20>; | 91 | reg = <0x100800 0x20>; |
86 | interrupts = <7>; | 92 | interrupts = <7>; |
87 | clocks = <&ahb_clk>; | 93 | clocks = <&ahb_clk>; |
88 | reg-io-width = <4>; | 94 | reg-io-width = <4>; |
89 | reg-shift = <2>; | 95 | reg-shift = <2>; |
90 | 96 | ||
91 | status = "disabled"; | 97 | status = "disabled"; |
92 | }; | 98 | }; |
93 | 99 | ||
94 | spi0: spi-master@101000 { | 100 | spi0: spi-master@101000 { |
95 | #address-cells = <1>; | 101 | #address-cells = <1>; |
96 | #size-cells = <0>; | 102 | #size-cells = <0>; |
97 | compatible = "snps,dw-apb-ssi"; | 103 | compatible = "snps,dw-apb-ssi"; |
98 | reg = <0x101000 0x40>; | 104 | reg = <0x101000 0x40>; |
99 | num-chipselect = <4>; | 105 | num-chipselect = <4>; |
100 | bus-num = <0>; | 106 | bus-num = <0>; |
101 | reg-io-width = <4>; | 107 | reg-io-width = <4>; |
102 | reg-shift = <2>; | 108 | reg-shift = <2>; |
103 | spi-max-frequency = <18000000>; /* input clock */ | 109 | spi-max-frequency = <18000000>; /* input clock */ |
104 | clocks = <&ahb_clk>; | 110 | clocks = <&ahb_clk>; |
105 | 111 | ||
106 | status = "disabled"; | 112 | status = "disabled"; |
107 | }; | 113 | }; |
108 | 114 | ||
109 | reset@1070008 { | 115 | reset@1070008 { |
110 | compatible = "mscc,ocelot-chip-reset"; | 116 | compatible = "mscc,ocelot-chip-reset"; |
111 | reg = <0x1070008 0x4>; | 117 | reg = <0x1070008 0x4>; |
112 | }; | 118 | }; |
113 | 119 | ||
114 | gpio: pinctrl@1070034 { | 120 | gpio: pinctrl@1070034 { |
115 | compatible = "mscc,ocelot-pinctrl"; | 121 | compatible = "mscc,ocelot-pinctrl"; |
116 | reg = <0x1070034 0x68>; | 122 | reg = <0x1070034 0x68>; |
117 | gpio-controller; | 123 | gpio-controller; |
118 | #gpio-cells = <2>; | 124 | #gpio-cells = <2>; |
119 | gpio-ranges = <&gpio 0 0 22>; | 125 | gpio-ranges = <&gpio 0 0 22>; |
120 | 126 | ||
127 | sgpio_pins: sgpio-pins { | ||
128 | pins = "GPIO_0", "GPIO_1", "GPIO_2", "GPIO_3"; | ||
129 | function = "sg0"; | ||
130 | }; | ||
131 | |||
121 | uart_pins: uart-pins { | 132 | uart_pins: uart-pins { |
122 | pins = "GPIO_6", "GPIO_7"; | 133 | pins = "GPIO_6", "GPIO_7"; |
123 | function = "uart"; | 134 | function = "uart"; |
124 | }; | 135 | }; |
125 | 136 | ||
126 | uart2_pins: uart2-pins { | 137 | uart2_pins: uart2-pins { |
127 | pins = "GPIO_12", "GPIO_13"; | 138 | pins = "GPIO_12", "GPIO_13"; |
128 | function = "uart2"; | 139 | function = "uart2"; |
129 | }; | 140 | }; |
130 | 141 | ||
131 | spi_cs1_pin: spi-cs1-pin { | 142 | spi_cs1_pin: spi-cs1-pin { |
132 | pins = "GPIO_8"; | 143 | pins = "GPIO_8"; |
133 | function = "si"; | 144 | function = "si"; |
134 | }; | 145 | }; |
135 | 146 | ||
136 | spi_cs2_pin: spi-cs2-pin { | 147 | spi_cs2_pin: spi-cs2-pin { |
137 | pins = "GPIO_9"; | 148 | pins = "GPIO_9"; |
138 | function = "si"; | 149 | function = "si"; |
139 | }; | 150 | }; |
140 | 151 | ||
141 | spi_cs3_pin: spi-cs3-pin { | 152 | spi_cs3_pin: spi-cs3-pin { |
142 | pins = "GPIO_16"; | 153 | pins = "GPIO_16"; |
143 | function = "si"; | 154 | function = "si"; |
144 | }; | 155 | }; |
145 | 156 | ||
146 | spi_cs4_pin: spi-cs4-pin { | 157 | spi_cs4_pin: spi-cs4-pin { |
147 | pins = "GPIO_17"; | 158 | pins = "GPIO_17"; |
148 | function = "si"; | 159 | function = "si"; |
149 | }; | 160 | }; |
161 | }; | ||
162 | |||
163 | sgpio: gpio@10700f8 { | ||
164 | compatible = "mscc,ocelot-sgpio"; | ||
165 | status = "disabled"; | ||
166 | clocks = <&sys_clk>; | ||
167 | pinctrl-0 = <&sgpio_pins>; | ||
168 | pinctrl-names = "default"; | ||
169 | reg = <0x10700f8 0x100>; | ||
170 | gpio-controller; | ||
171 | #gpio-cells = <2>; | ||
172 | gpio-ranges = <&sgpio 0 0 64>; | ||
150 | }; | 173 | }; |
151 | }; | 174 | }; |
152 | }; | 175 | }; |
153 | 176 |
arch/mips/dts/ocelot_pcb120.dts
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /dts-v1/; | 6 | /dts-v1/; |
7 | #include "mscc,ocelot_pcb.dtsi" | 7 | #include "mscc,ocelot_pcb.dtsi" |
8 | 8 | ||
9 | / { | 9 | / { |
10 | model = "Ocelot PCB120 Reference Board"; | 10 | model = "Ocelot PCB120 Reference Board"; |
11 | compatible = "mscc,ocelot-pcb120", "mscc,ocelot"; | 11 | compatible = "mscc,ocelot-pcb120", "mscc,ocelot"; |
12 | |||
13 | chosen { | ||
14 | stdout-path = "serial0:115200n8"; | ||
15 | }; | ||
16 | |||
17 | gpio-leds { | ||
18 | compatible = "gpio-leds"; | ||
19 | |||
20 | poe_green { | ||
21 | label = "pcb120:green:poe"; | ||
22 | gpios = <&sgpio 44 1>; /* p12.1 */ | ||
23 | default-state = "off"; | ||
24 | }; | ||
25 | |||
26 | poe_red { | ||
27 | label = "pcb120:red:poe"; | ||
28 | gpios = <&sgpio 12 1>; /* p12.0 */ | ||
29 | default-state = "off"; | ||
30 | }; | ||
31 | |||
32 | alarm_green { | ||
33 | label = "pcb120:green:alarm"; | ||
34 | gpios = <&sgpio 45 1>; /* p13.1 */ | ||
35 | default-state = "off"; | ||
36 | }; | ||
37 | |||
38 | alarm_red { | ||
39 | label = "pcb120:red:alarm"; | ||
40 | gpios = <&sgpio 13 1>; /* p13.0 */ | ||
41 | default-state = "off"; | ||
42 | }; | ||
43 | |||
44 | dc_a_green { | ||
45 | label = "pcb120:green:dc_a"; | ||
46 | gpios = <&sgpio 46 1>; /* p14.1 */ | ||
47 | default-state = "off"; | ||
48 | }; | ||
49 | |||
50 | dc_a_red { | ||
51 | label = "pcb120:red:dc_a"; | ||
52 | gpios = <&sgpio 14 1>; /* p14.0 */ | ||
53 | default-state = "off"; | ||
54 | }; | ||
55 | |||
56 | dc_b_green { | ||
57 | label = "pcb120:green:dc_b"; | ||
58 | gpios = <&sgpio 47 1>; /* p15.1 */ | ||
59 | default-state = "off"; | ||
60 | }; | ||
61 | |||
62 | dc_b_red { | ||
63 | label = "pcb120:red:dc_b"; | ||
64 | gpios = <&sgpio 15 1>; /* p15.0 */ | ||
65 | default-state = "off"; | ||
66 | }; | ||
67 | |||
68 | status_green { | ||
69 | label = "pcb120:green:status"; | ||
70 | gpios = <&sgpio 48 1>; /* p16.1 */ | ||
71 | default-state = "on"; | ||
72 | }; | ||
73 | |||
74 | status_red { | ||
75 | label = "pcb120:red:alarm"; | ||
76 | gpios = <&sgpio 16 1>; /* p16.0 */ | ||
77 | default-state = "off"; | ||
78 | }; | ||
79 | |||
80 | }; | ||
81 | |||
82 | }; | ||
83 | |||
84 | &sgpio { | ||
85 | status = "okay"; | ||
86 | mscc,sgpio-ports = <0x000FFFFF>; | ||
12 | }; | 87 | }; |
13 | 88 | ||
89 |
arch/mips/dts/ocelot_pcb123.dts
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /dts-v1/; | 6 | /dts-v1/; |
7 | #include "mscc,ocelot_pcb.dtsi" | 7 | #include "mscc,ocelot_pcb.dtsi" |
8 | 8 | ||
9 | / { | 9 | / { |
10 | model = "Ocelot PCB123 Reference Board"; | 10 | model = "Ocelot PCB123 Reference Board"; |
11 | compatible = "mscc,ocelot-pcb123", "mscc,ocelot"; | 11 | compatible = "mscc,ocelot-pcb123", "mscc,ocelot"; |
12 | |||
13 | chosen { | ||
14 | stdout-path = "serial0:115200n8"; | ||
15 | }; | ||
16 | |||
17 | gpio-leds { | ||
18 | compatible = "gpio-leds"; | ||
19 | |||
20 | status_green { | ||
21 | label = "pcb123:green:status"; | ||
22 | gpios = <&sgpio 43 1>; /* p11.1 */ | ||
23 | default-state = "on"; | ||
24 | }; | ||
25 | |||
26 | status_red { | ||
27 | label = "pcb123:red:status"; | ||
28 | gpios = <&sgpio 11 1>; /* p11.0 */ | ||
29 | default-state = "off"; | ||
30 | }; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | &sgpio { | ||
35 | status = "okay"; | ||
36 | mscc,sgpio-ports = <0x00FFFFFF>; | ||
12 | }; | 37 | }; |
13 | 38 |
arch/mips/dts/serval2_pcb112.dts
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | #include "mscc,jr2.dtsi" | ||
8 | |||
9 | / { | ||
10 | model = "Serval2 NID PCB112 Reference Board"; | ||
11 | compatible = "mscc,serval2-pcb110", "mscc,jr2"; | ||
12 | |||
13 | aliases { | ||
14 | spi0 = &spi0; | ||
15 | serial0 = &uart0; | ||
16 | }; | ||
17 | |||
18 | chosen { | ||
19 | stdout-path = "serial0:115200n8"; | ||
20 | }; | ||
21 | |||
22 | gpio-leds { | ||
23 | compatible = "gpio-leds"; | ||
24 | |||
25 | status_green { | ||
26 | label = "pcb110:green:status"; | ||
27 | gpios = <&gpio 12 0>; | ||
28 | default-state = "on"; | ||
29 | }; | ||
30 | |||
31 | status_red { | ||
32 | label = "pcb110:red:status"; | ||
33 | gpios = <&gpio 13 0>; | ||
34 | default-state = "off"; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | &uart0 { | ||
40 | status = "okay"; | ||
41 | }; | ||
42 | |||
43 | &spi0 { | ||
44 | status = "okay"; | ||
45 | spi-flash@0 { | ||
46 | compatible = "spi-flash"; | ||
47 | spi-max-frequency = <18000000>; /* input clock */ | ||
48 | reg = <0>; /* CS0 */ | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | &sgpio { | ||
53 | status = "okay"; | ||
54 | sgpio-ports = <0x0000ffff>; | ||
55 | }; | ||
56 | |||
57 | &sgpio2 { | ||
58 | status = "okay"; | ||
59 | sgpio-ports = <0x3fe0ffff>; | ||
60 | }; | ||
61 |
arch/mips/mach-jz47xx/jz4780/u-boot-spl.lds
1 | /* SPDX-License-Identifier: GPL-2.0+ */ | File was deleted | |
2 | |||
3 | MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\ | ||
4 | LENGTH = CONFIG_SPL_MAX_SIZE } | ||
5 | MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ | ||
6 | LENGTH = CONFIG_SPL_BSS_MAX_SIZE } | ||
7 | |||
8 | OUTPUT_ARCH(mips) | ||
9 | ENTRY(_start) | ||
10 | SECTIONS | ||
11 | { | ||
12 | .text : | ||
13 | { | ||
14 | __image_copy_start = .; | ||
15 | arch/mips/mach-jz47xx/start.o (.text*) | ||
16 | *(.text*) | ||
17 | } >.sram | ||
18 | |||
19 | . = ALIGN(4); | ||
20 | .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } >.sram | ||
21 | |||
22 | . = ALIGN(4); | ||
23 | .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram | ||
24 | |||
25 | . = ALIGN(4); | ||
26 | __image_copy_end = .; | ||
27 | |||
28 | .bss : { | ||
29 | . = ALIGN(4); | ||
30 | __bss_start = .; | ||
31 | *(.sbss.*) | ||
32 | *(.bss.*) | ||
33 | *(COMMON) | ||
34 | . = ALIGN(4); | ||
35 | __bss_end = .; | ||
36 | } >.sdram | ||
37 | |||
38 | /DISCARD/ : { | ||
39 | *(.dynbss) | ||
40 | *(.dynstr) | ||
41 | *(.dynamic) | ||
42 | *(.interp) | ||
43 | *(.hash) | ||
44 | *(.gnu.*) | ||
45 | *(.plt) | ||
46 | *(.got.plt) | ||
47 | *(.rel.plt) | ||
48 | *(.rel.dyn) | ||
49 | } | ||
50 | } | ||
51 | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
arch/mips/mach-mscc/Kconfig
1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | 2 | ||
3 | menu "MSCC VCore-III platforms" | 3 | menu "MSCC VCore-III platforms" |
4 | depends on ARCH_MSCC | 4 | depends on ARCH_MSCC |
5 | 5 | ||
6 | config SOC_VCOREIII | 6 | config SOC_VCOREIII |
7 | select MIPS_TUNE_24KC | 7 | select MIPS_TUNE_24KC |
8 | select ROM_EXCEPTION_VECTORS | 8 | select ROM_EXCEPTION_VECTORS |
9 | select SUPPORTS_BIG_ENDIAN | 9 | select SUPPORTS_BIG_ENDIAN |
10 | select SUPPORTS_CPU_MIPS32_R1 | 10 | select SUPPORTS_CPU_MIPS32_R1 |
11 | select SUPPORTS_CPU_MIPS32_R2 | 11 | select SUPPORTS_CPU_MIPS32_R2 |
12 | select SUPPORTS_LITTLE_ENDIAN | 12 | select SUPPORTS_LITTLE_ENDIAN |
13 | bool | 13 | bool |
14 | 14 | ||
15 | config SYS_SOC | 15 | config SYS_SOC |
16 | default "mscc" | 16 | default "mscc" |
17 | 17 | ||
18 | choice | ||
19 | |||
20 | prompt "SOC Family Variant" | ||
21 | |||
18 | config SOC_OCELOT | 22 | config SOC_OCELOT |
19 | bool | 23 | bool "Ocelot SOC Family" |
20 | select SOC_VCOREIII | 24 | select SOC_VCOREIII |
25 | select DESIGNWARE_SPI | ||
21 | help | 26 | help |
22 | This supports MSCC Ocelot family of SOCs. | 27 | This supports MSCC Ocelot family of SOCs. |
23 | 28 | ||
24 | config SOC_LUTON | 29 | config SOC_LUTON |
25 | bool | 30 | bool "Luton SOC Family" |
26 | select SOC_VCOREIII | 31 | select SOC_VCOREIII |
32 | select MSCC_BITBANG_SPI_GPIO | ||
27 | help | 33 | help |
28 | This supports MSCC Luton family of SOCs. | 34 | This supports MSCC Luton family of SOCs. |
29 | 35 | ||
30 | config SYS_CONFIG_NAME | 36 | config SOC_JR2 |
31 | default "vcoreiii" | 37 | bool "Jaguar2 SOC Family" |
32 | 38 | select SOC_VCOREIII | |
33 | choice | 39 | select DESIGNWARE_SPI |
34 | prompt "Board select" | ||
35 | |||
36 | config TARGET_OCELOT_PCB120 | ||
37 | bool "MSCC PCB120 Reference Board (aka VSC5635EV)" | ||
38 | select SOC_OCELOT | ||
39 | help | 40 | help |
40 | When selected, CONFIG_DEFAULT_DEVICE_TREE should be set to | 41 | This supports MSCC Jaguar2 family of SOCs. |
41 | ocelot_pcb120 | ||
42 | 42 | ||
43 | config TARGET_OCELOT_PCB123 | ||
44 | bool "MSCC PCB123 Reference Board (aka VSC7514EV))" | ||
45 | select SOC_OCELOT | ||
46 | help | ||
47 | When selected, CONFIG_DEFAULT_DEVICE_TREE should be set to | ||
48 | ocelot_pcb123 | ||
49 | |||
50 | config TARGET_LUTON_PCB091 | ||
51 | bool "MSCC PCB091 Reference Board" | ||
52 | select SOC_LUTON | ||
53 | select MSCC_BITBANG_SPI_GPIO | ||
54 | help | ||
55 | When selected, CONFIG_DEFAULT_DEVICE_TREE should be set to | ||
56 | luton_pcb091 | ||
57 | endchoice | 43 | endchoice |
58 | 44 | ||
45 | config SYS_CONFIG_NAME | ||
46 | default "vcoreiii" | ||
47 | |||
59 | choice | 48 | choice |
60 | prompt "DDR type" | 49 | prompt "DDR type" |
61 | 50 | ||
62 | config DDRTYPE_H5TQ4G63MFR | 51 | config DDRTYPE_H5TQ4G63MFR |
63 | bool "Hynix H5TQ4G63MFR-PBC (4Gbit, DDR3-800, 256Mbitx16)" | 52 | bool "Hynix H5TQ4G63MFR-PBC (4Gbit, DDR3-800, 256Mbitx16)" |
64 | 53 | ||
65 | config DDRTYPE_MT41K256M16 | 54 | config DDRTYPE_MT41K256M16 |
66 | bool "Micron MT41K256M16 (4Gbit, DDR3L-800, 256Mbitx16)" | 55 | bool "Micron MT41K256M16 (4Gbit, DDR3L-800, 256Mbitx16)" |
67 | 56 | ||
68 | config DDRTYPE_H5TQ1G63BFA | 57 | config DDRTYPE_H5TQ1G63BFA |
69 | bool "Hynix H5TQ1G63BFA (1Gbit DDR3, x16)" | 58 | bool "Hynix H5TQ1G63BFA (1Gbit DDR3, x16)" |
70 | 59 | ||
71 | config DDRTYPE_MT41J128M16HA | 60 | config DDRTYPE_MT41J128M16HA |
72 | bool "Micron MT41J128M16HA-15E:D (2Gbit DDR3, x16)" | 61 | bool "Micron MT41J128M16HA-15E:D (2Gbit DDR3, x16)" |
73 | 62 | ||
74 | config DDRTYPE_MT41K128M16JT | 63 | config DDRTYPE_MT41K128M16JT |
75 | bool "Micron MT41K128M16JT-125 (2Gbit DDR3L, 128Mbitx16)" | 64 | bool "Micron MT41K128M16JT-125 (2Gbit DDR3L, 128Mbitx16)" |
76 | 65 | ||
77 | config DDRTYPE_MT47H128M8HQ | 66 | config DDRTYPE_MT47H128M8HQ |
78 | bool "Micron MT47H128M8-3 (1Gbit, DDR-533@CL4 @ 4.80ns 16Mbisx8x8)" | 67 | bool "Micron MT47H128M8-3 (1Gbit, DDR-533@CL4 @ 4.80ns 16Mbisx8x8)" |
arch/mips/mach-mscc/Makefile
1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | 2 | ||
3 | CFLAGS_cpu.o += -finline-limit=64000 | 3 | CFLAGS_cpu.o += -finline-limit=64000 |
4 | 4 | ||
5 | obj-y += cpu.o dram.o reset.o lowlevel_init.o | 5 | obj-y += cpu.o dram.o reset.o phy.o lowlevel_init.o |
6 | obj-$(CONFIG_SOC_LUTON) += lowlevel_init_luton.o | 6 | obj-$(CONFIG_SOC_LUTON) += lowlevel_init_luton.o gpio.o |
7 | obj-$(CONFIG_SOC_OCELOT) += gpio.o | ||
7 | 8 |
arch/mips/mach-mscc/cpu.c
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <common.h> | 6 | #include <common.h> |
7 | 7 | ||
8 | #include <asm/io.h> | 8 | #include <asm/io.h> |
9 | #include <asm/types.h> | 9 | #include <asm/types.h> |
10 | 10 | ||
11 | #include <mach/tlb.h> | 11 | #include <mach/tlb.h> |
12 | #include <mach/ddr.h> | 12 | #include <mach/ddr.h> |
13 | 13 | ||
14 | DECLARE_GLOBAL_DATA_PTR; | 14 | DECLARE_GLOBAL_DATA_PTR; |
15 | 15 | ||
16 | #if CONFIG_SYS_SDRAM_SIZE <= SZ_64M | 16 | #if CONFIG_SYS_SDRAM_SIZE <= SZ_64M |
17 | #define MSCC_RAM_TLB_SIZE SZ_64M | 17 | #define MSCC_RAM_TLB_SIZE SZ_64M |
18 | #define MSCC_ATTRIB2 MMU_REGIO_INVAL | 18 | #define MSCC_ATTRIB2 MMU_REGIO_INVAL |
19 | #elif CONFIG_SYS_SDRAM_SIZE <= SZ_128M | 19 | #elif CONFIG_SYS_SDRAM_SIZE <= SZ_128M |
20 | #define MSCC_RAM_TLB_SIZE SZ_64M | 20 | #define MSCC_RAM_TLB_SIZE SZ_64M |
21 | #define MSCC_ATTRIB2 MMU_REGIO_RW | 21 | #define MSCC_ATTRIB2 MMU_REGIO_RW |
22 | #elif CONFIG_SYS_SDRAM_SIZE <= SZ_256M | 22 | #elif CONFIG_SYS_SDRAM_SIZE <= SZ_256M |
23 | #define MSCC_RAM_TLB_SIZE SZ_256M | 23 | #define MSCC_RAM_TLB_SIZE SZ_256M |
24 | #define MSCC_ATTRIB2 MMU_REGIO_INVAL | 24 | #define MSCC_ATTRIB2 MMU_REGIO_INVAL |
25 | #elif CONFIG_SYS_SDRAM_SIZE <= SZ_512M | 25 | #elif CONFIG_SYS_SDRAM_SIZE <= SZ_512M |
26 | #define MSCC_RAM_TLB_SIZE SZ_256M | 26 | #define MSCC_RAM_TLB_SIZE SZ_256M |
27 | #define MSCC_ATTRIB2 MMU_REGIO_RW | 27 | #define MSCC_ATTRIB2 MMU_REGIO_RW |
28 | #else | 28 | #else |
29 | #define MSCC_RAM_TLB_SIZE SZ_512M | 29 | #define MSCC_RAM_TLB_SIZE SZ_512M |
30 | #define MSCC_ATTRIB2 MMU_REGIO_RW | 30 | #define MSCC_ATTRIB2 MMU_REGIO_RW |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | /* NOTE: lowlevel_init() function does not have access to the | 33 | /* NOTE: lowlevel_init() function does not have access to the |
34 | * stack. Thus, all called functions must be inlined, and (any) local | 34 | * stack. Thus, all called functions must be inlined, and (any) local |
35 | * variables must be kept in registers. | 35 | * variables must be kept in registers. |
36 | */ | 36 | */ |
37 | void vcoreiii_tlb_init(void) | 37 | void vcoreiii_tlb_init(void) |
38 | { | 38 | { |
39 | register int tlbix = 0; | 39 | register int tlbix = 0; |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * Unlike most of the MIPS based SoCs, the IO register address | 42 | * Unlike most of the MIPS based SoCs, the IO register address |
43 | * are not in KSEG0. The mainline linux kernel built in legacy | 43 | * are not in KSEG0. The mainline linux kernel built in legacy |
44 | * mode needs to access some of the registers very early in | 44 | * mode needs to access some of the registers very early in |
45 | * the boot and make the assumption that the bootloader has | 45 | * the boot and make the assumption that the bootloader has |
46 | * already configured them, so we have to match this | 46 | * already configured them, so we have to match this |
47 | * expectation. | 47 | * expectation. |
48 | */ | 48 | */ |
49 | create_tlb(tlbix++, MSCC_IO_ORIGIN1_OFFSET, SZ_16M, MMU_REGIO_RW, | 49 | create_tlb(tlbix++, MSCC_IO_ORIGIN1_OFFSET, SZ_16M, MMU_REGIO_RW, |
50 | MMU_REGIO_RW); | 50 | MMU_REGIO_RW); |
51 | #ifdef CONFIG_SOC_LUTON | 51 | #ifdef CONFIG_SOC_LUTON |
52 | create_tlb(tlbix++, MSCC_IO_ORIGIN2_OFFSET, SZ_16M, MMU_REGIO_RW, | 52 | create_tlb(tlbix++, MSCC_IO_ORIGIN2_OFFSET, SZ_16M, MMU_REGIO_RW, |
53 | MMU_REGIO_RW); | 53 | MMU_REGIO_RW); |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #if CONFIG_SYS_TEXT_BASE == MSCC_FLASH_TO | 56 | #if CONFIG_SYS_TEXT_BASE == MSCC_FLASH_TO |
57 | /* | 57 | /* |
58 | * If U-Boot is located in NOR then we want to be able to use | 58 | * If U-Boot is located in NOR then we want to be able to use |
59 | * the data cache in order to boot in a decent duration | 59 | * the data cache in order to boot in a decent duration |
60 | */ | 60 | */ |
61 | create_tlb(tlbix++, MSCC_FLASH_TO, SZ_16M, MMU_REGIO_RO_C, | 61 | create_tlb(tlbix++, MSCC_FLASH_TO, SZ_16M, MMU_REGIO_RO_C, |
62 | MMU_REGIO_RO_C); | 62 | MMU_REGIO_RO_C); |
63 | create_tlb(tlbix++, MSCC_FLASH_TO + SZ_32M, SZ_16M, MMU_REGIO_RO_C, | 63 | create_tlb(tlbix++, MSCC_FLASH_TO + SZ_32M, SZ_16M, MMU_REGIO_RO_C, |
64 | MMU_REGIO_RO_C); | 64 | MMU_REGIO_RO_C); |
65 | 65 | ||
66 | /* | 66 | /* |
67 | * Using cache for RAM also helps to improve boot time. Thanks | 67 | * Using cache for RAM also helps to improve boot time. Thanks |
68 | * to this the time to relocate U-Boot in RAM went from 2.092 | 68 | * to this the time to relocate U-Boot in RAM went from 2.092 |
69 | * secs to 0.104 secs. | 69 | * secs to 0.104 secs. |
70 | */ | 70 | */ |
71 | create_tlb(tlbix++, MSCC_DDR_TO, MSCC_RAM_TLB_SIZE, MMU_REGIO_RW, | 71 | create_tlb(tlbix++, MSCC_DDR_TO, MSCC_RAM_TLB_SIZE, MMU_REGIO_RW, |
72 | MSCC_ATTRIB2); | 72 | MSCC_ATTRIB2); |
73 | 73 | ||
74 | /* Enable caches by clearing the bit ERL, which is set on reset */ | 74 | /* Enable caches by clearing the bit ERL, which is set on reset */ |
75 | write_c0_status(read_c0_status() & ~BIT(2)); | 75 | write_c0_status(read_c0_status() & ~BIT(2)); |
76 | #endif /* CONFIG_SYS_TEXT_BASE */ | 76 | #endif /* CONFIG_SYS_TEXT_BASE */ |
77 | } | 77 | } |
78 | 78 | ||
79 | int mach_cpu_init(void) | 79 | int mach_cpu_init(void) |
80 | { | 80 | { |
81 | /* Speed up NOR flash access */ | 81 | /* Speed up NOR flash access */ |
82 | #ifdef CONFIG_SOC_LUTON | 82 | #ifdef CONFIG_SOC_LUTON |
83 | writel(ICPU_PI_MST_CFG_TRISTATE_CTRL + | 83 | writel(ICPU_PI_MST_CFG_TRISTATE_CTRL + |
84 | ICPU_PI_MST_CFG_CLK_DIV(4), BASE_CFG + ICPU_PI_MST_CFG); | 84 | ICPU_PI_MST_CFG_CLK_DIV(4), BASE_CFG + ICPU_PI_MST_CFG); |
85 | 85 | ||
86 | writel(ICPU_SPI_MST_CFG_FAST_READ_ENA + | 86 | writel(ICPU_SPI_MST_CFG_FAST_READ_ENA + |
87 | ICPU_SPI_MST_CFG_CS_DESELECT_TIME(0x19) + | 87 | ICPU_SPI_MST_CFG_CS_DESELECT_TIME(0x19) + |
88 | ICPU_SPI_MST_CFG_CLK_DIV(9), BASE_CFG + ICPU_SPI_MST_CFG); | 88 | ICPU_SPI_MST_CFG_CLK_DIV(9), BASE_CFG + ICPU_SPI_MST_CFG); |
89 | #else | 89 | #else |
90 | #ifdef CONFIG_SOC_OCELOT | ||
90 | writel(ICPU_SPI_MST_CFG_CS_DESELECT_TIME(0x19) + | 91 | writel(ICPU_SPI_MST_CFG_CS_DESELECT_TIME(0x19) + |
91 | ICPU_SPI_MST_CFG_CLK_DIV(9), BASE_CFG + ICPU_SPI_MST_CFG); | 92 | ICPU_SPI_MST_CFG_CLK_DIV(9), BASE_CFG + ICPU_SPI_MST_CFG); |
93 | #endif | ||
94 | #ifdef CONFIG_SOC_JR2 | ||
95 | writel(ICPU_SPI_MST_CFG_FAST_READ_ENA + | ||
96 | ICPU_SPI_MST_CFG_CS_DESELECT_TIME(0x19) + | ||
97 | ICPU_SPI_MST_CFG_CLK_DIV(14), BASE_CFG + ICPU_SPI_MST_CFG); | ||
98 | #endif | ||
92 | /* | 99 | /* |
93 | * Legacy and mainline linux kernel expect that the | 100 | * Legacy and mainline linux kernel expect that the |
94 | * interruption map was set as it was done by redboot. | 101 | * interruption map was set as it was done by redboot. |
95 | */ | 102 | */ |
96 | writel(~0, BASE_CFG + ICPU_DST_INTR_MAP(0)); | 103 | writel(~0, BASE_CFG + ICPU_DST_INTR_MAP(0)); |
97 | writel(0, BASE_CFG + ICPU_DST_INTR_MAP(1)); | 104 | writel(0, BASE_CFG + ICPU_DST_INTR_MAP(1)); |
98 | writel(0, BASE_CFG + ICPU_DST_INTR_MAP(2)); | 105 | writel(0, BASE_CFG + ICPU_DST_INTR_MAP(2)); |
99 | writel(0, BASE_CFG + ICPU_DST_INTR_MAP(3)); | 106 | writel(0, BASE_CFG + ICPU_DST_INTR_MAP(3)); |
100 | #endif | 107 | #endif |
101 | return 0; | 108 | return 0; |
102 | } | 109 | } |
103 | 110 |
arch/mips/mach-mscc/dram.c
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <common.h> | 6 | #include <common.h> |
7 | 7 | ||
8 | #include <asm/io.h> | 8 | #include <asm/io.h> |
9 | #include <asm/types.h> | 9 | #include <asm/types.h> |
10 | 10 | ||
11 | #include <mach/tlb.h> | 11 | #include <mach/tlb.h> |
12 | #include <mach/ddr.h> | 12 | #include <mach/ddr.h> |
13 | 13 | ||
14 | DECLARE_GLOBAL_DATA_PTR; | 14 | DECLARE_GLOBAL_DATA_PTR; |
15 | 15 | ||
16 | static inline int vcoreiii_train_bytelane(void) | 16 | static inline int vcoreiii_train_bytelane(void) |
17 | { | 17 | { |
18 | int ret; | 18 | int ret; |
19 | 19 | ||
20 | ret = hal_vcoreiii_train_bytelane(0); | 20 | ret = hal_vcoreiii_train_bytelane(0); |
21 | 21 | ||
22 | #ifdef CONFIG_SOC_OCELOT | 22 | #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) |
23 | if (ret) | 23 | if (ret) |
24 | return ret; | 24 | return ret; |
25 | ret = hal_vcoreiii_train_bytelane(1); | 25 | ret = hal_vcoreiii_train_bytelane(1); |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | return ret; | 28 | return ret; |
29 | } | 29 | } |
30 | 30 | ||
31 | int vcoreiii_ddr_init(void) | 31 | int vcoreiii_ddr_init(void) |
32 | { | 32 | { |
33 | int res; | 33 | int res; |
34 | 34 | ||
35 | if (!(readl(BASE_CFG + ICPU_MEMCTRL_STAT) | 35 | if (!(readl(BASE_CFG + ICPU_MEMCTRL_STAT) |
36 | & ICPU_MEMCTRL_STAT_INIT_DONE)) { | 36 | & ICPU_MEMCTRL_STAT_INIT_DONE)) { |
37 | hal_vcoreiii_init_memctl(); | 37 | hal_vcoreiii_init_memctl(); |
38 | hal_vcoreiii_wait_memctl(); | 38 | hal_vcoreiii_wait_memctl(); |
39 | if (hal_vcoreiii_init_dqs() || vcoreiii_train_bytelane()) | 39 | if (hal_vcoreiii_init_dqs() || vcoreiii_train_bytelane()) |
40 | hal_vcoreiii_ddr_failed(); | 40 | hal_vcoreiii_ddr_failed(); |
41 | } | 41 | } |
42 | #if (CONFIG_SYS_TEXT_BASE != 0x20000000) | 42 | #if (CONFIG_SYS_TEXT_BASE != 0x20000000) |
43 | res = dram_check(); | 43 | res = dram_check(); |
44 | if (res == 0) | 44 | if (res == 0) |
45 | hal_vcoreiii_ddr_verified(); | 45 | hal_vcoreiii_ddr_verified(); |
46 | else | 46 | else |
47 | hal_vcoreiii_ddr_failed(); | 47 | hal_vcoreiii_ddr_failed(); |
48 | 48 | ||
49 | /* Clear boot-mode and read-back to activate/verify */ | 49 | /* Clear boot-mode and read-back to activate/verify */ |
50 | clrbits_le32(BASE_CFG + ICPU_GENERAL_CTRL, | 50 | clrbits_le32(BASE_CFG + ICPU_GENERAL_CTRL, |
51 | ICPU_GENERAL_CTRL_BOOT_MODE_ENA); | 51 | ICPU_GENERAL_CTRL_BOOT_MODE_ENA); |
52 | readl(BASE_CFG + ICPU_GENERAL_CTRL); | 52 | readl(BASE_CFG + ICPU_GENERAL_CTRL); |
53 | #else | 53 | #else |
54 | res = 0; | 54 | res = 0; |
55 | #endif | 55 | #endif |
56 | return res; | 56 | return res; |
57 | } | 57 | } |
58 | 58 | ||
59 | int print_cpuinfo(void) | 59 | int print_cpuinfo(void) |
60 | { | 60 | { |
61 | printf("MSCC VCore-III MIPS 24Kec\n"); | 61 | printf("MSCC VCore-III MIPS 24Kec\n"); |
62 | 62 | ||
63 | return 0; | 63 | return 0; |
64 | } | 64 | } |
65 | 65 | ||
66 | int dram_init(void) | 66 | int dram_init(void) |
67 | { | 67 | { |
68 | while (vcoreiii_ddr_init()) | 68 | while (vcoreiii_ddr_init()) |
69 | ; | 69 | ; |
70 | 70 | ||
71 | gd->ram_size = CONFIG_SYS_SDRAM_SIZE; | 71 | gd->ram_size = CONFIG_SYS_SDRAM_SIZE; |
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 |
arch/mips/mach-mscc/gpio.c
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | #include <common.h> | ||
7 | #include <asm/io.h> | ||
8 | |||
9 | void mscc_gpio_set_alternate(int gpio, int mode) | ||
10 | { | ||
11 | u32 mask = BIT(gpio); | ||
12 | u32 val0, val1; | ||
13 | |||
14 | val0 = readl(BASE_DEVCPU_GCB + GPIO_ALT(0)); | ||
15 | val1 = readl(BASE_DEVCPU_GCB + GPIO_ALT(1)); | ||
16 | |||
17 | if (mode == 1) { | ||
18 | val0 |= mask; | ||
19 | val1 &= ~mask; | ||
20 | } else if (mode == 2) { | ||
21 | val0 &= ~mask; | ||
22 | val1 |= mask; | ||
23 | } else if (mode == 3) { | ||
24 | val0 |= mask; | ||
25 | val1 |= mask; | ||
26 | } else { | ||
27 | val0 &= ~mask; | ||
28 | val1 &= ~mask; | ||
29 | } | ||
30 | |||
31 | writel(val0, BASE_DEVCPU_GCB + GPIO_ALT(0)); | ||
32 | writel(val1, BASE_DEVCPU_GCB + GPIO_ALT(1)); | ||
33 | } | ||
34 |
arch/mips/mach-mscc/include/mach/common.h
1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __ASM_MACH_COMMON_H | 6 | #ifndef __ASM_MACH_COMMON_H |
7 | #define __ASM_MACH_COMMON_H | 7 | #define __ASM_MACH_COMMON_H |
8 | 8 | ||
9 | #if defined(CONFIG_SOC_OCELOT) | 9 | #if defined(CONFIG_SOC_OCELOT) |
10 | #include <mach/ocelot/ocelot.h> | 10 | #include <mach/ocelot/ocelot.h> |
11 | #include <mach/ocelot/ocelot_devcpu_gcb.h> | 11 | #include <mach/ocelot/ocelot_devcpu_gcb.h> |
12 | #include <mach/ocelot/ocelot_devcpu_gcb_miim_regs.h> | ||
12 | #include <mach/ocelot/ocelot_icpu_cfg.h> | 13 | #include <mach/ocelot/ocelot_icpu_cfg.h> |
13 | #elif defined(CONFIG_SOC_LUTON) | 14 | #elif defined(CONFIG_SOC_LUTON) |
14 | #include <mach/luton/luton.h> | 15 | #include <mach/luton/luton.h> |
15 | #include <mach/luton/luton_devcpu_gcb.h> | 16 | #include <mach/luton/luton_devcpu_gcb.h> |
17 | #include <mach/luton/luton_devcpu_gcb_miim_regs.h> | ||
16 | #include <mach/luton/luton_icpu_cfg.h> | 18 | #include <mach/luton/luton_icpu_cfg.h> |
19 | #elif defined(CONFIG_SOC_JR2) | ||
20 | #include <mach/jr2/jr2.h> | ||
21 | #include <mach/jr2/jr2_devcpu_gcb.h> | ||
22 | #include <mach/jr2/jr2_devcpu_gcb_miim_regs.h> | ||
23 | #include <mach/jr2/jr2_icpu_cfg.h> | ||
17 | #else | 24 | #else |
18 | #error Unsupported platform | 25 | #error Unsupported platform |
19 | #endif | 26 | #endif |
20 | 27 | ||
21 | #define MSCC_DDR_TO 0x20000000 /* DDR RAM base offset */ | 28 | #define MSCC_DDR_TO 0x20000000 /* DDR RAM base offset */ |
22 | #define MSCC_MEMCTL1_TO 0x40000000 /* SPI/PI base offset */ | 29 | #define MSCC_MEMCTL1_TO 0x40000000 /* SPI/PI base offset */ |
23 | #define MSCC_MEMCTL2_TO 0x50000000 /* SPI/PI base offset */ | 30 | #define MSCC_MEMCTL2_TO 0x50000000 /* SPI/PI base offset */ |
24 | #define MSCC_FLASH_TO MSCC_MEMCTL1_TO /* Flash base offset */ | 31 | #define MSCC_FLASH_TO MSCC_MEMCTL1_TO /* Flash base offset */ |
25 | 32 | ||
26 | #define VCOREIII_TIMER_DIVIDER 25 /* Clock tick ~ 0.1 us */ | 33 | #define VCOREIII_TIMER_DIVIDER 25 /* Clock tick ~ 0.1 us */ |
34 | |||
35 | /* Common utility functions */ | ||
36 | |||
37 | /* | ||
38 | * Perform a number of NOP instructions, blocks of 8 instructions. | ||
39 | * The (inlined) function will not affect cache or processor state. | ||
40 | */ | ||
41 | static inline void mscc_vcoreiii_nop_delay(int delay) | ||
42 | { | ||
43 | while (delay > 0) { | ||
44 | #define DELAY_8_NOPS() asm volatile("nop; nop; nop; nop; nop; nop; nop; nop;") | ||
45 | switch (delay) { | ||
46 | case 8: | ||
47 | DELAY_8_NOPS(); | ||
48 | /* fallthrough */ | ||
49 | case 7: | ||
50 | DELAY_8_NOPS(); | ||
51 | /* fallthrough */ | ||
52 | case 6: | ||
53 | DELAY_8_NOPS(); | ||
54 | /* fallthrough */ | ||
55 | case 5: | ||
56 | DELAY_8_NOPS(); | ||
57 | /* fallthrough */ | ||
58 | case 4: | ||
59 | DELAY_8_NOPS(); | ||
60 | /* fallthrough */ | ||
61 | case 3: | ||
62 | DELAY_8_NOPS(); | ||
63 | /* fallthrough */ | ||
64 | case 2: | ||
65 | DELAY_8_NOPS(); | ||
66 | /* fallthrough */ | ||
67 | case 1: | ||
68 | DELAY_8_NOPS(); | ||
69 | } | ||
70 | delay -= 8; | ||
71 | #undef DELAY_8_NOPS | ||
72 | } | ||
73 | } | ||
74 | |||
75 | int mscc_phy_rd_wr(u8 read, | ||
76 | u32 miim_controller, | ||
77 | u8 miim_addr, | ||
78 | u8 addr, | ||
79 | u16 *value); | ||
80 | |||
81 | int mscc_phy_rd(u32 miim_controller, | ||
82 | u8 miim_addr, | ||
83 | u8 addr, | ||
84 | u16 *value); | ||
85 | |||
86 | int mscc_phy_wr(u32 miim_controller, | ||
87 | u8 miim_addr, | ||
88 | u8 addr, | ||
89 | u16 value); | ||
90 | |||
91 | void mscc_gpio_set_alternate(int gpio, int mode); | ||
27 | 92 | ||
28 | #endif /* __ASM_MACH_COMMON_H */ | 93 | #endif /* __ASM_MACH_COMMON_H */ |
29 | 94 |
arch/mips/mach-mscc/include/mach/ddr.h
1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __ASM_MACH_DDR_H | 6 | #ifndef __ASM_MACH_DDR_H |
7 | #define __ASM_MACH_DDR_H | 7 | #define __ASM_MACH_DDR_H |
8 | 8 | ||
9 | #include <asm/cacheops.h> | 9 | #include <asm/cacheops.h> |
10 | #include <asm/io.h> | 10 | #include <asm/io.h> |
11 | #include <asm/reboot.h> | 11 | #include <asm/reboot.h> |
12 | #include <mach/common.h> | 12 | #include <mach/common.h> |
13 | 13 | ||
14 | #define MIPS_VCOREIII_MEMORY_DDR3 | 14 | #define MIPS_VCOREIII_MEMORY_DDR3 |
15 | #define MIPS_VCOREIII_DDR_SIZE CONFIG_SYS_SDRAM_SIZE | 15 | #define MIPS_VCOREIII_DDR_SIZE CONFIG_SYS_SDRAM_SIZE |
16 | 16 | ||
17 | #if defined(CONFIG_DDRTYPE_H5TQ1G63BFA) /* Serval1 Refboard */ | 17 | #if defined(CONFIG_DDRTYPE_H5TQ1G63BFA) /* Serval1 Refboard */ |
18 | 18 | ||
19 | /* Hynix H5TQ1G63BFA (1Gbit DDR3, x16) @ 3.20ns */ | 19 | /* Hynix H5TQ1G63BFA (1Gbit DDR3, x16) @ 3.20ns */ |
20 | #define VC3_MPAR_bank_addr_cnt 3 | 20 | #define VC3_MPAR_bank_addr_cnt 3 |
21 | #define VC3_MPAR_row_addr_cnt 13 | 21 | #define VC3_MPAR_row_addr_cnt 13 |
22 | #define VC3_MPAR_col_addr_cnt 10 | 22 | #define VC3_MPAR_col_addr_cnt 10 |
23 | #define VC3_MPAR_tREFI 2437 | 23 | #define VC3_MPAR_tREFI 2437 |
24 | #define VC3_MPAR_tRAS_min 12 | 24 | #define VC3_MPAR_tRAS_min 12 |
25 | #define VC3_MPAR_CL 6 | 25 | #define VC3_MPAR_CL 6 |
26 | #define VC3_MPAR_tWTR 4 | 26 | #define VC3_MPAR_tWTR 4 |
27 | #define VC3_MPAR_tRC 16 | 27 | #define VC3_MPAR_tRC 16 |
28 | #define VC3_MPR_tFAW 16 | 28 | #define VC3_MPR_tFAW 16 |
29 | #define VC3_MPAR_tRP 5 | 29 | #define VC3_MPAR_tRP 5 |
30 | #define VC3_MPAR_tRRD 4 | 30 | #define VC3_MPAR_tRRD 4 |
31 | #define VC3_MPAR_tRCD 5 | 31 | #define VC3_MPAR_tRCD 5 |
32 | #define VC3_MPAR_tMRD 4 | 32 | #define VC3_MPAR_tMRD 4 |
33 | #define VC3_MPAR_tRFC 35 | 33 | #define VC3_MPAR_tRFC 35 |
34 | #define VC3_MPAR_CWL 5 | 34 | #define VC3_MPAR_CWL 5 |
35 | #define VC3_MPAR_tXPR 38 | 35 | #define VC3_MPAR_tXPR 38 |
36 | #define VC3_MPAR_tMOD 12 | 36 | #define VC3_MPAR_tMOD 12 |
37 | #define VC3_MPAR_tDLLK 512 | 37 | #define VC3_MPAR_tDLLK 512 |
38 | #define VC3_MPAR_tWR 5 | 38 | #define VC3_MPAR_tWR 5 |
39 | 39 | ||
40 | #elif defined(CONFIG_DDRTYPE_MT41J128M16HA) /* Validation board */ | 40 | #elif defined(CONFIG_DDRTYPE_MT41J128M16HA) /* Validation board */ |
41 | 41 | ||
42 | /* Micron MT41J128M16HA-15E:D (2Gbit DDR3, x16) @ 3.20ns */ | 42 | /* Micron MT41J128M16HA-15E:D (2Gbit DDR3, x16) @ 3.20ns */ |
43 | #define VC3_MPAR_bank_addr_cnt 3 | 43 | #define VC3_MPAR_bank_addr_cnt 3 |
44 | #define VC3_MPAR_row_addr_cnt 14 | 44 | #define VC3_MPAR_row_addr_cnt 14 |
45 | #define VC3_MPAR_col_addr_cnt 10 | 45 | #define VC3_MPAR_col_addr_cnt 10 |
46 | #define VC3_MPAR_tREFI 2437 | 46 | #define VC3_MPAR_tREFI 2437 |
47 | #define VC3_MPAR_tRAS_min 12 | 47 | #define VC3_MPAR_tRAS_min 12 |
48 | #define VC3_MPAR_CL 5 | 48 | #define VC3_MPAR_CL 5 |
49 | #define VC3_MPAR_tWTR 4 | 49 | #define VC3_MPAR_tWTR 4 |
50 | #define VC3_MPAR_tRC 16 | 50 | #define VC3_MPAR_tRC 16 |
51 | #define VC3_MPAR_tFAW 16 | 51 | #define VC3_MPAR_tFAW 16 |
52 | #define VC3_MPAR_tRP 5 | 52 | #define VC3_MPAR_tRP 5 |
53 | #define VC3_MPAR_tRRD 4 | 53 | #define VC3_MPAR_tRRD 4 |
54 | #define VC3_MPAR_tRCD 5 | 54 | #define VC3_MPAR_tRCD 5 |
55 | #define VC3_MPAR_tMRD 4 | 55 | #define VC3_MPAR_tMRD 4 |
56 | #define VC3_MPAR_tRFC 50 | 56 | #define VC3_MPAR_tRFC 50 |
57 | #define VC3_MPAR_CWL 5 | 57 | #define VC3_MPAR_CWL 5 |
58 | #define VC3_MPAR_tXPR 54 | 58 | #define VC3_MPAR_tXPR 54 |
59 | #define VC3_MPAR_tMOD 12 | 59 | #define VC3_MPAR_tMOD 12 |
60 | #define VC3_MPAR_tDLLK 512 | 60 | #define VC3_MPAR_tDLLK 512 |
61 | #define VC3_MPAR_tWR 5 | 61 | #define VC3_MPAR_tWR 5 |
62 | 62 | ||
63 | #elif defined(CONFIG_DDRTYPE_MT41K256M16) /* JR2 Validation board */ | 63 | #elif defined(CONFIG_DDRTYPE_MT41K256M16) /* JR2 Validation board */ |
64 | 64 | ||
65 | /* Micron MT41K256M16 (4Gbit, DDR3L-800, 256Mbitx16) @ 3.20ns */ | 65 | /* Micron MT41K256M16 (4Gbit, DDR3L-800, 256Mbitx16) @ 3.20ns */ |
66 | #define VC3_MPAR_bank_addr_cnt 3 | 66 | #define VC3_MPAR_bank_addr_cnt 3 |
67 | #define VC3_MPAR_row_addr_cnt 15 | 67 | #define VC3_MPAR_row_addr_cnt 15 |
68 | #define VC3_MPAR_col_addr_cnt 10 | 68 | #define VC3_MPAR_col_addr_cnt 10 |
69 | #define VC3_MPAR_tREFI 2437 | 69 | #define VC3_MPAR_tREFI 2437 |
70 | #define VC3_MPAR_tRAS_min 12 | 70 | #define VC3_MPAR_tRAS_min 12 |
71 | #define VC3_MPAR_CL 5 | 71 | #define VC3_MPAR_CL 5 |
72 | #define VC3_MPAR_tWTR 4 | 72 | #define VC3_MPAR_tWTR 4 |
73 | #define VC3_MPAR_tRC 16 | 73 | #define VC3_MPAR_tRC 16 |
74 | #define VC3_MPAR_tFAW 16 | 74 | #define VC3_MPAR_tFAW 16 |
75 | #define VC3_MPAR_tRP 5 | 75 | #define VC3_MPAR_tRP 5 |
76 | #define VC3_MPAR_tRRD 4 | 76 | #define VC3_MPAR_tRRD 4 |
77 | #define VC3_MPAR_tRCD 5 | 77 | #define VC3_MPAR_tRCD 5 |
78 | #define VC3_MPAR_tMRD 4 | 78 | #define VC3_MPAR_tMRD 4 |
79 | #define VC3_MPAR_tRFC 82 | 79 | #define VC3_MPAR_tRFC 82 |
80 | #define VC3_MPAR_CWL 5 | 80 | #define VC3_MPAR_CWL 5 |
81 | #define VC3_MPAR_tXPR 85 | 81 | #define VC3_MPAR_tXPR 85 |
82 | #define VC3_MPAR_tMOD 12 | 82 | #define VC3_MPAR_tMOD 12 |
83 | #define VC3_MPAR_tDLLK 512 | 83 | #define VC3_MPAR_tDLLK 512 |
84 | #define VC3_MPAR_tWR 5 | 84 | #define VC3_MPAR_tWR 5 |
85 | 85 | ||
86 | #elif defined(CONFIG_DDRTYPE_H5TQ4G63MFR) /* JR2 Reference board */ | 86 | #elif defined(CONFIG_DDRTYPE_H5TQ4G63MFR) /* JR2 Reference board */ |
87 | 87 | ||
88 | /* Hynix H5TQ4G63MFR-PBC (4Gbit, DDR3-800, 256Mbitx16) - 2kb pages @ 3.20ns */ | 88 | /* Hynix H5TQ4G63MFR-PBC (4Gbit, DDR3-800, 256Mbitx16) - 2kb pages @ 3.20ns */ |
89 | #define VC3_MPAR_bank_addr_cnt 3 | 89 | #define VC3_MPAR_bank_addr_cnt 3 |
90 | #define VC3_MPAR_row_addr_cnt 15 | 90 | #define VC3_MPAR_row_addr_cnt 15 |
91 | #define VC3_MPAR_col_addr_cnt 10 | 91 | #define VC3_MPAR_col_addr_cnt 10 |
92 | #define VC3_MPAR_tREFI 2437 | 92 | #define VC3_MPAR_tREFI 2437 |
93 | #define VC3_MPAR_tRAS_min 12 | 93 | #define VC3_MPAR_tRAS_min 12 |
94 | #define VC3_MPAR_CL 6 | 94 | #define VC3_MPAR_CL 6 |
95 | #define VC3_MPAR_tWTR 4 | 95 | #define VC3_MPAR_tWTR 4 |
96 | #define VC3_MPAR_tRC 17 | 96 | #define VC3_MPAR_tRC 17 |
97 | #define VC3_MPAR_tFAW 16 | 97 | #define VC3_MPAR_tFAW 16 |
98 | #define VC3_MPAR_tRP 5 | 98 | #define VC3_MPAR_tRP 5 |
99 | #define VC3_MPAR_tRRD 4 | 99 | #define VC3_MPAR_tRRD 4 |
100 | #define VC3_MPAR_tRCD 5 | 100 | #define VC3_MPAR_tRCD 5 |
101 | #define VC3_MPAR_tMRD 4 | 101 | #define VC3_MPAR_tMRD 4 |
102 | #define VC3_MPAR_tRFC 82 | 102 | #define VC3_MPAR_tRFC 82 |
103 | #define VC3_MPAR_CWL 5 | 103 | #define VC3_MPAR_CWL 5 |
104 | #define VC3_MPAR_tXPR 85 | 104 | #define VC3_MPAR_tXPR 85 |
105 | #define VC3_MPAR_tMOD 12 | 105 | #define VC3_MPAR_tMOD 12 |
106 | #define VC3_MPAR_tDLLK 512 | 106 | #define VC3_MPAR_tDLLK 512 |
107 | #define VC3_MPAR_tWR 5 | 107 | #define VC3_MPAR_tWR 5 |
108 | 108 | ||
109 | #elif defined(CONFIG_DDRTYPE_MT41K128M16JT) | 109 | #elif defined(CONFIG_DDRTYPE_MT41K128M16JT) |
110 | 110 | ||
111 | /* Micron Micron MT41K128M16JT-125 (2Gbit DDR3L, 128Mbitx16) @ 3.20ns */ | 111 | /* Micron Micron MT41K128M16JT-125 (2Gbit DDR3L, 128Mbitx16) @ 3.20ns */ |
112 | #define VC3_MPAR_bank_addr_cnt 3 | 112 | #define VC3_MPAR_bank_addr_cnt 3 |
113 | #define VC3_MPAR_row_addr_cnt 14 | 113 | #define VC3_MPAR_row_addr_cnt 14 |
114 | #define VC3_MPAR_col_addr_cnt 10 | 114 | #define VC3_MPAR_col_addr_cnt 10 |
115 | #define VC3_MPAR_tREFI 2437 | 115 | #define VC3_MPAR_tREFI 2437 |
116 | #define VC3_MPAR_tRAS_min 12 | 116 | #define VC3_MPAR_tRAS_min 12 |
117 | #define VC3_MPAR_CL 6 | 117 | #define VC3_MPAR_CL 6 |
118 | #define VC3_MPAR_tWTR 4 | 118 | #define VC3_MPAR_tWTR 4 |
119 | #define VC3_MPAR_tRC 16 | 119 | #define VC3_MPAR_tRC 16 |
120 | #define VC3_MPAR_tFAW 16 | 120 | #define VC3_MPAR_tFAW 16 |
121 | #define VC3_MPAR_tRP 5 | 121 | #define VC3_MPAR_tRP 5 |
122 | #define VC3_MPAR_tRRD 4 | 122 | #define VC3_MPAR_tRRD 4 |
123 | #define VC3_MPAR_tRCD 5 | 123 | #define VC3_MPAR_tRCD 5 |
124 | #define VC3_MPAR_tMRD 4 | 124 | #define VC3_MPAR_tMRD 4 |
125 | #define VC3_MPAR_tRFC 82 | 125 | #define VC3_MPAR_tRFC 82 |
126 | #define VC3_MPAR_CWL 5 | 126 | #define VC3_MPAR_CWL 5 |
127 | #define VC3_MPAR_tXPR 85 | 127 | #define VC3_MPAR_tXPR 85 |
128 | #define VC3_MPAR_tMOD 12 | 128 | #define VC3_MPAR_tMOD 12 |
129 | #define VC3_MPAR_tDLLK 512 | 129 | #define VC3_MPAR_tDLLK 512 |
130 | #define VC3_MPAR_tWR 5 | 130 | #define VC3_MPAR_tWR 5 |
131 | 131 | ||
132 | #elif defined(CONFIG_DDRTYPE_MT47H128M8HQ) /* Luton10/26 Refboards */ | 132 | #elif defined(CONFIG_DDRTYPE_MT47H128M8HQ) /* Luton10/26 Refboards */ |
133 | 133 | ||
134 | /* Micron 1Gb MT47H128M8-3 16Meg x 8 x 8 banks, DDR-533@CL4 @ 4.80ns */ | 134 | /* Micron 1Gb MT47H128M8-3 16Meg x 8 x 8 banks, DDR-533@CL4 @ 4.80ns */ |
135 | #define VC3_MPAR_bank_addr_cnt 3 | 135 | #define VC3_MPAR_bank_addr_cnt 3 |
136 | #define VC3_MPAR_row_addr_cnt 14 | 136 | #define VC3_MPAR_row_addr_cnt 14 |
137 | #define VC3_MPAR_col_addr_cnt 10 | 137 | #define VC3_MPAR_col_addr_cnt 10 |
138 | #define VC3_MPAR_tREFI 1625 | 138 | #define VC3_MPAR_tREFI 1625 |
139 | #define VC3_MPAR_tRAS_min 9 | 139 | #define VC3_MPAR_tRAS_min 9 |
140 | #define VC3_MPAR_CL 4 | 140 | #define VC3_MPAR_CL 4 |
141 | #define VC3_MPAR_tWTR 2 | 141 | #define VC3_MPAR_tWTR 2 |
142 | #define VC3_MPAR_tRC 12 | 142 | #define VC3_MPAR_tRC 12 |
143 | #define VC3_MPAR_tFAW 8 | 143 | #define VC3_MPAR_tFAW 8 |
144 | #define VC3_MPAR_tRP 4 | 144 | #define VC3_MPAR_tRP 4 |
145 | #define VC3_MPAR_tRRD 2 | 145 | #define VC3_MPAR_tRRD 2 |
146 | #define VC3_MPAR_tRCD 4 | 146 | #define VC3_MPAR_tRCD 4 |
147 | 147 | ||
148 | #define VC3_MPAR_tRPA 4 | 148 | #define VC3_MPAR_tRPA 4 |
149 | #define VC3_MPAR_tRP 4 | 149 | #define VC3_MPAR_tRP 4 |
150 | 150 | ||
151 | #define VC3_MPAR_tMRD 2 | 151 | #define VC3_MPAR_tMRD 2 |
152 | #define VC3_MPAR_tRFC 27 | 152 | #define VC3_MPAR_tRFC 27 |
153 | 153 | ||
154 | #define VC3_MPAR__400_ns_dly 84 | 154 | #define VC3_MPAR__400_ns_dly 84 |
155 | 155 | ||
156 | #define VC3_MPAR_tWR 4 | 156 | #define VC3_MPAR_tWR 4 |
157 | #undef MIPS_VCOREIII_MEMORY_DDR3 | 157 | #undef MIPS_VCOREIII_MEMORY_DDR3 |
158 | #else | 158 | #else |
159 | 159 | ||
160 | #error Unknown DDR system configuration - please add! | 160 | #error Unknown DDR system configuration - please add! |
161 | 161 | ||
162 | #endif | 162 | #endif |
163 | 163 | ||
164 | #ifdef CONFIG_SOC_OCELOT | 164 | #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) |
165 | #define MIPS_VCOREIII_MEMORY_16BIT 1 | 165 | #define MIPS_VCOREIII_MEMORY_16BIT 1 |
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | #define MIPS_VCOREIII_MEMORY_SSTL_ODT 7 | 168 | #define MIPS_VCOREIII_MEMORY_SSTL_ODT 7 |
169 | #define MIPS_VCOREIII_MEMORY_SSTL_DRIVE 7 | 169 | #define MIPS_VCOREIII_MEMORY_SSTL_DRIVE 7 |
170 | #define VCOREIII_DDR_DQS_MODE_CALIBRATE | 170 | #define VCOREIII_DDR_DQS_MODE_CALIBRATE |
171 | 171 | ||
172 | #ifdef MIPS_VCOREIII_MEMORY_16BIT | 172 | #ifdef MIPS_VCOREIII_MEMORY_16BIT |
173 | #define VC3_MPAR_16BIT 1 | 173 | #define VC3_MPAR_16BIT 1 |
174 | #else | 174 | #else |
175 | #define VC3_MPAR_16BIT 0 | 175 | #define VC3_MPAR_16BIT 0 |
176 | #endif | 176 | #endif |
177 | 177 | ||
178 | #ifdef MIPS_VCOREIII_MEMORY_DDR3 | 178 | #ifdef MIPS_VCOREIII_MEMORY_DDR3 |
179 | #define VC3_MPAR_DDR3_MODE 1 /* DDR3 */ | 179 | #define VC3_MPAR_DDR3_MODE 1 /* DDR3 */ |
180 | #define VC3_MPAR_BURST_LENGTH 8 /* Always 8 (1) for DDR3 */ | 180 | #define VC3_MPAR_BURST_LENGTH 8 /* Always 8 (1) for DDR3 */ |
181 | #ifdef MIPS_VCOREIII_MEMORY_16BIT | 181 | #ifdef MIPS_VCOREIII_MEMORY_16BIT |
182 | #define VC3_MPAR_BURST_SIZE 1 /* Always 1 for DDR3/16bit */ | 182 | #define VC3_MPAR_BURST_SIZE 1 /* Always 1 for DDR3/16bit */ |
183 | #else | 183 | #else |
184 | #define VC3_MPAR_BURST_SIZE 0 | 184 | #define VC3_MPAR_BURST_SIZE 0 |
185 | #endif | 185 | #endif |
186 | #else | 186 | #else |
187 | #define VC3_MPAR_DDR3_MODE 0 /* DDR2 */ | 187 | #define VC3_MPAR_DDR3_MODE 0 /* DDR2 */ |
188 | #ifdef MIPS_VCOREIII_MEMORY_16BIT | 188 | #ifdef MIPS_VCOREIII_MEMORY_16BIT |
189 | #define VC3_MPAR_BURST_LENGTH 4 /* in DDR2 16-bit mode, use burstlen 4 */ | 189 | #define VC3_MPAR_BURST_LENGTH 4 /* in DDR2 16-bit mode, use burstlen 4 */ |
190 | #else | 190 | #else |
191 | #define VC3_MPAR_BURST_LENGTH 8 /* For 8-bit IF we must run burst-8 */ | 191 | #define VC3_MPAR_BURST_LENGTH 8 /* For 8-bit IF we must run burst-8 */ |
192 | #endif | 192 | #endif |
193 | #define VC3_MPAR_BURST_SIZE 0 /* Always 0 for DDR2 */ | 193 | #define VC3_MPAR_BURST_SIZE 0 /* Always 0 for DDR2 */ |
194 | #endif | 194 | #endif |
195 | 195 | ||
196 | #define VC3_MPAR_RL VC3_MPAR_CL | 196 | #define VC3_MPAR_RL VC3_MPAR_CL |
197 | #if !defined(MIPS_VCOREIII_MEMORY_DDR3) | 197 | #if !defined(MIPS_VCOREIII_MEMORY_DDR3) |
198 | #define VC3_MPAR_WL (VC3_MPAR_RL - 1) | 198 | #define VC3_MPAR_WL (VC3_MPAR_RL - 1) |
199 | #define VC3_MPAR_MD VC3_MPAR_tMRD | 199 | #define VC3_MPAR_MD VC3_MPAR_tMRD |
200 | #define VC3_MPAR_ID VC3_MPAR__400_ns_dly | 200 | #define VC3_MPAR_ID VC3_MPAR__400_ns_dly |
201 | #define VC3_MPAR_SD VC3_MPAR_tXSRD | 201 | #define VC3_MPAR_SD VC3_MPAR_tXSRD |
202 | #define VC3_MPAR_OW (VC3_MPAR_WL - 2) | 202 | #define VC3_MPAR_OW (VC3_MPAR_WL - 2) |
203 | #define VC3_MPAR_OR (VC3_MPAR_WL - 3) | 203 | #define VC3_MPAR_OR (VC3_MPAR_WL - 3) |
204 | #define VC3_MPAR_RP (VC3_MPAR_bank_addr_cnt < 3 ? VC3_MPAR_tRP : VC3_MPAR_tRPA) | 204 | #define VC3_MPAR_RP (VC3_MPAR_bank_addr_cnt < 3 ? VC3_MPAR_tRP : VC3_MPAR_tRPA) |
205 | #define VC3_MPAR_FAW (VC3_MPAR_bank_addr_cnt < 3 ? 1 : VC3_MPAR_tFAW) | 205 | #define VC3_MPAR_FAW (VC3_MPAR_bank_addr_cnt < 3 ? 1 : VC3_MPAR_tFAW) |
206 | #define VC3_MPAR_BL (VC3_MPAR_BURST_LENGTH == 4 ? 2 : 4) | 206 | #define VC3_MPAR_BL (VC3_MPAR_BURST_LENGTH == 4 ? 2 : 4) |
207 | #define MSCC_MEMPARM_MR0 \ | 207 | #define MSCC_MEMPARM_MR0 \ |
208 | (VC3_MPAR_BURST_LENGTH == 8 ? 3 : 2) | (VC3_MPAR_CL << 4) | \ | 208 | (VC3_MPAR_BURST_LENGTH == 8 ? 3 : 2) | (VC3_MPAR_CL << 4) | \ |
209 | ((VC3_MPAR_tWR - 1) << 9) | 209 | ((VC3_MPAR_tWR - 1) << 9) |
210 | /* DLL-on, Full-OD, AL=0, RTT=off, nDQS-on, RDQS-off, out-en */ | 210 | /* DLL-on, Full-OD, AL=0, RTT=off, nDQS-on, RDQS-off, out-en */ |
211 | #define MSCC_MEMPARM_MR1 0x382 | 211 | #define MSCC_MEMPARM_MR1 0x382 |
212 | #define MSCC_MEMPARM_MR2 0 | 212 | #define MSCC_MEMPARM_MR2 0 |
213 | #define MSCC_MEMPARM_MR3 0 | 213 | #define MSCC_MEMPARM_MR3 0 |
214 | #else | 214 | #else |
215 | #define VC3_MPAR_WL VC3_MPAR_CWL | 215 | #define VC3_MPAR_WL VC3_MPAR_CWL |
216 | #define VC3_MPAR_MD VC3_MPAR_tMOD | 216 | #define VC3_MPAR_MD VC3_MPAR_tMOD |
217 | #define VC3_MPAR_ID VC3_MPAR_tXPR | 217 | #define VC3_MPAR_ID VC3_MPAR_tXPR |
218 | #define VC3_MPAR_SD VC3_MPAR_tDLLK | 218 | #define VC3_MPAR_SD VC3_MPAR_tDLLK |
219 | #define VC3_MPAR_OW 2 | 219 | #define VC3_MPAR_OW 2 |
220 | #define VC3_MPAR_OR 2 | 220 | #define VC3_MPAR_OR 2 |
221 | #define VC3_MPAR_RP VC3_MPAR_tRP | 221 | #define VC3_MPAR_RP VC3_MPAR_tRP |
222 | #define VC3_MPAR_FAW VC3_MPAR_tFAW | 222 | #define VC3_MPAR_FAW VC3_MPAR_tFAW |
223 | #define VC3_MPAR_BL 4 | 223 | #define VC3_MPAR_BL 4 |
224 | #define MSCC_MEMPARM_MR0 ((VC3_MPAR_RL - 4) << 4) | ((VC3_MPAR_tWR - 4) << 9) | 224 | #define MSCC_MEMPARM_MR0 ((VC3_MPAR_RL - 4) << 4) | ((VC3_MPAR_tWR - 4) << 9) |
225 | /* ODT_RTT: “0x0040” for 120ohm, and “0x0004” for 60ohm. */ | 225 | /* ODT_RTT: “0x0040” for 120ohm, and “0x0004” for 60ohm. */ |
226 | #define MSCC_MEMPARM_MR1 0x0040 | 226 | #define MSCC_MEMPARM_MR1 0x0040 |
227 | #define MSCC_MEMPARM_MR2 ((VC3_MPAR_WL - 5) << 3) | 227 | #define MSCC_MEMPARM_MR2 ((VC3_MPAR_WL - 5) << 3) |
228 | #define MSCC_MEMPARM_MR3 0 | 228 | #define MSCC_MEMPARM_MR3 0 |
229 | #endif /* MIPS_VCOREIII_MEMORY_DDR3 */ | 229 | #endif /* MIPS_VCOREIII_MEMORY_DDR3 */ |
230 | 230 | ||
231 | #define MSCC_MEMPARM_MEMCFG \ | 231 | #define MSCC_MEMPARM_MEMCFG \ |
232 | ((MIPS_VCOREIII_DDR_SIZE > SZ_512M) ? \ | 232 | ((MIPS_VCOREIII_DDR_SIZE > SZ_512M) ? \ |
233 | ICPU_MEMCTRL_CFG_DDR_512MBYTE_PLUS : 0) | \ | 233 | ICPU_MEMCTRL_CFG_DDR_512MBYTE_PLUS : 0) | \ |
234 | (VC3_MPAR_16BIT ? ICPU_MEMCTRL_CFG_DDR_WIDTH : 0) | \ | 234 | (VC3_MPAR_16BIT ? ICPU_MEMCTRL_CFG_DDR_WIDTH : 0) | \ |
235 | (VC3_MPAR_DDR3_MODE ? ICPU_MEMCTRL_CFG_DDR_MODE : 0) | \ | 235 | (VC3_MPAR_DDR3_MODE ? ICPU_MEMCTRL_CFG_DDR_MODE : 0) | \ |
236 | (VC3_MPAR_BURST_SIZE ? ICPU_MEMCTRL_CFG_BURST_SIZE : 0) | \ | 236 | (VC3_MPAR_BURST_SIZE ? ICPU_MEMCTRL_CFG_BURST_SIZE : 0) | \ |
237 | (VC3_MPAR_BURST_LENGTH == 8 ? ICPU_MEMCTRL_CFG_BURST_LEN : 0) | \ | 237 | (VC3_MPAR_BURST_LENGTH == 8 ? ICPU_MEMCTRL_CFG_BURST_LEN : 0) | \ |
238 | (VC3_MPAR_bank_addr_cnt == 3 ? ICPU_MEMCTRL_CFG_BANK_CNT : 0) | \ | 238 | (VC3_MPAR_bank_addr_cnt == 3 ? ICPU_MEMCTRL_CFG_BANK_CNT : 0) | \ |
239 | ICPU_MEMCTRL_CFG_MSB_ROW_ADDR(VC3_MPAR_row_addr_cnt - 1) | \ | 239 | ICPU_MEMCTRL_CFG_MSB_ROW_ADDR(VC3_MPAR_row_addr_cnt - 1) | \ |
240 | ICPU_MEMCTRL_CFG_MSB_COL_ADDR(VC3_MPAR_col_addr_cnt - 1) | 240 | ICPU_MEMCTRL_CFG_MSB_COL_ADDR(VC3_MPAR_col_addr_cnt - 1) |
241 | 241 | ||
242 | #ifdef CONFIG_SOC_OCELOT | 242 | #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) |
243 | #define MSCC_MEMPARM_PERIOD \ | 243 | #define MSCC_MEMPARM_PERIOD \ |
244 | ICPU_MEMCTRL_REF_PERIOD_MAX_PEND_REF(8) | \ | 244 | ICPU_MEMCTRL_REF_PERIOD_MAX_PEND_REF(8) | \ |
245 | ICPU_MEMCTRL_REF_PERIOD_REF_PERIOD(VC3_MPAR_tREFI) | 245 | ICPU_MEMCTRL_REF_PERIOD_REF_PERIOD(VC3_MPAR_tREFI) |
246 | 246 | ||
247 | #define MSCC_MEMPARM_TIMING0 \ | 247 | #define MSCC_MEMPARM_TIMING0 \ |
248 | ICPU_MEMCTRL_TIMING0_RD_TO_WR_DLY(VC3_MPAR_RL + VC3_MPAR_BL + 1 - \ | 248 | ICPU_MEMCTRL_TIMING0_RD_TO_WR_DLY(VC3_MPAR_RL + VC3_MPAR_BL + 1 - \ |
249 | VC3_MPAR_WL) | \ | 249 | VC3_MPAR_WL) | \ |
250 | ICPU_MEMCTRL_TIMING0_WR_CS_CHANGE_DLY(VC3_MPAR_BL - 1) | \ | 250 | ICPU_MEMCTRL_TIMING0_WR_CS_CHANGE_DLY(VC3_MPAR_BL - 1) | \ |
251 | ICPU_MEMCTRL_TIMING0_RD_CS_CHANGE_DLY(VC3_MPAR_BL) | \ | 251 | ICPU_MEMCTRL_TIMING0_RD_CS_CHANGE_DLY(VC3_MPAR_BL) | \ |
252 | ICPU_MEMCTRL_TIMING0_RAS_TO_PRECH_DLY(VC3_MPAR_tRAS_min - 1) | \ | 252 | ICPU_MEMCTRL_TIMING0_RAS_TO_PRECH_DLY(VC3_MPAR_tRAS_min - 1) | \ |
253 | ICPU_MEMCTRL_TIMING0_WR_TO_PRECH_DLY(VC3_MPAR_WL + \ | 253 | ICPU_MEMCTRL_TIMING0_WR_TO_PRECH_DLY(VC3_MPAR_WL + \ |
254 | VC3_MPAR_BL + \ | 254 | VC3_MPAR_BL + \ |
255 | VC3_MPAR_tWR - 1) | \ | 255 | VC3_MPAR_tWR - 1) | \ |
256 | ICPU_MEMCTRL_TIMING0_RD_TO_PRECH_DLY(VC3_MPAR_BL - 1) | \ | 256 | ICPU_MEMCTRL_TIMING0_RD_TO_PRECH_DLY(VC3_MPAR_BL - 1) | \ |
257 | ICPU_MEMCTRL_TIMING0_WR_DATA_XFR_DLY(VC3_MPAR_WL - 1) | \ | 257 | ICPU_MEMCTRL_TIMING0_WR_DATA_XFR_DLY(VC3_MPAR_WL - 1) | \ |
258 | ICPU_MEMCTRL_TIMING0_RD_DATA_XFR_DLY(VC3_MPAR_RL - 3) | 258 | ICPU_MEMCTRL_TIMING0_RD_DATA_XFR_DLY(VC3_MPAR_RL - 3) |
259 | 259 | ||
260 | #define MSCC_MEMPARM_TIMING1 \ | 260 | #define MSCC_MEMPARM_TIMING1 \ |
261 | ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_SAME_BANK_DLY(VC3_MPAR_tRC - 1) | \ | 261 | ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_SAME_BANK_DLY(VC3_MPAR_tRC - 1) | \ |
262 | ICPU_MEMCTRL_TIMING1_BANK8_FAW_DLY(VC3_MPAR_FAW - 1) | \ | 262 | ICPU_MEMCTRL_TIMING1_BANK8_FAW_DLY(VC3_MPAR_FAW - 1) | \ |
263 | ICPU_MEMCTRL_TIMING1_PRECH_TO_RAS_DLY(VC3_MPAR_RP - 1) | \ | 263 | ICPU_MEMCTRL_TIMING1_PRECH_TO_RAS_DLY(VC3_MPAR_RP - 1) | \ |
264 | ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_DLY(VC3_MPAR_tRRD - 1) | \ | 264 | ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_DLY(VC3_MPAR_tRRD - 1) | \ |
265 | ICPU_MEMCTRL_TIMING1_RAS_TO_CAS_DLY(VC3_MPAR_tRCD - 1) | \ | 265 | ICPU_MEMCTRL_TIMING1_RAS_TO_CAS_DLY(VC3_MPAR_tRCD - 1) | \ |
266 | ICPU_MEMCTRL_TIMING1_WR_TO_RD_DLY(VC3_MPAR_WL + \ | 266 | ICPU_MEMCTRL_TIMING1_WR_TO_RD_DLY(VC3_MPAR_WL + \ |
267 | VC3_MPAR_BL + \ | 267 | VC3_MPAR_BL + \ |
268 | VC3_MPAR_tWTR - 1) | 268 | VC3_MPAR_tWTR - 1) |
269 | 269 | ||
270 | #define MSCC_MEMPARM_TIMING2 \ | 270 | #define MSCC_MEMPARM_TIMING2 \ |
271 | ICPU_MEMCTRL_TIMING2_PRECH_ALL_DLY(VC3_MPAR_RP - 1) | \ | 271 | ICPU_MEMCTRL_TIMING2_PRECH_ALL_DLY(VC3_MPAR_RP - 1) | \ |
272 | ICPU_MEMCTRL_TIMING2_MDSET_DLY(VC3_MPAR_MD - 1) | \ | 272 | ICPU_MEMCTRL_TIMING2_MDSET_DLY(VC3_MPAR_MD - 1) | \ |
273 | ICPU_MEMCTRL_TIMING2_REF_DLY(VC3_MPAR_tRFC - 1) | \ | 273 | ICPU_MEMCTRL_TIMING2_REF_DLY(VC3_MPAR_tRFC - 1) | \ |
274 | ICPU_MEMCTRL_TIMING2_INIT_DLY(VC3_MPAR_ID - 1) | 274 | ICPU_MEMCTRL_TIMING2_INIT_DLY(VC3_MPAR_ID - 1) |
275 | 275 | ||
276 | #define MSCC_MEMPARM_TIMING3 \ | 276 | #define MSCC_MEMPARM_TIMING3 \ |
277 | ICPU_MEMCTRL_TIMING3_WR_TO_RD_CS_CHANGE_DLY(VC3_MPAR_WL + \ | 277 | ICPU_MEMCTRL_TIMING3_WR_TO_RD_CS_CHANGE_DLY(VC3_MPAR_WL + \ |
278 | VC3_MPAR_tWTR - 1) |\ | 278 | VC3_MPAR_tWTR - 1) |\ |
279 | ICPU_MEMCTRL_TIMING3_ODT_RD_DLY(VC3_MPAR_OR - 1) | \ | 279 | ICPU_MEMCTRL_TIMING3_ODT_RD_DLY(VC3_MPAR_OR - 1) | \ |
280 | ICPU_MEMCTRL_TIMING3_ODT_WR_DLY(VC3_MPAR_OW - 1) | \ | 280 | ICPU_MEMCTRL_TIMING3_ODT_WR_DLY(VC3_MPAR_OW - 1) | \ |
281 | ICPU_MEMCTRL_TIMING3_LOCAL_ODT_RD_DLY(VC3_MPAR_RL - 3) | 281 | ICPU_MEMCTRL_TIMING3_LOCAL_ODT_RD_DLY(VC3_MPAR_RL - 3) |
282 | 282 | ||
283 | #else | 283 | #else |
284 | #define MSCC_MEMPARM_PERIOD \ | 284 | #define MSCC_MEMPARM_PERIOD \ |
285 | ICPU_MEMCTRL_REF_PERIOD_MAX_PEND_REF(1) | \ | 285 | ICPU_MEMCTRL_REF_PERIOD_MAX_PEND_REF(1) | \ |
286 | ICPU_MEMCTRL_REF_PERIOD_REF_PERIOD(VC3_MPAR_tREFI) | 286 | ICPU_MEMCTRL_REF_PERIOD_REF_PERIOD(VC3_MPAR_tREFI) |
287 | 287 | ||
288 | #define MSCC_MEMPARM_TIMING0 \ | 288 | #define MSCC_MEMPARM_TIMING0 \ |
289 | ICPU_MEMCTRL_TIMING0_RAS_TO_PRECH_DLY(VC3_MPAR_tRAS_min - 1) | \ | 289 | ICPU_MEMCTRL_TIMING0_RAS_TO_PRECH_DLY(VC3_MPAR_tRAS_min - 1) | \ |
290 | ICPU_MEMCTRL_TIMING0_WR_TO_PRECH_DLY(VC3_MPAR_CL + \ | 290 | ICPU_MEMCTRL_TIMING0_WR_TO_PRECH_DLY(VC3_MPAR_CL + \ |
291 | (VC3_MPAR_BURST_LENGTH == 8 ? 2 : 0) + \ | 291 | (VC3_MPAR_BURST_LENGTH == 8 ? 2 : 0) + \ |
292 | VC3_MPAR_tWR) | \ | 292 | VC3_MPAR_tWR) | \ |
293 | ICPU_MEMCTRL_TIMING0_RD_TO_PRECH_DLY(VC3_MPAR_BURST_LENGTH == 8 ? 3 : 1) | \ | 293 | ICPU_MEMCTRL_TIMING0_RD_TO_PRECH_DLY(VC3_MPAR_BURST_LENGTH == 8 ? 3 : 1) | \ |
294 | ICPU_MEMCTRL_TIMING0_WR_DATA_XFR_DLY(VC3_MPAR_CL - 3) | \ | 294 | ICPU_MEMCTRL_TIMING0_WR_DATA_XFR_DLY(VC3_MPAR_CL - 3) | \ |
295 | ICPU_MEMCTRL_TIMING0_RD_DATA_XFR_DLY(VC3_MPAR_CL - 3) | 295 | ICPU_MEMCTRL_TIMING0_RD_DATA_XFR_DLY(VC3_MPAR_CL - 3) |
296 | 296 | ||
297 | #define MSCC_MEMPARM_TIMING1 \ | 297 | #define MSCC_MEMPARM_TIMING1 \ |
298 | ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_SAME_BANK_DLY(VC3_MPAR_tRC - 1) | \ | 298 | ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_SAME_BANK_DLY(VC3_MPAR_tRC - 1) | \ |
299 | ICPU_MEMCTRL_TIMING1_BANK8_FAW_DLY(VC3_MPAR_tFAW - 1) | \ | 299 | ICPU_MEMCTRL_TIMING1_BANK8_FAW_DLY(VC3_MPAR_tFAW - 1) | \ |
300 | ICPU_MEMCTRL_TIMING1_PRECH_TO_RAS_DLY(VC3_MPAR_tRP - 1) | \ | 300 | ICPU_MEMCTRL_TIMING1_PRECH_TO_RAS_DLY(VC3_MPAR_tRP - 1) | \ |
301 | ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_DLY(VC3_MPAR_tRRD - 1) | \ | 301 | ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_DLY(VC3_MPAR_tRRD - 1) | \ |
302 | ICPU_MEMCTRL_TIMING1_RAS_TO_CAS_DLY(VC3_MPAR_tRCD - 1) | \ | 302 | ICPU_MEMCTRL_TIMING1_RAS_TO_CAS_DLY(VC3_MPAR_tRCD - 1) | \ |
303 | ICPU_MEMCTRL_TIMING1_WR_TO_RD_DLY(VC3_MPAR_CL + \ | 303 | ICPU_MEMCTRL_TIMING1_WR_TO_RD_DLY(VC3_MPAR_CL + \ |
304 | (VC3_MPAR_BURST_LENGTH == 8 ? 2 : 0) + \ | 304 | (VC3_MPAR_BURST_LENGTH == 8 ? 2 : 0) + \ |
305 | VC3_MPAR_tWTR) | 305 | VC3_MPAR_tWTR) |
306 | #define MSCC_MEMPARM_TIMING2 \ | 306 | #define MSCC_MEMPARM_TIMING2 \ |
307 | ICPU_MEMCTRL_TIMING2_PRECH_ALL_DLY(VC3_MPAR_tRPA - 1) | \ | 307 | ICPU_MEMCTRL_TIMING2_PRECH_ALL_DLY(VC3_MPAR_tRPA - 1) | \ |
308 | ICPU_MEMCTRL_TIMING2_MDSET_DLY(VC3_MPAR_tMRD - 1) | \ | 308 | ICPU_MEMCTRL_TIMING2_MDSET_DLY(VC3_MPAR_tMRD - 1) | \ |
309 | ICPU_MEMCTRL_TIMING2_REF_DLY(VC3_MPAR_tRFC - 1) | \ | 309 | ICPU_MEMCTRL_TIMING2_REF_DLY(VC3_MPAR_tRFC - 1) | \ |
310 | ICPU_MEMCTRL_TIMING2_FOUR_HUNDRED_NS_DLY(VC3_MPAR__400_ns_dly) | 310 | ICPU_MEMCTRL_TIMING2_FOUR_HUNDRED_NS_DLY(VC3_MPAR__400_ns_dly) |
311 | 311 | ||
312 | #define MSCC_MEMPARM_TIMING3 \ | 312 | #define MSCC_MEMPARM_TIMING3 \ |
313 | ICPU_MEMCTRL_TIMING3_WR_TO_RD_CS_CHANGE_DLY(VC3_MPAR_CL - 1) | \ | 313 | ICPU_MEMCTRL_TIMING3_WR_TO_RD_CS_CHANGE_DLY(VC3_MPAR_CL - 1) | \ |
314 | ICPU_MEMCTRL_TIMING3_ODT_WR_DLY(VC3_MPAR_CL - 1) | \ | 314 | ICPU_MEMCTRL_TIMING3_ODT_WR_DLY(VC3_MPAR_CL - 1) | \ |
315 | ICPU_MEMCTRL_TIMING3_LOCAL_ODT_RD_DLY(VC3_MPAR_CL - 1) | 315 | ICPU_MEMCTRL_TIMING3_LOCAL_ODT_RD_DLY(VC3_MPAR_CL - 1) |
316 | 316 | ||
317 | #endif | 317 | #endif |
318 | 318 | ||
319 | enum { | 319 | enum { |
320 | DDR_TRAIN_OK, | 320 | DDR_TRAIN_OK, |
321 | DDR_TRAIN_CONTINUE, | 321 | DDR_TRAIN_CONTINUE, |
322 | DDR_TRAIN_ERROR, | 322 | DDR_TRAIN_ERROR, |
323 | }; | 323 | }; |
324 | 324 | ||
325 | /* | 325 | /* |
326 | * We actually have very few 'pause' possibilities apart from | 326 | * We actually have very few 'pause' possibilities apart from |
327 | * these assembly nops (at this very early stage). | 327 | * these assembly nops (at this very early stage). |
328 | */ | 328 | */ |
329 | #define PAUSE() asm volatile("nop; nop; nop; nop; nop; nop; nop; nop") | 329 | #define PAUSE() asm volatile("nop; nop; nop; nop; nop; nop; nop; nop") |
330 | 330 | ||
331 | /* NB: Assumes inlining as no stack is available! */ | 331 | /* NB: Assumes inlining as no stack is available! */ |
332 | static inline void set_dly(u32 bytelane, u32 dly) | 332 | static inline void set_dly(u32 bytelane, u32 dly) |
333 | { | 333 | { |
334 | register u32 r = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); | 334 | register u32 r = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); |
335 | 335 | ||
336 | r &= ~ICPU_MEMCTRL_DQS_DLY_DQS_DLY_M; | 336 | r &= ~ICPU_MEMCTRL_DQS_DLY_DQS_DLY_M; |
337 | r |= ICPU_MEMCTRL_DQS_DLY_DQS_DLY(dly); | 337 | r |= ICPU_MEMCTRL_DQS_DLY_DQS_DLY(dly); |
338 | writel(r, BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); | 338 | writel(r, BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); |
339 | } | 339 | } |
340 | 340 | ||
341 | static inline bool incr_dly(u32 bytelane) | 341 | static inline bool incr_dly(u32 bytelane) |
342 | { | 342 | { |
343 | register u32 r = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); | 343 | register u32 r = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); |
344 | 344 | ||
345 | if (ICPU_MEMCTRL_DQS_DLY_DQS_DLY(r) < 31) { | 345 | if (ICPU_MEMCTRL_DQS_DLY_DQS_DLY(r) < 31) { |
346 | writel(r + 1, BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); | 346 | writel(r + 1, BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); |
347 | return true; | 347 | return true; |
348 | } | 348 | } |
349 | 349 | ||
350 | return false; | 350 | return false; |
351 | } | 351 | } |
352 | 352 | ||
353 | static inline bool adjust_dly(int adjust) | 353 | static inline bool adjust_dly(int adjust) |
354 | { | 354 | { |
355 | register u32 r = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(0)); | 355 | register u32 r = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(0)); |
356 | 356 | ||
357 | if (ICPU_MEMCTRL_DQS_DLY_DQS_DLY(r) < 31) { | 357 | if (ICPU_MEMCTRL_DQS_DLY_DQS_DLY(r) < 31) { |
358 | writel(r + adjust, BASE_CFG + ICPU_MEMCTRL_DQS_DLY(0)); | 358 | writel(r + adjust, BASE_CFG + ICPU_MEMCTRL_DQS_DLY(0)); |
359 | return true; | 359 | return true; |
360 | } | 360 | } |
361 | 361 | ||
362 | return false; | 362 | return false; |
363 | } | 363 | } |
364 | 364 | ||
365 | /* NB: Assumes inlining as no stack is available! */ | 365 | /* NB: Assumes inlining as no stack is available! */ |
366 | static inline void center_dly(u32 bytelane, u32 start) | 366 | static inline void center_dly(u32 bytelane, u32 start) |
367 | { | 367 | { |
368 | register u32 r = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)) - start; | 368 | register u32 r = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)) - start; |
369 | 369 | ||
370 | writel(start + (r >> 1), BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); | 370 | writel(start + (r >> 1), BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); |
371 | } | 371 | } |
372 | 372 | ||
373 | static inline void memphy_soft_reset(void) | 373 | static inline void memphy_soft_reset(void) |
374 | { | 374 | { |
375 | setbits_le32(BASE_CFG + ICPU_MEMPHY_CFG, ICPU_MEMPHY_CFG_PHY_FIFO_RST); | 375 | setbits_le32(BASE_CFG + ICPU_MEMPHY_CFG, ICPU_MEMPHY_CFG_PHY_FIFO_RST); |
376 | PAUSE(); | 376 | PAUSE(); |
377 | clrbits_le32(BASE_CFG + ICPU_MEMPHY_CFG, ICPU_MEMPHY_CFG_PHY_FIFO_RST); | 377 | clrbits_le32(BASE_CFG + ICPU_MEMPHY_CFG, ICPU_MEMPHY_CFG_PHY_FIFO_RST); |
378 | PAUSE(); | 378 | PAUSE(); |
379 | } | 379 | } |
380 | 380 | ||
381 | #ifdef CONFIG_SOC_OCELOT | 381 | #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) |
382 | static u8 training_data[] = { 0xfe, 0x11, 0x33, 0x55, 0x77, 0x99, 0xbb, 0xdd }; | 382 | static u8 training_data[] = { 0xfe, 0x11, 0x33, 0x55, 0x77, 0x99, 0xbb, 0xdd }; |
383 | 383 | ||
384 | static inline void sleep_100ns(u32 val) | 384 | static inline void sleep_100ns(u32 val) |
385 | { | 385 | { |
386 | /* Set the timer tick generator to 100 ns */ | 386 | /* Set the timer tick generator to 100 ns */ |
387 | writel(VCOREIII_TIMER_DIVIDER - 1, BASE_CFG + ICPU_TIMER_TICK_DIV); | 387 | writel(VCOREIII_TIMER_DIVIDER - 1, BASE_CFG + ICPU_TIMER_TICK_DIV); |
388 | 388 | ||
389 | /* Set the timer value */ | 389 | /* Set the timer value */ |
390 | writel(val, BASE_CFG + ICPU_TIMER_VALUE(0)); | 390 | writel(val, BASE_CFG + ICPU_TIMER_VALUE(0)); |
391 | 391 | ||
392 | /* Enable timer 0 for one-shot */ | 392 | /* Enable timer 0 for one-shot */ |
393 | writel(ICPU_TIMER_CTRL_ONE_SHOT_ENA | ICPU_TIMER_CTRL_TIMER_ENA, | 393 | writel(ICPU_TIMER_CTRL_ONE_SHOT_ENA | ICPU_TIMER_CTRL_TIMER_ENA, |
394 | BASE_CFG + ICPU_TIMER_CTRL(0)); | 394 | BASE_CFG + ICPU_TIMER_CTRL(0)); |
395 | 395 | ||
396 | /* Wait for timer 0 to reach 0 */ | 396 | /* Wait for timer 0 to reach 0 */ |
397 | while (readl(BASE_CFG + ICPU_TIMER_VALUE(0)) != 0) | 397 | while (readl(BASE_CFG + ICPU_TIMER_VALUE(0)) != 0) |
398 | ; | 398 | ; |
399 | } | 399 | } |
400 | 400 | ||
401 | #if defined(CONFIG_SOC_OCELOT) | ||
401 | static inline void hal_vcoreiii_ddr_reset_assert(void) | 402 | static inline void hal_vcoreiii_ddr_reset_assert(void) |
402 | { | 403 | { |
403 | /* DDR has reset pin on GPIO 19 toggle Low-High to release */ | 404 | /* DDR has reset pin on GPIO 19 toggle Low-High to release */ |
404 | setbits_le32(BASE_DEVCPU_GCB + PERF_GPIO_OE, BIT(19)); | 405 | setbits_le32(BASE_DEVCPU_GCB + PERF_GPIO_OE, BIT(19)); |
405 | writel(BIT(19), BASE_DEVCPU_GCB + PERF_GPIO_OUT_CLR); | 406 | writel(BIT(19), BASE_DEVCPU_GCB + PERF_GPIO_OUT_CLR); |
406 | sleep_100ns(10000); | 407 | sleep_100ns(10000); |
407 | } | 408 | } |
408 | 409 | ||
409 | static inline void hal_vcoreiii_ddr_reset_release(void) | 410 | static inline void hal_vcoreiii_ddr_reset_release(void) |
410 | { | 411 | { |
411 | /* DDR has reset pin on GPIO 19 toggle Low-High to release */ | 412 | /* DDR has reset pin on GPIO 19 toggle Low-High to release */ |
412 | setbits_le32(BASE_DEVCPU_GCB + PERF_GPIO_OE, BIT(19)); | 413 | setbits_le32(BASE_DEVCPU_GCB + PERF_GPIO_OE, BIT(19)); |
413 | writel(BIT(19), BASE_DEVCPU_GCB + PERF_GPIO_OUT_SET); | 414 | writel(BIT(19), BASE_DEVCPU_GCB + PERF_GPIO_OUT_SET); |
414 | sleep_100ns(10000); | 415 | sleep_100ns(10000); |
415 | } | 416 | } |
416 | 417 | ||
417 | /* | 418 | /* |
418 | * DDR memory sanity checking failed, tally and do hard reset | 419 | * DDR memory sanity checking failed, tally and do hard reset |
419 | * | 420 | * |
420 | * NB: Assumes inlining as no stack is available! | 421 | * NB: Assumes inlining as no stack is available! |
421 | */ | 422 | */ |
422 | static inline void hal_vcoreiii_ddr_failed(void) | 423 | static inline void hal_vcoreiii_ddr_failed(void) |
423 | { | 424 | { |
424 | register u32 reset; | 425 | register u32 reset; |
425 | 426 | ||
426 | writel(readl(BASE_CFG + ICPU_GPR(6)) + 1, BASE_CFG + ICPU_GPR(6)); | 427 | writel(readl(BASE_CFG + ICPU_GPR(6)) + 1, BASE_CFG + ICPU_GPR(6)); |
427 | 428 | ||
428 | clrbits_le32(BASE_DEVCPU_GCB + PERF_GPIO_OE, BIT(19)); | 429 | clrbits_le32(BASE_DEVCPU_GCB + PERF_GPIO_OE, BIT(19)); |
429 | 430 | ||
430 | /* We have to execute the reset function from cache. Indeed, | 431 | /* We have to execute the reset function from cache. Indeed, |
431 | * the reboot workaround in _machine_restart() will change the | 432 | * the reboot workaround in _machine_restart() will change the |
432 | * SPI NOR into SW bitbang. | 433 | * SPI NOR into SW bitbang. |
433 | * | 434 | * |
434 | * This will render the CPU unable to execute directly from | 435 | * This will render the CPU unable to execute directly from |
435 | * the NOR, which is why the reset instructions are prefetched | 436 | * the NOR, which is why the reset instructions are prefetched |
436 | * into the I-cache. | 437 | * into the I-cache. |
437 | * | 438 | * |
438 | * When failing the DDR initialization we are executing from | 439 | * When failing the DDR initialization we are executing from |
439 | * NOR. | 440 | * NOR. |
440 | * | 441 | * |
441 | * The last instruction in _machine_restart() will reset the | 442 | * The last instruction in _machine_restart() will reset the |
442 | * MIPS CPU (and the cache), and the CPU will start executing | 443 | * MIPS CPU (and the cache), and the CPU will start executing |
443 | * from the reset vector. | 444 | * from the reset vector. |
444 | */ | 445 | */ |
445 | reset = KSEG0ADDR(_machine_restart); | 446 | reset = KSEG0ADDR(_machine_restart); |
446 | icache_lock((void *)reset, 128); | 447 | icache_lock((void *)reset, 128); |
447 | asm volatile ("jr %0"::"r" (reset)); | 448 | asm volatile ("jr %0"::"r" (reset)); |
448 | 449 | ||
449 | panic("DDR init failed\n"); | 450 | panic("DDR init failed\n"); |
450 | } | 451 | } |
452 | #else /* JR2 */ | ||
453 | static inline void hal_vcoreiii_ddr_reset_assert(void) | ||
454 | { | ||
455 | /* Ensure the memory controller physical iface is forced reset */ | ||
456 | writel(readl(BASE_CFG + ICPU_MEMPHY_CFG) | | ||
457 | ICPU_MEMPHY_CFG_PHY_RST, BASE_CFG + ICPU_MEMPHY_CFG); | ||
451 | 458 | ||
459 | /* Ensure the memory controller is forced reset */ | ||
460 | writel(readl(BASE_CFG + ICPU_RESET) | | ||
461 | ICPU_RESET_MEM_RST_FORCE, BASE_CFG + ICPU_RESET); | ||
462 | } | ||
463 | |||
464 | static inline void hal_vcoreiii_ddr_failed(void) | ||
465 | { | ||
466 | writel(0, BASE_CFG + ICPU_RESET); | ||
467 | writel(PERF_SOFT_RST_SOFT_CHIP_RST, BASE_CFG + PERF_SOFT_RST); | ||
468 | |||
469 | panic("DDR init failed\n"); | ||
470 | } | ||
471 | #endif | ||
472 | |||
452 | /* | 473 | /* |
453 | * DDR memory sanity checking done, possibly enable ECC. | 474 | * DDR memory sanity checking done, possibly enable ECC. |
454 | * | 475 | * |
455 | * NB: Assumes inlining as no stack is available! | 476 | * NB: Assumes inlining as no stack is available! |
456 | */ | 477 | */ |
457 | static inline void hal_vcoreiii_ddr_verified(void) | 478 | static inline void hal_vcoreiii_ddr_verified(void) |
458 | { | 479 | { |
459 | #ifdef MIPS_VCOREIII_MEMORY_ECC | 480 | #ifdef MIPS_VCOREIII_MEMORY_ECC |
460 | /* Finally, enable ECC */ | 481 | /* Finally, enable ECC */ |
461 | register u32 val = readl(BASE_CFG + ICPU_MEMCTRL_CFG); | 482 | register u32 val = readl(BASE_CFG + ICPU_MEMCTRL_CFG); |
462 | 483 | ||
463 | val |= ICPU_MEMCTRL_CFG_DDR_ECC_ERR_ENA; | 484 | val |= ICPU_MEMCTRL_CFG_DDR_ECC_ERR_ENA; |
464 | val &= ~ICPU_MEMCTRL_CFG_BURST_SIZE; | 485 | val &= ~ICPU_MEMCTRL_CFG_BURST_SIZE; |
465 | 486 | ||
466 | writel(val, BASE_CFG + ICPU_MEMCTRL_CFG); | 487 | writel(val, BASE_CFG + ICPU_MEMCTRL_CFG); |
467 | #endif | 488 | #endif |
468 | 489 | ||
469 | /* Reset Status register - sticky bits */ | 490 | /* Reset Status register - sticky bits */ |
470 | writel(readl(BASE_CFG + ICPU_MEMCTRL_STAT), BASE_CFG + ICPU_MEMCTRL_STAT); | 491 | writel(readl(BASE_CFG + ICPU_MEMCTRL_STAT), BASE_CFG + ICPU_MEMCTRL_STAT); |
471 | } | 492 | } |
472 | 493 | ||
473 | /* NB: Assumes inlining as no stack is available! */ | 494 | /* NB: Assumes inlining as no stack is available! */ |
474 | static inline int look_for(u32 bytelane) | 495 | static inline int look_for(u32 bytelane) |
475 | { | 496 | { |
476 | register u32 i; | 497 | register u32 i; |
477 | 498 | ||
478 | /* Reset FIFO in case any previous access failed */ | 499 | /* Reset FIFO in case any previous access failed */ |
479 | for (i = 0; i < sizeof(training_data); i++) { | 500 | for (i = 0; i < sizeof(training_data); i++) { |
480 | register u32 byte; | 501 | register u32 byte; |
481 | 502 | ||
482 | memphy_soft_reset(); | 503 | memphy_soft_reset(); |
483 | /* Reset sticky bits */ | 504 | /* Reset sticky bits */ |
484 | writel(readl(BASE_CFG + ICPU_MEMCTRL_STAT), | 505 | writel(readl(BASE_CFG + ICPU_MEMCTRL_STAT), |
485 | BASE_CFG + ICPU_MEMCTRL_STAT); | 506 | BASE_CFG + ICPU_MEMCTRL_STAT); |
486 | /* Read data */ | 507 | /* Read data */ |
487 | byte = __raw_readb((void __iomem *)MSCC_DDR_TO + bytelane + | 508 | byte = __raw_readb((void __iomem *)MSCC_DDR_TO + bytelane + |
488 | (i * 4)); | 509 | (i * 4)); |
489 | 510 | ||
490 | /* | 511 | /* |
491 | * Prevent the compiler reordering the instruction so | 512 | * Prevent the compiler reordering the instruction so |
492 | * the read of RAM happens after the check of the | 513 | * the read of RAM happens after the check of the |
493 | * errors. | 514 | * errors. |
494 | */ | 515 | */ |
495 | rmb(); | 516 | rmb(); |
496 | if (readl(BASE_CFG + ICPU_MEMCTRL_STAT) & | 517 | if (readl(BASE_CFG + ICPU_MEMCTRL_STAT) & |
497 | (ICPU_MEMCTRL_STAT_RDATA_MASKED | | 518 | (ICPU_MEMCTRL_STAT_RDATA_MASKED | |
498 | ICPU_MEMCTRL_STAT_RDATA_DUMMY)) { | 519 | ICPU_MEMCTRL_STAT_RDATA_DUMMY)) { |
499 | /* Noise on the line */ | 520 | /* Noise on the line */ |
500 | goto read_error; | 521 | goto read_error; |
501 | } | 522 | } |
502 | /* If mismatch, increment DQS - if possible */ | 523 | /* If mismatch, increment DQS - if possible */ |
503 | if (byte != training_data[i]) { | 524 | if (byte != training_data[i]) { |
504 | read_error: | 525 | read_error: |
505 | if (!incr_dly(bytelane)) | 526 | if (!incr_dly(bytelane)) |
506 | return DDR_TRAIN_ERROR; | 527 | return DDR_TRAIN_ERROR; |
507 | return DDR_TRAIN_CONTINUE; | 528 | return DDR_TRAIN_CONTINUE; |
508 | } | 529 | } |
509 | } | 530 | } |
510 | return DDR_TRAIN_OK; | 531 | return DDR_TRAIN_OK; |
511 | } | 532 | } |
512 | 533 | ||
513 | /* NB: Assumes inlining as no stack is available! */ | 534 | /* NB: Assumes inlining as no stack is available! */ |
514 | static inline int look_past(u32 bytelane) | 535 | static inline int look_past(u32 bytelane) |
515 | { | 536 | { |
516 | register u32 i; | 537 | register u32 i; |
517 | 538 | ||
518 | /* Reset FIFO in case any previous access failed */ | 539 | /* Reset FIFO in case any previous access failed */ |
519 | for (i = 0; i < sizeof(training_data); i++) { | 540 | for (i = 0; i < sizeof(training_data); i++) { |
520 | register u32 byte; | 541 | register u32 byte; |
521 | 542 | ||
522 | memphy_soft_reset(); | 543 | memphy_soft_reset(); |
523 | /* Ack sticky bits */ | 544 | /* Ack sticky bits */ |
524 | writel(readl(BASE_CFG + ICPU_MEMCTRL_STAT), | 545 | writel(readl(BASE_CFG + ICPU_MEMCTRL_STAT), |
525 | BASE_CFG + ICPU_MEMCTRL_STAT); | 546 | BASE_CFG + ICPU_MEMCTRL_STAT); |
526 | byte = __raw_readb((void __iomem *)MSCC_DDR_TO + bytelane + | 547 | byte = __raw_readb((void __iomem *)MSCC_DDR_TO + bytelane + |
527 | (i * 4)); | 548 | (i * 4)); |
528 | /* | 549 | /* |
529 | * Prevent the compiler reordering the instruction so | 550 | * Prevent the compiler reordering the instruction so |
530 | * the read of RAM happens after the check of the | 551 | * the read of RAM happens after the check of the |
531 | * errors. | 552 | * errors. |
532 | */ | 553 | */ |
533 | rmb(); | 554 | rmb(); |
534 | if (readl(BASE_CFG + ICPU_MEMCTRL_STAT) & | 555 | if (readl(BASE_CFG + ICPU_MEMCTRL_STAT) & |
535 | (ICPU_MEMCTRL_STAT_RDATA_MASKED | | 556 | (ICPU_MEMCTRL_STAT_RDATA_MASKED | |
536 | ICPU_MEMCTRL_STAT_RDATA_DUMMY)) { | 557 | ICPU_MEMCTRL_STAT_RDATA_DUMMY)) { |
537 | /* Noise on the line */ | 558 | /* Noise on the line */ |
538 | goto read_error; | 559 | goto read_error; |
539 | } | 560 | } |
540 | /* Bail out when we see first mismatch */ | 561 | /* Bail out when we see first mismatch */ |
541 | if (byte != training_data[i]) { | 562 | if (byte != training_data[i]) { |
542 | read_error: | 563 | read_error: |
543 | return DDR_TRAIN_OK; | 564 | return DDR_TRAIN_OK; |
544 | } | 565 | } |
545 | } | 566 | } |
546 | /* All data compares OK, increase DQS and retry */ | 567 | /* All data compares OK, increase DQS and retry */ |
547 | if (!incr_dly(bytelane)) | 568 | if (!incr_dly(bytelane)) |
548 | return DDR_TRAIN_ERROR; | 569 | return DDR_TRAIN_ERROR; |
549 | 570 | ||
550 | return DDR_TRAIN_CONTINUE; | 571 | return DDR_TRAIN_CONTINUE; |
551 | } | 572 | } |
552 | 573 | ||
553 | static inline int hal_vcoreiii_train_bytelane(u32 bytelane) | 574 | static inline int hal_vcoreiii_train_bytelane(u32 bytelane) |
554 | { | 575 | { |
555 | register int res; | 576 | register int res; |
556 | register u32 dqs_s; | 577 | register u32 dqs_s; |
557 | 578 | ||
558 | set_dly(bytelane, 0); /* Start training at DQS=0 */ | 579 | set_dly(bytelane, 0); /* Start training at DQS=0 */ |
559 | while ((res = look_for(bytelane)) == DDR_TRAIN_CONTINUE) | 580 | while ((res = look_for(bytelane)) == DDR_TRAIN_CONTINUE) |
560 | ; | 581 | ; |
561 | if (res != DDR_TRAIN_OK) | 582 | if (res != DDR_TRAIN_OK) |
562 | return res; | 583 | return res; |
563 | 584 | ||
564 | dqs_s = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); | 585 | dqs_s = readl(BASE_CFG + ICPU_MEMCTRL_DQS_DLY(bytelane)); |
565 | while ((res = look_past(bytelane)) == DDR_TRAIN_CONTINUE) | 586 | while ((res = look_past(bytelane)) == DDR_TRAIN_CONTINUE) |
566 | ; | 587 | ; |
567 | if (res != DDR_TRAIN_OK) | 588 | if (res != DDR_TRAIN_OK) |
568 | return res; | 589 | return res; |
569 | /* Reset FIFO - for good measure */ | 590 | /* Reset FIFO - for good measure */ |
570 | memphy_soft_reset(); | 591 | memphy_soft_reset(); |
571 | /* Adjust to center [dqs_s;cur] */ | 592 | /* Adjust to center [dqs_s;cur] */ |
572 | center_dly(bytelane, dqs_s); | 593 | center_dly(bytelane, dqs_s); |
573 | return DDR_TRAIN_OK; | 594 | return DDR_TRAIN_OK; |
574 | } | 595 | } |
575 | 596 | ||
576 | /* This algorithm is converted from the TCL training algorithm used | 597 | /* This algorithm is converted from the TCL training algorithm used |
577 | * during silicon simulation. | 598 | * during silicon simulation. |
578 | * NB: Assumes inlining as no stack is available! | 599 | * NB: Assumes inlining as no stack is available! |
579 | */ | 600 | */ |
580 | static inline int hal_vcoreiii_init_dqs(void) | 601 | static inline int hal_vcoreiii_init_dqs(void) |
581 | { | 602 | { |
582 | #define MAX_DQS 32 | 603 | #define MAX_DQS 32 |
583 | register u32 i, j; | 604 | register u32 i, j; |
584 | 605 | ||
585 | for (i = 0; i < MAX_DQS; i++) { | 606 | for (i = 0; i < MAX_DQS; i++) { |
586 | set_dly(0, i); /* Byte-lane 0 */ | 607 | set_dly(0, i); /* Byte-lane 0 */ |
587 | for (j = 0; j < MAX_DQS; j++) { | 608 | for (j = 0; j < MAX_DQS; j++) { |
588 | __maybe_unused register u32 byte; | 609 | __maybe_unused register u32 byte; |
589 | 610 | ||
590 | set_dly(1, j); /* Byte-lane 1 */ | 611 | set_dly(1, j); /* Byte-lane 1 */ |
591 | /* Reset FIFO in case any previous access failed */ | 612 | /* Reset FIFO in case any previous access failed */ |
592 | memphy_soft_reset(); | 613 | memphy_soft_reset(); |
593 | writel(readl(BASE_CFG + ICPU_MEMCTRL_STAT), | 614 | writel(readl(BASE_CFG + ICPU_MEMCTRL_STAT), |
594 | BASE_CFG + ICPU_MEMCTRL_STAT); | 615 | BASE_CFG + ICPU_MEMCTRL_STAT); |
595 | byte = __raw_readb((void __iomem *)MSCC_DDR_TO); | 616 | byte = __raw_readb((void __iomem *)MSCC_DDR_TO); |
596 | byte = __raw_readb((void __iomem *)(MSCC_DDR_TO + 1)); | 617 | byte = __raw_readb((void __iomem *)(MSCC_DDR_TO + 1)); |
597 | if (!(readl(BASE_CFG + ICPU_MEMCTRL_STAT) & | 618 | if (!(readl(BASE_CFG + ICPU_MEMCTRL_STAT) & |
598 | (ICPU_MEMCTRL_STAT_RDATA_MASKED | | 619 | (ICPU_MEMCTRL_STAT_RDATA_MASKED | |
599 | ICPU_MEMCTRL_STAT_RDATA_DUMMY))) | 620 | ICPU_MEMCTRL_STAT_RDATA_DUMMY))) |
600 | return 0; | 621 | return 0; |
601 | } | 622 | } |
602 | } | 623 | } |
603 | return -1; | 624 | return -1; |
604 | } | 625 | } |
605 | 626 | ||
606 | static inline int dram_check(void) | 627 | static inline int dram_check(void) |
607 | { | 628 | { |
608 | register u32 i; | 629 | register u32 i; |
609 | 630 | ||
610 | for (i = 0; i < 8; i++) { | 631 | for (i = 0; i < 8; i++) { |
611 | __raw_writel(~i, (void __iomem *)(MSCC_DDR_TO + (i * 4))); | 632 | __raw_writel(~i, (void __iomem *)(MSCC_DDR_TO + (i * 4))); |
612 | if (__raw_readl((void __iomem *)(MSCC_DDR_TO + (i * 4))) != ~i) | 633 | if (__raw_readl((void __iomem *)(MSCC_DDR_TO + (i * 4))) != ~i) |
613 | return 1; | 634 | return 1; |
614 | } | 635 | } |
615 | return 0; | 636 | return 0; |
616 | } | 637 | } |
617 | #else /* Luton */ | 638 | #else /* Luton */ |
618 | 639 | ||
619 | static inline void sleep_100ns(u32 val) | 640 | static inline void sleep_100ns(u32 val) |
620 | { | 641 | { |
621 | } | 642 | } |
622 | 643 | ||
623 | static inline void hal_vcoreiii_ddr_reset_assert(void) | 644 | static inline void hal_vcoreiii_ddr_reset_assert(void) |
624 | { | 645 | { |
625 | setbits_le32(BASE_CFG + ICPU_MEMPHY_CFG, ICPU_MEMPHY_CFG_PHY_RST); | 646 | setbits_le32(BASE_CFG + ICPU_MEMPHY_CFG, ICPU_MEMPHY_CFG_PHY_RST); |
626 | setbits_le32(BASE_CFG + ICPU_RESET, ICPU_RESET_MEM_RST_FORCE); | 647 | setbits_le32(BASE_CFG + ICPU_RESET, ICPU_RESET_MEM_RST_FORCE); |
627 | } | 648 | } |
628 | 649 | ||
629 | static inline void hal_vcoreiii_ddr_reset_release(void) | 650 | static inline void hal_vcoreiii_ddr_reset_release(void) |
630 | { | 651 | { |
631 | } | 652 | } |
632 | 653 | ||
633 | static inline void hal_vcoreiii_ddr_failed(void) | 654 | static inline void hal_vcoreiii_ddr_failed(void) |
634 | { | 655 | { |
635 | register u32 memphy_cfg = readl(BASE_CFG + ICPU_MEMPHY_CFG); | 656 | register u32 memphy_cfg = readl(BASE_CFG + ICPU_MEMPHY_CFG); |
636 | 657 | ||
637 | /* Do a fifo reset and start over */ | 658 | /* Do a fifo reset and start over */ |
638 | writel(memphy_cfg | ICPU_MEMPHY_CFG_PHY_FIFO_RST, | 659 | writel(memphy_cfg | ICPU_MEMPHY_CFG_PHY_FIFO_RST, |
639 | BASE_CFG + ICPU_MEMPHY_CFG); | 660 | BASE_CFG + ICPU_MEMPHY_CFG); |
640 | writel(memphy_cfg & ~ICPU_MEMPHY_CFG_PHY_FIFO_RST, | 661 | writel(memphy_cfg & ~ICPU_MEMPHY_CFG_PHY_FIFO_RST, |
641 | BASE_CFG + ICPU_MEMPHY_CFG); | 662 | BASE_CFG + ICPU_MEMPHY_CFG); |
642 | writel(memphy_cfg | ICPU_MEMPHY_CFG_PHY_FIFO_RST, | 663 | writel(memphy_cfg | ICPU_MEMPHY_CFG_PHY_FIFO_RST, |
643 | BASE_CFG + ICPU_MEMPHY_CFG); | 664 | BASE_CFG + ICPU_MEMPHY_CFG); |
644 | } | 665 | } |
645 | 666 | ||
646 | static inline void hal_vcoreiii_ddr_verified(void) | 667 | static inline void hal_vcoreiii_ddr_verified(void) |
647 | { | 668 | { |
648 | } | 669 | } |
649 | 670 | ||
650 | static inline int look_for(u32 data) | 671 | static inline int look_for(u32 data) |
651 | { | 672 | { |
652 | register u32 byte = __raw_readb((void __iomem *)MSCC_DDR_TO); | 673 | register u32 byte = __raw_readb((void __iomem *)MSCC_DDR_TO); |
653 | 674 | ||
654 | if (data != byte) { | 675 | if (data != byte) { |
655 | if (!incr_dly(0)) | 676 | if (!incr_dly(0)) |
656 | return DDR_TRAIN_ERROR; | 677 | return DDR_TRAIN_ERROR; |
657 | return DDR_TRAIN_CONTINUE; | 678 | return DDR_TRAIN_CONTINUE; |
658 | } | 679 | } |
659 | 680 | ||
660 | return DDR_TRAIN_OK; | 681 | return DDR_TRAIN_OK; |
661 | } | 682 | } |
662 | 683 | ||
663 | /* This algorithm is converted from the TCL training algorithm used | 684 | /* This algorithm is converted from the TCL training algorithm used |
664 | * during silicon simulation. | 685 | * during silicon simulation. |
665 | * NB: Assumes inlining as no stack is available! | 686 | * NB: Assumes inlining as no stack is available! |
666 | */ | 687 | */ |
667 | static inline int hal_vcoreiii_train_bytelane(u32 bytelane) | 688 | static inline int hal_vcoreiii_train_bytelane(u32 bytelane) |
668 | { | 689 | { |
669 | register int res; | 690 | register int res; |
670 | 691 | ||
671 | set_dly(bytelane, 0); /* Start training at DQS=0 */ | 692 | set_dly(bytelane, 0); /* Start training at DQS=0 */ |
672 | while ((res = look_for(0xff)) == DDR_TRAIN_CONTINUE) | 693 | while ((res = look_for(0xff)) == DDR_TRAIN_CONTINUE) |
673 | ; | 694 | ; |
674 | if (res != DDR_TRAIN_OK) | 695 | if (res != DDR_TRAIN_OK) |
675 | return res; | 696 | return res; |
676 | 697 | ||
677 | set_dly(bytelane, 0); /* Start training at DQS=0 */ | 698 | set_dly(bytelane, 0); /* Start training at DQS=0 */ |
678 | while ((res = look_for(0x00)) == DDR_TRAIN_CONTINUE) | 699 | while ((res = look_for(0x00)) == DDR_TRAIN_CONTINUE) |
679 | 700 | ||
680 | ; | 701 | ; |
681 | 702 | ||
682 | if (res != DDR_TRAIN_OK) | 703 | if (res != DDR_TRAIN_OK) |
683 | return res; | 704 | return res; |
684 | 705 | ||
685 | adjust_dly(-3); | 706 | adjust_dly(-3); |
686 | 707 | ||
687 | return DDR_TRAIN_OK; | 708 | return DDR_TRAIN_OK; |
688 | } | 709 | } |
689 | 710 | ||
690 | static inline int hal_vcoreiii_init_dqs(void) | 711 | static inline int hal_vcoreiii_init_dqs(void) |
691 | { | 712 | { |
692 | return 0; | 713 | return 0; |
693 | } | 714 | } |
694 | 715 | ||
695 | static inline int dram_check(void) | 716 | static inline int dram_check(void) |
696 | { | 717 | { |
697 | register u32 i; | 718 | register u32 i; |
698 | 719 | ||
699 | for (i = 0; i < 8; i++) { | 720 | for (i = 0; i < 8; i++) { |
700 | __raw_writel(~i, (void __iomem *)(MSCC_DDR_TO + (i * 4))); | 721 | __raw_writel(~i, (void __iomem *)(MSCC_DDR_TO + (i * 4))); |
701 | 722 | ||
702 | if (__raw_readl((void __iomem *)(MSCC_DDR_TO + (i * 4))) != ~i) | 723 | if (__raw_readl((void __iomem *)(MSCC_DDR_TO + (i * 4))) != ~i) |
703 | return 1; | 724 | return 1; |
704 | } | 725 | } |
705 | 726 | ||
706 | return 0; | 727 | return 0; |
707 | } | 728 | } |
708 | #endif | 729 | #endif |
709 | 730 | ||
710 | /* | 731 | /* |
711 | * NB: Called *early* to init memory controller - assumes inlining as | 732 | * NB: Called *early* to init memory controller - assumes inlining as |
712 | * no stack is available! | 733 | * no stack is available! |
713 | */ | 734 | */ |
714 | static inline void hal_vcoreiii_init_memctl(void) | 735 | static inline void hal_vcoreiii_init_memctl(void) |
715 | { | 736 | { |
716 | /* Ensure DDR is in reset */ | 737 | /* Ensure DDR is in reset */ |
717 | hal_vcoreiii_ddr_reset_assert(); | 738 | hal_vcoreiii_ddr_reset_assert(); |
718 | 739 | ||
719 | /* Wait maybe not needed, but ... */ | 740 | /* Wait maybe not needed, but ... */ |
720 | PAUSE(); | 741 | PAUSE(); |
721 | 742 | ||
722 | /* Drop sys ctl memory controller forced reset */ | 743 | /* Drop sys ctl memory controller forced reset */ |
723 | clrbits_le32(BASE_CFG + ICPU_RESET, ICPU_RESET_MEM_RST_FORCE); | 744 | clrbits_le32(BASE_CFG + ICPU_RESET, ICPU_RESET_MEM_RST_FORCE); |
724 | 745 | ||
725 | PAUSE(); | 746 | PAUSE(); |
726 | 747 | ||
727 | /* Drop Reset, enable SSTL */ | 748 | /* Drop Reset, enable SSTL */ |
728 | writel(ICPU_MEMPHY_CFG_PHY_SSTL_ENA, BASE_CFG + ICPU_MEMPHY_CFG); | 749 | writel(ICPU_MEMPHY_CFG_PHY_SSTL_ENA, BASE_CFG + ICPU_MEMPHY_CFG); |
729 | PAUSE(); | 750 | PAUSE(); |
730 | 751 | ||
731 | /* Start the automatic SSTL output and ODT drive-strength calibration */ | 752 | /* Start the automatic SSTL output and ODT drive-strength calibration */ |
732 | writel(ICPU_MEMPHY_ZCAL_ZCAL_PROG_ODT(MIPS_VCOREIII_MEMORY_SSTL_ODT) | | 753 | writel(ICPU_MEMPHY_ZCAL_ZCAL_PROG_ODT(MIPS_VCOREIII_MEMORY_SSTL_ODT) | |
733 | /* drive strength */ | 754 | /* drive strength */ |
734 | ICPU_MEMPHY_ZCAL_ZCAL_PROG(MIPS_VCOREIII_MEMORY_SSTL_DRIVE) | | 755 | ICPU_MEMPHY_ZCAL_ZCAL_PROG(MIPS_VCOREIII_MEMORY_SSTL_DRIVE) | |
735 | /* Start calibration process */ | 756 | /* Start calibration process */ |
736 | ICPU_MEMPHY_ZCAL_ZCAL_ENA, BASE_CFG + ICPU_MEMPHY_ZCAL); | 757 | ICPU_MEMPHY_ZCAL_ZCAL_ENA, BASE_CFG + ICPU_MEMPHY_ZCAL); |
737 | 758 | ||
738 | /* Wait for ZCAL to clear */ | 759 | /* Wait for ZCAL to clear */ |
739 | while (readl(BASE_CFG + ICPU_MEMPHY_ZCAL) & ICPU_MEMPHY_ZCAL_ZCAL_ENA) | 760 | while (readl(BASE_CFG + ICPU_MEMPHY_ZCAL) & ICPU_MEMPHY_ZCAL_ZCAL_ENA) |
740 | ; | 761 | ; |
741 | #ifdef CONFIG_SOC_OCELOT | 762 | #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) |
742 | /* Check no ZCAL_ERR */ | 763 | /* Check no ZCAL_ERR */ |
743 | if (readl(BASE_CFG + ICPU_MEMPHY_ZCAL_STAT) | 764 | if (readl(BASE_CFG + ICPU_MEMPHY_ZCAL_STAT) |
744 | & ICPU_MEMPHY_ZCAL_STAT_ZCAL_ERR) | 765 | & ICPU_MEMPHY_ZCAL_STAT_ZCAL_ERR) |
745 | hal_vcoreiii_ddr_failed(); | 766 | hal_vcoreiii_ddr_failed(); |
746 | #endif | 767 | #endif |
747 | /* Drive CL, CK, ODT */ | 768 | /* Drive CL, CK, ODT */ |
748 | setbits_le32(BASE_CFG + ICPU_MEMPHY_CFG, ICPU_MEMPHY_CFG_PHY_ODT_OE | | 769 | setbits_le32(BASE_CFG + ICPU_MEMPHY_CFG, ICPU_MEMPHY_CFG_PHY_ODT_OE | |
749 | ICPU_MEMPHY_CFG_PHY_CK_OE | ICPU_MEMPHY_CFG_PHY_CL_OE); | 770 | ICPU_MEMPHY_CFG_PHY_CK_OE | ICPU_MEMPHY_CFG_PHY_CL_OE); |
750 | 771 | ||
751 | /* Initialize memory controller */ | 772 | /* Initialize memory controller */ |
752 | writel(MSCC_MEMPARM_MEMCFG, BASE_CFG + ICPU_MEMCTRL_CFG); | 773 | writel(MSCC_MEMPARM_MEMCFG, BASE_CFG + ICPU_MEMCTRL_CFG); |
753 | writel(MSCC_MEMPARM_PERIOD, BASE_CFG + ICPU_MEMCTRL_REF_PERIOD); | 774 | writel(MSCC_MEMPARM_PERIOD, BASE_CFG + ICPU_MEMCTRL_REF_PERIOD); |
754 | 775 | ||
755 | #ifdef CONFIG_SOC_OCELOT | 776 | #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) |
756 | writel(MSCC_MEMPARM_TIMING0, BASE_CFG + ICPU_MEMCTRL_TIMING0); | 777 | writel(MSCC_MEMPARM_TIMING0, BASE_CFG + ICPU_MEMCTRL_TIMING0); |
757 | #else /* Luton */ | 778 | #else /* Luton */ |
758 | clrbits_le32(BASE_CFG + ICPU_MEMCTRL_TIMING0, ((1 << 20) - 1)); | 779 | clrbits_le32(BASE_CFG + ICPU_MEMCTRL_TIMING0, ((1 << 20) - 1)); |
759 | setbits_le32(BASE_CFG + ICPU_MEMCTRL_TIMING0, MSCC_MEMPARM_TIMING0); | 780 | setbits_le32(BASE_CFG + ICPU_MEMCTRL_TIMING0, MSCC_MEMPARM_TIMING0); |
760 | #endif | 781 | #endif |
761 | 782 | ||
762 | writel(MSCC_MEMPARM_TIMING1, BASE_CFG + ICPU_MEMCTRL_TIMING1); | 783 | writel(MSCC_MEMPARM_TIMING1, BASE_CFG + ICPU_MEMCTRL_TIMING1); |
763 | writel(MSCC_MEMPARM_TIMING2, BASE_CFG + ICPU_MEMCTRL_TIMING2); | 784 | writel(MSCC_MEMPARM_TIMING2, BASE_CFG + ICPU_MEMCTRL_TIMING2); |
764 | writel(MSCC_MEMPARM_TIMING3, BASE_CFG + ICPU_MEMCTRL_TIMING3); | 785 | writel(MSCC_MEMPARM_TIMING3, BASE_CFG + ICPU_MEMCTRL_TIMING3); |
765 | writel(MSCC_MEMPARM_MR0, BASE_CFG + ICPU_MEMCTRL_MR0_VAL); | 786 | writel(MSCC_MEMPARM_MR0, BASE_CFG + ICPU_MEMCTRL_MR0_VAL); |
766 | writel(MSCC_MEMPARM_MR1, BASE_CFG + ICPU_MEMCTRL_MR1_VAL); | 787 | writel(MSCC_MEMPARM_MR1, BASE_CFG + ICPU_MEMCTRL_MR1_VAL); |
767 | writel(MSCC_MEMPARM_MR2, BASE_CFG + ICPU_MEMCTRL_MR2_VAL); | 788 | writel(MSCC_MEMPARM_MR2, BASE_CFG + ICPU_MEMCTRL_MR2_VAL); |
768 | writel(MSCC_MEMPARM_MR3, BASE_CFG + ICPU_MEMCTRL_MR3_VAL); | 789 | writel(MSCC_MEMPARM_MR3, BASE_CFG + ICPU_MEMCTRL_MR3_VAL); |
769 | 790 | ||
770 | #ifdef CONFIG_SOC_OCELOT | 791 | #if defined(CONFIG_SOC_OCELOT) |
771 | /* Termination setup - enable ODT */ | 792 | /* Termination setup - enable ODT */ |
772 | writel(ICPU_MEMCTRL_TERMRES_CTRL_LOCAL_ODT_RD_ENA | | 793 | writel(ICPU_MEMCTRL_TERMRES_CTRL_LOCAL_ODT_RD_ENA | |
773 | /* Assert ODT0 for any write */ | 794 | /* Assert ODT0 for any write */ |
774 | ICPU_MEMCTRL_TERMRES_CTRL_ODT_WR_ENA(3), | 795 | ICPU_MEMCTRL_TERMRES_CTRL_ODT_WR_ENA(3), |
775 | BASE_CFG + ICPU_MEMCTRL_TERMRES_CTRL); | 796 | BASE_CFG + ICPU_MEMCTRL_TERMRES_CTRL); |
776 | 797 | ||
777 | /* Release Reset from DDR */ | 798 | /* Release Reset from DDR */ |
778 | hal_vcoreiii_ddr_reset_release(); | 799 | hal_vcoreiii_ddr_reset_release(); |
779 | 800 | ||
780 | writel(readl(BASE_CFG + ICPU_GPR(7)) + 1, BASE_CFG + ICPU_GPR(7)); | 801 | writel(readl(BASE_CFG + ICPU_GPR(7)) + 1, BASE_CFG + ICPU_GPR(7)); |
802 | #elif defined(CONFIG_SOC_JR2) | ||
803 | writel(ICPU_MEMCTRL_TERMRES_CTRL_ODT_WR_ENA(3), | ||
804 | BASE_CFG + ICPU_MEMCTRL_TERMRES_CTRL); | ||
781 | #else /* Luton */ | 805 | #else /* Luton */ |
782 | /* Termination setup - disable ODT */ | 806 | /* Termination setup - disable ODT */ |
783 | writel(0, BASE_CFG + ICPU_MEMCTRL_TERMRES_CTRL); | 807 | writel(0, BASE_CFG + ICPU_MEMCTRL_TERMRES_CTRL); |
784 | 808 | ||
785 | #endif | 809 | #endif |
786 | } | 810 | } |
787 | 811 | ||
788 | static inline void hal_vcoreiii_wait_memctl(void) | 812 | static inline void hal_vcoreiii_wait_memctl(void) |
789 | { | 813 | { |
790 | /* Now, rip it! */ | 814 | /* Now, rip it! */ |
791 | writel(ICPU_MEMCTRL_CTRL_INITIALIZE, BASE_CFG + ICPU_MEMCTRL_CTRL); | 815 | writel(ICPU_MEMCTRL_CTRL_INITIALIZE, BASE_CFG + ICPU_MEMCTRL_CTRL); |
792 | 816 | ||
793 | while (!(readl(BASE_CFG + ICPU_MEMCTRL_STAT) | 817 | while (!(readl(BASE_CFG + ICPU_MEMCTRL_STAT) |
794 | & ICPU_MEMCTRL_STAT_INIT_DONE)) | 818 | & ICPU_MEMCTRL_STAT_INIT_DONE)) |
795 | ; | 819 | ; |
796 | 820 | ||
797 | /* Settle...? */ | 821 | /* Settle...? */ |
798 | sleep_100ns(10000); | 822 | sleep_100ns(10000); |
799 | #ifdef CONFIG_SOC_OCELOT | 823 | #if defined(CONFIG_SOC_OCELOT) || defined(CONFIG_SOC_JR2) |
800 | /* Establish data contents in DDR RAM for training */ | 824 | /* Establish data contents in DDR RAM for training */ |
801 | 825 | ||
802 | __raw_writel(0xcacafefe, ((void __iomem *)MSCC_DDR_TO)); | 826 | __raw_writel(0xcacafefe, ((void __iomem *)MSCC_DDR_TO)); |
803 | __raw_writel(0x22221111, ((void __iomem *)MSCC_DDR_TO + 0x4)); | 827 | __raw_writel(0x22221111, ((void __iomem *)MSCC_DDR_TO + 0x4)); |
804 | __raw_writel(0x44443333, ((void __iomem *)MSCC_DDR_TO + 0x8)); | 828 | __raw_writel(0x44443333, ((void __iomem *)MSCC_DDR_TO + 0x8)); |
805 | __raw_writel(0x66665555, ((void __iomem *)MSCC_DDR_TO + 0xC)); | 829 | __raw_writel(0x66665555, ((void __iomem *)MSCC_DDR_TO + 0xC)); |
806 | __raw_writel(0x88887777, ((void __iomem *)MSCC_DDR_TO + 0x10)); | 830 | __raw_writel(0x88887777, ((void __iomem *)MSCC_DDR_TO + 0x10)); |
807 | __raw_writel(0xaaaa9999, ((void __iomem *)MSCC_DDR_TO + 0x14)); | 831 | __raw_writel(0xaaaa9999, ((void __iomem *)MSCC_DDR_TO + 0x14)); |
808 | __raw_writel(0xccccbbbb, ((void __iomem *)MSCC_DDR_TO + 0x18)); | 832 | __raw_writel(0xccccbbbb, ((void __iomem *)MSCC_DDR_TO + 0x18)); |
809 | __raw_writel(0xeeeedddd, ((void __iomem *)MSCC_DDR_TO + 0x1C)); | 833 | __raw_writel(0xeeeedddd, ((void __iomem *)MSCC_DDR_TO + 0x1C)); |
810 | #else | 834 | #else |
811 | __raw_writel(0xff, ((void __iomem *)MSCC_DDR_TO)); | 835 | __raw_writel(0xff, ((void __iomem *)MSCC_DDR_TO)); |
812 | #endif | 836 | #endif |
813 | } | 837 | } |
814 | #endif /* __ASM_MACH_DDR_H */ | 838 | #endif /* __ASM_MACH_DDR_H */ |
815 | 839 |
arch/mips/mach-mscc/include/mach/jr2/jr2.h
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Microsemi Jaguar2 Switch driver | ||
4 | * | ||
5 | * Copyright (c) 2018 Microsemi Corporation | ||
6 | */ | ||
7 | |||
8 | #ifndef _MSCC_JR2_H_ | ||
9 | #define _MSCC_JR2_H_ | ||
10 | |||
11 | #include <linux/bitops.h> | ||
12 | #include <dm.h> | ||
13 | |||
14 | /* | ||
15 | * Target offset base(s) | ||
16 | */ | ||
17 | #define MSCC_IO_ORIGIN1_OFFSET 0x70000000 | ||
18 | #define MSCC_IO_ORIGIN1_SIZE 0x00200000 | ||
19 | #define MSCC_IO_ORIGIN2_OFFSET 0x71000000 | ||
20 | #define MSCC_IO_ORIGIN2_SIZE 0x01000000 | ||
21 | #define BASE_CFG ((void __iomem *)0x70000000) | ||
22 | #define BASE_DEVCPU_GCB ((void __iomem *)0x71010000) | ||
23 | |||
24 | #endif | ||
25 |
arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb.h
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | #ifndef _MSCC_JR2_DEVCPU_GCB_H_ | ||
7 | #define _MSCC_JR2_DEVCPU_GCB_H_ | ||
8 | |||
9 | #define PERF_GPR 0x4 | ||
10 | |||
11 | #define PERF_SOFT_RST 0x8 | ||
12 | |||
13 | #define PERF_SOFT_RST_SOFT_NON_CFG_RST BIT(2) | ||
14 | #define PERF_SOFT_RST_SOFT_SWC_RST BIT(1) | ||
15 | #define PERF_SOFT_RST_SOFT_CHIP_RST BIT(0) | ||
16 | |||
17 | #define GPIO_GPIO_ALT(x) (0x78 + 4 * (x)) | ||
18 | #define GPIO_GPIO_ALT1(x) (0x80 + 4 * (x)) | ||
19 | |||
20 | #endif | ||
21 |
arch/mips/mach-mscc/include/mach/jr2/jr2_devcpu_gcb_miim_regs.h
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | #ifndef _MSCC_JR2_DEVCPU_GCB_MIIM_REGS_H_ | ||
7 | #define _MSCC_JR2_DEVCPU_GCB_MIIM_REGS_H_ | ||
8 | |||
9 | #define MIIM_MII_STATUS(gi) (0xc8 + (gi * 36)) | ||
10 | #define MIIM_MII_CMD(gi) (0xd0 + (gi * 36)) | ||
11 | #define MIIM_MII_DATA(gi) (0xd4 + (gi * 36)) | ||
12 | |||
13 | #define MSCC_F_MII_STATUS_MIIM_STAT_BUSY(x) ((x) ? BIT(3) : 0) | ||
14 | |||
15 | #define MSCC_F_MII_CMD_MIIM_CMD_VLD(x) ((x) ? BIT(31) : 0) | ||
16 | #define MSCC_F_MII_CMD_MIIM_CMD_PHYAD(x) (GENMASK(29, 25) & ((x) << 25)) | ||
17 | #define MSCC_F_MII_CMD_MIIM_CMD_REGAD(x) (GENMASK(24, 20) & ((x) << 20)) | ||
18 | #define MSCC_F_MII_CMD_MIIM_CMD_WRDATA(x) (GENMASK(19, 4) & ((x) << 4)) | ||
19 | #define MSCC_F_MII_CMD_MIIM_CMD_OPR_FIELD(x) (GENMASK(2, 1) & ((x) << 1)) | ||
20 | #define MSCC_F_MII_CMD_MIIM_CMD_SCAN(x) ((x) ? BIT(0) : 0) | ||
21 | |||
22 | #define MSCC_M_MII_DATA_MIIM_DATA_SUCCESS GENMASK(17, 16) | ||
23 | #define MSCC_X_MII_DATA_MIIM_DATA_RDDATA(x) (((x) >> 0) & GENMASK(15, 0)) | ||
24 | |||
25 | #endif | ||
26 |
arch/mips/mach-mscc/include/mach/jr2/jr2_icpu_cfg.h
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | #ifndef _MSCC_JR2_ICPU_CFG_H_ | ||
7 | #define _MSCC_JR2_ICPU_CFG_H_ | ||
8 | |||
9 | #define ICPU_GPR(x) (0x4 * (x)) | ||
10 | #define ICPU_GPR_RSZ 0x4 | ||
11 | |||
12 | #define ICPU_RESET 0x20 | ||
13 | |||
14 | #define ICPU_RESET_CORE_RST_CPU_ONLY BIT(3) | ||
15 | #define ICPU_RESET_CORE_RST_PROTECT BIT(2) | ||
16 | #define ICPU_RESET_CORE_RST_FORCE BIT(1) | ||
17 | #define ICPU_RESET_MEM_RST_FORCE BIT(0) | ||
18 | |||
19 | #define ICPU_GENERAL_CTRL 0x24 | ||
20 | |||
21 | #define ICPU_GENERAL_CTRL_CPU_BUSIF_SLEEP_DIS BIT(15) | ||
22 | #define ICPU_GENERAL_CTRL_CPU_BUSIF_WERR_ENA BIT(14) | ||
23 | #define ICPU_GENERAL_CTRL_CPU_8051_IROM_ENA BIT(13) | ||
24 | #define ICPU_GENERAL_CTRL_CPU_MIPS_DIS BIT(12) | ||
25 | #define ICPU_GENERAL_CTRL_IF_MIIM_SLV_ENA BIT(11) | ||
26 | #define ICPU_GENERAL_CTRL_IF_PI_SLV_DONEPOL BIT(10) | ||
27 | #define ICPU_GENERAL_CTRL_IF_PI_MST_ENA BIT(9) | ||
28 | #define ICPU_GENERAL_CTRL_IF_PI_SLV_ENA BIT(8) | ||
29 | #define ICPU_GENERAL_CTRL_IF_SI_OWNER(x) (((x) << 6) & GENMASK(7, 6)) | ||
30 | #define ICPU_GENERAL_CTRL_IF_SI_OWNER_M GENMASK(7, 6) | ||
31 | #define ICPU_GENERAL_CTRL_IF_SI_OWNER_X(x) (((x) & GENMASK(7, 6)) >> 4) | ||
32 | #define ICPU_GENERAL_CTRL_IF_SI1_OWNER(x) (((x) << 4) & GENMASK(5, 4)) | ||
33 | #define ICPU_GENERAL_CTRL_IF_SI1_OWNER_M GENMASK(5, 4) | ||
34 | #define ICPU_GENERAL_CTRL_IF_SI1_OWNER_X(x) (((x) & GENMASK(5, 4)) >> 4) | ||
35 | #define ICPU_GENERAL_CTRL_SSI_MST_CONTENTION BIT(3) | ||
36 | #define ICPU_GENERAL_CTRL_CPU_BE_ENA BIT(2) | ||
37 | #define ICPU_GENERAL_CTRL_CPU_DIS BIT(1) | ||
38 | #define ICPU_GENERAL_CTRL_BOOT_MODE_ENA BIT(0) | ||
39 | |||
40 | #define ICPU_SPI_MST_CFG 0x3c | ||
41 | |||
42 | #define ICPU_SPI_MST_CFG_A32B_ENA BIT(11) | ||
43 | #define ICPU_SPI_MST_CFG_FAST_READ_ENA BIT(10) | ||
44 | #define ICPU_SPI_MST_CFG_CS_DESELECT_TIME(x) (((x) << 5) & GENMASK(9, 5)) | ||
45 | #define ICPU_SPI_MST_CFG_CS_DESELECT_TIME_M GENMASK(9, 5) | ||
46 | #define ICPU_SPI_MST_CFG_CS_DESELECT_TIME_X(x) (((x) & GENMASK(9, 5)) >> 5) | ||
47 | #define ICPU_SPI_MST_CFG_CLK_DIV(x) ((x) & GENMASK(4, 0)) | ||
48 | #define ICPU_SPI_MST_CFG_CLK_DIV_M GENMASK(4, 0) | ||
49 | |||
50 | #define ICPU_SW_MODE 0x50 | ||
51 | |||
52 | #define ICPU_SW_MODE_SW_PIN_CTRL_MODE BIT(13) | ||
53 | #define ICPU_SW_MODE_SW_SPI_SCK BIT(12) | ||
54 | #define ICPU_SW_MODE_SW_SPI_SCK_OE BIT(11) | ||
55 | #define ICPU_SW_MODE_SW_SPI_SDO BIT(10) | ||
56 | #define ICPU_SW_MODE_SW_SPI_SDO_OE BIT(9) | ||
57 | #define ICPU_SW_MODE_SW_SPI_CS(x) (((x) << 5) & GENMASK(8, 5)) | ||
58 | #define ICPU_SW_MODE_SW_SPI_CS_M GENMASK(8, 5) | ||
59 | #define ICPU_SW_MODE_SW_SPI_CS_X(x) (((x) & GENMASK(8, 5)) >> 5) | ||
60 | #define ICPU_SW_MODE_SW_SPI_CS_OE(x) (((x) << 1) & GENMASK(4, 1)) | ||
61 | #define ICPU_SW_MODE_SW_SPI_CS_OE_M GENMASK(4, 1) | ||
62 | #define ICPU_SW_MODE_SW_SPI_CS_OE_X(x) (((x) & GENMASK(4, 1)) >> 1) | ||
63 | #define ICPU_SW_MODE_SW_SPI_SDI BIT(0) | ||
64 | |||
65 | #define ICPU_INTR_ENA 0x88 | ||
66 | |||
67 | #define ICPU_DST_INTR_MAP(x) (0x98 + 0x4 * (x)) | ||
68 | #define ICPU_DST_INTR_MAP_RSZ 0x4 | ||
69 | |||
70 | #define ICPU_TIMER_TICK_DIV 0x108 | ||
71 | |||
72 | #define ICPU_TIMER_VALUE(x) (0x10c + 0x4 * (x)) | ||
73 | #define ICPU_TIMER_VALUE_RSZ 0x4 | ||
74 | |||
75 | #define ICPU_TIMER_CTRL(x) (0x124 + 0x4 * (x)) | ||
76 | #define ICPU_TIMER_CTRL_RSZ 0x4 | ||
77 | |||
78 | #define ICPU_TIMER_CTRL_MAX_FREQ_ENA BIT(3) | ||
79 | #define ICPU_TIMER_CTRL_ONE_SHOT_ENA BIT(2) | ||
80 | #define ICPU_TIMER_CTRL_TIMER_ENA BIT(1) | ||
81 | #define ICPU_TIMER_CTRL_FORCE_RELOAD BIT(0) | ||
82 | |||
83 | #define ICPU_MEMCTRL_CTRL 0x130 | ||
84 | |||
85 | #define ICPU_MEMCTRL_CTRL_PWR_DOWN BIT(3) | ||
86 | #define ICPU_MEMCTRL_CTRL_MDSET BIT(2) | ||
87 | #define ICPU_MEMCTRL_CTRL_STALL_REF_ENA BIT(1) | ||
88 | #define ICPU_MEMCTRL_CTRL_INITIALIZE BIT(0) | ||
89 | |||
90 | #define ICPU_MEMCTRL_CFG 0x134 | ||
91 | |||
92 | #define ICPU_MEMCTRL_CFG_DDR_512MBYTE_PLUS BIT(16) | ||
93 | #define ICPU_MEMCTRL_CFG_DDR_ECC_ERR_ENA BIT(15) | ||
94 | #define ICPU_MEMCTRL_CFG_DDR_ECC_COR_ENA BIT(14) | ||
95 | #define ICPU_MEMCTRL_CFG_DDR_ECC_ENA BIT(13) | ||
96 | #define ICPU_MEMCTRL_CFG_DDR_WIDTH BIT(12) | ||
97 | #define ICPU_MEMCTRL_CFG_DDR_MODE BIT(11) | ||
98 | #define ICPU_MEMCTRL_CFG_BURST_SIZE BIT(10) | ||
99 | #define ICPU_MEMCTRL_CFG_BURST_LEN BIT(9) | ||
100 | #define ICPU_MEMCTRL_CFG_BANK_CNT BIT(8) | ||
101 | #define ICPU_MEMCTRL_CFG_MSB_ROW_ADDR(x) (((x) << 4) & GENMASK(7, 4)) | ||
102 | #define ICPU_MEMCTRL_CFG_MSB_ROW_ADDR_M GENMASK(7, 4) | ||
103 | #define ICPU_MEMCTRL_CFG_MSB_ROW_ADDR_X(x) (((x) & GENMASK(7, 4)) >> 4) | ||
104 | #define ICPU_MEMCTRL_CFG_MSB_COL_ADDR(x) ((x) & GENMASK(3, 0)) | ||
105 | #define ICPU_MEMCTRL_CFG_MSB_COL_ADDR_M GENMASK(3, 0) | ||
106 | |||
107 | #define ICPU_MEMCTRL_STAT 0x138 | ||
108 | |||
109 | #define ICPU_MEMCTRL_STAT_RDATA_MASKED BIT(5) | ||
110 | #define ICPU_MEMCTRL_STAT_RDATA_DUMMY BIT(4) | ||
111 | #define ICPU_MEMCTRL_STAT_RDATA_ECC_ERR BIT(3) | ||
112 | #define ICPU_MEMCTRL_STAT_RDATA_ECC_COR BIT(2) | ||
113 | #define ICPU_MEMCTRL_STAT_PWR_DOWN_ACK BIT(1) | ||
114 | #define ICPU_MEMCTRL_STAT_INIT_DONE BIT(0) | ||
115 | |||
116 | #define ICPU_MEMCTRL_REF_PERIOD 0x13c | ||
117 | |||
118 | #define ICPU_MEMCTRL_REF_PERIOD_MAX_PEND_REF(x) (((x) << 16) & GENMASK(19, 16)) | ||
119 | #define ICPU_MEMCTRL_REF_PERIOD_MAX_PEND_REF_M GENMASK(19, 16) | ||
120 | #define ICPU_MEMCTRL_REF_PERIOD_MAX_PEND_REF_X(x) (((x) & GENMASK(19, 16)) >> 16) | ||
121 | #define ICPU_MEMCTRL_REF_PERIOD_REF_PERIOD(x) ((x) & GENMASK(15, 0)) | ||
122 | #define ICPU_MEMCTRL_REF_PERIOD_REF_PERIOD_M GENMASK(15, 0) | ||
123 | |||
124 | #define ICPU_MEMCTRL_ZQCAL 0x140 | ||
125 | |||
126 | #define ICPU_MEMCTRL_ZQCAL_ZQCAL_LONG BIT(1) | ||
127 | #define ICPU_MEMCTRL_ZQCAL_ZQCAL_SHORT BIT(0) | ||
128 | |||
129 | #define ICPU_MEMCTRL_TIMING0 0x144 | ||
130 | |||
131 | #define ICPU_MEMCTRL_TIMING0_RD_TO_WR_DLY(x) (((x) << 28) & GENMASK(31, 28)) | ||
132 | #define ICPU_MEMCTRL_TIMING0_RD_TO_WR_DLY_M GENMASK(31, 28) | ||
133 | #define ICPU_MEMCTRL_TIMING0_RD_TO_WR_DLY_X(x) (((x) & GENMASK(31, 28)) >> 28) | ||
134 | #define ICPU_MEMCTRL_TIMING0_WR_CS_CHANGE_DLY(x) (((x) << 24) & GENMASK(27, 24)) | ||
135 | #define ICPU_MEMCTRL_TIMING0_WR_CS_CHANGE_DLY_M GENMASK(27, 24) | ||
136 | #define ICPU_MEMCTRL_TIMING0_WR_CS_CHANGE_DLY_X(x) (((x) & GENMASK(27, 24)) >> 24) | ||
137 | #define ICPU_MEMCTRL_TIMING0_RD_CS_CHANGE_DLY(x) (((x) << 20) & GENMASK(23, 20)) | ||
138 | #define ICPU_MEMCTRL_TIMING0_RD_CS_CHANGE_DLY_M GENMASK(23, 20) | ||
139 | #define ICPU_MEMCTRL_TIMING0_RD_CS_CHANGE_DLY_X(x) (((x) & GENMASK(23, 20)) >> 20) | ||
140 | #define ICPU_MEMCTRL_TIMING0_RAS_TO_PRECH_DLY(x) (((x) << 16) & GENMASK(19, 16)) | ||
141 | #define ICPU_MEMCTRL_TIMING0_RAS_TO_PRECH_DLY_M GENMASK(19, 16) | ||
142 | #define ICPU_MEMCTRL_TIMING0_RAS_TO_PRECH_DLY_X(x) (((x) & GENMASK(19, 16)) >> 16) | ||
143 | #define ICPU_MEMCTRL_TIMING0_WR_TO_PRECH_DLY(x) (((x) << 12) & GENMASK(15, 12)) | ||
144 | #define ICPU_MEMCTRL_TIMING0_WR_TO_PRECH_DLY_M GENMASK(15, 12) | ||
145 | #define ICPU_MEMCTRL_TIMING0_WR_TO_PRECH_DLY_X(x) (((x) & GENMASK(15, 12)) >> 12) | ||
146 | #define ICPU_MEMCTRL_TIMING0_RD_TO_PRECH_DLY(x) (((x) << 8) & GENMASK(11, 8)) | ||
147 | #define ICPU_MEMCTRL_TIMING0_RD_TO_PRECH_DLY_M GENMASK(11, 8) | ||
148 | #define ICPU_MEMCTRL_TIMING0_RD_TO_PRECH_DLY_X(x) (((x) & GENMASK(11, 8)) >> 8) | ||
149 | #define ICPU_MEMCTRL_TIMING0_WR_DATA_XFR_DLY(x) (((x) << 4) & GENMASK(7, 4)) | ||
150 | #define ICPU_MEMCTRL_TIMING0_WR_DATA_XFR_DLY_M GENMASK(7, 4) | ||
151 | #define ICPU_MEMCTRL_TIMING0_WR_DATA_XFR_DLY_X(x) (((x) & GENMASK(7, 4)) >> 4) | ||
152 | #define ICPU_MEMCTRL_TIMING0_RD_DATA_XFR_DLY(x) ((x) & GENMASK(3, 0)) | ||
153 | #define ICPU_MEMCTRL_TIMING0_RD_DATA_XFR_DLY_M GENMASK(3, 0) | ||
154 | |||
155 | #define ICPU_MEMCTRL_TIMING1 0x148 | ||
156 | |||
157 | #define ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_SAME_BANK_DLY(x) (((x) << 24) & GENMASK(31, 24)) | ||
158 | #define ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_SAME_BANK_DLY_M GENMASK(31, 24) | ||
159 | #define ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_SAME_BANK_DLY_X(x) (((x) & GENMASK(31, 24)) >> 24) | ||
160 | #define ICPU_MEMCTRL_TIMING1_BANK8_FAW_DLY(x) (((x) << 16) & GENMASK(23, 16)) | ||
161 | #define ICPU_MEMCTRL_TIMING1_BANK8_FAW_DLY_M GENMASK(23, 16) | ||
162 | #define ICPU_MEMCTRL_TIMING1_BANK8_FAW_DLY_X(x) (((x) & GENMASK(23, 16)) >> 16) | ||
163 | #define ICPU_MEMCTRL_TIMING1_PRECH_TO_RAS_DLY(x) (((x) << 12) & GENMASK(15, 12)) | ||
164 | #define ICPU_MEMCTRL_TIMING1_PRECH_TO_RAS_DLY_M GENMASK(15, 12) | ||
165 | #define ICPU_MEMCTRL_TIMING1_PRECH_TO_RAS_DLY_X(x) (((x) & GENMASK(15, 12)) >> 12) | ||
166 | #define ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_DLY(x) (((x) << 8) & GENMASK(11, 8)) | ||
167 | #define ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_DLY_M GENMASK(11, 8) | ||
168 | #define ICPU_MEMCTRL_TIMING1_RAS_TO_RAS_DLY_X(x) (((x) & GENMASK(11, 8)) >> 8) | ||
169 | #define ICPU_MEMCTRL_TIMING1_RAS_TO_CAS_DLY(x) (((x) << 4) & GENMASK(7, 4)) | ||
170 | #define ICPU_MEMCTRL_TIMING1_RAS_TO_CAS_DLY_M GENMASK(7, 4) | ||
171 | #define ICPU_MEMCTRL_TIMING1_RAS_TO_CAS_DLY_X(x) (((x) & GENMASK(7, 4)) >> 4) | ||
172 | #define ICPU_MEMCTRL_TIMING1_WR_TO_RD_DLY(x) ((x) & GENMASK(3, 0)) | ||
173 | #define ICPU_MEMCTRL_TIMING1_WR_TO_RD_DLY_M GENMASK(3, 0) | ||
174 | |||
175 | #define ICPU_MEMCTRL_TIMING2 0x14c | ||
176 | |||
177 | #define ICPU_MEMCTRL_TIMING2_PRECH_ALL_DLY(x) (((x) << 28) & GENMASK(31, 28)) | ||
178 | #define ICPU_MEMCTRL_TIMING2_PRECH_ALL_DLY_M GENMASK(31, 28) | ||
179 | #define ICPU_MEMCTRL_TIMING2_PRECH_ALL_DLY_X(x) (((x) & GENMASK(31, 28)) >> 28) | ||
180 | #define ICPU_MEMCTRL_TIMING2_MDSET_DLY(x) (((x) << 24) & GENMASK(27, 24)) | ||
181 | #define ICPU_MEMCTRL_TIMING2_MDSET_DLY_M GENMASK(27, 24) | ||
182 | #define ICPU_MEMCTRL_TIMING2_MDSET_DLY_X(x) (((x) & GENMASK(27, 24)) >> 24) | ||
183 | #define ICPU_MEMCTRL_TIMING2_REF_DLY(x) (((x) << 16) & GENMASK(23, 16)) | ||
184 | #define ICPU_MEMCTRL_TIMING2_REF_DLY_M GENMASK(23, 16) | ||
185 | #define ICPU_MEMCTRL_TIMING2_REF_DLY_X(x) (((x) & GENMASK(23, 16)) >> 16) | ||
186 | #define ICPU_MEMCTRL_TIMING2_INIT_DLY(x) ((x) & GENMASK(15, 0)) | ||
187 | #define ICPU_MEMCTRL_TIMING2_INIT_DLY_M GENMASK(15, 0) | ||
188 | |||
189 | #define ICPU_MEMCTRL_TIMING3 0x150 | ||
190 | |||
191 | #define ICPU_MEMCTRL_TIMING3_RMW_DLY(x) (((x) << 16) & GENMASK(19, 16)) | ||
192 | #define ICPU_MEMCTRL_TIMING3_RMW_DLY_M GENMASK(19, 16) | ||
193 | #define ICPU_MEMCTRL_TIMING3_RMW_DLY_X(x) (((x) & GENMASK(19, 16)) >> 16) | ||
194 | #define ICPU_MEMCTRL_TIMING3_ODT_RD_DLY(x) (((x) << 12) & GENMASK(15, 12)) | ||
195 | #define ICPU_MEMCTRL_TIMING3_ODT_RD_DLY_M GENMASK(15, 12) | ||
196 | #define ICPU_MEMCTRL_TIMING3_ODT_RD_DLY_X(x) (((x) & GENMASK(15, 12)) >> 12) | ||
197 | #define ICPU_MEMCTRL_TIMING3_ODT_WR_DLY(x) (((x) << 8) & GENMASK(11, 8)) | ||
198 | #define ICPU_MEMCTRL_TIMING3_ODT_WR_DLY_M GENMASK(11, 8) | ||
199 | #define ICPU_MEMCTRL_TIMING3_ODT_WR_DLY_X(x) (((x) & GENMASK(11, 8)) >> 8) | ||
200 | #define ICPU_MEMCTRL_TIMING3_LOCAL_ODT_RD_DLY(x) (((x) << 4) & GENMASK(7, 4)) | ||
201 | #define ICPU_MEMCTRL_TIMING3_LOCAL_ODT_RD_DLY_M GENMASK(7, 4) | ||
202 | #define ICPU_MEMCTRL_TIMING3_LOCAL_ODT_RD_DLY_X(x) (((x) & GENMASK(7, 4)) >> 4) | ||
203 | #define ICPU_MEMCTRL_TIMING3_WR_TO_RD_CS_CHANGE_DLY(x) ((x) & GENMASK(3, 0)) | ||
204 | #define ICPU_MEMCTRL_TIMING3_WR_TO_RD_CS_CHANGE_DLY_M GENMASK(3, 0) | ||
205 | |||
206 | #define ICPU_MEMCTRL_TIMING4 0x154 | ||
207 | |||
208 | #define ICPU_MEMCTRL_TIMING4_ZQCAL_INIT_DLY(x) (((x) << 20) & GENMASK(31, 20)) | ||
209 | #define ICPU_MEMCTRL_TIMING4_ZQCAL_INIT_DLY_M GENMASK(31, 20) | ||
210 | #define ICPU_MEMCTRL_TIMING4_ZQCAL_INIT_DLY_X(x) (((x) & GENMASK(31, 20)) >> 20) | ||
211 | #define ICPU_MEMCTRL_TIMING4_ZQCAL_LONG_DLY(x) (((x) << 8) & GENMASK(19, 8)) | ||
212 | #define ICPU_MEMCTRL_TIMING4_ZQCAL_LONG_DLY_M GENMASK(19, 8) | ||
213 | #define ICPU_MEMCTRL_TIMING4_ZQCAL_LONG_DLY_X(x) (((x) & GENMASK(19, 8)) >> 8) | ||
214 | #define ICPU_MEMCTRL_TIMING4_ZQCAL_SHORT_DLY(x) ((x) & GENMASK(7, 0)) | ||
215 | #define ICPU_MEMCTRL_TIMING4_ZQCAL_SHORT_DLY_M GENMASK(7, 0) | ||
216 | |||
217 | #define ICPU_MEMCTRL_MR0_VAL 0x158 | ||
218 | |||
219 | #define ICPU_MEMCTRL_MR1_VAL 0x15c | ||
220 | |||
221 | #define ICPU_MEMCTRL_MR2_VAL 0x160 | ||
222 | |||
223 | #define ICPU_MEMCTRL_MR3_VAL 0x164 | ||
224 | |||
225 | #define ICPU_MEMCTRL_TERMRES_CTRL 0x168 | ||
226 | |||
227 | #define ICPU_MEMCTRL_TERMRES_CTRL_ODT_RD_EXT BIT(11) | ||
228 | #define ICPU_MEMCTRL_TERMRES_CTRL_ODT_RD_ENA(x) (((x) << 7) & GENMASK(10, 7)) | ||
229 | #define ICPU_MEMCTRL_TERMRES_CTRL_ODT_RD_ENA_M GENMASK(10, 7) | ||
230 | #define ICPU_MEMCTRL_TERMRES_CTRL_ODT_RD_ENA_X(x) (((x) & GENMASK(10, 7)) >> 7) | ||
231 | #define ICPU_MEMCTRL_TERMRES_CTRL_ODT_WR_EXT BIT(6) | ||
232 | #define ICPU_MEMCTRL_TERMRES_CTRL_ODT_WR_ENA(x) (((x) << 2) & GENMASK(5, 2)) | ||
233 | #define ICPU_MEMCTRL_TERMRES_CTRL_ODT_WR_ENA_M GENMASK(5, 2) | ||
234 | #define ICPU_MEMCTRL_TERMRES_CTRL_ODT_WR_ENA_X(x) (((x) & GENMASK(5, 2)) >> 2) | ||
235 | #define ICPU_MEMCTRL_TERMRES_CTRL_LOCAL_ODT_RD_EXT BIT(1) | ||
236 | #define ICPU_MEMCTRL_TERMRES_CTRL_LOCAL_ODT_RD_ENA BIT(0) | ||
237 | |||
238 | #define ICPU_MEMCTRL_DFT 0x16c | ||
239 | |||
240 | #define ICPU_MEMCTRL_DFT_DDRDFT_LBW BIT(7) | ||
241 | #define ICPU_MEMCTRL_DFT_DDRDFT_GATE_ENA BIT(6) | ||
242 | #define ICPU_MEMCTRL_DFT_DDRDFT_TERM_ENA BIT(5) | ||
243 | #define ICPU_MEMCTRL_DFT_DDRDFT_A10 BIT(4) | ||
244 | #define ICPU_MEMCTRL_DFT_DDRDFT_STAT BIT(3) | ||
245 | #define ICPU_MEMCTRL_DFT_DDRDFT_MODE(x) (((x) << 1) & GENMASK(2, 1)) | ||
246 | #define ICPU_MEMCTRL_DFT_DDRDFT_MODE_M GENMASK(2, 1) | ||
247 | #define ICPU_MEMCTRL_DFT_DDRDFT_MODE_X(x) (((x) & GENMASK(2, 1)) >> 1) | ||
248 | #define ICPU_MEMCTRL_DFT_DDRDFT_ENA BIT(0) | ||
249 | |||
250 | #define ICPU_MEMCTRL_DQS_DLY(x) (0x170 + 0x4 * (x)) | ||
251 | #define ICPU_MEMCTRL_DQS_DLY_RSZ 0x4 | ||
252 | |||
253 | #define ICPU_MEMCTRL_DQS_DLY_TRAIN_DQ_ENA BIT(11) | ||
254 | #define ICPU_MEMCTRL_DQS_DLY_DQS_DLY_TRM1(x) (((x) << 8) & GENMASK(10, 8)) | ||
255 | #define ICPU_MEMCTRL_DQS_DLY_DQS_DLY_TRM1_M GENMASK(10, 8) | ||
256 | #define ICPU_MEMCTRL_DQS_DLY_DQS_DLY_TRM1_X(x) (((x) & GENMASK(10, 8)) >> 8) | ||
257 | #define ICPU_MEMCTRL_DQS_DLY_DQS_DLY_TRM0(x) (((x) << 5) & GENMASK(7, 5)) | ||
258 | #define ICPU_MEMCTRL_DQS_DLY_DQS_DLY_TRM0_M GENMASK(7, 5) | ||
259 | #define ICPU_MEMCTRL_DQS_DLY_DQS_DLY_TRM0_X(x) (((x) & GENMASK(7, 5)) >> 5) | ||
260 | #define ICPU_MEMCTRL_DQS_DLY_DQS_DLY(x) ((x) & GENMASK(4, 0)) | ||
261 | #define ICPU_MEMCTRL_DQS_DLY_DQS_DLY_M GENMASK(4, 0) | ||
262 | |||
263 | #define ICPU_MEMCTRL_DQS_AUTO (0x178 + 0x4 * (x)) | ||
264 | #define ICPU_MEMCTRL_DQS_AUTO_RSZ 0x4 | ||
265 | |||
266 | #define ICPU_MEMCTRL_DQS_AUTO_DQS_DRIFT(x) (((x) << 6) & GENMASK(7, 6)) | ||
267 | #define ICPU_MEMCTRL_DQS_AUTO_DQS_DRIFT_M GENMASK(7, 6) | ||
268 | #define ICPU_MEMCTRL_DQS_AUTO_DQS_DRIFT_X(x) (((x) & GENMASK(7, 6)) >> 6) | ||
269 | #define ICPU_MEMCTRL_DQS_AUTO_DQS_OVERFLOW BIT(5) | ||
270 | #define ICPU_MEMCTRL_DQS_AUTO_DQS_UNDERFLOW BIT(4) | ||
271 | #define ICPU_MEMCTRL_DQS_AUTO_DQS_AUTO_SRC BIT(3) | ||
272 | #define ICPU_MEMCTRL_DQS_AUTO_DQS_AUTO_UP BIT(2) | ||
273 | #define ICPU_MEMCTRL_DQS_AUTO_DQS_AUTO_DOWN BIT(1) | ||
274 | #define ICPU_MEMCTRL_DQS_AUTO_DQS_AUTO_ENA BIT(0) | ||
275 | |||
276 | #define ICPU_MEMPHY_CFG 0x180 | ||
277 | |||
278 | #define ICPU_MEMPHY_CFG_PHY_FLUSH_DIS BIT(10) | ||
279 | #define ICPU_MEMPHY_CFG_PHY_RD_ADJ_DIS BIT(9) | ||
280 | #define ICPU_MEMPHY_CFG_PHY_DQS_EXT BIT(8) | ||
281 | #define ICPU_MEMPHY_CFG_PHY_FIFO_RST BIT(7) | ||
282 | #define ICPU_MEMPHY_CFG_PHY_DLL_BL_RST BIT(6) | ||
283 | #define ICPU_MEMPHY_CFG_PHY_DLL_CL_RST BIT(5) | ||
284 | #define ICPU_MEMPHY_CFG_PHY_ODT_OE BIT(4) | ||
285 | #define ICPU_MEMPHY_CFG_PHY_CK_OE BIT(3) | ||
286 | #define ICPU_MEMPHY_CFG_PHY_CL_OE BIT(2) | ||
287 | #define ICPU_MEMPHY_CFG_PHY_SSTL_ENA BIT(1) | ||
288 | #define ICPU_MEMPHY_CFG_PHY_RST BIT(0) | ||
289 | |||
290 | #define ICPU_MEMPHY_ZCAL 0x1a8 | ||
291 | |||
292 | #define ICPU_MEMPHY_ZCAL_ZCAL_CLK_SEL BIT(9) | ||
293 | #define ICPU_MEMPHY_ZCAL_ZCAL_PROG_ODT(x) (((x) << 5) & GENMASK(8, 5)) | ||
294 | #define ICPU_MEMPHY_ZCAL_ZCAL_PROG_ODT_M GENMASK(8, 5) | ||
295 | #define ICPU_MEMPHY_ZCAL_ZCAL_PROG_ODT_X(x) (((x) & GENMASK(8, 5)) >> 5) | ||
296 | #define ICPU_MEMPHY_ZCAL_ZCAL_PROG(x) (((x) << 1) & GENMASK(4, 1)) | ||
297 | #define ICPU_MEMPHY_ZCAL_ZCAL_PROG_M GENMASK(4, 1) | ||
298 | #define ICPU_MEMPHY_ZCAL_ZCAL_PROG_X(x) (((x) & GENMASK(4, 1)) >> 1) | ||
299 | #define ICPU_MEMPHY_ZCAL_ZCAL_ENA BIT(0) | ||
300 | // | ||
301 | #define ICPU_MEMPHY_ZCAL_STAT 0x1ac | ||
302 | |||
303 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_ZCTRL(x) (((x) << 12) & GENMASK(31, 12)) | ||
304 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_ZCTRL_M GENMASK(31, 12) | ||
305 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_ZCTRL_X(x) (((x) & GENMASK(31, 12)) >> 12) | ||
306 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_ODTPU(x) (((x) << 8) & GENMASK(9, 8)) | ||
307 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_ODTPU_M GENMASK(9, 8) | ||
308 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_ODTPU_X(x) (((x) & GENMASK(9, 8)) >> 8) | ||
309 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_ODTPD(x) (((x) << 6) & GENMASK(7, 6)) | ||
310 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_ODTPD_M GENMASK(7, 6) | ||
311 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_ODTPD_X(x) (((x) & GENMASK(7, 6)) >> 6) | ||
312 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_PU(x) (((x) << 4) & GENMASK(5, 4)) | ||
313 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_PU_M GENMASK(5, 4) | ||
314 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_PU_X(x) (((x) & GENMASK(5, 4)) >> 4) | ||
315 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_PD(x) (((x) << 2) & GENMASK(3, 2)) | ||
316 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_PD_M GENMASK(3, 2) | ||
317 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_STAT_PD_X(x) (((x) & GENMASK(3, 2)) >> 2) | ||
318 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_ERR BIT(1) | ||
319 | #define ICPU_MEMPHY_ZCAL_STAT_ZCAL_DONE BIT(0) | ||
320 | |||
321 | #endif | ||
322 |
arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb.h
1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef _MSCC_OCELOT_DEVCPU_GCB_H_ | 6 | #ifndef _MSCC_OCELOT_DEVCPU_GCB_H_ |
7 | #define _MSCC_OCELOT_DEVCPU_GCB_H_ | 7 | #define _MSCC_OCELOT_DEVCPU_GCB_H_ |
8 | 8 | ||
9 | #define PERF_SOFT_RST 0x90 | 9 | #define PERF_SOFT_RST 0x90 |
10 | 10 | ||
11 | #define PERF_SOFT_RST_SOFT_SWC_RST BIT(1) | 11 | #define PERF_SOFT_RST_SOFT_SWC_RST BIT(1) |
12 | #define PERF_SOFT_RST_SOFT_CHIP_RST BIT(0) | 12 | #define PERF_SOFT_RST_SOFT_CHIP_RST BIT(0) |
13 | 13 | ||
14 | #define GPIO_ALT(x) (0x88 + 4 * (x)) | ||
15 | |||
16 | #define CHIP_ID (0x08) | ||
17 | |||
14 | #endif | 18 | #endif |
15 | 19 |
arch/mips/mach-mscc/include/mach/luton/luton_devcpu_gcb_miim_regs.h
File was created | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | |
2 | /* | ||
3 | * Microsemi Ocelot Switch driver | ||
4 | * | ||
5 | * Copyright (c) 2018 Microsemi Corporation | ||
6 | */ | ||
7 | |||
8 | #ifndef _MSCC_LUTON_MIIM_REGS_H_ | ||
9 | #define _MSCC_LUTON_MIIM_REGS_H_ | ||
10 | |||
11 | #define MIIM_MII_STATUS(gi) (0xa0 + (gi * 36)) | ||
12 | #define MIIM_MII_CMD(gi) (0xa8 + (gi * 36)) | ||
13 | #define MIIM_MII_DATA(gi) (0xac + (gi * 36)) | ||
14 | |||
15 | #define MSCC_F_MII_STATUS_MIIM_STAT_BUSY(x) (x ? BIT(3) : 0) | ||
16 | |||
17 | #define MSCC_F_MII_CMD_MIIM_CMD_VLD(x) (x ? BIT(31) : 0) | ||
18 | #define MSCC_F_MII_CMD_MIIM_CMD_PHYAD(x) (GENMASK(29, 25) & (x << 25)) | ||
19 | #define MSCC_F_MII_CMD_MIIM_CMD_REGAD(x) (GENMASK(24, 20) & (x << 20)) | ||
20 | #define MSCC_F_MII_CMD_MIIM_CMD_WRDATA(x) (GENMASK(19, 4) & (x << 4)) | ||
21 | #define MSCC_F_MII_CMD_MIIM_CMD_OPR_FIELD(x) (GENMASK(2, 1) & (x << 1)) | ||
22 | |||
23 | #define MSCC_M_MII_DATA_MIIM_DATA_SUCCESS GENMASK(17, 16) | ||
24 | #define MSCC_X_MII_DATA_MIIM_DATA_RDDATA(x) ((x >> 0) & GENMASK(15, 0)) | ||
25 | |||
26 | #endif | ||
27 |
arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb.h
1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef _MSCC_OCELOT_DEVCPU_GCB_H_ | 6 | #ifndef _MSCC_OCELOT_DEVCPU_GCB_H_ |
7 | #define _MSCC_OCELOT_DEVCPU_GCB_H_ | 7 | #define _MSCC_OCELOT_DEVCPU_GCB_H_ |
8 | 8 | ||
9 | #define PERF_SOFT_RST 0x8 | 9 | #define PERF_SOFT_RST 0x8 |
10 | 10 | ||
11 | #define PERF_SOFT_RST_SOFT_NON_CFG_RST BIT(2) | 11 | #define PERF_SOFT_RST_SOFT_NON_CFG_RST BIT(2) |
12 | #define PERF_SOFT_RST_SOFT_SWC_RST BIT(1) | 12 | #define PERF_SOFT_RST_SOFT_SWC_RST BIT(1) |
13 | #define PERF_SOFT_RST_SOFT_CHIP_RST BIT(0) | 13 | #define PERF_SOFT_RST_SOFT_CHIP_RST BIT(0) |
14 | 14 | ||
15 | #define PERF_GPIO_OUT_SET 0x34 | 15 | #define PERF_GPIO_OUT_SET 0x34 |
16 | 16 | ||
17 | #define PERF_GPIO_OUT_CLR 0x38 | 17 | #define PERF_GPIO_OUT_CLR 0x38 |
18 | 18 | ||
19 | #define PERF_GPIO_OE 0x44 | 19 | #define PERF_GPIO_OE 0x44 |
20 | 20 | ||
21 | #define GPIO_ALT(x) (0x54 + 4 * (x)) | ||
22 | |||
21 | #endif | 23 | #endif |
22 | 24 |
arch/mips/mach-mscc/include/mach/ocelot/ocelot_devcpu_gcb_miim_regs.h
File was created | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | #ifndef _MSCC_OCELOT_DEVCPU_GCB_MIIM_REGS_H_ | ||
7 | #define _MSCC_OCELOT_DEVCPU_GCB_MIIM_REGS_H_ | ||
8 | |||
9 | #define MIIM_MII_STATUS(gi) (0x9c + (gi * 36)) | ||
10 | #define MIIM_MII_CMD(gi) (0xa4 + (gi * 36)) | ||
11 | #define MIIM_MII_DATA(gi) (0xa8 + (gi * 36)) | ||
12 | |||
13 | #define MSCC_F_MII_STATUS_MIIM_STAT_BUSY(x) ((x) ? BIT(3) : 0) | ||
14 | |||
15 | #define MSCC_F_MII_CMD_MIIM_CMD_VLD(x) ((x) ? BIT(31) : 0) | ||
16 | #define MSCC_F_MII_CMD_MIIM_CMD_PHYAD(x) (GENMASK(29, 25) & ((x) << 25)) | ||
17 | #define MSCC_F_MII_CMD_MIIM_CMD_REGAD(x) (GENMASK(24, 20) & ((x) << 20)) | ||
18 | #define MSCC_F_MII_CMD_MIIM_CMD_WRDATA(x) (GENMASK(19, 4) & ((x) << 4)) | ||
19 | #define MSCC_F_MII_CMD_MIIM_CMD_OPR_FIELD(x) (GENMASK(2, 1) & ((x) << 1)) | ||
20 | #define MSCC_F_MII_CMD_MIIM_CMD_SCAN(x) ((x) ? BIT(0) : 0) | ||
21 | |||
22 | #define MSCC_M_MII_DATA_MIIM_DATA_SUCCESS GENMASK(17, 16) | ||
23 | #define MSCC_X_MII_DATA_MIIM_DATA_RDDATA(x) (((x) >> 0) & GENMASK(15, 0)) | ||
24 | |||
25 | #endif | ||
26 |
arch/mips/mach-mscc/phy.c
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | #include <common.h> | ||
7 | #include <asm/io.h> | ||
8 | |||
9 | int mscc_phy_rd_wr(u8 read, | ||
10 | u32 miimdev, | ||
11 | u8 miim_addr, | ||
12 | u8 addr, | ||
13 | u16 *value) | ||
14 | { | ||
15 | u32 data; | ||
16 | int i; | ||
17 | |||
18 | /* Command part */ | ||
19 | data = (read ? MSCC_F_MII_CMD_MIIM_CMD_OPR_FIELD(2) : /* Read */ | ||
20 | MSCC_F_MII_CMD_MIIM_CMD_OPR_FIELD(1) | /* Write */ | ||
21 | MSCC_F_MII_CMD_MIIM_CMD_WRDATA(*value)); /* value */ | ||
22 | |||
23 | /* Addressing part */ | ||
24 | data |= | ||
25 | MSCC_F_MII_CMD_MIIM_CMD_VLD(1) | /* Valid command */ | ||
26 | MSCC_F_MII_CMD_MIIM_CMD_REGAD(addr) | /* Reg addr */ | ||
27 | MSCC_F_MII_CMD_MIIM_CMD_PHYAD(miim_addr); /* Miim addr */ | ||
28 | |||
29 | /* Enqueue MIIM operation to be executed */ | ||
30 | writel(data, BASE_DEVCPU_GCB + MIIM_MII_CMD(miimdev)); | ||
31 | |||
32 | /* Wait for MIIM operation to finish */ | ||
33 | i = 0; | ||
34 | do { | ||
35 | if (i++ > 100) { | ||
36 | debug("Miim timeout"); | ||
37 | return -1; | ||
38 | } | ||
39 | data = readl(BASE_DEVCPU_GCB + MIIM_MII_STATUS(miimdev)); | ||
40 | debug("Read status miim(%d): 0x%08x\n", miimdev, data); | ||
41 | } while (data & MSCC_F_MII_STATUS_MIIM_STAT_BUSY(1)); | ||
42 | |||
43 | if (read) { | ||
44 | data = readl(BASE_DEVCPU_GCB + MIIM_MII_DATA(miimdev)); | ||
45 | if (data & MSCC_M_MII_DATA_MIIM_DATA_SUCCESS) { | ||
46 | debug("Read(%d, %d) returned 0x%08x\n", | ||
47 | miim_addr, addr, data); | ||
48 | return -1; | ||
49 | } | ||
50 | *value = MSCC_X_MII_DATA_MIIM_DATA_RDDATA(data); | ||
51 | } | ||
52 | |||
53 | return 0; | ||
54 | } | ||
55 | |||
56 | int mscc_phy_rd(u32 miimdev, | ||
57 | u8 miim_addr, | ||
58 | u8 addr, | ||
59 | u16 *value) | ||
60 | { | ||
61 | if (mscc_phy_rd_wr(1, miimdev, miim_addr, addr, value) == 0) | ||
62 | return 0; | ||
63 | debug("Read(%d, %d) returned error\n", miim_addr, addr); | ||
64 | return -1; | ||
65 | } | ||
66 | |||
67 | int mscc_phy_wr(u32 miimdev, | ||
68 | u8 miim_addr, | ||
69 | u8 addr, | ||
70 | u16 value) | ||
71 | { | ||
72 | return mscc_phy_rd_wr(0, miimdev, miim_addr, addr, &value); | ||
73 | } | ||
74 |
arch/mips/mach-mscc/reset.c
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <common.h> | 6 | #include <common.h> |
7 | 7 | ||
8 | #include <asm/sections.h> | 8 | #include <asm/sections.h> |
9 | #include <asm/io.h> | 9 | #include <asm/io.h> |
10 | 10 | ||
11 | #include <asm/reboot.h> | 11 | #include <asm/reboot.h> |
12 | 12 | ||
13 | void _machine_restart(void) | 13 | void _machine_restart(void) |
14 | { | 14 | { |
15 | #if defined(CONFIG_SOC_JR2) | ||
16 | register u32 reg = readl(BASE_CFG + ICPU_GENERAL_CTRL); | ||
17 | /* Set owner */ | ||
18 | reg &= ~ICPU_GENERAL_CTRL_IF_SI_OWNER_M; | ||
19 | reg |= ICPU_GENERAL_CTRL_IF_SI_OWNER(1); | ||
20 | /* Set boot mode */ | ||
21 | reg |= ICPU_GENERAL_CTRL_BOOT_MODE_ENA; | ||
22 | writel(reg, BASE_CFG + ICPU_GENERAL_CTRL); | ||
23 | /* Read back in order to make BOOT mode setting active */ | ||
24 | reg = readl(BASE_CFG + ICPU_GENERAL_CTRL); | ||
25 | /* Reset CPU only - still executing _here_. but from cache */ | ||
26 | writel(readl(BASE_CFG + ICPU_RESET) | | ||
27 | ICPU_RESET_CORE_RST_CPU_ONLY | | ||
28 | ICPU_RESET_CORE_RST_FORCE, | ||
29 | BASE_CFG + ICPU_RESET); | ||
30 | #else | ||
15 | register u32 resetbits = PERF_SOFT_RST_SOFT_CHIP_RST; | 31 | register u32 resetbits = PERF_SOFT_RST_SOFT_CHIP_RST; |
16 | (void)readl(BASE_DEVCPU_GCB + PERF_SOFT_RST); | 32 | (void)readl(BASE_DEVCPU_GCB + PERF_SOFT_RST); |
17 | 33 | ||
18 | /* Make sure VCore is NOT protected from reset */ | 34 | /* Make sure VCore is NOT protected from reset */ |
19 | clrbits_le32(BASE_CFG + ICPU_RESET, ICPU_RESET_CORE_RST_PROTECT); | 35 | clrbits_le32(BASE_CFG + ICPU_RESET, ICPU_RESET_CORE_RST_PROTECT); |
20 | 36 | ||
21 | /* Change to SPI bitbang for SPI reset workaround... */ | 37 | /* Change to SPI bitbang for SPI reset workaround... */ |
22 | writel(ICPU_SW_MODE_SW_SPI_CS_OE(1) | ICPU_SW_MODE_SW_SPI_CS(1) | | 38 | writel(ICPU_SW_MODE_SW_SPI_CS_OE(1) | ICPU_SW_MODE_SW_SPI_CS(1) | |
23 | ICPU_SW_MODE_SW_PIN_CTRL_MODE, BASE_CFG + ICPU_SW_MODE); | 39 | ICPU_SW_MODE_SW_PIN_CTRL_MODE, BASE_CFG + ICPU_SW_MODE); |
24 | 40 | ||
25 | /* Do the global reset */ | 41 | /* Do the global reset */ |
26 | writel(resetbits, BASE_DEVCPU_GCB + PERF_SOFT_RST); | 42 | writel(resetbits, BASE_DEVCPU_GCB + PERF_SOFT_RST); |
43 | #endif | ||
27 | 44 | ||
28 | while (1) | 45 | while (1) |
29 | ; /* NOP */ | 46 | ; /* NOP */ |
30 | } | 47 | } |
31 | 48 |
board/mscc/common/Makefile
File was created | 1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | |||
3 | obj-$(CONFIG_SOC_JR2) := spi.o | ||
4 | obj-$(CONFIG_SOC_OCELOT) := spi.o | ||
5 |
board/mscc/common/spi.c
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Coprporation | ||
4 | */ | ||
5 | |||
6 | #include <common.h> | ||
7 | #include <asm/io.h> | ||
8 | #include <spi.h> | ||
9 | |||
10 | void external_cs_manage(struct udevice *dev, bool enable) | ||
11 | { | ||
12 | u32 cs = spi_chip_select(dev); | ||
13 | /* IF_SI0_OWNER, select the owner of the SI interface | ||
14 | * Encoding: 0: SI Slave | ||
15 | * 1: SI Boot Master | ||
16 | * 2: SI Master Controller | ||
17 | */ | ||
18 | if (!enable) { | ||
19 | writel(ICPU_SW_MODE_SW_PIN_CTRL_MODE | | ||
20 | ICPU_SW_MODE_SW_SPI_CS(BIT(cs)), | ||
21 | BASE_CFG + ICPU_SW_MODE); | ||
22 | clrsetbits_le32(BASE_CFG + ICPU_GENERAL_CTRL, | ||
23 | ICPU_GENERAL_CTRL_IF_SI_OWNER_M, | ||
24 | ICPU_GENERAL_CTRL_IF_SI_OWNER(2)); | ||
25 | } else { | ||
26 | writel(0, BASE_CFG + ICPU_SW_MODE); | ||
27 | clrsetbits_le32(BASE_CFG + ICPU_GENERAL_CTRL, | ||
28 | ICPU_GENERAL_CTRL_IF_SI_OWNER_M, | ||
29 | ICPU_GENERAL_CTRL_IF_SI_OWNER(1)); | ||
30 | } | ||
31 | } | ||
32 |
board/mscc/jr2/Kconfig
File was created | 1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | |||
3 | config SYS_VENDOR | ||
4 | default "mscc" | ||
5 | |||
6 | if SOC_JR2 | ||
7 | |||
8 | config SYS_BOARD | ||
9 | default "jr2" | ||
10 | |||
11 | config SYS_CONFIG_NAME | ||
12 | default "jr2" | ||
13 | |||
14 | endif | ||
15 | |||
16 |
board/mscc/jr2/Makefile
File was created | 1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | |||
3 | obj-$(CONFIG_SOC_JR2) := jr2.o | ||
4 | |||
5 |
board/mscc/jr2/jr2.c
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
2 | /* | ||
3 | * Copyright (c) 2018 Microsemi Corporation | ||
4 | */ | ||
5 | |||
6 | #include <common.h> | ||
7 | #include <asm/io.h> | ||
8 | #include <led.h> | ||
9 | |||
10 | enum { | ||
11 | BOARD_TYPE_PCB110 = 0xAABBCE00, | ||
12 | BOARD_TYPE_PCB111, | ||
13 | BOARD_TYPE_PCB112, | ||
14 | }; | ||
15 | |||
16 | int board_early_init_r(void) | ||
17 | { | ||
18 | /* Prepare SPI controller to be used in master mode */ | ||
19 | writel(0, BASE_CFG + ICPU_SW_MODE); | ||
20 | clrsetbits_le32(BASE_CFG + ICPU_GENERAL_CTRL, | ||
21 | ICPU_GENERAL_CTRL_IF_SI_OWNER_M, | ||
22 | ICPU_GENERAL_CTRL_IF_SI_OWNER(2)); | ||
23 | |||
24 | /* Address of boot parameters */ | ||
25 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE; | ||
26 | |||
27 | /* LED setup */ | ||
28 | if (IS_ENABLED(CONFIG_LED)) | ||
29 | led_default_state(); | ||
30 | |||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | static void vcoreiii_gpio_set_alternate(int gpio, int mode) | ||
35 | { | ||
36 | u32 mask; | ||
37 | u32 val0, val1; | ||
38 | void __iomem *reg0, *reg1; | ||
39 | |||
40 | if (gpio < 32) { | ||
41 | mask = BIT(gpio); | ||
42 | reg0 = BASE_DEVCPU_GCB + GPIO_GPIO_ALT(0); | ||
43 | reg1 = BASE_DEVCPU_GCB + GPIO_GPIO_ALT(1); | ||
44 | } else { | ||
45 | gpio -= 32; | ||
46 | mask = BIT(gpio); | ||
47 | reg0 = BASE_DEVCPU_GCB + GPIO_GPIO_ALT1(0); | ||
48 | reg1 = BASE_DEVCPU_GCB + GPIO_GPIO_ALT1(1); | ||
49 | } | ||
50 | val0 = readl(reg0); | ||
51 | val1 = readl(reg1); | ||
52 | if (mode == 1) { | ||
53 | writel(val0 | mask, reg0); | ||
54 | writel(val1 & ~mask, reg1); | ||
55 | } else if (mode == 2) { | ||
56 | writel(val0 & ~mask, reg0); | ||
57 | writel(val1 | mask, reg1); | ||
58 | } else if (mode == 3) { | ||
59 | writel(val0 | mask, reg0); | ||
60 | writel(val1 | mask, reg1); | ||
61 | } else { | ||
62 | writel(val0 & ~mask, reg0); | ||
63 | writel(val1 & ~mask, reg1); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | static void do_board_detect(void) | ||
68 | { | ||
69 | int i; | ||
70 | u16 pval; | ||
71 | |||
72 | /* MIIM 1 + 2 MDC/MDIO */ | ||
73 | for (i = 56; i < 60; i++) | ||
74 | vcoreiii_gpio_set_alternate(i, 1); | ||
75 | |||
76 | if (mscc_phy_rd(0, 0x10, 0x3, &pval) == 0 && | ||
77 | ((pval >> 4) & 0x3F) == 0x3c) { | ||
78 | gd->board_type = BOARD_TYPE_PCB112; /* Serval2-NID */ | ||
79 | } else if (mscc_phy_rd(1, 0x0, 0x3, &pval) == 0 && | ||
80 | ((pval >> 4) & 0x3F) == 0x3c) { | ||
81 | gd->board_type = BOARD_TYPE_PCB110; /* Jr2-24 */ | ||
82 | } else { | ||
83 | /* Fall-back */ | ||
84 | gd->board_type = BOARD_TYPE_PCB111; /* Jr2-48 */ | ||
85 | } | ||
86 | } | ||
87 | |||
88 | #if defined(CONFIG_MULTI_DTB_FIT) | ||
89 | int board_fit_config_name_match(const char *name) | ||
90 | { | ||
91 | if (gd->board_type == BOARD_TYPE_PCB110 && | ||
92 | strcmp(name, "jr2_pcb110") == 0) | ||
93 | return 0; | ||
94 | |||
95 | if (gd->board_type == BOARD_TYPE_PCB111 && | ||
96 | strcmp(name, "jr2_pcb111") == 0) | ||
97 | return 0; | ||
98 | |||
99 | if (gd->board_type == BOARD_TYPE_PCB112 && | ||
100 | strcmp(name, "serval2_pcb112") == 0) | ||
101 | return 0; | ||
102 | |||
103 | return -1; | ||
104 | } | ||
105 | #endif | ||
106 | |||
107 | #if defined(CONFIG_DTB_RESELECT) | ||
108 | int embedded_dtb_select(void) | ||
109 | { | ||
110 | do_board_detect(); | ||
111 | fdtdec_setup(); | ||
112 | |||
113 | return 0; | ||
114 | } | ||
115 | #endif | ||
116 |
board/mscc/luton/luton.c
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <common.h> | 6 | #include <common.h> |
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | #include <led.h> | ||
8 | 9 | ||
9 | #define MSCC_GPIO_ALT0 0x88 | ||
10 | #define MSCC_GPIO_ALT1 0x8C | ||
11 | |||
12 | DECLARE_GLOBAL_DATA_PTR; | 10 | DECLARE_GLOBAL_DATA_PTR; |
13 | 11 | ||
12 | enum { | ||
13 | BOARD_TYPE_PCB090 = 0xAABBCD00, | ||
14 | BOARD_TYPE_PCB091, | ||
15 | }; | ||
16 | |||
14 | void board_debug_uart_init(void) | 17 | void board_debug_uart_init(void) |
15 | { | 18 | { |
16 | /* too early for the pinctrl driver, so configure the UART pins here */ | 19 | /* too early for the pinctrl driver, so configure the UART pins here */ |
17 | setbits_le32(BASE_DEVCPU_GCB + MSCC_GPIO_ALT0, BIT(30) | BIT(31)); | 20 | mscc_gpio_set_alternate(30, 1); |
21 | mscc_gpio_set_alternate(31, 1); | ||
18 | } | 22 | } |
19 | 23 | ||
20 | int board_early_init_r(void) | 24 | int board_early_init_r(void) |
21 | { | 25 | { |
22 | /* Prepare SPI controller to be used in master mode */ | 26 | /* Prepare SPI controller to be used in master mode */ |
23 | writel(0, BASE_CFG + ICPU_SW_MODE); | 27 | writel(0, BASE_CFG + ICPU_SW_MODE); |
24 | 28 | ||
25 | /* Address of boot parameters */ | 29 | /* Address of boot parameters */ |
26 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE; | 30 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE; |
31 | |||
32 | /* LED setup */ | ||
33 | if (IS_ENABLED(CONFIG_LED)) | ||
34 | led_default_state(); | ||
35 | |||
27 | return 0; | 36 | return 0; |
28 | } | 37 | } |
38 | |||
39 | static void do_board_detect(void) | ||
40 | { | ||
41 | u32 chipid = (readl(BASE_DEVCPU_GCB + CHIP_ID) >> 12) & 0xFFFF; | ||
42 | |||
43 | if (chipid == 0x7428 || chipid == 0x7424) | ||
44 | gd->board_type = BOARD_TYPE_PCB091; // Lu10 | ||
45 | else | ||
46 | gd->board_type = BOARD_TYPE_PCB090; // Lu26 | ||
47 | } | ||
48 | |||
49 | #if defined(CONFIG_MULTI_DTB_FIT) | ||
50 | int board_fit_config_name_match(const char *name) | ||
51 | { | ||
52 | if (gd->board_type == BOARD_TYPE_PCB090 && | ||
53 | strcmp(name, "luton_pcb090") == 0) | ||
54 | return 0; | ||
55 | |||
56 | if (gd->board_type == BOARD_TYPE_PCB091 && | ||
57 | strcmp(name, "luton_pcb091") == 0) | ||
58 | return 0; | ||
59 | |||
60 | return -1; | ||
61 | } | ||
62 | #endif | ||
63 | |||
64 | #if defined(CONFIG_DTB_RESELECT) | ||
65 | int embedded_dtb_select(void) | ||
66 | { | ||
67 | do_board_detect(); | ||
68 | fdtdec_setup(); | ||
69 | |||
70 | return 0; |
board/mscc/ocelot/ocelot.c
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <common.h> | 6 | #include <common.h> |
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | #include <asm/addrspace.h> | 8 | #include <asm/addrspace.h> |
9 | #include <asm/types.h> | 9 | #include <asm/types.h> |
10 | #include <environment.h> | 10 | #include <environment.h> |
11 | #include <spi.h> | 11 | #include <spi.h> |
12 | #include <led.h> | ||
12 | 13 | ||
13 | DECLARE_GLOBAL_DATA_PTR; | 14 | DECLARE_GLOBAL_DATA_PTR; |
14 | 15 | ||
15 | #define MSCC_GPIO_ALT0 0x54 | 16 | enum { |
16 | #define MSCC_GPIO_ALT1 0x58 | 17 | BOARD_TYPE_PCB120 = 0xAABBCC00, |
18 | BOARD_TYPE_PCB123, | ||
19 | }; | ||
17 | 20 | ||
18 | void external_cs_manage(struct udevice *dev, bool enable) | ||
19 | { | ||
20 | u32 cs = spi_chip_select(dev); | ||
21 | /* IF_SI0_OWNER, select the owner of the SI interface | ||
22 | * Encoding: 0: SI Slave | ||
23 | * 1: SI Boot Master | ||
24 | * 2: SI Master Controller | ||
25 | */ | ||
26 | if (!enable) { | ||
27 | writel(ICPU_SW_MODE_SW_PIN_CTRL_MODE | | ||
28 | ICPU_SW_MODE_SW_SPI_CS(BIT(cs)), BASE_CFG + ICPU_SW_MODE); | ||
29 | clrsetbits_le32(BASE_CFG + ICPU_GENERAL_CTRL, | ||
30 | ICPU_GENERAL_CTRL_IF_SI_OWNER_M, | ||
31 | ICPU_GENERAL_CTRL_IF_SI_OWNER(2)); | ||
32 | } else { | ||
33 | writel(0, BASE_CFG + ICPU_SW_MODE); | ||
34 | clrsetbits_le32(BASE_CFG + ICPU_GENERAL_CTRL, | ||
35 | ICPU_GENERAL_CTRL_IF_SI_OWNER_M, | ||
36 | ICPU_GENERAL_CTRL_IF_SI_OWNER(1)); | ||
37 | } | ||
38 | } | ||
39 | |||
40 | void board_debug_uart_init(void) | 21 | void board_debug_uart_init(void) |
41 | { | 22 | { |
42 | /* too early for the pinctrl driver, so configure the UART pins here */ | 23 | /* too early for the pinctrl driver, so configure the UART pins here */ |
43 | setbits_le32(BASE_DEVCPU_GCB + MSCC_GPIO_ALT0, BIT(6) | BIT(7)); | 24 | mscc_gpio_set_alternate(6, 1); |
44 | clrbits_le32(BASE_DEVCPU_GCB + MSCC_GPIO_ALT1, BIT(6) | BIT(7)); | 25 | mscc_gpio_set_alternate(7, 1); |
45 | } | 26 | } |
46 | 27 | ||
47 | int board_early_init_r(void) | 28 | int board_early_init_r(void) |
48 | { | 29 | { |
49 | /* Prepare SPI controller to be used in master mode */ | 30 | /* Prepare SPI controller to be used in master mode */ |
50 | writel(0, BASE_CFG + ICPU_SW_MODE); | 31 | writel(0, BASE_CFG + ICPU_SW_MODE); |
51 | clrsetbits_le32(BASE_CFG + ICPU_GENERAL_CTRL, | 32 | clrsetbits_le32(BASE_CFG + ICPU_GENERAL_CTRL, |
52 | ICPU_GENERAL_CTRL_IF_SI_OWNER_M, | 33 | ICPU_GENERAL_CTRL_IF_SI_OWNER_M, |
53 | ICPU_GENERAL_CTRL_IF_SI_OWNER(2)); | 34 | ICPU_GENERAL_CTRL_IF_SI_OWNER(2)); |
54 | 35 | ||
55 | /* Address of boot parameters */ | 36 | /* Address of boot parameters */ |
56 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE; | 37 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE; |
38 | |||
39 | /* LED setup */ | ||
40 | if (IS_ENABLED(CONFIG_LED)) | ||
41 | led_default_state(); | ||
42 | |||
57 | return 0; | 43 | return 0; |
58 | } | 44 | } |
45 | |||
46 | static void do_board_detect(void) | ||
47 | { | ||
48 | u16 dummy = 0; | ||
49 | |||
50 | /* Enable MIIM */ | ||
51 | mscc_gpio_set_alternate(14, 1); | ||
52 | mscc_gpio_set_alternate(15, 1); | ||
53 | if (mscc_phy_rd(1, 0, 0, &dummy) == 0) | ||
54 | gd->board_type = BOARD_TYPE_PCB120; | ||
55 | else | ||
56 | gd->board_type = BOARD_TYPE_PCB123; | ||
57 | } | ||
58 | |||
59 | #if defined(CONFIG_MULTI_DTB_FIT) | ||
60 | int board_fit_config_name_match(const char *name) | ||
61 | { |
configs/bcm968380gerg_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM6838=y | 4 | CONFIG_SOC_BMIPS_BCM6838=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_NR_DRAM_BANKS=1 | 8 | CONFIG_NR_DRAM_BANKS=1 |
9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
10 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 10 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
11 | CONFIG_DISPLAY_CPUINFO=y | 11 | CONFIG_DISPLAY_CPUINFO=y |
12 | CONFIG_HUSH_PARSER=y | 12 | CONFIG_HUSH_PARSER=y |
13 | CONFIG_SYS_PROMPT="bcm968380gerg # " | 13 | CONFIG_SYS_PROMPT="bcm968380gerg # " |
14 | CONFIG_CMD_CPU=y | 14 | CONFIG_CMD_CPU=y |
15 | CONFIG_CMD_LICENSE=y | 15 | CONFIG_CMD_LICENSE=y |
16 | # CONFIG_CMD_BOOTD is not set | 16 | # CONFIG_CMD_BOOTD is not set |
17 | # CONFIG_CMD_ELF is not set | 17 | # CONFIG_CMD_ELF is not set |
18 | # CONFIG_CMD_XIMG is not set | 18 | # CONFIG_CMD_XIMG is not set |
19 | # CONFIG_CMD_EXPORTENV is not set | 19 | # CONFIG_CMD_EXPORTENV is not set |
20 | # CONFIG_CMD_IMPORTENV is not set | 20 | # CONFIG_CMD_IMPORTENV is not set |
21 | # CONFIG_CMD_EDITENV is not set | 21 | # CONFIG_CMD_EDITENV is not set |
22 | # CONFIG_CMD_SAVEENV is not set | 22 | # CONFIG_CMD_SAVEENV is not set |
23 | # CONFIG_CMD_ENV_EXISTS is not set | 23 | # CONFIG_CMD_ENV_EXISTS is not set |
24 | # CONFIG_CMD_CRC32 is not set | 24 | # CONFIG_CMD_CRC32 is not set |
25 | CONFIG_CMD_MEMINFO=y | 25 | CONFIG_CMD_MEMINFO=y |
26 | # CONFIG_CMD_FLASH is not set | 26 | # CONFIG_CMD_FLASH is not set |
27 | # CONFIG_CMD_LOADS is not set | 27 | # CONFIG_CMD_LOADS is not set |
28 | # CONFIG_CMD_MISC is not set | 28 | # CONFIG_CMD_MISC is not set |
29 | CONFIG_OF_EMBED=y | ||
30 | CONFIG_DEFAULT_DEVICE_TREE="brcm,bcm968380gerg" | 29 | CONFIG_DEFAULT_DEVICE_TREE="brcm,bcm968380gerg" |
31 | # CONFIG_NET is not set | 30 | # CONFIG_NET is not set |
32 | # CONFIG_DM_DEVICE_REMOVE is not set | 31 | # CONFIG_DM_DEVICE_REMOVE is not set |
33 | CONFIG_HAVE_BLOCK_DEVICE=y | 32 | CONFIG_HAVE_BLOCK_DEVICE=y |
34 | CONFIG_DM_GPIO=y | 33 | CONFIG_DM_GPIO=y |
35 | CONFIG_LED=y | 34 | CONFIG_LED=y |
36 | CONFIG_LED_BCM6328=y | 35 | CONFIG_LED_BCM6328=y |
37 | CONFIG_LED_BLINK=y | 36 | CONFIG_LED_BLINK=y |
38 | CONFIG_SPI_FLASH=y | 37 | CONFIG_SPI_FLASH=y |
39 | # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set | 38 | # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set |
40 | CONFIG_PHY=y | 39 | CONFIG_PHY=y |
41 | CONFIG_BCM6368_USBH_PHY=y | 40 | CONFIG_BCM6368_USBH_PHY=y |
42 | CONFIG_PINCTRL=y | 41 | CONFIG_PINCTRL=y |
43 | CONFIG_POWER_DOMAIN=y | 42 | CONFIG_POWER_DOMAIN=y |
44 | CONFIG_BCM6328_POWER_DOMAIN=y | 43 | CONFIG_BCM6328_POWER_DOMAIN=y |
45 | CONFIG_DM_RESET=y | 44 | CONFIG_DM_RESET=y |
46 | CONFIG_RESET_BCM6345=y | 45 | CONFIG_RESET_BCM6345=y |
47 | # CONFIG_SPL_SERIAL_PRESENT is not set | 46 | # CONFIG_SPL_SERIAL_PRESENT is not set |
48 | CONFIG_DM_SERIAL=y | 47 | CONFIG_DM_SERIAL=y |
49 | CONFIG_BCM6345_SERIAL=y | 48 | CONFIG_BCM6345_SERIAL=y |
50 | CONFIG_LZO=y | 49 | CONFIG_LZO=y |
51 | 50 |
configs/boston32r2_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x9FC00000 | 2 | CONFIG_SYS_TEXT_BASE=0x9FC00000 |
3 | CONFIG_TARGET_BOSTON=y | 3 | CONFIG_TARGET_BOSTON=y |
4 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 4 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
5 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
6 | CONFIG_MIPS_BOOT_FDT=y | 6 | CONFIG_MIPS_BOOT_FDT=y |
7 | CONFIG_DISTRO_DEFAULTS=y | 7 | CONFIG_DISTRO_DEFAULTS=y |
8 | CONFIG_FIT=y | 8 | CONFIG_FIT=y |
9 | CONFIG_FIT_VERBOSE=y | 9 | CONFIG_FIT_VERBOSE=y |
10 | CONFIG_FIT_BEST_MATCH=y | 10 | CONFIG_FIT_BEST_MATCH=y |
11 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 11 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
12 | CONFIG_SYS_PROMPT="boston # " | 12 | CONFIG_SYS_PROMPT="boston # " |
13 | # CONFIG_CMD_ELF is not set | 13 | # CONFIG_CMD_ELF is not set |
14 | CONFIG_CMD_GREPENV=y | 14 | CONFIG_CMD_GREPENV=y |
15 | CONFIG_CMD_MEMTEST=y | 15 | CONFIG_CMD_MEMTEST=y |
16 | # CONFIG_CMD_LOADB is not set | 16 | # CONFIG_CMD_LOADB is not set |
17 | # CONFIG_CMD_LOADS is not set | 17 | # CONFIG_CMD_LOADS is not set |
18 | CONFIG_CMD_PCI=y | 18 | CONFIG_CMD_PCI=y |
19 | CONFIG_CMD_SNTP=y | 19 | CONFIG_CMD_SNTP=y |
20 | CONFIG_CMD_DNS=y | 20 | CONFIG_CMD_DNS=y |
21 | CONFIG_CMD_LINK_LOCAL=y | 21 | CONFIG_CMD_LINK_LOCAL=y |
22 | CONFIG_CMD_TIME=y | 22 | CONFIG_CMD_TIME=y |
23 | CONFIG_CMD_EXT4_WRITE=y | 23 | CONFIG_CMD_EXT4_WRITE=y |
24 | # CONFIG_DOS_PARTITION is not set | 24 | # CONFIG_DOS_PARTITION is not set |
25 | # CONFIG_ISO_PARTITION is not set | 25 | # CONFIG_ISO_PARTITION is not set |
26 | CONFIG_OF_EMBED=y | ||
27 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" | 26 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" |
28 | CONFIG_ENV_IS_IN_FLASH=y | 27 | CONFIG_ENV_IS_IN_FLASH=y |
29 | CONFIG_NET_RANDOM_ETHADDR=y | 28 | CONFIG_NET_RANDOM_ETHADDR=y |
30 | CONFIG_CLK=y | 29 | CONFIG_CLK=y |
31 | CONFIG_MTD=y | 30 | CONFIG_MTD=y |
32 | CONFIG_MTD_NOR_FLASH=y | 31 | CONFIG_MTD_NOR_FLASH=y |
33 | CONFIG_FLASH_CFI_DRIVER=y | 32 | CONFIG_FLASH_CFI_DRIVER=y |
34 | CONFIG_CFI_FLASH=y | 33 | CONFIG_CFI_FLASH=y |
35 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 34 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
36 | CONFIG_SYS_FLASH_PROTECTION=y | 35 | CONFIG_SYS_FLASH_PROTECTION=y |
37 | CONFIG_SYS_FLASH_CFI=y | 36 | CONFIG_SYS_FLASH_CFI=y |
38 | CONFIG_DM_ETH=y | 37 | CONFIG_DM_ETH=y |
39 | CONFIG_PCH_GBE=y | 38 | CONFIG_PCH_GBE=y |
40 | CONFIG_PCI=y | 39 | CONFIG_PCI=y |
41 | CONFIG_DM_PCI=y | 40 | CONFIG_DM_PCI=y |
42 | CONFIG_PCI_XILINX=y | 41 | CONFIG_PCI_XILINX=y |
43 | CONFIG_SYS_NS16550=y | 42 | CONFIG_SYS_NS16550=y |
44 | CONFIG_LZ4=y | 43 | CONFIG_LZ4=y |
45 | 44 |
configs/boston32r2el_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x9FC00000 | 2 | CONFIG_SYS_TEXT_BASE=0x9FC00000 |
3 | CONFIG_TARGET_BOSTON=y | 3 | CONFIG_TARGET_BOSTON=y |
4 | CONFIG_SYS_LITTLE_ENDIAN=y | 4 | CONFIG_SYS_LITTLE_ENDIAN=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_DISTRO_DEFAULTS=y | 8 | CONFIG_DISTRO_DEFAULTS=y |
9 | CONFIG_FIT=y | 9 | CONFIG_FIT=y |
10 | CONFIG_FIT_VERBOSE=y | 10 | CONFIG_FIT_VERBOSE=y |
11 | CONFIG_FIT_BEST_MATCH=y | 11 | CONFIG_FIT_BEST_MATCH=y |
12 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 12 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
13 | CONFIG_SYS_PROMPT="boston # " | 13 | CONFIG_SYS_PROMPT="boston # " |
14 | # CONFIG_CMD_ELF is not set | 14 | # CONFIG_CMD_ELF is not set |
15 | CONFIG_CMD_GREPENV=y | 15 | CONFIG_CMD_GREPENV=y |
16 | CONFIG_CMD_MEMTEST=y | 16 | CONFIG_CMD_MEMTEST=y |
17 | # CONFIG_CMD_LOADB is not set | 17 | # CONFIG_CMD_LOADB is not set |
18 | # CONFIG_CMD_LOADS is not set | 18 | # CONFIG_CMD_LOADS is not set |
19 | CONFIG_CMD_PCI=y | 19 | CONFIG_CMD_PCI=y |
20 | CONFIG_CMD_SNTP=y | 20 | CONFIG_CMD_SNTP=y |
21 | CONFIG_CMD_DNS=y | 21 | CONFIG_CMD_DNS=y |
22 | CONFIG_CMD_LINK_LOCAL=y | 22 | CONFIG_CMD_LINK_LOCAL=y |
23 | CONFIG_CMD_TIME=y | 23 | CONFIG_CMD_TIME=y |
24 | CONFIG_CMD_EXT4_WRITE=y | 24 | CONFIG_CMD_EXT4_WRITE=y |
25 | # CONFIG_DOS_PARTITION is not set | 25 | # CONFIG_DOS_PARTITION is not set |
26 | # CONFIG_ISO_PARTITION is not set | 26 | # CONFIG_ISO_PARTITION is not set |
27 | CONFIG_OF_EMBED=y | ||
28 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" | 27 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" |
29 | CONFIG_ENV_IS_IN_FLASH=y | 28 | CONFIG_ENV_IS_IN_FLASH=y |
30 | CONFIG_NET_RANDOM_ETHADDR=y | 29 | CONFIG_NET_RANDOM_ETHADDR=y |
31 | CONFIG_CLK=y | 30 | CONFIG_CLK=y |
32 | CONFIG_MTD=y | 31 | CONFIG_MTD=y |
33 | CONFIG_MTD_NOR_FLASH=y | 32 | CONFIG_MTD_NOR_FLASH=y |
34 | CONFIG_FLASH_CFI_DRIVER=y | 33 | CONFIG_FLASH_CFI_DRIVER=y |
35 | CONFIG_CFI_FLASH=y | 34 | CONFIG_CFI_FLASH=y |
36 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 35 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
37 | CONFIG_SYS_FLASH_PROTECTION=y | 36 | CONFIG_SYS_FLASH_PROTECTION=y |
38 | CONFIG_SYS_FLASH_CFI=y | 37 | CONFIG_SYS_FLASH_CFI=y |
39 | CONFIG_DM_ETH=y | 38 | CONFIG_DM_ETH=y |
40 | CONFIG_PCH_GBE=y | 39 | CONFIG_PCH_GBE=y |
41 | CONFIG_PCI=y | 40 | CONFIG_PCI=y |
42 | CONFIG_DM_PCI=y | 41 | CONFIG_DM_PCI=y |
43 | CONFIG_PCI_XILINX=y | 42 | CONFIG_PCI_XILINX=y |
44 | CONFIG_SYS_NS16550=y | 43 | CONFIG_SYS_NS16550=y |
45 | CONFIG_LZ4=y | 44 | CONFIG_LZ4=y |
46 | 45 |
configs/boston32r6_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x9FC00000 | 2 | CONFIG_SYS_TEXT_BASE=0x9FC00000 |
3 | CONFIG_TARGET_BOSTON=y | 3 | CONFIG_TARGET_BOSTON=y |
4 | CONFIG_CPU_MIPS32_R6=y | 4 | CONFIG_CPU_MIPS32_R6=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_DISTRO_DEFAULTS=y | 8 | CONFIG_DISTRO_DEFAULTS=y |
9 | CONFIG_FIT=y | 9 | CONFIG_FIT=y |
10 | CONFIG_FIT_VERBOSE=y | 10 | CONFIG_FIT_VERBOSE=y |
11 | CONFIG_FIT_BEST_MATCH=y | 11 | CONFIG_FIT_BEST_MATCH=y |
12 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 12 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
13 | CONFIG_SYS_PROMPT="boston # " | 13 | CONFIG_SYS_PROMPT="boston # " |
14 | # CONFIG_CMD_ELF is not set | 14 | # CONFIG_CMD_ELF is not set |
15 | CONFIG_CMD_GREPENV=y | 15 | CONFIG_CMD_GREPENV=y |
16 | CONFIG_CMD_MEMTEST=y | 16 | CONFIG_CMD_MEMTEST=y |
17 | # CONFIG_CMD_LOADB is not set | 17 | # CONFIG_CMD_LOADB is not set |
18 | # CONFIG_CMD_LOADS is not set | 18 | # CONFIG_CMD_LOADS is not set |
19 | CONFIG_CMD_PCI=y | 19 | CONFIG_CMD_PCI=y |
20 | CONFIG_CMD_SNTP=y | 20 | CONFIG_CMD_SNTP=y |
21 | CONFIG_CMD_DNS=y | 21 | CONFIG_CMD_DNS=y |
22 | CONFIG_CMD_LINK_LOCAL=y | 22 | CONFIG_CMD_LINK_LOCAL=y |
23 | CONFIG_CMD_TIME=y | 23 | CONFIG_CMD_TIME=y |
24 | CONFIG_CMD_EXT4_WRITE=y | 24 | CONFIG_CMD_EXT4_WRITE=y |
25 | # CONFIG_DOS_PARTITION is not set | 25 | # CONFIG_DOS_PARTITION is not set |
26 | # CONFIG_ISO_PARTITION is not set | 26 | # CONFIG_ISO_PARTITION is not set |
27 | CONFIG_OF_EMBED=y | ||
28 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" | 27 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" |
29 | CONFIG_ENV_IS_IN_FLASH=y | 28 | CONFIG_ENV_IS_IN_FLASH=y |
30 | CONFIG_NET_RANDOM_ETHADDR=y | 29 | CONFIG_NET_RANDOM_ETHADDR=y |
31 | CONFIG_CLK=y | 30 | CONFIG_CLK=y |
32 | CONFIG_MTD=y | 31 | CONFIG_MTD=y |
33 | CONFIG_MTD_NOR_FLASH=y | 32 | CONFIG_MTD_NOR_FLASH=y |
34 | CONFIG_FLASH_CFI_DRIVER=y | 33 | CONFIG_FLASH_CFI_DRIVER=y |
35 | CONFIG_CFI_FLASH=y | 34 | CONFIG_CFI_FLASH=y |
36 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 35 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
37 | CONFIG_SYS_FLASH_PROTECTION=y | 36 | CONFIG_SYS_FLASH_PROTECTION=y |
38 | CONFIG_SYS_FLASH_CFI=y | 37 | CONFIG_SYS_FLASH_CFI=y |
39 | CONFIG_DM_ETH=y | 38 | CONFIG_DM_ETH=y |
40 | CONFIG_PCH_GBE=y | 39 | CONFIG_PCH_GBE=y |
41 | CONFIG_PCI=y | 40 | CONFIG_PCI=y |
42 | CONFIG_DM_PCI=y | 41 | CONFIG_DM_PCI=y |
43 | CONFIG_PCI_XILINX=y | 42 | CONFIG_PCI_XILINX=y |
44 | CONFIG_SYS_NS16550=y | 43 | CONFIG_SYS_NS16550=y |
45 | CONFIG_LZ4=y | 44 | CONFIG_LZ4=y |
46 | 45 |
configs/boston32r6el_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x9FC00000 | 2 | CONFIG_SYS_TEXT_BASE=0x9FC00000 |
3 | CONFIG_TARGET_BOSTON=y | 3 | CONFIG_TARGET_BOSTON=y |
4 | CONFIG_SYS_LITTLE_ENDIAN=y | 4 | CONFIG_SYS_LITTLE_ENDIAN=y |
5 | CONFIG_CPU_MIPS32_R6=y | 5 | CONFIG_CPU_MIPS32_R6=y |
6 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
8 | CONFIG_MIPS_BOOT_FDT=y | 8 | CONFIG_MIPS_BOOT_FDT=y |
9 | CONFIG_DISTRO_DEFAULTS=y | 9 | CONFIG_DISTRO_DEFAULTS=y |
10 | CONFIG_FIT=y | 10 | CONFIG_FIT=y |
11 | CONFIG_FIT_VERBOSE=y | 11 | CONFIG_FIT_VERBOSE=y |
12 | CONFIG_FIT_BEST_MATCH=y | 12 | CONFIG_FIT_BEST_MATCH=y |
13 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 13 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
14 | CONFIG_SYS_PROMPT="boston # " | 14 | CONFIG_SYS_PROMPT="boston # " |
15 | # CONFIG_CMD_ELF is not set | 15 | # CONFIG_CMD_ELF is not set |
16 | CONFIG_CMD_GREPENV=y | 16 | CONFIG_CMD_GREPENV=y |
17 | CONFIG_CMD_MEMTEST=y | 17 | CONFIG_CMD_MEMTEST=y |
18 | # CONFIG_CMD_LOADB is not set | 18 | # CONFIG_CMD_LOADB is not set |
19 | # CONFIG_CMD_LOADS is not set | 19 | # CONFIG_CMD_LOADS is not set |
20 | CONFIG_CMD_PCI=y | 20 | CONFIG_CMD_PCI=y |
21 | CONFIG_CMD_SNTP=y | 21 | CONFIG_CMD_SNTP=y |
22 | CONFIG_CMD_DNS=y | 22 | CONFIG_CMD_DNS=y |
23 | CONFIG_CMD_LINK_LOCAL=y | 23 | CONFIG_CMD_LINK_LOCAL=y |
24 | CONFIG_CMD_TIME=y | 24 | CONFIG_CMD_TIME=y |
25 | CONFIG_CMD_EXT4_WRITE=y | 25 | CONFIG_CMD_EXT4_WRITE=y |
26 | # CONFIG_DOS_PARTITION is not set | 26 | # CONFIG_DOS_PARTITION is not set |
27 | # CONFIG_ISO_PARTITION is not set | 27 | # CONFIG_ISO_PARTITION is not set |
28 | CONFIG_OF_EMBED=y | ||
29 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" | 28 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" |
30 | CONFIG_ENV_IS_IN_FLASH=y | 29 | CONFIG_ENV_IS_IN_FLASH=y |
31 | CONFIG_NET_RANDOM_ETHADDR=y | 30 | CONFIG_NET_RANDOM_ETHADDR=y |
32 | CONFIG_CLK=y | 31 | CONFIG_CLK=y |
33 | CONFIG_MTD=y | 32 | CONFIG_MTD=y |
34 | CONFIG_MTD_NOR_FLASH=y | 33 | CONFIG_MTD_NOR_FLASH=y |
35 | CONFIG_FLASH_CFI_DRIVER=y | 34 | CONFIG_FLASH_CFI_DRIVER=y |
36 | CONFIG_CFI_FLASH=y | 35 | CONFIG_CFI_FLASH=y |
37 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 36 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
38 | CONFIG_SYS_FLASH_PROTECTION=y | 37 | CONFIG_SYS_FLASH_PROTECTION=y |
39 | CONFIG_SYS_FLASH_CFI=y | 38 | CONFIG_SYS_FLASH_CFI=y |
40 | CONFIG_DM_ETH=y | 39 | CONFIG_DM_ETH=y |
41 | CONFIG_PCH_GBE=y | 40 | CONFIG_PCH_GBE=y |
42 | CONFIG_PCI=y | 41 | CONFIG_PCI=y |
43 | CONFIG_DM_PCI=y | 42 | CONFIG_DM_PCI=y |
44 | CONFIG_PCI_XILINX=y | 43 | CONFIG_PCI_XILINX=y |
45 | CONFIG_SYS_NS16550=y | 44 | CONFIG_SYS_NS16550=y |
46 | CONFIG_LZ4=y | 45 | CONFIG_LZ4=y |
47 | 46 |
configs/boston64r2_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFF9FC00000 | 2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFF9FC00000 |
3 | CONFIG_TARGET_BOSTON=y | 3 | CONFIG_TARGET_BOSTON=y |
4 | CONFIG_CPU_MIPS64_R2=y | 4 | CONFIG_CPU_MIPS64_R2=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_DISTRO_DEFAULTS=y | 8 | CONFIG_DISTRO_DEFAULTS=y |
9 | CONFIG_FIT=y | 9 | CONFIG_FIT=y |
10 | CONFIG_FIT_VERBOSE=y | 10 | CONFIG_FIT_VERBOSE=y |
11 | CONFIG_FIT_BEST_MATCH=y | 11 | CONFIG_FIT_BEST_MATCH=y |
12 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 12 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
13 | CONFIG_SYS_PROMPT="boston # " | 13 | CONFIG_SYS_PROMPT="boston # " |
14 | # CONFIG_CMD_ELF is not set | 14 | # CONFIG_CMD_ELF is not set |
15 | CONFIG_CMD_GREPENV=y | 15 | CONFIG_CMD_GREPENV=y |
16 | CONFIG_CMD_MEMTEST=y | 16 | CONFIG_CMD_MEMTEST=y |
17 | # CONFIG_CMD_LOADB is not set | 17 | # CONFIG_CMD_LOADB is not set |
18 | # CONFIG_CMD_LOADS is not set | 18 | # CONFIG_CMD_LOADS is not set |
19 | CONFIG_CMD_PCI=y | 19 | CONFIG_CMD_PCI=y |
20 | CONFIG_CMD_SNTP=y | 20 | CONFIG_CMD_SNTP=y |
21 | CONFIG_CMD_DNS=y | 21 | CONFIG_CMD_DNS=y |
22 | CONFIG_CMD_LINK_LOCAL=y | 22 | CONFIG_CMD_LINK_LOCAL=y |
23 | CONFIG_CMD_TIME=y | 23 | CONFIG_CMD_TIME=y |
24 | CONFIG_CMD_EXT4_WRITE=y | 24 | CONFIG_CMD_EXT4_WRITE=y |
25 | # CONFIG_DOS_PARTITION is not set | 25 | # CONFIG_DOS_PARTITION is not set |
26 | # CONFIG_ISO_PARTITION is not set | 26 | # CONFIG_ISO_PARTITION is not set |
27 | CONFIG_OF_EMBED=y | ||
28 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" | 27 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" |
29 | CONFIG_ENV_IS_IN_FLASH=y | 28 | CONFIG_ENV_IS_IN_FLASH=y |
30 | CONFIG_NET_RANDOM_ETHADDR=y | 29 | CONFIG_NET_RANDOM_ETHADDR=y |
31 | CONFIG_CLK=y | 30 | CONFIG_CLK=y |
32 | CONFIG_MTD=y | 31 | CONFIG_MTD=y |
33 | CONFIG_MTD_NOR_FLASH=y | 32 | CONFIG_MTD_NOR_FLASH=y |
34 | CONFIG_FLASH_CFI_DRIVER=y | 33 | CONFIG_FLASH_CFI_DRIVER=y |
35 | CONFIG_CFI_FLASH=y | 34 | CONFIG_CFI_FLASH=y |
36 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 35 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
37 | CONFIG_SYS_FLASH_PROTECTION=y | 36 | CONFIG_SYS_FLASH_PROTECTION=y |
38 | CONFIG_SYS_FLASH_CFI=y | 37 | CONFIG_SYS_FLASH_CFI=y |
39 | CONFIG_DM_ETH=y | 38 | CONFIG_DM_ETH=y |
40 | CONFIG_PCH_GBE=y | 39 | CONFIG_PCH_GBE=y |
41 | CONFIG_PCI=y | 40 | CONFIG_PCI=y |
42 | CONFIG_DM_PCI=y | 41 | CONFIG_DM_PCI=y |
43 | CONFIG_PCI_XILINX=y | 42 | CONFIG_PCI_XILINX=y |
44 | CONFIG_SYS_NS16550=y | 43 | CONFIG_SYS_NS16550=y |
45 | CONFIG_LZ4=y | 44 | CONFIG_LZ4=y |
46 | 45 |
configs/boston64r2el_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFF9FC00000 | 2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFF9FC00000 |
3 | CONFIG_TARGET_BOSTON=y | 3 | CONFIG_TARGET_BOSTON=y |
4 | CONFIG_SYS_LITTLE_ENDIAN=y | 4 | CONFIG_SYS_LITTLE_ENDIAN=y |
5 | CONFIG_CPU_MIPS64_R2=y | 5 | CONFIG_CPU_MIPS64_R2=y |
6 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
8 | CONFIG_MIPS_BOOT_FDT=y | 8 | CONFIG_MIPS_BOOT_FDT=y |
9 | CONFIG_DISTRO_DEFAULTS=y | 9 | CONFIG_DISTRO_DEFAULTS=y |
10 | CONFIG_FIT=y | 10 | CONFIG_FIT=y |
11 | CONFIG_FIT_VERBOSE=y | 11 | CONFIG_FIT_VERBOSE=y |
12 | CONFIG_FIT_BEST_MATCH=y | 12 | CONFIG_FIT_BEST_MATCH=y |
13 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 13 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
14 | CONFIG_SYS_PROMPT="boston # " | 14 | CONFIG_SYS_PROMPT="boston # " |
15 | # CONFIG_CMD_ELF is not set | 15 | # CONFIG_CMD_ELF is not set |
16 | CONFIG_CMD_GREPENV=y | 16 | CONFIG_CMD_GREPENV=y |
17 | CONFIG_CMD_MEMTEST=y | 17 | CONFIG_CMD_MEMTEST=y |
18 | # CONFIG_CMD_LOADB is not set | 18 | # CONFIG_CMD_LOADB is not set |
19 | # CONFIG_CMD_LOADS is not set | 19 | # CONFIG_CMD_LOADS is not set |
20 | CONFIG_CMD_PCI=y | 20 | CONFIG_CMD_PCI=y |
21 | CONFIG_CMD_SNTP=y | 21 | CONFIG_CMD_SNTP=y |
22 | CONFIG_CMD_DNS=y | 22 | CONFIG_CMD_DNS=y |
23 | CONFIG_CMD_LINK_LOCAL=y | 23 | CONFIG_CMD_LINK_LOCAL=y |
24 | CONFIG_CMD_TIME=y | 24 | CONFIG_CMD_TIME=y |
25 | CONFIG_CMD_EXT4_WRITE=y | 25 | CONFIG_CMD_EXT4_WRITE=y |
26 | # CONFIG_DOS_PARTITION is not set | 26 | # CONFIG_DOS_PARTITION is not set |
27 | # CONFIG_ISO_PARTITION is not set | 27 | # CONFIG_ISO_PARTITION is not set |
28 | CONFIG_OF_EMBED=y | ||
29 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" | 28 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" |
30 | CONFIG_ENV_IS_IN_FLASH=y | 29 | CONFIG_ENV_IS_IN_FLASH=y |
31 | CONFIG_NET_RANDOM_ETHADDR=y | 30 | CONFIG_NET_RANDOM_ETHADDR=y |
32 | CONFIG_CLK=y | 31 | CONFIG_CLK=y |
33 | CONFIG_MTD=y | 32 | CONFIG_MTD=y |
34 | CONFIG_MTD_NOR_FLASH=y | 33 | CONFIG_MTD_NOR_FLASH=y |
35 | CONFIG_FLASH_CFI_DRIVER=y | 34 | CONFIG_FLASH_CFI_DRIVER=y |
36 | CONFIG_CFI_FLASH=y | 35 | CONFIG_CFI_FLASH=y |
37 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 36 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
38 | CONFIG_SYS_FLASH_PROTECTION=y | 37 | CONFIG_SYS_FLASH_PROTECTION=y |
39 | CONFIG_SYS_FLASH_CFI=y | 38 | CONFIG_SYS_FLASH_CFI=y |
40 | CONFIG_DM_ETH=y | 39 | CONFIG_DM_ETH=y |
41 | CONFIG_PCH_GBE=y | 40 | CONFIG_PCH_GBE=y |
42 | CONFIG_PCI=y | 41 | CONFIG_PCI=y |
43 | CONFIG_DM_PCI=y | 42 | CONFIG_DM_PCI=y |
44 | CONFIG_PCI_XILINX=y | 43 | CONFIG_PCI_XILINX=y |
45 | CONFIG_SYS_NS16550=y | 44 | CONFIG_SYS_NS16550=y |
46 | CONFIG_LZ4=y | 45 | CONFIG_LZ4=y |
47 | 46 |
configs/boston64r6_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFF9FC00000 | 2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFF9FC00000 |
3 | CONFIG_TARGET_BOSTON=y | 3 | CONFIG_TARGET_BOSTON=y |
4 | CONFIG_CPU_MIPS64_R6=y | 4 | CONFIG_CPU_MIPS64_R6=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_DISTRO_DEFAULTS=y | 8 | CONFIG_DISTRO_DEFAULTS=y |
9 | CONFIG_FIT=y | 9 | CONFIG_FIT=y |
10 | CONFIG_FIT_VERBOSE=y | 10 | CONFIG_FIT_VERBOSE=y |
11 | CONFIG_FIT_BEST_MATCH=y | 11 | CONFIG_FIT_BEST_MATCH=y |
12 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 12 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
13 | CONFIG_SYS_PROMPT="boston # " | 13 | CONFIG_SYS_PROMPT="boston # " |
14 | # CONFIG_CMD_ELF is not set | 14 | # CONFIG_CMD_ELF is not set |
15 | CONFIG_CMD_GREPENV=y | 15 | CONFIG_CMD_GREPENV=y |
16 | CONFIG_CMD_MEMTEST=y | 16 | CONFIG_CMD_MEMTEST=y |
17 | # CONFIG_CMD_LOADB is not set | 17 | # CONFIG_CMD_LOADB is not set |
18 | # CONFIG_CMD_LOADS is not set | 18 | # CONFIG_CMD_LOADS is not set |
19 | CONFIG_CMD_PCI=y | 19 | CONFIG_CMD_PCI=y |
20 | CONFIG_CMD_SNTP=y | 20 | CONFIG_CMD_SNTP=y |
21 | CONFIG_CMD_DNS=y | 21 | CONFIG_CMD_DNS=y |
22 | CONFIG_CMD_LINK_LOCAL=y | 22 | CONFIG_CMD_LINK_LOCAL=y |
23 | CONFIG_CMD_TIME=y | 23 | CONFIG_CMD_TIME=y |
24 | CONFIG_CMD_EXT4_WRITE=y | 24 | CONFIG_CMD_EXT4_WRITE=y |
25 | # CONFIG_DOS_PARTITION is not set | 25 | # CONFIG_DOS_PARTITION is not set |
26 | # CONFIG_ISO_PARTITION is not set | 26 | # CONFIG_ISO_PARTITION is not set |
27 | CONFIG_OF_EMBED=y | ||
28 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" | 27 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" |
29 | CONFIG_ENV_IS_IN_FLASH=y | 28 | CONFIG_ENV_IS_IN_FLASH=y |
30 | CONFIG_NET_RANDOM_ETHADDR=y | 29 | CONFIG_NET_RANDOM_ETHADDR=y |
31 | CONFIG_CLK=y | 30 | CONFIG_CLK=y |
32 | CONFIG_MTD=y | 31 | CONFIG_MTD=y |
33 | CONFIG_MTD_NOR_FLASH=y | 32 | CONFIG_MTD_NOR_FLASH=y |
34 | CONFIG_FLASH_CFI_DRIVER=y | 33 | CONFIG_FLASH_CFI_DRIVER=y |
35 | CONFIG_CFI_FLASH=y | 34 | CONFIG_CFI_FLASH=y |
36 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 35 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
37 | CONFIG_SYS_FLASH_PROTECTION=y | 36 | CONFIG_SYS_FLASH_PROTECTION=y |
38 | CONFIG_SYS_FLASH_CFI=y | 37 | CONFIG_SYS_FLASH_CFI=y |
39 | CONFIG_DM_ETH=y | 38 | CONFIG_DM_ETH=y |
40 | CONFIG_PCH_GBE=y | 39 | CONFIG_PCH_GBE=y |
41 | CONFIG_PCI=y | 40 | CONFIG_PCI=y |
42 | CONFIG_DM_PCI=y | 41 | CONFIG_DM_PCI=y |
43 | CONFIG_PCI_XILINX=y | 42 | CONFIG_PCI_XILINX=y |
44 | CONFIG_SYS_NS16550=y | 43 | CONFIG_SYS_NS16550=y |
45 | CONFIG_LZ4=y | 44 | CONFIG_LZ4=y |
46 | 45 |
configs/boston64r6el_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFF9FC00000 | 2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFF9FC00000 |
3 | CONFIG_TARGET_BOSTON=y | 3 | CONFIG_TARGET_BOSTON=y |
4 | CONFIG_SYS_LITTLE_ENDIAN=y | 4 | CONFIG_SYS_LITTLE_ENDIAN=y |
5 | CONFIG_CPU_MIPS64_R6=y | 5 | CONFIG_CPU_MIPS64_R6=y |
6 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
8 | CONFIG_MIPS_BOOT_FDT=y | 8 | CONFIG_MIPS_BOOT_FDT=y |
9 | CONFIG_DISTRO_DEFAULTS=y | 9 | CONFIG_DISTRO_DEFAULTS=y |
10 | CONFIG_FIT=y | 10 | CONFIG_FIT=y |
11 | CONFIG_FIT_VERBOSE=y | 11 | CONFIG_FIT_VERBOSE=y |
12 | CONFIG_FIT_BEST_MATCH=y | 12 | CONFIG_FIT_BEST_MATCH=y |
13 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 13 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
14 | CONFIG_SYS_PROMPT="boston # " | 14 | CONFIG_SYS_PROMPT="boston # " |
15 | # CONFIG_CMD_ELF is not set | 15 | # CONFIG_CMD_ELF is not set |
16 | CONFIG_CMD_GREPENV=y | 16 | CONFIG_CMD_GREPENV=y |
17 | CONFIG_CMD_MEMTEST=y | 17 | CONFIG_CMD_MEMTEST=y |
18 | # CONFIG_CMD_LOADB is not set | 18 | # CONFIG_CMD_LOADB is not set |
19 | # CONFIG_CMD_LOADS is not set | 19 | # CONFIG_CMD_LOADS is not set |
20 | CONFIG_CMD_PCI=y | 20 | CONFIG_CMD_PCI=y |
21 | CONFIG_CMD_SNTP=y | 21 | CONFIG_CMD_SNTP=y |
22 | CONFIG_CMD_DNS=y | 22 | CONFIG_CMD_DNS=y |
23 | CONFIG_CMD_LINK_LOCAL=y | 23 | CONFIG_CMD_LINK_LOCAL=y |
24 | CONFIG_CMD_TIME=y | 24 | CONFIG_CMD_TIME=y |
25 | CONFIG_CMD_EXT4_WRITE=y | 25 | CONFIG_CMD_EXT4_WRITE=y |
26 | # CONFIG_DOS_PARTITION is not set | 26 | # CONFIG_DOS_PARTITION is not set |
27 | # CONFIG_ISO_PARTITION is not set | 27 | # CONFIG_ISO_PARTITION is not set |
28 | CONFIG_OF_EMBED=y | ||
29 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" | 28 | CONFIG_DEFAULT_DEVICE_TREE="img,boston" |
30 | CONFIG_ENV_IS_IN_FLASH=y | 29 | CONFIG_ENV_IS_IN_FLASH=y |
31 | CONFIG_NET_RANDOM_ETHADDR=y | 30 | CONFIG_NET_RANDOM_ETHADDR=y |
32 | CONFIG_CLK=y | 31 | CONFIG_CLK=y |
33 | CONFIG_MTD=y | 32 | CONFIG_MTD=y |
34 | CONFIG_MTD_NOR_FLASH=y | 33 | CONFIG_MTD_NOR_FLASH=y |
35 | CONFIG_FLASH_CFI_DRIVER=y | 34 | CONFIG_FLASH_CFI_DRIVER=y |
36 | CONFIG_CFI_FLASH=y | 35 | CONFIG_CFI_FLASH=y |
37 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 36 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
38 | CONFIG_SYS_FLASH_PROTECTION=y | 37 | CONFIG_SYS_FLASH_PROTECTION=y |
39 | CONFIG_SYS_FLASH_CFI=y | 38 | CONFIG_SYS_FLASH_CFI=y |
40 | CONFIG_DM_ETH=y | 39 | CONFIG_DM_ETH=y |
41 | CONFIG_PCH_GBE=y | 40 | CONFIG_PCH_GBE=y |
42 | CONFIG_PCI=y | 41 | CONFIG_PCI=y |
43 | CONFIG_DM_PCI=y | 42 | CONFIG_DM_PCI=y |
44 | CONFIG_PCI_XILINX=y | 43 | CONFIG_PCI_XILINX=y |
45 | CONFIG_SYS_NS16550=y | 44 | CONFIG_SYS_NS16550=y |
46 | CONFIG_LZ4=y | 45 | CONFIG_LZ4=y |
47 | 46 |
configs/ci20_mmc_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SPL_LDSCRIPT="arch/mips/mach-jz47xx/jz4780/u-boot-spl.lds" | ||
3 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
4 | CONFIG_SPL_GPIO_SUPPORT=y | 3 | CONFIG_SPL_GPIO_SUPPORT=y |
5 | CONFIG_SPL_LIBGENERIC_SUPPORT=y | 4 | CONFIG_SPL_LIBGENERIC_SUPPORT=y |
6 | CONFIG_SYS_MALLOC_F_LEN=0x2000 | 5 | CONFIG_SYS_MALLOC_F_LEN=0x2000 |
7 | CONFIG_SPL_MMC_SUPPORT=y | 6 | CONFIG_SPL_MMC_SUPPORT=y |
8 | CONFIG_SPL=y | 7 | CONFIG_SPL=y |
9 | CONFIG_ARCH_JZ47XX=y | 8 | CONFIG_ARCH_JZ47XX=y |
10 | CONFIG_NR_DRAM_BANKS=1 | 9 | CONFIG_NR_DRAM_BANKS=1 |
11 | CONFIG_FIT=y | 10 | CONFIG_FIT=y |
12 | CONFIG_USE_BOOTARGS=y | 11 | CONFIG_USE_BOOTARGS=y |
13 | CONFIG_BOOTARGS="console=ttyS4,115200 rw rootwait root=/dev/mmcblk0p1" | 12 | CONFIG_BOOTARGS="console=ttyS4,115200 rw rootwait root=/dev/mmcblk0p1" |
14 | CONFIG_USE_BOOTCOMMAND=y | 13 | CONFIG_USE_BOOTCOMMAND=y |
15 | CONFIG_BOOTCOMMAND="ext4load mmc 0:1 0x88000000 /boot/uImage; bootm 0x88000000" | 14 | CONFIG_BOOTCOMMAND="ext4load mmc 0:1 0x88000000 /boot/uImage; bootm 0x88000000" |
16 | CONFIG_MISC_INIT_R=y | 15 | CONFIG_MISC_INIT_R=y |
17 | CONFIG_DISPLAY_CPUINFO=y | 16 | CONFIG_DISPLAY_CPUINFO=y |
18 | CONFIG_BOARD_EARLY_INIT_F=y | 17 | CONFIG_BOARD_EARLY_INIT_F=y |
19 | # CONFIG_SPL_BANNER_PRINT is not set | 18 | # CONFIG_SPL_BANNER_PRINT is not set |
20 | # CONFIG_TPL_BANNER_PRINT is not set | 19 | # CONFIG_TPL_BANNER_PRINT is not set |
21 | CONFIG_HUSH_PARSER=y | 20 | CONFIG_HUSH_PARSER=y |
22 | CONFIG_CMD_DM=y | 21 | CONFIG_CMD_DM=y |
23 | # CONFIG_CMD_FLASH is not set | 22 | # CONFIG_CMD_FLASH is not set |
24 | CONFIG_CMD_MMC=y | 23 | CONFIG_CMD_MMC=y |
25 | CONFIG_CMD_DHCP=y | 24 | CONFIG_CMD_DHCP=y |
26 | CONFIG_CMD_EXT4=y | 25 | CONFIG_CMD_EXT4=y |
27 | CONFIG_CMD_FAT=y | 26 | CONFIG_CMD_FAT=y |
28 | # CONFIG_SPL_DOS_PARTITION is not set | 27 | # CONFIG_SPL_DOS_PARTITION is not set |
29 | CONFIG_DEFAULT_DEVICE_TREE="ci20" | 28 | CONFIG_DEFAULT_DEVICE_TREE="ci20" |
30 | CONFIG_ENV_IS_IN_MMC=y | 29 | CONFIG_ENV_IS_IN_MMC=y |
31 | # CONFIG_DM_WARN is not set | 30 | # CONFIG_DM_WARN is not set |
32 | # CONFIG_DM_DEVICE_REMOVE is not set | 31 | # CONFIG_DM_DEVICE_REMOVE is not set |
33 | CONFIG_JZ4780_EFUSE=y | 32 | CONFIG_JZ4780_EFUSE=y |
34 | CONFIG_MMC=y | 33 | CONFIG_MMC=y |
35 | CONFIG_MMC_BROKEN_CD=y | 34 | CONFIG_MMC_BROKEN_CD=y |
36 | CONFIG_DM_MMC=y | 35 | CONFIG_DM_MMC=y |
37 | # CONFIG_MMC_HW_PARTITIONING is not set | 36 | # CONFIG_MMC_HW_PARTITIONING is not set |
38 | CONFIG_MMC_IO_VOLTAGE=y | 37 | CONFIG_MMC_IO_VOLTAGE=y |
39 | CONFIG_MMC_UHS_SUPPORT=y | 38 | CONFIG_MMC_UHS_SUPPORT=y |
40 | CONFIG_MMC_HS400_SUPPORT=y | 39 | CONFIG_MMC_HS400_SUPPORT=y |
41 | # CONFIG_MMC_VERBOSE is not set | 40 | # CONFIG_MMC_VERBOSE is not set |
42 | CONFIG_SPL_MMC_TINY=y | 41 | CONFIG_SPL_MMC_TINY=y |
43 | CONFIG_JZ47XX_MMC=y | 42 | CONFIG_JZ47XX_MMC=y |
44 | CONFIG_DM_SERIAL=y | 43 | CONFIG_DM_SERIAL=y |
45 | CONFIG_SYS_NS16550=y | 44 | CONFIG_SYS_NS16550=y |
46 | CONFIG_USE_TINY_PRINTF=y | 45 | CONFIG_USE_TINY_PRINTF=y |
47 | CONFIG_SPL_TINY_MEMSET=y | 46 | CONFIG_SPL_TINY_MEMSET=y |
48 | CONFIG_LZO=y | 47 | CONFIG_LZO=y |
49 | 48 |
configs/comtrend_ar5315u_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM6318=y | 4 | CONFIG_SOC_BMIPS_BCM6318=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_NR_DRAM_BANKS=1 | 8 | CONFIG_NR_DRAM_BANKS=1 |
9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
10 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 10 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
11 | CONFIG_DISPLAY_CPUINFO=y | 11 | CONFIG_DISPLAY_CPUINFO=y |
12 | CONFIG_HUSH_PARSER=y | 12 | CONFIG_HUSH_PARSER=y |
13 | CONFIG_SYS_PROMPT="AR-5315un # " | 13 | CONFIG_SYS_PROMPT="AR-5315un # " |
14 | CONFIG_CMD_CPU=y | 14 | CONFIG_CMD_CPU=y |
15 | CONFIG_CMD_LICENSE=y | 15 | CONFIG_CMD_LICENSE=y |
16 | # CONFIG_CMD_BOOTD is not set | 16 | # CONFIG_CMD_BOOTD is not set |
17 | # CONFIG_CMD_ELF is not set | 17 | # CONFIG_CMD_ELF is not set |
18 | # CONFIG_CMD_XIMG is not set | 18 | # CONFIG_CMD_XIMG is not set |
19 | # CONFIG_CMD_EXPORTENV is not set | 19 | # CONFIG_CMD_EXPORTENV is not set |
20 | # CONFIG_CMD_IMPORTENV is not set | 20 | # CONFIG_CMD_IMPORTENV is not set |
21 | # CONFIG_CMD_EDITENV is not set | 21 | # CONFIG_CMD_EDITENV is not set |
22 | # CONFIG_CMD_SAVEENV is not set | 22 | # CONFIG_CMD_SAVEENV is not set |
23 | # CONFIG_CMD_ENV_EXISTS is not set | 23 | # CONFIG_CMD_ENV_EXISTS is not set |
24 | # CONFIG_CMD_CRC32 is not set | 24 | # CONFIG_CMD_CRC32 is not set |
25 | CONFIG_CMD_MEMINFO=y | 25 | CONFIG_CMD_MEMINFO=y |
26 | # CONFIG_CMD_FLASH is not set | 26 | # CONFIG_CMD_FLASH is not set |
27 | # CONFIG_CMD_LOADS is not set | 27 | # CONFIG_CMD_LOADS is not set |
28 | CONFIG_CMD_SF=y | 28 | CONFIG_CMD_SF=y |
29 | CONFIG_CMD_SPI=y | 29 | CONFIG_CMD_SPI=y |
30 | CONFIG_CMD_USB=y | 30 | CONFIG_CMD_USB=y |
31 | CONFIG_CMD_MII=y | 31 | CONFIG_CMD_MII=y |
32 | CONFIG_CMD_PING=y | 32 | CONFIG_CMD_PING=y |
33 | # CONFIG_CMD_MISC is not set | 33 | # CONFIG_CMD_MISC is not set |
34 | CONFIG_OF_EMBED=y | ||
35 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,ar-5315u" | 34 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,ar-5315u" |
36 | CONFIG_NET_RANDOM_ETHADDR=y | 35 | CONFIG_NET_RANDOM_ETHADDR=y |
37 | # CONFIG_DM_DEVICE_REMOVE is not set | 36 | # CONFIG_DM_DEVICE_REMOVE is not set |
38 | CONFIG_BCM6348_IUDMA=y | 37 | CONFIG_BCM6348_IUDMA=y |
39 | CONFIG_DM_GPIO=y | 38 | CONFIG_DM_GPIO=y |
40 | CONFIG_LED=y | 39 | CONFIG_LED=y |
41 | CONFIG_LED_BCM6328=y | 40 | CONFIG_LED_BCM6328=y |
42 | CONFIG_LED_BLINK=y | 41 | CONFIG_LED_BLINK=y |
43 | CONFIG_DM_SPI_FLASH=y | 42 | CONFIG_DM_SPI_FLASH=y |
44 | CONFIG_SPI_FLASH=y | 43 | CONFIG_SPI_FLASH=y |
45 | CONFIG_SPI_FLASH_WINBOND=y | 44 | CONFIG_SPI_FLASH_WINBOND=y |
46 | CONFIG_SPI_FLASH_MTD=y | 45 | CONFIG_SPI_FLASH_MTD=y |
47 | CONFIG_DM_ETH=y | 46 | CONFIG_DM_ETH=y |
48 | CONFIG_BCM6368_ETH=y | 47 | CONFIG_BCM6368_ETH=y |
49 | CONFIG_PHY=y | 48 | CONFIG_PHY=y |
50 | CONFIG_BCM6318_USBH_PHY=y | 49 | CONFIG_BCM6318_USBH_PHY=y |
51 | CONFIG_BCM6328_POWER_DOMAIN=y | 50 | CONFIG_BCM6328_POWER_DOMAIN=y |
52 | CONFIG_DM_RESET=y | 51 | CONFIG_DM_RESET=y |
53 | CONFIG_RESET_BCM6345=y | 52 | CONFIG_RESET_BCM6345=y |
54 | # CONFIG_SPL_SERIAL_PRESENT is not set | 53 | # CONFIG_SPL_SERIAL_PRESENT is not set |
55 | CONFIG_DM_SERIAL=y | 54 | CONFIG_DM_SERIAL=y |
56 | CONFIG_BCM6345_SERIAL=y | 55 | CONFIG_BCM6345_SERIAL=y |
57 | CONFIG_SPI=y | 56 | CONFIG_SPI=y |
58 | CONFIG_DM_SPI=y | 57 | CONFIG_DM_SPI=y |
59 | CONFIG_BCM63XX_HSSPI=y | 58 | CONFIG_BCM63XX_HSSPI=y |
60 | CONFIG_USB=y | 59 | CONFIG_USB=y |
61 | CONFIG_DM_USB=y | 60 | CONFIG_DM_USB=y |
62 | CONFIG_USB_EHCI_HCD=y | 61 | CONFIG_USB_EHCI_HCD=y |
63 | CONFIG_USB_EHCI_GENERIC=y | 62 | CONFIG_USB_EHCI_GENERIC=y |
64 | CONFIG_USB_OHCI_HCD=y | 63 | CONFIG_USB_OHCI_HCD=y |
65 | CONFIG_USB_OHCI_GENERIC=y | 64 | CONFIG_USB_OHCI_GENERIC=y |
66 | 65 |
configs/comtrend_ar5387un_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM6328=y | 4 | CONFIG_SOC_BMIPS_BCM6328=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_NR_DRAM_BANKS=1 | 8 | CONFIG_NR_DRAM_BANKS=1 |
9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
10 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 10 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
11 | CONFIG_DISPLAY_CPUINFO=y | 11 | CONFIG_DISPLAY_CPUINFO=y |
12 | CONFIG_HUSH_PARSER=y | 12 | CONFIG_HUSH_PARSER=y |
13 | CONFIG_SYS_PROMPT="AR-5387un # " | 13 | CONFIG_SYS_PROMPT="AR-5387un # " |
14 | CONFIG_CMD_CPU=y | 14 | CONFIG_CMD_CPU=y |
15 | CONFIG_CMD_LICENSE=y | 15 | CONFIG_CMD_LICENSE=y |
16 | # CONFIG_CMD_BOOTD is not set | 16 | # CONFIG_CMD_BOOTD is not set |
17 | # CONFIG_CMD_ELF is not set | 17 | # CONFIG_CMD_ELF is not set |
18 | # CONFIG_CMD_XIMG is not set | 18 | # CONFIG_CMD_XIMG is not set |
19 | # CONFIG_CMD_EXPORTENV is not set | 19 | # CONFIG_CMD_EXPORTENV is not set |
20 | # CONFIG_CMD_IMPORTENV is not set | 20 | # CONFIG_CMD_IMPORTENV is not set |
21 | # CONFIG_CMD_EDITENV is not set | 21 | # CONFIG_CMD_EDITENV is not set |
22 | # CONFIG_CMD_SAVEENV is not set | 22 | # CONFIG_CMD_SAVEENV is not set |
23 | # CONFIG_CMD_ENV_EXISTS is not set | 23 | # CONFIG_CMD_ENV_EXISTS is not set |
24 | # CONFIG_CMD_CRC32 is not set | 24 | # CONFIG_CMD_CRC32 is not set |
25 | CONFIG_CMD_MEMINFO=y | 25 | CONFIG_CMD_MEMINFO=y |
26 | # CONFIG_CMD_FLASH is not set | 26 | # CONFIG_CMD_FLASH is not set |
27 | # CONFIG_CMD_LOADS is not set | 27 | # CONFIG_CMD_LOADS is not set |
28 | CONFIG_CMD_SF=y | 28 | CONFIG_CMD_SF=y |
29 | CONFIG_CMD_SPI=y | 29 | CONFIG_CMD_SPI=y |
30 | CONFIG_CMD_USB=y | 30 | CONFIG_CMD_USB=y |
31 | CONFIG_CMD_MII=y | 31 | CONFIG_CMD_MII=y |
32 | CONFIG_CMD_PING=y | 32 | CONFIG_CMD_PING=y |
33 | # CONFIG_CMD_MISC is not set | 33 | # CONFIG_CMD_MISC is not set |
34 | CONFIG_OF_EMBED=y | ||
35 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,ar-5387un" | 34 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,ar-5387un" |
36 | CONFIG_NET_RANDOM_ETHADDR=y | 35 | CONFIG_NET_RANDOM_ETHADDR=y |
37 | # CONFIG_DM_DEVICE_REMOVE is not set | 36 | # CONFIG_DM_DEVICE_REMOVE is not set |
38 | CONFIG_BCM6348_IUDMA=y | 37 | CONFIG_BCM6348_IUDMA=y |
39 | CONFIG_DM_GPIO=y | 38 | CONFIG_DM_GPIO=y |
40 | CONFIG_LED=y | 39 | CONFIG_LED=y |
41 | CONFIG_LED_BCM6328=y | 40 | CONFIG_LED_BCM6328=y |
42 | CONFIG_LED_BLINK=y | 41 | CONFIG_LED_BLINK=y |
43 | CONFIG_DM_SPI_FLASH=y | 42 | CONFIG_DM_SPI_FLASH=y |
44 | CONFIG_SPI_FLASH=y | 43 | CONFIG_SPI_FLASH=y |
45 | CONFIG_SPI_FLASH_MACRONIX=y | 44 | CONFIG_SPI_FLASH_MACRONIX=y |
46 | CONFIG_SPI_FLASH_MTD=y | 45 | CONFIG_SPI_FLASH_MTD=y |
47 | CONFIG_DM_ETH=y | 46 | CONFIG_DM_ETH=y |
48 | CONFIG_BCM6368_ETH=y | 47 | CONFIG_BCM6368_ETH=y |
49 | CONFIG_PHY=y | 48 | CONFIG_PHY=y |
50 | CONFIG_BCM6368_USBH_PHY=y | 49 | CONFIG_BCM6368_USBH_PHY=y |
51 | CONFIG_POWER_DOMAIN=y | 50 | CONFIG_POWER_DOMAIN=y |
52 | CONFIG_BCM6328_POWER_DOMAIN=y | 51 | CONFIG_BCM6328_POWER_DOMAIN=y |
53 | CONFIG_DM_RESET=y | 52 | CONFIG_DM_RESET=y |
54 | CONFIG_RESET_BCM6345=y | 53 | CONFIG_RESET_BCM6345=y |
55 | # CONFIG_SPL_SERIAL_PRESENT is not set | 54 | # CONFIG_SPL_SERIAL_PRESENT is not set |
56 | CONFIG_DM_SERIAL=y | 55 | CONFIG_DM_SERIAL=y |
57 | CONFIG_BCM6345_SERIAL=y | 56 | CONFIG_BCM6345_SERIAL=y |
58 | CONFIG_SPI=y | 57 | CONFIG_SPI=y |
59 | CONFIG_DM_SPI=y | 58 | CONFIG_DM_SPI=y |
60 | CONFIG_BCM63XX_HSSPI=y | 59 | CONFIG_BCM63XX_HSSPI=y |
61 | CONFIG_USB=y | 60 | CONFIG_USB=y |
62 | CONFIG_DM_USB=y | 61 | CONFIG_DM_USB=y |
63 | CONFIG_USB_EHCI_HCD=y | 62 | CONFIG_USB_EHCI_HCD=y |
64 | CONFIG_USB_EHCI_GENERIC=y | 63 | CONFIG_USB_EHCI_GENERIC=y |
65 | CONFIG_USB_OHCI_HCD=y | 64 | CONFIG_USB_OHCI_HCD=y |
66 | CONFIG_USB_OHCI_GENERIC=y | 65 | CONFIG_USB_OHCI_GENERIC=y |
67 | 66 |
configs/comtrend_ct5361_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM6348=y | 4 | CONFIG_SOC_BMIPS_BCM6348=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_NR_DRAM_BANKS=1 | 8 | CONFIG_NR_DRAM_BANKS=1 |
9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
10 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 10 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
11 | CONFIG_DISPLAY_CPUINFO=y | 11 | CONFIG_DISPLAY_CPUINFO=y |
12 | CONFIG_HUSH_PARSER=y | 12 | CONFIG_HUSH_PARSER=y |
13 | CONFIG_SYS_PROMPT="CT-5361 # " | 13 | CONFIG_SYS_PROMPT="CT-5361 # " |
14 | CONFIG_CMD_CPU=y | 14 | CONFIG_CMD_CPU=y |
15 | CONFIG_CMD_LICENSE=y | 15 | CONFIG_CMD_LICENSE=y |
16 | # CONFIG_CMD_BOOTD is not set | 16 | # CONFIG_CMD_BOOTD is not set |
17 | # CONFIG_CMD_ELF is not set | 17 | # CONFIG_CMD_ELF is not set |
18 | # CONFIG_CMD_XIMG is not set | 18 | # CONFIG_CMD_XIMG is not set |
19 | # CONFIG_CMD_EXPORTENV is not set | 19 | # CONFIG_CMD_EXPORTENV is not set |
20 | # CONFIG_CMD_IMPORTENV is not set | 20 | # CONFIG_CMD_IMPORTENV is not set |
21 | # CONFIG_CMD_EDITENV is not set | 21 | # CONFIG_CMD_EDITENV is not set |
22 | # CONFIG_CMD_SAVEENV is not set | 22 | # CONFIG_CMD_SAVEENV is not set |
23 | # CONFIG_CMD_ENV_EXISTS is not set | 23 | # CONFIG_CMD_ENV_EXISTS is not set |
24 | # CONFIG_CMD_CRC32 is not set | 24 | # CONFIG_CMD_CRC32 is not set |
25 | CONFIG_CMD_MEMINFO=y | 25 | CONFIG_CMD_MEMINFO=y |
26 | # CONFIG_CMD_LOADS is not set | 26 | # CONFIG_CMD_LOADS is not set |
27 | CONFIG_CMD_USB=y | 27 | CONFIG_CMD_USB=y |
28 | CONFIG_CMD_MII=y | 28 | CONFIG_CMD_MII=y |
29 | CONFIG_CMD_PING=y | 29 | CONFIG_CMD_PING=y |
30 | # CONFIG_CMD_MISC is not set | 30 | # CONFIG_CMD_MISC is not set |
31 | CONFIG_OF_EMBED=y | ||
32 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,ct-5361" | 31 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,ct-5361" |
33 | CONFIG_NET_RANDOM_ETHADDR=y | 32 | CONFIG_NET_RANDOM_ETHADDR=y |
34 | # CONFIG_DM_DEVICE_REMOVE is not set | 33 | # CONFIG_DM_DEVICE_REMOVE is not set |
35 | CONFIG_BCM6348_IUDMA=y | 34 | CONFIG_BCM6348_IUDMA=y |
36 | CONFIG_DM_GPIO=y | 35 | CONFIG_DM_GPIO=y |
37 | CONFIG_BCM6345_GPIO=y | 36 | CONFIG_BCM6345_GPIO=y |
38 | CONFIG_LED=y | 37 | CONFIG_LED=y |
39 | CONFIG_LED_GPIO=y | 38 | CONFIG_LED_GPIO=y |
40 | CONFIG_MTD=y | 39 | CONFIG_MTD=y |
41 | CONFIG_MTD_NOR_FLASH=y | 40 | CONFIG_MTD_NOR_FLASH=y |
42 | CONFIG_FLASH_CFI_DRIVER=y | 41 | CONFIG_FLASH_CFI_DRIVER=y |
43 | CONFIG_CFI_FLASH=y | 42 | CONFIG_CFI_FLASH=y |
44 | CONFIG_SYS_FLASH_PROTECTION=y | 43 | CONFIG_SYS_FLASH_PROTECTION=y |
45 | CONFIG_SYS_FLASH_CFI=y | 44 | CONFIG_SYS_FLASH_CFI=y |
46 | CONFIG_PHY_FIXED=y | 45 | CONFIG_PHY_FIXED=y |
47 | CONFIG_DM_ETH=y | 46 | CONFIG_DM_ETH=y |
48 | CONFIG_BCM6348_ETH=y | 47 | CONFIG_BCM6348_ETH=y |
49 | CONFIG_PHY=y | 48 | CONFIG_PHY=y |
50 | CONFIG_BCM6348_USBH_PHY=y | 49 | CONFIG_BCM6348_USBH_PHY=y |
51 | CONFIG_DM_RESET=y | 50 | CONFIG_DM_RESET=y |
52 | CONFIG_RESET_BCM6345=y | 51 | CONFIG_RESET_BCM6345=y |
53 | # CONFIG_SPL_SERIAL_PRESENT is not set | 52 | # CONFIG_SPL_SERIAL_PRESENT is not set |
54 | CONFIG_DM_SERIAL=y | 53 | CONFIG_DM_SERIAL=y |
55 | CONFIG_BCM6345_SERIAL=y | 54 | CONFIG_BCM6345_SERIAL=y |
56 | CONFIG_USB=y | 55 | CONFIG_USB=y |
57 | CONFIG_DM_USB=y | 56 | CONFIG_DM_USB=y |
58 | CONFIG_USB_OHCI_HCD=y | 57 | CONFIG_USB_OHCI_HCD=y |
59 | CONFIG_USB_OHCI_GENERIC=y | 58 | CONFIG_USB_OHCI_GENERIC=y |
60 | CONFIG_WDT_BCM6345=y | 59 | CONFIG_WDT_BCM6345=y |
61 | 60 |
configs/comtrend_vr3032u_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM63268=y | 4 | CONFIG_SOC_BMIPS_BCM63268=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_NR_DRAM_BANKS=1 | 8 | CONFIG_NR_DRAM_BANKS=1 |
9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
10 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 10 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
11 | CONFIG_DISPLAY_CPUINFO=y | 11 | CONFIG_DISPLAY_CPUINFO=y |
12 | CONFIG_HUSH_PARSER=y | 12 | CONFIG_HUSH_PARSER=y |
13 | CONFIG_SYS_PROMPT="VR-3032u # " | 13 | CONFIG_SYS_PROMPT="VR-3032u # " |
14 | CONFIG_CMD_CPU=y | 14 | CONFIG_CMD_CPU=y |
15 | CONFIG_CMD_LICENSE=y | 15 | CONFIG_CMD_LICENSE=y |
16 | # CONFIG_CMD_BOOTD is not set | 16 | # CONFIG_CMD_BOOTD is not set |
17 | # CONFIG_CMD_ELF is not set | 17 | # CONFIG_CMD_ELF is not set |
18 | # CONFIG_CMD_XIMG is not set | 18 | # CONFIG_CMD_XIMG is not set |
19 | # CONFIG_CMD_EXPORTENV is not set | 19 | # CONFIG_CMD_EXPORTENV is not set |
20 | # CONFIG_CMD_IMPORTENV is not set | 20 | # CONFIG_CMD_IMPORTENV is not set |
21 | # CONFIG_CMD_EDITENV is not set | 21 | # CONFIG_CMD_EDITENV is not set |
22 | # CONFIG_CMD_SAVEENV is not set | 22 | # CONFIG_CMD_SAVEENV is not set |
23 | # CONFIG_CMD_ENV_EXISTS is not set | 23 | # CONFIG_CMD_ENV_EXISTS is not set |
24 | # CONFIG_CMD_CRC32 is not set | 24 | # CONFIG_CMD_CRC32 is not set |
25 | CONFIG_CMD_MEMINFO=y | 25 | CONFIG_CMD_MEMINFO=y |
26 | # CONFIG_CMD_FLASH is not set | 26 | # CONFIG_CMD_FLASH is not set |
27 | # CONFIG_CMD_LOADS is not set | 27 | # CONFIG_CMD_LOADS is not set |
28 | CONFIG_CMD_USB=y | 28 | CONFIG_CMD_USB=y |
29 | CONFIG_CMD_MII=y | 29 | CONFIG_CMD_MII=y |
30 | CONFIG_CMD_PING=y | 30 | CONFIG_CMD_PING=y |
31 | # CONFIG_CMD_MISC is not set | 31 | # CONFIG_CMD_MISC is not set |
32 | CONFIG_OF_EMBED=y | ||
33 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,vr-3032u" | 32 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,vr-3032u" |
34 | CONFIG_NET_RANDOM_ETHADDR=y | 33 | CONFIG_NET_RANDOM_ETHADDR=y |
35 | # CONFIG_DM_DEVICE_REMOVE is not set | 34 | # CONFIG_DM_DEVICE_REMOVE is not set |
36 | CONFIG_BCM6348_IUDMA=y | 35 | CONFIG_BCM6348_IUDMA=y |
37 | CONFIG_DM_GPIO=y | 36 | CONFIG_DM_GPIO=y |
38 | CONFIG_LED=y | 37 | CONFIG_LED=y |
39 | CONFIG_LED_BCM6328=y | 38 | CONFIG_LED_BCM6328=y |
40 | CONFIG_LED_BLINK=y | 39 | CONFIG_LED_BLINK=y |
41 | CONFIG_DM_ETH=y | 40 | CONFIG_DM_ETH=y |
42 | CONFIG_BCM6368_ETH=y | 41 | CONFIG_BCM6368_ETH=y |
43 | CONFIG_PHY=y | 42 | CONFIG_PHY=y |
44 | CONFIG_BCM6368_USBH_PHY=y | 43 | CONFIG_BCM6368_USBH_PHY=y |
45 | CONFIG_POWER_DOMAIN=y | 44 | CONFIG_POWER_DOMAIN=y |
46 | CONFIG_BCM6328_POWER_DOMAIN=y | 45 | CONFIG_BCM6328_POWER_DOMAIN=y |
47 | CONFIG_DM_RESET=y | 46 | CONFIG_DM_RESET=y |
48 | CONFIG_RESET_BCM6345=y | 47 | CONFIG_RESET_BCM6345=y |
49 | # CONFIG_SPL_SERIAL_PRESENT is not set | 48 | # CONFIG_SPL_SERIAL_PRESENT is not set |
50 | CONFIG_DM_SERIAL=y | 49 | CONFIG_DM_SERIAL=y |
51 | CONFIG_BCM6345_SERIAL=y | 50 | CONFIG_BCM6345_SERIAL=y |
52 | CONFIG_USB=y | 51 | CONFIG_USB=y |
53 | CONFIG_DM_USB=y | 52 | CONFIG_DM_USB=y |
54 | CONFIG_USB_EHCI_HCD=y | 53 | CONFIG_USB_EHCI_HCD=y |
55 | CONFIG_USB_EHCI_GENERIC=y | 54 | CONFIG_USB_EHCI_GENERIC=y |
56 | CONFIG_USB_OHCI_HCD=y | 55 | CONFIG_USB_OHCI_HCD=y |
57 | CONFIG_USB_OHCI_GENERIC=y | 56 | CONFIG_USB_OHCI_GENERIC=y |
58 | 57 |
configs/comtrend_wap5813n_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM6368=y | 4 | CONFIG_SOC_BMIPS_BCM6368=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_NR_DRAM_BANKS=1 | 8 | CONFIG_NR_DRAM_BANKS=1 |
9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
10 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 10 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
11 | CONFIG_DISPLAY_CPUINFO=y | 11 | CONFIG_DISPLAY_CPUINFO=y |
12 | CONFIG_HUSH_PARSER=y | 12 | CONFIG_HUSH_PARSER=y |
13 | CONFIG_SYS_PROMPT="WAP-5813n # " | 13 | CONFIG_SYS_PROMPT="WAP-5813n # " |
14 | CONFIG_CMD_CPU=y | 14 | CONFIG_CMD_CPU=y |
15 | CONFIG_CMD_LICENSE=y | 15 | CONFIG_CMD_LICENSE=y |
16 | # CONFIG_CMD_BOOTD is not set | 16 | # CONFIG_CMD_BOOTD is not set |
17 | # CONFIG_CMD_ELF is not set | 17 | # CONFIG_CMD_ELF is not set |
18 | # CONFIG_CMD_XIMG is not set | 18 | # CONFIG_CMD_XIMG is not set |
19 | # CONFIG_CMD_EXPORTENV is not set | 19 | # CONFIG_CMD_EXPORTENV is not set |
20 | # CONFIG_CMD_IMPORTENV is not set | 20 | # CONFIG_CMD_IMPORTENV is not set |
21 | # CONFIG_CMD_EDITENV is not set | 21 | # CONFIG_CMD_EDITENV is not set |
22 | # CONFIG_CMD_SAVEENV is not set | 22 | # CONFIG_CMD_SAVEENV is not set |
23 | # CONFIG_CMD_ENV_EXISTS is not set | 23 | # CONFIG_CMD_ENV_EXISTS is not set |
24 | # CONFIG_CMD_CRC32 is not set | 24 | # CONFIG_CMD_CRC32 is not set |
25 | CONFIG_CMD_MEMINFO=y | 25 | CONFIG_CMD_MEMINFO=y |
26 | # CONFIG_CMD_LOADS is not set | 26 | # CONFIG_CMD_LOADS is not set |
27 | CONFIG_CMD_USB=y | 27 | CONFIG_CMD_USB=y |
28 | CONFIG_CMD_MII=y | 28 | CONFIG_CMD_MII=y |
29 | CONFIG_CMD_PING=y | 29 | CONFIG_CMD_PING=y |
30 | # CONFIG_CMD_MISC is not set | 30 | # CONFIG_CMD_MISC is not set |
31 | CONFIG_OF_EMBED=y | ||
32 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,wap-5813n" | 31 | CONFIG_DEFAULT_DEVICE_TREE="comtrend,wap-5813n" |
33 | CONFIG_NET_RANDOM_ETHADDR=y | 32 | CONFIG_NET_RANDOM_ETHADDR=y |
34 | # CONFIG_DM_DEVICE_REMOVE is not set | 33 | # CONFIG_DM_DEVICE_REMOVE is not set |
35 | CONFIG_BCM6348_IUDMA=y | 34 | CONFIG_BCM6348_IUDMA=y |
36 | CONFIG_DM_GPIO=y | 35 | CONFIG_DM_GPIO=y |
37 | CONFIG_BCM6345_GPIO=y | 36 | CONFIG_BCM6345_GPIO=y |
38 | CONFIG_LED=y | 37 | CONFIG_LED=y |
39 | CONFIG_LED_GPIO=y | 38 | CONFIG_LED_GPIO=y |
40 | CONFIG_MTD=y | 39 | CONFIG_MTD=y |
41 | CONFIG_MTD_NOR_FLASH=y | 40 | CONFIG_MTD_NOR_FLASH=y |
42 | CONFIG_FLASH_CFI_DRIVER=y | 41 | CONFIG_FLASH_CFI_DRIVER=y |
43 | CONFIG_CFI_FLASH=y | 42 | CONFIG_CFI_FLASH=y |
44 | CONFIG_SYS_FLASH_PROTECTION=y | 43 | CONFIG_SYS_FLASH_PROTECTION=y |
45 | CONFIG_SYS_FLASH_CFI=y | 44 | CONFIG_SYS_FLASH_CFI=y |
46 | CONFIG_DM_ETH=y | 45 | CONFIG_DM_ETH=y |
47 | CONFIG_PHY_GIGE=y | 46 | CONFIG_PHY_GIGE=y |
48 | CONFIG_BCM6368_ETH=y | 47 | CONFIG_BCM6368_ETH=y |
49 | CONFIG_PHY=y | 48 | CONFIG_PHY=y |
50 | CONFIG_BCM6368_USBH_PHY=y | 49 | CONFIG_BCM6368_USBH_PHY=y |
51 | CONFIG_DM_RESET=y | 50 | CONFIG_DM_RESET=y |
52 | CONFIG_RESET_BCM6345=y | 51 | CONFIG_RESET_BCM6345=y |
53 | # CONFIG_SPL_SERIAL_PRESENT is not set | 52 | # CONFIG_SPL_SERIAL_PRESENT is not set |
54 | CONFIG_DM_SERIAL=y | 53 | CONFIG_DM_SERIAL=y |
55 | CONFIG_BCM6345_SERIAL=y | 54 | CONFIG_BCM6345_SERIAL=y |
56 | CONFIG_USB=y | 55 | CONFIG_USB=y |
57 | CONFIG_DM_USB=y | 56 | CONFIG_DM_USB=y |
58 | CONFIG_USB_EHCI_HCD=y | 57 | CONFIG_USB_EHCI_HCD=y |
59 | CONFIG_USB_EHCI_GENERIC=y | 58 | CONFIG_USB_EHCI_GENERIC=y |
60 | CONFIG_USB_OHCI_HCD=y | 59 | CONFIG_USB_OHCI_HCD=y |
61 | CONFIG_USB_OHCI_GENERIC=y | 60 | CONFIG_USB_OHCI_GENERIC=y |
62 | 61 |
configs/gardena-smart-gateway-mt7688-ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_MT7620=y | 3 | CONFIG_ARCH_MT7620=y |
4 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 4 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
5 | CONFIG_MIPS_BOOT_FDT=y | 5 | CONFIG_MIPS_BOOT_FDT=y |
6 | CONFIG_ENV_VARS_UBOOT_CONFIG=y | 6 | CONFIG_ENV_VARS_UBOOT_CONFIG=y |
7 | CONFIG_NR_DRAM_BANKS=1 | 7 | CONFIG_NR_DRAM_BANKS=1 |
8 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 8 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
9 | CONFIG_FIT=y | 9 | CONFIG_FIT=y |
10 | CONFIG_FIT_SIGNATURE=y | 10 | CONFIG_FIT_SIGNATURE=y |
11 | CONFIG_IMAGE_FORMAT_LEGACY=y | 11 | CONFIG_IMAGE_FORMAT_LEGACY=y |
12 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 12 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
13 | CONFIG_USE_BOOTCOMMAND=y | 13 | CONFIG_USE_BOOTCOMMAND=y |
14 | CONFIG_BOOTCOMMAND="cp.b 83000000 84000000 10000 && dhcp uEnv.txt && env import -t ${fileaddr} ${filesize} && run do_u_boot_init; reset" | 14 | CONFIG_BOOTCOMMAND="cp.b 83000000 84000000 10000 && dhcp uEnv.txt && env import -t ${fileaddr} ${filesize} && run do_u_boot_init; reset" |
15 | CONFIG_SYS_CONSOLE_INFO_QUIET=y | 15 | CONFIG_SYS_CONSOLE_INFO_QUIET=y |
16 | CONFIG_VERSION_VARIABLE=y | 16 | CONFIG_VERSION_VARIABLE=y |
17 | CONFIG_BOARD_EARLY_INIT_F=y | 17 | CONFIG_BOARD_EARLY_INIT_F=y |
18 | CONFIG_HUSH_PARSER=y | 18 | CONFIG_HUSH_PARSER=y |
19 | CONFIG_CMD_LICENSE=y | 19 | CONFIG_CMD_LICENSE=y |
20 | # CONFIG_CMD_ELF is not set | 20 | # CONFIG_CMD_ELF is not set |
21 | # CONFIG_CMD_XIMG is not set | 21 | # CONFIG_CMD_XIMG is not set |
22 | CONFIG_CMD_MEMINFO=y | 22 | CONFIG_CMD_MEMINFO=y |
23 | # CONFIG_CMD_FLASH is not set | 23 | # CONFIG_CMD_FLASH is not set |
24 | CONFIG_CMD_GPIO=y | 24 | CONFIG_CMD_GPIO=y |
25 | # CONFIG_CMD_LOADS is not set | 25 | # CONFIG_CMD_LOADS is not set |
26 | CONFIG_CMD_MTD=y | 26 | CONFIG_CMD_MTD=y |
27 | CONFIG_CMD_SF=y | 27 | CONFIG_CMD_SF=y |
28 | CONFIG_CMD_SPI=y | 28 | CONFIG_CMD_SPI=y |
29 | CONFIG_CMD_DHCP=y | 29 | CONFIG_CMD_DHCP=y |
30 | CONFIG_CMD_MII=y | 30 | CONFIG_CMD_MII=y |
31 | CONFIG_CMD_PING=y | 31 | CONFIG_CMD_PING=y |
32 | CONFIG_CMD_BOOTCOUNT=y | 32 | CONFIG_CMD_BOOTCOUNT=y |
33 | CONFIG_CMD_TIME=y | 33 | CONFIG_CMD_TIME=y |
34 | CONFIG_CMD_UUID=y | 34 | CONFIG_CMD_UUID=y |
35 | CONFIG_CMD_MTDPARTS=y | 35 | CONFIG_CMD_MTDPARTS=y |
36 | CONFIG_MTDIDS_DEFAULT="spi-nand0=gd5f,nor0=spi0.0" | 36 | CONFIG_MTDIDS_DEFAULT="spi-nand0=spi0.1,nor0=spi0.0" |
37 | CONFIG_MTDPARTS_DEFAULT="spi0.0:640k(uboot),64k(uboot_env0),64k(uboot_env1),64k(factory),-(unused);gd5f:-(nand)" | 37 | CONFIG_MTDPARTS_DEFAULT="spi0.0:640k(uboot),64k(uboot_env0),64k(uboot_env1),64k(factory),-(unused);spi0.1:-(nand)" |
38 | CONFIG_CMD_UBI=y | 38 | CONFIG_CMD_UBI=y |
39 | CONFIG_DEFAULT_DEVICE_TREE="gardena-smart-gateway-mt7688" | 39 | CONFIG_DEFAULT_DEVICE_TREE="gardena-smart-gateway-mt7688" |
40 | CONFIG_ENV_IS_IN_SPI_FLASH=y | 40 | CONFIG_ENV_IS_IN_SPI_FLASH=y |
41 | CONFIG_NET_RANDOM_ETHADDR=y | 41 | CONFIG_NET_RANDOM_ETHADDR=y |
42 | # CONFIG_DM_DEVICE_REMOVE is not set | 42 | # CONFIG_DM_DEVICE_REMOVE is not set |
43 | CONFIG_HAVE_BLOCK_DEVICE=y | 43 | CONFIG_HAVE_BLOCK_DEVICE=y |
44 | CONFIG_BOOTCOUNT_LIMIT=y | 44 | CONFIG_BOOTCOUNT_LIMIT=y |
45 | CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y | 45 | CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y |
46 | CONFIG_SYS_BOOTCOUNT_ADDR=0xb000006c | 46 | CONFIG_SYS_BOOTCOUNT_ADDR=0xb000006c |
47 | CONFIG_CLK=y | 47 | CONFIG_CLK=y |
48 | CONFIG_LED=y | 48 | CONFIG_LED=y |
49 | CONFIG_LED_BLINK=y | 49 | CONFIG_LED_BLINK=y |
50 | CONFIG_LED_GPIO=y | 50 | CONFIG_LED_GPIO=y |
51 | CONFIG_MTD=y | 51 | CONFIG_MTD=y |
52 | CONFIG_MTD_SPI_NAND=y | 52 | CONFIG_MTD_SPI_NAND=y |
53 | CONFIG_SPI_FLASH=y | 53 | CONFIG_SPI_FLASH=y |
54 | CONFIG_SPI_FLASH_GIGADEVICE=y | 54 | CONFIG_SPI_FLASH_GIGADEVICE=y |
55 | CONFIG_SPI_FLASH_MACRONIX=y | 55 | CONFIG_SPI_FLASH_MACRONIX=y |
56 | CONFIG_SPI_FLASH_SPANSION=y | 56 | CONFIG_SPI_FLASH_SPANSION=y |
57 | CONFIG_SPI_FLASH_STMICRO=y | 57 | CONFIG_SPI_FLASH_STMICRO=y |
58 | CONFIG_SPI_FLASH_WINBOND=y | 58 | CONFIG_SPI_FLASH_WINBOND=y |
59 | CONFIG_SPI_FLASH_XMC=y | 59 | CONFIG_SPI_FLASH_XMC=y |
60 | CONFIG_SPI_FLASH_MTD=y | 60 | CONFIG_SPI_FLASH_MTD=y |
61 | CONFIG_MTD_UBI_BEB_LIMIT=22 | 61 | CONFIG_MTD_UBI_BEB_LIMIT=22 |
62 | CONFIG_PHYLIB=y | 62 | CONFIG_PHYLIB=y |
63 | CONFIG_PHY_FIXED=y | 63 | CONFIG_PHY_FIXED=y |
64 | CONFIG_MT7628_ETH=y | 64 | CONFIG_MT7628_ETH=y |
65 | CONFIG_PHY=y | 65 | CONFIG_PHY=y |
66 | CONFIG_POWER_DOMAIN=y | 66 | CONFIG_POWER_DOMAIN=y |
67 | CONFIG_RAM=y | 67 | CONFIG_RAM=y |
68 | CONFIG_DM_RESET=y | 68 | CONFIG_DM_RESET=y |
69 | # CONFIG_SPL_SERIAL_PRESENT is not set | 69 | # CONFIG_SPL_SERIAL_PRESENT is not set |
70 | CONFIG_SYS_NS16550=y | 70 | CONFIG_SYS_NS16550=y |
71 | CONFIG_SPI=y | 71 | CONFIG_SPI=y |
72 | CONFIG_MT7621_SPI=y | 72 | CONFIG_MT7621_SPI=y |
73 | CONFIG_SYSRESET_SYSCON=y | 73 | CONFIG_SYSRESET_SYSCON=y |
74 | CONFIG_WATCHDOG=y | 74 | CONFIG_WATCHDOG=y |
75 | CONFIG_WDT=y | 75 | CONFIG_WDT=y |
76 | CONFIG_WDT_MT7621=y | 76 | CONFIG_WDT_MT7621=y |
77 | CONFIG_LZMA=y | 77 | CONFIG_LZMA=y |
78 | 78 |
configs/gardena-smart-gateway-mt7688_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x9c000000 | 2 | CONFIG_SYS_TEXT_BASE=0x9c000000 |
3 | CONFIG_ARCH_MT7620=y | 3 | CONFIG_ARCH_MT7620=y |
4 | CONFIG_BOOT_ROM=y | 4 | CONFIG_BOOT_ROM=y |
5 | CONFIG_ONBOARD_DDR2_SIZE_1024MBIT=y | 5 | CONFIG_ONBOARD_DDR2_SIZE_1024MBIT=y |
6 | CONFIG_ONBOARD_DDR2_CHIP_WIDTH_16BIT=y | 6 | CONFIG_ONBOARD_DDR2_CHIP_WIDTH_16BIT=y |
7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
8 | CONFIG_MIPS_BOOT_FDT=y | 8 | CONFIG_MIPS_BOOT_FDT=y |
9 | CONFIG_ENV_VARS_UBOOT_CONFIG=y | 9 | CONFIG_ENV_VARS_UBOOT_CONFIG=y |
10 | CONFIG_NR_DRAM_BANKS=1 | 10 | CONFIG_NR_DRAM_BANKS=1 |
11 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 11 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
12 | CONFIG_FIT=y | 12 | CONFIG_FIT=y |
13 | CONFIG_FIT_SIGNATURE=y | 13 | CONFIG_FIT_SIGNATURE=y |
14 | CONFIG_IMAGE_FORMAT_LEGACY=y | 14 | CONFIG_IMAGE_FORMAT_LEGACY=y |
15 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 15 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
16 | CONFIG_USE_BOOTCOMMAND=y | 16 | CONFIG_USE_BOOTCOMMAND=y |
17 | CONFIG_BOOTCOMMAND="cp.b 83000000 84000000 10000 && dhcp uEnv.txt && env import -t ${fileaddr} ${filesize} && run do_u_boot_init; reset" | 17 | CONFIG_BOOTCOMMAND="cp.b 83000000 84000000 10000 && dhcp uEnv.txt && env import -t ${fileaddr} ${filesize} && run do_u_boot_init; reset" |
18 | CONFIG_SYS_CONSOLE_INFO_QUIET=y | 18 | CONFIG_SYS_CONSOLE_INFO_QUIET=y |
19 | CONFIG_VERSION_VARIABLE=y | 19 | CONFIG_VERSION_VARIABLE=y |
20 | CONFIG_BOARD_EARLY_INIT_F=y | 20 | CONFIG_BOARD_EARLY_INIT_F=y |
21 | CONFIG_HUSH_PARSER=y | 21 | CONFIG_HUSH_PARSER=y |
22 | CONFIG_CMD_LICENSE=y | 22 | CONFIG_CMD_LICENSE=y |
23 | # CONFIG_CMD_ELF is not set | 23 | # CONFIG_CMD_ELF is not set |
24 | # CONFIG_CMD_XIMG is not set | 24 | # CONFIG_CMD_XIMG is not set |
25 | CONFIG_CMD_MEMINFO=y | 25 | CONFIG_CMD_MEMINFO=y |
26 | # CONFIG_CMD_FLASH is not set | 26 | # CONFIG_CMD_FLASH is not set |
27 | CONFIG_CMD_GPIO=y | 27 | CONFIG_CMD_GPIO=y |
28 | # CONFIG_CMD_LOADS is not set | 28 | # CONFIG_CMD_LOADS is not set |
29 | CONFIG_CMD_MTD=y | 29 | CONFIG_CMD_MTD=y |
30 | CONFIG_CMD_SF=y | 30 | CONFIG_CMD_SF=y |
31 | CONFIG_CMD_SPI=y | 31 | CONFIG_CMD_SPI=y |
32 | CONFIG_CMD_DHCP=y | 32 | CONFIG_CMD_DHCP=y |
33 | CONFIG_CMD_MII=y | 33 | CONFIG_CMD_MII=y |
34 | CONFIG_CMD_PING=y | 34 | CONFIG_CMD_PING=y |
35 | CONFIG_CMD_BOOTCOUNT=y | 35 | CONFIG_CMD_BOOTCOUNT=y |
36 | CONFIG_CMD_TIME=y | 36 | CONFIG_CMD_TIME=y |
37 | CONFIG_CMD_UUID=y | 37 | CONFIG_CMD_UUID=y |
38 | CONFIG_CMD_MTDPARTS=y | 38 | CONFIG_CMD_MTDPARTS=y |
39 | CONFIG_MTDIDS_DEFAULT="spi-nand0=gd5f,nor0=spi0.0" | 39 | CONFIG_MTDIDS_DEFAULT="spi-nand0=spi0.1,nor0=spi0.0" |
40 | CONFIG_MTDPARTS_DEFAULT="spi0.0:640k(uboot),64k(uboot_env0),64k(uboot_env1),64k(factory),-(unused);gd5f:-(nand)" | 40 | CONFIG_MTDPARTS_DEFAULT="spi0.0:640k(uboot),64k(uboot_env0),64k(uboot_env1),64k(factory),-(unused);spi0.1:-(nand)" |
41 | CONFIG_CMD_UBI=y | 41 | CONFIG_CMD_UBI=y |
42 | CONFIG_DEFAULT_DEVICE_TREE="gardena-smart-gateway-mt7688" | 42 | CONFIG_DEFAULT_DEVICE_TREE="gardena-smart-gateway-mt7688" |
43 | CONFIG_ENV_IS_IN_SPI_FLASH=y | 43 | CONFIG_ENV_IS_IN_SPI_FLASH=y |
44 | CONFIG_NET_RANDOM_ETHADDR=y | 44 | CONFIG_NET_RANDOM_ETHADDR=y |
45 | # CONFIG_DM_DEVICE_REMOVE is not set | 45 | # CONFIG_DM_DEVICE_REMOVE is not set |
46 | CONFIG_HAVE_BLOCK_DEVICE=y | 46 | CONFIG_HAVE_BLOCK_DEVICE=y |
47 | CONFIG_BOOTCOUNT_LIMIT=y | 47 | CONFIG_BOOTCOUNT_LIMIT=y |
48 | CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y | 48 | CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y |
49 | CONFIG_SYS_BOOTCOUNT_ADDR=0xb000006c | 49 | CONFIG_SYS_BOOTCOUNT_ADDR=0xb000006c |
50 | CONFIG_CLK=y | 50 | CONFIG_CLK=y |
51 | CONFIG_LED=y | 51 | CONFIG_LED=y |
52 | CONFIG_LED_BLINK=y | 52 | CONFIG_LED_BLINK=y |
53 | CONFIG_LED_GPIO=y | 53 | CONFIG_LED_GPIO=y |
54 | CONFIG_MTD=y | 54 | CONFIG_MTD=y |
55 | CONFIG_MTD_SPI_NAND=y | 55 | CONFIG_MTD_SPI_NAND=y |
56 | CONFIG_SPI_FLASH=y | 56 | CONFIG_SPI_FLASH=y |
57 | CONFIG_SPI_FLASH_GIGADEVICE=y | 57 | CONFIG_SPI_FLASH_GIGADEVICE=y |
58 | CONFIG_SPI_FLASH_MACRONIX=y | 58 | CONFIG_SPI_FLASH_MACRONIX=y |
59 | CONFIG_SPI_FLASH_SPANSION=y | 59 | CONFIG_SPI_FLASH_SPANSION=y |
60 | CONFIG_SPI_FLASH_STMICRO=y | 60 | CONFIG_SPI_FLASH_STMICRO=y |
61 | CONFIG_SPI_FLASH_WINBOND=y | 61 | CONFIG_SPI_FLASH_WINBOND=y |
62 | CONFIG_SPI_FLASH_XMC=y | 62 | CONFIG_SPI_FLASH_XMC=y |
63 | CONFIG_SPI_FLASH_MTD=y | 63 | CONFIG_SPI_FLASH_MTD=y |
64 | CONFIG_MTD_UBI_BEB_LIMIT=22 | 64 | CONFIG_MTD_UBI_BEB_LIMIT=22 |
65 | CONFIG_PHYLIB=y | 65 | CONFIG_PHYLIB=y |
66 | CONFIG_PHY_FIXED=y | 66 | CONFIG_PHY_FIXED=y |
67 | CONFIG_MT7628_ETH=y | 67 | CONFIG_MT7628_ETH=y |
68 | CONFIG_PHY=y | 68 | CONFIG_PHY=y |
69 | CONFIG_POWER_DOMAIN=y | 69 | CONFIG_POWER_DOMAIN=y |
70 | CONFIG_RAM=y | 70 | CONFIG_RAM=y |
71 | CONFIG_DM_RESET=y | 71 | CONFIG_DM_RESET=y |
72 | # CONFIG_SPL_SERIAL_PRESENT is not set | 72 | # CONFIG_SPL_SERIAL_PRESENT is not set |
73 | CONFIG_SYS_NS16550=y | 73 | CONFIG_SYS_NS16550=y |
74 | CONFIG_SPI=y | 74 | CONFIG_SPI=y |
75 | CONFIG_MT7621_SPI=y | 75 | CONFIG_MT7621_SPI=y |
76 | CONFIG_SYSRESET_SYSCON=y | 76 | CONFIG_SYSRESET_SYSCON=y |
77 | CONFIG_WATCHDOG=y | 77 | CONFIG_WATCHDOG=y |
78 | CONFIG_WDT=y | 78 | CONFIG_WDT=y |
79 | CONFIG_WDT_MT7621=y | 79 | CONFIG_WDT_MT7621=y |
80 | CONFIG_LZMA=y | 80 | CONFIG_LZMA=y |
81 | 81 |
configs/huawei_hg556a_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM6358=y | 4 | CONFIG_SOC_BMIPS_BCM6358=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_NR_DRAM_BANKS=1 | 8 | CONFIG_NR_DRAM_BANKS=1 |
9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
10 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 10 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
11 | CONFIG_DISPLAY_CPUINFO=y | 11 | CONFIG_DISPLAY_CPUINFO=y |
12 | CONFIG_HUSH_PARSER=y | 12 | CONFIG_HUSH_PARSER=y |
13 | CONFIG_SYS_PROMPT="HG556a # " | 13 | CONFIG_SYS_PROMPT="HG556a # " |
14 | CONFIG_CMD_CPU=y | 14 | CONFIG_CMD_CPU=y |
15 | CONFIG_CMD_LICENSE=y | 15 | CONFIG_CMD_LICENSE=y |
16 | # CONFIG_CMD_BOOTD is not set | 16 | # CONFIG_CMD_BOOTD is not set |
17 | # CONFIG_CMD_ELF is not set | 17 | # CONFIG_CMD_ELF is not set |
18 | # CONFIG_CMD_XIMG is not set | 18 | # CONFIG_CMD_XIMG is not set |
19 | # CONFIG_CMD_EXPORTENV is not set | 19 | # CONFIG_CMD_EXPORTENV is not set |
20 | # CONFIG_CMD_IMPORTENV is not set | 20 | # CONFIG_CMD_IMPORTENV is not set |
21 | # CONFIG_CMD_EDITENV is not set | 21 | # CONFIG_CMD_EDITENV is not set |
22 | # CONFIG_CMD_SAVEENV is not set | 22 | # CONFIG_CMD_SAVEENV is not set |
23 | # CONFIG_CMD_ENV_EXISTS is not set | 23 | # CONFIG_CMD_ENV_EXISTS is not set |
24 | # CONFIG_CMD_CRC32 is not set | 24 | # CONFIG_CMD_CRC32 is not set |
25 | CONFIG_CMD_MEMINFO=y | 25 | CONFIG_CMD_MEMINFO=y |
26 | # CONFIG_CMD_LOADS is not set | 26 | # CONFIG_CMD_LOADS is not set |
27 | CONFIG_CMD_USB=y | 27 | CONFIG_CMD_USB=y |
28 | CONFIG_CMD_MII=y | 28 | CONFIG_CMD_MII=y |
29 | CONFIG_CMD_PING=y | 29 | CONFIG_CMD_PING=y |
30 | # CONFIG_CMD_MISC is not set | 30 | # CONFIG_CMD_MISC is not set |
31 | CONFIG_OF_EMBED=y | ||
32 | CONFIG_DEFAULT_DEVICE_TREE="huawei,hg556a" | 31 | CONFIG_DEFAULT_DEVICE_TREE="huawei,hg556a" |
33 | CONFIG_NET_RANDOM_ETHADDR=y | 32 | CONFIG_NET_RANDOM_ETHADDR=y |
34 | # CONFIG_DM_DEVICE_REMOVE is not set | 33 | # CONFIG_DM_DEVICE_REMOVE is not set |
35 | CONFIG_BCM6348_IUDMA=y | 34 | CONFIG_BCM6348_IUDMA=y |
36 | CONFIG_DM_GPIO=y | 35 | CONFIG_DM_GPIO=y |
37 | CONFIG_BCM6345_GPIO=y | 36 | CONFIG_BCM6345_GPIO=y |
38 | CONFIG_LED=y | 37 | CONFIG_LED=y |
39 | CONFIG_LED_GPIO=y | 38 | CONFIG_LED_GPIO=y |
40 | CONFIG_MTD=y | 39 | CONFIG_MTD=y |
41 | CONFIG_MTD_NOR_FLASH=y | 40 | CONFIG_MTD_NOR_FLASH=y |
42 | CONFIG_FLASH_CFI_DRIVER=y | 41 | CONFIG_FLASH_CFI_DRIVER=y |
43 | CONFIG_CFI_FLASH=y | 42 | CONFIG_CFI_FLASH=y |
44 | CONFIG_SYS_FLASH_PROTECTION=y | 43 | CONFIG_SYS_FLASH_PROTECTION=y |
45 | CONFIG_SYS_FLASH_CFI=y | 44 | CONFIG_SYS_FLASH_CFI=y |
46 | CONFIG_PHY_FIXED=y | 45 | CONFIG_PHY_FIXED=y |
47 | CONFIG_DM_ETH=y | 46 | CONFIG_DM_ETH=y |
48 | CONFIG_BCM6348_ETH=y | 47 | CONFIG_BCM6348_ETH=y |
49 | CONFIG_PHY=y | 48 | CONFIG_PHY=y |
50 | CONFIG_BCM6358_USBH_PHY=y | 49 | CONFIG_BCM6358_USBH_PHY=y |
51 | CONFIG_DM_RESET=y | 50 | CONFIG_DM_RESET=y |
52 | CONFIG_RESET_BCM6345=y | 51 | CONFIG_RESET_BCM6345=y |
53 | # CONFIG_SPL_SERIAL_PRESENT is not set | 52 | # CONFIG_SPL_SERIAL_PRESENT is not set |
54 | CONFIG_DM_SERIAL=y | 53 | CONFIG_DM_SERIAL=y |
55 | CONFIG_BCM6345_SERIAL=y | 54 | CONFIG_BCM6345_SERIAL=y |
56 | CONFIG_USB=y | 55 | CONFIG_USB=y |
57 | CONFIG_DM_USB=y | 56 | CONFIG_DM_USB=y |
58 | CONFIG_USB_EHCI_HCD=y | 57 | CONFIG_USB_EHCI_HCD=y |
59 | CONFIG_USB_EHCI_GENERIC=y | 58 | CONFIG_USB_EHCI_GENERIC=y |
60 | CONFIG_USB_OHCI_HCD=y | 59 | CONFIG_USB_OHCI_HCD=y |
61 | CONFIG_USB_OHCI_GENERIC=y | 60 | CONFIG_USB_OHCI_GENERIC=y |
62 | 61 |
configs/imgtec_xilfpga_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_MALLOC_F_LEN=0x600 | 2 | CONFIG_SYS_MALLOC_F_LEN=0x600 |
3 | CONFIG_TARGET_XILFPGA=y | 3 | CONFIG_TARGET_XILFPGA=y |
4 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 4 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
5 | CONFIG_MIPS_BOOT_FDT=y | 5 | CONFIG_MIPS_BOOT_FDT=y |
6 | CONFIG_BOOTDELAY=5 | 6 | CONFIG_BOOTDELAY=5 |
7 | # CONFIG_DISPLAY_BOARDINFO is not set | 7 | # CONFIG_DISPLAY_BOARDINFO is not set |
8 | CONFIG_HUSH_PARSER=y | 8 | CONFIG_HUSH_PARSER=y |
9 | # CONFIG_CMDLINE_EDITING is not set | 9 | # CONFIG_CMDLINE_EDITING is not set |
10 | # CONFIG_AUTO_COMPLETE is not set | 10 | # CONFIG_AUTO_COMPLETE is not set |
11 | CONFIG_SYS_PROMPT="MIPSfpga # " | 11 | CONFIG_SYS_PROMPT="MIPSfpga # " |
12 | # CONFIG_CMD_SAVEENV is not set | 12 | # CONFIG_CMD_SAVEENV is not set |
13 | CONFIG_CMD_MEMINFO=y | 13 | CONFIG_CMD_MEMINFO=y |
14 | # CONFIG_CMD_FLASH is not set | 14 | # CONFIG_CMD_FLASH is not set |
15 | CONFIG_CMD_DHCP=y | 15 | CONFIG_CMD_DHCP=y |
16 | CONFIG_CMD_MII=y | 16 | CONFIG_CMD_MII=y |
17 | CONFIG_CMD_PING=y | 17 | CONFIG_CMD_PING=y |
18 | CONFIG_CMD_TIME=y | 18 | CONFIG_CMD_TIME=y |
19 | # CONFIG_ISO_PARTITION is not set | 19 | # CONFIG_ISO_PARTITION is not set |
20 | CONFIG_OF_EMBED=y | ||
21 | CONFIG_DEFAULT_DEVICE_TREE="nexys4ddr" | 20 | CONFIG_DEFAULT_DEVICE_TREE="nexys4ddr" |
22 | CONFIG_NET_RANDOM_ETHADDR=y | 21 | CONFIG_NET_RANDOM_ETHADDR=y |
23 | CONFIG_NETCONSOLE=y | 22 | CONFIG_NETCONSOLE=y |
24 | CONFIG_CLK=y | 23 | CONFIG_CLK=y |
25 | CONFIG_XILINX_EMACLITE=y | 24 | CONFIG_XILINX_EMACLITE=y |
26 | CONFIG_SYS_NS16550=y | 25 | CONFIG_SYS_NS16550=y |
27 | CONFIG_CMD_DHRYSTONE=y | 26 | CONFIG_CMD_DHRYSTONE=y |
28 | 27 |
configs/malta64_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFFBE000000 | 2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFFBE000000 |
3 | CONFIG_TARGET_MALTA=y | 3 | CONFIG_TARGET_MALTA=y |
4 | CONFIG_CPU_MIPS64_R2=y | 4 | CONFIG_CPU_MIPS64_R2=y |
5 | CONFIG_MISC_INIT_R=y | 5 | CONFIG_MISC_INIT_R=y |
6 | CONFIG_BOARD_EARLY_INIT_F=y | 6 | CONFIG_BOARD_EARLY_INIT_F=y |
7 | CONFIG_HUSH_PARSER=y | 7 | CONFIG_HUSH_PARSER=y |
8 | CONFIG_SYS_PROMPT="malta # " | 8 | CONFIG_SYS_PROMPT="malta # " |
9 | # CONFIG_AUTOBOOT is not set | 9 | # CONFIG_AUTOBOOT is not set |
10 | CONFIG_CMD_IMLS=y | 10 | CONFIG_CMD_IMLS=y |
11 | CONFIG_CMD_IDE=y | 11 | CONFIG_CMD_IDE=y |
12 | # CONFIG_CMD_LOADB is not set | 12 | # CONFIG_CMD_LOADB is not set |
13 | # CONFIG_CMD_LOADS is not set | 13 | # CONFIG_CMD_LOADS is not set |
14 | CONFIG_CMD_PCI=y | 14 | CONFIG_CMD_PCI=y |
15 | # CONFIG_CMD_SETEXPR is not set | 15 | # CONFIG_CMD_SETEXPR is not set |
16 | CONFIG_CMD_DHCP=y | 16 | CONFIG_CMD_DHCP=y |
17 | # CONFIG_CMD_NFS is not set | 17 | # CONFIG_CMD_NFS is not set |
18 | CONFIG_CMD_PING=y | 18 | CONFIG_CMD_PING=y |
19 | CONFIG_CMD_DATE=y | 19 | CONFIG_CMD_DATE=y |
20 | # CONFIG_ISO_PARTITION is not set | 20 | # CONFIG_ISO_PARTITION is not set |
21 | CONFIG_OF_EMBED=y | ||
22 | CONFIG_DEFAULT_DEVICE_TREE="mti,malta" | 21 | CONFIG_DEFAULT_DEVICE_TREE="mti,malta" |
23 | CONFIG_ENV_IS_IN_FLASH=y | 22 | CONFIG_ENV_IS_IN_FLASH=y |
24 | CONFIG_MTD_NOR_FLASH=y | 23 | CONFIG_MTD_NOR_FLASH=y |
25 | CONFIG_FLASH_CFI_DRIVER=y | 24 | CONFIG_FLASH_CFI_DRIVER=y |
26 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 25 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
27 | CONFIG_SYS_FLASH_CFI=y | 26 | CONFIG_SYS_FLASH_CFI=y |
28 | CONFIG_PCI=y | 27 | CONFIG_PCI=y |
29 | CONFIG_RTC_MC146818=y | 28 | CONFIG_RTC_MC146818=y |
30 | CONFIG_SYS_NS16550=y | 29 | CONFIG_SYS_NS16550=y |
31 | 30 |
configs/malta64el_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFFBE000000 | 2 | CONFIG_SYS_TEXT_BASE=0xFFFFFFFFBE000000 |
3 | CONFIG_TARGET_MALTA=y | 3 | CONFIG_TARGET_MALTA=y |
4 | CONFIG_SYS_LITTLE_ENDIAN=y | 4 | CONFIG_SYS_LITTLE_ENDIAN=y |
5 | CONFIG_CPU_MIPS64_R2=y | 5 | CONFIG_CPU_MIPS64_R2=y |
6 | CONFIG_MISC_INIT_R=y | 6 | CONFIG_MISC_INIT_R=y |
7 | CONFIG_BOARD_EARLY_INIT_F=y | 7 | CONFIG_BOARD_EARLY_INIT_F=y |
8 | CONFIG_HUSH_PARSER=y | 8 | CONFIG_HUSH_PARSER=y |
9 | CONFIG_SYS_PROMPT="maltael # " | 9 | CONFIG_SYS_PROMPT="maltael # " |
10 | # CONFIG_AUTOBOOT is not set | 10 | # CONFIG_AUTOBOOT is not set |
11 | CONFIG_CMD_IMLS=y | 11 | CONFIG_CMD_IMLS=y |
12 | CONFIG_CMD_IDE=y | 12 | CONFIG_CMD_IDE=y |
13 | # CONFIG_CMD_LOADB is not set | 13 | # CONFIG_CMD_LOADB is not set |
14 | # CONFIG_CMD_LOADS is not set | 14 | # CONFIG_CMD_LOADS is not set |
15 | CONFIG_CMD_PCI=y | 15 | CONFIG_CMD_PCI=y |
16 | # CONFIG_CMD_SETEXPR is not set | 16 | # CONFIG_CMD_SETEXPR is not set |
17 | CONFIG_CMD_DHCP=y | 17 | CONFIG_CMD_DHCP=y |
18 | # CONFIG_CMD_NFS is not set | 18 | # CONFIG_CMD_NFS is not set |
19 | CONFIG_CMD_PING=y | 19 | CONFIG_CMD_PING=y |
20 | CONFIG_CMD_DATE=y | 20 | CONFIG_CMD_DATE=y |
21 | # CONFIG_ISO_PARTITION is not set | 21 | # CONFIG_ISO_PARTITION is not set |
22 | CONFIG_OF_EMBED=y | ||
23 | CONFIG_DEFAULT_DEVICE_TREE="mti,malta" | 22 | CONFIG_DEFAULT_DEVICE_TREE="mti,malta" |
24 | CONFIG_ENV_IS_IN_FLASH=y | 23 | CONFIG_ENV_IS_IN_FLASH=y |
25 | CONFIG_MTD_NOR_FLASH=y | 24 | CONFIG_MTD_NOR_FLASH=y |
26 | CONFIG_FLASH_CFI_DRIVER=y | 25 | CONFIG_FLASH_CFI_DRIVER=y |
27 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 26 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
28 | CONFIG_SYS_FLASH_CFI=y | 27 | CONFIG_SYS_FLASH_CFI=y |
29 | CONFIG_PCI=y | 28 | CONFIG_PCI=y |
30 | CONFIG_RTC_MC146818=y | 29 | CONFIG_RTC_MC146818=y |
31 | CONFIG_SYS_NS16550=y | 30 | CONFIG_SYS_NS16550=y |
32 | 31 |
configs/malta_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0xBE000000 | 2 | CONFIG_SYS_TEXT_BASE=0xBE000000 |
3 | CONFIG_TARGET_MALTA=y | 3 | CONFIG_TARGET_MALTA=y |
4 | CONFIG_MISC_INIT_R=y | 4 | CONFIG_MISC_INIT_R=y |
5 | CONFIG_BOARD_EARLY_INIT_F=y | 5 | CONFIG_BOARD_EARLY_INIT_F=y |
6 | CONFIG_HUSH_PARSER=y | 6 | CONFIG_HUSH_PARSER=y |
7 | CONFIG_SYS_PROMPT="malta # " | 7 | CONFIG_SYS_PROMPT="malta # " |
8 | # CONFIG_AUTOBOOT is not set | 8 | # CONFIG_AUTOBOOT is not set |
9 | CONFIG_CMD_IMLS=y | 9 | CONFIG_CMD_IMLS=y |
10 | CONFIG_CMD_IDE=y | 10 | CONFIG_CMD_IDE=y |
11 | # CONFIG_CMD_LOADB is not set | 11 | # CONFIG_CMD_LOADB is not set |
12 | # CONFIG_CMD_LOADS is not set | 12 | # CONFIG_CMD_LOADS is not set |
13 | CONFIG_CMD_PCI=y | 13 | CONFIG_CMD_PCI=y |
14 | # CONFIG_CMD_SETEXPR is not set | 14 | # CONFIG_CMD_SETEXPR is not set |
15 | CONFIG_CMD_DHCP=y | 15 | CONFIG_CMD_DHCP=y |
16 | # CONFIG_CMD_NFS is not set | 16 | # CONFIG_CMD_NFS is not set |
17 | CONFIG_CMD_PING=y | 17 | CONFIG_CMD_PING=y |
18 | CONFIG_CMD_DATE=y | 18 | CONFIG_CMD_DATE=y |
19 | # CONFIG_ISO_PARTITION is not set | 19 | # CONFIG_ISO_PARTITION is not set |
20 | CONFIG_OF_EMBED=y | ||
21 | CONFIG_DEFAULT_DEVICE_TREE="mti,malta" | 20 | CONFIG_DEFAULT_DEVICE_TREE="mti,malta" |
22 | CONFIG_ENV_IS_IN_FLASH=y | 21 | CONFIG_ENV_IS_IN_FLASH=y |
23 | CONFIG_MTD_NOR_FLASH=y | 22 | CONFIG_MTD_NOR_FLASH=y |
24 | CONFIG_FLASH_CFI_DRIVER=y | 23 | CONFIG_FLASH_CFI_DRIVER=y |
25 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 24 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
26 | CONFIG_SYS_FLASH_CFI=y | 25 | CONFIG_SYS_FLASH_CFI=y |
27 | CONFIG_PCI=y | 26 | CONFIG_PCI=y |
28 | CONFIG_RTC_MC146818=y | 27 | CONFIG_RTC_MC146818=y |
29 | CONFIG_SYS_NS16550=y | 28 | CONFIG_SYS_NS16550=y |
30 | 29 |
configs/maltael_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0xBE000000 | 2 | CONFIG_SYS_TEXT_BASE=0xBE000000 |
3 | CONFIG_TARGET_MALTA=y | 3 | CONFIG_TARGET_MALTA=y |
4 | CONFIG_SYS_LITTLE_ENDIAN=y | 4 | CONFIG_SYS_LITTLE_ENDIAN=y |
5 | CONFIG_MISC_INIT_R=y | 5 | CONFIG_MISC_INIT_R=y |
6 | CONFIG_BOARD_EARLY_INIT_F=y | 6 | CONFIG_BOARD_EARLY_INIT_F=y |
7 | CONFIG_HUSH_PARSER=y | 7 | CONFIG_HUSH_PARSER=y |
8 | CONFIG_SYS_PROMPT="maltael # " | 8 | CONFIG_SYS_PROMPT="maltael # " |
9 | # CONFIG_AUTOBOOT is not set | 9 | # CONFIG_AUTOBOOT is not set |
10 | CONFIG_CMD_IMLS=y | 10 | CONFIG_CMD_IMLS=y |
11 | CONFIG_CMD_IDE=y | 11 | CONFIG_CMD_IDE=y |
12 | # CONFIG_CMD_LOADB is not set | 12 | # CONFIG_CMD_LOADB is not set |
13 | # CONFIG_CMD_LOADS is not set | 13 | # CONFIG_CMD_LOADS is not set |
14 | CONFIG_CMD_PCI=y | 14 | CONFIG_CMD_PCI=y |
15 | # CONFIG_CMD_SETEXPR is not set | 15 | # CONFIG_CMD_SETEXPR is not set |
16 | CONFIG_CMD_DHCP=y | 16 | CONFIG_CMD_DHCP=y |
17 | # CONFIG_CMD_NFS is not set | 17 | # CONFIG_CMD_NFS is not set |
18 | CONFIG_CMD_PING=y | 18 | CONFIG_CMD_PING=y |
19 | CONFIG_CMD_DATE=y | 19 | CONFIG_CMD_DATE=y |
20 | # CONFIG_ISO_PARTITION is not set | 20 | # CONFIG_ISO_PARTITION is not set |
21 | CONFIG_OF_EMBED=y | ||
22 | CONFIG_DEFAULT_DEVICE_TREE="mti,malta" | 21 | CONFIG_DEFAULT_DEVICE_TREE="mti,malta" |
23 | CONFIG_ENV_IS_IN_FLASH=y | 22 | CONFIG_ENV_IS_IN_FLASH=y |
24 | CONFIG_MTD_NOR_FLASH=y | 23 | CONFIG_MTD_NOR_FLASH=y |
25 | CONFIG_FLASH_CFI_DRIVER=y | 24 | CONFIG_FLASH_CFI_DRIVER=y |
26 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | 25 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y |
27 | CONFIG_SYS_FLASH_CFI=y | 26 | CONFIG_SYS_FLASH_CFI=y |
28 | CONFIG_PCI=y | 27 | CONFIG_PCI=y |
29 | CONFIG_RTC_MC146818=y | 28 | CONFIG_RTC_MC146818=y |
30 | CONFIG_SYS_NS16550=y | 29 | CONFIG_SYS_NS16550=y |
31 | 30 |
configs/mscc_jr2_defconfig
File was created | 1 | CONFIG_MIPS=y | |
2 | CONFIG_SYS_TEXT_BASE=0x40000000 | ||
3 | CONFIG_SYS_MALLOC_F_LEN=0x2000 | ||
4 | CONFIG_ARCH_MSCC=y | ||
5 | CONFIG_SOC_JR2=y | ||
6 | CONFIG_SYS_LITTLE_ENDIAN=y | ||
7 | CONFIG_FIT=y | ||
8 | CONFIG_BOOTDELAY=3 | ||
9 | CONFIG_USE_BOOTARGS=y | ||
10 | CONFIG_BOOTARGS="console=ttyS0,115200" | ||
11 | CONFIG_LOGLEVEL=7 | ||
12 | CONFIG_DISPLAY_CPUINFO=y | ||
13 | CONFIG_SYS_PROMPT="jr2 # " | ||
14 | # CONFIG_CMD_BDI is not set | ||
15 | # CONFIG_CMD_CONSOLE is not set | ||
16 | # CONFIG_CMD_ELF is not set | ||
17 | # CONFIG_CMD_EXPORTENV is not set | ||
18 | # CONFIG_CMD_IMPORTENV is not set | ||
19 | # CONFIG_CMD_CRC32 is not set | ||
20 | CONFIG_CMD_MD5SUM=y | ||
21 | CONFIG_CMD_MEMINFO=y | ||
22 | CONFIG_CMD_MEMTEST=y | ||
23 | # CONFIG_CMD_FLASH is not set | ||
24 | CONFIG_CMD_GPIO=y | ||
25 | CONFIG_CMD_SF=y | ||
26 | CONFIG_CMD_SPI=y | ||
27 | # CONFIG_CMD_NET is not set | ||
28 | CONFIG_CMD_MTDPARTS=y | ||
29 | CONFIG_MTDIDS_DEFAULT="nor0=spi_flash" | ||
30 | CONFIG_MTDPARTS_DEFAULT="mtdparts=spi_flash:1m(UBoot),256k(Env),256k(Env.bk)" | ||
31 | # CONFIG_ISO_PARTITION is not set | ||
32 | CONFIG_DEFAULT_DEVICE_TREE="jr2_pcb110" | ||
33 | CONFIG_OF_LIST="jr2_pcb110 jr2_pcb111 serval2_pcb112" | ||
34 | CONFIG_DTB_RESELECT=y | ||
35 | CONFIG_MULTI_DTB_FIT=y | ||
36 | CONFIG_ENV_IS_IN_SPI_FLASH=y | ||
37 | CONFIG_NET_RANDOM_ETHADDR=y | ||
38 | CONFIG_CLK=y | ||
39 | CONFIG_DM_GPIO=y | ||
40 | CONFIG_MSCC_SGPIO=y | ||
41 | CONFIG_LED=y | ||
42 | CONFIG_LED_GPIO=y | ||
43 | CONFIG_DM_SPI_FLASH=y | ||
44 | CONFIG_SPI_FLASH=y | ||
45 | CONFIG_SPI_FLASH_BAR=y | ||
46 | CONFIG_SPI_FLASH_GIGADEVICE=y | ||
47 | CONFIG_SPI_FLASH_MACRONIX=y | ||
48 | CONFIG_SPI_FLASH_SPANSION=y | ||
49 | CONFIG_SPI_FLASH_WINBOND=y | ||
50 | CONFIG_SPI_FLASH_MTD=y | ||
51 | CONFIG_DM_ETH=y | ||
52 | CONFIG_PINCTRL=y | ||
53 | CONFIG_PINCONF=y | ||
54 | CONFIG_DM_SERIAL=y | ||
55 | CONFIG_SYS_NS16550=y | ||
56 | CONFIG_SPI=y | ||
57 | CONFIG_DM_SPI=y | ||
58 | CONFIG_LZMA=y | ||
59 | CONFIG_XZ=y | ||
60 |
configs/mscc_luton_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x40000000 | 2 | CONFIG_SYS_TEXT_BASE=0x40000000 |
3 | CONFIG_SYS_MALLOC_F_LEN=0x2000 | 3 | CONFIG_SYS_MALLOC_F_LEN=0x2000 |
4 | CONFIG_DEBUG_UART_BOARD_INIT=y | 4 | CONFIG_DEBUG_UART_BOARD_INIT=y |
5 | CONFIG_DEBUG_UART_BASE=0x70100000 | 5 | CONFIG_DEBUG_UART_BASE=0x70100000 |
6 | CONFIG_DEBUG_UART_CLOCK=208333333 | 6 | CONFIG_DEBUG_UART_CLOCK=208333333 |
7 | CONFIG_ARCH_MSCC=y | 7 | CONFIG_ARCH_MSCC=y |
8 | CONFIG_TARGET_LUTON_PCB091=y | 8 | CONFIG_SOC_LUTON=y |
9 | CONFIG_DDRTYPE_MT47H128M8HQ=y | 9 | CONFIG_DDRTYPE_MT47H128M8HQ=y |
10 | CONFIG_SYS_LITTLE_ENDIAN=y | 10 | CONFIG_SYS_LITTLE_ENDIAN=y |
11 | CONFIG_MIPS_BOOT_FDT=y | 11 | CONFIG_MIPS_BOOT_FDT=y |
12 | CONFIG_DEBUG_UART=y | 12 | CONFIG_DEBUG_UART=y |
13 | CONFIG_FIT=y | 13 | CONFIG_FIT=y |
14 | CONFIG_BOOTDELAY=3 | 14 | CONFIG_BOOTDELAY=3 |
15 | CONFIG_USE_BOOTARGS=y | 15 | CONFIG_USE_BOOTARGS=y |
16 | CONFIG_BOOTARGS="console=ttyS0,115200" | 16 | CONFIG_BOOTARGS="console=ttyS0,115200" |
17 | CONFIG_LOGLEVEL=7 | 17 | CONFIG_LOGLEVEL=7 |
18 | CONFIG_DISPLAY_CPUINFO=y | 18 | CONFIG_DISPLAY_CPUINFO=y |
19 | CONFIG_SYS_PROMPT="pcb091 # " | 19 | CONFIG_SYS_PROMPT="luton # " |
20 | # CONFIG_CMD_BDI is not set | 20 | # CONFIG_CMD_BDI is not set |
21 | # CONFIG_CMD_CONSOLE is not set | 21 | # CONFIG_CMD_CONSOLE is not set |
22 | # CONFIG_CMD_ELF is not set | 22 | # CONFIG_CMD_ELF is not set |
23 | # CONFIG_CMD_EXPORTENV is not set | 23 | # CONFIG_CMD_EXPORTENV is not set |
24 | # CONFIG_CMD_IMPORTENV is not set | 24 | # CONFIG_CMD_IMPORTENV is not set |
25 | # CONFIG_CMD_CRC32 is not set | 25 | # CONFIG_CMD_CRC32 is not set |
26 | CONFIG_CMD_MD5SUM=y | 26 | CONFIG_CMD_MD5SUM=y |
27 | CONFIG_CMD_MEMINFO=y | 27 | CONFIG_CMD_MEMINFO=y |
28 | CONFIG_CMD_MEMTEST=y | 28 | CONFIG_CMD_MEMTEST=y |
29 | # CONFIG_CMD_FLASH is not set | 29 | # CONFIG_CMD_FLASH is not set |
30 | CONFIG_CMD_GPIO=y | 30 | CONFIG_CMD_GPIO=y |
31 | CONFIG_CMD_SF=y | 31 | CONFIG_CMD_SF=y |
32 | CONFIG_CMD_SPI=y | 32 | CONFIG_CMD_SPI=y |
33 | CONFIG_CMD_DHCP=y | 33 | CONFIG_CMD_DHCP=y |
34 | # CONFIG_NET_TFTP_VARS is not set | 34 | # CONFIG_NET_TFTP_VARS is not set |
35 | # CONFIG_CMD_NFS is not set | 35 | # CONFIG_CMD_NFS is not set |
36 | CONFIG_CMD_PING=y | 36 | CONFIG_CMD_PING=y |
37 | CONFIG_CMD_TIME=y | ||
37 | CONFIG_CMD_MTDPARTS=y | 38 | CONFIG_CMD_MTDPARTS=y |
38 | CONFIG_MTDIDS_DEFAULT="nor0=spi_flash" | 39 | CONFIG_MTDIDS_DEFAULT="nor0=spi_flash" |
39 | CONFIG_MTDPARTS_DEFAULT="mtdparts=spi_flash:512k(UBoot),256k(Env),256k(conf),6m@1m(linux)" | 40 | CONFIG_MTDPARTS_DEFAULT="mtdparts=spi_flash:512k(UBoot),256k(Env),256k(conf),6m@1m(linux)" |
40 | # CONFIG_ISO_PARTITION is not set | 41 | # CONFIG_ISO_PARTITION is not set |
41 | CONFIG_DEFAULT_DEVICE_TREE="luton_pcb091" | 42 | CONFIG_DEFAULT_DEVICE_TREE="luton_pcb091" |
43 | CONFIG_OF_LIST="luton_pcb090 luton_pcb091" | ||
44 | CONFIG_DTB_RESELECT=y | ||
45 | CONFIG_MULTI_DTB_FIT=y | ||
42 | CONFIG_ENV_IS_IN_SPI_FLASH=y | 46 | CONFIG_ENV_IS_IN_SPI_FLASH=y |
43 | CONFIG_NET_RANDOM_ETHADDR=y | 47 | CONFIG_NET_RANDOM_ETHADDR=y |
44 | CONFIG_CLK=y | 48 | CONFIG_CLK=y |
45 | CONFIG_DM_GPIO=y | 49 | CONFIG_DM_GPIO=y |
50 | CONFIG_MSCC_SGPIO=y | ||
51 | CONFIG_LED=y | ||
52 | CONFIG_LED_GPIO=y | ||
46 | CONFIG_DM_SPI_FLASH=y | 53 | CONFIG_DM_SPI_FLASH=y |
47 | CONFIG_SPI_FLASH=y | 54 | CONFIG_SPI_FLASH=y |
48 | CONFIG_SPI_FLASH_BAR=y | 55 | CONFIG_SPI_FLASH_BAR=y |
49 | CONFIG_SPI_FLASH_GIGADEVICE=y | 56 | CONFIG_SPI_FLASH_GIGADEVICE=y |
50 | CONFIG_SPI_FLASH_MACRONIX=y | 57 | CONFIG_SPI_FLASH_MACRONIX=y |
51 | CONFIG_SPI_FLASH_SPANSION=y | 58 | CONFIG_SPI_FLASH_SPANSION=y |
52 | CONFIG_SPI_FLASH_STMICRO=y | 59 | CONFIG_SPI_FLASH_STMICRO=y |
53 | CONFIG_SPI_FLASH_WINBOND=y | 60 | CONFIG_SPI_FLASH_WINBOND=y |
54 | CONFIG_SPI_FLASH_MTD=y | 61 | CONFIG_SPI_FLASH_MTD=y |
55 | CONFIG_DM_ETH=y | 62 | CONFIG_DM_ETH=y |
56 | CONFIG_PINCTRL=y | 63 | CONFIG_PINCTRL=y |
57 | CONFIG_PINCONF=y | 64 | CONFIG_PINCONF=y |
58 | CONFIG_DM_SERIAL=y | 65 | CONFIG_DM_SERIAL=y |
59 | CONFIG_DEBUG_UART_SHIFT=2 | 66 | CONFIG_DEBUG_UART_SHIFT=2 |
60 | CONFIG_SYS_NS16550=y | 67 | CONFIG_SYS_NS16550=y |
61 | CONFIG_SPI=y | 68 | CONFIG_SPI=y |
62 | CONFIG_DM_SPI=y | 69 | CONFIG_DM_SPI=y |
63 | CONFIG_SOFT_SPI=y | 70 | CONFIG_MSCC_BB_SPI=y |
64 | CONFIG_LZMA=y | 71 | CONFIG_LZMA=y |
65 | 72 |
configs/mscc_ocelot_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x40000000 | 2 | CONFIG_SYS_TEXT_BASE=0x40000000 |
3 | CONFIG_SYS_MALLOC_F_LEN=0x2000 | 3 | CONFIG_SYS_MALLOC_F_LEN=0x2000 |
4 | CONFIG_DEBUG_UART_BOARD_INIT=y | 4 | CONFIG_DEBUG_UART_BOARD_INIT=y |
5 | CONFIG_DEBUG_UART_BASE=0x70100000 | 5 | CONFIG_DEBUG_UART_BASE=0x70100000 |
6 | CONFIG_DEBUG_UART_CLOCK=250000000 | 6 | CONFIG_DEBUG_UART_CLOCK=250000000 |
7 | CONFIG_ARCH_MSCC=y | 7 | CONFIG_ARCH_MSCC=y |
8 | CONFIG_TARGET_OCELOT_PCB123=y | ||
9 | CONFIG_SYS_LITTLE_ENDIAN=y | 8 | CONFIG_SYS_LITTLE_ENDIAN=y |
10 | CONFIG_DEBUG_UART=y | 9 | CONFIG_DEBUG_UART=y |
11 | CONFIG_FIT=y | 10 | CONFIG_FIT=y |
12 | CONFIG_BOOTDELAY=3 | 11 | CONFIG_BOOTDELAY=3 |
13 | CONFIG_USE_BOOTARGS=y | 12 | CONFIG_USE_BOOTARGS=y |
14 | CONFIG_BOOTARGS="console=ttyS0,115200" | 13 | CONFIG_BOOTARGS="console=ttyS0,115200" |
15 | CONFIG_LOGLEVEL=7 | 14 | CONFIG_LOGLEVEL=7 |
16 | CONFIG_DISPLAY_CPUINFO=y | 15 | CONFIG_DISPLAY_CPUINFO=y |
17 | CONFIG_SYS_PROMPT="pcb123 # " | 16 | CONFIG_SYS_PROMPT="ocelot # " |
18 | # CONFIG_CMD_BDI is not set | 17 | # CONFIG_CMD_BDI is not set |
19 | # CONFIG_CMD_CONSOLE is not set | 18 | # CONFIG_CMD_CONSOLE is not set |
20 | # CONFIG_CMD_ELF is not set | 19 | # CONFIG_CMD_ELF is not set |
21 | # CONFIG_CMD_EXPORTENV is not set | 20 | # CONFIG_CMD_EXPORTENV is not set |
22 | # CONFIG_CMD_IMPORTENV is not set | 21 | # CONFIG_CMD_IMPORTENV is not set |
23 | # CONFIG_CMD_CRC32 is not set | 22 | # CONFIG_CMD_CRC32 is not set |
24 | CONFIG_CMD_MD5SUM=y | 23 | CONFIG_CMD_MD5SUM=y |
25 | CONFIG_CMD_MEMINFO=y | 24 | CONFIG_CMD_MEMINFO=y |
26 | CONFIG_CMD_MEMTEST=y | 25 | CONFIG_CMD_MEMTEST=y |
27 | # CONFIG_CMD_FLASH is not set | 26 | # CONFIG_CMD_FLASH is not set |
28 | CONFIG_CMD_GPIO=y | 27 | CONFIG_CMD_GPIO=y |
29 | CONFIG_CMD_MTD=y | 28 | CONFIG_CMD_MTD=y |
30 | CONFIG_CMD_SF=y | 29 | CONFIG_CMD_SF=y |
31 | CONFIG_CMD_SPI=y | 30 | CONFIG_CMD_SPI=y |
32 | CONFIG_CMD_DHCP=y | 31 | CONFIG_CMD_DHCP=y |
33 | # CONFIG_NET_TFTP_VARS is not set | 32 | # CONFIG_NET_TFTP_VARS is not set |
34 | # CONFIG_CMD_NFS is not set | 33 | # CONFIG_CMD_NFS is not set |
35 | CONFIG_CMD_PING=y | 34 | CONFIG_CMD_PING=y |
36 | CONFIG_CMD_MTDPARTS=y | 35 | CONFIG_CMD_MTDPARTS=y |
37 | CONFIG_MTDIDS_DEFAULT="nor0=spi_flash" | 36 | CONFIG_MTDIDS_DEFAULT="nor0=spi_flash" |
38 | CONFIG_MTDPARTS_DEFAULT="mtdparts=spi_flash:512k(UBoot),256k(Env),256k(conf),15m(linux),15m(linux.bk)" | 37 | CONFIG_MTDPARTS_DEFAULT="mtdparts=spi_flash:512k(UBoot),256k(Env),256k(conf),15m(linux),15m(linux.bk)" |
39 | CONFIG_CMD_UBI=y | 38 | CONFIG_CMD_UBI=y |
40 | # CONFIG_CMD_UBIFS is not set | 39 | # CONFIG_CMD_UBIFS is not set |
41 | # CONFIG_ISO_PARTITION is not set | 40 | # CONFIG_ISO_PARTITION is not set |
42 | CONFIG_DEFAULT_DEVICE_TREE="ocelot_pcb123" | 41 | CONFIG_DEFAULT_DEVICE_TREE="ocelot_pcb123" |
42 | CONFIG_OF_LIST="ocelot_pcb120 ocelot_pcb123" | ||
43 | CONFIG_DTB_RESELECT=y | ||
44 | CONFIG_MULTI_DTB_FIT=y | ||
43 | CONFIG_ENV_IS_IN_SPI_FLASH=y | 45 | CONFIG_ENV_IS_IN_SPI_FLASH=y |
44 | CONFIG_NET_RANDOM_ETHADDR=y | 46 | CONFIG_NET_RANDOM_ETHADDR=y |
45 | CONFIG_CLK=y | 47 | CONFIG_CLK=y |
46 | CONFIG_DM_GPIO=y | 48 | CONFIG_DM_GPIO=y |
47 | CONFIG_MTD=y | 49 | CONFIG_MTD=y |
48 | CONFIG_MTD_SPI_NAND=y | 50 | CONFIG_MTD_SPI_NAND=y |
51 | CONFIG_MSCC_SGPIO=y | ||
52 | CONFIG_LED=y | ||
53 | CONFIG_LED_GPIO=y | ||
49 | CONFIG_DM_SPI_FLASH=y | 54 | CONFIG_DM_SPI_FLASH=y |
50 | CONFIG_SPI_FLASH=y | 55 | CONFIG_SPI_FLASH=y |
51 | CONFIG_SPI_FLASH_BAR=y | 56 | CONFIG_SPI_FLASH_BAR=y |
52 | CONFIG_SPI_FLASH_GIGADEVICE=y | 57 | CONFIG_SPI_FLASH_GIGADEVICE=y |
53 | CONFIG_SPI_FLASH_MACRONIX=y | 58 | CONFIG_SPI_FLASH_MACRONIX=y |
54 | CONFIG_SPI_FLASH_SPANSION=y | 59 | CONFIG_SPI_FLASH_SPANSION=y |
55 | CONFIG_SPI_FLASH_WINBOND=y | 60 | CONFIG_SPI_FLASH_WINBOND=y |
56 | CONFIG_SPI_FLASH_MTD=y | 61 | CONFIG_SPI_FLASH_MTD=y |
57 | CONFIG_DM_ETH=y | 62 | CONFIG_DM_ETH=y |
58 | CONFIG_PINCTRL=y | 63 | CONFIG_PINCTRL=y |
59 | CONFIG_PINCONF=y | 64 | CONFIG_PINCONF=y |
60 | CONFIG_DM_SERIAL=y | 65 | CONFIG_DM_SERIAL=y |
61 | CONFIG_DEBUG_UART_SHIFT=2 | 66 | CONFIG_DEBUG_UART_SHIFT=2 |
62 | CONFIG_DEBUG_UART_ANNOUNCE=y | 67 | CONFIG_DEBUG_UART_ANNOUNCE=y |
63 | CONFIG_SYS_NS16550=y | 68 | CONFIG_SYS_NS16550=y |
64 | CONFIG_SPI=y | 69 | CONFIG_SPI=y |
65 | CONFIG_DM_SPI=y | 70 | CONFIG_DM_SPI=y |
66 | CONFIG_DESIGNWARE_SPI=y |
configs/mscc_ocelot_pcb120_defconfig
1 | CONFIG_MIPS=y | File was deleted | |
2 | CONFIG_SYS_TEXT_BASE=0x40000000 | ||
3 | CONFIG_SYS_MALLOC_F_LEN=0x2000 | ||
4 | CONFIG_ARCH_MSCC=y | ||
5 | CONFIG_SYS_LITTLE_ENDIAN=y | ||
6 | CONFIG_FIT=y | ||
7 | CONFIG_BOOTDELAY=3 | ||
8 | CONFIG_USE_BOOTARGS=y | ||
9 | CONFIG_BOOTARGS="console=ttyS0,115200" | ||
10 | CONFIG_LOGLEVEL=7 | ||
11 | CONFIG_DISPLAY_CPUINFO=y | ||
12 | CONFIG_SYS_PROMPT="pcb120 # " | ||
13 | # CONFIG_CMD_BDI is not set | ||
14 | # CONFIG_CMD_CONSOLE is not set | ||
15 | # CONFIG_CMD_ELF is not set | ||
16 | # CONFIG_CMD_EXPORTENV is not set | ||
17 | # CONFIG_CMD_IMPORTENV is not set | ||
18 | # CONFIG_CMD_CRC32 is not set | ||
19 | CONFIG_CMD_MD5SUM=y | ||
20 | CONFIG_CMD_MEMINFO=y | ||
21 | CONFIG_CMD_MEMTEST=y | ||
22 | # CONFIG_CMD_FLASH is not set | ||
23 | CONFIG_CMD_GPIO=y | ||
24 | CONFIG_CMD_MTD=y | ||
25 | CONFIG_CMD_SF=y | ||
26 | CONFIG_CMD_SPI=y | ||
27 | CONFIG_CMD_DHCP=y | ||
28 | # CONFIG_NET_TFTP_VARS is not set | ||
29 | # CONFIG_CMD_NFS is not set | ||
30 | CONFIG_CMD_PING=y | ||
31 | CONFIG_CMD_MTDPARTS=y | ||
32 | CONFIG_MTDIDS_DEFAULT="nor0=spi_flash" | ||
33 | CONFIG_MTDPARTS_DEFAULT="mtdparts=spi_flash:512k(UBoot),256k(Env),256k(conf),15m(linux),15m(linux.bk)" | ||
34 | CONFIG_CMD_UBI=y | ||
35 | # CONFIG_CMD_UBIFS is not set | ||
36 | # CONFIG_ISO_PARTITION is not set | ||
37 | CONFIG_DEFAULT_DEVICE_TREE="ocelot_pcb120" | ||
38 | CONFIG_ENV_IS_IN_SPI_FLASH=y | ||
39 | CONFIG_NET_RANDOM_ETHADDR=y | ||
40 | CONFIG_CLK=y | ||
41 | CONFIG_DM_GPIO=y | ||
42 | CONFIG_MTD=y | ||
43 | CONFIG_MTD_SPI_NAND=y | ||
44 | CONFIG_DM_SPI_FLASH=y | ||
45 | CONFIG_SPI_FLASH=y | ||
46 | CONFIG_SPI_FLASH_BAR=y | ||
47 | CONFIG_SPI_FLASH_GIGADEVICE=y | ||
48 | CONFIG_SPI_FLASH_MACRONIX=y | ||
49 | CONFIG_SPI_FLASH_SPANSION=y | ||
50 | CONFIG_SPI_FLASH_WINBOND=y | ||
51 | CONFIG_SPI_FLASH_MTD=y | ||
52 | CONFIG_DM_ETH=y | ||
53 | CONFIG_PINCTRL=y | ||
54 | CONFIG_PINCONF=y | ||
55 | CONFIG_DM_SERIAL=y | ||
56 | CONFIG_SYS_NS16550=y | ||
57 | CONFIG_SPI=y | ||
58 | CONFIG_DM_SPI=y | ||
59 | CONFIG_DESIGNWARE_SPI=y | ||
60 | CONFIG_LZMA=y | ||
61 | 1 | CONFIG_MIPS=y |
configs/netgear_cg3100d_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 4 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
5 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
6 | CONFIG_MIPS_BOOT_FDT=y | 6 | CONFIG_MIPS_BOOT_FDT=y |
7 | CONFIG_NR_DRAM_BANKS=1 | 7 | CONFIG_NR_DRAM_BANKS=1 |
8 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 8 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
9 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 9 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
10 | CONFIG_DISPLAY_CPUINFO=y | 10 | CONFIG_DISPLAY_CPUINFO=y |
11 | CONFIG_HUSH_PARSER=y | 11 | CONFIG_HUSH_PARSER=y |
12 | CONFIG_SYS_PROMPT="CG3100D # " | 12 | CONFIG_SYS_PROMPT="CG3100D # " |
13 | CONFIG_CMD_CPU=y | 13 | CONFIG_CMD_CPU=y |
14 | CONFIG_CMD_LICENSE=y | 14 | CONFIG_CMD_LICENSE=y |
15 | # CONFIG_CMD_BOOTD is not set | 15 | # CONFIG_CMD_BOOTD is not set |
16 | # CONFIG_CMD_ELF is not set | 16 | # CONFIG_CMD_ELF is not set |
17 | # CONFIG_CMD_XIMG is not set | 17 | # CONFIG_CMD_XIMG is not set |
18 | # CONFIG_CMD_EXPORTENV is not set | 18 | # CONFIG_CMD_EXPORTENV is not set |
19 | # CONFIG_CMD_IMPORTENV is not set | 19 | # CONFIG_CMD_IMPORTENV is not set |
20 | # CONFIG_CMD_EDITENV is not set | 20 | # CONFIG_CMD_EDITENV is not set |
21 | # CONFIG_CMD_SAVEENV is not set | 21 | # CONFIG_CMD_SAVEENV is not set |
22 | # CONFIG_CMD_ENV_EXISTS is not set | 22 | # CONFIG_CMD_ENV_EXISTS is not set |
23 | # CONFIG_CMD_CRC32 is not set | 23 | # CONFIG_CMD_CRC32 is not set |
24 | CONFIG_CMD_MEMINFO=y | 24 | CONFIG_CMD_MEMINFO=y |
25 | # CONFIG_CMD_FLASH is not set | 25 | # CONFIG_CMD_FLASH is not set |
26 | # CONFIG_CMD_LOADS is not set | 26 | # CONFIG_CMD_LOADS is not set |
27 | CONFIG_CMD_SF=y | 27 | CONFIG_CMD_SF=y |
28 | CONFIG_CMD_SPI=y | 28 | CONFIG_CMD_SPI=y |
29 | # CONFIG_CMD_MISC is not set | 29 | # CONFIG_CMD_MISC is not set |
30 | CONFIG_OF_EMBED=y | ||
31 | CONFIG_DEFAULT_DEVICE_TREE="netgear,cg3100d" | 30 | CONFIG_DEFAULT_DEVICE_TREE="netgear,cg3100d" |
32 | # CONFIG_NET is not set | 31 | # CONFIG_NET is not set |
33 | # CONFIG_DM_DEVICE_REMOVE is not set | 32 | # CONFIG_DM_DEVICE_REMOVE is not set |
34 | CONFIG_DM_GPIO=y | 33 | CONFIG_DM_GPIO=y |
35 | CONFIG_BCM6345_GPIO=y | 34 | CONFIG_BCM6345_GPIO=y |
36 | CONFIG_LED=y | 35 | CONFIG_LED=y |
37 | CONFIG_LED_BCM6328=y | 36 | CONFIG_LED_BCM6328=y |
38 | CONFIG_LED_BLINK=y | 37 | CONFIG_LED_BLINK=y |
39 | CONFIG_LED_GPIO=y | 38 | CONFIG_LED_GPIO=y |
40 | CONFIG_DM_SPI_FLASH=y | 39 | CONFIG_DM_SPI_FLASH=y |
41 | CONFIG_SPI_FLASH=y | 40 | CONFIG_SPI_FLASH=y |
42 | CONFIG_SPI_FLASH_SPANSION=y | 41 | CONFIG_SPI_FLASH_SPANSION=y |
43 | CONFIG_SPI_FLASH_MTD=y | 42 | CONFIG_SPI_FLASH_MTD=y |
44 | CONFIG_DM_RESET=y | 43 | CONFIG_DM_RESET=y |
45 | CONFIG_RESET_BCM6345=y | 44 | CONFIG_RESET_BCM6345=y |
46 | # CONFIG_SPL_SERIAL_PRESENT is not set | 45 | # CONFIG_SPL_SERIAL_PRESENT is not set |
47 | CONFIG_DM_SERIAL=y | 46 | CONFIG_DM_SERIAL=y |
48 | CONFIG_BCM6345_SERIAL=y | 47 | CONFIG_BCM6345_SERIAL=y |
49 | CONFIG_SPI=y | 48 | CONFIG_SPI=y |
50 | CONFIG_DM_SPI=y | 49 | CONFIG_DM_SPI=y |
51 | CONFIG_BCM63XX_SPI=y | 50 | CONFIG_BCM63XX_SPI=y |
52 | CONFIG_WDT_BCM6345=y | 51 | CONFIG_WDT_BCM6345=y |
53 | 52 |
configs/netgear_dgnd3700v2_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM6362=y | 4 | CONFIG_SOC_BMIPS_BCM6362=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_NR_DRAM_BANKS=1 | 8 | CONFIG_NR_DRAM_BANKS=1 |
9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
10 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 10 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
11 | CONFIG_DISPLAY_CPUINFO=y | 11 | CONFIG_DISPLAY_CPUINFO=y |
12 | CONFIG_BOARD_EARLY_INIT_F=y | 12 | CONFIG_BOARD_EARLY_INIT_F=y |
13 | CONFIG_HUSH_PARSER=y | 13 | CONFIG_HUSH_PARSER=y |
14 | CONFIG_SYS_PROMPT="DGND3700v2 # " | 14 | CONFIG_SYS_PROMPT="DGND3700v2 # " |
15 | CONFIG_CMD_CPU=y | 15 | CONFIG_CMD_CPU=y |
16 | CONFIG_CMD_LICENSE=y | 16 | CONFIG_CMD_LICENSE=y |
17 | # CONFIG_CMD_BOOTD is not set | 17 | # CONFIG_CMD_BOOTD is not set |
18 | # CONFIG_CMD_ELF is not set | 18 | # CONFIG_CMD_ELF is not set |
19 | # CONFIG_CMD_XIMG is not set | 19 | # CONFIG_CMD_XIMG is not set |
20 | # CONFIG_CMD_EXPORTENV is not set | 20 | # CONFIG_CMD_EXPORTENV is not set |
21 | # CONFIG_CMD_IMPORTENV is not set | 21 | # CONFIG_CMD_IMPORTENV is not set |
22 | # CONFIG_CMD_EDITENV is not set | 22 | # CONFIG_CMD_EDITENV is not set |
23 | # CONFIG_CMD_SAVEENV is not set | 23 | # CONFIG_CMD_SAVEENV is not set |
24 | # CONFIG_CMD_ENV_EXISTS is not set | 24 | # CONFIG_CMD_ENV_EXISTS is not set |
25 | # CONFIG_CMD_CRC32 is not set | 25 | # CONFIG_CMD_CRC32 is not set |
26 | CONFIG_CMD_MEMINFO=y | 26 | CONFIG_CMD_MEMINFO=y |
27 | # CONFIG_CMD_FLASH is not set | 27 | # CONFIG_CMD_FLASH is not set |
28 | # CONFIG_CMD_LOADS is not set | 28 | # CONFIG_CMD_LOADS is not set |
29 | CONFIG_CMD_USB=y | 29 | CONFIG_CMD_USB=y |
30 | CONFIG_CMD_MII=y | 30 | CONFIG_CMD_MII=y |
31 | CONFIG_CMD_PING=y | 31 | CONFIG_CMD_PING=y |
32 | # CONFIG_CMD_MISC is not set | 32 | # CONFIG_CMD_MISC is not set |
33 | CONFIG_OF_EMBED=y | ||
34 | CONFIG_DEFAULT_DEVICE_TREE="netgear,dgnd3700v2" | 33 | CONFIG_DEFAULT_DEVICE_TREE="netgear,dgnd3700v2" |
35 | CONFIG_NET_RANDOM_ETHADDR=y | 34 | CONFIG_NET_RANDOM_ETHADDR=y |
36 | # CONFIG_DM_DEVICE_REMOVE is not set | 35 | # CONFIG_DM_DEVICE_REMOVE is not set |
37 | CONFIG_BCM6348_IUDMA=y | 36 | CONFIG_BCM6348_IUDMA=y |
38 | CONFIG_DM_GPIO=y | 37 | CONFIG_DM_GPIO=y |
39 | CONFIG_BCM6345_GPIO=y | 38 | CONFIG_BCM6345_GPIO=y |
40 | CONFIG_LED=y | 39 | CONFIG_LED=y |
41 | CONFIG_LED_BCM6328=y | 40 | CONFIG_LED_BCM6328=y |
42 | CONFIG_LED_BLINK=y | 41 | CONFIG_LED_BLINK=y |
43 | CONFIG_LED_GPIO=y | 42 | CONFIG_LED_GPIO=y |
44 | CONFIG_DM_ETH=y | 43 | CONFIG_DM_ETH=y |
45 | CONFIG_PHY_GIGE=y | 44 | CONFIG_PHY_GIGE=y |
46 | CONFIG_BCM6368_ETH=y | 45 | CONFIG_BCM6368_ETH=y |
47 | CONFIG_PHY=y | 46 | CONFIG_PHY=y |
48 | CONFIG_BCM6368_USBH_PHY=y | 47 | CONFIG_BCM6368_USBH_PHY=y |
49 | CONFIG_POWER_DOMAIN=y | 48 | CONFIG_POWER_DOMAIN=y |
50 | CONFIG_BCM6328_POWER_DOMAIN=y | 49 | CONFIG_BCM6328_POWER_DOMAIN=y |
51 | CONFIG_DM_RESET=y | 50 | CONFIG_DM_RESET=y |
52 | CONFIG_RESET_BCM6345=y | 51 | CONFIG_RESET_BCM6345=y |
53 | # CONFIG_SPL_SERIAL_PRESENT is not set | 52 | # CONFIG_SPL_SERIAL_PRESENT is not set |
54 | CONFIG_DM_SERIAL=y | 53 | CONFIG_DM_SERIAL=y |
55 | CONFIG_BCM6345_SERIAL=y | 54 | CONFIG_BCM6345_SERIAL=y |
56 | CONFIG_USB=y | 55 | CONFIG_USB=y |
57 | CONFIG_DM_USB=y | 56 | CONFIG_DM_USB=y |
58 | CONFIG_USB_EHCI_HCD=y | 57 | CONFIG_USB_EHCI_HCD=y |
59 | CONFIG_USB_EHCI_GENERIC=y | 58 | CONFIG_USB_EHCI_GENERIC=y |
60 | CONFIG_USB_OHCI_HCD=y | 59 | CONFIG_USB_OHCI_HCD=y |
61 | CONFIG_USB_OHCI_GENERIC=y | 60 | CONFIG_USB_OHCI_GENERIC=y |
62 | 61 |
configs/pic32mzdask_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x9D004000 | 2 | CONFIG_SYS_TEXT_BASE=0x9D004000 |
3 | CONFIG_SYS_MALLOC_F_LEN=0x600 | 3 | CONFIG_SYS_MALLOC_F_LEN=0x600 |
4 | CONFIG_MACH_PIC32=y | 4 | CONFIG_MACH_PIC32=y |
5 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
6 | CONFIG_MIPS_BOOT_FDT=y | 6 | CONFIG_MIPS_BOOT_FDT=y |
7 | CONFIG_DISTRO_DEFAULTS=y | 7 | CONFIG_DISTRO_DEFAULTS=y |
8 | CONFIG_BOOTDELAY=5 | 8 | CONFIG_BOOTDELAY=5 |
9 | CONFIG_SYS_PROMPT="dask # " | 9 | CONFIG_SYS_PROMPT="dask # " |
10 | # CONFIG_CMD_SAVEENV is not set | 10 | # CONFIG_CMD_SAVEENV is not set |
11 | CONFIG_LOOPW=y | 11 | CONFIG_LOOPW=y |
12 | CONFIG_CMD_MEMINFO=y | 12 | CONFIG_CMD_MEMINFO=y |
13 | CONFIG_CMD_MEMTEST=y | 13 | CONFIG_CMD_MEMTEST=y |
14 | CONFIG_CMD_CLK=y | 14 | CONFIG_CMD_CLK=y |
15 | # CONFIG_CMD_FLASH is not set | 15 | # CONFIG_CMD_FLASH is not set |
16 | CONFIG_CMD_GPIO=y | 16 | CONFIG_CMD_GPIO=y |
17 | CONFIG_CMD_MMC=y | 17 | CONFIG_CMD_MMC=y |
18 | CONFIG_CMD_USB=y | 18 | CONFIG_CMD_USB=y |
19 | CONFIG_CMD_RARP=y | 19 | CONFIG_CMD_RARP=y |
20 | CONFIG_CMD_TIME=y | 20 | CONFIG_CMD_TIME=y |
21 | CONFIG_CMD_EXT4_WRITE=y | 21 | CONFIG_CMD_EXT4_WRITE=y |
22 | # CONFIG_ISO_PARTITION is not set | 22 | # CONFIG_ISO_PARTITION is not set |
23 | # CONFIG_EFI_PARTITION is not set | 23 | # CONFIG_EFI_PARTITION is not set |
24 | CONFIG_OF_EMBED=y | ||
25 | CONFIG_DEFAULT_DEVICE_TREE="pic32mzda_sk" | 24 | CONFIG_DEFAULT_DEVICE_TREE="pic32mzda_sk" |
26 | CONFIG_NET_RANDOM_ETHADDR=y | 25 | CONFIG_NET_RANDOM_ETHADDR=y |
27 | # CONFIG_BLK is not set | 26 | # CONFIG_BLK is not set |
28 | CONFIG_CLK=y | 27 | CONFIG_CLK=y |
29 | CONFIG_DM_GPIO=y | 28 | CONFIG_DM_GPIO=y |
30 | CONFIG_MMC=y | 29 | CONFIG_MMC=y |
31 | CONFIG_DM_MMC=y | 30 | CONFIG_DM_MMC=y |
32 | CONFIG_MMC_SDHCI=y | 31 | CONFIG_MMC_SDHCI=y |
33 | CONFIG_MMC_SDHCI_PIC32=y | 32 | CONFIG_MMC_SDHCI_PIC32=y |
34 | CONFIG_DM_ETH=y | 33 | CONFIG_DM_ETH=y |
35 | CONFIG_MII=y | 34 | CONFIG_MII=y |
36 | CONFIG_PIC32_ETH=y | 35 | CONFIG_PIC32_ETH=y |
37 | CONFIG_PINCTRL=y | 36 | CONFIG_PINCTRL=y |
38 | # CONFIG_PINCTRL_FULL is not set | 37 | # CONFIG_PINCTRL_FULL is not set |
39 | CONFIG_DM_SERIAL=y | 38 | CONFIG_DM_SERIAL=y |
40 | CONFIG_USB=y | 39 | CONFIG_USB=y |
41 | CONFIG_DM_USB=y | 40 | CONFIG_DM_USB=y |
42 | CONFIG_USB_MUSB_HOST=y | 41 | CONFIG_USB_MUSB_HOST=y |
43 | CONFIG_USB_MUSB_PIC32=y | 42 | CONFIG_USB_MUSB_PIC32=y |
44 | CONFIG_FAT_WRITE=y | 43 | CONFIG_FAT_WRITE=y |
45 | CONFIG_USE_TINY_PRINTF=y | 44 | CONFIG_USE_TINY_PRINTF=y |
46 | CONFIG_CMD_DHRYSTONE=y | 45 | CONFIG_CMD_DHRYSTONE=y |
47 | 46 |
configs/sagem_f@st1704_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM6338=y | 4 | CONFIG_SOC_BMIPS_BCM6338=y |
5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 5 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
7 | CONFIG_MIPS_BOOT_FDT=y | 7 | CONFIG_MIPS_BOOT_FDT=y |
8 | CONFIG_NR_DRAM_BANKS=1 | 8 | CONFIG_NR_DRAM_BANKS=1 |
9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 9 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
10 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 10 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
11 | CONFIG_DISPLAY_CPUINFO=y | 11 | CONFIG_DISPLAY_CPUINFO=y |
12 | CONFIG_HUSH_PARSER=y | 12 | CONFIG_HUSH_PARSER=y |
13 | CONFIG_SYS_PROMPT="F@ST1704 # " | 13 | CONFIG_SYS_PROMPT="F@ST1704 # " |
14 | CONFIG_CMD_CPU=y | 14 | CONFIG_CMD_CPU=y |
15 | CONFIG_CMD_LICENSE=y | 15 | CONFIG_CMD_LICENSE=y |
16 | # CONFIG_CMD_BOOTD is not set | 16 | # CONFIG_CMD_BOOTD is not set |
17 | # CONFIG_CMD_ELF is not set | 17 | # CONFIG_CMD_ELF is not set |
18 | # CONFIG_CMD_XIMG is not set | 18 | # CONFIG_CMD_XIMG is not set |
19 | # CONFIG_CMD_EXPORTENV is not set | 19 | # CONFIG_CMD_EXPORTENV is not set |
20 | # CONFIG_CMD_IMPORTENV is not set | 20 | # CONFIG_CMD_IMPORTENV is not set |
21 | # CONFIG_CMD_EDITENV is not set | 21 | # CONFIG_CMD_EDITENV is not set |
22 | # CONFIG_CMD_SAVEENV is not set | 22 | # CONFIG_CMD_SAVEENV is not set |
23 | # CONFIG_CMD_ENV_EXISTS is not set | 23 | # CONFIG_CMD_ENV_EXISTS is not set |
24 | # CONFIG_CMD_CRC32 is not set | 24 | # CONFIG_CMD_CRC32 is not set |
25 | CONFIG_CMD_MEMINFO=y | 25 | CONFIG_CMD_MEMINFO=y |
26 | # CONFIG_CMD_FLASH is not set | 26 | # CONFIG_CMD_FLASH is not set |
27 | # CONFIG_CMD_LOADS is not set | 27 | # CONFIG_CMD_LOADS is not set |
28 | CONFIG_CMD_SF=y | 28 | CONFIG_CMD_SF=y |
29 | CONFIG_CMD_SPI=y | 29 | CONFIG_CMD_SPI=y |
30 | CONFIG_CMD_MII=y | 30 | CONFIG_CMD_MII=y |
31 | CONFIG_CMD_PING=y | 31 | CONFIG_CMD_PING=y |
32 | # CONFIG_CMD_MISC is not set | 32 | # CONFIG_CMD_MISC is not set |
33 | CONFIG_OF_EMBED=y | ||
34 | CONFIG_DEFAULT_DEVICE_TREE="sagem,f@st1704" | 33 | CONFIG_DEFAULT_DEVICE_TREE="sagem,f@st1704" |
35 | CONFIG_NET_RANDOM_ETHADDR=y | 34 | CONFIG_NET_RANDOM_ETHADDR=y |
36 | # CONFIG_DM_DEVICE_REMOVE is not set | 35 | # CONFIG_DM_DEVICE_REMOVE is not set |
37 | CONFIG_BCM6348_IUDMA=y | 36 | CONFIG_BCM6348_IUDMA=y |
38 | CONFIG_DM_GPIO=y | 37 | CONFIG_DM_GPIO=y |
39 | CONFIG_BCM6345_GPIO=y | 38 | CONFIG_BCM6345_GPIO=y |
40 | CONFIG_LED=y | 39 | CONFIG_LED=y |
41 | CONFIG_LED_GPIO=y | 40 | CONFIG_LED_GPIO=y |
42 | CONFIG_DM_SPI_FLASH=y | 41 | CONFIG_DM_SPI_FLASH=y |
43 | CONFIG_SPI_FLASH=y | 42 | CONFIG_SPI_FLASH=y |
44 | CONFIG_SPI_FLASH_WINBOND=y | 43 | CONFIG_SPI_FLASH_WINBOND=y |
45 | CONFIG_SPI_FLASH_MTD=y | 44 | CONFIG_SPI_FLASH_MTD=y |
46 | CONFIG_PHY_FIXED=y | 45 | CONFIG_PHY_FIXED=y |
47 | CONFIG_DM_ETH=y | 46 | CONFIG_DM_ETH=y |
48 | CONFIG_BCM6348_ETH=y | 47 | CONFIG_BCM6348_ETH=y |
49 | CONFIG_DM_RESET=y | 48 | CONFIG_DM_RESET=y |
50 | CONFIG_RESET_BCM6345=y | 49 | CONFIG_RESET_BCM6345=y |
51 | # CONFIG_SPL_SERIAL_PRESENT is not set | 50 | # CONFIG_SPL_SERIAL_PRESENT is not set |
52 | CONFIG_DM_SERIAL=y | 51 | CONFIG_DM_SERIAL=y |
53 | CONFIG_BCM6345_SERIAL=y | 52 | CONFIG_BCM6345_SERIAL=y |
54 | CONFIG_SPI=y | 53 | CONFIG_SPI=y |
55 | CONFIG_DM_SPI=y | 54 | CONFIG_DM_SPI=y |
56 | CONFIG_BCM63XX_SPI=y | 55 | CONFIG_BCM63XX_SPI=y |
57 | 56 |
configs/sfr_nb4-ser_ram_defconfig
1 | CONFIG_MIPS=y | 1 | CONFIG_MIPS=y |
2 | CONFIG_SYS_TEXT_BASE=0x80010000 | 2 | CONFIG_SYS_TEXT_BASE=0x80010000 |
3 | CONFIG_ARCH_BMIPS=y | 3 | CONFIG_ARCH_BMIPS=y |
4 | CONFIG_SOC_BMIPS_BCM6358=y | 4 | CONFIG_SOC_BMIPS_BCM6358=y |
5 | CONFIG_BOARD_SFR_NB4_SER=y | 5 | CONFIG_BOARD_SFR_NB4_SER=y |
6 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set | 6 | # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set |
7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set | 7 | # CONFIG_MIPS_BOOT_ENV_LEGACY is not set |
8 | CONFIG_MIPS_BOOT_FDT=y | 8 | CONFIG_MIPS_BOOT_FDT=y |
9 | CONFIG_NR_DRAM_BANKS=1 | 9 | CONFIG_NR_DRAM_BANKS=1 |
10 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set | 10 | # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set |
11 | CONFIG_OF_STDOUT_VIA_ALIAS=y | 11 | CONFIG_OF_STDOUT_VIA_ALIAS=y |
12 | CONFIG_DISPLAY_CPUINFO=y | 12 | CONFIG_DISPLAY_CPUINFO=y |
13 | CONFIG_HUSH_PARSER=y | 13 | CONFIG_HUSH_PARSER=y |
14 | CONFIG_SYS_PROMPT="NB4-SER # " | 14 | CONFIG_SYS_PROMPT="NB4-SER # " |
15 | CONFIG_CMD_CPU=y | 15 | CONFIG_CMD_CPU=y |
16 | CONFIG_CMD_LICENSE=y | 16 | CONFIG_CMD_LICENSE=y |
17 | # CONFIG_CMD_BOOTD is not set | 17 | # CONFIG_CMD_BOOTD is not set |
18 | # CONFIG_CMD_ELF is not set | 18 | # CONFIG_CMD_ELF is not set |
19 | # CONFIG_CMD_XIMG is not set | 19 | # CONFIG_CMD_XIMG is not set |
20 | # CONFIG_CMD_EXPORTENV is not set | 20 | # CONFIG_CMD_EXPORTENV is not set |
21 | # CONFIG_CMD_IMPORTENV is not set | 21 | # CONFIG_CMD_IMPORTENV is not set |
22 | # CONFIG_CMD_EDITENV is not set | 22 | # CONFIG_CMD_EDITENV is not set |
23 | # CONFIG_CMD_SAVEENV is not set | 23 | # CONFIG_CMD_SAVEENV is not set |
24 | # CONFIG_CMD_ENV_EXISTS is not set | 24 | # CONFIG_CMD_ENV_EXISTS is not set |
25 | # CONFIG_CMD_CRC32 is not set | 25 | # CONFIG_CMD_CRC32 is not set |
26 | CONFIG_CMD_MEMINFO=y | 26 | CONFIG_CMD_MEMINFO=y |
27 | # CONFIG_CMD_LOADS is not set | 27 | # CONFIG_CMD_LOADS is not set |
28 | CONFIG_CMD_USB=y | 28 | CONFIG_CMD_USB=y |
29 | CONFIG_CMD_MII=y | 29 | CONFIG_CMD_MII=y |
30 | CONFIG_CMD_PING=y | 30 | CONFIG_CMD_PING=y |
31 | # CONFIG_CMD_MISC is not set | 31 | # CONFIG_CMD_MISC is not set |
32 | CONFIG_OF_EMBED=y | ||
33 | CONFIG_DEFAULT_DEVICE_TREE="sfr,nb4-ser" | 32 | CONFIG_DEFAULT_DEVICE_TREE="sfr,nb4-ser" |
34 | CONFIG_NET_RANDOM_ETHADDR=y | 33 | CONFIG_NET_RANDOM_ETHADDR=y |
35 | # CONFIG_DM_DEVICE_REMOVE is not set | 34 | # CONFIG_DM_DEVICE_REMOVE is not set |
36 | CONFIG_BCM6348_IUDMA=y | 35 | CONFIG_BCM6348_IUDMA=y |
37 | CONFIG_DM_GPIO=y | 36 | CONFIG_DM_GPIO=y |
38 | CONFIG_BCM6345_GPIO=y | 37 | CONFIG_BCM6345_GPIO=y |
39 | CONFIG_LED=y | 38 | CONFIG_LED=y |
40 | CONFIG_LED_BCM6358=y | 39 | CONFIG_LED_BCM6358=y |
41 | CONFIG_LED_GPIO=y | 40 | CONFIG_LED_GPIO=y |
42 | CONFIG_MTD=y | 41 | CONFIG_MTD=y |
43 | CONFIG_MTD_NOR_FLASH=y | 42 | CONFIG_MTD_NOR_FLASH=y |
44 | CONFIG_FLASH_CFI_DRIVER=y | 43 | CONFIG_FLASH_CFI_DRIVER=y |
45 | CONFIG_CFI_FLASH=y | 44 | CONFIG_CFI_FLASH=y |
46 | CONFIG_SYS_FLASH_PROTECTION=y | 45 | CONFIG_SYS_FLASH_PROTECTION=y |
47 | CONFIG_SYS_FLASH_CFI=y | 46 | CONFIG_SYS_FLASH_CFI=y |
48 | CONFIG_PHY_FIXED=y | 47 | CONFIG_PHY_FIXED=y |
49 | CONFIG_DM_ETH=y | 48 | CONFIG_DM_ETH=y |
50 | CONFIG_BCM6348_ETH=y | 49 | CONFIG_BCM6348_ETH=y |
51 | CONFIG_PHY=y | 50 | CONFIG_PHY=y |
52 | CONFIG_BCM6358_USBH_PHY=y | 51 | CONFIG_BCM6358_USBH_PHY=y |
53 | CONFIG_DM_RESET=y | 52 | CONFIG_DM_RESET=y |
54 | CONFIG_RESET_BCM6345=y | 53 | CONFIG_RESET_BCM6345=y |
55 | # CONFIG_SPL_SERIAL_PRESENT is not set | 54 | # CONFIG_SPL_SERIAL_PRESENT is not set |
56 | CONFIG_DM_SERIAL=y | 55 | CONFIG_DM_SERIAL=y |
57 | CONFIG_BCM6345_SERIAL=y | 56 | CONFIG_BCM6345_SERIAL=y |
58 | CONFIG_USB=y | 57 | CONFIG_USB=y |
59 | CONFIG_DM_USB=y | 58 | CONFIG_DM_USB=y |
60 | CONFIG_USB_EHCI_HCD=y | 59 | CONFIG_USB_EHCI_HCD=y |
61 | CONFIG_USB_EHCI_GENERIC=y | 60 | CONFIG_USB_EHCI_GENERIC=y |
62 | CONFIG_USB_OHCI_HCD=y | 61 | CONFIG_USB_OHCI_HCD=y |
63 | CONFIG_USB_OHCI_GENERIC=y | 62 | CONFIG_USB_OHCI_GENERIC=y |
64 | 63 |
doc/device-tree-bindings/gpio/mscc_sgpio.txt
File was created | 1 | Microsemi Corporation (MSCC) Serial GPIO driver | |
2 | |||
3 | The MSCC serial GPIO extends the number or GPIO's on the system by | ||
4 | means of 4 dedicated pins: one input, one output, one clock and one | ||
5 | strobe pin. By attaching a number of (external) shift registers, the | ||
6 | effective GPIO count can be extended by up to 128 GPIO's per | ||
7 | controller. | ||
8 | |||
9 | Required properties: | ||
10 | - compatible : "mscc,luton-sgpio" or "mscc,ocelot-sgpio" | ||
11 | - clock: Reference clock used to generate clock divider setting. See | ||
12 | mscc,sgpio-frequency property. | ||
13 | - reg : Physical base address and length of the controller's registers. | ||
14 | - #gpio-cells : Should be two. The first cell is the pin number and the | ||
15 | second cell is used to specify optional parameters: | ||
16 | - bit 0 specifies polarity (0 for normal, 1 for inverted) | ||
17 | - gpio-controller : Marks the device node as a GPIO controller. | ||
18 | - gpio-ranges: Standard gpio range(s): phandle, gpio base, pinctrl base | ||
19 | and count. | ||
20 | |||
21 | Optional properties: | ||
22 | - ngpios: See gpio.txt | ||
23 | - mscc,sgpio-frequency: The frequency at which the serial bitstream is | ||
24 | generated and sampled. Default: 12500000 (Hz). | ||
25 | - mscc,sgpio-ports: A bitmask (32 bits) of which ports are enabled in | ||
26 | the serialized gpio stream. One 'port' will transport from 1 to 4 | ||
27 | gpio bits. Default: 0xFFFFFFFF. | ||
28 | |||
29 | Typically the pinctrl-0 and pinctrl-names properties will also be | ||
30 | present to enable the use of the SIO CLK, LD, DI and DO for some | ||
31 | regular GPIO pins. | ||
32 | |||
33 | Example: | ||
34 | |||
35 | sgpio: gpio@10700f8 { | ||
36 | compatible = "mscc,ocelot-sgpio"; | ||
37 | pinctrl-0 = <&sgpio_pins>; | ||
38 | pinctrl-names = "default"; | ||
39 | reg = <0x10700f8 0x100>; | ||
40 | gpio-controller; | ||
41 | #gpio-cells = <2>; | ||
42 | gpio-ranges = <&sgpio 0 0 64>; | ||
43 | mscc,sgpio-frequency = <12500>; | ||
44 | mscc,sgpio-ports = <0x000FFFFF>; | ||
45 | }; | ||
46 |
drivers/gpio/Kconfig
1 | # | 1 | # |
2 | # GPIO infrastructure and drivers | 2 | # GPIO infrastructure and drivers |
3 | # | 3 | # |
4 | 4 | ||
5 | menu "GPIO Support" | 5 | menu "GPIO Support" |
6 | 6 | ||
7 | config DM_GPIO | 7 | config DM_GPIO |
8 | bool "Enable Driver Model for GPIO drivers" | 8 | bool "Enable Driver Model for GPIO drivers" |
9 | depends on DM | 9 | depends on DM |
10 | help | 10 | help |
11 | Enable driver model for GPIO access. The standard GPIO | 11 | Enable driver model for GPIO access. The standard GPIO |
12 | interface (gpio_get_value(), etc.) is then implemented by | 12 | interface (gpio_get_value(), etc.) is then implemented by |
13 | the GPIO uclass. Drivers provide methods to query the | 13 | the GPIO uclass. Drivers provide methods to query the |
14 | particular GPIOs that they provide. The uclass interface | 14 | particular GPIOs that they provide. The uclass interface |
15 | is defined in include/asm-generic/gpio.h. | 15 | is defined in include/asm-generic/gpio.h. |
16 | 16 | ||
17 | config ALTERA_PIO | 17 | config ALTERA_PIO |
18 | bool "Altera PIO driver" | 18 | bool "Altera PIO driver" |
19 | depends on DM_GPIO | 19 | depends on DM_GPIO |
20 | help | 20 | help |
21 | Select this to enable PIO for Altera devices. Please find | 21 | Select this to enable PIO for Altera devices. Please find |
22 | details on the "Embedded Peripherals IP User Guide" of Altera. | 22 | details on the "Embedded Peripherals IP User Guide" of Altera. |
23 | 23 | ||
24 | config BCM6345_GPIO | 24 | config BCM6345_GPIO |
25 | bool "BCM6345 GPIO driver" | 25 | bool "BCM6345 GPIO driver" |
26 | depends on DM_GPIO && ARCH_BMIPS | 26 | depends on DM_GPIO && ARCH_BMIPS |
27 | help | 27 | help |
28 | This driver supports the GPIO banks on BCM6345 SoCs. | 28 | This driver supports the GPIO banks on BCM6345 SoCs. |
29 | 29 | ||
30 | config DWAPB_GPIO | 30 | config DWAPB_GPIO |
31 | bool "DWAPB GPIO driver" | 31 | bool "DWAPB GPIO driver" |
32 | depends on DM && DM_GPIO | 32 | depends on DM && DM_GPIO |
33 | default n | 33 | default n |
34 | help | 34 | help |
35 | Support for the Designware APB GPIO driver. | 35 | Support for the Designware APB GPIO driver. |
36 | 36 | ||
37 | config AT91_GPIO | 37 | config AT91_GPIO |
38 | bool "AT91 PIO GPIO driver" | 38 | bool "AT91 PIO GPIO driver" |
39 | depends on DM_GPIO | 39 | depends on DM_GPIO |
40 | default n | 40 | default n |
41 | help | 41 | help |
42 | Say yes here to select AT91 PIO GPIO driver. AT91 PIO | 42 | Say yes here to select AT91 PIO GPIO driver. AT91 PIO |
43 | controller manages up to 32 fully programmable input/output | 43 | controller manages up to 32 fully programmable input/output |
44 | lines. Each I/O line may be dedicated as a general-purpose | 44 | lines. Each I/O line may be dedicated as a general-purpose |
45 | I/O or be assigned to a function of an embedded peripheral. | 45 | I/O or be assigned to a function of an embedded peripheral. |
46 | The assignment to a function of an embedded peripheral is | 46 | The assignment to a function of an embedded peripheral is |
47 | the responsibility of AT91 Pinctrl driver. This driver is | 47 | the responsibility of AT91 Pinctrl driver. This driver is |
48 | responsible for the general-purpose I/O. | 48 | responsible for the general-purpose I/O. |
49 | 49 | ||
50 | config ATMEL_PIO4 | 50 | config ATMEL_PIO4 |
51 | bool "ATMEL PIO4 driver" | 51 | bool "ATMEL PIO4 driver" |
52 | depends on DM_GPIO | 52 | depends on DM_GPIO |
53 | default n | 53 | default n |
54 | help | 54 | help |
55 | Say yes here to support the Atmel PIO4 driver. | 55 | Say yes here to support the Atmel PIO4 driver. |
56 | The PIO4 is new version of Atmel PIO controller, which manages | 56 | The PIO4 is new version of Atmel PIO controller, which manages |
57 | up to 128 fully programmable input/output lines. Each I/O line | 57 | up to 128 fully programmable input/output lines. Each I/O line |
58 | may be dedicated as a general purpose I/O or be assigned to | 58 | may be dedicated as a general purpose I/O or be assigned to |
59 | a function of an embedded peripheral. | 59 | a function of an embedded peripheral. |
60 | 60 | ||
61 | config DA8XX_GPIO | 61 | config DA8XX_GPIO |
62 | bool "DA8xx GPIO Driver" | 62 | bool "DA8xx GPIO Driver" |
63 | help | 63 | help |
64 | This driver supports the DA8xx GPIO controller | 64 | This driver supports the DA8xx GPIO controller |
65 | 65 | ||
66 | config INTEL_BROADWELL_GPIO | 66 | config INTEL_BROADWELL_GPIO |
67 | bool "Intel Broadwell GPIO driver" | 67 | bool "Intel Broadwell GPIO driver" |
68 | depends on DM | 68 | depends on DM |
69 | help | 69 | help |
70 | This driver supports Broadwell U devices which have an expanded | 70 | This driver supports Broadwell U devices which have an expanded |
71 | GPIO feature set. The difference is large enough to merit a separate | 71 | GPIO feature set. The difference is large enough to merit a separate |
72 | driver from the common Intel ICH6 driver. It supports a total of | 72 | driver from the common Intel ICH6 driver. It supports a total of |
73 | 95 GPIOs which can be configured from the device tree. | 73 | 95 GPIOs which can be configured from the device tree. |
74 | 74 | ||
75 | config INTEL_ICH6_GPIO | 75 | config INTEL_ICH6_GPIO |
76 | bool "Intel ICH6 compatible legacy GPIO driver" | 76 | bool "Intel ICH6 compatible legacy GPIO driver" |
77 | depends on DM_GPIO | 77 | depends on DM_GPIO |
78 | help | 78 | help |
79 | Say yes here to select Intel ICH6 compatible legacy GPIO driver. | 79 | Say yes here to select Intel ICH6 compatible legacy GPIO driver. |
80 | 80 | ||
81 | config IMX_RGPIO2P | 81 | config IMX_RGPIO2P |
82 | bool "i.MX7ULP RGPIO2P driver" | 82 | bool "i.MX7ULP RGPIO2P driver" |
83 | depends on DM | 83 | depends on DM |
84 | default n | 84 | default n |
85 | help | 85 | help |
86 | This driver supports i.MX7ULP Rapid GPIO2P controller. | 86 | This driver supports i.MX7ULP Rapid GPIO2P controller. |
87 | 87 | ||
88 | config HSDK_CREG_GPIO | 88 | config HSDK_CREG_GPIO |
89 | bool "HSDK CREG GPIO griver" | 89 | bool "HSDK CREG GPIO griver" |
90 | depends on DM_GPIO | 90 | depends on DM_GPIO |
91 | default n | 91 | default n |
92 | help | 92 | help |
93 | This driver supports CREG GPIOs on Synopsys HSDK SOC. | 93 | This driver supports CREG GPIOs on Synopsys HSDK SOC. |
94 | 94 | ||
95 | config LPC32XX_GPIO | 95 | config LPC32XX_GPIO |
96 | bool "LPC32XX GPIO driver" | 96 | bool "LPC32XX GPIO driver" |
97 | depends on DM | 97 | depends on DM |
98 | default n | 98 | default n |
99 | help | 99 | help |
100 | Support for the LPC32XX GPIO driver. | 100 | Support for the LPC32XX GPIO driver. |
101 | 101 | ||
102 | config MSCC_BITBANG_SPI_GPIO | 102 | config MSCC_SGPIO |
103 | bool "Microsemi bitbang spi GPIO driver" | 103 | bool "Microsemi Serial GPIO driver" |
104 | depends on DM_GPIO && SOC_VCOREIII | 104 | depends on DM_GPIO && SOC_VCOREIII |
105 | help | 105 | help |
106 | Support controlling the GPIO used for SPI bitbang by software. Can | 106 | Support for the VCoreIII SoC serial GPIO device. By using a |
107 | be used by the VCoreIII SoCs, but it was mainly useful for Luton. | 107 | serial interface, the SIO controller significantly extends |
108 | the number of available GPIOs with a minimum number of | ||
109 | additional pins on the device. The primary purpose of the | ||
110 | SIO controller is to connect control signals from SFP | ||
111 | modules and to act as an LED controller. | ||
108 | 112 | ||
109 | config MSM_GPIO | 113 | config MSM_GPIO |
110 | bool "Qualcomm GPIO driver" | 114 | bool "Qualcomm GPIO driver" |
111 | depends on DM_GPIO | 115 | depends on DM_GPIO |
112 | default n | 116 | default n |
113 | help | 117 | help |
114 | Support GPIO controllers on Qualcomm Snapdragon family of SoCs. | 118 | Support GPIO controllers on Qualcomm Snapdragon family of SoCs. |
115 | This controller have single bank (default name "soc"), every | 119 | This controller have single bank (default name "soc"), every |
116 | gpio has it's own set of registers. | 120 | gpio has it's own set of registers. |
117 | Only simple GPIO operations are supported (get/set, change of | 121 | Only simple GPIO operations are supported (get/set, change of |
118 | direction and checking pin function). | 122 | direction and checking pin function). |
119 | Supported devices: | 123 | Supported devices: |
120 | - APQ8016 | 124 | - APQ8016 |
121 | - MSM8916 | 125 | - MSM8916 |
122 | 126 | ||
123 | config MXC_GPIO | 127 | config MXC_GPIO |
124 | bool "Freescale/NXP MXC GPIO driver" | 128 | bool "Freescale/NXP MXC GPIO driver" |
125 | help | 129 | help |
126 | Support GPIO controllers on various i.MX platforms | 130 | Support GPIO controllers on various i.MX platforms |
127 | 131 | ||
128 | config OMAP_GPIO | 132 | config OMAP_GPIO |
129 | bool "TI OMAP GPIO driver" | 133 | bool "TI OMAP GPIO driver" |
130 | depends on ARCH_OMAP2PLUS | 134 | depends on ARCH_OMAP2PLUS |
131 | default y | 135 | default y |
132 | help | 136 | help |
133 | Support GPIO controllers on the TI OMAP3/4/5 and related (such as | 137 | Support GPIO controllers on the TI OMAP3/4/5 and related (such as |
134 | AM335x/AM43xx/AM57xx/DRA7xx/etc) families of SoCs. | 138 | AM335x/AM43xx/AM57xx/DRA7xx/etc) families of SoCs. |
135 | 139 | ||
136 | config CMD_PCA953X | 140 | config CMD_PCA953X |
137 | bool "Enable the pca953x command" | 141 | bool "Enable the pca953x command" |
138 | help | 142 | help |
139 | Deprecated: This should be converted to driver model. | 143 | Deprecated: This should be converted to driver model. |
140 | 144 | ||
141 | This command provides access to a pca953x GPIO device using the | 145 | This command provides access to a pca953x GPIO device using the |
142 | legacy GPIO interface. Several subcommands are provided which mirror | 146 | legacy GPIO interface. Several subcommands are provided which mirror |
143 | the standard 'gpio' command. It should use that instead. | 147 | the standard 'gpio' command. It should use that instead. |
144 | 148 | ||
145 | config PM8916_GPIO | 149 | config PM8916_GPIO |
146 | bool "Qualcomm PM8916 PMIC GPIO/keypad driver" | 150 | bool "Qualcomm PM8916 PMIC GPIO/keypad driver" |
147 | depends on DM_GPIO && PMIC_PM8916 | 151 | depends on DM_GPIO && PMIC_PM8916 |
148 | help | 152 | help |
149 | Support for GPIO pins and power/reset buttons found on | 153 | Support for GPIO pins and power/reset buttons found on |
150 | Qualcomm PM8916 PMIC. | 154 | Qualcomm PM8916 PMIC. |
151 | Default name for GPIO bank is "pm8916". | 155 | Default name for GPIO bank is "pm8916". |
152 | Power and reset buttons are placed in "pm8916_key" bank and | 156 | Power and reset buttons are placed in "pm8916_key" bank and |
153 | have gpio numbers 0 and 1 respectively. | 157 | have gpio numbers 0 and 1 respectively. |
154 | 158 | ||
155 | config PCF8575_GPIO | 159 | config PCF8575_GPIO |
156 | bool "PCF8575 I2C GPIO Expander driver" | 160 | bool "PCF8575 I2C GPIO Expander driver" |
157 | depends on DM_GPIO && DM_I2C | 161 | depends on DM_GPIO && DM_I2C |
158 | help | 162 | help |
159 | Support for PCF8575 I2C 16-bit GPIO expander. Most of these | 163 | Support for PCF8575 I2C 16-bit GPIO expander. Most of these |
160 | chips are from NXP and TI. | 164 | chips are from NXP and TI. |
161 | 165 | ||
162 | config RCAR_GPIO | 166 | config RCAR_GPIO |
163 | bool "Renesas RCar GPIO driver" | 167 | bool "Renesas RCar GPIO driver" |
164 | depends on DM_GPIO && ARCH_RMOBILE | 168 | depends on DM_GPIO && ARCH_RMOBILE |
165 | help | 169 | help |
166 | This driver supports the GPIO banks on Renesas RCar SoCs. | 170 | This driver supports the GPIO banks on Renesas RCar SoCs. |
167 | 171 | ||
168 | config ROCKCHIP_GPIO | 172 | config ROCKCHIP_GPIO |
169 | bool "Rockchip GPIO driver" | 173 | bool "Rockchip GPIO driver" |
170 | depends on DM_GPIO | 174 | depends on DM_GPIO |
171 | help | 175 | help |
172 | Support GPIO access on Rockchip SoCs. The GPIOs are arranged into | 176 | Support GPIO access on Rockchip SoCs. The GPIOs are arranged into |
173 | a number of banks (different for each SoC type) each with 32 GPIOs. | 177 | a number of banks (different for each SoC type) each with 32 GPIOs. |
174 | The GPIOs for a device are defined in the device tree with one node | 178 | The GPIOs for a device are defined in the device tree with one node |
175 | for each bank. | 179 | for each bank. |
176 | 180 | ||
177 | config SANDBOX_GPIO | 181 | config SANDBOX_GPIO |
178 | bool "Enable sandbox GPIO driver" | 182 | bool "Enable sandbox GPIO driver" |
179 | depends on SANDBOX && DM && DM_GPIO | 183 | depends on SANDBOX && DM && DM_GPIO |
180 | help | 184 | help |
181 | This driver supports some simulated GPIOs which can be adjusted | 185 | This driver supports some simulated GPIOs which can be adjusted |
182 | using 'back door' functions like sandbox_gpio_set_value(). Then the | 186 | using 'back door' functions like sandbox_gpio_set_value(). Then the |
183 | GPIOs can be inspected through the normal get_get_value() | 187 | GPIOs can be inspected through the normal get_get_value() |
184 | interface. The purpose of this is to allow GPIOs to be used as | 188 | interface. The purpose of this is to allow GPIOs to be used as |
185 | normal in sandbox, perhaps with test code actually driving the | 189 | normal in sandbox, perhaps with test code actually driving the |
186 | behaviour of those GPIOs. | 190 | behaviour of those GPIOs. |
187 | 191 | ||
188 | config SANDBOX_GPIO_COUNT | 192 | config SANDBOX_GPIO_COUNT |
189 | int "Number of sandbox GPIOs" | 193 | int "Number of sandbox GPIOs" |
190 | depends on SANDBOX_GPIO | 194 | depends on SANDBOX_GPIO |
191 | default 128 | 195 | default 128 |
192 | help | 196 | help |
193 | The sandbox driver can support any number of GPIOs. Generally these | 197 | The sandbox driver can support any number of GPIOs. Generally these |
194 | are specified using the device tree. But you can also have a number | 198 | are specified using the device tree. But you can also have a number |
195 | of 'anonymous' GPIOs that do not belong to any device or bank. | 199 | of 'anonymous' GPIOs that do not belong to any device or bank. |
196 | Select a suitable value depending on your needs. | 200 | Select a suitable value depending on your needs. |
197 | 201 | ||
198 | config XILINX_GPIO | 202 | config XILINX_GPIO |
199 | bool "Xilinx GPIO driver" | 203 | bool "Xilinx GPIO driver" |
200 | depends on DM_GPIO | 204 | depends on DM_GPIO |
201 | help | 205 | help |
202 | This config enable the Xilinx GPIO driver for Microblaze. | 206 | This config enable the Xilinx GPIO driver for Microblaze. |
203 | 207 | ||
204 | config CMD_TCA642X | 208 | config CMD_TCA642X |
205 | bool "tca642x - Command to access tca642x state" | 209 | bool "tca642x - Command to access tca642x state" |
206 | help | 210 | help |
207 | DEPRECATED - This needs conversion to driver model | 211 | DEPRECATED - This needs conversion to driver model |
208 | 212 | ||
209 | This provides a way to looking at the pin state of this device. | 213 | This provides a way to looking at the pin state of this device. |
210 | This mirrors the 'gpio' command and that should be used in preference | 214 | This mirrors the 'gpio' command and that should be used in preference |
211 | to custom code. | 215 | to custom code. |
212 | 216 | ||
213 | config TEGRA_GPIO | 217 | config TEGRA_GPIO |
214 | bool "Tegra20..210 GPIO driver" | 218 | bool "Tegra20..210 GPIO driver" |
215 | depends on DM_GPIO | 219 | depends on DM_GPIO |
216 | help | 220 | help |
217 | Support for the GPIO controller contained in NVIDIA Tegra20 through | 221 | Support for the GPIO controller contained in NVIDIA Tegra20 through |
218 | Tegra210. | 222 | Tegra210. |
219 | 223 | ||
220 | config TEGRA186_GPIO | 224 | config TEGRA186_GPIO |
221 | bool "Tegra186 GPIO driver" | 225 | bool "Tegra186 GPIO driver" |
222 | depends on DM_GPIO | 226 | depends on DM_GPIO |
223 | help | 227 | help |
224 | Support for the GPIO controller contained in NVIDIA Tegra186. This | 228 | Support for the GPIO controller contained in NVIDIA Tegra186. This |
225 | covers both the "main" and "AON" controller instances, even though | 229 | covers both the "main" and "AON" controller instances, even though |
226 | they have slightly different register layout. | 230 | they have slightly different register layout. |
227 | 231 | ||
228 | config GPIO_UNIPHIER | 232 | config GPIO_UNIPHIER |
229 | bool "UniPhier GPIO" | 233 | bool "UniPhier GPIO" |
230 | depends on ARCH_UNIPHIER | 234 | depends on ARCH_UNIPHIER |
231 | help | 235 | help |
232 | Say yes here to support UniPhier GPIOs. | 236 | Say yes here to support UniPhier GPIOs. |
233 | 237 | ||
234 | config VYBRID_GPIO | 238 | config VYBRID_GPIO |
235 | bool "Vybrid GPIO driver" | 239 | bool "Vybrid GPIO driver" |
236 | depends on DM | 240 | depends on DM |
237 | default n | 241 | default n |
238 | help | 242 | help |
239 | Say yes here to support Vybrid vf610 GPIOs. | 243 | Say yes here to support Vybrid vf610 GPIOs. |
240 | 244 | ||
241 | config PIC32_GPIO | 245 | config PIC32_GPIO |
242 | bool "Microchip PIC32 GPIO driver" | 246 | bool "Microchip PIC32 GPIO driver" |
243 | depends on DM_GPIO && MACH_PIC32 | 247 | depends on DM_GPIO && MACH_PIC32 |
244 | default y | 248 | default y |
245 | help | 249 | help |
246 | Say yes here to support Microchip PIC32 GPIOs. | 250 | Say yes here to support Microchip PIC32 GPIOs. |
247 | 251 | ||
248 | config STM32F7_GPIO | 252 | config STM32F7_GPIO |
249 | bool "ST STM32 GPIO driver" | 253 | bool "ST STM32 GPIO driver" |
250 | depends on DM_GPIO && (STM32 || ARCH_STM32MP) | 254 | depends on DM_GPIO && (STM32 || ARCH_STM32MP) |
251 | default y | 255 | default y |
252 | help | 256 | help |
253 | Device model driver support for STM32 GPIO controller. It should be | 257 | Device model driver support for STM32 GPIO controller. It should be |
254 | usable on many stm32 families like stm32f4 & stm32H7. | 258 | usable on many stm32 families like stm32f4 & stm32H7. |
255 | Tested on STM32F7. | 259 | Tested on STM32F7. |
256 | 260 | ||
257 | config MVEBU_GPIO | 261 | config MVEBU_GPIO |
258 | bool "Marvell MVEBU GPIO driver" | 262 | bool "Marvell MVEBU GPIO driver" |
259 | depends on DM_GPIO && ARCH_MVEBU | 263 | depends on DM_GPIO && ARCH_MVEBU |
260 | default y | 264 | default y |
261 | help | 265 | help |
262 | Say yes here to support Marvell MVEBU (Armada XP/38x) GPIOs. | 266 | Say yes here to support Marvell MVEBU (Armada XP/38x) GPIOs. |
263 | 267 | ||
264 | config ZYNQ_GPIO | 268 | config ZYNQ_GPIO |
265 | bool "Zynq GPIO driver" | 269 | bool "Zynq GPIO driver" |
266 | depends on DM_GPIO && (ARCH_ZYNQ || ARCH_ZYNQMP) | 270 | depends on DM_GPIO && (ARCH_ZYNQ || ARCH_ZYNQMP) |
267 | default y | 271 | default y |
268 | help | 272 | help |
269 | Supports GPIO access on Zynq SoC. | 273 | Supports GPIO access on Zynq SoC. |
270 | 274 | ||
271 | config DM_74X164 | 275 | config DM_74X164 |
272 | bool "74x164 serial-in/parallel-out 8-bits shift register" | 276 | bool "74x164 serial-in/parallel-out 8-bits shift register" |
273 | depends on DM_GPIO | 277 | depends on DM_GPIO |
274 | help | 278 | help |
275 | Driver for 74x164 compatible serial-in/parallel-out 8-outputs | 279 | Driver for 74x164 compatible serial-in/parallel-out 8-outputs |
276 | shift registers, such as 74lv165, 74hc595. | 280 | shift registers, such as 74lv165, 74hc595. |
277 | This driver can be used to provide access to more gpio outputs. | 281 | This driver can be used to provide access to more gpio outputs. |
278 | 282 | ||
279 | config DM_PCA953X | 283 | config DM_PCA953X |
280 | bool "PCA95[357]x, PCA9698, TCA64xx, and MAX7310 I/O ports" | 284 | bool "PCA95[357]x, PCA9698, TCA64xx, and MAX7310 I/O ports" |
281 | depends on DM_GPIO | 285 | depends on DM_GPIO |
282 | help | 286 | help |
283 | Say yes here to provide access to several register-oriented | 287 | Say yes here to provide access to several register-oriented |
284 | SMBus I/O expanders, made mostly by NXP or TI. Compatible | 288 | SMBus I/O expanders, made mostly by NXP or TI. Compatible |
285 | models include: | 289 | models include: |
286 | 290 | ||
287 | 4 bits: pca9536, pca9537 | 291 | 4 bits: pca9536, pca9537 |
288 | 292 | ||
289 | 8 bits: max7310, max7315, pca6107, pca9534, pca9538, pca9554, | 293 | 8 bits: max7310, max7315, pca6107, pca9534, pca9538, pca9554, |
290 | pca9556, pca9557, pca9574, tca6408, xra1202 | 294 | pca9556, pca9557, pca9574, tca6408, xra1202 |
291 | 295 | ||
292 | 16 bits: max7312, max7313, pca9535, pca9539, pca9555, pca9575, | 296 | 16 bits: max7312, max7313, pca9535, pca9539, pca9555, pca9575, |
293 | tca6416 | 297 | tca6416 |
294 | 298 | ||
295 | 24 bits: tca6424 | 299 | 24 bits: tca6424 |
296 | 300 | ||
297 | 40 bits: pca9505, pca9698 | 301 | 40 bits: pca9505, pca9698 |
298 | 302 | ||
299 | Now, max 24 bits chips and PCA953X compatible chips are | 303 | Now, max 24 bits chips and PCA953X compatible chips are |
300 | supported | 304 | supported |
301 | 305 | ||
302 | config MPC8XXX_GPIO | 306 | config MPC8XXX_GPIO |
303 | bool "Freescale MPC8XXX GPIO driver" | 307 | bool "Freescale MPC8XXX GPIO driver" |
304 | depends on DM_GPIO | 308 | depends on DM_GPIO |
305 | help | 309 | help |
306 | This driver supports the built-in GPIO controller of MPC8XXX CPUs. | 310 | This driver supports the built-in GPIO controller of MPC8XXX CPUs. |
307 | Each GPIO bank is identified by its own entry in the device tree, | 311 | Each GPIO bank is identified by its own entry in the device tree, |
308 | i.e. | 312 | i.e. |
309 | 313 | ||
310 | gpio-controller@fc00 { | 314 | gpio-controller@fc00 { |
311 | #gpio-cells = <2>; | 315 | #gpio-cells = <2>; |
312 | compatible = "fsl,pq3-gpio"; | 316 | compatible = "fsl,pq3-gpio"; |
313 | reg = <0xfc00 0x100> | 317 | reg = <0xfc00 0x100> |
314 | } | 318 | } |
315 | 319 | ||
316 | By default, each bank is assumed to have 32 GPIOs, but the ngpios | 320 | By default, each bank is assumed to have 32 GPIOs, but the ngpios |
317 | setting is honored, so the number of GPIOs for each bank is | 321 | setting is honored, so the number of GPIOs for each bank is |
318 | configurable to match the actual GPIO count of the SoC (e.g. the | 322 | configurable to match the actual GPIO count of the SoC (e.g. the |
319 | 32/32/23 banks of the P1022 SoC). | 323 | 32/32/23 banks of the P1022 SoC). |
320 | 324 | ||
321 | Aside from the standard functions of input/output mode, and output | 325 | Aside from the standard functions of input/output mode, and output |
322 | value setting, the open-drain feature, which can configure individual | 326 | value setting, the open-drain feature, which can configure individual |
323 | GPIOs to work as open-drain outputs, is supported. | 327 | GPIOs to work as open-drain outputs, is supported. |
324 | 328 | ||
325 | config MT7621_GPIO | 329 | config MT7621_GPIO |
326 | bool "MediaTek MT7621 GPIO driver" | 330 | bool "MediaTek MT7621 GPIO driver" |
327 | depends on DM_GPIO && ARCH_MT7620 | 331 | depends on DM_GPIO && ARCH_MT7620 |
328 | default y | 332 | default y |
329 | help | 333 | help |
330 | Say yes here to support MediaTek MT7621 compatible GPIOs. | 334 | Say yes here to support MediaTek MT7621 compatible GPIOs. |
331 | 335 | ||
332 | endmenu | 336 | endmenu |
333 | 337 |
drivers/gpio/Makefile
1 | # SPDX-License-Identifier: GPL-2.0+ | 1 | # SPDX-License-Identifier: GPL-2.0+ |
2 | # | 2 | # |
3 | # Copyright 2000-2008 | 3 | # Copyright 2000-2008 |
4 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 4 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
5 | 5 | ||
6 | ifndef CONFIG_SPL_BUILD | 6 | ifndef CONFIG_SPL_BUILD |
7 | obj-$(CONFIG_DWAPB_GPIO) += dwapb_gpio.o | 7 | obj-$(CONFIG_DWAPB_GPIO) += dwapb_gpio.o |
8 | obj-$(CONFIG_AXP_GPIO) += axp_gpio.o | 8 | obj-$(CONFIG_AXP_GPIO) += axp_gpio.o |
9 | endif | 9 | endif |
10 | obj-$(CONFIG_DM_GPIO) += gpio-uclass.o | 10 | obj-$(CONFIG_DM_GPIO) += gpio-uclass.o |
11 | 11 | ||
12 | obj-$(CONFIG_DM_PCA953X) += pca953x_gpio.o | 12 | obj-$(CONFIG_DM_PCA953X) += pca953x_gpio.o |
13 | obj-$(CONFIG_DM_74X164) += 74x164_gpio.o | 13 | obj-$(CONFIG_DM_74X164) += 74x164_gpio.o |
14 | 14 | ||
15 | obj-$(CONFIG_AT91_GPIO) += at91_gpio.o | 15 | obj-$(CONFIG_AT91_GPIO) += at91_gpio.o |
16 | obj-$(CONFIG_ATMEL_PIO4) += atmel_pio4.o | 16 | obj-$(CONFIG_ATMEL_PIO4) += atmel_pio4.o |
17 | obj-$(CONFIG_BCM6345_GPIO) += bcm6345_gpio.o | 17 | obj-$(CONFIG_BCM6345_GPIO) += bcm6345_gpio.o |
18 | obj-$(CONFIG_INTEL_ICH6_GPIO) += intel_ich6_gpio.o | 18 | obj-$(CONFIG_INTEL_ICH6_GPIO) += intel_ich6_gpio.o |
19 | obj-$(CONFIG_INTEL_BROADWELL_GPIO) += intel_broadwell_gpio.o | 19 | obj-$(CONFIG_INTEL_BROADWELL_GPIO) += intel_broadwell_gpio.o |
20 | obj-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o | 20 | obj-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o |
21 | obj-$(CONFIG_KONA_GPIO) += kona_gpio.o | 21 | obj-$(CONFIG_KONA_GPIO) += kona_gpio.o |
22 | obj-$(CONFIG_MARVELL_GPIO) += mvgpio.o | 22 | obj-$(CONFIG_MARVELL_GPIO) += mvgpio.o |
23 | obj-$(CONFIG_MARVELL_MFP) += mvmfp.o | 23 | obj-$(CONFIG_MARVELL_MFP) += mvmfp.o |
24 | obj-$(CONFIG_MXC_GPIO) += mxc_gpio.o | 24 | obj-$(CONFIG_MXC_GPIO) += mxc_gpio.o |
25 | obj-$(CONFIG_MXS_GPIO) += mxs_gpio.o | 25 | obj-$(CONFIG_MXS_GPIO) += mxs_gpio.o |
26 | obj-$(CONFIG_PCA953X) += pca953x.o | 26 | obj-$(CONFIG_PCA953X) += pca953x.o |
27 | obj-$(CONFIG_PCA9698) += pca9698.o | 27 | obj-$(CONFIG_PCA9698) += pca9698.o |
28 | obj-$(CONFIG_ROCKCHIP_GPIO) += rk_gpio.o | 28 | obj-$(CONFIG_ROCKCHIP_GPIO) += rk_gpio.o |
29 | obj-$(CONFIG_RCAR_GPIO) += gpio-rcar.o | 29 | obj-$(CONFIG_RCAR_GPIO) += gpio-rcar.o |
30 | obj-$(CONFIG_S5P) += s5p_gpio.o | 30 | obj-$(CONFIG_S5P) += s5p_gpio.o |
31 | obj-$(CONFIG_SANDBOX_GPIO) += sandbox.o | 31 | obj-$(CONFIG_SANDBOX_GPIO) += sandbox.o |
32 | obj-$(CONFIG_SPEAR_GPIO) += spear_gpio.o | 32 | obj-$(CONFIG_SPEAR_GPIO) += spear_gpio.o |
33 | obj-$(CONFIG_TEGRA_GPIO) += tegra_gpio.o | 33 | obj-$(CONFIG_TEGRA_GPIO) += tegra_gpio.o |
34 | obj-$(CONFIG_TEGRA186_GPIO) += tegra186_gpio.o | 34 | obj-$(CONFIG_TEGRA186_GPIO) += tegra186_gpio.o |
35 | obj-$(CONFIG_DA8XX_GPIO) += da8xx_gpio.o | 35 | obj-$(CONFIG_DA8XX_GPIO) += da8xx_gpio.o |
36 | obj-$(CONFIG_DM644X_GPIO) += da8xx_gpio.o | 36 | obj-$(CONFIG_DM644X_GPIO) += da8xx_gpio.o |
37 | obj-$(CONFIG_ALTERA_PIO) += altera_pio.o | 37 | obj-$(CONFIG_ALTERA_PIO) += altera_pio.o |
38 | obj-$(CONFIG_MPC83XX_GPIO) += mpc83xx_gpio.o | 38 | obj-$(CONFIG_MPC83XX_GPIO) += mpc83xx_gpio.o |
39 | obj-$(CONFIG_MPC8XXX_GPIO) += mpc8xxx_gpio.o | 39 | obj-$(CONFIG_MPC8XXX_GPIO) += mpc8xxx_gpio.o |
40 | obj-$(CONFIG_SH_GPIO_PFC) += sh_pfc.o | 40 | obj-$(CONFIG_SH_GPIO_PFC) += sh_pfc.o |
41 | obj-$(CONFIG_OMAP_GPIO) += omap_gpio.o | 41 | obj-$(CONFIG_OMAP_GPIO) += omap_gpio.o |
42 | obj-$(CONFIG_DB8500_GPIO) += db8500_gpio.o | 42 | obj-$(CONFIG_DB8500_GPIO) += db8500_gpio.o |
43 | obj-$(CONFIG_BCM2835_GPIO) += bcm2835_gpio.o | 43 | obj-$(CONFIG_BCM2835_GPIO) += bcm2835_gpio.o |
44 | obj-$(CONFIG_XILINX_GPIO) += xilinx_gpio.o | 44 | obj-$(CONFIG_XILINX_GPIO) += xilinx_gpio.o |
45 | obj-$(CONFIG_ADI_GPIO2) += adi_gpio2.o | 45 | obj-$(CONFIG_ADI_GPIO2) += adi_gpio2.o |
46 | obj-$(CONFIG_TCA642X) += tca642x.o | 46 | obj-$(CONFIG_TCA642X) += tca642x.o |
47 | obj-$(CONFIG_SUNXI_GPIO) += sunxi_gpio.o | 47 | obj-$(CONFIG_SUNXI_GPIO) += sunxi_gpio.o |
48 | obj-$(CONFIG_LPC32XX_GPIO) += lpc32xx_gpio.o | 48 | obj-$(CONFIG_LPC32XX_GPIO) += lpc32xx_gpio.o |
49 | obj-$(CONFIG_STM32F7_GPIO) += stm32f7_gpio.o | 49 | obj-$(CONFIG_STM32F7_GPIO) += stm32f7_gpio.o |
50 | obj-$(CONFIG_GPIO_UNIPHIER) += gpio-uniphier.o | 50 | obj-$(CONFIG_GPIO_UNIPHIER) += gpio-uniphier.o |
51 | obj-$(CONFIG_ZYNQ_GPIO) += zynq_gpio.o | 51 | obj-$(CONFIG_ZYNQ_GPIO) += zynq_gpio.o |
52 | obj-$(CONFIG_VYBRID_GPIO) += vybrid_gpio.o | 52 | obj-$(CONFIG_VYBRID_GPIO) += vybrid_gpio.o |
53 | obj-$(CONFIG_HIKEY_GPIO) += hi6220_gpio.o | 53 | obj-$(CONFIG_HIKEY_GPIO) += hi6220_gpio.o |
54 | obj-$(CONFIG_HSDK_CREG_GPIO) += hsdk-creg-gpio.o | 54 | obj-$(CONFIG_HSDK_CREG_GPIO) += hsdk-creg-gpio.o |
55 | obj-$(CONFIG_IMX_RGPIO2P) += imx_rgpio2p.o | 55 | obj-$(CONFIG_IMX_RGPIO2P) += imx_rgpio2p.o |
56 | obj-$(CONFIG_PIC32_GPIO) += pic32_gpio.o | 56 | obj-$(CONFIG_PIC32_GPIO) += pic32_gpio.o |
57 | obj-$(CONFIG_MVEBU_GPIO) += mvebu_gpio.o | 57 | obj-$(CONFIG_MVEBU_GPIO) += mvebu_gpio.o |
58 | obj-$(CONFIG_MSM_GPIO) += msm_gpio.o | 58 | obj-$(CONFIG_MSM_GPIO) += msm_gpio.o |
59 | obj-$(CONFIG_$(SPL_)PCF8575_GPIO) += pcf8575_gpio.o | 59 | obj-$(CONFIG_$(SPL_)PCF8575_GPIO) += pcf8575_gpio.o |
60 | obj-$(CONFIG_PM8916_GPIO) += pm8916_gpio.o | 60 | obj-$(CONFIG_PM8916_GPIO) += pm8916_gpio.o |
61 | obj-$(CONFIG_MT7621_GPIO) += mt7621_gpio.o | 61 | obj-$(CONFIG_MT7621_GPIO) += mt7621_gpio.o |
62 | obj-$(CONFIG_MSCC_BITBANG_SPI_GPIO) += gpio-mscc-bitbang-spi.o | 62 | obj-$(CONFIG_MSCC_SGPIO) += mscc_sgpio.o |
63 | 63 |
drivers/gpio/gpio-mscc-bitbang-spi.c
1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | File was deleted | |
2 | /* | ||
3 | * Microsemi SoCs pinctrl driver | ||
4 | * | ||
5 | * Author: <gregory.clement@bootlin.com> | ||
6 | * License: Dual MIT/GPL | ||
7 | * Copyright (c) 2018 Microsemi Corporation | ||
8 | */ | ||
9 | |||
10 | #include <common.h> | ||
11 | #include <asm-generic/gpio.h> | ||
12 | #include <asm/io.h> | ||
13 | #include <dm.h> | ||
14 | #include <errno.h> | ||
15 | |||
16 | enum { | ||
17 | SDI, | ||
18 | CS0, | ||
19 | CS1, | ||
20 | CS2, | ||
21 | CS3, | ||
22 | SDO, | ||
23 | SCK | ||
24 | }; | ||
25 | |||
26 | static const int pinmap[] = { 0, 5, 6, 7, 8, 10, 12 }; | ||
27 | |||
28 | #define SW_SPI_CSn_OE 0x1E /* bits 1 to 4 */ | ||
29 | #define SW_SPI_CS0_OE BIT(1) | ||
30 | #define SW_SPI_SDO_OE BIT(9) | ||
31 | #define SW_SPI_SCK_OE BIT(11) | ||
32 | #define SW_PIN_CTRL_MODE BIT(13) | ||
33 | |||
34 | struct mscc_bb_spi_gpio { | ||
35 | void __iomem *regs; | ||
36 | u32 cache_val; | ||
37 | }; | ||
38 | |||
39 | static int mscc_bb_spi_gpio_set(struct udevice *dev, unsigned oft, int val) | ||
40 | { | ||
41 | struct mscc_bb_spi_gpio *gpio = dev_get_priv(dev); | ||
42 | |||
43 | if (val) | ||
44 | gpio->cache_val |= BIT(pinmap[oft]); | ||
45 | else | ||
46 | gpio->cache_val &= ~BIT(pinmap[oft]); | ||
47 | |||
48 | writel(gpio->cache_val, gpio->regs); | ||
49 | |||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | static int mscc_bb_spi_gpio_direction_output(struct udevice *dev, unsigned oft, | ||
54 | int val) | ||
55 | { | ||
56 | if (oft == 0) { | ||
57 | pr_err("SW_SPI_DSI can't be used as output\n"); | ||
58 | return -ENOTSUPP; | ||
59 | } | ||
60 | |||
61 | mscc_bb_spi_gpio_set(dev, oft, val); | ||
62 | |||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | static int mscc_bb_spi_gpio_direction_input(struct udevice *dev, unsigned oft) | ||
67 | { | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | static int mscc_bb_spi_gpio_get(struct udevice *dev, unsigned int oft) | ||
72 | { | ||
73 | struct mscc_bb_spi_gpio *gpio = dev_get_priv(dev); | ||
74 | u32 val = readl(gpio->regs); | ||
75 | |||
76 | return !!(val & BIT(pinmap[oft])); | ||
77 | } | ||
78 | |||
79 | static const struct dm_gpio_ops mscc_bb_spi_gpio_ops = { | ||
80 | .direction_output = mscc_bb_spi_gpio_direction_output, | ||
81 | .direction_input = mscc_bb_spi_gpio_direction_input, | ||
82 | .set_value = mscc_bb_spi_gpio_set, | ||
83 | .get_value = mscc_bb_spi_gpio_get, | ||
84 | }; | ||
85 | |||
86 | static int mscc_bb_spi_gpio_probe(struct udevice *dev) | ||
87 | { | ||
88 | struct mscc_bb_spi_gpio *gpio = dev_get_priv(dev); | ||
89 | struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); | ||
90 | |||
91 | gpio->regs = dev_remap_addr(dev); | ||
92 | if (!gpio->regs) | ||
93 | return -EINVAL; | ||
94 | |||
95 | uc_priv->bank_name = dev->name; | ||
96 | uc_priv->gpio_count = ARRAY_SIZE(pinmap); | ||
97 | /* | ||
98 | * Enable software mode to control the SPI pin, enables the | ||
99 | * output mode for most of the pin and initialize the cache | ||
100 | * value in the same time | ||
101 | */ | ||
102 | |||
103 | gpio->cache_val = SW_PIN_CTRL_MODE | SW_SPI_SCK_OE | SW_SPI_SDO_OE | | ||
104 | SW_SPI_CS0_OE; | ||
105 | writel(gpio->cache_val, gpio->regs); | ||
106 | |||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | static const struct udevice_id mscc_bb_spi_gpio_ids[] = { | ||
111 | {.compatible = "mscc,spi-bitbang-gpio"}, | ||
112 | {} | ||
113 | }; | ||
114 | |||
115 | U_BOOT_DRIVER(gpio_mscc_bb_spi) = { | ||
116 | .name = "gpio-mscc-spi-bitbang", | ||
117 | .id = UCLASS_GPIO, | ||
118 | .ops = &mscc_bb_spi_gpio_ops, | ||
119 | .probe = mscc_bb_spi_gpio_probe, | ||
120 | .of_match = of_match_ptr(mscc_bb_spi_gpio_ids), | ||
121 | .priv_auto_alloc_size = sizeof(struct mscc_bb_spi_gpio), | ||
122 | }; | ||
123 | 1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) |
drivers/gpio/mscc_sgpio.c
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | |
2 | /* | ||
3 | * Microsemi SoCs serial gpio driver | ||
4 | * | ||
5 | * Author: <lars.povlsen@microchip.com> | ||
6 | * | ||
7 | * Copyright (c) 2018 Microsemi Corporation | ||
8 | */ | ||
9 | |||
10 | #include <common.h> | ||
11 | #include <dm.h> | ||
12 | #include <asm/gpio.h> | ||
13 | #include <asm/io.h> | ||
14 | #include <errno.h> | ||
15 | #include <clk.h> | ||
16 | |||
17 | #define MSCC_SGPIOS_PER_BANK 32 | ||
18 | #define MSCC_SGPIO_BANK_DEPTH 4 | ||
19 | |||
20 | enum { | ||
21 | REG_INPUT_DATA, | ||
22 | REG_PORT_CONFIG, | ||
23 | REG_PORT_ENABLE, | ||
24 | REG_SIO_CONFIG, | ||
25 | REG_SIO_CLOCK, | ||
26 | MAXREG | ||
27 | }; | ||
28 | |||
29 | struct mscc_sgpio_bf { | ||
30 | u8 beg; | ||
31 | u8 end; | ||
32 | }; | ||
33 | |||
34 | struct mscc_sgpio_props { | ||
35 | u8 regoff[MAXREG]; | ||
36 | struct mscc_sgpio_bf auto_repeat; | ||
37 | struct mscc_sgpio_bf port_width; | ||
38 | struct mscc_sgpio_bf clk_freq; | ||
39 | struct mscc_sgpio_bf bit_source; | ||
40 | }; | ||
41 | |||
42 | #define __M(bf) GENMASK((bf).end, (bf).beg) | ||
43 | #define __F(bf, x) (__M(bf) & ((x) << (bf).beg)) | ||
44 | #define __X(bf, x) (((x) >> (bf).beg) & GENMASK(((bf).end - (bf).beg), 0)) | ||
45 | |||
46 | #define MSCC_M_CFG_SIO_AUTO_REPEAT(p) BIT(p->props->auto_repeat.beg) | ||
47 | #define MSCC_F_CFG_SIO_PORT_WIDTH(p, x) __F(p->props->port_width, x) | ||
48 | #define MSCC_M_CFG_SIO_PORT_WIDTH(p) __M(p->props->port_width) | ||
49 | #define MSCC_F_CLOCK_SIO_CLK_FREQ(p, x) __F(p->props->clk_freq, x) | ||
50 | #define MSCC_M_CLOCK_SIO_CLK_FREQ(p) __M(p->props->clk_freq) | ||
51 | #define MSCC_F_PORT_CFG_BIT_SOURCE(p, x) __F(p->props->bit_source, x) | ||
52 | #define MSCC_X_PORT_CFG_BIT_SOURCE(p, x) __X(p->props->bit_source, x) | ||
53 | |||
54 | const struct mscc_sgpio_props props_luton = { | ||
55 | .regoff = { 0x00, 0x09, 0x29, 0x2a, 0x2b }, | ||
56 | .auto_repeat = { 5, 5 }, | ||
57 | .port_width = { 2, 3 }, | ||
58 | .clk_freq = { 0, 11 }, | ||
59 | .bit_source = { 0, 11 }, | ||
60 | }; | ||
61 | |||
62 | const struct mscc_sgpio_props props_ocelot = { | ||
63 | .regoff = { 0x00, 0x06, 0x26, 0x04, 0x05 }, | ||
64 | .auto_repeat = { 10, 10 }, | ||
65 | .port_width = { 7, 8 }, | ||
66 | .clk_freq = { 8, 19 }, | ||
67 | .bit_source = { 12, 23 }, | ||
68 | }; | ||
69 | |||
70 | struct mscc_sgpio_priv { | ||
71 | u32 bitcount; | ||
72 | u32 ports; | ||
73 | u32 clock; | ||
74 | u32 mode[MSCC_SGPIOS_PER_BANK]; | ||
75 | u32 __iomem *regs; | ||
76 | const struct mscc_sgpio_props *props; | ||
77 | }; | ||
78 | |||
79 | static inline u32 sgpio_readl(struct mscc_sgpio_priv *priv, u32 rno, u32 off) | ||
80 | { | ||
81 | u32 __iomem *reg = &priv->regs[priv->props->regoff[rno] + off]; | ||
82 | |||
83 | return readl(reg); | ||
84 | } | ||
85 | |||
86 | static inline void sgpio_writel(struct mscc_sgpio_priv *priv, | ||
87 | u32 val, u32 rno, u32 off) | ||
88 | { | ||
89 | u32 __iomem *reg = &priv->regs[priv->props->regoff[rno] + off]; | ||
90 | |||
91 | writel(val, reg); | ||
92 | } | ||
93 | |||
94 | static void sgpio_clrsetbits(struct mscc_sgpio_priv *priv, | ||
95 | u32 rno, u32 off, u32 clear, u32 set) | ||
96 | { | ||
97 | u32 __iomem *reg = &priv->regs[priv->props->regoff[rno] + off]; | ||
98 | |||
99 | clrsetbits_le32(reg, clear, set); | ||
100 | } | ||
101 | |||
102 | static int mscc_sgpio_direction_input(struct udevice *dev, unsigned int gpio) | ||
103 | { | ||
104 | struct mscc_sgpio_priv *priv = dev_get_priv(dev); | ||
105 | |||
106 | u32 port = gpio % MSCC_SGPIOS_PER_BANK; | ||
107 | u32 bit = gpio / MSCC_SGPIOS_PER_BANK; | ||
108 | |||
109 | priv->mode[port] |= BIT(bit); | ||
110 | |||
111 | return 0; | ||
112 | } | ||
113 | |||
114 | static int mscc_sgpio_direction_output(struct udevice *dev, | ||
115 | unsigned int gpio, int value) | ||
116 | { | ||
117 | struct mscc_sgpio_priv *priv = dev_get_priv(dev); | ||
118 | u32 port = gpio % MSCC_SGPIOS_PER_BANK; | ||
119 | u32 bit = gpio / MSCC_SGPIOS_PER_BANK; | ||
120 | u32 mask = 3 << (3 * bit); | ||
121 | |||
122 | debug("set: port %d, bit %d, mask 0x%08x, value %d\n", | ||
123 | port, bit, mask, value); | ||
124 | |||
125 | value = (value & 3) << (3 * bit); | ||
126 | sgpio_clrsetbits(priv, REG_PORT_CONFIG, port, | ||
127 | MSCC_F_PORT_CFG_BIT_SOURCE(priv, mask), | ||
128 | MSCC_F_PORT_CFG_BIT_SOURCE(priv, value)); | ||
129 | clrbits_le32(&priv->mode[port], BIT(bit)); | ||
130 | |||
131 | return 0; | ||
132 | } | ||
133 | |||
134 | static int mscc_sgpio_get_function(struct udevice *dev, unsigned int gpio) | ||
135 | { | ||
136 | struct mscc_sgpio_priv *priv = dev_get_priv(dev); | ||
137 | u32 port = gpio % MSCC_SGPIOS_PER_BANK; | ||
138 | u32 bit = gpio / MSCC_SGPIOS_PER_BANK; | ||
139 | u32 val = priv->mode[port] & BIT(bit); | ||
140 | |||
141 | if (val) | ||
142 | return GPIOF_INPUT; | ||
143 | else | ||
144 | return GPIOF_OUTPUT; | ||
145 | } | ||
146 | |||
147 | static int mscc_sgpio_set_value(struct udevice *dev, | ||
148 | unsigned int gpio, int value) | ||
149 | { | ||
150 | return mscc_sgpio_direction_output(dev, gpio, value); | ||
151 | } | ||
152 | |||
153 | static int mscc_sgpio_get_value(struct udevice *dev, unsigned int gpio) | ||
154 | { | ||
155 | struct mscc_sgpio_priv *priv = dev_get_priv(dev); | ||
156 | u32 port = gpio % MSCC_SGPIOS_PER_BANK; | ||
157 | u32 bit = gpio / MSCC_SGPIOS_PER_BANK; | ||
158 | int ret; | ||
159 | |||
160 | if (mscc_sgpio_get_function(dev, gpio) == GPIOF_INPUT) { | ||
161 | ret = !!(sgpio_readl(priv, REG_INPUT_DATA, bit) & BIT(port)); | ||
162 | } else { | ||
163 | u32 portval = sgpio_readl(priv, REG_PORT_CONFIG, port); | ||
164 | |||
165 | ret = MSCC_X_PORT_CFG_BIT_SOURCE(priv, portval); | ||
166 | ret = !!(ret & (3 << (3 * bit))); | ||
167 | } | ||
168 | |||
169 | debug("get: gpio %d, port %d, bit %d, value %d\n", | ||
170 | gpio, port, bit, ret); | ||
171 | return ret; | ||
172 | } | ||
173 | |||
174 | static int mscc_sgpio_get_count(struct udevice *dev) | ||
175 | { | ||
176 | struct ofnode_phandle_args args; | ||
177 | int count = 0, i = 0, ret; | ||
178 | |||
179 | ret = dev_read_phandle_with_args(dev, "gpio-ranges", NULL, 3, i, &args); | ||
180 | while (ret != -ENOENT) { | ||
181 | count += args.args[2]; | ||
182 | ret = dev_read_phandle_with_args(dev, "gpio-ranges", NULL, 3, | ||
183 | ++i, &args); | ||
184 | } | ||
185 | return count; | ||
186 | } | ||
187 | |||
188 | static int mscc_sgpio_probe(struct udevice *dev) | ||
189 | { | ||
190 | struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); | ||
191 | struct mscc_sgpio_priv *priv = dev_get_priv(dev); | ||
192 | int err, div_clock = 0, port; | ||
193 | u32 val; | ||
194 | struct clk clk; | ||
195 | |||
196 | err = clk_get_by_index(dev, 0, &clk); | ||
197 | if (!err) { | ||
198 | err = clk_get_rate(&clk); | ||
199 | if (IS_ERR_VALUE(err)) { | ||
200 | dev_err(dev, "Invalid clk rate\n"); | ||
201 | return -EINVAL; | ||
202 | } | ||
203 | div_clock = err; | ||
204 | } else { | ||
205 | dev_err(dev, "Failed to get clock\n"); | ||
206 | return err; | ||
207 | } | ||
208 | |||
209 | priv->props = (const struct mscc_sgpio_props *)dev_get_driver_data(dev); | ||
210 | priv->ports = dev_read_u32_default(dev, "mscc,sgpio-ports", 0xFFFFFFFF); | ||
211 | priv->clock = dev_read_u32_default(dev, "mscc,sgpio-frequency", | ||
212 | 12500000); | ||
213 | if (priv->clock <= 0 || priv->clock > div_clock) { | ||
214 | dev_err(dev, "Invalid frequency %d\n", priv->clock); | ||
215 | return -EINVAL; | ||
216 | } | ||
217 | |||
218 | uc_priv->gpio_count = mscc_sgpio_get_count(dev); | ||
219 | uc_priv->gpio_count = dev_read_u32_default(dev, "ngpios", | ||
220 | uc_priv->gpio_count); | ||
221 | if (uc_priv->gpio_count < 1 || uc_priv->gpio_count > | ||
222 | (4 * MSCC_SGPIOS_PER_BANK)) { | ||
223 | dev_err(dev, "Invalid gpio count %d\n", uc_priv->gpio_count); | ||
224 | return -EINVAL; | ||
225 | } | ||
226 | priv->bitcount = DIV_ROUND_UP(uc_priv->gpio_count, | ||
227 | MSCC_SGPIOS_PER_BANK); | ||
228 | debug("probe: gpios = %d, bit-count = %d\n", | ||
229 | uc_priv->gpio_count, priv->bitcount); | ||
230 | |||
231 | priv->regs = (u32 __iomem *)dev_read_addr(dev); | ||
232 | uc_priv->bank_name = "sgpio"; | ||
233 | |||
234 | sgpio_clrsetbits(priv, REG_SIO_CONFIG, 0, | ||
235 | MSCC_M_CFG_SIO_PORT_WIDTH(priv), | ||
236 | MSCC_F_CFG_SIO_PORT_WIDTH(priv, priv->bitcount - 1) | | ||
237 | MSCC_M_CFG_SIO_AUTO_REPEAT(priv)); | ||
238 | val = div_clock / priv->clock; | ||
239 | debug("probe: div-clock = %d KHz, freq = %d KHz, div = %d\n", | ||
240 | div_clock / 1000, priv->clock / 1000, val); | ||
241 | sgpio_clrsetbits(priv, REG_SIO_CLOCK, 0, | ||
242 | MSCC_M_CLOCK_SIO_CLK_FREQ(priv), | ||
243 | MSCC_F_CLOCK_SIO_CLK_FREQ(priv, val)); | ||
244 | |||
245 | for (port = 0; port < 32; port++) | ||
246 | sgpio_writel(priv, 0, REG_PORT_CONFIG, port); | ||
247 | sgpio_writel(priv, priv->ports, REG_PORT_ENABLE, 0); | ||
248 | |||
249 | debug("probe: sgpio regs = %p\n", priv->regs); | ||
250 | |||
251 | return 0; | ||
252 | } | ||
253 | |||
254 | static const struct dm_gpio_ops mscc_sgpio_ops = { | ||
255 | .direction_input = mscc_sgpio_direction_input, | ||
256 | .direction_output = mscc_sgpio_direction_output, | ||
257 | .get_function = mscc_sgpio_get_function, | ||
258 | .get_value = mscc_sgpio_get_value, | ||
259 | .set_value = mscc_sgpio_set_value, | ||
260 | }; | ||
261 | |||
262 | static const struct udevice_id mscc_sgpio_ids[] = { | ||
263 | { .compatible = "mscc,luton-sgpio", .data = (ulong)&props_luton }, | ||
264 | { .compatible = "mscc,ocelot-sgpio", .data = (ulong)&props_ocelot }, | ||
265 | { } | ||
266 | }; | ||
267 | |||
268 | U_BOOT_DRIVER(gpio_mscc_sgpio) = { | ||
269 | .name = "mscc-sgpio", | ||
270 | .id = UCLASS_GPIO, | ||
271 | .of_match = mscc_sgpio_ids, | ||
272 | .ops = &mscc_sgpio_ops, | ||
273 | .probe = mscc_sgpio_probe, | ||
274 | .priv_auto_alloc_size = sizeof(struct mscc_sgpio_priv), | ||
275 | }; | ||
276 |
drivers/mmc/jz_mmc.c
1 | // SPDX-License-Identifier: GPL-2.0+ | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | /* | 2 | /* |
3 | * Ingenic JZ MMC driver | 3 | * Ingenic JZ MMC driver |
4 | * | 4 | * |
5 | * Copyright (c) 2013 Imagination Technologies | 5 | * Copyright (c) 2013 Imagination Technologies |
6 | * Author: Paul Burton <paul.burton@imgtec.com> | 6 | * Author: Paul Burton <paul.burton@imgtec.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <common.h> | 9 | #include <common.h> |
10 | #include <malloc.h> | 10 | #include <malloc.h> |
11 | #include <mmc.h> | 11 | #include <mmc.h> |
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | #include <asm/unaligned.h> | 13 | #include <asm/unaligned.h> |
14 | #include <errno.h> | 14 | #include <errno.h> |
15 | #include <mach/jz4780.h> | 15 | #include <mach/jz4780.h> |
16 | #include <wait_bit.h> | 16 | #include <wait_bit.h> |
17 | 17 | ||
18 | /* Registers */ | 18 | /* Registers */ |
19 | #define MSC_STRPCL 0x000 | 19 | #define MSC_STRPCL 0x000 |
20 | #define MSC_STAT 0x004 | 20 | #define MSC_STAT 0x004 |
21 | #define MSC_CLKRT 0x008 | 21 | #define MSC_CLKRT 0x008 |
22 | #define MSC_CMDAT 0x00c | 22 | #define MSC_CMDAT 0x00c |
23 | #define MSC_RESTO 0x010 | 23 | #define MSC_RESTO 0x010 |
24 | #define MSC_RDTO 0x014 | 24 | #define MSC_RDTO 0x014 |
25 | #define MSC_BLKLEN 0x018 | 25 | #define MSC_BLKLEN 0x018 |
26 | #define MSC_NOB 0x01c | 26 | #define MSC_NOB 0x01c |
27 | #define MSC_SNOB 0x020 | 27 | #define MSC_SNOB 0x020 |
28 | #define MSC_IMASK 0x024 | 28 | #define MSC_IMASK 0x024 |
29 | #define MSC_IREG 0x028 | 29 | #define MSC_IREG 0x028 |
30 | #define MSC_CMD 0x02c | 30 | #define MSC_CMD 0x02c |
31 | #define MSC_ARG 0x030 | 31 | #define MSC_ARG 0x030 |
32 | #define MSC_RES 0x034 | 32 | #define MSC_RES 0x034 |
33 | #define MSC_RXFIFO 0x038 | 33 | #define MSC_RXFIFO 0x038 |
34 | #define MSC_TXFIFO 0x03c | 34 | #define MSC_TXFIFO 0x03c |
35 | #define MSC_LPM 0x040 | 35 | #define MSC_LPM 0x040 |
36 | #define MSC_DMAC 0x044 | 36 | #define MSC_DMAC 0x044 |
37 | #define MSC_DMANDA 0x048 | 37 | #define MSC_DMANDA 0x048 |
38 | #define MSC_DMADA 0x04c | 38 | #define MSC_DMADA 0x04c |
39 | #define MSC_DMALEN 0x050 | 39 | #define MSC_DMALEN 0x050 |
40 | #define MSC_DMACMD 0x054 | 40 | #define MSC_DMACMD 0x054 |
41 | #define MSC_CTRL2 0x058 | 41 | #define MSC_CTRL2 0x058 |
42 | #define MSC_RTCNT 0x05c | 42 | #define MSC_RTCNT 0x05c |
43 | #define MSC_DBG 0x0fc | 43 | #define MSC_DBG 0x0fc |
44 | 44 | ||
45 | /* MSC Clock and Control Register (MSC_STRPCL) */ | 45 | /* MSC Clock and Control Register (MSC_STRPCL) */ |
46 | #define MSC_STRPCL_EXIT_MULTIPLE BIT(7) | 46 | #define MSC_STRPCL_EXIT_MULTIPLE BIT(7) |
47 | #define MSC_STRPCL_EXIT_TRANSFER BIT(6) | 47 | #define MSC_STRPCL_EXIT_TRANSFER BIT(6) |
48 | #define MSC_STRPCL_START_READWAIT BIT(5) | 48 | #define MSC_STRPCL_START_READWAIT BIT(5) |
49 | #define MSC_STRPCL_STOP_READWAIT BIT(4) | 49 | #define MSC_STRPCL_STOP_READWAIT BIT(4) |
50 | #define MSC_STRPCL_RESET BIT(3) | 50 | #define MSC_STRPCL_RESET BIT(3) |
51 | #define MSC_STRPCL_START_OP BIT(2) | 51 | #define MSC_STRPCL_START_OP BIT(2) |
52 | #define MSC_STRPCL_CLOCK_CONTROL_STOP BIT(0) | 52 | #define MSC_STRPCL_CLOCK_CONTROL_STOP BIT(0) |
53 | #define MSC_STRPCL_CLOCK_CONTROL_START BIT(1) | 53 | #define MSC_STRPCL_CLOCK_CONTROL_START BIT(1) |
54 | 54 | ||
55 | /* MSC Status Register (MSC_STAT) */ | 55 | /* MSC Status Register (MSC_STAT) */ |
56 | #define MSC_STAT_AUTO_CMD_DONE BIT(31) | 56 | #define MSC_STAT_AUTO_CMD_DONE BIT(31) |
57 | #define MSC_STAT_IS_RESETTING BIT(15) | 57 | #define MSC_STAT_IS_RESETTING BIT(15) |
58 | #define MSC_STAT_SDIO_INT_ACTIVE BIT(14) | 58 | #define MSC_STAT_SDIO_INT_ACTIVE BIT(14) |
59 | #define MSC_STAT_PRG_DONE BIT(13) | 59 | #define MSC_STAT_PRG_DONE BIT(13) |
60 | #define MSC_STAT_DATA_TRAN_DONE BIT(12) | 60 | #define MSC_STAT_DATA_TRAN_DONE BIT(12) |
61 | #define MSC_STAT_END_CMD_RES BIT(11) | 61 | #define MSC_STAT_END_CMD_RES BIT(11) |
62 | #define MSC_STAT_DATA_FIFO_AFULL BIT(10) | 62 | #define MSC_STAT_DATA_FIFO_AFULL BIT(10) |
63 | #define MSC_STAT_IS_READWAIT BIT(9) | 63 | #define MSC_STAT_IS_READWAIT BIT(9) |
64 | #define MSC_STAT_CLK_EN BIT(8) | 64 | #define MSC_STAT_CLK_EN BIT(8) |
65 | #define MSC_STAT_DATA_FIFO_FULL BIT(7) | 65 | #define MSC_STAT_DATA_FIFO_FULL BIT(7) |
66 | #define MSC_STAT_DATA_FIFO_EMPTY BIT(6) | 66 | #define MSC_STAT_DATA_FIFO_EMPTY BIT(6) |
67 | #define MSC_STAT_CRC_RES_ERR BIT(5) | 67 | #define MSC_STAT_CRC_RES_ERR BIT(5) |
68 | #define MSC_STAT_CRC_READ_ERROR BIT(4) | 68 | #define MSC_STAT_CRC_READ_ERROR BIT(4) |
69 | #define MSC_STAT_CRC_WRITE_ERROR BIT(2) | 69 | #define MSC_STAT_CRC_WRITE_ERROR BIT(2) |
70 | #define MSC_STAT_CRC_WRITE_ERROR_NOSTS BIT(4) | 70 | #define MSC_STAT_CRC_WRITE_ERROR_NOSTS BIT(4) |
71 | #define MSC_STAT_TIME_OUT_RES BIT(1) | 71 | #define MSC_STAT_TIME_OUT_RES BIT(1) |
72 | #define MSC_STAT_TIME_OUT_READ BIT(0) | 72 | #define MSC_STAT_TIME_OUT_READ BIT(0) |
73 | 73 | ||
74 | /* MSC Bus Clock Control Register (MSC_CLKRT) */ | 74 | /* MSC Bus Clock Control Register (MSC_CLKRT) */ |
75 | #define MSC_CLKRT_CLK_RATE_MASK 0x7 | 75 | #define MSC_CLKRT_CLK_RATE_MASK 0x7 |
76 | 76 | ||
77 | /* MSC Command Sequence Control Register (MSC_CMDAT) */ | 77 | /* MSC Command Sequence Control Register (MSC_CMDAT) */ |
78 | #define MSC_CMDAT_IO_ABORT BIT(11) | 78 | #define MSC_CMDAT_IO_ABORT BIT(11) |
79 | #define MSC_CMDAT_BUS_WIDTH_1BIT (0x0 << 9) | 79 | #define MSC_CMDAT_BUS_WIDTH_1BIT (0x0 << 9) |
80 | #define MSC_CMDAT_BUS_WIDTH_4BIT (0x2 << 9) | 80 | #define MSC_CMDAT_BUS_WIDTH_4BIT (0x2 << 9) |
81 | #define MSC_CMDAT_DMA_EN BIT(8) | 81 | #define MSC_CMDAT_DMA_EN BIT(8) |
82 | #define MSC_CMDAT_INIT BIT(7) | 82 | #define MSC_CMDAT_INIT BIT(7) |
83 | #define MSC_CMDAT_BUSY BIT(6) | 83 | #define MSC_CMDAT_BUSY BIT(6) |
84 | #define MSC_CMDAT_STREAM_BLOCK BIT(5) | 84 | #define MSC_CMDAT_STREAM_BLOCK BIT(5) |
85 | #define MSC_CMDAT_WRITE BIT(4) | 85 | #define MSC_CMDAT_WRITE BIT(4) |
86 | #define MSC_CMDAT_DATA_EN BIT(3) | 86 | #define MSC_CMDAT_DATA_EN BIT(3) |
87 | #define MSC_CMDAT_RESPONSE_MASK (0x7 << 0) | 87 | #define MSC_CMDAT_RESPONSE_MASK (0x7 << 0) |
88 | #define MSC_CMDAT_RESPONSE_NONE (0x0 << 0) /* No response */ | 88 | #define MSC_CMDAT_RESPONSE_NONE (0x0 << 0) /* No response */ |
89 | #define MSC_CMDAT_RESPONSE_R1 (0x1 << 0) /* Format R1 and R1b */ | 89 | #define MSC_CMDAT_RESPONSE_R1 (0x1 << 0) /* Format R1 and R1b */ |
90 | #define MSC_CMDAT_RESPONSE_R2 (0x2 << 0) /* Format R2 */ | 90 | #define MSC_CMDAT_RESPONSE_R2 (0x2 << 0) /* Format R2 */ |
91 | #define MSC_CMDAT_RESPONSE_R3 (0x3 << 0) /* Format R3 */ | 91 | #define MSC_CMDAT_RESPONSE_R3 (0x3 << 0) /* Format R3 */ |
92 | #define MSC_CMDAT_RESPONSE_R4 (0x4 << 0) /* Format R4 */ | 92 | #define MSC_CMDAT_RESPONSE_R4 (0x4 << 0) /* Format R4 */ |
93 | #define MSC_CMDAT_RESPONSE_R5 (0x5 << 0) /* Format R5 */ | 93 | #define MSC_CMDAT_RESPONSE_R5 (0x5 << 0) /* Format R5 */ |
94 | #define MSC_CMDAT_RESPONSE_R6 (0x6 << 0) /* Format R6 */ | 94 | #define MSC_CMDAT_RESPONSE_R6 (0x6 << 0) /* Format R6 */ |
95 | 95 | ||
96 | /* MSC Interrupts Mask Register (MSC_IMASK) */ | 96 | /* MSC Interrupts Mask Register (MSC_IMASK) */ |
97 | #define MSC_IMASK_TIME_OUT_RES BIT(9) | 97 | #define MSC_IMASK_TIME_OUT_RES BIT(9) |
98 | #define MSC_IMASK_TIME_OUT_READ BIT(8) | 98 | #define MSC_IMASK_TIME_OUT_READ BIT(8) |
99 | #define MSC_IMASK_SDIO BIT(7) | 99 | #define MSC_IMASK_SDIO BIT(7) |
100 | #define MSC_IMASK_TXFIFO_WR_REQ BIT(6) | 100 | #define MSC_IMASK_TXFIFO_WR_REQ BIT(6) |
101 | #define MSC_IMASK_RXFIFO_RD_REQ BIT(5) | 101 | #define MSC_IMASK_RXFIFO_RD_REQ BIT(5) |
102 | #define MSC_IMASK_END_CMD_RES BIT(2) | 102 | #define MSC_IMASK_END_CMD_RES BIT(2) |
103 | #define MSC_IMASK_PRG_DONE BIT(1) | 103 | #define MSC_IMASK_PRG_DONE BIT(1) |
104 | #define MSC_IMASK_DATA_TRAN_DONE BIT(0) | 104 | #define MSC_IMASK_DATA_TRAN_DONE BIT(0) |
105 | 105 | ||
106 | /* MSC Interrupts Status Register (MSC_IREG) */ | 106 | /* MSC Interrupts Status Register (MSC_IREG) */ |
107 | #define MSC_IREG_TIME_OUT_RES BIT(9) | 107 | #define MSC_IREG_TIME_OUT_RES BIT(9) |
108 | #define MSC_IREG_TIME_OUT_READ BIT(8) | 108 | #define MSC_IREG_TIME_OUT_READ BIT(8) |
109 | #define MSC_IREG_SDIO BIT(7) | 109 | #define MSC_IREG_SDIO BIT(7) |
110 | #define MSC_IREG_TXFIFO_WR_REQ BIT(6) | 110 | #define MSC_IREG_TXFIFO_WR_REQ BIT(6) |
111 | #define MSC_IREG_RXFIFO_RD_REQ BIT(5) | 111 | #define MSC_IREG_RXFIFO_RD_REQ BIT(5) |
112 | #define MSC_IREG_END_CMD_RES BIT(2) | 112 | #define MSC_IREG_END_CMD_RES BIT(2) |
113 | #define MSC_IREG_PRG_DONE BIT(1) | 113 | #define MSC_IREG_PRG_DONE BIT(1) |
114 | #define MSC_IREG_DATA_TRAN_DONE BIT(0) | 114 | #define MSC_IREG_DATA_TRAN_DONE BIT(0) |
115 | 115 | ||
116 | struct jz_mmc_plat { | 116 | struct jz_mmc_plat { |
117 | struct mmc_config cfg; | 117 | struct mmc_config cfg; |
118 | struct mmc mmc; | 118 | struct mmc mmc; |
119 | }; | 119 | }; |
120 | 120 | ||
121 | struct jz_mmc_priv { | 121 | struct jz_mmc_priv { |
122 | void __iomem *regs; | 122 | void __iomem *regs; |
123 | u32 flags; | 123 | u32 flags; |
124 | /* priv flags */ | 124 | /* priv flags */ |
125 | #define JZ_MMC_BUS_WIDTH_MASK 0x3 | 125 | #define JZ_MMC_BUS_WIDTH_MASK 0x3 |
126 | #define JZ_MMC_BUS_WIDTH_1 0x0 | 126 | #define JZ_MMC_BUS_WIDTH_1 0x0 |
127 | #define JZ_MMC_BUS_WIDTH_4 0x2 | 127 | #define JZ_MMC_BUS_WIDTH_4 0x2 |
128 | #define JZ_MMC_BUS_WIDTH_8 0x3 | 128 | #define JZ_MMC_BUS_WIDTH_8 0x3 |
129 | #define JZ_MMC_SENT_INIT BIT(2) | 129 | #define JZ_MMC_SENT_INIT BIT(2) |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static int jz_mmc_clock_rate(void) | 132 | static int jz_mmc_clock_rate(void) |
133 | { | 133 | { |
134 | return 24000000; | 134 | return 24000000; |
135 | } | 135 | } |
136 | 136 | ||
137 | #if CONFIG_IS_ENABLED(MMC_WRITE) | ||
138 | static inline void jz_mmc_write_data(struct jz_mmc_priv *priv, struct mmc_data *data) | ||
139 | { | ||
140 | int sz = DIV_ROUND_UP(data->blocks * data->blocksize, 4); | ||
141 | const void *buf = data->src; | ||
142 | |||
143 | while (sz--) { | ||
144 | u32 val = get_unaligned_le32(buf); | ||
145 | |||
146 | wait_for_bit_le32(priv->regs + MSC_IREG, | ||
147 | MSC_IREG_TXFIFO_WR_REQ, | ||
148 | true, 10000, false); | ||
149 | writel(val, priv->regs + MSC_TXFIFO); | ||
150 | buf += 4; | ||
151 | } | ||
152 | } | ||
153 | #else | ||
154 | static void jz_mmc_write_data(struct jz_mmc_priv *priv, struct mmc_data *data) | ||
155 | {} | ||
156 | #endif | ||
157 | |||
158 | static inline int jz_mmc_read_data(struct jz_mmc_priv *priv, struct mmc_data *data) | ||
159 | { | ||
160 | int sz = data->blocks * data->blocksize; | ||
161 | void *buf = data->dest; | ||
162 | u32 stat, val; | ||
163 | |||
164 | do { | ||
165 | stat = readl(priv->regs + MSC_STAT); | ||
166 | |||
167 | if (stat & MSC_STAT_TIME_OUT_READ) | ||
168 | return -ETIMEDOUT; | ||
169 | if (stat & MSC_STAT_CRC_READ_ERROR) | ||
170 | return -EINVAL; | ||
171 | if (stat & MSC_STAT_DATA_FIFO_EMPTY) { | ||
172 | udelay(10); | ||
173 | continue; | ||
174 | } | ||
175 | do { | ||
176 | val = readl(priv->regs + MSC_RXFIFO); | ||
177 | if (sz == 1) | ||
178 | *(u8 *)buf = (u8)val; | ||
179 | else if (sz == 2) | ||
180 | put_unaligned_le16(val, buf); | ||
181 | else if (sz >= 4) | ||
182 | put_unaligned_le32(val, buf); | ||
183 | buf += 4; | ||
184 | sz -= 4; | ||
185 | stat = readl(priv->regs + MSC_STAT); | ||
186 | } while (!(stat & MSC_STAT_DATA_FIFO_EMPTY)); | ||
187 | } while (!(stat & MSC_STAT_DATA_TRAN_DONE)); | ||
188 | return 0; | ||
189 | } | ||
190 | |||
137 | static int jz_mmc_send_cmd(struct mmc *mmc, struct jz_mmc_priv *priv, | 191 | static int jz_mmc_send_cmd(struct mmc *mmc, struct jz_mmc_priv *priv, |
138 | struct mmc_cmd *cmd, struct mmc_data *data) | 192 | struct mmc_cmd *cmd, struct mmc_data *data) |
139 | { | 193 | { |
140 | u32 stat, mask, cmdat = 0; | 194 | u32 stat, mask, cmdat = 0; |
141 | int i, ret; | 195 | int i, ret; |
142 | 196 | ||
143 | /* stop the clock */ | 197 | /* stop the clock */ |
144 | writel(MSC_STRPCL_CLOCK_CONTROL_STOP, priv->regs + MSC_STRPCL); | 198 | writel(MSC_STRPCL_CLOCK_CONTROL_STOP, priv->regs + MSC_STRPCL); |
145 | ret = wait_for_bit_le32(priv->regs + MSC_STAT, | 199 | ret = wait_for_bit_le32(priv->regs + MSC_STAT, |
146 | MSC_STAT_CLK_EN, false, 10000, false); | 200 | MSC_STAT_CLK_EN, false, 10000, false); |
147 | if (ret) | 201 | if (ret) |
148 | return ret; | 202 | return ret; |
149 | 203 | ||
150 | writel(0, priv->regs + MSC_DMAC); | 204 | writel(0, priv->regs + MSC_DMAC); |
151 | 205 | ||
152 | /* setup command */ | 206 | /* setup command */ |
153 | writel(cmd->cmdidx, priv->regs + MSC_CMD); | 207 | writel(cmd->cmdidx, priv->regs + MSC_CMD); |
154 | writel(cmd->cmdarg, priv->regs + MSC_ARG); | 208 | writel(cmd->cmdarg, priv->regs + MSC_ARG); |
155 | 209 | ||
156 | if (data) { | 210 | if (data) { |
157 | /* setup data */ | 211 | /* setup data */ |
158 | cmdat |= MSC_CMDAT_DATA_EN; | 212 | cmdat |= MSC_CMDAT_DATA_EN; |
159 | if (data->flags & MMC_DATA_WRITE) | 213 | if (data->flags & MMC_DATA_WRITE) |
160 | cmdat |= MSC_CMDAT_WRITE; | 214 | cmdat |= MSC_CMDAT_WRITE; |
161 | 215 | ||
162 | writel(data->blocks, priv->regs + MSC_NOB); | 216 | writel(data->blocks, priv->regs + MSC_NOB); |
163 | writel(data->blocksize, priv->regs + MSC_BLKLEN); | 217 | writel(data->blocksize, priv->regs + MSC_BLKLEN); |
164 | } else { | 218 | } else { |
165 | writel(0, priv->regs + MSC_NOB); | 219 | writel(0, priv->regs + MSC_NOB); |
166 | writel(0, priv->regs + MSC_BLKLEN); | 220 | writel(0, priv->regs + MSC_BLKLEN); |
167 | } | 221 | } |
168 | 222 | ||
169 | /* setup response */ | 223 | /* setup response */ |
170 | switch (cmd->resp_type) { | 224 | switch (cmd->resp_type) { |
171 | case MMC_RSP_NONE: | 225 | case MMC_RSP_NONE: |
172 | break; | 226 | break; |
173 | case MMC_RSP_R1: | 227 | case MMC_RSP_R1: |
174 | case MMC_RSP_R1b: | 228 | case MMC_RSP_R1b: |
175 | cmdat |= MSC_CMDAT_RESPONSE_R1; | 229 | cmdat |= MSC_CMDAT_RESPONSE_R1; |
176 | break; | 230 | break; |
177 | case MMC_RSP_R2: | 231 | case MMC_RSP_R2: |
178 | cmdat |= MSC_CMDAT_RESPONSE_R2; | 232 | cmdat |= MSC_CMDAT_RESPONSE_R2; |
179 | break; | 233 | break; |
180 | case MMC_RSP_R3: | 234 | case MMC_RSP_R3: |
181 | cmdat |= MSC_CMDAT_RESPONSE_R3; | 235 | cmdat |= MSC_CMDAT_RESPONSE_R3; |
182 | break; | 236 | break; |
183 | default: | 237 | default: |
184 | break; | 238 | break; |
185 | } | 239 | } |
186 | 240 | ||
187 | if (cmd->resp_type & MMC_RSP_BUSY) | 241 | if (cmd->resp_type & MMC_RSP_BUSY) |
188 | cmdat |= MSC_CMDAT_BUSY; | 242 | cmdat |= MSC_CMDAT_BUSY; |
189 | 243 | ||
190 | /* set init for the first command only */ | 244 | /* set init for the first command only */ |
191 | if (!(priv->flags & JZ_MMC_SENT_INIT)) { | 245 | if (!(priv->flags & JZ_MMC_SENT_INIT)) { |
192 | cmdat |= MSC_CMDAT_INIT; | 246 | cmdat |= MSC_CMDAT_INIT; |
193 | priv->flags |= JZ_MMC_SENT_INIT; | 247 | priv->flags |= JZ_MMC_SENT_INIT; |
194 | } | 248 | } |
195 | 249 | ||
196 | cmdat |= (priv->flags & JZ_MMC_BUS_WIDTH_MASK) << 9; | 250 | cmdat |= (priv->flags & JZ_MMC_BUS_WIDTH_MASK) << 9; |
197 | 251 | ||
198 | /* write the data setup */ | 252 | /* write the data setup */ |
199 | writel(cmdat, priv->regs + MSC_CMDAT); | 253 | writel(cmdat, priv->regs + MSC_CMDAT); |
200 | 254 | ||
201 | /* unmask interrupts */ | 255 | /* unmask interrupts */ |
202 | mask = 0xffffffff & ~(MSC_IMASK_END_CMD_RES | MSC_IMASK_TIME_OUT_RES); | 256 | mask = 0xffffffff & ~(MSC_IMASK_END_CMD_RES | MSC_IMASK_TIME_OUT_RES); |
203 | if (data) { | 257 | if (data) { |
204 | mask &= ~MSC_IMASK_DATA_TRAN_DONE; | 258 | mask &= ~MSC_IMASK_DATA_TRAN_DONE; |
205 | if (data->flags & MMC_DATA_WRITE) { | 259 | if (data->flags & MMC_DATA_WRITE) { |
206 | mask &= ~MSC_IMASK_TXFIFO_WR_REQ; | 260 | mask &= ~MSC_IMASK_TXFIFO_WR_REQ; |
207 | } else { | 261 | } else { |
208 | mask &= ~(MSC_IMASK_RXFIFO_RD_REQ | | 262 | mask &= ~(MSC_IMASK_RXFIFO_RD_REQ | |
209 | MSC_IMASK_TIME_OUT_READ); | 263 | MSC_IMASK_TIME_OUT_READ); |
210 | } | 264 | } |
211 | } | 265 | } |
212 | writel(mask, priv->regs + MSC_IMASK); | 266 | writel(mask, priv->regs + MSC_IMASK); |
213 | 267 | ||
214 | /* clear interrupts */ | 268 | /* clear interrupts */ |
215 | writel(0xffffffff, priv->regs + MSC_IREG); | 269 | writel(0xffffffff, priv->regs + MSC_IREG); |
216 | 270 | ||
217 | /* start the command (& the clock) */ | 271 | /* start the command (& the clock) */ |
218 | writel(MSC_STRPCL_START_OP | MSC_STRPCL_CLOCK_CONTROL_START, | 272 | writel(MSC_STRPCL_START_OP | MSC_STRPCL_CLOCK_CONTROL_START, |
219 | priv->regs + MSC_STRPCL); | 273 | priv->regs + MSC_STRPCL); |
220 | 274 | ||
221 | /* wait for completion */ | 275 | /* wait for completion */ |
222 | for (i = 0; i < 100; i++) { | 276 | for (i = 0; i < 100; i++) { |
223 | stat = readl(priv->regs + MSC_IREG); | 277 | stat = readl(priv->regs + MSC_IREG); |
224 | stat &= MSC_IREG_END_CMD_RES | MSC_IREG_TIME_OUT_RES; | 278 | stat &= MSC_IREG_END_CMD_RES | MSC_IREG_TIME_OUT_RES; |
225 | if (stat) | 279 | if (stat) |
226 | break; | 280 | break; |
227 | mdelay(1); | 281 | mdelay(1); |
228 | } | 282 | } |
229 | writel(stat, priv->regs + MSC_IREG); | 283 | writel(stat, priv->regs + MSC_IREG); |
230 | if (stat & MSC_IREG_TIME_OUT_RES) | 284 | if (stat & MSC_IREG_TIME_OUT_RES) |
231 | return -ETIMEDOUT; | 285 | return -ETIMEDOUT; |
232 | 286 | ||
233 | if (cmd->resp_type & MMC_RSP_PRESENT) { | 287 | if (cmd->resp_type & MMC_RSP_PRESENT) { |
234 | /* read the response */ | 288 | /* read the response */ |
235 | if (cmd->resp_type & MMC_RSP_136) { | 289 | if (cmd->resp_type & MMC_RSP_136) { |
236 | u16 a, b, c, i; | 290 | u16 a, b, c, i; |
237 | 291 | ||
238 | a = readw(priv->regs + MSC_RES); | 292 | a = readw(priv->regs + MSC_RES); |
239 | for (i = 0; i < 4; i++) { | 293 | for (i = 0; i < 4; i++) { |
240 | b = readw(priv->regs + MSC_RES); | 294 | b = readw(priv->regs + MSC_RES); |
241 | c = readw(priv->regs + MSC_RES); | 295 | c = readw(priv->regs + MSC_RES); |
242 | cmd->response[i] = | 296 | cmd->response[i] = |
243 | (a << 24) | (b << 8) | (c >> 8); | 297 | (a << 24) | (b << 8) | (c >> 8); |
244 | a = c; | 298 | a = c; |
245 | } | 299 | } |
246 | } else { | 300 | } else { |
247 | cmd->response[0] = readw(priv->regs + MSC_RES) << 24; | 301 | cmd->response[0] = readw(priv->regs + MSC_RES) << 24; |
248 | cmd->response[0] |= readw(priv->regs + MSC_RES) << 8; | 302 | cmd->response[0] |= readw(priv->regs + MSC_RES) << 8; |
249 | cmd->response[0] |= readw(priv->regs + MSC_RES) & 0xff; | 303 | cmd->response[0] |= readw(priv->regs + MSC_RES) & 0xff; |
250 | } | 304 | } |
251 | } | 305 | } |
252 | 306 | if (data) { | |
253 | if (data && (data->flags & MMC_DATA_WRITE)) { | 307 | if (data->flags & MMC_DATA_WRITE) |
254 | /* write the data */ | 308 | jz_mmc_write_data(priv, data); |
255 | int sz = DIV_ROUND_UP(data->blocks * data->blocksize, 4); | 309 | else if (data->flags & MMC_DATA_READ) { |
256 | const void *buf = data->src; | 310 | ret = jz_mmc_read_data(priv, data); |
257 | 311 | if (ret) | |
258 | while (sz--) { | 312 | return ret; |
259 | u32 val = get_unaligned_le32(buf); | ||
260 | |||
261 | wait_for_bit_le32(priv->regs + MSC_IREG, | ||
262 | MSC_IREG_TXFIFO_WR_REQ, | ||
263 | true, 10000, false); | ||
264 | writel(val, priv->regs + MSC_TXFIFO); | ||
265 | buf += 4; | ||
266 | } | 313 | } |
267 | } else if (data && (data->flags & MMC_DATA_READ)) { | ||
268 | /* read the data */ | ||
269 | int sz = data->blocks * data->blocksize; | ||
270 | void *buf = data->dest; | ||
271 | |||
272 | do { | ||
273 | stat = readl(priv->regs + MSC_STAT); | ||
274 | |||
275 | if (stat & MSC_STAT_TIME_OUT_READ) | ||
276 | return -ETIMEDOUT; | ||
277 | if (stat & MSC_STAT_CRC_READ_ERROR) | ||
278 | return -EINVAL; | ||
279 | if (stat & MSC_STAT_DATA_FIFO_EMPTY) { | ||
280 | udelay(10); | ||
281 | continue; | ||
282 | } | ||
283 | do { | ||
284 | u32 val = readl(priv->regs + MSC_RXFIFO); | ||
285 | |||
286 | if (sz == 1) | ||
287 | *(u8 *)buf = (u8)val; | ||
288 | else if (sz == 2) | ||
289 | put_unaligned_le16(val, buf); | ||
290 | else if (sz >= 4) | ||
291 | put_unaligned_le32(val, buf); | ||
292 | buf += 4; | ||
293 | sz -= 4; | ||
294 | stat = readl(priv->regs + MSC_STAT); | ||
295 | } while (!(stat & MSC_STAT_DATA_FIFO_EMPTY)); | ||
296 | } while (!(stat & MSC_STAT_DATA_TRAN_DONE)); | ||
297 | } | 314 | } |
298 | 315 | ||
299 | return 0; | 316 | return 0; |
300 | } | 317 | } |
301 | 318 | ||
302 | static int jz_mmc_set_ios(struct mmc *mmc, struct jz_mmc_priv *priv) | 319 | static int jz_mmc_set_ios(struct mmc *mmc, struct jz_mmc_priv *priv) |
303 | { | 320 | { |
304 | u32 real_rate = jz_mmc_clock_rate(); | 321 | u32 real_rate = jz_mmc_clock_rate(); |
305 | u8 clk_div = 0; | 322 | u8 clk_div = 0; |
306 | 323 | ||
307 | /* calculate clock divide */ | 324 | /* calculate clock divide */ |
308 | while ((real_rate > mmc->clock) && (clk_div < 7)) { | 325 | while ((real_rate > mmc->clock) && (clk_div < 7)) { |
309 | real_rate >>= 1; | 326 | real_rate >>= 1; |
310 | clk_div++; | 327 | clk_div++; |
311 | } | 328 | } |
312 | writel(clk_div & MSC_CLKRT_CLK_RATE_MASK, priv->regs + MSC_CLKRT); | 329 | writel(clk_div & MSC_CLKRT_CLK_RATE_MASK, priv->regs + MSC_CLKRT); |
313 | 330 | ||
314 | /* set the bus width for the next command */ | 331 | /* set the bus width for the next command */ |
315 | priv->flags &= ~JZ_MMC_BUS_WIDTH_MASK; | 332 | priv->flags &= ~JZ_MMC_BUS_WIDTH_MASK; |
316 | if (mmc->bus_width == 8) | 333 | if (mmc->bus_width == 8) |
317 | priv->flags |= JZ_MMC_BUS_WIDTH_8; | 334 | priv->flags |= JZ_MMC_BUS_WIDTH_8; |
318 | else if (mmc->bus_width == 4) | 335 | else if (mmc->bus_width == 4) |
319 | priv->flags |= JZ_MMC_BUS_WIDTH_4; | 336 | priv->flags |= JZ_MMC_BUS_WIDTH_4; |
320 | else | 337 | else |
321 | priv->flags |= JZ_MMC_BUS_WIDTH_1; | 338 | priv->flags |= JZ_MMC_BUS_WIDTH_1; |
322 | 339 | ||
323 | return 0; | 340 | return 0; |
324 | } | 341 | } |
325 | 342 | ||
326 | static int jz_mmc_core_init(struct mmc *mmc) | 343 | static int jz_mmc_core_init(struct mmc *mmc) |
327 | { | 344 | { |
328 | struct jz_mmc_priv *priv = mmc->priv; | 345 | struct jz_mmc_priv *priv = mmc->priv; |
329 | int ret; | 346 | int ret; |
330 | 347 | ||
331 | /* Reset */ | 348 | /* Reset */ |
332 | writel(MSC_STRPCL_RESET, priv->regs + MSC_STRPCL); | 349 | writel(MSC_STRPCL_RESET, priv->regs + MSC_STRPCL); |
333 | ret = wait_for_bit_le32(priv->regs + MSC_STAT, | 350 | ret = wait_for_bit_le32(priv->regs + MSC_STAT, |
334 | MSC_STAT_IS_RESETTING, false, 10000, false); | 351 | MSC_STAT_IS_RESETTING, false, 10000, false); |
335 | if (ret) | 352 | if (ret) |
336 | return ret; | 353 | return ret; |
337 | 354 | ||
338 | /* Maximum timeouts */ | 355 | /* Maximum timeouts */ |
339 | writel(0xffff, priv->regs + MSC_RESTO); | 356 | writel(0xffff, priv->regs + MSC_RESTO); |
340 | writel(0xffffffff, priv->regs + MSC_RDTO); | 357 | writel(0xffffffff, priv->regs + MSC_RDTO); |
341 | 358 | ||
342 | /* Enable low power mode */ | 359 | /* Enable low power mode */ |
343 | writel(0x1, priv->regs + MSC_LPM); | 360 | writel(0x1, priv->regs + MSC_LPM); |
344 | 361 | ||
345 | return 0; | 362 | return 0; |
346 | } | 363 | } |
347 | 364 | ||
348 | #if !CONFIG_IS_ENABLED(DM_MMC) | 365 | #if !CONFIG_IS_ENABLED(DM_MMC) |
349 | 366 | ||
350 | static int jz_mmc_legacy_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, | 367 | static int jz_mmc_legacy_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, |
351 | struct mmc_data *data) | 368 | struct mmc_data *data) |
352 | { | 369 | { |
353 | struct jz_mmc_priv *priv = mmc->priv; | 370 | struct jz_mmc_priv *priv = mmc->priv; |
354 | 371 | ||
355 | return jz_mmc_send_cmd(mmc, priv, cmd, data); | 372 | return jz_mmc_send_cmd(mmc, priv, cmd, data); |
356 | } | 373 | } |
357 | 374 | ||
358 | static int jz_mmc_legacy_set_ios(struct mmc *mmc) | 375 | static int jz_mmc_legacy_set_ios(struct mmc *mmc) |
359 | { | 376 | { |
360 | struct jz_mmc_priv *priv = mmc->priv; | 377 | struct jz_mmc_priv *priv = mmc->priv; |
361 | 378 | ||
362 | return jz_mmc_set_ios(mmc, priv); | 379 | return jz_mmc_set_ios(mmc, priv); |
363 | }; | 380 | }; |
364 | 381 | ||
365 | static const struct mmc_ops jz_msc_ops = { | 382 | static const struct mmc_ops jz_msc_ops = { |
366 | .send_cmd = jz_mmc_legacy_send_cmd, | 383 | .send_cmd = jz_mmc_legacy_send_cmd, |
367 | .set_ios = jz_mmc_legacy_set_ios, | 384 | .set_ios = jz_mmc_legacy_set_ios, |
368 | .init = jz_mmc_core_init, | 385 | .init = jz_mmc_core_init, |
369 | }; | 386 | }; |
370 | 387 | ||
371 | static struct jz_mmc_priv jz_mmc_priv_static; | 388 | static struct jz_mmc_priv jz_mmc_priv_static; |
372 | static struct jz_mmc_plat jz_mmc_plat_static = { | 389 | static struct jz_mmc_plat jz_mmc_plat_static = { |
373 | .cfg = { | 390 | .cfg = { |
374 | .name = "MSC", | 391 | .name = "MSC", |
375 | .ops = &jz_msc_ops, | 392 | .ops = &jz_msc_ops, |
376 | 393 | ||
377 | .voltages = MMC_VDD_27_28 | MMC_VDD_28_29 | MMC_VDD_29_30 | | 394 | .voltages = MMC_VDD_27_28 | MMC_VDD_28_29 | MMC_VDD_29_30 | |
378 | MMC_VDD_30_31 | MMC_VDD_31_32 | MMC_VDD_32_33 | | 395 | MMC_VDD_30_31 | MMC_VDD_31_32 | MMC_VDD_32_33 | |
379 | MMC_VDD_33_34 | MMC_VDD_34_35 | MMC_VDD_35_36, | 396 | MMC_VDD_33_34 | MMC_VDD_34_35 | MMC_VDD_35_36, |
380 | .host_caps = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS, | 397 | .host_caps = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS, |
381 | 398 | ||
382 | .f_min = 375000, | 399 | .f_min = 375000, |
383 | .f_max = 48000000, | 400 | .f_max = 48000000, |
384 | .b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT, | 401 | .b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT, |
385 | }, | 402 | }, |
386 | }; | 403 | }; |
387 | 404 | ||
388 | int jz_mmc_init(void __iomem *base) | 405 | int jz_mmc_init(void __iomem *base) |
389 | { | 406 | { |
390 | struct mmc *mmc; | 407 | struct mmc *mmc; |
391 | 408 | ||
392 | jz_mmc_priv_static.regs = base; | 409 | jz_mmc_priv_static.regs = base; |
393 | 410 | ||
394 | mmc = mmc_create(&jz_mmc_plat_static.cfg, &jz_mmc_priv_static); | 411 | mmc = mmc_create(&jz_mmc_plat_static.cfg, &jz_mmc_priv_static); |
395 | 412 | ||
396 | return mmc ? 0 : -ENODEV; | 413 | return mmc ? 0 : -ENODEV; |
397 | } | 414 | } |
398 | 415 | ||
399 | #else /* CONFIG_DM_MMC */ | 416 | #else /* CONFIG_DM_MMC */ |
400 | 417 | ||
401 | #include <dm.h> | 418 | #include <dm.h> |
402 | DECLARE_GLOBAL_DATA_PTR; | 419 | DECLARE_GLOBAL_DATA_PTR; |
403 | 420 | ||
404 | static int jz_mmc_dm_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, | 421 | static int jz_mmc_dm_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, |
405 | struct mmc_data *data) | 422 | struct mmc_data *data) |
406 | { | 423 | { |
407 | struct jz_mmc_priv *priv = dev_get_priv(dev); | 424 | struct jz_mmc_priv *priv = dev_get_priv(dev); |
408 | struct mmc *mmc = mmc_get_mmc_dev(dev); | 425 | struct mmc *mmc = mmc_get_mmc_dev(dev); |
409 | 426 | ||
410 | return jz_mmc_send_cmd(mmc, priv, cmd, data); | 427 | return jz_mmc_send_cmd(mmc, priv, cmd, data); |
411 | } | 428 | } |
412 | 429 | ||
413 | static int jz_mmc_dm_set_ios(struct udevice *dev) | 430 | static int jz_mmc_dm_set_ios(struct udevice *dev) |
414 | { | 431 | { |
415 | struct jz_mmc_priv *priv = dev_get_priv(dev); | 432 | struct jz_mmc_priv *priv = dev_get_priv(dev); |
416 | struct mmc *mmc = mmc_get_mmc_dev(dev); | 433 | struct mmc *mmc = mmc_get_mmc_dev(dev); |
417 | 434 | ||
418 | return jz_mmc_set_ios(mmc, priv); | 435 | return jz_mmc_set_ios(mmc, priv); |
419 | }; | 436 | }; |
420 | 437 | ||
421 | static const struct dm_mmc_ops jz_msc_ops = { | 438 | static const struct dm_mmc_ops jz_msc_ops = { |
422 | .send_cmd = jz_mmc_dm_send_cmd, | 439 | .send_cmd = jz_mmc_dm_send_cmd, |
423 | .set_ios = jz_mmc_dm_set_ios, | 440 | .set_ios = jz_mmc_dm_set_ios, |
424 | }; | 441 | }; |
425 | 442 | ||
426 | static int jz_mmc_ofdata_to_platdata(struct udevice *dev) | 443 | static int jz_mmc_ofdata_to_platdata(struct udevice *dev) |
427 | { | 444 | { |
428 | struct jz_mmc_priv *priv = dev_get_priv(dev); | 445 | struct jz_mmc_priv *priv = dev_get_priv(dev); |
429 | struct jz_mmc_plat *plat = dev_get_platdata(dev); | 446 | struct jz_mmc_plat *plat = dev_get_platdata(dev); |
430 | struct mmc_config *cfg; | 447 | struct mmc_config *cfg; |
431 | int ret; | 448 | int ret; |
432 | 449 | ||
433 | priv->regs = map_physmem(devfdt_get_addr(dev), 0x100, MAP_NOCACHE); | 450 | priv->regs = map_physmem(devfdt_get_addr(dev), 0x100, MAP_NOCACHE); |
434 | cfg = &plat->cfg; | 451 | cfg = &plat->cfg; |
435 | 452 | ||
436 | cfg->name = "MSC"; | 453 | cfg->name = "MSC"; |
437 | cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS; | 454 | cfg->host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS; |
438 | 455 | ||
439 | ret = mmc_of_parse(dev, cfg); | 456 | ret = mmc_of_parse(dev, cfg); |
440 | if (ret < 0) { | 457 | if (ret < 0) { |
441 | dev_err(dev, "failed to parse host caps\n"); | 458 | dev_err(dev, "failed to parse host caps\n"); |
442 | return ret; | 459 | return ret; |
443 | } | 460 | } |
444 | 461 | ||
445 | cfg->f_min = 400000; | 462 | cfg->f_min = 400000; |
446 | cfg->f_max = 52000000; | 463 | cfg->f_max = 52000000; |
447 | 464 | ||
448 | cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195; | 465 | cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195; |
449 | cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT; | 466 | cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT; |
450 | 467 | ||
451 | return 0; | 468 | return 0; |
452 | } | 469 | } |
drivers/mmc/mmc_write.c
1 | // SPDX-License-Identifier: GPL-2.0+ | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | /* | 2 | /* |
3 | * Copyright 2008, Freescale Semiconductor, Inc | 3 | * Copyright 2008, Freescale Semiconductor, Inc |
4 | * Andy Fleming | 4 | * Andy Fleming |
5 | * | 5 | * |
6 | * Based vaguely on the Linux code | 6 | * Based vaguely on the Linux code |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <config.h> | 9 | #include <config.h> |
10 | #include <common.h> | 10 | #include <common.h> |
11 | #include <dm.h> | 11 | #include <dm.h> |
12 | #include <part.h> | 12 | #include <part.h> |
13 | #include <div64.h> | 13 | #include <div64.h> |
14 | #include <linux/math64.h> | 14 | #include <linux/math64.h> |
15 | #include "mmc_private.h" | 15 | #include "mmc_private.h" |
16 | 16 | ||
17 | static ulong mmc_erase_t(struct mmc *mmc, ulong start, lbaint_t blkcnt) | 17 | static ulong mmc_erase_t(struct mmc *mmc, ulong start, lbaint_t blkcnt) |
18 | { | 18 | { |
19 | struct mmc_cmd cmd; | 19 | struct mmc_cmd cmd; |
20 | ulong end; | 20 | ulong end; |
21 | int err, start_cmd, end_cmd; | 21 | int err, start_cmd, end_cmd; |
22 | 22 | ||
23 | if (mmc->high_capacity) { | 23 | if (mmc->high_capacity) { |
24 | end = start + blkcnt - 1; | 24 | end = start + blkcnt - 1; |
25 | } else { | 25 | } else { |
26 | end = (start + blkcnt - 1) * mmc->write_bl_len; | 26 | end = (start + blkcnt - 1) * mmc->write_bl_len; |
27 | start *= mmc->write_bl_len; | 27 | start *= mmc->write_bl_len; |
28 | } | 28 | } |
29 | 29 | ||
30 | if (IS_SD(mmc)) { | 30 | if (IS_SD(mmc)) { |
31 | start_cmd = SD_CMD_ERASE_WR_BLK_START; | 31 | start_cmd = SD_CMD_ERASE_WR_BLK_START; |
32 | end_cmd = SD_CMD_ERASE_WR_BLK_END; | 32 | end_cmd = SD_CMD_ERASE_WR_BLK_END; |
33 | } else { | 33 | } else { |
34 | start_cmd = MMC_CMD_ERASE_GROUP_START; | 34 | start_cmd = MMC_CMD_ERASE_GROUP_START; |
35 | end_cmd = MMC_CMD_ERASE_GROUP_END; | 35 | end_cmd = MMC_CMD_ERASE_GROUP_END; |
36 | } | 36 | } |
37 | 37 | ||
38 | cmd.cmdidx = start_cmd; | 38 | cmd.cmdidx = start_cmd; |
39 | cmd.cmdarg = start; | 39 | cmd.cmdarg = start; |
40 | cmd.resp_type = MMC_RSP_R1; | 40 | cmd.resp_type = MMC_RSP_R1; |
41 | 41 | ||
42 | err = mmc_send_cmd(mmc, &cmd, NULL); | 42 | err = mmc_send_cmd(mmc, &cmd, NULL); |
43 | if (err) | 43 | if (err) |
44 | goto err_out; | 44 | goto err_out; |
45 | 45 | ||
46 | cmd.cmdidx = end_cmd; | 46 | cmd.cmdidx = end_cmd; |
47 | cmd.cmdarg = end; | 47 | cmd.cmdarg = end; |
48 | 48 | ||
49 | err = mmc_send_cmd(mmc, &cmd, NULL); | 49 | err = mmc_send_cmd(mmc, &cmd, NULL); |
50 | if (err) | 50 | if (err) |
51 | goto err_out; | 51 | goto err_out; |
52 | 52 | ||
53 | cmd.cmdidx = MMC_CMD_ERASE; | 53 | cmd.cmdidx = MMC_CMD_ERASE; |
54 | cmd.cmdarg = MMC_ERASE_ARG; | 54 | cmd.cmdarg = MMC_ERASE_ARG; |
55 | cmd.resp_type = MMC_RSP_R1b; | 55 | cmd.resp_type = MMC_RSP_R1b; |
56 | 56 | ||
57 | err = mmc_send_cmd(mmc, &cmd, NULL); | 57 | err = mmc_send_cmd(mmc, &cmd, NULL); |
58 | if (err) | 58 | if (err) |
59 | goto err_out; | 59 | goto err_out; |
60 | 60 | ||
61 | return 0; | 61 | return 0; |
62 | 62 | ||
63 | err_out: | 63 | err_out: |
64 | puts("mmc erase failed\n"); | 64 | puts("mmc erase failed\n"); |
65 | return err; | 65 | return err; |
66 | } | 66 | } |
67 | 67 | ||
68 | #ifdef CONFIG_BLK | 68 | #if CONFIG_IS_ENABLED(BLK) |
69 | ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt) | 69 | ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt) |
70 | #else | 70 | #else |
71 | ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt) | 71 | ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt) |
72 | #endif | 72 | #endif |
73 | { | 73 | { |
74 | #ifdef CONFIG_BLK | 74 | #if CONFIG_IS_ENABLED(BLK) |
75 | struct blk_desc *block_dev = dev_get_uclass_platdata(dev); | 75 | struct blk_desc *block_dev = dev_get_uclass_platdata(dev); |
76 | #endif | 76 | #endif |
77 | int dev_num = block_dev->devnum; | 77 | int dev_num = block_dev->devnum; |
78 | int err = 0; | 78 | int err = 0; |
79 | u32 start_rem, blkcnt_rem; | 79 | u32 start_rem, blkcnt_rem; |
80 | struct mmc *mmc = find_mmc_device(dev_num); | 80 | struct mmc *mmc = find_mmc_device(dev_num); |
81 | lbaint_t blk = 0, blk_r = 0; | 81 | lbaint_t blk = 0, blk_r = 0; |
82 | int timeout = 1000; | 82 | int timeout = 1000; |
83 | 83 | ||
84 | if (!mmc) | 84 | if (!mmc) |
85 | return -1; | 85 | return -1; |
86 | 86 | ||
87 | err = blk_select_hwpart_devnum(IF_TYPE_MMC, dev_num, | 87 | err = blk_select_hwpart_devnum(IF_TYPE_MMC, dev_num, |
88 | block_dev->hwpart); | 88 | block_dev->hwpart); |
89 | if (err < 0) | 89 | if (err < 0) |
90 | return -1; | 90 | return -1; |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * We want to see if the requested start or total block count are | 93 | * We want to see if the requested start or total block count are |
94 | * unaligned. We discard the whole numbers and only care about the | 94 | * unaligned. We discard the whole numbers and only care about the |
95 | * remainder. | 95 | * remainder. |
96 | */ | 96 | */ |
97 | err = div_u64_rem(start, mmc->erase_grp_size, &start_rem); | 97 | err = div_u64_rem(start, mmc->erase_grp_size, &start_rem); |
98 | err = div_u64_rem(blkcnt, mmc->erase_grp_size, &blkcnt_rem); | 98 | err = div_u64_rem(blkcnt, mmc->erase_grp_size, &blkcnt_rem); |
99 | if (start_rem || blkcnt_rem) | 99 | if (start_rem || blkcnt_rem) |
100 | printf("\n\nCaution! Your devices Erase group is 0x%x\n" | 100 | printf("\n\nCaution! Your devices Erase group is 0x%x\n" |
101 | "The erase range would be change to " | 101 | "The erase range would be change to " |
102 | "0x" LBAF "~0x" LBAF "\n\n", | 102 | "0x" LBAF "~0x" LBAF "\n\n", |
103 | mmc->erase_grp_size, start & ~(mmc->erase_grp_size - 1), | 103 | mmc->erase_grp_size, start & ~(mmc->erase_grp_size - 1), |
104 | ((start + blkcnt + mmc->erase_grp_size) | 104 | ((start + blkcnt + mmc->erase_grp_size) |
105 | & ~(mmc->erase_grp_size - 1)) - 1); | 105 | & ~(mmc->erase_grp_size - 1)) - 1); |
106 | 106 | ||
107 | while (blk < blkcnt) { | 107 | while (blk < blkcnt) { |
108 | if (IS_SD(mmc) && mmc->ssr.au) { | 108 | if (IS_SD(mmc) && mmc->ssr.au) { |
109 | blk_r = ((blkcnt - blk) > mmc->ssr.au) ? | 109 | blk_r = ((blkcnt - blk) > mmc->ssr.au) ? |
110 | mmc->ssr.au : (blkcnt - blk); | 110 | mmc->ssr.au : (blkcnt - blk); |
111 | } else { | 111 | } else { |
112 | blk_r = ((blkcnt - blk) > mmc->erase_grp_size) ? | 112 | blk_r = ((blkcnt - blk) > mmc->erase_grp_size) ? |
113 | mmc->erase_grp_size : (blkcnt - blk); | 113 | mmc->erase_grp_size : (blkcnt - blk); |
114 | } | 114 | } |
115 | err = mmc_erase_t(mmc, start + blk, blk_r); | 115 | err = mmc_erase_t(mmc, start + blk, blk_r); |
116 | if (err) | 116 | if (err) |
117 | break; | 117 | break; |
118 | 118 | ||
119 | blk += blk_r; | 119 | blk += blk_r; |
120 | 120 | ||
121 | /* Waiting for the ready status */ | 121 | /* Waiting for the ready status */ |
122 | if (mmc_send_status(mmc, timeout)) | 122 | if (mmc_send_status(mmc, timeout)) |
123 | return 0; | 123 | return 0; |
124 | } | 124 | } |
125 | 125 | ||
126 | return blk; | 126 | return blk; |
127 | } | 127 | } |
128 | 128 | ||
129 | static ulong mmc_write_blocks(struct mmc *mmc, lbaint_t start, | 129 | static ulong mmc_write_blocks(struct mmc *mmc, lbaint_t start, |
130 | lbaint_t blkcnt, const void *src) | 130 | lbaint_t blkcnt, const void *src) |
131 | { | 131 | { |
132 | struct mmc_cmd cmd; | 132 | struct mmc_cmd cmd; |
133 | struct mmc_data data; | 133 | struct mmc_data data; |
134 | int timeout = 1000; | 134 | int timeout = 1000; |
135 | 135 | ||
136 | if ((start + blkcnt) > mmc_get_blk_desc(mmc)->lba) { | 136 | if ((start + blkcnt) > mmc_get_blk_desc(mmc)->lba) { |
137 | printf("MMC: block number 0x" LBAF " exceeds max(0x" LBAF ")\n", | 137 | printf("MMC: block number 0x" LBAF " exceeds max(0x" LBAF ")\n", |
138 | start + blkcnt, mmc_get_blk_desc(mmc)->lba); | 138 | start + blkcnt, mmc_get_blk_desc(mmc)->lba); |
139 | return 0; | 139 | return 0; |
140 | } | 140 | } |
141 | 141 | ||
142 | if (blkcnt == 0) | 142 | if (blkcnt == 0) |
143 | return 0; | 143 | return 0; |
144 | else if (blkcnt == 1) | 144 | else if (blkcnt == 1) |
145 | cmd.cmdidx = MMC_CMD_WRITE_SINGLE_BLOCK; | 145 | cmd.cmdidx = MMC_CMD_WRITE_SINGLE_BLOCK; |
146 | else | 146 | else |
147 | cmd.cmdidx = MMC_CMD_WRITE_MULTIPLE_BLOCK; | 147 | cmd.cmdidx = MMC_CMD_WRITE_MULTIPLE_BLOCK; |
148 | 148 | ||
149 | if (mmc->high_capacity) | 149 | if (mmc->high_capacity) |
150 | cmd.cmdarg = start; | 150 | cmd.cmdarg = start; |
151 | else | 151 | else |
152 | cmd.cmdarg = start * mmc->write_bl_len; | 152 | cmd.cmdarg = start * mmc->write_bl_len; |
153 | 153 | ||
154 | cmd.resp_type = MMC_RSP_R1; | 154 | cmd.resp_type = MMC_RSP_R1; |
155 | 155 | ||
156 | data.src = src; | 156 | data.src = src; |
157 | data.blocks = blkcnt; | 157 | data.blocks = blkcnt; |
158 | data.blocksize = mmc->write_bl_len; | 158 | data.blocksize = mmc->write_bl_len; |
159 | data.flags = MMC_DATA_WRITE; | 159 | data.flags = MMC_DATA_WRITE; |
160 | 160 | ||
161 | if (mmc_send_cmd(mmc, &cmd, &data)) { | 161 | if (mmc_send_cmd(mmc, &cmd, &data)) { |
162 | printf("mmc write failed\n"); | 162 | printf("mmc write failed\n"); |
163 | return 0; | 163 | return 0; |
164 | } | 164 | } |
165 | 165 | ||
166 | /* SPI multiblock writes terminate using a special | 166 | /* SPI multiblock writes terminate using a special |
167 | * token, not a STOP_TRANSMISSION request. | 167 | * token, not a STOP_TRANSMISSION request. |
168 | */ | 168 | */ |
169 | if (!mmc_host_is_spi(mmc) && blkcnt > 1) { | 169 | if (!mmc_host_is_spi(mmc) && blkcnt > 1) { |
170 | cmd.cmdidx = MMC_CMD_STOP_TRANSMISSION; | 170 | cmd.cmdidx = MMC_CMD_STOP_TRANSMISSION; |
171 | cmd.cmdarg = 0; | 171 | cmd.cmdarg = 0; |
172 | cmd.resp_type = MMC_RSP_R1b; | 172 | cmd.resp_type = MMC_RSP_R1b; |
173 | if (mmc_send_cmd(mmc, &cmd, NULL)) { | 173 | if (mmc_send_cmd(mmc, &cmd, NULL)) { |
174 | printf("mmc fail to send stop cmd\n"); | 174 | printf("mmc fail to send stop cmd\n"); |
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | /* Waiting for the ready status */ | 179 | /* Waiting for the ready status */ |
180 | if (mmc_send_status(mmc, timeout)) | 180 | if (mmc_send_status(mmc, timeout)) |
181 | return 0; | 181 | return 0; |
182 | 182 | ||
183 | return blkcnt; | 183 | return blkcnt; |
184 | } | 184 | } |
185 | 185 | ||
186 | #ifdef CONFIG_BLK | 186 | #if CONFIG_IS_ENABLED(BLK) |
187 | ulong mmc_bwrite(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, | 187 | ulong mmc_bwrite(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, |
188 | const void *src) | 188 | const void *src) |
189 | #else | 189 | #else |
190 | ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, | 190 | ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, |
191 | const void *src) | 191 | const void *src) |
192 | #endif | 192 | #endif |
193 | { | 193 | { |
194 | #ifdef CONFIG_BLK | 194 | #if CONFIG_IS_ENABLED(BLK) |
195 | struct blk_desc *block_dev = dev_get_uclass_platdata(dev); | 195 | struct blk_desc *block_dev = dev_get_uclass_platdata(dev); |
196 | #endif | 196 | #endif |
197 | int dev_num = block_dev->devnum; | 197 | int dev_num = block_dev->devnum; |
198 | lbaint_t cur, blocks_todo = blkcnt; | 198 | lbaint_t cur, blocks_todo = blkcnt; |
199 | int err; | 199 | int err; |
200 | 200 | ||
201 | struct mmc *mmc = find_mmc_device(dev_num); | 201 | struct mmc *mmc = find_mmc_device(dev_num); |
202 | if (!mmc) | 202 | if (!mmc) |
203 | return 0; | 203 | return 0; |
204 | 204 | ||
205 | err = blk_select_hwpart_devnum(IF_TYPE_MMC, dev_num, block_dev->hwpart); | 205 | err = blk_select_hwpart_devnum(IF_TYPE_MMC, dev_num, block_dev->hwpart); |
206 | if (err < 0) | 206 | if (err < 0) |
207 | return 0; | 207 | return 0; |
208 | 208 | ||
209 | if (mmc_set_blocklen(mmc, mmc->write_bl_len)) | 209 | if (mmc_set_blocklen(mmc, mmc->write_bl_len)) |
210 | return 0; | 210 | return 0; |
211 | 211 | ||
212 | do { | 212 | do { |
213 | cur = (blocks_todo > mmc->cfg->b_max) ? | 213 | cur = (blocks_todo > mmc->cfg->b_max) ? |
214 | mmc->cfg->b_max : blocks_todo; | 214 | mmc->cfg->b_max : blocks_todo; |
215 | if (mmc_write_blocks(mmc, start, cur, src) != cur) | 215 | if (mmc_write_blocks(mmc, start, cur, src) != cur) |
216 | return 0; | 216 | return 0; |
217 | blocks_todo -= cur; | 217 | blocks_todo -= cur; |
218 | start += cur; | 218 | start += cur; |
219 | src += cur * mmc->write_bl_len; | 219 | src += cur * mmc->write_bl_len; |
220 | } while (blocks_todo > 0); | 220 | } while (blocks_todo > 0); |
221 | 221 | ||
222 | return blkcnt; | 222 | return blkcnt; |
223 | } | 223 | } |
224 | 224 |
drivers/net/bcm6368-eth.c
1 | // SPDX-License-Identifier: GPL-2.0+ | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | /* | 2 | /* |
3 | * Copyright (C) 2018 Álvaro Fernández Rojas <noltari@gmail.com> | 3 | * Copyright (C) 2018 Álvaro Fernández Rojas <noltari@gmail.com> |
4 | * | 4 | * |
5 | * Derived from linux/drivers/net/ethernet/broadcom/bcm63xx_enet.c: | 5 | * Derived from linux/drivers/net/ethernet/broadcom/bcm63xx_enet.c: |
6 | * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr> | 6 | * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <common.h> | 9 | #include <common.h> |
10 | #include <clk.h> | 10 | #include <clk.h> |
11 | #include <dm.h> | 11 | #include <dm.h> |
12 | #include <dma.h> | 12 | #include <dma.h> |
13 | #include <miiphy.h> | 13 | #include <miiphy.h> |
14 | #include <net.h> | 14 | #include <net.h> |
15 | #include <reset.h> | 15 | #include <reset.h> |
16 | #include <wait_bit.h> | 16 | #include <wait_bit.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | 18 | ||
19 | #define ETH_PORT_STR "brcm,enetsw-port" | 19 | #define ETH_PORT_STR "brcm,enetsw-port" |
20 | 20 | ||
21 | #define ETH_RX_DESC PKTBUFSRX | 21 | #define ETH_RX_DESC PKTBUFSRX |
22 | #define ETH_ZLEN 60 | 22 | #define ETH_ZLEN 60 |
23 | #define ETH_TIMEOUT 100 | 23 | #define ETH_TIMEOUT 100 |
24 | 24 | ||
25 | #define ETH_MAX_PORT 8 | 25 | #define ETH_MAX_PORT 8 |
26 | #define ETH_RGMII_PORT0 4 | 26 | #define ETH_RGMII_PORT0 4 |
27 | 27 | ||
28 | /* Port traffic control */ | 28 | /* Port traffic control */ |
29 | #define ETH_PTCTRL_REG(x) (0x0 + (x)) | 29 | #define ETH_PTCTRL_REG(x) (0x0 + (x)) |
30 | #define ETH_PTCTRL_RXDIS_SHIFT 0 | 30 | #define ETH_PTCTRL_RXDIS_SHIFT 0 |
31 | #define ETH_PTCTRL_RXDIS_MASK (1 << ETH_PTCTRL_RXDIS_SHIFT) | 31 | #define ETH_PTCTRL_RXDIS_MASK (1 << ETH_PTCTRL_RXDIS_SHIFT) |
32 | #define ETH_PTCTRL_TXDIS_SHIFT 1 | 32 | #define ETH_PTCTRL_TXDIS_SHIFT 1 |
33 | #define ETH_PTCTRL_TXDIS_MASK (1 << ETH_PTCTRL_TXDIS_SHIFT) | 33 | #define ETH_PTCTRL_TXDIS_MASK (1 << ETH_PTCTRL_TXDIS_SHIFT) |
34 | 34 | ||
35 | /* Switch mode register */ | 35 | /* Switch mode register */ |
36 | #define ETH_SWMODE_REG 0xb | 36 | #define ETH_SWMODE_REG 0xb |
37 | #define ETH_SWMODE_FWD_EN_SHIFT 1 | 37 | #define ETH_SWMODE_FWD_EN_SHIFT 1 |
38 | #define ETH_SWMODE_FWD_EN_MASK (1 << ETH_SWMODE_FWD_EN_SHIFT) | 38 | #define ETH_SWMODE_FWD_EN_MASK (1 << ETH_SWMODE_FWD_EN_SHIFT) |
39 | 39 | ||
40 | /* IMP override Register */ | 40 | /* IMP override Register */ |
41 | #define ETH_IMPOV_REG 0xe | 41 | #define ETH_IMPOV_REG 0xe |
42 | #define ETH_IMPOV_LINKUP_SHIFT 0 | 42 | #define ETH_IMPOV_LINKUP_SHIFT 0 |
43 | #define ETH_IMPOV_LINKUP_MASK (1 << ETH_IMPOV_LINKUP_SHIFT) | 43 | #define ETH_IMPOV_LINKUP_MASK (1 << ETH_IMPOV_LINKUP_SHIFT) |
44 | #define ETH_IMPOV_FDX_SHIFT 1 | 44 | #define ETH_IMPOV_FDX_SHIFT 1 |
45 | #define ETH_IMPOV_FDX_MASK (1 << ETH_IMPOV_FDX_SHIFT) | 45 | #define ETH_IMPOV_FDX_MASK (1 << ETH_IMPOV_FDX_SHIFT) |
46 | #define ETH_IMPOV_100_SHIFT 2 | 46 | #define ETH_IMPOV_100_SHIFT 2 |
47 | #define ETH_IMPOV_100_MASK (1 << ETH_IMPOV_100_SHIFT) | 47 | #define ETH_IMPOV_100_MASK (1 << ETH_IMPOV_100_SHIFT) |
48 | #define ETH_IMPOV_1000_SHIFT 3 | 48 | #define ETH_IMPOV_1000_SHIFT 3 |
49 | #define ETH_IMPOV_1000_MASK (1 << ETH_IMPOV_1000_SHIFT) | 49 | #define ETH_IMPOV_1000_MASK (1 << ETH_IMPOV_1000_SHIFT) |
50 | #define ETH_IMPOV_RXFLOW_SHIFT 4 | 50 | #define ETH_IMPOV_RXFLOW_SHIFT 4 |
51 | #define ETH_IMPOV_RXFLOW_MASK (1 << ETH_IMPOV_RXFLOW_SHIFT) | 51 | #define ETH_IMPOV_RXFLOW_MASK (1 << ETH_IMPOV_RXFLOW_SHIFT) |
52 | #define ETH_IMPOV_TXFLOW_SHIFT 5 | 52 | #define ETH_IMPOV_TXFLOW_SHIFT 5 |
53 | #define ETH_IMPOV_TXFLOW_MASK (1 << ETH_IMPOV_TXFLOW_SHIFT) | 53 | #define ETH_IMPOV_TXFLOW_MASK (1 << ETH_IMPOV_TXFLOW_SHIFT) |
54 | #define ETH_IMPOV_FORCE_SHIFT 7 | 54 | #define ETH_IMPOV_FORCE_SHIFT 7 |
55 | #define ETH_IMPOV_FORCE_MASK (1 << ETH_IMPOV_FORCE_SHIFT) | 55 | #define ETH_IMPOV_FORCE_MASK (1 << ETH_IMPOV_FORCE_SHIFT) |
56 | 56 | ||
57 | /* Port override Register */ | 57 | /* Port override Register */ |
58 | #define ETH_PORTOV_REG(x) (0x58 + (x)) | 58 | #define ETH_PORTOV_REG(x) (0x58 + (x)) |
59 | #define ETH_PORTOV_LINKUP_SHIFT 0 | 59 | #define ETH_PORTOV_LINKUP_SHIFT 0 |
60 | #define ETH_PORTOV_LINKUP_MASK (1 << ETH_PORTOV_LINKUP_SHIFT) | 60 | #define ETH_PORTOV_LINKUP_MASK (1 << ETH_PORTOV_LINKUP_SHIFT) |
61 | #define ETH_PORTOV_FDX_SHIFT 1 | 61 | #define ETH_PORTOV_FDX_SHIFT 1 |
62 | #define ETH_PORTOV_FDX_MASK (1 << ETH_PORTOV_FDX_SHIFT) | 62 | #define ETH_PORTOV_FDX_MASK (1 << ETH_PORTOV_FDX_SHIFT) |
63 | #define ETH_PORTOV_100_SHIFT 2 | 63 | #define ETH_PORTOV_100_SHIFT 2 |
64 | #define ETH_PORTOV_100_MASK (1 << ETH_PORTOV_100_SHIFT) | 64 | #define ETH_PORTOV_100_MASK (1 << ETH_PORTOV_100_SHIFT) |
65 | #define ETH_PORTOV_1000_SHIFT 3 | 65 | #define ETH_PORTOV_1000_SHIFT 3 |
66 | #define ETH_PORTOV_1000_MASK (1 << ETH_PORTOV_1000_SHIFT) | 66 | #define ETH_PORTOV_1000_MASK (1 << ETH_PORTOV_1000_SHIFT) |
67 | #define ETH_PORTOV_RXFLOW_SHIFT 4 | 67 | #define ETH_PORTOV_RXFLOW_SHIFT 4 |
68 | #define ETH_PORTOV_RXFLOW_MASK (1 << ETH_PORTOV_RXFLOW_SHIFT) | 68 | #define ETH_PORTOV_RXFLOW_MASK (1 << ETH_PORTOV_RXFLOW_SHIFT) |
69 | #define ETH_PORTOV_TXFLOW_SHIFT 5 | 69 | #define ETH_PORTOV_TXFLOW_SHIFT 5 |
70 | #define ETH_PORTOV_TXFLOW_MASK (1 << ETH_PORTOV_TXFLOW_SHIFT) | 70 | #define ETH_PORTOV_TXFLOW_MASK (1 << ETH_PORTOV_TXFLOW_SHIFT) |
71 | #define ETH_PORTOV_ENABLE_SHIFT 6 | 71 | #define ETH_PORTOV_ENABLE_SHIFT 6 |
72 | #define ETH_PORTOV_ENABLE_MASK (1 << ETH_PORTOV_ENABLE_SHIFT) | 72 | #define ETH_PORTOV_ENABLE_MASK (1 << ETH_PORTOV_ENABLE_SHIFT) |
73 | 73 | ||
74 | /* Port RGMII control register */ | 74 | /* Port RGMII control register */ |
75 | #define ETH_RGMII_CTRL_REG(x) (0x60 + (x)) | 75 | #define ETH_RGMII_CTRL_REG(x) (0x60 + (x)) |
76 | #define ETH_RGMII_CTRL_GMII_CLK_EN (1 << 7) | 76 | #define ETH_RGMII_CTRL_GMII_CLK_EN (1 << 7) |
77 | #define ETH_RGMII_CTRL_MII_OVERRIDE_EN (1 << 6) | 77 | #define ETH_RGMII_CTRL_MII_OVERRIDE_EN (1 << 6) |
78 | #define ETH_RGMII_CTRL_MII_MODE_MASK (3 << 4) | 78 | #define ETH_RGMII_CTRL_MII_MODE_MASK (3 << 4) |
79 | #define ETH_RGMII_CTRL_RGMII_MODE (0 << 4) | 79 | #define ETH_RGMII_CTRL_RGMII_MODE (0 << 4) |
80 | #define ETH_RGMII_CTRL_MII_MODE (1 << 4) | 80 | #define ETH_RGMII_CTRL_MII_MODE (1 << 4) |
81 | #define ETH_RGMII_CTRL_RVMII_MODE (2 << 4) | 81 | #define ETH_RGMII_CTRL_RVMII_MODE (2 << 4) |
82 | #define ETH_RGMII_CTRL_TIMING_SEL_EN (1 << 0) | 82 | #define ETH_RGMII_CTRL_TIMING_SEL_EN (1 << 0) |
83 | 83 | ||
84 | /* Port RGMII timing register */ | 84 | /* Port RGMII timing register */ |
85 | #define ENETSW_RGMII_TIMING_REG(x) (0x68 + (x)) | 85 | #define ENETSW_RGMII_TIMING_REG(x) (0x68 + (x)) |
86 | 86 | ||
87 | /* MDIO control register */ | 87 | /* MDIO control register */ |
88 | #define MII_SC_REG 0xb0 | 88 | #define MII_SC_REG 0xb0 |
89 | #define MII_SC_EXT_SHIFT 16 | 89 | #define MII_SC_EXT_SHIFT 16 |
90 | #define MII_SC_EXT_MASK (1 << MII_SC_EXT_SHIFT) | 90 | #define MII_SC_EXT_MASK (1 << MII_SC_EXT_SHIFT) |
91 | #define MII_SC_REG_SHIFT 20 | 91 | #define MII_SC_REG_SHIFT 20 |
92 | #define MII_SC_PHYID_SHIFT 25 | 92 | #define MII_SC_PHYID_SHIFT 25 |
93 | #define MII_SC_RD_SHIFT 30 | 93 | #define MII_SC_RD_SHIFT 30 |
94 | #define MII_SC_RD_MASK (1 << MII_SC_RD_SHIFT) | 94 | #define MII_SC_RD_MASK (1 << MII_SC_RD_SHIFT) |
95 | #define MII_SC_WR_SHIFT 31 | 95 | #define MII_SC_WR_SHIFT 31 |
96 | #define MII_SC_WR_MASK (1 << MII_SC_WR_SHIFT) | 96 | #define MII_SC_WR_MASK (1 << MII_SC_WR_SHIFT) |
97 | 97 | ||
98 | /* MDIO data register */ | 98 | /* MDIO data register */ |
99 | #define MII_DAT_REG 0xb4 | 99 | #define MII_DAT_REG 0xb4 |
100 | 100 | ||
101 | /* Global Management Configuration Register */ | 101 | /* Global Management Configuration Register */ |
102 | #define ETH_GMCR_REG 0x200 | 102 | #define ETH_GMCR_REG 0x200 |
103 | #define ETH_GMCR_RST_MIB_SHIFT 0 | 103 | #define ETH_GMCR_RST_MIB_SHIFT 0 |
104 | #define ETH_GMCR_RST_MIB_MASK (1 << ETH_GMCR_RST_MIB_SHIFT) | 104 | #define ETH_GMCR_RST_MIB_MASK (1 << ETH_GMCR_RST_MIB_SHIFT) |
105 | 105 | ||
106 | /* Jumbo control register port mask register */ | 106 | /* Jumbo control register port mask register */ |
107 | #define ETH_JMBCTL_PORT_REG 0x4004 | 107 | #define ETH_JMBCTL_PORT_REG 0x4004 |
108 | 108 | ||
109 | /* Jumbo control mib good frame register */ | 109 | /* Jumbo control mib good frame register */ |
110 | #define ETH_JMBCTL_MAXSIZE_REG 0x4008 | 110 | #define ETH_JMBCTL_MAXSIZE_REG 0x4008 |
111 | 111 | ||
112 | /* ETH port data */ | 112 | /* ETH port data */ |
113 | struct bcm_enetsw_port { | 113 | struct bcm_enetsw_port { |
114 | bool used; | 114 | bool used; |
115 | const char *name; | 115 | const char *name; |
116 | /* Config */ | 116 | /* Config */ |
117 | bool bypass_link; | 117 | bool bypass_link; |
118 | int force_speed; | 118 | int force_speed; |
119 | bool force_duplex_full; | 119 | bool force_duplex_full; |
120 | /* PHY */ | 120 | /* PHY */ |
121 | int phy_id; | 121 | int phy_id; |
122 | }; | 122 | }; |
123 | 123 | ||
124 | /* ETH data */ | 124 | /* ETH data */ |
125 | struct bcm6368_eth_priv { | 125 | struct bcm6368_eth_priv { |
126 | void __iomem *base; | 126 | void __iomem *base; |
127 | /* DMA */ | 127 | /* DMA */ |
128 | struct dma rx_dma; | 128 | struct dma rx_dma; |
129 | struct dma tx_dma; | 129 | struct dma tx_dma; |
130 | /* Ports */ | 130 | /* Ports */ |
131 | uint8_t num_ports; | 131 | uint8_t num_ports; |
132 | struct bcm_enetsw_port used_ports[ETH_MAX_PORT]; | 132 | struct bcm_enetsw_port used_ports[ETH_MAX_PORT]; |
133 | int sw_port_link[ETH_MAX_PORT]; | 133 | int sw_port_link[ETH_MAX_PORT]; |
134 | bool rgmii_override; | 134 | bool rgmii_override; |
135 | bool rgmii_timing; | 135 | bool rgmii_timing; |
136 | /* PHY */ | 136 | /* PHY */ |
137 | int phy_id; | 137 | int phy_id; |
138 | }; | 138 | }; |
139 | 139 | ||
140 | static inline bool bcm_enet_port_is_rgmii(int portid) | 140 | static inline bool bcm_enet_port_is_rgmii(int portid) |
141 | { | 141 | { |
142 | return portid >= ETH_RGMII_PORT0; | 142 | return portid >= ETH_RGMII_PORT0; |
143 | } | 143 | } |
144 | 144 | ||
145 | static int bcm6368_mdio_read(struct bcm6368_eth_priv *priv, uint8_t ext, | 145 | static int bcm6368_mdio_read(struct bcm6368_eth_priv *priv, uint8_t ext, |
146 | int phy_id, int reg) | 146 | int phy_id, int reg) |
147 | { | 147 | { |
148 | uint32_t val; | 148 | uint32_t val; |
149 | 149 | ||
150 | writel_be(0, priv->base + MII_SC_REG); | 150 | writel_be(0, priv->base + MII_SC_REG); |
151 | 151 | ||
152 | val = MII_SC_RD_MASK | | 152 | val = MII_SC_RD_MASK | |
153 | (phy_id << MII_SC_PHYID_SHIFT) | | 153 | (phy_id << MII_SC_PHYID_SHIFT) | |
154 | (reg << MII_SC_REG_SHIFT); | 154 | (reg << MII_SC_REG_SHIFT); |
155 | 155 | ||
156 | if (ext) | 156 | if (ext) |
157 | val |= MII_SC_EXT_MASK; | 157 | val |= MII_SC_EXT_MASK; |
158 | 158 | ||
159 | writel_be(val, priv->base + MII_SC_REG); | 159 | writel_be(val, priv->base + MII_SC_REG); |
160 | udelay(50); | 160 | udelay(50); |
161 | 161 | ||
162 | return readw_be(priv->base + MII_DAT_REG); | 162 | return readw_be(priv->base + MII_DAT_REG); |
163 | } | 163 | } |
164 | 164 | ||
165 | static int bcm6368_mdio_write(struct bcm6368_eth_priv *priv, uint8_t ext, | 165 | static int bcm6368_mdio_write(struct bcm6368_eth_priv *priv, uint8_t ext, |
166 | int phy_id, int reg, u16 data) | 166 | int phy_id, int reg, u16 data) |
167 | { | 167 | { |
168 | uint32_t val; | 168 | uint32_t val; |
169 | 169 | ||
170 | writel_be(0, priv->base + MII_SC_REG); | 170 | writel_be(0, priv->base + MII_SC_REG); |
171 | 171 | ||
172 | val = MII_SC_WR_MASK | | 172 | val = MII_SC_WR_MASK | |
173 | (phy_id << MII_SC_PHYID_SHIFT) | | 173 | (phy_id << MII_SC_PHYID_SHIFT) | |
174 | (reg << MII_SC_REG_SHIFT); | 174 | (reg << MII_SC_REG_SHIFT); |
175 | 175 | ||
176 | if (ext) | 176 | if (ext) |
177 | val |= MII_SC_EXT_MASK; | 177 | val |= MII_SC_EXT_MASK; |
178 | 178 | ||
179 | val |= data; | 179 | val |= data; |
180 | 180 | ||
181 | writel_be(val, priv->base + MII_SC_REG); | 181 | writel_be(val, priv->base + MII_SC_REG); |
182 | udelay(50); | 182 | udelay(50); |
183 | 183 | ||
184 | return 0; | 184 | return 0; |
185 | } | 185 | } |
186 | 186 | ||
187 | static int bcm6368_eth_free_pkt(struct udevice *dev, uchar *packet, int len) | 187 | static int bcm6368_eth_free_pkt(struct udevice *dev, uchar *packet, int len) |
188 | { | 188 | { |
189 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); | 189 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); |
190 | 190 | ||
191 | return dma_prepare_rcv_buf(&priv->rx_dma, packet, len); | 191 | return dma_prepare_rcv_buf(&priv->rx_dma, packet, len); |
192 | } | 192 | } |
193 | 193 | ||
194 | static int bcm6368_eth_recv(struct udevice *dev, int flags, uchar **packetp) | 194 | static int bcm6368_eth_recv(struct udevice *dev, int flags, uchar **packetp) |
195 | { | 195 | { |
196 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); | 196 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); |
197 | 197 | ||
198 | return dma_receive(&priv->rx_dma, (void**)packetp, NULL); | 198 | return dma_receive(&priv->rx_dma, (void**)packetp, NULL); |
199 | } | 199 | } |
200 | 200 | ||
201 | static int bcm6368_eth_send(struct udevice *dev, void *packet, int length) | 201 | static int bcm6368_eth_send(struct udevice *dev, void *packet, int length) |
202 | { | 202 | { |
203 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); | 203 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); |
204 | 204 | ||
205 | /* pad packets smaller than ETH_ZLEN */ | 205 | /* pad packets smaller than ETH_ZLEN */ |
206 | if (length < ETH_ZLEN) { | 206 | if (length < ETH_ZLEN) { |
207 | memset(packet + length, 0, ETH_ZLEN - length); | 207 | memset(packet + length, 0, ETH_ZLEN - length); |
208 | length = ETH_ZLEN; | 208 | length = ETH_ZLEN; |
209 | } | 209 | } |
210 | 210 | ||
211 | return dma_send(&priv->tx_dma, packet, length, NULL); | 211 | return dma_send(&priv->tx_dma, packet, length, NULL); |
212 | } | 212 | } |
213 | 213 | ||
214 | static int bcm6368_eth_adjust_link(struct udevice *dev) | 214 | static int bcm6368_eth_adjust_link(struct udevice *dev) |
215 | { | 215 | { |
216 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); | 216 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); |
217 | unsigned int i; | 217 | unsigned int i; |
218 | 218 | ||
219 | for (i = 0; i < priv->num_ports; i++) { | 219 | for (i = 0; i < priv->num_ports; i++) { |
220 | struct bcm_enetsw_port *port; | 220 | struct bcm_enetsw_port *port; |
221 | int val, j, up, adv, lpa, speed, duplex, media; | 221 | int val, j, up, adv, lpa, speed, duplex, media; |
222 | int external_phy = bcm_enet_port_is_rgmii(i); | 222 | int external_phy = bcm_enet_port_is_rgmii(i); |
223 | u8 override; | 223 | u8 override; |
224 | 224 | ||
225 | port = &priv->used_ports[i]; | 225 | port = &priv->used_ports[i]; |
226 | if (!port->used) | 226 | if (!port->used) |
227 | continue; | 227 | continue; |
228 | 228 | ||
229 | if (port->bypass_link) | 229 | if (port->bypass_link) |
230 | continue; | 230 | continue; |
231 | 231 | ||
232 | /* dummy read to clear */ | 232 | /* dummy read to clear */ |
233 | for (j = 0; j < 2; j++) | 233 | for (j = 0; j < 2; j++) |
234 | val = bcm6368_mdio_read(priv, external_phy, | 234 | val = bcm6368_mdio_read(priv, external_phy, |
235 | port->phy_id, MII_BMSR); | 235 | port->phy_id, MII_BMSR); |
236 | 236 | ||
237 | if (val == 0xffff) | 237 | if (val == 0xffff) |
238 | continue; | 238 | continue; |
239 | 239 | ||
240 | up = (val & BMSR_LSTATUS) ? 1 : 0; | 240 | up = (val & BMSR_LSTATUS) ? 1 : 0; |
241 | if (!(up ^ priv->sw_port_link[i])) | 241 | if (!(up ^ priv->sw_port_link[i])) |
242 | continue; | 242 | continue; |
243 | 243 | ||
244 | priv->sw_port_link[i] = up; | 244 | priv->sw_port_link[i] = up; |
245 | 245 | ||
246 | /* link changed */ | 246 | /* link changed */ |
247 | if (!up) { | 247 | if (!up) { |
248 | dev_info(&priv->pdev->dev, "link DOWN on %s\n", | 248 | dev_info(&priv->pdev->dev, "link DOWN on %s\n", |
249 | port->name); | 249 | port->name); |
250 | writeb_be(ETH_PORTOV_ENABLE_MASK, | 250 | writeb_be(ETH_PORTOV_ENABLE_MASK, |
251 | priv->base + ETH_PORTOV_REG(i)); | 251 | priv->base + ETH_PORTOV_REG(i)); |
252 | writeb_be(ETH_PTCTRL_RXDIS_MASK | | 252 | writeb_be(ETH_PTCTRL_RXDIS_MASK | |
253 | ETH_PTCTRL_TXDIS_MASK, | 253 | ETH_PTCTRL_TXDIS_MASK, |
254 | priv->base + ETH_PTCTRL_REG(i)); | 254 | priv->base + ETH_PTCTRL_REG(i)); |
255 | continue; | 255 | continue; |
256 | } | 256 | } |
257 | 257 | ||
258 | adv = bcm6368_mdio_read(priv, external_phy, | 258 | adv = bcm6368_mdio_read(priv, external_phy, |
259 | port->phy_id, MII_ADVERTISE); | 259 | port->phy_id, MII_ADVERTISE); |
260 | 260 | ||
261 | lpa = bcm6368_mdio_read(priv, external_phy, port->phy_id, | 261 | lpa = bcm6368_mdio_read(priv, external_phy, port->phy_id, |
262 | MII_LPA); | 262 | MII_LPA); |
263 | 263 | ||
264 | /* figure out media and duplex from advertise and LPA values */ | 264 | /* figure out media and duplex from advertise and LPA values */ |
265 | media = mii_nway_result(lpa & adv); | 265 | media = mii_nway_result(lpa & adv); |
266 | duplex = (media & ADVERTISE_FULL) ? 1 : 0; | 266 | duplex = (media & ADVERTISE_FULL) ? 1 : 0; |
267 | 267 | ||
268 | if (media & (ADVERTISE_100FULL | ADVERTISE_100HALF)) | 268 | if (media & (ADVERTISE_100FULL | ADVERTISE_100HALF)) |
269 | speed = 100; | 269 | speed = 100; |
270 | else | 270 | else |
271 | speed = 10; | 271 | speed = 10; |
272 | 272 | ||
273 | if (val & BMSR_ESTATEN) { | 273 | if (val & BMSR_ESTATEN) { |
274 | adv = bcm6368_mdio_read(priv, external_phy, | 274 | adv = bcm6368_mdio_read(priv, external_phy, |
275 | port->phy_id, MII_CTRL1000); | 275 | port->phy_id, MII_CTRL1000); |
276 | 276 | ||
277 | lpa = bcm6368_mdio_read(priv, external_phy, | 277 | lpa = bcm6368_mdio_read(priv, external_phy, |
278 | port->phy_id, MII_STAT1000); | 278 | port->phy_id, MII_STAT1000); |
279 | 279 | ||
280 | if ((adv & (ADVERTISE_1000FULL | ADVERTISE_1000HALF)) && | 280 | if ((adv & (ADVERTISE_1000FULL | ADVERTISE_1000HALF)) && |
281 | (lpa & (LPA_1000FULL | LPA_1000HALF))) { | 281 | (lpa & (LPA_1000FULL | LPA_1000HALF))) { |
282 | speed = 1000; | 282 | speed = 1000; |
283 | duplex = (lpa & LPA_1000FULL); | 283 | duplex = (lpa & LPA_1000FULL); |
284 | } | 284 | } |
285 | } | 285 | } |
286 | 286 | ||
287 | pr_alert("link UP on %s, %dMbps, %s-duplex\n", | 287 | pr_alert("link UP on %s, %dMbps, %s-duplex\n", |
288 | port->name, speed, duplex ? "full" : "half"); | 288 | port->name, speed, duplex ? "full" : "half"); |
289 | 289 | ||
290 | override = ETH_PORTOV_ENABLE_MASK | | 290 | override = ETH_PORTOV_ENABLE_MASK | |
291 | ETH_PORTOV_LINKUP_MASK; | 291 | ETH_PORTOV_LINKUP_MASK; |
292 | 292 | ||
293 | if (speed == 1000) | 293 | if (speed == 1000) |
294 | override |= ETH_PORTOV_1000_MASK; | 294 | override |= ETH_PORTOV_1000_MASK; |
295 | else if (speed == 100) | 295 | else if (speed == 100) |
296 | override |= ETH_PORTOV_100_MASK; | 296 | override |= ETH_PORTOV_100_MASK; |
297 | if (duplex) | 297 | if (duplex) |
298 | override |= ETH_PORTOV_FDX_MASK; | 298 | override |= ETH_PORTOV_FDX_MASK; |
299 | 299 | ||
300 | writeb_be(override, priv->base + ETH_PORTOV_REG(i)); | 300 | writeb_be(override, priv->base + ETH_PORTOV_REG(i)); |
301 | writeb_be(0, priv->base + ETH_PTCTRL_REG(i)); | 301 | writeb_be(0, priv->base + ETH_PTCTRL_REG(i)); |
302 | } | 302 | } |
303 | 303 | ||
304 | return 0; | 304 | return 0; |
305 | } | 305 | } |
306 | 306 | ||
307 | static int bcm6368_eth_start(struct udevice *dev) | 307 | static int bcm6368_eth_start(struct udevice *dev) |
308 | { | 308 | { |
309 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); | 309 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); |
310 | uint8_t i; | 310 | uint8_t i; |
311 | 311 | ||
312 | /* disable all ports */ | ||
313 | for (i = 0; i < priv->num_ports; i++) { | ||
314 | setbits_8(priv->base + ETH_PORTOV_REG(i), | ||
315 | ETH_PORTOV_ENABLE_MASK); | ||
316 | setbits_8(priv->base + ETH_PTCTRL_REG(i), | ||
317 | ETH_PTCTRL_RXDIS_MASK | ETH_PTCTRL_TXDIS_MASK); | ||
318 | priv->sw_port_link[i] = 0; | ||
319 | } | ||
320 | |||
321 | /* enable external ports */ | ||
322 | for (i = ETH_RGMII_PORT0; i < priv->num_ports; i++) { | ||
323 | u8 rgmii_ctrl = ETH_RGMII_CTRL_GMII_CLK_EN; | ||
324 | |||
325 | if (!priv->used_ports[i].used) | ||
326 | continue; | ||
327 | |||
328 | if (priv->rgmii_override) | ||
329 | rgmii_ctrl |= ETH_RGMII_CTRL_MII_OVERRIDE_EN; | ||
330 | if (priv->rgmii_timing) | ||
331 | rgmii_ctrl |= ETH_RGMII_CTRL_TIMING_SEL_EN; | ||
332 | |||
333 | setbits_8(priv->base + ETH_RGMII_CTRL_REG(i), rgmii_ctrl); | ||
334 | } | ||
335 | |||
336 | /* reset mib */ | ||
337 | setbits_8(priv->base + ETH_GMCR_REG, ETH_GMCR_RST_MIB_MASK); | ||
338 | mdelay(1); | ||
339 | clrbits_8(priv->base + ETH_GMCR_REG, ETH_GMCR_RST_MIB_MASK); | ||
340 | mdelay(1); | ||
341 | |||
342 | /* force CPU port state */ | ||
343 | setbits_8(priv->base + ETH_IMPOV_REG, | ||
344 | ETH_IMPOV_FORCE_MASK | ETH_IMPOV_LINKUP_MASK); | ||
345 | |||
346 | /* enable switch forward engine */ | ||
347 | setbits_8(priv->base + ETH_SWMODE_REG, ETH_SWMODE_FWD_EN_MASK); | ||
348 | |||
312 | /* prepare rx dma buffers */ | 349 | /* prepare rx dma buffers */ |
313 | for (i = 0; i < ETH_RX_DESC; i++) { | 350 | for (i = 0; i < ETH_RX_DESC; i++) { |
314 | int ret = dma_prepare_rcv_buf(&priv->rx_dma, net_rx_packets[i], | 351 | int ret = dma_prepare_rcv_buf(&priv->rx_dma, net_rx_packets[i], |
315 | PKTSIZE_ALIGN); | 352 | PKTSIZE_ALIGN); |
316 | if (ret < 0) | 353 | if (ret < 0) |
317 | break; | 354 | break; |
318 | } | 355 | } |
319 | 356 | ||
320 | /* enable dma rx channel */ | 357 | /* enable dma rx channel */ |
321 | dma_enable(&priv->rx_dma); | 358 | dma_enable(&priv->rx_dma); |
322 | 359 | ||
323 | /* enable dma tx channel */ | 360 | /* enable dma tx channel */ |
324 | dma_enable(&priv->tx_dma); | 361 | dma_enable(&priv->tx_dma); |
325 | 362 | ||
326 | /* apply override config for bypass_link ports here. */ | 363 | /* apply override config for bypass_link ports here. */ |
327 | for (i = 0; i < priv->num_ports; i++) { | 364 | for (i = 0; i < priv->num_ports; i++) { |
328 | struct bcm_enetsw_port *port; | 365 | struct bcm_enetsw_port *port; |
329 | u8 override; | 366 | u8 override; |
330 | 367 | ||
331 | port = &priv->used_ports[i]; | 368 | port = &priv->used_ports[i]; |
332 | if (!port->used) | 369 | if (!port->used) |
333 | continue; | 370 | continue; |
334 | 371 | ||
335 | if (!port->bypass_link) | 372 | if (!port->bypass_link) |
336 | continue; | 373 | continue; |
337 | 374 | ||
338 | override = ETH_PORTOV_ENABLE_MASK | | 375 | override = ETH_PORTOV_ENABLE_MASK | |
339 | ETH_PORTOV_LINKUP_MASK; | 376 | ETH_PORTOV_LINKUP_MASK; |
340 | 377 | ||
341 | switch (port->force_speed) { | 378 | switch (port->force_speed) { |
342 | case 1000: | 379 | case 1000: |
343 | override |= ETH_PORTOV_1000_MASK; | 380 | override |= ETH_PORTOV_1000_MASK; |
344 | break; | 381 | break; |
345 | case 100: | 382 | case 100: |
346 | override |= ETH_PORTOV_100_MASK; | 383 | override |= ETH_PORTOV_100_MASK; |
347 | break; | 384 | break; |
348 | case 10: | 385 | case 10: |
349 | break; | 386 | break; |
350 | default: | 387 | default: |
351 | pr_warn("%s: invalid forced speed on port %s\n", | 388 | pr_warn("%s: invalid forced speed on port %s\n", |
352 | __func__, port->name); | 389 | __func__, port->name); |
353 | break; | 390 | break; |
354 | } | 391 | } |
355 | 392 | ||
356 | if (port->force_duplex_full) | 393 | if (port->force_duplex_full) |
357 | override |= ETH_PORTOV_FDX_MASK; | 394 | override |= ETH_PORTOV_FDX_MASK; |
358 | 395 | ||
359 | writeb_be(override, priv->base + ETH_PORTOV_REG(i)); | 396 | writeb_be(override, priv->base + ETH_PORTOV_REG(i)); |
360 | writeb_be(0, priv->base + ETH_PTCTRL_REG(i)); | 397 | writeb_be(0, priv->base + ETH_PTCTRL_REG(i)); |
361 | } | 398 | } |
362 | 399 | ||
363 | bcm6368_eth_adjust_link(dev); | 400 | bcm6368_eth_adjust_link(dev); |
364 | 401 | ||
365 | return 0; | 402 | return 0; |
366 | } | 403 | } |
367 | 404 | ||
368 | static void bcm6368_eth_stop(struct udevice *dev) | 405 | static void bcm6368_eth_stop(struct udevice *dev) |
369 | { | 406 | { |
370 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); | 407 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); |
408 | uint8_t i; | ||
371 | 409 | ||
410 | /* disable all ports */ | ||
411 | for (i = 0; i < priv->num_ports; i++) { | ||
412 | setbits_8(priv->base + ETH_PORTOV_REG(i), | ||
413 | ETH_PORTOV_ENABLE_MASK); | ||
414 | setbits_8(priv->base + ETH_PTCTRL_REG(i), | ||
415 | ETH_PTCTRL_RXDIS_MASK | ETH_PTCTRL_TXDIS_MASK); | ||
416 | } | ||
417 | |||
418 | /* disable external ports */ | ||
419 | for (i = ETH_RGMII_PORT0; i < priv->num_ports; i++) { | ||
420 | if (!priv->used_ports[i].used) | ||
421 | continue; | ||
422 | |||
423 | clrbits_8(priv->base + ETH_RGMII_CTRL_REG(i), | ||
424 | ETH_RGMII_CTRL_GMII_CLK_EN); | ||
425 | } | ||
426 | |||
427 | /* disable CPU port */ | ||
428 | clrbits_8(priv->base + ETH_IMPOV_REG, | ||
429 | ETH_IMPOV_FORCE_MASK | ETH_IMPOV_LINKUP_MASK); | ||
430 | |||
431 | /* disable switch forward engine */ | ||
432 | clrbits_8(priv->base + ETH_SWMODE_REG, ETH_SWMODE_FWD_EN_MASK); | ||
433 | |||
372 | /* disable dma rx channel */ | 434 | /* disable dma rx channel */ |
373 | dma_disable(&priv->rx_dma); | 435 | dma_disable(&priv->rx_dma); |
374 | 436 | ||
375 | /* disable dma tx channel */ | 437 | /* disable dma tx channel */ |
376 | dma_disable(&priv->tx_dma); | 438 | dma_disable(&priv->tx_dma); |
377 | } | 439 | } |
378 | 440 | ||
379 | static const struct eth_ops bcm6368_eth_ops = { | 441 | static const struct eth_ops bcm6368_eth_ops = { |
380 | .free_pkt = bcm6368_eth_free_pkt, | 442 | .free_pkt = bcm6368_eth_free_pkt, |
381 | .recv = bcm6368_eth_recv, | 443 | .recv = bcm6368_eth_recv, |
382 | .send = bcm6368_eth_send, | 444 | .send = bcm6368_eth_send, |
383 | .start = bcm6368_eth_start, | 445 | .start = bcm6368_eth_start, |
384 | .stop = bcm6368_eth_stop, | 446 | .stop = bcm6368_eth_stop, |
385 | }; | 447 | }; |
386 | 448 | ||
387 | static const struct udevice_id bcm6368_eth_ids[] = { | 449 | static const struct udevice_id bcm6368_eth_ids[] = { |
388 | { .compatible = "brcm,bcm6368-enet", }, | 450 | { .compatible = "brcm,bcm6368-enet", }, |
389 | { /* sentinel */ } | 451 | { /* sentinel */ } |
390 | }; | 452 | }; |
391 | 453 | ||
392 | static bool bcm6368_phy_is_external(struct bcm6368_eth_priv *priv, int phy_id) | 454 | static bool bcm6368_phy_is_external(struct bcm6368_eth_priv *priv, int phy_id) |
393 | { | 455 | { |
394 | uint8_t i; | 456 | uint8_t i; |
395 | 457 | ||
396 | for (i = 0; i < priv->num_ports; ++i) { | 458 | for (i = 0; i < priv->num_ports; ++i) { |
397 | if (!priv->used_ports[i].used) | 459 | if (!priv->used_ports[i].used) |
398 | continue; | 460 | continue; |
399 | if (priv->used_ports[i].phy_id == phy_id) | 461 | if (priv->used_ports[i].phy_id == phy_id) |
400 | return bcm_enet_port_is_rgmii(i); | 462 | return bcm_enet_port_is_rgmii(i); |
401 | } | 463 | } |
402 | 464 | ||
403 | return true; | 465 | return true; |
404 | } | 466 | } |
405 | 467 | ||
406 | static int bcm6368_mii_mdio_read(struct mii_dev *bus, int addr, int devaddr, | 468 | static int bcm6368_mii_mdio_read(struct mii_dev *bus, int addr, int devaddr, |
407 | int reg) | 469 | int reg) |
408 | { | 470 | { |
409 | struct bcm6368_eth_priv *priv = bus->priv; | 471 | struct bcm6368_eth_priv *priv = bus->priv; |
410 | bool ext = bcm6368_phy_is_external(priv, addr); | 472 | bool ext = bcm6368_phy_is_external(priv, addr); |
411 | 473 | ||
412 | return bcm6368_mdio_read(priv, ext, addr, reg); | 474 | return bcm6368_mdio_read(priv, ext, addr, reg); |
413 | } | 475 | } |
414 | 476 | ||
415 | static int bcm6368_mii_mdio_write(struct mii_dev *bus, int addr, int devaddr, | 477 | static int bcm6368_mii_mdio_write(struct mii_dev *bus, int addr, int devaddr, |
416 | int reg, u16 data) | 478 | int reg, u16 data) |
417 | { | 479 | { |
418 | struct bcm6368_eth_priv *priv = bus->priv; | 480 | struct bcm6368_eth_priv *priv = bus->priv; |
419 | bool ext = bcm6368_phy_is_external(priv, addr); | 481 | bool ext = bcm6368_phy_is_external(priv, addr); |
420 | 482 | ||
421 | return bcm6368_mdio_write(priv, ext, addr, reg, data); | 483 | return bcm6368_mdio_write(priv, ext, addr, reg, data); |
422 | } | 484 | } |
423 | 485 | ||
424 | static int bcm6368_mdio_init(const char *name, struct bcm6368_eth_priv *priv) | 486 | static int bcm6368_mdio_init(const char *name, struct bcm6368_eth_priv *priv) |
425 | { | 487 | { |
426 | struct mii_dev *bus; | 488 | struct mii_dev *bus; |
427 | 489 | ||
428 | bus = mdio_alloc(); | 490 | bus = mdio_alloc(); |
429 | if (!bus) { | 491 | if (!bus) { |
430 | pr_err("%s: failed to allocate MDIO bus\n", __func__); | 492 | pr_err("%s: failed to allocate MDIO bus\n", __func__); |
431 | return -ENOMEM; | 493 | return -ENOMEM; |
432 | } | 494 | } |
433 | 495 | ||
434 | bus->read = bcm6368_mii_mdio_read; | 496 | bus->read = bcm6368_mii_mdio_read; |
435 | bus->write = bcm6368_mii_mdio_write; | 497 | bus->write = bcm6368_mii_mdio_write; |
436 | bus->priv = priv; | 498 | bus->priv = priv; |
437 | snprintf(bus->name, sizeof(bus->name), "%s", name); | 499 | snprintf(bus->name, sizeof(bus->name), "%s", name); |
438 | 500 | ||
439 | return mdio_register(bus); | 501 | return mdio_register(bus); |
440 | } | 502 | } |
441 | 503 | ||
442 | static int bcm6368_eth_probe(struct udevice *dev) | 504 | static int bcm6368_eth_probe(struct udevice *dev) |
443 | { | 505 | { |
444 | struct eth_pdata *pdata = dev_get_platdata(dev); | 506 | struct eth_pdata *pdata = dev_get_platdata(dev); |
445 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); | 507 | struct bcm6368_eth_priv *priv = dev_get_priv(dev); |
446 | int num_ports, ret, i; | 508 | int num_ports, ret, i; |
447 | uint32_t val; | ||
448 | ofnode node; | 509 | ofnode node; |
449 | 510 | ||
450 | /* get base address */ | 511 | /* get base address */ |
451 | priv->base = dev_remap_addr(dev); | 512 | priv->base = dev_remap_addr(dev); |
452 | if (!priv->base) | 513 | if (!priv->base) |
453 | return -EINVAL; | 514 | return -EINVAL; |
454 | pdata->iobase = (phys_addr_t) priv->base; | 515 | pdata->iobase = (phys_addr_t) priv->base; |
455 | 516 | ||
456 | /* get number of ports */ | 517 | /* get number of ports */ |
457 | num_ports = dev_read_u32_default(dev, "brcm,num-ports", ETH_MAX_PORT); | 518 | num_ports = dev_read_u32_default(dev, "brcm,num-ports", ETH_MAX_PORT); |
458 | if (!num_ports || num_ports > ETH_MAX_PORT) | 519 | if (!num_ports || num_ports > ETH_MAX_PORT) |
459 | return -EINVAL; | 520 | return -EINVAL; |
460 | 521 | ||
461 | /* get dma channels */ | 522 | /* get dma channels */ |
462 | ret = dma_get_by_name(dev, "tx", &priv->tx_dma); | 523 | ret = dma_get_by_name(dev, "tx", &priv->tx_dma); |
463 | if (ret) | 524 | if (ret) |
464 | return -EINVAL; | 525 | return -EINVAL; |
465 | 526 | ||
466 | ret = dma_get_by_name(dev, "rx", &priv->rx_dma); | 527 | ret = dma_get_by_name(dev, "rx", &priv->rx_dma); |
467 | if (ret) | 528 | if (ret) |
468 | return -EINVAL; | 529 | return -EINVAL; |
469 | 530 | ||
470 | /* try to enable clocks */ | 531 | /* try to enable clocks */ |
471 | for (i = 0; ; i++) { | 532 | for (i = 0; ; i++) { |
472 | struct clk clk; | 533 | struct clk clk; |
473 | int ret; | 534 | int ret; |
474 | 535 | ||
475 | ret = clk_get_by_index(dev, i, &clk); | 536 | ret = clk_get_by_index(dev, i, &clk); |
476 | if (ret < 0) | 537 | if (ret < 0) |
477 | break; | 538 | break; |
478 | 539 | ||
479 | ret = clk_enable(&clk); | 540 | ret = clk_enable(&clk); |
480 | if (ret < 0) { | 541 | if (ret < 0) { |
481 | pr_err("%s: error enabling clock %d\n", __func__, i); | 542 | pr_err("%s: error enabling clock %d\n", __func__, i); |
482 | return ret; | 543 | return ret; |
483 | } | 544 | } |
484 | 545 | ||
485 | ret = clk_free(&clk); | 546 | ret = clk_free(&clk); |
486 | if (ret < 0) { | 547 | if (ret < 0) { |
487 | pr_err("%s: error freeing clock %d\n", __func__, i); | 548 | pr_err("%s: error freeing clock %d\n", __func__, i); |
488 | return ret; | 549 | return ret; |
489 | } | 550 | } |
490 | } | 551 | } |
491 | 552 | ||
492 | /* try to perform resets */ | 553 | /* try to perform resets */ |
493 | for (i = 0; ; i++) { | 554 | for (i = 0; ; i++) { |
494 | struct reset_ctl reset; | 555 | struct reset_ctl reset; |
495 | int ret; | 556 | int ret; |
496 | 557 | ||
497 | ret = reset_get_by_index(dev, i, &reset); | 558 | ret = reset_get_by_index(dev, i, &reset); |
498 | if (ret < 0) | 559 | if (ret < 0) |
499 | break; | 560 | break; |
500 | 561 | ||
501 | ret = reset_deassert(&reset); | 562 | ret = reset_deassert(&reset); |
502 | if (ret < 0) { | 563 | if (ret < 0) { |
503 | pr_err("%s: error deasserting reset %d\n", __func__, i); | 564 | pr_err("%s: error deasserting reset %d\n", __func__, i); |
504 | return ret; | 565 | return ret; |
505 | } | 566 | } |
506 | 567 | ||
507 | ret = reset_free(&reset); | 568 | ret = reset_free(&reset); |
508 | if (ret < 0) { | 569 | if (ret < 0) { |
509 | pr_err("%s: error freeing reset %d\n", __func__, i); | 570 | pr_err("%s: error freeing reset %d\n", __func__, i); |
510 | return ret; | 571 | return ret; |
511 | } | 572 | } |
512 | } | 573 | } |
513 | 574 | ||
514 | /* set priv data */ | 575 | /* set priv data */ |
515 | priv->num_ports = num_ports; | 576 | priv->num_ports = num_ports; |
516 | if (dev_read_bool(dev, "brcm,rgmii-override")) | 577 | if (dev_read_bool(dev, "brcm,rgmii-override")) |
517 | priv->rgmii_override = true; | 578 | priv->rgmii_override = true; |
518 | if (dev_read_bool(dev, "brcm,rgmii-timing")) | 579 | if (dev_read_bool(dev, "brcm,rgmii-timing")) |
519 | priv->rgmii_timing = true; | 580 | priv->rgmii_timing = true; |
520 | 581 | ||
521 | /* get ports */ | 582 | /* get ports */ |
522 | dev_for_each_subnode(node, dev) { | 583 | dev_for_each_subnode(node, dev) { |
523 | const char *comp; | 584 | const char *comp; |
524 | const char *label; | 585 | const char *label; |
525 | unsigned int p; | 586 | unsigned int p; |
526 | int phy_id; | 587 | int phy_id; |
527 | int speed; | 588 | int speed; |
528 | 589 | ||
529 | comp = ofnode_read_string(node, "compatible"); | 590 | comp = ofnode_read_string(node, "compatible"); |
530 | if (!comp || memcmp(comp, ETH_PORT_STR, sizeof(ETH_PORT_STR))) | 591 | if (!comp || memcmp(comp, ETH_PORT_STR, sizeof(ETH_PORT_STR))) |
531 | continue; | 592 | continue; |
532 | 593 | ||
533 | p = ofnode_read_u32_default(node, "reg", ETH_MAX_PORT); | 594 | p = ofnode_read_u32_default(node, "reg", ETH_MAX_PORT); |
534 | if (p >= num_ports) | 595 | if (p >= num_ports) |
535 | return -EINVAL; | 596 | return -EINVAL; |
536 | 597 | ||
537 | label = ofnode_read_string(node, "label"); | 598 | label = ofnode_read_string(node, "label"); |
538 | if (!label) { | 599 | if (!label) { |
539 | debug("%s: node %s has no label\n", __func__, | 600 | debug("%s: node %s has no label\n", __func__, |
540 | ofnode_get_name(node)); | 601 | ofnode_get_name(node)); |
541 | return -EINVAL; | 602 | return -EINVAL; |
542 | } | 603 | } |
543 | 604 | ||
544 | phy_id = ofnode_read_u32_default(node, "brcm,phy-id", -1); | 605 | phy_id = ofnode_read_u32_default(node, "brcm,phy-id", -1); |
545 | 606 | ||
546 | priv->used_ports[p].used = true; | 607 | priv->used_ports[p].used = true; |
547 | priv->used_ports[p].name = label; | 608 | priv->used_ports[p].name = label; |
548 | priv->used_ports[p].phy_id = phy_id; | 609 | priv->used_ports[p].phy_id = phy_id; |
549 | 610 | ||
550 | if (ofnode_read_bool(node, "full-duplex")) | 611 | if (ofnode_read_bool(node, "full-duplex")) |
551 | priv->used_ports[p].force_duplex_full = true; | 612 | priv->used_ports[p].force_duplex_full = true; |
552 | if (ofnode_read_bool(node, "bypass-link")) | 613 | if (ofnode_read_bool(node, "bypass-link")) |
553 | priv->used_ports[p].bypass_link = true; | 614 | priv->used_ports[p].bypass_link = true; |
554 | speed = ofnode_read_u32_default(node, "speed", 0); | 615 | speed = ofnode_read_u32_default(node, "speed", 0); |
555 | if (speed) | 616 | if (speed) |
556 | priv->used_ports[p].force_speed = speed; | 617 | priv->used_ports[p].force_speed = speed; |
557 | } | 618 | } |
558 | 619 | ||
559 | /* init mii bus */ | 620 | /* init mii bus */ |
560 | ret = bcm6368_mdio_init(dev->name, priv); | 621 | ret = bcm6368_mdio_init(dev->name, priv); |
561 | if (ret) | 622 | if (ret) |
562 | return ret; | 623 | return ret; |
563 | |||
564 | /* disable all ports */ | ||
565 | for (i = 0; i < priv->num_ports; i++) { | ||
566 | writeb_be(ETH_PORTOV_ENABLE_MASK, | ||
567 | priv->base + ETH_PORTOV_REG(i)); | ||
568 | writeb_be(ETH_PTCTRL_RXDIS_MASK | | ||
569 | ETH_PTCTRL_TXDIS_MASK, | ||
570 | priv->base + ETH_PTCTRL_REG(i)); | ||
571 | |||
572 | priv->sw_port_link[i] = 0; | ||
573 | } | ||
574 | |||
575 | /* enable external ports */ | ||
576 | for (i = ETH_RGMII_PORT0; i < priv->num_ports; i++) { | ||
577 | u8 rgmii_ctrl; | ||
578 | |||
579 | if (!priv->used_ports[i].used) |
drivers/pinctrl/mscc/Kconfig
1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | 2 | ||
3 | config PINCTRL_MSCC | 3 | config PINCTRL_MSCC |
4 | bool | 4 | bool |
5 | 5 | ||
6 | config PINCTRL_MSCC_OCELOT | 6 | config PINCTRL_MSCC_OCELOT |
7 | depends on SOC_OCELOT && PINCTRL_FULL && OF_CONTROL | 7 | depends on SOC_OCELOT && PINCTRL_FULL && OF_CONTROL |
8 | select PINCTRL_MSCC | 8 | select PINCTRL_MSCC |
9 | default y | 9 | default y |
10 | bool "Microsemi ocelot family pin control driver" | 10 | bool "Microsemi ocelot family pin control driver" |
11 | help | 11 | help |
12 | Support pin multiplexing and pin configuration control on | 12 | Support pin multiplexing and pin configuration control on |
13 | Microsemi ocelot SoCs. | 13 | Microsemi ocelot SoCs. |
14 | 14 | ||
15 | config PINCTRL_MSCC_LUTON | 15 | config PINCTRL_MSCC_LUTON |
16 | depends on SOC_LUTON && PINCTRL_FULL && OF_CONTROL | 16 | depends on SOC_LUTON && PINCTRL_FULL && OF_CONTROL |
17 | select PINCTRL_MSCC | 17 | select PINCTRL_MSCC |
18 | default y | 18 | default y |
19 | bool "Microsemi luton family pin control driver" | 19 | bool "Microsemi luton family pin control driver" |
20 | help | 20 | help |
21 | Support pin multiplexing and pin configuration control on | 21 | Support pin multiplexing and pin configuration control on |
22 | Microsemi luton SoCs. | 22 | Microsemi luton SoCs. |
23 | |||
24 | config PINCTRL_MSCC_JR2 | ||
25 | depends on SOC_JR2 && PINCTRL_FULL && OF_CONTROL | ||
26 | select PINCTRL_MSCC | ||
27 | default y | ||
28 | bool "Microsemi jr2 family pin control driver" | ||
29 | help | ||
30 | Support pin multiplexing and pin configuration control on | ||
31 | Microsemi jr2 SoCs. | ||
23 | 32 |
drivers/pinctrl/mscc/Makefile
1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) | 1 | # SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | 2 | ||
3 | obj-y += mscc-common.o | 3 | obj-y += mscc-common.o |
4 | obj-$(CONFIG_PINCTRL_MSCC_OCELOT) += pinctrl-ocelot.o | 4 | obj-$(CONFIG_PINCTRL_MSCC_OCELOT) += pinctrl-ocelot.o |
5 | obj-$(CONFIG_PINCTRL_MSCC_LUTON) += pinctrl-luton.o | 5 | obj-$(CONFIG_PINCTRL_MSCC_LUTON) += pinctrl-luton.o |
6 | obj-$(CONFIG_PINCTRL_MSCC_JR2) += pinctrl-jr2.o | ||
6 | 7 |
drivers/pinctrl/mscc/mscc-common.c
1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) |
2 | /* | 2 | /* |
3 | * Microsemi SoCs pinctrl driver | 3 | * Microsemi SoCs pinctrl driver |
4 | * | 4 | * |
5 | * Author: <alexandre.belloni@free-electrons.com> | 5 | * Author: <alexandre.belloni@free-electrons.com> |
6 | * Author: <gregory.clement@bootlin.com> | 6 | * Author: <gregory.clement@bootlin.com> |
7 | * License: Dual MIT/GPL | 7 | * License: Dual MIT/GPL |
8 | * Copyright (c) 2017 Microsemi Corporation | 8 | * Copyright (c) 2017 Microsemi Corporation |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/gpio.h> | 11 | #include <asm/gpio.h> |
12 | #include <asm/system.h> | 12 | #include <asm/system.h> |
13 | #include <common.h> | 13 | #include <common.h> |
14 | #include <config.h> | 14 | #include <config.h> |
15 | #include <dm.h> | 15 | #include <dm.h> |
16 | #include <dm/device-internal.h> | 16 | #include <dm/device-internal.h> |
17 | #include <dm/lists.h> | 17 | #include <dm/lists.h> |
18 | #include <dm/pinctrl.h> | 18 | #include <dm/pinctrl.h> |
19 | #include <dm/root.h> | 19 | #include <dm/root.h> |
20 | #include <errno.h> | 20 | #include <errno.h> |
21 | #include <fdtdec.h> | 21 | #include <fdtdec.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include "mscc-common.h" | 23 | #include "mscc-common.h" |
24 | 24 | ||
25 | #define MSCC_GPIO_OUT_SET 0x0 | 25 | static void mscc_writel(unsigned int offset, void *addr) |
26 | #define MSCC_GPIO_OUT_CLR 0x4 | 26 | { |
27 | #define MSCC_GPIO_OUT 0x8 | 27 | if (offset < 32) |
28 | #define MSCC_GPIO_IN 0xc | 28 | writel(BIT(offset), addr); |
29 | #define MSCC_GPIO_OE 0x10 | 29 | else |
30 | #define MSCC_GPIO_INTR 0x14 | 30 | writel(BIT(offset % 32), addr + 4); |
31 | #define MSCC_GPIO_INTR_ENA 0x18 | 31 | } |
32 | #define MSCC_GPIO_INTR_IDENT 0x1c | ||
33 | #define MSCC_GPIO_ALT0 0x20 | ||
34 | #define MSCC_GPIO_ALT1 0x24 | ||
35 | 32 | ||
33 | static unsigned int mscc_readl(unsigned int offset, void *addr) | ||
34 | { | ||
35 | if (offset < 32) | ||
36 | return readl(addr); | ||
37 | else | ||
38 | return readl(addr + 4); | ||
39 | } | ||
40 | |||
41 | static void mscc_setbits(unsigned int offset, void *addr) | ||
42 | { | ||
43 | if (offset < 32) | ||
44 | writel(readl(addr) | BIT(offset), addr); | ||
45 | else | ||
46 | writel(readl(addr + 4) | BIT(offset % 32), addr + 4); | ||
47 | } | ||
48 | |||
49 | static void mscc_clrbits(unsigned int offset, void *addr) | ||
50 | { | ||
51 | if (offset < 32) | ||
52 | writel(readl(addr) & ~BIT(offset), addr); | ||
53 | else | ||
54 | writel(readl(addr + 4) & ~BIT(offset % 32), addr + 4); | ||
55 | } | ||
56 | |||
36 | static int mscc_get_functions_count(struct udevice *dev) | 57 | static int mscc_get_functions_count(struct udevice *dev) |
37 | { | 58 | { |
38 | struct mscc_pinctrl *info = dev_get_priv(dev); | 59 | struct mscc_pinctrl *info = dev_get_priv(dev); |
39 | 60 | ||
40 | return info->num_func; | 61 | return info->num_func; |
41 | } | 62 | } |
42 | 63 | ||
43 | static const char *mscc_get_function_name(struct udevice *dev, | 64 | static const char *mscc_get_function_name(struct udevice *dev, |
44 | unsigned int function) | 65 | unsigned int function) |
45 | { | 66 | { |
46 | struct mscc_pinctrl *info = dev_get_priv(dev); | 67 | struct mscc_pinctrl *info = dev_get_priv(dev); |
47 | 68 | ||
48 | return info->function_names[function]; | 69 | return info->function_names[function]; |
49 | } | 70 | } |
50 | 71 | ||
51 | static int mscc_pin_function_idx(unsigned int pin, unsigned int function, | 72 | static int mscc_pin_function_idx(unsigned int pin, unsigned int function, |
52 | const struct mscc_pin_data *mscc_pins) | 73 | const struct mscc_pin_data *mscc_pins) |
53 | { | 74 | { |
54 | struct mscc_pin_caps *p = mscc_pins[pin].drv_data; | 75 | struct mscc_pin_caps *p = mscc_pins[pin].drv_data; |
55 | int i; | 76 | int i; |
56 | 77 | ||
57 | for (i = 0; i < MSCC_FUNC_PER_PIN; i++) { | 78 | for (i = 0; i < MSCC_FUNC_PER_PIN; i++) { |
58 | if (function == p->functions[i]) | 79 | if (function == p->functions[i]) |
59 | return i; | 80 | return i; |
60 | } | 81 | } |
61 | 82 | ||
62 | return -1; | 83 | return -1; |
63 | } | 84 | } |
64 | 85 | ||
65 | static int mscc_pinmux_set_mux(struct udevice *dev, | 86 | static int mscc_pinmux_set_mux(struct udevice *dev, |
66 | unsigned int pin_selector, unsigned int selector) | 87 | unsigned int pin_selector, unsigned int selector) |
67 | { | 88 | { |
68 | struct mscc_pinctrl *info = dev_get_priv(dev); | 89 | struct mscc_pinctrl *info = dev_get_priv(dev); |
69 | struct mscc_pin_caps *pin = info->mscc_pins[pin_selector].drv_data; | 90 | struct mscc_pin_caps *pin = info->mscc_pins[pin_selector].drv_data; |
70 | int f; | 91 | int f, offset, regoff; |
71 | 92 | ||
72 | f = mscc_pin_function_idx(pin_selector, selector, info->mscc_pins); | 93 | f = mscc_pin_function_idx(pin_selector, selector, info->mscc_pins); |
73 | if (f < 0) | 94 | if (f < 0) |
74 | return -EINVAL; | 95 | return -EINVAL; |
75 | /* | 96 | /* |
76 | * f is encoded on two bits. | 97 | * f is encoded on two bits. |
77 | * bit 0 of f goes in BIT(pin) of ALT0, bit 1 of f goes in BIT(pin) of | 98 | * bit 0 of f goes in BIT(pin) of ALT0, bit 1 of f goes in BIT(pin) of |
78 | * ALT1 | 99 | * ALT1 |
79 | * This is racy because both registers can't be updated at the same time | 100 | * This is racy because both registers can't be updated at the same time |
80 | * but it doesn't matter much for now. | 101 | * but it doesn't matter much for now. |
81 | */ | 102 | */ |
103 | offset = pin->pin; | ||
104 | regoff = info->mscc_gpios[MSCC_GPIO_ALT0]; | ||
105 | if (offset >= 32) { | ||
106 | offset = offset % 32; | ||
107 | regoff = info->mscc_gpios[MSCC_GPIO_ALT1]; | ||
108 | } | ||
109 | |||
82 | if (f & BIT(0)) | 110 | if (f & BIT(0)) |
83 | setbits_le32(info->regs + MSCC_GPIO_ALT0, BIT(pin->pin)); | 111 | mscc_setbits(offset, info->regs + regoff); |
84 | else | 112 | else |
85 | clrbits_le32(info->regs + MSCC_GPIO_ALT0, BIT(pin->pin)); | 113 | mscc_clrbits(offset, info->regs + regoff); |
86 | 114 | ||
87 | if (f & BIT(1)) | 115 | if (f & BIT(1)) |
88 | setbits_le32(info->regs + MSCC_GPIO_ALT1, BIT(pin->pin - 1)); | 116 | mscc_setbits(offset, info->regs + regoff + 4); |
89 | else | 117 | else |
90 | clrbits_le32(info->regs + MSCC_GPIO_ALT1, BIT(pin->pin - 1)); | 118 | mscc_clrbits(offset, info->regs + regoff + 4); |
91 | 119 | ||
92 | return 0; | 120 | return 0; |
93 | } | 121 | } |
94 | 122 | ||
95 | static int mscc_pctl_get_groups_count(struct udevice *dev) | 123 | static int mscc_pctl_get_groups_count(struct udevice *dev) |
96 | { | 124 | { |
97 | struct mscc_pinctrl *info = dev_get_priv(dev); | 125 | struct mscc_pinctrl *info = dev_get_priv(dev); |
98 | 126 | ||
99 | return info->num_pins; | 127 | return info->num_pins; |
100 | } | 128 | } |
101 | 129 | ||
102 | static const char *mscc_pctl_get_group_name(struct udevice *dev, | 130 | static const char *mscc_pctl_get_group_name(struct udevice *dev, |
103 | unsigned int group) | 131 | unsigned int group) |
104 | { | 132 | { |
105 | struct mscc_pinctrl *info = dev_get_priv(dev); | 133 | struct mscc_pinctrl *info = dev_get_priv(dev); |
106 | 134 | ||
107 | return info->mscc_pins[group].name; | 135 | return info->mscc_pins[group].name; |
108 | } | 136 | } |
109 | 137 | ||
110 | static int mscc_create_group_func_map(struct udevice *dev, | 138 | static int mscc_create_group_func_map(struct udevice *dev, |
111 | struct mscc_pinctrl *info) | 139 | struct mscc_pinctrl *info) |
112 | { | 140 | { |
113 | u16 pins[info->num_pins]; | 141 | u16 pins[info->num_pins]; |
114 | int f, npins, i; | 142 | int f, npins, i; |
115 | 143 | ||
116 | for (f = 0; f < info->num_func; f++) { | 144 | for (f = 0; f < info->num_func; f++) { |
117 | for (npins = 0, i = 0; i < info->num_pins; i++) { | 145 | for (npins = 0, i = 0; i < info->num_pins; i++) { |
118 | if (mscc_pin_function_idx(i, f, info->mscc_pins) >= 0) | 146 | if (mscc_pin_function_idx(i, f, info->mscc_pins) >= 0) |
119 | pins[npins++] = i; | 147 | pins[npins++] = i; |
120 | } | 148 | } |
121 | 149 | ||
122 | info->func[f].ngroups = npins; | 150 | info->func[f].ngroups = npins; |
123 | info->func[f].groups = devm_kzalloc(dev, npins * | 151 | info->func[f].groups = devm_kzalloc(dev, npins * sizeof(char *), |
124 | sizeof(char *), GFP_KERNEL); | 152 | GFP_KERNEL); |
125 | if (!info->func[f].groups) | 153 | if (!info->func[f].groups) |
126 | return -ENOMEM; | 154 | return -ENOMEM; |
127 | 155 | ||
128 | for (i = 0; i < npins; i++) | 156 | for (i = 0; i < npins; i++) |
129 | info->func[f].groups[i] = info->mscc_pins[pins[i]].name; | 157 | info->func[f].groups[i] = info->mscc_pins[pins[i]].name; |
130 | } | 158 | } |
131 | 159 | ||
132 | return 0; | 160 | return 0; |
133 | } | 161 | } |
134 | 162 | ||
135 | static int mscc_pinctrl_register(struct udevice *dev, struct mscc_pinctrl *info) | 163 | static int mscc_pinctrl_register(struct udevice *dev, struct mscc_pinctrl *info) |
136 | { | 164 | { |
137 | int ret; | 165 | int ret; |
138 | 166 | ||
139 | ret = mscc_create_group_func_map(dev, info); | 167 | ret = mscc_create_group_func_map(dev, info); |
140 | if (ret) { | 168 | if (ret) { |
141 | dev_err(dev, "Unable to create group func map.\n"); | 169 | dev_err(dev, "Unable to create group func map.\n"); |
142 | return ret; | 170 | return ret; |
143 | } | 171 | } |
144 | 172 | ||
145 | return 0; | 173 | return 0; |
146 | } | 174 | } |
147 | 175 | ||
148 | static int mscc_gpio_get(struct udevice *dev, unsigned int offset) | 176 | static int mscc_gpio_get(struct udevice *dev, unsigned int offset) |
149 | { | 177 | { |
150 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); | 178 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); |
151 | unsigned int val; | 179 | unsigned int val; |
152 | 180 | ||
153 | val = readl(info->regs + MSCC_GPIO_IN); | 181 | if (mscc_readl(offset, info->regs + info->mscc_gpios[MSCC_GPIO_OE]) & |
182 | BIT(offset % 32)) | ||
183 | val = mscc_readl(offset, | ||
184 | info->regs + info->mscc_gpios[MSCC_GPIO_OUT]); | ||
185 | else | ||
186 | val = mscc_readl(offset, | ||
187 | info->regs + info->mscc_gpios[MSCC_GPIO_IN]); | ||
154 | 188 | ||
155 | return !!(val & BIT(offset)); | 189 | return !!(val & BIT(offset % 32)); |
156 | } | 190 | } |
157 | 191 | ||
158 | static int mscc_gpio_set(struct udevice *dev, unsigned int offset, int value) | 192 | static int mscc_gpio_set(struct udevice *dev, unsigned int offset, int value) |
159 | { | 193 | { |
160 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); | 194 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); |
161 | 195 | ||
162 | if (value) | 196 | if (value) |
163 | writel(BIT(offset), info->regs + MSCC_GPIO_OUT_SET); | 197 | mscc_writel(offset, |
198 | info->regs + info->mscc_gpios[MSCC_GPIO_OUT_SET]); | ||
164 | else | 199 | else |
165 | writel(BIT(offset), info->regs + MSCC_GPIO_OUT_CLR); | 200 | mscc_writel(offset, |
201 | info->regs + info->mscc_gpios[MSCC_GPIO_OUT_CLR]); | ||
166 | 202 | ||
167 | return 0; | 203 | return 0; |
168 | } | 204 | } |
169 | 205 | ||
170 | static int mscc_gpio_get_direction(struct udevice *dev, unsigned int offset) | 206 | static int mscc_gpio_get_direction(struct udevice *dev, unsigned int offset) |
171 | { | 207 | { |
172 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); | 208 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); |
173 | unsigned int val; | 209 | unsigned int val; |
174 | 210 | ||
175 | val = readl(info->regs + MSCC_GPIO_OE); | 211 | val = mscc_readl(offset, info->regs + info->mscc_gpios[MSCC_GPIO_OE]); |
176 | 212 | ||
177 | return (val & BIT(offset)) ? GPIOF_OUTPUT : GPIOF_INPUT; | 213 | return (val & BIT(offset % 32)) ? GPIOF_OUTPUT : GPIOF_INPUT; |
178 | } | 214 | } |
179 | 215 | ||
180 | static int mscc_gpio_direction_input(struct udevice *dev, unsigned int offset) | 216 | static int mscc_gpio_direction_input(struct udevice *dev, unsigned int offset) |
181 | { | 217 | { |
182 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); | 218 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); |
183 | 219 | ||
184 | clrbits_le32(info->regs + MSCC_GPIO_OE, BIT(offset)); | 220 | mscc_clrbits(offset, info->regs + info->mscc_gpios[MSCC_GPIO_OE]); |
185 | 221 | ||
186 | return 0; | 222 | return 0; |
187 | } | 223 | } |
188 | 224 | ||
189 | static int mscc_gpio_direction_output(struct udevice *dev, | 225 | static int mscc_gpio_direction_output(struct udevice *dev, |
190 | unsigned int offset, int value) | 226 | unsigned int offset, int value) |
191 | { | 227 | { |
192 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); | 228 | struct mscc_pinctrl *info = dev_get_priv(dev->parent); |
193 | 229 | ||
194 | setbits_le32(info->regs + MSCC_GPIO_OE, BIT(offset)); | 230 | mscc_setbits(offset, info->regs + info->mscc_gpios[MSCC_GPIO_OE]); |
195 | 231 | ||
196 | return mscc_gpio_set(dev, offset, value); | 232 | return mscc_gpio_set(dev, offset, value); |
197 | } | 233 | } |
198 | 234 | ||
199 | const struct dm_gpio_ops mscc_gpio_ops = { | 235 | const struct dm_gpio_ops mscc_gpio_ops = { |
200 | .set_value = mscc_gpio_set, | 236 | .set_value = mscc_gpio_set, |
201 | .get_value = mscc_gpio_get, | 237 | .get_value = mscc_gpio_get, |
202 | .get_function = mscc_gpio_get_direction, | 238 | .get_function = mscc_gpio_get_direction, |
203 | .direction_input = mscc_gpio_direction_input, | 239 | .direction_input = mscc_gpio_direction_input, |
204 | .direction_output = mscc_gpio_direction_output, | 240 | .direction_output = mscc_gpio_direction_output, |
205 | }; | 241 | }; |
206 | 242 | ||
207 | const struct pinctrl_ops mscc_pinctrl_ops = { | 243 | const struct pinctrl_ops mscc_pinctrl_ops = { |
208 | .get_pins_count = mscc_pctl_get_groups_count, | 244 | .get_pins_count = mscc_pctl_get_groups_count, |
209 | .get_pin_name = mscc_pctl_get_group_name, | 245 | .get_pin_name = mscc_pctl_get_group_name, |
210 | .get_functions_count = mscc_get_functions_count, | 246 | .get_functions_count = mscc_get_functions_count, |
211 | .get_function_name = mscc_get_function_name, | 247 | .get_function_name = mscc_get_function_name, |
212 | .pinmux_set = mscc_pinmux_set_mux, | 248 | .pinmux_set = mscc_pinmux_set_mux, |
213 | .set_state = pinctrl_generic_set_state, | 249 | .set_state = pinctrl_generic_set_state, |
214 | }; | 250 | }; |
215 | 251 | ||
216 | int mscc_pinctrl_probe(struct udevice *dev, int num_func, | 252 | int mscc_pinctrl_probe(struct udevice *dev, int num_func, |
217 | const struct mscc_pin_data *mscc_pins, int num_pins, | 253 | const struct mscc_pin_data *mscc_pins, int num_pins, |
218 | char *const *function_names) | 254 | char * const *function_names, |
255 | const unsigned long *mscc_gpios) | ||
219 | { | 256 | { |
220 | struct mscc_pinctrl *priv = dev_get_priv(dev); | 257 | struct mscc_pinctrl *priv = dev_get_priv(dev); |
221 | int ret; | 258 | int ret; |
222 | 259 | ||
223 | priv->regs = dev_remap_addr(dev); | 260 | priv->regs = dev_remap_addr(dev); |
224 | if (!priv->regs) | 261 | if (!priv->regs) |
225 | return -EINVAL; | 262 | return -EINVAL; |
226 | 263 | ||
227 | priv->func = devm_kzalloc(dev, num_func * sizeof(struct mscc_pmx_func), | 264 | priv->func = devm_kzalloc(dev, num_func * sizeof(struct mscc_pmx_func), |
228 | GFP_KERNEL); | 265 | GFP_KERNEL); |
229 | priv->num_func = num_func; | 266 | priv->num_func = num_func; |
230 | priv->mscc_pins = mscc_pins; | 267 | priv->mscc_pins = mscc_pins; |
231 | priv->num_pins = num_pins; | 268 | priv->num_pins = num_pins; |
232 | priv->function_names = function_names; | 269 | priv->function_names = function_names; |
270 | priv->mscc_gpios = mscc_gpios; | ||
233 | ret = mscc_pinctrl_register(dev, priv); | 271 | ret = mscc_pinctrl_register(dev, priv); |
234 | 272 |
drivers/pinctrl/mscc/mscc-common.h
1 | /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ | 1 | /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ |
2 | /* | 2 | /* |
3 | * Microsemi SoCs pinctrl driver | 3 | * Microsemi SoCs pinctrl driver |
4 | * | 4 | * |
5 | * Author: <alexandre.belloni@free-electrons.com> | 5 | * Author: <alexandre.belloni@free-electrons.com> |
6 | * License: Dual MIT/GPL | 6 | * License: Dual MIT/GPL |
7 | * Copyright (c) 2017 Microsemi Corporation | 7 | * Copyright (c) 2017 Microsemi Corporation |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define MSCC_FUNC_PER_PIN 4 | 10 | #define MSCC_FUNC_PER_PIN 4 |
11 | 11 | ||
12 | enum mscc_regs_gpio { | ||
13 | MSCC_GPIO_OUT_SET, | ||
14 | MSCC_GPIO_OUT_CLR, | ||
15 | MSCC_GPIO_OUT, | ||
16 | MSCC_GPIO_IN, | ||
17 | MSCC_GPIO_OE, | ||
18 | MSCC_GPIO_INTR, | ||
19 | MSCC_GPIO_INTR_ENA, | ||
20 | MSCC_GPIO_INTR_IDENT, | ||
21 | MSCC_GPIO_ALT0, | ||
22 | MSCC_GPIO_ALT1, | ||
23 | }; | ||
24 | |||
12 | struct mscc_pin_caps { | 25 | struct mscc_pin_caps { |
13 | unsigned int pin; | 26 | unsigned int pin; |
14 | unsigned char functions[MSCC_FUNC_PER_PIN]; | 27 | unsigned char functions[MSCC_FUNC_PER_PIN]; |
15 | }; | 28 | }; |
16 | 29 | ||
17 | struct mscc_pin_data { | 30 | struct mscc_pin_data { |
18 | const char *name; | 31 | const char *name; |
19 | struct mscc_pin_caps *drv_data; | 32 | struct mscc_pin_caps *drv_data; |
20 | }; | 33 | }; |
21 | 34 | ||
22 | #define MSCC_P(p, f0, f1, f2) \ | 35 | #define MSCC_P(p, f0, f1, f2) \ |
23 | static struct mscc_pin_caps mscc_pin_##p = { \ | 36 | static struct mscc_pin_caps mscc_pin_##p = { \ |
24 | .pin = p, \ | 37 | .pin = p, \ |
25 | .functions = { \ | 38 | .functions = { \ |
26 | FUNC_GPIO, FUNC_##f0, FUNC_##f1, FUNC_##f2, \ | 39 | FUNC_GPIO, FUNC_##f0, FUNC_##f1, FUNC_##f2, \ |
27 | }, \ | 40 | }, \ |
28 | } | 41 | } |
29 | 42 | ||
30 | struct mscc_pmx_func { | 43 | struct mscc_pmx_func { |
31 | const char **groups; | 44 | const char **groups; |
32 | unsigned int ngroups; | 45 | unsigned int ngroups; |
33 | }; | 46 | }; |
34 | 47 | ||
35 | struct mscc_pinctrl { | 48 | struct mscc_pinctrl { |
36 | struct udevice *dev; | 49 | struct udevice *dev; |
37 | struct pinctrl_dev *pctl; | 50 | struct pinctrl_dev *pctl; |
38 | void __iomem *regs; | 51 | void __iomem *regs; |
39 | struct mscc_pmx_func *func; | 52 | struct mscc_pmx_func *func; |
40 | int num_func; | 53 | int num_func; |
41 | const struct mscc_pin_data *mscc_pins; | 54 | const struct mscc_pin_data *mscc_pins; |
42 | int num_pins; | 55 | int num_pins; |
43 | char * const *function_names; | 56 | char * const *function_names; |
57 | const unsigned long *mscc_gpios; | ||
44 | }; | 58 | }; |
45 | 59 | ||
46 | int mscc_pinctrl_probe(struct udevice *dev, int num_func, | 60 | int mscc_pinctrl_probe(struct udevice *dev, int num_func, |
47 | const struct mscc_pin_data *mscc_pins, int num_pins, | 61 | const struct mscc_pin_data *mscc_pins, int num_pins, |
48 | char * const *function_names); | 62 | char * const *function_names, |
63 | const unsigned long *mscc_gpios); | ||
49 | const struct pinctrl_ops mscc_pinctrl_ops; | 64 | const struct pinctrl_ops mscc_pinctrl_ops; |
50 | 65 | ||
51 | const struct dm_gpio_ops mscc_gpio_ops; | 66 | const struct dm_gpio_ops mscc_gpio_ops; |
52 | 67 |
drivers/pinctrl/mscc/pinctrl-jr2.c
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | |
2 | /* | ||
3 | * Microsemi SoCs pinctrl driver | ||
4 | * | ||
5 | * Author: <horatiu.vultur@microchip.com> | ||
6 | * Copyright (c) 2018 Microsemi Corporation | ||
7 | */ | ||
8 | |||
9 | #include <common.h> | ||
10 | #include <config.h> | ||
11 | #include <dm.h> | ||
12 | #include <dm/device-internal.h> | ||
13 | #include <dm/lists.h> | ||
14 | #include <dm/pinctrl.h> | ||
15 | #include <dm/root.h> | ||
16 | #include <errno.h> | ||
17 | #include <fdtdec.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <asm/gpio.h> | ||
20 | #include <asm/system.h> | ||
21 | #include "mscc-common.h" | ||
22 | |||
23 | enum { | ||
24 | FUNC_NONE, | ||
25 | FUNC_GPIO, | ||
26 | FUNC_IRQ0_IN, | ||
27 | FUNC_IRQ0_OUT, | ||
28 | FUNC_IRQ1_IN, | ||
29 | FUNC_IRQ1_OUT, | ||
30 | FUNC_MIIM1, | ||
31 | FUNC_MIIM2, | ||
32 | FUNC_PCI_WAKE, | ||
33 | FUNC_PTP0, | ||
34 | FUNC_PTP1, | ||
35 | FUNC_PTP2, | ||
36 | FUNC_PTP3, | ||
37 | FUNC_PWM, | ||
38 | FUNC_RECO_CLK0, | ||
39 | FUNC_RECO_CLK1, | ||
40 | FUNC_SFP0, | ||
41 | FUNC_SFP1, | ||
42 | FUNC_SFP2, | ||
43 | FUNC_SFP3, | ||
44 | FUNC_SFP4, | ||
45 | FUNC_SFP5, | ||
46 | FUNC_SFP6, | ||
47 | FUNC_SFP7, | ||
48 | FUNC_SFP8, | ||
49 | FUNC_SFP9, | ||
50 | FUNC_SFP10, | ||
51 | FUNC_SFP11, | ||
52 | FUNC_SFP12, | ||
53 | FUNC_SFP13, | ||
54 | FUNC_SFP14, | ||
55 | FUNC_SFP15, | ||
56 | FUNC_SG0, | ||
57 | FUNC_SG1, | ||
58 | FUNC_SG2, | ||
59 | FUNC_SI, | ||
60 | FUNC_TACHO, | ||
61 | FUNC_TWI, | ||
62 | FUNC_TWI2, | ||
63 | FUNC_TWI_SCL_M, | ||
64 | FUNC_UART, | ||
65 | FUNC_UART2, | ||
66 | FUNC_MAX | ||
67 | }; | ||
68 | |||
69 | static char * const jr2_function_names[] = { | ||
70 | [FUNC_NONE] = "none", | ||
71 | [FUNC_GPIO] = "gpio", | ||
72 | [FUNC_IRQ0_IN] = "irq0_in", | ||
73 | [FUNC_IRQ0_OUT] = "irq0_out", | ||
74 | [FUNC_IRQ1_IN] = "irq1_in", | ||
75 | [FUNC_IRQ1_OUT] = "irq1_out", | ||
76 | [FUNC_MIIM1] = "miim1", | ||
77 | [FUNC_MIIM2] = "miim2", | ||
78 | [FUNC_PCI_WAKE] = "pci_wake", | ||
79 | [FUNC_PTP0] = "ptp0", | ||
80 | [FUNC_PTP1] = "ptp1", | ||
81 | [FUNC_PTP2] = "ptp2", | ||
82 | [FUNC_PTP3] = "ptp3", | ||
83 | [FUNC_PWM] = "pwm", | ||
84 | [FUNC_RECO_CLK0] = "reco_clk0", | ||
85 | [FUNC_RECO_CLK1] = "reco_clk1", | ||
86 | [FUNC_SFP0] = "sfp0", | ||
87 | [FUNC_SFP1] = "sfp1", | ||
88 | [FUNC_SFP2] = "sfp2", | ||
89 | [FUNC_SFP3] = "sfp3", | ||
90 | [FUNC_SFP4] = "sfp4", | ||
91 | [FUNC_SFP5] = "sfp5", | ||
92 | [FUNC_SFP6] = "sfp6", | ||
93 | [FUNC_SFP7] = "sfp7", | ||
94 | [FUNC_SFP8] = "sfp8", | ||
95 | [FUNC_SFP9] = "sfp9", | ||
96 | [FUNC_SFP10] = "sfp10", | ||
97 | [FUNC_SFP11] = "sfp11", | ||
98 | [FUNC_SFP12] = "sfp12", | ||
99 | [FUNC_SFP13] = "sfp13", | ||
100 | [FUNC_SFP14] = "sfp14", | ||
101 | [FUNC_SFP15] = "sfp15", | ||
102 | [FUNC_SG0] = "sg0", | ||
103 | [FUNC_SG1] = "sg1", | ||
104 | [FUNC_SG2] = "sg2", | ||
105 | [FUNC_SI] = "si", | ||
106 | [FUNC_TACHO] = "tacho", | ||
107 | [FUNC_TWI] = "twi", | ||
108 | [FUNC_TWI2] = "twi2", | ||
109 | [FUNC_TWI_SCL_M] = "twi_scl_m", | ||
110 | [FUNC_UART] = "uart", | ||
111 | [FUNC_UART2] = "uart2", | ||
112 | }; | ||
113 | |||
114 | #define JR2_P(p, f0, f1) \ | ||
115 | static struct mscc_pin_caps jr2_pin_##p = { \ | ||
116 | .pin = p, \ | ||
117 | .functions = { \ | ||
118 | FUNC_GPIO, FUNC_##f0, FUNC_##f1, FUNC_NONE \ | ||
119 | }, \ | ||
120 | } | ||
121 | |||
122 | JR2_P(0, SG0, NONE); | ||
123 | JR2_P(1, SG0, NONE); | ||
124 | JR2_P(2, SG0, NONE); | ||
125 | JR2_P(3, SG0, NONE); | ||
126 | JR2_P(4, SG1, NONE); | ||
127 | JR2_P(5, SG1, NONE); | ||
128 | JR2_P(6, IRQ0_IN, IRQ0_OUT); | ||
129 | JR2_P(7, IRQ1_IN, IRQ1_OUT); | ||
130 | JR2_P(8, PTP0, NONE); | ||
131 | JR2_P(9, PTP1, NONE); | ||
132 | JR2_P(10, UART, NONE); | ||
133 | JR2_P(11, UART, NONE); | ||
134 | JR2_P(12, SG1, NONE); | ||
135 | JR2_P(13, SG1, NONE); | ||
136 | JR2_P(14, TWI, TWI_SCL_M); | ||
137 | JR2_P(15, TWI, NONE); | ||
138 | JR2_P(16, SI, TWI_SCL_M); | ||
139 | JR2_P(17, SI, TWI_SCL_M); | ||
140 | JR2_P(18, SI, TWI_SCL_M); | ||
141 | JR2_P(19, PCI_WAKE, NONE); | ||
142 | JR2_P(20, IRQ0_OUT, TWI_SCL_M); | ||
143 | JR2_P(21, IRQ1_OUT, TWI_SCL_M); | ||
144 | JR2_P(22, TACHO, NONE); | ||
145 | JR2_P(23, PWM, NONE); | ||
146 | JR2_P(24, UART2, NONE); | ||
147 | JR2_P(25, UART2, SI); | ||
148 | JR2_P(26, PTP2, SI); | ||
149 | JR2_P(27, PTP3, SI); | ||
150 | JR2_P(28, TWI2, SI); | ||
151 | JR2_P(29, TWI, SI); | ||
152 | JR2_P(30, SG2, SI); | ||
153 | JR2_P(31, SG2, SI); | ||
154 | JR2_P(32, SG2, SI); | ||
155 | JR2_P(33, SG2, SI); | ||
156 | JR2_P(34, NONE, TWI_SCL_M); | ||
157 | JR2_P(35, NONE, TWI_SCL_M); | ||
158 | JR2_P(36, NONE, TWI_SCL_M); | ||
159 | JR2_P(37, NONE, TWI_SCL_M); | ||
160 | JR2_P(38, NONE, TWI_SCL_M); | ||
161 | JR2_P(39, NONE, TWI_SCL_M); | ||
162 | JR2_P(40, NONE, TWI_SCL_M); | ||
163 | JR2_P(41, NONE, TWI_SCL_M); | ||
164 | JR2_P(42, NONE, TWI_SCL_M); | ||
165 | JR2_P(43, NONE, TWI_SCL_M); | ||
166 | JR2_P(44, NONE, SFP8); | ||
167 | JR2_P(45, NONE, SFP9); | ||
168 | JR2_P(46, NONE, SFP10); | ||
169 | JR2_P(47, NONE, SFP11); | ||
170 | JR2_P(48, SFP0, NONE); | ||
171 | JR2_P(49, SFP1, SI); | ||
172 | JR2_P(50, SFP2, SI); | ||
173 | JR2_P(51, SFP3, SI); | ||
174 | JR2_P(52, SFP4, NONE); | ||
175 | JR2_P(53, SFP5, NONE); | ||
176 | JR2_P(54, SFP6, NONE); | ||
177 | JR2_P(55, SFP7, NONE); | ||
178 | JR2_P(56, MIIM1, SFP12); | ||
179 | JR2_P(57, MIIM1, SFP13); | ||
180 | JR2_P(58, MIIM2, SFP14); | ||
181 | JR2_P(59, MIIM2, SFP15); | ||
182 | JR2_P(60, NONE, NONE); | ||
183 | JR2_P(61, NONE, NONE); | ||
184 | JR2_P(62, NONE, NONE); | ||
185 | JR2_P(63, NONE, NONE); | ||
186 | |||
187 | #define JR2_PIN(n) { \ | ||
188 | .name = "GPIO_"#n, \ | ||
189 | .drv_data = &jr2_pin_##n \ | ||
190 | } | ||
191 | |||
192 | static const struct mscc_pin_data jr2_pins[] = { | ||
193 | JR2_PIN(0), | ||
194 | JR2_PIN(1), | ||
195 | JR2_PIN(2), | ||
196 | JR2_PIN(3), | ||
197 | JR2_PIN(4), | ||
198 | JR2_PIN(5), | ||
199 | JR2_PIN(6), | ||
200 | JR2_PIN(7), | ||
201 | JR2_PIN(8), | ||
202 | JR2_PIN(9), | ||
203 | JR2_PIN(10), | ||
204 | JR2_PIN(11), | ||
205 | JR2_PIN(12), | ||
206 | JR2_PIN(13), | ||
207 | JR2_PIN(14), | ||
208 | JR2_PIN(15), | ||
209 | JR2_PIN(16), | ||
210 | JR2_PIN(17), | ||
211 | JR2_PIN(18), | ||
212 | JR2_PIN(19), | ||
213 | JR2_PIN(20), | ||
214 | JR2_PIN(21), | ||
215 | JR2_PIN(22), | ||
216 | JR2_PIN(23), | ||
217 | JR2_PIN(24), | ||
218 | JR2_PIN(25), | ||
219 | JR2_PIN(26), | ||
220 | JR2_PIN(27), | ||
221 | JR2_PIN(28), | ||
222 | JR2_PIN(29), | ||
223 | JR2_PIN(30), | ||
224 | JR2_PIN(31), | ||
225 | JR2_PIN(32), | ||
226 | JR2_PIN(33), | ||
227 | JR2_PIN(34), | ||
228 | JR2_PIN(35), | ||
229 | JR2_PIN(36), | ||
230 | JR2_PIN(37), | ||
231 | JR2_PIN(38), | ||
232 | JR2_PIN(39), | ||
233 | JR2_PIN(40), | ||
234 | JR2_PIN(41), | ||
235 | JR2_PIN(42), | ||
236 | JR2_PIN(43), | ||
237 | JR2_PIN(44), | ||
238 | JR2_PIN(45), | ||
239 | JR2_PIN(46), | ||
240 | JR2_PIN(47), | ||
241 | JR2_PIN(48), | ||
242 | JR2_PIN(49), | ||
243 | JR2_PIN(50), | ||
244 | JR2_PIN(51), | ||
245 | JR2_PIN(52), | ||
246 | JR2_PIN(53), | ||
247 | JR2_PIN(54), | ||
248 | JR2_PIN(55), | ||
249 | JR2_PIN(56), | ||
250 | JR2_PIN(57), | ||
251 | JR2_PIN(58), | ||
252 | JR2_PIN(59), | ||
253 | JR2_PIN(60), | ||
254 | JR2_PIN(61), | ||
255 | JR2_PIN(62), | ||
256 | JR2_PIN(63), | ||
257 | }; | ||
258 | |||
259 | static const unsigned long jr2_gpios[] = { | ||
260 | [MSCC_GPIO_OUT_SET] = 0x00, | ||
261 | [MSCC_GPIO_OUT_CLR] = 0x08, | ||
262 | [MSCC_GPIO_OUT] = 0x10, | ||
263 | [MSCC_GPIO_IN] = 0x18, | ||
264 | [MSCC_GPIO_OE] = 0x20, | ||
265 | [MSCC_GPIO_INTR] = 0x28, | ||
266 | [MSCC_GPIO_INTR_ENA] = 0x30, | ||
267 | [MSCC_GPIO_INTR_IDENT] = 0x38, | ||
268 | [MSCC_GPIO_ALT0] = 0x40, | ||
269 | [MSCC_GPIO_ALT1] = 0x48, | ||
270 | }; | ||
271 | |||
272 | static int jr2_gpio_probe(struct udevice *dev) | ||
273 | { | ||
274 | struct gpio_dev_priv *uc_priv; | ||
275 | |||
276 | uc_priv = dev_get_uclass_priv(dev); | ||
277 | uc_priv->bank_name = "jr2-gpio"; | ||
278 | uc_priv->gpio_count = ARRAY_SIZE(jr2_pins); | ||
279 | |||
280 | return 0; | ||
281 | } | ||
282 | |||
283 | static struct driver jr2_gpio_driver = { | ||
284 | .name = "jr2-gpio", | ||
285 | .id = UCLASS_GPIO, | ||
286 | .probe = jr2_gpio_probe, | ||
287 | .ops = &mscc_gpio_ops, | ||
288 | }; | ||
289 | |||
290 | static int jr2_pinctrl_probe(struct udevice *dev) | ||
291 | { | ||
292 | int ret; | ||
293 | |||
294 | ret = mscc_pinctrl_probe(dev, FUNC_MAX, jr2_pins, | ||
295 | ARRAY_SIZE(jr2_pins), | ||
296 | jr2_function_names, | ||
297 | jr2_gpios); | ||
298 | |||
299 | if (ret) | ||
300 | return ret; | ||
301 | |||
302 | ret = device_bind(dev, &jr2_gpio_driver, "jr2-gpio", NULL, | ||
303 | dev_of_offset(dev), NULL); | ||
304 | |||
305 | if (ret) | ||
306 | return ret; | ||
307 | |||
308 | return 0; | ||
309 | } | ||
310 | |||
311 | static const struct udevice_id jr2_pinctrl_of_match[] = { | ||
312 | { .compatible = "mscc,jaguar2-pinctrl" }, | ||
313 | {}, | ||
314 | }; | ||
315 | |||
316 | U_BOOT_DRIVER(jr2_pinctrl) = { | ||
317 | .name = "jr2-pinctrl", | ||
318 | .id = UCLASS_PINCTRL, | ||
319 | .of_match = of_match_ptr(jr2_pinctrl_of_match), | ||
320 | .probe = jr2_pinctrl_probe, | ||
321 | .priv_auto_alloc_size = sizeof(struct mscc_pinctrl), | ||
322 | .ops = &mscc_pinctrl_ops, | ||
323 | }; | ||
324 |
drivers/pinctrl/mscc/pinctrl-luton.c
1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) |
2 | /* | 2 | /* |
3 | * Microsemi SoCs pinctrl driver | 3 | * Microsemi SoCs pinctrl driver |
4 | * | 4 | * |
5 | * Author: <gregory.clement@bootlin.com> | 5 | * Author: <gregory.clement@bootlin.com> |
6 | * License: Dual MIT/GPL | 6 | * License: Dual MIT/GPL |
7 | * Copyright (c) 2018 Microsemi Corporation | 7 | * Copyright (c) 2018 Microsemi Corporation |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <common.h> | 10 | #include <common.h> |
11 | #include <config.h> | 11 | #include <config.h> |
12 | #include <dm.h> | 12 | #include <dm.h> |
13 | #include <dm/device-internal.h> | 13 | #include <dm/device-internal.h> |
14 | #include <dm/lists.h> | 14 | #include <dm/lists.h> |
15 | #include <dm/pinctrl.h> | 15 | #include <dm/pinctrl.h> |
16 | #include <dm/root.h> | 16 | #include <dm/root.h> |
17 | #include <errno.h> | 17 | #include <errno.h> |
18 | #include <fdtdec.h> | 18 | #include <fdtdec.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <asm/gpio.h> | 20 | #include <asm/gpio.h> |
21 | #include <asm/system.h> | 21 | #include <asm/system.h> |
22 | #include "mscc-common.h" | 22 | #include "mscc-common.h" |
23 | 23 | ||
24 | enum { | 24 | enum { |
25 | FUNC_NONE, | 25 | FUNC_NONE, |
26 | FUNC_GPIO, | 26 | FUNC_GPIO, |
27 | FUNC_SIO, | 27 | FUNC_SIO, |
28 | FUNC_TACHO, | 28 | FUNC_TACHO, |
29 | FUNC_TWI, | 29 | FUNC_TWI, |
30 | FUNC_PHY_LED, | 30 | FUNC_PHY_LED, |
31 | FUNC_EXT_IRQ, | 31 | FUNC_EXT_IRQ, |
32 | FUNC_SFP, | 32 | FUNC_SFP, |
33 | FUNC_SI, | 33 | FUNC_SI, |
34 | FUNC_PWM, | 34 | FUNC_PWM, |
35 | FUNC_UART, | 35 | FUNC_UART, |
36 | FUNC_MAX | 36 | FUNC_MAX |
37 | }; | 37 | }; |
38 | 38 | ||
39 | static char * const luton_function_names[] = { | 39 | static char * const luton_function_names[] = { |
40 | [FUNC_NONE] = "none", | 40 | [FUNC_NONE] = "none", |
41 | [FUNC_GPIO] = "gpio", | 41 | [FUNC_GPIO] = "gpio", |
42 | [FUNC_SIO] = "sio", | 42 | [FUNC_SIO] = "sio", |
43 | [FUNC_TACHO] = "tacho", | 43 | [FUNC_TACHO] = "tacho", |
44 | [FUNC_TWI] = "twi", | 44 | [FUNC_TWI] = "twi", |
45 | [FUNC_PHY_LED] = "phy_led", | 45 | [FUNC_PHY_LED] = "phy_led", |
46 | [FUNC_EXT_IRQ] = "ext_irq", | 46 | [FUNC_EXT_IRQ] = "ext_irq", |
47 | [FUNC_SFP] = "sfp", | 47 | [FUNC_SFP] = "sfp", |
48 | [FUNC_SI] = "si", | 48 | [FUNC_SI] = "si", |
49 | [FUNC_PWM] = "pwm", | 49 | [FUNC_PWM] = "pwm", |
50 | [FUNC_UART] = "uart", | 50 | [FUNC_UART] = "uart", |
51 | }; | 51 | }; |
52 | 52 | ||
53 | MSCC_P(0, SIO, NONE, NONE); | 53 | MSCC_P(0, SIO, NONE, NONE); |
54 | MSCC_P(1, SIO, NONE, NONE); | 54 | MSCC_P(1, SIO, NONE, NONE); |
55 | MSCC_P(2, SIO, NONE, NONE); | 55 | MSCC_P(2, SIO, NONE, NONE); |
56 | MSCC_P(3, SIO, NONE, NONE); | 56 | MSCC_P(3, SIO, NONE, NONE); |
57 | MSCC_P(4, TACHO, NONE, NONE); | 57 | MSCC_P(4, TACHO, NONE, NONE); |
58 | MSCC_P(5, TWI, PHY_LED, NONE); | 58 | MSCC_P(5, TWI, PHY_LED, NONE); |
59 | MSCC_P(6, TWI, PHY_LED, NONE); | 59 | MSCC_P(6, TWI, PHY_LED, NONE); |
60 | MSCC_P(7, NONE, PHY_LED, NONE); | 60 | MSCC_P(7, NONE, PHY_LED, NONE); |
61 | MSCC_P(8, EXT_IRQ, PHY_LED, NONE); | 61 | MSCC_P(8, EXT_IRQ, PHY_LED, NONE); |
62 | MSCC_P(9, EXT_IRQ, PHY_LED, NONE); | 62 | MSCC_P(9, EXT_IRQ, PHY_LED, NONE); |
63 | MSCC_P(10, SFP, PHY_LED, NONE); | 63 | MSCC_P(10, SFP, PHY_LED, NONE); |
64 | MSCC_P(11, SFP, PHY_LED, NONE); | 64 | MSCC_P(11, SFP, PHY_LED, NONE); |
65 | MSCC_P(12, SFP, PHY_LED, NONE); | 65 | MSCC_P(12, SFP, PHY_LED, NONE); |
66 | MSCC_P(13, SFP, PHY_LED, NONE); | 66 | MSCC_P(13, SFP, PHY_LED, NONE); |
67 | MSCC_P(14, SI, PHY_LED, NONE); | 67 | MSCC_P(14, SI, PHY_LED, NONE); |
68 | MSCC_P(15, SI, PHY_LED, NONE); | 68 | MSCC_P(15, SI, PHY_LED, NONE); |
69 | MSCC_P(16, SI, PHY_LED, NONE); | 69 | MSCC_P(16, SI, PHY_LED, NONE); |
70 | MSCC_P(17, SFP, PHY_LED, NONE); | 70 | MSCC_P(17, SFP, PHY_LED, NONE); |
71 | MSCC_P(18, SFP, PHY_LED, NONE); | 71 | MSCC_P(18, SFP, PHY_LED, NONE); |
72 | MSCC_P(19, SFP, PHY_LED, NONE); | 72 | MSCC_P(19, SFP, PHY_LED, NONE); |
73 | MSCC_P(20, SFP, PHY_LED, NONE); | 73 | MSCC_P(20, SFP, PHY_LED, NONE); |
74 | MSCC_P(21, SFP, PHY_LED, NONE); | 74 | MSCC_P(21, SFP, PHY_LED, NONE); |
75 | MSCC_P(22, SFP, PHY_LED, NONE); | 75 | MSCC_P(22, SFP, PHY_LED, NONE); |
76 | MSCC_P(23, SFP, PHY_LED, NONE); | 76 | MSCC_P(23, SFP, PHY_LED, NONE); |
77 | MSCC_P(24, SFP, PHY_LED, NONE); | 77 | MSCC_P(24, SFP, PHY_LED, NONE); |
78 | MSCC_P(25, SFP, PHY_LED, NONE); | 78 | MSCC_P(25, SFP, PHY_LED, NONE); |
79 | MSCC_P(26, SFP, PHY_LED, NONE); | 79 | MSCC_P(26, SFP, PHY_LED, NONE); |
80 | MSCC_P(27, SFP, PHY_LED, NONE); | 80 | MSCC_P(27, SFP, PHY_LED, NONE); |
81 | MSCC_P(28, SFP, PHY_LED, NONE); | 81 | MSCC_P(28, SFP, PHY_LED, NONE); |
82 | MSCC_P(29, PWM, NONE, NONE); | 82 | MSCC_P(29, PWM, NONE, NONE); |
83 | MSCC_P(30, UART, NONE, NONE); | 83 | MSCC_P(30, UART, NONE, NONE); |
84 | MSCC_P(31, UART, NONE, NONE); | 84 | MSCC_P(31, UART, NONE, NONE); |
85 | 85 | ||
86 | #define LUTON_PIN(n) { \ | 86 | #define LUTON_PIN(n) { \ |
87 | .name = "GPIO_"#n, \ | 87 | .name = "GPIO_"#n, \ |
88 | .drv_data = &mscc_pin_##n \ | 88 | .drv_data = &mscc_pin_##n \ |
89 | } | 89 | } |
90 | 90 | ||
91 | static const struct mscc_pin_data luton_pins[] = { | 91 | static const struct mscc_pin_data luton_pins[] = { |
92 | LUTON_PIN(0), | 92 | LUTON_PIN(0), |
93 | LUTON_PIN(1), | 93 | LUTON_PIN(1), |
94 | LUTON_PIN(2), | 94 | LUTON_PIN(2), |
95 | LUTON_PIN(3), | 95 | LUTON_PIN(3), |
96 | LUTON_PIN(4), | 96 | LUTON_PIN(4), |
97 | LUTON_PIN(5), | 97 | LUTON_PIN(5), |
98 | LUTON_PIN(6), | 98 | LUTON_PIN(6), |
99 | LUTON_PIN(7), | 99 | LUTON_PIN(7), |
100 | LUTON_PIN(8), | 100 | LUTON_PIN(8), |
101 | LUTON_PIN(9), | 101 | LUTON_PIN(9), |
102 | LUTON_PIN(10), | 102 | LUTON_PIN(10), |
103 | LUTON_PIN(11), | 103 | LUTON_PIN(11), |
104 | LUTON_PIN(12), | 104 | LUTON_PIN(12), |
105 | LUTON_PIN(13), | 105 | LUTON_PIN(13), |
106 | LUTON_PIN(14), | 106 | LUTON_PIN(14), |
107 | LUTON_PIN(15), | 107 | LUTON_PIN(15), |
108 | LUTON_PIN(16), | 108 | LUTON_PIN(16), |
109 | LUTON_PIN(17), | 109 | LUTON_PIN(17), |
110 | LUTON_PIN(18), | 110 | LUTON_PIN(18), |
111 | LUTON_PIN(19), | 111 | LUTON_PIN(19), |
112 | LUTON_PIN(20), | 112 | LUTON_PIN(20), |
113 | LUTON_PIN(21), | 113 | LUTON_PIN(21), |
114 | LUTON_PIN(22), | 114 | LUTON_PIN(22), |
115 | LUTON_PIN(23), | 115 | LUTON_PIN(23), |
116 | LUTON_PIN(24), | 116 | LUTON_PIN(24), |
117 | LUTON_PIN(25), | 117 | LUTON_PIN(25), |
118 | LUTON_PIN(26), | 118 | LUTON_PIN(26), |
119 | LUTON_PIN(27), | 119 | LUTON_PIN(27), |
120 | LUTON_PIN(28), | 120 | LUTON_PIN(28), |
121 | LUTON_PIN(29), | 121 | LUTON_PIN(29), |
122 | LUTON_PIN(30), | 122 | LUTON_PIN(30), |
123 | LUTON_PIN(31), | 123 | LUTON_PIN(31), |
124 | }; | 124 | }; |
125 | 125 | ||
126 | static const unsigned long luton_gpios[] = { | ||
127 | [MSCC_GPIO_OUT_SET] = 0x00, | ||
128 | [MSCC_GPIO_OUT_CLR] = 0x04, | ||
129 | [MSCC_GPIO_OUT] = 0x08, | ||
130 | [MSCC_GPIO_IN] = 0x0c, | ||
131 | [MSCC_GPIO_OE] = 0x10, | ||
132 | [MSCC_GPIO_INTR] = 0x14, | ||
133 | [MSCC_GPIO_INTR_ENA] = 0x18, | ||
134 | [MSCC_GPIO_INTR_IDENT] = 0x1c, | ||
135 | [MSCC_GPIO_ALT0] = 0x20, | ||
136 | [MSCC_GPIO_ALT1] = 0x24, | ||
137 | }; | ||
138 | |||
126 | static int luton_gpio_probe(struct udevice *dev) | 139 | static int luton_gpio_probe(struct udevice *dev) |
127 | { | 140 | { |
128 | struct gpio_dev_priv *uc_priv; | 141 | struct gpio_dev_priv *uc_priv; |
129 | 142 | ||
130 | uc_priv = dev_get_uclass_priv(dev); | 143 | uc_priv = dev_get_uclass_priv(dev); |
131 | uc_priv->bank_name = "luton-gpio"; | 144 | uc_priv->bank_name = "luton-gpio"; |
132 | uc_priv->gpio_count = ARRAY_SIZE(luton_pins); | 145 | uc_priv->gpio_count = ARRAY_SIZE(luton_pins); |
133 | 146 | ||
134 | return 0; | 147 | return 0; |
135 | } | 148 | } |
136 | 149 | ||
137 | static struct driver luton_gpio_driver = { | 150 | static struct driver luton_gpio_driver = { |
138 | .name = "luton-gpio", | 151 | .name = "luton-gpio", |
139 | .id = UCLASS_GPIO, | 152 | .id = UCLASS_GPIO, |
140 | .probe = luton_gpio_probe, | 153 | .probe = luton_gpio_probe, |
141 | .ops = &mscc_gpio_ops, | 154 | .ops = &mscc_gpio_ops, |
142 | }; | 155 | }; |
143 | 156 | ||
144 | int luton_pinctrl_probe(struct udevice *dev) | 157 | int luton_pinctrl_probe(struct udevice *dev) |
145 | { | 158 | { |
146 | int ret; | 159 | int ret; |
147 | 160 | ||
148 | ret = mscc_pinctrl_probe(dev, FUNC_MAX, luton_pins, | 161 | ret = mscc_pinctrl_probe(dev, FUNC_MAX, luton_pins, |
149 | ARRAY_SIZE(luton_pins), luton_function_names); | 162 | ARRAY_SIZE(luton_pins), luton_function_names, |
163 | luton_gpios); | ||
150 | 164 | ||
151 | if (ret) | 165 | if (ret) |
152 | return ret; | 166 | return ret; |
153 | 167 | ||
154 | ret = device_bind(dev, &luton_gpio_driver, "luton-gpio", NULL, | 168 | ret = device_bind(dev, &luton_gpio_driver, "luton-gpio", NULL, |
155 | dev_of_offset(dev), NULL); | 169 | dev_of_offset(dev), NULL); |
156 | 170 | ||
157 | return 0; | 171 | return 0; |
158 | } | 172 | } |
159 | 173 | ||
160 | static const struct udevice_id luton_pinctrl_of_match[] = { | 174 | static const struct udevice_id luton_pinctrl_of_match[] = { |
161 | {.compatible = "mscc,luton-pinctrl"}, | 175 | {.compatible = "mscc,luton-pinctrl"}, |
162 | {}, | 176 | {}, |
163 | }; | 177 | }; |
164 | 178 | ||
165 | U_BOOT_DRIVER(luton_pinctrl) = { | 179 | U_BOOT_DRIVER(luton_pinctrl) = { |
166 | .name = "luton-pinctrl", | 180 | .name = "luton-pinctrl", |
167 | .id = UCLASS_PINCTRL, | 181 | .id = UCLASS_PINCTRL, |
168 | .of_match = of_match_ptr(luton_pinctrl_of_match), | 182 | .of_match = of_match_ptr(luton_pinctrl_of_match), |
169 | .probe = luton_pinctrl_probe, | 183 | .probe = luton_pinctrl_probe, |
170 | .priv_auto_alloc_size = sizeof(struct mscc_pinctrl), | 184 | .priv_auto_alloc_size = sizeof(struct mscc_pinctrl), |
171 | .ops = &mscc_pinctrl_ops, | 185 | .ops = &mscc_pinctrl_ops, |
172 | }; | 186 | }; |
173 | 187 |
drivers/pinctrl/mscc/pinctrl-ocelot.c
1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | 1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) |
2 | /* | 2 | /* |
3 | * Microsemi SoCs pinctrl driver | 3 | * Microsemi SoCs pinctrl driver |
4 | * | 4 | * |
5 | * Author: <alexandre.belloni@free-electrons.com> | 5 | * Author: <alexandre.belloni@free-electrons.com> |
6 | * Author: <gregory.clement@bootlin.com> | 6 | * Author: <gregory.clement@bootlin.com> |
7 | * License: Dual MIT/GPL | 7 | * License: Dual MIT/GPL |
8 | * Copyright (c) 2017 Microsemi Corporation | 8 | * Copyright (c) 2017 Microsemi Corporation |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/gpio.h> | 11 | #include <asm/gpio.h> |
12 | #include <asm/system.h> | 12 | #include <asm/system.h> |
13 | #include <common.h> | 13 | #include <common.h> |
14 | #include <config.h> | 14 | #include <config.h> |
15 | #include <dm.h> | 15 | #include <dm.h> |
16 | #include <dm/device-internal.h> | 16 | #include <dm/device-internal.h> |
17 | #include <dm/lists.h> | 17 | #include <dm/lists.h> |
18 | #include <dm/pinctrl.h> | 18 | #include <dm/pinctrl.h> |
19 | #include <dm/root.h> | 19 | #include <dm/root.h> |
20 | #include <errno.h> | 20 | #include <errno.h> |
21 | #include <fdtdec.h> | 21 | #include <fdtdec.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include "mscc-common.h" | 23 | #include "mscc-common.h" |
24 | 24 | ||
25 | enum { | 25 | enum { |
26 | FUNC_NONE, | 26 | FUNC_NONE, |
27 | FUNC_GPIO, | 27 | FUNC_GPIO, |
28 | FUNC_IRQ0_IN, | 28 | FUNC_IRQ0_IN, |
29 | FUNC_IRQ0_OUT, | 29 | FUNC_IRQ0_OUT, |
30 | FUNC_IRQ1_IN, | 30 | FUNC_IRQ1_IN, |
31 | FUNC_IRQ1_OUT, | 31 | FUNC_IRQ1_OUT, |
32 | FUNC_MIIM1, | 32 | FUNC_MIIM1, |
33 | FUNC_PCI_WAKE, | 33 | FUNC_PCI_WAKE, |
34 | FUNC_PTP0, | 34 | FUNC_PTP0, |
35 | FUNC_PTP1, | 35 | FUNC_PTP1, |
36 | FUNC_PTP2, | 36 | FUNC_PTP2, |
37 | FUNC_PTP3, | 37 | FUNC_PTP3, |
38 | FUNC_PWM, | 38 | FUNC_PWM, |
39 | FUNC_RECO_CLK0, | 39 | FUNC_RECO_CLK0, |
40 | FUNC_RECO_CLK1, | 40 | FUNC_RECO_CLK1, |
41 | FUNC_SFP0, | 41 | FUNC_SFP0, |
42 | FUNC_SFP1, | 42 | FUNC_SFP1, |
43 | FUNC_SFP2, | 43 | FUNC_SFP2, |
44 | FUNC_SFP3, | 44 | FUNC_SFP3, |
45 | FUNC_SFP4, | 45 | FUNC_SFP4, |
46 | FUNC_SFP5, | 46 | FUNC_SFP5, |
47 | FUNC_SG0, | 47 | FUNC_SG0, |
48 | FUNC_SI, | 48 | FUNC_SI, |
49 | FUNC_TACHO, | 49 | FUNC_TACHO, |
50 | FUNC_TWI, | 50 | FUNC_TWI, |
51 | FUNC_TWI_SCL_M, | 51 | FUNC_TWI_SCL_M, |
52 | FUNC_UART, | 52 | FUNC_UART, |
53 | FUNC_UART2, | 53 | FUNC_UART2, |
54 | FUNC_MAX | 54 | FUNC_MAX |
55 | }; | 55 | }; |
56 | 56 | ||
57 | static char * const ocelot_function_names[] = { | 57 | static char * const ocelot_function_names[] = { |
58 | [FUNC_NONE] = "none", | 58 | [FUNC_NONE] = "none", |
59 | [FUNC_GPIO] = "gpio", | 59 | [FUNC_GPIO] = "gpio", |
60 | [FUNC_IRQ0_IN] = "irq0_in", | 60 | [FUNC_IRQ0_IN] = "irq0_in", |
61 | [FUNC_IRQ0_OUT] = "irq0_out", | 61 | [FUNC_IRQ0_OUT] = "irq0_out", |
62 | [FUNC_IRQ1_IN] = "irq1_in", | 62 | [FUNC_IRQ1_IN] = "irq1_in", |
63 | [FUNC_IRQ1_OUT] = "irq1_out", | 63 | [FUNC_IRQ1_OUT] = "irq1_out", |
64 | [FUNC_MIIM1] = "miim1", | 64 | [FUNC_MIIM1] = "miim1", |
65 | [FUNC_PCI_WAKE] = "pci_wake", | 65 | [FUNC_PCI_WAKE] = "pci_wake", |
66 | [FUNC_PTP0] = "ptp0", | 66 | [FUNC_PTP0] = "ptp0", |
67 | [FUNC_PTP1] = "ptp1", | 67 | [FUNC_PTP1] = "ptp1", |
68 | [FUNC_PTP2] = "ptp2", | 68 | [FUNC_PTP2] = "ptp2", |
69 | [FUNC_PTP3] = "ptp3", | 69 | [FUNC_PTP3] = "ptp3", |
70 | [FUNC_PWM] = "pwm", | 70 | [FUNC_PWM] = "pwm", |
71 | [FUNC_RECO_CLK0] = "reco_clk0", | 71 | [FUNC_RECO_CLK0] = "reco_clk0", |
72 | [FUNC_RECO_CLK1] = "reco_clk1", | 72 | [FUNC_RECO_CLK1] = "reco_clk1", |
73 | [FUNC_SFP0] = "sfp0", | 73 | [FUNC_SFP0] = "sfp0", |
74 | [FUNC_SFP1] = "sfp1", | 74 | [FUNC_SFP1] = "sfp1", |
75 | [FUNC_SFP2] = "sfp2", | 75 | [FUNC_SFP2] = "sfp2", |
76 | [FUNC_SFP3] = "sfp3", | 76 | [FUNC_SFP3] = "sfp3", |
77 | [FUNC_SFP4] = "sfp4", | 77 | [FUNC_SFP4] = "sfp4", |
78 | [FUNC_SFP5] = "sfp5", | 78 | [FUNC_SFP5] = "sfp5", |
79 | [FUNC_SG0] = "sg0", | 79 | [FUNC_SG0] = "sg0", |
80 | [FUNC_SI] = "si", | 80 | [FUNC_SI] = "si", |
81 | [FUNC_TACHO] = "tacho", | 81 | [FUNC_TACHO] = "tacho", |
82 | [FUNC_TWI] = "twi", | 82 | [FUNC_TWI] = "twi", |
83 | [FUNC_TWI_SCL_M] = "twi_scl_m", | 83 | [FUNC_TWI_SCL_M] = "twi_scl_m", |
84 | [FUNC_UART] = "uart", | 84 | [FUNC_UART] = "uart", |
85 | [FUNC_UART2] = "uart2", | 85 | [FUNC_UART2] = "uart2", |
86 | }; | 86 | }; |
87 | 87 | ||
88 | MSCC_P(0, SG0, NONE, NONE); | 88 | MSCC_P(0, SG0, NONE, NONE); |
89 | MSCC_P(1, SG0, NONE, NONE); | 89 | MSCC_P(1, SG0, NONE, NONE); |
90 | MSCC_P(2, SG0, NONE, NONE); | 90 | MSCC_P(2, SG0, NONE, NONE); |
91 | MSCC_P(3, SG0, NONE, NONE); | 91 | MSCC_P(3, SG0, NONE, NONE); |
92 | MSCC_P(4, IRQ0_IN, IRQ0_OUT, TWI); | 92 | MSCC_P(4, IRQ0_IN, IRQ0_OUT, TWI); |
93 | MSCC_P(5, IRQ1_IN, IRQ1_OUT, PCI_WAKE); | 93 | MSCC_P(5, IRQ1_IN, IRQ1_OUT, PCI_WAKE); |
94 | MSCC_P(6, UART, TWI_SCL_M, NONE); | 94 | MSCC_P(6, UART, TWI_SCL_M, NONE); |
95 | MSCC_P(7, UART, TWI_SCL_M, NONE); | 95 | MSCC_P(7, UART, TWI_SCL_M, NONE); |
96 | MSCC_P(8, SI, TWI_SCL_M, IRQ0_OUT); | 96 | MSCC_P(8, SI, TWI_SCL_M, IRQ0_OUT); |
97 | MSCC_P(9, SI, TWI_SCL_M, IRQ1_OUT); | 97 | MSCC_P(9, SI, TWI_SCL_M, IRQ1_OUT); |
98 | MSCC_P(10, PTP2, TWI_SCL_M, SFP0); | 98 | MSCC_P(10, PTP2, TWI_SCL_M, SFP0); |
99 | MSCC_P(11, PTP3, TWI_SCL_M, SFP1); | 99 | MSCC_P(11, PTP3, TWI_SCL_M, SFP1); |
100 | MSCC_P(12, UART2, TWI_SCL_M, SFP2); | 100 | MSCC_P(12, UART2, TWI_SCL_M, SFP2); |
101 | MSCC_P(13, UART2, TWI_SCL_M, SFP3); | 101 | MSCC_P(13, UART2, TWI_SCL_M, SFP3); |
102 | MSCC_P(14, MIIM1, TWI_SCL_M, SFP4); | 102 | MSCC_P(14, MIIM1, TWI_SCL_M, SFP4); |
103 | MSCC_P(15, MIIM1, TWI_SCL_M, SFP5); | 103 | MSCC_P(15, MIIM1, TWI_SCL_M, SFP5); |
104 | MSCC_P(16, TWI, NONE, SI); | 104 | MSCC_P(16, TWI, NONE, SI); |
105 | MSCC_P(17, TWI, TWI_SCL_M, SI); | 105 | MSCC_P(17, TWI, TWI_SCL_M, SI); |
106 | MSCC_P(18, PTP0, TWI_SCL_M, NONE); | 106 | MSCC_P(18, PTP0, TWI_SCL_M, NONE); |
107 | MSCC_P(19, PTP1, TWI_SCL_M, NONE); | 107 | MSCC_P(19, PTP1, TWI_SCL_M, NONE); |
108 | MSCC_P(20, RECO_CLK0, TACHO, NONE); | 108 | MSCC_P(20, RECO_CLK0, TACHO, NONE); |
109 | MSCC_P(21, RECO_CLK1, PWM, NONE); | 109 | MSCC_P(21, RECO_CLK1, PWM, NONE); |
110 | 110 | ||
111 | #define OCELOT_PIN(n) { \ | 111 | #define OCELOT_PIN(n) { \ |
112 | .name = "GPIO_"#n, \ | 112 | .name = "GPIO_"#n, \ |
113 | .drv_data = &mscc_pin_##n \ | 113 | .drv_data = &mscc_pin_##n \ |
114 | } | 114 | } |
115 | 115 | ||
116 | static const struct mscc_pin_data ocelot_pins[] = { | 116 | static const struct mscc_pin_data ocelot_pins[] = { |
117 | OCELOT_PIN(0), | 117 | OCELOT_PIN(0), |
118 | OCELOT_PIN(1), | 118 | OCELOT_PIN(1), |
119 | OCELOT_PIN(2), | 119 | OCELOT_PIN(2), |
120 | OCELOT_PIN(3), | 120 | OCELOT_PIN(3), |
121 | OCELOT_PIN(4), | 121 | OCELOT_PIN(4), |
122 | OCELOT_PIN(5), | 122 | OCELOT_PIN(5), |
123 | OCELOT_PIN(6), | 123 | OCELOT_PIN(6), |
124 | OCELOT_PIN(7), | 124 | OCELOT_PIN(7), |
125 | OCELOT_PIN(8), | 125 | OCELOT_PIN(8), |
126 | OCELOT_PIN(9), | 126 | OCELOT_PIN(9), |
127 | OCELOT_PIN(10), | 127 | OCELOT_PIN(10), |
128 | OCELOT_PIN(11), | 128 | OCELOT_PIN(11), |
129 | OCELOT_PIN(12), | 129 | OCELOT_PIN(12), |
130 | OCELOT_PIN(13), | 130 | OCELOT_PIN(13), |
131 | OCELOT_PIN(14), | 131 | OCELOT_PIN(14), |
132 | OCELOT_PIN(15), | 132 | OCELOT_PIN(15), |
133 | OCELOT_PIN(16), | 133 | OCELOT_PIN(16), |
134 | OCELOT_PIN(17), | 134 | OCELOT_PIN(17), |
135 | OCELOT_PIN(18), | 135 | OCELOT_PIN(18), |
136 | OCELOT_PIN(19), | 136 | OCELOT_PIN(19), |
137 | OCELOT_PIN(20), | 137 | OCELOT_PIN(20), |
138 | OCELOT_PIN(21), | 138 | OCELOT_PIN(21), |
139 | }; | 139 | }; |
140 | 140 | ||
141 | static const unsigned long ocelot_gpios[] = { | ||
142 | [MSCC_GPIO_OUT_SET] = 0x00, | ||
143 | [MSCC_GPIO_OUT_CLR] = 0x04, | ||
144 | [MSCC_GPIO_OUT] = 0x08, | ||
145 | [MSCC_GPIO_IN] = 0x0c, | ||
146 | [MSCC_GPIO_OE] = 0x10, | ||
147 | [MSCC_GPIO_INTR] = 0x14, | ||
148 | [MSCC_GPIO_INTR_ENA] = 0x18, | ||
149 | [MSCC_GPIO_INTR_IDENT] = 0x1c, | ||
150 | [MSCC_GPIO_ALT0] = 0x20, | ||
151 | [MSCC_GPIO_ALT1] = 0x24, | ||
152 | }; | ||
153 | |||
141 | static int ocelot_gpio_probe(struct udevice *dev) | 154 | static int ocelot_gpio_probe(struct udevice *dev) |
142 | { | 155 | { |
143 | struct gpio_dev_priv *uc_priv; | 156 | struct gpio_dev_priv *uc_priv; |
144 | 157 | ||
145 | uc_priv = dev_get_uclass_priv(dev); | 158 | uc_priv = dev_get_uclass_priv(dev); |
146 | uc_priv->bank_name = "ocelot-gpio"; | 159 | uc_priv->bank_name = "ocelot-gpio"; |
147 | uc_priv->gpio_count = ARRAY_SIZE(ocelot_pins); | 160 | uc_priv->gpio_count = ARRAY_SIZE(ocelot_pins); |
148 | 161 | ||
149 | return 0; | 162 | return 0; |
150 | } | 163 | } |
151 | 164 | ||
152 | static struct driver ocelot_gpio_driver = { | 165 | static struct driver ocelot_gpio_driver = { |
153 | .name = "ocelot-gpio", | 166 | .name = "ocelot-gpio", |
154 | .id = UCLASS_GPIO, | 167 | .id = UCLASS_GPIO, |
155 | .probe = ocelot_gpio_probe, | 168 | .probe = ocelot_gpio_probe, |
156 | .ops = &mscc_gpio_ops, | 169 | .ops = &mscc_gpio_ops, |
157 | }; | 170 | }; |
158 | 171 | ||
159 | int ocelot_pinctrl_probe(struct udevice *dev) | 172 | int ocelot_pinctrl_probe(struct udevice *dev) |
160 | { | 173 | { |
161 | int ret; | 174 | int ret; |
162 | 175 | ||
163 | ret = mscc_pinctrl_probe(dev, FUNC_MAX, ocelot_pins, | 176 | ret = mscc_pinctrl_probe(dev, FUNC_MAX, ocelot_pins, |
164 | ARRAY_SIZE(ocelot_pins), | 177 | ARRAY_SIZE(ocelot_pins), |
165 | ocelot_function_names); | 178 | ocelot_function_names, |
179 | ocelot_gpios); | ||
166 | 180 | ||
167 | if (ret) | 181 | if (ret) |
168 | return ret; | 182 | return ret; |
169 | 183 | ||
170 | ret = device_bind(dev, &ocelot_gpio_driver, "ocelot-gpio", NULL, | 184 | ret = device_bind(dev, &ocelot_gpio_driver, "ocelot-gpio", NULL, |
171 | dev_of_offset(dev), NULL); | 185 | dev_of_offset(dev), NULL); |
172 | 186 | ||
173 | return ret; | 187 | return ret; |
174 | } | 188 | } |
175 | 189 | ||
176 | static const struct udevice_id ocelot_pinctrl_of_match[] = { | 190 | static const struct udevice_id ocelot_pinctrl_of_match[] = { |
177 | {.compatible = "mscc,ocelot-pinctrl"}, | 191 | {.compatible = "mscc,ocelot-pinctrl"}, |
178 | {}, | 192 | {}, |
179 | }; | 193 | }; |
180 | 194 | ||
181 | U_BOOT_DRIVER(ocelot_pinctrl) = { | 195 | U_BOOT_DRIVER(ocelot_pinctrl) = { |
182 | .name = "ocelot-pinctrl", | 196 | .name = "ocelot-pinctrl", |
183 | .id = UCLASS_PINCTRL, | 197 | .id = UCLASS_PINCTRL, |
184 | .of_match = of_match_ptr(ocelot_pinctrl_of_match), | 198 | .of_match = of_match_ptr(ocelot_pinctrl_of_match), |
185 | .probe = ocelot_pinctrl_probe, | 199 | .probe = ocelot_pinctrl_probe, |
186 | .priv_auto_alloc_size = sizeof(struct mscc_pinctrl), | 200 | .priv_auto_alloc_size = sizeof(struct mscc_pinctrl), |
187 | .ops = &mscc_pinctrl_ops, | 201 | .ops = &mscc_pinctrl_ops, |
188 | }; | 202 | }; |
189 | 203 |
drivers/spi/Kconfig
1 | menuconfig SPI | 1 | menuconfig SPI |
2 | bool "SPI Support" | 2 | bool "SPI Support" |
3 | 3 | ||
4 | if SPI | 4 | if SPI |
5 | 5 | ||
6 | config DM_SPI | 6 | config DM_SPI |
7 | bool "Enable Driver Model for SPI drivers" | 7 | bool "Enable Driver Model for SPI drivers" |
8 | depends on DM | 8 | depends on DM |
9 | help | 9 | help |
10 | Enable driver model for SPI. The SPI slave interface | 10 | Enable driver model for SPI. The SPI slave interface |
11 | (spi_setup_slave(), spi_xfer(), etc.) is then implemented by | 11 | (spi_setup_slave(), spi_xfer(), etc.) is then implemented by |
12 | the SPI uclass. Drivers provide methods to access the SPI | 12 | the SPI uclass. Drivers provide methods to access the SPI |
13 | buses that they control. The uclass interface is defined in | 13 | buses that they control. The uclass interface is defined in |
14 | include/spi.h. The existing spi_slave structure is attached | 14 | include/spi.h. The existing spi_slave structure is attached |
15 | as 'parent data' to every slave on each bus. Slaves | 15 | as 'parent data' to every slave on each bus. Slaves |
16 | typically use driver-private data instead of extending the | 16 | typically use driver-private data instead of extending the |
17 | spi_slave structure. | 17 | spi_slave structure. |
18 | 18 | ||
19 | if DM_SPI | 19 | if DM_SPI |
20 | 20 | ||
21 | config SPI_MEM | 21 | config SPI_MEM |
22 | bool "SPI memory extension" | 22 | bool "SPI memory extension" |
23 | help | 23 | help |
24 | Enable this option if you want to enable the SPI memory extension. | 24 | Enable this option if you want to enable the SPI memory extension. |
25 | This extension is meant to simplify interaction with SPI memories | 25 | This extension is meant to simplify interaction with SPI memories |
26 | by providing an high-level interface to send memory-like commands. | 26 | by providing an high-level interface to send memory-like commands. |
27 | 27 | ||
28 | config ALTERA_SPI | 28 | config ALTERA_SPI |
29 | bool "Altera SPI driver" | 29 | bool "Altera SPI driver" |
30 | help | 30 | help |
31 | Enable the Altera SPI driver. This driver can be used to | 31 | Enable the Altera SPI driver. This driver can be used to |
32 | access the SPI NOR flash on platforms embedding this Altera | 32 | access the SPI NOR flash on platforms embedding this Altera |
33 | IP core. Please find details on the "Embedded Peripherals IP | 33 | IP core. Please find details on the "Embedded Peripherals IP |
34 | User Guide" of Altera. | 34 | User Guide" of Altera. |
35 | 35 | ||
36 | config ATCSPI200_SPI | 36 | config ATCSPI200_SPI |
37 | bool "Andestech ATCSPI200 SPI driver" | 37 | bool "Andestech ATCSPI200 SPI driver" |
38 | help | 38 | help |
39 | Enable the Andestech ATCSPI200 SPI driver. This driver can be | 39 | Enable the Andestech ATCSPI200 SPI driver. This driver can be |
40 | used to access the SPI flash on AE3XX and AE250 platforms embedding | 40 | used to access the SPI flash on AE3XX and AE250 platforms embedding |
41 | this Andestech IP core. | 41 | this Andestech IP core. |
42 | 42 | ||
43 | config ATH79_SPI | 43 | config ATH79_SPI |
44 | bool "Atheros SPI driver" | 44 | bool "Atheros SPI driver" |
45 | depends on ARCH_ATH79 | 45 | depends on ARCH_ATH79 |
46 | help | 46 | help |
47 | Enable the Atheros ar7xxx/ar9xxx SoC SPI driver, it was used | 47 | Enable the Atheros ar7xxx/ar9xxx SoC SPI driver, it was used |
48 | to access SPI NOR flash and other SPI peripherals. This driver | 48 | to access SPI NOR flash and other SPI peripherals. This driver |
49 | uses driver model and requires a device tree binding to operate. | 49 | uses driver model and requires a device tree binding to operate. |
50 | please refer to doc/device-tree-bindings/spi/spi-ath79.txt. | 50 | please refer to doc/device-tree-bindings/spi/spi-ath79.txt. |
51 | 51 | ||
52 | config ATMEL_SPI | 52 | config ATMEL_SPI |
53 | bool "Atmel SPI driver" | 53 | bool "Atmel SPI driver" |
54 | default y if ARCH_AT91 | 54 | default y if ARCH_AT91 |
55 | help | 55 | help |
56 | This enables driver for the Atmel SPI Controller, present on | 56 | This enables driver for the Atmel SPI Controller, present on |
57 | many AT91 (ARM) chips. This driver can be used to access | 57 | many AT91 (ARM) chips. This driver can be used to access |
58 | the SPI Flash, such as AT25DF321. | 58 | the SPI Flash, such as AT25DF321. |
59 | 59 | ||
60 | config BCM63XX_HSSPI | 60 | config BCM63XX_HSSPI |
61 | bool "BCM63XX HSSPI driver" | 61 | bool "BCM63XX HSSPI driver" |
62 | depends on ARCH_BMIPS | 62 | depends on ARCH_BMIPS |
63 | help | 63 | help |
64 | Enable the BCM6328 HSSPI driver. This driver can be used to | 64 | Enable the BCM6328 HSSPI driver. This driver can be used to |
65 | access the SPI NOR flash on platforms embedding this Broadcom | 65 | access the SPI NOR flash on platforms embedding this Broadcom |
66 | SPI core. | 66 | SPI core. |
67 | 67 | ||
68 | config BCM63XX_SPI | 68 | config BCM63XX_SPI |
69 | bool "BCM6348 SPI driver" | 69 | bool "BCM6348 SPI driver" |
70 | depends on ARCH_BMIPS | 70 | depends on ARCH_BMIPS |
71 | help | 71 | help |
72 | Enable the BCM6348/BCM6358 SPI driver. This driver can be used to | 72 | Enable the BCM6348/BCM6358 SPI driver. This driver can be used to |
73 | access the SPI NOR flash on platforms embedding these Broadcom | 73 | access the SPI NOR flash on platforms embedding these Broadcom |
74 | SPI cores. | 74 | SPI cores. |
75 | 75 | ||
76 | config BCMSTB_SPI | 76 | config BCMSTB_SPI |
77 | bool "BCMSTB SPI driver" | 77 | bool "BCMSTB SPI driver" |
78 | help | 78 | help |
79 | Enable the Broadcom set-top box SPI driver. This driver can | 79 | Enable the Broadcom set-top box SPI driver. This driver can |
80 | be used to access the SPI flash on platforms embedding this | 80 | be used to access the SPI flash on platforms embedding this |
81 | Broadcom SPI core. | 81 | Broadcom SPI core. |
82 | 82 | ||
83 | config CADENCE_QSPI | 83 | config CADENCE_QSPI |
84 | bool "Cadence QSPI driver" | 84 | bool "Cadence QSPI driver" |
85 | help | 85 | help |
86 | Enable the Cadence Quad-SPI (QSPI) driver. This driver can be | 86 | Enable the Cadence Quad-SPI (QSPI) driver. This driver can be |
87 | used to access the SPI NOR flash on platforms embedding this | 87 | used to access the SPI NOR flash on platforms embedding this |
88 | Cadence IP core. | 88 | Cadence IP core. |
89 | 89 | ||
90 | config DESIGNWARE_SPI | 90 | config DESIGNWARE_SPI |
91 | bool "Designware SPI driver" | 91 | bool "Designware SPI driver" |
92 | help | 92 | help |
93 | Enable the Designware SPI driver. This driver can be used to | 93 | Enable the Designware SPI driver. This driver can be used to |
94 | access the SPI NOR flash on platforms embedding this Designware | 94 | access the SPI NOR flash on platforms embedding this Designware |
95 | IP core. | 95 | IP core. |
96 | 96 | ||
97 | config EXYNOS_SPI | 97 | config EXYNOS_SPI |
98 | bool "Samsung Exynos SPI driver" | 98 | bool "Samsung Exynos SPI driver" |
99 | help | 99 | help |
100 | Enable the Samsung Exynos SPI driver. This driver can be used to | 100 | Enable the Samsung Exynos SPI driver. This driver can be used to |
101 | access the SPI NOR flash on platforms embedding this Samsung | 101 | access the SPI NOR flash on platforms embedding this Samsung |
102 | Exynos IP core. | 102 | Exynos IP core. |
103 | 103 | ||
104 | config FSL_DSPI | 104 | config FSL_DSPI |
105 | bool "Freescale DSPI driver" | 105 | bool "Freescale DSPI driver" |
106 | help | 106 | help |
107 | Enable the Freescale DSPI driver. This driver can be used to | 107 | Enable the Freescale DSPI driver. This driver can be used to |
108 | access the SPI NOR flash and SPI Data flash on platforms embedding | 108 | access the SPI NOR flash and SPI Data flash on platforms embedding |
109 | this Freescale DSPI IP core. LS102xA and Colibri VF50/VF61 platforms | 109 | this Freescale DSPI IP core. LS102xA and Colibri VF50/VF61 platforms |
110 | use this driver. | 110 | use this driver. |
111 | 111 | ||
112 | config ICH_SPI | 112 | config ICH_SPI |
113 | bool "Intel ICH SPI driver" | 113 | bool "Intel ICH SPI driver" |
114 | help | 114 | help |
115 | Enable the Intel ICH SPI driver. This driver can be used to | 115 | Enable the Intel ICH SPI driver. This driver can be used to |
116 | access the SPI NOR flash on platforms embedding this Intel | 116 | access the SPI NOR flash on platforms embedding this Intel |
117 | ICH IP core. | 117 | ICH IP core. |
118 | 118 | ||
119 | config MESON_SPIFC | 119 | config MESON_SPIFC |
120 | bool "Amlogic Meson SPI Flash Controller driver" | 120 | bool "Amlogic Meson SPI Flash Controller driver" |
121 | depends on ARCH_MESON | 121 | depends on ARCH_MESON |
122 | help | 122 | help |
123 | Enable the Amlogic Meson SPI Flash Controller SPIFC) driver. | 123 | Enable the Amlogic Meson SPI Flash Controller SPIFC) driver. |
124 | This driver can be used to access the SPI NOR flash chips on | 124 | This driver can be used to access the SPI NOR flash chips on |
125 | Amlogic Meson SoCs. | 125 | Amlogic Meson SoCs. |
126 | 126 | ||
127 | config MPC8XX_SPI | 127 | config MPC8XX_SPI |
128 | bool "MPC8XX SPI Driver" | 128 | bool "MPC8XX SPI Driver" |
129 | depends on MPC8xx | 129 | depends on MPC8xx |
130 | help | 130 | help |
131 | Enable support for SPI on MPC8XX | 131 | Enable support for SPI on MPC8XX |
132 | 132 | ||
133 | config MT7621_SPI | 133 | config MT7621_SPI |
134 | bool "MediaTek MT7621 SPI driver" | 134 | bool "MediaTek MT7621 SPI driver" |
135 | depends on ARCH_MT7620 | 135 | depends on ARCH_MT7620 |
136 | help | 136 | help |
137 | Enable the MT7621 SPI driver. This driver can be used to access | 137 | Enable the MT7621 SPI driver. This driver can be used to access |
138 | the SPI NOR flash on platforms embedding this Ralink / MediaTek | 138 | the SPI NOR flash on platforms embedding this Ralink / MediaTek |
139 | SPI core, like MT7621/7628/7688. | 139 | SPI core, like MT7621/7628/7688. |
140 | 140 | ||
141 | config MTK_QSPI | 141 | config MTK_QSPI |
142 | bool "Mediatek QSPI driver" | 142 | bool "Mediatek QSPI driver" |
143 | help | 143 | help |
144 | Enable the Mediatek QSPI driver. This driver can be | 144 | Enable the Mediatek QSPI driver. This driver can be |
145 | used to access the SPI NOR flash on platforms embedding this | 145 | used to access the SPI NOR flash on platforms embedding this |
146 | Mediatek QSPI IP core. | 146 | Mediatek QSPI IP core. |
147 | 147 | ||
148 | config MVEBU_A3700_SPI | 148 | config MVEBU_A3700_SPI |
149 | bool "Marvell Armada 3700 SPI driver" | 149 | bool "Marvell Armada 3700 SPI driver" |
150 | select CLK_ARMADA_3720 | 150 | select CLK_ARMADA_3720 |
151 | help | 151 | help |
152 | Enable the Marvell Armada 3700 SPI driver. This driver can be | 152 | Enable the Marvell Armada 3700 SPI driver. This driver can be |
153 | used to access the SPI NOR flash on platforms embedding this | 153 | used to access the SPI NOR flash on platforms embedding this |
154 | Marvell IP core. | 154 | Marvell IP core. |
155 | 155 | ||
156 | config PIC32_SPI | 156 | config PIC32_SPI |
157 | bool "Microchip PIC32 SPI driver" | 157 | bool "Microchip PIC32 SPI driver" |
158 | depends on MACH_PIC32 | 158 | depends on MACH_PIC32 |
159 | help | 159 | help |
160 | Enable the Microchip PIC32 SPI driver. This driver can be used | 160 | Enable the Microchip PIC32 SPI driver. This driver can be used |
161 | to access the SPI NOR flash, MMC-over-SPI on platforms based on | 161 | to access the SPI NOR flash, MMC-over-SPI on platforms based on |
162 | Microchip PIC32 family devices. | 162 | Microchip PIC32 family devices. |
163 | 163 | ||
164 | config PL022_SPI | 164 | config PL022_SPI |
165 | bool "ARM AMBA PL022 SSP controller driver" | 165 | bool "ARM AMBA PL022 SSP controller driver" |
166 | depends on ARM | 166 | depends on ARM |
167 | help | 167 | help |
168 | This selects the ARM(R) AMBA(R) PrimeCell PL022 SSP | 168 | This selects the ARM(R) AMBA(R) PrimeCell PL022 SSP |
169 | controller. If you have an embedded system with an AMBA(R) | 169 | controller. If you have an embedded system with an AMBA(R) |
170 | bus and a PL022 controller, say Y or M here. | 170 | bus and a PL022 controller, say Y or M here. |
171 | 171 | ||
172 | config RENESAS_RPC_SPI | 172 | config RENESAS_RPC_SPI |
173 | bool "Renesas RPC SPI driver" | 173 | bool "Renesas RPC SPI driver" |
174 | depends on RCAR_GEN3 | 174 | depends on RCAR_GEN3 |
175 | help | 175 | help |
176 | Enable the Renesas RPC SPI driver, used to access SPI NOR flash | 176 | Enable the Renesas RPC SPI driver, used to access SPI NOR flash |
177 | on Renesas RCar Gen3 SoCs. This uses driver model and requires a | 177 | on Renesas RCar Gen3 SoCs. This uses driver model and requires a |
178 | device tree binding to operate. | 178 | device tree binding to operate. |
179 | 179 | ||
180 | config ROCKCHIP_SPI | 180 | config ROCKCHIP_SPI |
181 | bool "Rockchip SPI driver" | 181 | bool "Rockchip SPI driver" |
182 | help | 182 | help |
183 | Enable the Rockchip SPI driver, used to access SPI NOR flash and | 183 | Enable the Rockchip SPI driver, used to access SPI NOR flash and |
184 | other SPI peripherals (such as the Chrome OS EC) on Rockchip SoCs. | 184 | other SPI peripherals (such as the Chrome OS EC) on Rockchip SoCs. |
185 | This uses driver model and requires a device tree binding to | 185 | This uses driver model and requires a device tree binding to |
186 | operate. | 186 | operate. |
187 | 187 | ||
188 | config SANDBOX_SPI | 188 | config SANDBOX_SPI |
189 | bool "Sandbox SPI driver" | 189 | bool "Sandbox SPI driver" |
190 | depends on SANDBOX && DM | 190 | depends on SANDBOX && DM |
191 | help | 191 | help |
192 | Enable SPI support for sandbox. This is an emulation of a real SPI | 192 | Enable SPI support for sandbox. This is an emulation of a real SPI |
193 | bus. Devices can be attached to the bus using the device tree | 193 | bus. Devices can be attached to the bus using the device tree |
194 | which specifies the driver to use. As an example, see this device | 194 | which specifies the driver to use. As an example, see this device |
195 | tree fragment from sandbox.dts. It shows that the SPI bus has a | 195 | tree fragment from sandbox.dts. It shows that the SPI bus has a |
196 | single flash device on chip select 0 which is emulated by the driver | 196 | single flash device on chip select 0 which is emulated by the driver |
197 | for "sandbox,spi-flash", which is in drivers/mtd/spi/sandbox.c. | 197 | for "sandbox,spi-flash", which is in drivers/mtd/spi/sandbox.c. |
198 | 198 | ||
199 | spi@0 { | 199 | spi@0 { |
200 | #address-cells = <1>; | 200 | #address-cells = <1>; |
201 | #size-cells = <0>; | 201 | #size-cells = <0>; |
202 | reg = <0>; | 202 | reg = <0>; |
203 | compatible = "sandbox,spi"; | 203 | compatible = "sandbox,spi"; |
204 | cs-gpios = <0>, <&gpio_a 0>; | 204 | cs-gpios = <0>, <&gpio_a 0>; |
205 | flash@0 { | 205 | flash@0 { |
206 | reg = <0>; | 206 | reg = <0>; |
207 | compatible = "spansion,m25p16", "sandbox,spi-flash"; | 207 | compatible = "spansion,m25p16", "sandbox,spi-flash"; |
208 | spi-max-frequency = <40000000>; | 208 | spi-max-frequency = <40000000>; |
209 | sandbox,filename = "spi.bin"; | 209 | sandbox,filename = "spi.bin"; |
210 | }; | 210 | }; |
211 | }; | 211 | }; |
212 | 212 | ||
213 | config STM32_QSPI | 213 | config STM32_QSPI |
214 | bool "STM32F7 QSPI driver" | 214 | bool "STM32F7 QSPI driver" |
215 | depends on STM32F7 | 215 | depends on STM32F7 |
216 | help | 216 | help |
217 | Enable the STM32F7 Quad-SPI (QSPI) driver. This driver can be | 217 | Enable the STM32F7 Quad-SPI (QSPI) driver. This driver can be |
218 | used to access the SPI NOR flash chips on platforms embedding | 218 | used to access the SPI NOR flash chips on platforms embedding |
219 | this ST IP core. | 219 | this ST IP core. |
220 | 220 | ||
221 | config SUN4I_SPI | 221 | config SUN4I_SPI |
222 | bool "Allwinner A10 SoCs SPI controller" | 222 | bool "Allwinner A10 SoCs SPI controller" |
223 | help | 223 | help |
224 | SPI driver for Allwinner sun4i, sun5i and sun7i SoCs | 224 | SPI driver for Allwinner sun4i, sun5i and sun7i SoCs |
225 | 225 | ||
226 | config TEGRA114_SPI | 226 | config TEGRA114_SPI |
227 | bool "nVidia Tegra114 SPI driver" | 227 | bool "nVidia Tegra114 SPI driver" |
228 | help | 228 | help |
229 | Enable the nVidia Tegra114 SPI driver. This driver can be used to | 229 | Enable the nVidia Tegra114 SPI driver. This driver can be used to |
230 | access the SPI NOR flash on platforms embedding this nVidia Tegra114 | 230 | access the SPI NOR flash on platforms embedding this nVidia Tegra114 |
231 | IP core. | 231 | IP core. |
232 | 232 | ||
233 | This controller is different than the older SoCs SPI controller and | 233 | This controller is different than the older SoCs SPI controller and |
234 | also register interface get changed with this controller. | 234 | also register interface get changed with this controller. |
235 | 235 | ||
236 | config TEGRA20_SFLASH | 236 | config TEGRA20_SFLASH |
237 | bool "nVidia Tegra20 Serial Flash controller driver" | 237 | bool "nVidia Tegra20 Serial Flash controller driver" |
238 | help | 238 | help |
239 | Enable the nVidia Tegra20 Serial Flash controller driver. This driver | 239 | Enable the nVidia Tegra20 Serial Flash controller driver. This driver |
240 | can be used to access the SPI NOR flash on platforms embedding this | 240 | can be used to access the SPI NOR flash on platforms embedding this |
241 | nVidia Tegra20 IP core. | 241 | nVidia Tegra20 IP core. |
242 | 242 | ||
243 | config TEGRA20_SLINK | 243 | config TEGRA20_SLINK |
244 | bool "nVidia Tegra20/Tegra30 SLINK driver" | 244 | bool "nVidia Tegra20/Tegra30 SLINK driver" |
245 | help | 245 | help |
246 | Enable the nVidia Tegra20/Tegra30 SLINK driver. This driver can | 246 | Enable the nVidia Tegra20/Tegra30 SLINK driver. This driver can |
247 | be used to access the SPI NOR flash on platforms embedding this | 247 | be used to access the SPI NOR flash on platforms embedding this |
248 | nVidia Tegra20/Tegra30 IP cores. | 248 | nVidia Tegra20/Tegra30 IP cores. |
249 | 249 | ||
250 | config TEGRA210_QSPI | 250 | config TEGRA210_QSPI |
251 | bool "nVidia Tegra210 QSPI driver" | 251 | bool "nVidia Tegra210 QSPI driver" |
252 | help | 252 | help |
253 | Enable the Tegra Quad-SPI (QSPI) driver for T210. This driver | 253 | Enable the Tegra Quad-SPI (QSPI) driver for T210. This driver |
254 | be used to access SPI chips on platforms embedding this | 254 | be used to access SPI chips on platforms embedding this |
255 | NVIDIA Tegra210 IP core. | 255 | NVIDIA Tegra210 IP core. |
256 | 256 | ||
257 | config XILINX_SPI | 257 | config XILINX_SPI |
258 | bool "Xilinx SPI driver" | 258 | bool "Xilinx SPI driver" |
259 | help | 259 | help |
260 | Enable the Xilinx SPI driver from the Xilinx EDK. This SPI | 260 | Enable the Xilinx SPI driver from the Xilinx EDK. This SPI |
261 | controller support 8 bit SPI transfers only, with or w/o FIFO. | 261 | controller support 8 bit SPI transfers only, with or w/o FIFO. |
262 | For more info on Xilinx SPI Register Definitions and Overview | 262 | For more info on Xilinx SPI Register Definitions and Overview |
263 | see driver file - drivers/spi/xilinx_spi.c | 263 | see driver file - drivers/spi/xilinx_spi.c |
264 | 264 | ||
265 | config ZYNQ_SPI | 265 | config ZYNQ_SPI |
266 | bool "Zynq SPI driver" | 266 | bool "Zynq SPI driver" |
267 | depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL | 267 | depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL |
268 | help | 268 | help |
269 | Enable the Zynq SPI driver. This driver can be used to | 269 | Enable the Zynq SPI driver. This driver can be used to |
270 | access the SPI NOR flash on platforms embedding this Zynq | 270 | access the SPI NOR flash on platforms embedding this Zynq |
271 | SPI IP core. | 271 | SPI IP core. |
272 | 272 | ||
273 | config ZYNQ_QSPI | 273 | config ZYNQ_QSPI |
274 | bool "Zynq QSPI driver" | 274 | bool "Zynq QSPI driver" |
275 | depends on ARCH_ZYNQ | 275 | depends on ARCH_ZYNQ |
276 | help | 276 | help |
277 | Enable the Zynq Quad-SPI (QSPI) driver. This driver can be | 277 | Enable the Zynq Quad-SPI (QSPI) driver. This driver can be |
278 | used to access the SPI NOR flash on platforms embedding this | 278 | used to access the SPI NOR flash on platforms embedding this |
279 | Zynq QSPI IP core. This IP is used to connect the flash in | 279 | Zynq QSPI IP core. This IP is used to connect the flash in |
280 | 4-bit qspi, 8-bit dual stacked and shared 4-bit dual parallel. | 280 | 4-bit qspi, 8-bit dual stacked and shared 4-bit dual parallel. |
281 | 281 | ||
282 | config ZYNQMP_GQSPI | 282 | config ZYNQMP_GQSPI |
283 | bool "Configure ZynqMP Generic QSPI" | 283 | bool "Configure ZynqMP Generic QSPI" |
284 | depends on ARCH_ZYNQMP || ARCH_VERSAL | 284 | depends on ARCH_ZYNQMP || ARCH_VERSAL |
285 | help | 285 | help |
286 | This option is used to enable ZynqMP QSPI controller driver which | 286 | This option is used to enable ZynqMP QSPI controller driver which |
287 | is used to communicate with qspi flash devices. | 287 | is used to communicate with qspi flash devices. |
288 | 288 | ||
289 | endif # if DM_SPI | 289 | endif # if DM_SPI |
290 | 290 | ||
291 | config SOFT_SPI | 291 | config SOFT_SPI |
292 | bool "Soft SPI driver" | 292 | bool "Soft SPI driver" |
293 | help | 293 | help |
294 | Enable Soft SPI driver. This driver is to use GPIO simulate | 294 | Enable Soft SPI driver. This driver is to use GPIO simulate |
295 | the SPI protocol. | 295 | the SPI protocol. |
296 | 296 | ||
297 | config MSCC_BB_SPI | ||
298 | bool "MSCC bitbang SPI driver" | ||
299 | depends on SOC_VCOREIII | ||
300 | help | ||
301 | Enable MSCC bitbang SPI driver. This driver can be used on | ||
302 | MSCC SOCs. | ||
303 | |||
297 | config CF_SPI | 304 | config CF_SPI |
298 | bool "ColdFire SPI driver" | 305 | bool "ColdFire SPI driver" |
299 | help | 306 | help |
300 | Enable the ColdFire SPI driver. This driver can be used on | 307 | Enable the ColdFire SPI driver. This driver can be used on |
301 | some m68k SoCs. | 308 | some m68k SoCs. |
302 | 309 | ||
303 | config FSL_ESPI | 310 | config FSL_ESPI |
304 | bool "Freescale eSPI driver" | 311 | bool "Freescale eSPI driver" |
305 | help | 312 | help |
306 | Enable the Freescale eSPI driver. This driver can be used to | 313 | Enable the Freescale eSPI driver. This driver can be used to |
307 | access the SPI interface and SPI NOR flash on platforms embedding | 314 | access the SPI interface and SPI NOR flash on platforms embedding |
308 | this Freescale eSPI IP core. | 315 | this Freescale eSPI IP core. |
309 | 316 | ||
310 | config FSL_QSPI | 317 | config FSL_QSPI |
311 | bool "Freescale QSPI driver" | 318 | bool "Freescale QSPI driver" |
312 | help | 319 | help |
313 | Enable the Freescale Quad-SPI (QSPI) driver. This driver can be | 320 | Enable the Freescale Quad-SPI (QSPI) driver. This driver can be |
314 | used to access the SPI NOR flash on platforms embedding this | 321 | used to access the SPI NOR flash on platforms embedding this |
315 | Freescale IP core. | 322 | Freescale IP core. |
316 | 323 | ||
317 | config DAVINCI_SPI | 324 | config DAVINCI_SPI |
318 | bool "Davinci & Keystone SPI driver" | 325 | bool "Davinci & Keystone SPI driver" |
319 | depends on ARCH_DAVINCI || ARCH_KEYSTONE | 326 | depends on ARCH_DAVINCI || ARCH_KEYSTONE |
320 | help | 327 | help |
321 | Enable the Davinci SPI driver | 328 | Enable the Davinci SPI driver |
322 | 329 | ||
323 | config SH_SPI | 330 | config SH_SPI |
324 | bool "SuperH SPI driver" | 331 | bool "SuperH SPI driver" |
325 | help | 332 | help |
326 | Enable the SuperH SPI controller driver. This driver can be used | 333 | Enable the SuperH SPI controller driver. This driver can be used |
327 | on various SuperH SoCs, such as SH7757. | 334 | on various SuperH SoCs, such as SH7757. |
328 | 335 | ||
329 | config SH_QSPI | 336 | config SH_QSPI |
330 | bool "Renesas Quad SPI driver" | 337 | bool "Renesas Quad SPI driver" |
331 | help | 338 | help |
332 | Enable the Renesas Quad SPI controller driver. This driver can be | 339 | Enable the Renesas Quad SPI controller driver. This driver can be |
333 | used on Renesas SoCs. | 340 | used on Renesas SoCs. |
334 | 341 | ||
335 | config TI_QSPI | 342 | config TI_QSPI |
336 | bool "TI QSPI driver" | 343 | bool "TI QSPI driver" |
337 | help | 344 | help |
338 | Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms. | 345 | Enable the TI Quad-SPI (QSPI) driver for DRA7xx and AM43xx evms. |
339 | This driver support spi flash single, quad and memory reads. | 346 | This driver support spi flash single, quad and memory reads. |
340 | 347 | ||
341 | config KIRKWOOD_SPI | 348 | config KIRKWOOD_SPI |
342 | bool "Marvell Kirkwood SPI Driver" | 349 | bool "Marvell Kirkwood SPI Driver" |
343 | help | 350 | help |
344 | Enable support for SPI on various Marvell SoCs, such as | 351 | Enable support for SPI on various Marvell SoCs, such as |
345 | Kirkwood and Armada 375. | 352 | Kirkwood and Armada 375. |
346 | 353 | ||
347 | config LPC32XX_SSP | 354 | config LPC32XX_SSP |
348 | bool "LPC32XX SPI Driver" | 355 | bool "LPC32XX SPI Driver" |
349 | help | 356 | help |
350 | Enable support for SPI on LPC32xx | 357 | Enable support for SPI on LPC32xx |
351 | 358 | ||
352 | config MPC8XXX_SPI | 359 | config MPC8XXX_SPI |
353 | bool "MPC8XXX SPI Driver" | 360 | bool "MPC8XXX SPI Driver" |
354 | help | 361 | help |
355 | Enable support for SPI on the MPC8XXX PowerPC SoCs. | 362 | Enable support for SPI on the MPC8XXX PowerPC SoCs. |
356 | 363 | ||
357 | config MXC_SPI | 364 | config MXC_SPI |
358 | bool "MXC SPI Driver" | 365 | bool "MXC SPI Driver" |
359 | help | 366 | help |
360 | Enable the MXC SPI controller driver. This driver can be used | 367 | Enable the MXC SPI controller driver. This driver can be used |
361 | on various i.MX SoCs such as i.MX31/35/51/6/7. | 368 | on various i.MX SoCs such as i.MX31/35/51/6/7. |
362 | 369 | ||
363 | config MXS_SPI | 370 | config MXS_SPI |
364 | bool "MXS SPI Driver" | 371 | bool "MXS SPI Driver" |
365 | help | 372 | help |
366 | Enable the MXS SPI controller driver. This driver can be used | 373 | Enable the MXS SPI controller driver. This driver can be used |
367 | on the i.MX23 and i.MX28 SoCs. | 374 | on the i.MX23 and i.MX28 SoCs. |
368 | 375 | ||
369 | config OMAP3_SPI | 376 | config OMAP3_SPI |
370 | bool "McSPI driver for OMAP" | 377 | bool "McSPI driver for OMAP" |
371 | help | 378 | help |
372 | SPI master controller for OMAP24XX and later Multichannel SPI | 379 | SPI master controller for OMAP24XX and later Multichannel SPI |
373 | (McSPI). This driver be used to access SPI chips on platforms | 380 | (McSPI). This driver be used to access SPI chips on platforms |
374 | embedding this OMAP3 McSPI IP core. | 381 | embedding this OMAP3 McSPI IP core. |
375 | 382 | ||
376 | endif # menu "SPI Support" | 383 | endif # menu "SPI Support" |
377 | 384 |
drivers/spi/Makefile
1 | # SPDX-License-Identifier: GPL-2.0+ | 1 | # SPDX-License-Identifier: GPL-2.0+ |
2 | # | 2 | # |
3 | # (C) Copyright 2000-2007 | 3 | # (C) Copyright 2000-2007 |
4 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 4 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
5 | 5 | ||
6 | # There are many options which enable SPI, so make this library available | 6 | # There are many options which enable SPI, so make this library available |
7 | ifdef CONFIG_DM_SPI | 7 | ifdef CONFIG_DM_SPI |
8 | obj-y += spi-uclass.o | 8 | obj-y += spi-uclass.o |
9 | obj-$(CONFIG_SANDBOX) += spi-emul-uclass.o | 9 | obj-$(CONFIG_SANDBOX) += spi-emul-uclass.o |
10 | obj-$(CONFIG_SOFT_SPI) += soft_spi.o | 10 | obj-$(CONFIG_SOFT_SPI) += soft_spi.o |
11 | obj-$(CONFIG_SPI_MEM) += spi-mem.o | 11 | obj-$(CONFIG_SPI_MEM) += spi-mem.o |
12 | else | 12 | else |
13 | obj-y += spi.o | 13 | obj-y += spi.o |
14 | obj-$(CONFIG_SOFT_SPI) += soft_spi_legacy.o | 14 | obj-$(CONFIG_SOFT_SPI) += soft_spi_legacy.o |
15 | endif | 15 | endif |
16 | 16 | ||
17 | obj-$(CONFIG_ALTERA_SPI) += altera_spi.o | 17 | obj-$(CONFIG_ALTERA_SPI) += altera_spi.o |
18 | obj-$(CONFIG_ATH79_SPI) += ath79_spi.o | 18 | obj-$(CONFIG_ATH79_SPI) += ath79_spi.o |
19 | obj-$(CONFIG_ATMEL_SPI) += atmel_spi.o | 19 | obj-$(CONFIG_ATMEL_SPI) += atmel_spi.o |
20 | obj-$(CONFIG_BCM63XX_HSSPI) += bcm63xx_hsspi.o | 20 | obj-$(CONFIG_BCM63XX_HSSPI) += bcm63xx_hsspi.o |
21 | obj-$(CONFIG_BCM63XX_SPI) += bcm63xx_spi.o | 21 | obj-$(CONFIG_BCM63XX_SPI) += bcm63xx_spi.o |
22 | obj-$(CONFIG_BCMSTB_SPI) += bcmstb_spi.o | 22 | obj-$(CONFIG_BCMSTB_SPI) += bcmstb_spi.o |
23 | obj-$(CONFIG_CADENCE_QSPI) += cadence_qspi.o cadence_qspi_apb.o | 23 | obj-$(CONFIG_CADENCE_QSPI) += cadence_qspi.o cadence_qspi_apb.o |
24 | obj-$(CONFIG_CF_SPI) += cf_spi.o | 24 | obj-$(CONFIG_CF_SPI) += cf_spi.o |
25 | obj-$(CONFIG_DAVINCI_SPI) += davinci_spi.o | 25 | obj-$(CONFIG_DAVINCI_SPI) += davinci_spi.o |
26 | obj-$(CONFIG_DESIGNWARE_SPI) += designware_spi.o | 26 | obj-$(CONFIG_DESIGNWARE_SPI) += designware_spi.o |
27 | obj-$(CONFIG_EXYNOS_SPI) += exynos_spi.o | 27 | obj-$(CONFIG_EXYNOS_SPI) += exynos_spi.o |
28 | obj-$(CONFIG_FSL_DSPI) += fsl_dspi.o | 28 | obj-$(CONFIG_FSL_DSPI) += fsl_dspi.o |
29 | obj-$(CONFIG_FSL_ESPI) += fsl_espi.o | 29 | obj-$(CONFIG_FSL_ESPI) += fsl_espi.o |
30 | obj-$(CONFIG_FSL_QSPI) += fsl_qspi.o | 30 | obj-$(CONFIG_FSL_QSPI) += fsl_qspi.o |
31 | obj-$(CONFIG_ICH_SPI) += ich.o | 31 | obj-$(CONFIG_ICH_SPI) += ich.o |
32 | obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o | 32 | obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o |
33 | obj-$(CONFIG_LPC32XX_SSP) += lpc32xx_ssp.o | 33 | obj-$(CONFIG_LPC32XX_SSP) += lpc32xx_ssp.o |
34 | obj-$(CONFIG_MESON_SPIFC) += meson_spifc.o | 34 | obj-$(CONFIG_MESON_SPIFC) += meson_spifc.o |
35 | obj-$(CONFIG_MPC8XX_SPI) += mpc8xx_spi.o | 35 | obj-$(CONFIG_MPC8XX_SPI) += mpc8xx_spi.o |
36 | obj-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o | 36 | obj-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o |
37 | obj-$(CONFIG_MTK_QSPI) += mtk_qspi.o | 37 | obj-$(CONFIG_MTK_QSPI) += mtk_qspi.o |
38 | obj-$(CONFIG_MT7621_SPI) += mt7621_spi.o | 38 | obj-$(CONFIG_MT7621_SPI) += mt7621_spi.o |
39 | obj-$(CONFIG_MSCC_BB_SPI) += mscc_bb_spi.o | ||
39 | obj-$(CONFIG_MVEBU_A3700_SPI) += mvebu_a3700_spi.o | 40 | obj-$(CONFIG_MVEBU_A3700_SPI) += mvebu_a3700_spi.o |
40 | obj-$(CONFIG_MXC_SPI) += mxc_spi.o | 41 | obj-$(CONFIG_MXC_SPI) += mxc_spi.o |
41 | obj-$(CONFIG_MXS_SPI) += mxs_spi.o | 42 | obj-$(CONFIG_MXS_SPI) += mxs_spi.o |
42 | obj-$(CONFIG_ATCSPI200_SPI) += atcspi200_spi.o | 43 | obj-$(CONFIG_ATCSPI200_SPI) += atcspi200_spi.o |
43 | obj-$(CONFIG_OMAP3_SPI) += omap3_spi.o | 44 | obj-$(CONFIG_OMAP3_SPI) += omap3_spi.o |
44 | obj-$(CONFIG_PIC32_SPI) += pic32_spi.o | 45 | obj-$(CONFIG_PIC32_SPI) += pic32_spi.o |
45 | obj-$(CONFIG_PL022_SPI) += pl022_spi.o | 46 | obj-$(CONFIG_PL022_SPI) += pl022_spi.o |
46 | obj-$(CONFIG_RENESAS_RPC_SPI) += renesas_rpc_spi.o | 47 | obj-$(CONFIG_RENESAS_RPC_SPI) += renesas_rpc_spi.o |
47 | obj-$(CONFIG_ROCKCHIP_SPI) += rk_spi.o | 48 | obj-$(CONFIG_ROCKCHIP_SPI) += rk_spi.o |
48 | obj-$(CONFIG_SANDBOX_SPI) += sandbox_spi.o | 49 | obj-$(CONFIG_SANDBOX_SPI) += sandbox_spi.o |
49 | obj-$(CONFIG_SH_SPI) += sh_spi.o | 50 | obj-$(CONFIG_SH_SPI) += sh_spi.o |
50 | obj-$(CONFIG_SH_QSPI) += sh_qspi.o | 51 | obj-$(CONFIG_SH_QSPI) += sh_qspi.o |
51 | obj-$(CONFIG_STM32_QSPI) += stm32_qspi.o | 52 | obj-$(CONFIG_STM32_QSPI) += stm32_qspi.o |
52 | obj-$(CONFIG_SUN4I_SPI) += sun4i_spi.o | 53 | obj-$(CONFIG_SUN4I_SPI) += sun4i_spi.o |
53 | obj-$(CONFIG_TEGRA114_SPI) += tegra114_spi.o | 54 | obj-$(CONFIG_TEGRA114_SPI) += tegra114_spi.o |
54 | obj-$(CONFIG_TEGRA20_SFLASH) += tegra20_sflash.o | 55 | obj-$(CONFIG_TEGRA20_SFLASH) += tegra20_sflash.o |
55 | obj-$(CONFIG_TEGRA20_SLINK) += tegra20_slink.o | 56 | obj-$(CONFIG_TEGRA20_SLINK) += tegra20_slink.o |
56 | obj-$(CONFIG_TEGRA210_QSPI) += tegra210_qspi.o | 57 | obj-$(CONFIG_TEGRA210_QSPI) += tegra210_qspi.o |
57 | obj-$(CONFIG_TI_QSPI) += ti_qspi.o | 58 | obj-$(CONFIG_TI_QSPI) += ti_qspi.o |
58 | obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o | 59 | obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o |
59 | obj-$(CONFIG_ZYNQ_SPI) += zynq_spi.o | 60 | obj-$(CONFIG_ZYNQ_SPI) += zynq_spi.o |
60 | obj-$(CONFIG_ZYNQ_QSPI) += zynq_qspi.o | 61 | obj-$(CONFIG_ZYNQ_QSPI) += zynq_qspi.o |
61 | obj-$(CONFIG_ZYNQMP_GQSPI) += zynqmp_gqspi.o | 62 | obj-$(CONFIG_ZYNQMP_GQSPI) += zynqmp_gqspi.o |
62 | 63 |
drivers/spi/mscc_bb_spi.c
File was created | 1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | |
2 | /* | ||
3 | * Microsemi SoCs spi driver | ||
4 | * | ||
5 | * Copyright (c) 2018 Microsemi Corporation | ||
6 | */ | ||
7 | |||
8 | #include <common.h> | ||
9 | #include <dm.h> | ||
10 | #include <errno.h> | ||
11 | #include <malloc.h> | ||
12 | #include <spi.h> | ||
13 | #include <dm.h> | ||
14 | #include <asm/gpio.h> | ||
15 | #include <asm/io.h> | ||
16 | #include <linux/delay.h> | ||
17 | |||
18 | struct mscc_bb_priv { | ||
19 | void __iomem *regs; | ||
20 | u32 deactivate_delay_us; | ||
21 | bool cs_active; /* State flag as to whether CS is asserted */ | ||
22 | int cs_num; | ||
23 | u32 svalue; /* Value to start transfer with */ | ||
24 | u32 clk1; /* Clock value start */ | ||
25 | u32 clk2; /* Clock value 2nd phase */ | ||
26 | }; | ||
27 | |||
28 | /* Delay 24 instructions for this particular application */ | ||
29 | #define hold_time_delay() mscc_vcoreiii_nop_delay(3) | ||
30 | |||
31 | static int mscc_bb_spi_cs_activate(struct mscc_bb_priv *priv, int mode, int cs) | ||
32 | { | ||
33 | if (!priv->cs_active) { | ||
34 | int cpha = mode & SPI_CPHA; | ||
35 | u32 cs_value; | ||
36 | |||
37 | priv->cs_num = cs; | ||
38 | |||
39 | if (cpha) { | ||
40 | /* Initial clock starts SCK=1 */ | ||
41 | priv->clk1 = ICPU_SW_MODE_SW_SPI_SCK; | ||
42 | priv->clk2 = 0; | ||
43 | } else { | ||
44 | /* Initial clock starts SCK=0 */ | ||
45 | priv->clk1 = 0; | ||
46 | priv->clk2 = ICPU_SW_MODE_SW_SPI_SCK; | ||
47 | } | ||
48 | |||
49 | /* Enable bitbang, SCK_OE, SDO_OE */ | ||
50 | priv->svalue = (ICPU_SW_MODE_SW_PIN_CTRL_MODE | /* Bitbang */ | ||
51 | ICPU_SW_MODE_SW_SPI_SCK_OE | /* SCK_OE */ | ||
52 | ICPU_SW_MODE_SW_SPI_SDO_OE); /* SDO OE */ | ||
53 | |||
54 | /* Add CS */ | ||
55 | if (cs >= 0) { | ||
56 | cs_value = | ||
57 | ICPU_SW_MODE_SW_SPI_CS_OE(BIT(cs)) | | ||
58 | ICPU_SW_MODE_SW_SPI_CS(BIT(cs)); | ||
59 | } else { | ||
60 | cs_value = 0; | ||
61 | } | ||
62 | |||
63 | priv->svalue |= cs_value; | ||
64 | |||
65 | /* Enable the CS in HW, Initial clock value */ | ||
66 | writel(priv->svalue | priv->clk2, priv->regs); | ||
67 | |||
68 | priv->cs_active = true; | ||
69 | debug("Activated CS%d\n", priv->cs_num); | ||
70 | } | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static int mscc_bb_spi_cs_deactivate(struct mscc_bb_priv *priv, int deact_delay) | ||
76 | { | ||
77 | if (priv->cs_active) { | ||
78 | /* Keep driving the CLK to its current value while | ||
79 | * actively deselecting CS. | ||
80 | */ | ||
81 | u32 value = readl(priv->regs); | ||
82 | |||
83 | value &= ~ICPU_SW_MODE_SW_SPI_CS_M; | ||
84 | writel(value, priv->regs); | ||
85 | hold_time_delay(); | ||
86 | |||
87 | /* Stop driving the clock, but keep CS with nCS == 1 */ | ||
88 | value &= ~ICPU_SW_MODE_SW_SPI_SCK_OE; | ||
89 | writel(value, priv->regs); | ||
90 | |||
91 | /* Deselect hold time delay */ | ||
92 | if (deact_delay) | ||
93 | udelay(deact_delay); | ||
94 | |||
95 | /* Drop everything */ | ||
96 | writel(0, priv->regs); | ||
97 | |||
98 | priv->cs_active = false; | ||
99 | debug("Deactivated CS%d\n", priv->cs_num); | ||
100 | } | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | int mscc_bb_spi_claim_bus(struct udevice *dev) | ||
106 | { | ||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | int mscc_bb_spi_release_bus(struct udevice *dev) | ||
111 | { | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | int mscc_bb_spi_xfer(struct udevice *dev, unsigned int bitlen, | ||
116 | const void *dout, void *din, unsigned long flags) | ||
117 | { | ||
118 | struct udevice *bus = dev_get_parent(dev); | ||
119 | struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); | ||
120 | struct mscc_bb_priv *priv = dev_get_priv(bus); | ||
121 | u32 i, count; | ||
122 | const u8 *txd = dout; | ||
123 | u8 *rxd = din; | ||
124 | |||
125 | debug("spi_xfer: slave %s:%s cs%d mode %d, dout %p din %p bitlen %u\n", | ||
126 | dev->parent->name, dev->name, plat->cs, plat->mode, dout, | ||
127 | din, bitlen); | ||
128 | |||
129 | if (flags & SPI_XFER_BEGIN) | ||
130 | mscc_bb_spi_cs_activate(priv, plat->mode, plat->cs); | ||
131 | |||
132 | count = bitlen / 8; | ||
133 | for (i = 0; i < count; i++) { | ||
134 | u32 rx = 0, mask = 0x80, value; | ||
135 | |||
136 | while (mask) { | ||
137 | /* Initial condition: CLK is low. */ | ||
138 | value = priv->svalue; | ||
139 | if (txd && txd[i] & mask) | ||
140 | value |= ICPU_SW_MODE_SW_SPI_SDO; | ||
141 | |||
142 | /* Drive data while taking CLK low. The device | ||
143 | * we're accessing will sample on the | ||
144 | * following rising edge and will output data | ||
145 | * on this edge for us to be sampled at the | ||
146 | * end of this loop. | ||
147 | */ | ||
148 | writel(value | priv->clk1, priv->regs); | ||
149 | |||
150 | /* Wait for t_setup. All devices do have a | ||
151 | * setup-time, so we always insert some delay | ||
152 | * here. Some devices have a very long | ||
153 | * setup-time, which can be adjusted by the | ||
154 | * user through vcoreiii_device->delay. | ||
155 | */ | ||
156 | hold_time_delay(); | ||
157 | |||
158 | /* Drive the clock high. */ | ||
159 | writel(value | priv->clk2, priv->regs); | ||
160 | |||
161 | /* Wait for t_hold. See comment about t_setup | ||
162 | * above. | ||
163 | */ | ||
164 | hold_time_delay(); | ||
165 | |||
166 | /* We sample as close to the next falling edge | ||
167 | * as possible. | ||
168 | */ | ||
169 | value = readl(priv->regs); | ||
170 | if (value & ICPU_SW_MODE_SW_SPI_SDI) | ||
171 | rx |= mask; | ||
172 | mask >>= 1; | ||
173 | } | ||
174 | if (rxd) { | ||
175 | debug("Read 0x%02x\n", rx); | ||
176 | rxd[i] = (u8)rx; | ||
177 | } | ||
178 | debug("spi_xfer: byte %d/%d\n", i + 1, count); | ||
179 | } | ||
180 | |||
181 | debug("spi_xfer: done\n"); | ||
182 | |||
183 | if (flags & SPI_XFER_END) | ||
184 | mscc_bb_spi_cs_deactivate(priv, priv->deactivate_delay_us); | ||
185 | |||
186 | return 0; | ||
187 | } | ||
188 | |||
189 | int mscc_bb_spi_set_speed(struct udevice *dev, unsigned int speed) | ||
190 | { | ||
191 | /* Accept any speed */ | ||
192 | return 0; | ||
193 | } | ||
194 | |||
195 | int mscc_bb_spi_set_mode(struct udevice *dev, unsigned int mode) | ||
196 | { | ||
197 | return 0; | ||
198 | } | ||
199 | |||
200 | static const struct dm_spi_ops mscc_bb_ops = { | ||
201 | .claim_bus = mscc_bb_spi_claim_bus, | ||
202 | .release_bus = mscc_bb_spi_release_bus, | ||
203 | .xfer = mscc_bb_spi_xfer, | ||
204 | .set_speed = mscc_bb_spi_set_speed, | ||
205 | .set_mode = mscc_bb_spi_set_mode, | ||
206 | }; | ||
207 | |||
208 | static const struct udevice_id mscc_bb_ids[] = { | ||
209 | { .compatible = "mscc,luton-bb-spi" }, | ||
210 | { } | ||
211 | }; | ||
212 | |||
213 | static int mscc_bb_spi_probe(struct udevice *bus) | ||
214 | { | ||
215 | struct mscc_bb_priv *priv = dev_get_priv(bus); | ||
216 | |||
217 | debug("%s: loaded, priv %p\n", __func__, priv); | ||
218 | |||
219 | priv->regs = (void __iomem *)dev_read_addr(bus); | ||
220 | |||
221 | priv->deactivate_delay_us = | ||
222 | dev_read_u32_default(bus, "spi-deactivate-delay", 0); | ||
223 | |||
224 | priv->cs_active = false; | ||
225 | |||
226 | return 0; | ||
227 | } | ||
228 | |||
229 | U_BOOT_DRIVER(mscc_bb) = { | ||
230 | .name = "mscc_bb", | ||
231 | .id = UCLASS_SPI, | ||
232 | .of_match = mscc_bb_ids, | ||
233 | .ops = &mscc_bb_ops, | ||
234 | .priv_auto_alloc_size = sizeof(struct mscc_bb_priv), | ||
235 | .probe = mscc_bb_spi_probe, | ||
236 | }; | ||
237 |
include/configs/vcoreiii.h
1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Microsemi Corporation | 3 | * Copyright (c) 2018 Microsemi Corporation |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __VCOREIII_H | 6 | #ifndef __VCOREIII_H |
7 | #define __VCOREIII_H | 7 | #define __VCOREIII_H |
8 | 8 | ||
9 | #include <linux/sizes.h> | 9 | #include <linux/sizes.h> |
10 | 10 | ||
11 | /* Onboard devices */ | 11 | /* Onboard devices */ |
12 | 12 | ||
13 | #define CONFIG_SYS_MALLOC_LEN 0x100000 | 13 | #define CONFIG_SYS_MALLOC_LEN 0x100000 |
14 | #define CONFIG_SYS_LOAD_ADDR 0x00100000 | 14 | #define CONFIG_SYS_LOAD_ADDR 0x00100000 |
15 | #define CONFIG_SYS_INIT_SP_OFFSET 0x400000 | 15 | #define CONFIG_SYS_INIT_SP_OFFSET 0x400000 |
16 | 16 | ||
17 | #define CPU_CLOCK_RATE 500000000 /* Clock for the MIPS core */ | 17 | #define CPU_CLOCK_RATE 500000000 /* Clock for the MIPS core */ |
18 | #ifdef CONFIG_SOC_LUTON | 18 | #ifdef CONFIG_SOC_LUTON |
19 | #define CONFIG_SYS_MIPS_TIMER_FREQ 208333333 | 19 | #define CONFIG_SYS_MIPS_TIMER_FREQ 208333333 |
20 | #else | 20 | #else |
21 | #define CONFIG_SYS_MIPS_TIMER_FREQ (CPU_CLOCK_RATE / 2) | 21 | #define CONFIG_SYS_MIPS_TIMER_FREQ (CPU_CLOCK_RATE / 2) |
22 | #endif | 22 | #endif |
23 | #define CONFIG_SYS_NS16550_CLK CONFIG_SYS_MIPS_TIMER_FREQ | 23 | #define CONFIG_SYS_NS16550_CLK CONFIG_SYS_MIPS_TIMER_FREQ |
24 | 24 | ||
25 | #define CONFIG_BOARD_TYPES | ||
26 | |||
25 | #if defined(CONFIG_ENV_IS_IN_SPI_FLASH) && !defined(CONFIG_ENV_OFFSET) | 27 | #if defined(CONFIG_ENV_IS_IN_SPI_FLASH) && !defined(CONFIG_ENV_OFFSET) |
26 | #define CONFIG_ENV_OFFSET (1024 * 1024) | 28 | #define CONFIG_ENV_OFFSET (1024 * 1024) |
27 | #define CONFIG_ENV_SIZE (256 * 1024) | 29 | #define CONFIG_ENV_SIZE (256 * 1024) |
28 | #define CONFIG_ENV_SECT_SIZE (256 * 1024) | 30 | #define CONFIG_ENV_SECT_SIZE (256 * 1024) |
29 | 31 | ||
30 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT | 32 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
31 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE | 33 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE |
32 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SECT_SIZE) | 34 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SECT_SIZE) |
33 | 35 | ||
34 | #define CONFIG_ENV_SPI_MAX_HZ 0 /* This force to read from DT */ | 36 | #define CONFIG_ENV_SPI_MAX_HZ 0 /* This force to read from DT */ |
35 | #define CONFIG_ENV_SPI_MODE 0 /* This force to read from DT */ | 37 | #define CONFIG_ENV_SPI_MODE 0 /* This force to read from DT */ |
36 | #endif | 38 | #endif |
37 | 39 | ||
38 | #define CONFIG_SYS_SDRAM_BASE 0x80000000 | 40 | #define CONFIG_SYS_SDRAM_BASE 0x80000000 |
39 | #if defined(CONFIG_DDRTYPE_H5TQ1G63BFA) || defined(CONFIG_DDRTYPE_MT47H128M8HQ) | 41 | #if defined(CONFIG_DDRTYPE_H5TQ1G63BFA) || defined(CONFIG_DDRTYPE_MT47H128M8HQ) |
40 | #define CONFIG_SYS_SDRAM_SIZE (128 * SZ_1M) | 42 | #define CONFIG_SYS_SDRAM_SIZE (128 * SZ_1M) |
41 | #elif defined(CONFIG_DDRTYPE_MT41J128M16HA) || defined(CONFIG_DDRTYPE_MT41K128M16JT) | 43 | #elif defined(CONFIG_DDRTYPE_MT41J128M16HA) || defined(CONFIG_DDRTYPE_MT41K128M16JT) |
42 | #define CONFIG_SYS_SDRAM_SIZE (256 * SZ_1M) | 44 | #define CONFIG_SYS_SDRAM_SIZE (256 * SZ_1M) |
43 | #elif defined(CONFIG_DDRTYPE_H5TQ4G63MFR) || defined(CONFIG_DDRTYPE_MT41K256M16) | 45 | #elif defined(CONFIG_DDRTYPE_H5TQ4G63MFR) || defined(CONFIG_DDRTYPE_MT41K256M16) |
44 | #define CONFIG_SYS_SDRAM_SIZE (512 * SZ_1M) | 46 | #define CONFIG_SYS_SDRAM_SIZE (512 * SZ_1M) |
45 | #else | 47 | #else |
46 | #error Unknown DDR size - please add! | 48 | #error Unknown DDR size - please add! |
47 | #endif | 49 | #endif |
48 | 50 | ||
49 | #define CONFIG_CONS_INDEX 1 | 51 | #define CONFIG_CONS_INDEX 1 |
50 | 52 | ||
51 | #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE | 53 | #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE |
52 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE - SZ_1M) | 54 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE - SZ_1M) |
53 | 55 | ||
54 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE | 56 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE |
55 | 57 | ||
56 | #define CONFIG_BOARD_EARLY_INIT_R | 58 | #define CONFIG_BOARD_EARLY_INIT_R |
57 | #if defined(CONFIG_MTDIDS_DEFAULT) && defined(CONFIG_MTDPARTS_DEFAULT) | 59 | #if defined(CONFIG_MTDIDS_DEFAULT) && defined(CONFIG_MTDPARTS_DEFAULT) |
58 | #define VCOREIII_DEFAULT_MTD_ENV \ | 60 | #define VCOREIII_DEFAULT_MTD_ENV \ |
59 | "mtdparts="CONFIG_MTDPARTS_DEFAULT"\0" \ | 61 | "mtdparts="CONFIG_MTDPARTS_DEFAULT"\0" \ |
60 | "mtdids="CONFIG_MTDIDS_DEFAULT"\0" | 62 | "mtdids="CONFIG_MTDIDS_DEFAULT"\0" |
61 | #else | 63 | #else |
62 | #define VCOREIII_DEFAULT_MTD_ENV /* Go away */ | 64 | #define VCOREIII_DEFAULT_MTD_ENV /* Go away */ |
63 | #endif | 65 | #endif |
64 | 66 | ||
65 | #define CONFIG_SYS_BOOTM_LEN (16 << 20) /* Increase max gunzip size */ | 67 | #define CONFIG_SYS_BOOTM_LEN (16 << 20) /* Increase max gunzip size */ |
66 | 68 | ||
67 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 69 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
68 | VCOREIII_DEFAULT_MTD_ENV \ | 70 | VCOREIII_DEFAULT_MTD_ENV \ |
69 | "loadaddr=0x81000000\0" \ | 71 | "loadaddr=0x81000000\0" \ |
70 | "spi_image_off=0x00100000\0" \ | 72 | "spi_image_off=0x00100000\0" \ |
71 | "console=ttyS0,115200\0" \ | 73 | "console=ttyS0,115200\0" \ |
72 | "setup=setenv bootargs console=${console} ${mtdparts}" \ | 74 | "setup=setenv bootargs console=${console} ${mtdparts}" \ |
73 | "${bootargs_extra}\0" \ | 75 | "${bootargs_extra}\0" \ |
74 | "spiboot=run setup; sf probe; sf read ${loadaddr}" \ | 76 | "spiboot=run setup; sf probe; sf read ${loadaddr}" \ |
75 | "${spi_image_off} 0x600000; bootm ${loadaddr}\0" \ | 77 | "${spi_image_off} 0x600000; bootm ${loadaddr}\0" \ |
76 | "ubootfile=u-boot.bin\0" \ | 78 | "ubootfile=u-boot.bin\0" \ |
77 | "update=sf probe;mtdparts;dhcp ${loadaddr} ${ubootfile};" \ | 79 | "update=sf probe;mtdparts;dhcp ${loadaddr} ${ubootfile};" \ |
78 | "sf erase UBoot 0x100000;" \ | 80 | "sf erase UBoot 0x100000;" \ |
79 | "sf write ${loadaddr} UBoot ${filesize}\0" \ | 81 | "sf write ${loadaddr} UBoot ${filesize}\0" \ |
80 | "bootcmd=run spiboot\0" \ | 82 | "bootcmd=run spiboot\0" \ |
81 | "" | 83 | "" |
82 | #endif /* __VCOREIII_H */ | 84 | #endif /* __VCOREIII_H */ |
83 | 85 |