Skip to contentSkip to conversation

video: imxfb: Introduce regulator support.

PATCH Superseded Denis Carikli 3 participants 11 messages Oct 24, 2013

Subsystems (7)

v6 of 14 Superseded Latest is v14 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/7 video: imxfb: Introduce regulator support.

This commit is based on the following commit by Fabio Estevam:
4344429 video: mxsfb: Introduce regulator support

Cc Fabio Estevam <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-fbdev at vger.kernel.org
Cc Eric B?nard <[email protected]>
---
 drivers/video/imxfb.c |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/video/imxfb.c +29 -0
index 44ee678..4bf3837 100644
@@ -28,6 +28,7 @@
 #include <linux/cpufreq.h>
 #include <linux/clk.h>
 #include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
 #include <linux/math64.h>
@@ -145,6 +146,7 @@ struct imxfb_info {
 	struct clk		*clk_ipg;
 	struct clk		*clk_ahb;
 	struct clk		*clk_per;
+	struct regulator	*reg_lcd;
 	enum imxfb_type		devtype;
 	bool			enabled;
 
@@ -563,12 +565,23 @@ static void imxfb_exit_backlight(struct imxfb_info *fbi)
 
 static void imxfb_enable_controller(struct imxfb_info *fbi)
 {
+	int ret;
 
 	if (fbi->enabled)
 		return;
 
 	pr_debug("Enabling LCD controller\n");
 
+	if (fbi->reg_lcd) {
+		ret = regulator_enable(fbi->reg_lcd);
+		if (ret) {
+			dev_err(&fbi->pdev->dev,
+				"lcd regulator enable failed with error: %d\n",
+				ret);
+			return;
+		}
+	}
+
 	writel(fbi->screen_dma, fbi->regs + LCDC_SSA);
 
 	/* panning offset 0 (0 pixel offset)        */
@@ -597,6 +610,8 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
 
 static void imxfb_disable_controller(struct imxfb_info *fbi)
 {
+	int ret;
+
 	if (!fbi->enabled)
 		return;
 
@@ -613,6 +628,14 @@ static void imxfb_disable_controller(struct imxfb_info *fbi)
 	fbi->enabled = false;
 
 	writel(0, fbi->regs + LCDC_RMCR);
+
+	if (fbi->reg_lcd) {
+		ret = regulator_disable(fbi->reg_lcd);
+		if (ret)
+			dev_err(&fbi->pdev->dev,
+				"lcd regulator disable failed with error: %d\n",
+				ret);
+	}
 }
 
 static int imxfb_blank(int blank, struct fb_info *info)
@@ -1020,6 +1043,12 @@ static int imxfb_probe(struct platform_device *pdev)
 		goto failed_register;
 	}
 
+	fbi->reg_lcd = devm_regulator_get(&pdev->dev, "lcd");
+	if (IS_ERR(fbi->reg_lcd)) {
+		dev_info(&pdev->dev, "No lcd regulator used.\n");
+		fbi->reg_lcd = NULL;
+	}
+
 	imxfb_enable_controller(fbi);
 	fbi->pdev = pdev;
 #ifdef PWMR_BACKLIGHT_AVAILABLE
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v6 2/7 video: imxfb: Also add pwmr for the device tree.

pwmr has to be set to get the imxfb backlight work, though pwmr was only configurable trough the platform data.

Cc Rob Herring <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>
Cc devicetree at vger.kernel.org
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc linux-fbdev at vger.kernel.org
Cc Sascha Hauer <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc Eric B?nard <[email protected]>
---
 .../devicetree/bindings/video/fsl,imx-fb.txt       |    3 +++
 drivers/video/imxfb.c                              |    2 ++
 2 files changed, 5 insertions(+)
Documentation/devicetree/bindings/video/fsl,imx-fb.txt +3 -0
index 46da08d..ac457ae 100644
@@ -17,6 +17,9 @@ Required nodes:
 Optional properties:
 - fsl,dmacr: DMA Control Register value. This is optional. By default, the
 	register is not modified as recommended by the datasheet.
+- fsl,pwmr:  LCDC PWM Contrast Control Register value. That property is
+	optional, but defining it is necessary to get the backlight working. If that
+	property is ommited, the register is zeroed.
 - fsl,lscr1: LCDC Sharp Configuration Register value.
 
 Example:
drivers/video/imxfb.c +2 -0
index 4bf3837..f09372d 100644
@@ -833,6 +833,8 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)
 
 		of_property_read_u32(np, "fsl,dmacr", &fbi->dmacr);
 
