The purpose of this page is to try and define sub-goals and milestones for the mainlining effort, containing goals and sub-goals with milestones for adding Allwinner support in the upstream mainline Linux Kernel.

  1. Drivers Allwinner A83t 1
  2. Drivers Allwinner A83t 3
  3. Drivers Allwinner A83t 7
  4. Drivers Allwinner A83t Windows 7
  1. Aug 28, 2020 This patch add the support only for the Allwinner A83T MIPI CSI-2. Currently, the driver does not support the V3s MIPI CSI-2 controller. On the A83T, the CSI controller is the same as the other V3s Soc, but.
  2. D88 is to use Allwinner A83T solutions, integrated with the multimedia decoding, LCD driver, WIFI, bluetooth, Ethernet, support the majority of current popular video and image format decoding and support an MIPI/LVDS screen, etc., can drive all kinds of TFT LCD display, greatly simplify the whole system design, SD card, more stability and is very suitable for advertising machine, cash register, digital signage, vehicle intelligent terminal motherboard, etc.

The A83T has 3 USB PHYs, 1 for OTG, 1 for standard USB, 1 for USB HSIC. The phy initialization procedure is very different from other SoCs, but the PMU bits are the same, with additional bits for HSIC.

  • 2Status
    • 2.2Work In Progress
  • 5External Links

The idea is to submit the code needed to run the Linux kernel on Allwinner SoCs upstream, ie. to the official Linux kernel.

This can be achieved by following the concept outlined in the Your new ARM SoC Linux support check-list! article published by Thomas Petazzoni from Bootlin.[1][2]

Where relevant, I have attempted to include who is currently working on an item, mostly separate from any particular mainlining goal.

The Mainline Kernel howto contains the currently used repositories for the mainlining process. The U-Boot repository and toolchain is described in the Mainline U-Boot howto.

The Mainline Kernel category gives an overview of currently supported devices.

Status Matrix

The goal of this matrix is to give an easy view of work on each SoC worked on by linux-sunxi.

ModelF1C-
100s
A10A10sA13
R8
A20
T2
A23A31A33
R16
A64A80A83TA100GR8H3H5H6R40
T3
V3|V3s
S3|S3L
AC97 N/A NO N/A N/A NO N/A N/A N/A N/A N/A N/A ? N/A N/A N/A N/A NO N/A
Audio Codec NO 4.4 4.4 4.4 4.4 4.10 4.10 4.11 5.0 N/A N/A ? 4.9 4.10 4.12 NO NO 4.13
ADC GPADC NO 4.12 4.12 4.12 4.12 N/AWIP N/A N/A NO N/A ? 4.12 N/A N/A N/A NO N/A
Thermal NO 3.16 3.14 3.14 3.16 ?WIP 4.12 5.6WIP 5.6 5.10 4.9 5.6 5.6 5.6 5.7 N/A
Touch NO 3.16 3.14 3.14 3.16 N/A 4.0 N/A N/A NO N/A ? 4.9 N/A N/A N/A NO N/A
Camera BT656 NO 5.6 ? ? 5.4 ? 5.0 ? 5.1 ? 5.3 ? ? 5.0 5.0 ? 5.6 5.0
ISP N/A NO N/A N/A NO N/A NO N/A N/A NO NO ? N/A N/A N/A N/A N/A NO
MIPI CSI-2 N/A N/A N/A N/A N/A N/AWIP N/A N/A NOWIP ? N/A N/A N/A N/A N/AWIP
Parallel NO 5.6 ? ? 5.4 ? 5.0 ? 5.1 ? 5.3 ? ? 5.0 5.0 ? 5.6 5.0
Clocks 5.0 3.10 3.11 3.10 3.12 3.17 3.12 4.2 4.10 3.19 4.13 5.10 4.9 4.8 4.12 4.17 4.14 4.11
CPUFreq (DVFS) NO 4.0 4.0 4.0 4.0 NO 4.2 4.11 5.6 NO 4.17WIP NO 4.18 5.9 5.8 NO NO
Crypto N/A 4.3 4.13 4.13 4.3 ? 4.3 4.3 5.5 5.5 5.5 ? 4.13 5.5 5.5 5.5 5.5 5.10
Display (SimpleFB) NO 3.19 3.19 4.0 3.19 3.19 3.19 3.19 4.17 NO NO ? 4.9 4.16 4.16 NO NO 5.10
Display

