Files
BBeOS/research/driver-compatibility.md
Eliott 71941f0584
Some checks failed
CI / markdown-lint (push) Failing after 15s
Phase 1: Initial kernel development setup
- Added comprehensive hardware research documentation
- Created bootloader analysis and driver compatibility research
- Set up development environment with cross-compilation tools
- Created Q20-specific device tree (simplified version)
- Added kernel build scripts and configuration
- Set up CI/CD pipeline with Gitea Actions
- Added .gitignore for build artifacts
2025-07-31 17:43:09 +02:00

7.2 KiB

BlackBerry Classic Q20 Driver Compatibility Research

MSM8960 Platform Support

Mainline Linux Kernel

  • Status: Basic support available
  • Version: Linux 6.x
  • Coverage: Core SoC, basic peripherals
  • Missing: Proprietary components

Qualcomm CAF (Code Aurora Forum)

  • Status: Full platform support
  • Version: Based on Android kernel
  • Coverage: Complete MSM8960 support
  • License: GPL v2

postmarketOS

  • Status: Community-maintained
  • Devices: Multiple MSM8960 devices
  • Coverage: Good hardware support
  • Community: Active development

Hardware Component Drivers

Display System

MDP5 (Mobile Display Processor)

  • Mainline: drivers/gpu/drm/msm/
  • Status: Supported
  • Features:
    • DRM driver
    • MIPI DSI support
    • Hardware composition
  • Compatibility: Good

MIPI DSI

  • Mainline: drivers/gpu/drm/bridge/
  • Status: Supported
  • Features:
    • Display interface
    • Panel support
    • Backlight control
  • Compatibility: Good

Framebuffer

  • Mainline: drivers/video/fbdev/msm/
  • Status: Supported
  • Features:
    • Basic framebuffer
    • Console support
  • Compatibility: Good

Input Devices

I2C Keyboard Controller

  • Mainline: drivers/input/keyboard/
  • Status: Generic support available
  • Custom Driver: Required for Q20 keyboard
  • Features:
    • Matrix scanning
    • Backlight control
    • Interrupt handling
  • Development: Need to create custom driver

Trackpad

  • Mainline: drivers/input/mouse/
  • Status: Generic support available
  • Custom Driver: Required for Q20 trackpad
  • Features:
    • Movement detection
    • Button support
    • Gesture recognition
  • Development: Need to create custom driver

Audio System

WCD9310 Audio Codec

  • Mainline: sound/soc/codecs/
  • Status: Supported
  • Features:
    • I2S interface
    • Volume control
    • Audio routing
  • Compatibility: Good

MSM8960 Audio

  • Mainline: sound/soc/msm/
  • Status: Supported
  • Features:
    • SLIMbus interface
    • Multiple audio paths
    • Power management
  • Compatibility: Good

Connectivity

MDM9615 Modem

  • Mainline: Limited support
  • Status: Partial
  • Features:
    • QMI interface
    • USB communication
    • Power management
  • Compatibility: Limited, needs work

Wi-Fi (Atheros/Qualcomm)

  • Mainline: drivers/net/wireless/ath/
  • Status: Supported
  • Features:
    • 802.11n support
    • Power management
    • Firmware loading
  • Compatibility: Good

Bluetooth (WCN3660)

  • Mainline: drivers/bluetooth/
  • Status: Supported
  • Features:
    • Bluetooth 4.0
    • HCI interface
    • Power management
  • Compatibility: Good

Storage

eMMC

  • Mainline: drivers/mmc/host/
  • Status: Supported
  • Features:
    • eMMC 4.5 support
    • High-speed modes
    • Power management
  • Compatibility: Excellent

SD Card

  • Mainline: drivers/mmc/host/
  • Status: Supported
  • Features:
    • SD card support
    • Hot-plug detection
    • Power management
  • Compatibility: Excellent

Power Management

PM8941 Power Management IC

  • Mainline: drivers/power/supply/
  • Status: Supported
  • Features:
    • Battery management
    • Charging control
    • Voltage regulation
  • Compatibility: Good

Battery

  • Mainline: drivers/power/supply/
  • Status: Generic support
  • Custom Driver: May be needed
  • Features:
    • Capacity monitoring
    • Temperature monitoring
    • Charge status
  • Compatibility: Good

Sensors

Accelerometer/Gyroscope

  • Mainline: drivers/iio/
  • Status: Generic support
  • Custom Driver: May be needed
  • Features:
    • 3-axis acceleration
    • 3-axis rotation
    • Interrupt support
  • Compatibility: Good

Magnetometer

  • Mainline: drivers/iio/
  • Status: Generic support
  • Custom Driver: May be needed
  • Features:
    • 3-axis magnetic field
    • Compass functionality
    • Calibration support
  • Compatibility: Good

Proximity/Light Sensors

  • Mainline: drivers/iio/
  • Status: Generic support
  • Custom Driver: May be needed
  • Features:
    • Proximity detection
    • Ambient light sensing
    • Interrupt support
  • Compatibility: Good

Driver Development Priority

High Priority (Essential for Boot)

  1. Serial Console - Debug output
  2. Basic GPIO - Hardware control
  3. eMMC - Storage access
  4. Basic Display - Visual output

Medium Priority (Core Functionality)

  1. Keyboard - Input device
  2. Trackpad - Input device
  3. Audio - Sound system
  4. Battery - Power management
  5. Wi-Fi - Network connectivity

Low Priority (Advanced Features)

  1. Modem - Cellular connectivity
  2. Bluetooth - Wireless connectivity
  3. Sensors - Motion detection
  4. Camera - Imaging system

Development Strategy

Phase 1: Basic Boot

  • Use existing MSM8960 drivers
  • Focus on essential hardware
  • Minimal custom drivers

Phase 2: Core Hardware

  • Develop Q20-specific drivers
  • Keyboard and trackpad support
  • Audio system integration

Phase 3: Advanced Features

  • Modem integration
  • Sensor support
  • Camera system

Open Source Alternatives

Display

  • Mesa: OpenGL implementation
  • DRM: Direct rendering manager
  • Wayland: Display server

Audio

  • PulseAudio: Audio server
  • ALSA: Audio framework
  • PipeWire: Modern audio system

Input

  • libinput: Input device handling
  • evdev: Event device interface
  • udev: Device management

Network

  • NetworkManager: Network management
  • wpa_supplicant: Wi-Fi client
  • bluez: Bluetooth stack

Community Resources

Existing Projects

  • postmarketOS: MSM8960 device support
  • LineageOS: Android-based development
  • Ubuntu Touch: Mobile Linux distribution

Development Tools

  • QEMU: ARM emulation
  • Buildroot: Embedded Linux build system
  • Yocto: Linux distribution builder

Documentation

  • Qualcomm CAF: Platform documentation
  • Linux kernel: Driver development guides
  • ARM documentation: Architecture reference

Challenges and Solutions

Proprietary Components

  • Challenge: Some hardware requires proprietary drivers
  • Solution: Use open alternatives or reverse engineer

Firmware Requirements

  • Challenge: Hardware needs firmware blobs
  • Solution: Extract from original firmware or find alternatives

Documentation

  • Challenge: Limited hardware documentation
  • Solution: Reverse engineering and community collaboration

Testing

  • Challenge: Need physical device for testing
  • Solution: Use emulation and community testing

Next Steps

Immediate

  1. Research existing drivers for MSM8960
  2. Identify missing components that need custom drivers
  3. Plan driver development strategy
  4. Set up development environment

Short Term

  1. Develop basic drivers for essential hardware
  2. Test driver compatibility with existing kernel
  3. Document driver requirements and interfaces
  4. Create driver development guidelines

Long Term

  1. Complete driver suite for all hardware
  2. Optimize driver performance and power usage
  3. Maintain driver compatibility with kernel updates
  4. Contribute drivers to mainline kernel