All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Add support for Airoha EN7523 SoC
@ 2021-09-07 10:27 ` Bert Vermeulen
  0 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  Cc: devicetree, linux-kernel, linux-arm-kernel, John Crispin, Bert Vermeulen

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

-- 
2.25.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 0/5] Add support for Airoha EN7523 SoC
@ 2021-09-07 10:27 ` Bert Vermeulen
  0 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  Cc: devicetree, linux-kernel, linux-arm-kernel, John Crispin, Bert Vermeulen

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

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH v2 1/5] dt-bindings: Add vendor prefix for Airoha
  2021-09-07 10:27 ` Bert Vermeulen
@ 2021-09-07 10:27   ` Bert Vermeulen
  -1 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Oleksij Rempel,
	Joel Stanley, Daniel Palmer, Max Merchel, Hao Fang, devicetree,
	linux-kernel
  Cc: linux-arm-kernel, John Crispin, Bert Vermeulen

From: John Crispin <john@phrozen.org>

Add vendor prefix "airoha" for Airoha.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 07fb0d25fc15..e9c956535f97 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -333,6 +333,8 @@ patternProperties:
     description: EBV Elektronik
   "^eckelmann,.*":
     description: Eckelmann AG
+  "^airoha,.*":
+    description: Airoha
   "^edt,.*":
     description: Emerging Display Technologies
   "^eeti,.*":
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 1/5] dt-bindings: Add vendor prefix for Airoha
@ 2021-09-07 10:27   ` Bert Vermeulen
  0 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Oleksij Rempel,
	Joel Stanley, Daniel Palmer, Max Merchel, Hao Fang, devicetree,
	linux-kernel
  Cc: linux-arm-kernel, John Crispin, Bert Vermeulen

From: John Crispin <john@phrozen.org>

Add vendor prefix "airoha" for Airoha.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 07fb0d25fc15..e9c956535f97 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -333,6 +333,8 @@ patternProperties:
     description: EBV Elektronik
   "^eckelmann,.*":
     description: Eckelmann AG
+  "^airoha,.*":
+    description: Airoha
   "^edt,.*":
     description: Emerging Display Technologies
   "^eeti,.*":
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 2/5] dt-bindings: arm: airoha: Add binding for EN7523 SoC and EVB
  2021-09-07 10:27 ` Bert Vermeulen
@ 2021-09-07 10:27   ` Bert Vermeulen
  -1 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Rob Herring, Bert Vermeulen, John Crispin, Felix Fietkau,
	devicetree, linux-kernel
  Cc: linux-arm-kernel

From: John Crispin <john@phrozen.org>

Add devicetree binding for Airoha EN7523 SoC and evaluation board.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 .../devicetree/bindings/arm/airoha.yaml       | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/airoha.yaml

diff --git a/Documentation/devicetree/bindings/arm/airoha.yaml b/Documentation/devicetree/bindings/arm/airoha.yaml
new file mode 100644
index 000000000000..f2661ba81109
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/airoha.yaml
@@ -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 <nbd@nbd.name>
+  - John Crispin <john@phrozen.org>
+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
+
+...
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 2/5] dt-bindings: arm: airoha: Add binding for EN7523 SoC and EVB
@ 2021-09-07 10:27   ` Bert Vermeulen
  0 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Rob Herring, Bert Vermeulen, John Crispin, Felix Fietkau,
	devicetree, linux-kernel
  Cc: linux-arm-kernel

From: John Crispin <john@phrozen.org>

Add devicetree binding for Airoha EN7523 SoC and evaluation board.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 .../devicetree/bindings/arm/airoha.yaml       | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/airoha.yaml

diff --git a/Documentation/devicetree/bindings/arm/airoha.yaml b/Documentation/devicetree/bindings/arm/airoha.yaml
new file mode 100644
index 000000000000..f2661ba81109
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/airoha.yaml
@@ -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 <nbd@nbd.name>
+  - John Crispin <john@phrozen.org>
+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
+
+...
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 3/5] ARM: dts: Add basic support for Airoha EN7523
@ 2021-09-07 10:27   ` Bert Vermeulen
  0 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, soc, Rob Herring,
	linux-arm-kernel, devicetree, linux-kernel
  Cc: John Crispin, Bert Vermeulen

From: John Crispin <john@phrozen.org>

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.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 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

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 863347b6b65e..3525ace2d2e0 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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 \
diff --git a/arch/arm/boot/dts/en7523-evb.dts b/arch/arm/boot/dts/en7523-evb.dts
new file mode 100644
index 000000000000..fa595b97bdd8
--- /dev/null
+++ b/arch/arm/boot/dts/en7523-evb.dts
@@ -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>;
+	};
+};
diff --git a/arch/arm/boot/dts/en7523.dtsi b/arch/arm/boot/dts/en7523.dtsi
new file mode 100644
index 000000000000..034bd1de2cd6
--- /dev/null
+++ b/arch/arm/boot/dts/en7523.dtsi
@@ -0,0 +1,114 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+	interrupt-parent = <&gic>;
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		npu_binary@84000000 {
+			no-map;
+			reg = <0x84000000 0xA00000>;
+		};
+
+		npu_flag@84B0000 {
+			no-map;
+			reg = <0x84B00000 0x100000>;
+		};
+
+		npu_pkt@85000000 {
+			no-map;
+			reg = <0x85000000 0x1A00000>;
+		};
+
+		npu_phyaddr@86B00000 {
+			no-map;
+			reg = <0x86B00000 0x100000>;
+		};
+
+		npu_rxdesc@86D00000 {
+			no-map;
+			reg = <0x86D00000 0x100000>;
+		};
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu-map {
+			cluster0 {
+				core0 {
+					cpu = <&cpu0>;
+				};
+				core1 {
+					cpu = <&cpu1>;
+				};
+			};
+		};
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0>;
+			enable-method = "psci";
+			clock-frequency = <80000000>;
+			next-level-cache = <&L2_0>;
+		};
+
+		cpu1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x1>;
+			enable-method = "psci";
+			clock-frequency = <80000000>;
+			next-level-cache = <&L2_0>;
+		};
+
+		L2_0: l2-cache0 {
+			compatible = "cache";
+		};
+	};
+
+	gic: interrupt-controller@9000000 {
+		compatible = "arm,gic-v3";
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0x09000000 0x20000>, <0x09080000 0x80000>;
+		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
+	};
+
+	timer {
+		compatible = "arm,armv7-timer";
+		interrupt-parent = <&gic>;
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+		clock-frequency = <25000000>;
+	};
+
+	uart1: serial@1fbf0000 {
+		compatible = "ns8250";
+		reg = <0x1fbf0000 0x30>;
+		reg-io-width = <4>;
+		reg-shift = <2>;
+		interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+		clock-frequency = <1843200>;
+		status = "okay";
+	};
+};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 3/5] ARM: dts: Add basic support for Airoha EN7523
@ 2021-09-07 10:27   ` Bert Vermeulen
  0 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, soc, Rob Herring,
	linux-arm-kernel, devicetree, linux-kernel
  Cc: John Crispin, Bert Vermeulen

From: John Crispin <john@phrozen.org>

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.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 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

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 863347b6b65e..3525ace2d2e0 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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 \
diff --git a/arch/arm/boot/dts/en7523-evb.dts b/arch/arm/boot/dts/en7523-evb.dts
new file mode 100644
index 000000000000..fa595b97bdd8
--- /dev/null
+++ b/arch/arm/boot/dts/en7523-evb.dts
@@ -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>;
+	};
+};
diff --git a/arch/arm/boot/dts/en7523.dtsi b/arch/arm/boot/dts/en7523.dtsi
new file mode 100644
index 000000000000..034bd1de2cd6
--- /dev/null
+++ b/arch/arm/boot/dts/en7523.dtsi
@@ -0,0 +1,114 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+	interrupt-parent = <&gic>;
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		npu_binary@84000000 {
+			no-map;
+			reg = <0x84000000 0xA00000>;
+		};
+
+		npu_flag@84B0000 {
+			no-map;
+			reg = <0x84B00000 0x100000>;
+		};
+
+		npu_pkt@85000000 {
+			no-map;
+			reg = <0x85000000 0x1A00000>;
+		};
+
+		npu_phyaddr@86B00000 {
+			no-map;
+			reg = <0x86B00000 0x100000>;
+		};
+
+		npu_rxdesc@86D00000 {
+			no-map;
+			reg = <0x86D00000 0x100000>;
+		};
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu-map {
+			cluster0 {
+				core0 {
+					cpu = <&cpu0>;
+				};
+				core1 {
+					cpu = <&cpu1>;
+				};
+			};
+		};
+
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0>;
+			enable-method = "psci";
+			clock-frequency = <80000000>;
+			next-level-cache = <&L2_0>;
+		};
+
+		cpu1: cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x1>;
+			enable-method = "psci";
+			clock-frequency = <80000000>;
+			next-level-cache = <&L2_0>;
+		};
+
+		L2_0: l2-cache0 {
+			compatible = "cache";
+		};
+	};
+
+	gic: interrupt-controller@9000000 {
+		compatible = "arm,gic-v3";
+		interrupt-controller;
+		#interrupt-cells = <3>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0x09000000 0x20000>, <0x09080000 0x80000>;
+		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;
+	};
+
+	timer {
+		compatible = "arm,armv7-timer";
+		interrupt-parent = <&gic>;
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
+		clock-frequency = <25000000>;
+	};
+
+	uart1: serial@1fbf0000 {
+		compatible = "ns8250";
+		reg = <0x1fbf0000 0x30>;
+		reg-io-width = <4>;
+		reg-shift = <2>;
+		interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+		clock-frequency = <1843200>;
+		status = "okay";
+	};
+};
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
  2021-09-07 10:27 ` Bert Vermeulen
@ 2021-09-07 10:27   ` Bert Vermeulen
  -1 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Russell King, Arnd Bergmann, Linus Walleij, Andrew Morton,
	Geert Uytterhoeven, Anshuman Khandual, Marc Zyngier,
	Mark Rutland, John Crispin, Ard Biesheuvel, YiFei Zhu,
	Uwe Kleine-König, Mike Rapoport, linux-arm-kernel,
	linux-kernel
  Cc: devicetree, Bert Vermeulen

From: John Crispin <john@phrozen.org>

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.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 arch/arm/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 82f908fa5676..4c210df05c77 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
@ 2021-09-07 10:27   ` Bert Vermeulen
  0 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Russell King, Arnd Bergmann, Linus Walleij, Andrew Morton,
	Geert Uytterhoeven, Anshuman Khandual, Marc Zyngier,
	Mark Rutland, John Crispin, Ard Biesheuvel, YiFei Zhu,
	Uwe Kleine-König, Mike Rapoport, linux-arm-kernel,
	linux-kernel
  Cc: devicetree, Bert Vermeulen

From: John Crispin <john@phrozen.org>

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.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 arch/arm/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 82f908fa5676..4c210df05c77 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
  2021-09-07 10:27 ` Bert Vermeulen
@ 2021-09-07 10:27   ` Bert Vermeulen
  -1 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Russell King, Alexandre Torgue, Krzysztof Kozlowski,
	Arnd Bergmann, Olivier Moysan, Marek Szyprowski,
	Manivannan Sadhasivam, Grygorii Strashko, Florian Fainelli,
	Fabrice Gasnier, Lionel Debieve, Alexandre Belloni,
	Dmitry Osipenko, Stefan Wahren, linux-arm-kernel, linux-kernel
  Cc: devicetree, John Crispin, Bert Vermeulen

From: John Crispin <john@phrozen.org>

This enables basic bootup support for the Airoha EN7523 SoC.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 arch/arm/configs/multi_v7_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index d9abaae118dd..a9370a95dc38 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
@ 2021-09-07 10:27   ` Bert Vermeulen
  0 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:27 UTC (permalink / raw)
  To: Russell King, Alexandre Torgue, Krzysztof Kozlowski,
	Arnd Bergmann, Olivier Moysan, Marek Szyprowski,
	Manivannan Sadhasivam, Grygorii Strashko, Florian Fainelli,
	Fabrice Gasnier, Lionel Debieve, Alexandre Belloni,
	Dmitry Osipenko, Stefan Wahren, linux-arm-kernel, linux-kernel
  Cc: devicetree, John Crispin, Bert Vermeulen

From: John Crispin <john@phrozen.org>

This enables basic bootup support for the Airoha EN7523 SoC.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Bert Vermeulen <bert@biot.com>
---
 arch/arm/configs/multi_v7_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index d9abaae118dd..a9370a95dc38 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -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
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
  2021-09-07 10:27   ` Bert Vermeulen
@ 2021-09-07 10:39     ` Dmitry Osipenko
  -1 siblings, 0 replies; 32+ messages in thread
From: Dmitry Osipenko @ 2021-09-07 10:39 UTC (permalink / raw)
  To: Bert Vermeulen
  Cc: devicetree, John Crispin, Russell King, Alexandre Torgue,
	Krzysztof Kozlowski, Arnd Bergmann, Olivier Moysan,
	Marek Szyprowski, Manivannan Sadhasivam, Grygorii Strashko,
	Florian Fainelli, Fabrice Gasnier, Lionel Debieve,
	Alexandre Belloni, Stefan Wahren, linux-arm-kernel, linux-kernel

07.09.2021 13:27, Bert Vermeulen пишет:
> From: John Crispin <john@phrozen.org>
> 
> This enables basic bootup support for the Airoha EN7523 SoC.
> 
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Bert Vermeulen <bert@biot.com>
> ---
>  arch/arm/configs/multi_v7_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
> index d9abaae118dd..a9370a95dc38 100644
> --- a/arch/arm/configs/multi_v7_defconfig
> +++ b/arch/arm/configs/multi_v7_defconfig
> @@ -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

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.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
@ 2021-09-07 10:39     ` Dmitry Osipenko
  0 siblings, 0 replies; 32+ messages in thread
From: Dmitry Osipenko @ 2021-09-07 10:39 UTC (permalink / raw)
  To: Bert Vermeulen
  Cc: devicetree, John Crispin, Russell King, Alexandre Torgue,
	Krzysztof Kozlowski, Arnd Bergmann, Olivier Moysan,
	Marek Szyprowski, Manivannan Sadhasivam, Grygorii Strashko,
	Florian Fainelli, Fabrice Gasnier, Lionel Debieve,
	Alexandre Belloni, Stefan Wahren, linux-arm-kernel, linux-kernel

07.09.2021 13:27, Bert Vermeulen пишет:
> From: John Crispin <john@phrozen.org>
> 
> This enables basic bootup support for the Airoha EN7523 SoC.
> 
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Bert Vermeulen <bert@biot.com>
> ---
>  arch/arm/configs/multi_v7_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
> index d9abaae118dd..a9370a95dc38 100644
> --- a/arch/arm/configs/multi_v7_defconfig
> +++ b/arch/arm/configs/multi_v7_defconfig
> @@ -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

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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
  2021-09-07 10:39     ` Dmitry Osipenko
@ 2021-09-07 10:41       ` Bert Vermeulen
  -1 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:41 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: devicetree, John Crispin, Russell King, Alexandre Torgue,
	Krzysztof Kozlowski, Arnd Bergmann, Olivier Moysan,
	Marek Szyprowski, Manivannan Sadhasivam, Grygorii Strashko,
	Florian Fainelli, Fabrice Gasnier, Lionel Debieve,
	Alexandre Belloni, Stefan Wahren, linux-arm-kernel, linux-kernel

On 9/7/21 12:39 PM, Dmitry Osipenko wrote:
> 07.09.2021 13:27, Bert Vermeulen пишет:
>> From: John Crispin <john@phrozen.org>
>> 
>> This enables basic bootup support for the Airoha EN7523 SoC.
>> 
>> Signed-off-by: John Crispin <john@phrozen.org>
>> Signed-off-by: Bert Vermeulen <bert@biot.com>
>> ---
>>  arch/arm/configs/multi_v7_defconfig | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
>> index d9abaae118dd..a9370a95dc38 100644
>> --- a/arch/arm/configs/multi_v7_defconfig
>> +++ b/arch/arm/configs/multi_v7_defconfig
>> @@ -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
> 
> 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.

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.


-- 
Bert Vermeulen
bert@biot.com

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
@ 2021-09-07 10:41       ` Bert Vermeulen
  0 siblings, 0 replies; 32+ messages in thread
From: Bert Vermeulen @ 2021-09-07 10:41 UTC (permalink / raw)
  To: Dmitry Osipenko
  Cc: devicetree, John Crispin, Russell King, Alexandre Torgue,
	Krzysztof Kozlowski, Arnd Bergmann, Olivier Moysan,
	Marek Szyprowski, Manivannan Sadhasivam, Grygorii Strashko,
	Florian Fainelli, Fabrice Gasnier, Lionel Debieve,
	Alexandre Belloni, Stefan Wahren, linux-arm-kernel, linux-kernel

On 9/7/21 12:39 PM, Dmitry Osipenko wrote:
> 07.09.2021 13:27, Bert Vermeulen пишет:
>> From: John Crispin <john@phrozen.org>
>> 
>> This enables basic bootup support for the Airoha EN7523 SoC.
>> 
>> Signed-off-by: John Crispin <john@phrozen.org>
>> Signed-off-by: Bert Vermeulen <bert@biot.com>
>> ---
>>  arch/arm/configs/multi_v7_defconfig | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
>> index d9abaae118dd..a9370a95dc38 100644
>> --- a/arch/arm/configs/multi_v7_defconfig
>> +++ b/arch/arm/configs/multi_v7_defconfig
>> @@ -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
> 
> 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.

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.


