openwrt/target/linux/d1/patches-6.1/0061-squash-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-dr.patch
Zoltan HERPAI 99545b4bb1 d1: add new target
This target adds support for the Allwinner D1 RISC-V based SoCs.

 - RISC-V single-core T-Head C906 (RV64GCV)
 - Tensilica HiFi4 DSP
 - DDR2/DDR3 support
 - 10/100/1000M ethernet
 - usual peripherals like USB2, SPI, I2C, PWM, etc.

Four boards are supported:
 - Dongshan Nezha STU
    - 512Mb RAM
    - ethernet

 - LicheePi RV Dock
    - 512Mb RAM
    - wireless-only (RTL8723DS)

 - MangoPi MQ-Pro
    - 512Mb RAM
    - there are pads available for an SPI flash
    - wireless-only (RTL8723DS)

 - Nezha D1
    - 512Mb/1Gb/2Gb RAM
    - 256Mb NAND flash
    - ethernet, wireless

Installation:
Standard SD-card installation via dd-ing the generated image to
an SD-card of at least 256Mb.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-02-29 16:50:22 +01:00

44 lines
1.3 KiB
Diff

From 2f452dd6047126c42a0ad32ef0f10145c6047d66 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 6 Jun 2021 11:05:20 -0500
Subject: [PATCH 061/117] squash? pwm: sunxi: Add Allwinner SoC PWM controller
driver
---
drivers/pwm/Kconfig | 4 ++--
drivers/pwm/pwm-sun8i-v536.c | 6 +-----
2 files changed, 3 insertions(+), 7 deletions(-)
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -583,11 +583,11 @@ config PWM_SUN4I
will be called pwm-sun4i.
config PWM_SUN8I_V536
- tristate "Allwinner SUN8I_V536 PWM support"
+ tristate "Allwinner SUN8I V536 enhanced PWM support"
depends on ARCH_SUNXI || COMPILE_TEST
depends on HAS_IOMEM && COMMON_CLK
help
- Enhanced PWM framework driver for Allwinner R818, A133, R329,
+ Enhanced PWM framework driver for Allwinner A133, D1, R329, R818,
V536 and V833 SoCs.
To compile this driver as a module, choose M here: the module
--- a/drivers/pwm/pwm-sun8i-v536.c
+++ b/drivers/pwm/pwm-sun8i-v536.c
@@ -373,12 +373,8 @@ err_clk:
static int sun8i_pwm_remove(struct platform_device *pdev)
{
struct sun8i_pwm_chip *pc = platform_get_drvdata(pdev);
- int ret;
-
- ret = pwmchip_remove(&pc->chip);
- if (ret)
- return ret;
+ pwmchip_remove(&pc->chip);
clk_disable_unprepare(pc->clk);
reset_control_assert(pc->rst_clk);