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

eswin: harmonize device-tree #5

Open
wants to merge 37 commits into
base: dev/kernel/hifive-premier-p550
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e86b6b6
dts: eswin: Add dts and dtsi files for HiFive Premier P550 board
linmineswincomputing Jul 29, 2024
c732c71
riscv: Kconfig: Added configs related to EIC7700
linmineswincomputing Jul 29, 2024
3efb254
drivers: clk: eswin: added clock driver for eic7700
huangyifeng-design Jul 29, 2024
9ba2d7f
riscv: asm: Added changes to asm header files
linmineswincomputing Jul 29, 2024
78bf3d2
riscv: mm: dma-noncoherent: Add arch_dma_set_uncached
linmineswincomputing Jul 29, 2024
8c57a92
iommu: Kconfig: Enable ARM SMMU V3 for RISCV
PinkeshVaghelaEinfochips Jul 29, 2024
5edbc64
drivers: smmu: Add changes for EIC7700 to arm smmu driver
PinkeshVaghelaEinfochips Jul 29, 2024
a4b572c
driver: iommu: Add IOMMU driver for EIC7700
linmineswincomputing Jul 29, 2024
08e9d35
drivers: sifive_ccache: Add riscv nonstd cache ops
PinkeshVaghelaEinfochips Jul 19, 2024
411b0bc
drivers: eswin: Enable ways for ccache
Pritesh201192 Jul 19, 2024
244a0c8
drivers: dw-axi-dmac: DMA driver changes for EIC7700
xiangxu-eswin Jul 30, 2024
efdaea4
driver: mmc: Add ESWIN mmc drivers
Jul 30, 2024
29c7837
driver: reset: Add eswin reset driver
huangyifeng-design Jul 30, 2024
68d29df
driver: PCIe: Add PCIe driver for EIC7700
NingYu00 Jul 30, 2024
3b9e9a9
driver: pinctrl: Add pincontrol driver for EIC7700
Jul 30, 2024
a757b73
driver: usb: Add Support for eswin dwc3 USB
Jul 30, 2024
8f37ad1
drivers: usb: typec: Add driver for FUSB303B type C controller
Jul 30, 2024
2372b26
drivers: ethernet: Added ethernet driver for EIC7700
Jul 30, 2024
2917741
drivers: rtc: Added EIC7700 Internal RTC driver
xiangxu-eswin Jul 30, 2024
470c369
drivers: bus-error: Added SiFive Bus Error driver
NingYu00 Jul 30, 2024
2fd4fff
drivers: ata: Add ESWIN sata driver
Jul 30, 2024
e96b2c3
drivers: audio: Added audio drivers
Jul 30, 2024
919c692
drivers: pwm: Added ESWIN pwm driver
xiangxu-eswin Jul 30, 2024
132c616
drivers: hwmon: fan-control: Add ESWIN fancontrol driver
Jul 30, 2024
724aacc
drivers: hwmon: pvt: Add ESWIN PVT driver
Jul 30, 2024
df86ed4
drivers: kvm: vcpu: Disabled writing HENVCFG reg
Pritesh201192 Jul 30, 2024
c5edff5
drivers: hwmon: PAC1934: Add PAC1934 driver
Jul 30, 2024
793f93f
drivers: spi: Add bootspi flash driver for EIC7700
huangyifeng-design Jul 30, 2024
eab052f
perf vendor events riscv: Add SiFive P550 events
dslin1010 Jul 16, 2024
a5f7868
ttm: disallow cached mapping
Icenowy Jul 31, 2024
71892b4
RISC-V: Add defines for SBI debug console extension
avpatel Jul 22, 2022
98380b2
RISC-V: Add SBI debug console helper routines
avpatel Nov 24, 2023
db4aa2a
tty/serial: Add RISC-V SBI debug console based earlycon
avpatel Nov 24, 2023
8a7e461
hifive-premier-p550: add defconfig
Pritesh201192 Aug 13, 2024
7483323
hifive-premier-p550: Remove 1.5GHz to 1.8GHz cpu freq
PinkeshVaghelaEinfochips Aug 13, 2024
081fb3f
riscv: defconfig: hifive-premier-p550: Update command line
Pritesh201192 Aug 23, 2024
d88a440
eswin: harmonize device-tree
xypron Aug 26, 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
73 changes: 71 additions & 2 deletions arch/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ config RISCV
def_bool y
select ACPI_GENERIC_GSI if ACPI
select ACPI_REDUCED_HARDWARE_ONLY if ACPI
select ARCH_DMA_DEFAULT_COHERENT
select ARCH_DMA_DEFAULT_COHERENT if !SOC_SIFIVE_EIC7700
select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
Expand All @@ -36,9 +36,11 @@ config RISCV
select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
select ARCH_HAS_STRICT_MODULE_RWX if MMU && !XIP_KERNEL
select ARCH_HAS_SYSCALL_WRAPPER
select ARCH_HAS_TEARDOWN_DMA_OPS if IOMMU_SUPPORT && SOC_SIFIVE_EIC7700
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 All @@ -64,6 +66,7 @@ config RISCV
select CLONE_BACKWARDS
select COMMON_CLK
select CPU_PM if CPU_IDLE || HIBERNATION
select DMA_DIRECT_REMAP if SOC_SIFIVE_EIC7700
select EDAC_SUPPORT
select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TRACER && !DYNAMIC_FTRACE)
select GENERIC_ARCH_TOPOLOGY
Expand Down Expand Up @@ -141,6 +144,7 @@ config RISCV
select HAVE_STACKPROTECTOR
select HAVE_SYSCALL_TRACEPOINTS
select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
select IOMMU_DMA if IOMMU_SUPPORT && SOC_SIFIVE_EIC7700
select IRQ_DOMAIN
select IRQ_FORCED_THREADING
select KASAN_VMALLOC if KASAN
Expand Down Expand Up @@ -268,12 +272,77 @@ config LOCKDEP_SUPPORT

