* [PATCH v4 0/6] ARM: imx6q{dl}: add the WEIM driver @ 2013-05-28 6:20 Huang Shijie 2013-05-28 6:20 ` [PATCH v4 1/6] drivers: bus: add a new driver for WEIM Huang Shijie ` (5 more replies) 0 siblings, 6 replies; 12+ messages in thread From: Huang Shijie @ 2013-05-28 6:20 UTC (permalink / raw) To: linux-arm-kernel This patch set adds a new driver for WEIM in the imx6q{dl}-sabreauto boards. The WEIM(Wireless External Interface Module) works like a bus. You can attach many different devices on it, such as NOR, onenand. In the case of i.MX6q-sabreauto, only the NOR is connected to WEIM. v3 --> v4: [0] use a more proper pad value for the data pins. [1] remove the weim_remove() hook. [2] remove the blank line. [3] use the lower case for the hex value. [4] add returne value for weim_parse_dt(). [5] rename the pinctrls. v2 --> v3: [0] split the NOR pinctrl. [1] make the driver unloaded. change to bool type in Kconfig. [2] use the of_platform_populate(). [3] remove the unused "interrupt" property from the Doc. v1 --> v2: [0] remove used PADs. [1] fix the wrong pad values, (thanks Alison Chaiken) [2] remove the weim-cs-index. [3] add "fsl" for the weim-cs-timing. [4] remove the partitions info in the document. [5] rewrite the drivers(follow Sascha and Shawn's comments) Huang Shijie (6): drivers: bus: add a new driver for WEIM ARM: dts: imx6q{dl}: fix the pin conflict between SPI and WEIM ARM: dts: imx6qdl: add more information for WEIM ARM: dts: imx6q: add pinctrls for WEIM NOR ARM: dts: imx6dl: add pinctrls for WEIM NOR ARM: dts: imx6qdl-sabreauto: enable the WEIM NOR Documentation/devicetree/bindings/bus/imx-weim.txt | 49 +++++++ arch/arm/boot/dts/imx6dl-sabreauto.dts | 9 +- arch/arm/boot/dts/imx6dl.dtsi | 58 ++++++++ arch/arm/boot/dts/imx6q-sabreauto.dts | 9 +- arch/arm/boot/dts/imx6q.dtsi | 59 +++++++++ arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 21 +++- arch/arm/boot/dts/imx6qdl.dtsi | 4 +- drivers/bus/Kconfig | 9 ++ drivers/bus/Makefile | 1 + drivers/bus/imx-weim.c | 138 ++++++++++++++++++++ 10 files changed, 353 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/bus/imx-weim.txt create mode 100644 drivers/bus/imx-weim.c ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 1/6] drivers: bus: add a new driver for WEIM 2013-05-28 6:20 [PATCH v4 0/6] ARM: imx6q{dl}: add the WEIM driver Huang Shijie @ 2013-05-28 6:20 ` Huang Shijie 2013-05-28 6:43 ` Sascha Hauer ` (2 more replies) 2013-05-28 6:20 ` [PATCH v4 2/6] ARM: dts: imx6q{dl}: fix the pin conflict between SPI and WEIM Huang Shijie ` (4 subsequent siblings) 5 siblings, 3 replies; 12+ messages in thread From: Huang Shijie @ 2013-05-28 6:20 UTC (permalink / raw) To: linux-arm-kernel The WEIM(Wireless External Interface Module) works like a bus. You can attach many different devices on it, such as NOR, onenand. In the case of i.MX6q-sabreauto, the NOR is connected to WEIM. This patch also adds the devicetree binding document. The driver only works when the devicetree is enabled. Signed-off-by: Huang Shijie <b32955@freescale.com> --- Documentation/devicetree/bindings/bus/imx-weim.txt | 49 +++++++ drivers/bus/Kconfig | 9 ++ drivers/bus/Makefile | 1 + drivers/bus/imx-weim.c | 138 ++++++++++++++++++++ 4 files changed, 197 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/bus/imx-weim.txt create mode 100644 drivers/bus/imx-weim.c diff --git a/Documentation/devicetree/bindings/bus/imx-weim.txt b/Documentation/devicetree/bindings/bus/imx-weim.txt new file mode 100644 index 0000000..cedc2a9 --- /dev/null +++ b/Documentation/devicetree/bindings/bus/imx-weim.txt @@ -0,0 +1,49 @@ +Device tree bindings for i.MX Wireless External Interface Module (WEIM) + +The term "wireless" does not imply that the WEIM is literally an interface +without wires. It simply means that this module was originally designed for +wireless and mobile applications that use low-power technology. + +The actual devices are instantiated from the child nodes of a WEIM node. + +Required properties: + + - compatible: Should be set to "fsl,imx6q-weim" + - reg: A resource specifier for the register space + (see the example below) + - clocks: the clock, see the example below. + - #address-cells: Must be set to 2 to allow memory address translation + - #size-cells: Must be set to 1 to allow CS address passing + - ranges: Must be set up to reflect the memory layout with four + integer values for each chip-select line in use: + + <cs-number> 0 <physical address of mapping> <size> + +Timing property for child nodes. It is mandatory, not optional. + + - fsl,weim-cs-timing: The timing array, contains 6 timing values for the + child node. We can get the CS index from the child + node's "reg" property. This property contains the values + for the registers EIM_CSnGCR1, EIM_CSnGCR2, EIM_CSnRCR1, + EIM_CSnRCR2, EIM_CSnWCR1, EIM_CSnWCR2 in this order. + +Example for an imx6q-sabreauto board, the NOR flash connected to the WEIM: + + weim: weim at 021b8000 { + compatible = "fsl,imx6q-weim"; + reg = <0x021b8000 0x4000>; + clocks = <&clks 196>; + #address-cells = <2>; + #size-cells = <1>; + ranges = <0 0 0x08000000 0x08000000>; + + nor at 0,0 { + compatible = "cfi-flash"; + reg = <0 0 0x02000000>; + #address-cells = <1>; + #size-cells = <1>; + bank-width = <2>; + fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000 + 0x0000c000 0x1404a38e 0x00000000>; + }; + }; diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index b05ecab..46cd5bb 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -4,6 +4,15 @@ menu "Bus devices" +config IMX_WEIM + bool "Freescale EIM DRIVER" + depends on ARCH_MXC + help + Driver for i.MX6 WEIM controller. + The WEIM(Wireless External Interface Module) works like a bus. + You can attach many different devices on it, such as NOR, onenand. + But now, we only support the Parallel NOR. + config MVEBU_MBUS bool depends on PLAT_ORION diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index 3c7b53c..436bbcc 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -2,6 +2,7 @@ # Makefile for the bus drivers. # +obj-$(CONFIG_IMX_WEIM) += imx-weim.o obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o obj-$(CONFIG_OMAP_OCP2SCP) += omap-ocp2scp.o diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c new file mode 100644 index 0000000..349f14e --- /dev/null +++ b/drivers/bus/imx-weim.c @@ -0,0 +1,138 @@ +/* + * EIM driver for Freescale's i.MX chips + * + * Copyright (C) 2013 Freescale Semiconductor, Inc. + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ +#include <linux/module.h> +#include <linux/clk.h> +#include <linux/io.h> +#include <linux/of_device.h> + +struct imx_weim { + void __iomem *base; + struct clk *clk; +}; + +static const struct of_device_id weim_id_table[] = { + { .compatible = "fsl,imx6q-weim", }, + {} +}; +MODULE_DEVICE_TABLE(of, weim_id_table); + +#define CS_TIMING_LEN 6 +#define CS_REG_RANGE 0x18 + +/* Parse and set the timing for this device. */ +static int +weim_timing_setup(struct platform_device *pdev, struct device_node *np) +{ + struct imx_weim *weim = platform_get_drvdata(pdev); + u32 value[CS_TIMING_LEN]; + u32 cs_idx; + int ret; + int i; + + /* get the CS index from this child node's "reg" property. */ + ret = of_property_read_u32(np, "reg", &cs_idx); + if (ret) + return ret; + + /* The weim has four chip selects. */ + if (cs_idx > 3) + return -EINVAL; + + ret = of_property_read_u32_array(np, "fsl,weim-cs-timing", + value, CS_TIMING_LEN); + if (ret) + return ret; + + /* set the timing for WEIM */ + for (i = 0; i < CS_TIMING_LEN; i++) + writel(value[i], weim->base + cs_idx * CS_REG_RANGE + i * 4); + return 0; +} + +static int weim_parse_dt(struct platform_device *pdev) +{ + struct device_node *child; + int ret; + + for_each_child_of_node(pdev->dev.of_node, child) { + if (!child->name) + continue; + + ret = weim_timing_setup(pdev, child); + if (ret) { + dev_err(&pdev->dev, "%s set timing failed.\n", + child->full_name); + return ret; + } + } + + ret = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); + if (ret) + dev_err(&pdev->dev, "%s fail to create devices.\n", + pdev->dev.of_node->full_name); + return ret; +} + +static int weim_probe(struct platform_device *pdev) +{ + struct imx_weim *weim; + struct resource *res; + int ret = -EINVAL; + + weim = devm_kzalloc(&pdev->dev, sizeof(*weim), GFP_KERNEL); + if (!weim) { + ret = -ENOMEM; + goto weim_err; + } + platform_set_drvdata(pdev, weim); + + /* get the resource */ + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + weim->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(weim->base)) { + ret = PTR_ERR(weim->base); + goto weim_err; + } + + /* get the clock */ + weim->clk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(weim->clk)) + goto weim_err; + + ret = clk_prepare_enable(weim->clk); + if (ret) + goto weim_err; + + /* parse the device node */ + ret = weim_parse_dt(pdev); + if (ret) { + clk_disable_unprepare(weim->clk); + goto weim_err; + } + + dev_info(&pdev->dev, "WEIM driver registered.\n"); + return 0; + +weim_err: + return ret; +} + +static struct platform_driver weim_driver = { + .driver = { + .name = "imx-weim", + .of_match_table = weim_id_table, + }, + .probe = weim_probe, +}; + +module_platform_driver(weim_driver); +MODULE_AUTHOR("Freescale Semiconductor Inc."); +MODULE_DESCRIPTION("i.MX EIM Controller Driver"); +MODULE_LICENSE("GPL"); -- 1.7.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 1/6] drivers: bus: add a new driver for WEIM 2013-05-28 6:20 ` [PATCH v4 1/6] drivers: bus: add a new driver for WEIM Huang Shijie @ 2013-05-28 6:43 ` Sascha Hauer 2013-05-28 6:50 ` Shawn Guo 2013-06-06 15:09 ` Shawn Guo 2 siblings, 0 replies; 12+ messages in thread From: Sascha Hauer @ 2013-05-28 6:43 UTC (permalink / raw) To: linux-arm-kernel On Tue, May 28, 2013 at 02:20:07PM +0800, Huang Shijie wrote: > The WEIM(Wireless External Interface Module) works like a bus. > You can attach many different devices on it, such as NOR, onenand. > > In the case of i.MX6q-sabreauto, the NOR is connected to WEIM. > > This patch also adds the devicetree binding document. > The driver only works when the devicetree is enabled. > > Signed-off-by: Huang Shijie <b32955@freescale.com> Looks good to me now. Thanks for working on this. Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 1/6] drivers: bus: add a new driver for WEIM 2013-05-28 6:20 ` [PATCH v4 1/6] drivers: bus: add a new driver for WEIM Huang Shijie 2013-05-28 6:43 ` Sascha Hauer @ 2013-05-28 6:50 ` Shawn Guo 2013-06-06 15:09 ` Shawn Guo 2 siblings, 0 replies; 12+ messages in thread From: Shawn Guo @ 2013-05-28 6:50 UTC (permalink / raw) To: linux-arm-kernel Hi Arnd, On Tue, May 28, 2013 at 02:20:07PM +0800, Huang Shijie wrote: > The WEIM(Wireless External Interface Module) works like a bus. > You can attach many different devices on it, such as NOR, onenand. > > In the case of i.MX6q-sabreauto, the NOR is connected to WEIM. > > This patch also adds the devicetree binding document. > The driver only works when the devicetree is enabled. > > Signed-off-by: Huang Shijie <b32955@freescale.com> > --- > Documentation/devicetree/bindings/bus/imx-weim.txt | 49 +++++++ > drivers/bus/Kconfig | 9 ++ > drivers/bus/Makefile | 1 + > drivers/bus/imx-weim.c | 138 ++++++++++++++++++++ What's the general merge path for drivers/bus/ ones? It's not clear to me who is collecting those drivers/bus/ patches. Shawn > 4 files changed, 197 insertions(+), 0 deletions(-) > create mode 100644 Documentation/devicetree/bindings/bus/imx-weim.txt > create mode 100644 drivers/bus/imx-weim.c ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 1/6] drivers: bus: add a new driver for WEIM 2013-05-28 6:20 ` [PATCH v4 1/6] drivers: bus: add a new driver for WEIM Huang Shijie 2013-05-28 6:43 ` Sascha Hauer 2013-05-28 6:50 ` Shawn Guo @ 2013-06-06 15:09 ` Shawn Guo 2013-06-06 15:26 ` Arnd Bergmann 2013-06-06 18:57 ` Arnd Bergmann 2 siblings, 2 replies; 12+ messages in thread From: Shawn Guo @ 2013-06-06 15:09 UTC (permalink / raw) To: linux-arm-kernel On Tue, May 28, 2013 at 02:20:07PM +0800, Huang Shijie wrote: > The WEIM(Wireless External Interface Module) works like a bus. > You can attach many different devices on it, such as NOR, onenand. > > In the case of i.MX6q-sabreauto, the NOR is connected to WEIM. > > This patch also adds the devicetree binding document. > The driver only works when the devicetree is enabled. > > Signed-off-by: Huang Shijie <b32955@freescale.com> > --- > Documentation/devicetree/bindings/bus/imx-weim.txt | 49 +++++++ > drivers/bus/Kconfig | 9 ++ > drivers/bus/Makefile | 1 + > drivers/bus/imx-weim.c | 138 ++++++++++++++++++++ > 4 files changed, 197 insertions(+), 0 deletions(-) > create mode 100644 Documentation/devicetree/bindings/bus/imx-weim.txt > create mode 100644 drivers/bus/imx-weim.c Since no one is collecting drivers/bus/ patches right now, I just applied the whole series to have the patch go via imx -> arm-soc. Please let me know if there is any problem. Shawn ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 1/6] drivers: bus: add a new driver for WEIM 2013-06-06 15:09 ` Shawn Guo @ 2013-06-06 15:26 ` Arnd Bergmann 2013-06-06 18:57 ` Arnd Bergmann 1 sibling, 0 replies; 12+ messages in thread From: Arnd Bergmann @ 2013-06-06 15:26 UTC (permalink / raw) To: linux-arm-kernel On Thursday 06 June 2013, Shawn Guo wrote: > Since no one is collecting drivers/bus/ patches right now, I just > applied the whole series to have the patch go via imx -> arm-soc. > Please let me know if there is any problem. I think that's fine. Arnd ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 1/6] drivers: bus: add a new driver for WEIM 2013-06-06 15:09 ` Shawn Guo 2013-06-06 15:26 ` Arnd Bergmann @ 2013-06-06 18:57 ` Arnd Bergmann 1 sibling, 0 replies; 12+ messages in thread From: Arnd Bergmann @ 2013-06-06 18:57 UTC (permalink / raw) To: linux-arm-kernel On Thursday 06 June 2013 23:09:37 Shawn Guo wrote: > > On Tue, May 28, 2013 at 02:20:07PM +0800, Huang Shijie wrote: > > The WEIM(Wireless External Interface Module) works like a bus. > > You can attach many different devices on it, such as NOR, onenand. > > > > In the case of i.MX6q-sabreauto, the NOR is connected to WEIM. > > > > This patch also adds the devicetree binding document. > > The driver only works when the devicetree is enabled. > > > > Signed-off-by: Huang Shijie <b32955@freescale.com> > > --- > > Documentation/devicetree/bindings/bus/imx-weim.txt | 49 +++++++ > > drivers/bus/Kconfig | 9 ++ > > drivers/bus/Makefile | 1 + > > drivers/bus/imx-weim.c | 138 ++++++++++++++++++++ > > 4 files changed, 197 insertions(+), 0 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/bus/imx-weim.txt > > create mode 100644 drivers/bus/imx-weim.c > > Since no one is collecting drivers/bus/ patches right now, I just > applied the whole series to have the patch go via imx -> arm-soc. > Please let me know if there is any problem. Sounds ok to me. If we see a lot of these, we can try to find a maintainer. Arnd ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 2/6] ARM: dts: imx6q{dl}: fix the pin conflict between SPI and WEIM 2013-05-28 6:20 [PATCH v4 0/6] ARM: imx6q{dl}: add the WEIM driver Huang Shijie 2013-05-28 6:20 ` [PATCH v4 1/6] drivers: bus: add a new driver for WEIM Huang Shijie @ 2013-05-28 6:20 ` Huang Shijie 2013-05-28 6:20 ` [PATCH v4 3/6] ARM: dts: imx6qdl: add more information for WEIM Huang Shijie ` (3 subsequent siblings) 5 siblings, 0 replies; 12+ messages in thread From: Huang Shijie @ 2013-05-28 6:20 UTC (permalink / raw) To: linux-arm-kernel In the imx6q-sabreauto and imx6dl-sabreauto boards, the pin MX6Q{DL}_PAD_EIM_D19 is used as a GPIO for SPI NOR, but it is used as a data pin for the WEIM NOR. In order to fix the conflict, this patch removes the pin from the hog, and adds a new board-level pinctrl: pinctrl_ecspi1_sabreauto. The SPI NOR selects this pinctrl_ecspi1_sabreauto when it is enabled. Signed-off-by: Huang Shijie <b32955@freescale.com> --- arch/arm/boot/dts/imx6dl-sabreauto.dts | 9 ++++++++- arch/arm/boot/dts/imx6q-sabreauto.dts | 9 ++++++++- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/imx6dl-sabreauto.dts b/arch/arm/boot/dts/imx6dl-sabreauto.dts index 60f3038..95da711 100644 --- a/arch/arm/boot/dts/imx6dl-sabreauto.dts +++ b/arch/arm/boot/dts/imx6dl-sabreauto.dts @@ -25,7 +25,14 @@ fsl,pins = < MX6DL_PAD_NANDF_CS2__GPIO6_IO15 0x80000000 MX6DL_PAD_SD2_DAT2__GPIO1_IO13 0x80000000 - MX6DL_PAD_EIM_D19__GPIO3_IO19 0x80000000 + >; + }; + }; + + ecspi1 { + pinctrl_ecspi1_sabreauto: ecspi1-sabreauto { + fsl,pins = < + MX6DL_PAD_EIM_D19__GPIO3_IO19 0x80000000 >; }; }; diff --git a/arch/arm/boot/dts/imx6q-sabreauto.dts b/arch/arm/boot/dts/imx6q-sabreauto.dts index 9fb3e99..09a7580 100644 --- a/arch/arm/boot/dts/imx6q-sabreauto.dts +++ b/arch/arm/boot/dts/imx6q-sabreauto.dts @@ -29,7 +29,14 @@ fsl,pins = < MX6Q_PAD_NANDF_CS2__GPIO6_IO15 0x80000000 MX6Q_PAD_SD2_DAT2__GPIO1_IO13 0x80000000 - MX6Q_PAD_EIM_D19__GPIO3_IO19 0x80000000 + >; + }; + }; + + ecspi1 { + pinctrl_ecspi1_sabreauto: ecspi1-sabreauto { + fsl,pins = < + MX6Q_PAD_EIM_D19__GPIO3_IO19 0x80000000 >; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index d6baa51..a4466e6 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -20,7 +20,7 @@ fsl,spi-num-chipselects = <1>; cs-gpios = <&gpio3 19 0>; pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_ecspi1_1>; + pinctrl-0 = <&pinctrl_ecspi1_1 &pinctrl_ecspi1_sabreauto>; status = "disabled"; /* pin conflict with WEIM NOR */ flash: m25p80 at 0 { -- 1.7.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 3/6] ARM: dts: imx6qdl: add more information for WEIM 2013-05-28 6:20 [PATCH v4 0/6] ARM: imx6q{dl}: add the WEIM driver Huang Shijie 2013-05-28 6:20 ` [PATCH v4 1/6] drivers: bus: add a new driver for WEIM Huang Shijie 2013-05-28 6:20 ` [PATCH v4 2/6] ARM: dts: imx6q{dl}: fix the pin conflict between SPI and WEIM Huang Shijie @ 2013-05-28 6:20 ` Huang Shijie 2013-05-28 6:20 ` [PATCH v4 4/6] ARM: dts: imx6q: add pinctrls for WEIM NOR Huang Shijie ` (2 subsequent siblings) 5 siblings, 0 replies; 12+ messages in thread From: Huang Shijie @ 2013-05-28 6:20 UTC (permalink / raw) To: linux-arm-kernel Add the clock and compatible information for the weim. Also adds the weim label. Signed-off-by: Huang Shijie <b32955@freescale.com> --- arch/arm/boot/dts/imx6qdl.dtsi | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 42e461c..f21d259 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -744,9 +744,11 @@ reg = <0x021b4000 0x4000>; }; - weim at 021b8000 { + weim: weim at 021b8000 { + compatible = "fsl,imx6q-weim"; reg = <0x021b8000 0x4000>; interrupts = <0 14 0x04>; + clocks = <&clks 196>; }; ocotp at 021bc000 { -- 1.7.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 4/6] ARM: dts: imx6q: add pinctrls for WEIM NOR 2013-05-28 6:20 [PATCH v4 0/6] ARM: imx6q{dl}: add the WEIM driver Huang Shijie ` (2 preceding siblings ...) 2013-05-28 6:20 ` [PATCH v4 3/6] ARM: dts: imx6qdl: add more information for WEIM Huang Shijie @ 2013-05-28 6:20 ` Huang Shijie 2013-05-28 6:20 ` [PATCH v4 5/6] ARM: dts: imx6dl: " Huang Shijie 2013-05-28 6:20 ` [PATCH v4 6/6] ARM: dts: imx6qdl-sabreauto: enable the " Huang Shijie 5 siblings, 0 replies; 12+ messages in thread From: Huang Shijie @ 2013-05-28 6:20 UTC (permalink / raw) To: linux-arm-kernel Add two pinctrls for WEIM: one for the weim nor, another for the chipselect. Signed-off-by: Huang Shijie <b32955@freescale.com> --- arch/arm/boot/dts/imx6q.dtsi | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index ed11bcf..d79455d 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -323,6 +323,65 @@ >; }; }; + + weim { + pinctrl_weim_cs0_1: weim_cs0grp-1 { + fsl,pins = < + MX6Q_PAD_EIM_CS0__EIM_CS0_B 0xb0b1 + >; + }; + + pinctrl_weim_nor_1: weimnorgrp-1 { + fsl,pins = < + MX6Q_PAD_EIM_OE__EIM_OE_B 0xb0b1 + MX6Q_PAD_EIM_RW__EIM_RW 0xb0b1 + MX6Q_PAD_EIM_WAIT__EIM_WAIT_B 0xb060 + /* data */ + MX6Q_PAD_EIM_D16__EIM_DATA16 0x1b0b0 + MX6Q_PAD_EIM_D17__EIM_DATA17 0x1b0b0 + MX6Q_PAD_EIM_D18__EIM_DATA18 0x1b0b0 + MX6Q_PAD_EIM_D19__EIM_DATA19 0x1b0b0 + MX6Q_PAD_EIM_D20__EIM_DATA20 0x1b0b0 + MX6Q_PAD_EIM_D21__EIM_DATA21 0x1b0b0 + MX6Q_PAD_EIM_D22__EIM_DATA22 0x1b0b0 + MX6Q_PAD_EIM_D23__EIM_DATA23 0x1b0b0 + MX6Q_PAD_EIM_D24__EIM_DATA24 0x1b0b0 + MX6Q_PAD_EIM_D25__EIM_DATA25 0x1b0b0 + MX6Q_PAD_EIM_D26__EIM_DATA26 0x1b0b0 + MX6Q_PAD_EIM_D27__EIM_DATA27 0x1b0b0 + MX6Q_PAD_EIM_D28__EIM_DATA28 0x1b0b0 + MX6Q_PAD_EIM_D29__EIM_DATA29 0x1b0b0 + MX6Q_PAD_EIM_D30__EIM_DATA30 0x1b0b0 + MX6Q_PAD_EIM_D31__EIM_DATA31 0x1b0b0 + /* address */ + MX6Q_PAD_EIM_A23__EIM_ADDR23 0xb0b1 + MX6Q_PAD_EIM_A22__EIM_ADDR22 0xb0b1 + MX6Q_PAD_EIM_A21__EIM_ADDR21 0xb0b1 + MX6Q_PAD_EIM_A20__EIM_ADDR20 0xb0b1 + MX6Q_PAD_EIM_A19__EIM_ADDR19 0xb0b1 + MX6Q_PAD_EIM_A18__EIM_ADDR18 0xb0b1 + MX6Q_PAD_EIM_A17__EIM_ADDR17 0xb0b1 + MX6Q_PAD_EIM_A16__EIM_ADDR16 0xb0b1 + MX6Q_PAD_EIM_DA15__EIM_AD15 0xb0b1 + MX6Q_PAD_EIM_DA14__EIM_AD14 0xb0b1 + MX6Q_PAD_EIM_DA13__EIM_AD13 0xb0b1 + MX6Q_PAD_EIM_DA12__EIM_AD12 0xb0b1 + MX6Q_PAD_EIM_DA11__EIM_AD11 0xb0b1 + MX6Q_PAD_EIM_DA10__EIM_AD10 0xb0b1 + MX6Q_PAD_EIM_DA9__EIM_AD09 0xb0b1 + MX6Q_PAD_EIM_DA8__EIM_AD08 0xb0b1 + MX6Q_PAD_EIM_DA7__EIM_AD07 0xb0b1 + MX6Q_PAD_EIM_DA6__EIM_AD06 0xb0b1 + MX6Q_PAD_EIM_DA5__EIM_AD05 0xb0b1 + MX6Q_PAD_EIM_DA4__EIM_AD04 0xb0b1 + MX6Q_PAD_EIM_DA3__EIM_AD03 0xb0b1 + MX6Q_PAD_EIM_DA2__EIM_AD02 0xb0b1 + MX6Q_PAD_EIM_DA1__EIM_AD01 0xb0b1 + MX6Q_PAD_EIM_DA0__EIM_AD00 0xb0b1 + >; + }; + + }; }; }; -- 1.7.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 5/6] ARM: dts: imx6dl: add pinctrls for WEIM NOR 2013-05-28 6:20 [PATCH v4 0/6] ARM: imx6q{dl}: add the WEIM driver Huang Shijie ` (3 preceding siblings ...) 2013-05-28 6:20 ` [PATCH v4 4/6] ARM: dts: imx6q: add pinctrls for WEIM NOR Huang Shijie @ 2013-05-28 6:20 ` Huang Shijie 2013-05-28 6:20 ` [PATCH v4 6/6] ARM: dts: imx6qdl-sabreauto: enable the " Huang Shijie 5 siblings, 0 replies; 12+ messages in thread From: Huang Shijie @ 2013-05-28 6:20 UTC (permalink / raw) To: linux-arm-kernel Add two pinctrls for WEIM: one for the weim nor, another for the chipselect. Signed-off-by: Huang Shijie <b32955@freescale.com> --- arch/arm/boot/dts/imx6dl.dtsi | 58 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi index 4b13454..2ecbcbc 100644 --- a/arch/arm/boot/dts/imx6dl.dtsi +++ b/arch/arm/boot/dts/imx6dl.dtsi @@ -183,6 +183,64 @@ }; }; + weim { + pinctrl_weim_cs0_1: weim_cs0grp-1 { + fsl,pins = < + MX6DL_PAD_EIM_CS0__EIM_CS0_B 0xb0b1 + >; + }; + + pinctrl_weim_nor_1: weim_norgrp-1 { + fsl,pins = < + MX6DL_PAD_EIM_OE__EIM_OE_B 0xb0b1 + MX6DL_PAD_EIM_RW__EIM_RW 0xb0b1 + MX6DL_PAD_EIM_WAIT__EIM_WAIT_B 0xb060 + /* data */ + MX6DL_PAD_EIM_D16__EIM_DATA16 0x1b0b0 + MX6DL_PAD_EIM_D17__EIM_DATA17 0x1b0b0 + MX6DL_PAD_EIM_D18__EIM_DATA18 0x1b0b0 + MX6DL_PAD_EIM_D19__EIM_DATA19 0x1b0b0 + MX6DL_PAD_EIM_D20__EIM_DATA20 0x1b0b0 + MX6DL_PAD_EIM_D21__EIM_DATA21 0x1b0b0 + MX6DL_PAD_EIM_D22__EIM_DATA22 0x1b0b0 + MX6DL_PAD_EIM_D23__EIM_DATA23 0x1b0b0 + MX6DL_PAD_EIM_D24__EIM_DATA24 0x1b0b0 + MX6DL_PAD_EIM_D25__EIM_DATA25 0x1b0b0 + MX6DL_PAD_EIM_D26__EIM_DATA26 0x1b0b0 + MX6DL_PAD_EIM_D27__EIM_DATA27 0x1b0b0 + MX6DL_PAD_EIM_D28__EIM_DATA28 0x1b0b0 + MX6DL_PAD_EIM_D29__EIM_DATA29 0x1b0b0 + MX6DL_PAD_EIM_D30__EIM_DATA30 0x1b0b0 + MX6DL_PAD_EIM_D31__EIM_DATA31 0x1b0b0 + /* address */ + MX6DL_PAD_EIM_A23__EIM_ADDR23 0xb0b1 + MX6DL_PAD_EIM_A22__EIM_ADDR22 0xb0b1 + MX6DL_PAD_EIM_A21__EIM_ADDR21 0xb0b1 + MX6DL_PAD_EIM_A20__EIM_ADDR20 0xb0b1 + MX6DL_PAD_EIM_A19__EIM_ADDR19 0xb0b1 + MX6DL_PAD_EIM_A18__EIM_ADDR18 0xb0b1 + MX6DL_PAD_EIM_A17__EIM_ADDR17 0xb0b1 + MX6DL_PAD_EIM_A16__EIM_ADDR16 0xb0b1 + MX6DL_PAD_EIM_DA15__EIM_AD15 0xb0b1 + MX6DL_PAD_EIM_DA14__EIM_AD14 0xb0b1 + MX6DL_PAD_EIM_DA13__EIM_AD13 0xb0b1 + MX6DL_PAD_EIM_DA12__EIM_AD12 0xb0b1 + MX6DL_PAD_EIM_DA11__EIM_AD11 0xb0b1 + MX6DL_PAD_EIM_DA10__EIM_AD10 0xb0b1 + MX6DL_PAD_EIM_DA9__EIM_AD09 0xb0b1 + MX6DL_PAD_EIM_DA8__EIM_AD08 0xb0b1 + MX6DL_PAD_EIM_DA7__EIM_AD07 0xb0b1 + MX6DL_PAD_EIM_DA6__EIM_AD06 0xb0b1 + MX6DL_PAD_EIM_DA5__EIM_AD05 0xb0b1 + MX6DL_PAD_EIM_DA4__EIM_AD04 0xb0b1 + MX6DL_PAD_EIM_DA3__EIM_AD03 0xb0b1 + MX6DL_PAD_EIM_DA2__EIM_AD02 0xb0b1 + MX6DL_PAD_EIM_DA1__EIM_AD01 0xb0b1 + MX6DL_PAD_EIM_DA0__EIM_AD00 0xb0b1 + >; + }; + + }; }; -- 1.7.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v4 6/6] ARM: dts: imx6qdl-sabreauto: enable the WEIM NOR 2013-05-28 6:20 [PATCH v4 0/6] ARM: imx6q{dl}: add the WEIM driver Huang Shijie ` (4 preceding siblings ...) 2013-05-28 6:20 ` [PATCH v4 5/6] ARM: dts: imx6dl: " Huang Shijie @ 2013-05-28 6:20 ` Huang Shijie 5 siblings, 0 replies; 12+ messages in thread From: Huang Shijie @ 2013-05-28 6:20 UTC (permalink / raw) To: linux-arm-kernel Enable the WEIM NOR for imx6q{dl}-sabreauto boards. For the pin conflict with SPI NOR, its status is set to "disabled". Signed-off-by: Huang Shijie <b32955@freescale.com> --- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index a4466e6..e994011 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -58,3 +58,22 @@ wp-gpios = <&gpio1 13 0>; status = "okay"; }; + +&weim { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_weim_nor_1 &pinctrl_weim_cs0_1>; + #address-cells = <2>; + #size-cells = <1>; + ranges = <0 0 0x08000000 0x08000000>; + status = "disabled"; /* pin conflict with SPI NOR */ + + nor at 0,0 { + compatible = "cfi-flash"; + reg = <0 0 0x02000000>; + #address-cells = <1>; + #size-cells = <1>; + bank-width = <2>; + fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000 + 0x0000c000 0x1404a38e 0x00000000>; + }; +}; -- 1.7.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-06-06 18:57 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-05-28 6:20 [PATCH v4 0/6] ARM: imx6q{dl}: add the WEIM driver Huang Shijie 2013-05-28 6:20 ` [PATCH v4 1/6] drivers: bus: add a new driver for WEIM Huang Shijie 2013-05-28 6:43 ` Sascha Hauer 2013-05-28 6:50 ` Shawn Guo 2013-06-06 15:09 ` Shawn Guo 2013-06-06 15:26 ` Arnd Bergmann 2013-06-06 18:57 ` Arnd Bergmann 2013-05-28 6:20 ` [PATCH v4 2/6] ARM: dts: imx6q{dl}: fix the pin conflict between SPI and WEIM Huang Shijie 2013-05-28 6:20 ` [PATCH v4 3/6] ARM: dts: imx6qdl: add more information for WEIM Huang Shijie 2013-05-28 6:20 ` [PATCH v4 4/6] ARM: dts: imx6q: add pinctrls for WEIM NOR Huang Shijie 2013-05-28 6:20 ` [PATCH v4 5/6] ARM: dts: imx6dl: " Huang Shijie 2013-05-28 6:20 ` [PATCH v4 6/6] ARM: dts: imx6qdl-sabreauto: enable the " Huang Shijie
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).