summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-05[NOT-FOR-UPSTREAM] Add build instructionsvisionfive-5.15.yEmil Renner Berthing10-0/+492
For convenience this also adds a small visionfive_defconfig and the firmware needed for the brcmfmac driver along with the signed regulatory database. The firmware is from the linux-firmware repo and the regulatory database from the wireless-regdb Fedora package. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Drew Fustini <drew@beagleboard.org>
2022-01-05[NOT-FOR-UPSTREAM] riscv: Add StarFive JH7100 Fedora defconfigFu Wei1-0/+3112
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2022-01-05riscv: dts: Add full JH7100, Starlight and VisionFive supportEmil Renner Berthing6-149/+1213
Based on the device tree in https://github.com/starfive-tech/u-boot/ with contributions from: yanhong.wang <yanhong.wang@starfivetech.com> Huan.Feng <huan.feng@starfivetech.com> ke.zhu <ke.zhu@starfivetech.com> yiming.li <yiming.li@starfivetech.com> jack.zhu <jack.zhu@starfivetech.com> Samin Guo <samin.guo@starfivetech.com> Chenjieqin <Jessica.Chen@starfivetech.com> bo.li <bo.li@starfivetech.com> Rearranged, cleanups, fixes, pins and resets added by Emil. Cleanups, fixes, clocks added by Geert. Cleanups and GPIO fixes from Drew. Thermal zone added by Stephen. PWM pins added by Jianlong. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Stephen L Arnold <nerdboy@gentoo.org> Signed-off-by: Drew Fustini <drew@beagleboard.org> Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
2022-01-05RISC-V: Support non-coherent DMA operationsAtish Patra4-0/+79
** Do not upstream ** This is hacky fix just for testing. The actual patch would read the RISCV_UNCACHED_OFFSET from the DT for only the non-coherent devices. All other devices on beagleV and all other platform should just set dma_default_coherent to true. [Emil: remove spurious whitespace and fix format string warning] Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05RISC-V: Enable SIFIVE_L2_FLUSH for StarFive SoCsEmil Renner Berthing3-2/+4
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05spi: cadence-quadspi: Allow compilation on RISC-VEmil Renner Berthing1-1/+1
This IP is also used on the StarFive JH7100 riscv64 SoC and presumably also the upcoming JH7110 SoC. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05nvdla: Support compilation as moduleEmil Renner Berthing3-19/+21
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05nvdla: add NVDLA driverFarzad Farshchi33-0/+32586
Additional update from Prashant Gaikwad <pgaikwad@nvidia.com> Adapted for Linux 5.13 and the BeagleV Starlight board by <cybergaszcz@gmail.com>
2022-01-05drm/starfive: Propagate bridge error properlyEmil Renner Berthing1-2/+4
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05[WIP] drm/starfive: Support DRM_FORMAT_XRGB8888Emil Renner Berthing2-0/+2
When creating dumb buffers with 32bpp and 24bit colour depth this is default mode return by drm_mode_legacy_fb_format. So we need to support this for common dumb buffers to just work. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05drm/starfive: Use actual clock rateEmil Renner Berthing1-1/+3
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05drm/starfive: Use reset apiEmil Renner Berthing4-35/+30
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05drm/starfive: Use clock apiEmil Renner Berthing4-13/+27
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05drm/starfive: crtc: Use devm_platform_ioremap_resource_bynameEmil Renner Berthing3-33/+9
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05drm/i2c/tda998x: Hardcode register values for Starlightsw.multimedia1-2/+5
A proper solution to this hack should be found. Signed-off-by: jack.zhu <jack.zhu@starfivetech.com> Signed-off-by: keith.zhao <keith.zhao@starfivetech.com>
2022-01-05drm/starfive: Add StarFive drm driversw.multimedia19-0/+3469
1. Add starfive DRM Display driver framework 2. Support M31 Phy and tda998x Signed-off-by: jack.zhu <jack.zhu@starfivetech.com> Signed-off-by: keith.zhao <keith.zhao@starfivetech.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05ASoC: starfive: Add StarFive JH7100 audio driversWalker Chen16-0/+4268
Signed-off-by: Michael Yan <michael.yan@starfivetech.com> Signed-off-by: Jenny Zhang <jenny.zhang@starfivetech.com> Signed-off-by: Walker Chen <walker.chen@starfivetech.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05net: stmmac: use GFP_DMA32Matteo Croce1-4/+8
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
2022-01-05net: stmmac: Configure gtxclk based on speedTom1-0/+47
2022-01-05net: phy: motorcomm: Support the YT8521 gigabit PHYWalker Chen2-1/+449
Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
2022-01-05dmaengine: dw-axi-dmac-starfive: Remove calls specific to ARM64 ACPIGeert Uytterhoeven1-18/+2
iort_dma_setup() is being removed by commit db59e1b6e49201be ("ACPI: arm64: Move DMA setup operations out of IORT") in iommu/next: drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c: In function ‘dw_dma_async_ do_memcpy’: drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:152:2: error: implicit decl aration of function ‘iort_dma_setup’ [-Werror=implicit-function-declaration] 152 | iort_dma_setup(dma_dev, &dma_addr, &dma_size); | ^~~~~~~~~~~~~~ drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:153:8: warning: assignment to ‘const struct iommu_ops *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 153 | iommu = iort_iommu_configure_id(dma_dev, NULL); | ^ drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c: In function ‘dw_dma_memcpy_raw’: drivers/dma/dw-axi-dmac-starfive/starfive_dmaengine_memcpy.c:223:8: warning: assignment to ‘const struct iommu_ops *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 223 | iommu = iort_iommu_configure_id(dma_dev, NULL); | ^ iort_dma_setup() and iort_iommu_configure_id() are part of the ARM64 ACPI implementation. As CONFIG_ACPI_IORT cannot be enabled on RISC-V, they were dummies anyway, so these calls can just be removed. [Emil: remove unused local variables too] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> --- Boot-tested, but the affected code paths were not exercised.
2022-01-05dmaengine: Add dw-axi-dmac-starfive driver for JH7100Tom6-0/+652
2022-01-05dmaengine: dw-axi-dmac: Add StarFive JH7100 supportSamin Guo2-1/+14
Signed-off-by: Samin Guo <samin.guo@starfivetech.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05dmaengine: dw-axi-dmac: Handle xfer start while non-idleSamin Guo2-1/+13
Signed-off-by: Samin Guo <samin.guo@starfivetech.com> Signed-off-by: Curry Zhang <curry.zhang@starfivetech.com>
2022-01-05dmaengine: dw-axi-dmac: Fix RMW on channel suspend registerEmil Renner Berthing1-3/+5
Found by comparing the parallel implementation of more than 8 channel support for the StarFive JH7100 SoC by Samin. Fixes: 824351668a41 ("dmaengine: dw-axi-dmac: support DMAX_NUM_CHANNELS > 8") Co-developed-by: Samin Guo <samin.guo@starfivetech.com> Signed-off-by: Samin Guo <samin.guo@starfivetech.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05[WIP] dt-bindings: dma: dw-axi-dmac: Increase DMA channel limit to 16Geert Uytterhoeven1-3/+3
The first DMAC instance in the StarFive JH7100 SoC supports 16 DMA channels. FIXME Given there are more changes to the driver than just increasing DMAC_MAX_CHANNELS, we probably need a new compatible value, too. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2022-01-05drivers/pwm/pwm-sifive-ptc: Clear PWM CNTRyiming.li1-0/+4
Clear CNTR of PWM after setting period & duty_cycle
2022-01-05drivers/pwm: Add SiFive PWM PTC driverChenjieqin3-0/+303
2022-01-05drivers/tty/serial/8250: update driver for JH7100Samin Guo1-0/+8
2022-01-05sifive/sifive_l2_cache: Align the address to cache lineAtish Patra1-0/+3
[Emil: fix suggested by Geert Uytterhoeven <geert@linux-m68k.org>] Signed-off-by: Atish Patra <atish.patra@wdc.com> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05sifive/sifive_l2_cache: Print a backtrace on out-of-range flushesGeert Uytterhoeven1-2/+2
This makes it easier to find out which driver passes a wrong address range. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2022-01-05sifive/sifive_l2_cache: Add disabling IRQ option (workaround)Tom3-0/+53
2022-01-05sifive/sifive_l2_cache: Add Starfive supportTom1-0/+1
2022-01-05sifive/sifive_l2_cache: Add sifive_l2_flush64_range functionTom3-1/+59
2022-01-05drivers/hw_random: Add StarFive JH7100 Random Number Generator driverHuan Feng4-0/+437
2022-01-05watchdog: Add StarFive SI5 watchdog driverSamin Guo3-0/+788
Signed-off-by: Samin Guo <samin.guo@starfivetech.com> Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
2022-01-05hwmon: (sfctemp) Add StarFive JH7100 temperature sensorEmil Renner Berthing6-0/+401
Register definitions and conversion constants based on sfctemp driver by Samin in the StarFive 5.10 kernel. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2022-01-05dt-bindings: hwmon: add starfive,jh7100-temp bindingsEmil Renner Berthing1-0/+74
Add bindings for the temperature sensor on the StarFive JH7100 SoC. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Reviewed-by: Rob Herring <robh@kernel.org>
2022-01-05serial: 8250_dw: Add quirk for starfive,jh7100-hsuart tooEmil Renner Berthing1-1/+3
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05pinctrl: starfive: Reset pinmux settingsEmil Renner Berthing2-0/+70
Current u-boot doesn't seem to take into account that some GPIOs are configured as inputs/outputs of certain peripherals on power-up. This means it ends up configuring some GPIOs as inputs to more than one peripheral which the documentation explicitly says is illegal. Similarly it also ends up configuring more than one GPIO as output of the same peripheral. While not explicitly mentioned by the documentation this also seems like a bad idea. The easiest way to remedy this mess is to just disconnect all GPIOs from peripherals and have our pinmux configuration set everything up properly. This, however, means that we'd disconnect the serial console from its pins for a while, so add a device tree property to keep certain GPIOs from being reset. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05clk: starfive: jh7100: Keep more clocks aliveEmil Renner Berthing1-19/+19
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05RISC-V: Add StarFive JH7100 audio reset nodeEmil Renner Berthing1-0/+6
Add device tree node for the audio resets on the StarFive JH7100 RISC-V SoC. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05reset: starfive: Add JH7100 audio reset driverEmil Renner Berthing6-15/+112
The audio resets are almost identical to the system resets, there are just fewer of them. So factor out and export a generic probe function, so most of the reset controller implementation can be shared. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05reset: starfive: Use 32bit I/O on 32bit registersEmil Renner Berthing1-20/+20
The driver currently uses 64bit I/O on the 32bit registers. This works because there are 4 assert registers and 4 status register, so they're only ever accessed on 64bit boundaries. There are however other reset controllers for audio and video on the SoC with only one status register that isn't 64bit aligned so 64bit I/O would result in an unaligned access exception. Switch to 32bit I/O in preparation for supporting these resets too. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05reset: Create subdirectory for StarFive driversEmil Renner Berthing6-9/+13
This moves the StarFive JH7100 reset driver to a new subdirectory in preparation for adding more StarFive reset drivers. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05dt-bindings: reset: Add starfive,jh7100-audrst bindingsEmil Renner Berthing1-0/+38
Add bindings for the audio reset controller on the StarFive JH7100 RISC-V SoC. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05dt-bindings: reset: Add StarFive JH7100 audio reset definitionsEmil Renner Berthing1-0/+31
Add all resets for the StarFive JH7100 audio reset controller. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05RISC-V: Add StarFive JH7100 audio clock nodeEmil Renner Berthing1-0/+10
Add device tree node for the audio clocks on the StarFive JH7100 RISC-V SoC. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05clk: starfive: Add JH7100 audio clock driverEmil Renner Berthing4-4/+182
Add a driver for the audio clocks on the Starfive JH7100 RISC-V SoC. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2022-01-05clk: starfive: jh7100: Support more clock typesEmil Renner Berthing2-0/+41
Unlike the system clocks there are audio clocks that combine both multiplexer/divider and gate/multiplexer/divider, so add support for that. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>