Add support for Airoha EN7523 SoC
v2 cover Add support for Airoha EN7523 SoC
This patchset adds support for the Airoha EN7523 SoC, intended primarily for xPON/xDSL routers.
v2:
- The company changed name from EcoNet to Airoha.
- Removed Makefile text offset in lieu of /memreserve/ DTS node (see
https://lists.infradead.org/pipermail/linux-arm-kernel/2021-September/681898.html)
- DTS: Moved /memory node, fixed CPU compatible, removed GIC_CPU_MASK_SIMPLE from timer interrupts node, changed timer compatible, and minor fixes.
John Crispin (5):
dt-bindings: Add vendor prefix for Airoha
dt-bindings: arm: airoha: Add binding for EN7523 SoC and EVB
ARM: dts: Add basic support for Airoha EN7523
ARM: Add basic support for Airoha EN7523 SoC
ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
.../devicetree/bindings/arm/airoha.yaml | 27 +++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + arch/arm/Kconfig | 14 +++ arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/en7523-evb.dts | 26 ++++ arch/arm/boot/dts/en7523.dtsi | 114 ++++++++++++++++++ arch/arm/configs/multi_v7_defconfig | 2 + 7 files changed, 187 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/airoha.yaml create mode 100644 arch/arm/boot/dts/en7523-evb.dts create mode 100644 arch/arm/boot/dts/en7523.dtsi
Signature · 1 line
2.25.1
PATCH v2 1/5 dt-bindings: Add vendor prefix for Airoha
From: John Crispin <[email protected]>
Add vendor prefix "airoha" for Airoha.
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -333,6 +333,8 @@ patternProperties: description: EBV Elektronik "^eckelmann,.*": description: Eckelmann AG + "^airoha,.*": + description: Airoha "^edt,.*": description: Emerging Display Technologies "^eeti,.*":
Signature · 1 line
2.25.1
Re: [PATCH v2 1/5] dt-bindings: Add vendor prefix for Airoha
Quoted 15 lines · Bert Vermeulen
From: John Crispin <[email protected]>
Add vendor prefix "airoha" for Airoha.
Signed-off-by John Crispin <[email protected]>Signed-off-by Bert Vermeulen <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/vendor-prefixes.yaml +0
-0
Documentation/devicetree/bindings/vendor-prefixes.yaml patternProperties: · line 337
Quoted 5 lines
Documentation/devicetree/bindings/vendor-prefixes.yaml +2
-0@@ -333,6 +333,8 @@ patternProperties: description: EBV Elektronik "^eckelmann,.*": description: Eckelmann AG + "^airoha,.*": + description: Airoha
Wrong ordering.
Best regards,
Krzysztof
PATCH v2 2/5 dt-bindings: arm: airoha: Add binding for EN7523 SoC and EVB
In reply to Bert VermeulenFrom: John Crispin <[email protected]>
Add devicetree binding for Airoha EN7523 SoC and evaluation board.
--- .../devicetree/bindings/arm/airoha.yaml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/airoha.yaml
Documentation/devicetree/bindings/arm/airoha.yaml new file +27 -0
@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/airoha.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Airoha SoC based Platforms Device Tree Bindings + +maintainers: + - Felix Fietkau <[email protected]> + - John Crispin <[email protected]> +description: | + Boards with an Airoha SoC shall have the following properties. + +properties: + $nodename: + const: '/' + compatible: + oneOf: + - items: + - enum: + - airoha,en7523-evb + - const: airoha,en7523 + +additionalProperties: true + +...
Signature · 1 line
2.25.1
PATCH v2 3/5 ARM: dts: Add basic support for Airoha EN7523
In reply to Bert VermeulenFrom: John Crispin <[email protected]>
Add basic support for Airoha EN7523, enough for booting to console.
The UART is basically 8250-compatible, except for the clock selection. A clock-frequency value is synthesized to get this to run at 115200 bps.
--- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/en7523-evb.dts | 26 +++++++ arch/arm/boot/dts/en7523.dtsi | 114 +++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 arch/arm/boot/dts/en7523-evb.dts create mode 100644 arch/arm/boot/dts/en7523.dtsi
arch/arm/boot/dts/Makefile +2 -0
@@ -174,6 +174,8 @@ dtb-$(CONFIG_ARCH_DAVINCI) += \ da850-lego-ev3.dtb dtb-$(CONFIG_ARCH_DIGICOLOR) += \ cx92755_equinox.dtb +dtb-$(CONFIG_ARCH_AIROHA) += \ + en7523-evb.dtb dtb-$(CONFIG_ARCH_EXYNOS3) += \ exynos3250-artik5-eval.dtb \ exynos3250-monk.dtb \
arch/arm/boot/dts/en7523-evb.dts new file +26 -0
@@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +/* Bootloader installs ATF here */ +/memreserve/ 0x80000000 0x80000; + +#include "en7523.dtsi" + +/ { + model = "Airoha EN7523 Evaluation Board"; + compatible = "airoha,en7523-evb", "airoha,en7523"; + + aliases { + serial0 = &uart1; + }; + + chosen { + bootargs = "earlycon=uart8250,mmio32,0x1fbf0000 console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x20000000>; + }; +};
arch/arm/boot/dts/en7523.dtsi new file +114 -0
114 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v2 4/5 ARM: Add basic support for Airoha EN7523 SoC
In reply to Bert VermeulenFrom: John Crispin <[email protected]>
EN7523 is an armv7 based silicon used inside broadband access type devices such as xPON and xDSL. It shares various silicon blocks with MediaTek silicon such as the MT7622.
--- arch/arm/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/Kconfig +14 -0
@@ -580,6 +580,20 @@ config ARCH_VIRT select HAVE_ARM_ARCH_TIMER select ARCH_SUPPORTS_BIG_ENDIAN +config ARCH_AIROHA + bool "Airoha SoC Support" + depends on ARCH_MULTI_V7 + select ARM_AMBA + select ARM_GIC + select ARM_GIC_V3 + select ARM_DMA_USE_IOMMU + select ARM_PSCI + select HAVE_ARM_ARCH_TIMER + select IOMMU_DMA + select COMMON_CLK + help + Support for Airoha EN7523 SoCs + # # This is sorted alphabetically by mach-* pathname. However, plat-* # Kconfigs may be included either alphabetically (according to the
Signature · 1 line
2.25.1
Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
Hi Bert,
Quoted 6 lines · Bert Vermeulen
From: John Crispin <[email protected]>
EN7523 is an armv7 based silicon used inside broadband access type devices such as xPON and xDSL. It shares various silicon blocks with MediaTek silicon such as the MT7622.
This is a Cortex A53 isn't it? So it's ARMv8. I thought the issue is that it's actually a 64bit system but you only have a 32bit bootloader, firmware etc?
Off-topic but related: Another MediaTek spin off, SigmaStar, seems to have done exactly the same thing. Cortex A53 chip running as a 32bit system to avoid having to fix their software. I'm interested to see if this makes it into arm or arm64. :)
Cheers,
Daniel
Arnd Bergmann
maintainerRe: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
Quoted 8 lines · Daniel Palmer
Quoted 6 lines · Bert Vermeulen
From: John Crispin <[email protected]>
EN7523 is an armv7 based silicon used inside broadband access type devices such as xPON and xDSL. It shares various silicon blocks with MediaTek silicon such as the MT7622.
Quoted 8 lines
This is a Cortex A53 isn't it? So it's ARMv8. I thought the issue is that it's actually a 64bit system but you only have a 32bit bootloader, firmware etc?
Off-topic but related: Another MediaTek spin off, SigmaStar, seems to have done exactly the same thing. Cortex A53 chip running as a 32bit system to avoid having to fix their software. I'm interested to see if this makes it into arm or arm64. :)
Maybe it's best to just add them to both at the same time? The boot loader situation might take a bit to work out, but in theory this should be fixable.
You can generally include .dtsi files from one in the other, as you can see from e.g. arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts.
For new files, I think I would prefer having the .dts files in arm64 and including them from arch/arm/ rather than the other way round, but others may come up with a good reason to keep doing the reverse. This would help encourage the thought that running a 64-bit kernel is the better setup, rather than propagate the 32-bit kernel nonsense on 64-bit machines.
Arnd
Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
Hi Arnd,
Quoted 8 lines · Arnd Bergmann
Quoted 4 lines
Off-topic but related: Another MediaTek spin off, SigmaStar, seems to have done exactly the same thing. Cortex A53 chip running as a 32bit system to avoid having to fix their software. I'm interested to see if this makes it into arm or arm64. :)
Maybe it's best to just add them to both at the same time? The boot loader situation might take a bit to work out, but in theory this should be fixable.
I wonder how fixable it would be..
I haven't gotten a board with the chip in question (SSD268G) yet but from looking at some firmware binaries I can see that even u-boot is a 6 year old 32bit version.
As far as I can tell there's no PSCI, ATF etc that I think would be expected for an arm64 machine.
I think the broken memory controller is still there so somehow I'd need to get the heavy barrier to work in arm64. I haven't yet worked out if that's even possible.
I think they are advertising that it supports up to 2GB of DDR. So it's a hobbled 64bit capable system with highmem.
Putting most of the DT bits under arm64 even though it's so broken it'll only ever boot a 32bit kernel makes sense to me. Better than having lots of arm64 typical stuff like a newer GIC in a file under arm and confusing everyone that comes across it.
Cheers,
Daniel
Arnd Bergmann
maintainerRe: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
Quoted 10 lines · Daniel Palmer
Quoted 8 lines · Arnd Bergmann
Quoted 4 lines
Off-topic but related: Another MediaTek spin off, SigmaStar, seems to have done exactly the same thing. Cortex A53 chip running as a 32bit system to avoid having to fix their software. I'm interested to see if this makes it into arm or arm64. :)
Maybe it's best to just add them to both at the same time? The boot loader situation might take a bit to work out, but in theory this should be fixable.
Quoted 7 lines
I wonder how fixable it would be..
I haven't gotten a board with the chip in question (SSD268G) yet but from looking at some firmware binaries I can see that even u-boot is a 6 year old 32bit version.
As far as I can tell there's no PSCI, ATF etc that I think would be expected for an arm64 machine.
If the source code is available, creating a minimal PSCI implementation in u-boot should be possible, and it would make it work well for both 32-bit and 64-bit kernels. There is no need for ATF here.
Quoted 3 lines
I think the broken memory controller is still there so somehow I'd need to get the heavy barrier to work in arm64. I haven't yet worked out if that's even possible.
I think I missed that part of the discussion, or I forgot about it already. What is the issue you are referring to here?
Arnd
Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
Hi Arnd,
Quoted 5 lines · Arnd Bergmann
Quoted 3 lines
I think the broken memory controller is still there so somehow I'd need to get the heavy barrier to work in arm64. I haven't yet worked out if that's even possible.
I think I missed that part of the discussion, or I forgot about it already. What is the issue you are referring to here?
Sorry. I should have put a bit more context. This is for the SSD268G not the original target of this series. But a similar situation. The SSD268G (according to the decompiled device tree) is the same hardware as the MSTAR_V7 chips but with a Cortex A53 instead of the Cortex A7.
So it probably has the same memory controller as the MSTAR_V7 stuff and that memory controller is not coherent so it needs the kernel to make sure memory requests are flushed out to memory before DMA happens[0]. For arm I fixed that with the heavy mb callback. With arm64 I have no idea how to fix that.
I'm interested to see how this Airoha EN7523 series goes as if/when I push anything for the SSD268G it'll probably only be for a 32bit kernel.
0 - https://elixir.bootlin.com/linux/latest/source/arch/arm/mach-mstar/mstarv7.c#L61
Arnd Bergmann
maintainerRe: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
Quoted 8 lines · Daniel Palmer
Quoted 5 lines · Arnd Bergmann
Quoted 3 lines
I think the broken memory controller is still there so somehow I'd need to get the heavy barrier to work in arm64. I haven't yet worked out if that's even possible.
I think I missed that part of the discussion, or I forgot about it already. What is the issue you are referring to here?
Quoted 10 lines
Sorry. I should have put a bit more context. This is for the SSD268G not the original target of this series. But a similar situation. The SSD268G (according to the decompiled device tree) is the same hardware as the
MSTAR_V7chips but with a Cortex A53 instead of the Cortex A7.
So it probably has the same memory controller as theMSTAR_V7stuff and that memory controller is not coherent so it needs the kernel to make sure memory requests are flushed out to memory before DMA happens[0]. For arm I fixed that with the heavy mb callback. With arm64 I have no idea how to fix that.
Ok, got it. I do remember the Mstar SoCs having this problem. My feeling is that this should be possible to implement on arm64 as well using an erratum fixup with a configuration option, and possibly dynamic patching to avoid the worst effects when the workaround is built into the kernel but not needed.
Whether this is acceptable or not is up to the arm64 architecture maintainers of course.
Arnd
PATCH v2 5/5 ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
In reply to Bert VermeulenFrom: John Crispin <[email protected]>
This enables basic bootup support for the Airoha EN7523 SoC.
--- arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/configs/multi_v7_defconfig +2 -0
@@ -31,6 +31,7 @@ CONFIG_MACH_BERLIN_BG2=y CONFIG_MACH_BERLIN_BG2CD=y CONFIG_MACH_BERLIN_BG2Q=y CONFIG_ARCH_DIGICOLOR=y +CONFIG_ARCH_AIROHA=y CONFIG_ARCH_EXYNOS=y CONFIG_ARCH_HIGHBANK=y CONFIG_ARCH_HISI=y
@@ -983,6 +984,7 @@ CONFIG_STAGING_BOARD=y CONFIG_MFD_CROS_EC_DEV=m CONFIG_CROS_EC_I2C=m CONFIG_CROS_EC_SPI=m +CONFIG_COMMON_CLK_EN7523=y CONFIG_COMMON_CLK_MAX77686=y CONFIG_COMMON_CLK_RK808=m CONFIG_COMMON_CLK_SCMI=y
Signature · 1 line
2.25.1
Re: [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
07.09.2021 13:27, Bert Vermeulen пишет:
Quoted 23 lines
From: John Crispin <[email protected]>
This enables basic bootup support for the Airoha EN7523 SoC.
Signed-off-by John Crispin <[email protected]>Signed-off-by Bert Vermeulen <[email protected]>--- arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+)arch/arm/configs/multi_v7_defconfig +1
-0@@ -31,6 +31,7 @@ CONFIG_MACH_BERLIN_BG2=y CONFIG_MACH_BERLIN_BG2CD=y CONFIG_MACH_BERLIN_BG2Q=y CONFIG_ARCH_DIGICOLOR=y +CONFIG_ARCH_AIROHA=y CONFIG_ARCH_EXYNOS=y CONFIG_ARCH_HIGHBANK=y CONFIG_ARCH_HISI=y
arch/arm/configs/multi_v7_defconfig CONFIG_STAGING_BOARD=y · line 987
Quoted 4 lines
arch/arm/configs/multi_v7_defconfig +1
-0@@ -983,6 +984,7 @@ CONFIG_STAGING_BOARD=y CONFIG_MFD_CROS_EC_DEV=m CONFIG_CROS_EC_I2C=m CONFIG_CROS_EC_SPI=m +CONFIG_COMMON_CLK_EN7523=y
If SoC doesn't work without clk support, then this option should be auto-selected by the arch option.
It also doesn't look like upstream kernel has COMMON_CLK_EN7523 at all.
Re: [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
Quoted 32 lines · Dmitry Osipenko
07.09.2021 13:27, Bert Vermeulen пишет:
Quoted 23 lines
From: John Crispin <[email protected]>
This enables basic bootup support for the Airoha EN7523 SoC.
Signed-off-by John Crispin <[email protected]>Signed-off-by Bert Vermeulen <[email protected]>--- arch/arm/configs/multi_v7_defconfig | 2 ++ 1 file changed, 2 insertions(+)arch/arm/configs/multi_v7_defconfig +1
-0@@ -31,6 +31,7 @@ CONFIG_MACH_BERLIN_BG2=y CONFIG_MACH_BERLIN_BG2CD=y CONFIG_MACH_BERLIN_BG2Q=y CONFIG_ARCH_DIGICOLOR=y +CONFIG_ARCH_AIROHA=y CONFIG_ARCH_EXYNOS=y CONFIG_ARCH_HIGHBANK=y CONFIG_ARCH_HISI=yarch/arm/configs/multi_v7_defconfig CONFIG_STAGING_BOARD=y · line 987
Quoted 4 lines
arch/arm/configs/multi_v7_defconfig +1
-0@@ -983,6 +984,7 @@ CONFIG_STAGING_BOARD=y CONFIG_MFD_CROS_EC_DEV=m CONFIG_CROS_EC_I2C=m CONFIG_CROS_EC_SPI=m +CONFIG_COMMON_CLK_EN7523=yIf SoC doesn't work without clk support, then this option should be auto-selected by the arch option.
Quoted 1 line
It also doesn't look like upstream kernel has
COMMON_CLK_EN7523at all.
Oops, you're right -- the clock driver is coming as soon as the base system is in. I guess this option (under ARCH_AIROHA) should come in at that time as well? I'll respin after some more comments.
Signature · 2 lines
Bert Vermeulen [email protected]
Re: [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
07.09.2021 13:41, Bert Vermeulen пишет:
Quoted 34 lines · Dmitry Osipenko
Quoted 33 lines
07.09.2021 13:27, Bert Vermeulen пишет:
Quoted 24 lines
From: John Crispin <[email protected]>
This enables basic bootup support for the Airoha EN7523 SoC.
Signed-off-by John Crispin <[email protected]>Signed-off-by Bert Vermeulen <[email protected]>---
arch/arm/configs/multi_v7_defconfig | 2 ++1 file changed, 2 insertions(+)arch/arm/configs/multi_v7_defconfig +0
-0@@ -31,6 +31,7 @@ CONFIG_MACH_BERLIN_BG2=yCONFIG_MACH_BERLIN_BG2CD=y
CONFIG_MACH_BERLIN_BG2Q=y
CONFIG_ARCH_DIGICOLOR=y
+CONFIG_ARCH_AIROHA=y
CONFIG_ARCH_EXYNOS=y
CONFIG_ARCH_HIGHBANK=y
CONFIG_ARCH_HISI=yarch/arm/configs/multi_v7_defconfig +0
-0@@ -983,6 +984,7 @@ CONFIG_STAGING_BOARD=yQuoted 4 lines
CONFIG_MFD_CROS_EC_DEV=m
CONFIG_CROS_EC_I2C=m
CONFIG_CROS_EC_SPI=m
+CONFIG_COMMON_CLK_EN7523=yIf SoC doesn't work without clk support, then this option should be auto-selected by the arch option.
Quoted 5 lines
Quoted 1 line
It also doesn't look like upstream kernel has
COMMON_CLK_EN7523at all.Oops, you're right -- the clock driver is coming as soon as the base system is in. I guess this option (under
ARCH_AIROHA) should come in at that time as well? I'll respin after some more comments.
Probably. You may also make clk driver to use ARCH_AIROHA option directly if driver is supposed to be used only by that single arch, like some other platform do that.