(DRM)

CVBS NO ? 4.9 ? 4.7 ? N/A N/A N/A N/A N/A N/A ? 4.9 NO NO NO NO N/A
HDMI Audio N/AWIP NO N/AWIP N/AWIP N/AWIP NO NO ? N/AWIPWIPWIP NO N/A
HDMI CEC N/A 4.15 4.14 N/A 4.15 N/A 4.15 N/A 4.20 NO 4.17 ? N/A 4.17 4.17 5.2 4.19 N/A
HDMI Video N/A 4.15 4.13 N/A 4.15 N/A 4.15 N/A 4.20 NO 4.17 ? N/A 4.17 4.17 5.0 4.19 N/A
LVDS N/A ? N/A N/A 5.7 ? ? ? ? ? 4.16 ? N/A N/A N/A N/A ? N/A
MIPI DSI N/A N/A N/A N/A N/A ? NO 4.18 5.6 NO NO ? N/A N/A N/A N/AWIP N/A
RGB NO 4.15 ? 4.7 4.15 5.1 4.10 4.9 5.3 4.17 4.16 ? 4.9 N/A N/A NO NO 4.13
VGA N/A NO N/A N/A NO N/A N/A N/A N/A N/A N/A ? N/A N/A N/A N/A NO N/A
DMA NO 4.3 4.3 4.3 4.3 3.18 3.17 4.2 4.15 ? 4.9WIP 4.9 4.2 4.12 5.3 5.10 4.13
EthernetEMAC N/A 3.11 3.11 N/A 3.11 N/A N/A N/A 4.15 5.1 4.16 ? N/A 4.15 4.15 5.0 4.18 4.13
GMAC N/A N/A 3.15 3.17 ?
GPU(3D)Mali N/A 5.2 ? ? 5.2 ? N/A ? 5.2 N/A N/A N/A ? 5.2 5.2 5.5 5.10 N/A
PowerVR N/A N/A N/A N/A N/A N/A NO N/A N/A NO NO NO N/A N/A N/A N/A N/A N/A
HW Spinlocks N/A N/A N/A N/A N/A N/A N/A N/AWIP NOWIP ? N/AWIP NO NO N/A N/A
I2C ? 3.11 3.12 3.11 3.13 3.18 3.15 4.2 4.10 3.19 4.16 5.10 4.9 4.9 4.12 4.19 4.15 4.11
I2S NO 4.8 ? N/A 4.8 ? 4.13 4.11 4.17 NO 4.16 ? 4.9 4.14 NOWIP NO N/A
IOMMU N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A ? N/A N/A N/A 5.8 N/A N/A
IR NO 3.17 4.0 4.0 3.17 N/A 4.0 N/A 5.4 4.5 4.20 ? 4.9 4.6 4.12 5.4 5.10 N/A
Keypad N/A WIP N/A N/A WIP N/A N/A N/A N/A N/A N/A ? N/A N/A N/A N/A NO N/A
LRADC ? 4.0 4.0 4.0 4.0 4.0 4.0 4.2 5.3 ? 5.2 ? 4.9 ? ? N/A ? 4.13
MsgBox N/A N/A N/A N/A N/A ? ? ? 5.8 ? 5.8 ? N/A 5.8 5.8 5.8 N/A N/A
NAND N/A ? ? 4.12 [3] ? 4.9 [3] ? 4.9 [3] ? ? ? ? 4.9 [3] ? ? NO ? N/A
PCIe N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A ? N/A N/A N/AWIP[4] N/A N/A
Pinctrl 5.0 3.9 3.9 3.9 3.12 3.18 3.12 4.2 4.6 3.19 4.4 5.10 4.9 4.5 4.12 4.17 4.14 4.11
PMU ? ? ? ? ? ? ? ? 5.5 ? ?WIP ? 5.6 5.6 5.6 5.6 ?
PWM NO 4.0 4.4 4.4 4.0 4.4WIP 4.4 4.19 NO 4.16 ? 4.9 4.9 4.12 5.6WIP 4.12
RSB NO N/A N/A N/A N/A 4.4 N/A 4.4 4.13 4.3 4.14 ? N/A ? ? ? N/A N/A
RTC N/A 3.14 N/A N/A 3.14 3.18 3.18 4.2 4.10 N/A N/A ? N/A 4.5 4.12 5.4 5.0 4.11
SATA N/A 3.15 N/A N/A 3.15 N/A N/A N/A N/A N/A N/A ? N/A N/A N/A N/A 4.20 N/A
SD/ MMC NO 3.16 3.16 3.16 3.16 3.18 3.16 4.2 4.11 4.0 4.14WIP 4.9 4.5 4.12 4.19 4.14 4.11
SMP N/A N/A N/A N/A PSCI PSCI PSCI PSCI PSCI 4.17 4.18 ? N/A PSCI PSCI PSCI PSCI N/A
SPDIF NO 4.7 N/A N/A 4.7 N/A 4.9 N/A 4.17 ? 4.13 ? 4.9 4.11 4.12 5.4 ? N/A
SPI NO 3.16 3.15 3.15 3.15 ? 3.15 ? 4.15 ? ? ? 4.9 4.10 4.12 5.7 5.6 4.13
SRAM 5.0 4.2 4.2 4.2 4.2 4.19 NO 4.19 4.19 N/A N/A ? 4.2 4.19 5.0 5.1 5.10 5.10
USBWIP 3.15 3.15 3.15 3.15 4.3 3.16 4.3 4.11 4.2 4.14WIP 4.9 4.8 4.12 5.0 4.15 4.11
USB OTGWIP 4.3 4.3 4.3 4.3 4.8 4.3 4.8 4.11 NO 5.2WIP 4.9 4.12 4.12 5.0 NO 4.11
USB3 N/A N/A N/A N/A N/A N/A N/A N/A N/A NO N/A ? N/A N/A N/A 5.5 N/A N/A
VE | Sunxi-Cedrus NO 5.1 ? 4.20 4.20 ? ? 4.20 5.0 NO NO ? ? 4.20 5.0 5.2 5.10WIP
Watchdog 5.0 3.12 3.12 3.12 3.12 3.18 3.18 4.2 4.17 3.19 4.6WIP 4.9 4.5 4.12 5.3 4.15 4.11
ModelF1C-
100s
A10A10sA13A20
T2
A23A31A33A64A80A83TA100GR8H3H5H6R40V3|V3s
S3|S3L


Legend
In Linux mainline since version x
Nobody works on it, but it should be compatible with already done drivers
Somebody works on it
No support, nobody works on it
support impossible
Status is unknown/to be completed

Work In Progress

Core Stuff

  • H616 Clocks & Pinctrl Andre Przywara arm64: sunxi: Initial Allwinner H616 SoC support
  • AR100 firmware (WiP: Samuel Holland) ARISC firmware for sunxi SoCs
  • A13 PSCI Suspend / Resume / CPUIdle (WiP: Antoine Tenart) patch-v1

Major drivers

  • A100 DMA/PMU/Watchdog/USB2/USB OTG/MMC(eMMC, SD) Frank Lee Second step support for A100
  • A83T/V3s MIPI CSI-2 Paul Kocialkowski Allwinner MIPI CSI-2 support for A31/V3s/A83T
  • H6 Hypervisor for PCIe A try on utilizing H6 PCIe with 'Virtualization'
  • A64 / H3 / H5 / H6 HDMI Audio - Clément Péron / Marcus Cooper / Jernej Škrabec Add Allwinner H3/H5/A64 HDMI audio
  • R40 MIPI-DSI WIP Jagan Teki drm/sun4i: Allwinner R40 MIPI-DSI support v3
  • AC100 Audio codec WiP Ondrej Jirman digital partanalog part
  • F1C100s USB WIP George Hilliard Support the Allwinner F1C100s USB stack
  • V3s SRAM & Video Decoding Engine (Cedrus) WiP Martin Cerveny Enable video decoder (testing with attached LCD)

