public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 0/6] DM: Convert i.MX28 gpio, pinmux, spi and eth drivers to DM/DTS
Date: Wed, 19 Jun 2019 14:27:28 +0200	[thread overview]
Message-ID: <20190619122734.10948-1-lukma@denx.de> (raw)

This patch series converts some i.MX28 drivers to use DM/DTS.

Converted drivers:
- mxs_gpio.c - gpio driver
- pinctrl-mxs.c - pinmux driver
- Adjust fec_eth.c to support also i.MX28 SoC.
- mxs_spi.c - SPI driver

After applying this series it is possible to use ETH on i.MX28
board with following DTS description:

        &mac0 {
    	phy-mode = "rmii";
    	pinctrl-names = "default";
    	pinctrl-0 = <&mac0_pins_a>;
    	phy-supply = <&reg_fec_3v3>;
    	phy-reset-gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
    	phy-reset-duration = <1>;
    	phy-reset-post-delay = <1>;
    	status = "okay";

    	fixed-link {
    	      speed = <100>;
    	      full-duplex;
    	};
};

And store the received binaries on SPI-NOR memory.

Travis-CI:
https://travis-ci.org/lmajewski/u-boot-dfu/builds/547299325

Applied on top of u-boot/master branch
SHA1: 77f6e2dd0551d8a825bab391a1bd6b838874bcd4


Changes in v5:
- Add 12 digit SHA1 ID for tag v5.1.11
- Set more appropriate tags (net: fec:)
- Use "ARM: dts: imx: tags"
- Update tags ("gpio: mxs")
- Set more appropriate tags ("pinctrl: mxs:")
- Use the clrsetbits_le32() in mxs_pinctrl_rmwl() function - now moved to
  pinctrl-mxs.h file
- Set more appropriate tags ("spi: mxs:")

Changes in v4:
- Add 12 digit SHA1 ID for tag v5.1.9
- Sort the entries for compatibles and Kconfig
- New file - imx28-u-boot.dtsi
- Use BIT() macro instead of 1 << offset
- Use devfdt_get_addr to get gpio number
- Use gpio-ranges property to setup gpios
- Use Linux kernel code to setup pins instead of Barebox
- Add soc specific data and compatible for i.MX23 and i.MX28
- Use devm_kfree() to release temporary memory
- Adjust the driver to support i.MX23 (add compatible, adjust clk code)
- Use BIT() macro where applicable

Changes in v3:
- Update tag to 5.1.9
- Set more apropriate tags
- Set more appropriate tags
- Set more appropriate tags
- Set more appropriate tags
- Set more appropriate tags

Changes in v2:
- Use #if !CONFIG_IS_ENABLED(DM_GPIO) instead of plain #ifdef CONFIG_DM_GPIO
- New patch (conversion of mxs_spi.c to DM_SPI)

Lukasz Majewski (6):
  ARM: dts: imx: Copy imx28 device tree related files from Linux kernel
    (v5.1.11)
  net: fec: Enable support for i.MX28 DM_ETH in the fec_mxc.c driver
  ARM: dts: imx: Provide 'gpio-ranges' for mxs_gpio driver
  gpio: mxs: Add support for DM/DTS in the mxs_gpio.c driver (DM_GPIO)
  pinctrl: mxs: Add support for i.MX2[38] mxs pinctrl driver
  spi: mxs: Add support DM/DTS for i.MX28 mxs SPI driver (DM_SPI
    conversion)

 arch/arm/dts/imx28-pinfunc.h      |  506 ++++++++++++++
 arch/arm/dts/imx28-u-boot.dtsi    |   28 +
 arch/arm/dts/imx28.dtsi           | 1330 +++++++++++++++++++++++++++++++++++++
 arch/arm/dts/mxs-pinfunc.h        |   31 +
 drivers/gpio/mxs_gpio.c           |  148 +++++
 drivers/net/Kconfig               |    2 +-
 drivers/net/fec_mxc.c             |    1 +
 drivers/pinctrl/nxp/Kconfig       |   10 +
 drivers/pinctrl/nxp/Makefile      |    1 +
 drivers/pinctrl/nxp/pinctrl-mxs.c |  190 ++++++
 drivers/pinctrl/nxp/pinctrl-mxs.h |   61 ++
 drivers/spi/mxs_spi.c             |  400 ++++++++---
 12 files changed, 2624 insertions(+), 84 deletions(-)
 create mode 100644 arch/arm/dts/imx28-pinfunc.h
 create mode 100644 arch/arm/dts/imx28-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx28.dtsi
 create mode 100644 arch/arm/dts/mxs-pinfunc.h
 create mode 100644 drivers/pinctrl/nxp/pinctrl-mxs.c
 create mode 100644 drivers/pinctrl/nxp/pinctrl-mxs.h

-- 
2.11.0

             reply	other threads:[~2019-06-19 12:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19 12:27 Lukasz Majewski [this message]
2019-06-19 12:27 ` [U-Boot] [PATCH v5 1/6] ARM: dts: imx: Copy imx28 device tree related files from Linux kernel (v5.1.11) Lukasz Majewski
2019-06-19 13:41   ` Marek Vasut
2019-06-19 12:27 ` [U-Boot] [PATCH v5 2/6] net: fec: Enable support for i.MX28 DM_ETH in the fec_mxc.c driver Lukasz Majewski
2019-06-19 13:42   ` Marek Vasut
2019-06-19 12:27 ` [U-Boot] [PATCH v5 3/6] ARM: dts: imx: Provide 'gpio-ranges' for mxs_gpio driver Lukasz Majewski
2019-06-19 13:41   ` Marek Vasut
2019-06-19 14:19     ` Lukasz Majewski
2019-06-19 14:32       ` Marek Vasut
2019-06-19 14:53         ` Lukasz Majewski
2019-06-19 15:05           ` Marek Vasut
2019-06-24  9:56             ` Lukasz Majewski
2019-06-19 12:27 ` [U-Boot] [PATCH v5 4/6] gpio: mxs: Add support for DM/DTS in the mxs_gpio.c driver (DM_GPIO) Lukasz Majewski
2019-06-19 13:42   ` Marek Vasut
2019-06-19 12:27 ` [U-Boot] [PATCH v5 5/6] pinctrl: mxs: Add support for i.MX2[38] mxs pinctrl driver Lukasz Majewski
2019-06-19 13:42   ` Marek Vasut
2019-06-19 12:27 ` [U-Boot] [PATCH v5 6/6] spi: mxs: Add support DM/DTS for i.MX28 mxs SPI driver (DM_SPI conversion) Lukasz Majewski
2019-06-19 13:51   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190619122734.10948-1-lukma@denx.de \
    --to=lukma@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox