From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 06 Jul 2023 13:44:49 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qHNPm-0002dn-I1 for lore@lore.pengutronix.de; Thu, 06 Jul 2023 13:44:49 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1qHNPi-0003Rg-VS; Thu, 06 Jul 2023 13:44:46 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHNPa-0003NE-Nd; Thu, 06 Jul 2023 13:44:38 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qHNPa-00CUac-4j; Thu, 06 Jul 2023 13:44:38 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qHNPY-007LaP-Md; Thu, 06 Jul 2023 13:44:36 +0200 From: Oleksij Rempel To: distrokit@pengutronix.de Date: Thu, 6 Jul 2023 13:44:32 +0200 Message-Id: <20230706114434.1751248-3-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230706114434.1751248-1-o.rempel@pengutronix.de> References: <20230706114434.1751248-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH v1 3/5] v7a_noneon: add Microchip SAMA5D3 Ethernet Delopment System Board support X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oleksij Rempel Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 --- .../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 +# +# 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 ") + @$(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 +# +# 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