public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] sunxi: A100/A133 second stage support
@ 2024-10-31  7:02 Cody Eksal
  2024-10-31  7:02 ` [PATCH v2 01/13] arm64: dts: allwinner: A100: Add PMU mode Cody Eksal
                   ` (13 more replies)
  0 siblings, 14 replies; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: linux-arm-kernel, linux-clk, linux-kernel, linux-phy, linux-pm,
	linux-sunxi, linux-usb, devicetree
  Cc: Chen-Yu Tsai, Conor Dooley, Greg Kroah-Hartman, Jernej Skrabec,
	Kishon Vijay Abraham I, Krzysztof Kozlowski, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki, Rob Herring,
	Samuel Holland, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara

Hello again!

This is V2 of this series [5], with some changes that were requested and
others that were made after testing on more devices. Thank you for all of
your feedback! A changelog is available below.

==================
Back in 2020, two Allwinner employees, Yangtao Li and Shuosheng Huang, each
submitted a patch series for the A100 series of SoCs; [1] intended to add
support for the watchdog, ARM PMU, DMA, USB, and (e)MMC controller, and [2]
implemented DVFS support. Some patches from the first series landed, but
the rest were seemingly abandoned.

Although references to the A100 have been removed by Allwinner, it is
believed that the A133 and A133 Plus, which are still available, are simply
better binned variants of the A100; no other differences have been noted
thus far, and the drivers for the A100 work on the A133 without any
additional modifications. There has been a resurgence of interest in the
A133; patches to allow mainline U-Boot to run on these devices are
currently in progress.

I have rebased the patches that failed to land, applying the feedback
provided by maintainers at the time. Some DT binding patches were added, as
there were a few cases where compatibles were used without being
documented. Minor reworks were necessary to apply certain patches, as the
drivers they modified have matured over time.

Patches 1 and 2 add PMU and watchdog nodes to the device tree. This is
followed by patches 3-7, which implement support for the USB host and OTG
peripherals. Patches 8-10 add MMC nodes, rounding out what originally
made up the first patch series; support for these already exists from
earlier patches, though patch 7 fixes an issue with the clock definitions
preventing the MMC controller from initializing. Patches 11-13 finish the
job of the second original series and this series, implementing OPP and
enabling DVFS on these SoCs.

This series is also available on GitHub [3].

A sincere thanks to Andre for encouraging me to submit these patches,
Parthiban for testing this tree on his board, and to the linux-sunxi
community and its resources for pointing me to these abandoned series in
the first place [4].

[1] https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=380887&archive=both&state=*
[2] https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=396055&archive=both&state=*
[3] https://github.com/BrokenR3C0RD/linux-a100/compare/c2ee9f59..allwinner-a100
[4] https://linux-sunxi.org/Linux_mainlining_effort#Work_In_Progress
[5] https://lore.kernel.org/all/20241024170540.2721307-1-masterr3c0rd@epochal.quest/

Changelog - V2:
 - Change name of opp table to match bindings and pass CHECK_DTBS
 - Drop "phy: sun4i-usb: add support for A100 USB PHY" in favor of
   falling back to "allwinner,sun20i-d1-usb-phy".
 - Add "allwinner,sun50i-a100" to the cpufreq-dt-platform blacklist
 - Update dt-bindings changes to keep intended ordering of compatibles
 - Update regs that were too small in the usbphy bindings
 - Add patch to remove CLK_SET_RATE_NO_REPARENT from the MMC drivers.
 - Fix error in the description of "arm64: dts: allwinner: a100: add usb
   related nodes"
 - Add acks and reviews from Andre and Rob


Cody Eksal (5):
  dt-bindings: phy: sun50i-a64: add a100 compatible
  dt-bindings: usb: Add A100 compatible string
  dt-bindings: usb: sunxi-musb: Add A100 compatible string
  clk: sunxi-ng: a100: enable MMC clock reparenting
  dt-bindings: opp: h6: Add A100 operating points

Shuosheng Huang (2):
  cpufreq: sun50i: add a100 cpufreq support
  arm64: dts: allwinner: a100: Add CPU Operating Performance Points
    table

Yangtao Li (6):
  arm64: dts: allwinner: A100: Add PMU mode
  arm64: dts: allwinner: a100: add watchdog node
  arm64: dts: allwinner: a100: add usb related nodes
  arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1
  arm64: allwinner: a100: Add MMC related nodes
  arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node

 .../allwinner,sun50i-h6-operating-points.yaml |   1 +
 .../phy/allwinner,sun50i-a64-usb-phy.yaml     |  10 +-
 .../usb/allwinner,sun4i-a10-musb.yaml         |   1 +
 .../devicetree/bindings/usb/generic-ehci.yaml |   1 +
 .../devicetree/bindings/usb/generic-ohci.yaml |   1 +
 .../allwinner/sun50i-a100-allwinner-perf1.dts |  60 ++++++
 .../dts/allwinner/sun50i-a100-cpu-opp.dtsi    |  90 ++++++++
 .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 193 +++++++++++++++++-
 drivers/clk/sunxi-ng/ccu-sun50i-a100.c        |   6 +-
 drivers/cpufreq/cpufreq-dt-platdev.c          |   1 +
 drivers/cpufreq/sun50i-cpufreq-nvmem.c        |  28 +++
 11 files changed, 383 insertions(+), 9 deletions(-)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a100-cpu-opp.dtsi


base-commit: 0fc810ae3ae110f9e2fcccce80fc8c8d62f97907
-- 
2.47.0


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH v2 01/13] arm64: dts: allwinner: A100: Add PMU mode
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-10-31  7:02 ` [PATCH v2 02/13] arm64: dts: allwinner: a100: add watchdog node Cody Eksal
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Greg Kroah-Hartman, Kishon Vijay Abraham I, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Vinod Koul, Viresh Kumar, Viresh Kumar, Yangtao Li,
	Parthiban, Andre Przywara, Cody Eksal, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

From: Yangtao Li <frank@allwinnertech.com>

Add the Performance Monitoring Unit (PMU) device tree node to the A100
.dtsi, which tells DT users which interrupts are triggered by PMU overflow
events on each core.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
 arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
index a3dccf193765..1eca7c220ede 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
@@ -25,21 +25,21 @@ cpu0: cpu@0 {
 			enable-method = "psci";
 		};
 
-		cpu@1 {
+		cpu1: cpu@1 {
 			compatible = "arm,cortex-a53";
 			device_type = "cpu";
 			reg = <0x1>;
 			enable-method = "psci";
 		};
 
-		cpu@2 {
+		cpu2: cpu@2 {
 			compatible = "arm,cortex-a53";
 			device_type = "cpu";
 			reg = <0x2>;
 			enable-method = "psci";
 		};
 
-		cpu@3 {
+		cpu3: cpu@3 {
 			compatible = "arm,cortex-a53";
 			device_type = "cpu";
 			reg = <0x3>;
@@ -47,6 +47,15 @@ cpu@3 {
 		};
 	};
 
+	pmu {
+		compatible = "arm,cortex-a53-pmu";
+		interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+	};
+
 	psci {
 		compatible = "arm,psci-1.0";
 		method = "smc";
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 02/13] arm64: dts: allwinner: a100: add watchdog node
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
  2024-10-31  7:02 ` [PATCH v2 01/13] arm64: dts: allwinner: A100: Add PMU mode Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-10-31 14:14   ` Parthiban
  2024-10-31  7:02 ` [PATCH v2 03/13] dt-bindings: phy: sun50i-a64: add a100 compatible Cody Eksal
                   ` (11 subsequent siblings)
  13 siblings, 1 reply; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Greg Kroah-Hartman, Kishon Vijay Abraham I, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Vinod Koul, Viresh Kumar, Viresh Kumar, Yangtao Li,
	Parthiban, Andre Przywara, Cody Eksal, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

From: Yangtao Li <frank@allwinnertech.com>

Declare A100's watchdog in the device-tree.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
 arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
index 1eca7c220ede..adb11b26045f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
@@ -144,6 +144,14 @@ ths_calibration: calib@14 {
 			};
 		};
 
+		watchdog@30090a0 {
+			compatible = "allwinner,sun50i-a100-wdt",
+				     "allwinner,sun6i-a31-wdt";
+			reg = <0x030090a0 0x20>;
+			interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&dcxo24M>;
+		};
+
 		pio: pinctrl@300b000 {
 			compatible = "allwinner,sun50i-a100-pinctrl";
 			reg = <0x0300b000 0x400>;
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 03/13] dt-bindings: phy: sun50i-a64: add a100 compatible
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
  2024-10-31  7:02 ` [PATCH v2 01/13] arm64: dts: allwinner: A100: Add PMU mode Cody Eksal
  2024-10-31  7:02 ` [PATCH v2 02/13] arm64: dts: allwinner: a100: add watchdog node Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-10-31 11:36   ` Andre Przywara
  2024-10-31  7:02 ` [PATCH v2 04/13] dt-bindings: usb: Add A100 compatible string Cody Eksal
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Maxime Ripard
  Cc: Greg Kroah-Hartman, Michael Turquette, Nishanth Menon,
	Rafael J. Wysocki, Stephen Boyd, Viresh Kumar, Viresh Kumar,
	Yangtao Li, Parthiban, Andre Przywara, Cody Eksal, linux-phy,
	devicetree, linux-arm-kernel, linux-sunxi, linux-kernel

The USB PHY found in the A100 is similar to that found in the D1. Add a
compatible for the A100.

Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
---
Changes in V2:
 - Update binding to allow using the D1 as a compatible.

 .../bindings/phy/allwinner,sun50i-a64-usb-phy.yaml     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
index f557feca9763..21209126ed00 100644
--- a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
@@ -15,9 +15,13 @@ properties:
     const: 1
 
   compatible:
-    enum:
-      - allwinner,sun20i-d1-usb-phy
-      - allwinner,sun50i-a64-usb-phy
+    oneOf:
+      - enum:
+          - allwinner,sun20i-d1-usb-phy
+          - allwinner,sun50i-a64-usb-phy
+      - items:
+          - const: allwinner,sun50i-a100-usb-phy
+          - const: allwinner,sun20i-d1-usb-phy
 
   reg:
     items:
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 04/13] dt-bindings: usb: Add A100 compatible string
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (2 preceding siblings ...)
  2024-10-31  7:02 ` [PATCH v2 03/13] dt-bindings: phy: sun50i-a64: add a100 compatible Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-10-31  7:02 ` [PATCH v2 05/13] dt-bindings: usb: sunxi-musb: " Cody Eksal
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Chen-Yu Tsai, Jernej Skrabec, Kishon Vijay Abraham I,
	Maxime Ripard, Michael Turquette, Nishanth Menon,
	Rafael J. Wysocki, Samuel Holland, Stephen Boyd, Vinod Koul,
	Viresh Kumar, Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara,
	Cody Eksal, linux-usb, devicetree, linux-kernel

The Allwinner A100 contains two fully OHCI/EHCI compatible USB host
controllers. Add their compatible strings to the list of
generic OHCI/EHCI controllers.

Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
---
Changes in V2:
 - Fix ordering of compatibles

 Documentation/devicetree/bindings/usb/generic-ehci.yaml | 1 +
 Documentation/devicetree/bindings/usb/generic-ohci.yaml | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
index 2ed178f16a78..0d797e01fc0b 100644
--- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
+++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
@@ -28,6 +28,7 @@ properties:
       - items:
           - enum:
               - allwinner,sun4i-a10-ehci
+              - allwinner,sun50i-a100-ehci
               - allwinner,sun50i-a64-ehci
               - allwinner,sun50i-h6-ehci
               - allwinner,sun50i-h616-ehci
diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
index b9576015736b..cf33764553fa 100644
--- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
+++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
@@ -15,6 +15,7 @@ properties:
       - items:
           - enum:
               - allwinner,sun4i-a10-ohci
+              - allwinner,sun50i-a100-ohci
               - allwinner,sun50i-a64-ohci
               - allwinner,sun50i-h6-ohci
               - allwinner,sun50i-h616-ohci
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 05/13] dt-bindings: usb: sunxi-musb: Add A100 compatible string
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (3 preceding siblings ...)
  2024-10-31  7:02 ` [PATCH v2 04/13] dt-bindings: usb: Add A100 compatible string Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-10-31  7:42   ` Krzysztof Kozlowski
  2024-10-31  7:02 ` [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes Cody Eksal
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Maxime Ripard
  Cc: Kishon Vijay Abraham I, Michael Turquette, Nishanth Menon,
	Rafael J. Wysocki, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara, Cody Eksal,
	linux-usb, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel

The A100 MUSB peripheral has 10 endpoints, and thus is compatible with
the A33 version.

Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
Changes in V2:
 - Fix ordering of compatibles

 .../devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml        | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml b/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml
index f972ce976e86..bb5010dcefe1 100644
--- a/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml
+++ b/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml
@@ -23,6 +23,7 @@ properties:
           - enum:
               - allwinner,sun8i-a83t-musb
               - allwinner,sun20i-d1-musb
+              - allwinner,sun50i-a100-musb
               - allwinner,sun50i-h6-musb
           - const: allwinner,sun8i-a33-musb
       - items:
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (4 preceding siblings ...)
  2024-10-31  7:02 ` [PATCH v2 05/13] dt-bindings: usb: sunxi-musb: " Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-10-31 11:55   ` Andre Przywara
                     ` (2 more replies)
  2024-10-31  7:02 ` [PATCH v2 07/13] arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1 Cody Eksal
                   ` (7 subsequent siblings)
  13 siblings, 3 replies; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Greg Kroah-Hartman, Kishon Vijay Abraham I, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Vinod Koul, Viresh Kumar, Viresh Kumar, Yangtao Li,
	Parthiban, Andre Przywara, Cody Eksal, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

From: Yangtao Li <frank@allwinnertech.com>

The Allwinner A100 has two HCI USB controllers, a OTG controller and a
USB PHY. The PHY is compatible with that used by the D1, while the OTG
controller is compatible with the A33. Add nodes for these to the base
DTSI.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
[masterr3c0rd@epochal.quest: fallback to a33-musb and d1-usb-phy, edited message]
Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
Changes in V2:
 - Fix sizes of reg definitions in usbphy
 - Move #phy-cells to the end of usbphy
 - Order nodes by MMIO address
 - Remove dr_mode

 .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 91 +++++++++++++++++++
 1 file changed, 91 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
index adb11b26045f..f6162a107641 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
@@ -302,6 +302,97 @@ ths: thermal-sensor@5070400 {
 			#thermal-sensor-cells = <1>;
 		};
 
+		usb_otg: usb@5100000 {
+			compatible = "allwinner,sun50i-a100-musb",
+				     "allwinner,sun8i-a33-musb";
+			reg = <0x05100000 0x0400>;
+			clocks = <&ccu CLK_BUS_OTG>;
+			resets = <&ccu RST_BUS_OTG>;
+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "mc";
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			extcon = <&usbphy 0>;
+			status = "disabled";
+		};
+
+		usbphy: phy@5100400 {
+			compatible = "allwinner,sun50i-a100-usb-phy",
+				     "allwinner,sun20i-d1-usb-phy";
+			reg = <0x05100400 0x100>,
+			      <0x05101800 0x100>,
+			      <0x05200800 0x100>;
+			reg-names = "phy_ctrl",
+				    "pmu0",
+				    "pmu1";
+			clocks = <&ccu CLK_USB_PHY0>,
+				 <&ccu CLK_USB_PHY1>;
+			clock-names = "usb0_phy",
+				      "usb1_phy";
+			resets = <&ccu RST_USB_PHY0>,
+				 <&ccu RST_USB_PHY1>;
+			reset-names = "usb0_reset",
+				      "usb1_reset";
+			status = "disabled";
+			#phy-cells = <1>;
+		};
+
+		ehci0: usb@5101000 {
+			compatible = "allwinner,sun50i-a100-ehci",
+				     "generic-ehci";
+			reg = <0x05101000 0x100>;
+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_OHCI0>,
+				 <&ccu CLK_BUS_EHCI0>,
+				 <&ccu CLK_USB_OHCI0>;
+			resets = <&ccu RST_BUS_OHCI0>,
+				 <&ccu RST_BUS_EHCI0>;
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
+		ohci0: usb@5101400 {
+			compatible = "allwinner,sun50i-a100-ohci",
+				     "generic-ohci";
+			reg = <0x05101400 0x100>;
+			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_OHCI0>,
+				 <&ccu CLK_USB_OHCI0>;
+			resets = <&ccu RST_BUS_OHCI0>;
+			phys = <&usbphy 0>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
+		ehci1: usb@5200000 {
+			compatible = "allwinner,sun50i-a100-ehci",
+				     "generic-ehci";
+			reg = <0x05200000 0x100>;
+			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_OHCI1>,
+				 <&ccu CLK_BUS_EHCI1>,
+				 <&ccu CLK_USB_OHCI1>;
+			resets = <&ccu RST_BUS_OHCI1>,
+				 <&ccu RST_BUS_EHCI1>;
+			phys = <&usbphy 1>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
+		ohci1: usb@5200400 {
+			compatible = "allwinner,sun50i-a100-ohci",
+				     "generic-ohci";
+			reg = <0x05200400 0x100>;
+			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_OHCI1>,
+				 <&ccu CLK_USB_OHCI1>;
+			resets = <&ccu RST_BUS_OHCI1>;
+			phys = <&usbphy 1>;
+			phy-names = "usb";
+			status = "disabled";
+		};
+
 		r_ccu: clock@7010000 {
 			compatible = "allwinner,sun50i-a100-r-ccu";
 			reg = <0x07010000 0x300>;
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 07/13] arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (5 preceding siblings ...)
  2024-10-31  7:02 ` [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-11-02 11:29   ` Chen-Yu Tsai
  2024-10-31  7:02 ` [PATCH v2 09/13] arm64: allwinner: a100: Add MMC related nodes Cody Eksal
                   ` (6 subsequent siblings)
  13 siblings, 1 reply; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Greg Kroah-Hartman, Kishon Vijay Abraham I, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Vinod Koul, Viresh Kumar, Viresh Kumar, Yangtao Li,
	Parthiban, Andre Przywara, Cody Eksal, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

From: Yangtao Li <frank@allwinnertech.com>

Add USB support on A100 perf1 board, which include two USB2.0 port.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
Changes in V2:
 - Add dr_mode here, instead of in the .dtsi

 .../allwinner/sun50i-a100-allwinner-perf1.dts | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
index f5c5c1464482..2f8c7ee60283 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
@@ -7,6 +7,8 @@
 
 #include "sun50i-a100.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+
 /{
 	model = "Allwinner A100 Perf1";
 	compatible = "allwinner,a100-perf1", "allwinner,sun50i-a100";
@@ -18,6 +20,36 @@ aliases {
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	reg_usb1_vbus: usb1-vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb1-vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
+		enable-active-high;
+	};
+};
+
+&ehci0 {
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
+
+&ohci0 {
+	status = "okay";
+};
+
+&ohci1 {
+	status = "okay";
+};
+
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
 };
 
 &pio {
@@ -178,3 +210,10 @@ &uart0 {
 	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
+
+&usbphy {
+	usb0_id_det-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
+	usb0_vbus-supply = <&reg_drivevbus>;
+	usb1_vbus-supply = <&reg_usb1_vbus>;
+	status = "okay";
+};
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 09/13] arm64: allwinner: a100: Add MMC related nodes
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (6 preceding siblings ...)
  2024-10-31  7:02 ` [PATCH v2 07/13] arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1 Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-10-31  7:02 ` [PATCH v2 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Cody Eksal
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Greg Kroah-Hartman, Kishon Vijay Abraham I, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Vinod Koul, Viresh Kumar, Viresh Kumar, Yangtao Li,
	Parthiban, Andre Przywara, Cody Eksal, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

From: Yangtao Li <frank@allwinnertech.com>

The A100 has 3 MMC controllers, one of them being especially targeted to
eMMC. Let's add nodes on dts.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
 .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 71 +++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
index f6162a107641..29ac7716c7a5 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
@@ -169,12 +169,83 @@ pio: pinctrl@300b000 {
 			interrupt-controller;
 			#interrupt-cells = <3>;
 
+			mmc0_pins: mmc0-pins {
+				pins = "PF0", "PF1", "PF2", "PF3",
+				       "PF4", "PF5";
+				function = "mmc0";
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			/omit-if-no-ref/
+			mmc1_pins: mmc1-pins {
+				pins = "PG0", "PG1", "PG2", "PG3",
+				       "PG4", "PG5";
+				function = "mmc1";
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
+			mmc2_pins: mmc2-pins {
+				pins = "PC0", "PC1", "PC5", "PC6",
+				       "PC8", "PC9", "PC10", "PC11",
+				       "PC13", "PC14", "PC15", "PC16";
+				function = "mmc2";
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
 			uart0_pb_pins: uart0-pb-pins {
 				pins = "PB9", "PB10";
 				function = "uart0";
 			};
 		};
 
+		mmc0: mmc@4020000 {
+			compatible = "allwinner,sun50i-a100-mmc";
+			reg = <0x04020000 0x1000>;
+			clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC0>;
+			reset-names = "ahb";
+			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc0_pins>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		mmc1: mmc@4021000 {
+			compatible = "allwinner,sun50i-a100-mmc";
+			reg = <0x04021000 0x1000>;
+			clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC1>;
+			reset-names = "ahb";
+			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc1_pins>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		mmc2: mmc@4022000 {
+			compatible = "allwinner,sun50i-a100-emmc";
+			reg = <0x04022000 0x1000>;
+			clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC2>;
+			reset-names = "ahb";
+			interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&mmc2_pins>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
 		uart0: serial@5000000 {
 			compatible = "snps,dw-apb-uart";
 			reg = <0x05000000 0x400>;
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (7 preceding siblings ...)
  2024-10-31  7:02 ` [PATCH v2 09/13] arm64: allwinner: a100: Add MMC related nodes Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-11-02 11:48   ` Chen-Yu Tsai
  2024-10-31  7:02 ` [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points Cody Eksal
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Greg Kroah-Hartman, Kishon Vijay Abraham I, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Vinod Koul, Viresh Kumar, Viresh Kumar, Yangtao Li,
	Parthiban, Andre Przywara, Cody Eksal, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

From: Yangtao Li <frank@allwinnertech.com>

A100 perf1 hava MicroSD slot and on-board eMMC module, add support for them.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
 .../allwinner/sun50i-a100-allwinner-perf1.dts    | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
index 2f8c7ee60283..d418fc272b3c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
@@ -39,6 +39,22 @@ &ehci1 {
 	status = "okay";
 };
 
+&mmc0 {
+	vmmc-supply = <&reg_dcdc1>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+	bus-width = <4>;
+	status = "okay";
+};
+
+&mmc2 {
+	vmmc-supply = <&reg_dcdc1>;
+	vqmmc-supply = <&reg_aldo1>;
+	cap-mmc-hw-reset;
+	non-removable;
+	bus-width = <8>;
+	status = "okay";
+};
+
 &ohci0 {
 	status = "okay";
 };
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (8 preceding siblings ...)
  2024-10-31  7:02 ` [PATCH v2 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-10-31  7:42   ` Krzysztof Kozlowski
                     ` (2 more replies)
  2024-10-31  7:02 ` [PATCH v2 13/13] arm64: dts: allwinner: a100: Add CPU Operating Performance Points table Cody Eksal
                   ` (3 subsequent siblings)
  13 siblings, 3 replies; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Maxime Ripard
  Cc: Greg Kroah-Hartman, Kishon Vijay Abraham I, Michael Turquette,
	Rafael J. Wysocki, Vinod Koul, Viresh Kumar, Parthiban,
	Andre Przywara, Cody Eksal, linux-pm, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

The A100, similar to the H6 and H616, use an NVMEM value to determine
speed binnings. The method used is similar to that of the H6. However,
the information is stored at a slightly different bit offset.

Add a new compatible for the A100.

Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
Changes in V2:
 - Fix ordering of compatibles

 .../bindings/opp/allwinner,sun50i-h6-operating-points.yaml       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml b/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
index ec5e424bb3c8..75ab552f6ecd 100644
--- a/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
+++ b/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
@@ -22,6 +22,7 @@ allOf:
 properties:
   compatible:
     enum:
+      - allwinner,sun50i-a100-operating-points
       - allwinner,sun50i-h6-operating-points
       - allwinner,sun50i-h616-operating-points
 
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2 13/13] arm64: dts: allwinner: a100: Add CPU Operating Performance Points table
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (9 preceding siblings ...)
  2024-10-31  7:02 ` [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points Cody Eksal
@ 2024-10-31  7:02 ` Cody Eksal
  2024-11-02 11:46 ` (subset) [PATCH v2 00/13] sunxi: A100/A133 second stage support Chen-Yu Tsai
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 29+ messages in thread
From: Cody Eksal @ 2024-10-31  7:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Greg Kroah-Hartman, Kishon Vijay Abraham I, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Vinod Koul, Viresh Kumar, Viresh Kumar, Yangtao Li,
	Parthiban, Andre Przywara, Cody Eksal, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

From: Shuosheng Huang <huangshuosheng@allwinnertech.com>

Add an Operating Performance Points table for the CPU cores to
enable Dynamic Voltage & Frequency Scaling on the A100.

Signed-off-by: Shuosheng Huang <huangshuosheng@allwinnertech.com>
[masterr3c0rd@epochal.quest: fix typos in -cpu-opp, use compatible]
Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
Changes in V2:
 - Rename cpu-opp-table to opp-table-cpu
 - Use single cell version of opp-microvolt-speedX

 .../allwinner/sun50i-a100-allwinner-perf1.dts |  5 ++
 .../dts/allwinner/sun50i-a100-cpu-opp.dtsi    | 90 +++++++++++++++++++
 .../arm64/boot/dts/allwinner/sun50i-a100.dtsi |  8 ++
 3 files changed, 103 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a100-cpu-opp.dtsi

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
index d418fc272b3c..1fb629df9f1d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "sun50i-a100.dtsi"
+#include "sun50i-a100-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -68,6 +69,10 @@ &usb_otg {
 	status = "okay";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &pio {
 	vcc-pb-supply = <&reg_dcdc1>;
 	vcc-pc-supply = <&reg_eldo1>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100-cpu-opp.dtsi
new file mode 100644
index 000000000000..c6a2efa037dc
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-cpu-opp.dtsi
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (c) 2020 Yangtao Li <frank@allwinnertech.com>
+// Copyright (c) 2020 ShuoSheng Huang <huangshuosheng@allwinnertech.com>
+
+/ {
+	cpu_opp_table: opp-table-cpu {
+		compatible = "allwinner,sun50i-a100-operating-points";
+		nvmem-cells = <&cpu_speed_grade>;
+		opp-shared;
+
+		opp-408000000 {
+			clock-latency-ns = <244144>; /* 8 32k periods */
+			opp-hz = /bits/ 64 <408000000>;
+
+			opp-microvolt-speed0 = <900000>;
+			opp-microvolt-speed1 = <900000>;
+			opp-microvolt-speed2 = <900000>;
+		};
+
+		opp-600000000 {
+			clock-latency-ns = <244144>; /* 8 32k periods */
+			opp-hz = /bits/ 64 <600000000>;
+
+			opp-microvolt-speed0 = <900000>;
+			opp-microvolt-speed1 = <900000>;
+			opp-microvolt-speed2 = <900000>;
+		};
+
+		opp-816000000 {
+			clock-latency-ns = <244144>; /* 8 32k periods */
+			opp-hz = /bits/ 64 <816000000>;
+
+			opp-microvolt-speed0 = <940000>;
+			opp-microvolt-speed1 = <900000>;
+			opp-microvolt-speed2 = <900000>;
+		};
+
+		opp-1080000000 {
+			clock-latency-ns = <244144>; /* 8 32k periods */
+			opp-hz = /bits/ 64 <1080000000>;
+
+			opp-microvolt-speed0 = <1020000>;
+			opp-microvolt-speed1 = <980000>;
+			opp-microvolt-speed2 = <950000>;
+		};
+
+		opp-1200000000 {
+			clock-latency-ns = <244144>; /* 8 32k periods */
+			opp-hz = /bits/ 64 <1200000000>;
+
+			opp-microvolt-speed0 = <1100000>;
+			opp-microvolt-speed1 = <1020000>;
+			opp-microvolt-speed2 = <1000000>;
+		};
+
+		opp-1320000000 {
+			clock-latency-ns = <244144>; /* 8 32k periods */
+			opp-hz = /bits/ 64 <1320000000>;
+
+			opp-microvolt-speed0 = <1160000>;
+			opp-microvolt-speed1 = <1060000>;
+			opp-microvolt-speed2 = <1030000>;
+		};
+
+		opp-1464000000 {
+			clock-latency-ns = <244144>; /* 8 32k periods */
+			opp-hz = /bits/ 64 <1464000000>;
+
+			opp-microvolt-speed0 = <1180000>;
+			opp-microvolt-speed1 = <1180000>;
+			opp-microvolt-speed2 = <1130000>;
+		};
+	};
+};
+
+&cpu0 {
+	operating-points-v2 = <&cpu_opp_table>;
+};
+
+&cpu1 {
+	operating-points-v2 = <&cpu_opp_table>;
+};
+
+&cpu2 {
+	operating-points-v2 = <&cpu_opp_table>;
+};
+
+&cpu3 {
+	operating-points-v2 = <&cpu_opp_table>;
+};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
index 29ac7716c7a5..6a76858b654a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
@@ -23,6 +23,7 @@ cpu0: cpu@0 {
 			device_type = "cpu";
 			reg = <0x0>;
 			enable-method = "psci";
+			clocks = <&ccu CLK_CPUX>;
 		};
 
 		cpu1: cpu@1 {
@@ -30,6 +31,7 @@ cpu1: cpu@1 {
 			device_type = "cpu";
 			reg = <0x1>;
 			enable-method = "psci";
+			clocks = <&ccu CLK_CPUX>;
 		};
 
 		cpu2: cpu@2 {
@@ -37,6 +39,7 @@ cpu2: cpu@2 {
 			device_type = "cpu";
 			reg = <0x2>;
 			enable-method = "psci";
+			clocks = <&ccu CLK_CPUX>;
 		};
 
 		cpu3: cpu@3 {
@@ -44,6 +47,7 @@ cpu3: cpu@3 {
 			device_type = "cpu";
 			reg = <0x3>;
 			enable-method = "psci";
+			clocks = <&ccu CLK_CPUX>;
 		};
 	};
 
@@ -142,6 +146,10 @@ efuse@3006000 {
 			ths_calibration: calib@14 {
 				reg = <0x14 8>;
 			};
+
+			cpu_speed_grade: cpu-speed-grade@1c {
+				reg = <0x1c 0x2>;
+			};
 		};
 
 		watchdog@30090a0 {
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points
  2024-10-31  7:02 ` [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points Cody Eksal
@ 2024-10-31  7:42   ` Krzysztof Kozlowski
  2024-10-31 12:10   ` Andre Przywara
  2024-11-02 11:50   ` Chen-Yu Tsai
  2 siblings, 0 replies; 29+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-31  7:42 UTC (permalink / raw)
  To: Cody Eksal
  Cc: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Maxime Ripard, Greg Kroah-Hartman,
	Kishon Vijay Abraham I, Michael Turquette, Rafael J. Wysocki,
	Vinod Koul, Viresh Kumar, Parthiban, Andre Przywara, linux-pm,
	devicetree, linux-arm-kernel, linux-sunxi, linux-kernel

On Thu, Oct 31, 2024 at 04:02:24AM -0300, Cody Eksal wrote:
> The A100, similar to the H6 and H616, use an NVMEM value to determine
> speed binnings. The method used is similar to that of the H6. However,
> the information is stored at a slightly different bit offset.
> 
> Add a new compatible for the A100.
> 
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
> ---
> Changes in V2:
>  - Fix ordering of compatibles

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 05/13] dt-bindings: usb: sunxi-musb: Add A100 compatible string
  2024-10-31  7:02 ` [PATCH v2 05/13] dt-bindings: usb: sunxi-musb: " Cody Eksal
@ 2024-10-31  7:42   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 29+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-31  7:42 UTC (permalink / raw)
  To: Cody Eksal
  Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland,
	Maxime Ripard, Kishon Vijay Abraham I, Michael Turquette,
	Nishanth Menon, Rafael J. Wysocki, Stephen Boyd, Vinod Koul,
	Viresh Kumar, Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara,
	linux-usb, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel

On Thu, Oct 31, 2024 at 04:02:18AM -0300, Cody Eksal wrote:
> The A100 MUSB peripheral has 10 endpoints, and thus is compatible with
> the A33 version.
> 
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 03/13] dt-bindings: phy: sun50i-a64: add a100 compatible
  2024-10-31  7:02 ` [PATCH v2 03/13] dt-bindings: phy: sun50i-a64: add a100 compatible Cody Eksal
@ 2024-10-31 11:36   ` Andre Przywara
  2024-10-31 14:35     ` Cody Eksal
  0 siblings, 1 reply; 29+ messages in thread
From: Andre Przywara @ 2024-10-31 11:36 UTC (permalink / raw)
  To: Cody Eksal
  Cc: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Maxime Ripard, Greg Kroah-Hartman,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Viresh Kumar, Viresh Kumar, Yangtao Li, Parthiban,
	linux-phy, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel

On Thu, 31 Oct 2024 04:02:16 -0300
Cody Eksal <masterr3c0rd@epochal.quest> wrote:

> The USB PHY found in the A100 is similar to that found in the D1. Add a
> compatible for the A100.
> 
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

> Acked-by: Rob Herring (Arm) <robh@kernel.org>

Careful with that: you made quite some changes compared to v1, which Rob
ACKed, so I wouldn't carry over his tag here.

Cheers,
Andre

> ---
> Changes in V2:
>  - Update binding to allow using the D1 as a compatible.
> 
>  .../bindings/phy/allwinner,sun50i-a64-usb-phy.yaml     | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
> index f557feca9763..21209126ed00 100644
> --- a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
> @@ -15,9 +15,13 @@ properties:
>      const: 1
>  
>    compatible:
> -    enum:
> -      - allwinner,sun20i-d1-usb-phy
> -      - allwinner,sun50i-a64-usb-phy
> +    oneOf:
> +      - enum:
> +          - allwinner,sun20i-d1-usb-phy
> +          - allwinner,sun50i-a64-usb-phy
> +      - items:
> +          - const: allwinner,sun50i-a100-usb-phy
> +          - const: allwinner,sun20i-d1-usb-phy
>  
>    reg:
>      items:


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes
  2024-10-31  7:02 ` [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes Cody Eksal
@ 2024-10-31 11:55   ` Andre Przywara
  2024-11-01  5:33   ` Parthiban
  2024-11-01  6:14   ` Cody Eksal
  2 siblings, 0 replies; 29+ messages in thread
From: Andre Przywara @ 2024-10-31 11:55 UTC (permalink / raw)
  To: Cody Eksal
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Greg Kroah-Hartman,
	Kishon Vijay Abraham I, Maxime Ripard, Michael Turquette,
	Nishanth Menon, Rafael J. Wysocki, Stephen Boyd, Vinod Koul,
	Viresh Kumar, Viresh Kumar, Yangtao Li, Parthiban, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

On Thu, 31 Oct 2024 04:02:19 -0300
Cody Eksal <masterr3c0rd@epochal.quest> wrote:

> From: Yangtao Li <frank@allwinnertech.com>
> 
> The Allwinner A100 has two HCI USB controllers, a OTG controller and a
> USB PHY. The PHY is compatible with that used by the D1, while the OTG
> controller is compatible with the A33. Add nodes for these to the base
> DTSI.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> [masterr3c0rd@epochal.quest: fallback to a33-musb and d1-usb-phy, edited message]
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>

Thanks for the changes, looks good to me now.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
> Changes in V2:
>  - Fix sizes of reg definitions in usbphy
>  - Move #phy-cells to the end of usbphy
>  - Order nodes by MMIO address
>  - Remove dr_mode
> 
>  .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 91 +++++++++++++++++++
>  1 file changed, 91 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> index adb11b26045f..f6162a107641 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> @@ -302,6 +302,97 @@ ths: thermal-sensor@5070400 {
>  			#thermal-sensor-cells = <1>;
>  		};
>  
> +		usb_otg: usb@5100000 {
> +			compatible = "allwinner,sun50i-a100-musb",
> +				     "allwinner,sun8i-a33-musb";
> +			reg = <0x05100000 0x0400>;
> +			clocks = <&ccu CLK_BUS_OTG>;
> +			resets = <&ccu RST_BUS_OTG>;
> +			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "mc";
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			extcon = <&usbphy 0>;
> +			status = "disabled";
> +		};
> +
> +		usbphy: phy@5100400 {
> +			compatible = "allwinner,sun50i-a100-usb-phy",
> +				     "allwinner,sun20i-d1-usb-phy";
> +			reg = <0x05100400 0x100>,
> +			      <0x05101800 0x100>,
> +			      <0x05200800 0x100>;
> +			reg-names = "phy_ctrl",
> +				    "pmu0",
> +				    "pmu1";
> +			clocks = <&ccu CLK_USB_PHY0>,
> +				 <&ccu CLK_USB_PHY1>;
> +			clock-names = "usb0_phy",
> +				      "usb1_phy";
> +			resets = <&ccu RST_USB_PHY0>,
> +				 <&ccu RST_USB_PHY1>;
> +			reset-names = "usb0_reset",
> +				      "usb1_reset";
> +			status = "disabled";
> +			#phy-cells = <1>;
> +		};
> +
> +		ehci0: usb@5101000 {
> +			compatible = "allwinner,sun50i-a100-ehci",
> +				     "generic-ehci";
> +			reg = <0x05101000 0x100>;
> +			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI0>,
> +				 <&ccu CLK_BUS_EHCI0>,
> +				 <&ccu CLK_USB_OHCI0>;
> +			resets = <&ccu RST_BUS_OHCI0>,
> +				 <&ccu RST_BUS_EHCI0>;
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};
> +
> +		ohci0: usb@5101400 {
> +			compatible = "allwinner,sun50i-a100-ohci",
> +				     "generic-ohci";
> +			reg = <0x05101400 0x100>;
> +			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI0>,
> +				 <&ccu CLK_USB_OHCI0>;
> +			resets = <&ccu RST_BUS_OHCI0>;
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};
> +
> +		ehci1: usb@5200000 {
> +			compatible = "allwinner,sun50i-a100-ehci",
> +				     "generic-ehci";
> +			reg = <0x05200000 0x100>;
> +			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI1>,
> +				 <&ccu CLK_BUS_EHCI1>,
> +				 <&ccu CLK_USB_OHCI1>;
> +			resets = <&ccu RST_BUS_OHCI1>,
> +				 <&ccu RST_BUS_EHCI1>;
> +			phys = <&usbphy 1>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};
> +
> +		ohci1: usb@5200400 {
> +			compatible = "allwinner,sun50i-a100-ohci",
> +				     "generic-ohci";
> +			reg = <0x05200400 0x100>;
> +			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI1>,
> +				 <&ccu CLK_USB_OHCI1>;
> +			resets = <&ccu RST_BUS_OHCI1>;
> +			phys = <&usbphy 1>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};
> +
>  		r_ccu: clock@7010000 {
>  			compatible = "allwinner,sun50i-a100-r-ccu";
>  			reg = <0x07010000 0x300>;


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points
  2024-10-31  7:02 ` [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points Cody Eksal
  2024-10-31  7:42   ` Krzysztof Kozlowski
@ 2024-10-31 12:10   ` Andre Przywara
  2024-11-02 11:50   ` Chen-Yu Tsai
  2 siblings, 0 replies; 29+ messages in thread
From: Andre Przywara @ 2024-10-31 12:10 UTC (permalink / raw)
  To: Cody Eksal
  Cc: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Maxime Ripard, Greg Kroah-Hartman,
	Kishon Vijay Abraham I, Michael Turquette, Rafael J. Wysocki,
	Vinod Koul, Viresh Kumar, Parthiban, linux-pm, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

On Thu, 31 Oct 2024 04:02:24 -0300
Cody Eksal <masterr3c0rd@epochal.quest> wrote:

> The A100, similar to the H6 and H616, use an NVMEM value to determine
> speed binnings. The method used is similar to that of the H6. However,
> the information is stored at a slightly different bit offset.
> 
> Add a new compatible for the A100.
> 
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
> Changes in V2:
>  - Fix ordering of compatibles
> 
>  .../bindings/opp/allwinner,sun50i-h6-operating-points.yaml       | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml b/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
> index ec5e424bb3c8..75ab552f6ecd 100644
> --- a/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
> +++ b/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
> @@ -22,6 +22,7 @@ allOf:
>  properties:
>    compatible:
>      enum:
> +      - allwinner,sun50i-a100-operating-points
>        - allwinner,sun50i-h6-operating-points
>        - allwinner,sun50i-h616-operating-points
>  


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 02/13] arm64: dts: allwinner: a100: add watchdog node
  2024-10-31  7:02 ` [PATCH v2 02/13] arm64: dts: allwinner: a100: add watchdog node Cody Eksal
@ 2024-10-31 14:14   ` Parthiban
  0 siblings, 0 replies; 29+ messages in thread
From: Parthiban @ 2024-10-31 14:14 UTC (permalink / raw)
  To: Cody Eksal, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: parthiban, Greg Kroah-Hartman, Kishon Vijay Abraham I,
	Maxime Ripard, Michael Turquette, Nishanth Menon,
	Rafael J. Wysocki, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Andre Przywara, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

On 10/31/24 12:32 PM, Cody Eksal wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> Declare A100's watchdog in the device-tree.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
Tested-by: Parthiban Nallathambi <parthiban@linumiz.com>

Thanks,
Parthiban
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> index 1eca7c220ede..adb11b26045f 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> @@ -144,6 +144,14 @@ ths_calibration: calib@14 {
>  			};
>  		};
>  
> +		watchdog@30090a0 {
> +			compatible = "allwinner,sun50i-a100-wdt",
> +				     "allwinner,sun6i-a31-wdt";
> +			reg = <0x030090a0 0x20>;
> +			interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&dcxo24M>;
> +		};
> +
>  		pio: pinctrl@300b000 {
>  			compatible = "allwinner,sun50i-a100-pinctrl";
>  			reg = <0x0300b000 0x400>;


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 03/13] dt-bindings: phy: sun50i-a64: add a100 compatible
  2024-10-31 11:36   ` Andre Przywara
@ 2024-10-31 14:35     ` Cody Eksal
  0 siblings, 0 replies; 29+ messages in thread
From: Cody Eksal @ 2024-10-31 14:35 UTC (permalink / raw)
  To: Andre Przywara, Rob Herring
  Cc: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Maxime Ripard, Greg Kroah-Hartman,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Viresh Kumar, Viresh Kumar, Yangtao Li, Parthiban,
	linux-phy, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel

On 2024/10/31 8:36 am, Andre Przywara wrote:
> On Thu, 31 Oct 2024 04:02:16 -0300
> Cody Eksal <masterr3c0rd@epochal.quest> wrote:
> 
>> The USB PHY found in the A100 is similar to that found in the D1. Add 
>> a
>> compatible for the A100.
>> 
>> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
> 
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> 
>> Acked-by: Rob Herring (Arm) <robh@kernel.org>
> 
> Careful with that: you made quite some changes compared to v1, which 
> Rob
> ACKed, so I wouldn't carry over his tag here.
I had made a note of this a few days ago, but it slipped through my 
pre-submission review. I'm terribly sorry; won't make this mistake in 
the future.

- Cody

> Cheers,
> Andre
> 
>> ---
>> Changes in V2:
>>  - Update binding to allow using the D1 as a compatible.
>> 
>>  .../bindings/phy/allwinner,sun50i-a64-usb-phy.yaml     | 10 
>> +++++++---
>>  1 file changed, 7 insertions(+), 3 deletions(-)
>> 
>> diff --git 
>> a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml 
>> b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
>> index f557feca9763..21209126ed00 100644
>> --- 
>> a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
>> +++ 
>> b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
>> @@ -15,9 +15,13 @@ properties:
>>      const: 1
>> 
>>    compatible:
>> -    enum:
>> -      - allwinner,sun20i-d1-usb-phy
>> -      - allwinner,sun50i-a64-usb-phy
>> +    oneOf:
>> +      - enum:
>> +          - allwinner,sun20i-d1-usb-phy
>> +          - allwinner,sun50i-a64-usb-phy
>> +      - items:
>> +          - const: allwinner,sun50i-a100-usb-phy
>> +          - const: allwinner,sun20i-d1-usb-phy
>> 
>>    reg:
>>      items:

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes
  2024-10-31  7:02 ` [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes Cody Eksal
  2024-10-31 11:55   ` Andre Przywara
@ 2024-11-01  5:33   ` Parthiban
  2024-11-01  6:14   ` Cody Eksal
  2 siblings, 0 replies; 29+ messages in thread
From: Parthiban @ 2024-11-01  5:33 UTC (permalink / raw)
  To: Cody Eksal, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: parthiban, Greg Kroah-Hartman, Kishon Vijay Abraham I,
	Maxime Ripard, Michael Turquette, Nishanth Menon,
	Rafael J. Wysocki, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Andre Przywara, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

On 10/31/24 12:32 PM, Cody Eksal wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> The Allwinner A100 has two HCI USB controllers, a OTG controller and a
> USB PHY. The PHY is compatible with that used by the D1, while the OTG
> controller is compatible with the A33. Add nodes for these to the base
> DTSI.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> [masterr3c0rd@epochal.quest: fallback to a33-musb and d1-usb-phy, edited message]
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
Peripheral mode works after disabling ehci0 and ohci0. Otherwise,

Tested-by: Parthiban Nallathambi <parthiban@linumiz.com>

Thanks,
Parthiban
> ---
> Changes in V2:
>  - Fix sizes of reg definitions in usbphy
>  - Move #phy-cells to the end of usbphy
>  - Order nodes by MMIO address
>  - Remove dr_mode
> 
>  .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 91 +++++++++++++++++++
>  1 file changed, 91 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> index adb11b26045f..f6162a107641 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> @@ -302,6 +302,97 @@ ths: thermal-sensor@5070400 {
>  			#thermal-sensor-cells = <1>;
>  		};
>  
> +		usb_otg: usb@5100000 {
> +			compatible = "allwinner,sun50i-a100-musb",
> +				     "allwinner,sun8i-a33-musb";
> +			reg = <0x05100000 0x0400>;
> +			clocks = <&ccu CLK_BUS_OTG>;
> +			resets = <&ccu RST_BUS_OTG>;
> +			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "mc";
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			extcon = <&usbphy 0>;
> +			status = "disabled";
> +		};
> +
> +		usbphy: phy@5100400 {
> +			compatible = "allwinner,sun50i-a100-usb-phy",
> +				     "allwinner,sun20i-d1-usb-phy";
> +			reg = <0x05100400 0x100>,
> +			      <0x05101800 0x100>,
> +			      <0x05200800 0x100>;
> +			reg-names = "phy_ctrl",
> +				    "pmu0",
> +				    "pmu1";
> +			clocks = <&ccu CLK_USB_PHY0>,
> +				 <&ccu CLK_USB_PHY1>;
> +			clock-names = "usb0_phy",
> +				      "usb1_phy";
> +			resets = <&ccu RST_USB_PHY0>,
> +				 <&ccu RST_USB_PHY1>;
> +			reset-names = "usb0_reset",
> +				      "usb1_reset";
> +			status = "disabled";
> +			#phy-cells = <1>;
> +		};
> +
> +		ehci0: usb@5101000 {
> +			compatible = "allwinner,sun50i-a100-ehci",
> +				     "generic-ehci";
> +			reg = <0x05101000 0x100>;
> +			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI0>,
> +				 <&ccu CLK_BUS_EHCI0>,
> +				 <&ccu CLK_USB_OHCI0>;
> +			resets = <&ccu RST_BUS_OHCI0>,
> +				 <&ccu RST_BUS_EHCI0>;
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};
> +
> +		ohci0: usb@5101400 {
> +			compatible = "allwinner,sun50i-a100-ohci",
> +				     "generic-ohci";
> +			reg = <0x05101400 0x100>;
> +			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI0>,
> +				 <&ccu CLK_USB_OHCI0>;
> +			resets = <&ccu RST_BUS_OHCI0>;
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};
> +
> +		ehci1: usb@5200000 {
> +			compatible = "allwinner,sun50i-a100-ehci",
> +				     "generic-ehci";
> +			reg = <0x05200000 0x100>;
> +			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI1>,
> +				 <&ccu CLK_BUS_EHCI1>,
> +				 <&ccu CLK_USB_OHCI1>;
> +			resets = <&ccu RST_BUS_OHCI1>,
> +				 <&ccu RST_BUS_EHCI1>;
> +			phys = <&usbphy 1>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};
> +
> +		ohci1: usb@5200400 {
> +			compatible = "allwinner,sun50i-a100-ohci",
> +				     "generic-ohci";
> +			reg = <0x05200400 0x100>;
> +			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI1>,
> +				 <&ccu CLK_USB_OHCI1>;
> +			resets = <&ccu RST_BUS_OHCI1>;
> +			phys = <&usbphy 1>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};
> +
>  		r_ccu: clock@7010000 {
>  			compatible = "allwinner,sun50i-a100-r-ccu";
>  			reg = <0x07010000 0x300>;


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes
  2024-10-31  7:02 ` [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes Cody Eksal
  2024-10-31 11:55   ` Andre Przywara
  2024-11-01  5:33   ` Parthiban
@ 2024-11-01  6:14   ` Cody Eksal
  2 siblings, 0 replies; 29+ messages in thread
From: Cody Eksal @ 2024-11-01  6:14 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Greg Kroah-Hartman, Kishon Vijay Abraham I, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki,
	Stephen Boyd, Vinod Koul, Viresh Kumar, Viresh Kumar, Yangtao Li,
	Parthiban, Andre Przywara, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel

On 2024/10/31 4:02 am, Cody Eksal wrote:
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi 
> b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> index adb11b26045f..f6162a107641 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> @@ -302,6 +302,97 @@ ths: thermal-sensor@5070400 {
>  			#thermal-sensor-cells = <1>;
>  		};
> +
> +		usb_otg: usb@5100000 {
> +			compatible = "allwinner,sun50i-a100-musb",
> +				     "allwinner,sun8i-a33-musb";
> +			reg = <0x05100000 0x0400>;
> +			clocks = <&ccu CLK_BUS_OTG>;
> +			resets = <&ccu RST_BUS_OTG>;
> +			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "mc";
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			extcon = <&usbphy 0>;
> +			status = "disabled";
> +		};
Quick note: it was determined that if ehci0 and/or ohci0 are enabled,
peripheral mode does not function correctly. From my understanding, it 
is
an unrelated issue in musb that causes this; the PHY gets claimed by the
HCI nodes before MUSB, and due to some other issue, the PHY doesn't get
properly rerouted to MUSB. With those nodes disabled, attaching gadgets 
to
MUSB works correctly, and with them enabled, host mode works properly.

- Cody
> +		usbphy: phy@5100400 {
> +			compatible = "allwinner,sun50i-a100-usb-phy",
> +				     "allwinner,sun20i-d1-usb-phy";
> +			reg = <0x05100400 0x100>,
> +			      <0x05101800 0x100>,
> +			      <0x05200800 0x100>;
> +			reg-names = "phy_ctrl",
> +				    "pmu0",
> +				    "pmu1";
> +			clocks = <&ccu CLK_USB_PHY0>,
> +				 <&ccu CLK_USB_PHY1>;
> +			clock-names = "usb0_phy",
> +				      "usb1_phy";
> +			resets = <&ccu RST_USB_PHY0>,
> +				 <&ccu RST_USB_PHY1>;
> +			reset-names = "usb0_reset",
> +				      "usb1_reset";
> +			status = "disabled";
> +			#phy-cells = <1>;
> +		};
> +
> +		ehci0: usb@5101000 {
> +			compatible = "allwinner,sun50i-a100-ehci",
> +				     "generic-ehci";
> +			reg = <0x05101000 0x100>;
> +			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI0>,
> +				 <&ccu CLK_BUS_EHCI0>,
> +				 <&ccu CLK_USB_OHCI0>;
> +			resets = <&ccu RST_BUS_OHCI0>,
> +				 <&ccu RST_BUS_EHCI0>;
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};
> +
> +		ohci0: usb@5101400 {
> +			compatible = "allwinner,sun50i-a100-ohci",
> +				     "generic-ohci";
> +			reg = <0x05101400 0x100>;
> +			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_OHCI0>,
> +				 <&ccu CLK_USB_OHCI0>;
> +			resets = <&ccu RST_BUS_OHCI0>;
> +			phys = <&usbphy 0>;
> +			phy-names = "usb";
> +			status = "disabled";
> +		};

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 07/13] arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1
  2024-10-31  7:02 ` [PATCH v2 07/13] arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1 Cody Eksal
@ 2024-11-02 11:29   ` Chen-Yu Tsai
  0 siblings, 0 replies; 29+ messages in thread
From: Chen-Yu Tsai @ 2024-11-02 11:29 UTC (permalink / raw)
  To: Cody Eksal
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Greg Kroah-Hartman, Kishon Vijay Abraham I,
	Maxime Ripard, Michael Turquette, Nishanth Menon,
	Rafael J. Wysocki, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

On Thu, Oct 31, 2024 at 3:03 PM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>
> From: Yangtao Li <frank@allwinnertech.com>
>
> Add USB support on A100 perf1 board, which include two USB2.0 port.
>
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
> ---
> Changes in V2:
>  - Add dr_mode here, instead of in the .dtsi
>
>  .../allwinner/sun50i-a100-allwinner-perf1.dts | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
> index f5c5c1464482..2f8c7ee60283 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
> @@ -7,6 +7,8 @@
>
>  #include "sun50i-a100.dtsi"
>
> +#include <dt-bindings/gpio/gpio.h>
> +
>  /{
>         model = "Allwinner A100 Perf1";
>         compatible = "allwinner,a100-perf1", "allwinner,sun50i-a100";
> @@ -18,6 +20,36 @@ aliases {
>         chosen {
>                 stdout-path = "serial0:115200n8";
>         };
> +
> +       reg_usb1_vbus: usb1-vbus {
> +               compatible = "regulator-fixed";
> +               regulator-name = "usb1-vbus";
> +               regulator-min-microvolt = <5000000>;
> +               regulator-max-microvolt = <5000000>;
> +               gpio = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
> +               enable-active-high;
> +       };
> +};
> +
> +&ehci0 {
> +       status = "okay";
> +};
> +
> +&ehci1 {
> +       status = "okay";
> +};
> +
> +&ohci0 {
> +       status = "okay";
> +};
> +
> +&ohci1 {
> +       status = "okay";
> +};
> +
> +&usb_otg {
> +       dr_mode = "otg";
> +       status = "okay";

Since you noted in the previous patch that OTG doesn't work if OHCI0/EHCI0
are enabled and probed before musb, maybe we should keep them disabled
for the time being?

You could leave a TODO item above the &usb_otg node.

ChenYu

>  };
>
>  &pio {
> @@ -178,3 +210,10 @@ &uart0 {
>         pinctrl-0 = <&uart0_pb_pins>;
>         status = "okay";
>  };
> +
> +&usbphy {
> +       usb0_id_det-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
> +       usb0_vbus-supply = <&reg_drivevbus>;
> +       usb1_vbus-supply = <&reg_usb1_vbus>;
> +       status = "okay";
> +};
> --
> 2.47.0
>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: (subset) [PATCH v2 00/13] sunxi: A100/A133 second stage support
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (10 preceding siblings ...)
  2024-10-31  7:02 ` [PATCH v2 13/13] arm64: dts: allwinner: a100: Add CPU Operating Performance Points table Cody Eksal
@ 2024-11-02 11:46 ` Chen-Yu Tsai
  2024-11-10  9:25 ` Chen-Yu Tsai
  2025-02-22 13:25 ` Chen-Yu Tsai
  13 siblings, 0 replies; 29+ messages in thread
From: Chen-Yu Tsai @ 2024-11-02 11:46 UTC (permalink / raw)
  To: linux-arm-kernel, linux-clk, linux-kernel, linux-phy, linux-pm,
	linux-sunxi, linux-usb, devicetree, Cody Eksal
  Cc: Conor Dooley, Greg Kroah-Hartman, Jernej Skrabec,
	Kishon Vijay Abraham I, Krzysztof Kozlowski, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki, Rob Herring,
	Samuel Holland, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara

On Thu, 31 Oct 2024 04:02:13 -0300, Cody Eksal wrote:
> This is V2 of this series [5], with some changes that were requested and
> others that were made after testing on more devices. Thank you for all of
> your feedback! A changelog is available below.
> 
> ==================
> Back in 2020, two Allwinner employees, Yangtao Li and Shuosheng Huang, each
> submitted a patch series for the A100 series of SoCs; [1] intended to add
> support for the watchdog, ARM PMU, DMA, USB, and (e)MMC controller, and [2]
> implemented DVFS support. Some patches from the first series landed, but
> the rest were seemingly abandoned.
> 
> [...]

Applied to dt-for-6.13 in git@github.com:linux-sunxi/linux-sunxi.git, thanks!

[01/13] arm64: dts: allwinner: A100: Add PMU mode
        commit: 248b20ed03545656bd1775ed115369854f58f55c
[02/13] arm64: dts: allwinner: a100: add watchdog node
        commit: f84a3aa7782687ca0fa54f768fc6bb825575f91a
[03/13] dt-bindings: phy: sun50i-a64: add a100 compatible
        commit: 4402ef303d4b90748646568cf48f52eea035057a
[04/13] dt-bindings: usb: Add A100 compatible string
        commit: 1e7d0e2a53e6bf4b43f78858b1fb10aa38259375
[05/13] dt-bindings: usb: sunxi-musb: Add A100 compatible string
        commit: e144e89de0e491ea191847b0dc15a5aeb27951eb
[06/13] arm64: dts: allwinner: a100: add usb related nodes
        commit: c3cc9b02f7490d93635692cf58b0a4e517a60ab2
[09/13] arm64: allwinner: a100: Add MMC related nodes
        commit: fcfbb8d9ec584c256c0a6e1ae3174a21b007f399

Best regards,
-- 
Chen-Yu Tsai <wens@csie.org>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node
  2024-10-31  7:02 ` [PATCH v2 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Cody Eksal
@ 2024-11-02 11:48   ` Chen-Yu Tsai
  2024-11-02 21:23     ` Cody Eksal
  0 siblings, 1 reply; 29+ messages in thread
From: Chen-Yu Tsai @ 2024-11-02 11:48 UTC (permalink / raw)
  To: Cody Eksal
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Greg Kroah-Hartman, Kishon Vijay Abraham I,
	Maxime Ripard, Michael Turquette, Nishanth Menon,
	Rafael J. Wysocki, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

On Thu, Oct 31, 2024 at 3:03 PM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>
> From: Yangtao Li <frank@allwinnertech.com>
>
> A100 perf1 hava MicroSD slot and on-board eMMC module, add support for them.
>
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>

So I skipped this one since Andre had some questions about the previous
mmc clock patch. And I believe this one won't work without it?

ChenYu

> ---
>  .../allwinner/sun50i-a100-allwinner-perf1.dts    | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
> index 2f8c7ee60283..d418fc272b3c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
> @@ -39,6 +39,22 @@ &ehci1 {
>         status = "okay";
>  };
>
> +&mmc0 {
> +       vmmc-supply = <&reg_dcdc1>;
> +       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
> +       bus-width = <4>;
> +       status = "okay";
> +};
> +
> +&mmc2 {
> +       vmmc-supply = <&reg_dcdc1>;
> +       vqmmc-supply = <&reg_aldo1>;
> +       cap-mmc-hw-reset;
> +       non-removable;
> +       bus-width = <8>;
> +       status = "okay";
> +};
> +
>  &ohci0 {
>         status = "okay";
>  };
> --
> 2.47.0
>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points
  2024-10-31  7:02 ` [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points Cody Eksal
  2024-10-31  7:42   ` Krzysztof Kozlowski
  2024-10-31 12:10   ` Andre Przywara
@ 2024-11-02 11:50   ` Chen-Yu Tsai
  2 siblings, 0 replies; 29+ messages in thread
From: Chen-Yu Tsai @ 2024-11-02 11:50 UTC (permalink / raw)
  To: Cody Eksal, Viresh Kumar
  Cc: Yangtao Li, Nishanth Menon, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec, Samuel Holland,
	Maxime Ripard, Greg Kroah-Hartman, Kishon Vijay Abraham I,
	Michael Turquette, Rafael J. Wysocki, Vinod Koul, Viresh Kumar,
	Parthiban, Andre Przywara, linux-pm, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel

On Thu, Oct 31, 2024 at 3:03 PM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>
> The A100, similar to the H6 and H616, use an NVMEM value to determine
> speed binnings. The method used is similar to that of the H6. However,
> the information is stored at a slightly different bit offset.
>
> Add a new compatible for the A100.
>
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>

Acked-by: Chen-Yu Tsai <wens@csie.org>

I assume Viresh will take this along with the cpufreq driver patch.

> ---
> Changes in V2:
>  - Fix ordering of compatibles
>
>  .../bindings/opp/allwinner,sun50i-h6-operating-points.yaml       | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml b/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
> index ec5e424bb3c8..75ab552f6ecd 100644
> --- a/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
> +++ b/Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
> @@ -22,6 +22,7 @@ allOf:
>  properties:
>    compatible:
>      enum:
> +      - allwinner,sun50i-a100-operating-points
>        - allwinner,sun50i-h6-operating-points
>        - allwinner,sun50i-h616-operating-points
>
> --
> 2.47.0
>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node
  2024-11-02 11:48   ` Chen-Yu Tsai
@ 2024-11-02 21:23     ` Cody Eksal
  2024-11-03  2:54       ` Chen-Yu Tsai
  0 siblings, 1 reply; 29+ messages in thread
From: Cody Eksal @ 2024-11-02 21:23 UTC (permalink / raw)
  To: wens
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Greg Kroah-Hartman, Kishon Vijay Abraham I,
	Maxime Ripard, Michael Turquette, Nishanth Menon,
	Rafael J. Wysocki, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

On 2024/11/02 8:48 am, Chen-Yu Tsai wrote:
> On Thu, Oct 31, 2024 at 3:03 PM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>>
>> From: Yangtao Li <frank@allwinnertech.com>
>>
>> A100 perf1 hava MicroSD slot and on-board eMMC module, add support for them.
>>
>> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
>> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
> 
> So I skipped this one since Andre had some questions about the previous
> mmc clock patch. And I believe this one won't work without it?
eMMC (mmc2) works fine after more testing, even without the clock
reparenting patch (in fact, it appears to work more consistently), but
mmc0 and mmc1 require more testing and debugging. I'll deal with
the remaining MMC issues in a future patch.

- Cody

> ChenYu
> 
>> ---
>>  .../allwinner/sun50i-a100-allwinner-perf1.dts    | 16 ++++++++++++++++
>>  1 file changed, 16 insertions(+)

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v2 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node
  2024-11-02 21:23     ` Cody Eksal
@ 2024-11-03  2:54       ` Chen-Yu Tsai
  0 siblings, 0 replies; 29+ messages in thread
From: Chen-Yu Tsai @ 2024-11-03  2:54 UTC (permalink / raw)
  To: Cody Eksal
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec,
	Samuel Holland, Greg Kroah-Hartman, Kishon Vijay Abraham I,
	Maxime Ripard, Michael Turquette, Nishanth Menon,
	Rafael J. Wysocki, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara, devicetree,
	linux-arm-kernel, linux-sunxi, linux-kernel

On Sun, Nov 3, 2024 at 5:23 AM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>
> On 2024/11/02 8:48 am, Chen-Yu Tsai wrote:
> > On Thu, Oct 31, 2024 at 3:03 PM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
> >>
> >> From: Yangtao Li <frank@allwinnertech.com>
> >>
> >> A100 perf1 hava MicroSD slot and on-board eMMC module, add support for them.
> >>
> >> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> >> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
> >
> > So I skipped this one since Andre had some questions about the previous
> > mmc clock patch. And I believe this one won't work without it?
> eMMC (mmc2) works fine after more testing, even without the clock
> reparenting patch (in fact, it appears to work more consistently), but
> mmc0 and mmc1 require more testing and debugging. I'll deal with
> the remaining MMC issues in a future patch.

I think it would be better if only the eMMC was enabled. Enabling something
that is almost guaranteed to cause data corruption isn't going to be fun
for users.

ChenYu

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: (subset) [PATCH v2 00/13] sunxi: A100/A133 second stage support
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (11 preceding siblings ...)
  2024-11-02 11:46 ` (subset) [PATCH v2 00/13] sunxi: A100/A133 second stage support Chen-Yu Tsai
@ 2024-11-10  9:25 ` Chen-Yu Tsai
  2025-02-22 13:25 ` Chen-Yu Tsai
  13 siblings, 0 replies; 29+ messages in thread
From: Chen-Yu Tsai @ 2024-11-10  9:25 UTC (permalink / raw)
  To: linux-arm-kernel, linux-clk, linux-kernel, linux-phy, linux-pm,
	linux-sunxi, linux-usb, devicetree, Cody Eksal
  Cc: Conor Dooley, Greg Kroah-Hartman, Jernej Skrabec,
	Kishon Vijay Abraham I, Krzysztof Kozlowski, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki, Rob Herring,
	Samuel Holland, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara

On Thu, 31 Oct 2024 04:02:13 -0300, Cody Eksal wrote:
> This is V2 of this series [5], with some changes that were requested and
> others that were made after testing on more devices. Thank you for all of
> your feedback! A changelog is available below.
> 
> ==================
> Back in 2020, two Allwinner employees, Yangtao Li and Shuosheng Huang, each
> submitted a patch series for the A100 series of SoCs; [1] intended to add
> support for the watchdog, ARM PMU, DMA, USB, and (e)MMC controller, and [2]
> implemented DVFS support. Some patches from the first series landed, but
> the rest were seemingly abandoned.
> 
> [...]

Applied to dt-for-6.13 in git@github.com:linux-sunxi/linux-sunxi.git, thanks!

[10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node
        commit: af1ad5675a2b5feebb49df0e0ac7dab1aeabfaa8

Best regards,
-- 
Chen-Yu Tsai <wens@csie.org>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: (subset) [PATCH v2 00/13] sunxi: A100/A133 second stage support
  2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
                   ` (12 preceding siblings ...)
  2024-11-10  9:25 ` Chen-Yu Tsai
@ 2025-02-22 13:25 ` Chen-Yu Tsai
  13 siblings, 0 replies; 29+ messages in thread
From: Chen-Yu Tsai @ 2025-02-22 13:25 UTC (permalink / raw)
  To: linux-arm-kernel, linux-clk, linux-kernel, linux-phy, linux-pm,
	linux-sunxi, linux-usb, devicetree, Cody Eksal
  Cc: Conor Dooley, Greg Kroah-Hartman, Jernej Skrabec,
	Kishon Vijay Abraham I, Krzysztof Kozlowski, Maxime Ripard,
	Michael Turquette, Nishanth Menon, Rafael J. Wysocki, Rob Herring,
	Samuel Holland, Stephen Boyd, Vinod Koul, Viresh Kumar,
	Viresh Kumar, Yangtao Li, Parthiban, Andre Przywara

On Thu, 31 Oct 2024 04:02:13 -0300, Cody Eksal wrote:
> This is V2 of this series [5], with some changes that were requested and
> others that were made after testing on more devices. Thank you for all of
> your feedback! A changelog is available below.
> 
> ==================
> Back in 2020, two Allwinner employees, Yangtao Li and Shuosheng Huang, each
> submitted a patch series for the A100 series of SoCs; [1] intended to add
> support for the watchdog, ARM PMU, DMA, USB, and (e)MMC controller, and [2]
> implemented DVFS support. Some patches from the first series landed, but
> the rest were seemingly abandoned.
> 
> [...]

Applied to dt-for-6.15 in git@github.com:linux-sunxi/linux-sunxi.git, thanks!

[13/13] arm64: dts: allwinner: a100: Add CPU Operating Performance Points table
        commit: a8181e6861fec3068f393d77ff81b2aaf4ea4203

Best regards,
-- 
Chen-Yu Tsai <wens@csie.org>


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2025-02-22 13:25 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31  7:02 [PATCH v2 00/13] sunxi: A100/A133 second stage support Cody Eksal
2024-10-31  7:02 ` [PATCH v2 01/13] arm64: dts: allwinner: A100: Add PMU mode Cody Eksal
2024-10-31  7:02 ` [PATCH v2 02/13] arm64: dts: allwinner: a100: add watchdog node Cody Eksal
2024-10-31 14:14   ` Parthiban
2024-10-31  7:02 ` [PATCH v2 03/13] dt-bindings: phy: sun50i-a64: add a100 compatible Cody Eksal
2024-10-31 11:36   ` Andre Przywara
2024-10-31 14:35     ` Cody Eksal
2024-10-31  7:02 ` [PATCH v2 04/13] dt-bindings: usb: Add A100 compatible string Cody Eksal
2024-10-31  7:02 ` [PATCH v2 05/13] dt-bindings: usb: sunxi-musb: " Cody Eksal
2024-10-31  7:42   ` Krzysztof Kozlowski
2024-10-31  7:02 ` [PATCH v2 06/13] arm64: dts: allwinner: a100: add usb related nodes Cody Eksal
2024-10-31 11:55   ` Andre Przywara
2024-11-01  5:33   ` Parthiban
2024-11-01  6:14   ` Cody Eksal
2024-10-31  7:02 ` [PATCH v2 07/13] arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1 Cody Eksal
2024-11-02 11:29   ` Chen-Yu Tsai
2024-10-31  7:02 ` [PATCH v2 09/13] arm64: allwinner: a100: Add MMC related nodes Cody Eksal
2024-10-31  7:02 ` [PATCH v2 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Cody Eksal
2024-11-02 11:48   ` Chen-Yu Tsai
2024-11-02 21:23     ` Cody Eksal
2024-11-03  2:54       ` Chen-Yu Tsai
2024-10-31  7:02 ` [PATCH v2 11/13] dt-bindings: opp: h6: Add A100 operating points Cody Eksal
2024-10-31  7:42   ` Krzysztof Kozlowski
2024-10-31 12:10   ` Andre Przywara
2024-11-02 11:50   ` Chen-Yu Tsai
2024-10-31  7:02 ` [PATCH v2 13/13] arm64: dts: allwinner: a100: Add CPU Operating Performance Points table Cody Eksal
2024-11-02 11:46 ` (subset) [PATCH v2 00/13] sunxi: A100/A133 second stage support Chen-Yu Tsai
2024-11-10  9:25 ` Chen-Yu Tsai
2025-02-22 13:25 ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox