Re: [RFC PATCH 01/13] pinctrl: meson: Add GXL pinctrl definitions

2016-10-31 Thread Kevin Hilman
Neil Armstrong  writes:

> On 10/24/2016 03:03 AM, Linus Walleij wrote:
>> On Fri, Oct 21, 2016 at 4:40 PM, Neil Armstrong  
>> wrote:
>> 
>>> Add support for the Amlogic Meson GXL SoC, this is a partially complete
>>> definition only based on the Amlogic Vendor tree.
>>>
>>> This definition differs a lot from the GXBB and needs a separate entry.
>>>
>>> Signed-off-by: Neil Armstrong 
>> 
>> Looks good to me. Tell me when I may apply it, it looks orthogonal
>> to the rest of the patches.
>> 
>> Yours,
>> Linus Walleij
>> 
>
> Hi Linus,
>
> I'm ok to have it applied as soon as possible, but I can send a clean non-rfc 
> patch if needed.
>

Acked-by: Kevin Hilman 

I was hoping to have a bit clearer info from the vendor, but based on
vendor BSP, I think we have most of the info, and can do the minor
fixups if/when we get detailed documentation.

Kevin


Re: [RFC PATCH 01/13] pinctrl: meson: Add GXL pinctrl definitions

2016-10-31 Thread Neil Armstrong
On 10/24/2016 03:03 AM, Linus Walleij wrote:
> On Fri, Oct 21, 2016 at 4:40 PM, Neil Armstrong  
> wrote:
> 
>> Add support for the Amlogic Meson GXL SoC, this is a partially complete
>> definition only based on the Amlogic Vendor tree.
>>
>> This definition differs a lot from the GXBB and needs a separate entry.
>>
>> Signed-off-by: Neil Armstrong 
> 
> Looks good to me. Tell me when I may apply it, it looks orthogonal
> to the rest of the patches.
> 
> Yours,
> Linus Walleij
> 

Hi Linus,

I'm ok to have it applied as soon as possible, but I can send a clean non-rfc 
patch if needed.

Thanks,
Neil


Re: [RFC PATCH 01/13] pinctrl: meson: Add GXL pinctrl definitions

2016-10-30 Thread Rob Herring
On Fri, Oct 21, 2016 at 04:40:26PM +0200, Neil Armstrong wrote:
> Add support for the Amlogic Meson GXL SoC, this is a partially complete
> definition only based on the Amlogic Vendor tree.
> 
> This definition differs a lot from the GXBB and needs a separate entry.
> 
> Signed-off-by: Neil Armstrong 
> ---
>  .../devicetree/bindings/pinctrl/meson,pinctrl.txt  |   2 +

Acked-by: Rob Herring 

>  drivers/pinctrl/meson/Makefile |   3 +-
>  drivers/pinctrl/meson/pinctrl-meson-gxl.c  | 589 
> +
>  drivers/pinctrl/meson/pinctrl-meson.c  |   8 +
>  drivers/pinctrl/meson/pinctrl-meson.h  |   2 +
>  include/dt-bindings/gpio/meson-gxl-gpio.h  | 131 +
>  6 files changed, 734 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gxl.c
>  create mode 100644 include/dt-bindings/gpio/meson-gxl-gpio.h


Re: [RFC PATCH 01/13] pinctrl: meson: Add GXL pinctrl definitions

2016-10-23 Thread Linus Walleij
On Fri, Oct 21, 2016 at 4:40 PM, Neil Armstrong  wrote:

> Add support for the Amlogic Meson GXL SoC, this is a partially complete
> definition only based on the Amlogic Vendor tree.
>
> This definition differs a lot from the GXBB and needs a separate entry.
>
> Signed-off-by: Neil Armstrong 

Looks good to me. Tell me when I may apply it, it looks orthogonal
to the rest of the patches.

Yours,
Linus Walleij


[RFC PATCH 01/13] pinctrl: meson: Add GXL pinctrl definitions

2016-10-21 Thread Neil Armstrong
Add support for the Amlogic Meson GXL SoC, this is a partially complete
definition only based on the Amlogic Vendor tree.

This definition differs a lot from the GXBB and needs a separate entry.

Signed-off-by: Neil Armstrong 
---
 .../devicetree/bindings/pinctrl/meson,pinctrl.txt  |   2 +
 drivers/pinctrl/meson/Makefile |   3 +-
 drivers/pinctrl/meson/pinctrl-meson-gxl.c  | 589 +
 drivers/pinctrl/meson/pinctrl-meson.c  |   8 +
 drivers/pinctrl/meson/pinctrl-meson.h  |   2 +
 include/dt-bindings/gpio/meson-gxl-gpio.h  | 131 +
 6 files changed, 734 insertions(+), 1 deletion(-)
 create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gxl.c
 create mode 100644 include/dt-bindings/gpio/meson-gxl-gpio.h

diff --git a/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt 
b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
index fe7fe0b..2392557 100644
--- a/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
@@ -7,6 +7,8 @@ Required properties for the root node:
  "amlogic,meson8b-aobus-pinctrl"
  "amlogic,meson-gxbb-periphs-pinctrl"
  "amlogic,meson-gxbb-aobus-pinctrl"
+ "amlogic,meson-gxl-periphs-pinctrl"
+ "amlogic,meson-gxl-aobus-pinctrl"
  - reg: address and size of registers controlling irq functionality
 
 === GPIO sub-nodes ===
diff --git a/drivers/pinctrl/meson/Makefile b/drivers/pinctrl/meson/Makefile
index 24434f1..27c5b51 100644
--- a/drivers/pinctrl/meson/Makefile
+++ b/drivers/pinctrl/meson/Makefile
@@ -1,2 +1,3 @@
-obj-y  += pinctrl-meson8.o pinctrl-meson8b.o pinctrl-meson-gxbb.o
+obj-y  += pinctrl-meson8.o pinctrl-meson8b.o
+obj-y  += pinctrl-meson-gxbb.o pinctrl-meson-gxl.o
 obj-y  += pinctrl-meson.o
diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c 
b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
new file mode 100644
index 000..25694f7
--- /dev/null
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
@@ -0,0 +1,589 @@
+/*
+ * Pin controller and GPIO driver for Amlogic Meson GXL.
+ *
+ * Copyright (C) 2016 Endless Mobile, Inc.
+ * Author: Carlo Caione 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include 
+#include "pinctrl-meson.h"
+
+#define EE_OFF 10
+
+static const struct pinctrl_pin_desc meson_gxl_periphs_pins[] = {
+   MESON_PIN(GPIOZ_0, EE_OFF),
+   MESON_PIN(GPIOZ_1, EE_OFF),
+   MESON_PIN(GPIOZ_2, EE_OFF),
+   MESON_PIN(GPIOZ_3, EE_OFF),
+   MESON_PIN(GPIOZ_4, EE_OFF),
+   MESON_PIN(GPIOZ_5, EE_OFF),
+   MESON_PIN(GPIOZ_6, EE_OFF),
+   MESON_PIN(GPIOZ_7, EE_OFF),
+   MESON_PIN(GPIOZ_8, EE_OFF),
+   MESON_PIN(GPIOZ_9, EE_OFF),
+   MESON_PIN(GPIOZ_10, EE_OFF),
+   MESON_PIN(GPIOZ_11, EE_OFF),
+   MESON_PIN(GPIOZ_12, EE_OFF),
+   MESON_PIN(GPIOZ_13, EE_OFF),
+   MESON_PIN(GPIOZ_14, EE_OFF),
+   MESON_PIN(GPIOZ_15, EE_OFF),
+
+   MESON_PIN(GPIOH_0, EE_OFF),
+   MESON_PIN(GPIOH_1, EE_OFF),
+   MESON_PIN(GPIOH_2, EE_OFF),
+   MESON_PIN(GPIOH_3, EE_OFF),
+   MESON_PIN(GPIOH_4, EE_OFF),
+   MESON_PIN(GPIOH_5, EE_OFF),
+   MESON_PIN(GPIOH_6, EE_OFF),
+   MESON_PIN(GPIOH_7, EE_OFF),
+   MESON_PIN(GPIOH_8, EE_OFF),
+   MESON_PIN(GPIOH_9, EE_OFF),
+
+   MESON_PIN(BOOT_0, EE_OFF),
+   MESON_PIN(BOOT_1, EE_OFF),
+   MESON_PIN(BOOT_2, EE_OFF),
+   MESON_PIN(BOOT_3, EE_OFF),
+   MESON_PIN(BOOT_4, EE_OFF),
+   MESON_PIN(BOOT_5, EE_OFF),
+   MESON_PIN(BOOT_6, EE_OFF),
+   MESON_PIN(BOOT_7, EE_OFF),
+   MESON_PIN(BOOT_8, EE_OFF),
+   MESON_PIN(BOOT_9, EE_OFF),
+   MESON_PIN(BOOT_10, EE_OFF),
+   MESON_PIN(BOOT_11, EE_OFF),
+   MESON_PIN(BOOT_12, EE_OFF),
+   MESON_PIN(BOOT_13, EE_OFF),
+   MESON_PIN(BOOT_14, EE_OFF),
+   MESON_PIN(BOOT_15, EE_OFF),
+
+   MESON_PIN(CARD_0, EE_OFF),
+   MESON_PIN(CARD_1, EE_OFF),
+   MESON_PIN(CARD_2, EE_OFF),
+   MESON_PIN(CARD_3, EE_OFF),
+   MESON_PIN(CARD_4, EE_OFF),
+   MESON_PIN(CARD_5, EE_OFF),
+   MESON_PIN(CARD_6, EE_OFF),
+
+   MESON_PIN(GPIODV_0, EE_OFF),
+   MESON_PIN(GPIODV_1, EE_OFF),
+   MESON_PIN(GPIODV_2, EE_OFF),
+   MESON_PIN(GPIODV_3, EE_OFF),
+   MESON_PIN(GPIODV_4, EE_OFF),
+   MESON_PIN(GPIODV_5, EE_OFF),
+   MESON_PIN(GPIODV_6, EE_OFF),
+   MESON_PIN(GPIODV_7, EE_OFF),
+   MESON_PIN(GPIODV_8, EE_OFF),
+   MESON_PIN(GPIODV_9, EE_OFF),
+   MESON_PIN(GPIODV_10, EE_OFF),
+   MESON_PIN(GPIODV_11, EE_OFF),
+   MESON_PIN(GPIODV_12, EE_OFF),
+