6 Commits
Author SHA1 Message Date
vhaudiquetandvhaudiquet ac15f4dcbc krane: rotate the console 270 degrees clockwise for landscape use
The BOE TV101WUM-NL6 panel is mounted rotated 270 degrees in the
krane chassis (rotation property on the panel node in the upstream
DT). With the keyboard attached the tablet is used in landscape, so
set video rot=1 and enable CONFIG_CONSOLE_ROTATION: the uclass then
binds the rotated vidconsole1 driver, which writes glyphs rotated by
90 degrees clockwise into the native 1200x1920 portrait scanout and
uses the swapped console geometry (240 columns x 75 rows).

The framebuffer geometry and the depthcharge scanout path are
unchanged; only the console text placement rotates.
2026-08-31 00:19:46 +02:00
vhaudiquetandvhaudiquet 6f79f12858 krane: bind the mtu3 SSUSB container so its xhci child is scanned
DM scans only the immediate subnodes of a bound node; recursion into
children happens when a bound bus driver runs dm_scan_fdt_dev. Nothing
in U-Boot binds the "mediatek,mtu3" ssusb@11201000 node, so its xhci
child (usb@11200000) was never bound, no UCLASS_USB device existed and
usb start() reported "No USB controllers found".

Add "simple-mfd" to the ssusb compatible in the -u-boot.dtsi overlay
so the generic simple-bus driver binds the node and scans its children.
2026-08-31 00:19:46 +02:00
vhaudiquetandvhaudiquet ae757417c8 krane: enable USB xHCI, T-PHY and USB keyboard for the pogo keyboard
The pogo keyboard is a USB HID device behind the GL610 hub on
usb@11200000. Enable the USB stack (USB, DM_USB, USB_XHCI_HCD,
USB_XHCI_MTK, USB_STORAGE, CMD_USB), the MTK T-PHY (PHY_MTK_TPHY),
USB_KEYBOARD and CONFIG_USE_PREBOOT (preboot defaults to "usb start"
with USB_KEYBOARD) so the bus is enumerated before the prompt.

The upstream mt8183.dtsi models the SSUSB block for the Linux mtu3
dual-role driver: the IPPC register space and the phys live on the
parent mtu3 node while the xhci child has only its "mac" register.
U-Boot binds the "mediatek,mtk-xhci" child directly and expects
mac+ippc and a phys list on that node, so add a board
-u-boot.dtsi overlay (auto-included after the upstream dts) that
supplies them. No upstream DT files are modified.

stdin=serial,usbkbd routes the prompt through the USB keyboard once
the usb_kbd stdio device is registered.
2026-08-31 00:19:44 +02:00
vhaudiquetandvhaudiquet 2830892520 krane: override get_page_table_size for dynamic scanout mappings 2026-08-30 23:33:12 +02:00
vhaudiquetandvhaudiquet ed1d014b7b krane: default env routes stdout through vidconsole; env nowhere for payload stage 2026-08-30 23:28:40 +02:00
vhaudiquetandvhaudiquet f7faca4f11 krane: CONFIG_TEXT_BASE=0x4C001000 (8-aligned, keeps _start at image base) 2026-08-30 23:28:38 +02:00
5 changed files with 73 additions and 4 deletions
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
/*
* U-Boot-only additions for the MT8183 Kukui (krane) boards.
*
* The upstream mt8183.dtsi models the SSUSB block for the Linux mtu3
* dual-role driver: the IPPC register space and the phys are declared
* on the parent "mediatek,mtu3" node (ssusb@11201000), and the host
* child (usb@11200000) carries only its "mac" register.
*
* U-Boot has no mtu3 driver; it binds the "mediatek,mtk-xhci" child
* directly with drivers/usb/host/xhci-mtk.c, which expects the "mac"
* and "ippc" register names and a phys list on the xHCI node itself.
* Add the missing ippc address (taken from the ssusb node's "ippc"
* reg entry) and the port phys there.
*
* DM only scans the subnodes of nodes that a driver binds (bus drivers
* recurse via dm_scan_fdt_dev). Nothing binds "mediatek,mtu3", so the
* xHCI child would never be bound and usb_start() would report "No USB
* controllers found". Adding "simple-mfd" makes the generic simple-bus
* driver bind the ssusb node and scan its children.
*/
&ssusb {
compatible = "mediatek,mt8183-mtu3", "mediatek,mtu3", "simple-mfd";
};
&usb_host {
reg = <0x0 0x11200000 0x0 0x1000>,
<0x0 0x11203e00 0x0 0x0100>;
reg-names = "mac", "ippc";
phys = <&u2port0 PHY_TYPE_USB2>,
<&u3port0 PHY_TYPE_USB3>;
};
+3
View File
@@ -0,0 +1,3 @@
stdin=serial,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
+11 -1
View File
@@ -3,10 +3,20 @@
* Copyright (C) 2020 BayLibre SAS
* Author: Fabien Parent <fparent@baylibre.com>
*/
#include <dm.h>
#include <net.h>
/*
* The krane scanout driver maps the coreboot table and the live
* framebuffer dynamically after relocation (mmu_map_region), which the
* default page-table budget (sized for the static memory map only)
* does not account for. Reserve enough for those mappings.
*/
u64 get_page_table_size(void)
{
return 0x40000;
}
int board_init(void)
{
struct udevice *dev;
+13 -3
View File
@@ -2,7 +2,7 @@ CONFIG_ARM=y
CONFIG_COUNTER_FREQUENCY=13000000
CONFIG_POSITION_INDEPENDENT=y
CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x4c000000
CONFIG_TEXT_BASE=0x4C001000
CONFIG_SYS_MALLOC_F_LEN=0x4000
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x1000
@@ -55,9 +55,10 @@ CONFIG_CMD_SYSBOOT=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_CMD_USB=y
# CONFIG_DOS_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_MMC_EMMC_HW_PARTITION=2
CONFIG_ENV_IS_NOWHERE=y
CONFIG_ENV_SOURCE_FILE="krane"
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_CLK=y
CONFIG_VIDEO=y
@@ -65,6 +66,15 @@ CONFIG_VIDEO_MT8183_SCANOUT=y
# CONFIG_INPUT is not set
# CONFIG_MMC_QUIRKS is not set
CONFIG_MMC_MTK=y
CONFIG_PHY=y
CONFIG_PHY_MTK_TPHY=y
CONFIG_CONSOLE_ROTATION=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_MTK=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_STORAGE=y
# CONFIG_POWER is not set
CONFIG_BAUDRATE=921600
CONFIG_DM_SERIAL=y
+13
View File
@@ -204,6 +204,19 @@ static int mt8183_scanout_probe(struct udevice *dev)
uc_priv->ysize = fb.y_resolution;
uc_priv->line_length = fb.bytes_per_line;
/*
* The BOE TV101WUM-NL6 panel is mounted rotated 270 degrees in
* the krane chassis (see the panel node's "rotation" property in
* the upstream DT). The keyboard-covered landscape orientation
* therefore needs the console rotated; the uclass then binds the
* rotated vidconsole3 text driver, which writes glyphs rotated
* by 270 degrees clockwise into the native 1200x1920 portrait
* scanout and swaps the console geometry (240x75 columns/rows
* on this panel). rot=1 (90 degrees) was tried first and read
* upside down on the device (R35).
*/
uc_priv->rot = 3;
printf("Video: MT8183 scanout %dx%d@32bpp at %llx\n",
uc_priv->xsize, uc_priv->ysize, (unsigned long long)plat->base);