Re: [PATCH v2 2/3] ARM: dts: orion5x: Add D-Link DNS-323 Device Tree

From: Krzysztof Kozlowski
Date: Fri Sep 23 2022 - 05:19:32 EST


On 22/09/2022 22:24, Mauri Sandberg wrote:
> Add a device tree for D-Link DNS-323. The device has three different
> variants; A1, B1 and C1. Common parts are included in a .dtsi file
> and each hardware variant has its own .dts file.

Thank you for your patch. There is something to discuss/improve.

> +
> +/delete-node/ &sata;
> +
> +&gpio0 {
> + pinctrl-0 = <&pmx_gpio_misc>;
> + pinctrl-names = "default";
> +
> + /* The DNS323 rev A1 power LED requires GPIO 4 to be low. */
> + pin_gpio0_4 {

No underscores in node names.

> + gpio-hog;
> + gpios = <4 GPIO_ACTIVE_LOW>;
> + output-high;
> + line-name = "Power led enable";
> + };
> +};
> +
> +&pmx_gpio_misc {
> + marvell,pins = "mpp4";
> +};
> +
> +&pmx_ge {
> + marvell,pins = "mpp11", "mpp12", "mpp13", "mpp14", "mpp15",
> + "mpp16", "mpp17", "mpp18", "mpp19";
> +};
> diff --git a/arch/arm/boot/dts/orion5x-dlink-dns323b1.dts b/arch/arm/boot/dts/orion5x-dlink-dns323b1.dts
> new file mode 100644
> index 000000000000..e01ba809ffca
> --- /dev/null
> +++ b/arch/arm/boot/dts/orion5x-dlink-dns323b1.dts
> @@ -0,0 +1,39 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (C) 2022 Mauri Sandberg <maukka@xxxxxxxxxxxx>
> + *
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> +#include "orion5x-mv88f5182.dtsi"
> +#include "orion5x-dlink-dns323.dtsi"
> +
> +/ {
> + model = "D-Link DNS-323 rev B1";
> + compatible = "dlink,dns323b1", "dlink,dns323", "marvell,orion5x-88f5182",
> + "marvell,orion5x";
> +};
> +
> +&gpio0 {
> + pinctrl-0 = <&pmx_gpio_misc>;
> + pinctrl-names = "default";
> +
> + /* The rev B1 has a flag to indicate the system is up.
> + * Without this flag set, power LED will flash and cannot be
> + * controlled via gpio-leds.
> + */
> + pin_gpio0_3 {

No underscores in node names.

Best regards,
Krzysztof