-- 
Bert Vermeulen
bert@biot.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
  2021-09-07 10:27   ` Bert Vermeulen
@ 2021-09-07 10:48     ` Daniel Palmer
  -1 siblings, 0 replies; 32+ messages in thread
From: Daniel Palmer @ 2021-09-07 10:48 UTC (permalink / raw)
  To: Bert Vermeulen
  Cc: Russell King, Arnd Bergmann, Linus Walleij, Andrew Morton,
	Geert Uytterhoeven, Anshuman Khandual, Marc Zyngier,
	Mark Rutland, John Crispin, Ard Biesheuvel, YiFei Zhu,
	Uwe Kleine-König, Mike Rapoport, linux-arm-kernel,
	Linux Kernel Mailing List, DTML

Hi Bert,

On Tue, 7 Sept 2021 at 19:30, Bert Vermeulen <bert@biot.com> wrote:
>
> From: John Crispin <john@phrozen.org>
>
> 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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
@ 2021-09-07 10:48     ` Daniel Palmer
  0 siblings, 0 replies; 32+ messages in thread
From: Daniel Palmer @ 2021-09-07 10:48 UTC (permalink / raw)
  To: Bert Vermeulen
  Cc: Russell King, Arnd Bergmann, Linus Walleij, Andrew Morton,
	Geert Uytterhoeven, Anshuman Khandual, Marc Zyngier,
	Mark Rutland, John Crispin, Ard Biesheuvel, YiFei Zhu,
	Uwe Kleine-König, Mike Rapoport, linux-arm-kernel,
	Linux Kernel Mailing List, DTML

Hi Bert,

On Tue, 7 Sept 2021 at 19:30, Bert Vermeulen <bert@biot.com> wrote:
>
> From: John Crispin <john@phrozen.org>
>
> 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
  2021-09-07 10:41       ` Bert Vermeulen
@ 2021-09-07 11:03         ` Dmitry Osipenko
  -1 siblings, 0 replies; 32+ messages in thread
From: Dmitry Osipenko @ 2021-09-07 11:03 UTC (permalink / raw)
  To: Bert Vermeulen
  Cc: devicetree, John Crispin, Russell King, Alexandre Torgue,
	Krzysztof Kozlowski, Arnd Bergmann, Olivier Moysan,
	Marek Szyprowski, Manivannan Sadhasivam, Grygorii Strashko,
	Florian Fainelli, Fabrice Gasnier, Lionel Debieve,
	Alexandre Belloni, Stefan Wahren, linux-arm-kernel, linux-kernel

07.09.2021 13:41, Bert Vermeulen пишет:
> On 9/7/21 12:39 PM, Dmitry Osipenko wrote:
>> 07.09.2021 13:27, Bert Vermeulen пишет:
>>> From: John Crispin <john@phrozen.org>
>>>
>>> This enables basic bootup support for the Airoha EN7523 SoC.
>>>
>>> Signed-off-by: John Crispin <john@phrozen.org>
>>> Signed-off-by: Bert Vermeulen <bert@biot.com>
>>> ---
>>>  arch/arm/configs/multi_v7_defconfig | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/arch/arm/configs/multi_v7_defconfig
>>> b/arch/arm/configs/multi_v7_defconfig
>>> index d9abaae118dd..a9370a95dc38 100644
>>> --- a/arch/arm/configs/multi_v7_defconfig
>>> +++ b/arch/arm/configs/multi_v7_defconfig
>>> @@ -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
>>
>> 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.
> 
> 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.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 5/5] ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
@ 2021-09-07 11:03         ` Dmitry Osipenko
  0 siblings, 0 replies; 32+ messages in thread
From: Dmitry Osipenko @ 2021-09-07 11:03 UTC (permalink / raw)
  To: Bert Vermeulen
  Cc: devicetree, John Crispin, Russell King, Alexandre Torgue,
	Krzysztof Kozlowski, Arnd Bergmann, Olivier Moysan,
	Marek Szyprowski, Manivannan Sadhasivam, Grygorii Strashko,
	Florian Fainelli, Fabrice Gasnier, Lionel Debieve,
	Alexandre Belloni, Stefan Wahren, linux-arm-kernel, linux-kernel

07.09.2021 13:41, Bert Vermeulen пишет:
> On 9/7/21 12:39 PM, Dmitry Osipenko wrote:
>> 07.09.2021 13:27, Bert Vermeulen пишет:
>>> From: John Crispin <john@phrozen.org>
>>>
>>> This enables basic bootup support for the Airoha EN7523 SoC.
>>>
>>> Signed-off-by: John Crispin <john@phrozen.org>
>>> Signed-off-by: Bert Vermeulen <bert@biot.com>
>>> ---
>>>  arch/arm/configs/multi_v7_defconfig | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/arch/arm/configs/multi_v7_defconfig
>>> b/arch/arm/configs/multi_v7_defconfig
>>> index d9abaae118dd..a9370a95dc38 100644
>>> --- a/arch/arm/configs/multi_v7_defconfig
>>> +++ b/arch/arm/configs/multi_v7_defconfig
>>> @@ -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
>>
>> 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.
> 
> 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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/5] dt-bindings: Add vendor prefix for Airoha
  2021-09-07 10:27   ` Bert Vermeulen
@ 2021-09-07 11:13     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 32+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-07 11:13 UTC (permalink / raw)
  To: Bert Vermeulen, Rob Herring, Shawn Guo, Oleksij Rempel,
	Joel Stanley, Daniel Palmer, Max Merchel, Hao Fang, devicetree,
	linux-kernel
  Cc: linux-arm-kernel, John Crispin

On 07/09/2021 12:27, Bert Vermeulen wrote:
> From: John Crispin <john@phrozen.org>
> 
> Add vendor prefix "airoha" for Airoha.
> 
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Bert Vermeulen <bert@biot.com>
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 07fb0d25fc15..e9c956535f97 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -333,6 +333,8 @@ patternProperties:
>      description: EBV Elektronik
>    "^eckelmann,.*":
>      description: Eckelmann AG
> +  "^airoha,.*":
> +    description: Airoha

Wrong ordering.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 1/5] dt-bindings: Add vendor prefix for Airoha
@ 2021-09-07 11:13     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 32+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-07 11:13 UTC (permalink / raw)
  To: Bert Vermeulen, Rob Herring, Shawn Guo, Oleksij Rempel,
	Joel Stanley, Daniel Palmer, Max Merchel, Hao Fang, devicetree,
	linux-kernel
  Cc: linux-arm-kernel, John Crispin

On 07/09/2021 12:27, Bert Vermeulen wrote:
> From: John Crispin <john@phrozen.org>
> 
> Add vendor prefix "airoha" for Airoha.
> 
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Bert Vermeulen <bert@biot.com>
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 07fb0d25fc15..e9c956535f97 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -333,6 +333,8 @@ patternProperties:
>      description: EBV Elektronik
>    "^eckelmann,.*":
>      description: Eckelmann AG
> +  "^airoha,.*":
> +    description: Airoha

Wrong ordering.

Best regards,
Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
  2021-09-07 10:48     ` Daniel Palmer
@ 2021-09-07 11:51       ` Arnd Bergmann
  -1 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-09-07 11:51 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: Bert Vermeulen, Russell King, Arnd Bergmann, Linus Walleij,
	Andrew Morton, Geert Uytterhoeven, Anshuman Khandual,
	Marc Zyngier, Mark Rutland, John Crispin, Ard Biesheuvel,
	YiFei Zhu, Uwe Kleine-König, Mike Rapoport,
	linux-arm-kernel, Linux Kernel Mailing List, DTML

On Tue, Sep 7, 2021 at 12:48 PM Daniel Palmer <daniel@0x0f.com> wrote:
> On Tue, 7 Sept 2021 at 19:30, Bert Vermeulen <bert@biot.com> wrote:
> >
> > From: John Crispin <john@phrozen.org>
> >
> > 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. :)

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
@ 2021-09-07 11:51       ` Arnd Bergmann
  0 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-09-07 11:51 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: Bert Vermeulen, Russell King, Arnd Bergmann, Linus Walleij,
	Andrew Morton, Geert Uytterhoeven, Anshuman Khandual,
	Marc Zyngier, Mark Rutland, John Crispin, Ard Biesheuvel,
	YiFei Zhu, Uwe Kleine-König, Mike Rapoport,
	linux-arm-kernel, Linux Kernel Mailing List, DTML

On Tue, Sep 7, 2021 at 12:48 PM Daniel Palmer <daniel@0x0f.com> wrote:
> On Tue, 7 Sept 2021 at 19:30, Bert Vermeulen <bert@biot.com> wrote:
> >
> > From: John Crispin <john@phrozen.org>
> >
> > 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. :)

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
  2021-09-07 11:51       ` Arnd Bergmann
@ 2021-09-07 12:27         ` Daniel Palmer
  -1 siblings, 0 replies; 32+ messages in thread
From: Daniel Palmer @ 2021-09-07 12:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Bert Vermeulen, Russell King, Linus Walleij, Andrew Morton,
	Geert Uytterhoeven, Anshuman Khandual, Marc Zyngier,
	Mark Rutland, John Crispin, Ard Biesheuvel, YiFei Zhu,
	Uwe Kleine-König, Mike Rapoport, linux-arm-kernel,
	Linux Kernel Mailing List, DTML

Hi Arnd,

On Tue, 7 Sept 2021 at 20:52, Arnd Bergmann <arnd@arndb.de> wrote:
> > 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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
@ 2021-09-07 12:27         ` Daniel Palmer
  0 siblings, 0 replies; 32+ messages in thread
From: Daniel Palmer @ 2021-09-07 12:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Bert Vermeulen, Russell King, Linus Walleij, Andrew Morton,
	Geert Uytterhoeven, Anshuman Khandual, Marc Zyngier,
	Mark Rutland, John Crispin, Ard Biesheuvel, YiFei Zhu,
	Uwe Kleine-König, Mike Rapoport, linux-arm-kernel,
	Linux Kernel Mailing List, DTML

Hi Arnd,

On Tue, 7 Sept 2021 at 20:52, Arnd Bergmann <arnd@arndb.de> wrote:
> > 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
  2021-09-07 12:27         ` Daniel Palmer
@ 2021-09-07 14:11           ` Arnd Bergmann
  -1 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-09-07 14:11 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: Arnd Bergmann, Bert Vermeulen, Russell King, Linus Walleij,
	Andrew Morton, Geert Uytterhoeven, Anshuman Khandual,
	Marc Zyngier, Mark Rutland, John Crispin, Ard Biesheuvel,
	YiFei Zhu, Uwe Kleine-König, Mike Rapoport,
	linux-arm-kernel, Linux Kernel Mailing List, DTML

On Tue, Sep 7, 2021 at 2:27 PM Daniel Palmer <daniel@0x0f.com> wrote:
> On Tue, 7 Sept 2021 at 20:52, Arnd Bergmann <arnd@arndb.de> wrote:
> > > 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.

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.

> 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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
@ 2021-09-07 14:11           ` Arnd Bergmann
  0 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-09-07 14:11 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: Arnd Bergmann, Bert Vermeulen, Russell King, Linus Walleij,
	Andrew Morton, Geert Uytterhoeven, Anshuman Khandual,
	Marc Zyngier, Mark Rutland, John Crispin, Ard Biesheuvel,
	YiFei Zhu, Uwe Kleine-König, Mike Rapoport,
	linux-arm-kernel, Linux Kernel Mailing List, DTML

On Tue, Sep 7, 2021 at 2:27 PM Daniel Palmer <daniel@0x0f.com> wrote:
> On Tue, 7 Sept 2021 at 20:52, Arnd Bergmann <arnd@arndb.de> wrote:
> > > 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.

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.

> 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
  2021-09-07 14:11           ` Arnd Bergmann
@ 2021-09-07 14:32             ` Daniel Palmer
  -1 siblings, 0 replies; 32+ messages in thread
From: Daniel Palmer @ 2021-09-07 14:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Bert Vermeulen, Russell King, Linus Walleij, Andrew Morton,
	Geert Uytterhoeven, Anshuman Khandual, Marc Zyngier,
	Mark Rutland, John Crispin, Ard Biesheuvel, YiFei Zhu,
	Uwe Kleine-König, Mike Rapoport, linux-arm-kernel,
	Linux Kernel Mailing List, DTML

Hi Arnd,

On Tue, 7 Sept 2021 at 23:12, Arnd Bergmann <arnd@arndb.de> wrote:

> > 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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
@ 2021-09-07 14:32             ` Daniel Palmer
  0 siblings, 0 replies; 32+ messages in thread
From: Daniel Palmer @ 2021-09-07 14:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Bert Vermeulen, Russell King, Linus Walleij, Andrew Morton,
	Geert Uytterhoeven, Anshuman Khandual, Marc Zyngier,
	Mark Rutland, John Crispin, Ard Biesheuvel, YiFei Zhu,
	Uwe Kleine-König, Mike Rapoport, linux-arm-kernel,
	Linux Kernel Mailing List, DTML

Hi Arnd,

On Tue, 7 Sept 2021 at 23:12, Arnd Bergmann <arnd@arndb.de> wrote:

> > 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
  2021-09-07 14:32             ` Daniel Palmer
@ 2021-09-07 15:22               ` Arnd Bergmann
  -1 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-09-07 15:22 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: Arnd Bergmann, Bert Vermeulen, Russell King, Linus Walleij,
	Andrew Morton, Geert Uytterhoeven, Anshuman Khandual,
	Marc Zyngier, Mark Rutland, John Crispin, Ard Biesheuvel,
	YiFei Zhu, Uwe Kleine-König, Mike Rapoport,
	linux-arm-kernel, Linux Kernel Mailing List, DTML

On Tue, Sep 7, 2021 at 4:32 PM Daniel Palmer <daniel@0x0f.com> wrote:
> On Tue, 7 Sept 2021 at 23:12, Arnd Bergmann <arnd@arndb.de> wrote:
>
> > > 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.

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

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC
@ 2021-09-07 15:22               ` Arnd Bergmann
  0 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-09-07 15:22 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: Arnd Bergmann, Bert Vermeulen, Russell King, Linus Walleij,
	Andrew Morton, Geert Uytterhoeven, Anshuman Khandual,
	Marc Zyngier, Mark Rutland, John Crispin, Ard Biesheuvel,
	YiFei Zhu, Uwe Kleine-König, Mike Rapoport,
	linux-arm-kernel, Linux Kernel Mailing List, DTML

On Tue, Sep 7, 2021 at 4:32 PM Daniel Palmer <daniel@0x0f.com> wrote:
> On Tue, 7 Sept 2021 at 23:12, Arnd Bergmann <arnd@arndb.de> wrote:
>
> > > 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.

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2021-09-07 15:24 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 10:27 [PATCH v2 0/5] Add support for Airoha EN7523 SoC Bert Vermeulen
2021-09-07 10:27 ` Bert Vermeulen
2021-09-07 10:27 ` [PATCH v2 1/5] dt-bindings: Add vendor prefix for Airoha Bert Vermeulen
2021-09-07 10:27   ` Bert Vermeulen
2021-09-07 11:13   ` Krzysztof Kozlowski
2021-09-07 11:13     ` Krzysztof Kozlowski
2021-09-07 10:27 ` [PATCH v2 2/5] dt-bindings: arm: airoha: Add binding for EN7523 SoC and EVB Bert Vermeulen
2021-09-07 10:27   ` Bert Vermeulen
2021-09-07 10:27 ` [PATCH v2 3/5] ARM: dts: Add basic support for Airoha EN7523 Bert Vermeulen
2021-09-07 10:27   ` Bert Vermeulen
2021-09-07 10:27 ` [PATCH v2 4/5] ARM: Add basic support for Airoha EN7523 SoC Bert Vermeulen
2021-09-07 10:27   ` Bert Vermeulen
2021-09-07 10:48   ` Daniel Palmer
2021-09-07 10:48     ` Daniel Palmer
2021-09-07 11:51     ` Arnd Bergmann
2021-09-07 11:51       ` Arnd Bergmann
2021-09-07 12:27       ` Daniel Palmer
2021-09-07 12:27         ` Daniel Palmer
2021-09-07 14:11         ` Arnd Bergmann
2021-09-07 14:11           ` Arnd Bergmann
2021-09-07 14:32           ` Daniel Palmer
2021-09-07 14:32             ` Daniel Palmer
2021-09-07 15:22             ` Arnd Bergmann
2021-09-07 15:22               ` Arnd Bergmann
2021-09-07 10:27 ` [PATCH v2 5/5] ARM: multi_v7_defconfig: Add " Bert Vermeulen
2021-09-07 10:27   ` Bert Vermeulen
2021-09-07 10:39   ` Dmitry Osipenko
2021-09-07 10:39     ` Dmitry Osipenko
2021-09-07 10:41     ` Bert Vermeulen
2021-09-07 10:41       ` Bert Vermeulen
2021-09-07 11:03       ` Dmitry Osipenko
2021-09-07 11:03         ` Dmitry Osipenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.