DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [DistroKit] [PATCH v1 3/5] v7a_noneon: add Microchip SAMA5D3 Ethernet Delopment System Board support
Date: Thu,  6 Jul 2023 13:44:32 +0200	[thread overview]
Message-ID: <20230706114434.1751248-3-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20230706114434.1751248-1-o.rempel@pengutronix.de>

Microchip Technology SAMA5D3 Ethernet Development System (EDS) Board
(DM320114) is an MPU-based platform for evaluating Ethernet Switch and
PHY products. Compatible Ethernet Switch and PHY Evaluation Boards
connect to the SAMA5D3 EDS Board via either an RGMII or RMII connector.
The Microchip Technology SAMA5D3 EDS Board is not intended for
stand-alone use and has no Ethernet capabilities when no daughter board
or an USB Ethernet adapter is connected.

For more information see:
https://www.microchip.com/en-us/development-tool/DM320114

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 .../platform-v7a_noneon/barebox-at91.config   | 25 +++++++++++--
 .../barebox-at91.config.diff                  | 23 ++++--------
 configs/platform-v7a_noneon/platformconfig    |  4 ++-
 .../platforms/blspec-sama5d3-eds.in           |  5 +++
 .../platforms/image-sama5d3-eds.in            | 13 +++++++
 .../loader/entries/sama5d3-eds.conf           |  6 ++++
 .../rules/barebox-at91.make                   |  4 ++-
 .../rules/blspec-sama5d3-eds.make             | 36 +++++++++++++++++++
 .../rules/image-sama5d3-eds.make              | 36 +++++++++++++++++++
 9 files changed, 131 insertions(+), 21 deletions(-)
 create mode 100644 configs/platform-v7a_noneon/platforms/blspec-sama5d3-eds.in
 create mode 100644 configs/platform-v7a_noneon/platforms/image-sama5d3-eds.in
 create mode 100644 configs/platform-v7a_noneon/projectroot/loader/entries/sama5d3-eds.conf
 create mode 100644 configs/platform-v7a_noneon/rules/blspec-sama5d3-eds.make
 create mode 100644 configs/platform-v7a_noneon/rules/image-sama5d3-eds.make

diff --git a/configs/platform-v7a_noneon/barebox-at91.config b/configs/platform-v7a_noneon/barebox-at91.config
index 584bfae..06a2d96 100644
--- a/configs/platform-v7a_noneon/barebox-at91.config
+++ b/configs/platform-v7a_noneon/barebox-at91.config
@@ -63,7 +63,7 @@ CONFIG_AT91_MULTI_BOARDS=y
 # CONFIG_MACH_AT91SAM9263EK is not set
 # CONFIG_MACH_AT91SAM9X5EK is not set
 CONFIG_MACH_MICROCHIP_KSZ9477_EVB=y
-# CONFIG_MACH_MICROCHIP_SAMA5D3_EDS is not set
+CONFIG_MACH_MICROCHIP_SAMA5D3_EDS=y
 # CONFIG_MACH_SAMA5D3_XPLAINED is not set
 # CONFIG_MACH_SAMA5D27_SOM1 is not set
 # CONFIG_MACH_SAMA5D27_GIANTBOARD is not set
@@ -419,6 +419,7 @@ CONFIG_CMD_LED=y
 # CONFIG_CMD_POWEROFF is not set
 CONFIG_CMD_SPI=y
 CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_USB=y
 CONFIG_CMD_USBGADGET=y
 # end of Hardware manipulation
 
@@ -526,6 +527,11 @@ CONFIG_MICREL_PHY=y
 # CONFIG_MDIO_BUS_MUX_GPIO is not set
 # end of phylib
 
+CONFIG_NET_USB=y
+CONFIG_NET_USB_ASIX=y
+CONFIG_USB_NET_AX88179_178A=y
+CONFIG_NET_USB_SMSC95XX=y
+CONFIG_NET_USB_RTL8152=y
 # CONFIG_DSA is not set
 # end of Network drivers
 
@@ -583,7 +589,21 @@ CONFIG_DISK_WRITE=y
 #
 # CONFIG_DISK_INTF_PLATFORM_IDE is not set
 CONFIG_USB=y
-# CONFIG_USB_HOST is not set
+CONFIG_USB_HOST=y
+# CONFIG_USB_DWC2_HOST is not set
+# CONFIG_USB_DWC2_GADGET is not set
+# CONFIG_USB_DWC3 is not set
+CONFIG_USB_EHCI=y
+CONFIG_USB_EHCI_ATMEL=y
+CONFIG_USB_OHCI_AT91=y
+# CONFIG_USB_XHCI is not set
+# CONFIG_USB_ULPI is not set
+# CONFIG_USB_STORAGE is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_ONBOARD_HUB is not set
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DUALSPEED=y
 CONFIG_USB_GADGET_DRIVER_AT91=y
@@ -672,6 +692,7 @@ CONFIG_LED_TRIGGERS=y
 # Input device support
 #
 # CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_KEYBOARD_USB is not set
 # CONFIG_INPUT_SPECIALKEYS is not set
 # end of Input device support
 
diff --git a/configs/platform-v7a_noneon/barebox-at91.config.diff b/configs/platform-v7a_noneon/barebox-at91.config.diff
index a183a3d..b6c257e 100644
--- a/configs/platform-v7a_noneon/barebox-at91.config.diff
+++ b/configs/platform-v7a_noneon/barebox-at91.config.diff
@@ -45,7 +45,6 @@ CONFIG_CMD_AT91_BOOT_TEST=y
 # CONFIG_CMD_STATE is undefined
 # CONFIG_CMD_TFTP is not set
 # CONFIG_CMD_UNCOMPRESS is not set
-# CONFIG_CMD_USB is undefined
 # CONFIG_CMD_WD is undefined
 # CONFIG_CMD_WD_DEFAULT_TIMOUT is undefined
 CONFIG_COMMON_CLK_AT91=y
@@ -89,14 +88,13 @@ CONFIG_HAVE_AT91_UTMI=y
 CONFIG_IMAGE_COMPRESSION_NONE=y
 CONFIG_IMD_TARGET=y
 # CONFIG_KEYBOARD_QT1070 is undefined
-# CONFIG_KEYBOARD_USB is undefined
 # CONFIG_LED_PCA955X is undefined
 # CONFIG_LIBFDT is undefined
 # CONFIG_MACHINE_ID is undefined
 # CONFIG_MACH_AT91SAM9263EK is not set
 # CONFIG_MACH_AT91SAM9X5EK is not set
 CONFIG_MACH_MICROCHIP_KSZ9477_EVB=y
-# CONFIG_MACH_MICROCHIP_SAMA5D3_EDS is not set
+CONFIG_MACH_MICROCHIP_SAMA5D3_EDS=y
 # CONFIG_MACH_RPI2 is undefined
 # CONFIG_MACH_RPI3 is undefined
 # CONFIG_MACH_RPI4 is undefined
@@ -142,10 +140,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_SPI_NOR=y
 # CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
 # CONFIG_MTD_SST25L is not set
-# CONFIG_NET_USB is undefined
-# CONFIG_NET_USB_ASIX is undefined
-# CONFIG_NET_USB_RTL8152 is undefined
-# CONFIG_NET_USB_SMSC95XX is undefined
+CONFIG_NET_USB_RTL8152=y
 CONFIG_OF_BAREBOX_ENV_IN_FS=y
 # CONFIG_OF_OVERLAY is not set
 # CONFIG_OF_OVERLAY_LIVE is undefined
@@ -173,19 +168,13 @@ CONFIG_SPI_MEM=y
 CONFIG_SYSTEM_PARTITIONS=y
 # CONFIG_THUMB2_BAREBOX is undefined
 # CONFIG_TYPEC_TUSB320 is undefined
-# CONFIG_USB_DWC2_GADGET is undefined
-# CONFIG_USB_DWC2_HOST is undefined
-# CONFIG_USB_DWC3 is undefined
-# CONFIG_USB_EHCI is undefined
+CONFIG_USB_EHCI_ATMEL=y
 CONFIG_USB_GADGET_DRIVER_AT91=y
 CONFIG_USB_GADGET_DUALSPEED=y
-# CONFIG_USB_HOST is not set
 # CONFIG_USB_HUB_USB251XB is undefined
-# CONFIG_USB_NET_AX88179_178A is undefined
-# CONFIG_USB_ONBOARD_HUB is undefined
-# CONFIG_USB_STORAGE is undefined
-# CONFIG_USB_ULPI is undefined
-# CONFIG_USB_XHCI is undefined
+CONFIG_USB_NET_AX88179_178A=y
+CONFIG_USB_OHCI_AT91=y
+# CONFIG_USB_STORAGE is not set
 CONFIG_VIRTIO_MENU=y
 # CONFIG_VIRTIO_MMIO is not set
 CONFIG_W1=y
diff --git a/configs/platform-v7a_noneon/platformconfig b/configs/platform-v7a_noneon/platformconfig
index 3ff91ce..32c57b6 100644
--- a/configs/platform-v7a_noneon/platformconfig
+++ b/configs/platform-v7a_noneon/platformconfig
@@ -135,7 +135,7 @@ PTXCONF_KERNEL_IMAGE_Z=y
 PTXCONF_KERNEL_IMAGE="zImage"
 PTXCONF_KERNEL_DTB=y
 PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIGDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
-PTXCONF_KERNEL_DTS="at91-sama5d3_ksz9477_evb.dts vexpress-v2p-ca9.dts"
+PTXCONF_KERNEL_DTS="at91-sama5d3_ksz9477_evb.dts vexpress-v2p-ca9.dts at91-sama5d3_eds.dts"
 # PTXCONF_KERNEL_DTBO is not set
 # PTXCONF_KERNEL_CODE_SIGNING is not set
 # PTXCONF_KERNEL_ZSTD is not set
@@ -201,6 +201,7 @@ PTXCONF_BAREBOX_ARCH_STRING="arm"
 #
 # PTXCONF_BLSPEC_ENTRY is not set
 PTXCONF_BLSPEC_KSZ9477_EVB=y
+PTXCONF_BLSPEC_SAMA5D3_EDS=y
 PTXCONF_BLSPEC_VEXPRESS=y
 # end of bootloader spec entries       
 
@@ -238,6 +239,7 @@ PTXCONF_IMAGE_ROOT_TGZ=y
 PTXCONF_IMAGE_ROOT_TGZ_LABEL=""
 # PTXCONF_IMAGE_ROOT_UBI is not set
 # PTXCONF_IMAGE_ROOT_UBIFS is not set
+PTXCONF_IMAGE_SAMA5D3_EDS=y
 # PTXCONF_IMAGE_VEXPRESS_NOR is not set
 PTXCONF_IMAGE_VEXPRESS=y
 
diff --git a/configs/platform-v7a_noneon/platforms/blspec-sama5d3-eds.in b/configs/platform-v7a_noneon/platforms/blspec-sama5d3-eds.in
new file mode 100644
index 0000000..54ecbf7
--- /dev/null
+++ b/configs/platform-v7a_noneon/platforms/blspec-sama5d3-eds.in
@@ -0,0 +1,5 @@
+## SECTION=blspec
+
+config BLSPEC_SAMA5D3_EDS
+	tristate
+	prompt "/loader/entries/sama5d3-eds.conf bootloader spec entry"
diff --git a/configs/platform-v7a_noneon/platforms/image-sama5d3-eds.in b/configs/platform-v7a_noneon/platforms/image-sama5d3-eds.in
new file mode 100644
index 0000000..3d3d899
--- /dev/null
+++ b/configs/platform-v7a_noneon/platforms/image-sama5d3-eds.in
@@ -0,0 +1,13 @@
+## SECTION=image
+
+config IMAGE_SAMA5D3_EDS
+	tristate
+	select HOST_GENIMAGE
+	select IMAGE_ROOT_EXT
+	select HOST_DOSFSTOOLS
+	select BAREBOX_AT91
+	select HOST_MTOOLS
+	prompt "Generate images/image-sama5d3-eds.hdimg"
+	help
+	  Includes DistroKit support for the Microchip SAMA5D3 Ethernet
+	  Development System (EDS).
diff --git a/configs/platform-v7a_noneon/projectroot/loader/entries/sama5d3-eds.conf b/configs/platform-v7a_noneon/projectroot/loader/entries/sama5d3-eds.conf
new file mode 100644
index 0000000..0668523
--- /dev/null
+++ b/configs/platform-v7a_noneon/projectroot/loader/entries/sama5d3-eds.conf
@@ -0,0 +1,6 @@
+title		PTXdist - Pengutronix-DistroKit
+version		5.8
+options		rootwait rw
+linux-appendroot true
+linux		/boot/zImage
+devicetree	/boot/at91-sama5d3_eds.dtb
diff --git a/configs/platform-v7a_noneon/rules/barebox-at91.make b/configs/platform-v7a_noneon/rules/barebox-at91.make
index a479f1e..d9576aa 100644
--- a/configs/platform-v7a_noneon/rules/barebox-at91.make
+++ b/configs/platform-v7a_noneon/rules/barebox-at91.make
@@ -48,7 +48,9 @@ BAREBOX_AT91_MAKE_OPT := $(BAREBOX_AT91_CONF_OPT)
 
 BAREBOX_AT91_IMAGES := \
         images/barebox-microchip-ksz9477-evb.img \
