Skip to contentSkip to conversation

Devicetree support for Eukrea cpuimx{25,35,51}

PATCH In review Denis Carikli 6 participants 46 messages Jul 15, 2013 – Sep 5, 2013

Subsystems (15)
lore
Share & tools
lore
#0 lore raw

Here are some patches which adds support for the Eukrea cpuimx{25,35,51}
CPU modules, and their respective baseboard, in the devicetree, and the patches on which that support depends on.

Denis.

#1 lore raw

PATCH 1/22 ARM i.MX25: devicetree: add compatible property for imxfb support.

---
 arch/arm/boot/dts/imx25.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx25.dtsi +1 -0
index bcd3171..6a1633d 100644
@@ -394,6 +394,7 @@
 			};
 
 			lcdc at 53fbc000 {
+				compatible = "fsl,imx21-lcdif";
 				reg = <0x53fbc000 0x4000>;
 				interrupts = <39>;
 				clocks = <&clks 103>, <&clks 66>, <&clks 49>;
Signature · 1 line
1.7.9.5
maintainer
#2 lore raw

PATCH 1/22 ARM i.MX25: devicetree: add compatible property for imxfb support.

Quoted 10 lines · Denis Carikli
---
 arch/arm/boot/dts/imx25.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx25.dtsi +0 -0
index bcd3171..6a1633d 100644

arch/arm/boot/dts/imx25.dtsi line 397

Quoted 4 lines
arch/arm/boot/dts/imx25.dtsi +1 -0
@@ -394,6 +394,7 @@
 			};
 
 			lcdc at 53fbc000 {
+				compatible = "fsl,imx21-lcdif";

The driver matches "fsl,imx21-fb", not "fsl,imx21-lcdif". Also please add a i.MX25 specific compatible so that we have the chance to match the specific SoC version in the driver.

Sascha

Signature · 4 lines
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 |
maintainer
#3 lore raw

PATCH 1/22 ARM i.MX25: devicetree: add compatible property for imxfb support.

Quoted 13 lines · Sascha Hauer
Quoted 12 lines · Denis Carikli
---
 arch/arm/boot/dts/imx25.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx25.dtsi +0 -0
index bcd3171..6a1633d 100644
@@ -394,6 +394,7 @@
                      };
 
Quoted 6 lines

arch/arm/boot/dts/imx25.dtsi line 397

Quoted 2 lines
arch/arm/boot/dts/imx25.dtsi +1 -0
                      lcdc at 53fbc000 {
+                             compatible = "fsl,imx21-lcdif";

The driver matches "fsl,imx21-fb", not "fsl,imx21-lcdif". Also please add a i.MX25 specific compatible so that we have the chance to match the specific SoC version in the driver.

A patch was already sent for this:
http://www.spinics.net/lists/arm-kernel/msg258249.html

#4 lore raw

PATCH 2/22 arm/dts: imx25.dtsi: Add an alias for the LCD controller.

In reply to Denis Carikli
---
 arch/arm/boot/dts/imx25.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx25.dtsi +1 -1
index 6a1633d..4837849 100644
@@ -393,7 +393,7 @@
 				status = "disabled";
 			};
 
-			lcdc at 53fbc000 {
+			lcdc: lcdc at 53fbc000 {
 				compatible = "fsl,imx21-lcdif";
 				reg = <0x53fbc000 0x4000>;
 				interrupts = <39>;
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 3/22 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.

---
 .../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..0099f36
@@ -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 4837849..f098603 100644
@@ -10,6 +10,7 @@
  */
 
 #include "skeleton.dtsi"
+#include "imx25-pinfunc.h"
 
 / {
 	aliases {
arch/arm/mach-imx/Kconfig +2 -0
index f7a5ad1..8f7109e 100644
@@ -110,6 +110,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 5a8ad51..133238e 100644
@@ -80,6 +80,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 d64563bf..cdd6606 100644
@@ -27,6 +27,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
#6 lore raw

PATCH 3/22 pinctrl: pinctrl-imx: add imx25 pinctrl driver

Quoted 5 lines · 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.

Quoted 8 lines
---
 .../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 ++++++++++++++

Either we split it into driver part and mach part, or I need an ACK from pinctrl maintainer to take the patch via IMX tree.

Shawn

maintainer
#7 lore raw

PATCH 3/22 pinctrl: pinctrl-imx: add imx25 pinctrl driver

Hi Denis,

Quoted 15 lines · Shawn Guo
Quoted 5 lines · 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.

Quoted 8 lines
---
 .../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 ++++++++++++++
Quoted 2 lines

Either we split it into driver part and mach part, or I need an ACK from pinctrl maintainer to take the patch via IMX tree.

Do you plan to re-submit this patch?

Regards,

Fabio Estevam

#8 lore raw

PATCH 3/22 pinctrl: pinctrl-imx: add imx25 pinctrl driver

Hi Fabio,

Le Thu, 5 Sep 2013 10:04:02 -0300,
Fabio Estevam <[email protected]> a ?crit :

Quoted 18 lines

Hi Denis,

Quoted 15 lines · Shawn Guo
Quoted 13 lines · 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.

---
 .../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 ++++++++++++++
Quoted 4 lines
Quoted 2 lines

Either we split it into driver part and mach part, or I need an ACK from pinctrl maintainer to take the patch via IMX tree.

Do you plan to re-submit this patch?

yes we are working to fix the coments.

Eric

#9 lore raw

PATCH 4/22 arm/dts: imx25.dtsi: Add some pinmux pins.

In reply to Denis Carikli

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

---
 arch/arm/boot/dts/imx25.dtsi |   56 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/arm/boot/dts/imx25.dtsi +56 -0
index f098603..b318106 100644
@@ -177,6 +177,62 @@
 			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
+						>;
+					};
+				};
+				uart1 {
+					pinctrl_uart1_1: uartgrp-1 {
+						fsl,pins = <
+							MX25_PAD_UART1_RTS__UART1_RTS 0xe0
+							MX25_PAD_UART1_CTS__UART1_CTS 0xe0
+							MX25_PAD_UART1_TXD__UART1_TXD 0x10000
+							MX25_PAD_UART1_RXD__UART1_RXD 0xc0
+						>;
+					};
+				};
+				fec {
+					pinctrl_fec_1: fecgrp-1 {
+						fsl,pins = <
+							MX25_PAD_FEC_MDC__FEC_MDC       0x10000
+							MX25_PAD_FEC_MDIO__FEC_MDIO     0x1f0
+							MX25_PAD_FEC_TDATA0__FEC_TDATA0 0x10000
+							MX25_PAD_FEC_TDATA1__FEC_TDATA1 0x10000
+							MX25_PAD_FEC_TX_EN__FEC_TX_EN   0x10000
+							MX25_PAD_FEC_RDATA0__FEC_RDATA0 0x100c0
+							MX25_PAD_FEC_RDATA1__FEC_RDATA1 0x100c0
+							MX25_PAD_FEC_RX_DV__FEC_RX_DV   0x100c0
+							MX25_PAD_FEC_TX_CLK__FEC_TX_CLK 0x1c0
+						>;
+					};
+
+				};
+				i2c1 {
+					pinctrl_i2c1_1: i2c1grp-1 {
+						fsl,pins = <
+							MX25_PAD_I2C1_CLK__I2C1_CLK 0x10000
+							MX25_PAD_I2C1_DAT__I2C1_DAT 0x10000
+						>;
+					};
+				};
+				esdhc1 {
+					pinctrl_esdhc1_1: esdhc1grp-1 {
+						fsl,pins = <
+							MX25_PAD_SD1_CMD__SD1_CMD      0xd0
+							MX25_PAD_SD1_CLK__SD1_CLK      0xd0
+							MX25_PAD_SD1_DATA0__SD1_DATA0  0xd0
+							MX25_PAD_SD1_DATA1__SD1_DATA1  0xd0
+							MX25_PAD_SD1_DATA2__SD1_DATA2  0xd0
+							MX25_PAD_SD1_DATA3__SD1_DATA3  0xd0
+						>;
+					};
+				};
 			};
 
 			audmux at 43fb0000 {
Signature · 1 line
1.7.9.5
#10 lore raw

PATCH 4/22 arm/dts: imx25.dtsi: Add some pinmux pins.

Quoted 12 lines · Denis Carikli

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

---
 arch/arm/boot/dts/imx25.dtsi |   56 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
arch/arm/boot/dts/imx25.dtsi +0 -0
index f098603..b318106 100644

arch/arm/boot/dts/imx25.dtsi line 179

Quoted 3 lines
arch/arm/boot/dts/imx25.dtsi +0 -0
@@ -177,6 +177,62 @@
 			iomuxc at 43fac000{
 				compatible = "fsl,imx25-iomuxc";
 				reg = <0x43fac000 0x4000>;

Have a blank line here.

arch/arm/boot/dts/imx25.dtsi line 189

Quoted 10 lines
arch/arm/boot/dts/imx25.dtsi +10 -0
+				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
+						>;
+					};
+				};

Please have a blank line between nodes, and sort the these nodes in alphabet.

Shawn

Quoted 57 lines
arch/arm/boot/dts/imx25.dtsi +46 -0
+				uart1 {
+					pinctrl_uart1_1: uartgrp-1 {
+						fsl,pins = <
+							MX25_PAD_UART1_RTS__UART1_RTS 0xe0
+							MX25_PAD_UART1_CTS__UART1_CTS 0xe0
+							MX25_PAD_UART1_TXD__UART1_TXD 0x10000
+							MX25_PAD_UART1_RXD__UART1_RXD 0xc0
+						>;
+					};
+				};
+				fec {
+					pinctrl_fec_1: fecgrp-1 {
+						fsl,pins = <
+							MX25_PAD_FEC_MDC__FEC_MDC       0x10000
+							MX25_PAD_FEC_MDIO__FEC_MDIO     0x1f0
+							MX25_PAD_FEC_TDATA0__FEC_TDATA0 0x10000
+							MX25_PAD_FEC_TDATA1__FEC_TDATA1 0x10000
+							MX25_PAD_FEC_TX_EN__FEC_TX_EN   0x10000
+							MX25_PAD_FEC_RDATA0__FEC_RDATA0 0x100c0
+							MX25_PAD_FEC_RDATA1__FEC_RDATA1 0x100c0
+							MX25_PAD_FEC_RX_DV__FEC_RX_DV   0x100c0
+							MX25_PAD_FEC_TX_CLK__FEC_TX_CLK 0x1c0
+						>;
+					};
+
+				};
+				i2c1 {
+					pinctrl_i2c1_1: i2c1grp-1 {
+						fsl,pins = <
+							MX25_PAD_I2C1_CLK__I2C1_CLK 0x10000
+							MX25_PAD_I2C1_DAT__I2C1_DAT 0x10000
+						>;
+					};
+				};
+				esdhc1 {
+					pinctrl_esdhc1_1: esdhc1grp-1 {
+						fsl,pins = <
+							MX25_PAD_SD1_CMD__SD1_CMD      0xd0
+							MX25_PAD_SD1_CLK__SD1_CLK      0xd0
+							MX25_PAD_SD1_DATA0__SD1_DATA0  0xd0
+							MX25_PAD_SD1_DATA1__SD1_DATA1  0xd0
+							MX25_PAD_SD1_DATA2__SD1_DATA2  0xd0
+							MX25_PAD_SD1_DATA3__SD1_DATA3  0xd0
+						>;
+					};
+				};
 			};
 
 			audmux at 43fb0000 {
Signature · 7 lines
1.7.9.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#11 lore raw

PATCH 5/22 ARM: i.MX25 DT: use auxdata to attach imxfb_platform_data

In reply to Denis Carikli

This commit is based on the following commit:
ab2815c3997b179f043a747264d155ab0bc181ad ARM: mxs: use auxdata to attach mxsfb_platform_data

---
 arch/arm/mach-imx/Kconfig    |    1 +
 arch/arm/mach-imx/imx25-dt.c |   75 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 75 insertions(+), 1 deletion(-)
arch/arm/mach-imx/Kconfig +1 -0
index 8f7109e..ed09a63 100644
@@ -255,6 +255,7 @@ endchoice
 config MACH_IMX25_DT
 	bool "Support i.MX25 platforms from device tree"
 	select SOC_IMX25
+	select IMX_HAVE_PLATFORM_IMX_FB
 	help
 	  Include support for Freescale i.MX25 based platforms
 	  using the device tree for discovery
arch/arm/mach-imx/imx25-dt.c +74 -1

90 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer
#12 lore raw

PATCH 5/22 ARM: i.MX25 DT: use auxdata to attach imxfb_platform_data

Quoted 3 lines · Denis Carikli

This commit is based on the following commit:
ab2815c3997b179f043a747264d155ab0bc181ad ARM: mxs: use auxdata to attach mxsfb_platform_data

This patch is not necessary. The imxfb driver has proper devicetree binding since 3.11-rc1.

Sascha

Signature · 4 lines
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 |
#13 lore raw

PATCH 6/22 arm/dts: i.MX25: Add ssi clocks and DMA events.

In reply to Denis Carikli
---
 arch/arm/boot/dts/imx25.dtsi |    6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/imx25.dtsi +6 -0
index b318106..fb37111 100644
@@ -293,6 +293,9 @@
 				compatible = "fsl,imx25-ssi", "fsl,imx21-ssi";
 				reg = <0x50014000 0x4000>;
 				interrupts = <11>;
+				clocks = <&clks 118>;
+				clock-names = "ssi2_ipg";
+				fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */
 				status = "disabled";
 			};
 
