DT: Add basic support for imx35-based devices.
Subsystems (6)
PATCH v3 1/3 DT: Add basic support for imx35-based devices.
From: Steffen Trumtrar <[email protected]>
---
ChangeLog v2->v3:
- The clock lookups were replaced by their DT counterpart.
--- .../devicetree/bindings/clock/imx35-clock.txt | 115 +++++ arch/arm/boot/dts/imx35.dtsi | 472 ++++++++++++++++++++ arch/arm/mach-imx/Kconfig | 11 + arch/arm/mach-imx/Makefile | 1 + arch/arm/mach-imx/clk-imx35.c | 21 +- arch/arm/mach-imx/common.h | 1 + arch/arm/mach-imx/imx35-dt.c | 48 ++ 7 files changed, 668 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/clock/imx35-clock.txt create mode 100644 arch/arm/boot/dts/imx35.dtsi create mode 100644 arch/arm/mach-imx/imx35-dt.c
Documentation/devicetree/bindings/clock/imx35-clock.txt new file +115 -0
@@ -0,0 +1,115 @@ +* Clock bindings for Freescale i.MX35 + +Required properties: +- compatible: Should be "fsl,imx35-ccm" +- reg: Address and length of the register set +- interrupts: Should contain CCM interrupt +- #clock-cells: Should be <1> + +The clock consumer should specify the desired clock by having the clock +ID in its "clocks" phandle cell. The following is a full list of i.MX35 +clocks and IDs. + + Clock ID + --------------------------- + ckih 0 + mpll 1 + ppll 2 + mpll_075 3 + arm 4 + hsp 5 + hsp_div 6 + hsp_sel 7 + ahb 8 + ipg 9 + arm_per_div 10 + ahb_per_div 11 + ipg_per 12 + uart_sel 13 + uart_div 14 + esdhc_sel 15 + esdhc1_div 16 + esdhc2_div 17 + esdhc3_div 18 + spdif_sel 19 + spdif_div_pre 20 + spdif_div_post 21 + ssi_sel 22 + ssi1_div_pre 23 + ssi1_div_post 24 + ssi2_div_pre 25 + ssi2_div_post 26 + usb_sel 27 + usb_div 28 + nfc_div 29 + asrc_gate 30 + pata_gate 31 + audmux_gate 32 + can1_gate 33 + can2_gate 34 + cspi1_gate 35 + cspi2_gate 36 + ect_gate 37 + edio_gate 38 + emi_gate 39 + epit1_gate 40 + epit2_gate 41 + esai_gate 42 + esdhc1_gate 43 + esdhc2_gate 44 + esdhc3_gate 45 + fec_gate 46 + gpio1_gate 47 + gpio2_gate 48 + gpio3_gate 49 + gpt_gate 50 + i2c1_gate 51 + i2c2_gate 52 + i2c3_gate 53 + iomuxc_gate 54 + ipu_gate 55 + kpp_gate 56 + mlb_gate 57 + mshc_gate 58 + owire_gate 59 + pwm_gate 60 + rngc_gate 61 + rtc_gate 62 + rtic_gate 63 + scc_gate 64 + sdma_gate 65 + spba_gate 66 + spdif_gate 67 + ssi1_gate 68 + ssi2_gate 69 + uart1_gate 70 + uart2_gate 71 + uart3_gate 72 + usbotg_gate 73 + wdog_gate 74 + max_gate 75 + admux_gate 76 + csi_gate 77 + csi_div 78 + csi_sel 79 + iim_gate 80 + gpu2d_gate 81 + clk_max 82 + +Examples: + +clks: ccm at 53f80000 { + compatible = "fsl,imx35-ccm"; + reg = <0x53f80000 0x4000>; + interrupts = <31>; + #clock-cells = <1>; +}; + +esdhc1: esdhc at 53fb4000 { + compatible = "fsl,imx35-esdhc"; + reg = <0x53fb4000 0x4000>; + interrupts = <7>; + clocks = <&clks 9>, <&clks 8>, <&clks 43>; + clock-names = "ipg", "ahb", "per"; + status = "disabled"; +};
arch/arm/boot/dts/imx35.dtsi new file +472 -0
472 lines not on this page · raw message
arch/arm/mach-imx/Kconfig +11 -0
@@ -625,6 +625,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
@@ -89,6 +89,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 +20 -1
@@ -45,6 +45,8 @@ static struct arm_ahb_div clk_consumer[] = {static char hsp_div_532[] = {4 ,8 ,3 ,0 };static char hsp_div_400[] = {3 ,6 ,3 ,0 }; +static struct clk_onecell_data clk_data; +static const char *std_sel[] = {"ppll" ,"arm" };static const char *ipg_per_sel[] = {"ahb_per_div" ,"arm_per_div" };
@@ -127,7 +129,8 @@ int __init mx35_clocks_init(void) clk[esdhc3_div] =imx_clk_divider ("esdhc3_div" ,"esdhc_sel" , base +MX35_CCM_PDR3 ,16 ,6 ); clk[spdif_sel] =imx_clk_mux ("spdif_sel" , base +MX35_CCM_PDR3 ,22 ,1 , std_sel,ARRAY_SIZE (std_sel)); - clk[spdif_div_pre] =imx_clk_divider ("spdif_div_pre" ,"spdif_sel" , base +MX35_CCM_PDR3 ,29 ,3 );/* divide by 1 not allowed */ +/* divide by 1 not allowed */ + clk[spdif_div_pre] =imx_clk_divider ("spdif_div_pre" ,"spdif_sel" , base +MX35_CCM_PDR3 ,29 ,3 ); clk[spdif_div_post] =imx_clk_divider ("spdif_div_post" ,"spdif_div_pre" , base +MX35_CCM_PDR3 ,23 ,6 ); clk[ssi_sel] =imx_clk_mux ("ssi_sel" , base +MX35_CCM_PDR2 ,6 ,1 , std_sel,ARRAY_SIZE (std_sel));
@@ -286,3 +289,19 @@ int __init mx35_clocks_init(void)return 0 ; } + +int __init mx35_clocks_init_dt (void ) +{ +struct device_node *np; +void __iomem *base; +int irq; + + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx35-ccm" ); + clk_data.clks = clk; + clk_data.clk_num =ARRAY_SIZE (clk); +of_clk_add_provider (np, of_clk_src_onecell_get, &clk_data); + +mx35_clocks_init (); + +return 0 ; +}
arch/arm/mach-imx/common.h +1 -0
@@ -68,6 +68,7 @@ extern int mx53_clocks_init(unsigned long ckil, unsigned long osc,extern int mx25_clocks_init_dt (void );extern int mx27_clocks_init_dt (void );extern int mx31_clocks_init_dt (void ); +extern int mx35_clocks_init_dt (void );extern int mx51_clocks_init_dt (void );extern int mx53_clocks_init_dt (void ); extern struct platform_device *mxc_register_gpio(char *name, int id,
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
PATCH v3 2/3 arm/dts: Add support for the cpuimx35 board from Eukrea and its baseboard.
The following devices/functionalities were added:
* Main and secondary UARTs.
* i2c and the pcf8563 device.
* Ethernet.
* NAND.
* The BP1 button.
* The LED.
* Watchdog
* SD.
---
ChangeLog v2->v3:
- This patch was splitted, the part that enabled the display, the audio, and the touchscreen was removed and will be submited in a new patch serie(because they depend on changes touching other subsystems).
- The pads for the tsc2007 were moved in the imx35-eukrea-cpuimx35.dtsi file because the tsc2007 touchscreen controller is on the cpuimx35 module and not on its baseboard.
--- arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi | 61 +++++++++ .../boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts | 134 ++++++++++++++++++++ 2 files changed, 195 insertions(+) create mode 100644 arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi create mode 100644 arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
arch/arm/boot/dts/imx35-eukrea-cpuimx35.dtsi new file +61 -0
@@ -0,0 +1,61 @@ +/* + * 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 "imx35.dtsi" + +/ { + model = "Eukrea CPUIMX35"; + compatible = "eukrea,cpuimx35", "fsl,imx35"; + + memory { + reg = <0x80000000 0x8000000>; /* 128M */ + }; +}; + +&fec { + 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>; + }; +}; + +&iomuxc { + tsc2007 { + pinctrl_tsc2007_1: tsc2007grp-1 { + fsl,pins = < + MX35_PAD_ATA_DA2__GPIO3_2 0x80000000 + >; + }; + }; +}; + +&nfc { + nand-bus-width = <8>; + nand-ecc-mode = "hw"; + nand-on-flash-bbt; + status = "okay"; +};
arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts new file +134 -0
134 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Sascha Hauer
maintainerPATCH v3 2/3 arm/dts: Add support for the cpuimx35 board from Eukrea and its baseboard.
Hi Denis,
You missed the most important person on Cc: Shawn Guo. He is the one who applies patches to i.MX.
arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts line 115
Quoted 9 lines · Denis Carikli
+&ipu {
arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts new file +8
-0+ status = "okay"; +}; + +&lcdc { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcdc_1>; + ipu-disp-format = "rgb666"; +};
Please drop the graphics nodes for now until we have the IPU bindings sorted out and merged.
Otherwise:
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 |
PATCH v3 3/3 ARM: imx_v6_v7_defconfig: Enable some drivers used on the cpuimx35.
In reply to Denis CarikliThe eukrea cpuimx35 has a pcf8563 RTC, an LCD gpio regulator,
and a gpio led.
We enable the respective drivers in order to be able to use theses
features with this configuration.
We also enabled the i.MX35 DT support because the cpuimx35 has now DT support.
---
ChangeLog v2->v3:
- The commits touching imx_v6_v7_defconfig were squashed.
--- arch/arm/configs/imx_v6_v7_defconfig | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/configs/imx_v6_v7_defconfig +7 -0
@@ -28,6 +28,7 @@ CONFIG_MACH_QONG=y CONFIG_MACH_ARMADILLO5X0=y CONFIG_MACH_KZM_ARM11_01=y CONFIG_MACH_IMX31_DT=y +CONFIG_MACH_IMX35_DT=y CONFIG_MACH_PCM043=y CONFIG_MACH_MX35_3DS=y CONFIG_MACH_VPR200=y
@@ -161,6 +162,7 @@ CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_ANATOP=y CONFIG_REGULATOR_DA9052=y +CONFIG_REGULATOR_GPIO=y CONFIG_REGULATOR_MC13783=y CONFIG_REGULATOR_MC13892=y CONFIG_MEDIA_SUPPORT=y
@@ -204,8 +206,13 @@ CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_SDHCI_ESDHC_IMX=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_RTC_CLASS=y CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_PCF8563=y CONFIG_RTC_DRV_MC13XXX=y CONFIG_RTC_DRV_MXC=y CONFIG_RTC_DRV_SNVS=y
Signature · 1 line
1.7.9.5