From: Gabor Juhos <j4g8y7@gmail.com>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] arm64: dts: qcom: add TP-Link Archer AX55 v1
Date: Thu, 14 Mar 2024 08:53:21 +0100 [thread overview]
Message-ID: <dba85b0b-2318-4cdf-a678-a07ae82c65c1@gmail.com> (raw)
In-Reply-To: <b8d9117e-5e99-4f69-844d-997a3fbf04d6@linaro.org>
2024. 03. 13. 19:27 keltezéssel, Konrad Dybcio írta:
>
>
> On 3/13/24 19:25, 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>
>> ---
>> Changes in v3:
>> - change pin configuration to use "gpio20" and "gpio21" for UART pins
>> - rebase on top of v6.8.
>
> Did you actually check this?
Yes, I have tested this.
> And how so?
First, I have checked the stock firmware which uses the same pinctrl configuration:
root@Archer_AX55:~# uname -a
Linux Archer_AX55 4.4.60 #1 SMP PREEMPT Tue Mar 14 18:25:29 CST 2023 armv7l
GNU/Linux
root@Archer_AX55:~# strings
/sys/firmware/devicetree/base/soc/pinctrl@1000000/uart_pins/blsp0_uart_rx_tx/pins
gpio20
gpio21
root@Archer_AX55:~# strings
/sys/firmware/devicetree/base/soc/pinctrl@1000000/uart_pins/blsp0_uart_rx_tx/function
blsp0_uart0
It is also visible in pinctrl-maps:
root@Archer_AX55:~# cat /sys/kernel/debug/pinctrl/pinctrl-maps
Pinctrl maps:
device 1000000.pinctrl
state default
type MUX_GROUP (2)
controlling device 1000000.pinctrl
group gpio20
function blsp0_uart0
device 1000000.pinctrl
state default
type CONFIGS_GROUP (4)
controlling device 1000000.pinctrl
group gpio20
config 00000001
device 1000000.pinctrl
state default
type MUX_GROUP (2)
controlling device 1000000.pinctrl
group gpio21
function blsp0_uart0
device 1000000.pinctrl
state default
type CONFIGS_GROUP (4)
controlling device 1000000.pinctrl
group gpio21
config 00000001
...
Additionally, this is what debug/gpio says:
root@Archer_AX55:~# grep -E 'gpio2[01]' /sys/kernel/debug/gpio
gpio20 : in 1 8mA no pull
gpio21 : in 1 8mA no pull
Then I have tested the following with v6.8 and with the previous version of the
patch.
Exported GPIO20 via sysfs ...
root@test:/# gpio=$((512+20)); echo $gpio > /sys/class/gpio/export; while
true; do for dir in high low; do echo $dir >/sys/class/gpio/gpio$gpio/direction;
sleep 3; done; done
... and measured the voltage on the UART pin header. Then I did the same with
GPIO21 as well.
This revealed that GPIO20 corresponds to RX and GPIO21 to TX.
If that matters, the downstream kernel also uses this 'trick' for some boards:
https://git.codelinaro.org/clo/qsdk/oss/kernel/linux-ipq-5.4/-/blob/NHSS.QSDK.12.4/arch/arm64/boot/dts/qcom/ipq5018-db-mp03.1.dts?ref_type=heads#L443
https://git.codelinaro.org/clo/qsdk/oss/kernel/linux-ipq-5.4/-/blob/NHSS.QSDK.12.4/arch/arm64/boot/dts/qcom/ipq5018-mp03.1.dts?ref_type=heads#L565
Regards,
Gabor
next prev parent reply other threads:[~2024-03-14 7:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 18:25 [PATCH v3 0/2] arm64: add minimal boot support for TP-Link Archer AX55 v1 Gabor Juhos
2024-03-13 18:25 ` [PATCH v3 1/2] dt-bindings: arm: qcom: add " Gabor Juhos
2024-03-13 18:25 ` [PATCH v3 2/2] arm64: dts: " Gabor Juhos
2024-03-13 18:27 ` Konrad Dybcio
2024-03-14 7:53 ` Gabor Juhos [this message]
2024-03-15 15:50 ` [PATCH v3 0/2] arm64: add minimal boot support for " Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dba85b0b-2318-4cdf-a678-a07ae82c65c1@gmail.com \
--to=j4g8y7@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox