Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1588162 > unrolled thread

Re: [PATCH] arm64: dts: allwinner: add support for Pinebook

Started byRask Ingemann Lambertsen <rask@formelder.dk>
First post2017-02-25 17:50 +0100
Last post2017-02-25 18:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] arm64: dts: allwinner: add support for Pinebook Rask Ingemann Lambertsen <rask@formelder.dk> - 2017-02-25 17:50 +0100
    Re: [linux-sunxi] Re: [PATCH] arm64: dts: allwinner: add support for Pinebook Chen-Yu Tsai <wens@csie.org> - 2017-02-25 18:20 +0100

#1588162 — Re: [PATCH] arm64: dts: allwinner: add support for Pinebook

FromRask Ingemann Lambertsen <rask@formelder.dk>
Date2017-02-25 17:50 +0100
SubjectRe: [PATCH] arm64: dts: allwinner: add support for Pinebook
Message-ID<teNHH-2cJ-7@gated-at.bofh.it>
On Sat, Feb 25, 2017 at 03:00:32PM +0800, Icenowy Zheng wrote:
[...]
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> new file mode 100644
> index 000000000000..2dceba3132b0
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
[...]
> +	gpio_keys {
> +		compatible = "gpio-keys";
> +
> +		lid_switch {

Node names should not contain underscores. You can use hyphens instead. See
https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1122967.html
https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1145633.html

> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
> +	cd-inverted;

You ought to be able to replace those last two lines with just
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;

> +	disable-wp;
> +	bus-width = <4>;
> +	status = "okay";
> +};

-- 
Rask Ingemann Lambertsen

[toc] | [next] | [standalone]


#1588169 — Re: [linux-sunxi] Re: [PATCH] arm64: dts: allwinner: add support for Pinebook

FromChen-Yu Tsai <wens@csie.org>
Date2017-02-25 18:20 +0100
SubjectRe: [linux-sunxi] Re: [PATCH] arm64: dts: allwinner: add support for Pinebook
Message-ID<teOaJ-2C8-3@gated-at.bofh.it>
In reply to#1588162
On Sun, Feb 26, 2017 at 12:55 AM, Icenowy Zheng <icenowy@aosc.xyz> wrote:
>
>
> 26.02.2017, 00:38, "Rask Ingemann Lambertsen" <rask@formelder.dk>:
>> On Sat, Feb 25, 2017 at 03:00:32PM +0800, Icenowy Zheng wrote:
>> [...]
>>>  diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>>>  new file mode 100644
>>>  index 000000000000..2dceba3132b0
>>>  --- /dev/null
>>>  +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>>
>> [...]
>>>  + gpio_keys {
>>>  + compatible = "gpio-keys";
>>>  +
>>>  + lid_switch {
>>
>> Node names should not contain underscores. You can use hyphens instead. See
>> https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1122967.html
>> https://www.mail-archive.com/linux-kernel%40vger.kernel.org/msg1145633.html
>
> Sorry... but here I modelled after omap3-n900.dts, maybe it should also be changed?

I believe this is a recent change to the device tree compiler. (Or maybe not.)
Either way underscores in node names will give out warnings if they are turned
on. While they aren't at the moment, it does not mean it's OK to add even
more.

Old DTs may have them. It may be up to the respective maintainers to fix them.
Or there might be some code that depends on the names being how they currently
are, which means they can't be changed easily.

>
>>
>>>  +&mmc0 {
>>>  + pinctrl-names = "default";
>>>  + pinctrl-0 = <&mmc0_pins>;
>>>  + vmmc-supply = <&reg_vcc3v3>;
>>>  + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
>>>  + cd-inverted;
>>
>> You ought to be able to replace those last two lines with just
>> cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
>
> Before this all Allwinner boards uses GPIO_ACTIVE_HIGH and
> cd-inverted.

This might be some leftover stuff from before gpios supported flags.
IIRC the mmc core supports both, so dropping cd-inverted and using
GPIO_ACTIVE_LOW should be fine.

Documentation/devicetree/bindings/mmc/mmc.txt explains this.

ChenYu

>>
>>>  + disable-wp;
>>>  + bus-width = <4>;
>>>  + status = "okay";
>>>  +};
>>
>> --
>> Rask Ingemann Lambertsen
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web