1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/conf/landfall-examples/mips-letux400-fbdrv.cfg Sun May 13 01:34:16 2018 +0200
1.3 @@ -0,0 +1,105 @@
1.4 +-- vim: ft=lua ts=2 et sw=2
1.5 +
1.6 +-- Start the framebuffer driver with supporting devices.
1.7 +-- The target platform is the Letux 400 notebook computer.
1.8 +
1.9 +local L4 = require("L4");
1.10 +
1.11 +local l = L4.default_loader;
1.12 +
1.13 +-- Define general access to peripherals.
1.14 +
1.15 +local io_buses = {
1.16 + cpm = l:new_channel();
1.17 + gpio = l:new_channel();
1.18 + lcd = l:new_channel();
1.19 + pwm = l:new_channel(); -- exposes GPIO, PWM
1.20 + };
1.21 +
1.22 +l:start({
1.23 + caps = {
1.24 + cpm = io_buses.cpm:svr(),
1.25 + gpio = io_buses.gpio:svr(),
1.26 + lcd = io_buses.lcd:svr(),
1.27 + pwm = io_buses.pwm:svr(),
1.28 +
1.29 + icu = L4.Env.icu,
1.30 + sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0),
1.31 + },
1.32 + },
1.33 + "rom/io rom/hw_devices.io rom/mips-letux400-fbdrv.io");
1.34 +
1.35 +-- Expose a PWM peripheral as a device.
1.36 +
1.37 +local pwm = l:new_channel();
1.38 +
1.39 +l:startv({
1.40 + caps = {
1.41 + vbus = io_buses.pwm,
1.42 + pwm = pwm:svr(),
1.43 + },
1.44 + },
1.45 + "rom/dev_pwm_jz4730", "0", "250", "299", "47"); -- specifying peripheral number, parameters
1.46 +
1.47 +-- Expose a PWM backlight device.
1.48 +
1.49 +local backlight = l:new_channel(); -- exposes backlight device
1.50 +
1.51 +l:startv({
1.52 + caps = {
1.53 + pwm = pwm,
1.54 + backlight = backlight:svr(),
1.55 + },
1.56 + },
1.57 + "rom/dev_backlight_pwm", "0", "300"); -- specifying limits
1.58 +
1.59 +-- Expose a display device for the Letux.
1.60 +
1.61 +local display = l:new_channel(); -- exposes display device
1.62 +
1.63 +l:start({
1.64 + caps = {
1.65 + backlight = backlight,
1.66 + display = display:svr(),
1.67 + vbus = io_buses.gpio,
1.68 + },
1.69 + },
1.70 + "rom/dev_display_letux400");
1.71 +
1.72 +-- Expose a panel definition for the Letux.
1.73 +
1.74 +local panel = l:new_channel(); -- exposes panel
1.75 +
1.76 +l:start({
1.77 + caps = {
1.78 + panel = panel:svr(),
1.79 + },
1.80 + },
1.81 + "rom/dev_panel_letux400");
1.82 +
1.83 +-- Expose the CPM peripheral.
1.84 +
1.85 +local cpm = l:new_channel();
1.86 +
1.87 +l:start({
1.88 + caps = {
1.89 + vbus = io_buses.cpm,
1.90 + cpm = cpm:svr(),
1.91 + },
1.92 + },
1.93 + "rom/dev_cpm_jz4730");
1.94 +
1.95 +-- Expose a framebuffer device.
1.96 +
1.97 +local fbdrv_fb = l:new_channel();
1.98 +
1.99 +l:start({
1.100 + caps = {
1.101 + vbus = io_buses.lcd,
1.102 + fb = fbdrv_fb:svr(),
1.103 + cpm = cpm,
1.104 + display = display, -- needed by LCD driver
1.105 + panel = panel,
1.106 + },
1.107 + },
1.108 + "rom/fb-drv");