mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-05 20:16:52 +00:00

The USB PHY in the Allwinner R40 SoC seems to rely on voltage on the VCC-TVIN/OUT supply pins for proper operation, on top of its own supply voltage on VCC-USB. Without a 3.3V voltage supplied to VCC-TV*, USB operation becomes unstable and can result in disconnects. The Forlinx FETA40i-C SoM connects both the VCC-TVOUT and VCC-TVIN pins to the ALDO1 rail of the PMIC, so we need to enable that rail for USB operation. Since there is no supply property in the DT bindings for the USB core, we need to always enable the regulator. This fixes unstable USB operation on boards using the Forlinx FETA40i-C module. Signed-off-by: Fuyao Kashizuku <fuyao@sjterm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/ZYqRZev1g_mztff2@debian.cyg Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
119 lines
2.4 KiB
Plaintext
119 lines
2.4 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0+ OR MIT
|
|
// Copyright (C) 2021 Ivan Uvarov <i.uvarov@cognitivepilot.com>
|
|
// Based on the sun8i-r40-bananapi-m2-ultra.dts, which is:
|
|
// Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
|
|
// Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
|
|
|
|
#include "sun8i-r40.dtsi"
|
|
#include "sun8i-r40-cpu-opp.dtsi"
|
|
|
|
&cpu0 {
|
|
cpu-supply = <®_dcdc2>;
|
|
};
|
|
|
|
&i2c0 {
|
|
status = "okay";
|
|
|
|
axp22x: pmic@34 {
|
|
compatible = "x-powers,axp221";
|
|
reg = <0x34>;
|
|
interrupt-parent = <&nmi_intc>;
|
|
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
|
};
|
|
};
|
|
|
|
#include "axp22x.dtsi"
|
|
|
|
&mmc2 {
|
|
vmmc-supply = <®_dcdc1>;
|
|
vqmmc-supply = <®_aldo2>;
|
|
bus-width = <8>;
|
|
non-removable;
|
|
status = "okay";
|
|
};
|
|
|
|
&pio {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&clk_out_a_pin>;
|
|
vcc-pa-supply = <®_dcdc1>;
|
|
vcc-pc-supply = <®_aldo2>;
|
|
vcc-pd-supply = <®_dcdc1>;
|
|
vcc-pf-supply = <®_dldo4>;
|
|
vcc-pg-supply = <®_dldo1>;
|
|
};
|
|
|
|
®_aldo1 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-name = "vcc-3v3-tv-usb";
|
|
};
|
|
|
|
®_aldo2 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-name = "vcc-pa";
|
|
};
|
|
|
|
®_aldo3 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <3000000>;
|
|
regulator-max-microvolt = <3000000>;
|
|
regulator-name = "avcc";
|
|
};
|
|
|
|
®_dcdc1 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-name = "vcc-3v3";
|
|
};
|
|
|
|
®_dcdc2 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <1100000>;
|
|
regulator-max-microvolt = <1100000>;
|
|
regulator-name = "vdd-cpu";
|
|
};
|
|
|
|
®_dcdc3 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <1100000>;
|
|
regulator-max-microvolt = <1100000>;
|
|
regulator-name = "vdd-sys";
|
|
};
|
|
|
|
®_dcdc5 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <1500000>;
|
|
regulator-max-microvolt = <1500000>;
|
|
regulator-name = "vcc-dram";
|
|
};
|
|
|
|
®_dldo1 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-name = "vcc-wifi-io";
|
|
};
|
|
|
|
®_dldo4 {
|
|
regulator-always-on;
|
|
regulator-min-microvolt = <2500000>;
|
|
regulator-max-microvolt = <2500000>;
|
|
regulator-name = "vdd2v5-sata";
|
|
};
|
|
|
|
®_eldo2 {
|
|
regulator-min-microvolt = <1200000>;
|
|
regulator-max-microvolt = <1200000>;
|
|
regulator-name = "vdd1v2-sata";
|
|
};
|
|
|
|
®_eldo3 {
|
|
regulator-min-microvolt = <2800000>;
|
|
regulator-max-microvolt = <2800000>;
|
|
regulator-name = "vcc-pe";
|
|
};
|