Compare commits
6
Commits
krane
...
krane-clean
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac15f4dcbc | ||
|
|
6f79f12858 | ||
|
|
ae757417c8 | ||
|
|
2830892520 | ||
|
|
ed1d014b7b | ||
|
|
f7faca4f11 |
@@ -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>;
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
stdin=serial,usbkbd
|
||||
stdout=serial,vidconsole
|
||||
stderr=serial,vidconsole
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user