public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH next] board: amediatech: Add X96Q support
@ 2025-12-31 19:45 J. Neuschäfer via B4 Relay
  2026-01-02 15:08 ` Tom Rini
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: J. Neuschäfer via B4 Relay @ 2025-12-31 19:45 UTC (permalink / raw)
  To: u-boot
  Cc: Tom Rini, Svyatoslav Ryhel, Leo Yu-Chi Liang, Peter Geis,
	Lukasz Majewski, Junhui Liu, J. Neuschäfer

From: "J. Neuschäfer" <j.ne@posteo.net>

The X96Q is a set-top box with an H313 SoC, AXP305 PMIC, 1 or 2 GiB RAM,
8 or 16 GiB eMMC flash, 2x USB A, Micro-SD, HDMI, Ethernet, audio/video
output, and infrared input.

  https://x96mini.com/products/x96q-tv-box-android-10-set-top-box

This commit adds a defconfig and some documentation. The devicetree is
already in dts/upstream.

The CONFIG_DRAM_SUNXI_* settings are chosen such that the register
values in the DRAM PHY's MMIO space are as close as possible to those
observed when booting with the preinstalled vendor U-Boot.

---
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
---
 configs/x96q_defconfig         | 46 ++++++++++++++++++++++++++++++++++
 doc/board/amediatech/index.rst |  9 +++++++
 doc/board/amediatech/x96q.rst  | 57 ++++++++++++++++++++++++++++++++++++++++++
 doc/board/index.rst            |  1 +
 4 files changed, 113 insertions(+)

diff --git a/configs/x96q_defconfig b/configs/x96q_defconfig
new file mode 100644
index 00000000000..650fecca624
--- /dev/null
+++ b/configs/x96q_defconfig
@@ -0,0 +1,46 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_DEFAULT_DEVICE_TREE="allwinner/sun50i-h313-x96q"
+CONFIG_SPL=y
+
+CONFIG_DRAM_CLK=600
+CONFIG_DRAM_SUNXI_DX_ODT=0x03030303
+CONFIG_DRAM_SUNXI_DX_DRI=0x0e0e0e0e
+CONFIG_DRAM_SUNXI_CA_DRI=0x1f12
+CONFIG_DRAM_SUNXI_TPR0=0xc0001002
+CONFIG_DRAM_SUNXI_TPR2=0x00000100
+CONFIG_DRAM_SUNXI_TPR10=0x002f0107
+CONFIG_DRAM_SUNXI_TPR11=0xddddcccc
+CONFIG_DRAM_SUNXI_TPR12=0xeddc7665
+
+CONFIG_MACH_SUN50I_H616=y
+CONFIG_SUNXI_DRAM_H616_DDR3_1333=y    # DDR3 is correct, but vendor uboot mentions 600 MHz DRAM CLK
+#CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_R_I2C_ENABLE=y
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL_I2C=y
+CONFIG_SPL_SYS_I2C_LEGACY=y
+CONFIG_SYS_I2C_MVTWSI=y
+CONFIG_SYS_I2C_SLAVE=0x7f
+CONFIG_SYS_I2C_SPEED=400000
+CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_AXP305_POWER=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+
+CONFIG_SPL_USE_TINY_PRINTF_POINTER_SUPPORT=y
+CONFIG_CMD_UFETCH=y
+#CONFIG_SPL_PAYLOAD="u-boot.img"
+#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x60
+
+CONFIG_CMD_CAT=y
+
+#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=60   # os = 0, uboot not detected
+#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=61   # e59f002c e5810000 f57ff04f f57ff06f (4a0000cc)
+#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=62   # a9431e66 a9442668 a9452e6a a946366c (4a0002cc)
+#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=64   # 52800000 91008081 79400025 34000080 (4a0006cc)
+#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=96   # 340007c0 f9401673 eb1302ff 54000760 (4a006acc)
+#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=112  # f9003fe0 f94047e0 6b1c001f 54fffcc0 (4a0162cc)
+
+CONFIG_SUN8I_EMAC=y
+CONFIG_FIT_BEST_MATCH=y
diff --git a/doc/board/amediatech/index.rst b/doc/board/amediatech/index.rst
new file mode 100644
index 00000000000..7bc42833ec0
--- /dev/null
+++ b/doc/board/amediatech/index.rst
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Amediatech
+==========
+
+.. toctree::
+   :maxdepth: 2
+
+   x96q
diff --git a/doc/board/amediatech/x96q.rst b/doc/board/amediatech/x96q.rst
new file mode 100644
index 00000000000..27485c1b363
--- /dev/null
+++ b/doc/board/amediatech/x96q.rst
@@ -0,0 +1,57 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+U-Boot for the Amediatech X96Q set-top box
+==========================================
+
+Quick Start
+-----------
+
+- Get and Build the ARM Trusted Firmware (TF-A)
+- Build U-Boot
+- Write U-Boot to a microSD card
+- Boot
+
+Get and Build the ARM Trusted Firmware (TF-A)
+---------------------------------------------
+
+.. code-block:: bash
+
+    $ echo "Downloading and building TF-A..."
+    $ git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
+    $ cd trusted-firmware-a
+
+Then build TF-A:
+
+.. code-block:: bash
+
+    $ export CROSS_COMPILE=aarch64-linux-gnu-
+    $ make PLAT=sun50i_h616 bl31
+    $ cp build/sun50i_h616/release/bl31.bin ../
+
+Build U-Boot
+------------
+
+.. code-block:: bash
+
+    $ export CROSS_COMPILE=aarch64-none-elf-
+    $ make x96q_defconfig
+    $ make
+
+After the build succeeds, you will obtain the final ``u-boot-sunxi-with-spl.bin``
+image, which you can then write to a microSD card.
+
+Write U-Boot to a microSD card
+------------------------------
+
+You can then flash U-Boot to the microSD card (replace ``/dev/sdX`` with the
+card's device file):
+
+.. code-block:: bash
+
+    $ dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=8k seek=1
+
+Boot
+----
+
+When the X96Q is booted with the prepared microSD card inserted, it should boot
+into the freshly installed U-Boot.
diff --git a/doc/board/index.rst b/doc/board/index.rst
index 7870f1bc246..767e1831912 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -9,6 +9,7 @@ Board-specific doc
    acer/index
    actions/index
    advantech/index
+   amediatech/index
    andestech/index
    allwinner/index
    amlogic/index

---
base-commit: 8f520c0d5656196ec4912c837cc156a399350c33
change-id: 20251231-x96q-998c1376ebbf

Best regards,
-- 
J. Neuschäfer <j.ne@posteo.net>



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH next] board: amediatech: Add X96Q support
  2025-12-31 19:45 [PATCH next] board: amediatech: Add X96Q support J. Neuschäfer via B4 Relay
@ 2026-01-02 15:08 ` Tom Rini
  2026-01-03 17:17   ` J. Neuschäfer
  2026-01-03 17:34 ` Kuan-Wei Chiu
  2026-01-03 17:39 ` Kuan-Wei Chiu
  2 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2026-01-02 15:08 UTC (permalink / raw)
  To: j.ne
  Cc: u-boot, Svyatoslav Ryhel, Leo Yu-Chi Liang, Peter Geis,
	Lukasz Majewski, Junhui Liu

[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]

On Wed, Dec 31, 2025 at 08:45:03PM +0100, J. Neuschäfer via B4 Relay wrote:

> From: "J. Neuschäfer" <j.ne@posteo.net>
> 
> The X96Q is a set-top box with an H313 SoC, AXP305 PMIC, 1 or 2 GiB RAM,
> 8 or 16 GiB eMMC flash, 2x USB A, Micro-SD, HDMI, Ethernet, audio/video
> output, and infrared input.
> 
>   https://x96mini.com/products/x96q-tv-box-android-10-set-top-box
> 
> This commit adds a defconfig and some documentation. The devicetree is
> already in dts/upstream.
> 
> The CONFIG_DRAM_SUNXI_* settings are chosen such that the register
> values in the DRAM PHY's MMIO space are as close as possible to those
> observed when booting with the preinstalled vendor U-Boot.
> 
> ---
> Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> ---
>  configs/x96q_defconfig         | 46 ++++++++++++++++++++++++++++++++++

This needs to come from "make savedefconfig" and:
[snip]
> +CONFIG_SUNXI_DRAM_H616_DDR3_1333=y    # DDR3 is correct, but vendor uboot mentions 600 MHz DRAM CLK
[snip]
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=60   # os = 0, uboot not detected
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=61   # e59f002c e5810000 f57ff04f f57ff06f (4a0000cc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=62   # a9431e66 a9442668 a9452e6a a946366c (4a0002cc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=64   # 52800000 91008081 79400025 34000080 (4a0006cc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=96   # 340007c0 f9401673 eb1302ff 54000760 (4a006acc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=112  # f9003fe0 f94047e0 6b1c001f 54fffcc0 (4a0162cc)

If this information is useful, it needs to be preserved in the docs.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH next] board: amediatech: Add X96Q support
  2026-01-02 15:08 ` Tom Rini
@ 2026-01-03 17:17   ` J. Neuschäfer
  0 siblings, 0 replies; 7+ messages in thread
From: J. Neuschäfer @ 2026-01-03 17:17 UTC (permalink / raw)
  To: Tom Rini
  Cc: j.ne, u-boot, Svyatoslav Ryhel, Leo Yu-Chi Liang, Peter Geis,
	Lukasz Majewski, Junhui Liu

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

On Fri, Jan 02, 2026 at 09:08:46AM -0600, Tom Rini wrote:
> On Wed, Dec 31, 2025 at 08:45:03PM +0100, J. Neuschäfer via B4 Relay wrote:
> 
> > From: "J. Neuschäfer" <j.ne@posteo.net>
> > 
> > The X96Q is a set-top box with an H313 SoC, AXP305 PMIC, 1 or 2 GiB RAM,
> > 8 or 16 GiB eMMC flash, 2x USB A, Micro-SD, HDMI, Ethernet, audio/video
> > output, and infrared input.
> > 
> >   https://x96mini.com/products/x96q-tv-box-android-10-set-top-box
> > 
> > This commit adds a defconfig and some documentation. The devicetree is
> > already in dts/upstream.
> > 
> > The CONFIG_DRAM_SUNXI_* settings are chosen such that the register
> > values in the DRAM PHY's MMIO space are as close as possible to those
> > observed when booting with the preinstalled vendor U-Boot.
> > 
> > ---
> > Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> > ---
> >  configs/x96q_defconfig         | 46 ++++++++++++++++++++++++++++++++++
> 
> This needs to come from "make savedefconfig" and:
> [snip]
> > +CONFIG_SUNXI_DRAM_H616_DDR3_1333=y    # DDR3 is correct, but vendor uboot mentions 600 MHz DRAM CLK
> [snip]

Ok, I'll re-generate it.

> > +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=60   # os = 0, uboot not detected
> > +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=61   # e59f002c e5810000 f57ff04f f57ff06f (4a0000cc)
> > +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=62   # a9431e66 a9442668 a9452e6a a946366c (4a0002cc)
> > +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=64   # 52800000 91008081 79400025 34000080 (4a0006cc)
> > +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=96   # 340007c0 f9401673 eb1302ff 54000760 (4a006acc)
> > +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=112  # f9003fe0 f94047e0 6b1c001f 54fffcc0 (4a0162cc)
> 
> If this information is useful, it needs to be preserved in the docs.

I made these notes during bringup, but they're not useful anymore.


Thanks for your review!
J. Neuschäfer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH next] board: amediatech: Add X96Q support
  2025-12-31 19:45 [PATCH next] board: amediatech: Add X96Q support J. Neuschäfer via B4 Relay
  2026-01-02 15:08 ` Tom Rini
@ 2026-01-03 17:34 ` Kuan-Wei Chiu
  2026-01-03 18:40   ` J. Neuschäfer
  2026-01-03 17:39 ` Kuan-Wei Chiu
  2 siblings, 1 reply; 7+ messages in thread
From: Kuan-Wei Chiu @ 2026-01-03 17:34 UTC (permalink / raw)
  To: j.ne
  Cc: u-boot, Tom Rini, Svyatoslav Ryhel, Leo Yu-Chi Liang, Peter Geis,
	Lukasz Majewski, Junhui Liu

Hi J.,

On Wed, Dec 31, 2025 at 08:45:03PM +0100, J. Neuschäfer via B4 Relay wrote:
> From: "J. Neuschäfer" <j.ne@posteo.net>
> 
> The X96Q is a set-top box with an H313 SoC, AXP305 PMIC, 1 or 2 GiB RAM,
> 8 or 16 GiB eMMC flash, 2x USB A, Micro-SD, HDMI, Ethernet, audio/video
> output, and infrared input.
> 
>   https://x96mini.com/products/x96q-tv-box-android-10-set-top-box
> 
> This commit adds a defconfig and some documentation. The devicetree is
> already in dts/upstream.
> 
> The CONFIG_DRAM_SUNXI_* settings are chosen such that the register
> values in the DRAM PHY's MMIO space are as close as possible to those
> observed when booting with the preinstalled vendor U-Boot.
> 
> ---

Please remove the --- separator above the Signed-off-by tag. git am
treats everything after the first --- as comments, which will cause
your sign-off to be stripped from the final commit message.

Regards,
Kuan-Wei

> Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> ---
>  configs/x96q_defconfig         | 46 ++++++++++++++++++++++++++++++++++
>  doc/board/amediatech/index.rst |  9 +++++++
>  doc/board/amediatech/x96q.rst  | 57 ++++++++++++++++++++++++++++++++++++++++++
>  doc/board/index.rst            |  1 +
>  4 files changed, 113 insertions(+)
> 
> diff --git a/configs/x96q_defconfig b/configs/x96q_defconfig
> new file mode 100644
> index 00000000000..650fecca624
> --- /dev/null
> +++ b/configs/x96q_defconfig
> @@ -0,0 +1,46 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_DEFAULT_DEVICE_TREE="allwinner/sun50i-h313-x96q"
> +CONFIG_SPL=y
> +
> +CONFIG_DRAM_CLK=600
> +CONFIG_DRAM_SUNXI_DX_ODT=0x03030303
> +CONFIG_DRAM_SUNXI_DX_DRI=0x0e0e0e0e
> +CONFIG_DRAM_SUNXI_CA_DRI=0x1f12
> +CONFIG_DRAM_SUNXI_TPR0=0xc0001002
> +CONFIG_DRAM_SUNXI_TPR2=0x00000100
> +CONFIG_DRAM_SUNXI_TPR10=0x002f0107
> +CONFIG_DRAM_SUNXI_TPR11=0xddddcccc
> +CONFIG_DRAM_SUNXI_TPR12=0xeddc7665
> +
> +CONFIG_MACH_SUN50I_H616=y
> +CONFIG_SUNXI_DRAM_H616_DDR3_1333=y    # DDR3 is correct, but vendor uboot mentions 600 MHz DRAM CLK
> +#CONFIG_MMC_SUNXI_SLOT_EXTRA=2
> +CONFIG_R_I2C_ENABLE=y
> +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> +CONFIG_SPL_I2C=y
> +CONFIG_SPL_SYS_I2C_LEGACY=y
> +CONFIG_SYS_I2C_MVTWSI=y
> +CONFIG_SYS_I2C_SLAVE=0x7f
> +CONFIG_SYS_I2C_SPEED=400000
> +CONFIG_SUPPORT_EMMC_BOOT=y
> +CONFIG_AXP305_POWER=y
> +CONFIG_USB_EHCI_HCD=y
> +CONFIG_USB_OHCI_HCD=y
> +
> +CONFIG_SPL_USE_TINY_PRINTF_POINTER_SUPPORT=y
> +CONFIG_CMD_UFETCH=y
> +#CONFIG_SPL_PAYLOAD="u-boot.img"
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x60
> +
> +CONFIG_CMD_CAT=y
> +
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=60   # os = 0, uboot not detected
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=61   # e59f002c e5810000 f57ff04f f57ff06f (4a0000cc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=62   # a9431e66 a9442668 a9452e6a a946366c (4a0002cc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=64   # 52800000 91008081 79400025 34000080 (4a0006cc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=96   # 340007c0 f9401673 eb1302ff 54000760 (4a006acc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=112  # f9003fe0 f94047e0 6b1c001f 54fffcc0 (4a0162cc)
> +
> +CONFIG_SUN8I_EMAC=y
> +CONFIG_FIT_BEST_MATCH=y
> diff --git a/doc/board/amediatech/index.rst b/doc/board/amediatech/index.rst
> new file mode 100644
> index 00000000000..7bc42833ec0
> --- /dev/null
> +++ b/doc/board/amediatech/index.rst
> @@ -0,0 +1,9 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +Amediatech
> +==========
> +
> +.. toctree::
> +   :maxdepth: 2
> +
> +   x96q
> diff --git a/doc/board/amediatech/x96q.rst b/doc/board/amediatech/x96q.rst
> new file mode 100644
> index 00000000000..27485c1b363
> --- /dev/null
> +++ b/doc/board/amediatech/x96q.rst
> @@ -0,0 +1,57 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +U-Boot for the Amediatech X96Q set-top box
> +==========================================
> +
> +Quick Start
> +-----------
> +
> +- Get and Build the ARM Trusted Firmware (TF-A)
> +- Build U-Boot
> +- Write U-Boot to a microSD card
> +- Boot
> +
> +Get and Build the ARM Trusted Firmware (TF-A)
> +---------------------------------------------
> +
> +.. code-block:: bash
> +
> +    $ echo "Downloading and building TF-A..."
> +    $ git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git
> +    $ cd trusted-firmware-a
> +
> +Then build TF-A:
> +
> +.. code-block:: bash
> +
> +    $ export CROSS_COMPILE=aarch64-linux-gnu-
> +    $ make PLAT=sun50i_h616 bl31
> +    $ cp build/sun50i_h616/release/bl31.bin ../
> +
> +Build U-Boot
> +------------
> +
> +.. code-block:: bash
> +
> +    $ export CROSS_COMPILE=aarch64-none-elf-
> +    $ make x96q_defconfig
> +    $ make
> +
> +After the build succeeds, you will obtain the final ``u-boot-sunxi-with-spl.bin``
> +image, which you can then write to a microSD card.
> +
> +Write U-Boot to a microSD card
> +------------------------------
> +
> +You can then flash U-Boot to the microSD card (replace ``/dev/sdX`` with the
> +card's device file):
> +
> +.. code-block:: bash
> +
> +    $ dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=8k seek=1
> +
> +Boot
> +----
> +
> +When the X96Q is booted with the prepared microSD card inserted, it should boot
> +into the freshly installed U-Boot.
> diff --git a/doc/board/index.rst b/doc/board/index.rst
> index 7870f1bc246..767e1831912 100644
> --- a/doc/board/index.rst
> +++ b/doc/board/index.rst
> @@ -9,6 +9,7 @@ Board-specific doc
>     acer/index
>     actions/index
>     advantech/index
> +   amediatech/index
>     andestech/index
>     allwinner/index
>     amlogic/index
> 
> ---
> base-commit: 8f520c0d5656196ec4912c837cc156a399350c33
> change-id: 20251231-x96q-998c1376ebbf
> 
> Best regards,
> -- 
> J. Neuschäfer <j.ne@posteo.net>
> 
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH next] board: amediatech: Add X96Q support
  2025-12-31 19:45 [PATCH next] board: amediatech: Add X96Q support J. Neuschäfer via B4 Relay
  2026-01-02 15:08 ` Tom Rini
  2026-01-03 17:34 ` Kuan-Wei Chiu
@ 2026-01-03 17:39 ` Kuan-Wei Chiu
  2026-01-03 18:46   ` J. Neuschäfer
  2 siblings, 1 reply; 7+ messages in thread
From: Kuan-Wei Chiu @ 2026-01-03 17:39 UTC (permalink / raw)
  To: j.ne
  Cc: u-boot, Tom Rini, Svyatoslav Ryhel, Leo Yu-Chi Liang, Peter Geis,
	Lukasz Majewski, Junhui Liu

Hi J.,

On Wed, Dec 31, 2025 at 08:45:03PM +0100, J. Neuschäfer via B4 Relay wrote:
> From: "J. Neuschäfer" <j.ne@posteo.net>
> 
> The X96Q is a set-top box with an H313 SoC, AXP305 PMIC, 1 or 2 GiB RAM,
> 8 or 16 GiB eMMC flash, 2x USB A, Micro-SD, HDMI, Ethernet, audio/video
> output, and infrared input.
> 
>   https://x96mini.com/products/x96q-tv-box-android-10-set-top-box
> 
> This commit adds a defconfig and some documentation. The devicetree is
> already in dts/upstream.
> 
> The CONFIG_DRAM_SUNXI_* settings are chosen such that the register
> values in the DRAM PHY's MMIO space are as close as possible to those
> observed when booting with the preinstalled vendor U-Boot.
> 
> ---
> Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> ---
>  configs/x96q_defconfig         | 46 ++++++++++++++++++++++++++++++++++
>  doc/board/amediatech/index.rst |  9 +++++++
>  doc/board/amediatech/x96q.rst  | 57 ++++++++++++++++++++++++++++++++++++++++++
>  doc/board/index.rst            |  1 +
>  4 files changed, 113 insertions(+)
> 
> diff --git a/configs/x96q_defconfig b/configs/x96q_defconfig
> new file mode 100644
> index 00000000000..650fecca624
> --- /dev/null
> +++ b/configs/x96q_defconfig
> @@ -0,0 +1,46 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_DEFAULT_DEVICE_TREE="allwinner/sun50i-h313-x96q"
> +CONFIG_SPL=y
> +
> +CONFIG_DRAM_CLK=600
> +CONFIG_DRAM_SUNXI_DX_ODT=0x03030303
> +CONFIG_DRAM_SUNXI_DX_DRI=0x0e0e0e0e
> +CONFIG_DRAM_SUNXI_CA_DRI=0x1f12
> +CONFIG_DRAM_SUNXI_TPR0=0xc0001002
> +CONFIG_DRAM_SUNXI_TPR2=0x00000100
> +CONFIG_DRAM_SUNXI_TPR10=0x002f0107
> +CONFIG_DRAM_SUNXI_TPR11=0xddddcccc
> +CONFIG_DRAM_SUNXI_TPR12=0xeddc7665
> +
> +CONFIG_MACH_SUN50I_H616=y
> +CONFIG_SUNXI_DRAM_H616_DDR3_1333=y    # DDR3 is correct, but vendor uboot mentions 600 MHz DRAM CLK
> +#CONFIG_MMC_SUNXI_SLOT_EXTRA=2
> +CONFIG_R_I2C_ENABLE=y
> +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> +CONFIG_SPL_I2C=y
> +CONFIG_SPL_SYS_I2C_LEGACY=y
> +CONFIG_SYS_I2C_MVTWSI=y
> +CONFIG_SYS_I2C_SLAVE=0x7f
> +CONFIG_SYS_I2C_SPEED=400000
> +CONFIG_SUPPORT_EMMC_BOOT=y
> +CONFIG_AXP305_POWER=y
> +CONFIG_USB_EHCI_HCD=y
> +CONFIG_USB_OHCI_HCD=y
> +
> +CONFIG_SPL_USE_TINY_PRINTF_POINTER_SUPPORT=y
> +CONFIG_CMD_UFETCH=y
> +#CONFIG_SPL_PAYLOAD="u-boot.img"
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x60
> +
> +CONFIG_CMD_CAT=y
> +
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=60   # os = 0, uboot not detected
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=61   # e59f002c e5810000 f57ff04f f57ff06f (4a0000cc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=62   # a9431e66 a9442668 a9452e6a a946366c (4a0002cc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=64   # 52800000 91008081 79400025 34000080 (4a0006cc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=96   # 340007c0 f9401673 eb1302ff 54000760 (4a006acc)
> +#CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=112  # f9003fe0 f94047e0 6b1c001f 54fffcc0 (4a0162cc)
> +
> +CONFIG_SUN8I_EMAC=y
> +CONFIG_FIT_BEST_MATCH=y
> diff --git a/doc/board/amediatech/index.rst b/doc/board/amediatech/index.rst
> new file mode 100644
> index 00000000000..7bc42833ec0
> --- /dev/null
> +++ b/doc/board/amediatech/index.rst
> @@ -0,0 +1,9 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +Amediatech
> +==========
> +
> +.. toctree::
> +   :maxdepth: 2
> +
> +   x96q
> diff --git a/doc/board/amediatech/x96q.rst b/doc/board/amediatech/x96q.rst
> new file mode 100644
> index 00000000000..27485c1b363
> --- /dev/null
> +++ b/doc/board/amediatech/x96q.rst
> @@ -0,0 +1,57 @@
> +.. SPDX-License-Identifier: GPL-2.0+

GPL-2.0+ has been deprecated as a SPDX license identifier.
GPL-2.0-or-later should be used instead [1].

[1]: https://lore.kernel.org/u-boot/20251212142859.GQ303283@bill-the-cat

Regards,
Kuan-Wei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH next] board: amediatech: Add X96Q support
  2026-01-03 17:34 ` Kuan-Wei Chiu
@ 2026-01-03 18:40   ` J. Neuschäfer
  0 siblings, 0 replies; 7+ messages in thread
From: J. Neuschäfer @ 2026-01-03 18:40 UTC (permalink / raw)
  To: Kuan-Wei Chiu
  Cc: j.ne, u-boot, Tom Rini, Svyatoslav Ryhel, Leo Yu-Chi Liang,
	Peter Geis, Lukasz Majewski, Junhui Liu

On Sun, Jan 04, 2026 at 01:34:28AM +0800, Kuan-Wei Chiu wrote:
> Hi J.,
> 
> On Wed, Dec 31, 2025 at 08:45:03PM +0100, J. Neuschäfer via B4 Relay wrote:
> > From: "J. Neuschäfer" <j.ne@posteo.net>
> > 
> > The X96Q is a set-top box with an H313 SoC, AXP305 PMIC, 1 or 2 GiB RAM,
> > 8 or 16 GiB eMMC flash, 2x USB A, Micro-SD, HDMI, Ethernet, audio/video
> > output, and infrared input.
> > 
> >   https://x96mini.com/products/x96q-tv-box-android-10-set-top-box
> > 
> > This commit adds a defconfig and some documentation. The devicetree is
> > already in dts/upstream.
> > 
> > The CONFIG_DRAM_SUNXI_* settings are chosen such that the register
> > values in the DRAM PHY's MMIO space are as close as possible to those
> > observed when booting with the preinstalled vendor U-Boot.
> > 
> > ---
> 
> Please remove the --- separator above the Signed-off-by tag. git am
> treats everything after the first --- as comments, which will cause
> your sign-off to be stripped from the final commit message.

Yes - I forgot to add the S-o-b manually, and b4 added it under the line
automatically. I will stick to the proper format in v2.

Thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH next] board: amediatech: Add X96Q support
  2026-01-03 17:39 ` Kuan-Wei Chiu
@ 2026-01-03 18:46   ` J. Neuschäfer
  0 siblings, 0 replies; 7+ messages in thread
From: J. Neuschäfer @ 2026-01-03 18:46 UTC (permalink / raw)
  To: Kuan-Wei Chiu
  Cc: j.ne, u-boot, Tom Rini, Svyatoslav Ryhel, Leo Yu-Chi Liang,
	Peter Geis, Lukasz Majewski, Junhui Liu

On Sun, Jan 04, 2026 at 01:39:42AM +0800, Kuan-Wei Chiu wrote:
> Hi J.,
> 
> On Wed, Dec 31, 2025 at 08:45:03PM +0100, J. Neuschäfer via B4 Relay wrote:
[...]
> > +++ b/doc/board/amediatech/x96q.rst
> > @@ -0,0 +1,57 @@
> > +.. SPDX-License-Identifier: GPL-2.0+
> 
> GPL-2.0+ has been deprecated as a SPDX license identifier.
> GPL-2.0-or-later should be used instead [1].
> 
> [1]: https://lore.kernel.org/u-boot/20251212142859.GQ303283@bill-the-cat

I'll fix it in both files in the next version.

Thanks!
J. Neuschäfer

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-04  0:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-31 19:45 [PATCH next] board: amediatech: Add X96Q support J. Neuschäfer via B4 Relay
2026-01-02 15:08 ` Tom Rini
2026-01-03 17:17   ` J. Neuschäfer
2026-01-03 17:34 ` Kuan-Wei Chiu
2026-01-03 18:40   ` J. Neuschäfer
2026-01-03 17:39 ` Kuan-Wei Chiu
2026-01-03 18:46   ` J. Neuschäfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox