mx23-evk: Import devicetree file from Linux
Subsystems (2)
Fabio Estevam
reviewerPATCH v2 1/3 mx23-evk: Import devicetree file from Linux
Import the imx23-evk devicetree files from Linux kernel version 5.11.
This is in preparation for converting the mx23evk_defconfig target to driver model.
---
Changes since v1:
- Fix subject mx28->mx23
arch/arm/dts/imx23-evk.dts | 145 ++++++++ arch/arm/dts/imx23-pinfunc.h | 333 ++++++++++++++++++ arch/arm/dts/imx23.dtsi | 636 +++++++++++++++++++++++++++++++++++ 3 files changed, 1114 insertions(+) create mode 100644 arch/arm/dts/imx23-evk.dts create mode 100644 arch/arm/dts/imx23-pinfunc.h create mode 100644 arch/arm/dts/imx23.dtsi
arch/arm/dts/imx23-evk.dts new file +145 -0
@@ -0,0 +1,145 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// Copyright 2012 Freescale Semiconductor, Inc. + +/dts-v1/; +#include "imx23.dtsi" + +/ { + model = "Freescale i.MX23 Evaluation Kit"; + compatible = "fsl,imx23-evk", "fsl,imx23"; + + memory at 40000000 { + device_type = "memory"; + reg = <0x40000000 0x08000000>; + }; + + reg_vddio_sd0: regulator-vddio-sd0 { + compatible = "regulator-fixed"; + regulator-name = "vddio-sd0"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 29 0>; + }; + + reg_lcd_3v3: regulator-lcd-3v3 { + compatible = "regulator-fixed"; + regulator-name = "lcd-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 18 0>; + enable-active-high; + }; + + reg_lcd_5v: regulator-lcd-5v { + compatible = "regulator-fixed"; + regulator-name = "lcd-5v"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + panel { + compatible = "sii,43wvf1g"; + backlight = <&backlight_display>; + dvdd-supply = <®_lcd_3v3>; + avdd-supply = <®_lcd_5v>; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; + + apb at 80000000 { + apbh at 80000000 { + nand-controller at 8000c000 { + pinctrl-names = "default"; + pinctrl-0 = <&gpmi_pins_a &gpmi_pins_fixup>; + status = "okay"; + }; + + ssp0: spi 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 at 0 { + reg = <0>; + fsl,pinmux-ids = < + MX23_PAD_LCD_RESET__GPIO_1_18 + MX23_PAD_PWM3__GPIO_1_29 + MX23_PAD_PWM4__GPIO_1_30 + MX23_PAD_SSP1_DETECT__SSP1_DETECT + >; + fsl,drive-strength = <MXS_DRIVE_4mA>; + fsl,voltage = <MXS_VOLTAGE_HIGH>; + fsl,pull-up = <MXS_PULL_DISABLE>; + }; + }; + + lcdif at 80030000 { + pinctrl-names = "default"; + pinctrl-0 = <&lcdif_24bit_pins_a>; + status = "okay"; + + port { + display_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + }; + + apbx at 80040000 { + lradc at 80050000 { + status = "okay"; + fsl,lradc-touchscreen-wires = <4>; + }; + + pwm: pwm at 80064000 { + pinctrl-names = "default"; + pinctrl-0 = <&pwm2_pins_a>; + status = "okay"; + }; + + 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"; + }; + + usbphy0: usbphy at 8007c000 { + status = "okay"; + }; + }; + }; + + ahb at 80080000 { + usb0: usb at 80080000 { + status = "okay"; + }; + }; + + backlight_display: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 2 5000000>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + }; +};
arch/arm/dts/imx23-pinfunc.h new file +333 -0
333 lines not on this page · raw message
arch/arm/dts/imx23.dtsi new file +636 -0
636 lines not on this page · raw message
Signature · 1 line
2.25.1
Fabio Estevam
reviewerPATCH v2 2/3 mx23evk: Convert to driver model
Make the conversion to driver model as it is mandatory.
Successfully tested booting Linux from the SD card.
Dropped splash screen support as this needs to be properly converted to DM and tested.
---
Changes since v1:
- Fix subject mx28->mx23
arch/arm/dts/Makefile | 3 +++ arch/arm/dts/imx23-evk-u-boot.dtsi | 4 ++++ arch/arm/dts/imx23-u-boot.dtsi | 14 ++++++++++++++ arch/arm/dts/imx23.dtsi | 2 +- board/freescale/mx23evk/mx23evk.c | 23 ----------------------- configs/mx23evk_defconfig | 14 +++++++++++--- 6 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 arch/arm/dts/imx23-evk-u-boot.dtsi create mode 100644 arch/arm/dts/imx23-u-boot.dtsi
arch/arm/dts/Makefile +3 -0
@@ -650,6 +650,9 @@ dtb-$(CONFIG_VF610) += vf500-colibri.dtb \ vf610-pcm052.dtb \ vf610-bk4r1.dtb +dtb-$(CONFIG_MX23) += \ + imx23-evk.dtb + dtb-$(CONFIG_MX28) += \ imx28-evk.dtb \ imx28-xea.dtb
arch/arm/dts/imx23-evk-u-boot.dtsi new file +4 -0
@@ -0,0 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include "imx23-u-boot.dtsi" +
arch/arm/dts/imx23-u-boot.dtsi new file +14 -0
@@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0+ + +&gpio0 { + gpio-ranges = <&pinctrl 0 0 32>; +}; + +&gpio1 { + gpio-ranges = <&pinctrl 0 32 31>; +}; + +&gpio2 { + gpio-ranges = <&pinctrl 0 63 32>; +}; +
arch/arm/dts/imx23.dtsi +1 -1
@@ -105,7 +105,7 @@ status = "disabled"; }; - pinctrl at 80018000 { + pinctrl: pinctrl at 80018000 { #address-cells = <1>; #size-cells = <0>; compatible = "fsl,imx23-pinctrl", "simple-bus";
board/freescale/mx23evk/mx23evk.c +0 -23
@@ -53,26 +53,3 @@ int board_init(void)return 0 ; } - -#ifdef CONFIG_CMD_MMC -static int mx23evk_mmc_wp (int id) -{ -if (id !=0 ) { -printf ("MXS MMC: Invalid card selected (card id = %d)\n" , id); -return 1 ; - } - -return gpio_get_value (MX23_PAD_PWM4__GPIO_1_30 ); -} - -int board_mmc_init (struct bd_info *bis) -{ -/* Configure WP as input */ -gpio_direction_input (MX23_PAD_PWM4__GPIO_1_30 ); - -/* Configure MMC0 Power Enable */ -gpio_direction_output (MX23_PAD_PWM3__GPIO_1_29 ,0 ); - -return mxsmmc_initialize (bis,0 , mx23evk_mmc_wp,NULL ); -} -#endif
configs/mx23evk_defconfig +11 -3
@@ -7,16 +7,19 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=1 CONFIG_ENV_SIZE=0x4000 CONFIG_ENV_OFFSET=0x40000 +CONFIG_DM_GPIO=y CONFIG_SPL_TEXT_BASE=0x00001000 CONFIG_TARGET_MX23EVK=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y +CONFIG_DEFAULT_DEVICE_TREE="imx23-evk" CONFIG_SYS_CONSOLE_IS_IN_ENV=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_ARCH_MISC_INIT=y # CONFIG_SPL_FRAMEWORK is not set CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y +CONFIG_CMD_DM=y CONFIG_CMD_GPIO=y CONFIG_CMD_MMC=y CONFIG_CMD_USB=y
@@ -24,17 +27,22 @@ CONFIG_CMD_USB=y CONFIG_CMD_CACHE=y CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y +CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_VERSION_VARIABLE=y # CONFIG_NET is not set +CONFIG_DM=y CONFIG_MXS_GPIO=y +CONFIG_DM_MMC=y CONFIG_MMC_MXS=y +CONFIG_PINCTRL=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_GPIO=y CONFIG_CONS_INDEX=0 CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y -CONFIG_SPLASH_SCREEN=y -CONFIG_VIDEO_BMP_GZIP=y -CONFIG_OF_LIBFDT=y
Signature · 1 line
2.25.1
PATCH v2 2/3 mx23evk: Convert to driver model
Quoted 5 lines
Make the conversion to driver model as it is mandatory. Successfully tested booting Linux from the SD card. Dropped splash screen support as this needs to be properly converted to DM and tested.
Signed-off-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
Fabio Estevam
reviewerPATCH v2 3/3 mx23evk: Add myself as maintainer
In reply to Fabio EstevamI would like to help supporting this board, so add myself as a maintainer.
Now that the board has been converted to DM, also add its devicetree in the MAINTAINERS files entry.
---
Changes since v1:
- None
board/freescale/mx23evk/MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)
board/freescale/mx23evk/MAINTAINERS +2 -0
@@ -1,6 +1,8 @@ MX23EVK BOARD +M: Fabio Estevam <[email protected]> M: Otavio Salvador <[email protected]> S: Maintained F: board/freescale/mx23evk/ +F: arch/arm/dts/imx23-evk.dts F: include/configs/mx23evk.h F: configs/mx23evk_defconfig
Signature · 1 line
2.25.1
PATCH v2 3/3 mx23evk: Add myself as maintainer
Quoted 5 lines
I would like to help supporting this board, so add myself as a maintainer.
Now that the board has been converted to DM, also add its devicetree in theMAINTAINERSfiles entry.Signed-off-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 1/3 mx23-evk: Import devicetree file from Linux
In reply to Fabio EstevamQuoted 5 lines
Import the imx23-evk devicetree files from Linux kernel version 5.11.
This is in preparation for converting themx23evk_defconfigtarget to driver model.Signed-off-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================