summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-08-02riscv: config: Add Starfive Dubhe defconfigREL_DUBHE_SEPT2021starfive-5.13Ley Foon Tan1-0/+119
Add Dubhe FPGA defconfig. Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
2021-08-02riscv: Add StarFive Dubhe SoC supportLey Foon Tan1-0/+8
Add StarFive Dubhe Kconfig option which selects SoC specific and common drivers that is required for this SoC. Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
2021-08-02riscv: dts: starfive: Add Dubhe FPGA device treeLey Foon Tan3-0/+151
Add Dubhe FPGA device tree support. Dubhe is a RISC-V CPU with ISA rv64imafdcbhnv. Dubhe FPGA consists of one Dubhe CPU, PLIC, CLINT, SPI, UART and 8GB memory in hardware. Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
2021-08-01[NOT-FOR-UPSTREAM] Add build instructionsEmil Renner Berthing9-0/+450
For convenience this also adds a small beaglev_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>
2021-08-01[NOT-FOR-UPSTREAM] riscv: Add starfive jh7100 starlight fedora defconfigTekkamanV1-0/+3161
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2021-08-01riscv: dts: Add JH7100 and BeagleV Starlight supportTekkamanV4-1/+1090
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 and TPS65086 added by Emil. Cleanups, fixes, LED and clocks added by Geert. Cleanups and GPIO fixes from Drew. Thermal zone added by Stephen. 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>
2021-08-01RISC-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>
2021-08-01spi: 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>
2021-08-01nvdla: add NVDLA driverFarzad Farshchi33-0/+32588
Additional update from Prashant Gaikwad <pgaikwad@nvidia.com> Adapted for Linux 5.13 and the BeagleV Starlight board by <cybergaszcz@gmail.com>
2021-08-01video: fbdev: starfive: Use round_up() instead of _ALIGN_UP()Geert Uytterhoeven1-6/+1
_ALIGN_UP() is being removed by commit efcec32fe84ab4ee ("riscv: Cleanup unused functions") in riscv/for-next: drivers/video/fbdev/starfive/starfive_displayer.c: In function ‘of_parse_wr_cmd’: drivers/video/fbdev/starfive/starfive_displayer.c:616:27: error: implicit declaration of function ‘_ALIGN_UP’ [-Werror=implic it-function-declaration] 616 | dev_cmds->cmds = kzalloc(_ALIGN_UP(alloc_bytes, 4), GFP_KERNEL); | ^~~~~~~~~ Just use roundup() instead. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Emil Renner Berthing <kernel@esmil.dk>
2021-08-01video: fbdev: starfive: Fix frame buffer reserved memory resource conflictGeert Uytterhoeven1-1/+2
starfive,vpp-lcdc 12000000.sfivefb: can't request region for resource [mem 0xfb000000-0xfcffffff] starfive,vpp-lcdc 12000000.sfivefb: Fail to allocate video RAM starfive,vpp-lcdc 12000000.sfivefb: starfive fb init fail starfive,vpp-lcdc 12000000.sfivefb: fb info init FAIL starfive,vpp-lcdc: probe of 12000000.sfivefb failed with error -16 devm_ioremap_resource() calls devm_request_mem_region(), which fails as the reserved memory for the frame buffer is already present in the resource list, cfr. /proc/iomem: fb000000-fcffffff : Reserved Fix this by mapping the frame buffer memory using devm_ioremap(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-08-01video: fbdev: starfive: FB_STARFIVE_HDMI_TDA998X depends on DRM_FBDEV_EMULATIONGeert Uytterhoeven1-0/+1
riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L0 ': tda998x.c:(.text+0x51c): undefined reference to `drm_encoder_cleanup' riscv64-linux-gnu-ld: tda998x.c:(.text+0x534): undefined reference to `drm_encoder_cleanup' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L75': tda998x.c:(.text+0x564): undefined reference to `drm_of_find_possible_crtcs' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `tda998x_encoder_destroy': tda998x.c:(.text+0x58a): undefined reference to `drm_encoder_init' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `tda998x_bind': tda998x.c:(.text+0x5b2): undefined reference to `drm_bridge_attach' riscv64-linux-gnu-ld: tda998x.c:(.text+0x5c0): undefined reference to `drm_encoder_cleanup' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L0 ': tda998x.c:(.text+0x692): undefined reference to `drm_bridge_remove' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L124': tda998x.c:(.text+0x904): undefined reference to `hdmi_infoframe_pack' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L135': tda998x.c:(.text+0x9e8): undefined reference to `drm_connector_cleanup' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L0 ': tda998x.c:(.text+0xa00): undefined reference to `drm_connector_cleanup' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L143': tda998x.c:(.text+0xa56): undefined reference to `drm_connector_init' riscv64-linux-gnu-ld: tda998x.c:(.text+0xa66): undefined reference to `drm_connector_attach_encoder' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `tda998x_bridge_detach': tda998x.c:(.text+0xa8a): undefined reference to `__drm_err' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L189': tda998x.c:(.text+0xd16): undefined reference to `drm_do_get_edid' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L0 ': tda998x.c:(.text+0xd34): undefined reference to `drm_connector_update_edid_property' riscv64-linux-gnu-ld: tda998x.c:(.text+0xd4e): undefined reference to `drm_add_edid_modes' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L165': tda998x.c:(.text+0xd5a): undefined reference to `drm_detect_monitor_audio' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L0 ': tda998x.c:(.text+0xfb0): undefined reference to `__drm_dbg' riscv64-linux-gnu-ld: tda998x.c:(.text+0x108a): undefined reference to `drm_kms_helper_hotplug_event' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L283': tda998x.c:(.text+0x1844): undefined reference to `drm_hdmi_avi_infoframe_from_display_mode' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.L361': tda998x.c:(.text+0x2078): undefined reference to `drm_bridge_add' riscv64-linux-gnu-ld: drivers/video/fbdev/starfive/tda998x.o: in function `.LANCHOR0': tda998x.c:(.rodata+0x90): undefined reference to `drm_helper_connector_dpms' riscv64-linux-gnu-ld: tda998x.c:(.rodata+0x98): undefined reference to `drm_atomic_helper_connector_reset' riscv64-linux-gnu-ld: tda998x.c:(.rodata+0xb0): undefined reference to `drm_helper_probe_single_connector_modes' riscv64-linux-gnu-ld: tda998x.c:(.rodata+0xd8): undefined reference to `drm_atomic_helper_connector_duplicate_state' riscv64-linux-gnu-ld: tda998x.c:(.rodata+0xe0): undefined reference to `drm_atomic_helper_connector_destroy_state' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-08-01video: fbdev: starfive: fix fb bug about HDMI displayQing Zhao1-1/+2
2021-08-01video: fbdev: starfive: fix modpost build error (missing license)Stephen L Arnold1-0/+4
Signed-off-by: Stephen L Arnold <nerdboy@gentoo.org>
2021-08-01video: fbdev: starfive: improve error handlingEmil Renner Berthing1-13/+24
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2021-08-01video: fbdev: starfive: fix compiler warningsEmil Renner Berthing2-4/+3
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2021-08-01video: fbdev: starfive: workaround for unavailable pointer of dtbjack.zhu1-10/+15
Fix sf_fb_map_video_memory in starfive_fb.c
2021-08-01video: fbdev: starfive: update fb driverjack.zhu1-7/+23
2021-08-01media: starfive: Remove MODULE_SUPPORTED_DEVICE macro callTekkamanV2-2/+0
This macro was never implemented and completely removed upstream. Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2021-08-01drivers/video/fbdev and drivers/media/platform: starfive drivers addedjack.zhu35-0/+11306
1, add ov5640&sc2235 drivers, update stf_isp 2, add MIPI/CSI/DSI drivers for VIC7100
2021-08-01net: stmmac: use GFP_DMA32Matteo Croce1-4/+8
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
2021-08-01net: stmmac: Configure gtxclk based on speedTom1-0/+47
2021-08-01i2c: designware: Add GPIO configuration for JH7100Tom4-0/+61
[FIXME] why we can not do it in U-boot? [geert: Rebase to v5.13-rc1] [emil: Initialize gpios before registering driver] Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2021-08-01drivers/dma: 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.
2021-08-01drivers/dma: Fix VIC7100 dw-axi-dmac-platform driver additionMichael Scott1-8/+11
Descriptor management was simplified with commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef6fb2d6f1abd56cc067c694253ea362159b5ac3 Code added to dw-axi-dmac-platform driver due to VIC7100 Cache Coherency issues needed follow those changes. Signed-off-by: Michael Scott <mike@foundries.io>
2021-08-01drivers/dma: Add dw-axi-dmac-starfive driver for VIC7100Tom7-20/+738
2021-08-01drivers/pwm/pwm-sifive-ptc: Clear PWM CNTRyiming.li1-0/+4
Clear CNTR of PWM after setting period & duty_cycle
2021-08-01drivers/pwm: Add SiFive PWM PTC driverChenjieqin3-0/+301
2021-08-01riscv/starfive: Add VIC7100 supportTom2-0/+48
2021-08-01sifive/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>
2021-08-01sifive/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>
2021-08-01sifive/sifive_l2_cache: Add disabling IRQ option (workaround)Tom3-0/+53
2021-08-01sifive/sifive_l2_cache: Add Starfive supportTom1-0/+1
2021-08-01sifive/sifive_l2_cache: Add sifive_l2_flush64_range functionTom3-1/+59
2021-08-01drivers/hw_random: Add StarFive JH7100 Random Number Generator driverHuan Feng4-0/+437
2021-08-01[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>
2021-08-01mfd: tps65086: Add cell entry for reset driverEmil Renner Berthing1-0/+1
The only way to reset the BeagleV Starlight v0.9 board[1] properly is to tell the PMIC to reset itself which will then assert the external reset lines of the SoC, USB hub and ethernet phy. This adds an mfd cell entry for the reset driver doing just that. [1] https://github.com/beagleboard/beaglev-starlight Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2021-08-01power: reset: Add TPS65086 restart driverEmil Renner Berthing3-0/+105
The only way to reset the BeagleV Starlight v0.9 board[1] properly is to tell the PMIC to reset itself which will then assert the external reset lines of the SoC, USB hub and ethernet phy. This adds a driver to register a reset handler to do just that. [1] https://github.com/beagleboard/beaglev-starlight Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2021-08-01mfd: tps65086: Make interrupt line optionalEmil Renner Berthing2-13/+11
The BeagleV Starlight v0.9 board[1] doesn't have the IRQB line routed to the SoC, but it is still useful to be able to reach the PMIC over I2C for the other functionality it provides such as GPIOs and regulator settings. [1] https://github.com/beagleboard/beaglev-starlight Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
2021-08-01dt-bindings: mfd: convert tps65086.txt to YAMLEmil Renner Berthing2-54/+127
This converts the tps65086.txt binding description to YAML schema so dts files can be verified automatically. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2021-08-01hwmon: (sfctemp) Add StarFive JH7100 temperature sensorEmil Renner Berthing6-0/+343
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>
2021-08-01dt-bindings: hwmon: add starfive,jh7100-temp bindingsEmil Renner Berthing1-0/+43
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>
2021-08-01gpio: starfive-jh7100: Add legacy header and codeHuan Feng2-0/+505
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
2021-08-01gpio: starfive-jh7100: Add StarFive JH7100 GPIO driverDrew Fustini4-0/+441
Add GPIO driver for the StarFive JH7100 SoC [1] used on the BeagleV Starlight JH7100 board [2]. [1] https://github.com/starfive-tech/beaglev_doc/ [2] https://github.com/beagleboard/beaglev-starlight Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Huan Feng <huan.feng@starfivetech.com> Signed-off-by: Drew Fustini <drew@beagleboard.org>
2021-08-01dt-bindings: gpio: add starfive,jh7100-gpio bindingsDrew Fustini1-0/+67
Add bindings for the GPIO controller in the StarFive JH7100 SoC [1]. [1] https://github.com/starfive-tech/beaglev_doc Signed-off-by: Drew Fustini <drew@beagleboard.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-08-01[WIP] clk: starfive: Add preliminary JH7100 Clock Generator DriverGeert Uytterhoeven5-0/+597
Add a preliminary driver for the StarFive JH7100 Clock Generator, based on work by Ahmad Fatoum for Barebox. Functional differences compared to the Barebox driver: - Addition of starfive_clk_pll_mult(), to make the PLL outputs reasonable, - Add temporary overrides for critical clocks (uart, i2c, spi) until we get the clock tree right, so we don't have to keep dummy clocks like uartclk and hs_uartclk in the DTS. This driver sets clk_ignore_unused, else the system locks up when all clocks deemed unused are disabled. To be updated when the documentation becomes available. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-08-01[NOT-FOR-UPSTREAM] clk: Make clk_ignore_unused publicGeert Uytterhoeven1-1/+1
Make clk_ignore_unused public, so the StarFive JH7100 Clock Generator driver can set the flag. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-08-01[WIP] dt-bindings: clock: starfive: Add preliminary JH7100 bindingsGeert Uytterhoeven1-0/+52
Add preliminary Device Tree bindings for the StarFive JH7100 Clock Generator. To be verified against documentation when it becomes available. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-08-01[WIP] dt-bindings: reset: starfive: Add JH7100 Reset DefinitionsGeert Uytterhoeven1-0/+126
Add all resets for the StarFive JH7100 Reset Controller. Based on work by Ahmad Fatoum for Barebox, with "JH7100_" prefixes added to all definitions. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2021-08-01[WIP] dt-bindings: clock: starfive: Add JH7100 Clock DefinitionsGeert Uytterhoeven1-0/+203
Add all clock outputs for the StarFive JH7100 Clock Generator. Based on work by Ahmad Fatoum for Barebox, with "JH7100_" prefixes added to all definitions. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>