Convert mxs board files to device tree
Subsystems (5)
v2 cover Convert mxs board files to device tree
Changes since v1:
* Drop pwm, backlight and led for m28evk
* Enable enet_out clock for m28evk as well
* Drop the rewriting of tx28_add_fec0 for tx28
Regards,
Shawn
Marek Vasut (1):
ARM: mxs: convert m28evk board to device tree
Shawn Guo (6):
ARM: dts: imx28: move extra gpmi-nand pins into board dts
ARM: dts: imx28: move lcdif control pins into board dts
ARM: mxs: convert apx4devkit board to device tree
ARM: mxs: convert tx28 board to device tree
ARM: mxs: convert stmp378x_devb board to device tree
ARM: mxs: add dtb-y target into Makefile.boot
arch/arm/boot/dts/apx4devkit.dts | 143 ++++++++++++++++++++++++ arch/arm/boot/dts/imx28-evk.dts | 30 +++++- arch/arm/boot/dts/imx28.dtsi | 86 +++++++++++++- arch/arm/boot/dts/m28evk.dts | 210 +++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/stmp378x_devb.dts | 78 +++++++++++++ arch/arm/boot/dts/tx28.dts | 82 ++++++++++++++ arch/arm/mach-mxs/Makefile.boot | 9 ++ arch/arm/mach-mxs/mach-mxs.c | 67 ++++++++++- 8 files changed, 692 insertions(+), 13 deletions(-) create mode 100644 arch/arm/boot/dts/apx4devkit.dts create mode 100644 arch/arm/boot/dts/m28evk.dts create mode 100644 arch/arm/boot/dts/stmp378x_devb.dts create mode 100644 arch/arm/boot/dts/tx28.dts
Signature · 1 line
1.7.5.4
PATCH v2 1/7 ARM: dts: imx28: move extra gpmi-nand pins into board dts
Only pins GPMI_CE0N and GPMI_READY0 are generally used by other boards. Move GPMI_CE1N and GPMI_READY1 into imx28-evk.dts to make gpmi_pins_a more general, and can be used by other boards.
--- arch/arm/boot/dts/imx28-evk.dts | 14 +++++++++++++- arch/arm/boot/dts/imx28.dtsi | 2 -- 2 files changed, 13 insertions(+), 3 deletions(-)
arch/arm/boot/dts/imx28-evk.dts +13 -1
@@ -24,7 +24,8 @@ apbh at 80000000 { gpmi-nand at 8000c000 { pinctrl-names = "default"; - pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>; + pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg + &gpmi_pins_evk>; status = "okay"; };
@@ -64,6 +65,17 @@ fsl,voltage = <1>; fsl,pull-up = <0>; }; + + gpmi_pins_evk: gpmi-nand-evk at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x0110 /* MX28_PAD_GPMI_CE1N__GPMI_CE1N */ + 0x0150 /* MX28_PAD_GPMI_RDY1__GPMI_READY1 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; }; lcdif at 80030000 {
arch/arm/boot/dts/imx28.dtsi +0 -2
@@ -198,9 +198,7 @@ 0x0060 /* MX28_PAD_GPMI_D06__GPMI_D6 */ 0x0070 /* MX28_PAD_GPMI_D07__GPMI_D7 */ 0x0100 /* MX28_PAD_GPMI_CE0N__GPMI_CE0N */ - 0x0110 /* MX28_PAD_GPMI_CE1N__GPMI_CE1N */ 0x0140 /* MX28_PAD_GPMI_RDY0__GPMI_READY0 */ - 0x0150 /* MX28_PAD_GPMI_RDY1__GPMI_READY1 */ 0x0180 /* MX28_PAD_GPMI_RDN__GPMI_RDN */ 0x0190 /* MX28_PAD_GPMI_WRN__GPMI_WRN */ 0x01a0 /* MX28_PAD_GPMI_ALE__GPMI_ALE */
Signature · 1 line
1.7.5.4
PATCH v2 2/7 ARM: dts: imx28: move lcdif control pins into board dts
In reply to Shawn GuoThe presence and muxing of lcdif control pins can vary much on different boards. Move them into imx28-evk.dts to make lcdif_24bit_pins_a only about data pins, so that it can be reused by other boards.
--- arch/arm/boot/dts/imx28-evk.dts | 16 +++++++++++++++- arch/arm/boot/dts/imx28.dtsi | 4 ---- 2 files changed, 15 insertions(+), 5 deletions(-)
arch/arm/boot/dts/imx28-evk.dts +15 -1
@@ -76,11 +76,25 @@ fsl,voltage = <1>; fsl,pull-up = <0>; }; + + lcdif_pins_evk: lcdif-evk at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */ + 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */ + 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */ + 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; }; lcdif at 80030000 { pinctrl-names = "default"; - pinctrl-0 = <&lcdif_24bit_pins_a>; + pinctrl-0 = <&lcdif_24bit_pins_a + &lcdif_pins_evk>; panel-enable-gpios = <&gpio3 30 0>; status = "okay"; };
arch/arm/boot/dts/imx28.dtsi +0 -4
@@ -400,10 +400,6 @@ 0x1150 /* MX28_PAD_LCD_D21__LCD_D21 */ 0x1160 /* MX28_PAD_LCD_D22__LCD_D22 */ 0x1170 /* MX28_PAD_LCD_D23__LCD_D23 */ - 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */ - 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */ - 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */ - 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */ >; fsl,drive-strength = <0>; fsl,voltage = <1>;
Signature · 1 line
1.7.5.4
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
In reply to Shawn GuoFrom: Marek Vasut <[email protected]>
--- arch/arm/boot/dts/imx28.dtsi | 11 ++ arch/arm/boot/dts/m28evk.dts | 210 ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 41 ++++++++- 3 files changed, 258 insertions(+), 4 deletions(-) create mode 100644 arch/arm/boot/dts/m28evk.dts
arch/arm/boot/dts/imx28.dtsi +11 -0
@@ -232,6 +232,17 @@ fsl,pull-up = <0>; }; + auart0_2pins_a: auart0-2pins at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3000 /* MX28_PAD_AUART0_RX__AUART0_RX */ + 0x3010 /* MX28_PAD_AUART0_TX__AUART0_TX */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + auart3_pins_a: auart3 at 0 { reg = <0>; fsl,pinmux-ids = <
arch/arm/boot/dts/m28evk.dts new file +210 -0
210 lines not on this page · raw message
arch/arm/mach-mxs/mach-mxs.c +37 -4
76 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
Dear Shawn Guo,
Quoted 2 lines
From: Marek Vasut <[email protected]>
[...]
arch/arm/boot/dts/m28evk.dts line 204
Quoted 2 lines
arch/arm/boot/dts/m28evk.dts new file +2
-0+ sound { + compatible = "fsl,imx28-evk-sgtl5000",
imx28-evk ? ;-)
arch/arm/boot/dts/m28evk.dts line 210
Quoted 6 lines
arch/arm/boot/dts/m28evk.dts new file +6
-0+ "fsl,mxs-audio-sgtl5000"; + model = "imx28-evk-sgtl5000"; + saif-controllers = <&saif0 &saif1>; + audio-codec = <&sgtl5000>; + }; +};
Otherwise, add my Acked-by: Marek Vasut <[email protected]> so if it gets broken now, the blame falls on my head ;-)
Best regards,
Marek Vasut
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
Quoted 11 lines · Marek Vasut
Dear Shawn Guo,
Quoted 2 lines
From: Marek Vasut <[email protected]>
[...]
arch/arm/boot/dts/m28evk.dts line 204
Quoted 2 lines
arch/arm/boot/dts/m28evk.dts new file +2
-0+ sound { + compatible = "fsl,imx28-evk-sgtl5000",imx28-evk ? ;-)
Will fix it, as well as apx4devkit.dts.
Quoted 10 lines
arch/arm/boot/dts/m28evk.dts line 210
Quoted 6 lines
arch/arm/boot/dts/m28evk.dts new file +6
-0+ "fsl,mxs-audio-sgtl5000"; + model = "imx28-evk-sgtl5000"; + saif-controllers = <&saif0 &saif1>; + audio-codec = <&sgtl5000>; + }; +};Otherwise, add my Acked-by: Marek Vasut <[email protected]> so if it gets broken now, the blame falls on my head ;-)
I'm much relieved now.
Regards,
Shawn
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
Dear Shawn Guo,
Quoted 21 lines · Marek Vasut
Quoted 10 lines
Dear Shawn Guo,
Quoted 1 line
From: Marek Vasut <[email protected]>
[...]
arch/arm/boot/dts/m28evk.dts line 204
Quoted 2 lines
arch/arm/boot/dts/m28evk.dts new file +2
-0+ sound { + compatible = "fsl,imx28-evk-sgtl5000",imx28-evk ? ;-)
Will fix it, as well as
apx4devkit.dts.Quoted 7 lines
Quoted 6 lines
arch/arm/boot/dts/m28evk.dts new file +6
-0+ "fsl,mxs-audio-sgtl5000"; + model = "imx28-evk-sgtl5000"; + saif-controllers = <&saif0 &saif1>; + audio-codec = <&sgtl5000>; + }; +};
Quoted 4 lines
Quoted 2 lines
Otherwise, add my Acked-by: Marek Vasut <[email protected]> so if it gets broken now, the blame falls on my head ;-)
I'm much relieved now.
Heh ;-)
Quoted 2 lines
Regards,
Shawn
Best regards,
Marek Vasut
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
In reply to Marek VasutQuoted 11 lines · Marek Vasut
Dear Shawn Guo,
Quoted 2 lines
From: Marek Vasut <[email protected]>
[...]
Review
Quoted 2 lines
(quoted diff) +2
-0+ sound { + compatible = "fsl,imx28-evk-sgtl5000",imx28-evk ? ;-)
Fixed as below.
Regards,
Shawn
---8<---
arch/arm/boot/dts/apx4devkit.dts +2 -2
@@ -124,9 +124,9 @@ }; sound { - compatible = "fsl,imx28-evk-sgtl5000", + compatible = "bluegiga,apx4devkit-sgtl5000", "fsl,mxs-audio-sgtl5000"; - model = "imx28-evk-sgtl5000"; + model = "apx4devkit-sgtl5000"; saif-controllers = <&saif0 &saif1>; audio-codec = <&sgtl5000>; };
arch/arm/boot/dts/m28evk.dts +2 -2
@@ -201,9 +201,9 @@ }; sound { - compatible = "fsl,imx28-evk-sgtl5000", + compatible = "denx,m28evk-sgtl5000", "fsl,mxs-audio-sgtl5000"; - model = "imx28-evk-sgtl5000"; + model = "m28evk-sgtl5000"; saif-controllers = <&saif0 &saif1>; audio-codec = <&sgtl5000>; };
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
Dear Shawn Guo,
Quoted 11 lines · Marek Vasut
Quoted 10 lines
Dear Shawn Guo,
Quoted 1 line
From: Marek Vasut <[email protected]>
[...]
Review
Quoted 2 lines
(quoted diff) +2
-0+ sound { + compatible = "fsl,imx28-evk-sgtl5000",imx28-evk ? ;-)
Good on my end.
Quoted 4 lines
Fixed as below.
Regards,
Shawn
[...]
arch/arm/boot/dts/m28evk.dts
Quoted 1 line
arch/arm/boot/dts/m28evk.dts +0
-0
Just a suggestion -- why not name all the imx28-based boards' DTS files "imx28- <board>.dts" ? In this case imx28-m28evk.dts , it'd make it obvious where this board fits.
[...]
Best regards,
Marek Vasut
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
Quoted 5 lines · Marek Vasut
arch/arm/boot/dts/m28evk.dts
Quoted 1 line
arch/arm/boot/dts/m28evk.dts +0
-0Just a suggestion -- why not name all the imx28-based boards' DTS files "imx28- <board>.dts" ? In this case
imx28-m28evk.dts, it'd make it obvious where this board fits.
Because the name scheme is simply <boardname>.dts rather than imx28-<boardname>.dts. Also the name of imx28-m28evk and imx28-tx28 look a little redundant on "28".
Signature · 2 lines
Regards, Shawn
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
Dear Shawn Guo,
Quoted 11 lines · Marek Vasut
Quoted 6 lines
arch/arm/boot/dts/m28evk.dts
Quoted 2 lines
arch/arm/boot/dts/m28evk.dts +0
-0Just a suggestion -- why not name all the imx28-based boards' DTS files "imx28- <board>.dts" ? In this case
imx28-m28evk.dts, it'd make it obvious where this board fits.Because the name scheme is simply <boardname>.dts rather than imx28-<boardname>.dts. Also the name of imx28-m28evk and imx28-tx28 look a little redundant on "28".
But at least it's quite consistent and it's easy to locate your board since you usually know the cpu type. If you shove in just <boardname>.dts, it'll soon become horrible mess.
Best regards,
Marek Vasut
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
Quoted 4 lines · Marek Vasut
But at least it's quite consistent and it's easy to locate your board since you usually know the cpu type. If you shove in just <boardname>.dts, it'll soon become horrible mess.
Ok, I could send a follow-up patch to rename the files. But the compatible string of the board will stay as the board name.
Signature · 2 lines
Regards, Shawn
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
Dear Shawn Guo,
Quoted 7 lines · Marek Vasut
Quoted 3 lines
But at least it's quite consistent and it's easy to locate your board since you usually know the cpu type. If you shove in just <boardname>.dts, it'll soon become horrible mess.
Ok, I could send a follow-up patch to rename the files. But the compatible string of the board will stay as the board name.
The compatible string is all right, my concern is just the mess in the file names. Look at imx{51,53,6q}, kirkwood, tegra20, ... let's make it nicely at the begining, it's just a matter of simple git mv and git commit --amend ;-)
Best regards,
Marek Vasut
PATCH v2 3/7 ARM: mxs: convert m28evk board to device tree
In reply to Shawn GuoFrom: Marek Vasut <[email protected]>
--- arch/arm/boot/dts/imx28.dtsi | 11 ++ arch/arm/boot/dts/m28evk.dts | 210 ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 41 ++++++++- 3 files changed, 258 insertions(+), 4 deletions(-) create mode 100644 arch/arm/boot/dts/m28evk.dts
arch/arm/boot/dts/imx28.dtsi +11 -0
@@ -232,6 +232,17 @@ fsl,pull-up = <0>; }; + auart0_2pins_a: auart0-2pins at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3000 /* MX28_PAD_AUART0_RX__AUART0_RX */ + 0x3010 /* MX28_PAD_AUART0_TX__AUART0_TX */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + auart3_pins_a: auart3 at 0 { reg = <0>; fsl,pinmux-ids = <
arch/arm/boot/dts/m28evk.dts new file +210 -0
210 lines not on this page · raw message
arch/arm/mach-mxs/mach-mxs.c +37 -4
76 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v2 4/7 ARM: mxs: convert apx4devkit board to device tree
In reply to Shawn Guo--- arch/arm/boot/dts/apx4devkit.dts | 143 ++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi | 33 +++++++++ arch/arm/mach-mxs/mach-mxs.c | 20 +++++ 3 files changed, 196 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/apx4devkit.dts
arch/arm/boot/dts/apx4devkit.dts new file +143 -0
@@ -0,0 +1,143 @@ +/dts-v1/; +/include/ "imx28.dtsi" + +/ { + model = "Bluegiga APX4 Development Kit"; + compatible = "bluegiga,apx4devkit", "fsl,imx28"; + + memory { + reg = <0x40000000 0x04000000>; + }; + + apb at 80000000 { + apbh at 80000000 { + ssp0: ssp at 80010000 { + compatible = "fsl,imx28-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_8bit_pins_a + &mmc0_cd_cfg + &mmc0_sck_cfg>; + bus-width = <8>; + status = "okay"; + }; + + pinctrl at 80018000 { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>; + + hog_pins_a: hog-gpios at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x31c3 /* MX28_PAD_PWM3__GPIO_3_28 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + }; + + apbx at 80040000 { + saif0: saif at 80042000 { + pinctrl-names = "default"; + pinctrl-0 = <&saif0_pins_a>; + status = "okay"; + }; + + saif1: saif at 80046000 { + pinctrl-names = "default"; + pinctrl-0 = <&saif1_pins_a>; + fsl,saif-master = <&saif0>; + status = "okay"; + }; + + i2c0: i2c at 80058000 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins_a>; + status = "okay"; + + sgtl5000: codec at 0a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + VDDA-supply = <®_3p3v>; + VDDIO-supply = <®_3p3v>; + + }; + + pcf8563: rtc at 51 { + compatible = "phg,pcf8563"; + reg = <0x51>; + }; + }; + + duart: serial at 80074000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + + auart0: serial at 8006a000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart0_pins_a>; + status = "okay"; + }; + + auart1: serial at 8006c000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart1_2pins_a>; + status = "okay"; + }; + + auart2: serial at 8006e000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart2_2pins_a>; + status = "okay"; + }; + + auart3: serial at 80070000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart3_2pins_a>; + status = "okay"; + }; + }; + }; + + ahb at 80080000 { + mac0: ethernet at 800f0000 { + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>; + status = "okay"; + }; + }; + + regulators { + compatible = "simple-bus"; + + reg_3p3v: 3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; + + sound { + compatible = "fsl,imx28-evk-sgtl5000", + "fsl,mxs-audio-sgtl5000"; + model = "imx28-evk-sgtl5000"; + saif-controllers = <&saif0 &saif1>; + audio-codec = <&sgtl5000>; + }; + + leds { + compatible = "gpio-leds"; + + user { + label = "Heartbeat"; + gpios = <&gpio3 28 0>; + linux,default-trigger = "heartbeat"; + }; + }; +};
arch/arm/boot/dts/imx28.dtsi +33 -0
@@ -243,6 +243,28 @@ fsl,pull-up = <0>; }; + auart1_2pins_a: auart1-2pins at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3040 /* MX28_PAD_AUART1_RX__AUART1_RX */ + 0x3050 /* MX28_PAD_AUART1_TX__AUART1_TX */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + + auart2_2pins_a: auart2-2pins at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2101 /* MX28_PAD_SSP2_SCK__AUART2_RX */ + 0x2111 /* MX28_PAD_SSP2_MOSI__AUART2_TX */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + auart3_pins_a: auart3 at 0 { reg = <0>; fsl,pinmux-ids = <
@@ -256,6 +278,17 @@ fsl,pull-up = <0>; }; + auart3_2pins_a: auart3-2pins at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2121 /* MX28_PAD_SSP2_MISO__AUART3_RX */ + 0x2131 /* MX28_PAD_SSP2_SS0__AUART3_TX */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + mac0_pins_a: mac0 at 0 { reg = <0>; fsl,pinmux-ids = <
arch/arm/mach-mxs/mach-mxs.c +20 -0
@@ -16,9 +16,11 @@#include <linux/init.h> #include <linux/init.h> #include <linux/irqdomain.h> +#include <linux/micrel_phy.h> #include <linux/mxsfb.h> #include <linux/of_irq.h> #include <linux/of_platform.h> +#include <linux/phy.h> #include <asm/mach/arch.h> #include <asm/mach/time.h> #include <mach/common.h>
@@ -233,6 +235,21 @@ static void __init m28evk_init(void) mxsfb_pdata.ld_intf_width =STMLCDIF_18BIT ; } +static int apx4devkit_phy_fixup (struct phy_device *phy) +{ + phy->dev_flags |=MICREL_PHY_50MHZ_CLK ; +return 0 ; +} + +static void __init apx4devkit_init (void ) +{ +enable_clk_enet_out (); + +if (IS_BUILTIN (CONFIG_PHYLIB )) +phy_register_fixup_for_uid (PHY_ID_KS8051 ,MICREL_PHY_ID_MASK , + apx4devkit_phy_fixup); +} +static void __init mxs_machine_init (void ) {if (of_machine_is_compatible ("fsl,imx28-evk" ))
@@ -241,6 +258,8 @@ static void __init mxs_machine_init(void)imx23_evk_init (); else if (of_machine_is_compatible("denx,m28evk")) m28evk_init(); + else if (of_machine_is_compatible("bluegiga,apx4devkit")) + apx4devkit_init();of_platform_populate (NULL ,of_default_bus_match_table ,mxs_auxdata_lookup ,NULL );
@@ -254,6 +273,7 @@ static const char *imx23_dt_compat[] __initdata = { };static const char *imx28_dt_compat[]__initdata = { +"bluegiga,apx4devkit" ,"crystalfontz,cfa10036" ,"denx,m28evk" ,"fsl,imx28-evk" ,
Signature · 1 line
1.7.5.4
PATCH v2 5/7 ARM: mxs: convert tx28 board to device tree
In reply to Shawn GuoFEC support is missing because we need to find a proper way to rewrite tx28_add_fec0 for device tree boot.
--- arch/arm/boot/dts/imx28.dtsi | 36 ++++++++++++++++++ arch/arm/boot/dts/tx28.dts | 82 ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 5 ++- 3 files changed, 122 insertions(+), 1 deletions(-) create mode 100644 arch/arm/boot/dts/tx28.dts
arch/arm/boot/dts/imx28.dtsi +36 -0
@@ -186,6 +186,19 @@ fsl,pull-up = <0>; }; + duart_4pins_a: duart-4pins at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3022 /* MX28_PAD_AUART0_CTS__DUART_RX */ + 0x3032 /* MX28_PAD_AUART0_RTS__DUART_TX */ + 0x3002 /* MX28_PAD_AUART0_RX__DUART_CTS */ + 0x3012 /* MX28_PAD_AUART0_TX__DUART_RTS */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + gpmi_pins_a: gpmi-nand at 0 { reg = <0>; fsl,pinmux-ids = <
@@ -243,6 +256,19 @@ fsl,pull-up = <0>; }; + auart1_pins_a: auart1 at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3040 /* MX28_PAD_AUART1_RX__AUART1_RX */ + 0x3050 /* MX28_PAD_AUART1_TX__AUART1_TX */ + 0x3060 /* MX28_PAD_AUART1_CTS__AUART1_CTS */ + 0x3070 /* MX28_PAD_AUART1_RTS__AUART1_RTS */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + auart1_2pins_a: auart1-2pins at 0 { reg = <0>; fsl,pinmux-ids = <
@@ -407,6 +433,16 @@ fsl,pull-up = <1>; }; + pwm0_pins_a: pwm0 at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x3100 /* MX28_PAD_PWM0__PWM_0 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + pwm2_pins_a: pwm2 at 0 { reg = <0>; fsl,pinmux-ids = <
arch/arm/boot/dts/tx28.dts new file +82 -0
82 lines not on this page · raw message
arch/arm/mach-mxs/mach-mxs.c +4 -1
@@ -12,8 +12,9 @@#include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/delay.h> #include <linux/err.h> -#include <linux/init.h> +#include <linux/gpio.h> #include <linux/init.h> #include <linux/irqdomain.h> #include <linux/micrel_phy.h>
@@ -24,6 +25,7 @@#include <asm/mach/arch.h> #include <asm/mach/time.h> #include <mach/common.h> +#include <mach/mxs.h> static struct fb_videomode mx23evk_video_modes[] = { {
@@ -277,6 +279,7 @@ static const char *imx28_dt_compat[] __initdata = {"crystalfontz,cfa10036" ,"denx,m28evk" ,"fsl,imx28-evk" , +"karo,tx28" ,"fsl,imx28" , NULL, };
Signature · 1 line
1.7.5.4
PATCH v2 5/7 ARM: mxs: convert tx28 board to device tree
Quoted 16 lines · Shawn Guo
arch/arm/mach-mxs/mach-mxs.c +2
-1@@ -12,8 +12,9 @@#include <linux/clk.h> #include <linux/clkdev.h> +#include <linux/delay.h> #include <linux/err.h> -#include <linux/init.h> +#include <linux/gpio.h> #include <linux/init.h> #include <linux/irqdomain.h> #include <linux/micrel_phy.h>
arch/arm/mach-mxs/mach-mxs.c line 29
Quoted 5 lines
arch/arm/mach-mxs/mach-mxs.c +1
-0@@ -24,6 +25,7 @@#include <asm/mach/arch.h> #include <asm/mach/time.h> #include <mach/common.h> +#include <mach/mxs.h>
With tx28_init dropped, these header changes shouldn't be here any more.
Regards,
Shawn
Quoted 14 lines
arch/arm/mach-mxs/mach-mxs.c +1
-0static struct fb_videomode mx23evk_video_modes[] = { {@@ -277,6 +279,7 @@ static const char *imx28_dt_compat[] __initdata = {"crystalfontz,cfa10036" ,"denx,m28evk" ,"fsl,imx28-evk" , +"karo,tx28" ,"fsl,imx28" , NULL, };Signature · 1 line
1.7.5.4
PATCH v2 6/7 ARM: mxs: convert stmp378x_devb board to device tree
In reply to Shawn GuoThe enc28j60 spi device does not get converted to dts file, because there is no mxs spi driver on mainline so far. The enc28j60 spi in mach-stmp378x_devb.c does not work anyway.
--- arch/arm/boot/dts/stmp378x_devb.dts | 78 +++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 1 + 2 files changed, 79 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/stmp378x_devb.dts
arch/arm/boot/dts/stmp378x_devb.dts new file +78 -0
@@ -0,0 +1,78 @@ +/* + * Copyright 2012 Freescale Semiconductor, Inc. + * + * 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/ "imx23.dtsi" + +/ { + model = "Freescale STMP378x Development Board"; + compatible = "fsl,stmp378x-devb", "fsl,imx23"; + + memory { + reg = <0x40000000 0x04000000>; + }; + + apb at 80000000 { + apbh at 80000000 { + ssp0: ssp at 80010000 { + compatible = "fsl,imx23-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_pins_fixup>; + bus-width = <4>; + wp-gpios = <&gpio1 30 0>; + vmmc-supply = <®_vddio_sd0>; + status = "okay"; + }; + + pinctrl at 80018000 { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>; + + hog_pins_a: hog-gpios at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x11d3 /* MX23_PAD_PWM3__GPIO_1_29 */ + 0x11e3 /* MX23_PAD_PWM4__GPIO_1_30 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + }; + + apbx at 80040000 { + auart0: serial at 8006c000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart0_pins_a>; + status = "okay"; + }; + + duart: serial at 80070000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + }; + }; + + regulators { + compatible = "simple-bus"; + + reg_vddio_sd0: vddio-sd0 { + compatible = "regulator-fixed"; + regulator-name = "vddio-sd0"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 29 0>; + }; + }; +};
arch/arm/mach-mxs/mach-mxs.c +1 -0
@@ -269,6 +269,7 @@ static void __init mxs_machine_init(void)static const char *imx23_dt_compat[]__initdata = {"fsl,imx23-evk" , +"fsl,stmp378x_devb" "olimex,imx23-olinuxino" ,"fsl,imx23" ,NULL ,
Signature · 1 line
1.7.5.4
PATCH v2 6/7 ARM: mxs: convert stmp378x_devb board to device tree
In reply to Shawn GuoThe enc28j60 spi device does not get converted to dts file, because there is no mxs spi driver on mainline so far. The enc28j60 spi in mach-stmp378x_devb.c does not work anyway.
--- arch/arm/boot/dts/stmp378x_devb.dts | 78 +++++++++++++++++++++++++++++++++++ arch/arm/mach-mxs/mach-mxs.c | 1 + 2 files changed, 79 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/stmp378x_devb.dts
arch/arm/boot/dts/stmp378x_devb.dts new file +78 -0
@@ -0,0 +1,78 @@ +/* + * Copyright 2012 Freescale Semiconductor, Inc. + * + * 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/ "imx23.dtsi" + +/ { + model = "Freescale STMP378x Development Board"; + compatible = "fsl,stmp378x-devb", "fsl,imx23"; + + memory { + reg = <0x40000000 0x04000000>; + }; + + apb at 80000000 { + apbh at 80000000 { + ssp0: ssp at 80010000 { + compatible = "fsl,imx23-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_pins_fixup>; + bus-width = <4>; + wp-gpios = <&gpio1 30 0>; + vmmc-supply = <®_vddio_sd0>; + status = "okay"; + }; + + pinctrl at 80018000 { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>; + + hog_pins_a: hog-gpios at 0 { + reg = <0>; + fsl,pinmux-ids = < + 0x11d3 /* MX23_PAD_PWM3__GPIO_1_29 */ + 0x11e3 /* MX23_PAD_PWM4__GPIO_1_30 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; + }; + + apbx at 80040000 { + auart0: serial at 8006c000 { + pinctrl-names = "default"; + pinctrl-0 = <&auart0_pins_a>; + status = "okay"; + }; + + duart: serial at 80070000 { + pinctrl-names = "default"; + pinctrl-0 = <&duart_pins_a>; + status = "okay"; + }; + }; + }; + + regulators { + compatible = "simple-bus"; + + reg_vddio_sd0: vddio-sd0 { + compatible = "regulator-fixed"; + regulator-name = "vddio-sd0"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 29 0>; + }; + }; +};
arch/arm/mach-mxs/mach-mxs.c +1 -0
@@ -269,6 +269,7 @@ static void __init mxs_machine_init(void)static const char *imx23_dt_compat[]__initdata = {"fsl,imx23-evk" , +"fsl,stmp378x_devb" "olimex,imx23-olinuxino" ,"fsl,imx23" ,NULL ,
Signature · 1 line
1.7.5.4
PATCH v2 7/7 ARM: mxs: add dtb-y target into Makefile.boot
In reply to Shawn GuoAdd dtb-y target into Makefile.boot, so that "make ARCH=arm dtbs" can build out all the dtbs listed there. It's very useful for build-testing all the <board>.dts when imx28.dtsi changes.
--- arch/arm/mach-mxs/Makefile.boot | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-mxs/Makefile.boot +9 -0
@@ -1 +1,10 @@ zreladdr-y += 0x40008000 + +dtb-y += apx4devkit.dtb \ + cfa10036.dtb \ + imx23-evk.dtb \ + imx23-olinuxino.dtb \ + imx28-evk.dtb \ + m28evk.dtb \ + stmp378x_devb.dtb \ + tx28.dtb \
Signature · 1 line
1.7.5.4