Skip to contentSkip to conversation

ARM: dts: at91: Adding documentation for SAMA5D3-EDS

PATCH In review Jerry Ray 4 participants 14 messages Sep 2, 2022 – Sep 9, 2022

Subsystems (3)
lore
Share & tools
lore

Jerry Ray

author
#0 lore raw

PATCH v6 1/2 ARM: dts: at91: Adding documentation for SAMA5D3-EDS

Adding the SAMA5D3-EDS board from Microchip into the atmel AT91 board description yaml file.

---
v5->v6:
- No code change - patch prefix naming modified to match with others.
v4->v5:
- No change
v3->v4:
- No change
v2->v3:
- No change
v1->v2:
- Added Device Tree documentation for Microchip SAMA5D3-EDS board

---
 Documentation/devicetree/bindings/arm/atmel-at91.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/arm/atmel-at91.yaml +7 -0
index 2b7848bb7769..c7f067e13d20 100644
@@ -139,6 +139,13 @@ properties:
           - const: atmel,at91sam9g20
           - const: atmel,at91sam9
 
+      - description: Microchip SAMA5D3 Ethernet Development System Board
+        items:
+          - const: microchip,sama5d3-eds
+          - const: atmel,sama5d36
+          - const: atmel,sama5d3
+          - const: atmel,sama5
+
       - items:
           - enum:
               - atmel,sama5d31
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v6 2/2 ARM: dts: at91: Adding SAMA5D3-EDS board

The SAMA5D3-EDS board is an Ethernet Development Platform allowing for evaluating many Microchip ethernet switch and PHY products. Various daughter cards can connect up via an RGMII connector or an RMII connector.

The EDS board is not intended for stand-alone use and has no ethernet capabilities when no daughter board is connected. As such, this device tree is intended to be used with a DT overlay defining the add-on board. To better ensure consistency, some items are defined here as a form of documentation so that all add-on overlays will use the same terms.

Google search keywords: "Microchip SAMA5D3-EDS"

---
v5->v6:
- Replaced underscores in names where I can, improving naming.
v4->v5:
- patch now applies to v6.0-rc2
v3->v4:
- Fixed regulators as necessary to get the board to boot from SD Card.
v2->v3:
- Alphabetized pinctrl entries.
- cleaned up a warning in the regulators section.
- License tweaked to 'OR MIT'
- Included Makefile change
v1->v2:
- Modified the compatible field in the device tree to reflect Microchip Ethernet Development System Board.

---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/at91-sama5d3_eds.dts | 309 +++++++++++++++++++++++++
 2 files changed, 310 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91-sama5d3_eds.dts
arch/arm/boot/dts/Makefile +1 -0
index 05d8aef6e5d2..e92e639a2dc3 100644
@@ -61,6 +61,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
 	at91-sama5d2_icp.dtb \
 	at91-sama5d2_ptc_ek.dtb \
 	at91-sama5d2_xplained.dtb \
+	at91-sama5d3_eds.dtb \
 	at91-sama5d3_ksz9477_evb.dtb \
 	at91-sama5d3_xplained.dtb \
 	at91-dvk_som60.dtb \
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +309 -0

309 lines not on this page · raw message

Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH v6 2/2] ARM: dts: at91: Adding SAMA5D3-EDS board

Quoted 65 lines · Jerry Ray

The SAMA5D3-EDS board is an Ethernet Development Platform allowing for evaluating many Microchip ethernet switch and PHY products. Various daughter cards can connect up via an RGMII connector or an RMII connector.

The EDS board is not intended for stand-alone use and has no ethernet capabilities when no daughter board is connected. As such, this device tree is intended to be used with a DT overlay defining the add-on board. To better ensure consistency, some items are defined here as a form of documentation so that all add-on overlays will use the same terms.

Google search keywords: "Microchip SAMA5D3-EDS"

---
v5->v6:
- Replaced underscores in names where I can, improving naming.
v4->v5:
- patch now applies to v6.0-rc2
v3->v4:
- Fixed regulators as necessary to get the board to boot from SD Card.
v2->v3:
- Alphabetized pinctrl entries.
- cleaned up a warning in the regulators section.
- License tweaked to 'OR MIT'
- Included Makefile change
v1->v2:
- Modified the compatible field in the device tree to reflect Microchip Ethernet Development System Board.

---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/at91-sama5d3_eds.dts | 309 +++++++++++++++++++++++++
 2 files changed, 310 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91-sama5d3_eds.dts
arch/arm/boot/dts/Makefile +1 -0
index 05d8aef6e5d2..e92e639a2dc3 100644
@@ -61,6 +61,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
 	at91-sama5d2_icp.dtb \
 	at91-sama5d2_ptc_ek.dtb \
 	at91-sama5d2_xplained.dtb \