Minor drivers

  • A100 CPUFreq (DVFS) Shuosheng Huang cpufreq: sun50i: add a100 cpufreq support
  • A64 hwspinlock WIP Nikolay Borisov Add support for hwspinlock on A64 SoC
  • A83T / A64 / H3 hwspinlock WIP Corentin Labbe (montjoie) RFC,1/3RFC,2/3RFC,3/3
  • A10 / A20 / A31 HDMI Audio WIP Stefan Mavrodiev Add support for sun4i HDMI audio
  • A80 Thermal sensor WIP Philipp Rossak (embed-3d): https://github.com/embed-3d/linux/branches/all
  • R40 PWM (WIP Hao Zhang patch-v2)
  • A31/A31s PWM support (WiP: Siarhei Volkau patch-v1)
  • A20 Keypad (WiP: Yassin Jaffer (ddc) patch)

Drivers that can still be improved/added

Nobody works on these features. If you're interested, you can pick one of these add your name to them and move them to one of the sections above, to indicate you're working on the driver/feature.

  • sunxi-musb driver lacks DMA support (with current driver, USB gadgets are limited to PIO, limiting speed to 10MiB/s and causing large CPU)
  • DE2 driver has buggy layer support, see [1]
  • DE1/DE2/DE3 writeback support
  • A64 audiocodec driver components (sun8i-codec and sun50i-codec-analog) lack support for jack detection

Planned for 5.11

Drivers allwinner a83t 1

New Devices Supported

  • H3
  • H6

Planned for 5.10

  • A100
    • Clocks
    • Pinctrl
    • Thermal (THS)
  • R40
    • DMA
    • GPU Mali
    • Video_Engine | Sunxi-Cedrus
  • V3s
    • Crypto
    • SimpleFB

New Devices Supported

  • A100

Merged into 5.9

  • H5
    • DVFS

Merged into 5.8

  • H6
    • DVFS
    • IOMMU
  • A64 / A83T / H3 / H5 / H6
    • Message Box

Merged into 5.7

  • A20
    • LVDS
  • A83T and A64
    • Rotate driver
  • H6
    • SPI
  • R40
    • Thermal

New Devices Supported

  • A13
  • A64
  • A20
    • Linutronix Testbox v2

Merged into 5.6

  • A10
    • CSI (BT656 and Parallel)
  • A64
    • MIPI DSI
    • DVFS
  • A64 / A83T / H3 / H5 / H6
    • Thermal
  • H6
    • PWM
  • H3 / H5 / H6 / R40
    • PMU
  • R40
    • CSI (BT656 and Parallel)
    • SPI

New Devices Supported

  • H5
    • ALL-H3-IT H5 board
    • ALL-H5-CC H5 board
  • H6
    • PineH64 Model A

Merged into 5.5

  • H3
    • Deinterlace driver
  • H6
    • Crypto
    • GPU(3D) Mali
    • USB3 PHY (for boards not needing vbus switching)
  • A64 / A80 / A83T / H3 / H5 / R40
    • Crypto
  • multiple SoCs
    • Cedrus HEVC/H.265
  • Broadcom-based (AMPAK modules) Bluetooth support on
    • Emlid Neutis

New Devices Supported

  • H3
Drivers

