Skip to contentSkip to conversation

Introduce Airoha AN7583 SoC and AN7583 Evaluation Board

PATCH Superseded Lorenzo Bianconi 2 participants 5 messages May 9 – May 13

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Introduce Airoha AN7583 SoC and AN7583 Evaluation Board

Introduce the Airoha AN7583 SoC's dtsi and the Airoha AN7583 Evaluation Board's dts file.

---
Lorenzo Bianconi (2):
dt-bindings: arm64: dts: airoha: Add an7583 entry
arm64: dts: Add Airoha AN7583 SoC and AN7583 Evaluation Board

 Documentation/devicetree/bindings/arm/airoha.yaml |   4 +
 arch/arm64/boot/dts/airoha/Makefile               |   2 +-
 arch/arm64/boot/dts/airoha/an7583-evb.dts         |  23 ++++
 arch/arm64/boot/dts/airoha/an7583.dtsi            | 137 ++++++++++++++++++++++
 4 files changed, 165 insertions(+), 1 deletion(-)

---
base-commit: e6490a169f6d5f5bdea7a2e8a673890d43afadc0
change-id: 20260509-airoha-7583-145246084016

Best regards,

Signature · 1 line
Lorenzo Bianconi <[email protected]>
#1 lore raw

PATCH 1/2 dt-bindings: arm64: dts: airoha: Add an7583 entry

Introduce Airoha AN7583 entry in Airoha dts binding.

---
 Documentation/devicetree/bindings/arm/airoha.yaml | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/airoha.yaml +4 -0
index 7c38c08dbf3f..6506c64af4f3 100644
@@ -26,6 +26,10 @@ properties:
           - enum:
               - airoha,en7581-evb
           - const: airoha,en7581
+      - items:
+          - enum:
+              - airoha,an7583-evb
+          - const: airoha,an7583
 
 additionalProperties: true
 
Signature · 1 line
2.54.0
#2 lore raw

PATCH 2/2 arm64: dts: Add Airoha AN7583 SoC and AN7583 Evaluation Board

In reply to Lorenzo Bianconi

Introduce the Airoha AN7583 SoC's dtsi and the Airoha AN7583 Evaluation Board's dts file.

---
 arch/arm64/boot/dts/airoha/Makefile       |   2 +-
 arch/arm64/boot/dts/airoha/an7583-evb.dts |  23 +++++
 arch/arm64/boot/dts/airoha/an7583.dtsi    | 137 ++++++++++++++++++++++++++++++
 3 files changed, 161 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/airoha/Makefile +1 -1
index ebea112ce1d7..6027978a35c2 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-dtb-$(CONFIG_ARCH_AIROHA) += en7581-evb.dtb
+dtb-$(CONFIG_ARCH_AIROHA) += en7581-evb.dtb an7583-evb.dtb
arch/arm64/boot/dts/airoha/an7583-evb.dts new file +23 -0
new file mode 100644
index 000000000000..76b3d94434f6
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/dts-v1/;
+
+#include "an7583.dtsi"
+
+/ {
+	model = "Airoha AN7583 Evaluation Board";
+	compatible = "airoha,an7583-evb", "airoha,an7583";
+
+	aliases {
+		serial0 = &uart1;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200 earlycon";
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x2 0x00000000>;
+	};
+};
arch/arm64/boot/dts/airoha/an7583.dtsi new file +137 -0

137 lines not on this page · raw message

Signature · 1 line
2.54.0
#3 lore raw

Re: [PATCH 2/2] arm64: dts: Add Airoha AN7583 SoC and AN7583 Evaluation Board

Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider: - [High] The memory node specifies a physical size of 8GB, which is a typo that will cause a fatal boot…

Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider:
- [High] The memory node specifies a physical size of 8GB, which is a typo that will cause a fatal boot panic.
- [Medium] The UART compatible string 'ns16550' will disable hardware FIFOs.
- [Medium] The GIC maintenance interrupt polarity is incorrectly specified as active-low.
- [Low] Missing SoC-specific compatible string for the watchdog timer.
- [Low] Unnecessary address and size cells in the GIC node will trigger compiler warnings.
- [Low] CPU nodes declare cooling capabilities but lack required frequency scaling properties. --

commit f0ce6065ddf4c46b3e0a82baac122d34553f5f4c
Author: Lorenzo Bianconi <[email protected]>

arm64: dts: Add Airoha AN7583 SoC and AN7583 Evaluation Board

Introduce the Airoha AN7583 SoC's dtsi and the Airoha AN7583 Evaluation Board's dts file.

Quoted 5 lines
arch/arm64/boot/dts/airoha/an7583-evb.dts new file +0 -0
new file mode 100644
index 0000000000000..76b3d94434f63

[ ... ]

arch/arm64/boot/dts/airoha/an7583-evb.dts line 22

Quoted 4 lines
arch/arm64/boot/dts/airoha/an7583-evb.dts new file +4 -0
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x2 0x00000000>;
+	};

Because #size-cells = <2>, the size array <0x2 0x00000000> sets the upper 32 bits to 0x2, which evaluates to an enormous 8GB memory range.

Is this a typo for 512MB (<0x0 0x20000000>) or 2GB (<0x0 0x80000000>)?

While an identical value exists in the predecessor board's DT, it was safely masked there by a restrictive linux,usable-memory-range property in the chosen node.

Since this board lacks that protective limit, will the kernel attempt to map and access the full 8GB of memory and trigger unbacked physical memory accesses, resulting in a fatal bus fault during early boot?

Quoted 5 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +0 -0
new file mode 100644
index 0000000000000..64b2c7533aff6

[ ... ]

arch/arm64/boot/dts/airoha/an7583.dtsi line 50

Quoted 8 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +8 -0
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0>;
+			enable-method = "psci";
+			next-level-cache = <&l2>;
+			#cooling-cells = <2>;
+		};

Are required frequency scaling properties missing here?

Both CPU nodes define #cooling-cells, but the cpufreq_cooling subsystem requires properties like clocks or operating-points-v2 to bind. Without them, is this cooling declaration functionally dead code that generates validation warnings?

[ ... ]

arch/arm64/boot/dts/airoha/an7583.dtsi line 111

Quoted 6 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +6 -0
+		gic: interrupt-controller@9000000 {
+			compatible = "arm,gic-v3";
+			interrupt-controller;
+			#interrupt-cells = <3>;
+			#address-cells = <1>;
+			#size-cells = <1>;

Do we need these address and size cells here? According to device tree compiler rules, specifying them without any children or a ranges property causes an avoid_unnecessary_addr_size warning.

arch/arm64/boot/dts/airoha/an7583.dtsi line 117

Quoted 6 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +6 -0
+			reg = <0x0 0x09000000 0x0 0x20000>,
+			      <0x0 0x09080000 0x0 0x80000>,
+			      <0x0 0x09400000 0x0 0x2000>,
+			      <0x0 0x09500000 0x0 0x2000>,
+			      <0x0 0x09600000 0x0 0x20000>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;

Should this maintenance interrupt be active-high?

The ARM Generic Interrupt Controller architecture specification explicitly mandates that the GIC maintenance interrupt is an active-high, level-sensitive interrupt (IRQ_TYPE_LEVEL_HIGH).

Incorrect polarity might prevent it from firing properly and break hardware virtualization support.

arch/arm64/boot/dts/airoha/an7583.dtsi line 121

Quoted 4 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +4 -0
+		};
+
+		uart1: serial@1fbf0000 {
+			compatible = "ns16550";

Could this compatible string unintentionally disable hardware FIFOs?

In the Linux 8250 serial driver, ns16550 restricts the fifo_size to 1 byte due to known hardware bugs in the original 16550 chip. Since modern UART IPs include working FIFOs, should this be declared as ns16550a to avoid excessive interrupt load?

arch/arm64/boot/dts/airoha/an7583.dtsi line 130

Quoted 9 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +9 -0
+			reg = <0x0 0x1fbf0000 0x0 0x30>;
+			reg-io-width = <4>;
+			reg-shift = <2>;
+			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+			clock-frequency = <1843200>;
+		};
+
+		watchdog@1fbf0100 {
+			compatible = "airoha,en7581-wdt";

Would it be better to include the SoC-specific compatible string alongside the fallback?

The dt-binding schema typically dictates using a string like "airoha,an7583-wdt", "airoha,en7581-wdt" to accurately describe the specific SoC and ensure any future platform-specific driver quirks can be cleanly applied.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#4 lore raw

Re: [PATCH 2/2] arm64: dts: Add Airoha AN7583 SoC and AN7583 Evaluation Board

Quoted 35 lines

Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider:
- [High] The memory node specifies a physical size of 8GB, which is a typo that will cause a fatal boot panic.
- [Medium] The UART compatible string 'ns16550' will disable hardware FIFOs.
- [Medium] The GIC maintenance interrupt polarity is incorrectly specified as active-low.
- [Low] Missing SoC-specific compatible string for the watchdog timer.
- [Low] Unnecessary address and size cells in the GIC node will trigger compiler warnings.
- [Low] CPU nodes declare cooling capabilities but lack required frequency scaling properties. --

commit f0ce6065ddf4c46b3e0a82baac122d34553f5f4c
Author: Lorenzo Bianconi <[email protected]>

arm64: dts: Add Airoha AN7583 SoC and AN7583 Evaluation Board

Introduce the Airoha AN7583 SoC's dtsi and the Airoha AN7583 Evaluation Board's dts file.

Quoted 5 lines
arch/arm64/boot/dts/airoha/an7583-evb.dts new file +0 -0
new file mode 100644
index 0000000000000..76b3d94434f63

[ ... ]

arch/arm64/boot/dts/airoha/an7583-evb.dts line 22

Quoted 4 lines
arch/arm64/boot/dts/airoha/an7583-evb.dts new file +4 -0
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x2 0x00000000>;
+	};

