Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-12-06 Thread Philippe Ombredanne
On Mon, Dec 4, 2017 at 10:35 PM, Rob Herring  wrote:
> On Thu, Nov 30, 2017 at 10:36:55PM +0100, Philippe Ombredanne wrote:
>> Jagan,
>>
>> On Thu, Nov 30, 2017 at 7:42 PM, Jagan Teki  wrote:
>> []
>> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
>> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> > new file mode 100644
>> > index 000..f5303a3
>> > --- /dev/null
>> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> > @@ -0,0 +1,244 @@
>> > +/*
>> > + * Copyright (C) 2017 Jagan Teki 
>> > + *
>> > + * This file is dual-licensed: you can use it either under the terms
>> > + * of the GPL or the X11 license, at your option. Note that this dual
>> > + * licensing only applies to this file, and not this project as a
>> > + * whole.
>> > + *
>> > + *  a) This library is free software; you can redistribute it and/or
>> > + * modify it under the terms of the GNU General Public License as
>> > + * published by the Free Software Foundation; either version 2 of the
>> > + * License, or (at your option) any later version.
>> > + *
>> > + * This library is distributed in the hope that it will be useful,
>> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> > + * GNU General Public License for more details.
>> > + *
>> > + * Or, alternatively,
>> > + *
>> > + *  b) Permission is hereby granted, free of charge, to any person
>> > + * obtaining a copy of this software and associated documentation
>> > + * files (the "Software"), to deal in the Software without
>> > + * restriction, including without limitation the rights to use,
>> > + * copy, modify, merge, publish, distribute, sublicense, and/or
>> > + * sell copies of the Software, and to permit persons to whom the
>> > + * Software is furnished to do so, subject to the following
>> > + * conditions:
>> > + *
>> > + * The above copyright notice and this permission notice shall be
>> > + * included in all copies or substantial portions of the Software.
>> > + *
>> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> > + * OTHER DEALINGS IN THE SOFTWARE.
>> > + */
>>
>> Rather than this long boilerplate, you might want to use the SPDX ids,
>> as started by Greg and documented by Thomas.
>> Noe that Linus wants the // comment style for the license line, and
>> since there is only two line left here I suggest using it for both
>> lines.
>> You can check also the recent doc patch posted by Thomas (tglx) and
>> comments from Linus and Greg.
>>
>> So I guess you could use this:
>>
>> > +// Copyright (C) 2017 Jagan Teki 
>> > +// SPDX-License-Indentifier: (GPL-2.0+ OR MIT)
>
> Other way around. Make SPDX-License-Indentifier the first line.

My bad. 100% right!

>> NB: what you call X11 is has the MIT license id in the SPDX license list.
>
> Right. That was a common mistake or abiguity in the dts files.
>
>> So you could replace 32 lines by only two lines :) it'[s neat right?
>>
>> And this would also help as we have tagged already ~15K files, so it
>> would help to use this for new files so the amount of cleanup work
>> still left does not increase. Thank you for your kind consideration!
>
> I've been nuging folks to do that for a while now. Of course, now we
> need to go move the ids to the first line at some point.

That's great: if you need some help there I have a tool that can help
detect license and eventually inject a proper SPDX id [1]

btw Thomas (tglx) posted a new patch set with the updated documentation.

[1] https://github.com/nexB/scancode-toolkit/tree/833-espedexify
-- 
Cordially
Philippe Ombredanne


Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-12-06 Thread Philippe Ombredanne
On Mon, Dec 4, 2017 at 10:35 PM, Rob Herring  wrote:
> On Thu, Nov 30, 2017 at 10:36:55PM +0100, Philippe Ombredanne wrote:
>> Jagan,
>>
>> On Thu, Nov 30, 2017 at 7:42 PM, Jagan Teki  wrote:
>> []
>> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
>> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> > new file mode 100644
>> > index 000..f5303a3
>> > --- /dev/null
>> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> > @@ -0,0 +1,244 @@
>> > +/*
>> > + * Copyright (C) 2017 Jagan Teki 
>> > + *
>> > + * This file is dual-licensed: you can use it either under the terms
>> > + * of the GPL or the X11 license, at your option. Note that this dual
>> > + * licensing only applies to this file, and not this project as a
>> > + * whole.
>> > + *
>> > + *  a) This library is free software; you can redistribute it and/or
>> > + * modify it under the terms of the GNU General Public License as
>> > + * published by the Free Software Foundation; either version 2 of the
>> > + * License, or (at your option) any later version.
>> > + *
>> > + * This library is distributed in the hope that it will be useful,
>> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> > + * GNU General Public License for more details.
>> > + *
>> > + * Or, alternatively,
>> > + *
>> > + *  b) Permission is hereby granted, free of charge, to any person
>> > + * obtaining a copy of this software and associated documentation
>> > + * files (the "Software"), to deal in the Software without
>> > + * restriction, including without limitation the rights to use,
>> > + * copy, modify, merge, publish, distribute, sublicense, and/or
>> > + * sell copies of the Software, and to permit persons to whom the
>> > + * Software is furnished to do so, subject to the following
>> > + * conditions:
>> > + *
>> > + * The above copyright notice and this permission notice shall be
>> > + * included in all copies or substantial portions of the Software.
>> > + *
>> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> > + * OTHER DEALINGS IN THE SOFTWARE.
>> > + */
>>
>> Rather than this long boilerplate, you might want to use the SPDX ids,
>> as started by Greg and documented by Thomas.
>> Noe that Linus wants the // comment style for the license line, and
>> since there is only two line left here I suggest using it for both
>> lines.
>> You can check also the recent doc patch posted by Thomas (tglx) and
>> comments from Linus and Greg.
>>
>> So I guess you could use this:
>>
>> > +// Copyright (C) 2017 Jagan Teki 
>> > +// SPDX-License-Indentifier: (GPL-2.0+ OR MIT)
>
> Other way around. Make SPDX-License-Indentifier the first line.

My bad. 100% right!

>> NB: what you call X11 is has the MIT license id in the SPDX license list.
>
> Right. That was a common mistake or abiguity in the dts files.
>
>> So you could replace 32 lines by only two lines :) it'[s neat right?
>>
>> And this would also help as we have tagged already ~15K files, so it
>> would help to use this for new files so the amount of cleanup work
>> still left does not increase. Thank you for your kind consideration!
>
> I've been nuging folks to do that for a while now. Of course, now we
> need to go move the ids to the first line at some point.

That's great: if you need some help there I have a tool that can help
detect license and eventually inject a proper SPDX id [1]

btw Thomas (tglx) posted a new patch set with the updated documentation.

[1] https://github.com/nexB/scancode-toolkit/tree/833-espedexify
-- 
Cordially
Philippe Ombredanne


Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-12-04 Thread Rob Herring
On Thu, Nov 30, 2017 at 10:36:55PM +0100, Philippe Ombredanne wrote:
> Jagan,
> 
> On Thu, Nov 30, 2017 at 7:42 PM, Jagan Teki  wrote:
> []
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> > new file mode 100644
> > index 000..f5303a3
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> > @@ -0,0 +1,244 @@
> > +/*
> > + * Copyright (C) 2017 Jagan Teki 
> > + *
> > + * This file is dual-licensed: you can use it either under the terms
> > + * of the GPL or the X11 license, at your option. Note that this dual
> > + * licensing only applies to this file, and not this project as a
> > + * whole.
> > + *
> > + *  a) This library is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU General Public License as
> > + * published by the Free Software Foundation; either version 2 of the
> > + * License, or (at your option) any later version.
> > + *
> > + * This library is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License for more details.
> > + *
> > + * Or, alternatively,
> > + *
> > + *  b) Permission is hereby granted, free of charge, to any person
> > + * obtaining a copy of this software and associated documentation
> > + * files (the "Software"), to deal in the Software without
> > + * restriction, including without limitation the rights to use,
> > + * copy, modify, merge, publish, distribute, sublicense, and/or
> > + * sell copies of the Software, and to permit persons to whom the
> > + * Software is furnished to do so, subject to the following
> > + * conditions:
> > + *
> > + * The above copyright notice and this permission notice shall be
> > + * included in all copies or substantial portions of the Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > + * OTHER DEALINGS IN THE SOFTWARE.
> > + */
> 
> Rather than this long boilerplate, you might want to use the SPDX ids,
> as started by Greg and documented by Thomas.
> Noe that Linus wants the // comment style for the license line, and
> since there is only two line left here I suggest using it for both
> lines.
> You can check also the recent doc patch posted by Thomas (tglx) and
> comments from Linus and Greg.
> 
> So I guess you could use this:
> 
> > +// Copyright (C) 2017 Jagan Teki 
> > +// SPDX-License-Indentifier: (GPL-2.0+ OR MIT)

Other way around. Make SPDX-License-Indentifier the first line.

> NB: what you call X11 is has the MIT license id in the SPDX license list.

Right. That was a common mistake or abiguity in the dts files. 

> So you could replace 32 lines by only two lines :) it'[s neat right?
> 
> And this would also help as we have tagged already ~15K files, so it
> would help to use this for new files so the amount of cleanup work
> still left does not increase. Thank you for your kind consideration!

I've been nuging folks to do that for a while now. Of course, now we 
need to go move the ids to the first line at some point.

Rob


Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-12-04 Thread Rob Herring
On Thu, Nov 30, 2017 at 10:36:55PM +0100, Philippe Ombredanne wrote:
> Jagan,
> 
> On Thu, Nov 30, 2017 at 7:42 PM, Jagan Teki  wrote:
> []
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> > new file mode 100644
> > index 000..f5303a3
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> > @@ -0,0 +1,244 @@
> > +/*
> > + * Copyright (C) 2017 Jagan Teki 
> > + *
> > + * This file is dual-licensed: you can use it either under the terms
> > + * of the GPL or the X11 license, at your option. Note that this dual
> > + * licensing only applies to this file, and not this project as a
> > + * whole.
> > + *
> > + *  a) This library is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU General Public License as
> > + * published by the Free Software Foundation; either version 2 of the
> > + * License, or (at your option) any later version.
> > + *
> > + * This library is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License for more details.
> > + *
> > + * Or, alternatively,
> > + *
> > + *  b) Permission is hereby granted, free of charge, to any person
> > + * obtaining a copy of this software and associated documentation
> > + * files (the "Software"), to deal in the Software without
> > + * restriction, including without limitation the rights to use,
> > + * copy, modify, merge, publish, distribute, sublicense, and/or
> > + * sell copies of the Software, and to permit persons to whom the
> > + * Software is furnished to do so, subject to the following
> > + * conditions:
> > + *
> > + * The above copyright notice and this permission notice shall be
> > + * included in all copies or substantial portions of the Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> > + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> > + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> > + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> > + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > + * OTHER DEALINGS IN THE SOFTWARE.
> > + */
> 
> Rather than this long boilerplate, you might want to use the SPDX ids,
> as started by Greg and documented by Thomas.
> Noe that Linus wants the // comment style for the license line, and
> since there is only two line left here I suggest using it for both
> lines.
> You can check also the recent doc patch posted by Thomas (tglx) and
> comments from Linus and Greg.
> 
> So I guess you could use this:
> 
> > +// Copyright (C) 2017 Jagan Teki 
> > +// SPDX-License-Indentifier: (GPL-2.0+ OR MIT)

Other way around. Make SPDX-License-Indentifier the first line.

> NB: what you call X11 is has the MIT license id in the SPDX license list.

Right. That was a common mistake or abiguity in the dts files. 

> So you could replace 32 lines by only two lines :) it'[s neat right?
> 
> And this would also help as we have tagged already ~15K files, so it
> would help to use this for new files so the amount of cleanup work
> still left does not increase. Thank you for your kind consideration!

I've been nuging folks to do that for a while now. Of course, now we 
need to go move the ids to the first line at some point.

Rob


Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-12-01 Thread Philippe Ombredanne
Dear Jagan,

On Fri, Dec 1, 2017 at 8:54 AM, Maxime Ripard
 wrote:
> On Fri, Dec 01, 2017 at 12:12:14AM +0530, Jagan Teki wrote:
[]
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
>> b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> new file mode 100644
>> index 000..f5303a3
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> @@ -0,0 +1,244 @@
>> +/*
>> + * Copyright (C) 2017 Jagan Teki 
>> + *
>> + * This file is dual-licensed: you can use it either under the terms
>> + * of the GPL or the X11 license, at your option. Note that this dual
>> + * licensing only applies to this file, and not this project as a
>> + * whole.
>> + *
>> + *  a) This library is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU General Public License as
>> + * published by the Free Software Foundation; either version 2 of the
>> + * License, or (at your option) any later version.
>> + *
>> + * This library is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + *
>> + * Or, alternatively,
>> + *
>> + *  b) Permission is hereby granted, free of charge, to any person
>> + * obtaining a copy of this software and associated documentation
>> + * files (the "Software"), to deal in the Software without
>> + * restriction, including without limitation the rights to use,
>> + * copy, modify, merge, publish, distribute, sublicense, and/or
>> + * sell copies of the Software, and to permit persons to whom the
>> + * Software is furnished to do so, subject to the following
>> + * conditions:
>> + *
>> + * The above copyright notice and this permission notice shall be
>> + * included in all copies or substantial portions of the Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + * OTHER DEALINGS IN THE SOFTWARE.
>> + */

Have you considered replacing this fine licensing boilerplate by the
new concise and cleaner SPDX ids?
Could it make sense, especially for new files, to avoid adding
boilerplate that will need to be cleaned up later?
You could get rid of these 37 lines and use this shorthand instead,
using the new conventions started by greg-kh and documented by tglx?

>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +// Copyright (c) 2017 Jagan Teki 


Thomas has sent a first doc patch [1] set and is working on an updated
version.  Jonathan also wrote a nice background article on the topic
at LWN [2].

And as a bonus, this device tree addition of yours minus this
boilerplate could save a few real trees if someone ever prints --god
forbid-- this file, so you would be making a good thing for the
planet! And consider too the energy savings from not having these
extra bytes transferred million of times and not retrieved from disks
spindles.

[1] https://marc.info/?l=linux-kernel=151051532322831=2
[2] https://lwn.net/SubscriberLink/739183/262749cbe307ddc7/
-- 
Cordially
Philippe Ombredanne


Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-12-01 Thread Philippe Ombredanne
Dear Jagan,

On Fri, Dec 1, 2017 at 8:54 AM, Maxime Ripard
 wrote:
> On Fri, Dec 01, 2017 at 12:12:14AM +0530, Jagan Teki wrote:
[]
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
>> b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> new file mode 100644
>> index 000..f5303a3
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
>> @@ -0,0 +1,244 @@
>> +/*
>> + * Copyright (C) 2017 Jagan Teki 
>> + *
>> + * This file is dual-licensed: you can use it either under the terms
>> + * of the GPL or the X11 license, at your option. Note that this dual
>> + * licensing only applies to this file, and not this project as a
>> + * whole.
>> + *
>> + *  a) This library is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU General Public License as
>> + * published by the Free Software Foundation; either version 2 of the
>> + * License, or (at your option) any later version.
>> + *
>> + * This library is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + *
>> + * Or, alternatively,
>> + *
>> + *  b) Permission is hereby granted, free of charge, to any person
>> + * obtaining a copy of this software and associated documentation
>> + * files (the "Software"), to deal in the Software without
>> + * restriction, including without limitation the rights to use,
>> + * copy, modify, merge, publish, distribute, sublicense, and/or
>> + * sell copies of the Software, and to permit persons to whom the
>> + * Software is furnished to do so, subject to the following
>> + * conditions:
>> + *
>> + * The above copyright notice and this permission notice shall be
>> + * included in all copies or substantial portions of the Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + * OTHER DEALINGS IN THE SOFTWARE.
>> + */

Have you considered replacing this fine licensing boilerplate by the
new concise and cleaner SPDX ids?
Could it make sense, especially for new files, to avoid adding
boilerplate that will need to be cleaned up later?
You could get rid of these 37 lines and use this shorthand instead,
using the new conventions started by greg-kh and documented by tglx?

>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +// Copyright (c) 2017 Jagan Teki 


Thomas has sent a first doc patch [1] set and is working on an updated
version.  Jonathan also wrote a nice background article on the topic
at LWN [2].

And as a bonus, this device tree addition of yours minus this
boilerplate could save a few real trees if someone ever prints --god
forbid-- this file, so you would be making a good thing for the
planet! And consider too the energy savings from not having these
extra bytes transferred million of times and not retrieved from disks
spindles.

[1] https://marc.info/?l=linux-kernel=151051532322831=2
[2] https://lwn.net/SubscriberLink/739183/262749cbe307ddc7/
-- 
Cordially
Philippe Ombredanne


Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-11-30 Thread Maxime Ripard
On Fri, Dec 01, 2017 at 12:12:14AM +0530, Jagan Teki wrote:
> Brava Keller is A64 based IoT device, which support
> - Allwinner A64 Cortex-A53
> - AXP803 PMIC
> - 1GB DDR3 RAM
> - 8GB eMMC
> - Mali-400MP2 GPU
> - AP6330 Wifi/BLE
> - Camera OV5640
> - USB Host and OTG
> 
> Signed-off-by: Jagan Teki 
> ---
> Note: Need to test it on hardware
>  
>  arch/arm64/boot/dts/allwinner/Makefile |   1 +
>  .../boot/dts/allwinner/sun50i-a64-brava-keller.dts | 244 
> +
>  2 files changed, 245 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile 
> b/arch/arm64/boot/dts/allwinner/Makefile
> index f505227..af80ca0 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -1,5 +1,6 @@
>  # SPDX-License-Identifier: GPL-2.0
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-brava-keller.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
> b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> new file mode 100644
> index 000..f5303a3
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> @@ -0,0 +1,244 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki 
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of the
> + * License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + * obtaining a copy of this software and associated documentation
> + * files (the "Software"), to deal in the Software without
> + * restriction, including without limitation the rights to use,
> + * copy, modify, merge, publish, distribute, sublicense, and/or
> + * sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following
> + * conditions:
> + *
> + * The above copyright notice and this permission notice shall be
> + * included in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +
> +#include "sun50i-a64.dtsi"
> +
> +#include 
> +
> +/ {
> + model = "Brava Keller";
> + compatible = "brava,brava-keller", "allwinner,sun50i-a64";
> +
> + aliases {
> + serial2 = 
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };

Same comment than on U-Boot.

> + wifi_pwrseq: wifi_pwrseq {
> + compatible = "mmc-pwrseq-simple";
> + pinctrl-names = "default";
> + reset-gpios = < 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */
> + post-power-on-delay-ms = <200>;
> + };
> +};
> +
> + {
> + status = "okay";
> +};
> +
> + {
> + status = "okay";
> +};
> +
> + {
> + pinctrl-names = "default";
> + pinctrl-0 = <_pins>;
> + vmmc-supply = <_dcdc1>;
> + vqmmc-supply = <_dldo4>;
> + mmc-pwrseq = <_pwrseq>;
> + bus-width = <4>;
> + non-removable;
> + status = "okay";
> +
> + brcmf: wifi@1 {
> + reg = <1>;
> + compatible = "brcm,bcm4329-fmac";
> + interrupt-parent = <_pio>;
> + interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>;  /* WL-WAKE-AP: PL3 */
> + interrupt-names = "host-wake";
> + };
> +};
> +
> + {
> + pinctrl-names = "default";
> + pinctrl-0 = <_pins>;
> + vmmc-supply = <_dcdc1>;

You probably have a vqmmc 

Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-11-30 Thread Maxime Ripard
On Fri, Dec 01, 2017 at 12:12:14AM +0530, Jagan Teki wrote:
> Brava Keller is A64 based IoT device, which support
> - Allwinner A64 Cortex-A53
> - AXP803 PMIC
> - 1GB DDR3 RAM
> - 8GB eMMC
> - Mali-400MP2 GPU
> - AP6330 Wifi/BLE
> - Camera OV5640
> - USB Host and OTG
> 
> Signed-off-by: Jagan Teki 
> ---
> Note: Need to test it on hardware
>  
>  arch/arm64/boot/dts/allwinner/Makefile |   1 +
>  .../boot/dts/allwinner/sun50i-a64-brava-keller.dts | 244 
> +
>  2 files changed, 245 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> 
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile 
> b/arch/arm64/boot/dts/allwinner/Makefile
> index f505227..af80ca0 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -1,5 +1,6 @@
>  # SPDX-License-Identifier: GPL-2.0
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-brava-keller.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb
>  dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
> b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> new file mode 100644
> index 000..f5303a3
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> @@ -0,0 +1,244 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki 
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of the
> + * License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + * obtaining a copy of this software and associated documentation
> + * files (the "Software"), to deal in the Software without
> + * restriction, including without limitation the rights to use,
> + * copy, modify, merge, publish, distribute, sublicense, and/or
> + * sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following
> + * conditions:
> + *
> + * The above copyright notice and this permission notice shall be
> + * included in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +/dts-v1/;
> +
> +#include "sun50i-a64.dtsi"
> +
> +#include 
> +
> +/ {
> + model = "Brava Keller";
> + compatible = "brava,brava-keller", "allwinner,sun50i-a64";
> +
> + aliases {
> + serial2 = 
> + };
> +
> + chosen {
> + stdout-path = "serial0:115200n8";
> + };

Same comment than on U-Boot.

> + wifi_pwrseq: wifi_pwrseq {
> + compatible = "mmc-pwrseq-simple";
> + pinctrl-names = "default";
> + reset-gpios = < 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */
> + post-power-on-delay-ms = <200>;
> + };
> +};
> +
> + {
> + status = "okay";
> +};
> +
> + {
> + status = "okay";
> +};
> +
> + {
> + pinctrl-names = "default";
> + pinctrl-0 = <_pins>;
> + vmmc-supply = <_dcdc1>;
> + vqmmc-supply = <_dldo4>;
> + mmc-pwrseq = <_pwrseq>;
> + bus-width = <4>;
> + non-removable;
> + status = "okay";
> +
> + brcmf: wifi@1 {
> + reg = <1>;
> + compatible = "brcm,bcm4329-fmac";
> + interrupt-parent = <_pio>;
> + interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>;  /* WL-WAKE-AP: PL3 */
> + interrupt-names = "host-wake";
> + };
> +};
> +
> + {
> + pinctrl-names = "default";
> + pinctrl-0 = <_pins>;
> + vmmc-supply = <_dcdc1>;

You probably have a vqmmc tosetup too.

> + bus-width = <8>;
> + non-removable;

Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-11-30 Thread Philippe Ombredanne
Jagan,

On Thu, Nov 30, 2017 at 7:42 PM, Jagan Teki  wrote:
[]
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
> b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> new file mode 100644
> index 000..f5303a3
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> @@ -0,0 +1,244 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki 
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of the
> + * License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + * obtaining a copy of this software and associated documentation
> + * files (the "Software"), to deal in the Software without
> + * restriction, including without limitation the rights to use,
> + * copy, modify, merge, publish, distribute, sublicense, and/or
> + * sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following
> + * conditions:
> + *
> + * The above copyright notice and this permission notice shall be
> + * included in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */

Rather than this long boilerplate, you might want to use the SPDX ids,
as started by Greg and documented by Thomas.
Noe that Linus wants the // comment style for the license line, and
since there is only two line left here I suggest using it for both
lines.
You can check also the recent doc patch posted by Thomas (tglx) and
comments from Linus and Greg.

So I guess you could use this:

> +// Copyright (C) 2017 Jagan Teki 
> +// SPDX-License-Indentifier: (GPL-2.0+ OR MIT)

NB: what you call X11 is has the MIT license id in the SPDX license list.

So you could replace 32 lines by only two lines :) it'[s neat right?

And this would also help as we have tagged already ~15K files, so it
would help to use this for new files so the amount of cleanup work
still left does not increase. Thank you for your kind consideration!

-- 
Cordially
Philippe Ombredanne


Re: [PATCH RFC 2/2] arm64: allwinner: a64: Add Brava Keller initial support

2017-11-30 Thread Philippe Ombredanne
Jagan,

On Thu, Nov 30, 2017 at 7:42 PM, Jagan Teki  wrote:
[]
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts 
> b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> new file mode 100644
> index 000..f5303a3
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-brava-keller.dts
> @@ -0,0 +1,244 @@
> +/*
> + * Copyright (C) 2017 Jagan Teki 
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of the
> + * License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + * obtaining a copy of this software and associated documentation
> + * files (the "Software"), to deal in the Software without
> + * restriction, including without limitation the rights to use,
> + * copy, modify, merge, publish, distribute, sublicense, and/or
> + * sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following
> + * conditions:
> + *
> + * The above copyright notice and this permission notice shall be
> + * included in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */

Rather than this long boilerplate, you might want to use the SPDX ids,
as started by Greg and documented by Thomas.
Noe that Linus wants the // comment style for the license line, and
since there is only two line left here I suggest using it for both
lines.
You can check also the recent doc patch posted by Thomas (tglx) and
comments from Linus and Greg.

So I guess you could use this:

> +// Copyright (C) 2017 Jagan Teki 
> +// SPDX-License-Indentifier: (GPL-2.0+ OR MIT)

NB: what you call X11 is has the MIT license id in the SPDX license list.

So you could replace 32 lines by only two lines :) it'[s neat right?

And this would also help as we have tagged already ~15K files, so it
would help to use this for new files so the amount of cleanup work
still left does not increase. Thank you for your kind consideration!

-- 
Cordially
Philippe Ombredanne