Skip to contentSkip to conversation

ARM: dts: at91: sam9x60-curiosity: Enable USB gadget node

PATCH In review Zixun LI 3 participants 12 messages Mar 31, 2025 – Apr 18, 2025 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Zixun LI

author
#1 lore raw

PATCH v2 1/3 usb: gadget: atmel: Add SAM9X60 support

Compared to SAM9X5 the only difference is the DPRAM memory from the USB High Speed Device Port (UDPHS) hardware block was increased, so we can reuse the same endpoint data.

Also add compatible "microchip,sam9x60-udc".

---
 arch/arm/mach-at91/include/mach/atmel_usba_udc.h | 2 +-
 drivers/usb/gadget/atmel_usba_udc.c              | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-at91/include/mach/atmel_usba_udc.h +1 -1
index 835b47d91ba..23c71985c90 100644
@@ -20,7 +20,7 @@
 	}
 
 #if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
-	defined(CONFIG_AT91SAM9X5)
+	defined(CONFIG_AT91SAM9X5) || defined(CONFIG_SAM9X60)
 static struct usba_ep_data usba_udc_ep[] = {
 	EP("ep0", 0, 64, 1, 0, 0),
 	EP("ep1", 1, 1024, 2, 1, 1),
drivers/usb/gadget/atmel_usba_udc.c +1 -0
index a77037a7094..f9326f0a7e7 100644
@@ -1443,6 +1443,7 @@ static const struct udevice_id usba_udc_ids[] = {
 	{ .compatible = "atmel,at91sam9rl-udc" },
 	{ .compatible = "atmel,at91sam9g45-udc" },
 	{ .compatible = "atmel,sama5d3-udc" },
+	{ .compatible = "microchip,sam9x60-udc" },
 	{}
 };
 
Signature · 1 line
2.49.0
Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] usb: gadget: atmel: Add SAM9X60 support

Hi Zixun,

Thank you for the patch.

Quoted 7 lines · Zixun LI

Compared to SAM9X5 the only difference is the DPRAM memory from the USB High Speed Device Port (UDPHS) hardware block was increased, so we can reuse the same endpoint data.

Also add compatible "microchip,sam9x60-udc".

Quoted 32 lines
---
 arch/arm/mach-at91/include/mach/atmel_usba_udc.h | 2 +-
 drivers/usb/gadget/atmel_usba_udc.c              | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-at91/include/mach/atmel_usba_udc.h +1 -1
index 835b47d91ba..23c71985c90 100644
@@ -20,7 +20,7 @@
 	}
 
 #if defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
-	defined(CONFIG_AT91SAM9X5)
+	defined(CONFIG_AT91SAM9X5) || defined(CONFIG_SAM9X60)
 static struct usba_ep_data usba_udc_ep[] = {
 	EP("ep0", 0, 64, 1, 0, 0),
 	EP("ep1", 1, 1024, 2, 1, 1),
drivers/usb/gadget/atmel_usba_udc.c +1 -0
index a77037a7094..f9326f0a7e7 100644
@@ -1443,6 +1443,7 @@ static const struct udevice_id usba_udc_ids[] = {
 	{ .compatible = "atmel,at91sam9rl-udc" },
 	{ .compatible = "atmel,at91sam9g45-udc" },
 	{ .compatible = "atmel,sama5d3-udc" },
+	{ .compatible = "microchip,sam9x60-udc" },
 	{}
 };
 
Signature · 1 line
2.49.0
#3 lore raw

Re: (subset) [PATCH v2 1/3] usb: gadget: atmel: Add SAM9X60 support

In reply to Zixun LI

Hi,

Quoted 8 lines · Zixun LI

Compared to SAM9X5 the only difference is the DPRAM memory from the USB High Speed Device Port (UDPHS) hardware block was increased, so we can reuse the same endpoint data.

Also add compatible "microchip,sam9x60-udc".

[...]

Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)

[1/3] usb: gadget: atmel: Add SAM9X60 support

      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/dc22cf37af6d604513f8c6f02d4cb551d5a59435

--
Mattijs

#4 lore raw

Re: (subset) [PATCH v2 1/3] usb: gadget: atmel: Add SAM9X60 support

Quoted 12 lines · Mattijs Korpershoek

Hi,

Quoted 8 lines · Zixun LI

Compared to SAM9X5 the only difference is the DPRAM memory from the USB High Speed Device Port (UDPHS) hardware block was increased, so we can reuse the same endpoint data.

