Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2008 18:37:26 +0100
From:      Artur =?iso-8859-2?q?Ba=E6?= <artur@ebasoft.com.pl>
To:        freebsd-acpi@freebsd.org
Subject:   Need info about ACPI - implementing acer_acpi, amilo 1650g
Message-ID:  <200801261837.26708.artur@ebasoft.com.pl>

next in thread | raw e-mail | index | archive | help
Hello
I need little help in implementing acpi suplementary driver for my Laptop .

Abstract: I implement via acpi, a HotKey switch for enabling WiFi antena
In linux community there is acerhk and acer_acpi module wich does this for=
=20
linux. It works even on FujitsuSiemens Amilo1650G when on linux.

So, i dumped DSDT , then corrected errors and I try to find namespace and=20
method in acpi which is responsible for enablig such radio antena.

Digging in acerhk i found :

#define EC_STATUS_REG		0x66	/* Status register of EC (R) */
#define EC_CNTL_REG		    0x66	/* Controller command register of EC (W) */
#define EC_DATA_REG		    0x62	/* EC data register (R/W) */

and in acer_acpi

/*
 * Magic Number
 * Meaning is unknown - this number is required for writing to ACPI for AMW0
 * (it's also used in acerhk when directly accessing the EC)
 */
#define ACER_AMW0_WRITE	0x9610

/*
 * Bit masks for the old AMW0 interface
 */
#define ACER_AMW0_WIRELESS_MASK  0x35
#define ACER_AMW0_BLUETOOTH_MASK 0x34
#define ACER_AMW0_MAILLED_MASK   0x31

/*
 * Acer ACPI method GUIDs
 */
#define AMW0_GUID1		"67C3371D-95A3-4C37-BB61-DD47B491DAAB"
#define WMID_GUID1		"6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3"
#define WMID_GUID2		"95764E09-FB56-4e83-B31A-37761F60994A"


I tryed to much such things in my DSTD since acer_acpi worked with linux on=
 my=20
laptop and i found in namespace  \_SB.PCI0.LPC0.EC0

OperationRegion (ECO1, SystemIO, 0x62, 0x01)
OperationRegion (ECO2, SystemIO, 0x66, 0x01)

here is cut of my DSDT

Scope (\_SB)
{
        Device (AMW0)
        {
		Method (_WED, 1, NotSerialized)
		{
			Store (0xB0, DBGP)
			If (LEqual (Arg0, 0xB0))
			{
			Store (WLID, B0ED)
			Return (B0ED)
			}
		}
	}
	Device (PCI0)
	{
		Device (LPC0)
		{
			Device (EC0)
			{
				Name (_HID, EisaId ("PNP0C09"))
				Name (_GPE, 0x03)
				Method (_STA, 0, NotSerialized)
				{
					Return (0x0F)
				}
	=09
				Name (_CRS, ResourceTemplate ()
				{
					IO (Decode16,
					0x0062,             // Range Minimum
					0x0062,             // Range Maximum
					0x00,               // Alignment
					0x01,               // Length
					)
					IO (Decode16,
					0x0066,             // Range Minimum
					0x0066,             // Range Maximum
					0x00,               // Alignment
					0x01,               // Length
					)
				})
				OperationRegion (ECO1, SystemIO, 0x62, 0x01)
				Field (ECO1, ByteAcc, Lock, Preserve)
				{
					PX62,   8
				}
	=09
				OperationRegion (ECO2, SystemIO, 0x66, 0x01)
				Field (ECO2, ByteAcc, Lock, Preserve)
				{
					PX66,   8
				}
 				Method (_REG, 2, NotSerialized)
				{
					If (LEqual (Arg0, 0x03))
					{
					Store (Arg1, ECON)
					TINI ()
					}
				}

Since i'm not weak in C/C++ i'm able to write such kld module with Your hel=
p=20
and looking at other written by You in sys/acpi_module

Questions:
1) Is this namespace and registers the ones which I need to switch on/off w=
ifi=20
antena, did I found crrect ones ?

2) Could any one give me hints/help how to move forward since there are=20
registers and normaly there should be some method to call,  is the Method=20
(_REG, 2, NotSerialized) the one that schould be called by me, or maybe i=20
should use AMW0 methods ?

3)the FreeBSD module acpi_fujitsu will not work since it has different OMEI=
D,=20
=46ujitsuSiemens AMilo has got "FUJ   ", "W37     "

Any help will be apreciated.

=2D-=20

Sincerelly

Artur Ba=E6



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801261837.26708.artur>