Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1476014
| From | Rask Ingemann Lambertsen <ccc94453@vip.cybercity.dk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC |
| Date | 2016-09-04 22:20 +0200 |
| Message-ID | <sdM3w-2ae-9@gated-at.bofh.it> (permalink) |
| References | <scrkt-32K-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Sep 01, 2016 at 01:48:54PM +1000, james@innovum.com.au wrote:
> +#include <dt-bindings/input/input.h>
You don't seem to use anything from that header file.
> +#include <dt-bindings/pinctrl/sun4i-a10.h>
> +
> +/ {
> + model = "FriendlyARM NanoPi NEO";
> + compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
It is good practice to add new vendor prefixes to the list in
Documentation/devicetree/bindings/vendor-prefixes.txt (sorted alphabetially
by vendor prefix).
> + leds {
> + compatible = "gpio-leds";
> + pinctrl-names = "default";
> + pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
> +
> + pwr_led {
> + label = "nanopi:green:pwr";
> + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
> + default-state = "on";
> + };
> +
> + status_led {
> + label = "nanopi:blue:status";
> + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
> + };
> + };
Node names should not have underscores in them. [1][2]
IMHO the _led suffix is unnecessary inside leds { }.
I think you should add a comment with the name of the GPIO pin like you
did with &mmc0/cd-gpios.
> +&pio {
> + leds_opc: led_pins@0 {
> + allwinner,pins = "PA10";
> + allwinner,function = "gpio_out";
> + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> + };
> +};
Use hyphens instead of underscores in node names. Also, unit addresses and
reg properties go together. Either you have both or you have neither. So
drop the @0 part of the node name. You'll get warnings about this sort of
mismatch when your device tree is compiled as part of Das U-Boot.
> +&r_pio {
> + leds_r_opc: led_pins@0 {
Likewise.
[1] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1122967.html
[2] https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1145633.html
--
Rask Ingemann Lambertsen
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/1] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC james@innovum.com.au - 2016-09-01 06:00 +0200
Re: [PATCH 1/1] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC Rask Ingemann Lambertsen <ccc94453@vip.cybercity.dk> - 2016-09-04 22:20 +0200
[PATCH v2] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC James Pettigrew <james@innovum.com.au> - 2016-09-05 03:00 +0200
Re: [PATCH v2] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC kbuild test robot <lkp@intel.com> - 2016-09-05 04:40 +0200
[PATCH v3] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC James Pettigrew <james@innovum.com.au> - 2016-09-05 06:40 +0200
Re: [PATCH v3] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-09-05 14:10 +0200
Re: [PATCH v3] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC Rask Ingemann Lambertsen <ccc94453@vip.cybercity.dk> - 2016-09-05 20:40 +0200
[PATCH v4 1/2] ARM: dts: sun8i: Add dts file for the NanoPi NEO SBC James Pettigrew <james@innovum.com.au> - 2016-09-06 00:20 +0200
[PATCH v4 2/2] devicetree: Add vendor prefix for FriendlyARM James Pettigrew <james@innovum.com.au> - 2016-09-06 00:30 +0200
Re: [linux-sunxi] [PATCH v4 2/2] devicetree: Add vendor prefix for FriendlyARM Chen-Yu Tsai <wens@csie.org> - 2016-09-06 04:50 +0200
[PATCH v4 0/2] ARM: sunxi: Add support for FriendlyARM NanoPi NEO SBC James Pettigrew <james@innovum.com.au> - 2016-09-06 00:30 +0200
Re: [PATCH v4 0/2] ARM: sunxi: Add support for FriendlyARM NanoPi NEO SBC Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-09-06 08:50 +0200
csiph-web