config RISCV_DMA_NONCOHERENT
bool
select ARCH_HAS_DMA_CLEAR_UNCACHED if SOC_SIFIVE_EIC7700
select ARCH_HAS_DMA_PREP_COHERENT
select ARCH_HAS_DMA_SET_UNCACHED if SOC_SIFIVE_EIC7700
select ARCH_HAS_SETUP_DMA_OPS
select ARCH_HAS_SYNC_DMA_FOR_CPU
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
select DMA_BOUNCE_UNALIGNED_KMALLOC if SWIOTLB

config RISCV_DIE0_CACHED_OFFSET
hex "DIE0 memory port addr of U84"
depends on RISCV && ARCH_HAS_DMA_SET_UNCACHED
default 0x80000000
help
Access to DDR memory through U84 memory port is cached.

config RISCV_DIE0_MEM_MAX_SIZE
hex "DIE0 memory size, default 32GB"
depends on RISCV && ARCH_HAS_DMA_SET_UNCACHED
default 0x800000000

config RISCV_DIE0_UNCACHED_OFFSET
hex "DIE0 system port addr of U84"
depends on RISCV && ARCH_HAS_DMA_SET_UNCACHED
default 0xc000000000
help
Access to DDR memory through U84 system port is uncached.
Add this offset when allocating memory from memory port(0x80000000~),
then memremap to virtual address.

config RISCV_DIE1_CACHED_OFFSET
hex "DIE1 memory port addr of U84"
depends on RISCV && ARCH_HAS_DMA_SET_UNCACHED
default 0x2000000000
help
Access to DIE1 DDR memory through U84 memory port is cached.

config RISCV_DIE1_MEM_MAX_SIZE
hex "DIE1 memory size, default 32GB"
depends on RISCV && ARCH_HAS_DMA_SET_UNCACHED
default 0x800000000

config RISCV_DIE1_UNCACHED_OFFSET
hex "DIE1 system port addr of U84"
depends on RISCV && ARCH_HAS_DMA_SET_UNCACHED
default 0xe000000000
help
Access to DIE1 DDR memory through U84 system port is uncached.
Add this offset when allocating memory from memory port(0x2000000000~),
then memremap to virtual address.

config RISCV_INTERLEAVE_CACHED_OFFSET
hex "memory port addr of interleave"
depends on RISCV && ARCH_HAS_DMA_SET_UNCACHED
default 0x4000000000
help
Access to DDR memory through U84 memory port with interleave is cached.

config RISCV_INTERLEAVE_MEM_MAX_SIZE
hex "Interleaving memory size, default 64GB"
depends on RISCV && ARCH_HAS_DMA_SET_UNCACHED
default 0x1000000000

config RISCV_INTERLEAVE_UNCACHED_OFFSET
hex "system port addr of interleave"
depends on RISCV && ARCH_HAS_DMA_SET_UNCACHED
default 0x10000000000
help
Access to DDR memory through U84 system port with interleave is uncached.
Add this offset when allocating memory from memory port(0x4000000000~),
then memremap to virtual address.

config RISCV_NONSTANDARD_CACHE_OPS
bool
help
Expand Down Expand Up @@ -328,7 +397,7 @@ config ARCH_RV64I
bool "RV64I"
select 64BIT
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select SWIOTLB if MMU
select SWIOTLB if MMU && !SOC_SIFIVE_EIC7700

endchoice

Expand Down
7 changes: 7 additions & 0 deletions arch/riscv/Kconfig.socs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ config ARCH_RENESAS
config ARCH_SIFIVE
def_bool SOC_SIFIVE

config SOC_SIFIVE_EIC7700
bool "SiFive eic7700 SoC"
select RISCV_NONSTANDARD_CACHE_OPS
help
This enables support for SiFive EIC7700 platform hardware.

config SOC_SIFIVE
bool "SiFive SoCs"
select ERRATA_SIFIVE if !XIP_KERNEL
select RISCV_DMA_NONCOHERENT if SOC_SIFIVE_EIC7700
help
This enables support for SiFive SoC platform hardware.

Expand Down
1 change: 1 addition & 0 deletions arch/riscv/boot/dts/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
subdir-y += allwinner
subdir-y += canaan
subdir-y += eswin
subdir-y += microchip
subdir-y += renesas
subdir-y += sifive
Expand Down
3 changes: 3 additions & 0 deletions arch/riscv/boot/dts/eswin/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_SOC_SIFIVE) += eic7700-hifive-premier-p550.dtb
obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
Loading