Ticket #10895 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

OFW XO-1.75 - drive PS/2 keyboard from SP

Reported by: wmb@… Owned by: saadia
Priority: blocker Milestone: 1.75-firmware
Component: kernel Version: 1.75-A3
Keywords: Cc:
Action Needed: no action Verified: no
Deployments affected: Blocked By:


Implement a PS/2 low-level hardware driver in the Secure Processor, thus eliminating the need to do it in the Embedded Controller. Will require defining a communication method to get the data to Linux and OFW on the P4J processor.

Change History

Changed 3 years ago by Quozl

  • milestone changed from Not Triaged to 1.75-firmware

Changed 3 years ago by rsmith

Will also require some sort of key mapping scheme to support both the ALPS and EnE keyboard controllers. The original idea was to push that up to Linux but OFW needs it too.

Changed 3 years ago by martin.langhoff

  • blocking 10979 added

Changed 3 years ago by martin.langhoff

  • blocking 10979 removed

After discussion last night with rsmith and wad, it seems that a minimal implementation to get confirmation that we can do this as expected is likely B1 blocker. Needs discussion.

Changed 3 years ago by wmb@…

  • priority changed from normal to blocker
  • status changed from new to assigned

Changed 3 years ago by wmb@…

  • next_action changed from design to add to build

The SP end of things is implemented by git commit 81656ad...

The OFW end is implemented by svn 2292 but has not been integrated into a build, because testing it requires a modified motherboard.

Changed 3 years ago by wmb@…

  • owner changed from wmb@… to saadia
  • status changed from assigned to new
  • next_action changed from add to build to code
  • component changed from ofw - open firmware to kernel
  • version changed from 1.75-A2 to 1.75-A3

cforth git commit 6ccc662dfc adds matrix decoding to the SP PS/2 handler.

OFW svn 2294 adds the /ap-sp driver to the build - but does not select it's subordinate keyboard node as the default keyboard.

The remaining firmware tasks, when it is time to turn on this feature (gated by hardware changes) are:

* Call enable-ps2 in the CForth startup sequence. * Use /ap-sp/keyboard instead of /ec-spi/keyboard as the default system keyboard * (Perhaps) implement support for ALPS keyboards

The current next job is the Linux driver, so I'm reassigning the ticket to the kernel team for now.

Changed 3 years ago by wmb@…

If anybody wants to test this code, here is the recipe:

* Modify the board by moving R351, R353, R355, R357 to the R352, R354, R356, R358 positions. * With a serial port connected, power on while holding the rotate key to get to cforth * At cforth, type "enable-ps2". You should see "Matrix mode on" * Still at cforth, type "ofwdi" to start OFW. Hit esc to get to ok * Type ok " /ap-sp/keyboard" open-dev add-input * That will enable the keyboard through the SP * Type ok test /ap-sp/mouse

Changed 3 years ago by wmb@…

cforth git 4b9cc1f6055ec improves the keyboard handling. It now supports both the newer EnE and the older ALPS keyboard controller. The ALPS keyboard events are passed through unmodified, since the ALPS controller correctly implements the OLPC keyboard coding scheme. The SP code runs the EnE controller in raw mode, translating to PC+OLPC codes. The translation now supports both scan sets 1 and 2, and handles function-key modifiers. I believe this is a complete implementation of the OLPC keyboard scheme.

The OLPC mechanical keyboard has not been tested with this code. If it presents as a standard keyboard ID, as with the ALPS keyboard, its events should be passed through unchanged, so I hope it will "Just Work".

Changed 3 years ago by saadia

  • status changed from new to assigned

The Linux driver has been checked in at drivers/input/serio/olpc_keyboard.c.

Changed 3 years ago by Quozl

  • next_action changed from code to test in build

I've tested here with what I have. What isn't yet tested is an OLPC mechanical keyboard.

Changed 3 years ago by Quozl

  • status changed from assigned to closed
  • next_action changed from test in build to no action
  • resolution set to fixed

Tested on B1 with mechanical keyboard.

Note: See TracTickets for help on using tickets.