All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] arm64: dts: allwinner: Various DT fixes
@ 2021-01-06 15:05 ` Andre Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: Jernej Skrabec, Icenowy Zheng, devicetree, linux-arm-kernel, linux-sunxi

Hi,

a collection of DT fixes I gathered over time:

- Adding usbphy references to [EO]HCI0 nodes (A64, H6)
- Adding Pine64-LTS status LED
- Dropping non-removable from SoPine/Pine64-LTS SD card
- Enabling HS200 @ 150 MHz on Pine H64 (H6)
- Enabling HS200 @ 150 MHz on Pine64-LTS

For details please see the individual patches!

Thanks,
Andre

Andre Przywara (7):
  arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
  arm64: dts: allwinner: Pine64-LTS: Add status LED
  arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card
  arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency
  arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz
  arm64: dts: allwinner: Pine64-LTS/SoPine: Enable HS200 eMMC mode
  arm64: dts: allwinner: Pine H64: Enable HS200 eMMC mode

 .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts |  5 +----
 .../dts/allwinner/sun50i-a64-sopine-baseboard.dts     |  1 +
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi  |  1 -
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         |  6 +++++-
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts  |  1 +
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          |  7 +++++++
 7 files changed, 26 insertions(+), 6 deletions(-)

-- 
2.17.5


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

* [PATCH 0/7] arm64: dts: allwinner: Various DT fixes
@ 2021-01-06 15:05 ` Andre Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: devicetree, Jernej Skrabec, linux-sunxi, linux-arm-kernel, Icenowy Zheng

Hi,

a collection of DT fixes I gathered over time:

- Adding usbphy references to [EO]HCI0 nodes (A64, H6)
- Adding Pine64-LTS status LED
- Dropping non-removable from SoPine/Pine64-LTS SD card
- Enabling HS200 @ 150 MHz on Pine H64 (H6)
- Enabling HS200 @ 150 MHz on Pine64-LTS

For details please see the individual patches!

Thanks,
Andre

Andre Przywara (7):
  arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
  arm64: dts: allwinner: Pine64-LTS: Add status LED
  arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card
  arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency
  arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz
  arm64: dts: allwinner: Pine64-LTS/SoPine: Enable HS200 eMMC mode
  arm64: dts: allwinner: Pine H64: Enable HS200 eMMC mode

 .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts |  5 +----
 .../dts/allwinner/sun50i-a64-sopine-baseboard.dts     |  1 +
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi  |  1 -
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         |  6 +++++-
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts  |  1 +
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          |  7 +++++++
 7 files changed, 26 insertions(+), 6 deletions(-)

-- 
2.17.5


_______________________________________________
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] 40+ messages in thread

* [PATCH 1/7] arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
  2021-01-06 15:05 ` Andre Przywara
@ 2021-01-06 15:05   ` Andre Przywara
  -1 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: Jernej Skrabec, Icenowy Zheng, devicetree, linux-arm-kernel, linux-sunxi

In recent Allwinner SoCs the first USB host controller (HCI0) shares
the first PHY with the MUSB controller. Probably to make this sharing
work, we were avoiding to declare this in the DT. This has two
shortcomings:
- U-Boot (which uses the same .dts) cannot use this port in host mode
  without a PHY linked, so we were loosing one USB port there.
- It requires the MUSB driver to be enabled and loaded, although we
  don't actually use it.

To avoid those issues, let's add this PHY link to the A64 and H6 .dtsi
files. After all PHY port 0 *is* connected to HCI0, so we should describe
it as this. Remove the part from the boards which were already doing
that.

This makes it work in U-Boot, also improves compatiblity when no MUSB
driver is loaded (for instance in distribution installers).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 4 ----
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          | 4 ++++
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 896f34fd9fc3..d07cf05549c3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -126,8 +126,6 @@
 };
 
 &ehci0 {
-	phys = <&usbphy 0>;
-	phy-names = "usb";
 	status = "okay";
 };
 
@@ -177,8 +175,6 @@
 };
 
 &ohci0 {
-	phys = <&usbphy 0>;
-	phy-names = "usb";
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 51cc30e84e26..19e9b8ca8432 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -593,6 +593,8 @@
 				 <&ccu CLK_USB_OHCI0>;
 			resets = <&ccu RST_BUS_OHCI0>,
 				 <&ccu RST_BUS_EHCI0>;
+			phys = <&usbphy 0>;
+			phy-names = "usb";
 			status = "disabled";
 		};
 
@@ -603,6 +605,8 @@
 			clocks = <&ccu CLK_BUS_OHCI0>,
 				 <&ccu CLK_USB_OHCI0>;
 			resets = <&ccu RST_BUS_OHCI0>;
+			phys = <&usbphy 0>;
+			phy-names = "usb";
 			status = "disabled";
 		};
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 8a62a9fbe347..f593cfeaecc9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -680,6 +680,8 @@
 				 <&ccu CLK_USB_OHCI0>;
 			resets = <&ccu RST_BUS_OHCI0>,
 				 <&ccu RST_BUS_EHCI0>;
+			phys = <&usb2phy 0>;
+			phy-names = "usb";
 			status = "disabled";
 		};
 
@@ -690,6 +692,8 @@
 			clocks = <&ccu CLK_BUS_OHCI0>,
 				 <&ccu CLK_USB_OHCI0>;
 			resets = <&ccu RST_BUS_OHCI0>;
+			phys = <&usb2phy 0>;
+			phy-names = "usb";
 			status = "disabled";
 		};
 
-- 
2.17.5


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

* [PATCH 1/7] arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
@ 2021-01-06 15:05   ` Andre Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: devicetree, Jernej Skrabec, linux-sunxi, linux-arm-kernel, Icenowy Zheng

In recent Allwinner SoCs the first USB host controller (HCI0) shares
the first PHY with the MUSB controller. Probably to make this sharing
work, we were avoiding to declare this in the DT. This has two
shortcomings:
- U-Boot (which uses the same .dts) cannot use this port in host mode
  without a PHY linked, so we were loosing one USB port there.
- It requires the MUSB driver to be enabled and loaded, although we
  don't actually use it.

To avoid those issues, let's add this PHY link to the A64 and H6 .dtsi
files. After all PHY port 0 *is* connected to HCI0, so we should describe
it as this. Remove the part from the boards which were already doing
that.

This makes it work in U-Boot, also improves compatiblity when no MUSB
driver is loaded (for instance in distribution installers).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 4 ----
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 4 ++++
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          | 4 ++++
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 896f34fd9fc3..d07cf05549c3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -126,8 +126,6 @@
 };
 
 &ehci0 {
-	phys = <&usbphy 0>;
-	phy-names = "usb";
 	status = "okay";
 };
 
@@ -177,8 +175,6 @@
 };
 
 &ohci0 {
-	phys = <&usbphy 0>;
-	phy-names = "usb";
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 51cc30e84e26..19e9b8ca8432 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -593,6 +593,8 @@
 				 <&ccu CLK_USB_OHCI0>;
 			resets = <&ccu RST_BUS_OHCI0>,
 				 <&ccu RST_BUS_EHCI0>;
+			phys = <&usbphy 0>;
+			phy-names = "usb";
 			status = "disabled";
 		};
 
@@ -603,6 +605,8 @@
 			clocks = <&ccu CLK_BUS_OHCI0>,
 				 <&ccu CLK_USB_OHCI0>;
 			resets = <&ccu RST_BUS_OHCI0>;
+			phys = <&usbphy 0>;
+			phy-names = "usb";
 			status = "disabled";
 		};
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 8a62a9fbe347..f593cfeaecc9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -680,6 +680,8 @@
 				 <&ccu CLK_USB_OHCI0>;
 			resets = <&ccu RST_BUS_OHCI0>,
 				 <&ccu RST_BUS_EHCI0>;
+			phys = <&usb2phy 0>;
+			phy-names = "usb";
 			status = "disabled";
 		};
 
@@ -690,6 +692,8 @@
 			clocks = <&ccu CLK_BUS_OHCI0>,
 				 <&ccu CLK_USB_OHCI0>;
 			resets = <&ccu RST_BUS_OHCI0>;
+			phys = <&usb2phy 0>;
+			phy-names = "usb";
 			status = "disabled";
 		};
 
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
  2021-01-06 15:05 ` Andre Przywara
