all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob bbc5419b83c92571a503726f4a4695c0022d3980 2291 bytes (raw)
name: gnu/packages/patches/amlogic-0039-WIP-arm64-dts-meson-radxa-zero-add-support-for-the-u.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
 
From 2e5d82b4f096bb5abe901f491e1612a23b332c5d Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 17 Aug 2021 16:16:43 +0000
Subject: [PATCH 39/73] WIP: arm64: dts: meson: 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     | 44 +++++++++++++++++++
 1 file changed, 44 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..5e3dc013409f 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,14 @@
 		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>;
+	};
+
 	ao_5v: regulator-ao_5v {
 		compatible = "regulator-fixed";
 		regulator-name = "AO_5V";
@@ -191,6 +199,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 +298,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 +439,11 @@
 	status = "okay";
 	dr_mode = "host";
 };
+
+&usb2_phy0 {
+	phy-supply = <&typec2_vbus>;
+};
+
+&usb3_pcie_phy {
+	phy-supply = <&typec2_vbus>;
+};
-- 
2.17.1


debug log:

solving bbc5419b83 ...
found bbc5419b83 in https://yhetil.org/guix/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/

applying [1/1] https://yhetil.org/guix/C2ORkCSHJz-4jxwCauZznk4tZlP9KS4u_3Ywe4q2QrfJ7tvIswRWw4vX6OuzXDIHRriNNTQaCiYC67GgL30p8g80J9OcduCgaoZ8XNf-amE=@protonmail.com/
diff --git a/gnu/packages/patches/amlogic-0039-WIP-arm64-dts-meson-radxa-zero-add-support-for-the-u.patch b/gnu/packages/patches/amlogic-0039-WIP-arm64-dts-meson-radxa-zero-add-support-for-the-u.patch
new file mode 100644
index 0000000000..bbc5419b83

1:30: space before tab in indent.
 		clock-names = "ext_clock";
1:31: space before tab in indent.
 	};
1:32: trailing whitespace.
 
1:41: space before tab in indent.
 	ao_5v: regulator-ao_5v {
1:42: space before tab in indent.
 		compatible = "regulator-fixed";
Checking patch gnu/packages/patches/amlogic-0039-WIP-arm64-dts-meson-radxa-zero-add-support-for-the-u.patch...
Applied patch gnu/packages/patches/amlogic-0039-WIP-arm64-dts-meson-radxa-zero-add-support-for-the-u.patch cleanly.
warning: squelched 12 whitespace errors
warning: 17 lines add whitespace errors.

index at:
100644 bbc5419b83c92571a503726f4a4695c0022d3980	gnu/packages/patches/amlogic-0039-WIP-arm64-dts-meson-radxa-zero-add-support-for-the-u.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.