Commit 8df378888774862b14e956524c7e4545b2b07411

Authored by Álvaro Fernández Rojas
Committed by Daniel Schwierzeck
1 parent 07661e7f50

MIPS: add BMIPS Sagem F@ST1704 board

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

Showing 9 changed files with 160 additions and 0 deletions Inline Diff

arch/mips/dts/Makefile
1 # 1 #
2 # SPDX-License-Identifier: GPL-2.0+ 2 # SPDX-License-Identifier: GPL-2.0+
3 # 3 #
4 4
5 dtb-$(CONFIG_TARGET_AP121) += ap121.dtb 5 dtb-$(CONFIG_TARGET_AP121) += ap121.dtb
6 dtb-$(CONFIG_TARGET_AP143) += ap143.dtb 6 dtb-$(CONFIG_TARGET_AP143) += ap143.dtb
7 dtb-$(CONFIG_TARGET_BOSTON) += img,boston.dtb 7 dtb-$(CONFIG_TARGET_BOSTON) += img,boston.dtb
8 dtb-$(CONFIG_TARGET_MALTA) += mti,malta.dtb 8 dtb-$(CONFIG_TARGET_MALTA) += mti,malta.dtb
9 dtb-$(CONFIG_TARGET_PIC32MZDASK) += pic32mzda_sk.dtb 9 dtb-$(CONFIG_TARGET_PIC32MZDASK) += pic32mzda_sk.dtb
10 dtb-$(CONFIG_TARGET_XILFPGA) += nexys4ddr.dtb 10 dtb-$(CONFIG_TARGET_XILFPGA) += nexys4ddr.dtb
11 dtb-$(CONFIG_BOARD_COMTREND_AR5387UN) += comtrend,ar-5387un.dtb 11 dtb-$(CONFIG_BOARD_COMTREND_AR5387UN) += comtrend,ar-5387un.dtb
12 dtb-$(CONFIG_BOARD_COMTREND_CT5361) += comtrend,ct-5361.dtb 12 dtb-$(CONFIG_BOARD_COMTREND_CT5361) += comtrend,ct-5361.dtb
13 dtb-$(CONFIG_BOARD_COMTREND_VR3032U) += comtrend,vr-3032u.dtb 13 dtb-$(CONFIG_BOARD_COMTREND_VR3032U) += comtrend,vr-3032u.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_SAGEM_FAST1704) += sagem,f@st1704.dtb
16 dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb 17 dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb
17 18
18 targets += $(dtb-y) 19 targets += $(dtb-y)
19 20
20 # Add any required device tree compiler flags here 21 # Add any required device tree compiler flags here
21 DTC_FLAGS += 22 DTC_FLAGS +=
22 23
23 PHONY += dtbs 24 PHONY += dtbs
24 dtbs: $(addprefix $(obj)/, $(dtb-y)) 25 dtbs: $(addprefix $(obj)/, $(dtb-y))
25 @: 26 @:
26 27
27 clean-files := *.dtb 28 clean-files := *.dtb
28 29
arch/mips/dts/sagem,f@st1704.dts
File was created 1 /*
2 * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7 /dts-v1/;
8
9 #include "brcm,bcm6338.dtsi"
10
11 / {
12 model = "Sagem F@ST1704";
13 compatible = "sagem,f@st1704", "brcm,bcm6338";
14
15 aliases {
16 serial0 = &uart0;
17 };
18
19 chosen {
20 stdout-path = "serial0:115200n8";
21 };
22
23 gpio-leds {
24 compatible = "gpio-leds";
25
26 inet_green {
27 label = "F@ST1704:green:inet";
28 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
29 };
30
31 power_green {
32 label = "F@ST1704:green:power";
33 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
34 };
35
36 inet_red {
37 label = "F@ST1704:red:inet";
38 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
39 };
40 };
41 };
42
43 &gpio {
44 status = "okay";
45 };
46
47 &uart0 {
48 u-boot,dm-pre-reloc;
49 status = "okay";
50 };
51
arch/mips/mach-bmips/Kconfig
1 menu "Broadcom MIPS platforms" 1 menu "Broadcom MIPS platforms"
2 depends on ARCH_BMIPS 2 depends on ARCH_BMIPS
3 3
4 config SYS_SOC 4 config SYS_SOC
5 default "bcm3380" if SOC_BMIPS_BCM3380 5 default "bcm3380" if SOC_BMIPS_BCM3380
6 default "bcm6328" if SOC_BMIPS_BCM6328 6 default "bcm6328" if SOC_BMIPS_BCM6328
7 default "bcm6338" if SOC_BMIPS_BCM6338 7 default "bcm6338" if SOC_BMIPS_BCM6338
8 default "bcm6348" if SOC_BMIPS_BCM6348 8 default "bcm6348" if SOC_BMIPS_BCM6348
9 default "bcm6358" if SOC_BMIPS_BCM6358 9 default "bcm6358" if SOC_BMIPS_BCM6358
10 default "bcm63268" if SOC_BMIPS_BCM63268 10 default "bcm63268" if SOC_BMIPS_BCM63268
11 11
12 choice 12 choice
13 prompt "Broadcom MIPS SoC select" 13 prompt "Broadcom MIPS SoC select"
14 14
15 config SOC_BMIPS_BCM3380 15 config SOC_BMIPS_BCM3380
16 bool "BMIPS BCM3380 family" 16 bool "BMIPS BCM3380 family"
17 select SUPPORTS_BIG_ENDIAN 17 select SUPPORTS_BIG_ENDIAN
18 select SUPPORTS_CPU_MIPS32_R1 18 select SUPPORTS_CPU_MIPS32_R1
19 select MIPS_TUNE_4KC 19 select MIPS_TUNE_4KC
20 select MIPS_L1_CACHE_SHIFT_4 20 select MIPS_L1_CACHE_SHIFT_4
21 select SWAP_IO_SPACE 21 select SWAP_IO_SPACE
22 select SYSRESET_WATCHDOG 22 select SYSRESET_WATCHDOG
23 help 23 help
24 This supports BMIPS BCM3380 family. 24 This supports BMIPS BCM3380 family.
25 25
26 config SOC_BMIPS_BCM6328 26 config SOC_BMIPS_BCM6328
27 bool "BMIPS BCM6328 family" 27 bool "BMIPS BCM6328 family"
28 select SUPPORTS_BIG_ENDIAN 28 select SUPPORTS_BIG_ENDIAN
29 select SUPPORTS_CPU_MIPS32_R1 29 select SUPPORTS_CPU_MIPS32_R1
30 select MIPS_TUNE_4KC 30 select MIPS_TUNE_4KC
31 select MIPS_L1_CACHE_SHIFT_4 31 select MIPS_L1_CACHE_SHIFT_4
32 select SWAP_IO_SPACE 32 select SWAP_IO_SPACE
33 select SYSRESET_SYSCON 33 select SYSRESET_SYSCON
34 help 34 help
35 This supports BMIPS BCM6328 family including BCM63281 and BCM63283. 35 This supports BMIPS BCM6328 family including BCM63281 and BCM63283.
36 36
37 config SOC_BMIPS_BCM6338 37 config SOC_BMIPS_BCM6338
38 bool "BMIPS BCM6338 family" 38 bool "BMIPS BCM6338 family"
39 select SUPPORTS_BIG_ENDIAN 39 select SUPPORTS_BIG_ENDIAN
40 select SUPPORTS_CPU_MIPS32_R1 40 select SUPPORTS_CPU_MIPS32_R1
41 select MIPS_TUNE_4KC 41 select MIPS_TUNE_4KC
42 select MIPS_L1_CACHE_SHIFT_4 42 select MIPS_L1_CACHE_SHIFT_4
43 select SWAP_IO_SPACE 43 select SWAP_IO_SPACE
44 select SYSRESET_SYSCON 44 select SYSRESET_SYSCON
45 help 45 help
46 This supports BMIPS BCM6338 family. 46 This supports BMIPS BCM6338 family.
47 47
48 config SOC_BMIPS_BCM6348 48 config SOC_BMIPS_BCM6348
49 bool "BMIPS BCM6348 family" 49 bool "BMIPS BCM6348 family"
50 select SUPPORTS_BIG_ENDIAN 50 select SUPPORTS_BIG_ENDIAN
51 select SUPPORTS_CPU_MIPS32_R1 51 select SUPPORTS_CPU_MIPS32_R1
52 select MIPS_TUNE_4KC 52 select MIPS_TUNE_4KC
53 select MIPS_L1_CACHE_SHIFT_4 53 select MIPS_L1_CACHE_SHIFT_4
54 select SWAP_IO_SPACE 54 select SWAP_IO_SPACE
55 select SYSRESET_WATCHDOG 55 select SYSRESET_WATCHDOG
56 help 56 help
57 This supports BMIPS BCM6348 family. 57 This supports BMIPS BCM6348 family.
58 58
59 config SOC_BMIPS_BCM6358 59 config SOC_BMIPS_BCM6358
60 bool "BMIPS BCM6358 family" 60 bool "BMIPS BCM6358 family"
61 select SUPPORTS_BIG_ENDIAN 61 select SUPPORTS_BIG_ENDIAN
62 select SUPPORTS_CPU_MIPS32_R1 62 select SUPPORTS_CPU_MIPS32_R1
63 select MIPS_TUNE_4KC 63 select MIPS_TUNE_4KC
64 select MIPS_L1_CACHE_SHIFT_4 64 select MIPS_L1_CACHE_SHIFT_4
65 select SWAP_IO_SPACE 65 select SWAP_IO_SPACE
66 select SYSRESET_SYSCON 66 select SYSRESET_SYSCON
67 help 67 help
68 This supports BMIPS BCM6358 family including BCM6358 and BCM6359. 68 This supports BMIPS BCM6358 family including BCM6358 and BCM6359.
69 69
70 config SOC_BMIPS_BCM63268 70 config SOC_BMIPS_BCM63268
71 bool "BMIPS BCM63268 family" 71 bool "BMIPS BCM63268 family"
72 select SUPPORTS_BIG_ENDIAN 72 select SUPPORTS_BIG_ENDIAN
73 select SUPPORTS_CPU_MIPS32_R1 73 select SUPPORTS_CPU_MIPS32_R1
74 select MIPS_TUNE_4KC 74 select MIPS_TUNE_4KC
75 select MIPS_L1_CACHE_SHIFT_4 75 select MIPS_L1_CACHE_SHIFT_4
76 select SWAP_IO_SPACE 76 select SWAP_IO_SPACE
77 select SYSRESET_SYSCON 77 select SYSRESET_SYSCON
78 help 78 help
79 This supports BMIPS BCM63268 family including BCM63168, BCM63169, 79 This supports BMIPS BCM63268 family including BCM63168, BCM63169,
80 BCM63268 and BCM63269. 80 BCM63268 and BCM63269.
81 81
82 endchoice 82 endchoice
83 83
84 choice 84 choice
85 prompt "Board select" 85 prompt "Board select"
86 86
87 config BOARD_COMTREND_AR5387UN 87 config BOARD_COMTREND_AR5387UN
88 bool "Comtrend AR-5387un" 88 bool "Comtrend AR-5387un"
89 depends on SOC_BMIPS_BCM6328 89 depends on SOC_BMIPS_BCM6328
90 select BMIPS_SUPPORTS_BOOT_RAM 90 select BMIPS_SUPPORTS_BOOT_RAM
91 91
92 config BOARD_COMTREND_CT5361 92 config BOARD_COMTREND_CT5361
93 bool "Comtrend CT-5361" 93 bool "Comtrend CT-5361"
94 depends on SOC_BMIPS_BCM6348 94 depends on SOC_BMIPS_BCM6348
95 select BMIPS_SUPPORTS_BOOT_RAM 95 select BMIPS_SUPPORTS_BOOT_RAM
96 help 96 help
97 Comtrend CT-5361 boards have a BCM6348 SoC with 16 MB of RAM and 4 MB 97 Comtrend CT-5361 boards have a BCM6348 SoC with 16 MB of RAM and 4 MB
98 of flash (CFI). 98 of flash (CFI).
99 Between its different peripherals there's a BCM5325 switch with 4 99 Between its different peripherals there's a BCM5325 switch with 4
100 ethernet ports, 1 USB port, 1 UART, GPIO buttons and LEDs, and a 100 ethernet ports, 1 USB port, 1 UART, GPIO buttons and LEDs, and a
101 BCM4312 (miniPCI). 101 BCM4312 (miniPCI).
102 102
103 config BOARD_COMTREND_VR3032U 103 config BOARD_COMTREND_VR3032U
104 bool "Comtrend VR-3032u board" 104 bool "Comtrend VR-3032u board"
105 depends on SOC_BMIPS_BCM63268 105 depends on SOC_BMIPS_BCM63268
106 select BMIPS_SUPPORTS_BOOT_RAM 106 select BMIPS_SUPPORTS_BOOT_RAM
107 107
108 config BOARD_HUAWEI_HG556A 108 config BOARD_HUAWEI_HG556A
109 bool "Huawei EchoLife HG556a" 109 bool "Huawei EchoLife HG556a"
110 depends on SOC_BMIPS_BCM6358 110 depends on SOC_BMIPS_BCM6358
111 select BMIPS_SUPPORTS_BOOT_RAM 111 select BMIPS_SUPPORTS_BOOT_RAM
112 112
113 config BOARD_NETGEAR_CG3100D 113 config BOARD_NETGEAR_CG3100D
114 bool "Netgear CG3100D" 114 bool "Netgear CG3100D"
115 depends on SOC_BMIPS_BCM3380 115 depends on SOC_BMIPS_BCM3380
116 select BMIPS_SUPPORTS_BOOT_RAM 116 select BMIPS_SUPPORTS_BOOT_RAM
117 help 117 help
118 Netgear CG3100D boards have a BCM3380 SoC with 64 MB of RAM and 8 MB 118 Netgear CG3100D boards have a BCM3380 SoC with 64 MB of RAM and 8 MB
119 of flash (SPI). 119 of flash (SPI).
120 Between its different peripherals there's a BCM53115 switch with 4 120 Between its different peripherals there's a BCM53115 switch with 4
121 ethernet ports, 1 UART, GPIO buttons and LEDs, and a BCM43225 121 ethernet ports, 1 UART, GPIO buttons and LEDs, and a BCM43225
122 (miniPCIe). 122 (miniPCIe).
123 123
124 config BOARD_SAGEM_FAST1704
125 bool "Sagem F@ST1704"
126 depends on SOC_BMIPS_BCM6338
127 select BMIPS_SUPPORTS_BOOT_RAM
128 help
129 Sagem F@ST1704 boards have a BCM6338 SoC with 16 MB of RAM and 4 MB
130 of flash (SPI).
131 Between its different peripherals there's a BCM5325 switch with 4
132 ethernet ports, 1 UART, GPIO buttons and LEDs, and a BCM4312
133 (miniPCI).
134
124 config BOARD_SFR_NB4_SER 135 config BOARD_SFR_NB4_SER
125 bool "SFR NeufBox 4 (Sercomm)" 136 bool "SFR NeufBox 4 (Sercomm)"
126 depends on SOC_BMIPS_BCM6358 137 depends on SOC_BMIPS_BCM6358
127 select BMIPS_SUPPORTS_BOOT_RAM 138 select BMIPS_SUPPORTS_BOOT_RAM
128 139
129 endchoice 140 endchoice
130 141
131 choice 142 choice
132 prompt "Boot mode" 143 prompt "Boot mode"
133 144
134 config BMIPS_BOOT_RAM 145 config BMIPS_BOOT_RAM
135 bool "RAM boot" 146 bool "RAM boot"
136 depends on BMIPS_SUPPORTS_BOOT_RAM 147 depends on BMIPS_SUPPORTS_BOOT_RAM
137 help 148 help
138 This builds an image that is linked to a RAM address. It can be used 149 This builds an image that is linked to a RAM address. It can be used
139 for booting from CFE via TFTP using an ELF image, but it can also be 150 for booting from CFE via TFTP using an ELF image, but it can also be
140 booted from RAM by other bootloaders using a BIN image. 151 booted from RAM by other bootloaders using a BIN image.
141 152
142 endchoice 153 endchoice
143 154
144 config BMIPS_SUPPORTS_BOOT_RAM 155 config BMIPS_SUPPORTS_BOOT_RAM
145 bool 156 bool
146 157
147 source "board/comtrend/ar5387un/Kconfig" 158 source "board/comtrend/ar5387un/Kconfig"
148 source "board/comtrend/ct5361/Kconfig" 159 source "board/comtrend/ct5361/Kconfig"
149 source "board/comtrend/vr3032u/Kconfig" 160 source "board/comtrend/vr3032u/Kconfig"
150 source "board/huawei/hg556a/Kconfig" 161 source "board/huawei/hg556a/Kconfig"
151 source "board/netgear/cg3100d/Kconfig" 162 source "board/netgear/cg3100d/Kconfig"
163 source "board/sagem/f@st1704/Kconfig"
152 source "board/sfr/nb4_ser/Kconfig" 164 source "board/sfr/nb4_ser/Kconfig"
153 165
154 endmenu 166 endmenu
155 167
board/sagem/f@st1704/Kconfig
File was created 1 if BOARD_SAGEM_FAST1704
2
3 config SYS_BOARD
4 default "f@st1704"
5
6 config SYS_VENDOR
7 default "sagem"
8
9 config SYS_CONFIG_NAME
10 default "sagem_f@st1704"
11
12 endif
13
board/sagem/f@st1704/MAINTAINERS
File was created 1 SAGEM F@ST1704 BOARD
2 M: Álvaro Fernández Rojas <noltari@gmail.com>
3 S: Maintained
4 F: board/sagem/f@st1704/
5 F: include/configs/sagem_f@st1704.h
6 F: configs/sagem_f@st1704_ram_defconfig
7
board/sagem/f@st1704/Makefile
File was created 1 #
2 # SPDX-License-Identifier: GPL-2.0+
3 #
4
5 obj-y += f@st1704.o
6
board/sagem/f@st1704/f@st1704.c
File was created 1 /*
2 * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7 #include <common.h>
8
configs/sagem_f@st1704_ram_defconfig
File was created 1 CONFIG_ARCH_BMIPS=y
2 CONFIG_BAUDRATE=115200
3 CONFIG_BCM6345_CLK=y
4 CONFIG_BCM6345_GPIO=y
5 CONFIG_BCM6345_SERIAL=y
6 CONFIG_BMIPS_BOOT_RAM=y
7 CONFIG_BOARD_SAGEM_FAST1704=y
8 # CONFIG_CMD_BOOTD is not set
9 CONFIG_CMD_BOOTM=y
10 CONFIG_CMD_CPU=y
11 # CONFIG_CMD_CRC32 is not set
12 # CONFIG_CMD_EDITENV is not set
13 # CONFIG_CMD_ELF is not set
14 # CONFIG_CMD_ENV_EXISTS is not set
15 # CONFIG_CMD_EXPORTENV is not set
16 # CONFIG_CMD_FLASH is not set
17 # CONFIG_CMD_FPGA is not set
18 # CONFIG_CMD_GPIO is not set
19 # CONFIG_CMD_IMLS is not set
20 # CONFIG_CMD_IMPORTENV is not set
21 CONFIG_CMD_LED=y
22 CONFIG_CMD_LICENSE=y
23 CONFIG_CMD_LOADB=y
24 # CONFIG_CMD_LOADS is not set
25 CONFIG_CMD_MEMINFO=y
26 # CONFIG_CMD_MISC is not set
27 # CONFIG_CMD_NET is not set
28 # CONFIG_CMD_NFS is not set
29 # CONFIG_CMD_SAVEENV is not set
30 # CONFIG_CMD_XIMG is not set
31 CONFIG_DEFAULT_DEVICE_TREE="sagem,f@st1704"
32 CONFIG_DISPLAY_CPUINFO=y
33 # CONFIG_DM_DEVICE_REMOVE is not set
34 CONFIG_DM_GPIO=y
35 CONFIG_DM_RESET=y
36 CONFIG_DM_SERIAL=y
37 CONFIG_HUSH_PARSER=y
38 CONFIG_LED=y
39 CONFIG_LED_GPIO=y
40 CONFIG_MIPS=y
41 # CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set
42 # CONFIG_MIPS_BOOT_ENV_LEGACY is not set
43 CONFIG_MIPS_BOOT_FDT=y
44 CONFIG_OF_STDOUT_VIA_ALIAS=y
45 CONFIG_RESET=y
46 CONFIG_RESET_BCM6345=y
47 CONFIG_SOC_BMIPS_BCM6338=y
48 # CONFIG_SPL_SERIAL_PRESENT is not set
49 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
50 CONFIG_SYS_NO_FLASH=y
51 CONFIG_SYS_PROMPT="F@ST1704 # "
52 CONFIG_SYS_TEXT_BASE=0x80010000
53
include/configs/sagem_f@st1704.h
File was created 1 /*
2 * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7 #include <configs/bmips_common.h>
8 #include <configs/bmips_bcm6338.h>
9
10 #define CONFIG_ENV_IS_NOWHERE
11 #define CONFIG_ENV_SIZE (8 * 1024)
12
13 #define CONFIG_AUTO_COMPLETE
14 #define CONFIG_CMDLINE_EDITING
15 #define CONFIG_SYS_LONGHELP
16