mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
98 lines
2.3 KiB
Diff
98 lines
2.3 KiB
Diff
From 6dcf2f9273f30e6f9e6222d3e01087908b84caad Mon Sep 17 00:00:00 2001
|
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
Date: Tue, 17 Aug 2021 16:16:43 +0000
|
|
Subject: [PATCH 36/60] WIP: arm64: dts: amlogic: radxa-zero: add support for
|
|
the usb type-c controller
|
|
|
|
Radxa Zero uses an FUSB302 type-c controller, so lets enable it.
|
|
|
|
NB: Polarity swapping via GPIO is not implemented in the current driver
|
|
(see drivers/usb/typec/tcpm/fusb302.c) so it is not possible to handle
|
|
GPIOAO_6 for USB3 polarity control.
|
|
|
|
Suggested-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
---
|
|
.../dts/amlogic/meson-g12a-radxa-zero.dts | 47 +++++++++++++++++++
|
|
1 file changed, 47 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
|
index e3bb6df42ff3..30d799b44559 100644
|
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
|
@@ -60,6 +60,17 @@
|
|
clock-names = "ext_clock";
|
|
};
|
|
|
|
+ typec2_vbus: regulator-typec2_vbus {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "TYPEC2_VBUS";
|
|
+ regulator-min-microvolt = <5000000>;
|
|
+ regulator-max-microvolt = <5000000>;
|
|
+ vin-supply = <&ao_5v>;
|
|
+
|
|
+ gpio = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
|
|
+ enable-active-high;
|
|
+ };
|
|
+
|
|
ao_5v: regulator-ao_5v {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "AO_5V";
|
|
@@ -191,6 +202,18 @@
|
|
};
|
|
};
|
|
|
|
+&ao_pinctrl {
|
|
+ /* Ensure the TYPE C controller irq pin is not driven by the SoC */
|
|
+ fusb302_irq_pins: fusb302_irq {
|
|
+ mux {
|
|
+ groups = "GPIOAO_5";
|
|
+ function = "gpio_aobus";
|
|
+ bias-pull-up;
|
|
+ output-disable;
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
&arb {
|
|
status = "okay";
|
|
};
|
|
@@ -278,6 +301,22 @@
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
+&i2c_AO {
|
|
+ fusb302@22 {
|
|
+ compatible = "fcs,fusb302";
|
|
+ reg = <0x22>;
|
|
+
|
|
+ pinctrl-0 = <&fusb302_irq_pins>;
|
|
+ pinctrl-names = "default";
|
|
+ interrupt-parent = <&gpio_intc>;
|
|
+ interrupts = <59 IRQ_TYPE_LEVEL_LOW>;
|
|
+
|
|
+ vbus-supply = <&typec2_vbus>;
|
|
+
|
|
+ status = "okay";
|
|
+ };
|
|
+};
|
|
+
|
|
&pwm_AO_cd {
|
|
pinctrl-0 = <&pwm_ao_d_e_pins>;
|
|
pinctrl-names = "default";
|
|
@@ -403,3 +442,11 @@
|
|
status = "okay";
|
|
dr_mode = "host";
|
|
};
|
|
+
|
|
+&usb2_phy0 {
|
|
+ phy-supply = <&typec2_vbus>;
|
|
+};
|
|
+
|
|
+&usb3_pcie_phy {
|
|
+ phy-supply = <&typec2_vbus>;
|
|
+};
|
|
--
|
|
2.17.1
|
|
|