Commit Graph

9 Commits

Author SHA1 Message Date
Piotr Dymacz
28e476191b imx: keep common kernel symbols in target's config
Move common kernel symbols from subtargets to target config.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:28:09 +02:00
Lech Perczak
fa26cdacc2 imx: cortexa7: add support for TechNexion PICO-PI-IMX7D
TechNexion PICO-PI-IMX7D is a NXP i.MX 7Dual based development board in
the well-known "Raspberry Pi" form factor, comprising of PICO-IMX7 SoM
and the PICO-PI-IMX7D carrier board.

Usually bundled with a 5" 800x480 LVDS display with I2C touchscreen and
an Omnivision OV5645 camera on a MIPI CSI bus, on a daughterboard. The
board was previously used primarily with "Android Things" ecosystem, but
the project was killed by Google.

This would not be possible, if not for the great tutorial of setting up
Debian on this board, by Robert C. Nelson [1].

Hardware highlights:

  CPU: NXP i.MX 7Dual SoC, dual-core Cortex-A7 at 1000 MHz
  RAM: 512 MiB DDR3 SDRAM
  Storage: 4 GB eMMC
  Networking:
    - built-in Gigabit Ethernet with Atheros AR8035 PHY,
    - Broadcom BCM4339 1x1 802.11ac Wi-Fi (over SDIO) + Bluetooth 4.1
      (over SDIO + UART + IS2) combo, with Hirose u.FL connector on the
      board,
    - dual CAN interfaces on the 40-pin connector,
  Interfaces:
    - USB-C power input plus USB 2.0 OTG host/device port,
    - single USB-A host port,
    - serial console over built-in FT232BL USB-UART converter with
      micro-USB connector (configuration: 115200-8-N-1),
    - analog audio interface with TRRS connector in CTIA standard,
    - SPI, I2C and UART interfaces available on the 40-pin,
    - mikroBUS connector,
    - I2C connector for the optional touch panel,
    - parallel LCD output for the optional display,
    - MIPI CSI connector for the optional camera

Installation:

1. Connect the serial console to debug USB connector and the terminal of
   choice in another window, at 115200-8-N-1. Ensure you can switch to
   it quickly after next step.

2. Power-on the board from your PC. Ensure your PC can supply required
   current, the board can take more than 1 A in the peak load during
   booting and brownout will result in power-on reset loop. Preferably,
   use charging-capable USB port or connect through self-powered USB
   hub. If U-Boot is present already on the eMMC, interrupt the booting
   sequence by pressing any key and skip to point 7.

3. Ensure the boot mode jumpers J1 and J2 are in correct position for
   USB recovery:

       2   6  2   6
      --------------
      |o o-o||o-o o|
      |o o-o||o-o o|
   J1 -------------- J2
       1   5  1   5

   The jumpers are located just underneath the 40-pin expansion header
   and are of the smaller 2 mm pitch.

4. Download and build 'imx_usb_loader' from:
   https://github.com/boundarydevices/imx_usb_loader.

5. Power-on the board again from your PC through USB OTG connector.

6. Use 'imx_usb_loader' to load 'SPL' and 'u-boot-dtb.img' to the board:

   $ sudo imx_usb u-boot-pico-pi-imx7d/SPL
   $ sudo imx_usb u-boot-pico-pi-imx7d/u-boot-dtb.img

7. Switch to the terminal from step 2 and interrupt boot sequence by
   pressing any key within 2 seconds.

8. Configure mmc 0 to boot from the data partition and disable access to
   boot partitions:

   => mmc partconf 0 0 7 0

   This only needs to be set once. If you were running Debian previously,
   this is probably already set.

9. Enable USB mass storage passthrough for eMMC from U-boot

   => ums 0 mmc 0

10. Optionally, backup previous eMMC contents by reading out its image.

11. Copy over the factory image to the USB device, for example:

    $ sudo dd if=openwrt-imx-cortexa7-pico-pi-imx7d-squashfs.combined.bin \
      of=/dev/disk/by-id/usb-Linux_UMS_disk_0-0:0 \
      bs=8M status=progress oflag=direct

12. Detach USB MSC interface from your PC and U-Boot by pressing Ctrl+C.

13. Ensure that boot mode jumpers are at the default settings for eMMC
    boot:

       2   6  2   6
      --------------
      |o-o o||o o-o|
      |o-o o||o-o o|
   J1 -------------- J2
       1   5  1   5

   If they are not, power-off the board, restore them and power-on the
   board again. Otherwise, if jumpers are set, just reset the board from
   U-Boot CLI:

   => reset

14. The installation is now complete and board should boot successfully.

Upgrading: just use sysupgrade image, as usual in OpenWrt.

Known issues/current limitations:

- OV5645 camera - not described in upstream device tree as of kernel
  5.15. There are staging drivers present in upstream Linux tree for
  i.MX 7 CSI, MIPI-CSI and video mux, and the configuration is there in
  imx7s.dtsi - so this is expected to get supported eventually,
- on-chip ADCs are disabled in upstream device tree, so the kernel
  driver remains disabled as well.

[1] https://forum.digikey.com/t/debian-getting-started-with-the-pico-pi-imx7/12429

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: commit description reworded]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:26:24 +02:00
Lech Perczak
0b7e8f44ad imx: cortexa7: enable framebuffer console + DRM
The PICO-PI-IMX7D board is equipped with external LCD display with
touchscreen. To allow displaying console on it, enable framebuffer,
fbcon and DRM support at early boot.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: refreshed subtarget kernel config]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:14:01 +02:00
Lech Perczak
f430600d73 imx: bundle correct SDMA firmware for i.MX 7 boards
Import sdma-imx7d.bin from linux-firmware repository at commit:
55edf5202154: ("imx: sdma: update firmware to v3.5/v4.5")

Cortex-A7 boards (i.MX 7 based) use different SDMA firmware than i.MX 6
boards - bundle the correct files in per-subtarget kernel options.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2022-07-11 14:14:01 +02:00
Lech Perczak
345e981707 imx: cortexa7: adjust kernel config defaults for i.MX 7
Add initial symbols required for i.MX 7 boards, based on devices
available on TechNexion PICO-PI-IMX7D board.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
[pepe2k@gmail.com: refreshed subtarget kernel config]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:14:01 +02:00
Piotr Dymacz
baa753ab8b imx: refresh (sub)target kernel configs
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2022-07-11 14:14:01 +02:00
Petr Štetiar
2b395c2982 imx: update config for 5.15
Refresh kernel config with `make kernel_oldconfig` make target.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-03-30 23:39:08 +02:00
Piotr Dymacz
3c8720f39e imx: update subtargets default kernel configs for 5.10
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Piotr Dymacz
b35cd4d71d imx: introduce 'cortexa7' subtarget
This adds some essential files required by new 'cortexa7' subtarget,
dedicated for Cortex-A7 based NXP i.MX series. For now, the kernel
config-default focuses only on the i.MX 6UL family, as the following
changeset will introduce support for i.MX 6ULL based device. Support
for more platforms (e.g. i.MX 7) might be enabled later, while adding
more devices.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00