Porting driver for EPSON RX8010 on i.MX8M based Windows On Arm.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Porting driver for EPSON RX8010 on i.MX8M based Windows On Arm.

Jump to solution
292 Views
norihiromichiga
Senior Contributor I

Hello, 

I asked questions about extnernal RTC support on WoA in the following post.

https://community.nxp.com/t5/i-MX-Processors/RTC-support-on-Windows-On-Arm/td-p/1823050/jump-to/firs...

 

We are trying to port the driver for this RTC based on the following libarary in BSP.

   mu_platform_nxp\Silicon\ARM\NXP\iMXPlatformPkg\Library\iMXRealTimeClockLib

 

It's first time to code ASL for us, so please advise me following questions.

(1) There is iMX8Pkg and iMXPlatformPkg in mu_platform_nxp\Silicon\ARM\NXP directory. 

Why these packages are seperated?

(2) There is driver and library directory also. 

Why these directories are seperated?

(3)  As for register access from i.MX8M via I2C, 

Using iMXI2cWrite and iMXI2cRead is right way to have access to registers in this RTC?

(4) We want to make sure if procedure in our ASL is correct or not. 

Is it possible to review our ASL if we upload it to this thread?

 

Note, we are not asking NXP to debug our code.

We just wants to make sure if our procedure to read/writie from/to registers via I2C in ASL is correct.

 

Regards,

Norihiro Michigami

 

 

 

 

 

 

0 Kudos
1 Solution
215 Views
hector_delgado
NXP TechSupport
NXP TechSupport

Hi @norihiromichiga ,

(1) There is iMX8Pkg and iMXPlatformPkg in mu_platform_nxp\Silicon\ARM\NXP directory.

Why these packages are seperated?

The first package contains code specific for i.MX8 family, the second one contains code useful for most i.MX processors. At least that is my understanding.

(2) There is driver and library directory also.

Why these directories are seperated?

Library usually contains code for general use, which can be used by multiple drivers. Driver contains code for the specific drivers.

(3) As for register access from i.MX8M via I2C,

Using iMXI2cWrite and iMXI2cRead is right way to have access to registers in this RTC?

I do not have extensive knowledge regarding the use of I2C with external RTC. Yes, the mentioned functions are generally useful for I2C communication, however, you need to keep in mind that specific RTC chips use special messages to give specific commands to the RTC. Best way is to consult the manual for the RTC and carefully setup the I2C message content according to the RTC commands. I.e. you might want to modify the existing functions. And of course, going back to my original point - replicate these into the ACPI Time and Alarm Device functions as well.

(4) We want to make sure if procedure in our ASL is correct or not.

Is it possible to review our ASL if we upload it to this thread?

You can verify the procedure in C/UEFI and then replicate the functionality in ASL/ACPI. The algorithm should be the same, just written in different programming language. The I2C communication protocol for RX8010 can be found in the RX8010 Application Manual (found on web, in my case section 15.6). In case you use the iMXI2cWrite/Read functions and modify them (i.e. the data inside as RTC messages) to your purpose, please make sure they follow that manual. The iMXI2cLib.c contains more granular sub-functions (like e.g. iMXI2cGenerateStop) so you can build the algorithm "stone by stone". Putting the code from C to ASL to replicate the functionality from UEFI to ACPI should be very tedious but straightforward once the UEFI part works.

Let me know if this was of any help!

Best regards,
Hector.

View solution in original post

0 Kudos
3 Replies
216 Views
hector_delgado
NXP TechSupport
NXP TechSupport

Hi @norihiromichiga ,

(1) There is iMX8Pkg and iMXPlatformPkg in mu_platform_nxp\Silicon\ARM\NXP directory.

Why these packages are seperated?

The first package contains code specific for i.MX8 family, the second one contains code useful for most i.MX processors. At least that is my understanding.

(2) There is driver and library directory also.

Why these directories are seperated?

Library usually contains code for general use, which can be used by multiple drivers. Driver contains code for the specific drivers.

(3) As for register access from i.MX8M via I2C,

Using iMXI2cWrite and iMXI2cRead is right way to have access to registers in this RTC?

I do not have extensive knowledge regarding the use of I2C with external RTC. Yes, the mentioned functions are generally useful for I2C communication, however, you need to keep in mind that specific RTC chips use special messages to give specific commands to the RTC. Best way is to consult the manual for the RTC and carefully setup the I2C message content according to the RTC commands. I.e. you might want to modify the existing functions. And of course, going back to my original point - replicate these into the ACPI Time and Alarm Device functions as well.

(4) We want to make sure if procedure in our ASL is correct or not.

Is it possible to review our ASL if we upload it to this thread?

You can verify the procedure in C/UEFI and then replicate the functionality in ASL/ACPI. The algorithm should be the same, just written in different programming language. The I2C communication protocol for RX8010 can be found in the RX8010 Application Manual (found on web, in my case section 15.6). In case you use the iMXI2cWrite/Read functions and modify them (i.e. the data inside as RTC messages) to your purpose, please make sure they follow that manual. The iMXI2cLib.c contains more granular sub-functions (like e.g. iMXI2cGenerateStop) so you can build the algorithm "stone by stone". Putting the code from C to ASL to replicate the functionality from UEFI to ACPI should be very tedious but straightforward once the UEFI part works.

Let me know if this was of any help!

Best regards,
Hector.

0 Kudos
201 Views
norihiromichiga
Senior Contributor I

Hello Hector, 

 

Thank you for your answer.  

We will study porting driver for RTC based on your suggestion.

 

Regards,

Norihiro Michigami

AVNET

0 Kudos
245 Views
hector_delgado
NXP TechSupport
NXP TechSupport

Hi @norihiromichiga ,

I hope you're doing well! 

Let me forward these questions to our Windows 10 IoT team. Thank you.

Best regards,
Hector.

0 Kudos