@ 2021-01-06 15:05   ` Andre Przywara
  -1 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: Jernej Skrabec, Icenowy Zheng, devicetree, linux-arm-kernel, linux-sunxi

The Pine64-LTS board features a blue status LED on pin PL7.

Describe it in the DT.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
index 302e24be0a31..55bf4a0fc31c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
@@ -1,10 +1,21 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 // Copyright (c) 2018 ARM Ltd.
 
+#include <dt-bindings/leds/common.h>
 #include "sun50i-a64-sopine-baseboard.dts"
 
 / {
 	model = "Pine64 LTS";
 	compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
 		     "allwinner,sun50i-a64";
+
+	leds {
+		compatible = "gpio-leds";
+
+		status {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+		};
+	};
 };
-- 
2.17.5


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

* [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
@ 2021-01-06 15:05   ` Andre Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: devicetree, Jernej Skrabec, linux-sunxi, linux-arm-kernel, Icenowy Zheng

The Pine64-LTS board features a blue status LED on pin PL7.

Describe it in the DT.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
index 302e24be0a31..55bf4a0fc31c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
@@ -1,10 +1,21 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 // Copyright (c) 2018 ARM Ltd.
 
+#include <dt-bindings/leds/common.h>
 #include "sun50i-a64-sopine-baseboard.dts"
 
 / {
 	model = "Pine64 LTS";
 	compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
 		     "allwinner,sun50i-a64";
+
+	leds {
+		compatible = "gpio-leds";
+
+		status {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+		};
+	};
 };
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/7] arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card
  2021-01-06 15:05 ` Andre Przywara
@ 2021-01-06 15:05   ` Andre Przywara
  -1 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: Jernej Skrabec, Icenowy Zheng, devicetree, linux-arm-kernel, linux-sunxi

The SD card on the SoPine SoM module is somewhat concealed, so was
originally defined as "non-removable".
However there is a working card-detect pin, and in certain SoM base
boards it might be actually accessible at runtime.
Also the Pine64-LTS shares the SoPine base .dtsi, so inherited the
non-removable flag, even though the SD card slot is perfectly accessible
and usable there. (It turns out that just *my* board has a broken card
detect switch, so I originally thought CD wouldn't work on the LTS.)

Drop the "non-removable" flag to describe the SD card slot properly.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
index c48692b06e1f..3402cec87035 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
@@ -32,7 +32,6 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins>;
 	vmmc-supply = <&reg_dcdc1>;
-	non-removable;
 	disable-wp;
 	bus-width = <4>;
 	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
-- 
2.17.5


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

* [PATCH 3/7] arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card
@ 2021-01-06 15:05   ` Andre Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: devicetree, Jernej Skrabec, linux-sunxi, linux-arm-kernel, Icenowy Zheng

The SD card on the SoPine SoM module is somewhat concealed, so was
originally defined as "non-removable".
However there is a working card-detect pin, and in certain SoM base
boards it might be actually accessible at runtime.
Also the Pine64-LTS shares the SoPine base .dtsi, so inherited the
non-removable flag, even though the SD card slot is perfectly accessible
and usable there. (It turns out that just *my* board has a broken card
detect switch, so I originally thought CD wouldn't work on the LTS.)

Drop the "non-removable" flag to describe the SD card slot properly.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
index c48692b06e1f..3402cec87035 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
@@ -32,7 +32,6 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins>;
 	vmmc-supply = <&reg_dcdc1>;
-	non-removable;
 	disable-wp;
 	bus-width = <4>;
 	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4/7] arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency
  2021-01-06 15:05 ` Andre Przywara
@ 2021-01-06 15:05   ` Andre Przywara
  -1 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: Jernej Skrabec, Icenowy Zheng, devicetree, linux-arm-kernel, linux-sunxi

The H6 manual explicitly lists a frequency limit of 150 MHz for the bus
frequency of the MMC controllers. So far we had no explicit limits in the
DT, which limited eMMC to a rather conservative 52 MHz.

Put those maximum frequencies in the SoC .dtsi, to allow higher speed
modes (which still would need to be explicitly enabled, per board).

Tested with an eMMC using HS-200 on a Pine H64. Running at the spec'ed
200 MHz indeed fails with I/O errors, but 150 MHz seems to work stably.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index f593cfeaecc9..77765d4a05ec 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -436,6 +436,7 @@
 			interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&mmc0_pins>;
+			max-frequency = <150000000>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -452,6 +453,7 @@
 			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&mmc1_pins>;
+			max-frequency = <150000000>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -468,6 +470,7 @@
 			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&mmc2_pins>;
+			max-frequency = <150000000>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.17.5


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

* [PATCH 4/7] arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency
@ 2021-01-06 15:05   ` Andre Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: devicetree, Jernej Skrabec, linux-sunxi, linux-arm-kernel, Icenowy Zheng

The H6 manual explicitly lists a frequency limit of 150 MHz for the bus
frequency of the MMC controllers. So far we had no explicit limits in the
DT, which limited eMMC to a rather conservative 52 MHz.

Put those maximum frequencies in the SoC .dtsi, to allow higher speed
modes (which still would need to be explicitly enabled, per board).

Tested with an eMMC using HS-200 on a Pine H64. Running at the spec'ed
200 MHz indeed fails with I/O errors, but 150 MHz seems to work stably.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index f593cfeaecc9..77765d4a05ec 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -436,6 +436,7 @@
 			interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&mmc0_pins>;
+			max-frequency = <150000000>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -452,6 +453,7 @@
 			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&mmc1_pins>;
+			max-frequency = <150000000>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -468,6 +470,7 @@
 			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&mmc2_pins>;
+			max-frequency = <150000000>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 5/7] arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz
  2021-01-06 15:05 ` Andre Przywara
@ 2021-01-06 15:05   ` Andre Przywara
  -1 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: Jernej Skrabec, Icenowy Zheng, devicetree, linux-arm-kernel, linux-sunxi

In contrast to the H6 (and later) manuals, the A64 datasheet does not
specify any limitations in the maximum possible frequency for eMMC
controllers.
However experimentation has found that a 150 MHz limit similar to other
SoCs and also the MMC0 and MMC1 controllers on the A64 seems to exist
for the MMC2 controller.

Limit the frequency for the MMC2 controller to 150 MHz in the SoC .dtsi.
The Pinebook seems to be the an odd exception, since it apparently seems
to work with 200 MHz as well, so overwrite this in its board .dts file.

Tested on a Pine64-LTS: 200 MHz HS-200 fails, 150 MHz HS-200 works.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 1 +
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index d07cf05549c3..7ae16541d14f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -167,6 +167,7 @@
 	pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
 	vmmc-supply = <&reg_dcdc1>;
 	vqmmc-supply = <&reg_eldo1>;
+	max-frequency = <200000000>;
 	bus-width = <8>;
 	non-removable;
 	cap-mmc-hw-reset;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 19e9b8ca8432..57786fc120c3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -514,7 +514,7 @@
 			resets = <&ccu RST_BUS_MMC2>;
 			reset-names = "ahb";
 			interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
-			max-frequency = <200000000>;
+			max-frequency = <150000000>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.17.5


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

* [PATCH 5/7] arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz
@ 2021-01-06 15:05   ` Andre Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: devicetree, Jernej Skrabec, linux-sunxi, linux-arm-kernel, Icenowy Zheng

In contrast to the H6 (and later) manuals, the A64 datasheet does not
specify any limitations in the maximum possible frequency for eMMC
controllers.
However experimentation has found that a 150 MHz limit similar to other
SoCs and also the MMC0 and MMC1 controllers on the A64 seems to exist
for the MMC2 controller.

Limit the frequency for the MMC2 controller to 150 MHz in the SoC .dtsi.
The Pinebook seems to be the an odd exception, since it apparently seems
to work with 200 MHz as well, so overwrite this in its board .dts file.

Tested on a Pine64-LTS: 200 MHz HS-200 fails, 150 MHz HS-200 works.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 1 +
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index d07cf05549c3..7ae16541d14f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -167,6 +167,7 @@
 	pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
 	vmmc-supply = <&reg_dcdc1>;
 	vqmmc-supply = <&reg_eldo1>;
+	max-frequency = <200000000>;
 	bus-width = <8>;
 	non-removable;
 	cap-mmc-hw-reset;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 19e9b8ca8432..57786fc120c3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -514,7 +514,7 @@
 			resets = <&ccu RST_BUS_MMC2>;
 			reset-names = "ahb";
 			interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
-			max-frequency = <200000000>;
+			max-frequency = <150000000>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 6/7] arm64: dts: allwinner: Pine64-LTS/SoPine: Enable HS200 eMMC mode
  2021-01-06 15:05 ` Andre Przywara
@ 2021-01-06 15:05   ` Andre Przywara
  -1 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: Jernej Skrabec, Icenowy Zheng, devicetree, linux-arm-kernel, linux-sunxi

The eMMC modules offered for the Pine64 boards are capable of the HS200
eMMC speed mode, when observing the frequency limit of 150 MHz.

Enable that in the DT.

This increases the interface speed from ~80 MB/s to ~120 MB/s.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index d4069749d721..e22b94c83647 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -111,6 +111,7 @@
 	bus-width = <8>;
 	non-removable;
 	cap-mmc-hw-reset;
+	mmc-hs200-1_8v;
 	status = "okay";
 };
 
-- 
2.17.5


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

* [PATCH 6/7] arm64: dts: allwinner: Pine64-LTS/SoPine: Enable HS200 eMMC mode
@ 2021-01-06 15:05   ` Andre Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: devicetree, Jernej Skrabec, linux-sunxi, linux-arm-kernel, Icenowy Zheng

The eMMC modules offered for the Pine64 boards are capable of the HS200
eMMC speed mode, when observing the frequency limit of 150 MHz.

Enable that in the DT.

This increases the interface speed from ~80 MB/s to ~120 MB/s.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index d4069749d721..e22b94c83647 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -111,6 +111,7 @@
 	bus-width = <8>;
 	non-removable;
 	cap-mmc-hw-reset;
+	mmc-hs200-1_8v;
 	status = "okay";
 };
 
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 7/7] arm64: dts: allwinner: Pine H64: Enable HS200 eMMC mode
  2021-01-06 15:05 ` Andre Przywara
@ 2021-01-06 15:05   ` Andre Przywara
  -1 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: Jernej Skrabec, Icenowy Zheng, devicetree, linux-arm-kernel, linux-sunxi

The eMMC modules offered for the Pine64 boards are capable of the HS200
eMMC speed mode, when observing the frequency limit of 150 MHz.

Enable that in the DT.

This increases the interface speed from ~80 MB/s to ~120 MB/s.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index 961732c52aa0..15ceba027a73 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -142,6 +142,7 @@
 	vqmmc-supply = <&reg_bldo2>;
 	non-removable;
 	cap-mmc-hw-reset;
+	mmc-hs200-1_8v;
 	bus-width = <8>;
 	status = "okay";
 };
-- 
2.17.5


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

* [PATCH 7/7] arm64: dts: allwinner: Pine H64: Enable HS200 eMMC mode
@ 2021-01-06 15:05   ` Andre Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: Andre Przywara @ 2021-01-06 15:05 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring
  Cc: devicetree, Jernej Skrabec, linux-sunxi, linux-arm-kernel, Icenowy Zheng

The eMMC modules offered for the Pine64 boards are capable of the HS200
eMMC speed mode, when observing the frequency limit of 150 MHz.

Enable that in the DT.

This increases the interface speed from ~80 MB/s to ~120 MB/s.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index 961732c52aa0..15ceba027a73 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -142,6 +142,7 @@
 	vqmmc-supply = <&reg_bldo2>;
 	non-removable;
 	cap-mmc-hw-reset;
+	mmc-hs200-1_8v;
 	bus-width = <8>;
 	status = "okay";
 };
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [linux-sunxi] [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
  2021-01-06 15:05   ` Andre Przywara
@ 2021-01-06 15:53     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:53 UTC (permalink / raw)
  To: André Przywara
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

Hi,

On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The Pine64-LTS board features a blue status LED on pin PL7.

I'd like some clarification about this.

My Pine64-LTS was a used unit personally given to me by TL Lim, which came
with LEDs that I assume were soldered on by hand as their mounting angles
are slightly off. My Pine64+ (the original from the Kickstarter campaign)
and SoPine baseboard (a new unit, also given to me by TL Lim) came without
LEDs soldered on.

I'm OK with adding the LED to the device tree. I'm just not sure about the
color.


ChenYu

> Describe it in the DT.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> index 302e24be0a31..55bf4a0fc31c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> @@ -1,10 +1,21 @@
>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>  // Copyright (c) 2018 ARM Ltd.
>
> +#include <dt-bindings/leds/common.h>
>  #include "sun50i-a64-sopine-baseboard.dts"
>
>  / {
>         model = "Pine64 LTS";
>         compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
>                      "allwinner,sun50i-a64";
> +
> +       leds {
> +               compatible = "gpio-leds";
> +
> +               status {
> +                       function = LED_FUNCTION_STATUS;
> +                       color = <LED_COLOR_ID_BLUE>;
> +                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
> +               };
> +       };
>  };
> --
> 2.17.5
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-3-andre.przywara%40arm.com.

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

* Re: [linux-sunxi] [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
@ 2021-01-06 15:53     ` Chen-Yu Tsai
  0 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:53 UTC (permalink / raw)
  To: André Przywara
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

Hi,

On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The Pine64-LTS board features a blue status LED on pin PL7.

I'd like some clarification about this.

My Pine64-LTS was a used unit personally given to me by TL Lim, which came
with LEDs that I assume were soldered on by hand as their mounting angles
are slightly off. My Pine64+ (the original from the Kickstarter campaign)
and SoPine baseboard (a new unit, also given to me by TL Lim) came without
LEDs soldered on.

I'm OK with adding the LED to the device tree. I'm just not sure about the
color.


ChenYu

> Describe it in the DT.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> index 302e24be0a31..55bf4a0fc31c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> @@ -1,10 +1,21 @@
>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>  // Copyright (c) 2018 ARM Ltd.
>
> +#include <dt-bindings/leds/common.h>
>  #include "sun50i-a64-sopine-baseboard.dts"
>
>  / {
>         model = "Pine64 LTS";
>         compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
>                      "allwinner,sun50i-a64";
> +
> +       leds {
> +               compatible = "gpio-leds";
> +
> +               status {
> +                       function = LED_FUNCTION_STATUS;
> +                       color = <LED_COLOR_ID_BLUE>;
> +                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
> +               };
> +       };
>  };
> --
> 2.17.5
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-3-andre.przywara%40arm.com.

_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 1/7] arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
  2021-01-06 15:05   ` Andre Przywara
@ 2021-01-06 15:56     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:56 UTC (permalink / raw)
  To: André Przywara
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

Hi,

On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> In recent Allwinner SoCs the first USB host controller (HCI0) shares
> the first PHY with the MUSB controller. Probably to make this sharing
> work, we were avoiding to declare this in the DT. This has two
> shortcomings:
> - U-Boot (which uses the same .dts) cannot use this port in host mode
>   without a PHY linked, so we were loosing one USB port there.
> - It requires the MUSB driver to be enabled and loaded, although we
>   don't actually use it.
>
> To avoid those issues, let's add this PHY link to the A64 and H6 .dtsi
> files. After all PHY port 0 *is* connected to HCI0, so we should describe
> it as this. Remove the part from the boards which were already doing
> that.
>
> This makes it work in U-Boot, also improves compatiblity when no MUSB
> driver is loaded (for instance in distribution installers).
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 4 ----
>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 4 ++++
>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          | 4 ++++

It would be better if the H6 parts were separated out.

Please also add a fixes tag, which helps with backporting.

>  3 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> index 896f34fd9fc3..d07cf05549c3 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> @@ -126,8 +126,6 @@
>  };
>
>  &ehci0 {
> -       phys = <&usbphy 0>;
> -       phy-names = "usb";
>         status = "okay";
>  };
>
> @@ -177,8 +175,6 @@
>  };
>
>  &ohci0 {
> -       phys = <&usbphy 0>;
> -       phy-names = "usb";
>         status = "okay";
>  };
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> index 51cc30e84e26..19e9b8ca8432 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> @@ -593,6 +593,8 @@
>                                  <&ccu CLK_USB_OHCI0>;
>                         resets = <&ccu RST_BUS_OHCI0>,
>                                  <&ccu RST_BUS_EHCI0>;
> +                       phys = <&usbphy 0>;
> +                       phy-names = "usb";
>                         status = "disabled";
>                 };
>
> @@ -603,6 +605,8 @@
>                         clocks = <&ccu CLK_BUS_OHCI0>,
>                                  <&ccu CLK_USB_OHCI0>;
>                         resets = <&ccu RST_BUS_OHCI0>;
> +                       phys = <&usbphy 0>;
> +                       phy-names = "usb";
>                         status = "disabled";
>                 };
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> index 8a62a9fbe347..f593cfeaecc9 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> @@ -680,6 +680,8 @@
>                                  <&ccu CLK_USB_OHCI0>;
>                         resets = <&ccu RST_BUS_OHCI0>,
>                                  <&ccu RST_BUS_EHCI0>;
> +                       phys = <&usb2phy 0>;
> +                       phy-names = "usb";
>                         status = "disabled";
>                 };
>
> @@ -690,6 +692,8 @@
>                         clocks = <&ccu CLK_BUS_OHCI0>,
>                                  <&ccu CLK_USB_OHCI0>;
>                         resets = <&ccu RST_BUS_OHCI0>;
> +                       phys = <&usb2phy 0>;
> +                       phy-names = "usb";
>                         status = "disabled";
>                 };
>
> --
> 2.17.5
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-2-andre.przywara%40arm.com.

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

* Re: [linux-sunxi] [PATCH 1/7] arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
@ 2021-01-06 15:56     ` Chen-Yu Tsai
  0 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:56 UTC (permalink / raw)
  To: André Przywara
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

Hi,

On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> In recent Allwinner SoCs the first USB host controller (HCI0) shares
> the first PHY with the MUSB controller. Probably to make this sharing
> work, we were avoiding to declare this in the DT. This has two
> shortcomings:
> - U-Boot (which uses the same .dts) cannot use this port in host mode
>   without a PHY linked, so we were loosing one USB port there.
> - It requires the MUSB driver to be enabled and loaded, although we
>   don't actually use it.
>
> To avoid those issues, let's add this PHY link to the A64 and H6 .dtsi
> files. After all PHY port 0 *is* connected to HCI0, so we should describe
> it as this. Remove the part from the boards which were already doing
> that.
>
> This makes it work in U-Boot, also improves compatiblity when no MUSB
> driver is loaded (for instance in distribution installers).
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 4 ----
>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 4 ++++
>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          | 4 ++++

It would be better if the H6 parts were separated out.

Please also add a fixes tag, which helps with backporting.

>  3 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> index 896f34fd9fc3..d07cf05549c3 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> @@ -126,8 +126,6 @@
>  };
>
>  &ehci0 {
> -       phys = <&usbphy 0>;
> -       phy-names = "usb";
>         status = "okay";
>  };
>
> @@ -177,8 +175,6 @@
>  };
>
>  &ohci0 {
> -       phys = <&usbphy 0>;
> -       phy-names = "usb";
>         status = "okay";
>  };
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> index 51cc30e84e26..19e9b8ca8432 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> @@ -593,6 +593,8 @@
>                                  <&ccu CLK_USB_OHCI0>;
>                         resets = <&ccu RST_BUS_OHCI0>,
>                                  <&ccu RST_BUS_EHCI0>;
> +                       phys = <&usbphy 0>;
> +                       phy-names = "usb";
>                         status = "disabled";
>                 };
>
> @@ -603,6 +605,8 @@
>                         clocks = <&ccu CLK_BUS_OHCI0>,
>                                  <&ccu CLK_USB_OHCI0>;
>                         resets = <&ccu RST_BUS_OHCI0>;
> +                       phys = <&usbphy 0>;
> +                       phy-names = "usb";
>                         status = "disabled";
>                 };
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> index 8a62a9fbe347..f593cfeaecc9 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> @@ -680,6 +680,8 @@
>                                  <&ccu CLK_USB_OHCI0>;
>                         resets = <&ccu RST_BUS_OHCI0>,
>                                  <&ccu RST_BUS_EHCI0>;
> +                       phys = <&usb2phy 0>;
> +                       phy-names = "usb";
>                         status = "disabled";
>                 };
>
> @@ -690,6 +692,8 @@
>                         clocks = <&ccu CLK_BUS_OHCI0>,
>                                  <&ccu CLK_USB_OHCI0>;
>                         resets = <&ccu RST_BUS_OHCI0>;
> +                       phys = <&usb2phy 0>;
> +                       phy-names = "usb";
>                         status = "disabled";
>                 };
>
> --
> 2.17.5
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-2-andre.przywara%40arm.com.

_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 3/7] arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card
  2021-01-06 15:05   ` Andre Przywara
@ 2021-01-06 15:57     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:57 UTC (permalink / raw)
  To: André Przywara
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The SD card on the SoPine SoM module is somewhat concealed, so was
> originally defined as "non-removable".
> However there is a working card-detect pin, and in certain SoM base
> boards it might be actually accessible at runtime.
> Also the Pine64-LTS shares the SoPine base .dtsi, so inherited the
> non-removable flag, even though the SD card slot is perfectly accessible
> and usable there. (It turns out that just *my* board has a broken card
> detect switch, so I originally thought CD wouldn't work on the LTS.)
>
> Drop the "non-removable" flag to describe the SD card slot properly.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Please add a fixes tag. This helps with finding the original commit
that introduced the issue and backporting.

ChenYu

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

* Re: [linux-sunxi] [PATCH 3/7] arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card
@ 2021-01-06 15:57     ` Chen-Yu Tsai
  0 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:57 UTC (permalink / raw)
  To: André Przywara
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The SD card on the SoPine SoM module is somewhat concealed, so was
> originally defined as "non-removable".
> However there is a working card-detect pin, and in certain SoM base
> boards it might be actually accessible at runtime.
> Also the Pine64-LTS shares the SoPine base .dtsi, so inherited the
> non-removable flag, even though the SD card slot is perfectly accessible
> and usable there. (It turns out that just *my* board has a broken card
> detect switch, so I originally thought CD wouldn't work on the LTS.)
>
> Drop the "non-removable" flag to describe the SD card slot properly.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Please add a fixes tag. This helps with finding the original commit
that introduced the issue and backporting.

ChenYu

_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 5/7] arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz
  2021-01-06 15:05   ` Andre Przywara
@ 2021-01-06 15:58     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:58 UTC (permalink / raw)
  To: André Przywara
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

On Wed, Jan 6, 2021 at 11:06 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> In contrast to the H6 (and later) manuals, the A64 datasheet does not
> specify any limitations in the maximum possible frequency for eMMC
> controllers.
> However experimentation has found that a 150 MHz limit similar to other
> SoCs and also the MMC0 and MMC1 controllers on the A64 seems to exist
> for the MMC2 controller.
>
> Limit the frequency for the MMC2 controller to 150 MHz in the SoC .dtsi.
> The Pinebook seems to be the an odd exception, since it apparently seems
> to work with 200 MHz as well, so overwrite this in its board .dts file.
>
> Tested on a Pine64-LTS: 200 MHz HS-200 fails, 150 MHz HS-200 works.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Please add a fixes tag. This helps with finding the original commit
that introduced the issue and backporting.

This would benefit SoPine / Pine64-LTS users that are using eMMC.

ChenYu

> ---
>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 1 +
>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> index d07cf05549c3..7ae16541d14f 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> @@ -167,6 +167,7 @@
>         pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
>         vmmc-supply = <&reg_dcdc1>;
>         vqmmc-supply = <&reg_eldo1>;
> +       max-frequency = <200000000>;
>         bus-width = <8>;
>         non-removable;
>         cap-mmc-hw-reset;
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> index 19e9b8ca8432..57786fc120c3 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> @@ -514,7 +514,7 @@
>                         resets = <&ccu RST_BUS_MMC2>;
>                         reset-names = "ahb";
>                         interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
> -                       max-frequency = <200000000>;
> +                       max-frequency = <150000000>;
>                         status = "disabled";
>                         #address-cells = <1>;
>                         #size-cells = <0>;
> --
> 2.17.5
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-6-andre.przywara%40arm.com.

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

* Re: [linux-sunxi] [PATCH 5/7] arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz
@ 2021-01-06 15:58     ` Chen-Yu Tsai
  0 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:58 UTC (permalink / raw)
  To: André Przywara
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

On Wed, Jan 6, 2021 at 11:06 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> In contrast to the H6 (and later) manuals, the A64 datasheet does not
> specify any limitations in the maximum possible frequency for eMMC
> controllers.
> However experimentation has found that a 150 MHz limit similar to other
> SoCs and also the MMC0 and MMC1 controllers on the A64 seems to exist
> for the MMC2 controller.
>
> Limit the frequency for the MMC2 controller to 150 MHz in the SoC .dtsi.
> The Pinebook seems to be the an odd exception, since it apparently seems
> to work with 200 MHz as well, so overwrite this in its board .dts file.
>
> Tested on a Pine64-LTS: 200 MHz HS-200 fails, 150 MHz HS-200 works.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Please add a fixes tag. This helps with finding the original commit
that introduced the issue and backporting.

This would benefit SoPine / Pine64-LTS users that are using eMMC.

ChenYu

> ---
>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 1 +
>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> index d07cf05549c3..7ae16541d14f 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> @@ -167,6 +167,7 @@
>         pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
>         vmmc-supply = <&reg_dcdc1>;
>         vqmmc-supply = <&reg_eldo1>;
> +       max-frequency = <200000000>;
>         bus-width = <8>;
>         non-removable;
>         cap-mmc-hw-reset;
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> index 19e9b8ca8432..57786fc120c3 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> @@ -514,7 +514,7 @@
>                         resets = <&ccu RST_BUS_MMC2>;
>                         reset-names = "ahb";
>                         interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
> -                       max-frequency = <200000000>;
> +                       max-frequency = <150000000>;
>                         status = "disabled";
>                         #address-cells = <1>;
>                         #size-cells = <0>;
> --
> 2.17.5
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-6-andre.przywara%40arm.com.

_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 6/7] arm64: dts: allwinner: Pine64-LTS/SoPine: Enable HS200 eMMC mode
  2021-01-06 15:05   ` Andre Przywara
@ 2021-01-06 15:59     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:59 UTC (permalink / raw)
  To: André Przywara
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

On Wed, Jan 6, 2021 at 11:06 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The eMMC modules offered for the Pine64 boards are capable of the HS200
> eMMC speed mode, when observing the frequency limit of 150 MHz.
>
> Enable that in the DT.
>
> This increases the interface speed from ~80 MB/s to ~120 MB/s.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

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

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

* Re: [linux-sunxi] [PATCH 6/7] arm64: dts: allwinner: Pine64-LTS/SoPine: Enable HS200 eMMC mode
@ 2021-01-06 15:59     ` Chen-Yu Tsai
  0 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 15:59 UTC (permalink / raw)
  To: André Przywara
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

On Wed, Jan 6, 2021 at 11:06 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The eMMC modules offered for the Pine64 boards are capable of the HS200
> eMMC speed mode, when observing the frequency limit of 150 MHz.
>
> Enable that in the DT.
>
> This increases the interface speed from ~80 MB/s to ~120 MB/s.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

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

_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 7/7] arm64: dts: allwinner: Pine H64: Enable HS200 eMMC mode
  2021-01-06 15:05   ` Andre Przywara
@ 2021-01-06 16:00     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 16:00 UTC (permalink / raw)
  To: André Przywara
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

On Wed, Jan 6, 2021 at 11:06 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The eMMC modules offered for the Pine64 boards are capable of the HS200
> eMMC speed mode, when observing the frequency limit of 150 MHz.
>
> Enable that in the DT.
>
> This increases the interface speed from ~80 MB/s to ~120 MB/s.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

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

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

* Re: [linux-sunxi] [PATCH 7/7] arm64: dts: allwinner: Pine H64: Enable HS200 eMMC mode
@ 2021-01-06 16:00     ` Chen-Yu Tsai
  0 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 16:00 UTC (permalink / raw)
  To: André Przywara
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

On Wed, Jan 6, 2021 at 11:06 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The eMMC modules offered for the Pine64 boards are capable of the HS200
> eMMC speed mode, when observing the frequency limit of 150 MHz.
>
> Enable that in the DT.
>
> This increases the interface speed from ~80 MB/s to ~120 MB/s.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

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

_______________________________________________
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] 40+ messages in thread

* Re: [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
  2021-01-06 15:05   ` Andre Przywara
@ 2021-01-06 16:01     ` Maxime Ripard
  -1 siblings, 0 replies; 40+ messages in thread
From: Maxime Ripard @ 2021-01-06 16:01 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Chen-Yu Tsai, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

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

On Wed, Jan 06, 2021 at 03:05:20PM +0000, Andre Przywara wrote:
> The Pine64-LTS board features a blue status LED on pin PL7.
> 
> Describe it in the DT.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> index 302e24be0a31..55bf4a0fc31c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> @@ -1,10 +1,21 @@
>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>  // Copyright (c) 2018 ARM Ltd.
>  
> +#include <dt-bindings/leds/common.h>
>  #include "sun50i-a64-sopine-baseboard.dts"
>  
>  / {
>  	model = "Pine64 LTS";
>  	compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
>  		     "allwinner,sun50i-a64";
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		status {

In addition to Chen-Yu comments, the node name should be led

Maxime

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

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

* Re: [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
@ 2021-01-06 16:01     ` Maxime Ripard
  0 siblings, 0 replies; 40+ messages in thread
From: Maxime Ripard @ 2021-01-06 16:01 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Jernej Skrabec, devicetree, linux-sunxi, Chen-Yu Tsai,
	linux-arm-kernel, Icenowy Zheng


[-- Attachment #1.1: Type: text/plain, Size: 1126 bytes --]

On Wed, Jan 06, 2021 at 03:05:20PM +0000, Andre Przywara wrote:
> The Pine64-LTS board features a blue status LED on pin PL7.
> 
> Describe it in the DT.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> index 302e24be0a31..55bf4a0fc31c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> @@ -1,10 +1,21 @@
>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>  // Copyright (c) 2018 ARM Ltd.
>  
> +#include <dt-bindings/leds/common.h>
>  #include "sun50i-a64-sopine-baseboard.dts"
>  
>  / {
>  	model = "Pine64 LTS";
>  	compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
>  		     "allwinner,sun50i-a64";
> +
> +	leds {
> +		compatible = "gpio-leds";
> +
> +		status {

In addition to Chen-Yu comments, the node name should be led

Maxime

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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 4/7] arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency
  2021-01-06 15:05   ` Andre Przywara
@ 2021-01-06 16:01     ` Chen-Yu Tsai
  -1 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 16:01 UTC (permalink / raw)
  To: André Przywara
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

On Wed, Jan 6, 2021 at 11:06 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The H6 manual explicitly lists a frequency limit of 150 MHz for the bus
> frequency of the MMC controllers. So far we had no explicit limits in the
> DT, which limited eMMC to a rather conservative 52 MHz.

I'd say this is implementation specific. FreeBSD might have other defaults?

> Put those maximum frequencies in the SoC .dtsi, to allow higher speed
> modes (which still would need to be explicitly enabled, per board).
>
> Tested with an eMMC using HS-200 on a Pine H64. Running at the spec'ed
> 200 MHz indeed fails with I/O errors, but 150 MHz seems to work stably.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Fixes tag?


Thanks
ChenYu

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

* Re: [linux-sunxi] [PATCH 4/7] arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency
@ 2021-01-06 16:01     ` Chen-Yu Tsai
  0 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-06 16:01 UTC (permalink / raw)
  To: André Przywara
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

On Wed, Jan 6, 2021 at 11:06 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> The H6 manual explicitly lists a frequency limit of 150 MHz for the bus
> frequency of the MMC controllers. So far we had no explicit limits in the
> DT, which limited eMMC to a rather conservative 52 MHz.

I'd say this is implementation specific. FreeBSD might have other defaults?

> Put those maximum frequencies in the SoC .dtsi, to allow higher speed
> modes (which still would need to be explicitly enabled, per board).
>
> Tested with an eMMC using HS-200 on a Pine H64. Running at the spec'ed
> 200 MHz indeed fails with I/O errors, but 150 MHz seems to work stably.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Fixes tag?


Thanks
ChenYu

_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
  2021-01-06 15:53     ` Chen-Yu Tsai
@ 2021-01-06 16:08       ` André Przywara
  -1 siblings, 0 replies; 40+ messages in thread
From: André Przywara @ 2021-01-06 16:08 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

On 06/01/2021 15:53, Chen-Yu Tsai wrote:

Hi,

> On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>>
>> The Pine64-LTS board features a blue status LED on pin PL7.
> 
> I'd like some clarification about this.
> 
> My Pine64-LTS was a used unit personally given to me by TL Lim, which came
> with LEDs that I assume were soldered on by hand as their mounting angles
> are slightly off. My Pine64+ (the original from the Kickstarter campaign)
> and SoPine baseboard (a new unit, also given to me by TL Lim) came without
> LEDs soldered on.

The situation is similar here ;-), and that's why I checked the pictures
in the store. The LEDs look slightly different (not angled), but the
location of the pads is the same and I see two LEDs on the picture. The
schematic seems to confirm both the pins, the polarity and the colour.
Hence I am highly confident that it's a blue LED on PL7, active low.

But we can wait for other people to confirm.

Thanks!
Andre

> I'm OK with adding the LED to the device tree. I'm just not sure about the
> color.
> 
> 
> ChenYu
> 
>> Describe it in the DT.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
>> index 302e24be0a31..55bf4a0fc31c 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
>> @@ -1,10 +1,21 @@
>>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>  // Copyright (c) 2018 ARM Ltd.
>>
>> +#include <dt-bindings/leds/common.h>
>>  #include "sun50i-a64-sopine-baseboard.dts"
>>
>>  / {
>>         model = "Pine64 LTS";
>>         compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
>>                      "allwinner,sun50i-a64";
>> +
>> +       leds {
>> +               compatible = "gpio-leds";
>> +
>> +               status {
>> +                       function = LED_FUNCTION_STATUS;
>> +                       color = <LED_COLOR_ID_BLUE>;
>> +                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
>> +               };
>> +       };
>>  };
>> --
>> 2.17.5
>>
>> --
>> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
>> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-3-andre.przywara%40arm.com.


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

* Re: [linux-sunxi] [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
@ 2021-01-06 16:08       ` André Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: André Przywara @ 2021-01-06 16:08 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

On 06/01/2021 15:53, Chen-Yu Tsai wrote:

Hi,

> On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>>
>> The Pine64-LTS board features a blue status LED on pin PL7.
> 
> I'd like some clarification about this.
> 
> My Pine64-LTS was a used unit personally given to me by TL Lim, which came
> with LEDs that I assume were soldered on by hand as their mounting angles
> are slightly off. My Pine64+ (the original from the Kickstarter campaign)
> and SoPine baseboard (a new unit, also given to me by TL Lim) came without
> LEDs soldered on.

The situation is similar here ;-), and that's why I checked the pictures
in the store. The LEDs look slightly different (not angled), but the
location of the pads is the same and I see two LEDs on the picture. The
schematic seems to confirm both the pins, the polarity and the colour.
Hence I am highly confident that it's a blue LED on PL7, active low.

But we can wait for other people to confirm.

Thanks!
Andre

> I'm OK with adding the LED to the device tree. I'm just not sure about the
> color.
> 
> 
> ChenYu
> 
>> Describe it in the DT.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
>> index 302e24be0a31..55bf4a0fc31c 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
>> @@ -1,10 +1,21 @@
>>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>  // Copyright (c) 2018 ARM Ltd.
>>
>> +#include <dt-bindings/leds/common.h>
>>  #include "sun50i-a64-sopine-baseboard.dts"
>>
>>  / {
>>         model = "Pine64 LTS";
>>         compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
>>                      "allwinner,sun50i-a64";
>> +
>> +       leds {
>> +               compatible = "gpio-leds";
>> +
>> +               status {
>> +                       function = LED_FUNCTION_STATUS;
>> +                       color = <LED_COLOR_ID_BLUE>;
>> +                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
>> +               };
>> +       };
>>  };
>> --
>> 2.17.5
>>
>> --
>> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
>> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-3-andre.przywara%40arm.com.


_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 1/7] arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
  2021-01-06 15:56     ` Chen-Yu Tsai
@ 2021-01-13 10:30       ` André Przywara
  -1 siblings, 0 replies; 40+ messages in thread
From: André Przywara @ 2021-01-13 10:30 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

On 06/01/2021 15:56, Chen-Yu Tsai wrote:
> Hi,
> 
> On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>>
>> In recent Allwinner SoCs the first USB host controller (HCI0) shares
>> the first PHY with the MUSB controller. Probably to make this sharing
>> work, we were avoiding to declare this in the DT. This has two
>> shortcomings:
>> - U-Boot (which uses the same .dts) cannot use this port in host mode
>>   without a PHY linked, so we were loosing one USB port there.
>> - It requires the MUSB driver to be enabled and loaded, although we
>>   don't actually use it.
>>
>> To avoid those issues, let's add this PHY link to the A64 and H6 .dtsi
>> files. After all PHY port 0 *is* connected to HCI0, so we should describe
>> it as this. Remove the part from the boards which were already doing
>> that.
>>
>> This makes it work in U-Boot, also improves compatiblity when no MUSB
>> driver is loaded (for instance in distribution installers).
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 4 ----
>>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 4 ++++
>>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          | 4 ++++
> 
> It would be better if the H6 parts were separated out.

Sure.

> 
> Please also add a fixes tag, which helps with backporting.

The whole concept of DT backports raises some eyebrows here, but it's
surely easy enough to do.

Thanks,
Andre.

> 
>>  3 files changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>> index 896f34fd9fc3..d07cf05549c3 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>> @@ -126,8 +126,6 @@
>>  };
>>
>>  &ehci0 {
>> -       phys = <&usbphy 0>;
>> -       phy-names = "usb";
>>         status = "okay";
>>  };
>>
>> @@ -177,8 +175,6 @@
>>  };
>>
>>  &ohci0 {
>> -       phys = <&usbphy 0>;
>> -       phy-names = "usb";
>>         status = "okay";
>>  };
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
>> index 51cc30e84e26..19e9b8ca8432 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
>> @@ -593,6 +593,8 @@
>>                                  <&ccu CLK_USB_OHCI0>;
>>                         resets = <&ccu RST_BUS_OHCI0>,
>>                                  <&ccu RST_BUS_EHCI0>;
>> +                       phys = <&usbphy 0>;
>> +                       phy-names = "usb";
>>                         status = "disabled";
>>                 };
>>
>> @@ -603,6 +605,8 @@
>>                         clocks = <&ccu CLK_BUS_OHCI0>,
>>                                  <&ccu CLK_USB_OHCI0>;
>>                         resets = <&ccu RST_BUS_OHCI0>;
>> +                       phys = <&usbphy 0>;
>> +                       phy-names = "usb";
>>                         status = "disabled";
>>                 };
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>> index 8a62a9fbe347..f593cfeaecc9 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>> @@ -680,6 +680,8 @@
>>                                  <&ccu CLK_USB_OHCI0>;
>>                         resets = <&ccu RST_BUS_OHCI0>,
>>                                  <&ccu RST_BUS_EHCI0>;
>> +                       phys = <&usb2phy 0>;
>> +                       phy-names = "usb";
>>                         status = "disabled";
>>                 };
>>
>> @@ -690,6 +692,8 @@
>>                         clocks = <&ccu CLK_BUS_OHCI0>,
>>                                  <&ccu CLK_USB_OHCI0>;
>>                         resets = <&ccu RST_BUS_OHCI0>;
>> +                       phys = <&usb2phy 0>;
>> +                       phy-names = "usb";
>>                         status = "disabled";
>>                 };
>>
>> --
>> 2.17.5
>>
>> --
>> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
>> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-2-andre.przywara%40arm.com.


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

* Re: [linux-sunxi] [PATCH 1/7] arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
@ 2021-01-13 10:30       ` André Przywara
  0 siblings, 0 replies; 40+ messages in thread
From: André Przywara @ 2021-01-13 10:30 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

On 06/01/2021 15:56, Chen-Yu Tsai wrote:
> Hi,
> 
> On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
>>
>> In recent Allwinner SoCs the first USB host controller (HCI0) shares
>> the first PHY with the MUSB controller. Probably to make this sharing
>> work, we were avoiding to declare this in the DT. This has two
>> shortcomings:
>> - U-Boot (which uses the same .dts) cannot use this port in host mode
>>   without a PHY linked, so we were loosing one USB port there.
>> - It requires the MUSB driver to be enabled and loaded, although we
>>   don't actually use it.
>>
>> To avoid those issues, let's add this PHY link to the A64 and H6 .dtsi
>> files. After all PHY port 0 *is* connected to HCI0, so we should describe
>> it as this. Remove the part from the boards which were already doing
>> that.
>>
>> This makes it work in U-Boot, also improves compatiblity when no MUSB
>> driver is loaded (for instance in distribution installers).
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 4 ----
>>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 4 ++++
>>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          | 4 ++++
> 
> It would be better if the H6 parts were separated out.

Sure.

> 
> Please also add a fixes tag, which helps with backporting.

The whole concept of DT backports raises some eyebrows here, but it's
surely easy enough to do.

Thanks,
Andre.

> 
>>  3 files changed, 8 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>> index 896f34fd9fc3..d07cf05549c3 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>> @@ -126,8 +126,6 @@
>>  };
>>
>>  &ehci0 {
>> -       phys = <&usbphy 0>;
>> -       phy-names = "usb";
>>         status = "okay";
>>  };
>>
>> @@ -177,8 +175,6 @@
>>  };
>>
>>  &ohci0 {
>> -       phys = <&usbphy 0>;
>> -       phy-names = "usb";
>>         status = "okay";
>>  };
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
>> index 51cc30e84e26..19e9b8ca8432 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
>> @@ -593,6 +593,8 @@
>>                                  <&ccu CLK_USB_OHCI0>;
>>                         resets = <&ccu RST_BUS_OHCI0>,
>>                                  <&ccu RST_BUS_EHCI0>;
>> +                       phys = <&usbphy 0>;
>> +                       phy-names = "usb";
>>                         status = "disabled";
>>                 };
>>
>> @@ -603,6 +605,8 @@
>>                         clocks = <&ccu CLK_BUS_OHCI0>,
>>                                  <&ccu CLK_USB_OHCI0>;
>>                         resets = <&ccu RST_BUS_OHCI0>;
>> +                       phys = <&usbphy 0>;
>> +                       phy-names = "usb";
>>                         status = "disabled";
>>                 };
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>> index 8a62a9fbe347..f593cfeaecc9 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
>> @@ -680,6 +680,8 @@
>>                                  <&ccu CLK_USB_OHCI0>;
>>                         resets = <&ccu RST_BUS_OHCI0>,
>>                                  <&ccu RST_BUS_EHCI0>;
>> +                       phys = <&usb2phy 0>;
>> +                       phy-names = "usb";
>>                         status = "disabled";
>>                 };
>>
>> @@ -690,6 +692,8 @@
>>                         clocks = <&ccu CLK_BUS_OHCI0>,
>>                                  <&ccu CLK_USB_OHCI0>;
>>                         resets = <&ccu RST_BUS_OHCI0>;
>> +                       phys = <&usb2phy 0>;
>> +                       phy-names = "usb";
>>                         status = "disabled";
>>                 };
>>
>> --
>> 2.17.5
>>
>> --
>> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
>> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-2-andre.przywara%40arm.com.


_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 1/7] arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
  2021-01-13 10:30       ` André Przywara
