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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 21 Feb 2024 11:18:50 +0100
From: Rafał Miłecki <zajec5@...il.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
 Matthias Brugger <matthias.bgg@...il.com>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 Conor Dooley <conor+dt@...nel.org>
Cc: Chen-Yu Tsai <wenst@...omium.org>, Hsin-Yi Wang <hsinyi@...omium.org>,
 Nícolas F . R . A . Prado <nfraprado@...labora.com>,
 Heiko Stuebner <heiko.stuebner@...rry.de>,
 Jernej Skrabec <jernej.skrabec@...il.com>,
 Chris Morgan <macromorgan@...mail.com>,
 Linus Walleij <linus.walleij@...aro.org>, Sean Wang
 <sean.wang@...iatek.com>, devicetree@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org,
 linux-kernel@...r.kernel.org, Rafał Miłecki
 <rafal@...ecki.pl>
Subject: Re: [PATCH 4/4] arm64: dts: mediatek: Add Cudy WR3000 V1

On 21.02.2024 11:11, AngeloGioacchino Del Regno wrote:
> Il 21/02/24 08:35, Rafał Miłecki ha scritto:
>> From: Rafał Miłecki <rafal@...ecki.pl>
>>
>> Cudy WR3000 V1 is an MT7981B (AKA Filogic 820) based wireless router. It
>> has 256 MiB of RAM, some LEDs & buttons and (not described yet) 4
>> Ethernet ports.
>>
>> Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>
>> ---
>>   arch/arm64/boot/dts/mediatek/Makefile         |  1 +
>>   .../dts/mediatek/mt7981b-cudy-wr3000-v1.dts   | 74 +++++++++++++++++++
>>   2 files changed, 75 insertions(+)
>>   create mode 100644 arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
>> index 37b4ca3a87c9..96da4ad640aa 100644
>> --- a/arch/arm64/boot/dts/mediatek/Makefile
>> +++ b/arch/arm64/boot/dts/mediatek/Makefile
>> @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
>>   dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
>>   dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
>>   dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb
>> +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7981b-cudy-wr3000-v1.dtb
>>   dtb-$(CONFIG_ARCH_MEDIATEK) += mt7981b-xiaomi-ax3000t.dtb
>>   dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-acelink-ew-7886cax.dtb
>>   dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3.dtb
>> diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts b/arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts
>> new file mode 100644
>> index 000000000000..cb36a089518a
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts
>> @@ -0,0 +1,74 @@
>> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
>> +
>> +/dts-v1/;
>> +#include <dt-bindings/input/input.h>
>> +#include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/leds/common.h>
>> +
>> +#include "mt7981b.dtsi"
>> +
>> +/ {
>> +    compatible = "cudy,wr3000-v1", "mediatek,mt7981b";
>> +    model = "Cudy WR3000 V1";
>> +
>> +    memory@...00000 {
>> +        reg = <0 0x40000000 0 0x10000000>;
>> +        device_type = "memory";
>> +    };
>> +
>> +    keys {
>> +        compatible = "gpio-keys";
>> +
>> +        key-wps {
>> +            label = "WPS";
>> +            gpios = <&pio 0 GPIO_ACTIVE_LOW>;
>> +            linux,code = <KEY_WPS_BUTTON>;
>> +        };
>> +
>> +        key-reset {
>> +            label = "RESET";
>> +            gpios = <&pio 1 GPIO_ACTIVE_LOW>;
>> +            linux,code = <KEY_RESTART>;
>> +        };
>> +    };
>> +
>> +    leds {
>> +        compatible = "gpio-leds";
>> +
>> +        led-0 {
>> +            function = LED_FUNCTION_WAN;
>> +            color = <LED_COLOR_ID_BLUE>;
>> +            gpios = <&pio 5 GPIO_ACTIVE_LOW>;
> 
> Can we please order those properties alphabetically, as it doesn't impact
> on human readability in any way?
> Just a nitpick, anyway.
> 
> color = <LED_COLOR_ID_BLUE>;
> function = LED_FUNCTION_WAN;
> gpios = <&pio 5 GPIO_ACTIVE_LOW>;

If I understand [1] correctly alphabetical / alpha-numerical order
applies to non-addresses nodes only.

Here I put "function" first as that seemed more important than a color.

Perhaps you could suggest an addition to Devicetree Sources (DTS) Coding
Style or point me to the missed part, please?

[1] https://www.kernel.org/doc/html/next/devicetree/bindings/dts-coding-style.html#order-of-properties-in-device-node



>> +        };
>> +
>> +        led-1 {
>> +            function = LED_FUNCTION_WLAN_2GHZ;
>> +            color = <LED_COLOR_ID_BLUE>;
>> +            gpios = <&pio 6 GPIO_ACTIVE_LOW>;
>> +        };
>> +
>> +        led-2 {
>> +            function = LED_FUNCTION_WLAN_5GHZ;
>> +            color = <LED_COLOR_ID_BLUE>;
>> +            gpios = <&pio 7 GPIO_ACTIVE_LOW>;
>> +        };
>> +
>> +        led-3 {
>> +            function = LED_FUNCTION_LAN;
>> +            color = <LED_COLOR_ID_BLUE>;
>> +            gpios = <&pio 9 GPIO_ACTIVE_LOW>;
>> +        };
>> +
>> +        led-4 {
>> +            function = LED_FUNCTION_STATUS;
>> +            color = <LED_COLOR_ID_BLUE>;
>> +            gpios = <&pio 10 GPIO_ACTIVE_LOW>;
>> +        };
>> +
>> +        led-5 {
>> +            function = "online";
> 
> Uhm, what does "online" mean?
> 
> Are you sure that you can't use any of the LED_FUNCTION_XXX standard definitions?

This device has:
1. "WAN Port" LED that indicates "WAN Port has connection" state
2. "Internet" LED that indicates "Connected to the Internet" state

I couldn't find any define that would fit Internet access LED case.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