devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 00/19] Second step support for A100
@ 2020-11-10  6:20 Frank Lee
  2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
                   ` (9 more replies)
  0 siblings, 10 replies; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:20 UTC (permalink / raw)
  To: tiny.windzz, dmaengine, devicetree, linux-arm-kernel,
	linux-kernel, linux-mmc, linux-watchdog, linux-gpio
  Cc: Frank Lee, Vinod Koul, Rob Herring, Maxime Ripard, Chen-Yu Tsai,
	Ulf Hansson, Kishon Vijay Abraham I, Wim Van Sebroeck,
	Guenter Roeck, Dan Williams, Linus Walleij, Wolfram Sang,
	Marek Vasut, Douglas Anderson, Randy Dunlap, Krzysztof Kozlowski,
	Colin Ian King, Ondrej Jirman, Rikard Falkeborn,
	Greg Kroah-Hartman

Let's add watchdog, arm-pmu, dma, usb, mmc..... support for allwinner
a100 soc.

Yangtao Li (19):
  pinctrl: sunxi: fix irq bank map for the Allwinner A100 pin controller
  pinctrl: sunxi: Mark the irq bank not found in
    sunxi_pinctrl_irq_handler() with WARN_ON
  pinctrl: sunxi: Always call chained_irq_{enter, exit} in
    sunxi_pinctrl_irq_handler
  dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible
  dmaengine: sun6i: Add support for A100 DMA
  arm64: allwinner: a100: Add device node for DMA controller
  arm64: dts: allwinner: A100: Add PMU mode
  phy: sun4i-usb: remove enable_pmu_unk1 from sun50i_h6_cfg
  phy: allwinner: Convert to devm_platform_ioremap_* API
  dt-bindings: watchdog: sun4i: Add A100 compatible
  arm64: dts: allwinner: a100: add watchdog node
  dt-bindings: Add bindings for USB phy on Allwinner A100
  phy: sun4i-usb: add support for A100 USB PHY
  arm64: dts: allwinner: a100: add usb related nodes
  arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1
  dt-bindings: mmc: sunxi: Add A100 compatibles
  mmc: sunxi: add support for A100 mmc controller
  arm64: allwinner: a100: Add MMC related nodes
  arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node

 .../dma/allwinner,sun50i-a64-dma.yaml         |   5 +-
 .../bindings/mmc/allwinner,sun4i-a10-mmc.yaml |   2 +
 .../phy/allwinner,sun50i-a100-usb-phy.yaml    | 105 ++++++++++
 .../watchdog/allwinner,sun4i-a10-wdt.yaml     |   3 +
 .../allwinner/sun50i-a100-allwinner-perf1.dts |  54 +++++
 .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 197 +++++++++++++++++-
 drivers/dma/sun6i-dma.c                       |  25 +++
 drivers/mmc/host/sunxi-mmc.c                  |  28 ++-
 drivers/phy/allwinner/phy-sun4i-usb.c         |  29 ++-
 drivers/phy/allwinner/phy-sun50i-usb3.c       |   4 +-
 drivers/phy/allwinner/phy-sun6i-mipi-dphy.c   |   4 +-
 drivers/phy/allwinner/phy-sun9i-usb.c         |   4 +-
 drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c   |   2 +-
 drivers/pinctrl/sunxi/pinctrl-sunxi.c         |   9 +-
 14 files changed, 443 insertions(+), 28 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml

-- 
2.28.0


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

* [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
@ 2020-11-10  6:26 ` Frank Lee
  2020-11-11 22:46   ` Rob Herring
  2020-11-18 11:01   ` Vinod Koul
  2020-11-10  6:29 ` [RESEND PATCH 06/19] arm64: allwinner: a100: Add device node for DMA controller Frank Lee
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:26 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, dmaengine, linux-arm-kernel, linux-kernel,
	Yangtao Li, Vinod Koul, Rob Herring, Maxime Ripard, Chen-Yu Tsai

From: Yangtao Li <frank@allwinnertech.com>

Add a binding for A100's dma controller.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 .../devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml
index 372679dbd216..b6e1ebfaf366 100644
--- a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml
@@ -21,6 +21,7 @@ properties:
   compatible:
     oneOf:
       - const: allwinner,sun50i-a64-dma
+      - const: allwinner,sun50i-a100-dma
       - const: allwinner,sun50i-h6-dma
       - items:
           - const: allwinner,sun8i-r40-dma
@@ -56,7 +57,9 @@ required:
 if:
   properties:
     compatible:
-      const: allwinner,sun50i-h6-dma
+      enum:
+        - allwinner,sun50i-a100-dma
+        - allwinner,sun50i-h6-dma
 
 then:
   properties:
-- 
2.28.0


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

* [RESEND PATCH 06/19] arm64: allwinner: a100: Add device node for DMA controller
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
  2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
@ 2020-11-10  6:29 ` Frank Lee
  2020-11-28 20:34   ` André Przywara
  2020-11-10  6:31 ` [RESEND PATCH 07/19] arm64: dts: allwinner: A100: Add PMU mode Frank Lee
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:29 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, linux-arm-kernel, linux-kernel, Yangtao Li,
	Rob Herring, Maxime Ripard, Chen-Yu Tsai

