[U-Boot] [PATCH u-boot 2/3] pinctrl: meson: Add GXL Support

2017-10-12 Thread Neil Armstrong
Add the Amlogic Meson GXL pinctrl support based on the GXBB driver and
the synchronized DTS from Linux 4.13.5

Signed-off-by: Neil Armstrong 
---
 drivers/pinctrl/meson/Kconfig |   4 +
 drivers/pinctrl/meson/Makefile|   1 +
 drivers/pinctrl/meson/pinctrl-meson-gxl.c | 736 ++
 3 files changed, 741 insertions(+)
 create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gxl.c

diff --git a/drivers/pinctrl/meson/Kconfig b/drivers/pinctrl/meson/Kconfig
index c3e6901..27ba890 100644
--- a/drivers/pinctrl/meson/Kconfig
+++ b/drivers/pinctrl/meson/Kconfig
@@ -8,4 +8,8 @@ config PINCTRL_MESON_GXBB
bool "Amlogic Meson GXBB SoC pinctrl driver"
select PINCTRL_MESON
 
+config PINCTRL_MESON_GXL
+   bool "Amlogic Meson GXL SoC pinctrl driver"
+   select PINCTRL_MESON
+
 endif
diff --git a/drivers/pinctrl/meson/Makefile b/drivers/pinctrl/meson/Makefile
index 6dde4bc..18921e3 100644
--- a/drivers/pinctrl/meson/Makefile
+++ b/drivers/pinctrl/meson/Makefile
@@ -4,3 +4,4 @@
 
 obj-y  += pinctrl-meson.o
 obj-$(CONFIG_PINCTRL_MESON_GXBB)   += pinctrl-meson-gxbb.o
+obj-$(CONFIG_PINCTRL_MESON_GXL)+= pinctrl-meson-gxl.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..eebfaa9
--- /dev/null
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
@@ -0,0 +1,736 @@
+/*
+ * (C) Copyright 2016 - Beniamino Galvani 
+ *
+ * Based on code from Linux kernel:
+ *   Copyright (C) 2016 Endless Mobile, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include "pinctrl-meson.h"
+
+#define EE_OFF 10
+
+static const unsigned int emmc_nand_d07_pins[] = {
+   PIN(BOOT_0, EE_OFF), PIN(BOOT_1, EE_OFF), PIN(BOOT_2, EE_OFF),
+   PIN(BOOT_3, EE_OFF), PIN(BOOT_4, EE_OFF), PIN(BOOT_5, EE_OFF),
+   PIN(BOOT_6, EE_OFF), PIN(BOOT_7, EE_OFF),
+};
+static const unsigned int emmc_clk_pins[] = { PIN(BOOT_8, EE_OFF) };
+static const unsigned int emmc_cmd_pins[] = { PIN(BOOT_10, EE_OFF) };
+static const unsigned int emmc_ds_pins[] = { PIN(BOOT_15, EE_OFF) };
+
+static const unsigned int nor_d_pins[] = { PIN(BOOT_11, EE_OFF) };
+static const unsigned int nor_q_pins[] = { PIN(BOOT_12, EE_OFF) };
+static const unsigned int nor_c_pins[] = { PIN(BOOT_13, EE_OFF) };
+static const unsigned int nor_cs_pins[]= { PIN(BOOT_15, 
EE_OFF) };
+
+static const unsigned int spi_mosi_pins[]  = { PIN(GPIOX_8, EE_OFF) };
+static const unsigned int spi_miso_pins[]  = { PIN(GPIOX_9, EE_OFF) };
+static const unsigned int spi_ss0_pins[]   = { PIN(GPIOX_10, EE_OFF) };
+static const unsigned int spi_sclk_pins[]  = { PIN(GPIOX_11, EE_OFF) };
+
+static const unsigned int sdcard_d0_pins[] = { PIN(CARD_1, EE_OFF) };
+static const unsigned int sdcard_d1_pins[] = { PIN(CARD_0, EE_OFF) };
+static const unsigned int sdcard_d2_pins[] = { PIN(CARD_5, EE_OFF) };
+static const unsigned int sdcard_d3_pins[] = { PIN(CARD_4, EE_OFF) };
+static const unsigned int sdcard_cmd_pins[] = { PIN(CARD_3, EE_OFF) };
+static const unsigned int sdcard_clk_pins[] = { PIN(CARD_2, EE_OFF) };
+
+static const unsigned int sdio_d0_pins[] = { PIN(GPIOX_0, EE_OFF) };
+static const unsigned int sdio_d1_pins[] = { PIN(GPIOX_1, EE_OFF) };
+static const unsigned int sdio_d2_pins[] = { PIN(GPIOX_2, EE_OFF) };
+static const unsigned int sdio_d3_pins[] = { PIN(GPIOX_3, EE_OFF) };
+static const unsigned int sdio_cmd_pins[] = { PIN(GPIOX_4, EE_OFF) };
+static const unsigned int sdio_clk_pins[] = { PIN(GPIOX_5, EE_OFF) };
+static const unsigned int sdio_irq_pins[] = { PIN(GPIOX_7, EE_OFF) };
+
+static const unsigned int nand_ce0_pins[]  = { PIN(BOOT_8, EE_OFF) };
+static const unsigned int nand_ce1_pins[]  = { PIN(BOOT_9, EE_OFF) };
+static const unsigned int nand_rb0_pins[]  = { PIN(BOOT_10, EE_OFF) };
+static const unsigned int nand_ale_pins[]  = { PIN(BOOT_11, EE_OFF) };
+static const unsigned int nand_cle_pins[]  = { PIN(BOOT_12, EE_OFF) };
+static const unsigned int nand_wen_clk_pins[]  = { PIN(BOOT_13, EE_OFF) };
+static const unsigned int nand_ren_wr_pins[]   = { PIN(BOOT_14, EE_OFF) };
+static const unsigned int nand_dqs_pins[]  = { PIN(BOOT_15, EE_OFF) };
+
+static const unsigned int uart_tx_a_pins[] = { PIN(GPIOX_12, EE_OFF) };
+static const unsigned int uart_rx_a_pins[] = { PIN(GPIOX_13, EE_OFF) };
+static const unsigned int uart_cts_a_pins[]= { PIN(GPIOX_14, EE_OFF) };
+static const unsigned int uart_rts_a_pins[]= { PIN(GPIOX_15, EE_OFF) };
+
+static const unsigned int uart_tx_b_pins[] = { PIN(GPIODV_24, EE_OFF) };
+static const unsigned int uart_rx_b_pins[] = { PIN(GPIODV_25, EE_OFF) };
+static const unsigned int uart_cts_b_pins[]= { PIN(GPIODV_26, EE_OFF) };
+static const unsigned int uart_rts_b_pins[]= { PIN(GPIODV_27, EE_OFF) };
+
+static con

Re: [U-Boot] [PATCH u-boot 2/3] pinctrl: meson: Add GXL Support

2017-10-12 Thread Tom Rini
On Thu, Oct 12, 2017 at 03:50:31PM +0200, Neil Armstrong wrote:

> Add the Amlogic Meson GXL pinctrl support based on the GXBB driver and
> the synchronized DTS from Linux 4.13.5
> 
> Signed-off-by: Neil Armstrong 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH u-boot 2/3] pinctrl: meson: Add GXL Support

2017-10-17 Thread Beniamino Galvani
On Thu, Oct 12, 2017 at 03:50:31PM +0200, Neil Armstrong wrote:
> Add the Amlogic Meson GXL pinctrl support based on the GXBB driver and
> the synchronized DTS from Linux 4.13.5
> 
> Signed-off-by: Neil Armstrong 

Reviewed-by: Beniamino Galvani 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot