Giter Club home page Giter Club logo

genode-allwinner's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

genode-allwinner's Issues

Driver for power and volume buttons

We need a way to watch the power button as a prerequisite for implementing a screensaver.

While we are at it, we should also add a way to respond to volume buttons.

Simple modem manager

  • use two uarts and terminel_crosslink to connect the logging/input uart to the phone's modem uart in order to execute AT commands
  • power up Quectel modem
  • enter AT+QPOWD to power down modem

PinePhone: add wlan rtl8723cs driver component

The following commits introduce preliminary support for the PinePhone's RTL8723CS based WLAN/BT device. The included a64_wifi_drv.run run-script works like its PC counterpart.

The series depends on cnuke/genode/arm_wifi_2023-03-30 as it contains the required changes to make the WLAN stack work on non-x86.

Since the driver was not yet thoroughly tested and is rough around some edges (changing MAC address for one thing) it should be treated as a teaser and will be smoothed-out in the coming days.

framebuffer/de: use vblank interrupt

The following proof-of-concept commit replaces the timer-based capturing of screen data with using the VBLANK interrupt to trigger the update. It patches the a64_linux kernel to never disable the interrupt and adds a specific lx_emul function (lX_emul_framebuffer_vblank()) that is executed in the interrupt handler. The handler is called every ~26ms.

This was also reproduced with the pc_intel_fb_drv where the interrupt occurred every ~16ms when only one display was used and at varying intervals when multiple displays were connected.

So for less invasive (and properly accounting for mutiple displays) vblank handling we could look at how to profit from the drm_crtc_handle_vblank() call and how to enable the interrupt from the user's side of things.

Access the power-management IC (PMIC) via the system control processor (SCP)

Currently, the platform driver contains a driver for the reduced serial bus (RSB), which is the two-wire bus that connects the PMIC to the A64 SoC. In practice, both the SCP firmware and Genode components need to access (different parts of) the PMIC. However, the RSB bus can be driven by only one party. To harmonize the PMIC accesses between both parties, the platform driver should interact with the PMIC exclusively via SCP calls.

UART driver: TX fifo prone to overrun

When reading data bulk via UART from the modem (e.g., obtaining the list of SMS messages), I observed that sequences of bytes went missing. The first few lines of output were complete. Afterwards, the output got flaky. This observation hints at a possible FIFO overrun at the SoC side.

Speed up the boot time of the PinePhone

There exist several opportunities to accelerate the cold boot of Genode/Sculpt on the PinePhone:

  • Initializing the SCP command for accessing the PMIC at firmware-loading time. Right now, the platform driver loads this part of the firmware, which takes a few hundred milliseconds.
  • Compile ARM Trusted Firmware (ATF) in release mode instead of debug mode
  • Disable ATF log output
  • Reduce SCP handshake timeout from 100ms to 10us

intel display driver: dma faults and endless error reporting for larger framebuffer allocations

[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] fb0: i915 frame buffer device
[init -> init_dynamic -> report_rom] report 'intel_fb_drv -> connectors'
[init -> init_dynamic -> report_rom]   <connectors>
[init -> init_dynamic -> report_rom]   	<connector name="eDP-1" connected="true" brightness="100">
[init -> init_dynamic -> report_rom]   		<mode width="1920" height="1080" hz="60" mode_id="1" mode_name="1920x1080" preferred="true"/>
[init -> init_dynamic -> report_rom]   		<mode width="1920" height="1080" hz="48" mode_id="2" mode_name="1920x1080"/>
[init -> init_dynamic -> report_rom]   	</connector>
[init -> init_dynamic -> report_rom]   	<connector name="HDMI-A-1" connected="true">
[init -> init_dynamic -> report_rom]   		<mode width="3840" height="2160" hz="30" mode_id="1" mode_name="3840x2160" preferred="true"/>
[init -> init_dynamic -> report_rom]   		<mode width="3840" height="2160" hz="25" mode_id="4" mode_name="3840x2160"/>
[init -> init_dynamic -> report_rom]   		<mode width="3840" height="2160" hz="24" mode_id="5" mode_name="3840x2160"/>
[init -> init_dynamic -> report_rom]   		<mode width="1920" height="1080" hz="60" mode_id="7" mode_name="1920x1080"/>
[init -> init_dynamic -> report_rom]   		<mode width="1920" height="1080" hz="60" mode_id="10" mode_name="1920x1080i"/>
[init -> init_dynamic -> report_rom]   		<mode width="1920" height="1080" hz="30" mode_id="12" mode_name="1920x1080"/>
[init -> init_dynamic -> report_rom]   		<mode width="1600" height="900" hz="60" mode_id="14" mode_name="1600x900"/>
[init -> init_dynamic -> report_rom]   		<mode width="1280" height="1024" hz="60" mode_id="15" mode_name="1280x1024"/>
[init -> init_dynamic -> report_rom]   		<mode width="1280" height="720" hz="60" mode_id="16" mode_name="1280x720"/>
[init -> init_dynamic -> report_rom]   		<mode width="1024" height="768" hz="60" mode_id="19" mode_name="1024x768"/>
[init -> init_dynamic -> report_rom]   		<mode width="800" height="600" hz="60" mode_id="20" mode_name="800x600"/>
[init -> init_dynamic -> report_rom]   		<mode width="720" height="480" hz="60" mode_id="21" mode_name="720x480"/>
[init -> init_dynamic -> report_rom]   		<mode width="640" height="480" hz="60" mode_id="23" mode_name="640x480"/>
[init -> init_dynamic -> report_rom]   	</connector>
[init -> init_dynamic -> report_rom]   	<connector name="DP-1" connected="false"/>
[init -> init_dynamic -> report_rom]   </connectors>
[init -> init_dynamic -> intel_fb_drv] eDP-1:  enable name='1920x1080' id=1 1920x1080@60
[init -> init_dynamic -> intel_fb_drv] HDMI-A-1:  enable name='3840x2160' id=1 3840x2160@30
[init -> init_dynamic -> test-framebuffer] all colors mixed
[init -> init_dynamic -> intel_fb_drv] framebuffer reconstructed - virtual=3840x2160 physical=3840x2160
[ 0] IOMMU:0xffffffff817ea060 FRR:0 FR:0x6 BDF:0:2:0 FI:0x3ee3c53000 (0)
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[ 0] IOMMU:0xffffffff817ea060 FRR:0 FR:0x6 BDF:0:2:0 FI:0x3ee3c53000 (0)
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[ 0] IOMMU:0xffffffff817ea060 FRR:0 FR:0x6 BDF:0:2:0 FI:0x3ee3c53000 (0)
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[ 0] IOMMU:0xffffffff817ea060 FRR:0 FR:0x6 BDF:0:2:0 FI:0x3ee3c53000 (0)
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[ 0] IOMMU:0xffffffff817ea060 FRR:0 FR:0x6 BDF:0:2:0 FI:0x3ee3c53000 (0)
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[ 0] IOMMU:0xffffffff817ea060 FRR:0 FR:0x6 BDF:0:2:0 FI:0x3ee3c53000 (0)
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[ 0] IOMMU:0xffffffff817ea060 FRR:0 FR:0x6 BDF:0:2:0 FI:0x3ee3c53000 (0)
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[ 0] IOMMU:0xffffffff817ea060 FRR:0 FR:0x6 BDF:0:2:0 FI:0x3ee3c53000 (0)
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[ 0] IOMMU:0xffffffff817ea060 FRR:0 FR:0x6 BDF:0:2:0 FI:0x3ee3c53000 (0)
[ 0] IOMMU:0xffffffff817ea060 - disabling fault reporting
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
[init -> init_dynamic -> intel_fb_drv] i915 00:02.0: [drm] *ERROR* Fault errors on pipe B: 0x00000080
...

gpu/lima: remove handling of I/O signals

With the introduce of the context-handling and the accompanying changes the driver now longer has to depend on the occurrence of I/O signals and their explicit handling via wait_and_dispatch_io_signal can be removed.

Interactive telephony scenario for the PinePhone

As a stepping stone towards using the PinePhone as a Genode-based smart phone, we need to reach the base line functionality of a phone that combines the following ingredients:

  • Simple interactive user interface that allows the user to power the modem, to enter the SIM pin, to get notice about incoming calls, to dial a number, and to hang up.
  • AT protocol implementation with support for telephony-related commands.
  • Modem driver that responds to dynamic configuration updates and reports the current modem state.
  • A variant of Sculpt that is tailored to the phone form factor and touch input.

Lower MMC0 clock

As reported on the Pine64 forum running the MMC0 controller (the one the SD card is attached to) at 150 MHz poses a problem depending on the used card. So revert back to the initial setting of 100 MHz.

Distinguish 3 GiB and 2 GiB PinePhone models at runtime

Currently, the kernel is hard-wired to the 3 GiB version by the RAM_SIZE definition in https://github.com/genodelabs/genode-allwinner/blob/master/src/include/hw/spec/arm_64/pine_a64lts_board.h, which is taken as input for the physical memory allocator of core/kernel https://github.com/genodelabs/genode-allwinner/blob/master/src/bootstrap/board/pine_a64lts/platform.cc.

Since both PinePhone variants are used in practice, we should better replace this hard-coded value by a value detected at runtime.

AT protocol: apply QCFG settings

Unfortunately, the PinePhone's Quectel modem stores some configuration information (QCFG) persistently inside the modem. Moreover, some settings - in particular the "usbnet" mode - cannot simply be changed at runtime but require the reboot of the modem to become effective.

Upon the start of Genode's modem driver, the driver cannot assume that the modem's current settings are consistent with the expectations of the driver. For example, for mobile-data connectivity, we need to ensure that the modem's "usbnet" setting is set to "1" (ECM mode).

Consequently, we need the ability to dynamically validate and - if needed - adjust persistent modem settings, and to schedule the reboot of the modem after such modifications.

gpu/lima: introduce disjunct contexts

The driver already featured different contexts but from the point of the kernel they all belonged to the same client. This following commit addresses this short-coming where now every context is handled in its own kernel thread and is treated as different client. The buffer-objects are ex- and imported via the DRM's FLINK API and mutliple clients may now run concurrently.

a64_linux: use orange-pi-5.14 as base

The vanilla Linux kernel does not contain all features required for proper support of A64 systems, e.g., PinePhone. The defacto “vendor kernel” is the managed by Ondřej Jirman.
I propose to switch to that kernel to prevent adding patches to our vanilla based a64_linux kernel and to use a kernel that is normally by the Linux based OS' for the PinePhone.

bootstrap: RAM detection faulty on Pine64 LTS board

U-Boot identifies the total amount of memory to be 2 GiB while our probing mechanism results in 3 GiB. I briefly looked into the U-Boot sources and we might have to check the DRAM's CTL registers to properly detect dual rank usage.

uboot.env: reset system on failed loading step

When creating the SD-card image we also generate a uboot.env file that amongst others stores the bootcmd variable. There we instruct U-Boot to first load our uImage and then to boot it via bootm. It sometimes happens that the file cannot be read (normally marked with an 'fs_devread' error message) or that the file was read incorrectly (Bad Data CRC) despite the file being correctly stored on the SD-card. To remedy the effect we now reset the system after each failed step in the hope that those errors are only temporary in nature.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.