Merged into 5.4 (LTS)

  • A20
    • CSI (BT656 and Parallel)
  • A64
    • IR
  • H6
    • IR
    • RTC
    • SPDIF

New Devices Supported

  • A64
    • Olimex A64-OLinuXino eMMC
  • H6
  • S3

Merged into 5.3

Drivers
  • A64
    • LRADC
    • RGB LCD
  • A83T
    • CSI (BT656 and Parallel)
  • H6
    • DMA
    • Watchdog
  • multiple SoCs
    • Cedrus h264

Merged into 5.2

  • A83T
    • LRADC
    • USB OTG
  • H6
  • multiple SoCs
  • Broadcom-based (AMPAK modules) Bluetooth support on
    • Banana-Pi-M2-Zero

New Devices Supported

  • H6

Merged into 5.1

  • A10
    • Cedrus
    • PMU
  • A20
    • Audio Codec improvements
  • A23
    • Display pipeline
    • LCD enabled on Q8 A23 tablets
  • A64
    • PMU
    • CSI (BT656 and Parallel)
  • A80
    • GMAC support
  • CSI in general
    • RGR565 support
    • JPEG pass-through support
  • Broadcom-based (AMPAK modules) Bluetooth support on
  • LCD enabled on A13Q8 tablets

Merged into 5.0

  • A64
    • Cedrus
    • DTS changes for audio codec
  • F1C100s
    • initial F1C100s support
  • H6
    • Ethernet
    • DE3/HDMI support
    • USB 2.0
  • H3 / H5
    • CSI (BT656 and Parallel) Support
  • H5
    • Cedrus
  • R40
    • RTC
  • T3
    • initial T3 support[5]
  • V3s
    • CSI (BT656 and Parallel) Support
  • Broadcom-based (AMPAK modules) Bluetooth support on

New Devices Supported

Merged into 4.20

  • A13 / A20 / A33 / H3
    • Cedrus driver
  • A83T
    • IR receiver
  • A64
    • Cleanup for device tree files
    • HDMI support
    • Audio codec support (DTS changes will be merged in 5.0)
  • H3 / H5
    • SID
  • R40
    • SATA

New Devices Supported

  • Pine64 LTS
  • Xunlong Orange Pi Zero Plus 2 (H3 variant)
  • Sinovoip Banana Pi M2+ (H5 variant)

Merged into 4.19 (LTS)

  • A10 / A13 / A20 / A23 / A33
    • SRAM controller / system control

Drivers Allwinner A83t 1

  • A64
    • SRAM controller / system control
    • Display clocks and bus
    • RTC clock output
    • PWM
    • R_I2C
  • H3
    • SRAM controller / system control
  • H6
    • MMC
    • PMIC
  • R40
    • HDMI support

Board Changes

  • SPI flash node for Orange Pi PC 2 and Pine64 SoPINE
  • Use lid switch as wake-up source for A64 based laptops
  • LEDs added for PineH64

New Devices

  • Amarula A64-Relic

Changes merged up to 4.18

Drivers Allwinner A83t 3

Changes up to 4.18 can be found on Linux mainlining history page.

  1. http://www.elinux.org/images/a/ad/Arm-soc-checklist.pdf
  2. Your New ARM SoC Linux Support Check-List – ELCE 2012
  3. 3.03.13.23.3While the NAND controller itself is supported, the NAND technology found on the vast majority of boards isn't. See this page
  4. Allwinner H6 has a quirky PCIe controller that doesn't map the PCIe address space properly to CPU, and accessing the PCIe config space, IO space or memory space needs to be wrapped. As Linux doesn't wrap PCIe memory space access, it's not possible to do a proper PCIe controller without using an hypervisor. The BSP kernel modifies the driver to wrap the access, so it's also not generic, and only devices with modified driver will work. https://forum.armbian.com/topic/13529-a-try-on-utilizing-h6-pcie-with-virtualization/
  5. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b7badd1d7aa61087010803affa19bb83fb5a0af1
  • Linux Kernel
  • kernel.org - Official website for the Linux Kernel
    • http://github.com/torvalds/linux - Linus Torvalds' GitHub account with the upstream Linux kernel
  • Kernel bugzilla - Regressions for each of recent versions

How to upstream

  • Linux Kernel Upstreaming How-To (CNXSoft - Embedded Software Development)
    • Matt Porter's YouTube video talk on “Upstreaming 101' (LCA14-111)
    • Matt Porter's YouTube video talk on “Upstreaming 201' (LCA14-112)
  • How to Write and Submit a Linux Kernel Patch (CNXSoft - Embedded Software Development)

Drivers Allwinner A83t 7

Retrieved from 'http://linux-sunxi.org/index.php?title=Linux_mainlining_effort&oldid=23777'

Drivers Allwinner A83t Windows 7

The A83T has 3 USB PHYs, 1 for OTG, 1 for standard USB, 1 for USB HSIC.
The phy initialization procedure is very different from other SoCs, but
the PMU bits are the same, with additional bits for HSIC.
Signed-off-by: Chen-Yu Tsai <we...@csie.org>
Tested-by: Maxime Ripard <maxime...@free-electrons.com>
---
drivers/phy/allwinner/phy-sun4i-usb.c | 66 ++++++++++++++++++++++++++++-------
1 file changed, 54 insertions(+), 12 deletions(-)
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 79157eced75a..af16f4fb9707 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -87,6 +87,16 @@
#define PHY_DISCON_TH_SEL 0x2a
#define PHY_SQUELCH_DETECT 0x3c
+/* A83T specific control bits for PHY0 */
+#define PHY_CTL_VBUSVLDEXT BIT(5)
+#define PHY_CTL_SIDDQ BIT(3)
+
+/* A83T specific control bits for PHY2 HSIC */
+#define SUNXI_EHCI_HS_FORCE BIT(20)
+#define SUNXI_HSIC_CONNECT_DET BIT(17)
+#define SUNXI_HSIC_CONNECT_INT BIT(16)
+#define SUNXI_HSIC BIT(1)
+
#define MAX_PHYS 4
/*
@@ -100,6 +110,7 @@ enum sun4i_usb_phy_type {
sun4i_a10_phy,
sun6i_a31_phy,
sun8i_a33_phy,
+ sun8i_a83t_phy,
sun8i_h3_phy,
sun8i_v3s_phy,
sun50i_a64_phy,
@@ -234,6 +245,7 @@ static void sun4i_usb_phy_write(struct sun4i_usb_phy *phy, u32 addr, u32 data,
static void sun4i_usb_phy_passby(struct sun4i_usb_phy *phy, int enable)
{
+ struct sun4i_usb_phy_data *phy_data = to_sun4i_usb_phy_data(phy);
u32 bits, reg_value;
if (!phy->pmu)
@@ -242,6 +254,11 @@ static void sun4i_usb_phy_passby(struct sun4i_usb_phy *phy, int enable)
bits = SUNXI_AHB_ICHR8_EN | SUNXI_AHB_INCR4_BURST_EN |
SUNXI_AHB_INCRX_ALIGN_EN | SUNXI_ULPI_BYPASS_EN;
+ /* A83T USB2 is HSIC */
+ if (phy_data->cfg->type sun8i_a83t_phy && phy->index 2)
+ bits |= SUNXI_EHCI_HS_FORCE | SUNXI_HSIC_CONNECT_INT |
+ SUNXI_HSIC;
+
reg_value = readl(phy->pmu);
if (enable)
@@ -276,21 +293,30 @@ static int sun4i_usb_phy_init(struct phy *_phy)
return ret;
}
- if (phy->pmu && data->cfg->enable_pmu_unk1) {
- val = readl(phy->pmu + REG_PMU_UNK1);
- writel(val & ~2, phy->pmu + REG_PMU_UNK1);
- }
+ if (data->cfg->type sun8i_a83t_phy) {
+ if (phy->index 0) {
+ val = readl(data->base + data->cfg->phyctl_offset);
+ val |= PHY_CTL_VBUSVLDEXT;
+ val &= ~PHY_CTL_SIDDQ;
+ writel(val, data->base + data->cfg->phyctl_offset);
+ }
+ } else {
+ if (phy->pmu && data->cfg->enable_pmu_unk1) {
+ val = readl(phy->pmu + REG_PMU_UNK1);
+ writel(val & ~2, phy->pmu + REG_PMU_UNK1);
+ }
- /* Enable USB 45 Ohm resistor calibration */
- if (phy->index 0)
- sun4i_usb_phy_write(phy, PHY_RES45_CAL_EN, 0x01, 1);
+ /* Enable USB 45 Ohm resistor calibration */
+ if (phy->index 0)
+ sun4i_usb_phy_write(phy, PHY_RES45_CAL_EN, 0x01, 1);
- /* Adjust PHY's magnitude and rate */
- sun4i_usb_phy_write(phy, PHY_TX_AMPLITUDE_TUNE, 0x14, 5);
+ /* Adjust PHY's magnitude and rate */
+ sun4i_usb_phy_write(phy, PHY_TX_AMPLITUDE_TUNE, 0x14, 5);
- /* Disconnect threshold adjustment */
- sun4i_usb_phy_write(phy, PHY_DISCON_TH_SEL,
- data->cfg->disc_thresh, 2);
+ /* Disconnect threshold adjustment */
+ sun4i_usb_phy_write(phy, PHY_DISCON_TH_SEL,
+ data->cfg->disc_thresh, 2);
+ }
sun4i_usb_phy_passby(phy, 1);
@@ -316,6 +342,13 @@ static int sun4i_usb_phy_exit(struct phy *_phy)
struct sun4i_usb_phy_data *data = to_sun4i_usb_phy_data(phy);
if (phy->index 0) {
+ if (data->cfg->type sun8i_a83t_phy) {
+ void __iomem *phyctl = data->base +
+ data->cfg->phyctl_offset;
+
+ writel(readl(phyctl) | PHY_CTL_SIDDQ, phyctl);
+ }
+
/* Disable pull-ups */
sun4i_usb_phy0_update_iscr(_phy, ISCR_DPDM_PULLUP_EN, 0);
sun4i_usb_phy0_update_iscr(_phy, ISCR_ID_PULLUP_EN, 0);
@@ -853,6 +886,14 @@ static const struct sun4i_usb_phy_cfg sun8i_a33_cfg = {
.enable_pmu_unk1 = false,
};
+static const struct sun4i_usb_phy_cfg sun8i_a83t_cfg = {
+ .num_phys = 3,
+ .hsic_index = 2,
+ .type = sun8i_a83t_phy,
+ .phyctl_offset = REG_PHYCTL_A33,
+ .dedicated_clocks = true,
+};
+
static const struct sun4i_usb_phy_cfg sun8i_h3_cfg = {
.num_phys = 4,
.type = sun8i_h3_phy,
@@ -889,6 +930,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = {
{ .compatible = 'allwinner,sun7i-a20-usb-phy', .data = &sun7i_a20_cfg },
{ .compatible = 'allwinner,sun8i-a23-usb-phy', .data = &sun8i_a23_cfg },
{ .compatible = 'allwinner,sun8i-a33-usb-phy', .data = &sun8i_a33_cfg },
+ { .compatible = 'allwinner,sun8i-a83t-usb-phy', .data = &sun8i_a83t_cfg },
{ .compatible = 'allwinner,sun8i-h3-usb-phy', .data = &sun8i_h3_cfg },
{ .compatible = 'allwinner,sun8i-v3s-usb-phy', .data = &sun8i_v3s_cfg },
{ .compatible = 'allwinner,sun50i-a64-usb-phy',
--
2.13.3