Skip to contentSkip to conversation

ARM i.MX6SL: Add Kindle generation 6/7 support

PATCH Superseded Alexander Kurz 2 participants 4 messages Nov 9, 2025 – Nov 11, 2025

Subsystems (5)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM i.MX6SL: Add Kindle generation 6/7 support

Four Amazon Kindle 6th and 7th generation e-book readers were considered for this patch, referred by their models
* DP75SDI "PINOT_WFO" (256MB) "Kindle Paperwhite 2" 6th gen
* DP75SDI "Muscat WFO" (512MB) "Kindle Paperwhite 3" 7th gen
* WP63GW "Kindle" 7th gen (512MB)
* NM460GZ "Voyage" 7th gen (512MB)
Kindle e-book readers from generation 6 and 7 use the i.MX6SL and an are shipped with a factory-adapted u-boot image. Vendor software image updates for these models stopped around 2021 to 2023.

Add experimental support for the kindle gen 6/7 models and make barebox an optional drop-in replacement for the original bootloader. Required PMIC settings are implemented as script.

Notable features tested on all models:
- Support for eMMC, USB, UART, I2C and SPI.
- LPDDR2 setup is done via DCD, the same imximage may be used for USB-startup and for installation.
- Support for vendor specific ATAGs that are required by the Kindle-System.
- usbserial barebox console access for 10 seconds after startup.

Known issues:
- Reset on models kindle6-dp75sdi and nm460gz does not work and triggers microcode USB download boot.
- No recovery (without soldering) like USB boot known after e.g. a failed flashing attempt.

---
 .../boards/imx/amazon-kindle-6-7.rst          |  94 ++++++++
 arch/arm/boards/Makefile                      |   1 +
 arch/arm/boards/kindle-mx6sl/Makefile         |   5 +
 arch/arm/boards/kindle-mx6sl/board.c          | 213 ++++++++++++++++++
 .../defaultenv-kindle-mx6sl/boot/mmc_kernel   |  11 +
 .../defaultenv-kindle-mx6sl/init/pmic         |  32 +++
 .../defaultenv-kindle-mx6sl/init/usbserial    |   4 +
 .../nv/autoboot_timeout                       |   1 +
 .../defaultenv-kindle-mx6sl/nv/boot.default   |   1 +
 .../nv/linux.bootargs.base                    |   1 +
 .../nv/linux.bootargs.console                 |   1 +
 .../nv/linux.bootargs.video                   |   1 +
 .../flash-header-kindle-mx6sl-256m.imxcfg     | 126 +++++++++++
 .../flash-header-kindle-mx6sl-512m.imxcfg     | 126 +++++++++++
 arch/arm/boards/kindle-mx6sl/lowlevel.c       |  85 +++++++
 arch/arm/configs/kindle-gen-6-7_defconfig     |  89 ++++++++
 arch/arm/dts/Makefile                         |   4 +
 arch/arm/dts/imx6sl-kindle-common.dtsi        | 167 ++++++++++++++
 arch/arm/dts/imx6sl-kindle-nm460gz.dts        |  69 ++++++
 arch/arm/dts/imx6sl-kindle-wp63gw.dts         |  44 ++++
 arch/arm/dts/imx6sl-kindle6-dp75sdi.dts       |  55 +++++
 arch/arm/dts/imx6sl-kindle7-dp75sdi.dts       |  55 +++++
 arch/arm/mach-imx/Kconfig                     |  17 ++
 images/Makefile.imx                           |  21 ++
 24 files changed, 1223 insertions(+)
 create mode 100644 Documentation/boards/imx/amazon-kindle-6-7.rst
 create mode 100644 arch/arm/boards/kindle-mx6sl/Makefile
 create mode 100644 arch/arm/boards/kindle-mx6sl/board.c
 create mode 100644 arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/boot/mmc_kernel
 create mode 100644 arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/init/pmic
 create mode 100644 arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/init/usbserial
 create mode 100644 arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/autoboot_timeout
 create mode 100644 arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/boot.default
 create mode 100644 arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/linux.bootargs.base
 create mode 100644 arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/linux.bootargs.console
 create mode 100644 arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/linux.bootargs.video
 create mode 100644 arch/arm/boards/kindle-mx6sl/flash-header-kindle-mx6sl-256m.imxcfg
 create mode 100644 arch/arm/boards/kindle-mx6sl/flash-header-kindle-mx6sl-512m.imxcfg
 create mode 100644 arch/arm/boards/kindle-mx6sl/lowlevel.c
 create mode 100644 arch/arm/configs/kindle-gen-6-7_defconfig
 create mode 100644 arch/arm/dts/imx6sl-kindle-common.dtsi
 create mode 100644 arch/arm/dts/imx6sl-kindle-nm460gz.dts
 create mode 100644 arch/arm/dts/imx6sl-kindle-wp63gw.dts
 create mode 100644 arch/arm/dts/imx6sl-kindle6-dp75sdi.dts
 create mode 100644 arch/arm/dts/imx6sl-kindle7-dp75sdi.dts
Documentation/boards/imx/amazon-kindle-6-7.rst new file +94 -0
new file mode 100644
index 0000000000..c7a5ef9424
@@ -0,0 +1,94 @@
+Amazon Kindle 6/7 (Paperwhite 2/3, Kindle 7th gen and Voyage)
+=============================================================
+
+Four models of the Amazon Kindle e-Book readers are considered as members
+of the 6th and 7th generation:
+
+* DP75SDI "PINOT_WFO" (256MB) "Kindle Paperwhite 2" 6th gen
+* DP75SDI "Muscat WFO" (512MB) "Kindle Paperwhite 3" 7th gen
+* WP63GW (512MB) "Kindle" 7th gen
+* NM460GZ (512MB) "Voyage" 7th gen
+
+Those e-book readers share a common set of hardware:
+
+* Freescale i.MX6SL SOC
+* 256MB or 512MB of LPDDR2
+* eMMC storage
+* MAX77696A PMIC
+
+The devices boot up in internal boot mode from eMMC boot partition 1
+and are shipped with a vendor modified u-boot imximage based on u-boot
+v2009.08.
+
+According to the availability of source code tarballs on the amazon website
+"Source Code Notice for Kindle E-Readers and Fire Tablets", availability of
+factory image updates seem to have been terminated between 2021 and 2023.
+
+This device is battery-powered and there is no way to switch the device off.
+When the device is inactive, the Kindle software will first reduce the
+power consumption to a few milliamps of battery power, after some minutes
+the power consumption is further reduced to sub-milliamp level. Keeping
+iomux pullups switched on at standby may significantly drain your battery.
+
+Building barebox
+----------------
+
+``make kindle-gen-6-7_defconfig`` should get you a working config.
+
+Uploading barebox
+-----------------
+
+Similar to the 4/5 gen devices, console access to gen 6/7 kindles is
+available via the Micro-USB connector when a 30k Ohm resistor to GND
+is used on the sense pin: D- will become TXD, D+ RXD.
+
+From the uboot shell, the barebox image may be chainloaded e.g. like
+
+   .. code-block:: console
+
+        $ bist
+        $ loady 0x80000000
+        $ go 0x80001000
+
+Booting the devices from USB is more demanding and will likely require
+opening of the device and desoldering of a metal shield.
+All devices feature just a single power button which may be used to reset
+the device. Unlike the models of the 4th generation where a separate
+button is available to boot from USB, such buttons do not exist here.
+Button pads on the PCB are not populated and USB boot mode by
+pin-strapping seems to be disabled by fuse settings. To put the device
+into USB boot mode, the eMMC may be disabled temporarily.
+
+1. Connect the Kindle to your host computer with a USB cable.
+2. Disable the eMMC
+   * for the DP75SDI pull the left resistor left of TP806/TP807 (below
+     TP914) facing the eMMC to zero.
+2. Power down the device by holding the power button until the power LED goes
+   dark (about 12-15 seconds).
+3. Release the power button.
+4. Free the eMMC pin.
+5. After 10-20 seconds, a new USB device named ``SE Blank MEGREZ`` should
+   appear on your host computer.
+6. Use imx-usb-loader to boot from USB.
+
+   .. code-block:: console
+
+        $ scripts/imx/imx-usb-loader images/barebox-kindle6-dp75sdi.img
+
+A USB serial ACM console will be launched by a barebox init script
+for 10 seconds after boot.
+
+Installing barebox
+------------------
+
+Barebox may be used as drop-in replacement for the shipped bootloader, when
+the imximg fits into 384000 bytes, compression like IMAGE_COMPRESSION_XZKERN
+might be required for this. When installing the barebox imximg on
+the eMMC, take care not to overwrite the vendor supplied serial numbers and
+other data stored on the eMMC. All 6th and 7th gen devices seem to share the
+same disk layout. E.g. just write the imx-header and the application section:
+
+.. code-block:: console
+
+        $ loady -t usbserial
+        $ memcpy -s barebox-kindle6-dp75sdi.img -d /dev/mmc1.boot0 0x400 0x400 0x5dc00
arch/arm/boards/Makefile +1 -0
index f73285ede9..cc32dff2a5 100644
@@ -141,6 +141,7 @@ obj-$(CONFIG_MACH_TNY_A9260)			+= tny-a926x/
 obj-$(CONFIG_MACH_TNY_A9263)			+= tny-a926x/
 obj-$(CONFIG_MACH_TNY_A9G20)			+= tny-a926x/
 obj-$(CONFIG_MACH_KINDLE_MX50)			+= kindle-mx50/
+obj-$(CONFIG_MACH_KINDLE_6_7)			+= kindle-mx6sl/
 obj-$(CONFIG_MACH_TORADEX_COLIBRI_T20)		+= toradex-colibri-t20/
 obj-$(CONFIG_MACH_TOSHIBA_AC100)		+= toshiba-ac100/
 obj-$(CONFIG_MACH_TQMA53)			+= tqma53/
arch/arm/boards/kindle-mx6sl/Makefile new file +5 -0
new file mode 100644
index 0000000000..bb9aca5b96
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+obj-y += board.o
+lwl-y += lowlevel.o
+bbenv-y += defaultenv-kindle-mx6sl
arch/arm/boards/kindle-mx6sl/board.c new file +213 -0

213 lines not on this page · raw message

arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/boot/mmc_kernel new file +11 -0
new file mode 100644
index 0000000000..518110b8fd
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Boot the Amazon factory-shipped kernel uimage stored on
+# the eMMC at CONFIG_MMC_BOOTFLASH_ADDR 0x41000
+
+# Force ATAG boot
+global.bootm.boot_atag=true
+
+global linux.bootargs.dyn.log="log_pos_goal=0x8fff0000"
+global linux.bootargs.dyn.root="rootwait root=/dev/mmcblk0p1 ro"
+
+bootm -c /dev/mmc1.kernel
arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/init/pmic new file +32 -0
new file mode 100644
index 0000000000..efa02843e6
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# MAX77696 PMIC setup.
+#
+# Common settings for gen 6/7 kindles
+# LDO_L07_CNFG1_REG
+i2c_write -b 0 -a 0x3c -r 0x4f 0x70
+# LDO_L10_CNFG1_REG
+i2c_write -b 0 -a 0x3c -r 0x55 0xf4
+
+i2c_write -b 0 -a 0x3c -r 0x2 0x36
+# BUCK_VOUT1_REG
+i2c_write -b 0 -a 0x3c -r 0x31 0x34
+# BUCK_VOUTCNFG1_REG
+i2c_write -b 0 -a 0x3c -r 0x39 0xd0
+# BUCK_VOUTCNFG2_REG
+i2c_write -b 0 -a 0x3c -r 0x3a 0xd0
+# BUCK_VOUTCNFG3_REG
+i2c_write -b 0 -a 0x3c -r 0x3b 0x40
+# BUCK_VOUTCNFG6_REG
+i2c_write -b 0 -a 0x3c -r 0x3e 0x70
+i2c_write -b 0 -a 0x3c -r 0x5e 0x04
+# VREG_EPDCNFG_REG
+i2c_write -b 0 -a 0x3c -r 0x60 0x00
+# VREG_EPDSEQ_REG / VDDQ_SET_REG
+i2c_write -b 0 -a 0x3c -r 0x69 0x18
+
+if [ "$global.model" = "kindle6-dp75sdi" -o "$global.model" = "kindle7-dp75sdi" ]; then
+	# Backlight not available on WP63GW.
+	i2c_write -b 0 -a 0x3c -r 0x6c 0x80
+	i2c_write -b 0 -a 0x3c -r 0x6d 0x20
+fi
arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/init/usbserial new file +4 -0
new file mode 100644
index 0000000000..c181c06da9
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+usbserial
+global.autoboot_timeout=10
arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/autoboot_timeout new file +1 -0
new file mode 100644
index 0000000000..64bb6b746d
@@ -0,0 +1 @@
+30
arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/boot.default new file +1 -0
new file mode 100644
index 0000000000..3118b7af45
@@ -0,0 +1 @@
+mmc_kernel
arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/linux.bootargs.base new file +1 -0
new file mode 100644
index 0000000000..64d790aa7f
@@ -0,0 +1 @@
+ip=off
arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/linux.bootargs.console new file +1 -0
new file mode 100644
index 0000000000..d775310b40
@@ -0,0 +1 @@
+console=ttymxc0,115200
arch/arm/boards/kindle-mx6sl/defaultenv-kindle-mx6sl/nv/linux.bootargs.video new file +1 -0
new file mode 100644
index 0000000000..9b4e01473b
@@ -0,0 +1 @@
+video=mxcepdcfb:E60,bpp=8,x_mem=3M
arch/arm/boards/kindle-mx6sl/flash-header-kindle-mx6sl-256m.imxcfg new file +126 -0

