[PATCH v6 2/5] arm64: dts: qcom: add Linksys EA9350 V3

From: Karl Chan
Date: Mon Oct 07 2024 - 12:36:57 EST


Add device tree source for Linksys EA9350 V3
which is a WiFi router based on the IPQ5018 SoC.
As of now , only the UART,USB,USB LED,buttons is working.
The front PWM LED require the IPQ PWM driver.
Therefore the PWM LED isn't configed in the tree.

The original firmware of EA9350V3 from Linksys can only boot ARM32 kernels.
However there seem to a identical device that come with 64bit firmware.
Also There are seems to be no way to boot ARM64 kernels on EA9350.

Therefore,the only way to boot on EA9350 V3 is using this tree and a 32bit kernel.

Signed-off-by: Karl Chan <exxxxkc@xxxxxxxxxxxxxxx>
---
arch/arm64/boot/dts/qcom/Makefile | 1 +
.../boot/dts/qcom/ipq5018-linksys-jamaica.dts | 109 ++++++++++++++++++
2 files changed, 110 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/ipq5018-linksys-jamaica.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index ae002c7cf126..5c6fac2cc8c5 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_QCOM) += apq8039-t2.dtb
dtb-$(CONFIG_ARCH_QCOM) += apq8094-sony-xperia-kitakami-karin_windy.dtb
dtb-$(CONFIG_ARCH_QCOM) += apq8096-db820c.dtb
dtb-$(CONFIG_ARCH_QCOM) += apq8096-ifc6640.dtb
+dtb-$(CONFIG_ARCH_QCOM) += ipq5018-linksys-jamaica.dtb
dtb-$(CONFIG_ARCH_QCOM) += ipq5018-rdp432-c2.dtb
dtb-$(CONFIG_ARCH_QCOM) += ipq5018-tplink-archer-ax55-v1.dtb
dtb-$(CONFIG_ARCH_QCOM) += ipq5332-rdp441.dtb
diff --git a/arch/arm64/boot/dts/qcom/ipq5018-linksys-jamaica.dts b/arch/arm64/boot/dts/qcom/ipq5018-linksys-jamaica.dts
new file mode 100644
index 000000000000..26dac104bca1
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/ipq5018-linksys-jamaica.dts
@@ -0,0 +1,109 @@
+// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
+
+/dts-v1/;
+
+/*
+ * NOTE: The original firmware of EA9350 V3 from Linksys can only boot ARM32 kernels.
+ * However there seem to a identical device that come with 64bit firmware.
+ * Also There are seems to be no way to boot ARM64 kernels on EA9350.
+ *
+ * Therefore,the only way to boot on EA9350 V3 is using this tree and a 32bit kernel.
+ *
+ * For clarity and build testing this device tree is maintained next
+ * to the other IPQ5018 device trees. However, on EA9350 V3
+ * it is actually used through
+ * arch/arm/boot/dts/qcom/qcom-ipq5018-linksys-jamaica.dts
+ */
+
+#include "ipq5018.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/gpio/gpio.h>
+
+
+/ {
+ model = "Linksys EA9350 V3";
+ compatible = "linksys,jamaica", "qcom,ipq5018";
+
+ aliases {
+ serial0 = &blsp1_uart1;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-0 = <&button_pins>;
+ pinctrl-names = "default";
+
+ button-0 {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+
+ button-1 {
+ label = "wps";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&led_pins>;
+ pinctrl-names = "default";
+
+ led-0 {
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_USB;
+ gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>;
+ };
+ };
+};
+
+&blsp1_uart1 {
+ pinctrl-0 = <&uart1_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
+&sleep_clk {
+ clock-frequency = <32000>;
+};
+
+&tlmm {
+ button_pins: button-pins-state {
+ pins = "gpio27", "gpio28";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ led_pins: led-pins-state {
+ pins = "gpio19";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+};
+
+&usb {
+ status = "okay";
+};
+
+&usb_dwc {
+ dr_mode = "host";
+};
+
+&usbphy0 {
+ status = "okay";
+};
+
+&xo_board_clk {
+ clock-frequency = <24000000>;
+};
--
2.46.2