[PATCH 2/3] realtek: introduce common DTSI for ZyXEL GS1900-10HP and GS1900-8HP.
Adrian Schmutzler
mail at adrianschmutzler.de
Wed Jan 6 08:19:57 EST 2021
Hi,
> Subject: [PATCH 2/3] realtek: introduce common DTSI for ZyXEL GS1900-10HP
> and GS1900-8HP.
Please, no full stop after the commit title. Looks too long by the way.
> Memory node is moved out of the rtl838.dtsi and into the device DTS as well.
Please do that separately (= in a separate commit). BTW, it looks to me like this will leave all the other devices without a memory node then?
>
> We also uppercase the vendor name like they carry it themselves (ZyXEL)
> and like used elsewhere in the OpenWrt tree.
>
> Signed-off-by: Stijn Segers <foss at volatilesystems.org>
> ---
> .../realtek/dts/rtl8380_zyxel_gs1900-10hp.dts | 233 +-----------------
> .../realtek/dts/rtl8380_zyxel_gs1900.dtsi | 143 +++++++++++
> target/linux/realtek/dts/rtl838x.dtsi | 5 -
> target/linux/realtek/image/Makefile | 2 +-
> 4 files changed, 153 insertions(+), 230 deletions(-) create mode 100644
> target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi
>
> diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts
> b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts
> index 4458acee2e..0ecd8bd991 100644
> --- a/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts
> +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900-10hp.dts
> @@ -1,54 +1,15 @@
> // SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/;
If you touch this anyway, please remove the dts-v1 here which is already in rtl838x.dtsi.
>
> -#include "rtl838x.dtsi"
> -
> -#include <dt-bindings/input/input.h>
> -#include <dt-bindings/gpio/gpio.h>
> +#include "rtl8380_zyxel_gs1900.dtsi"
>
> / {
> compatible = "zyxel,gs1900-10hp", "realtek,rtl838x-soc";
> - model = "Zyxel GS1900-10HP Switch";
> -
> - aliases {
> - led-boot = &led_sys;
> - led-failsafe = &led_sys;
> - led-running = &led_sys;
> - led-upgrade = &led_sys;
> - };
> + model = "ZyXEL GS1900-10HP Switch";
It would be cleaner to have the ZyXEL rename in a separate commit as well.
However, that's by far the thing I care least about in this context.
[...]
> diff --git a/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi
> b/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi
> new file mode 100644
> index 0000000000..515081008b
> --- /dev/null
> +++ b/target/linux/realtek/dts/rtl8380_zyxel_gs1900.dtsi
> @@ -0,0 +1,143 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later /dts-v1/;
another dts-v1 that should be removed.
> +
> +#include "rtl838x.dtsi"
> +
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/ {
> + aliases {
> + led-boot = &led_sys;
> + led-failsafe = &led_sys;
> + led-running = &led_sys;
> + led-upgrade = &led_sys;
> + };
> +
> + chosen {
> + bootargs = "console=ttyS0,115200";
> + };
> +
> + gpio1: rtl8231-gpio {
> + status = "okay";
> +
> + poe_enable {
> + gpio-hog;
> + gpios = <13 0>;
> + output-high;
> + };
> + };
> +
> + keys {
> + compatible = "gpio-keys-polled";
> + poll-interval = <20>;
> +
> + reset {
> + label = "reset";
> + gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_RESTART>;
> + };
> + };
> +
> + leds {
> + compatible = "gpio-leds";
> +
> + led_sys: sys {
> + label = "gs1900:green:sys";
Maybe not in this patch, but one should consider to remove the model prefix here (particularly since this is used as sysled anyway, and thus probably not linked otherwise).
> + gpios = <&gpio0 47 GPIO_ACTIVE_HIGH>;
> + };
> + };
Best
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20210106/7eb8783d/attachment.sig>
More information about the openwrt-devel
mailing list