@@ -323,6 +326,9 @@
 				compatible = "fsl,imx25-ssi", "fsl,imx21-ssi";
 				reg = <0x50034000 0x4000>;
 				interrupts = <12>;
+				clocks = <&clks 117>;
+				clock-names = "ssi1_ipg";
+				fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */
 				status = "disabled";
 			};
 
Signature · 1 line
1.7.9.5
maintainer
#14 lore raw

PATCH 6/22 arm/dts: i.MX25: Add ssi clocks and DMA events.

Quoted 10 lines · Denis Carikli
---
 arch/arm/boot/dts/imx25.dtsi |    6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/imx25.dtsi +0 -0
index b318106..fb37111 100644

arch/arm/boot/dts/imx25.dtsi line 297

Quoted 5 lines
arch/arm/boot/dts/imx25.dtsi +2 -0
@@ -293,6 +293,9 @@
 				compatible = "fsl,imx25-ssi", "fsl,imx21-ssi";
 				reg = <0x50014000 0x4000>;
 				interrupts = <11>;
+				clocks = <&clks 118>;
+				clock-names = "ssi2_ipg";

ssi2_ipg is wrong. This should be "ipg".

Sascha

Signature · 4 lines
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 |
#15 lore raw

PATCH 6/22 arm/dts: i.MX25: Add ssi clocks and DMA events.

In reply to Denis Carikli
Quoted 10 lines · Denis Carikli
---
 arch/arm/boot/dts/imx25.dtsi |    6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/imx25.dtsi +0 -0
index b318106..fb37111 100644

arch/arm/boot/dts/imx25.dtsi line 298

Quoted 6 lines
arch/arm/boot/dts/imx25.dtsi +3 -0
@@ -293,6 +293,9 @@
 				compatible = "fsl,imx25-ssi", "fsl,imx21-ssi";
 				reg = <0x50014000 0x4000>;
 				interrupts = <11>;
+				clocks = <&clks 118>;
+				clock-names = "ssi2_ipg";
+				fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */

The imx-sdma driver adopts generic DMA bindings since v3.11-rc1. I just sent a patch [1] to update DTS for that.

Shawn

[1] http://www.spinics.net/lists/arm-kernel/msg258803.html

#16 lore raw

PATCH 7/22 arm/dts: i.MX25: Add sdma script path.

In reply to Denis Carikli
---
 arch/arm/boot/dts/imx25.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx25.dtsi +1 -0
index fb37111..f7f024f 100644
@@ -506,6 +506,7 @@
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				interrupts = <34>;
+				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx25-to1.bin";
 			};
 
 			wdog at 53fdc000 {
Signature · 1 line
1.7.9.5
#17 lore raw

PATCH 7/22 arm/dts: i.MX25: Add sdma script path.

Quoted 10 lines · Denis Carikli
---
 arch/arm/boot/dts/imx25.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx25.dtsi +0 -0
index fb37111..f7f024f 100644

arch/arm/boot/dts/imx25.dtsi line 509

Quoted 4 lines
arch/arm/boot/dts/imx25.dtsi +1 -0
@@ -506,6 +506,7 @@
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				interrupts = <34>;
+				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx25-to1.bin";

Please drop "-to1" from the name.

Shawn

Quoted 11 lines
arch/arm/boot/dts/imx25.dtsi +0 -0
 			};
 
 			wdog at 53fdc000 {
Signature · 7 lines
1.7.9.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#18 lore raw

PATCH 8/22 ASoC: eukrea-tlv320: Add DT support.

In reply to Denis Carikli
---
 sound/soc/fsl/Kconfig         |    5 +-
 sound/soc/fsl/eukrea-tlv320.c |  105 +++++++++++++++++++++++++++++++++--------
 2 files changed, 90 insertions(+), 20 deletions(-)
sound/soc/fsl/Kconfig +4 -1
index aa43854..de21f48 100644
@@ -158,12 +158,15 @@ config SND_SOC_EUKREA_TLV320
 	depends on MACH_EUKREA_MBIMX27_BASEBOARD \
 		|| MACH_EUKREA_MBIMXSD25_BASEBOARD \
 		|| MACH_EUKREA_MBIMXSD35_BASEBOARD \
-		|| MACH_EUKREA_MBIMXSD51_BASEBOARD
+		|| MACH_EUKREA_MBIMXSD51_BASEBOARD \
+		|| OF
 	depends on I2C
 	select SND_SOC_TLV320AIC23
 	select SND_SOC_IMX_PCM_FIQ
 	select SND_SOC_IMX_AUDMUX
 	select SND_SOC_IMX_SSI
+	select SND_SOC_FSL_SSI
+	select SND_SOC_IMX_PCM_DMA
 	help
 	  Enable I2S based access to the TLV320AIC23B codec attached
 	  to the SSI interface
sound/soc/fsl/eukrea-tlv320.c +86 -19

172 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#19 lore raw

PATCH 8/22 ASoC: eukrea-tlv320: Add DT support.

Quoted 6 lines · Denis Carikli
---
 sound/soc/fsl/Kconfig         |    5 +-
 sound/soc/fsl/eukrea-tlv320.c |  105 +++++++++++++++++++++++++++++++++--------
 2 files changed, 90 insertions(+), 20 deletions(-)

This patch should be sent to alsa-devel at alsa-project.org with Mark Brown <[email protected]> on copy.

Shawn

#20 lore raw

PATCH 9/22 arm/dts: imx25.dtsi: Add an alias for the Audio Multiplexer.

In reply to Denis Carikli
---
 arch/arm/boot/dts/imx25.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx25.dtsi +1 -1
index f7f024f..b0b2fea 100644
@@ -235,7 +235,7 @@
 				};
 			};
 
-			audmux at 43fb0000 {
+			audmux: audmux at 43fb0000 {
 				compatible = "fsl,imx25-audmux", "fsl,imx31-audmux";
 				reg = <0x43fb0000 0x4000>;
 				status = "disabled";
Signature · 1 line
1.7.9.5
#21 lore raw

PATCH 10/22 arm/dts: Add support for the cpuimx25 board from Eukrea and its baseboard.

In reply to Denis Carikli

Only the following devices/functionalities were added:
* Main UART
* Memory node
* NAND
* i2c and its pcf8563
* Ethernet
* LCD controller
* Sound
* ESDHC

---
 Documentation/devicetree/bindings/arm/fsl.txt     |    4 ++
 arch/arm/boot/dts/eukrea_cpuimx25.dts             |   48 +++++++++++++++++
 arch/arm/boot/dts/eukrea_mbimxsd25-baseboard.dtsi |   59 +++++++++++++++++++++
 3 files changed, 111 insertions(+)
 create mode 100644 arch/arm/boot/dts/eukrea_cpuimx25.dts
 create mode 100644 arch/arm/boot/dts/eukrea_mbimxsd25-baseboard.dtsi
Documentation/devicetree/bindings/arm/fsl.txt +4 -0
index e935d7d..2c19348 100644
@@ -9,6 +9,10 @@ i.MX25 Product Development Kit
 Required root node properties:
     - compatible = "fsl,imx25-pdk", "fsl,imx25";
 
+i.MX25 Eukrea CPUIMX25 Board.
+Required root node properties:
+    - compatible = "fsl,eukrea_cpuimx25", "fsl,imx25";
+
 i.MX27 Product Development Kit
 Required root node properties:
     - compatible = "fsl,imx27-pdk", "fsl,imx27";
arch/arm/boot/dts/eukrea_cpuimx25.dts new file +48 -0

48 lines not on this page · raw message

arch/arm/boot/dts/eukrea_mbimxsd25-baseboard.dtsi new file +59 -0

59 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer
#22 lore raw

PATCH 10/22 arm/dts: Add support for the cpuimx25 board from Eukrea and its baseboard.

arch/arm/boot/dts/eukrea_cpuimx25.dts

Quoted 35 lines · Denis Carikli

Only the following devices/functionalities were added:
* Main UART
* Memory node
* NAND
* i2c and its pcf8563
* Ethernet
* LCD controller
* Sound
* ESDHC

---
 Documentation/devicetree/bindings/arm/fsl.txt     |    4 ++
 arch/arm/boot/dts/eukrea_cpuimx25.dts             |   48 +++++++++++++++++
 arch/arm/boot/dts/eukrea_mbimxsd25-baseboard.dtsi |   59 +++++++++++++++++++++
 3 files changed, 111 insertions(+)
 create mode 100644 arch/arm/boot/dts/eukrea_cpuimx25.dts
 create mode 100644 arch/arm/boot/dts/eukrea_mbimxsd25-baseboard.dtsi
Documentation/devicetree/bindings/arm/fsl.txt +4 -0
index e935d7d..2c19348 100644
@@ -9,6 +9,10 @@ i.MX25 Product Development Kit
 Required root node properties:
     - compatible = "fsl,imx25-pdk", "fsl,imx25";
 
+i.MX25 Eukrea CPUIMX25 Board.
+Required root node properties:
+    - compatible = "fsl,eukrea_cpuimx25", "fsl,imx25";
+
 i.MX27 Product Development Kit
 Required root node properties:
     - compatible = "fsl,imx27-pdk", "fsl,imx27";
arch/arm/boot/dts/eukrea_cpuimx25.dts +0 -0

Currently all i.MX (and most other SoCs aswell) dts files start with the SoC prefix, so this file should be named imx25-eukrea-cpuimx25.dts.

arch/arm/boot/dts/eukrea_cpuimx25.dts line 14

Quoted 3 lines
arch/arm/boot/dts/eukrea_cpuimx25.dts +3 -0
+/dts-v1/;
+#include "imx25.dtsi"
+#include "eukrea_mbimxsd25-baseboard.dtsi"

Same here.

arch/arm/boot/dts/eukrea_cpuimx25.dts line 18

Quoted 4 lines
arch/arm/boot/dts/eukrea_cpuimx25.dts +4 -0
+
+/ {
+	model = "Eukrea CPUIMX25";
+	compatible = "fsl,eukrea_cpuimx25", "fsl,imx25";

As Fabio mentioned in another patch: eukrea,cpuimx25

Sascha

Signature · 4 lines
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 |
#23 lore raw

PATCH 10/22 arm/dts: Add support for the cpuimx25 board from Eukrea and its baseboard.

In reply to Denis Carikli
Quoted 24 lines · Denis Carikli

Only the following devices/functionalities were added:
* Main UART
* Memory node
* NAND
* i2c and its pcf8563
* Ethernet
* LCD controller
* Sound
* ESDHC

---
 Documentation/devicetree/bindings/arm/fsl.txt     |    4 ++
 arch/arm/boot/dts/eukrea_cpuimx25.dts             |   48 +++++++++++++++++
 arch/arm/boot/dts/eukrea_mbimxsd25-baseboard.dtsi |   59 +++++++++++++++++++++
 3 files changed, 111 insertions(+)
 create mode 100644 arch/arm/boot/dts/eukrea_cpuimx25.dts
 create mode 100644 arch/arm/boot/dts/eukrea_mbimxsd25-baseboard.dtsi
Documentation/devicetree/bindings/arm/fsl.txt +0 -0
index e935d7d..2c19348 100644

Documentation/devicetree/bindings/arm/fsl.txt i.MX25 Product Development Kit · line 15

Quoted 7 lines
Documentation/devicetree/bindings/arm/fsl.txt +4 -0
@@ -9,6 +9,10 @@ i.MX25 Product Development Kit
 Required root node properties:
     - compatible = "fsl,imx25-pdk", "fsl,imx25";
 
+i.MX25 Eukrea CPUIMX25 Board.
+Required root node properties:
+    - compatible = "fsl,eukrea_cpuimx25", "fsl,imx25";
+

This is not a board produced by Freescale, and shouldn't be added here. Also recently, it seems that documenting custom board compatible is not required as hard as before.

Quoted 26 lines
Documentation/devicetree/bindings/arm/fsl.txt +0 -0
 i.MX27 Product Development Kit
 Required root node properties:
     - compatible = "fsl,imx27-pdk", "fsl,imx27";
arch/arm/boot/dts/eukrea_cpuimx25.dts new file +17 -0
new file mode 100644
index 0000000..a65243c
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2013 Eukr?a Electromatique <[email protected]>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx25.dtsi"
+#include "eukrea_mbimxsd25-baseboard.dtsi"
+
+/ {
+	model = "Eukrea CPUIMX25";

arch/arm/boot/dts/eukrea_cpuimx25.dts line 27

Quoted 10 lines
arch/arm/boot/dts/eukrea_cpuimx25.dts new file +10 -0
+	compatible = "fsl,eukrea_cpuimx25", "fsl,imx25";
+
+	memory {
+		reg = <0x80000000 0x4000000>; /* 64M */
+	};
+};
+
+&fec {
+	phy-mode = "rmii";
+	status = "okay";

Please consistently put "status" at the end of property list.

arch/arm/boot/dts/eukrea_cpuimx25.dts line 39

Quoted 12 lines
arch/arm/boot/dts/eukrea_cpuimx25.dts new file +12 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_fec_1>;
+};
+
+&nfc {
+	nand-bus-width = <8>;
+	nand-ecc-mode = "hw";
+	nand-on-flash-bbt;
+	status = "okay";
+};
+
+&i2c1 {

Please sort the nodes in alphabet order.

Shawn

Quoted 82 lines
arch/arm/boot/dts/eukrea_cpuimx25.dts new file +9 -0
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_i2c1_1>;
+
+	pcf8563 at 51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+	};
+};
arch/arm/boot/dts/eukrea_mbimxsd25-baseboard.dtsi new file +59 -0
new file mode 100644
index 0000000..ffaf657
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2013 Eukr?a Electromatique <[email protected]>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include "skeleton.dtsi"
+
+/ {
+	sound {
+		compatible = "fsl,eukrea-tlv320";
+		model = "imx25-eukrea-tlv320aic23";
+		ssi-controller = <&ssi1>;
+		fsl,audio-codec = <&tlv320aic23>;
+		mux-int-port = <1>;
+		mux-ext-port = <5>;
+	};
+};
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart1_1>;
+	fsl,uart-has-rtscts;
+	status = "okay";
+};
+
+&lcdc {
+	status = "okay";
+};
+
+&audmux {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_audmux_1>;
+};
+
+&ssi1 {
+	fsl,mode = "i2s-slave";
+	status = "okay";
+};
+
+&i2c1 {
+	tlv320aic23: codec at 1a {
+		compatible = "ti,tlv320aic23";
+		reg = <0x1a>;
+	};
+};
+
+&esdhc1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_esdhc1_1>;
+	cd-gpios = <&gpio1 20>;
+};
Signature · 7 lines
1.7.9.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#24 lore raw

PATCH 11/22 arm/dts: imx51.dtsi: i2c1 : Add pinctrl configuration.

In reply to Denis Carikli
---
 arch/arm/boot/dts/imx51.dtsi |    9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/imx51.dtsi +9 -0
index fb5c2c3..60b2a8e 100644
@@ -410,6 +410,15 @@
 					};
 				};
 