@ 2021-01-13 10:43         ` Chen-Yu Tsai
  -1 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-13 10:43 UTC (permalink / raw)
  To: André Przywara
  Cc: Maxime Ripard, Rob Herring, Jernej Skrabec, Icenowy Zheng,
	devicetree, linux-arm-kernel, linux-sunxi

On Wed, Jan 13, 2021 at 6:30 PM André Przywara <andre.przywara@arm.com> wrote:
>
> On 06/01/2021 15:56, Chen-Yu Tsai wrote:
> > Hi,
> >
> > On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
> >>
> >> In recent Allwinner SoCs the first USB host controller (HCI0) shares
> >> the first PHY with the MUSB controller. Probably to make this sharing
> >> work, we were avoiding to declare this in the DT. This has two
> >> shortcomings:
> >> - U-Boot (which uses the same .dts) cannot use this port in host mode
> >>   without a PHY linked, so we were loosing one USB port there.
> >> - It requires the MUSB driver to be enabled and loaded, although we
> >>   don't actually use it.
> >>
> >> To avoid those issues, let's add this PHY link to the A64 and H6 .dtsi
> >> files. After all PHY port 0 *is* connected to HCI0, so we should describe
> >> it as this. Remove the part from the boards which were already doing
> >> that.
> >>
> >> This makes it work in U-Boot, also improves compatiblity when no MUSB
> >> driver is loaded (for instance in distribution installers).
> >>
> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >> ---
> >>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 4 ----
> >>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 4 ++++
> >>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          | 4 ++++
> >
> > It would be better if the H6 parts were separated out.
>
> Sure.
>
> >
> > Please also add a fixes tag, which helps with backporting.
>
> The whole concept of DT backports raises some eyebrows here, but it's
> surely easy enough to do.

Well, whether people choose to backport is their decision. But providing
information used to decide whether to do so, and if yes, what else is
needed, is IMHO something the author can help with.

Likely backport scenarios are distribution kernels AFAICT.

ChenYu

> Thanks,
> Andre.

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

* Re: [linux-sunxi] [PATCH 1/7] arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0
@ 2021-01-13 10:43         ` Chen-Yu Tsai
  0 siblings, 0 replies; 40+ messages in thread
From: Chen-Yu Tsai @ 2021-01-13 10:43 UTC (permalink / raw)
  To: André Przywara
  Cc: devicetree, Jernej Skrabec, Maxime Ripard, linux-sunxi,
	linux-arm-kernel, Icenowy Zheng

On Wed, Jan 13, 2021 at 6:30 PM André Przywara <andre.przywara@arm.com> wrote:
>
> On 06/01/2021 15:56, Chen-Yu Tsai wrote:
> > Hi,
> >
> > On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
> >>
> >> In recent Allwinner SoCs the first USB host controller (HCI0) shares
> >> the first PHY with the MUSB controller. Probably to make this sharing
> >> work, we were avoiding to declare this in the DT. This has two
> >> shortcomings:
> >> - U-Boot (which uses the same .dts) cannot use this port in host mode
> >>   without a PHY linked, so we were loosing one USB port there.
> >> - It requires the MUSB driver to be enabled and loaded, although we
> >>   don't actually use it.
> >>
> >> To avoid those issues, let's add this PHY link to the A64 and H6 .dtsi
> >> files. After all PHY port 0 *is* connected to HCI0, so we should describe
> >> it as this. Remove the part from the boards which were already doing
> >> that.
> >>
> >> This makes it work in U-Boot, also improves compatiblity when no MUSB
> >> driver is loaded (for instance in distribution installers).
> >>
> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >> ---
> >>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 4 ----
> >>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi         | 4 ++++
> >>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi          | 4 ++++
> >
> > It would be better if the H6 parts were separated out.
>
> Sure.
>
> >
> > Please also add a fixes tag, which helps with backporting.
>
> The whole concept of DT backports raises some eyebrows here, but it's
> surely easy enough to do.

Well, whether people choose to backport is their decision. But providing
information used to decide whether to do so, and if yes, what else is
needed, is IMHO something the author can help with.

Likely backport scenarios are distribution kernels AFAICT.

ChenYu

> Thanks,
> Andre.

_______________________________________________
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] 40+ messages in thread

* Re: [linux-sunxi] [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
  2021-01-06 16:08       ` André Przywara
@ 2021-01-13 14:02         ` Emmanuel Vadot
  -1 siblings, 0 replies; 40+ messages in thread
From: Emmanuel Vadot @ 2021-01-13 14:02 UTC (permalink / raw)
  To: André Przywara
  Cc: Chen-Yu Tsai, devicetree, Jernej Skrabec, Maxime Ripard,
	linux-sunxi, linux-arm-kernel, Icenowy Zheng

On Wed, 6 Jan 2021 16:08:30 +0000
André Przywara <andre.przywara@arm.com> wrote:

> On 06/01/2021 15:53, Chen-Yu Tsai wrote:
> 
> Hi,
> 
> > On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
> >>
> >> The Pine64-LTS board features a blue status LED on pin PL7.
> > 
> > I'd like some clarification about this.
> > 
> > My Pine64-LTS was a used unit personally given to me by TL Lim, which came
> > with LEDs that I assume were soldered on by hand as their mounting angles
> > are slightly off. My Pine64+ (the original from the Kickstarter campaign)
> > and SoPine baseboard (a new unit, also given to me by TL Lim) came without
> > LEDs soldered on.
> 
> The situation is similar here ;-), and that's why I checked the pictures
> in the store. The LEDs look slightly different (not angled), but the
> location of the pads is the same and I see two LEDs on the picture. The
> schematic seems to confirm both the pins, the polarity and the colour.
> Hence I am highly confident that it's a blue LED on PL7, active low.
> 
> But we can wait for other people to confirm.
> 
> Thanks!
> Andre

 I have three boards :

 - Pine64, no led (bought after the kickstarter)
 - A64-LTS, blue color, and active low, no weird mounting angles here
(don't remember if I bought this one or not)
 - Sopine Baseboard, no led (definitly bought this myself)

> > I'm OK with adding the LED to the device tree. I'm just not sure about the
> > color.
> > 
> > 
> > ChenYu
> > 
> >> Describe it in the DT.
> >>
> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >> ---
> >>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
> >>  1 file changed, 11 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> >> index 302e24be0a31..55bf4a0fc31c 100644
> >> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> >> @@ -1,10 +1,21 @@
> >>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> >>  // Copyright (c) 2018 ARM Ltd.
> >>
> >> +#include <dt-bindings/leds/common.h>
> >>  #include "sun50i-a64-sopine-baseboard.dts"
> >>
> >>  / {
> >>         model = "Pine64 LTS";
> >>         compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
> >>                      "allwinner,sun50i-a64";
> >> +
> >> +       leds {
> >> +               compatible = "gpio-leds";
> >> +
> >> +               status {
> >> +                       function = LED_FUNCTION_STATUS;
> >> +                       color = <LED_COLOR_ID_BLUE>;
> >> +                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
> >> +               };
> >> +       };
> >>  };
> >> --
> >> 2.17.5
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> >> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-3-andre.przywara%40arm.com.
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

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

* Re: [linux-sunxi] [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED
@ 2021-01-13 14:02         ` Emmanuel Vadot
  0 siblings, 0 replies; 40+ messages in thread
From: Emmanuel Vadot @ 2021-01-13 14:02 UTC (permalink / raw)
  To: André Przywara
  Cc: devicetree, Jernej Skrabec, linux-sunxi, Maxime Ripard,
	Chen-Yu Tsai, linux-arm-kernel, Icenowy Zheng

On Wed, 6 Jan 2021 16:08:30 +0000
André Przywara <andre.przywara@arm.com> wrote:

> On 06/01/2021 15:53, Chen-Yu Tsai wrote:
> 
> Hi,
> 
> > On Wed, Jan 6, 2021 at 11:05 PM Andre Przywara <andre.przywara@arm.com> wrote:
> >>
> >> The Pine64-LTS board features a blue status LED on pin PL7.
> > 
> > I'd like some clarification about this.
> > 
> > My Pine64-LTS was a used unit personally given to me by TL Lim, which came
> > with LEDs that I assume were soldered on by hand as their mounting angles
> > are slightly off. My Pine64+ (the original from the Kickstarter campaign)
> > and SoPine baseboard (a new unit, also given to me by TL Lim) came without
> > LEDs soldered on.
> 
> The situation is similar here ;-), and that's why I checked the pictures
> in the store. The LEDs look slightly different (not angled), but the
> location of the pads is the same and I see two LEDs on the picture. The
> schematic seems to confirm both the pins, the polarity and the colour.
> Hence I am highly confident that it's a blue LED on PL7, active low.
> 
> But we can wait for other people to confirm.
> 
> Thanks!
> Andre

 I have three boards :

 - Pine64, no led (bought after the kickstarter)
 - A64-LTS, blue color, and active low, no weird mounting angles here
(don't remember if I bought this one or not)
 - Sopine Baseboard, no led (definitly bought this myself)

> > I'm OK with adding the LED to the device tree. I'm just not sure about the
> > color.
> > 
> > 
> > ChenYu
> > 
> >> Describe it in the DT.
> >>
> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> >> ---
> >>  .../boot/dts/allwinner/sun50i-a64-pine64-lts.dts      | 11 +++++++++++
> >>  1 file changed, 11 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> >> index 302e24be0a31..55bf4a0fc31c 100644
> >> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
> >> @@ -1,10 +1,21 @@
> >>  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> >>  // Copyright (c) 2018 ARM Ltd.
> >>
> >> +#include <dt-bindings/leds/common.h>
> >>  #include "sun50i-a64-sopine-baseboard.dts"
> >>
> >>  / {
> >>         model = "Pine64 LTS";
> >>         compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
> >>                      "allwinner,sun50i-a64";
> >> +
> >> +       leds {
> >> +               compatible = "gpio-leds";
> >> +
> >> +               status {
> >> +                       function = LED_FUNCTION_STATUS;
> >> +                       color = <LED_COLOR_ID_BLUE>;
> >> +                       gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
> >> +               };
> >> +       };
> >>  };
> >> --
> >> 2.17.5
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> >> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20210106150525.15403-3-andre.przywara%40arm.com.
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


-- 
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>

_______________________________________________
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] 40+ messages in thread

end of thread, other threads:[~2021-01-13 14:10 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 15:05 [PATCH 0/7] arm64: dts: allwinner: Various DT fixes Andre Przywara
2021-01-06 15:05 ` Andre Przywara
2021-01-06 15:05 ` [PATCH 1/7] arm64: dts: allwinner: H6/A64: properly connect USB PHY to port 0 Andre Przywara
2021-01-06 15:05   ` Andre Przywara
2021-01-06 15:56   ` [linux-sunxi] " Chen-Yu Tsai
2021-01-06 15:56     ` Chen-Yu Tsai
2021-01-13 10:30     ` André Przywara
2021-01-13 10:30       ` André Przywara
2021-01-13 10:43       ` Chen-Yu Tsai
2021-01-13 10:43         ` Chen-Yu Tsai
2021-01-06 15:05 ` [PATCH 2/7] arm64: dts: allwinner: Pine64-LTS: Add status LED Andre Przywara
2021-01-06 15:05   ` Andre Przywara
2021-01-06 15:53   ` [linux-sunxi] " Chen-Yu Tsai
2021-01-06 15:53     ` Chen-Yu Tsai
2021-01-06 16:08     ` André Przywara
2021-01-06 16:08       ` André Przywara
2021-01-13 14:02       ` Emmanuel Vadot
2021-01-13 14:02         ` Emmanuel Vadot
2021-01-06 16:01   ` Maxime Ripard
2021-01-06 16:01     ` Maxime Ripard
2021-01-06 15:05 ` [PATCH 3/7] arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card Andre Przywara
2021-01-06 15:05   ` Andre Przywara
2021-01-06 15:57   ` [linux-sunxi] " Chen-Yu Tsai
2021-01-06 15:57     ` Chen-Yu Tsai
2021-01-06 15:05 ` [PATCH 4/7] arm64: dts: allwinner: H6: Allow up to 150 MHz MMC bus frequency Andre Przywara
2021-01-06 15:05   ` Andre Przywara
2021-01-06 16:01   ` [linux-sunxi] " Chen-Yu Tsai
2021-01-06 16:01     ` Chen-Yu Tsai
2021-01-06 15:05 ` [PATCH 5/7] arm64: dts: allwinner: A64: Limit MMC2 bus frequency to 150 MHz Andre Przywara
2021-01-06 15:05   ` Andre Przywara
2021-01-06 15:58   ` [linux-sunxi] " Chen-Yu Tsai
2021-01-06 15:58     ` Chen-Yu Tsai
2021-01-06 15:05 ` [PATCH 6/7] arm64: dts: allwinner: Pine64-LTS/SoPine: Enable HS200 eMMC mode Andre Przywara
2021-01-06 15:05   ` Andre Przywara
2021-01-06 15:59   ` [linux-sunxi] " Chen-Yu Tsai
2021-01-06 15:59     ` Chen-Yu Tsai
2021-01-06 15:05 ` [PATCH 7/7] arm64: dts: allwinner: Pine H64: " Andre Przywara
2021-01-06 15:05   ` Andre Przywara
2021-01-06 16:00   ` [linux-sunxi] " Chen-Yu Tsai
2021-01-06 16:00     ` Chen-Yu Tsai

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