+	at91-sama5d3_eds.dtb \
 	at91-sama5d3_ksz9477_evb.dtb \
 	at91-sama5d3_xplained.dtb \
 	at91-dvk_som60.dtb \
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +13 -0
new file mode 100644
index 000000000000..b4fe1c5f2997
@@ -0,0 +1,309 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * at91-sama5d3_eds.dts - Device Tree file for the SAMA5D3 Ethernet
+ *    Development System board.
+ *
+ * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Jerry Ray <[email protected]>
+ */
+/dts-v1/;
+#include "sama5d36.dtsi"
+
+/ {

arch/arm/boot/dts/at91-sama5d3_eds.dts line 23

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+	model = "SAMA5D3 Ethernet Development System";
+	compatible = "microchip,sama5d3-eds", "atmel,sama5d36",
+		     "atmel,sama5d3", "atmel,sama5";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	clocks {
+		slow_xtal {

No underscores in node names. Override by label.

Quoted 17 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +17 -0
+			clock-frequency = <32768>;
+		};
+
+		main_xtal {
+			clock-frequency = <12000000>;
+		};
+	};
+
+	gpio {
+		compatible = "gpio-keys";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_key_gpio>;
+
+		button-3 {
+			label = "PB_USER";
+			gpios = <&pioE 29 GPIO_ACTIVE_LOW>;

arch/arm/boot/dts/at91-sama5d3_eds.dts line 50

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+			linux,code = <0x104>;
+			wakeup-source;
+		};
+	};
+
+	memory@20000000 {
+		reg = <0x20000000 0x10000000>;
+	};
+
+	vcc_3v3_reg: buck-regulator-1 {

Keep consistent prefix or suffix, so:
regulator-buck-1

arch/arm/boot/dts/at91-sama5d3_eds.dts line 58

Quoted 8 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +8 -0
+		compatible = "regulator-fixed";
+		regulator-name = "VCC_3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+
+	vcc_2v5_reg: ldo-regulator-2 {

regulator-ldo-1
(why numbering of LDO regulators starts from 2? keep some sense in this)

Quoted 16 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +16 -0
+		compatible = "regulator-fixed";
+		regulator-name = "VCC_2V5";
+		regulator-min-microvolt = <2500000>;
+		regulator-max-microvolt = <2500000>;
+		regulator-always-on;
+		vin-supply = <&vcc_3v3_reg>;
+	};
+
+	vcc_1v8_reg: ldo-regulator-3 {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC_1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-always-on;
+		vin-supply = <&vcc_3v3_reg>;
+	};

arch/arm/boot/dts/at91-sama5d3_eds.dts line 84

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+
+	vcc_1v2_reg: buck-regulator-4 {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC_1V2";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		regulator-always-on;
+	};
+
+	vcc_mmc0_reg: fixedregulator-mmc0 {

Just regulator-mmc0

arch/arm/boot/dts/at91-sama5d3_eds.dts line 93

Quoted 9 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +9 -0
+		compatible = "regulator-fixed";
+		regulator-name = "mmc0-card-supply";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_vcc_mmc0_reg_gpio>;
+		gpio = <&pioE 2 GPIO_ACTIVE_LOW>;
+	};

Best regards,
Krzysztof

#3 lore raw

RE: [PATCH v6 2/2] ARM: dts: at91: Adding SAMA5D3-EDS board

Quoted 119 lines · Jerry Ray
Quoted 65 lines

The SAMA5D3-EDS board is an Ethernet Development Platform allowing for evaluating many Microchip ethernet switch and PHY products. Various daughter cards can connect up via an RGMII connector or an RMII connector.

The EDS board is not intended for stand-alone use and has no ethernet capabilities when no daughter board is connected. As such, this device tree is intended to be used with a DT overlay defining the add-on board. To better ensure consistency, some items are defined here as a form of documentation so that all add-on overlays will use the same terms.

Google search keywords: "Microchip SAMA5D3-EDS"

---
v5->v6:
- Replaced underscores in names where I can, improving naming.
v4->v5:
- patch now applies to v6.0-rc2
v3->v4:
- Fixed regulators as necessary to get the board to boot from SD Card.
v2->v3:
- Alphabetized pinctrl entries.
- cleaned up a warning in the regulators section.
- License tweaked to 'OR MIT'
- Included Makefile change
v1->v2:
- Modified the compatible field in the device tree to reflect Microchip Ethernet Development System Board.

---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/at91-sama5d3_eds.dts | 309 
+++++++++++++++++++++++++
 2 files changed, 310 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91-sama5d3_eds.dts
arch/arm/boot/dts/Makefile +1 -0
index 05d8aef6e5d2..e92e639a2dc3 100644
@@ -61,6 +61,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
      at91-sama5d2_icp.dtb \
      at91-sama5d2_ptc_ek.dtb \
      at91-sama5d2_xplained.dtb \
+     at91-sama5d3_eds.dtb \
      at91-sama5d3_ksz9477_evb.dtb \
      at91-sama5d3_xplained.dtb \
      at91-dvk_som60.dtb \
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +11 -0
new file mode 100644
index 000000000000..b4fe1c5f2997
@@ -0,0 +1,309 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * at91-sama5d3_eds.dts - Device Tree file for the SAMA5D3 Ethernet
+ *    Development System board.
+ *
+ * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Jerry Ray <[email protected]>  */ /dts-v1/; #include 
+"sama5d36.dtsi"
+
+/ {

arch/arm/boot/dts/at91-sama5d3_eds.dts line 21

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+     model = "SAMA5D3 Ethernet Development System";
+     compatible = "microchip,sama5d3-eds", "atmel,sama5d36",
+                  "atmel,sama5d3", "atmel,sama5";
+
+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
+
+     clocks {
+             slow_xtal {

No underscores in node names. Override by label.

Quoted 17 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +17 -0
+                     clock-frequency = <32768>;
+             };
+
+             main_xtal {
+                     clock-frequency = <12000000>;
+             };
+     };
+
+     gpio {
+             compatible = "gpio-keys";
+
+             pinctrl-names = "default";
+             pinctrl-0 = <&pinctrl_key_gpio>;
+
+             button-3 {
+                     label = "PB_USER";
+                     gpios = <&pioE 29 GPIO_ACTIVE_LOW>;

arch/arm/boot/dts/at91-sama5d3_eds.dts line 50

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+                     linux,code = <0x104>;
+                     wakeup-source;
+             };
+     };
+
+     memory@20000000 {
+             reg = <0x20000000 0x10000000>;
+     };
+
+     vcc_3v3_reg: buck-regulator-1 {

Keep consistent prefix or suffix, so:
regulator-buck-1

arch/arm/boot/dts/at91-sama5d3_eds.dts line 58

Quoted 8 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +8 -0
+             compatible = "regulator-fixed";
+             regulator-name = "VCC_3V3";
+             regulator-min-microvolt = <3300000>;
+             regulator-max-microvolt = <3300000>;
+             regulator-always-on;
+     };
+
+     vcc_2v5_reg: ldo-regulator-2 {
Quoted 4 lines

regulator-ldo-1
(why numbering of LDO regulators starts from 2? keep some sense in this)

There are N regulators on the board, so they are numbered 1 thru N. Regulator 2 is regulator 2 whether it's a buck or LDO.

Quoted 20 lines
Quoted 20 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +20 -0
+             compatible = "regulator-fixed";
+             regulator-name = "VCC_2V5";
+             regulator-min-microvolt = <2500000>;
+             regulator-max-microvolt = <2500000>;
+             regulator-always-on;
+             vin-supply = <&vcc_3v3_reg>;
+     };
+
+     vcc_1v8_reg: ldo-regulator-3 {
+             compatible = "regulator-fixed";
+             regulator-name = "VCC_1V8";
+             regulator-min-microvolt = <1800000>;
+             regulator-max-microvolt = <1800000>;
+             regulator-always-on;
+             vin-supply = <&vcc_3v3_reg>;
+     };
+
+     vcc_1v2_reg: buck-regulator-4 {
+             compatible = "regulator-fixed";
+             regulator-name = "VCC_1V2";
Quoted 9 lines

arch/arm/boot/dts/at91-sama5d3_eds.dts line 84

Quoted 6 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +6 -0
+             regulator-min-microvolt = <1200000>;
+             regulator-max-microvolt = <1200000>;
+             regulator-always-on;
+     };
+
+     vcc_mmc0_reg: fixedregulator-mmc0 {

Just regulator-mmc0

Okay.

Quoted 11 lines

arch/arm/boot/dts/at91-sama5d3_eds.dts line 93

Quoted 9 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +9 -0
+             compatible = "regulator-fixed";
+             regulator-name = "mmc0-card-supply";
+             regulator-min-microvolt = <3300000>;
+             regulator-max-microvolt = <3300000>;
+             regulator-always-on;
+             pinctrl-names = "default";
+             pinctrl-0 = <&pinctrl_vcc_mmc0_reg_gpio>;
+             gpio = <&pioE 2 GPIO_ACTIVE_LOW>;
+     };
Quoted 3 lines

Best regards,
Krzysztof

Regards,
Jerry.

#4 lore raw

Re: [PATCH v6 2/2] ARM: dts: at91: Adding SAMA5D3-EDS board

Quoted 119 lines · On 08/09/2022 15:58, [email protected] wrote:
Quoted 119 lines · Jerry Ray
Quoted 65 lines

The SAMA5D3-EDS board is an Ethernet Development Platform allowing for evaluating many Microchip ethernet switch and PHY products. Various daughter cards can connect up via an RGMII connector or an RMII connector.

The EDS board is not intended for stand-alone use and has no ethernet capabilities when no daughter board is connected. As such, this device tree is intended to be used with a DT overlay defining the add-on board. To better ensure consistency, some items are defined here as a form of documentation so that all add-on overlays will use the same terms.

Google search keywords: "Microchip SAMA5D3-EDS"

---
v5->v6:
- Replaced underscores in names where I can, improving naming.
v4->v5:
- patch now applies to v6.0-rc2
v3->v4:
- Fixed regulators as necessary to get the board to boot from SD Card.
v2->v3:
- Alphabetized pinctrl entries.
- cleaned up a warning in the regulators section.
- License tweaked to 'OR MIT'
- Included Makefile change
v1->v2:
- Modified the compatible field in the device tree to reflect Microchip Ethernet Development System Board.

---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/at91-sama5d3_eds.dts | 309 
+++++++++++++++++++++++++
 2 files changed, 310 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91-sama5d3_eds.dts
arch/arm/boot/dts/Makefile +1 -0
index 05d8aef6e5d2..e92e639a2dc3 100644
@@ -61,6 +61,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
      at91-sama5d2_icp.dtb \
      at91-sama5d2_ptc_ek.dtb \
      at91-sama5d2_xplained.dtb \
+     at91-sama5d3_eds.dtb \
      at91-sama5d3_ksz9477_evb.dtb \
      at91-sama5d3_xplained.dtb \
      at91-dvk_som60.dtb \
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +11 -0
new file mode 100644
index 000000000000..b4fe1c5f2997
@@ -0,0 +1,309 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * at91-sama5d3_eds.dts - Device Tree file for the SAMA5D3 Ethernet
+ *    Development System board.
+ *
+ * Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Jerry Ray <[email protected]>  */ /dts-v1/; #include 
+"sama5d36.dtsi"
+
+/ {

arch/arm/boot/dts/at91-sama5d3_eds.dts line 21

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+     model = "SAMA5D3 Ethernet Development System";
+     compatible = "microchip,sama5d3-eds", "atmel,sama5d36",
+                  "atmel,sama5d3", "atmel,sama5";
+
+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
+
+     clocks {
+             slow_xtal {

No underscores in node names. Override by label.

Quoted 17 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +17 -0
+                     clock-frequency = <32768>;
+             };
+
+             main_xtal {
+                     clock-frequency = <12000000>;
+             };
+     };
+
+     gpio {
+             compatible = "gpio-keys";
+
+             pinctrl-names = "default";
+             pinctrl-0 = <&pinctrl_key_gpio>;
+
+             button-3 {
+                     label = "PB_USER";
+                     gpios = <&pioE 29 GPIO_ACTIVE_LOW>;

arch/arm/boot/dts/at91-sama5d3_eds.dts line 50

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+                     linux,code = <0x104>;
+                     wakeup-source;
+             };
+     };
+
+     memory@20000000 {
+             reg = <0x20000000 0x10000000>;
+     };
+
+     vcc_3v3_reg: buck-regulator-1 {

Keep consistent prefix or suffix, so:
regulator-buck-1

Quoted 8 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +8 -0
+             compatible = "regulator-fixed";
+             regulator-name = "VCC_3V3";
+             regulator-min-microvolt = <3300000>;
+             regulator-max-microvolt = <3300000>;
+             regulator-always-on;
+     };
+
+     vcc_2v5_reg: ldo-regulator-2 {
Quoted 7 lines
Quoted 4 lines

regulator-ldo-1
(why numbering of LDO regulators starts from 2? keep some sense in this)

There are N regulators on the board, so they are numbered 1 thru N. Regulator 2 is regulator 2 whether it's a buck or LDO.

So if this is supposed to match board schematics (which is good idea), then maybe just "regulator-2"? The point is to have same generic name and customize either prefix or suffix, but not both.

Best regards,
Krzysztof

#5 lore raw

RE: [PATCH v6 2/2] ARM: dts: at91: Adding SAMA5D3-EDS board

Quoted 125 lines
Quoted 125 lines
Quoted 124 lines
Quoted 66 lines

The SAMA5D3-EDS board is an Ethernet Development Platform allowing for evaluating many Microchip ethernet switch and PHY products. Various daughter cards can connect up via an RGMII connector or an RMII connector.

The EDS board is not intended for stand-alone use and has no
ethernet capabilities when no daughter board is connected. As such, this device tree is intended to be used with a DT overlay defining the add-on board. To better ensure consistency, some items are defined here as a form
of documentation so that all add-on overlays will use the same terms.

Google search keywords: "Microchip SAMA5D3-EDS"

---
v5->v6:
- Replaced underscores in names where I can, improving naming.
v4->v5:
- patch now applies to v6.0-rc2
v3->v4:
- Fixed regulators as necessary to get the board to boot from SD Card.
v2->v3:
- Alphabetized pinctrl entries.
- cleaned up a warning in the regulators section.
- License tweaked to 'OR MIT'
- Included Makefile change
v1->v2:
- Modified the compatible field in the device tree to reflect Microchip Ethernet Development System Board.

---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/at91-sama5d3_eds.dts | 309
+++++++++++++++++++++++++
 2 files changed, 310 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91-sama5d3_eds.dts
arch/arm/boot/dts/Makefile +1 -0
index 05d8aef6e5d2..e92e639a2dc3 100644
@@ -61,6 +61,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
      at91-sama5d2_icp.dtb \
      at91-sama5d2_ptc_ek.dtb \
      at91-sama5d2_xplained.dtb \
+     at91-sama5d3_eds.dtb \
      at91-sama5d3_ksz9477_evb.dtb \
      at91-sama5d3_xplained.dtb \
      at91-dvk_som60.dtb \
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +12 -0
new file mode 100644
index 000000000000..b4fe1c5f2997
@@ -0,0 +1,309 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * at91-sama5d3_eds.dts - Device Tree file for the SAMA5D3 Ethernet
+ *    Development System board.
+ *
+ * Copyright (C) 2022 Microchip Technology Inc. and its 
+subsidiaries
+ *
+ * Author: Jerry Ray <[email protected]>  */ /dts-v1/; 
+#include "sama5d36.dtsi"
+
+/ {

arch/arm/boot/dts/at91-sama5d3_eds.dts line 22

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+     model = "SAMA5D3 Ethernet Development System";
+     compatible = "microchip,sama5d3-eds", "atmel,sama5d36",
+                  "atmel,sama5d3", "atmel,sama5";
+
+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
+
+     clocks {
+             slow_xtal {

No underscores in node names. Override by label.

Quoted 17 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +17 -0
+                     clock-frequency = <32768>;
+             };
+
+             main_xtal {
+                     clock-frequency = <12000000>;
+             };
+     };
+
+     gpio {
+             compatible = "gpio-keys";
+
+             pinctrl-names = "default";
+             pinctrl-0 = <&pinctrl_key_gpio>;
+
+             button-3 {
+                     label = "PB_USER";
+                     gpios = <&pioE 29 GPIO_ACTIVE_LOW>;

arch/arm/boot/dts/at91-sama5d3_eds.dts line 50

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+                     linux,code = <0x104>;
+                     wakeup-source;
+             };
+     };
+
+     memory@20000000 {
+             reg = <0x20000000 0x10000000>;
+     };
+
+     vcc_3v3_reg: buck-regulator-1 {

Keep consistent prefix or suffix, so:
regulator-buck-1

arch/arm/boot/dts/at91-sama5d3_eds.dts line 58

Quoted 8 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +8 -0
+             compatible = "regulator-fixed";
+             regulator-name = "VCC_3V3";
+             regulator-min-microvolt = <3300000>;
+             regulator-max-microvolt = <3300000>;
+             regulator-always-on;
+     };
+
+     vcc_2v5_reg: ldo-regulator-2 {

regulator-ldo-1
(why numbering of LDO regulators starts from 2? keep some sense in this)

Quoted 8 lines
Quoted 2 lines

There are N regulators on the board, so they are numbered 1 thru N. Regulator 2 is regulator 2 whether it's a buck or LDO.

So if this is supposed to match board schematics (which is good idea), then maybe just "regulator-2"? The point is to have same generic name and customize either prefix or suffix, but not both.

Best regards,
Krzysztof

I prefer names to be descriptive, but I suppose I can have the name generic and add a comment into the dts file. However, the comment doesn't make it into the loaded device tree. Would you be okay with "regulator-2-ldo"?

Regards,
Jerry.

#6 lore raw

Re: [PATCH v6 2/2] ARM: dts: at91: Adding SAMA5D3-EDS board

Quoted 128 lines · On 08/09/2022 16:50, [email protected] wrote:
Quoted 128 lines
Quoted 127 lines
Quoted 119 lines
Quoted 66 lines

The SAMA5D3-EDS board is an Ethernet Development Platform allowing for evaluating many Microchip ethernet switch and PHY products. Various daughter cards can connect up via an RGMII connector or an RMII connector.

The EDS board is not intended for stand-alone use and has no
ethernet capabilities when no daughter board is connected. As such, this device tree is intended to be used with a DT overlay defining the add-on board. To better ensure consistency, some items are defined here as a form
of documentation so that all add-on overlays will use the same terms.

Google search keywords: "Microchip SAMA5D3-EDS"

---
v5->v6:
- Replaced underscores in names where I can, improving naming.
v4->v5:
- patch now applies to v6.0-rc2
v3->v4:
- Fixed regulators as necessary to get the board to boot from SD Card.
v2->v3:
- Alphabetized pinctrl entries.
- cleaned up a warning in the regulators section.
- License tweaked to 'OR MIT'
- Included Makefile change
v1->v2:
- Modified the compatible field in the device tree to reflect Microchip Ethernet Development System Board.

---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/at91-sama5d3_eds.dts | 309
+++++++++++++++++++++++++
 2 files changed, 310 insertions(+)
 create mode 100644 arch/arm/boot/dts/at91-sama5d3_eds.dts
arch/arm/boot/dts/Makefile +1 -0
index 05d8aef6e5d2..e92e639a2dc3 100644
@@ -61,6 +61,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
      at91-sama5d2_icp.dtb \
      at91-sama5d2_ptc_ek.dtb \
      at91-sama5d2_xplained.dtb \
+     at91-sama5d3_eds.dtb \
      at91-sama5d3_ksz9477_evb.dtb \
      at91-sama5d3_xplained.dtb \
      at91-dvk_som60.dtb \
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +12 -0
new file mode 100644
index 000000000000..b4fe1c5f2997
@@ -0,0 +1,309 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * at91-sama5d3_eds.dts - Device Tree file for the SAMA5D3 Ethernet
+ *    Development System board.
+ *
+ * Copyright (C) 2022 Microchip Technology Inc. and its 
+subsidiaries
+ *
+ * Author: Jerry Ray <[email protected]>  */ /dts-v1/; 
+#include "sama5d36.dtsi"
+
+/ {

arch/arm/boot/dts/at91-sama5d3_eds.dts line 22

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+     model = "SAMA5D3 Ethernet Development System";
+     compatible = "microchip,sama5d3-eds", "atmel,sama5d36",
+                  "atmel,sama5d3", "atmel,sama5";
+
+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
+
+     clocks {
+             slow_xtal {

No underscores in node names. Override by label.

Quoted 17 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +17 -0
+                     clock-frequency = <32768>;
+             };
+
+             main_xtal {
+                     clock-frequency = <12000000>;
+             };
+     };
+
+     gpio {
+             compatible = "gpio-keys";
+
+             pinctrl-names = "default";
+             pinctrl-0 = <&pinctrl_key_gpio>;
+
+             button-3 {
+                     label = "PB_USER";
+                     gpios = <&pioE 29 GPIO_ACTIVE_LOW>;

arch/arm/boot/dts/at91-sama5d3_eds.dts line 50

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+                     linux,code = <0x104>;
+                     wakeup-source;
+             };
+     };
+
+     memory@20000000 {
+             reg = <0x20000000 0x10000000>;
+     };
+
+     vcc_3v3_reg: buck-regulator-1 {

Keep consistent prefix or suffix, so:
regulator-buck-1

arch/arm/boot/dts/at91-sama5d3_eds.dts line 58

Quoted 8 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +8 -0
+             compatible = "regulator-fixed";
+             regulator-name = "VCC_3V3";
+             regulator-min-microvolt = <3300000>;
+             regulator-max-microvolt = <3300000>;
+             regulator-always-on;
+     };
+
+     vcc_2v5_reg: ldo-regulator-2 {
Quoted 5 lines

regulator-ldo-1
(why numbering of LDO regulators starts from 2? keep some sense in this)

There are N regulators on the board, so they are numbered 1 thru N. Regulator 2 is regulator 2 whether it's a buck or LDO.

Quoted 8 lines
Quoted 5 lines

So if this is supposed to match board schematics (which is good idea), then maybe just "regulator-2"? The point is to have same generic name and customize either prefix or suffix, but not both.

Best regards,
Krzysztof

I prefer names to be descriptive, but I suppose I can have the name generic and add a comment into the dts file. However, the comment doesn't make it into the loaded device tree. Would you be okay with "regulator-2-ldo"?

You have the descriptive name in the regulator-name property, but ok, can be in node name as well.

Best regards,
Krzysztof

#7 lore raw

RE: [PATCH v6 2/2] ARM: dts: at91: Adding SAMA5D3-EDS board

Quoted 72 lines
Quoted 72 lines
Quoted 72 lines
Quoted 72 lines
Quoted 72 lines
Quoted 72 lines

The SAMA5D3-EDS board is an Ethernet Development Platform allowing for evaluating many Microchip ethernet switch and PHY products. Various daughter cards can connect up via an RGMII connector or an RMII connector.

The EDS board is not intended for stand-alone use and has no
ethernet capabilities when no daughter board is connected. As
such, this device tree is intended to be used with a DT overlay defining the add-on board. To better ensure consistency, some items are defined here as a
form of documentation so that all add-on overlays will use the same terms.

Google search keywords: "Microchip SAMA5D3-EDS"

---
v5->v6:
- Replaced underscores in names where I can, improving naming.
v4->v5:
- patch now applies to v6.0-rc2
v3->v4:
- Fixed regulators as necessary to get the board to boot from SD Card.
v2->v3:
- Alphabetized pinctrl entries.
- cleaned up a warning in the regulators section.
- License tweaked to 'OR MIT'
- Included Makefile change
v1->v2:
- Modified the compatible field in the device tree to reflect Microchip Ethernet Development System Board.

---
 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/at91-sama5d3_eds.dts | 309
+++++++++++++++++++++++++
 2 files changed, 310 insertions(+)  create mode 100644 

arch/arm/boot/dts/at91-sama5d3_eds.dts

(quoted diff) +0 -0

b/arch/arm/boot/dts/Makefile index 05d8aef6e5d2..e92e639a2dc3 100644

arch/arm/boot/dts/Makefile +1 -0
@@ -61,6 +61,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
      at91-sama5d2_icp.dtb \
      at91-sama5d2_ptc_ek.dtb \
      at91-sama5d2_xplained.dtb \
+     at91-sama5d3_eds.dtb \
      at91-sama5d3_ksz9477_evb.dtb \
      at91-sama5d3_xplained.dtb \
      at91-dvk_som60.dtb \
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +17 -0
new file mode 100644
index 000000000000..b4fe1c5f2997
@@ -0,0 +1,309 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * at91-sama5d3_eds.dts - Device Tree file for the SAMA5D3 Ethernet
+ *    Development System board.
+ *
+ * Copyright (C) 2022 Microchip Technology Inc. and its 
+subsidiaries
+ *
+ * Author: Jerry Ray <[email protected]>  */ /dts-v1/; 
+#include "sama5d36.dtsi"
+
+/ {
+     model = "SAMA5D3 Ethernet Development System";
+     compatible = "microchip,sama5d3-eds", "atmel,sama5d36",
+                  "atmel,sama5d3", "atmel,sama5";
+
+     chosen {
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

arch/arm/boot/dts/at91-sama5d3_eds.dts line 23

Quoted 5 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +5 -0
+             stdout-path = "serial0:115200n8";
+     };
+
+     clocks {
+             slow_xtal {

No underscores in node names. Override by label.

I am not at liberty to change this as both node name and label are defined in the sama5d3.dtsi source file. If there is a way to override the label, please share the syntax as nothing I have tried is working.

Quoted 55 lines
Quoted 55 lines
Quoted 54 lines
Quoted 40 lines
Quoted 40 lines
Quoted 17 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +17 -0
+                     clock-frequency = <32768>;
+             };
+
+             main_xtal {
+                     clock-frequency = <12000000>;
+             };
+     };
+
+     gpio {
+             compatible = "gpio-keys";
+
+             pinctrl-names = "default";
+             pinctrl-0 = <&pinctrl_key_gpio>;
+
+             button-3 {
+                     label = "PB_USER";
+                     gpios = <&pioE 29 GPIO_ACTIVE_LOW>;

arch/arm/boot/dts/at91-sama5d3_eds.dts line 50

Quoted 10 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +10 -0
+                     linux,code = <0x104>;
+                     wakeup-source;
+             };
+     };
+
+     memory@20000000 {
+             reg = <0x20000000 0x10000000>;
+     };
+
+     vcc_3v3_reg: buck-regulator-1 {

Keep consistent prefix or suffix, so:
regulator-buck-1

Quoted 8 lines
arch/arm/boot/dts/at91-sama5d3_eds.dts new file +8 -0
+             compatible = "regulator-fixed";
+             regulator-name = "VCC_3V3";
+             regulator-min-microvolt = <3300000>;
+             regulator-max-microvolt = <3300000>;
+             regulator-always-on;
+     };
+
+     vcc_2v5_reg: ldo-regulator-2 {
Quoted 8 lines
Quoted 5 lines

regulator-ldo-1
(why numbering of LDO regulators starts from 2? keep some sense in this)

There are N regulators on the board, so they are numbered 1 thru N. Regulator 2 is regulator 2 whether it's a buck or LDO.

So if this is supposed to match board schematics (which is good idea), then maybe just "regulator-2"? The point is to have same generic name and customize either prefix or suffix, but not both.

Best regards,
Krzysztof

Quoted 8 lines
Quoted 2 lines

I prefer names to be descriptive, but I suppose I can have the name generic and add a comment into the dts file. However, the comment doesn't make it into the loaded device tree. Would you be okay with "regulator-2-ldo"?

You have the descriptive name in the regulator-name property, but ok, can be in node name as well.

Best regards,
Krzysztof

Regards,
Jerry.

#8 lore raw

Re: [PATCH v6 2/2] ARM: dts: at91: Adding SAMA5D3-EDS board

Quoted 7 lines · On 08/09/2022 17:32, [email protected] wrote:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
(quoted diff) +6 -0
+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
+
+     clocks {
+             slow_xtal {
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

No underscores in node names. Override by label.

I am not at liberty to change this as both node name and label are defined in the sama5d3.dtsi source file. If there is a way to override the label, please share the syntax as nothing I have tried is working.

Override *by* label. Not the label. Just like all things are being customized.

&slow_xtal {
	...
};

Best regards,
Krzysztof

#9 lore raw
In reply to Jerry Ray
Quoted 24 lines · Jerry Ray

Adding the SAMA5D3-EDS board from Microchip into the atmel AT91 board description yaml file.

---
v5->v6:
- No code change - patch prefix naming modified to match with others.
v4->v5:
- No change
v3->v4:
- No change
v2->v3:
- No change
v1->v2:
- Added Device Tree documentation for Microchip SAMA5D3-EDS board

---
 Documentation/devicetree/bindings/arm/atmel-at91.yaml | 7 +++++++
 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/arm/atmel-at91.yaml +0 -0
index 2b7848bb7769..c7f067e13d20 100644

Documentation/devicetree/bindings/arm/atmel-at91.yaml properties: · line 148

Quoted 10 lines
Documentation/devicetree/bindings/arm/atmel-at91.yaml +7 -0
@@ -139,6 +139,13 @@ properties:
           - const: atmel,at91sam9g20
           - const: atmel,at91sam9
 
+      - description: Microchip SAMA5D3 Ethernet Development System Board
+        items:
+          - const: microchip,sama5d3-eds
+          - const: atmel,sama5d36
+          - const: atmel,sama5d3
+          - const: atmel,sama5
+

A bit weird order. I would expect this to be after atmel,sama5d3 boards but before atmel,at91sam9...

Best regards,
Krzysztof

maintainer
#10 lore raw
In reply to Jerry Ray
Quoted 7 lines · Jerry Ray

Adding the SAMA5D3-EDS board from Microchip into the atmel AT91 board description yaml file.

---
v5->v6:
- No code change - patch prefix naming modified to match with others.

You did 'git log --oneline Documentation/devicetree/bindings/arm/' for inspiration?

'ARM: dts' would be an arm32 .dts file which this is not.

Rob

#11 lore raw
Quoted 8 lines
Quoted 7 lines

Adding the SAMA5D3-EDS board from Microchip into the atmel AT91 board description yaml file.

---
v5->v6:
- No code change - patch prefix naming modified to match with others.

Quoted 5 lines

You did 'git log --oneline Documentation/devicetree/bindings/arm/' for inspiration?

'ARM: dts' would be an arm32 .dts file which this is not.

Rob

Yes. I'm trying to get it into the right bucket, but I guess I'm clueless as to how things get broken down. I tried "dts: arm: at91:" but was asked to change it. I can keep guessing, but would prefer if someone could help me understand and get it right.

Regards,
Jerry.

#12 lore raw
Quoted 10 lines · On 08/09/2022 21:38:48+0000, [email protected] wrote:
Quoted 10 lines
Quoted 7 lines

Adding the SAMA5D3-EDS board from Microchip into the atmel AT91 board description yaml file.

---
v5->v6:
- No code change - patch prefix naming modified to match with others.

You did 'git log --oneline Documentation/devicetree/bindings/arm/' for inspiration?

Quoted 7 lines
Quoted 3 lines

'ARM: dts' would be an arm32 .dts file which this is not.

Rob

Yes. I'm trying to get it into the right bucket, but I guess I'm clueless as to how things get broken down. I tried "dts: arm: at91:" but was asked to change it. I can keep guessing, but would prefer if someone could help me understand and get it right.

dt-bindings: arm: at91: is the right prefix

Quoted 3 lines

Regards,
Jerry.

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#13 lore raw
In reply to [email protected]
Quoted 10 lines · On 08/09/2022 23:38, [email protected] wrote:
Quoted 10 lines
Quoted 7 lines

Adding the SAMA5D3-EDS board from Microchip into the atmel AT91 board description yaml file.

---
v5->v6:
- No code change - patch prefix naming modified to match with others.

You did 'git log --oneline Documentation/devicetree/bindings/arm/' for inspiration?

Quoted 7 lines
Quoted 3 lines

'ARM: dts' would be an arm32 .dts file which this is not.

Rob

Yes. I'm trying to get it into the right bucket, but I guess I'm clueless as to how things get broken down. I tried "dts: arm: at91:" but was asked to change it. I can keep guessing, but would prefer if someone could help me understand and get it right.

git log --oneline -- Documentation/devicetree/bindings/arm/

Best regards,
Krzysztof