+				i2c1 {
+					pinctrl_i2c1_1: i2c1grp-1 {
+						fsl,pins = <
+							MX51_PAD_SD2_CMD__I2C1_SCL 0x400001ed
+							MX51_PAD_SD2_CLK__I2C1_SDA 0x400001ed
+						>;
+					};
+				};
+
 				i2c2 {
 					pinctrl_i2c2_1: i2c2grp-1 {
 						fsl,pins = <
Signature · 1 line
1.7.9.5
#25 lore raw

PATCH 12/22 video: backlight: Add GPIO Backlight driver.

In reply to Denis Carikli

This initial driver uses and depends on DT bindings.

---
 .../bindings/video/backlight/gpio-backlight.txt    |   18 ++
 drivers/video/backlight/Kconfig                    |    7 +
 drivers/video/backlight/Makefile                   |    1 +
 drivers/video/backlight/gpio_bl.c                  |  226 ++++++++++++++++++++
 4 files changed, 252 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/backlight/gpio-backlight.txt
 create mode 100644 drivers/video/backlight/gpio_bl.c
Documentation/devicetree/bindings/video/backlight/gpio-backlight.txt new file +18 -0
new file mode 100644
index 0000000..362dd40
@@ -0,0 +1,18 @@
+gpio-backlight bindings
+
+Required properties:
+  - compatible: "gpio-backlight"
+  - gpios: describes the gpio that is used for enabling/disabling the backlight
+     (see GPIO binding[0] for more details).
+  - default-brightness-level: the default brightness level (can be 0(off) or
+      1(on) since GPIOs only support theses levels).
+
+[0]: Documentation/devicetree/bindings/gpio/gpio.txt
+
+Example:
+
+	backlight {
+		compatible = "gpio-backlight";
+		gpios = <&gpio3 4 0>;
+		default-brightness-level = <1>;
+	};
drivers/video/backlight/Kconfig +7 -0
index d5ab658..70e7706 100644
@@ -207,6 +207,13 @@ config BACKLIGHT_GENERIC
 	  known as the Corgi backlight driver. If you have a Sharp Zaurus
 	  SL-C7xx, SL-Cxx00 or SL-6000x say y.
 
+config BACKLIGHT_GPIO
+	tristate "GPIO Backlight Driver"
+	depends on OF && GPIOLIB
+	help
+	  If you have a GPIO backlight and that you use the device tree
+	  for booting, say y to enable the GPIO backlight driver.
+
 config BACKLIGHT_LM3533
 	tristate "Backlight Driver for LM3533"
 	depends on BACKLIGHT_CLASS_DEVICE
drivers/video/backlight/Makefile +1 -0
index 92711fe..8cde337 100644
@@ -32,6 +32,7 @@ obj-$(CONFIG_BACKLIGHT_DA903X)		+= da903x_bl.o
 obj-$(CONFIG_BACKLIGHT_DA9052)		+= da9052_bl.o
 obj-$(CONFIG_BACKLIGHT_EP93XX)		+= ep93xx_bl.o
 obj-$(CONFIG_BACKLIGHT_GENERIC)		+= generic_bl.o
+obj-$(CONFIG_BACKLIGHT_GPIO)		+= gpio_bl.o
 obj-$(CONFIG_BACKLIGHT_HP680)		+= hp680_bl.o
 obj-$(CONFIG_BACKLIGHT_HP700)		+= jornada720_bl.o
 obj-$(CONFIG_BACKLIGHT_LM3533)		+= lm3533_bl.o
drivers/video/backlight/gpio_bl.c new file +226 -0

226 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#26 lore raw

PATCH 12/22 video: backlight: Add GPIO Backlight driver.

Quoted 11 lines · Denis Carikli

This initial driver uses and depends on DT bindings.

---
 .../bindings/video/backlight/gpio-backlight.txt    |   18 ++
 drivers/video/backlight/Kconfig                    |    7 +
 drivers/video/backlight/Makefile                   |    1 +
 drivers/video/backlight/gpio_bl.c                  |  226 ++++++++++++++++++++
 4 files changed, 252 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/backlight/gpio-backlight.txt
 create mode 100644 drivers/video/backlight/gpio_bl.c

Please send the patch to subsystem mailing list and maintainers.

Shawn

#27 lore raw

PATCH 13/22 lcd: Add GPIO LCD driver.

In reply to Denis Carikli
---
 .../bindings/video/backlight/gpio-lcd.txt          |   15 ++
 drivers/video/backlight/Kconfig                    |    8 +
 drivers/video/backlight/Makefile                   |    1 +
 drivers/video/backlight/gpio_lcd.c                 |  178 ++++++++++++++++++++
 4 files changed, 202 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt
 create mode 100644 drivers/video/backlight/gpio_lcd.c
Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt new file +15 -0
new file mode 100644
index 0000000..4ff409d
@@ -0,0 +1,15 @@
+gpio-lcd bindings
+
+Required properties:
+  - compatible: "gpio-lcd"
+  - gpios: describes the gpio that is used for enabling/disabling the lcd
+     (see GPIO binding[0] for more details).
+
+[0]: Documentation/devicetree/bindings/gpio/gpio.txt
+
+Example:
+
+	lcd {
+		compatible = "gpio-lcd";
+		gpios = <&gpio3 13 0>;
+	};
drivers/video/backlight/Kconfig +8 -0
index 70e7706..eaf0525 100644
@@ -34,6 +34,14 @@ config LCD_CORGI
 	  Say y here to support the LCD panels usually found on SHARP
 	  corgi (C7x0) and spitz (Cxx00) models.
 
+config LCD_GPIO
+	tristate "LCD GPIO Driver"
+	depends on OF && GPIOLIB
+	help
+	  If your LCD enbling/disabling is controlled by a GPIO
+	  and that you use the device tree for booting,
+	  say y to enable the LCD GPIO driver.
+
 config LCD_L4F00242T03
 	tristate "Epson L4F00242T03 LCD"
 	depends on SPI_MASTER && GPIOLIB
drivers/video/backlight/Makefile +1 -0
index 8cde337..5c25955 100644
@@ -3,6 +3,7 @@
 obj-$(CONFIG_LCD_AMS369FG06)		+= ams369fg06.o
 obj-$(CONFIG_LCD_CLASS_DEVICE)		+= lcd.o
 obj-$(CONFIG_LCD_CORGI)			+= corgi_lcd.o
+obj-$(CONFIG_LCD_GPIO)			+= gpio_lcd.o
 obj-$(CONFIG_LCD_HP700)			+= jornada720_lcd.o
 obj-$(CONFIG_LCD_HX8357)		+= hx8357.o
 obj-$(CONFIG_LCD_ILI922X)		+= ili922x.o
drivers/video/backlight/gpio_lcd.c new file +178 -0

178 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#28 lore raw

Re: [PATCH 13/22] lcd: Add GPIO LCD driver.

Quoted 37 lines
---
 .../bindings/video/backlight/gpio-lcd.txt          |   15 ++
 drivers/video/backlight/Kconfig                    |    8 +
 drivers/video/backlight/Makefile                   |    1 +
 drivers/video/backlight/gpio_lcd.c                 |  178 ++++++++++++++++++++
 4 files changed, 202 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt
 create mode 100644 drivers/video/backlight/gpio_lcd.c
Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt new file +15 -0
new file mode 100644
index 0000000..4ff409d
@@ -0,0 +1,15 @@
+gpio-lcd bindings
+
+Required properties:
+  - compatible: "gpio-lcd"
+  - gpios: describes the gpio that is used for enabling/disabling the lcd
+     (see GPIO binding[0] for more details).
+
+[0]: Documentation/devicetree/bindings/gpio/gpio.txt
+
+Example:
+
+	lcd {
+		compatible = "gpio-lcd";
+		gpios = <&gpio3 13 0>;
+	};
drivers/video/backlight/Kconfig +0 -0
index 70e7706..eaf0525 100644
@@ -34,6 +34,14 @@ config LCD_CORGI
 	  Say y here to support the LCD panels usually found on SHARP

drivers/video/backlight/Kconfig config LCD_CORGI · line 44

Quoted 10 lines
drivers/video/backlight/Kconfig +8 -0
 	  corgi (C7x0) and spitz (Cxx00) models.
 
+config LCD_GPIO
+	tristate "LCD GPIO Driver"
+	depends on OF && GPIOLIB
+	help
+	  If your LCD enbling/disabling is controlled by a GPIO
+	  and that you use the device tree for booting,
+	  say y to enable the LCD GPIO driver.
+

Instead of using GPIO maybe it would be better to use a regulator here? That would be a universal solution.
Thanks.

---

maintainer
#29 lore raw

PATCH 13/22 lcd: Add GPIO LCD driver.

In reply to Denis Carikli

Hi Denis,

Quoted 16 lines · Denis Carikli
---
 .../bindings/video/backlight/gpio-lcd.txt          |   15 ++
 drivers/video/backlight/Kconfig                    |    8 +
 drivers/video/backlight/Makefile                   |    1 +
 drivers/video/backlight/gpio_lcd.c                 |  178 ++++++++++++++++++++
 4 files changed, 202 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt
 create mode 100644 drivers/video/backlight/gpio_lcd.c
Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt new file +0 -0
new file mode 100644
index 0000000..4ff409d

Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt line 6

Quoted 6 lines
Documentation/devicetree/bindings/video/backlight/gpio-lcd.txt new file +6 -0
@@ -0,0 +1,15 @@
+gpio-lcd bindings
+
+Required properties:
+  - compatible: "gpio-lcd"
+  - gpios: describes the gpio that is used for enabling/disabling the lcd
+     (see GPIO binding[0] for more details).

Do we really need this?

Why not just use the regulator framework instead?

You can refer to an example here:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/video/mxsfb.c?id=4344429d3d926d219671f607125cff51223a140a

Regards,

Fabio Estevam

#30 lore raw

PATCH 14/22 staging: imx-drm: use of_get_display_timings.

In reply to Denis Carikli

The comment on top of of_get_drm_display_mode says:
* This function is expensive and should only be used, if only one mode is to be
* read from DT. To get multiple modes start with of_get_display_timings and
* work with that instead.

---
 drivers/staging/imx-drm/parallel-display.c |   24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)
drivers/staging/imx-drm/parallel-display.c +19 -5
index cea9f14..fee9b10 100644
@@ -23,6 +23,8 @@
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <linux/videodev2.h>
+#include <video/videomode.h>
+#include <video/of_display_timing.h>
 
 #include "imx-drm.h"
 
@@ -74,11 +76,23 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
 
 	if (np) {
 		struct drm_display_mode *mode = drm_mode_create(connector->dev);
-		of_get_drm_display_mode(np, &imxpd->mode, 0);
-		drm_mode_copy(mode, &imxpd->mode);
-		mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
-		drm_mode_probed_add(connector, mode);
-		num_modes++;
+		struct display_timings *timings;
+		struct videomode vm;
+		int np_num_mode;
+
+		timings = of_get_display_timings(np);
+		for (np_num_mode = 0; np_num_mode < timings->num_timings;
+			np_num_mode++, num_modes++) {
+			if (videomode_from_timings(timings, &vm, np_num_mode))
+				break;
+			drm_display_mode_from_videomode(&vm, mode);
+			mode->type = DRM_MODE_TYPE_DRIVER;
+			if (timings->native_mode == np_num_mode)
+				mode->type |= DRM_MODE_TYPE_PREFERRED;
+
+			drm_mode_set_name(mode);
+			drm_mode_probed_add(connector, mode);
+		}
 	}
 
 	return num_modes;
Signature · 1 line
1.7.9.5
#31 lore raw

PATCH 15/22 drm: Add the lacking DRM_MODE_FLAG_* for matching the DISPLAY_FLAGS_*

In reply to Denis Carikli

Without that fix, drivers using the drm_display_mode_from_videomode
function will not be able to get certain information because some DISPLAY_FLAGS_* have no corresponding DRM_MODE_FLAG_*.

---
 drivers/gpu/drm/drm_modes.c |    9 +++++++++
 include/uapi/drm/drm_mode.h |   32 ++++++++++++++++++--------------
 2 files changed, 27 insertions(+), 14 deletions(-)
drivers/gpu/drm/drm_modes.c +9 -0
index a6729bf..443bb94 100644
@@ -537,6 +537,15 @@ int drm_display_mode_from_videomode(const struct videomode *vm,
 		dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
 	if (vm->flags & DISPLAY_FLAGS_DOUBLECLK)
 		dmode->flags |= DRM_MODE_FLAG_DBLCLK;
+	if (vm->flags & DISPLAY_FLAGS_DE_LOW)
+		dmode->flags |= DRM_MODE_FLAG_NDATEN;
+	if (vm->flags & DISPLAY_FLAGS_DE_HIGH)
+		dmode->flags |= DRM_MODE_FLAG_PDATEN;
+	if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
+		dmode->flags |= DRM_MODE_FLAG_PPIXDATEDGE;
+	if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
+		dmode->flags |= DRM_MODE_FLAG_NPIXDATEDGE;
+
 	drm_mode_set_name(dmode);
 
 	return 0;
include/uapi/drm/drm_mode.h +18 -14
index 53db7ce..5ec85f9 100644
@@ -44,20 +44,24 @@
 
 /* Video mode flags */
 /* bit compatible with the xorg definitions. */
-#define DRM_MODE_FLAG_PHSYNC	(1<<0)
-#define DRM_MODE_FLAG_NHSYNC	(1<<1)
-#define DRM_MODE_FLAG_PVSYNC	(1<<2)
-#define DRM_MODE_FLAG_NVSYNC	(1<<3)
-#define DRM_MODE_FLAG_INTERLACE	(1<<4)
-#define DRM_MODE_FLAG_DBLSCAN	(1<<5)
-#define DRM_MODE_FLAG_CSYNC	(1<<6)
-#define DRM_MODE_FLAG_PCSYNC	(1<<7)
-#define DRM_MODE_FLAG_NCSYNC	(1<<8)
-#define DRM_MODE_FLAG_HSKEW	(1<<9) /* hskew provided */
-#define DRM_MODE_FLAG_BCAST	(1<<10)
-#define DRM_MODE_FLAG_PIXMUX	(1<<11)
-#define DRM_MODE_FLAG_DBLCLK	(1<<12)
-#define DRM_MODE_FLAG_CLKDIV2	(1<<13)
+#define DRM_MODE_FLAG_PHSYNC		(1<<0)
+#define DRM_MODE_FLAG_NHSYNC		(1<<1)
+#define DRM_MODE_FLAG_PVSYNC		(1<<2)
+#define DRM_MODE_FLAG_NVSYNC		(1<<3)
+#define DRM_MODE_FLAG_INTERLACE		(1<<4)
+#define DRM_MODE_FLAG_DBLSCAN		(1<<5)
+#define DRM_MODE_FLAG_CSYNC		(1<<6)
+#define DRM_MODE_FLAG_PCSYNC		(1<<7)
+#define DRM_MODE_FLAG_NCSYNC		(1<<8)
+#define DRM_MODE_FLAG_HSKEW		(1<<9) /* hskew provided */
+#define DRM_MODE_FLAG_BCAST		(1<<10)
+#define DRM_MODE_FLAG_PIXMUX		(1<<11)
+#define DRM_MODE_FLAG_DBLCLK		(1<<12)
+#define DRM_MODE_FLAG_CLKDIV2		(1<<13)
+#define DRM_MODE_FLAG_PDATEN		(1<<14)
+#define DRM_MODE_FLAG_NDATEN		(1<<15)
+#define DRM_MODE_FLAG_PPIXDATEDGE	(1<<16)
+#define DRM_MODE_FLAG_NPIXDATEDGE	(1<<17)
 
 /* DPMS flags */
 /* bit compatible with the xorg definitions. */
Signature · 1 line
1.7.9.5
maintainer
#32 lore raw

PATCH 15/22 drm: Add the lacking DRM_MODE_FLAG_* for matching the DISPLAY_FLAGS_*

Quoted 60 lines · Denis Carikli

Without that fix, drivers using the drm_display_mode_from_videomode
function will not be able to get certain information because some DISPLAY_FLAGS_* have no corresponding DRM_MODE_FLAG_*.

---
 drivers/gpu/drm/drm_modes.c |    9 +++++++++
 include/uapi/drm/drm_mode.h |   32 ++++++++++++++++++--------------
 2 files changed, 27 insertions(+), 14 deletions(-)
drivers/gpu/drm/drm_modes.c +9 -0
index a6729bf..443bb94 100644
@@ -537,6 +537,15 @@ int drm_display_mode_from_videomode(const struct videomode *vm,
 		dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
 	if (vm->flags & DISPLAY_FLAGS_DOUBLECLK)
 		dmode->flags |= DRM_MODE_FLAG_DBLCLK;
+	if (vm->flags & DISPLAY_FLAGS_DE_LOW)
+		dmode->flags |= DRM_MODE_FLAG_NDATEN;
+	if (vm->flags & DISPLAY_FLAGS_DE_HIGH)
+		dmode->flags |= DRM_MODE_FLAG_PDATEN;
+	if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
+		dmode->flags |= DRM_MODE_FLAG_PPIXDATEDGE;
+	if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
+		dmode->flags |= DRM_MODE_FLAG_NPIXDATEDGE;
+
 	drm_mode_set_name(dmode);
 
 	return 0;
include/uapi/drm/drm_mode.h +8 -14
index 53db7ce..5ec85f9 100644
@@ -44,20 +44,24 @@
 
 /* Video mode flags */
 /* bit compatible with the xorg definitions. */
-#define DRM_MODE_FLAG_PHSYNC	(1<<0)
-#define DRM_MODE_FLAG_NHSYNC	(1<<1)
-#define DRM_MODE_FLAG_PVSYNC	(1<<2)
-#define DRM_MODE_FLAG_NVSYNC	(1<<3)
-#define DRM_MODE_FLAG_INTERLACE	(1<<4)
-#define DRM_MODE_FLAG_DBLSCAN	(1<<5)
-#define DRM_MODE_FLAG_CSYNC	(1<<6)
-#define DRM_MODE_FLAG_PCSYNC	(1<<7)
-#define DRM_MODE_FLAG_NCSYNC	(1<<8)
-#define DRM_MODE_FLAG_HSKEW	(1<<9) /* hskew provided */
-#define DRM_MODE_FLAG_BCAST	(1<<10)
-#define DRM_MODE_FLAG_PIXMUX	(1<<11)
-#define DRM_MODE_FLAG_DBLCLK	(1<<12)
-#define DRM_MODE_FLAG_CLKDIV2	(1<<13)
+#define DRM_MODE_FLAG_PHSYNC		(1<<0)
+#define DRM_MODE_FLAG_NHSYNC		(1<<1)
+#define DRM_MODE_FLAG_PVSYNC		(1<<2)
+#define DRM_MODE_FLAG_NVSYNC		(1<<3)
+#define DRM_MODE_FLAG_INTERLACE		(1<<4)
+#define DRM_MODE_FLAG_DBLSCAN		(1<<5)
+#define DRM_MODE_FLAG_CSYNC		(1<<6)
+#define DRM_MODE_FLAG_PCSYNC		(1<<7)

include/uapi/drm/drm_mode.h line 64

Quoted 10 lines
include/uapi/drm/drm_mode.h +10 -0
+#define DRM_MODE_FLAG_NCSYNC		(1<<8)
+#define DRM_MODE_FLAG_HSKEW		(1<<9) /* hskew provided */
+#define DRM_MODE_FLAG_BCAST		(1<<10)
+#define DRM_MODE_FLAG_PIXMUX		(1<<11)
+#define DRM_MODE_FLAG_DBLCLK		(1<<12)
+#define DRM_MODE_FLAG_CLKDIV2		(1<<13)
+#define DRM_MODE_FLAG_PDATEN		(1<<14)
+#define DRM_MODE_FLAG_NDATEN		(1<<15)
+#define DRM_MODE_FLAG_PPIXDATEDGE	(1<<16)
+#define DRM_MODE_FLAG_NPIXDATEDGE	(1<<17)

Drop the unnecessary whitespace changes. Cc dri-devel next time.

Sascha

Signature · 4 lines
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 |
#33 lore raw

PATCH 16/22 staging: drm/imx: ipuv3-crtc: don't harcode some mode flags.

In reply to Denis Carikli

This change is needed for making the eukrea-cpuimx51
QVGA display work.

---
 drivers/staging/imx-drm/ipuv3-crtc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/imx-drm/ipuv3-crtc.c +4 -2
index 9176a81..19502d8 100644
@@ -235,9 +235,11 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc,
 		sig_cfg.Hsync_pol = 1;
 	if (mode->flags & DRM_MODE_FLAG_PVSYNC)
 		sig_cfg.Vsync_pol = 1;
+	if (mode->flags & DRM_MODE_FLAG_PDATEN)
+		sig_cfg.enable_pol = 1;
+	if (mode->flags & DRM_MODE_FLAG_PPIXDATEDGE)
+		sig_cfg.clk_pol = 1;
 
-	sig_cfg.enable_pol = 1;
-	sig_cfg.clk_pol = 0;
 	sig_cfg.width = mode->hdisplay;
 	sig_cfg.height = mode->vdisplay;
 	sig_cfg.pixel_fmt = out_pixel_fmt;
Signature · 1 line
1.7.9.5
#34 lore raw

PATCH 17/22 v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.

In reply to Denis Carikli

That new macro is needed by the imx_drm staging driver
for supporting the QVGA display of the eukrea-cpuimx51 board.

---
 include/uapi/linux/videodev2.h |    1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/videodev2.h +1 -0
index 95ef455..52958af 100644
@@ -294,6 +294,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16  RGB-5-5-5 BE  */
 #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16  RGB-5-6-5 BE  */
 #define V4L2_PIX_FMT_BGR666  v4l2_fourcc('B', 'G', 'R', 'H') /* 18  BGR-6-6-6	  */
+#define V4L2_PIX_FMT_RGB666  v4l2_fourcc('R', 'G', 'B', 'H') /* 18  RGB-6-6-6	  */
 #define V4L2_PIX_FMT_BGR24   v4l2_fourcc('B', 'G', 'R', '3') /* 24  BGR-8-8-8     */
 #define V4L2_PIX_FMT_RGB24   v4l2_fourcc('R', 'G', 'B', '3') /* 24  RGB-8-8-8     */
 #define V4L2_PIX_FMT_BGR32   v4l2_fourcc('B', 'G', 'R', '4') /* 32  BGR-8-8-8-8   */
Signature · 1 line
1.7.9.5
#35 lore raw

PATCH 18/22 staging: video: imx: Add RGB666 support for parallel display

In reply to Denis Carikli

Support the RGB666 format on the IPUv3 parallel display.

---
 .../bindings/staging/imx-drm/fsl-imx-drm.txt       |    2 +-
 drivers/staging/imx-drm/ipu-v3/ipu-dc.c            |    9 +++++++++
 drivers/staging/imx-drm/parallel-display.c         |    2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +1 -1
index b876d49..2d24425 100644
@@ -29,7 +29,7 @@ Required properties:
 - crtc: the crtc this display is connected to, see below
 Optional properties:
 - interface_pix_fmt: How this display is connected to the
-  crtc. Currently supported types: "rgb24", "rgb565", "bgr666"
+  crtc. Currently supported types: "rgb24", "rgb565", "bgr666", "rgb666"
 - edid: verbatim EDID data block describing attached display.
 - ddc: phandle describing the i2c bus handling the display data
   channel
drivers/staging/imx-drm/ipu-v3/ipu-dc.c +9 -0
index 59f03f9..41049b9 100644
@@ -91,6 +91,7 @@ enum ipu_dc_map {
 	IPU_DC_MAP_RGB565,
 	IPU_DC_MAP_GBR24, /* TVEv2 */
 	IPU_DC_MAP_BGR666,
+	IPU_DC_MAP_RGB666,
 };
 
 struct ipu_dc {
@@ -152,6 +153,8 @@ static int ipu_pixfmt_to_map(u32 fmt)
 		return IPU_DC_MAP_GBR24;
 	case V4L2_PIX_FMT_BGR666:
 		return IPU_DC_MAP_BGR666;
+	case V4L2_PIX_FMT_RGB666:
+		return IPU_DC_MAP_RGB666;
 	default:
 		return -EINVAL;
 	}
@@ -394,6 +397,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev,
 	ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */
 	ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */
 
+	/* rgb666 */
+	ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
+	ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */
+	ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */
+	ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */
+
 	return 0;
 }
 
drivers/staging/imx-drm/parallel-display.c +2 -0
index fee9b10..dd65236 100644
@@ -236,6 +236,8 @@ static int imx_pd_probe(struct platform_device *pdev)
 			imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB565;
 		else if (!strcmp(fmt, "bgr666"))
 			imxpd->interface_pix_fmt = V4L2_PIX_FMT_BGR666;
+		else if (!strcmp(fmt, "rgb666"))
+			imxpd->interface_pix_fmt = V4L2_PIX_FMT_RGB666;
 	}
 
 	imxpd->dev = &pdev->dev;
Signature · 1 line
1.7.9.5
maintainer
#36 lore raw

PATCH 18/22 staging: video: imx: Add RGB666 support for parallel display

Hi Denis,

Quoted 8 lines · Denis Carikli

Support the RGB666 format on the IPUv3 parallel display.

---
 .../bindings/staging/imx-drm/fsl-imx-drm.txt       |    2 +-
 drivers/staging/imx-drm/ipu-v3/ipu-dc.c            |    9 +++++++++
 drivers/staging/imx-drm/parallel-display.c         |    2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)

Maybe you could split your series and send all the driver related patches to their appropriate mailing lists and maintainers.

#37 lore raw

PATCH 19/22 Input: tsc2007: Add device tree support.

In reply to Denis Carikli

Set the of_match_table for this driver so that devices can be described
in the device tree.

---
 .../bindings/input/touchscreen/tsc2007.txt         |   44 +++++
 drivers/input/touchscreen/tsc2007.c                |  205 ++++++++++++++++----
 2 files changed, 206 insertions(+), 43 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt
Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt new file +44 -0
new file mode 100644
index 0000000..d67b33f
@@ -0,0 +1,44 @@
+* Texas Instruments tsc2007 touchscreen controller
+
+Required properties:
+- compatible: must be "ti,tsc2007".
+- reg: I2C address of the chip.
+- pinctrl-0: Should specify pin control groups used for this controller
+  (see pinctrl bindings[0]).
+- pinctrl-names: Should contain only one value - "default"
+  (see pinctrl bindings[0]).
+- interrupt-parent: the phandle for the interrupt controller
+  (see interrupt binding[1]).
+- interrupts: interrupt to which the chip is connected
+  (see interrupt binding[1]).
+- x-plate-ohms: X-plate resistance in ohms.
+
+Optional properties:
+- gpios: the interrupt gpio the chip is connected to (trough the penirq pin)
+  (see GPIO binding[2] for more details).
+- max-rt: maximum pressure.
+- fuzzy: specifies the fuzz value that is used to filter noise from the event
+  stream.
+- poll-period: how much time to wait(in millisecond) before reading again the
+  values from the tsc2007.
+
+[0]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+[1]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+[2]: Documentation/devicetree/bindings/gpio/gpio.txt
+
+Example:
+	&i2c1 {
+		/* ... */
+		tsc2007 at 49 {
+			compatible = "ti,tsc2007";
+			reg = <0x49>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_tsc2007_1>;
+			interrupt-parent = <&gpio4>;
+			interrupts = <0x0 0x8>;
+			gpios = <&gpio4 0 0>;
+			x-plate-ohms = <180>;
+		};
+
+		/* ... */
+	};
drivers/input/touchscreen/tsc2007.c +162 -43

321 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer
#38 lore raw

PATCH 19/22 Input: tsc2007: Add device tree support.

Quoted 7 lines · Denis Carikli

Set the of_match_table for this driver so that devices can be described
in the device tree.

---
 .../bindings/input/touchscreen/tsc2007.txt         |   44 +++++
 drivers/input/touchscreen/tsc2007.c                |  205 ++++++++++++++++----

You should have Cc'ed linux-input list and its maintainer Dmitry Torokhov <[email protected]>

drivers/input/touchscreen/tsc2007.c struct tsc2007 { · line 95

Quoted 3 lines
drivers/input/touchscreen/tsc2007.c +3 -0
+static int tsc2007_get_pendown_state_dt(struct tsc2007  *ts)
+{
+       if (ts->gpio >= 0)

What about
if (gpio_is_valid(ts->gpio)) instead?

maintainer
#39 lore raw

PATCH 19/22 Input: tsc2007: Add device tree support.

In reply to Denis Carikli
Quoted 101 lines · Denis Carikli

Set the of_match_table for this driver so that devices can be described
in the device tree.

---
 .../bindings/input/touchscreen/tsc2007.txt         |   44 +++++
 drivers/input/touchscreen/tsc2007.c                |  205 ++++++++++++++++----
 2 files changed, 206 insertions(+), 43 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt
Documentation/devicetree/bindings/input/touchscreen/tsc2007.txt new file +44 -0
new file mode 100644
index 0000000..d67b33f
@@ -0,0 +1,44 @@
+* Texas Instruments tsc2007 touchscreen controller
+
+Required properties:
+- compatible: must be "ti,tsc2007".
+- reg: I2C address of the chip.
+- pinctrl-0: Should specify pin control groups used for this controller
+  (see pinctrl bindings[0]).
+- pinctrl-names: Should contain only one value - "default"
+  (see pinctrl bindings[0]).
+- interrupt-parent: the phandle for the interrupt controller
+  (see interrupt binding[1]).
+- interrupts: interrupt to which the chip is connected
+  (see interrupt binding[1]).
+- x-plate-ohms: X-plate resistance in ohms.
+
+Optional properties:
+- gpios: the interrupt gpio the chip is connected to (trough the penirq pin)
+  (see GPIO binding[2] for more details).
+- max-rt: maximum pressure.
+- fuzzy: specifies the fuzz value that is used to filter noise from the event
+  stream.
+- poll-period: how much time to wait(in millisecond) before reading again the
+  values from the tsc2007.
+
+[0]: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+[1]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+[2]: Documentation/devicetree/bindings/gpio/gpio.txt
+
+Example:
+	&i2c1 {
+		/* ... */
+		tsc2007 at 49 {
+			compatible = "ti,tsc2007";
+			reg = <0x49>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinctrl_tsc2007_1>;
+			interrupt-parent = <&gpio4>;
+			interrupts = <0x0 0x8>;
+			gpios = <&gpio4 0 0>;
+			x-plate-ohms = <180>;
+		};
+
+		/* ... */
+	};
drivers/input/touchscreen/tsc2007.c +14 -0
index 0b67ba4..c0af04b 100644
@@ -26,6 +26,9 @@
 #include <linux/interrupt.h>
 #include <linux/i2c.h>
 #include <linux/i2c/tsc2007.h>
+#include <linux/of_device.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #define TSC2007_MEASURE_TEMP0		(0x0 << 4)
 #define TSC2007_MEASURE_AUX		(0x2 << 4)
@@ -74,7 +77,10 @@ struct tsc2007 {
 	u16			max_rt;
 	unsigned long		poll_delay;
 	unsigned long		poll_period;
+	int			fuzzy;
+	char			of;
 
+	unsigned		gpio;
 	int			irq;
 
 	wait_queue_head_t	wait;
@@ -84,6 +90,14 @@ struct tsc2007 {
 	void			(*clear_penirq)(void);
 };
 
+static int tsc2007_get_pendown_state_dt(struct tsc2007  *ts)
+{
+	if (ts->gpio >= 0)
+		return !gpio_get_value(ts->gpio);
+	else
+		return true;
+}
+
 static inline int tsc2007_xfer(struct tsc2007 *tsc, u8 cmd)
 {
 	s32 data;

drivers/input/touchscreen/tsc2007.c static bool tsc2007_is_pen_down(struct tsc2007 *ts) · line 176

Quoted 5 lines
drivers/input/touchscreen/tsc2007.c +2 -0
@@ -158,6 +172,9 @@ static bool tsc2007_is_pen_down(struct tsc2007 *ts)
 	 * to fall back on the pressure reading.
 	 */
 
+	if (ts->of)
+		return tsc2007_get_pendown_state_dt(ts);

Initializing tsc->gpio to an illegal gpio for the non dt case makes ts->of unnecessary and the core driver dt agnostic.

Quoted 29 lines
drivers/input/touchscreen/tsc2007.c +19 -9
-static int tsc2007_probe(struct i2c_client *client,
-				   const struct i2c_device_id *id)
+#ifdef CONFIG_OF
+static int tsc2007_probe_dt(struct i2c_client *client, struct tsc2007 *ts,
+			    struct device_node *np)
 {
-	struct tsc2007 *ts;
-	struct tsc2007_platform_data *pdata = client->dev.platform_data;
-	struct input_dev *input_dev;
-	int err;
-
-	if (!pdata) {
-		dev_err(&client->dev, "platform data is required!\n");
+	int err = 0;
+	struct pinctrl *pinctrl;
+	u32 val32;
+	u64 val64;
+
+	if (!of_property_read_u32(np, "max-rt", &val32))
+		ts->max_rt = val32;
+	else
+		ts->max_rt = MAX_12BIT;
+
+	if (!of_property_read_u32(np, "fuzzy", &val32))
+		ts->fuzzy = val32;
+
+	if (!of_property_read_u64(np, "poll-period", &val64))
+		ts->poll_period = val64;
+	else

drivers/input/touchscreen/tsc2007.c static void tsc2007_close(struct input_dev *input_dev) · line 325

Quoted 10 lines
drivers/input/touchscreen/tsc2007.c +8 -0
+		ts->poll_period = 1;
+
+	if (!of_property_read_u32(np, "x-plate-ohms", &val32))
+		ts->x_plate_ohms = val32;
+	else {
+		dev_err(&client->dev,
+			"x-plate-ohms is not set up in the devicetree."
+			" (err %d).", err);
 		return -EINVAL;
 	}

if one path of an if/else needs braces the other should have braces aswell.

Quoted 4 lines
drivers/input/touchscreen/tsc2007.c +0 -3
-	if (!i2c_check_functionality(client->adapter,
-				     I2C_FUNC_SMBUS_READ_WORD_DATA))
-		return -EIO;

drivers/input/touchscreen/tsc2007.c static void tsc2007_close(struct input_dev *input_dev) · line 330

Quoted 10 lines
drivers/input/touchscreen/tsc2007.c +4 -6
-
-	ts = kzalloc(sizeof(struct tsc2007), GFP_KERNEL);
-	input_dev = input_allocate_device();
-	if (!ts || !input_dev) {
-		err = -ENOMEM;
-		goto err_free_mem;
+	pinctrl = devm_pinctrl_get_select_default(&client->dev);
+	if (IS_ERR(pinctrl)) {
+		err = PTR_ERR(pinctrl);
+		return err;

The driver core will do this for you already.

drivers/input/touchscreen/tsc2007.c static void tsc2007_close(struct input_dev *input_dev) · line 335

Quoted 9 lines
drivers/input/touchscreen/tsc2007.c +3 -4
 	}
 
-	ts->client = client;
-	ts->irq = client->irq;
-	ts->input = input_dev;
-	init_waitqueue_head(&ts->wait);
+	ts->gpio = of_get_gpio(np, 0);
+	if (ts->gpio < 0)
+		pr_err("GPIO not found (of_get_gpio returned %d)\n", ts->gpio);

use dev_err.

Sascha

Signature · 4 lines
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 |
#40 lore raw

PATCH 20/22 arm/dts: Add support for the cpuimx51 board from Eukrea and its baseboard.

In reply to Denis Carikli

Only the following devices/functionalities were added:
* Main UART and the memory node information.
* NAND.
* Ethernet.
* i2c and its pcf8563 device.
* The GPIO button (its label is BP1 on the baseboard).
* The GPIO backlight.
* The GPIO LCD enabling/disabling.
* Display/IPU controller.
* Touchscreen.

---
 Documentation/devicetree/bindings/arm/fsl.txt     |    4 +
 arch/arm/boot/dts/eukrea_cpuimx51.dts             |   69 ++++++++++++++
 arch/arm/boot/dts/eukrea_mbimxsd51-baseboard.dtsi |  105 +++++++++++++++++++++
 3 files changed, 178 insertions(+)
 create mode 100644 arch/arm/boot/dts/eukrea_cpuimx51.dts
 create mode 100644 arch/arm/boot/dts/eukrea_mbimxsd51-baseboard.dtsi
Documentation/devicetree/bindings/arm/fsl.txt +4 -0
index 2c19348..4001d91 100644
@@ -25,6 +25,10 @@ i.MX51 Babbage Board
 Required root node properties:
     - compatible = "fsl,imx51-babbage", "fsl,imx51";
 
+i.MX51 Eukrea CPUIMX51 Board
+Required root node properties:
+    - compatible = "fsl,eukrea_cpuimx51", "fsl,imx51";
+
 i.MX53 Automotive Reference Design Board
 Required root node properties:
     - compatible = "fsl,imx53-ard", "fsl,imx53";
arch/arm/boot/dts/eukrea_cpuimx51.dts new file +69 -0

69 lines not on this page · raw message

arch/arm/boot/dts/eukrea_mbimxsd51-baseboard.dtsi new file +105 -0

105 lines not on this page · raw message

Signature · 1 line
1.7.9.5
maintainer
#41 lore raw

PATCH 20/22 arm/dts: Add support for the cpuimx51 board from Eukrea and its baseboard.

Hi Denis,

Documentation/devicetree/bindings/arm/fsl.txt i.MX51 Babbage Board · line 31

Quoted 4 lines · Denis Carikli
Documentation/devicetree/bindings/arm/fsl.txt +4 -0
+i.MX51 Eukrea CPUIMX51 Board
+Required root node properties:
+    - compatible = "fsl,eukrea_cpuimx51", "fsl,imx51";
+

The fsl.txt file contains boards that are developed by Freescale.

The compatible string "fsl,eukrea_cpuimx51" is not correct, as the cpuimx51 board is not manufactured by Freescale.

You should have used "eukrea" as the manufacturer instead.

#42 lore raw

PATCH 21/22 DT: Add basic support for imx35-based devices.

In reply to Denis Carikli

From: Steffen Trumtrar <[email protected]>

---
 arch/arm/boot/dts/imx35.dtsi         |  308 ++++++++++++++++++++++++++++++++++
 arch/arm/configs/imx_v6_v7_defconfig |    1 +
 arch/arm/mach-imx/Kconfig            |   11 ++
 arch/arm/mach-imx/Makefile           |    1 +
 arch/arm/mach-imx/clk-imx35.c        |   13 ++
 arch/arm/mach-imx/imx35-dt.c         |   48 ++++++
 6 files changed, 382 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx35.dtsi
 create mode 100644 arch/arm/mach-imx/imx35-dt.c
arch/arm/boot/dts/imx35.dtsi new file +308 -0
new file mode 100644
index 0000000..012c1a3
@@ -0,0 +1,308 @@
+/*
+ * Copyright 2012 Steffen Trumtrar, Pengutronix
+ *
+ * based on imx27.dtsi
+ *
+ * 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.
+ */
+
+#include "skeleton.dtsi"
+#include "imx35-pinfunc.h"
+
+/ {
+	aliases {
+		serial0 = &uart1;
+		serial1 = &uart2;
+		serial2 = &uart3;
+		gpio0 = &gpio1;
+		gpio1 = &gpio2;
+		gpio2 = &gpio3;
+	};
+
+	avic: avic-interrupt-controller at 68000000 {
+		compatible = "fsl,imx35-avic", "fsl,avic";
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		reg = <0x68000000 0x10000000>;
+	};
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ckil {
+			compatible = "fsl,imx-ckil", "fixed-clock";
+			clock-frequency = <32768>;
+		};
+
+		osc {
+			compatible = "fsl,imx-osc", "fixed-clock";
+			clock-frequency = <24000000>;
+		};
+	};
+
+	soc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		interrupt-parent = <&avic>;
+		ranges;
+
+		l2-cache at 30000000 {
+			compatible = "arm,l210-cache";
+			reg = <0x30000000 0x1000>;
+			cache-unified;
+			cache-level = <2>;
+		};
+
+		aips at 43f00000 { /* AIPS1 */
+			compatible = "fsl,aips", "simple-bus";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x43f00000 0x100000>;
+			ranges;
+
+			i2c1: i2c at 43f80000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "fsl,imx35-i2c", "fsl,imx1-i2c";
+				reg = <0x43f80000 0x4000>;
+				interrupts = <10>;
+				status = "disabled";
+			};
+
+			i2c3: i2c at 43f84000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "fsl,imx35-i2c", "fsl,imx1-i2c";
+				reg = <0x43f84000 0x4000>;
+				interrupts = <3>;
+				status = "disabled";
+			};
+
+			uart1: serial at 43f90000 {
+				compatible = "fsl,imx35-uart", "fsl,imx21-uart";
+				reg = <0x43f90000 0x4000>;
+				interrupts = <45>;
+				status = "disabled";
+			};
+
+			uart2: serial at 43f94000 {
+				compatible = "fsl,imx35-uart", "fsl,imx21-uart";
+				reg = <0x43f94000 0x4000>;
+				interrupts = <32>;
+				status = "disabled";
+			};
+
+			i2c2: i2c at 43f98000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "fsl,imx35-i2c", "fsl,imx1-i2c";
+				reg = <0x43f98000 0x4000>;
+				interrupts = <4>;
+				status = "disabled";
+			};
+
+			ssi1: ssi at 43fa0000 {
+				compatible = "fsl,imx35-ssi", "fsl,imx21-ssi";
+				reg = <0x43fa0000 0x4000>;
+				interrupts = <11>;
+				fsl,ssi-dma-events = <29 28 27 26>;
+				status = "disabled";
+			};
+
+			iomuxc at 43fac000 {
+				compatible = "fsl,imx35-iomuxc";
+				reg = <0x43fac000 0x4000>;
+
+				i2c1 {
+					pinctrl_i2c1_1: i2c1grp-1 {
+						fsl,pins = <
+								MX35_PAD_I2C1_CLK__I2C1_SCL 0x80000000
+								MX35_PAD_I2C1_DAT__I2C1_SDA 0x80000000
+						>;
+					};
+				};
+
+				i2c3 {
+					pinctrl_i2c3_1: i2c3grp-1 {
+						fsl,pins = <MX35_PAD_ATA_DATA12__I2C3_SCL 0x1c0
+							    MX35_PAD_ATA_DATA13__I2C3_SDA 0x1c0>;
+					};
+				};
+
+				can1 {
+					pinctrl_can1_1: can1grp-1 {
+						fsl,pins = <MX35_PAD_I2C2_CLK__CAN1_TXCAN 0x1c0
+							    MX35_PAD_I2C2_DAT__CAN1_RXCAN 0x1c0>;
+					};
+				};
+
+				can2 {
+					pinctrl_can2_1: can2grp-1 {
+						fsl,pins = <MX35_PAD_TX5_RX0__CAN2_TXCAN 0x1c0
+							MX35_PAD_TX4_RX1__CAN2_RXCAN 0x1c0>;
+					};
+				};
+
+				uart1 {
+					pinctrl_uart1_1: uart1grp-1 {
+						fsl,pins = <
+							MX35_PAD_CTS1__UART1_CTS 0x80000000
+							MX35_PAD_RTS1__UART1_RTS 0x80000000
+							MX35_PAD_TXD1__UART1_TXD_MUX 0x80000000
+							MX35_PAD_RXD1__UART1_RXD_MUX 0x80000000
+						>;
+					};
+				};
+
+				fec {
+					pinctrl_fec_1: fecgrp-1 {
+						fsl,pins = <
+							MX35_PAD_FEC_TX_CLK__FEC_TX_CLK 0x80000000
+							MX35_PAD_FEC_RX_CLK__FEC_RX_CLK 0x80000000
+							MX35_PAD_FEC_RX_DV__FEC_RX_DV 0x80000000
+							MX35_PAD_FEC_COL__FEC_COL 0x80000000
+							MX35_PAD_FEC_RDATA0__FEC_RDATA_0 0x80000000
+							MX35_PAD_FEC_TDATA0__FEC_TDATA_0 0x80000000
+							MX35_PAD_FEC_TX_EN__FEC_TX_EN 0x80000000
+							MX35_PAD_FEC_MDC__FEC_MDC 0x80000000
+							MX35_PAD_FEC_MDIO__FEC_MDIO 0x80000000
+							MX35_PAD_FEC_TX_ERR__FEC_TX_ERR 0x80000000
+							MX35_PAD_FEC_RX_ERR__FEC_RX_ERR 0x80000000
+							MX35_PAD_FEC_CRS__FEC_CRS 0x80000000
+							MX35_PAD_FEC_RDATA1__FEC_RDATA_1 0x80000000
+							MX35_PAD_FEC_TDATA1__FEC_TDATA_1 0x80000000
+							MX35_PAD_FEC_RDATA2__FEC_RDATA_2 0x80000000
+							MX35_PAD_FEC_TDATA2__FEC_TDATA_2 0x80000000
+							MX35_PAD_FEC_RDATA3__FEC_RDATA_3 0x80000000
+							MX35_PAD_FEC_TDATA3__FEC_TDATA_3 0x80000000
+						>;
+
+					};
+				};
+			};
+		};
+
+		spba at 50000000 {
+			compatible = "fsl,spba-bus", "simple-bus";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x50000000 0x100000>;
+			ranges;
+
+			uart3: serial at 5000c000 {
+				compatible = "fsl,imx35-uart", "fsl,imx21-uart";
+				reg = <0x5000c000 0x4000>;
+				interrupts = <18>;
+				status = "disabled";
+			};
+
+			fec: fec at 50038000 {
+				compatible = "fsl,imx35-fec", "fsl,imx27-fec";
+				reg = <0x50038000 0x4000>;
+				interrupts = <57>;
+				status = "disabled";
+			};
+		};
+
+		aips at 53f00000 { /* AIPS2 */
+			compatible = "fsl,aips", "simple-bus";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x53f00000 0x100000>;
+			ranges;
+
+			gpio3: gpio at 0x53fa4000 {
+				compatible = "fsl,imx35-gpio", "fsl,imx31-gpio";
+				reg = <0x53fa4000 0x4000>;
+				interrupts = <56>;
+				gpio-controller;
+				#gpio-cells = <2>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+			};
+
+			esdhc1: esdhc at 53fb4000 {
+				compatible = "fsl,mx35-sdhc";
+				reg = <0x53fb4000 0x4000>;
+				interrupts = <7>;
+				status = "disabled";
+			};
+
+			esdhc2: esdhc at 53fb8000 {
+				compatible = "fsl,mx35-sdhc";
+				reg = <0x53fb8000 0x4000>;
+				interrupts = <8>;
+				status = "disabled";
+			};
+
+			esdhc3: esdhc at 53fbc000 {
+				compatible = "fsl,mx35-sdhc";
+				reg = <0x53fbc000 0x4000>;
+				interrupts = <9>;
+				status = "disabled";
+			};
+
+			gpio1: gpio at 0x53fcc000 {
+				compatible = "fsl,imx35-gpio", "fsl,imx31-gpio";
+				reg = <0x53fcc000 0x4000>;
+				interrupts = <52>;
+				gpio-controller;
+				#gpio-cells = <2>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+			};
+
+			gpio2: gpio at 0x53fd0000 {
+				compatible = "fsl,imx35-gpio", "fsl,imx31-gpio";
+				reg = <0x53fd0000 0x4000>;
+				interrupts = <51>;
+				gpio-controller;
+				#gpio-cells = <2>;
+				interrupt-controller;
+				#interrupt-cells = <2>;
+			};
+
+			wdog at 53fdc000 {
+				compatible = "fsl,imx35-wdt", "fsl,imx2-wdt";
+				reg = <0x53fdc000 0x4000>;
+				interrupts = <55>;
+			};
+
+			can at 53fe4000 {
+				compatible = "fsl,imx35-flexcan", "fsl,p1010-flexcan";
+				reg = <0x53fe4000 0x1000>;
+				interrupts = <43>;
+				status = "disabled";
+			};
+
+			can at 53fe8000 {
+				compatible = "fsl,imx35-flexcan", "fsl,p1010-flexcan";
+				reg = <0x53fe8000 0x1000>;
+				interrupts = <44>;
+				status = "disabled";
+			};
+		};
+
+		emi at 80000000 { /* External Memory Interface */
+			compatible = "fsl,emi", "simple-bus";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x80000000 0x40000000>;
+			ranges;
+
+			nand: nand at bb000000 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				compatible = "fsl,imx35-nand", "fsl,imx25-nand";
+				reg = <0xbb000000 0x2000>;
+				interrupts = <33>;
+				status = "disabled";
+			};
+		};
+	};
+};
arch/arm/configs/imx_v6_v7_defconfig +1 -0
index f1662d3..366b20d 100644
@@ -32,6 +32,7 @@ CONFIG_MACH_ARMADILLO5X0=y
 CONFIG_MACH_KZM_ARM11_01=y
 CONFIG_MACH_PCM043=y
 CONFIG_MACH_MX35_3DS=y
+CONFIG_MACH_IMX35_DT=y
 CONFIG_MACH_VPR200=y
 CONFIG_MACH_IMX51_DT=y
 CONFIG_MACH_EUKREA_CPUIMX51SD=y
arch/arm/mach-imx/Kconfig +11 -0
index ed09a63..dc8f809 100644
@@ -627,6 +627,17 @@ config MACH_IMX31_DT
 
 comment "MX35 platforms:"
 
+config MACH_IMX35_DT
+	bool "Support i.MX35 platforms from device tree"
+	select SOC_IMX35
+	select IMX_HAVE_PLATFORM_IMX2_WDT
+	select IMX_HAVE_PLATFORM_MXC_NAND
+	select PINCTRL
+	select PINCTRL_IMX35
+	help
+	  Include support for Freescale i.MX35 based platforms
+	  using the device tree for discovery.
+
 config MACH_PCM043
 	bool "Support Phytec pcm043 (i.MX35) platforms"
 	select IMX_HAVE_PLATFORM_FLEXCAN
arch/arm/mach-imx/Makefile +1 -0
index e20f22d..3cb9d30 100644
@@ -88,6 +88,7 @@ obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o
 obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o
 obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o
 obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
+obj-$(CONFIG_MACH_IMX35_DT) += imx35-dt.o
 
 obj-$(CONFIG_HAVE_IMX_ANATOP) += anatop.o
 obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
arch/arm/mach-imx/clk-imx35.c +13 -0
index 2193c83..b46375c 100644
@@ -204,7 +204,9 @@ int __init mx35_clocks_init(void)
 				i, PTR_ERR(clk[i]));
 
 	clk_register_clkdev(clk[pata_gate], NULL, "pata_imx");
+	clk_register_clkdev(clk[can1_gate], NULL, "53fe4000.can");
 	clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0");
+	clk_register_clkdev(clk[can2_gate], NULL, "53fe8000.can");
 	clk_register_clkdev(clk[can2_gate], NULL, "flexcan.1");
 	clk_register_clkdev(clk[cspi1_gate], "per", "imx35-cspi.0");
 	clk_register_clkdev(clk[cspi1_gate], "ipg", "imx35-cspi.0");
@@ -221,12 +223,16 @@ int __init mx35_clocks_init(void)
 	clk_register_clkdev(clk[esdhc3_gate], "per", "sdhci-esdhc-imx35.2");
 	clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.2");
 	clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.2");
+	clk_register_clkdev(clk[fec_gate], NULL, "50038000.fec");
 	/* i.mx35 has the i.mx27 type fec */
 	clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0");
 	clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0");
 	clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
+	clk_register_clkdev(clk[i2c1_gate], NULL, "43f80000.i2c");
 	clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
+	clk_register_clkdev(clk[i2c2_gate], NULL, "43f98000.i2c");
 	clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
+	clk_register_clkdev(clk[i2c3_gate], NULL, "43f84000.i2c");
 	clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
 	clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
 	clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
@@ -235,6 +241,12 @@ int __init mx35_clocks_init(void)
 	clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma");
 	clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1");
+	clk_register_clkdev(clk[uart1_gate], "per", "43f90000.serial");
+	clk_register_clkdev(clk[ipg], "ipg", "43f90000.serial");
+	clk_register_clkdev(clk[uart2_gate], "per", "43f94000.serial");
+	clk_register_clkdev(clk[ipg], "ipg", "43f94000.serial");
+	clk_register_clkdev(clk[uart3_gate], "per", "5000c000.serial");
+	clk_register_clkdev(clk[ipg], "ipg", "5000c000.serial");
 	/* i.mx35 has the i.mx21 type uart */
 	clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0");
 	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0");
@@ -255,6 +267,7 @@ int __init mx35_clocks_init(void)
 	clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27");
 	clk_register_clkdev(clk[usbotg_gate], "ahb", "imx-udc-mx27");
 	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
+	clk_register_clkdev(clk[nfc_div], NULL, "bb000000.nand");
 	clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0");
 	clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
 	clk_register_clkdev(clk[admux_gate], "audmux", NULL);
arch/arm/mach-imx/imx35-dt.c new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#43 lore raw

Re: [PATCH 21/22] DT: Add basic support for imx35-based devices.

Quoted 6 lines

From: Steffen Trumtrar <[email protected]>

---

...

Quoted 5 lines
arch/arm/boot/dts/imx35.dtsi new file +0 -0
new file mode 100644
index 0000000..012c1a3

...

Quoted 7 lines
arch/arm/boot/dts/imx35.dtsi new file +7 -0
+		emi at 80000000 { /* External Memory Interface */
+			compatible = "fsl,emi", "simple-bus";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x80000000 0x40000000>;
+			ranges;
+

arch/arm/boot/dts/imx35.dtsi line 306

Quoted 10 lines
arch/arm/boot/dts/imx35.dtsi new file +10 -0
+			nand: nand at bb000000 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				compatible = "fsl,imx35-nand", "fsl,imx25-nand";
+				reg = <0xbb000000 0x2000>;
+				interrupts = <33>;
+				status = "disabled";
+			};
+		};

WEIM driver can (should) be used here.
See the example of usage in imx27.dtsi.

---

maintainer
#44 lore raw

PATCH 21/22 DT: Add basic support for imx35-based devices.

In reply to Denis Carikli
Quoted 72 lines · Denis Carikli

From: Steffen Trumtrar <[email protected]>

---
 arch/arm/boot/dts/imx35.dtsi         |  308 ++++++++++++++++++++++++++++++++++
 arch/arm/configs/imx_v6_v7_defconfig |    1 +
 arch/arm/mach-imx/Kconfig            |   11 ++
 arch/arm/mach-imx/Makefile           |    1 +
 arch/arm/mach-imx/clk-imx35.c        |   13 ++
 arch/arm/mach-imx/imx35-dt.c         |   48 ++++++
 6 files changed, 382 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx35.dtsi
 create mode 100644 arch/arm/mach-imx/imx35-dt.c
arch/arm/boot/dts/imx35.dtsi new file +50 -0
new file mode 100644
index 0000000..012c1a3
@@ -0,0 +1,308 @@
+/*
+ * Copyright 2012 Steffen Trumtrar, Pengutronix
+ *
+ * based on imx27.dtsi
+ *
+ * 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.
+ */
+
+#include "skeleton.dtsi"
+#include "imx35-pinfunc.h"
+
+/ {
+	aliases {
+		serial0 = &uart1;
+		serial1 = &uart2;
+		serial2 = &uart3;
+		gpio0 = &gpio1;
+		gpio1 = &gpio2;
+		gpio2 = &gpio3;
+	};
+
+	avic: avic-interrupt-controller at 68000000 {
+		compatible = "fsl,imx35-avic", "fsl,avic";
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		reg = <0x68000000 0x10000000>;
+	};
+
+	clocks {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ckil {
+			compatible = "fsl,imx-ckil", "fixed-clock";
+			clock-frequency = <32768>;
+		};
+
+		osc {
+			compatible = "fsl,imx-osc", "fixed-clock";
+			clock-frequency = <24000000>;
+		};
+	};
+
+	soc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "simple-bus";
+		interrupt-parent = <&avic>;

arch/arm/boot/dts/imx35.dtsi line 60

Quoted 10 lines
arch/arm/boot/dts/imx35.dtsi new file +10 -0
+		ranges;
+
+		l2-cache at 30000000 {
+			compatible = "arm,l210-cache";
+			reg = <0x30000000 0x1000>;
+			cache-unified;
+			cache-level = <2>;
+		};
+
+		aips at 43f00000 { /* AIPS1 */

You could add a 'aips1:' label to make the comment unnecessary.

arch/arm/boot/dts/imx35.dtsi line 116

Quoted 1 line
arch/arm/boot/dts/imx35.dtsi new file +1 -0
+			iomuxc at 43fac000 {

Add a 'iomuxc:' label here.

Quoted 45 lines
arch/arm/mach-imx/clk-imx35.c +12 -0
index 2193c83..b46375c 100644
@@ -204,7 +204,9 @@ int __init mx35_clocks_init(void)
 				i, PTR_ERR(clk[i]));
 
 	clk_register_clkdev(clk[pata_gate], NULL, "pata_imx");
+	clk_register_clkdev(clk[can1_gate], NULL, "53fe4000.can");
 	clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0");
+	clk_register_clkdev(clk[can2_gate], NULL, "53fe8000.can");
 	clk_register_clkdev(clk[can2_gate], NULL, "flexcan.1");
 	clk_register_clkdev(clk[cspi1_gate], "per", "imx35-cspi.0");
 	clk_register_clkdev(clk[cspi1_gate], "ipg", "imx35-cspi.0");
@@ -221,12 +223,16 @@ int __init mx35_clocks_init(void)
 	clk_register_clkdev(clk[esdhc3_gate], "per", "sdhci-esdhc-imx35.2");
 	clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.2");
 	clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.2");
+	clk_register_clkdev(clk[fec_gate], NULL, "50038000.fec");
 	/* i.mx35 has the i.mx27 type fec */
 	clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0");
 	clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0");
 	clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
+	clk_register_clkdev(clk[i2c1_gate], NULL, "43f80000.i2c");
 	clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0");
+	clk_register_clkdev(clk[i2c2_gate], NULL, "43f98000.i2c");
 	clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1");
+	clk_register_clkdev(clk[i2c3_gate], NULL, "43f84000.i2c");
 	clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2");
 	clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core");
 	clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb");
@@ -235,6 +241,12 @@ int __init mx35_clocks_init(void)
 	clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma");
 	clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0");
 	clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1");
+	clk_register_clkdev(clk[uart1_gate], "per", "43f90000.serial");
+	clk_register_clkdev(clk[ipg], "ipg", "43f90000.serial");
+	clk_register_clkdev(clk[uart2_gate], "per", "43f94000.serial");
+	clk_register_clkdev(clk[ipg], "ipg", "43f94000.serial");
+	clk_register_clkdev(clk[uart3_gate], "per", "5000c000.serial");
+	clk_register_clkdev(clk[ipg], "ipg", "5000c000.serial");
 	/* i.mx35 has the i.mx21 type uart */
 	clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0");
 	clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0");

arch/arm/mach-imx/clk-imx35.c int __init mx35_clocks_init(void) · line 270

Quoted 4 lines
arch/arm/mach-imx/clk-imx35.c +1 -0
@@ -255,6 +267,7 @@ int __init mx35_clocks_init(void)
 	clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27");
 	clk_register_clkdev(clk[usbotg_gate], "ahb", "imx-udc-mx27");
 	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
+	clk_register_clkdev(clk[nfc_div], NULL, "bb000000.nand");

All the changes above shouldn't be necessary.

Sascha

Signature · 4 lines
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 |
#45 lore raw

PATCH 22/22 arm/dts: Add support for the cpuimx35 board from Eukrea and its baseboard.

In reply to Denis Carikli

Only the following devices were added:
* Main UART
* Memory node
* NAND
* i2c and its pcf8563
* Ethernet

---
 Documentation/devicetree/bindings/arm/fsl.txt     |    4 ++
 arch/arm/boot/dts/eukrea_cpuimx35.dts             |   45 +++++++++++++++++++++
 arch/arm/boot/dts/eukrea_mbimxsd35-baseboard.dtsi |   19 +++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 arch/arm/boot/dts/eukrea_cpuimx35.dts
 create mode 100644 arch/arm/boot/dts/eukrea_mbimxsd35-baseboard.dtsi
Documentation/devicetree/bindings/arm/fsl.txt +4 -0
index 4001d91..40d5d22 100644
@@ -21,6 +21,10 @@ i.MX28 Evaluation Kit
 Required root node properties:
     - compatible = "fsl,imx28-evk", "fsl,imx28";
 
+i.MX35 Eukrea CPUIMX35 Board
+Required root node properties:
+    - compatible = "fsl,eukrea_cpuimx35", "fsl,imx35";
+
 i.MX51 Babbage Board
 Required root node properties:
     - compatible = "fsl,imx51-babbage", "fsl,imx51";
arch/arm/boot/dts/eukrea_cpuimx35.dts new file +45 -0

45 lines not on this page · raw message

arch/arm/boot/dts/eukrea_mbimxsd35-baseboard.dtsi new file +19 -0
new file mode 100644
index 0000000..7ac5572
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2013 Eukr?a Electromatique <[email protected]>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include "skeleton.dtsi"
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart1_1>;
+	fsl,uart-has-rtscts;
+	status = "okay";
+};
Signature · 1 line
1.7.9.5