Also add compatible "microchip,sam9x60-udc".

[...]

Quoted 7 lines

Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)

[1/3] usb: gadget: atmel: Add SAM9X60 support

      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/dc22cf37af6d604513f8c6f02d4cb551d5a59435

--
Mattijs

Applied 2 and 3 to u-boot-at91/master, thanks !

author
#5 lore raw

PATCH v2 2/3 ARM: dts: sam9x60: Add USB gadget DT node.

In reply to a message not in the archive

Add the USB gadget DT node for the sam9x60 SoC's.

---
 arch/arm/dts/sam9x60.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/sam9x60.dtsi +13 -0
index 3b684fc63d5..ea2647e5fc9 100644
@@ -69,6 +69,19 @@
 		#size-cells = <1>;
 		ranges;
 
+		usb0: gadget@500000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "microchip,sam9x60-udc";
+			reg = <0x500000 0x100000>,
+				<0xf803c000 0x400>;
+			clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, <&pmc PMC_TYPE_CORE 8>;
+			clock-names = "pclk", "hclk";
+			assigned-clocks = <&pmc PMC_TYPE_CORE 8>;
+			assigned-clock-rates = <480000000>;
+			status = "disabled";
+		};
+
 		usb1: usb@600000 {
 			compatible = "atmel,at91rm9200-ohci", "usb-ohci";
 			reg = <0x00600000 0x100000>;
Signature · 1 line
2.49.0
Reviewed-by on v2 2/3
#6 lore raw

Re: [PATCH v2 2/3] ARM: dts: sam9x60: Add USB gadget DT node.

Quoted 3 lines · Zixun LI

Add the USB gadget DT node for the sam9x60 SoC's.

Quoted 28 lines
---
 arch/arm/dts/sam9x60.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/sam9x60.dtsi +13 -0
index 3b684fc63d5..ea2647e5fc9 100644
@@ -69,6 +69,19 @@
 		#size-cells = <1>;
 		ranges;
 
+		usb0: gadget@500000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "microchip,sam9x60-udc";
+			reg = <0x500000 0x100000>,
+				<0xf803c000 0x400>;
+			clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, <&pmc PMC_TYPE_CORE 8>;
+			clock-names = "pclk", "hclk";
+			assigned-clocks = <&pmc PMC_TYPE_CORE 8>;
+			assigned-clock-rates = <480000000>;
+			status = "disabled";
+		};
+
 		usb1: usb@600000 {
 			compatible = "atmel,at91rm9200-ohci", "usb-ohci";
 			reg = <0x00600000 0x100000>;
Reviewed-by on v2 2/3
#7 lore raw

Re: [PATCH v2 2/3] ARM: dts: sam9x60: Add USB gadget DT node.

In reply to Zixun LI

Hi Zixun,

Thank you for the patch.

Quoted 3 lines · Zixun LI

Add the USB gadget DT node for the sam9x60 SoC's.

Nitpick: title (subject) should not finish with a period (.)

This can be fixed up by the maintainer that will apply the patches.

Eugen, This is assigned to me on patchwork:
https://patchwork.ozlabs.org/project/uboot/list/?series=450655

Can I pick up all 3 patches or do you prefer to pick up [2/3] and [3/3] ?

Quoted 30 lines
---
 arch/arm/dts/sam9x60.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/sam9x60.dtsi +13 -0
index 3b684fc63d5..ea2647e5fc9 100644
@@ -69,6 +69,19 @@
 		#size-cells = <1>;
 		ranges;
 
+		usb0: gadget@500000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "microchip,sam9x60-udc";
+			reg = <0x500000 0x100000>,
+				<0xf803c000 0x400>;
+			clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, <&pmc PMC_TYPE_CORE 8>;
+			clock-names = "pclk", "hclk";
+			assigned-clocks = <&pmc PMC_TYPE_CORE 8>;
+			assigned-clock-rates = <480000000>;
+			status = "disabled";
+		};
+
 		usb1: usb@600000 {
 			compatible = "atmel,at91rm9200-ohci", "usb-ohci";
 			reg = <0x00600000 0x100000>;
Signature · 1 line
2.49.0
#8 lore raw

Re: [PATCH v2 2/3] ARM: dts: sam9x60: Add USB gadget DT node.

Quoted 10 lines · Mattijs Korpershoek

Hi Zixun,

Thank you for the patch.

Quoted 3 lines · Zixun LI

Add the USB gadget DT node for the sam9x60 SoC's.

Quoted 8 lines

Nitpick: title (subject) should not finish with a period (.)

This can be fixed up by the maintainer that will apply the patches.

Eugen, This is assigned to me on patchwork:
https://patchwork.ozlabs.org/project/uboot/list/?series=450655

Can I pick up all 3 patches or do you prefer to pick up [2/3] and [3/3] ?

It is better that I take these two, because there are some pending changes on the same DT for the next merge window, so it would avoid conflicts.
Reassign them to me in patchwork please.

Quoted 33 lines
Quoted 30 lines
---
 arch/arm/dts/sam9x60.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/sam9x60.dtsi +13 -0
index 3b684fc63d5..ea2647e5fc9 100644
@@ -69,6 +69,19 @@
 		#size-cells = <1>;
 		ranges;
 
+		usb0: gadget@500000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "microchip,sam9x60-udc";
+			reg = <0x500000 0x100000>,
+				<0xf803c000 0x400>;
+			clocks = <&pmc PMC_TYPE_PERIPHERAL 23>, <&pmc PMC_TYPE_CORE 8>;
+			clock-names = "pclk", "hclk";
+			assigned-clocks = <&pmc PMC_TYPE_CORE 8>;
+			assigned-clock-rates = <480000000>;
+			status = "disabled";
+		};
+
 		usb1: usb@600000 {
 			compatible = "atmel,at91rm9200-ohci", "usb-ohci";
 			reg = <0x00600000 0x100000>;
Signature · 1 line
2.49.0
#9 lore raw

Re: [PATCH v2 2/3] ARM: dts: sam9x60: Add USB gadget DT node.

Quoted 18 lines · Eugen Hristev
Quoted 17 lines · Mattijs Korpershoek

Hi Zixun,

Thank you for the patch.

Quoted 3 lines · Zixun LI

Add the USB gadget DT node for the sam9x60 SoC's.

Nitpick: title (subject) should not finish with a period (.)

This can be fixed up by the maintainer that will apply the patches.

Eugen, This is assigned to me on patchwork:
https://patchwork.ozlabs.org/project/uboot/list/?series=450655

Quoted 6 lines
Quoted 1 line

Can I pick up all 3 patches or do you prefer to pick up [2/3] and [3/3] ?

It is better that I take these two, because there are some pending changes on the same DT for the next merge window, so it would avoid conflicts.
Reassign them to me in patchwork please.

Sure, that works. Assigned to you.
Thanks !

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

---

author
#10 lore raw

PATCH v2 3/3 ARM: dts: at91: sam9x60-curiosity: Enable USB gadget node

In reply to a message not in the archive

Enable USB gadget usb0 node support.

---
 arch/arm/dts/at91-sam9x60_curiosity.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/at91-sam9x60_curiosity.dts +4 -0
index 99867d2bf8e..08480df88c6 100644
@@ -248,6 +248,10 @@
 	};
 };
 
+&usb0 {
+	status = "okay";
+};
+
 &usb1 {
 	num-ports = <3>;
 	atmel,vbus-gpio = <0
Signature · 1 line
2.49.0
Reviewed-by on v2 3/3
#11 lore raw
Quoted 3 lines · Zixun LI

Enable USB gadget usb0 node support.

Quoted 19 lines
---
 arch/arm/dts/at91-sam9x60_curiosity.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/at91-sam9x60_curiosity.dts +4 -0
index 99867d2bf8e..08480df88c6 100644
@@ -248,6 +248,10 @@
 	};
 };
 
+&usb0 {
+	status = "okay";
+};
+
 &usb1 {
 	num-ports = <3>;
 	atmel,vbus-gpio = <0
Reviewed-by on v2 3/3
#12 lore raw
In reply to Zixun LI

Hi Zixun,

Thank you for the patch.

Quoted 3 lines · Zixun LI

Enable USB gadget usb0 node support.

Quoted 21 lines
---
 arch/arm/dts/at91-sam9x60_curiosity.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/at91-sam9x60_curiosity.dts +4 -0
index 99867d2bf8e..08480df88c6 100644
@@ -248,6 +248,10 @@
 	};
 };
 
+&usb0 {
+	status = "okay";
+};
+
 &usb1 {
 	num-ports = <3>;
 	atmel,vbus-gpio = <0
Signature · 1 line
2.49.0