openwrt/target/linux
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
..
apm821xx kernel: bump 5.10 to 5.10.127 2022-06-29 23:38:47 +02:00
archs38 generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
armvirt generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
at91 kernel: bump 5.10 to 5.10.121 2022-06-27 00:57:15 +02:00
ath25 generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
ath79 kernel: backport mtd dynamic partition patch 2022-07-08 10:19:58 +02:00
bcm27xx kernel: bump 5.15 to 5.15.51 2022-07-11 00:49:25 +02:00
bcm47xx kernel: bump 5.10 to 5.10.124 2022-06-27 00:57:15 +02:00
bcm53xx kernel: bump 5.15 to 5.15.47 2022-06-27 00:57:16 +02:00
bcm63xx kernel: bump 5.15 to 5.15.46 2022-06-27 00:57:16 +02:00
bcm4908 generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
bmips generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
gemini generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
generic kernel: bump 5.15 to 5.15.53 2022-07-11 00:50:18 +02:00
imx imx: cortexa7: add support for TechNexion PICO-PI-IMX7D 2022-07-11 14:26:24 +02:00
ipq40xx ipq40xx: mikrotik: make RouterBoot partition writeable 2022-06-29 12:34:49 +02:00
ipq806x generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
kirkwood generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
lantiq lantiq: dts: td-w8980: Remove duplicate PCI properties 2022-06-27 00:57:16 +02:00
layerscape kernel: cut broken SPI_NOR 4K eraseblock LIMIT patch 2022-06-29 12:34:49 +02:00
malta generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
mediatek mediatek: mt7622: add missing vbus regulator node to totolink-a8000ru dts 2022-07-07 00:22:23 +01:00
mpc85xx kernel: bump 5.10 to 5.10.122 2022-06-27 00:57:15 +02:00
mvebu mvebu: cortexa72: fix ImageBuilder for IEI Puzzle devices 2022-07-04 18:36:09 +01:00
mxs generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
octeon octeon: add support for Ubiquiti UniFi Security Gateway 2022-06-24 23:59:14 +02:00
octeontx generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
omap generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
oxnas kernel: bump 5.10 to 5.10.121 2022-06-27 00:57:15 +02:00
pistachio kernel: backport mtd dynamic partition patch 2022-07-08 10:19:58 +02:00
qoriq qoriq: enable Book-E Watchdog Timer 2022-07-01 16:26:51 +03:00
ramips kernel: bump 5.15 to 5.15.53 2022-07-11 00:50:18 +02:00
realtek realtek: remove hardcoded sys-led configurations 2022-07-10 09:54:35 +02:00
rockchip rockchip: reliably distribute net interrupts 2022-07-07 13:13:26 +02:00
sunxi generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
tegra generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
uml generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
x86 x86: 64: Add kmod-igc to default packages 2022-06-29 00:57:57 +02:00
zynq generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM] 2022-06-24 17:10:24 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00