linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: add minimal boot support for TP-Link Archer AX55 v1
@ 2024-02-23  8:17 Gabor Juhos
  2024-02-23  8:17 ` [PATCH 1/2] dt-bindings: arm: qcom: add " Gabor Juhos
  2024-02-23  8:17 ` [PATCH 2/2] arm64: dts: " Gabor Juhos
  0 siblings, 2 replies; 7+ messages in thread
From: Gabor Juhos @ 2024-02-23  8:17 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Gabor Juhos

The purpose of this series to add minimal boot support for the
TP-Link Archer AX55 v1 dual-band wireless router.

There are two patches:
  - the first one adds the compatible for the board into the dt-bindings
    documentation,
  - the second patch introduces a minimal device tree source which can be
    used for booting initramfs images

---
Gabor Juhos (2):
      dt-bindings: arm: qcom: add TP-Link Archer AX55 v1
      arm64: dts: qcom: add TP-Link Archer AX55 v1

 Documentation/devicetree/bindings/arm/qcom.yaml    |   1 +
 arch/arm64/boot/dts/qcom/Makefile                  |   1 +
 .../dts/qcom/ipq5018-tplink-archer-ax55-v1.dts     | 133 +++++++++++++++++++++
 3 files changed, 135 insertions(+)
---
base-commit: b401b621758e46812da61fa58a67c3fd8d91de0d
change-id: 20240221-archer-ax55-v1-73ed91a97c6e

Best regards,
-- 
Gabor Juhos <j4g8y7@gmail.com>


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

* [PATCH 1/2] dt-bindings: arm: qcom: add TP-Link Archer AX55 v1
  2024-02-23  8:17 [PATCH 0/2] arm64: add minimal boot support for TP-Link Archer AX55 v1 Gabor Juhos
@ 2024-02-23  8:17 ` Gabor Juhos
  2024-02-23 18:39   ` Conor Dooley
  2024-02-23  8:17 ` [PATCH 2/2] arm64: dts: " Gabor Juhos
  1 sibling, 1 reply; 7+ messages in thread
From: Gabor Juhos @ 2024-02-23  8:17 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Gabor Juhos

Document the TP-Link Archer AX55 v1 which is a dual-band
WiFi router based on the IPQ5018 SoC.

Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 1a5fb889a444..ff0a3b64f37a 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -351,6 +351,7 @@ properties:
       - items:
           - enum:
               - qcom,ipq5018-rdp432-c2
+              - tplink,archer-ax55-v1
           - const: qcom,ipq5018
 
       - items:

-- 
2.43.0


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

* [PATCH 2/2] arm64: dts: qcom: add TP-Link Archer AX55 v1
  2024-02-23  8:17 [PATCH 0/2] arm64: add minimal boot support for TP-Link Archer AX55 v1 Gabor Juhos
  2024-02-23  8:17 ` [PATCH 1/2] dt-bindings: arm: qcom: add " Gabor Juhos
@ 2024-02-23  8:17 ` Gabor Juhos
  2024-02-24 10:36   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Gabor Juhos @ 2024-02-23  8:17 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Gabor Juhos

Add device tree source for the TP-Link Archer AX55 v1 [1]
which is a dual-band WiFi router based on the IPQ5018 SoC.

At the moment, only the UART, the GPIO LEDs and buttons
are usable, but it makes it possible to boot an initramfs
image on the device.

The device tree can be extended in the future, once support
for other periherals will be available for the platform.

1. https://www.tp-link.com/en/home-networking/wifi-router/archer-ax55/v1/

Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
Note: running 'make CHECK_DTBS=y qcom/ipq5018-tplink-archer-ax55-v1.dtb'
shows the following:

    DTC_CHK arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb
  <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
  	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
  <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
  	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
  <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
  	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
  <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names:0: 'pwr_event' was expected
  	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
  <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
  	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#

This is not caused by the new device tree per se but comes from
the usb@8af8800 node defined in ipq5018.dtsi. Running the check
on 'qcom/ipq5018-rdp432-c2.dtb' shows the same.
---
 arch/arm64/boot/dts/qcom/Makefile                  |   1 +
 .../dts/qcom/ipq5018-tplink-archer-ax55-v1.dts     | 133 +++++++++++++++++++++
 2 files changed, 134 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 39889d5f8e12..d3ba1e22d6dd 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -10,6 +10,7 @@ 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-rdp432-c2.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= ipq5018-tplink-archer-ax55-v1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq5332-rdp441.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq5332-rdp442.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= ipq5332-rdp468.dtb
diff --git a/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dts b/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dts
new file mode 100644
index 000000000000..1b30d4bc781e
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dts
@@ -0,0 +1,133 @@
+// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+#include "ipq5018.dtsi"
+
+/ {
+	model = "TP-Link Archer AX55 v1";
+	compatible = "tplink,archer-ax55-v1", "qcom,ipq5018";
+
+	aliases {
+		serial0 = &blsp1_uart1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-0 = <&led_pins>;
+		pinctrl-names = "default";
+
+		led-0 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_LAN;
+			gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-1 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WAN;
+			gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-2 {
+			/* WLAN 2.4GHz */
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN;
+			function-enumerator = <0>;
+			gpios = <&tlmm 13 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-3 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_POWER;
+			gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-4 {
+			color = <LED_COLOR_ID_ORANGE>;
+			function = LED_FUNCTION_WAN;
+			gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-5 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_USB;
+			gpios = <&tlmm 38 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-6 {
+			/* WLAN 5GHz */
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN;
+			function-enumerator = <1>;
+			gpios = <&tlmm 39 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	buttons {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&button_pins>;
+		pinctrl-names = "default";
+
+		button-reset {
+			debounce-interval = <60>;
+			gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+		};
+
+		button-wps {
+			debounce-interval = <60>;
+			gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+};
+
+&blsp1_uart1 {
+	pinctrl-0 = <&uart1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&sleep_clk {
+	clock-frequency = <32000>;
+};
+
+&tlmm {
+	button_pins: button-pins-state {
+		pins = "gpio25", "gpio31";
+		bias-pull-up;
+		drive-strength = <8>;
+		function = "gpio";
+	};
+
+	led_pins: led-pins-state {
+		pins = "gpio10", "gpio11", "gpio13", "gpio18", "gpio22",
+		       "gpio38", "gpio39";
+		bias-disable;
+		drive-strength = <2>;
+		function = "gpio";
+	};
+};
+
+&uart1_pins {
+	/*
+	 * Remove "gpio31" from the default pins in order to be able
+	 * to use that for the WPS button.
+	 */
+	pins = "gpio32", "gpio33", "gpio34";
+};
+
+&xo_board_clk {
+	clock-frequency = <24000000>;
+};

-- 
2.43.0


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

* Re: [PATCH 1/2] dt-bindings: arm: qcom: add TP-Link Archer AX55 v1
  2024-02-23  8:17 ` [PATCH 1/2] dt-bindings: arm: qcom: add " Gabor Juhos
@ 2024-02-23 18:39   ` Conor Dooley
  2024-02-25 16:47     ` Gabor Juhos
  0 siblings, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2024-02-23 18:39 UTC (permalink / raw)
  To: Gabor Juhos
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

On Fri, Feb 23, 2024 at 09:17:44AM +0100, Gabor Juhos wrote:
> Document the TP-Link Archer AX55 v1 which is a dual-band
> WiFi router based on the IPQ5018 SoC.
> 
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 2/2] arm64: dts: qcom: add TP-Link Archer AX55 v1
  2024-02-23  8:17 ` [PATCH 2/2] arm64: dts: " Gabor Juhos
@ 2024-02-24 10:36   ` Krzysztof Kozlowski
  2024-02-25 17:09     ` Gabor Juhos
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-24 10:36 UTC (permalink / raw)
  To: Gabor Juhos, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 23/02/2024 09:17, Gabor Juhos wrote:
> Add device tree source for the TP-Link Archer AX55 v1 [1]
> which is a dual-band WiFi router based on the IPQ5018 SoC.
> 
> At the moment, only the UART, the GPIO LEDs and buttons
> are usable, but it makes it possible to boot an initramfs
> image on the device.
> 
> The device tree can be extended in the future, once support
> for other periherals will be available for the platform.
> 
> 1. https://www.tp-link.com/en/home-networking/wifi-router/archer-ax55/v1/
> 
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> ---
> Note: running 'make CHECK_DTBS=y qcom/ipq5018-tplink-archer-ax55-v1.dtb'
> shows the following:
> 
>     DTC_CHK arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb
>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names:0: 'pwr_event' was expected
>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
> 
> This is not caused by the new device tree per se but comes from
> the usb@8af8800 node defined in ipq5018.dtsi. Running the check
> on 'qcom/ipq5018-rdp432-c2.dtb' shows the same.

Thanks for noticing and describing. Appreciated!

> ---
>  arch/arm64/boot/dts/qcom/Makefile                  |   1 +
>  .../dts/qcom/ipq5018-tplink-archer-ax55-v1.dts     | 133 +++++++++++++++++++++
>  2 files changed, 134 insertions(+)

...

> +
> +		button-wps {
> +			debounce-interval = <60>;
> +			gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
> +			label = "wps";
> +			linux,code = <KEY_WPS_BUTTON>;
> +		};
> +	};
> +};
> +
> +&blsp1_uart1 {
> +	pinctrl-0 = <&uart1_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
> +
> +&sleep_clk {
> +	clock-frequency = <32000>;
> +};
> +
> +&tlmm {
> +	button_pins: button-pins-state {
> +		pins = "gpio25", "gpio31";
> +		bias-pull-up;
> +		drive-strength = <8>;
> +		function = "gpio";

Usually we keep 'function' as second property, after 'pins', but there
is no need to send new version just for that.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: arm: qcom: add TP-Link Archer AX55 v1
  2024-02-23 18:39   ` Conor Dooley
@ 2024-02-25 16:47     ` Gabor Juhos
  0 siblings, 0 replies; 7+ messages in thread
From: Gabor Juhos @ 2024-02-25 16:47 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

2024. 02. 23. 19:39 keltezéssel, Conor Dooley írta:
> On Fri, Feb 23, 2024 at 09:17:44AM +0100, Gabor Juhos wrote:
>> Document the TP-Link Archer AX55 v1 which is a dual-band
>> WiFi router based on the IPQ5018 SoC.
>>
>> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> 
> Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thank you!

Regards,
Gabor

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

* Re: [PATCH 2/2] arm64: dts: qcom: add TP-Link Archer AX55 v1
  2024-02-24 10:36   ` Krzysztof Kozlowski
@ 2024-02-25 17:09     ` Gabor Juhos
  0 siblings, 0 replies; 7+ messages in thread
From: Gabor Juhos @ 2024-02-25 17:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

Hi Krzysztof,

> On 23/02/2024 09:17, Gabor Juhos wrote:

<snip>

>> ---
>> Note: running 'make CHECK_DTBS=y qcom/ipq5018-tplink-archer-ax55-v1.dtb'
>> shows the following:
>>
>>     DTC_CHK arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb
>>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
>>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
>>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
>>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
>>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
>>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
>>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names:0: 'pwr_event' was expected
>>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
>>   <...>/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
>>   	from schema $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml#
>>
>> This is not caused by the new device tree per se but comes from
>> the usb@8af8800 node defined in ipq5018.dtsi. Running the check
>> on 'qcom/ipq5018-rdp432-c2.dtb' shows the same.
> 
> Thanks for noticing and describing. Appreciated!

FWIW, I have checked that in the meantime. The warning happens since commit
53c6d854be4e ("dt-bindings: usb: dwc3: Clean up hs_phy_irq in binding").
Reverting that eliminates the warning.

> 
>> ---
>>  arch/arm64/boot/dts/qcom/Makefile                  |   1 +
>>  .../dts/qcom/ipq5018-tplink-archer-ax55-v1.dts     | 133 +++++++++++++++++++++
>>  2 files changed, 134 insertions(+)
> 
> ...

<snip>

>> +
>> +&tlmm {
>> +	button_pins: button-pins-state {
>> +		pins = "gpio25", "gpio31";
>> +		bias-pull-up;
>> +		drive-strength = <8>;
>> +		function = "gpio";
> 
> Usually we keep 'function' as second property, after 'pins', but there
> is no need to send new version just for that.

Sorry, it is my fault. I should have noticed that pattern based on the other dts
files. Nevertheless, I can send a v2 or a follow-up patch to fix the ordering so
we can avoid having a bad example in the tree.

> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thank you for the review!

Regards,
Gabor

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

end of thread, other threads:[~2024-02-25 17:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23  8:17 [PATCH 0/2] arm64: add minimal boot support for TP-Link Archer AX55 v1 Gabor Juhos
2024-02-23  8:17 ` [PATCH 1/2] dt-bindings: arm: qcom: add " Gabor Juhos
2024-02-23 18:39   ` Conor Dooley
2024-02-25 16:47     ` Gabor Juhos
2024-02-23  8:17 ` [PATCH 2/2] arm64: dts: " Gabor Juhos
2024-02-24 10:36   ` Krzysztof Kozlowski
2024-02-25 17:09     ` Gabor Juhos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).