From: Yangtao Li <frank@allwinnertech.com>

The A100 SoC has a DMA controller that supports 8 DMA channels
to and from various peripherals.

Add a device node for it.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
index cc321c04f121..c34ed8045363 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
@@ -101,6 +101,18 @@ ccu: clock@3001000 {
 			#reset-cells = <1>;
 		};
 
+		dma: dma-controller@3002000 {
+			compatible = "allwinner,sun50i-a100-dma";
+			reg = <0x03002000 0x1000>;
+			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>;
+			clock-names = "bus", "mbus";
+			dma-channels = <8>;
+			dma-requests = <51>;
+			resets = <&ccu RST_BUS_DMA>;
+			#dma-cells = <1>;
+		};
+
 		gic: interrupt-controller@3021000 {
 			compatible = "arm,gic-400";
 			reg = <0x03021000 0x1000>, <0x03022000 0x2000>,
-- 
2.28.0


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

* [RESEND PATCH 07/19] arm64: dts: allwinner: A100: Add PMU mode
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
  2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
  2020-11-10  6:29 ` [RESEND PATCH 06/19] arm64: allwinner: a100: Add device node for DMA controller Frank Lee
@ 2020-11-10  6:31 ` Frank Lee
  2020-11-28 20:47   ` André Przywara
  2020-11-10  6:36 ` [RESEND PATCH 10/19] dt-bindings: watchdog: sun4i: Add A100 compatible Frank Lee
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:31 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, linux-arm-kernel, linux-kernel, Yangtao Li,
	Rob Herring, Maxime Ripard, Chen-Yu Tsai

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>
---
 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 c34ed8045363..01ff53b5a7a8 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.28.0


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

* [RESEND PATCH 10/19] dt-bindings: watchdog: sun4i: Add A100 compatible
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
                   ` (2 preceding siblings ...)
  2020-11-10  6:31 ` [RESEND PATCH 07/19] arm64: dts: allwinner: A100: Add PMU mode Frank Lee
@ 2020-11-10  6:36 ` Frank Lee
  2020-11-11 22:46   ` Rob Herring
  2020-11-10  6:38 ` [RESEND PATCH 11/19] arm64: dts: allwinner: a100: add watchdog node Frank Lee
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:36 UTC (permalink / raw)
  To: tiny.windzz
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-kernel,
	Yangtao Li, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
	Maxime Ripard, Chen-Yu Tsai

From: Yangtao Li <frank@allwinnertech.com>

Add a binding for A100's watchdog controller.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
index e8f226376108..5ac607de8be4 100644
--- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
@@ -21,6 +21,9 @@ properties:
       - items:
           - const: allwinner,sun50i-a64-wdt
           - const: allwinner,sun6i-a31-wdt
+      - items:
+          - const: allwinner,sun50i-a100-wdt
+          - const: allwinner,sun6i-a31-wdt
       - items:
           - const: allwinner,sun50i-h6-wdt
           - const: allwinner,sun6i-a31-wdt
-- 
2.28.0


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

* [RESEND PATCH 11/19] arm64: dts: allwinner: a100: add watchdog node
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
                   ` (3 preceding siblings ...)
  2020-11-10  6:36 ` [RESEND PATCH 10/19] dt-bindings: watchdog: sun4i: Add A100 compatible Frank Lee
@ 2020-11-10  6:38 ` Frank Lee
  2020-11-28 20:20   ` André Przywara
  2020-11-10  6:39 ` [RESEND PATCH 12/19] dt-bindings: Add bindings for USB phy on Allwinner A100 Frank Lee
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:38 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, linux-arm-kernel, linux-kernel, Yangtao Li,
	Rob Herring, Maxime Ripard, Chen-Yu Tsai

From: Yangtao Li <frank@allwinnertech.com>

Declare A100's watchdog in the device-tree.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 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 01ff53b5a7a8..6aa3337ce0e9 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.28.0


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

* [RESEND PATCH 12/19] dt-bindings: Add bindings for USB phy on Allwinner A100
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
                   ` (4 preceding siblings ...)
  2020-11-10  6:38 ` [RESEND PATCH 11/19] arm64: dts: allwinner: a100: add watchdog node Frank Lee
@ 2020-11-10  6:39 ` Frank Lee
  2020-11-11 22:50   ` Rob Herring
  2020-11-10  6:41 ` [RESEND PATCH 14/19] arm64: dts: allwinner: a100: add usb related nodes Frank Lee
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:39 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, linux-arm-kernel, linux-kernel, Yangtao Li,
	Kishon Vijay Abraham I, Vinod Koul, Rob Herring, Maxime Ripard,
	Chen-Yu Tsai

From: Yangtao Li <frank@allwinnertech.com>

Add a device tree binding for the A100's USB PHY.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 .../phy/allwinner,sun50i-a100-usb-phy.yaml    | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml

diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml
new file mode 100644
index 000000000000..cc9bbebe2bd7
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/allwinner,sun50i-a100-usb-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A100 USB PHY Device Tree Bindings
+
+maintainers:
+  - Yangtao Li <tiny.windzz@gmail.com>
+
+properties:
+  "#phy-cells":
+    const: 1
+
+  compatible:
+    const: allwinner,sun50i-a100-usb-phy
+
+  reg:
+    items:
+      - description: PHY Control registers
+      - description: PHY PMU0 registers
+      - description: PHY PMU1 registers
+
+  reg-names:
+    items:
+      - const: phy_ctrl
+      - const: pmu0
+      - const: pmu1
+
+  clocks:
+    items:
+      - description: USB OTG PHY bus clock
+      - description: USB Host 0 PHY bus clock
+
+  clock-names:
+    items:
+      - const: usb0_phy
+      - const: usb1_phy
+
+  resets:
+    items:
+      - description: USB OTG reset
+      - description: USB Host 1 Controller reset
+
+  reset-names:
+    items:
+      - const: usb0_reset
+      - const: usb1_reset
+
+  usb0_id_det-gpios:
+    description: GPIO to the USB OTG ID pin
+
+  usb0_vbus_det-gpios:
+    description: GPIO to the USB OTG VBUS detect pin
+
+  usb0_vbus_power-supply:
+    description: Power supply to detect the USB OTG VBUS
+
+  usb0_vbus-supply:
+    description: Regulator controlling USB OTG VBUS
+
+  usb1_vbus-supply:
+    description: Regulator controlling USB1 Host controller
+
+required:
+  - "#phy-cells"
+  - compatible
+  - clocks
+  - clock-names
+  - reg
+  - reg-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/clock/sun50i-a100-ccu.h>
+    #include <dt-bindings/reset/sun50i-a100-ccu.h>
+
+    phy@5100400 {
+        #phy-cells = <1>;
+        compatible = "allwinner,sun50i-a100-usb-phy";
+        reg = <0x05100400 0x14>,
+              <0x05101800 0x4>,
+              <0x05200800 0x4>;
+        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";
+        usb0_id_det-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
+        usb0_vbus_power-supply = <&usb_power_supply>;
+        usb0_vbus-supply = <&reg_drivevbus>;
+        usb1_vbus-supply = <&reg_usb1_vbus>;
+    };
-- 
2.28.0


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

* [RESEND PATCH 14/19] arm64: dts: allwinner: a100: add usb related nodes
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
                   ` (5 preceding siblings ...)
  2020-11-10  6:39 ` [RESEND PATCH 12/19] dt-bindings: Add bindings for USB phy on Allwinner A100 Frank Lee
@ 2020-11-10  6:41 ` Frank Lee
  2020-11-10  6:45 ` [RESEND PATCH 16/19] dt-bindings: mmc: sunxi: Add A100 compatibles Frank Lee
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:41 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, linux-arm-kernel, linux-kernel, Yangtao Li,
	Rob Herring, Maxime Ripard, Chen-Yu Tsai

From: Yangtao Li <frank@allwinnertech.com>

Allwinner A64 have two HCI USB controllers, a OTG controller and a USB
PHY device, let's add nodes on dts.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 .../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 6aa3337ce0e9..c731bb9727c2 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
@@ -290,6 +290,97 @@ ths: thermal-sensor@5070400 {
 			#thermal-sensor-cells = <1>;
 		};
 
+		usbphy: phy@5100400 {
+			#phy-cells = <1>;
+			compatible = "allwinner,sun50i-a100-usb-phy";
+			reg = <0x05100400 0x14>,
+			      <0x05101800 0x4>,
+			      <0x05200800 0x4>;
+			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";
+		};
+
+		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";
+		};
+
+		usb_otg: usb@5100000 {
+			compatible = "allwinner,sun50i-a100-musb",
+				     "allwinner,sun8i-h3-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>;
+			dr_mode = "otg";
+			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.28.0


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

* [RESEND PATCH 16/19] dt-bindings: mmc: sunxi: Add A100 compatibles
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
                   ` (6 preceding siblings ...)
  2020-11-10  6:41 ` [RESEND PATCH 14/19] arm64: dts: allwinner: a100: add usb related nodes Frank Lee
@ 2020-11-10  6:45 ` Frank Lee
  2020-11-11 22:51   ` Rob Herring
  2020-11-10  6:48 ` [RESEND PATCH 18/19] arm64: allwinner: a100: Add MMC related nodes Frank Lee
  2020-11-10  6:49 ` [RESEND PATCH 19/19] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Frank Lee
  9 siblings, 1 reply; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:45 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-mmc,
	Yangtao Li, Ulf Hansson, Rob Herring, Maxime Ripard,
	Chen-Yu Tsai

From: Yangtao Li <frank@allwinnertech.com>

Add binding for A100's mmc and emmc controller.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 .../devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml        | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml b/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
index e82c9a07b6fb..41821f14ecaa 100644
--- a/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
+++ b/Documentation/devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml
@@ -26,6 +26,8 @@ properties:
       - const: allwinner,sun9i-a80-mmc
       - const: allwinner,sun50i-a64-emmc
       - const: allwinner,sun50i-a64-mmc
+      - const: allwinner,sun50i-a100-emmc
+      - const: allwinner,sun50i-a100-mmc
       - items:
           - const: allwinner,sun8i-a83t-mmc
           - const: allwinner,sun7i-a20-mmc
-- 
2.28.0


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

* [RESEND PATCH 18/19] arm64: allwinner: a100: Add MMC related nodes
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
                   ` (7 preceding siblings ...)
  2020-11-10  6:45 ` [RESEND PATCH 16/19] dt-bindings: mmc: sunxi: Add A100 compatibles Frank Lee
@ 2020-11-10  6:48 ` Frank Lee
  2020-11-28 20:07   ` André Przywara
  2020-11-10  6:49 ` [RESEND PATCH 19/19] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Frank Lee
  9 siblings, 1 reply; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:48 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, linux-arm-kernel, linux-kernel, Yangtao Li,
	Rob Herring, Maxime Ripard, Chen-Yu Tsai

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>
---
 .../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 c731bb9727c2..4adfc7d4854a 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.28.0


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

* [RESEND PATCH 19/19] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
                   ` (8 preceding siblings ...)
  2020-11-10  6:48 ` [RESEND PATCH 18/19] arm64: allwinner: a100: Add MMC related nodes Frank Lee
@ 2020-11-10  6:49 ` Frank Lee
  9 siblings, 0 replies; 22+ messages in thread
From: Frank Lee @ 2020-11-10  6:49 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, linux-arm-kernel, linux-kernel, Yangtao Li,
	Rob Herring, Maxime Ripard, Chen-Yu Tsai

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>
---
 .../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 ef205c9b8ff4..d102c50ff7c1 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.28.0


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

* Re: [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible
  2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
@ 2020-11-11 22:46   ` Rob Herring
  2020-11-18 11:01   ` Vinod Koul
  1 sibling, 0 replies; 22+ messages in thread
From: Rob Herring @ 2020-11-11 22:46 UTC (permalink / raw)
  To: Frank Lee
  Cc: tiny.windzz, dmaengine, Rob Herring, Vinod Koul, Chen-Yu Tsai,
	Maxime Ripard, devicetree, linux-arm-kernel, linux-kernel

On Tue, 10 Nov 2020 14:26:38 +0800, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> Add a binding for A100's dma controller.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> ---
>  .../devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml    | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 

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

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

* Re: [RESEND PATCH 10/19] dt-bindings: watchdog: sun4i: Add A100 compatible
  2020-11-10  6:36 ` [RESEND PATCH 10/19] dt-bindings: watchdog: sun4i: Add A100 compatible Frank Lee
@ 2020-11-11 22:46   ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2020-11-11 22:46 UTC (permalink / raw)
  To: Frank Lee
  Cc: Wim Van Sebroeck, Guenter Roeck, linux-kernel, devicetree,
	tiny.windzz, Maxime Ripard, linux-arm-kernel, Rob Herring,
	linux-watchdog, Chen-Yu Tsai

On Tue, 10 Nov 2020 14:36:48 +0800, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> Add a binding for A100's watchdog controller.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> ---
>  .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml  | 3 +++
>  1 file changed, 3 insertions(+)
> 

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

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

* Re: [RESEND PATCH 12/19] dt-bindings: Add bindings for USB phy on Allwinner A100
  2020-11-10  6:39 ` [RESEND PATCH 12/19] dt-bindings: Add bindings for USB phy on Allwinner A100 Frank Lee
@ 2020-11-11 22:50   ` Rob Herring
  2020-11-28 20:18     ` André Przywara
  0 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2020-11-11 22:50 UTC (permalink / raw)
  To: Frank Lee
  Cc: tiny.windzz, devicetree, linux-arm-kernel, linux-kernel,
	Kishon Vijay Abraham I, Vinod Koul, Maxime Ripard, Chen-Yu Tsai

On Tue, Nov 10, 2020 at 02:39:42PM +0800, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> Add a device tree binding for the A100's USB PHY.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> ---
>  .../phy/allwinner,sun50i-a100-usb-phy.yaml    | 105 ++++++++++++++++++
>  1 file changed, 105 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml
> 
> diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml
> new file mode 100644
> index 000000000000..cc9bbebe2bd7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml
> @@ -0,0 +1,105 @@
> +# SPDX-License-Identifier: GPL-2.0

Dual license new bindings. checkpatch.pl will tell you which ones.

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/phy/allwinner,sun50i-a100-usb-phy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Allwinner A100 USB PHY Device Tree Bindings
> +
> +maintainers:
> +  - Yangtao Li <tiny.windzz@gmail.com>
> +
> +properties:
> +  "#phy-cells":
> +    const: 1
> +
> +  compatible:
> +    const: allwinner,sun50i-a100-usb-phy
> +
> +  reg:
> +    items:
> +      - description: PHY Control registers
> +      - description: PHY PMU0 registers
> +      - description: PHY PMU1 registers
> +
> +  reg-names:
> +    items:
> +      - const: phy_ctrl
> +      - const: pmu0
> +      - const: pmu1
> +
> +  clocks:
> +    items:
> +      - description: USB OTG PHY bus clock
> +      - description: USB Host 0 PHY bus clock
> +
> +  clock-names:
> +    items:
> +      - const: usb0_phy
> +      - const: usb1_phy
> +
> +  resets:
> +    items:
> +      - description: USB OTG reset
> +      - description: USB Host 1 Controller reset
> +
> +  reset-names:
> +    items:
> +      - const: usb0_reset
> +      - const: usb1_reset
> +
> +  usb0_id_det-gpios:
> +    description: GPIO to the USB OTG ID pin

Needs 'maxItems: 1'

> +
> +  usb0_vbus_det-gpios:
> +    description: GPIO to the USB OTG VBUS detect pin
> +
> +  usb0_vbus_power-supply:
> +    description: Power supply to detect the USB OTG VBUS
> +
> +  usb0_vbus-supply:
> +    description: Regulator controlling USB OTG VBUS
> +
> +  usb1_vbus-supply:
> +    description: Regulator controlling USB1 Host controller

Are ID and VBus actually connected to the phy h/w? Really, all this 
should be in a USB connector node for which we have bindings.

> +
> +required:
> +  - "#phy-cells"
> +  - compatible
> +  - clocks
> +  - clock-names
> +  - reg
> +  - reg-names
> +  - resets
> +  - reset-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    #include <dt-bindings/clock/sun50i-a100-ccu.h>
> +    #include <dt-bindings/reset/sun50i-a100-ccu.h>
> +
> +    phy@5100400 {
> +        #phy-cells = <1>;
> +        compatible = "allwinner,sun50i-a100-usb-phy";
> +        reg = <0x05100400 0x14>,
> +              <0x05101800 0x4>,
> +              <0x05200800 0x4>;
> +        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";
> +        usb0_id_det-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
> +        usb0_vbus_power-supply = <&usb_power_supply>;
> +        usb0_vbus-supply = <&reg_drivevbus>;
> +        usb1_vbus-supply = <&reg_usb1_vbus>;
> +    };
> -- 
> 2.28.0
> 

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

* Re: [RESEND PATCH 16/19] dt-bindings: mmc: sunxi: Add A100 compatibles
  2020-11-10  6:45 ` [RESEND PATCH 16/19] dt-bindings: mmc: sunxi: Add A100 compatibles Frank Lee
@ 2020-11-11 22:51   ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2020-11-11 22:51 UTC (permalink / raw)
  To: Frank Lee
  Cc: Chen-Yu Tsai, Rob Herring, linux-kernel, Maxime Ripard,
	linux-mmc, tiny.windzz, Ulf Hansson, devicetree,
	linux-arm-kernel

On Tue, 10 Nov 2020 14:45:16 +0800, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> Add binding for A100's mmc and emmc controller.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> ---
>  .../devicetree/bindings/mmc/allwinner,sun4i-a10-mmc.yaml        | 2 ++
>  1 file changed, 2 insertions(+)
> 

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

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

* Re: [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible
  2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
  2020-11-11 22:46   ` Rob Herring
@ 2020-11-18 11:01   ` Vinod Koul
  1 sibling, 0 replies; 22+ messages in thread
From: Vinod Koul @ 2020-11-18 11:01 UTC (permalink / raw)
  To: Frank Lee
  Cc: tiny.windzz, devicetree, dmaengine, linux-arm-kernel,
	linux-kernel, Rob Herring, Maxime Ripard, Chen-Yu Tsai

On 10-11-20, 14:26, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> Add a binding for A100's dma controller.

Applied, thanks

-- 
~Vinod

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

* Re: [RESEND PATCH 18/19] arm64: allwinner: a100: Add MMC related nodes
  2020-11-10  6:48 ` [RESEND PATCH 18/19] arm64: allwinner: a100: Add MMC related nodes Frank Lee
@ 2020-11-28 20:07   ` André Przywara
  0 siblings, 0 replies; 22+ messages in thread
From: André Przywara @ 2020-11-28 20:07 UTC (permalink / raw)
  To: Frank Lee, tiny.windzz
  Cc: devicetree, linux-kernel, Maxime Ripard, Chen-Yu Tsai,
	Rob Herring, linux-arm-kernel, Jernej Skrabec

On 10/11/2020 06:48, Frank Lee wrote:

Hi,

> 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>

I don't have a datasheet nor a device for testing, but at least I could
check the pins against the pinctrl driver, and compare the MMC nodes
against the H6. Apart from the interrupts they are the same, so:

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

Cheers,
Andre

> ---
>  .../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 c731bb9727c2..4adfc7d4854a 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>;
> 


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

* Re: [RESEND PATCH 12/19] dt-bindings: Add bindings for USB phy on Allwinner A100
  2020-11-11 22:50   ` Rob Herring
@ 2020-11-28 20:18     ` André Przywara
  2020-12-01 18:44       ` Maxime Ripard
  0 siblings, 1 reply; 22+ messages in thread
From: André Przywara @ 2020-11-28 20:18 UTC (permalink / raw)
  To: Rob Herring, Frank Lee
  Cc: devicetree, tiny.windzz, linux-kernel, Maxime Ripard,
	Kishon Vijay Abraham I, Vinod Koul, Chen-Yu Tsai,
	linux-arm-kernel, Jernej Skrabec

On 11/11/2020 22:50, Rob Herring wrote:

Hi,

> On Tue, Nov 10, 2020 at 02:39:42PM +0800, Frank Lee wrote:
>> From: Yangtao Li <frank@allwinnertech.com>
>>
>> Add a device tree binding for the A100's USB PHY.

Not your fault, Yangto, but why do we actually have a separate binding
document per SoC, when the differences between the PHYs are so minimal
that we get away with some flags in the compatible match, in one driver
file?

For a start this file is basically identical to the A64 one (apart from
the example), so can you just add the A100 compatible string to that
one, instead?

Cheers,
Andre

>>
>> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
>> ---
>>  .../phy/allwinner,sun50i-a100-usb-phy.yaml    | 105 ++++++++++++++++++
>>  1 file changed, 105 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml
>> new file mode 100644
>> index 000000000000..cc9bbebe2bd7
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml
>> @@ -0,0 +1,105 @@
>> +# SPDX-License-Identifier: GPL-2.0
> 
> Dual license new bindings. checkpatch.pl will tell you which ones.
> 
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/phy/allwinner,sun50i-a100-usb-phy.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Allwinner A100 USB PHY Device Tree Bindings
>> +
>> +maintainers:
>> +  - Yangtao Li <tiny.windzz@gmail.com>
>> +
>> +properties:
>> +  "#phy-cells":
>> +    const: 1
>> +
>> +  compatible:
>> +    const: allwinner,sun50i-a100-usb-phy
>> +
>> +  reg:
>> +    items:
>> +      - description: PHY Control registers
>> +      - description: PHY PMU0 registers
>> +      - description: PHY PMU1 registers
>> +
>> +  reg-names:
>> +    items:
>> +      - const: phy_ctrl
>> +      - const: pmu0
>> +      - const: pmu1
>> +
>> +  clocks:
>> +    items:
>> +      - description: USB OTG PHY bus clock
>> +      - description: USB Host 0 PHY bus clock
>> +
>> +  clock-names:
>> +    items:
>> +      - const: usb0_phy
>> +      - const: usb1_phy
>> +
>> +  resets:
>> +    items:
>> +      - description: USB OTG reset
>> +      - description: USB Host 1 Controller reset
>> +
>> +  reset-names:
>> +    items:
>> +      - const: usb0_reset
>> +      - const: usb1_reset
>> +
>> +  usb0_id_det-gpios:
>> +    description: GPIO to the USB OTG ID pin
> 
> Needs 'maxItems: 1'
> 
>> +
>> +  usb0_vbus_det-gpios:
>> +    description: GPIO to the USB OTG VBUS detect pin
>> +
>> +  usb0_vbus_power-supply:
>> +    description: Power supply to detect the USB OTG VBUS
>> +
>> +  usb0_vbus-supply:
>> +    description: Regulator controlling USB OTG VBUS
>> +
>> +  usb1_vbus-supply:
>> +    description: Regulator controlling USB1 Host controller
> 
> Are ID and VBus actually connected to the phy h/w? Really, all this 
> should be in a USB connector node for which we have bindings.
> 
>> +
>> +required:
>> +  - "#phy-cells"
>> +  - compatible
>> +  - clocks
>> +  - clock-names
>> +  - reg
>> +  - reg-names
>> +  - resets
>> +  - reset-names
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    #include <dt-bindings/gpio/gpio.h>
>> +    #include <dt-bindings/clock/sun50i-a100-ccu.h>
>> +    #include <dt-bindings/reset/sun50i-a100-ccu.h>
>> +
>> +    phy@5100400 {
>> +        #phy-cells = <1>;
>> +        compatible = "allwinner,sun50i-a100-usb-phy";
>> +        reg = <0x05100400 0x14>,
>> +              <0x05101800 0x4>,
>> +              <0x05200800 0x4>;
>> +        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";
>> +        usb0_id_det-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
>> +        usb0_vbus_power-supply = <&usb_power_supply>;
>> +        usb0_vbus-supply = <&reg_drivevbus>;
>> +        usb1_vbus-supply = <&reg_usb1_vbus>;
>> +    };
>> -- 
>> 2.28.0
>>
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


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

* Re: [RESEND PATCH 11/19] arm64: dts: allwinner: a100: add watchdog node
  2020-11-10  6:38 ` [RESEND PATCH 11/19] arm64: dts: allwinner: a100: add watchdog node Frank Lee
@ 2020-11-28 20:20   ` André Przywara
  0 siblings, 0 replies; 22+ messages in thread
From: André Przywara @ 2020-11-28 20:20 UTC (permalink / raw)
  To: Frank Lee, tiny.windzz
  Cc: devicetree, linux-kernel, Maxime Ripard, Chen-Yu Tsai,
	Rob Herring, linux-arm-kernel, Jernej Skrabec

On 10/11/2020 06:38, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> Declare A100's watchdog in the device-tree.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>

I don't have any manual nor hardware, but this node looks alright, when
compared to the H6 one.

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

Cheers,
Andre

> ---
>  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 01ff53b5a7a8..6aa3337ce0e9 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] 22+ messages in thread

* Re: [RESEND PATCH 06/19] arm64: allwinner: a100: Add device node for DMA controller
  2020-11-10  6:29 ` [RESEND PATCH 06/19] arm64: allwinner: a100: Add device node for DMA controller Frank Lee
@ 2020-11-28 20:34   ` André Przywara
  0 siblings, 0 replies; 22+ messages in thread
From: André Przywara @ 2020-11-28 20:34 UTC (permalink / raw)
  To: Frank Lee, tiny.windzz
  Cc: devicetree, linux-kernel, Maxime Ripard, Chen-Yu Tsai,
	Rob Herring, linux-arm-kernel, Jernej Skrabec

On 10/11/2020 06:29, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> The A100 SoC has a DMA controller that supports 8 DMA channels
> to and from various peripherals.
> 
> Add a device node for it.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> index cc321c04f121..c34ed8045363 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
> @@ -101,6 +101,18 @@ ccu: clock@3001000 {
>  			#reset-cells = <1>;
>  		};
>  
> +		dma: dma-controller@3002000 {
> +			compatible = "allwinner,sun50i-a100-dma";

So at it appears to work with the exact same settings in the driver as
the H6, we should have that as a compatible fallback:
  compatible = "allwinner,sun50i-a100-dma", "allwinner,sun50i-h6-dma";

Cheers,
Andre

> +			reg = <0x03002000 0x1000>;
> +			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>;
> +			clock-names = "bus", "mbus";
> +			dma-channels = <8>;
> +			dma-requests = <51>;
> +			resets = <&ccu RST_BUS_DMA>;
> +			#dma-cells = <1>;
> +		};
> +
>  		gic: interrupt-controller@3021000 {
>  			compatible = "arm,gic-400";
>  			reg = <0x03021000 0x1000>, <0x03022000 0x2000>,
> 


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

* Re: [RESEND PATCH 07/19] arm64: dts: allwinner: A100: Add PMU mode
  2020-11-10  6:31 ` [RESEND PATCH 07/19] arm64: dts: allwinner: A100: Add PMU mode Frank Lee
@ 2020-11-28 20:47   ` André Przywara
  0 siblings, 0 replies; 22+ messages in thread
From: André Przywara @ 2020-11-28 20:47 UTC (permalink / raw)
  To: Frank Lee, tiny.windzz
  Cc: devicetree, linux-kernel, Maxime Ripard, Chen-Yu Tsai,
	Rob Herring, linux-arm-kernel, Jernej Skrabec

On 10/11/2020 06:31, Frank Lee wrote:

Hi,

> 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.

Have you tested that the interrupts actually work? For the A64 there
were wrong in the manual, and we realised only later.
"perf stat" works even without interrupts, but "perf record" requires
interrupts, and will return empty-handed if they don't work.
Can you confirm this?

> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>

Without being able to test or verify this, the nodes looks correct, so:

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

Cheers,
Andre

> ---
>  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 c34ed8045363..01ff53b5a7a8 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";
> 


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

* Re: [RESEND PATCH 12/19] dt-bindings: Add bindings for USB phy on Allwinner A100
  2020-11-28 20:18     ` André Przywara
@ 2020-12-01 18:44       ` Maxime Ripard
  0 siblings, 0 replies; 22+ messages in thread
From: Maxime Ripard @ 2020-12-01 18:44 UTC (permalink / raw)
  To: André Przywara
  Cc: Rob Herring, Frank Lee, devicetree, tiny.windzz, linux-kernel,
	Kishon Vijay Abraham I, Vinod Koul, Chen-Yu Tsai,
	linux-arm-kernel, Jernej Skrabec

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

On Sat, Nov 28, 2020 at 08:18:16PM +0000, André Przywara wrote:
> On 11/11/2020 22:50, Rob Herring wrote:
> 
> Hi,
> 
> > On Tue, Nov 10, 2020 at 02:39:42PM +0800, Frank Lee wrote:
> >> From: Yangtao Li <frank@allwinnertech.com>
> >>
> >> Add a device tree binding for the A100's USB PHY.
> 
> Not your fault, Yangto, but why do we actually have a separate binding
> document per SoC, when the differences between the PHYs are so minimal
> that we get away with some flags in the compatible match, in one driver
> file?

They are similar, but there's massive differences between them still
(like which regulators are supposed to be there, or the register names).
So putting them all in the same file just ended up in an unmaintainable
mess.

> For a start this file is basically identical to the A64 one (apart from
> the example), so can you just add the A100 compatible string to that
> one, instead?

But yeah, if two are identical they should be merged

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, other threads:[~2020-12-01 18:45 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
2020-11-11 22:46   ` Rob Herring
2020-11-18 11:01   ` Vinod Koul
2020-11-10  6:29 ` [RESEND PATCH 06/19] arm64: allwinner: a100: Add device node for DMA controller Frank Lee
2020-11-28 20:34   ` André Przywara
2020-11-10  6:31 ` [RESEND PATCH 07/19] arm64: dts: allwinner: A100: Add PMU mode Frank Lee
2020-11-28 20:47   ` André Przywara
2020-11-10  6:36 ` [RESEND PATCH 10/19] dt-bindings: watchdog: sun4i: Add A100 compatible Frank Lee
2020-11-11 22:46   ` Rob Herring
2020-11-10  6:38 ` [RESEND PATCH 11/19] arm64: dts: allwinner: a100: add watchdog node Frank Lee
2020-11-28 20:20   ` André Przywara
2020-11-10  6:39 ` [RESEND PATCH 12/19] dt-bindings: Add bindings for USB phy on Allwinner A100 Frank Lee
2020-11-11 22:50   ` Rob Herring
2020-11-28 20:18     ` André Przywara
2020-12-01 18:44       ` Maxime Ripard
2020-11-10  6:41 ` [RESEND PATCH 14/19] arm64: dts: allwinner: a100: add usb related nodes Frank Lee
2020-11-10  6:45 ` [RESEND PATCH 16/19] dt-bindings: mmc: sunxi: Add A100 compatibles Frank Lee
2020-11-11 22:51   ` Rob Herring
2020-11-10  6:48 ` [RESEND PATCH 18/19] arm64: allwinner: a100: Add MMC related nodes Frank Lee
2020-11-28 20:07   ` André Przywara
2020-11-10  6:49 ` [RESEND PATCH 19/19] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Frank Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).