lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dba85b0b-2318-4cdf-a678-a07ae82c65c1@gmail.com>
Date: Thu, 14 Mar 2024 08:53:21 +0100
From: Gabor Juhos <j4g8y7@...il.com>
To: Konrad Dybcio <konrad.dybcio@...aro.org>,
 Bjorn Andersson <andersson@...nel.org>, Rob Herring <robh+dt@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 Conor Dooley <conor+dt@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] arm64: dts: qcom: add TP-Link Archer AX55 v1

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@...il.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@...her_AX55:~# uname -a
  Linux Archer_AX55 4.4.60 #1 SMP PREEMPT Tue Mar 14 18:25:29 CST 2023 armv7l
GNU/Linux
  root@...her_AX55:~# strings
/sys/firmware/devicetree/base/soc/pinctrl@...0000/uart_pins/blsp0_uart_rx_tx/pins
  gpio20
  gpio21
  root@...her_AX55:~# strings
/sys/firmware/devicetree/base/soc/pinctrl@...0000/uart_pins/blsp0_uart_rx_tx/function
  blsp0_uart0

It is also visible in pinctrl-maps:

  root@...her_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@...her_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@...t:/# 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