Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [RISCV][SG2042] feat: add sg2042 support #399

Open
wants to merge 40 commits into
base: linux-6.6.y
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9b65e1f
riscv: Add sophgo sg2042 soc support
xingxg2022 Mar 6, 2024
7b48c3d
riscv: errata: Replace thead cache clean with flush
xingxg2022 Jan 22, 2024
27e63d8
riscv: errata: cmo: add CMO macro variant with both VA and PA
Icenowy Jan 4, 2023
ac02e2f
riscv: use VA+PA variant of CMO macros for DMA synchorization
Icenowy Jan 4, 2023
a635dc8
riscv: use VA+PA variant of CMO macros for DMA page preparation
Icenowy Jan 4, 2023
b62c4ef
riscv: errata: thead: Make cache clean to flush
xingxg2022 Oct 19, 2023
5286ea8
riscv: changing T-Head PBMT attributes
Icenowy Feb 24, 2023
28e0bb3
riscv: add ioremap_wc for gpu
xingxg2022 Jan 29, 2024
3628e08
riscv: add smp_cond_load_acquire()
xingxg2022 May 25, 2023
a22e0ed
riscv: spinlock: Fix deadlock issue
Oct 21, 2023
8638ab1
driver: clk: Add sophgo sg2042 soc support
xingxg2022 Jul 12, 2023
d2cfc74
driver: pinctrl: Add sophgo sg2042 soc support
xingxg2022 Jul 12, 2023
de34681
driver: reset: Add sophgo sg2042 soc support
xingxg2022 Jul 12, 2023
dfc7cc7
driver: mmc: Add sophgo sg2042 soc support
xingxg2022 Mar 21, 2024
1451df2
driver: mtd: Add sophgo sg2042 soc support
xingxg2022 Mar 6, 2024
904c7b1
driver: net: Add sophgo sg2042 soc support
xingxg2022 Jul 12, 2023
e3005ee
driver: pcie: Add sophgo sg2042 soc support
xingxg2022 Mar 21, 2024
5bbc425
drivers: pcie: sophgo: Create msi-x whitelist,turn on msi-x for top intr
xingxg2022 Mar 21, 2024
12f1a8f
driver: soc: Add sophgo sg2042 soc support
xingxg2022 Jul 12, 2023
fbc46f7
ttm: disallow cached mapping
Icenowy Feb 24, 2023
da1043d
amdgpu: disable rebar
Icenowy Feb 24, 2023
b79fed4
radeon hack: force 64-bit msi to fit top intc
Icenowy Feb 25, 2023
582c866
nvidia hda: force msi
Icenowy Feb 26, 2023
73cdd0e
mango pci hack:broadcast when no MSI source known
xingxg2022 Jan 26, 2024
731f114
riscv: Add support for kernel-mode FPU
xingxg2022 Mar 6, 2024
d200297
riscv: Factor out riscv-march-y to a separate Makefile
xingxg2022 Mar 6, 2024
f1f7341
drm/amd/display: Support DRM_AMD_DC_FP on RISC-V
xingxg2022 Mar 6, 2024
c803dae
riscv: kexec: Add image loader for kexec file
xingxg2022 Feb 16, 2023
bcc9729
riscv/kexec: handle R_RISCV_ADD16 and R_RISCV_SUB16 relocation types
xingxg2022 Mar 20, 2024
210058f
riscv: kernel: Optimize apply_relocate_add()
xingxg2022 Feb 16, 2023
ee623f7
kernel: schedule: Fix set_task_cpu() bug
xingxg2022 Aug 29, 2023
57cbbce
perf cpumap: Make counter as unsigned ints
kraj Jan 23, 2023
a87cd4f
riscv: configs: Add sophgo sg2042 soc defconfig
xingxg2022 Jul 12, 2023
b342de0
drivers:pci:remove the err log of parsing pci
lionel0016 Mar 23, 2024
b7c58dc
riscv:dts:modify dw gpio clock name
Chunzhi-Lin Mar 28, 2024
49e3043
dts:sophgo:add i2c-rtc ds1307 device node for single chip
Chunzhi-Lin Apr 23, 2024
564e66d
dts:sophgo:x4evb:Apply top interrupt instead of msi on x16 slot
Chunzhi-Lin May 20, 2024
529aa9c
riscv:dts:capricorn:add i2c-rtc device
Chunzhi-Lin May 23, 2024
c0fe527
pcie: whitelist and support mellanox connectx-2
felixonmars May 28, 2024
2722614
add null event check logic in riscv_pmu_sbi.c
lin-fei Aug 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ config RISCV
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
select ARCH_HAS_UBSAN_SANITIZE_ALL
select ARCH_HAS_VDSO_DATA
select ARCH_KEEP_MEMBLOCK
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
select ARCH_STACKWALK
Expand Down
5 changes: 5 additions & 0 deletions arch/riscv/Kconfig.socs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ config SOC_SIFIVE
help
This enables support for SiFive SoC platform hardware.

config ARCH_SOPHGO
bool "Sophgo SoCs"
help
This enables support for Sophgo SoC platform hardware.

config ARCH_STARFIVE
def_bool SOC_STARFIVE

Expand Down
17 changes: 1 addition & 16 deletions arch/riscv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,7 @@ endif
endif
endif

# ISA string setting
riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd
riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
riscv-march-$(CONFIG_RISCV_ISA_V) := $(riscv-march-y)v

ifdef CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC
KBUILD_CFLAGS += -Wa,-misa-spec=2.2
KBUILD_AFLAGS += -Wa,-misa-spec=2.2
else
riscv-march-$(CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI) := $(riscv-march-y)_zicsr_zifencei
endif

# Check if the toolchain supports Zihintpause extension
riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE) := $(riscv-march-y)_zihintpause
include $(srctree)/arch/riscv/Makefile.isa

# Remove F,D,V from isa string for all. Keep extensions between "fd" and "v" by
# matching non-v and non-multi-letter extensions out with the filter ([^v_]*)
Expand Down
18 changes: 18 additions & 0 deletions arch/riscv/Makefile.isa
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-License-Identifier: GPL-2.0-only

# ISA string setting
riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd
riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
riscv-march-$(CONFIG_RISCV_ISA_V) := $(riscv-march-y)v

ifdef CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC
KBUILD_CFLAGS += -Wa,-misa-spec=2.2
KBUILD_AFLAGS += -Wa,-misa-spec=2.2
else
riscv-march-$(CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI) := $(riscv-march-y)_zicsr_zifencei
endif

# Check if the toolchain supports Zihintpause extension
riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE) := $(riscv-march-y)_zihintpause
1 change: 1 addition & 0 deletions arch/riscv/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ subdir-y += canaan
subdir-y += microchip
subdir-y += renesas
subdir-y += sifive
subdir-y += sophgo
subdir-y += starfive
subdir-y += thead

Expand Down
7 changes: 7 additions & 0 deletions arch/riscv/boot/dts/sophgo/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_SOPHGO) += mango-sophgo-x4evb.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += mango-sophgo-x8evb.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += mango-sophgo-pisces.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += mango-sophgo-capricorn.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += mango-milkv-pioneer.dtb
dtb-$(CONFIG_ARCH_SOPHGO) += mango-yixin-s2110.dtb
Loading
Loading