-        images/barebox-microchip-ksz9477-evb-xload-mmc.img
+        images/barebox-microchip-ksz9477-evb-xload-mmc.img \
+        images/barebox-microchip-sama5d3-eds.img \
+        images/barebox-microchip-sama5d3-eds-xload-mmc.img
 
 BAREBOX_AT91_IMAGES := $(addprefix $(BAREBOX_AT91_BUILD_DIR)/,$(BAREBOX_AT91_IMAGES))
 
diff --git a/configs/platform-v7a_noneon/rules/blspec-sama5d3-eds.make b/configs/platform-v7a_noneon/rules/blspec-sama5d3-eds.make
new file mode 100644
index 0000000..a4a02f0
--- /dev/null
+++ b/configs/platform-v7a_noneon/rules/blspec-sama5d3-eds.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Holger Assmann <h.assmann@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BLSPEC_SAMA5D3_EDS) += blspec-sama5d3-eds
+
+BLSPEC_SAMA5D3_EDS_VERSION	:= 5.8
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-sama5d3-eds.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, blspec-sama5d3-eds)
+	@$(call install_fixup,blspec-sama5d3-eds,PRIORITY,optional)
+	@$(call install_fixup,blspec-sama5d3-eds,SECTION,base)
+	@$(call install_fixup,blspec-sama5d3-eds,AUTHOR,"Holger Assmann <h.assmann@pengutronix.de>")
+	@$(call install_fixup,blspec-sama5d3-eds,DESCRIPTION,missing)
+
+	@$(call install_alternative, blspec-sama5d3-eds, 0, 0, 0644, \
+		/loader/entries/sama5d3-eds.conf)
+
+	@$(call install_finish,blspec-sama5d3-eds)
+
+	@$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a_noneon/rules/image-sama5d3-eds.make b/configs/platform-v7a_noneon/rules/image-sama5d3-eds.make
new file mode 100644
index 0000000..9879bf1
--- /dev/null
+++ b/configs/platform-v7a_noneon/rules/image-sama5d3-eds.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Holger Assmann <h.assmann@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_SAMA5D3_EDS) += image-sama5d3-eds
+
+#
+# Paths and names
+#
+IMAGE_SAMA5D3_EDS		:= image-sama5d3-eds
+IMAGE_SAMA5D3_EDS_DIR		:= $(BUILDDIR)/$(IMAGE_SAMA5D3_EDS)
+IMAGE_SAMA5D3_EDS_IMAGE		:= $(IMAGEDIR)/image-sama5d3-eds.hdimg
+IMAGE_SAMA5D3_EDS_FILES		:= $(IMAGEDIR)/root.tgz
+IMAGE_SAMA5D3_EDS_CONFIG	:= at91-sd.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+IMAGE_SAMA5D3_EDS_ENV := \
+        FSBL=barebox-microchip-sama5d3-eds-xload-mmc.img \
+        SSBL=barebox-microchip-sama5d3-eds.img
+
+$(IMAGE_SAMA5D3_EDS_IMAGE):
+	@$(call targetinfo)
+	@$(call image/genimage, IMAGE_SAMA5D3_EDS)
+	@$(call finish)
+
+# vim: syntax=make
-- 
2.39.2




  parent reply	other threads:[~2023-07-06 11:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 11:44 [DistroKit] [PATCH v1 1/5] v7a_noneon: barebox: version bump v2023.01.0 → v2023.07.1 Oleksij Rempel
2023-07-06 11:44 ` [DistroKit] [PATCH v1 2/5] v7a_noneon: use upstreamed devicetree the KSZ9477 EVB Oleksij Rempel
2023-07-06 12:22   ` Ahmad Fatoum
2023-07-06 11:44 ` Oleksij Rempel [this message]
2023-07-06 12:50   ` [DistroKit] [PATCH v1 3/5] v7a_noneon: add Microchip SAMA5D3 Ethernet Delopment System Board support Ahmad Fatoum
2023-07-07 10:26     ` Oleksij Rempel
2023-07-06 11:44 ` [DistroKit] [PATCH v1 4/5] v7a_noneon: kernel: make KSZ9477 work again Oleksij Rempel
2023-07-06 12:51   ` Ahmad Fatoum
2023-07-07 10:25     ` Oleksij Rempel
2023-07-06 11:44 ` [DistroKit] [PATCH v1 5/5] v7a_noneon: kernel: enable Microchip LAN9370 T1 PHY support Oleksij Rempel
2023-07-06 12:52   ` Ahmad Fatoum
2023-07-06 12:20 ` [DistroKit] [PATCH v1 1/5] v7a_noneon: barebox: version bump v2023.01.0 → v2023.07.1 Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230706114434.1751248-3-o.rempel@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox