Skip to contentSkip to conversation

board: solidrun: add Clearfog GT-8K

PATCH New Baruch Siach 3 participants 5 messages Jun 16, 2019 – Jun 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: solidrun: add Clearfog GT-8K

Add support for the SolidRun Armada 8040 based Clearfog GT-8K. This board has the same processor as the Macchiatobin, so we can reuse the Macchiatobin U-Boot and image definitions.

The kernel fragment enables drivers that are necessary to make networking ports work (SFP, Ethernet port, and Ethernet switch).

---
 DEVELOPERS                                    |  2 +
 board/solidrun/clearfog_gt_8k/extlinux.conf   |  4 ++
 board/solidrun/clearfog_gt_8k/genimage.cfg    |  1 +
 .../clearfog_gt_8k/linux-extras.config        |  4 ++
 .../clearfog_gt_8k/post-build-mainline.sh     |  1 +
 board/solidrun/clearfog_gt_8k/readme.txt      | 61 +++++++++++++++++++
 .../clearfog_gt_8k/uboot-fragment.config      |  1 +
 configs/solidrun_clearfog_gt_8k_defconfig     | 46 ++++++++++++++
 8 files changed, 120 insertions(+)
 create mode 100644 board/solidrun/clearfog_gt_8k/extlinux.conf
 create mode 120000 board/solidrun/clearfog_gt_8k/genimage.cfg
 create mode 100644 board/solidrun/clearfog_gt_8k/linux-extras.config
 create mode 120000 board/solidrun/clearfog_gt_8k/post-build-mainline.sh
 create mode 100644 board/solidrun/clearfog_gt_8k/readme.txt
 create mode 120000 board/solidrun/clearfog_gt_8k/uboot-fragment.config
 create mode 100644 configs/solidrun_clearfog_gt_8k_defconfig
DEVELOPERS +2 -0
index 4cc8c9d0877e..9bf2d334e522 100644
@@ -253,6 +253,8 @@ F:	package/pulseview/
 F:	package/sigrok-cli/
 
 N:	Baruch Siach <[email protected]>
+F:	board/solidrun/clearfog_gt_8k/
+F:	configs/solidrun_clearfog_gt_8k_defconfig
 F:	package/18xx-ti-utils/
 F:	package/daemon/
 F:	package/dropbear/
board/solidrun/clearfog_gt_8k/extlinux.conf new file +4 -0
new file mode 100644
index 000000000000..aae0c0d5fb51
@@ -0,0 +1,4 @@
+label Clearfog GT-8K Linux
+  kernel /boot/Image
+  devicetree /boot/armada-8040-clearfog-gt-8k.dtb
+  append console=ttyS0,115200n8 root=/dev/mmcblk1p1 rootwait
board/solidrun/clearfog_gt_8k/genimage.cfg new file +1 -0
new file mode 120000
index 000000000000..0cc2754ff6c5
@@ -0,0 +1 @@
+../macchiatobin/genimage.cfg
\ No newline at end of file
board/solidrun/clearfog_gt_8k/linux-extras.config new file +4 -0
new file mode 100644
index 000000000000..bce2a2e9d20c
@@ -0,0 +1,4 @@
+CONFIG_MARVELL_PHY=y
+CONFIG_SFP=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MV88E6XXX=y
board/solidrun/clearfog_gt_8k/post-build-mainline.sh new file +1 -0
new file mode 120000
index 000000000000..a8c9a52437f2
@@ -0,0 +1 @@
+../macchiatobin/post-build-mainline.sh
\ No newline at end of file
board/solidrun/clearfog_gt_8k/readme.txt new file +61 -0

61 lines not on this page · raw message

board/solidrun/clearfog_gt_8k/uboot-fragment.config new file +1 -0
new file mode 120000
index 000000000000..996c4aa6b6fb
@@ -0,0 +1 @@
+../macchiatobin/uboot-fragment.config
\ No newline at end of file
configs/solidrun_clearfog_gt_8k_defconfig new file +46 -0

46 lines not on this page · raw message

Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 board: solidrun: add Clearfog GT-8K

Hello Baruch,

This mostly looks good, I just have one question (below), and some minor nits that I would have ignored if I didn't had the question.

The commit title should preferably be:

configs/solidrun_clearfog_gt_8k: new defconfig

DEVELOPERS F: package/pulseview/ · line 256

Quoted 9 lines · On Sun, 16 Jun 2019 11:18:47 +0300 Baruch Siach <[email protected]> wrote:
DEVELOPERS +1 -0
index 4cc8c9d0877e..9bf2d334e522 100644
@@ -253,6 +253,8 @@ F:	package/pulseview/
 F:	package/sigrok-cli/
 
 N:	Baruch Siach <[email protected]>
+F:	board/solidrun/clearfog_gt_8k/

I think we more commonly use "-" as a separate in board directory names instead of "_", so there's not a strong convention on this.

board/solidrun/clearfog_gt_8k/linux-extras.config line 4

Quoted 10 lines
board/solidrun/clearfog_gt_8k/linux-extras.config new file +4 -0
new file mode 100644
index 000000000000..bce2a2e9d20c
@@ -0,0 +1,4 @@
+CONFIG_MARVELL_PHY=y
+CONFIG_SFP=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MV88E6XXX=y

So the switch driver is enabled to be built in the kernel image itself...

board/solidrun/clearfog_gt_8k/linux-extras.config

Quoted 7 lines
board/solidrun/clearfog_gt_8k/linux-extras.config new file +7 -0
+Enable the switch (yellow) Ethernet ports
+=========================================
+
+To enable the Clearfog GT-8K internal switch port make sure to load the
+'mv88e6xxx' kernel module, and up the switch up-link port (eth2 by default):
+
+  modprobe mv88e6xxx

... but you tell people to load it as a kernel module ?

This seems weird. Am I missing something ?

Quoted 8 lines
configs/solidrun_clearfog_gt_8k_defconfig new file +2 -0
new file mode 100644
index 000000000000..a44038e66392
@@ -0,0 +1,46 @@
+BR2_aarch64=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y

configs/solidrun_clearfog_gt_8k_defconfig line 12

Quoted 10 lines
configs/solidrun_clearfog_gt_8k_defconfig new file +10 -0
+BR2_TARGET_GENERIC_HOSTNAME="clearfog-gt-8k"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for SolidRun Clearfog GT-8K"
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/MarvellEmbeddedProcessors/atf-marvell.git"
+# This commit corresponds to release armada-18.09.4
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="711ecd32afe465b38052b5ba374c825b158eea18"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin"

So there is no ATF configuration specifically for the GT-8K platform ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 board: solidrun: add Clearfog GT-8K

Hi Thomas,

Quoted 6 lines · Thomas Petazzoni

This mostly looks good, I just have one question (below), and some minor nits that I would have ignored if I didn't had the question.

The commit title should preferably be:

configs/solidrun_clearfog_gt_8k: new defconfig

I'll fix that if I do v2.

Quoted 10 lines
Quoted 7 lines · On Sun, 16 Jun 2019 11:18:47 +0300 Baruch Siach <[email protected]> wrote:
DEVELOPERS +0 -0
index 4cc8c9d0877e..9bf2d334e522 100644
@@ -253,6 +253,8 @@ F:	package/pulseview/
 F:	package/sigrok-cli/
 
Quoted 5 lines

DEVELOPERS F: package/pulseview/ · line 256

Quoted 2 lines
DEVELOPERS +1 -0
 N:	Baruch Siach <[email protected]>
+F:	board/solidrun/clearfog_gt_8k/

I think we more commonly use "-" as a separate in board directory names instead of "_", so there's not a strong convention on this.

I see quite a few board directory names with underscores:

socrates_cyclone5
at91sam9x5ek_mmc
sama5d27_som1_ek_mmc
sama5d2_xplained_mmc
sama5d3_xplained_mmc
sama5d4_xplained_mmc
s6lx9_microboard
icorem6_rqs
t1040_t2080
a10_olinuxino
a13_olinuxino
a20_olinuxino
imx233_olinuxino
x86_64

Quoted 24 lines

board/solidrun/clearfog_gt_8k/linux-extras.config line 4

Quoted 10 lines
board/solidrun/clearfog_gt_8k/linux-extras.config new file +4 -0
new file mode 100644
index 000000000000..bce2a2e9d20c
@@ -0,0 +1,4 @@
+CONFIG_MARVELL_PHY=y
+CONFIG_SFP=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MV88E6XXX=y

So the switch driver is enabled to be built in the kernel image itself...

board/solidrun/clearfog_gt_8k/linux-extras.config

Quoted 7 lines
board/solidrun/clearfog_gt_8k/linux-extras.config new file +7 -0
+Enable the switch (yellow) Ethernet ports
+=========================================
+
+To enable the Clearfog GT-8K internal switch port make sure to load the
+'mv88e6xxx' kernel module, and up the switch up-link port (eth2 by default):
+
+  modprobe mv88e6xxx

... but you tell people to load it as a kernel module ?

Quoted 1 line

This seems weird. Am I missing something ?

The CONFIG_NET_DSA symbol has

  depends on BRIDGE || BRIDGE=n

The arm64 defconfig has

CONFIG_BRIDGE=m

So CONFIG_NET_DSA transforms to 'm' in the final kernel configuration. CONFIG_NET_DSA_MV88E6XXX depends on CONFIG_NET_DSA, so it is set to 'm' as well.

The mv88e6xxx is a mdio_bus device that does not provide a modalias sysfs node under /sys/devices. So the S10mdev script does not load it automatically on boot.

Quoted 12 lines
Quoted 12 lines
configs/solidrun_clearfog_gt_8k_defconfig new file +6 -0
new file mode 100644
index 000000000000..a44038e66392
@@ -0,0 +1,46 @@
+BR2_aarch64=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_1=y
+BR2_TARGET_GENERIC_HOSTNAME="clearfog-gt-8k"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for SolidRun Clearfog GT-8K"
+
+# Firmware
Quoted 8 lines

configs/solidrun_clearfog_gt_8k_defconfig line 12

Quoted 6 lines
configs/solidrun_clearfog_gt_8k_defconfig new file +6 -0
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/MarvellEmbeddedProcessors/atf-marvell.git"
+# This commit corresponds to release armada-18.09.4
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="711ecd32afe465b38052b5ba374c825b158eea18"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin"

So there is no ATF configuration specifically for the GT-8K platform ?

The Macchiatobin and Clearfog GT-8K look identical as far as ATF is concerned.

Thanks for your review,
baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#3 lore raw

PATCH 1/1 board: solidrun: add Clearfog GT-8K

Quoted 8 lines

The CONFIG_NET_DSA symbol has

  depends on BRIDGE || BRIDGE=n

The arm64 defconfig has

CONFIG_BRIDGE=m

Quoted 8 lines

So CONFIG_NET_DSA transforms to 'm' in the final kernel configuration. CONFIG_NET_DSA_MV88E6XXX depends on CONFIG_NET_DSA, so it is set to 'm' as well.

The mv88e6xxx is a mdio_bus device that does not provide a modalias sysfs node
under /sys/devices. So the S10mdev script does not load it automatically on boot.

Hi Baruch,
my involvement with this platform is limited to just the Clearfog Base because that's what we're using internally. I therefore cannot really comment on the patch.

That said, I think that this module vs. built-in is something which can go to the commit message.

With kind regards,
Jan

#4 lore raw

PATCH 1/1 board: solidrun: add Clearfog GT-8K

In reply to Baruch Siach
Quoted 18 lines · On Sun, 16 Jun 2019 11:18:47 +0300 Baruch Siach <[email protected]> wrote:

Add support for the SolidRun Armada 8040 based Clearfog GT-8K. This board has the same processor as the Macchiatobin, so we can reuse the Macchiatobin U-Boot and image definitions.

The kernel fragment enables drivers that are necessary to make networking ports work (SFP, Ethernet port, and Ethernet switch).

---
 DEVELOPERS                                    |  2 +
 board/solidrun/clearfog_gt_8k/extlinux.conf   |  4 ++
 board/solidrun/clearfog_gt_8k/genimage.cfg    |  1 +
 .../clearfog_gt_8k/linux-extras.config        |  4 ++
 .../clearfog_gt_8k/post-build-mainline.sh     |  1 +
 board/solidrun/clearfog_gt_8k/readme.txt      | 61 +++++++++++++++++++
 .../clearfog_gt_8k/uboot-fragment.config      |  1 +
 configs/solidrun_clearfog_gt_8k_defconfig     | 46 ++++++++++++++
Quoted 8 lines
 8 files changed, 120 insertions(+)
 create mode 100644 board/solidrun/clearfog_gt_8k/extlinux.conf
 create mode 120000 board/solidrun/clearfog_gt_8k/genimage.cfg
 create mode 100644 board/solidrun/clearfog_gt_8k/linux-extras.config
 create mode 120000 board/solidrun/clearfog_gt_8k/post-build-mainline.sh
 create mode 100644 board/solidrun/clearfog_gt_8k/readme.txt
 create mode 120000 board/solidrun/clearfog_gt_8k/uboot-fragment.config
 create mode 100644 configs/solidrun_clearfog_gt_8k_defconfig

Thanks Baruch for the feedback on my questions, it answered all of them, so I've applied to master. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com