+		of_property_read_u32(np, "fsl,pwmr", &fbi->pwmr);
+
 		/* These two function pointers could be used by some specific
 		 * platforms. */
 		fbi->lcd_power = NULL;
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v6 3/7 ARM: imx{25, 27} DT: Permit the selection of the imxfb framebuffer driver.

In reply to Denis Carikli

Without that patch, a user can't select the imxfb driver when the i.MX25 and/or
the i.MX27 device tree board are selected and that no boards that selects IMX_HAVE_PLATFORM_IMX_FB are compiled in.

Cc Rob Herring <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>
Cc devicetree at vger.kernel.org
Cc Sascha Hauer <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc Russell King <[email protected]>
Cc Eric B?nard <[email protected]>

---
ChangeLog v5->v6:
- Reworked the patch not to make DT boards depend on IMX_HAVE_PLATFORM_IMX_FB.
- Added better explanations of why that patch is needed in the commit message.

---
 arch/arm/mach-imx/Kconfig         |    5 +++++
 arch/arm/mach-imx/devices/Kconfig |    1 +
 drivers/video/Kconfig             |    2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-imx/Kconfig +5 -0
index 9f67338..3ccb5d5 100644
@@ -64,6 +64,9 @@ config ARCH_HAS_RNGA
 config HAVE_IMX_ANATOP
 	bool
 
+config HAVE_IMX_FB
+       bool
+
 config HAVE_IMX_GPC
 	bool
 
@@ -254,6 +257,7 @@ endchoice
 config MACH_IMX25_DT
 	bool "Support i.MX25 platforms from device tree"
 	select SOC_IMX25
+	select HAVE_IMX_FB
 	help
 	  Include support for Freescale i.MX25 based platforms
 	  using the device tree for discovery
@@ -442,6 +446,7 @@ config MACH_IMX27IPCAM
 config MACH_IMX27_DT
 	bool "Support i.MX27 platforms from device tree"
 	select SOC_IMX27
+	select HAVE_IMX_FB
 	help
 	  Include support for Freescale i.MX27 based platforms
 	  using the device tree for discovery
arch/arm/mach-imx/devices/Kconfig +1 -0
index 68c74fb..a7af9f4 100644
@@ -26,6 +26,7 @@ config IMX_HAVE_PLATFORM_IMXDI_RTC
 	bool
 
 config IMX_HAVE_PLATFORM_IMX_FB
+	select HAVE_IMX_FB
 	bool
 
 config IMX_HAVE_PLATFORM_IMX_I2C
drivers/video/Kconfig +1 -1
index 14317b7..a97529f 100644
@@ -363,7 +363,7 @@ config FB_SA1100
 
 config FB_IMX
 	tristate "Freescale i.MX1/21/25/27 LCD support"
-	depends on FB && IMX_HAVE_PLATFORM_IMX_FB
+	depends on FB && HAVE_IMX_FB
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v6 3/7 ARM: imx{25,27} DT: Permit the selection of the imxfb framebuffer driver.

Quoted 73 lines · Denis Carikli

Without that patch, a user can't select the imxfb driver when the i.MX25 and/or
the i.MX27 device tree board are selected and that no boards that selects IMX_HAVE_PLATFORM_IMX_FB are compiled in.

Cc Rob Herring <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>
Cc devicetree at vger.kernel.org
Cc Sascha Hauer <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc Russell King <[email protected]>
Cc Eric B?nard <[email protected]>

---
ChangeLog v5->v6:
- Reworked the patch not to make DT boards depend on IMX_HAVE_PLATFORM_IMX_FB.
- Added better explanations of why that patch is needed in the commit message.

---
 arch/arm/mach-imx/Kconfig         |    5 +++++
 arch/arm/mach-imx/devices/Kconfig |    1 +
 drivers/video/Kconfig             |    2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-imx/Kconfig +5 -0
index 9f67338..3ccb5d5 100644
@@ -64,6 +64,9 @@ config ARCH_HAS_RNGA
 config HAVE_IMX_ANATOP
 	bool
 
+config HAVE_IMX_FB
+       bool
+
 config HAVE_IMX_GPC
 	bool
 
@@ -254,6 +257,7 @@ endchoice
 config MACH_IMX25_DT
 	bool "Support i.MX25 platforms from device tree"
 	select SOC_IMX25
+	select HAVE_IMX_FB
 	help
 	  Include support for Freescale i.MX25 based platforms
 	  using the device tree for discovery
@@ -442,6 +446,7 @@ config MACH_IMX27IPCAM
 config MACH_IMX27_DT
 	bool "Support i.MX27 platforms from device tree"
 	select SOC_IMX27
+	select HAVE_IMX_FB
 	help
 	  Include support for Freescale i.MX27 based platforms
 	  using the device tree for discovery
arch/arm/mach-imx/devices/Kconfig +1 -0
index 68c74fb..a7af9f4 100644
@@ -26,6 +26,7 @@ config IMX_HAVE_PLATFORM_IMXDI_RTC
 	bool
 
 config IMX_HAVE_PLATFORM_IMX_FB
+	select HAVE_IMX_FB
 	bool
 
 config IMX_HAVE_PLATFORM_IMX_I2C
drivers/video/Kconfig +0 -0
index 14317b7..a97529f 100644

drivers/video/Kconfig config FB_SA1100 · line 366

Quoted 5 lines
drivers/video/Kconfig +1 -1
@@ -363,7 +363,7 @@ config FB_SA1100
 
 config FB_IMX
 	tristate "Freescale i.MX1/21/25/27 LCD support"
-	depends on FB && IMX_HAVE_PLATFORM_IMX_FB
+	depends on FB && HAVE_IMX_FB

Or simply have it depend on ARCH_MXC?

	depends on FB && ARCH_MXC

Shawn

Quoted 6 lines
drivers/video/Kconfig +0 -0
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH v6 3/7 ARM: imx{25,27} DT: Permit the selection of the imxfb framebuffer driver.

Hi Shawn,

Le Thu, 24 Oct 2013 16:15:34 +0800,
Shawn Guo <[email protected]> a ?crit :

Quoted 9 lines

drivers/video/Kconfig config FB_SA1100 · line 366

Quoted 4 lines

config FB_IMX

drivers/video/Kconfig +1 -1
 	tristate "Freescale i.MX1/21/25/27 LCD support"
-	depends on FB && IMX_HAVE_PLATFORM_IMX_FB
+	depends on FB && HAVE_IMX_FB

Or simply have it depend on ARCH_MXC?

	depends on FB && ARCH_MXC

but not all MXC have IMX_FB : isn't that a problem ?

Eric

#5 lore raw

PATCH v6 3/7 ARM: imx{25,27} DT: Permit the selection of the imxfb framebuffer driver.

Quoted 11 lines · Eric B?nard

Hi Shawn,

Le Thu, 24 Oct 2013 16:15:34 +0800,
Shawn Guo <[email protected]> a ?crit :

Quoted 7 lines

drivers/video/Kconfig config FB_SA1100 · line 366

Quoted 4 lines

config FB_IMX

drivers/video/Kconfig +1 -1
 	tristate "Freescale i.MX1/21/25/27 LCD support"
-	depends on FB && IMX_HAVE_PLATFORM_IMX_FB
+	depends on FB && HAVE_IMX_FB

Or simply have it depend on ARCH_MXC?

Quoted 3 lines
Quoted 2 lines
	depends on FB && ARCH_MXC

but not all MXC have IMX_FB : isn't that a problem ?

Is it really a problem that you see this option when you configure an imx51 kernel? The prompt clearly tells you do not need this option for an imx51 kernel. Or will it cause any real problem even if you select it for an imx51 kernel, except you build in a driver which will never be instantiated? I've seen drivers even start drop ARCH_* dependency to get a better randconfig build test coverage.

Shawn

#6 lore raw

PATCH v6 3/7 ARM: imx{25,27} DT: Permit the selection of the imxfb framebuffer driver.

Hi Shawn,

Le Thu, 24 Oct 2013 16:31:45 +0800,
Shawn Guo <[email protected]> a ?crit :

Quoted 14 lines · Eric B?nard
Quoted 13 lines

Hi Shawn,

Le Thu, 24 Oct 2013 16:15:34 +0800,
Shawn Guo <[email protected]> a ?crit :

Quoted 9 lines

drivers/video/Kconfig config FB_SA1100 · line 366

Quoted 4 lines

config FB_IMX

drivers/video/Kconfig +1 -1
 	tristate "Freescale i.MX1/21/25/27 LCD support"
-	depends on FB && IMX_HAVE_PLATFORM_IMX_FB
+	depends on FB && HAVE_IMX_FB

Or simply have it depend on ARCH_MXC?

	depends on FB && ARCH_MXC
Quoted 9 lines
Quoted 1 line

but not all MXC have IMX_FB : isn't that a problem ?

Is it really a problem that you see this option when you configure an imx51 kernel? The prompt clearly tells you do not need this option for an imx51 kernel. Or will it cause any real problem even if you select it for an imx51 kernel, except you build in a driver which will never be instantiated? I've seen drivers even start drop ARCH_* dependency to get a better randconfig build test coverage.

not really a problem for me. If the policy is not to narrow the choices to only the SOC which have the peripheral then we follow it and take your ARCH_MXC approach which is far simpler.

Thanks,
Eric

#7 lore raw

PATCH v6 4/7 pinctrl: pinctrl-imx: add imx25 pinctrl driver

In reply to Denis Carikli

This is mostly cut and paste from the imx35 pinctrl driver. The data was generated using sed and awk on
arch/arm/plat-mxc/include/mach/iomux-mx25.h.

Cc Rob Herring <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>
Cc devicetree at vger.kernel.org
Cc Sascha Hauer <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc Russell King <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Eric B?nard <[email protected]>
---
 .../bindings/pinctrl/fsl,imx25-pinctrl.txt         |   33 ++
 arch/arm/boot/dts/imx25-pinfunc.h                  |  513 ++++++++++++++++++++
 arch/arm/boot/dts/imx25.dtsi                       |    1 +
 arch/arm/mach-imx/Kconfig                          |    2 +
 drivers/pinctrl/Kconfig                            |    8 +
 drivers/pinctrl/Makefile                           |    1 +
 drivers/pinctrl/pinctrl-imx25.c                    |  351 ++++++++++++++
 7 files changed, 909 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,imx25-pinctrl.txt
 create mode 100644 arch/arm/boot/dts/imx25-pinfunc.h
 create mode 100644 drivers/pinctrl/pinctrl-imx25.c
Documentation/devicetree/bindings/pinctrl/fsl,imx25-pinctrl.txt new file +33 -0
new file mode 100644
index 0000000..64906ca
@@ -0,0 +1,33 @@
+* Freescale IMX25 IOMUX Controller
+
+Please refer to fsl,imx-pinctrl.txt in this directory for common binding part
+and usage.
+
+Required properties:
+- compatible: "fsl,imx25-iomuxc"
+- fsl,pins: two integers array, represents a group of pins mux and config
+  setting. The format is fsl,pins = <PIN_FUNC_ID CONFIG>, PIN_FUNC_ID is a
+  pin working on a specific function, CONFIG is the pad setting value like
+  pull-up for this pin. Please refer to imx25 datasheet for the valid pad
+  config settings.
+
+CONFIG bits definition:
+PAD_CTL_DRIVE_VOLAGAGE_18	(1 << 13)
+PAD_CTL_DRIVE_VOLAGAGE_33	(0 << 13)
+PAD_CTL_HYS			(1 << 8)
+PAD_CTL_PKE			(1 << 7)
+PAD_CTL_PUE			(1 << 6)
+PAD_CTL_PUS_100K_DOWN		(0 << 4)
+PAD_CTL_PUS_47K_UP		(1 << 4)
+PAD_CTL_PUS_100K_UP		(2 << 4)
+PAD_CTL_PUS_22K_UP		(3 << 4)
+PAD_CTL_ODE_CMOS		(0 << 3)
+PAD_CTL_ODE_OPENDRAIN		(1 << 3)
+PAD_CTL_DSE_NOMINAL		(0 << 1)
+PAD_CTL_DSE_HIGH		(1 << 1)
+PAD_CTL_DSE_MAX			(2 << 1)
+PAD_CTL_SRE_FAST		(1 << 0)
+PAD_CTL_SRE_SLOW		(0 << 0)
+
+Refer to imx25-pinfunc.h in device tree source folder for all available
+imx25 PIN_FUNC_ID.
arch/arm/boot/dts/imx25-pinfunc.h new file +513 -0

513 lines not on this page · raw message

arch/arm/boot/dts/imx25.dtsi +1 -0
index 737ed5d..5f9879d 100644
@@ -10,6 +10,7 @@
  */
 
 #include "skeleton.dtsi"
+#include "imx25-pinfunc.h"
 
 / {
 	aliases {
arch/arm/mach-imx/Kconfig +2 -0
index 3ccb5d5..88242bd 100644
@@ -114,6 +114,8 @@ config SOC_IMX25
 	select COMMON_CLK
 	select CPU_ARM926T
 	select MXC_AVIC
+	select PINCTRL
+	select PINCTRL_IMX25
 
 config SOC_IMX27
 	bool
drivers/pinctrl/Kconfig +8 -0
index 21db201..d801589 100644
@@ -98,6 +98,14 @@ config PINCTRL_IMX
 	select PINMUX
 	select PINCONF
 
+config PINCTRL_IMX25
+        bool "IMX25 pinctrl driver"
+        depends on OF
+        depends on SOC_IMX25
+        select PINCTRL_IMX
+        help
+          Say Y here to enable the imx25 pinctrl driver
+
 config PINCTRL_IMX35
 	bool "IMX35 pinctrl driver"
 	depends on OF
drivers/pinctrl/Makefile +1 -0
index bbeb980..32a856e 100644
@@ -30,6 +30,7 @@ obj-$(CONFIG_PINCTRL_IMX6SL)	+= pinctrl-imx6sl.o
 obj-$(CONFIG_PINCTRL_FALCON)	+= pinctrl-falcon.o
 obj-$(CONFIG_PINCTRL_MXS)	+= pinctrl-mxs.o
 obj-$(CONFIG_PINCTRL_IMX23)	+= pinctrl-imx23.o
+obj-$(CONFIG_PINCTRL_IMX25)	+= pinctrl-imx25.o
 obj-$(CONFIG_PINCTRL_IMX28)	+= pinctrl-imx28.o
 obj-$(CONFIG_PINCTRL_NOMADIK)	+= pinctrl-nomadik.o
 obj-$(CONFIG_PINCTRL_STN8815)	+= pinctrl-nomadik-stn8815.o
drivers/pinctrl/pinctrl-imx25.c new file +351 -0

351 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#8 lore raw

PATCH v6 5/7 ARM: dts: imx25.dtsi: Add some pinmux pins.

In reply to Denis Carikli

Uart1, fec, i2c1,esdhc1 and audmux were added.

I also added a label to the iomuxc device node like in:
7b7d672 ARM i.MX dts: Consistently add labels to devicenodes

Cc Rob Herring <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>
Cc devicetree at vger.kernel.org
Cc Sascha Hauer <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc Eric B?nard <[email protected]>
---
 arch/arm/boot/dts/imx25.dtsi |  104 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 103 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx25.dtsi +103 -1
index 5f9879d..6ac4c98 100644
@@ -174,9 +174,111 @@
 				status = "disabled";
 			};
 
-			iomuxc at 43fac000{
+			iomuxc: iomuxc at 43fac000 {
 				compatible = "fsl,imx25-iomuxc";
 				reg = <0x43fac000 0x4000>;
+
+				audmux {
+					pinctrl_audmux_1: audmuxgrp-1 {
+						fsl,pins = <
+							MX25_PAD_KPP_COL3__AUD5_TXFS 0xe0
+							MX25_PAD_KPP_COL2__AUD5_TXC  0xe0
+							MX25_PAD_KPP_COL1__AUD5_RXD  0xe0
+							MX25_PAD_KPP_COL0__AUD5_TXD  0xe0
+						>;
+					};
+				};
+
+				esdhc1 {
+					pinctrl_esdhc1_1: esdhc1grp-1 {
+						fsl,pins = <
+							MX25_PAD_SD1_CMD__SD1_CMD      0x400000c0
+							MX25_PAD_SD1_CLK__SD1_CLK      0x400000c0
+							MX25_PAD_SD1_DATA0__SD1_DATA0  0x400000c0
+							MX25_PAD_SD1_DATA1__SD1_DATA1  0x400000c0
+							MX25_PAD_SD1_DATA2__SD1_DATA2  0x400000c0
+							MX25_PAD_SD1_DATA3__SD1_DATA3  0x400000c0
+						>;
+					};
+				};
+
+				fec {
+					pinctrl_fec_1: fecgrp-1 {
+						fsl,pins = <
+							MX25_PAD_FEC_MDC__FEC_MDC       0x80000000
+							MX25_PAD_FEC_MDIO__FEC_MDIO     0x400001e0
+							MX25_PAD_FEC_TDATA0__FEC_TDATA0 0x80000000
+							MX25_PAD_FEC_TDATA1__FEC_TDATA1 0x80000000
+							MX25_PAD_FEC_TX_EN__FEC_TX_EN   0x80000000
+							MX25_PAD_FEC_RDATA0__FEC_RDATA0 0x80000000
+							MX25_PAD_FEC_RDATA1__FEC_RDATA1 0x80000000
+							MX25_PAD_FEC_RX_DV__FEC_RX_DV   0x80000000
+							MX25_PAD_FEC_TX_CLK__FEC_TX_CLK 0x1c0
+						>;
+					};
+				};
+
+				i2c1 {
+					pinctrl_i2c1_1: i2c1grp-1 {
+						fsl,pins = <
+							MX25_PAD_I2C1_CLK__I2C1_CLK 0x80000000
+							MX25_PAD_I2C1_DAT__I2C1_DAT 0x80000000
+						>;
+					};
+				};
+
+				lcdc {
+					pinctrl_lcdc_1: lcdcgrp-1 {
+						fsl,pins = <
+							MX25_PAD_LD0__LD0           0x1
+							MX25_PAD_LD1__LD1           0x1
+							MX25_PAD_LD2__LD2           0x1
+							MX25_PAD_LD3__LD3           0x1
+							MX25_PAD_LD4__LD4           0x1
+							MX25_PAD_LD5__LD5           0x1
+							MX25_PAD_LD6__LD6           0x1
+							MX25_PAD_LD7__LD7           0x1
+							MX25_PAD_LD8__LD8           0x1
+							MX25_PAD_LD9__LD9           0x1
+							MX25_PAD_LD10__LD10         0x1
+							MX25_PAD_LD11__LD11         0x1
+							MX25_PAD_LD12__LD12         0x1
+							MX25_PAD_LD13__LD13         0x1
+							MX25_PAD_LD14__LD14         0x1
+							MX25_PAD_LD15__LD15         0x1
+							MX25_PAD_GPIO_E__LD16       0x1
+							MX25_PAD_GPIO_F__LD17       0x1
+
+							MX25_PAD_HSYNC__HSYNC       0x80000000
+							MX25_PAD_VSYNC__VSYNC       0x80000000
+							MX25_PAD_LSCLK__LSCLK       0x80000000
+							MX25_PAD_OE_ACD__OE_ACD     0x80000000
+							MX25_PAD_CONTRAST__CONTRAST 0x80000000
+						>;
+					};
+				};
+
+				uart1 {
+					pinctrl_uart1_1: uart1grp-1 {
+						fsl,pins = <
+							MX25_PAD_UART1_RTS__UART1_RTS 0xe0
+							MX25_PAD_UART1_CTS__UART1_CTS 0xe0
+							MX25_PAD_UART1_TXD__UART1_TXD 0x80000000
+							MX25_PAD_UART1_RXD__UART1_RXD 0xc0
+						>;
+					};
+				};
+
+				uart2 {
+					pinctrl_uart2_1: uart2grp-1 {
+						fsl,pins = <
+							MX25_PAD_UART2_RXD__UART2_RXD 0x80000000
+							MX25_PAD_UART2_TXD__UART2_TXD 0x80000000
+							MX25_PAD_UART2_RTS__UART2_RTS 0x80000000
+							MX25_PAD_UART2_CTS__UART2_CTS 0x80000000
+						>;
+					};
+				};
 			};
 
 			audmux at 43fb0000 {
Signature · 1 line
1.7.9.5
#9 lore raw

PATCH v6 6/7 ARM: dts: Add support for the cpuimx25 board from Eukrea and its baseboard.

In reply to Denis Carikli

The following devices/functionalities were added:
* Main and secondary UARTs.
* i2c and the pcf8563 device.
* CMO-QVGA(With backlight), DVI-VGA and DVI-SVGA displays
* Ethernet.
* NAND.
* The BP1 button.
* The LED.
* Watchdog
* SD.

Cc Rob Herring <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>
Cc devicetree at vger.kernel.org
Cc Sascha Hauer <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc Eric B?nard <[email protected]>

---
ChangeLog v5->v6:
- Since the sound support is now in a separate patch, remove its mention from the commit message.

---
 arch/arm/boot/dts/imx25-eukrea-cpuimx25.dtsi       |   53 +++++++++
 .../imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts  |   63 +++++++++++
 .../imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts  |   50 +++++++++
 .../imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts   |   50 +++++++++
 .../boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts  |  116 ++++++++++++++++++++
 5 files changed, 332 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx25-eukrea-cpuimx25.dtsi
 create mode 100644 arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts
 create mode 100644 arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts
 create mode 100644 arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts
 create mode 100644 arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
arch/arm/boot/dts/imx25-eukrea-cpuimx25.dtsi new file +53 -0
new file mode 100644
index 0000000..0cc7864
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2013 Eukr?a Electromatique <[email protected]>
+ *
+ * This program 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 program 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include "imx25.dtsi"
+
+/ {
+	model = "Eukrea CPUIMX25";
+	compatible = "eukrea,cpuimx25", "fsl,imx25";
+
+	memory {
+		reg = <0x80000000 0x4000000>; /* 64M */
+	};
+};
+
+&fec {
+	phy-mode = "rmii";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec_1>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1_1>;
+	status = "okay";
+
+	pcf8563 at 51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+	};
+};
+
+&nfc {
+	nand-bus-width = <8>;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
+	status = "okay";
+};
arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts new file +63 -0

63 lines not on this page · raw message

arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts new file +50 -0

50 lines not on this page · raw message

arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts new file +50 -0

50 lines not on this page · raw message

arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts new file +116 -0

116 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#10 lore raw

PATCH v6 7/7 ARM: imx_v4_v5_defconfig: Enable gpio regulator and gpio button/keyboard.

In reply to Denis Carikli

The eukrea mbimxsd25 has a gpio regulator for enabling its
LCD display, it also has a gpio button.

We enable the respective drivers in order to be able to use theses
features with this configuration.

Cc Sascha Hauer <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Eric B?nard <[email protected]>
---
 arch/arm/configs/imx_v4_v5_defconfig |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/configs/imx_v4_v5_defconfig +2 -0
index e958ebe..6309ee5 100644
@@ -91,6 +91,7 @@ CONFIG_SMSC911X=y
 CONFIG_SMSC_PHY=y
 # CONFIG_INPUT_MOUSEDEV is not set
 CONFIG_INPUT_EVDEV=y
+CONFIG_KEYBOARD_GPIO=y
 CONFIG_KEYBOARD_IMX=y
 # CONFIG_INPUT_MOUSE is not set
 CONFIG_INPUT_TOUCHSCREEN=y
@@ -118,6 +119,7 @@ CONFIG_IMX2_WDT=y
 CONFIG_MFD_MC13XXX_SPI=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_GPIO=y
 CONFIG_REGULATOR_MC13783=y
 CONFIG_REGULATOR_MC13892=y
 CONFIG_MEDIA_SUPPORT=y
Signature · 1 line
1.7.9.5