Because #size-cells = <2>, the size array <0x2 0x00000000> sets the upper 32 bits to 0x2, which evaluates to an enormous 8GB memory range.

Is this a typo for 512MB (<0x0 0x20000000>) or 2GB (<0x0 0x80000000>)?

Quoted 7 lines

While an identical value exists in the predecessor board's DT, it was safely masked there by a restrictive linux,usable-memory-range property in the chosen node.

Since this board lacks that protective limit, will the kernel attempt to map and access the full 8GB of memory and trigger unbacked physical memory accesses, resulting in a fatal bus fault during early boot?

ack, I will fix it in v2.

Quoted 20 lines
Quoted 6 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +0 -0
new file mode 100644
index 0000000000000..64b2c7533aff6

[ ... ]

arch/arm64/boot/dts/airoha/an7583.dtsi line 50

Quoted 8 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +8 -0
+		cpu0: cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a53";
+			reg = <0x0>;
+			enable-method = "psci";
+			next-level-cache = <&l2>;
+			#cooling-cells = <2>;
+		};

Are required frequency scaling properties missing here?

Quoted 4 lines

Both CPU nodes define #cooling-cells, but the cpufreq_cooling subsystem requires properties like clocks or operating-points-v2 to bind. Without them, is this cooling declaration functionally dead code that generates validation warnings?

ack, I will fix it in v2.

Quoted 13 lines

[ ... ]

arch/arm64/boot/dts/airoha/an7583.dtsi line 111

Quoted 6 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +6 -0
+		gic: interrupt-controller@9000000 {
+			compatible = "arm,gic-v3";
+			interrupt-controller;
+			#interrupt-cells = <3>;
+			#address-cells = <1>;
+			#size-cells = <1>;

Do we need these address and size cells here? According to device tree compiler rules, specifying them without any children or a ranges property causes an avoid_unnecessary_addr_size warning.

ack, I will fix it in v2.

Quoted 10 lines

arch/arm64/boot/dts/airoha/an7583.dtsi line 117

Quoted 7 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +6 -0
+			reg = <0x0 0x09000000 0x0 0x20000>,
+			      <0x0 0x09080000 0x0 0x80000>,
+			      <0x0 0x09400000 0x0 0x2000>,
+			      <0x0 0x09500000 0x0 0x2000>,
+			      <0x0 0x09600000 0x0 0x20000>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_LOW>;

Should this maintenance interrupt be active-high?

Quoted 6 lines

The ARM Generic Interrupt Controller architecture specification explicitly mandates that the GIC maintenance interrupt is an active-high, level-sensitive interrupt (IRQ_TYPE_LEVEL_HIGH).

Incorrect polarity might prevent it from firing properly and break hardware virtualization support.

ack, I will fix it in v2.

Quoted 8 lines

arch/arm64/boot/dts/airoha/an7583.dtsi line 121

Quoted 5 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +4 -0
+		};
+
+		uart1: serial@1fbf0000 {
+			compatible = "ns16550";

Could this compatible string unintentionally disable hardware FIFOs?

Quoted 4 lines

In the Linux 8250 serial driver, ns16550 restricts the fifo_size to 1 byte due to known hardware bugs in the original 16550 chip. Since modern UART IPs include working FIFOs, should this be declared as ns16550a to avoid excessive interrupt load?

ack, I will fix it in v2.

Quoted 14 lines

arch/arm64/boot/dts/airoha/an7583.dtsi line 130

Quoted 10 lines
arch/arm64/boot/dts/airoha/an7583.dtsi new file +9 -0
+			reg = <0x0 0x1fbf0000 0x0 0x30>;
+			reg-io-width = <4>;
+			reg-shift = <2>;
+			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+			clock-frequency = <1843200>;
+		};
+
+		watchdog@1fbf0100 {
+			compatible = "airoha,en7581-wdt";

Would it be better to include the SoC-specific compatible string alongside the fallback?

Quoted 4 lines

The dt-binding schema typically dictates using a string like "airoha,an7583-wdt", "airoha,en7581-wdt" to accurately describe the specific SoC and ensure any future platform-specific driver quirks can be cleanly applied.

ack, I will fix it in v2.

Regards,
Lorenzo

Quoted 3 lines
Signature · 2 lines
-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2