# HG changeset patch # User Paul Boddie # Date 1610228311 -3600 # Node ID d5d13bb3a2f0545767d0dd98800c4e22d72f4ebc # Parent 84945015fb9c287520e6ba1bdb6c9ce4bf349123 Added configuration files for the Letux 400 I2C example. diff -r 84945015fb9c -r d5d13bb3a2f0 conf/landfall-examples/mips-letux400-i2c.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/landfall-examples/mips-letux400-i2c.cfg Sat Jan 09 22:38:31 2021 +0100 @@ -0,0 +1,136 @@ +-- vim: ft=lua ts=2 et sw=2 + +-- Start Mag to multiplex the framebuffer showing only a single program. +-- This example shows a framebuffer terminal showing the hello example's output. +-- The target platform is the Letux 400 notebook computer. + +local L4 = require("L4"); + +local l = L4.default_loader; + +-- Define general access to peripherals. + +local io_buses = { + cpm = l:new_channel(); + gpio = l:new_channel(); + i2c = l:new_channel(); + lcd = l:new_channel(); + pwm = l:new_channel(); -- exposes GPIO, PWM + }; + +l:start({ + caps = { + cpm = io_buses.cpm:svr(), + gpio = io_buses.gpio:svr(), + i2c = io_buses.i2c:svr(), + lcd = io_buses.lcd:svr(), + pwm = io_buses.pwm:svr(), + + icu = L4.Env.icu, + sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), + }, + }, + "rom/io rom/hw_devices.io rom/mips-letux400-common.io"); + +-- Expose a PWM peripheral as a device. + +local pwm = l:new_channel(); + +l:startv({ + caps = { + vbus = io_buses.pwm, + pwm = pwm:svr(), + }, + }, + "rom/dev_pwm_jz4730", "0", "250", "299", "47"); -- specifying peripheral number, parameters + +-- Expose a PWM backlight device. + +local backlight = l:new_channel(); -- exposes backlight device + +l:startv({ + caps = { + pwm = pwm, + backlight = backlight:svr(), + }, + }, + "rom/dev_backlight_pwm", "0", "300"); -- specifying limits + +-- Expose a display device for the Letux. + +local display = l:new_channel(); -- exposes display device + +l:start({ + caps = { + backlight = backlight, + display = display:svr(), + vbus = io_buses.gpio, + }, + }, + "rom/dev_display_letux400"); + +-- Expose the CPM peripheral. + +local cpm = l:new_channel(); + +l:start({ + caps = { + vbus = io_buses.cpm, + cpm = cpm:svr(), + }, + }, + "rom/dev_cpm_jz4730"); + +-- Expose a framebuffer device. + +local fbdrv_fb = l:new_channel(); + +l:start({ + caps = { + vbus = io_buses.lcd, + fb = fbdrv_fb:svr(), + cpm = cpm, + display = display, -- needed by LCD driver + }, + }, + "rom/fb-drv"); + +-- Multiplex the framebuffer. + +local mag_caps = { + mag = l:new_channel(), + svc = l:new_channel(), + }; + +l:start({ + caps = { + vbus = io_buses.gpio, -- needed by input driver + fb = fbdrv_fb, + mag = mag_caps.mag:svr(), + svc = mag_caps.svc:svr(), + }, + }, + "rom/mag"); + +-- Show the terminal. + +local term = l:new_channel(); + +l:start({ + caps = { + fb = mag_caps.svc:create(L4.Proto.Goos, "g=800x460+0+0", "barheight=20"), + term = term:svr(), + }, + }, + "rom/fbterminal"); + +-- Show the I2C example. + +l:start({ + caps = { + icu = L4.Env.icu, + vbus = io_buses.i2c, + }, + log_cap = term, + }, + "rom/ex_letux400_i2c"); diff -r 84945015fb9c -r d5d13bb3a2f0 conf/landfall-examples/mips-letux400-i2c.list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/landfall-examples/mips-letux400-i2c.list Sat Jan 09 22:38:31 2021 +0100 @@ -0,0 +1,47 @@ + +modaddr 0x1100000 + +entry mips-letux400-i2c-example +bootstrap bootstrap -serial +kernel fiasco -serial_esc +roottask moe rom/mips-letux400-i2c.cfg +module mips-letux400-i2c.cfg +module mips-letux400-common.io +module plat-letux400/hw_devices.io +module l4re +module io +module ned +module fb-drv +module mag +module dev_pwm_jz4730 +module dev_backlight_pwm +module dev_display_letux400 +module dev_cpm_jz4730 +module fbterminal +module ex_letux400_i2c +module libpanel_letux400.so +module mips-jz4740-panel.txt +module lib4re-c.so +module lib4re-c-util.so +module lib4re.so +module lib4re-util.so +module libc_be_l4refile.so +module libc_be_l4re.so +module libc_be_socket_noop.so +module libcpm.o.so +module libc_support_misc.so +module libdevice_util.o.so +module libdl.so +module libgpio.o.so +module libio-io.so +module libio-vbus.so +module libipc.so +module libl4sys-direct.so +module libl4sys.so +module libl4util.so +module liblcd_jz4740.o.so +module libld-l4.so +module libpthread.so +module libpwm.o.so +module libsupc++.so +module libuc_c.so