126 lines not on this page · raw message

arch/arm/boards/kindle-mx6sl/flash-header-kindle-mx6sl-512m.imxcfg new file +126 -0

126 lines not on this page · raw message

arch/arm/boards/kindle-mx6sl/lowlevel.c new file +85 -0

85 lines not on this page · raw message

arch/arm/configs/kindle-gen-6-7_defconfig new file +89 -0

89 lines not on this page · raw message

arch/arm/dts/Makefile +4 -0
index e78722a9a7..7f434403b8 100644
@@ -17,6 +17,10 @@ lwl-$(CONFIG_MACH_EXYNOS) += exynos8895-dreamlte.dtb.o \
 			exynos990-x1s.dtb.o
 lwl-$(CONFIG_MACH_DUCKBILL) += imx28-duckbill.dtb.o
 lwl-$(CONFIG_MACH_KINDLE_MX50) += imx50-kindle-d01100.dtb.o imx50-kindle-d01200.dtb.o imx50-kindle-ey21.dtb.o
+lwl-$(CONFIG_MACH_KINDLE_6_7) += imx6sl-kindle-wp63gw.dtb.o \
+		imx6sl-kindle6-dp75sdi.dtb.o \
+		imx6sl-kindle7-dp75sdi.dtb.o \
+		imx6sl-kindle-nm460gz.dtb.o
 lwl-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o
 lwl-$(CONFIG_MACH_ELTEC_HIPERCAM) += imx6dl-eltec-hipercam.dtb.o
 lwl-$(CONFIG_MACH_EMBEST_MARSBOARD) += imx6q-marsboard.dtb.o
arch/arm/dts/imx6sl-kindle-common.dtsi new file +167 -0

167 lines not on this page · raw message

arch/arm/dts/imx6sl-kindle-nm460gz.dts new file +69 -0

69 lines not on this page · raw message

arch/arm/dts/imx6sl-kindle-wp63gw.dts new file +44 -0

44 lines not on this page · raw message

arch/arm/dts/imx6sl-kindle6-dp75sdi.dts new file +55 -0

55 lines not on this page · raw message

arch/arm/dts/imx6sl-kindle7-dp75sdi.dts new file +55 -0

55 lines not on this page · raw message

arch/arm/mach-imx/Kconfig +17 -0
index 5f50d1a823..eb947e67fb 100644
@@ -353,6 +353,23 @@ config MACH_ADVANTECH_ROM_742X
 	bool "Advantech ROM 742X"
 	select ARCH_IMX6
 
+config MACH_KINDLE_6_7
+	bool "i.MX6SL based Amazon Kindle generation 6 and 7"
+	select ARCH_IMX6SL
+	select SPI
+	select DRIVER_SPI_IMX
+	select I2C
+	select I2C_IMX
+	select GPIO_IMX
+	select ARM_BOARD_APPEND_ATAG
+	select ARM_LINUX
+	select OFTREE
+	select PINCTRL
+	help
+	  Say Y here if you are using the sixth or seventh generation Amazon
+	  Kindle Model No. DP75SDI (Paperwhite 2 or 3), WP63GW (Kindle 7) or
+	  NM460GZ (Kindle Voyage) based on the i.MX6SL SoC and MAX77696 PMIC.
+
 config MACH_NITROGEN6
 	bool "BoundaryDevices Nitrogen6 boards"
 	select ARCH_IMX6
images/Makefile.imx +21 -0
index 5ae14a5988..f66c0af6a4 100644
@@ -374,6 +374,27 @@ $(call build_imx_habv4img, CONFIG_MACH_ADVANTECH_ROM_742X, start_advantech_imx6d
 
 $(call build_imx_habv4img, CONFIG_MACH_ZII_RDU2, start_imx6_zii_rdu2, zii-imx6q-rdu2/flash-header-rdu2, zii-imx6-rdu2)
 
+# ----------------------- i.MX6sl based boards --------------
+pblb-$(CONFIG_MACH_KINDLE_6_7) += start_imx6sl_kindle_wp63gw
+CFG_start_imx6sl_kindle_wp63gw.pblb.imximg = $(board)/kindle-mx6sl/flash-header-kindle-mx6sl-256m.imxcfg
+FILE_barebox-kindle-wp63gw.img = start_imx6sl_kindle_wp63gw.pblb.imximg
+image-$(CONFIG_MACH_KINDLE_6_7) += barebox-kindle-wp63gw.img
+
+pblb-$(CONFIG_MACH_KINDLE_6_7) += start_imx6sl_kindle6_dp75sdi
+CFG_start_imx6sl_kindle6_dp75sdi.pblb.imximg = $(board)/kindle-mx6sl/flash-header-kindle-mx6sl-256m.imxcfg
+FILE_barebox-kindle6-dp75sdi.img = start_imx6sl_kindle6_dp75sdi.pblb.imximg
+image-$(CONFIG_MACH_KINDLE_6_7) += barebox-kindle6-dp75sdi.img
+
+pblb-$(CONFIG_MACH_KINDLE_6_7) += start_imx6sl_kindle7_dp75sdi
+CFG_start_imx6sl_kindle7_dp75sdi.pblb.imximg = $(board)/kindle-mx6sl/flash-header-kindle-mx6sl-512m.imxcfg
+FILE_barebox-kindle7-dp75sdi.img = start_imx6sl_kindle7_dp75sdi.pblb.imximg
+image-$(CONFIG_MACH_KINDLE_6_7) += barebox-kindle7-dp75sdi.img
+
+pblb-$(CONFIG_MACH_KINDLE_6_7) += start_imx6sl_kindle_nm460gz
+CFG_start_imx6sl_kindle_nm460gz.pblb.imximg = $(board)/kindle-mx6sl/flash-header-kindle-mx6sl-512m.imxcfg
+FILE_barebox-kindle-nm460gz.img = start_imx6sl_kindle_nm460gz.pblb.imximg
+image-$(CONFIG_MACH_KINDLE_6_7) += barebox-kindle-nm460gz.img
+
 # ----------------------- i.MX6ul / i.MX6ull based boards --------------
 $(call build_imx_habv4img, CONFIG_MACH_GRINN_LITEBOARD, start_imx6ul_liteboard_256mb, grinn-liteboard/flash-header-liteboard-256mb, grinn-liteboard-256mb)
 
Signature · 1 line
2.39.5
maintainer
#1 lore raw

Hi Alexander,

Documentation/boards/imx/amazon-kindle-6-7.rst

Quoted 33 lines · Alexander Kurz

Four Amazon Kindle 6th and 7th generation e-book readers were considered for this patch, referred by their models
* DP75SDI "PINOT_WFO" (256MB) "Kindle Paperwhite 2" 6th gen
* DP75SDI "Muscat WFO" (512MB) "Kindle Paperwhite 3" 7th gen
* WP63GW "Kindle" 7th gen (512MB)
* NM460GZ "Voyage" 7th gen (512MB)
Kindle e-book readers from generation 6 and 7 use the i.MX6SL and an are shipped with a factory-adapted u-boot image. Vendor software image updates for these models stopped around 2021 to 2023.

Add experimental support for the kindle gen 6/7 models and make barebox an optional drop-in replacement for the original bootloader. Required PMIC settings are implemented as script.

Notable features tested on all models:
- Support for eMMC, USB, UART, I2C and SPI.
- LPDDR2 setup is done via DCD, the same imximage may be used for USB-startup and for installation.
- Support for vendor specific ATAGs that are required by the Kindle-System.
- usbserial barebox console access for 10 seconds after startup.

Known issues:
- Reset on models kindle6-dp75sdi and nm460gz does not work and triggers microcode USB download boot.
- No recovery (without soldering) like USB boot known after e.g. a failed flashing attempt.

---
 .../boards/imx/amazon-kindle-6-7.rst          |  94 ++++++++
 arch/arm/boards/Makefile                      |   1 +
 arch/arm/boards/kindle-mx6sl/Makefile         |   5 +
Documentation/boards/imx/amazon-kindle-6-7.rst +0 -0

Thanks for the good documentation, very appreciated :)

Quoted 7 lines

new file mode 100644
index 0000000000..c7a5ef9424

Documentation/boards/imx/amazon-kindle-6-7.rst +5 -0
+ENTRY_FUNCTION(start_imx6sl_kindle6_dp75sdi, r0, r1, r2)
+{
+	void *fdt;
+
+	imx6_cpu_lowlevel_init();

Documentation/boards/imx/amazon-kindle-6-7.rst

Quoted 10 lines
Documentation/boards/imx/amazon-kindle-6-7.rst +10 -0
+
+	arm_setup_stack(0x00920000);
+
+	if (IS_ENABLED(CONFIG_DEBUG_LL)) {
+		writel(0x4, 0x020e016c);
+		imx6_uart_setup_ll();
+	}
+
+	fdt = __dtb_imx6sl_kindle6_dp75sdi_start + get_runtime_offset();
+	barebox_arm_entry(0x80000000, SZ_256M, fdt);

Does imx6ul_barebox_entry() work here instead? In that case you could drop the memory nodes from the device trees.

Quoted 7 lines

+++ b/arch/arm/dts/imx6sl-kindle-nm460gz.dts

Documentation/boards/imx/amazon-kindle-6-7.rst +5 -0
@@ -0,0 +1,69 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2025 Alexander Kurz <[email protected]>
+ */
+

Documentation/boards/imx/amazon-kindle-6-7.rst line 15

Quoted 10 lines
Documentation/boards/imx/amazon-kindle-6-7.rst +10 -0
+/dts-v1/;
+#include "imx6sl-kindle-common.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "kindle-nm460gz";
+	compatible = "amazon,imx6sl-kindle-nm460gz", "fsl,imx6sl";
+	barebox,disable-deep-probe;

Is this intentional? What doesn't work with deep probe enabled?

Sascha

Signature · 4 lines
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 |
#2 lore raw

Hi Sascha,

Quoted 5 lines · Sascha Hauer

Hi Alexander,

Quoted 1 line · Alexander Kurz

Four Amazon Kindle 6th and 7th generation e-book readers were considered

...

Quoted 3 lines

Documentation/boards/imx/amazon-kindle-6-7.rst

Quoted 1 line
Documentation/boards/imx/amazon-kindle-6-7.rst +0 -0

Thanks for the good documentation, very appreciated :)

Thanks!

Quoted 13 lines
Quoted 13 lines

new file mode 100644
index 0000000000..c7a5ef9424

Documentation/boards/imx/amazon-kindle-6-7.rst +10 -0
+ENTRY_FUNCTION(start_imx6sl_kindle6_dp75sdi, r0, r1, r2)
+{
+	void *fdt;
+
+	imx6_cpu_lowlevel_init();
+
+	arm_setup_stack(0x00920000);
+
+	if (IS_ENABLED(CONFIG_DEBUG_LL)) {
+		writel(0x4, 0x020e016c);
Quoted 8 lines

Documentation/boards/imx/amazon-kindle-6-7.rst

Quoted 5 lines
Documentation/boards/imx/amazon-kindle-6-7.rst +5 -0
+		imx6_uart_setup_ll();
+	}
+
+	fdt = __dtb_imx6sl_kindle6_dp75sdi_start + get_runtime_offset();
+	barebox_arm_entry(0x80000000, SZ_256M, fdt);

Does imx6ul_barebox_entry() work here instead? In that case you could drop the memory nodes from the device trees.

Replacing barebox_arm_entry() with imx6ul_barebox_entry() seems to work so far (have only tested it on one device), but will this really make the memory nodes from the device trees obsolete as well? Some devices have 256 while others 512MB RAM, when the amount of memory is not hardcoded, is it auto-determined?

Quoted 12 lines
Quoted 12 lines

+++ b/arch/arm/dts/imx6sl-kindle-nm460gz.dts

Documentation/boards/imx/amazon-kindle-6-7.rst +9 -0
@@ -0,0 +1,69 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2025 Alexander Kurz <[email protected]>
+ */
+
+/dts-v1/;
+#include "imx6sl-kindle-common.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
Quoted 8 lines

Documentation/boards/imx/amazon-kindle-6-7.rst line 15

Quoted 6 lines
Documentation/boards/imx/amazon-kindle-6-7.rst +6 -0
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "kindle-nm460gz";
+	compatible = "amazon,imx6sl-kindle-nm460gz", "fsl,imx6sl";
+	barebox,disable-deep-probe;

Is this intentional? What doesn't work with deep probe enabled?

With barebox,deep-probe mmc1 will not be available when kindle_rev_init() is called at late_initcall(kindle_mx6sl_late_init).
This way, the required ATAGs will be missing.
Will deep-probe influence device_initcall(kindle6_device_init)?

Quoted 3 lines

Sascha

Cheers, Alexander

maintainer
#3 lore raw
Quoted 36 lines · Alexander Kurz

Hi Sascha,

Quoted 5 lines · Sascha Hauer

Hi Alexander,

Quoted 1 line · Alexander Kurz

Four Amazon Kindle 6th and 7th generation e-book readers were considered

...

Quoted 3 lines

Documentation/boards/imx/amazon-kindle-6-7.rst

Quoted 1 line
Documentation/boards/imx/amazon-kindle-6-7.rst +0 -0

Thanks for the good documentation, very appreciated :)

Thanks!

Quoted 13 lines
Quoted 13 lines

new file mode 100644
index 0000000000..c7a5ef9424

Documentation/boards/imx/amazon-kindle-6-7.rst +10 -0
+ENTRY_FUNCTION(start_imx6sl_kindle6_dp75sdi, r0, r1, r2)
+{
+	void *fdt;
+
+	imx6_cpu_lowlevel_init();
+
+	arm_setup_stack(0x00920000);
+
+	if (IS_ENABLED(CONFIG_DEBUG_LL)) {
+		writel(0x4, 0x020e016c);
Quoted 8 lines

Documentation/boards/imx/amazon-kindle-6-7.rst

Quoted 5 lines
Documentation/boards/imx/amazon-kindle-6-7.rst +5 -0
+		imx6_uart_setup_ll();
+	}
+
+	fdt = __dtb_imx6sl_kindle6_dp75sdi_start + get_runtime_offset();
+	barebox_arm_entry(0x80000000, SZ_256M, fdt);

Does imx6ul_barebox_entry() work here instead? In that case you could drop the memory nodes from the device trees.

Quoted 5 lines

Replacing barebox_arm_entry() with imx6ul_barebox_entry() seems to work so far (have only tested it on one device), but will this really make the memory nodes from the device trees obsolete as well? Some devices have 256 while others 512MB RAM, when the amount of memory is not hardcoded, is it auto-determined?

Yes, the memory nodes will be autogenerated from the configuration read back from the DRAM controller.

Quoted 21 lines
Quoted 13 lines
Quoted 13 lines

+++ b/arch/arm/dts/imx6sl-kindle-nm460gz.dts

Documentation/boards/imx/amazon-kindle-6-7.rst +9 -0
@@ -0,0 +1,69 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2025 Alexander Kurz <[email protected]>
+ */
+
+/dts-v1/;
+#include "imx6sl-kindle-common.dtsi"
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
Quoted 8 lines

Documentation/boards/imx/amazon-kindle-6-7.rst line 15

Quoted 6 lines
Documentation/boards/imx/amazon-kindle-6-7.rst +6 -0
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "kindle-nm460gz";
+	compatible = "amazon,imx6sl-kindle-nm460gz", "fsl,imx6sl";
+	barebox,disable-deep-probe;

Is this intentional? What doesn't work with deep probe enabled?

Quoted 4 lines

With barebox,deep-probe mmc1 will not be available when kindle_rev_init() is called at late_initcall(kindle_mx6sl_late_init).
This way, the required ATAGs will be missing.
Will deep-probe influence device_initcall(kindle6_device_init)?

deep probe will probe devices on demand for you. What's left to do for you is to say that you need the mmc1 device by doing a:

of_device_ensure_probed_by_alias("mmc1");

This will handle the dependencies like probing regulators or clocks regardless of the initcall level you are in.

You also have this in your patch:

+       /* Probe the eMMC to allow reading the board serial and revision */
+       dev = get_device_by_name("mmc1");
+       if (dev)

+ dev_set_param(dev, "probe", "1");

which can be replaced by a:

device_detect_by_name("mmc1");

The different initcall levels in your board code shouldn't be necessary anmore with this.

Sascha

Signature · 4 lines
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 |