[PATCH v5 1/6] mips: initial build infrastructure for loongson SoCs

Tom Rini trini at konsulko.com
Thu Jul 27 21:05:36 CEST 2023


On Wed, Jul 26, 2023 at 08:30:22PM +0800, Du Huanpeng wrote:
> Loongson 1C is a cost-effective SOC chip for industrial control and
> the Internet of Things. The Loongson 1C includes a floating-point
> processing unit, supports multiple types of memory, and supports
> high-capacity MLC NAND Flash. Loongson 1C provides developers with a
> wealth of peripheral interfaces and on-chip modules, including Camera
> controller, USB OTG and USB HOST interfaces, AC97/I2S controller, LCD
> controller, SPI interface, UART interface, etc., providing sufficient
> computing power and multi-application connectivity.
> 
> Some highlights of this SoC are:
> - Single core LS232, MIPS32 instruction set compatible, main frequency
> 300MHZ
> - 16KB data cache and 16KB instruction cache
> - 64 bit float unit, hardware division
> - 8/16 bit SDRAM controller, 45 ~ 133MHz
> - 8/16 bit SRAM, NAND
> - I2S/AC97, LCD, MAC, USB, OTG, SPI, I2C, PWM, CAN, SDIO, ADC
> - 12 UARTs
> 
> See Techinical Reference Manual for details:
>   https://www.loongson.cn/
>   https://github.com/hodcarrier/ls1c300_bsp
> 
> Signed-off-by: Du Huanpeng <dhu at hodcarrier.org>
> ---
>  MAINTAINERS                            | 15 +++++
>  arch/mips/Kconfig                      | 11 ++++
>  arch/mips/Makefile                     |  1 +
>  arch/mips/dts/Makefile                 |  1 +
>  arch/mips/mach-lsmips/Kconfig          | 76 ++++++++++++++++++++++++++
>  arch/mips/mach-lsmips/Makefile         |  6 ++
>  arch/mips/mach-lsmips/ls1c300/Makefile |  7 +++
>  configs/ls1c300_defconfig              | 53 ++++++++++++++++++
>  8 files changed, 170 insertions(+)
>  create mode 100644 arch/mips/mach-lsmips/Kconfig
>  create mode 100644 arch/mips/mach-lsmips/Makefile
>  create mode 100644 arch/mips/mach-lsmips/ls1c300/Makefile
>  create mode 100644 configs/ls1c300_defconfig
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 87991cccdd..91d6d714d8 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1116,6 +1116,21 @@ F:	drivers/net/cortina_ni.c
>  F:	drivers/net/cortina_ni.h
>  F:	drivers/net/phy/ca_phy.c
>  
> +MIPS LOONGSON LS1C300
> +M:	Du Huanpeng <dhu at hodcarrier.org>
> +S:	Maintained
> +F:	arch/mips/dts/loongson32-ls1c300b.dtsi
> +F:	arch/mips/dts/ls1c300-eval.dts
> +F:	arch/mips/mach-lsmips/
> +F:	board/loongson/ls1c300-eval/
> +F:	configs/ls1c300_defconfig
> +F:	drivers/clk/lsmips/
> +F:	drivers/reset/reset-lsmips.c
> +F:	drivers/watchdog/lsmips_wdt.c
> +F:	include/configs/ls1c300.h
> +F:	include/dt-bindings/clock/ls1c300-clk.h
> +F:	include/dt-bindings/reset/ls1c300-reset.h

The board specific parts should be in the board MAINTAINER file.

> +++ b/arch/mips/mach-lsmips/Kconfig
> @@ -0,0 +1,76 @@
> +menu "Loongson MIPS platforms"
> +	depends on ARCH_LSMIPS
> +
> +config SYS_MALLOC_F_LEN
> +	default 0x1000
> +
> +config SYS_SOC
> +	default "ls1c300" if SOC_LS1C300
> +
> +config SYS_DCACHE_SIZE
> +	default 16384
> +
> +config SYS_DCACHE_LINE_SIZE
> +	default 32
> +
> +config SYS_ICACHE_SIZE
> +	default 16384
> +
> +config SYS_ICACHE_LINE_SIZE
> +	default 32
> +
> +config TEXT_BASE
> +	default 0xbfc00000 if !SPL
> +	default 0x80200000 if SPL
> +
> +config SPL_TEXT_BASE
> +	default 0xbfc00000
> +
> +config SPL_PAYLOAD
> +	default "u-boot-lzma.img" if SPL_LZMA
> +
> +config BUILD_TARGET
> +	default "u-boot-with-spl.bin" if SPL
> +	default "u-boot.bin" if !SPL

As most of these are defined in common Kconfig files, the defaults for
this arch should be there too.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230727/c9f0079f/attachment.sig>


More information about the U-Boot mailing list