Re: [PATCH 2/2] ARM: i.MX8MP: add initial Polyhex DEBIX Model A support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07.02.23 21:11, Lucas Stach wrote:
> From: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
> 
> The Polyhex DEBIX Model A is an i.MX8MP based Rpi form factor board.
> This commit imports the v4 of the Linux device tree[1], and the timings
> from the vendor U-Boot[2] and combines it with existing barebox i.MX8MP
> support.

Is it still based on v4?

> 
> [1]: https://lore.kernel.org/all/20221017151050.2321919-1-dan.scally@xxxxxxxxxxxxxxxx/
> [2]: https://github.com/debix-tech/uboot/blob/lf_v2021.04/board/freescale/imx8mp_evk/lpddr4_timing.c

[snip]

> diff --git a/arch/arm/boards/polyhex-debix/Makefile b/arch/arm/boards/polyhex-debix/Makefile
> new file mode 100644
> index 000000000000..35d8640087b1
> --- /dev/null
> +++ b/arch/arm/boards/polyhex-debix/Makefile
> @@ -0,0 +1,4 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +
> +obj-y += board.o
> +lwl-y += lowlevel.o lpddr4-timing.o
> diff --git a/arch/arm/boards/polyhex-debix/board.c b/arch/arm/boards/polyhex-debix/board.c
> new file mode 100644
> index 000000000000..849dc0f6c1d1
> --- /dev/null
> +++ b/arch/arm/boards/polyhex-debix/board.c
> @@ -0,0 +1,49 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +#include <bootsource.h>
> +#include <common.h>
> +#include <deep-probe.h>
> +#include <envfs.h>
> +#include <init.h>
> +#include <io.h>
> +#include <mach/bbu.h>
> +#include <mach/iomux-mx8mp.h>
> +
> +static int polyhex_debix_probe(struct device_d *dev)

Nitpick: device_d is device now and driver_d is driver, but we keep
the old names for a transition period.

[snip]

> +static void power_init_board(void)
> +{
> +	struct pbl_i2c *i2c;
> +
> +	imx8mp_setup_pad(MX8MP_PAD_I2C1_SCL__I2C1_SCL | I2C_PAD_CTRL);
> +	imx8mp_setup_pad(MX8MP_PAD_I2C1_SDA__I2C1_SDA | I2C_PAD_CTRL);
> +
> +	imx8mm_early_clock_init();

imx8mp_early_clock_init() here. It's currently the same function, but looks
less out of place. While you're at it, you may want to check if 8mm and 8mp
being the same function is ok :-)

> +	imx8m_ccgr_clock_enable(IMX8M_CCM_CCGR_I2C1);
> +
> +	i2c = imx8m_i2c_early_init(IOMEM(MX8MP_I2C1_BASE_ADDR));
> +
> +	pmic_configure(i2c, 0x25, pca9450_cfg, ARRAY_SIZE(pca9450_cfg));
> +}

Thanks,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux