Re: [PATCH] platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table

2021-04-12 Thread linux-kernel-dev
On Mo, 2021-04-12 at 13:54 +0300, Andy Shevchenko wrote:
> CAUTION: External Email!!
>
>
> On Mon, Apr 12, 2021 at 1:39 PM linux-kernel-dev
>  wrote:
> > On Mo, 2021-04-12 at 12:43 +0300, Andy Shevchenko wrote:
> > > On Mon, Apr 12, 2021 at 12:29 PM Steffen Dirkwinkel
> > >  wrote:
>
> ...
>
> > > I'm afraid it's a bit too much. Is there any guarantee all the boards
> > > based on x86 will be Baytrail only?
> > >
> > Sorry, I guess I should make this clearer in the message.
> > All boards with "CBxx63" are Baytrail.
>
> Exactly! And this supports my idea that this shouldn't be done like in
> this patch.
> Are you guaranteeing that *all x86-based* boards produced by your
> company will be Baytrail only?
> Above tells that the answer is rather "no". So, I think we can't apply
> this patch in its current form.

All boards with DMI_PRODUCT_FAMILY="CBxx63" are Baytrail boards. We do produce 
other x86 boards but the family
is exclusive to Baytrail.
I might be misunderstanding how the matching works. Does this match anything 
other than CBxx63?

 .matches = {
 DMI_MATCH(DMI_SYS_VENDOR, "Beckhoff Automation"),
DMI_MATCH(DMI_PRODUCT_FAMILY, "CBxx63"),
},

I can switch it to DMI_EXACT_MATCH but even substring matching works.

>
> --
> With Best Regards,
> Andy Shevchenko
>

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans 
Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075



Re: [PATCH] platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table

2021-04-12 Thread linux-kernel-dev
On Mo, 2021-04-12 at 12:43 +0300, Andy Shevchenko wrote:
>
> On Mon, Apr 12, 2021 at 12:29 PM Steffen Dirkwinkel
>  wrote:
> >
> > From: Steffen Dirkwinkel 
> >
> > pmc_plt_clk* clocks are used for ethernet controllers so need to stay
> > turned on. This adds the affected board family to critclk_systems DMI
> > table so the clocks are marked as CLK_CRITICAL and not turned off.
> >
> > This replaces the previosly listed boards with a match for the whole
>
> "...previously..."
thanks

>
> > device family. There are new affected boards that would otherwise need
> > to be listed. There are only few unaffected boards in the family and
>
> "...only a few..."
will drop the phrase

>
> > having the clocks turned on is not an issue on those.
>
> "...not an issue."
Not an issue for these industrial PCs as sleep is an unusual use case.
Having no ethernet after boot/sleep is worse.

>
> > Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
> > Signed-off-by: Steffen Dirkwinkel 
>
> I'm afraid it's a bit too much. Is there any guarantee all the boards
> based on x86 will be Baytrail only?
>
Sorry, I guess I should make this clearer in the message.
All boards with "CBxx63" are Baytrail.


> --
> With Best Regards,
> Andy Shevchenko
>

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans 
Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075



DO NOT TAKE THIS FOR GRANTED!!!

2020-10-30 Thread linux-kernel
Goodday

I think you will not be happy, because I have a very bad news for 
you. Just a few months ago I hacked your operating system and I 
have full control of your device.

I implanted a small application into your device which sends me 
your current IP address and allows me to connect to your device 
just like remote desktop.

Even if you change your password, it won’t help.

How I infected you?
The router that you used to connect to Internet had a security 
hole.
You can read about this problem by searching for CVE-2018-10562.
I hacked your router and I put my code into it, and when you 
tried to connect to Internet, my program infected your device.

Later I made a full copy of your hard drive (I have all your 
email contact lists, list of websites you visited, phone numbers, 
your passwords etc.)


A little while later, when I was searching your web browsing 
history I was shocked by what I saw!! The sites for adults you 
are visiting... you know what I mean...

I just want to say - your fantasies are shifted far away from the 
normal course!...

For months I have been spying on you through your device camera.. 
especially when you visited those sites to have fun...Those 
videos show clearly you having fun and the content for adults you 
were watching.. this is pretty nasty and I would be very worried 
if I were you.

I have secured 2 videos:
linux-kernel@vger.kernel.org_1557074047.mp4 (119.1 MB)
linux-kernel@vger.kernel.org_1555285697.mp4 (64.5 MB)

You can verify that the timestamps correspond to the moments you 
were enjoying yourself...Now, because I do not like at all what I 
saw (that’s pretty crazy and ugly) I ask you to send me a 
donation through Bitcoin network. 2000 US dollars is a fair price 
(considering your perversions).

If you want me to forget about the whole case, remove the files 
and disable the nasty app that is spying you, send me the Bitcoin 
payment within 72 hours. Yes, I give you 72 hours only.

Here is my wallet:

===
Send exactly 0.291578 BTC to my address:
1JiE6YXy2rvZJfVb1E3JnSCdEjmgKqUkm5

(copy it and paste - it’s case sensitive)
===
0.291578 BTC = 2000 dollars

If you do not send me the Bitcoin, I promise you - I will send 
those 4 files with you enjoying yourself to all your contact 
lists, associates and social network friends.

I still have access to your device and I know when you read this 
message. When you opened it, time started ticking. You have 72 
hours only!

I am from Russia and nobody will help you if you report this 
email.. Before they find me your life will be ruined! If you do 
not cooperate with me - I will release this ugly material 
immediately.

This is why I advise you - send me the Bitcoin and let’s forget 
about the whole situation. I know you can afford it.

If you do not know how to send bitcoin

Step 1: Create an account on www.localbitcoins.com
Step 2: Buy 0.291578 BITCOIN
Step 3: Send the amount on this BTC address: 
1JiE6YXy2rvZJfVb1E3JnSCdEjmgKqUkm5
Step 4: Contact me on this email address chanblog...@aol.com
with this subject: 980VIPERMARVO-RESTOREKEYPC00765
After this steps you will receive through email the key and a
decrypt tutorial.

Here is another list where you can buy bitcoin: 
https://bitcoin.org/en/exchanges


Here is my address again:

===
Send exactly:

0.291578 BTC

to my address: 1JiE6YXy2rvZJfVb1E3JnSCdEjmgKqUkm5

===

Remember to send the exact amount as above! This way I will know 
it’s from you.

Do not be angry at me. This is just my job, and you are not the 
only person I caught.

Be angry at your fantasies - if you didn’t visit those sites for 
adults you would have no problem.. but now...

I am waiting for your bitcoin.

Remember, time is ticking..


★ smdbobbin --“2018世界复合材料展览及会议”将于“3月”在“法国巴黎”举行 (地右P1-L-Me)

2020-06-03 Thread linux-kernel-owner
尊敬的 smdbobbin@126.comhttp 企业领导/公司负责人/业界专家,您好:
  
  
新材料为21世纪三大共性关键技术之一,已成为全球经济迅速增长的源动力和提升核心竞争力的战略焦点。材料作为制造业的基础,特别是新材料研究和产业发展的水平与规模,已经成为衡量一个国家科技进步和综合实力的重要标志。在新材料发展与应用中,复合材料占有相当重要的地位,特别广泛的应用在汽车、交通、风能、航空、航天、兵器、船舶、国防、机械、电子、化工、建筑、农业、渔业、纺织、运动器材等领域,一直是世界各国优先发展和竞争激烈的重要行业。
  
  “JEC世界复合材料展览及会议”(JEC world Composites Show & 
Conferences)创办于1963年,每年举办一届,至2017年总共举办了52届,主办单位是法国JEC复合材料发展促进会/JEC集团,中国总展团展商组织单位为映德国际会展集团中国代表处,在北京、上海等地设有分支机构,负责该展会在中国的推广和招商工作(JEC中国总展团报名热线:4000-680-860转8144、5220)。JEC复合材料展已成为世界上历史最悠久、规模最大的复合材料行业专业展览会,展示和反映了当前复合材料行业的最新技术和应用成果。
  
  为了增进国内外复合材料行业的交流与合作,同时展示我国复合材料产业的发展与成就,帮助境内企业开拓国内外市场,中国国际复材协会、映德国际会展集团(YOND 
EXPO)中国代表处已近十年组织中国企业参与该展会,为中国复合材料集团、中材科技、中钢集团、中国建材集团、中国商飞、北京玻钢院、上海杰事杰新材料集团、重庆国际复合材料、中南控股集团、秦皇岛耀华玻璃钢、烟台氨纶、天马集团、华东理工大学、哈尔滨工业大学、巨石集团、中冶集团、金光集团、江苏恒神纤维材料、重庆大学、上海玻璃钢研究院、中南大学、哈尔滨玻璃钢研究院等众多行业巨头和知名机构提供了优质高效的境外展贸服务。
  
  “JEC world 2018 
第五十三世界复合材料展览及会议”将于“3月06-08日”在“法国巴黎展览会议中心”再度举行,我们诚邀全国各地复合材料及新材料相关单位与业界人士加入咱们的中国总展团前往参展参观。
  
  
  有关参展参观“JEC世界复合材料展”事宜,请联络【中国总展团】组办方—— 
全国统一客服热线:4000-580-850(转5220、8144、)、010—6923-6944; 邮箱/QQ:12809395#qq.com; 
微信: CanZhanXiaoXi(参展消息)、ZhanShangZhiJia(展商之家); 
微博:http://weibo.com/jecshow(展会)、http://weibo.com/yingdehuizhan(公司)。
  
  参加JEC展会是一个复合材料及新材料企业走向国际化的标志和途径!
  
  
  
  
__
  
(百万群发系统|为您发送|如不希望再收到此行业资讯|请回复“TD+JEC”至邮箱1055800...@qq.com)


[no subject]

2019-10-14 Thread linux-kernel
Здравствуйте! Вас интересуют клиентские базы данных?



[no subject]

2019-10-13 Thread linux-kernel
Здравствуйте! Вас интересуют клиентские базы данных?



[no subject]

2019-09-25 Thread linux-kernel
Здравствуйте! Вас интересуют клиентские базы данных?



Klientskie Bazy http://prodawez.tilda.ws/page7270311.html

2019-09-11 Thread linux-kernel
Klientskie Bazy http://prodawez.tilda.ws/page7270311.html


Klientskie Bazy http://prodawez.tilda.ws/page7270311.html

2019-09-11 Thread linux-kernel
Klientskie Bazy http://prodawez.tilda.ws/page7270311.html


Zdravstvujte! Vas interesuyut klientskie bazy dannyh?

2019-07-31 Thread linux-kernel
Zdravstvujte! Vas interesuyut klientskie bazy dannyh?


Zdravstvujte! Vas interesuyut klientskie bazy dannyh?

2019-07-25 Thread linux-kernel
Zdravstvujte! Vas interesuyut klientskie bazy dannyh?


Zdravstvujte! Vas interesuyut klientskie bazy dannyh?

2019-07-25 Thread linux-kernel
Zdravstvujte! Vas interesuyut klientskie bazy dannyh?


Здравствуйте! Вас интересуют клиентские базы данных?

2019-07-11 Thread linux-kernel
Здравствуйте! Вас интересуют клиентские базы данных?


Здравствуйте! Вас интересуют клиентские базы данных?

2019-07-08 Thread linux-kernel
Здравствуйте! Вас интересуют клиентские базы данных?


Klientskie bazy. Email: proda...@armyspy.com Uznajte podrobnee!

2019-07-04 Thread linux-kernel
Klientskie bazy. Email: proda...@armyspy.com Uznajte podrobnee!


Klientskie bazy. Email: proda...@armyspy.com Uznajte podrobnee!

2019-07-04 Thread linux-kernel
Klientskie bazy. Email: proda...@armyspy.com Uznajte podrobnee!


Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!

2019-07-04 Thread linux-kernel
Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!


Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!

2019-06-30 Thread linux-kernel
Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!


Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!

2019-06-29 Thread linux-kernel
Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!


Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!

2019-06-28 Thread linux-kernel
Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!


Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!

2019-06-26 Thread linux-kernel
Клиентские базы! Email: proda...@armyspy.com Узнайте подробнее!


[PATCH] platform/x86: pmc_atom: Add CB4063 Beckhoff Automation board to critclk_systems DMI table

2019-06-18 Thread linux-kernel-dev
From: Steffen Dirkwinkel 

The CB4063 board uses pmc_plt_clk* clocks for ethernet controllers. This
adds it to the critclk_systems DMI table so the clocks are marked as
CLK_CRITICAL and not turned off.

Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Signed-off-by: Steffen Dirkwinkel 
---
 drivers/platform/x86/pmc_atom.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
index be802fd2182d..551ed44dd361 100644
--- a/drivers/platform/x86/pmc_atom.c
+++ b/drivers/platform/x86/pmc_atom.c
@@ -412,6 +412,14 @@ static const struct dmi_system_id critclk_systems[] = {
DMI_MATCH(DMI_BOARD_NAME, "CB3163"),
},
},
+   {
+   /* pmc_plt_clk* - are used for ethernet controllers */
+   .ident = "Beckhoff CB4063",
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, "Beckhoff Automation"),
+   DMI_MATCH(DMI_BOARD_NAME, "CB4063"),
+   },
+   },
{
/* pmc_plt_clk* - are used for ethernet controllers */
.ident = "Beckhoff CB6263",
-- 
2.22.0


Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-06-12 Thread linux-kernel
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?


Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-06-10 Thread linux-kernel
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?


Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-06-09 Thread linux-kernel
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?





Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-06-07 Thread linux-kernel
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?





Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-05-15 Thread linux-kernel
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?





[PATCH 0/1] Add several Beckhoff Automation boards to critclk_systems DMI table

2019-05-02 Thread linux-kernel-dev
From: Steffen Dirkwinkel 

There are several Beckhoff Automation industrial PC boards which use
pmc_plt_clk* clocks for ethernet controllers. The patch adds affected boards
to critclk_systems DMI table so the clocks are marked as CLK_CRITICAL and
not turned off.
This should be applied on top of another patch as both change
the same table:
[PATCH] platform/x86: pmc_atom: Add Lex 3I380D industrial PC to critclk_systems 
DMI table

Steffen Dirkwinkel (1):
  platform/x86: pmc_atom: Add several Beckhoff Automation boards to
critclk_systems DMI table

 drivers/platform/x86/pmc_atom.c | 24 
 1 file changed, 24 insertions(+)

-- 
2.21.0


[PATCH 1/1] platform/x86: pmc_atom: Add several Beckhoff Automation boards to critclk_systems DMI table

2019-05-02 Thread linux-kernel-dev
From: Steffen Dirkwinkel 

There are several Beckhoff Automation industrial PC boards which use
pmc_plt_clk* clocks for ethernet controllers. This adds affected boards
to critclk_systems DMI table so the clocks are marked as CLK_CRITICAL and
not turned off.

Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Signed-off-by: Steffen Dirkwinkel 
---
 drivers/platform/x86/pmc_atom.c | 24 
 1 file changed, 24 insertions(+)

diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
index a311f48ce7c9..b1d804376237 100644
--- a/drivers/platform/x86/pmc_atom.c
+++ b/drivers/platform/x86/pmc_atom.c
@@ -413,6 +413,30 @@ static const struct dmi_system_id critclk_systems[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "3I380D"),
},
},
+   {
+   /* pmc_plt_clk* - are used for ethernet controllers */
+   .ident = "Beckhoff CB3163",
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, "Beckhoff Automation"),
+   DMI_MATCH(DMI_BOARD_NAME, "CB3163"),
+   },
+   },
+   {
+   /* pmc_plt_clk* - are used for ethernet controllers */
+   .ident = "Beckhoff CB6263",
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, "Beckhoff Automation"),
+   DMI_MATCH(DMI_BOARD_NAME, "CB6263"),
+   },
+   },
+   {
+   /* pmc_plt_clk* - are used for ethernet controllers */
+   .ident = "Beckhoff CB6363",
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, "Beckhoff Automation"),
+   DMI_MATCH(DMI_BOARD_NAME, "CB6363"),
+   },
+   },
{ /*sentinel*/ }
 };
 
-- 
2.21.0


Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-04-29 Thread linux-kernel
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?





Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-04-25 Thread linux-kernel
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?





Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-04-25 Thread linux-kernel
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?





Zdravstvujte Vas interesuyut klientskie bazy dannyh?

2019-03-26 Thread linux-kernel
Zdravstvujte Vas interesuyut klientskie bazy dannyh?




Zdravstvujte Vas interesuyut klientskie bazy dannyh?

2019-03-12 Thread linux-kernel
Zdravstvujte Vas interesuyut klientskie bazy dannyh?


Zdravstvujte Vas interesuet parsing kontaktov?

2019-03-01 Thread linux-kernel
Zdravstvujte Vas interesuet parsing kontaktov?


Zdravstvujte Vas interesuyut bazy dannyh dlya prodazhi Vashih tovarov i uslug?

2019-02-25 Thread linux-kernel
Zdravstvujte Vas interesuyut bazy dannyh dlya prodazhi Vashih tovarov i uslug?


VAS INTERESUYUT BAZY DANNYKH? - YOU ARE INTERESTED IN DATABASES?

2019-02-23 Thread linux-kernel
VAS INTERESUYUT BAZY DANNYKH? - YOU ARE INTERESTED IN DATABASES?


Zdravstvujte vas interesuyut klientskie bazy dannyh?

2019-02-19 Thread linux-kernel
Zdravstvujte vas interesuyut klientskie bazy dannyh?




Hacking Alert! You account was hacked (your password:qwerty)

2018-11-11 Thread linux-kernel
Dear user of vger.kernel.org!

I am a spyware software developer.
Your account has been hacked by me in the summer of 2018.

I understand that it is hard to believe, but here is my evidence:
- I sent you this email from your account.
- Password from account linux-kernel@vger.kernel.org: qwerty (on moment of 
hack).

The hacking was carried out using a hardware vulnerability through which you 
went online (Cisco router, vulnerability CVE-2018-0296).

I went around the security system in the router, installed an exploit there.
When you went online, my exploit downloaded my malicious code (rootkit) to your 
device.
This is driver software, I constantly updated it, so your antivirus is silent 
all time.

Since then I have been following you (I can connect to your device via the VNC 
protocol).
That is, I can see absolutely everything that you do, view and download your 
files and any data to yourself.
I also have access to the camera on your device, and I periodically take photos 
and videos with you.

At the moment, I have harvested a solid dirt... on you...
I saved all your email and chats from your messangers. I also saved the entire 
history of the sites you visit.

I note that it is useless to change the passwords. My malware update passwords 
from your accounts every times.

I know what you like hard funs (adult sites).
Oh, yes .. I'm know your secret life, which you are hiding from everyone.
Oh my God, what are your like... I saw THIS ... Oh, you dirty naughty person 
... :)

I took photos and videos of your most passionate funs with adult content, and 
synchronized them in real time with the image of your camera.
Believe it turned out very high quality!

So, to the business!
I'm sure you don't want to show these files and visiting history to all your 
contacts.

Transfer $868 to my Bitcoin cryptocurrency wallet: 
1Bt4psBJmjfVTcW6eYiJZ6HEbpFgKkBSX4
Just copy and paste the wallet number when transferring.
If you do not know how to do this - ask Google.

My system automatically recognizes the translation.
As soon as the specified amount is received, all your data will be destroyed 
from my server, and the rootkit will be automatically removed from your system.
Do not worry, I really will delete everything, since I am working 
with many people who have fallen into your position.
You will only have to inform your provider about the vulnerabilities in the 
router so that other hackers will not use it.

Since opening this letter you have 48 hours.
If funds not will be received, after the specified time has elapsed, the disk 
of your device will be formatted,
and from my server will automatically send email and sms to all your contacts 
with compromising material.

I advise you to remain prudent and not engage in nonsense (all files on my 
server).

Good luck!



Hacking Alert! You account was hacked (your password:qwerty)

2018-11-11 Thread linux-kernel
Dear user of vger.kernel.org!

I am a spyware software developer.
Your account has been hacked by me in the summer of 2018.

I understand that it is hard to believe, but here is my evidence:
- I sent you this email from your account.
- Password from account linux-kernel@vger.kernel.org: qwerty (on moment of 
hack).

The hacking was carried out using a hardware vulnerability through which you 
went online (Cisco router, vulnerability CVE-2018-0296).

I went around the security system in the router, installed an exploit there.
When you went online, my exploit downloaded my malicious code (rootkit) to your 
device.
This is driver software, I constantly updated it, so your antivirus is silent 
all time.

Since then I have been following you (I can connect to your device via the VNC 
protocol).
That is, I can see absolutely everything that you do, view and download your 
files and any data to yourself.
I also have access to the camera on your device, and I periodically take photos 
and videos with you.

At the moment, I have harvested a solid dirt... on you...
I saved all your email and chats from your messangers. I also saved the entire 
history of the sites you visit.

I note that it is useless to change the passwords. My malware update passwords 
from your accounts every times.

I know what you like hard funs (adult sites).
Oh, yes .. I'm know your secret life, which you are hiding from everyone.
Oh my God, what are your like... I saw THIS ... Oh, you dirty naughty person 
... :)

I took photos and videos of your most passionate funs with adult content, and 
synchronized them in real time with the image of your camera.
Believe it turned out very high quality!

So, to the business!
I'm sure you don't want to show these files and visiting history to all your 
contacts.

Transfer $868 to my Bitcoin cryptocurrency wallet: 
1Bt4psBJmjfVTcW6eYiJZ6HEbpFgKkBSX4
Just copy and paste the wallet number when transferring.
If you do not know how to do this - ask Google.

My system automatically recognizes the translation.
As soon as the specified amount is received, all your data will be destroyed 
from my server, and the rootkit will be automatically removed from your system.
Do not worry, I really will delete everything, since I am working 
with many people who have fallen into your position.
You will only have to inform your provider about the vulnerabilities in the 
router so that other hackers will not use it.

Since opening this letter you have 48 hours.
If funds not will be received, after the specified time has elapsed, the disk 
of your device will be formatted,
and from my server will automatically send email and sms to all your contacts 
with compromising material.

I advise you to remain prudent and not engage in nonsense (all files on my 
server).

Good luck!



Change your password qwerty immediately. Your account has been hacked.

2018-10-31 Thread linux-kernel
I greet you!

I have bad news for you.
06/28/2018 - on this day I hacked your operating system and got full access to 
your account linux-kernel@vger.kernel.org
On that day your account (linux-kernel@vger.kernel.org) password was: qwerty

It is useless to change the password, my malware intercepts it every time.

How it was:
In the software of the router to which you were connected that day, there was a 
vulnerability.
I first hacked this router and placed my malicious code on it.
When you entered in the Internet, my trojan was installed on the operating 
system of your device.

After that, I made a full dump of your disk (I have all your address book, 
history of viewing sites, all files, phone numbers and addresses of all your 
contacts).

A month ago, I wanted to lock your device and ask for a small amount of money 
to unlock.
But I looked at the sites that you regularly visit, and came to the big delight 
of your favorite resources.
I'm talking about sites for adults.

I want to say - you are a big pervert. You have unbridled fantasy!

After that, an idea came to my mind.
I made a screenshot of the intimate website where you have fun (you know what 
it is about, right?).
After that, I took off your joys (using the camera of your device). It turned 
out beautifully, do not hesitate.

I am strongly belive that you would not like to show these pictures to your 
relatives, friends or colleagues.
I think $913 is a very small amount for my silence.
Besides, I spent a lot of time on you!

I accept money only in Bitcoins.
My BTC wallet: 15ZHnf1MPn6ybb8yUeAoCQ1AJtiKhg3NrP

You do not know how to replenish a Bitcoin wallet?
In any search engine write "how to send money to btc wallet".
It's easier than send money to a credit card!

For payment you have a little more than two days (exactly 50 hours).
Do not worry, the timer will start at the moment when you open this letter. 
Yes, yes .. it has already started!

After payment, my virus and dirty photos with you self-destruct automatically.
Narrative, if I do not receive the specified amount from you, then your device 
will be blocked, and all your contacts will receive a photos with your "joys".

I want you to be prudent.
- Do not try to find and destroy my virus! (All your data is already uploaded 
to a remote server)
- Do not try to contact me (this is not feasible, I sent you an email from your 
account)
- Various security services will not help you; formatting a disk or destroying 
a device will not help either, since your data is already on a remote server.

P.S. I guarantee you that I will not disturb you again after payment, as you 
are not my single victim.
 This is a hacker code of honor.

>From now on, I advise you to use good antiviruses and update them regularly 
>(several times a day)!

Don't be mad at me, everyone has their own work.
Farewell.



Change your password qwerty immediately. Your account has been hacked.

2018-10-31 Thread linux-kernel
I greet you!

I have bad news for you.
06/28/2018 - on this day I hacked your operating system and got full access to 
your account linux-kernel@vger.kernel.org
On that day your account (linux-kernel@vger.kernel.org) password was: qwerty

It is useless to change the password, my malware intercepts it every time.

How it was:
In the software of the router to which you were connected that day, there was a 
vulnerability.
I first hacked this router and placed my malicious code on it.
When you entered in the Internet, my trojan was installed on the operating 
system of your device.

After that, I made a full dump of your disk (I have all your address book, 
history of viewing sites, all files, phone numbers and addresses of all your 
contacts).

A month ago, I wanted to lock your device and ask for a small amount of money 
to unlock.
But I looked at the sites that you regularly visit, and came to the big delight 
of your favorite resources.
I'm talking about sites for adults.

I want to say - you are a big pervert. You have unbridled fantasy!

After that, an idea came to my mind.
I made a screenshot of the intimate website where you have fun (you know what 
it is about, right?).
After that, I took off your joys (using the camera of your device). It turned 
out beautifully, do not hesitate.

I am strongly belive that you would not like to show these pictures to your 
relatives, friends or colleagues.
I think $913 is a very small amount for my silence.
Besides, I spent a lot of time on you!

I accept money only in Bitcoins.
My BTC wallet: 15ZHnf1MPn6ybb8yUeAoCQ1AJtiKhg3NrP

You do not know how to replenish a Bitcoin wallet?
In any search engine write "how to send money to btc wallet".
It's easier than send money to a credit card!

For payment you have a little more than two days (exactly 50 hours).
Do not worry, the timer will start at the moment when you open this letter. 
Yes, yes .. it has already started!

After payment, my virus and dirty photos with you self-destruct automatically.
Narrative, if I do not receive the specified amount from you, then your device 
will be blocked, and all your contacts will receive a photos with your "joys".

I want you to be prudent.
- Do not try to find and destroy my virus! (All your data is already uploaded 
to a remote server)
- Do not try to contact me (this is not feasible, I sent you an email from your 
account)
- Various security services will not help you; formatting a disk or destroying 
a device will not help either, since your data is already on a remote server.

P.S. I guarantee you that I will not disturb you again after payment, as you 
are not my single victim.
 This is a hacker code of honor.

>From now on, I advise you to use good antiviruses and update them regularly 
>(several times a day)!

Don't be mad at me, everyone has their own work.
Farewell.



linux-kernel@vger.kernel.org has password qwerty. Password must be changed

2018-10-27 Thread linux-kernel
Hello!

I'm a programmer who cracked your email account and device about half year ago.
You entered a password on one of the insecure site you visited, and I catched 
it.
Your password from linux-kernel@vger.kernel.org on moment of crack: qwerty

Of course you can will change your password, or already made it.
But it doesn't matter, my rat software update it every time.

Please don't try to contact me or find me, it is impossible, since I sent you 
an email from your email account.

Through your e-mail, I uploaded malicious code to your Operation System.
I saved all of your contacts with friends, colleagues, relatives and a complete 
history of visits to the Internet resources.
Also I installed a rat software on your device and long tome spying for you.

You are not my only victim, I usually lock devices and ask for a ransom.
But I was struck by the sites of intimate content that you very often visit.

I am in shock of your reach fantasies! Wow! I've never seen anything like this!
I did not even know that SUCH content could be so exciting!

So, when you had fun on intime sites (you know what I mean!)
I made screenshot with using my program from your camera of yours device.
After that, I jointed them to the content of the currently viewed site.

Will be funny when I send these photos to your contacts! And if your relatives 
see it?
BUT I'm sure you don't want it. I definitely would not want to ...

I will not do this if you pay me a little amount.
I think $814 is a nice price for it!

I accept only Bitcoins.
My BTC wallet: 1HQ7wGdA5G9qUtM8jyDt5obDv1x3vEvjCy

If you have difficulty with this - Ask Google "how to make a payment on a 
bitcoin wallet". It's easy.
After receiving the above amount, all your data will be immediately removed 
automatically.
My virus will also will be destroy itself from your operating system.

My Trojan have auto alert, after this email is looked, I will be know it!

You have 2 days (48 hours) for make a payment.
If this does not happen - all your contacts will get crazy shots with your 
dirty life!
And so that you do not obstruct me, your device will be locked (also after 48 
hours)

Do not take this frivolously! This is the last warning!
Various security services or antiviruses won't help you for sure (I have 
already collected all your data).

Here are the recommendations of a professional:
Antiviruses do not help against modern malicious code. Just do not enter your 
passwords on unsafe sites!

I hope you will be prudent.
Bye.



linux-kernel@vger.kernel.org has password qwerty. Password must be changed

2018-10-27 Thread linux-kernel
Hello!

I'm a programmer who cracked your email account and device about half year ago.
You entered a password on one of the insecure site you visited, and I catched 
it.
Your password from linux-kernel@vger.kernel.org on moment of crack: qwerty

Of course you can will change your password, or already made it.
But it doesn't matter, my rat software update it every time.

Please don't try to contact me or find me, it is impossible, since I sent you 
an email from your email account.

Through your e-mail, I uploaded malicious code to your Operation System.
I saved all of your contacts with friends, colleagues, relatives and a complete 
history of visits to the Internet resources.
Also I installed a rat software on your device and long tome spying for you.

You are not my only victim, I usually lock devices and ask for a ransom.
But I was struck by the sites of intimate content that you very often visit.

I am in shock of your reach fantasies! Wow! I've never seen anything like this!
I did not even know that SUCH content could be so exciting!

So, when you had fun on intime sites (you know what I mean!)
I made screenshot with using my program from your camera of yours device.
After that, I jointed them to the content of the currently viewed site.

Will be funny when I send these photos to your contacts! And if your relatives 
see it?
BUT I'm sure you don't want it. I definitely would not want to ...

I will not do this if you pay me a little amount.
I think $814 is a nice price for it!

I accept only Bitcoins.
My BTC wallet: 1HQ7wGdA5G9qUtM8jyDt5obDv1x3vEvjCy

If you have difficulty with this - Ask Google "how to make a payment on a 
bitcoin wallet". It's easy.
After receiving the above amount, all your data will be immediately removed 
automatically.
My virus will also will be destroy itself from your operating system.

My Trojan have auto alert, after this email is looked, I will be know it!

You have 2 days (48 hours) for make a payment.
If this does not happen - all your contacts will get crazy shots with your 
dirty life!
And so that you do not obstruct me, your device will be locked (also after 48 
hours)

Do not take this frivolously! This is the last warning!
Various security services or antiviruses won't help you for sure (I have 
already collected all your data).

Here are the recommendations of a professional:
Antiviruses do not help against modern malicious code. Just do not enter your 
passwords on unsafe sites!

I hope you will be prudent.
Bye.



Your Account Was Hacked!

2018-10-07 Thread linux-kernel
Hi, dear user of vger.kernel.org
We have installed one RAT software into you device.
For this moment your email account is hacked (see on "from address", I messaged 
you from your account).
Your password for linux-kernel@vger.kernel.org: qwerty

I have downloaded all confidential information from your system and I got some 
more evidence.
The most interesting moment that I have discovered are videos records where you 
masturbating.

I posted my virus on porn site, and then you installed it on your operation 
system.
When you clicked the button Play on porn video, at that moment my trojan was 
downloaded to your device.
After installation, your front camera shoots video every time you masturbate, 
in addition, the software is synchronized with the video you choose.

For the moment, the software has collected all your contact information from 
social networks and email addresses.
If you need to erase all of your collected data, send me $800 in BTC (crypto 
currency).
This is my Bitcoin wallet: 13cyEdT7kyH2f4j9xchvDGhv1o64MYNLUS
You have 48 hours after reading this letter.

After your transaction I will erase all your data.
Otherwise, I will send video with your pranks to all your colleagues and 
friends!!!

And henceforth be more careful!
Please visit only secure sites!
Bye!



Your Account Was Hacked!

2018-10-07 Thread linux-kernel
Hi, dear user of vger.kernel.org
We have installed one RAT software into you device.
For this moment your email account is hacked (see on "from address", I messaged 
you from your account).
Your password for linux-kernel@vger.kernel.org: qwerty

I have downloaded all confidential information from your system and I got some 
more evidence.
The most interesting moment that I have discovered are videos records where you 
masturbating.

I posted my virus on porn site, and then you installed it on your operation 
system.
When you clicked the button Play on porn video, at that moment my trojan was 
downloaded to your device.
After installation, your front camera shoots video every time you masturbate, 
in addition, the software is synchronized with the video you choose.

For the moment, the software has collected all your contact information from 
social networks and email addresses.
If you need to erase all of your collected data, send me $800 in BTC (crypto 
currency).
This is my Bitcoin wallet: 13cyEdT7kyH2f4j9xchvDGhv1o64MYNLUS
You have 48 hours after reading this letter.

After your transaction I will erase all your data.
Otherwise, I will send video with your pranks to all your colleagues and 
friends!!!

And henceforth be more careful!
Please visit only secure sites!
Bye!



Delete Message After Reading!

2018-10-05 Thread linux-kernel
Hello!
I'm a member of an international hacker group.

As you could probably have guessed, your account linux-kernel@vger.kernel.org 
was hacked, because I sent message you from it.

Now I have access to you accounts!
For example, your password for linux-kernel@vger.kernel.org is qwerty 

Within a period from July 17, 2018 to October 3, 2018, you were infected by the 
virus we've created, through an adult website you've visited.
So far, we have access to your messages, social media accounts, and messengers.
Moreover, we've gotten full damps of these data.

We are aware of your little and big secrets...yeah, you do have them. We saw 
and recorded your doings on porn websites. Your tastes are so weird, you know..

But the key thing is that sometimes we recorded you with your webcam, syncing 
the recordings with what you watched!
I think you are not interested show this video to your friends, relatives, and 
your intimate one...

Transfer $800 to our Bitcoin wallet: 14bXUoPwruptLamUfKTuMW39Qy1q4ohX9w
If you don't know about Bitcoin please input in Google "buy BTC". It's really 
easy.

I guarantee that after that, we'll erase all your "data" :)

A timer will start once you read this message. You have 48 hours to pay the 
above-mentioned amount.

Your data will be erased once the money are transferred.
If they are not, all your messages and videos recorded will be automatically 
sent to all your contacts found on your devices at the moment of infection.

You should always think about your security.
We hope this case will teach you to keep secrets.
Take care of yourself.



Delete Message After Reading!

2018-10-05 Thread linux-kernel
Hello!
I'm a member of an international hacker group.

As you could probably have guessed, your account linux-kernel@vger.kernel.org 
was hacked, because I sent message you from it.

Now I have access to you accounts!
For example, your password for linux-kernel@vger.kernel.org is qwerty 

Within a period from July 17, 2018 to October 3, 2018, you were infected by the 
virus we've created, through an adult website you've visited.
So far, we have access to your messages, social media accounts, and messengers.
Moreover, we've gotten full damps of these data.

We are aware of your little and big secrets...yeah, you do have them. We saw 
and recorded your doings on porn websites. Your tastes are so weird, you know..

But the key thing is that sometimes we recorded you with your webcam, syncing 
the recordings with what you watched!
I think you are not interested show this video to your friends, relatives, and 
your intimate one...

Transfer $800 to our Bitcoin wallet: 14bXUoPwruptLamUfKTuMW39Qy1q4ohX9w
If you don't know about Bitcoin please input in Google "buy BTC". It's really 
easy.

I guarantee that after that, we'll erase all your "data" :)

A timer will start once you read this message. You have 48 hours to pay the 
above-mentioned amount.

Your data will be erased once the money are transferred.
If they are not, all your messages and videos recorded will be automatically 
sent to all your contacts found on your devices at the moment of infection.

You should always think about your security.
We hope this case will teach you to keep secrets.
Take care of yourself.



Your Secret Life

2018-09-25 Thread linux-kernel
Hello!
I'm a member of an international hacker group.

As you could probably have guessed, your account linux-kernel@vger.kernel.org 
was hacked, I sent message you from it.

Now I have access to you accounts! You still do not believe it? 
So, this is your password: qwerty , right? 

Within a period from July 5, 2018 to September 21, 2018, you were infected by 
the virus we've created, through an adult website you've visited.
So far, we have access to your messages, social media accounts, and messengers.
Moreover, we've gotten full damps of these data.

We are aware of your little and big secrets...yeah, you do have them. We saw 
and recorded your doings on porn websites. Your tastes are so weird, you know..

But the key thing is that sometimes we recorded you with your webcam, syncing 
the recordings with what you watched!
I think you are not interested show this video to your friends, relatives, and 
your intimate one...

Transfer $700 to our Bitcoin wallet: 1DzM9y4fRgWqpZZCsvf5Rx4HupbE5Q5r4y
I guarantee that after that, we'll erase all your "data" :D

A timer will start once you read this message. You have 48 hours to pay the 
above-mentioned amount.

Your data will be erased once the money are transferred.
If they are not, all your messages and videos recorded will be automatically 
sent to all your contacts found on your devices at the moment of infection.

You should always think about your security. We hope this case will teach you 
to keep secrets.
Take care of yourself.



Your Secret Life

2018-09-25 Thread linux-kernel
Hello!
I'm a member of an international hacker group.

As you could probably have guessed, your account linux-kernel@vger.kernel.org 
was hacked, I sent message you from it.

Now I have access to you accounts! You still do not believe it? 
So, this is your password: qwerty , right? 

Within a period from July 5, 2018 to September 21, 2018, you were infected by 
the virus we've created, through an adult website you've visited.
So far, we have access to your messages, social media accounts, and messengers.
Moreover, we've gotten full damps of these data.

We are aware of your little and big secrets...yeah, you do have them. We saw 
and recorded your doings on porn websites. Your tastes are so weird, you know..

But the key thing is that sometimes we recorded you with your webcam, syncing 
the recordings with what you watched!
I think you are not interested show this video to your friends, relatives, and 
your intimate one...

Transfer $700 to our Bitcoin wallet: 1DzM9y4fRgWqpZZCsvf5Rx4HupbE5Q5r4y
I guarantee that after that, we'll erase all your "data" :D

A timer will start once you read this message. You have 48 hours to pay the 
above-mentioned amount.

Your data will be erased once the money are transferred.
If they are not, all your messages and videos recorded will be automatically 
sent to all your contacts found on your devices at the moment of infection.

You should always think about your security. We hope this case will teach you 
to keep secrets.
Take care of yourself.



[PATCH v4 1/4] dt-bindings: rtc: add bindings for i.MX53 SRTC

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Document the binding for i.MX53 SRTC implemented by rtc-mxc_v2

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

v4:
- replace "srtc" node name with generic "rtc"

v2:
- added "Secure" and (SRTC) to the description

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>

Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt

diff --git a/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt 
b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
new file mode 100644
index ..79d7e87b0d91
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
@@ -0,0 +1,17 @@
+* i.MX53 Secure Real Time Clock (SRTC)
+
+Required properties:
+- compatible: should be: "fsl,imx53-rtc"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- clocks: should contain the phandle for the rtc clock
+- interrupts: rtc alarm interrupt
+
+Example:
+
+rtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+};
-- 
2.11.0


[PATCH v4 4/4] ARM: imx_v6_v7_defconfig: enable RTC_DRV_MXC_V2

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Enable SRTC driver for i.MX53 in default config

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---
v3:
- imx_v4_v5_defconfig was the wrong default config for i.MX53

Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig 
b/arch/arm/configs/imx_v6_v7_defconfig
index 0d4494922561..548c11142a4e 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -349,6 +349,7 @@ CONFIG_RTC_DRV_PCF8563=y
 CONFIG_RTC_DRV_M41T80=y
 CONFIG_RTC_DRV_MC13XXX=y
 CONFIG_RTC_DRV_MXC=y
+CONFIG_RTC_DRV_MXC_V2=y
 CONFIG_RTC_DRV_SNVS=y
 CONFIG_DMADEVICES=y
 CONFIG_FSL_EDMA=y
-- 
2.11.0


[PATCH v4 1/4] dt-bindings: rtc: add bindings for i.MX53 SRTC

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn 

Document the binding for i.MX53 SRTC implemented by rtc-mxc_v2

Signed-off-by: Patrick Bruenn 

---

v4:
- replace "srtc" node name with generic "rtc"

v2:
- added "Secure" and (SRTC) to the description

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 

Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt

diff --git a/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt 
b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
new file mode 100644
index ..79d7e87b0d91
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
@@ -0,0 +1,17 @@
+* i.MX53 Secure Real Time Clock (SRTC)
+
+Required properties:
+- compatible: should be: "fsl,imx53-rtc"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- clocks: should contain the phandle for the rtc clock
+- interrupts: rtc alarm interrupt
+
+Example:
+
+rtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+};
-- 
2.11.0


[PATCH v4 4/4] ARM: imx_v6_v7_defconfig: enable RTC_DRV_MXC_V2

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn 

Enable SRTC driver for i.MX53 in default config

Signed-off-by: Patrick Bruenn 

---
v3:
- imx_v4_v5_defconfig was the wrong default config for i.MX53

Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig 
b/arch/arm/configs/imx_v6_v7_defconfig
index 0d4494922561..548c11142a4e 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -349,6 +349,7 @@ CONFIG_RTC_DRV_PCF8563=y
 CONFIG_RTC_DRV_M41T80=y
 CONFIG_RTC_DRV_MC13XXX=y
 CONFIG_RTC_DRV_MXC=y
+CONFIG_RTC_DRV_MXC_V2=y
 CONFIG_RTC_DRV_SNVS=y
 CONFIG_DMADEVICES=y
 CONFIG_FSL_EDMA=y
-- 
2.11.0


[PATCH v4 2/4] ARM: dts: imx53: add srtc node

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

rtc-mxc_v2 driver will add support for the i.MX53 SRTC

Note: we keep the 'srtc' label to avoid duplicate with imx53-m53.dtsi

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

v4:
- replace "srtc" node name with generic "rtc"

Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 arch/arm/boot/dts/imx53.dtsi | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 84f17f7abb71..beca1c830623 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -433,6 +433,13 @@
clock-names = "ipg", "per";
};
 
+   srtc: rtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+   };
+
iomuxc: iomuxc@53fa8000 {
compatible = "fsl,imx53-iomuxc";
reg = <0x53fa8000 0x4000>;
-- 
2.11.0


[PATCH v4 2/4] ARM: dts: imx53: add srtc node

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn 

rtc-mxc_v2 driver will add support for the i.MX53 SRTC

Note: we keep the 'srtc' label to avoid duplicate with imx53-m53.dtsi

Signed-off-by: Patrick Bruenn 

---

v4:
- replace "srtc" node name with generic "rtc"

Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 arch/arm/boot/dts/imx53.dtsi | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 84f17f7abb71..beca1c830623 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -433,6 +433,13 @@
clock-names = "ipg", "per";
};
 
+   srtc: rtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+   };
+
iomuxc: iomuxc@53fa8000 {
compatible = "fsl,imx53-iomuxc";
reg = <0x53fa8000 0x4000>;
-- 
2.11.0


[PATCH v4 0/4] rtc: add mxc driver for i.MX53 SRTC

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Select the new config option RTC_DRV_MXC_V2 to build this driver

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

v4:
- rename "srtc" node into generic "rtc" keep the label as "srtc" to avoid
  duplication with imx53-m53.dtsi
- fix Signed-off-by: in bindings-patch

v3:
- introduce new config option with the same patch, which adds the driver
- call rtc_update_irq() only if necessary
- merge mxc_rtc_write_alarm_locked() with mxc_rtc_set_alarm()
- only use clk_enable/disable (without "prepare") during operation
- rebase on v4.15-rc3
- consistently use rtc_tm_to_time64() and time64_t
- refactor mxc_rtc_read_time(): don't lock for readl() only;
  don't rtc_valid_tm(); use time64_t
- check returncode of mxc_rtc_wait_for_flag()
- restructure mxc_rtc_sync_lp_locked() to replace pr_err() with
  dev_err_once(); remove explicit 'inline'
- don't touch imx_v4_v5_defconfig, instead add to imx_v6_v7_defconfig

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---

Patrick Bruenn (4):
  dt-bindings: rtc: add bindings for i.MX53 SRTC
  ARM: dts: imx53: add srtc node
  rtc: add mxc driver for i.MX53 SRTC
  ARM: imx_v6_v7_defconfig: enable RTC_DRV_MXC_V2

 .../devicetree/bindings/rtc/rtc-mxc_v2.txt |  17 +
 arch/arm/boot/dts/imx53.dtsi   |   7 +
 arch/arm/configs/imx_v6_v7_defconfig   |   1 +
 drivers/rtc/Kconfig|  10 +
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-mxc_v2.c   | 422 +
 6 files changed, 458 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

-- 
2.11.0


[PATCH v4 3/4] rtc: add mxc driver for i.MX53 SRTC

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Select the new config option RTC_DRV_MXC_V2 to build this driver

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

v3:
- introduce new config option with the same patch, which adds the driver
- call rtc_update_irq() only if necessary
- merge mxc_rtc_write_alarm_locked() with mxc_rtc_set_alarm()
- only use clk_enable/disable (without "prepare") during operation
- rebase on v4.15-rc3
- consistently use rtc_tm_to_time64() and time64_t
- refactor mxc_rtc_read_time(): don't lock for readl() only;
  don't rtc_valid_tm(); use time64_t
- check returncode of mxc_rtc_wait_for_flag()
- restructure mxc_rtc_sync_lp_locked() to replace pr_err() with
  dev_err_once(); remove explicit 'inline'
- don't touch imx_v4_v5_defconfig, instead add to imx_v6_v7_defconfig

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 drivers/rtc/Kconfig  |  10 ++
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-mxc_v2.c | 422 +++
 3 files changed, 433 insertions(+)
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index b59a31b079a5..440edebf5c71 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1689,6 +1689,16 @@ config RTC_DRV_MXC
   This driver can also be built as a module, if so, the module
   will be called "rtc-mxc".
 
+config RTC_DRV_MXC_V2
+   tristate "Freescale MXC Real Time Clock for i.MX53"
+   depends on ARCH_MXC
+   help
+  If you say yes here you get support for the Freescale MXC
+  SRTC module in i.MX53 processor.
+
+  This driver can also be built as a module, if so, the module
+  will be called "rtc-mxc_v2".
+
 config RTC_DRV_SNVS
tristate "Freescale SNVS RTC support"
select REGMAP_MMIO
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index f2f50c11dc38..dcf60e61ae5c 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_MT6397)+= rtc-mt6397.o
 obj-$(CONFIG_RTC_DRV_MT7622)   += rtc-mt7622.o
 obj-$(CONFIG_RTC_DRV_MV)   += rtc-mv.o
 obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc.o
+obj-$(CONFIG_RTC_DRV_MXC_V2)   += rtc-mxc_v2.o
 obj-$(CONFIG_RTC_DRV_NUC900)   += rtc-nuc900.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
new file mode 100644
index ..b637095b0716
--- /dev/null
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -0,0 +1,422 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Real Time Clock (RTC) Driver for i.MX53
+ * Copyright (c) 2004-2011 Freescale Semiconductor, Inc.
+ * Copyright (c) 2017 Beckhoff Automation GmbH & Co. KG

[PATCH v4 0/4] rtc: add mxc driver for i.MX53 SRTC

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn 

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Select the new config option RTC_DRV_MXC_V2 to build this driver

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn 

---

v4:
- rename "srtc" node into generic "rtc" keep the label as "srtc" to avoid
  duplication with imx53-m53.dtsi
- fix Signed-off-by: in bindings-patch

v3:
- introduce new config option with the same patch, which adds the driver
- call rtc_update_irq() only if necessary
- merge mxc_rtc_write_alarm_locked() with mxc_rtc_set_alarm()
- only use clk_enable/disable (without "prepare") during operation
- rebase on v4.15-rc3
- consistently use rtc_tm_to_time64() and time64_t
- refactor mxc_rtc_read_time(): don't lock for readl() only;
  don't rtc_valid_tm(); use time64_t
- check returncode of mxc_rtc_wait_for_flag()
- restructure mxc_rtc_sync_lp_locked() to replace pr_err() with
  dev_err_once(); remove explicit 'inline'
- don't touch imx_v4_v5_defconfig, instead add to imx_v6_v7_defconfig

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---

Patrick Bruenn (4):
  dt-bindings: rtc: add bindings for i.MX53 SRTC
  ARM: dts: imx53: add srtc node
  rtc: add mxc driver for i.MX53 SRTC
  ARM: imx_v6_v7_defconfig: enable RTC_DRV_MXC_V2

 .../devicetree/bindings/rtc/rtc-mxc_v2.txt |  17 +
 arch/arm/boot/dts/imx53.dtsi   |   7 +
 arch/arm/configs/imx_v6_v7_defconfig   |   1 +
 drivers/rtc/Kconfig|  10 +
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-mxc_v2.c   | 422 +
 6 files changed, 458 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

-- 
2.11.0


[PATCH v4 3/4] rtc: add mxc driver for i.MX53 SRTC

2017-12-18 Thread linux-kernel-dev
From: Patrick Bruenn 

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Select the new config option RTC_DRV_MXC_V2 to build this driver

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn 

---

v3:
- introduce new config option with the same patch, which adds the driver
- call rtc_update_irq() only if necessary
- merge mxc_rtc_write_alarm_locked() with mxc_rtc_set_alarm()
- only use clk_enable/disable (without "prepare") during operation
- rebase on v4.15-rc3
- consistently use rtc_tm_to_time64() and time64_t
- refactor mxc_rtc_read_time(): don't lock for readl() only;
  don't rtc_valid_tm(); use time64_t
- check returncode of mxc_rtc_wait_for_flag()
- restructure mxc_rtc_sync_lp_locked() to replace pr_err() with
  dev_err_once(); remove explicit 'inline'
- don't touch imx_v4_v5_defconfig, instead add to imx_v6_v7_defconfig

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 drivers/rtc/Kconfig  |  10 ++
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-mxc_v2.c | 422 +++
 3 files changed, 433 insertions(+)
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index b59a31b079a5..440edebf5c71 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1689,6 +1689,16 @@ config RTC_DRV_MXC
   This driver can also be built as a module, if so, the module
   will be called "rtc-mxc".
 
+config RTC_DRV_MXC_V2
+   tristate "Freescale MXC Real Time Clock for i.MX53"
+   depends on ARCH_MXC
+   help
+  If you say yes here you get support for the Freescale MXC
+  SRTC module in i.MX53 processor.
+
+  This driver can also be built as a module, if so, the module
+  will be called "rtc-mxc_v2".
+
 config RTC_DRV_SNVS
tristate "Freescale SNVS RTC support"
select REGMAP_MMIO
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index f2f50c11dc38..dcf60e61ae5c 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_MT6397)+= rtc-mt6397.o
 obj-$(CONFIG_RTC_DRV_MT7622)   += rtc-mt7622.o
 obj-$(CONFIG_RTC_DRV_MV)   += rtc-mv.o
 obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc.o
+obj-$(CONFIG_RTC_DRV_MXC_V2)   += rtc-mxc_v2.o
 obj-$(CONFIG_RTC_DRV_NUC900)   += rtc-nuc900.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
new file mode 100644
index ..b637095b0716
--- /dev/null
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -0,0 +1,422 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Real Time Clock (RTC) Driver for i.MX53
+ * Copyright (c) 2004-2011 Freescale Semiconductor, Inc.
+ * Copyright (c) 2017 Beckhoff Automation GmbH & Co. KG
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define SRTC_LPPDR_INIT   0x41736166   /* init for glitch detect */
+
+#define SRTC_LPCR_EN_LP   BIT(3)   /* lp enable */
+#define SRTC_LPCR_WAE BIT(4)   /* lp wakeup alarm enable */
+#define SRTC_LPCR_ALP BIT(7)   /* lp alarm flag */
+#define SRTC_LPCR_NSA BIT(11)  /* lp non secure access */
+#define SRTC_LPCR_NVE  

[PATCH v3 3/4] rtc: add mxc driver for i.MX53 SRTC

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Select the new config option RTC_DRV_MXC_V2 to build this driver

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

Open issue:
- naming of the device tree node "rtc" vs. "srtc"

v3:
- introduce new config option with the same patch, which adds the driver
- call rtc_update_irq() only if necessary
- merge mxc_rtc_write_alarm_locked() with mxc_rtc_set_alarm()
- only use clk_enable/disable (without "prepare") during operation
- rebase on v4.15-rc3
- consistently use rtc_tm_to_time64() and time64_t
- refactor mxc_rtc_read_time(): don't lock for readl() only;
  don't rtc_valid_tm(); use time64_t
- check returncode of mxc_rtc_wait_for_flag()
- restructure mxc_rtc_sync_lp_locked() to replace pr_err() with
  dev_err_once(); remove explicit 'inline'
- don't touch imx_v4_v5_defconfig, instead add to imx_v6_v7_defconfig

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 drivers/rtc/Kconfig  |  10 ++
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-mxc_v2.c | 422 +++
 3 files changed, 433 insertions(+)
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index b59a31b079a5..440edebf5c71 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1689,6 +1689,16 @@ config RTC_DRV_MXC
   This driver can also be built as a module, if so, the module
   will be called "rtc-mxc".
 
+config RTC_DRV_MXC_V2
+   tristate "Freescale MXC Real Time Clock for i.MX53"
+   depends on ARCH_MXC
+   help
+  If you say yes here you get support for the Freescale MXC
+  SRTC module in i.MX53 processor.
+
+  This driver can also be built as a module, if so, the module
+  will be called "rtc-mxc_v2".
+
 config RTC_DRV_SNVS
tristate "Freescale SNVS RTC support"
select REGMAP_MMIO
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index f2f50c11dc38..dcf60e61ae5c 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_MT6397)+= rtc-mt6397.o
 obj-$(CONFIG_RTC_DRV_MT7622)   += rtc-mt7622.o
 obj-$(CONFIG_RTC_DRV_MV)   += rtc-mv.o
 obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc.o
+obj-$(CONFIG_RTC_DRV_MXC_V2)   += rtc-mxc_v2.o
 obj-$(CONFIG_RTC_DRV_NUC900)   += rtc-nuc900.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
new file mode 100644
index ..b637095b0716
--- /dev/null
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -0,0 +1,422 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Real Time Clock (RTC) Driver for i.MX53
+ * Copyright (c) 2004-2011 Frees

[PATCH v3 3/4] rtc: add mxc driver for i.MX53 SRTC

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn 

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Select the new config option RTC_DRV_MXC_V2 to build this driver

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn 

---

Open issue:
- naming of the device tree node "rtc" vs. "srtc"

v3:
- introduce new config option with the same patch, which adds the driver
- call rtc_update_irq() only if necessary
- merge mxc_rtc_write_alarm_locked() with mxc_rtc_set_alarm()
- only use clk_enable/disable (without "prepare") during operation
- rebase on v4.15-rc3
- consistently use rtc_tm_to_time64() and time64_t
- refactor mxc_rtc_read_time(): don't lock for readl() only;
  don't rtc_valid_tm(); use time64_t
- check returncode of mxc_rtc_wait_for_flag()
- restructure mxc_rtc_sync_lp_locked() to replace pr_err() with
  dev_err_once(); remove explicit 'inline'
- don't touch imx_v4_v5_defconfig, instead add to imx_v6_v7_defconfig

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 drivers/rtc/Kconfig  |  10 ++
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-mxc_v2.c | 422 +++
 3 files changed, 433 insertions(+)
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index b59a31b079a5..440edebf5c71 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1689,6 +1689,16 @@ config RTC_DRV_MXC
   This driver can also be built as a module, if so, the module
   will be called "rtc-mxc".
 
+config RTC_DRV_MXC_V2
+   tristate "Freescale MXC Real Time Clock for i.MX53"
+   depends on ARCH_MXC
+   help
+  If you say yes here you get support for the Freescale MXC
+  SRTC module in i.MX53 processor.
+
+  This driver can also be built as a module, if so, the module
+  will be called "rtc-mxc_v2".
+
 config RTC_DRV_SNVS
tristate "Freescale SNVS RTC support"
select REGMAP_MMIO
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index f2f50c11dc38..dcf60e61ae5c 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_MT6397)+= rtc-mt6397.o
 obj-$(CONFIG_RTC_DRV_MT7622)   += rtc-mt7622.o
 obj-$(CONFIG_RTC_DRV_MV)   += rtc-mv.o
 obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc.o
+obj-$(CONFIG_RTC_DRV_MXC_V2)   += rtc-mxc_v2.o
 obj-$(CONFIG_RTC_DRV_NUC900)   += rtc-nuc900.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
new file mode 100644
index ..b637095b0716
--- /dev/null
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -0,0 +1,422 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Real Time Clock (RTC) Driver for i.MX53
+ * Copyright (c) 2004-2011 Freescale Semiconductor, Inc.
+ * Copyright (c) 2017 Beckhoff Automation GmbH & Co. KG
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define SRTC_LPPDR_INIT   0x41736166   /* init for glitch detect */
+
+#define SRTC_LPCR_EN_LP   BIT(3)   /* lp enable */
+#define SRTC_LPCR_WAE BIT(4)   /* lp wakeup alarm enable */
+#define SRTC_LPCR_ALP BIT(7)   /* lp alarm flag */
+#define SRTC_L

[PATCH v3 2/4] ARM: dts: imx53: add srtc node

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

rtc-mxc_v2 driver will add support for the i.MX53 SRTC

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 arch/arm/boot/dts/imx53.dtsi | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 84f17f7abb71..e4ca9d9ba2fe 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -433,6 +433,13 @@
clock-names = "ipg", "per";
};
 
+   srtc: srtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+   };
+
iomuxc: iomuxc@53fa8000 {
compatible = "fsl,imx53-iomuxc";
reg = <0x53fa8000 0x4000>;
-- 
2.11.0


[PATCH v3 4/4] ARM: imx_v6_v7_defconfig: enable RTC_DRV_MXC_V2

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Enable SRTC driver for i.MX53 in default config

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---
v3:
- imx_v4_v5_defconfig was the wrong default config for i.MX53

Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig 
b/arch/arm/configs/imx_v6_v7_defconfig
index 0d4494922561..548c11142a4e 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -349,6 +349,7 @@ CONFIG_RTC_DRV_PCF8563=y
 CONFIG_RTC_DRV_M41T80=y
 CONFIG_RTC_DRV_MC13XXX=y
 CONFIG_RTC_DRV_MXC=y
+CONFIG_RTC_DRV_MXC_V2=y
 CONFIG_RTC_DRV_SNVS=y
 CONFIG_DMADEVICES=y
 CONFIG_FSL_EDMA=y
-- 
2.11.0


[PATCH v3 2/4] ARM: dts: imx53: add srtc node

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn 

rtc-mxc_v2 driver will add support for the i.MX53 SRTC

Signed-off-by: Patrick Bruenn 

---

Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 arch/arm/boot/dts/imx53.dtsi | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 84f17f7abb71..e4ca9d9ba2fe 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -433,6 +433,13 @@
clock-names = "ipg", "per";
};
 
+   srtc: srtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+   };
+
iomuxc: iomuxc@53fa8000 {
compatible = "fsl,imx53-iomuxc";
reg = <0x53fa8000 0x4000>;
-- 
2.11.0


[PATCH v3 4/4] ARM: imx_v6_v7_defconfig: enable RTC_DRV_MXC_V2

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn 

Enable SRTC driver for i.MX53 in default config

Signed-off-by: Patrick Bruenn 

---
v3:
- imx_v4_v5_defconfig was the wrong default config for i.MX53

Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 arch/arm/configs/imx_v6_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig 
b/arch/arm/configs/imx_v6_v7_defconfig
index 0d4494922561..548c11142a4e 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -349,6 +349,7 @@ CONFIG_RTC_DRV_PCF8563=y
 CONFIG_RTC_DRV_M41T80=y
 CONFIG_RTC_DRV_MC13XXX=y
 CONFIG_RTC_DRV_MXC=y
+CONFIG_RTC_DRV_MXC_V2=y
 CONFIG_RTC_DRV_SNVS=y
 CONFIG_DMADEVICES=y
 CONFIG_FSL_EDMA=y
-- 
2.11.0


[PATCH v3 1/4] dt-bindings: rtc: add bindings for i.MX53 SRTC

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Document the binding for i.MX53 SRTC implemented by rtc-mxc_v2

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

v2:
- added "Secure" and (SRTC) to the description

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>

Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt

diff --git a/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt 
b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
new file mode 100644
index ..454a08918cc3
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
@@ -0,0 +1,17 @@
+* i.MX53 Secure Real Time Clock (SRTC)
+
+Required properties:
+- compatible: should be: "fsl,imx53-rtc"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- clocks: should contain the phandle for the rtc clock
+- interrupts: rtc alarm interrupt
+
+Example:
+
+srtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+};
-- 
2.11.0


[PATCH v3 0/4] rtc: add mxc driver for i.MX53 SRTC

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Select the new config option RTC_DRV_MXC_V2 to build this driver

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

Open issue:
- naming of the device tree node "rtc" vs. "srtc"

v3:
- introduce new config option with the same patch, which adds the driver
- call rtc_update_irq() only if necessary
- merge mxc_rtc_write_alarm_locked() with mxc_rtc_set_alarm()
- only use clk_enable/disable (without "prepare") during operation
- rebase on v4.15-rc3
- consistently use rtc_tm_to_time64() and time64_t
- refactor mxc_rtc_read_time(): don't lock for readl() only;
  don't rtc_valid_tm(); use time64_t
- check returncode of mxc_rtc_wait_for_flag()
- restructure mxc_rtc_sync_lp_locked() to replace pr_err() with
  dev_err_once(); remove explicit 'inline'
- don't touch imx_v4_v5_defconfig, instead add to imx_v6_v7_defconfig

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

To: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>

Patrick Bruenn (4):
  dt-bindings: rtc: add bindings for i.MX53 SRTC
  ARM: dts: imx53: add srtc node
  rtc: add mxc driver for i.MX53 SRTC
  ARM: imx_v6_v7_defconfig: enable RTC_DRV_MXC_V2

 .../devicetree/bindings/rtc/rtc-mxc_v2.txt |  17 +
 arch/arm/boot/dts/imx53.dtsi   |   7 +
 arch/arm/configs/imx_v6_v7_defconfig   |   1 +
 drivers/rtc/Kconfig|  10 +
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-mxc_v2.c   | 422 +
 6 files changed, 458 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

-- 
2.11.0


[PATCH v3 1/4] dt-bindings: rtc: add bindings for i.MX53 SRTC

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn 

Document the binding for i.MX53 SRTC implemented by rtc-mxc_v2

Signed-off-by: Patrick Bruenn 

---

v2:
- added "Secure" and (SRTC) to the description

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 

Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt

diff --git a/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt 
b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
new file mode 100644
index ..454a08918cc3
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
@@ -0,0 +1,17 @@
+* i.MX53 Secure Real Time Clock (SRTC)
+
+Required properties:
+- compatible: should be: "fsl,imx53-rtc"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- clocks: should contain the phandle for the rtc clock
+- interrupts: rtc alarm interrupt
+
+Example:
+
+srtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+};
-- 
2.11.0


[PATCH v3 0/4] rtc: add mxc driver for i.MX53 SRTC

2017-12-11 Thread linux-kernel-dev
From: Patrick Bruenn 

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Select the new config option RTC_DRV_MXC_V2 to build this driver

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn 

---

Open issue:
- naming of the device tree node "rtc" vs. "srtc"

v3:
- introduce new config option with the same patch, which adds the driver
- call rtc_update_irq() only if necessary
- merge mxc_rtc_write_alarm_locked() with mxc_rtc_set_alarm()
- only use clk_enable/disable (without "prepare") during operation
- rebase on v4.15-rc3
- consistently use rtc_tm_to_time64() and time64_t
- refactor mxc_rtc_read_time(): don't lock for readl() only;
  don't rtc_valid_tm(); use time64_t
- check returncode of mxc_rtc_wait_for_flag()
- restructure mxc_rtc_sync_lp_locked() to replace pr_err() with
  dev_err_once(); remove explicit 'inline'
- don't touch imx_v4_v5_defconfig, instead add to imx_v6_v7_defconfig

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

To: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 

Patrick Bruenn (4):
  dt-bindings: rtc: add bindings for i.MX53 SRTC
  ARM: dts: imx53: add srtc node
  rtc: add mxc driver for i.MX53 SRTC
  ARM: imx_v6_v7_defconfig: enable RTC_DRV_MXC_V2

 .../devicetree/bindings/rtc/rtc-mxc_v2.txt |  17 +
 arch/arm/boot/dts/imx53.dtsi   |   7 +
 arch/arm/configs/imx_v6_v7_defconfig   |   1 +
 drivers/rtc/Kconfig|  10 +
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-mxc_v2.c   | 422 +
 6 files changed, 458 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

-- 
2.11.0


[PATCH v2 5/5] rtc: add mxc driver for i.MX53 SRTC

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

To: Alessandro Zummo <a.zu...@towertech.it>
To: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-mxc_v2.c | 433 +++
 2 files changed, 434 insertions(+)
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index f2f50c11dc38..dcf60e61ae5c 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_MT6397)+= rtc-mt6397.o
 obj-$(CONFIG_RTC_DRV_MT7622)   += rtc-mt7622.o
 obj-$(CONFIG_RTC_DRV_MV)   += rtc-mv.o
 obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc.o
+obj-$(CONFIG_RTC_DRV_MXC_V2)   += rtc-mxc_v2.o
 obj-$(CONFIG_RTC_DRV_NUC900)   += rtc-nuc900.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
new file mode 100644
index ..c5a6d2c293bb
--- /dev/null
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -0,0 +1,433 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Real Time Clock (RTC) Driver for i.MX53
+ * Copyright (c) 2004-2011 Freescale Semiconductor, Inc.
+ * Copyright (c) 2017 Beckhoff Automation GmbH & Co. KG
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define SRTC_LPPDR_INIT   0x41736166   /* init for glitch detect */
+
+#define SRTC_LPCR_EN_LP   BIT(3)   /* lp enable */
+#define SRTC_LPCR_WAE BIT(4)   /* lp wakeup alarm enable */
+#define SRTC_LPCR_ALP BIT(7)   /* lp alarm flag */
+#define SRTC_LPCR_NSA BIT(11)  /* lp non secure access */
+#define SRTC_LPCR_NVE BIT(14)  /* lp non valid state exit bit */
+#define SRTC_LPCR_IE  BIT(15)  /* lp init state exit bit */
+
+#define SRTC_LPSR_ALP BIT(3)   /* lp alarm flag */
+#define SRTC_LPSR_NVESBIT(14)  /* lp non-valid state exit status */
+#define SRTC_LPSR_IES BIT(15)  /* lp init state exit status */
+
+#define SRTC_LPSCMR0x00/* LP Secure Counter MSB Reg */
+#define SRTC_LPSCLR0x04/* LP Secure Counter LSB Reg */
+#define SRTC_LPSAR 0x08/* LP Secure Alarm Reg */
+#define SRTC_LPCR  0x10/* LP Control Reg */
+#define SRTC_LPSR  0x14/* LP Status Reg */
+#define SRTC_LPPDR 0x18/* LP Power Supply Glitch Detector Reg */
+
+/* max. number of retries to read registers, 120 was max during test */
+#define REG_READ_TIMEOUT 2000
+
+struct mxc_rtc_data {
+   struct rtc_device *rtc;
+   void __iomem *ioaddr;
+   struct clk *clk;
+   spinlock_t lock; /* protects register access */
+   int irq;
+};
+
+/*
+ * This function does write synchronization for writes to the lp srtc block.
+ * To take care of the asynchronous CKIL clock, a

[PATCH v2 5/5] rtc: add mxc driver for i.MX53 SRTC

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn 

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Signed-off-by: Patrick Bruenn 

---

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

To: Alessandro Zummo 
To: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-mxc_v2.c | 433 +++
 2 files changed, 434 insertions(+)
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index f2f50c11dc38..dcf60e61ae5c 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_MT6397)+= rtc-mt6397.o
 obj-$(CONFIG_RTC_DRV_MT7622)   += rtc-mt7622.o
 obj-$(CONFIG_RTC_DRV_MV)   += rtc-mv.o
 obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc.o
+obj-$(CONFIG_RTC_DRV_MXC_V2)   += rtc-mxc_v2.o
 obj-$(CONFIG_RTC_DRV_NUC900)   += rtc-nuc900.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
new file mode 100644
index ..c5a6d2c293bb
--- /dev/null
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -0,0 +1,433 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Real Time Clock (RTC) Driver for i.MX53
+ * Copyright (c) 2004-2011 Freescale Semiconductor, Inc.
+ * Copyright (c) 2017 Beckhoff Automation GmbH & Co. KG
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define SRTC_LPPDR_INIT   0x41736166   /* init for glitch detect */
+
+#define SRTC_LPCR_EN_LP   BIT(3)   /* lp enable */
+#define SRTC_LPCR_WAE BIT(4)   /* lp wakeup alarm enable */
+#define SRTC_LPCR_ALP BIT(7)   /* lp alarm flag */
+#define SRTC_LPCR_NSA BIT(11)  /* lp non secure access */
+#define SRTC_LPCR_NVE BIT(14)  /* lp non valid state exit bit */
+#define SRTC_LPCR_IE  BIT(15)  /* lp init state exit bit */
+
+#define SRTC_LPSR_ALP BIT(3)   /* lp alarm flag */
+#define SRTC_LPSR_NVESBIT(14)  /* lp non-valid state exit status */
+#define SRTC_LPSR_IES BIT(15)  /* lp init state exit status */
+
+#define SRTC_LPSCMR0x00/* LP Secure Counter MSB Reg */
+#define SRTC_LPSCLR0x04/* LP Secure Counter LSB Reg */
+#define SRTC_LPSAR 0x08/* LP Secure Alarm Reg */
+#define SRTC_LPCR  0x10/* LP Control Reg */
+#define SRTC_LPSR  0x14/* LP Status Reg */
+#define SRTC_LPPDR 0x18/* LP Power Supply Glitch Detector Reg */
+
+/* max. number of retries to read registers, 120 was max during test */
+#define REG_READ_TIMEOUT 2000
+
+struct mxc_rtc_data {
+   struct rtc_device *rtc;
+   void __iomem *ioaddr;
+   struct clk *clk;
+   spinlock_t lock; /* protects register access */
+   int irq;
+};
+
+/*
+ * This function does write synchronization for writes to the lp srtc block.
+ * To take care of the asynchronous CKIL clock, all writes from the IP domain
+ * will be synchronized to the CKIL domain.
+ * The caller should hold the pdata->lock
+ */
+static inline void mxc_rtc_sync_lp_locked(void __iomem *ioaddr)
+{
+   unsigned int i;
+
+   /* Wait for 3 CKIL cycles */
+   for (i = 0; i < 3; i++) {
+   const u32 count = readl(ioaddr + SRTC_LPSCLR);
+   unsigned int timeout = REG_RE

[PATCH v2 4/5] ARM: imx_v4_v5_defconfig: enable RTC_DRV_MXC_V2

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Enable SRTC driver for i.MX53 in default config

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

To: Shawn Guo <shawn...@kernel.org>
To: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 arch/arm/configs/imx_v4_v5_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/imx_v4_v5_defconfig 
b/arch/arm/configs/imx_v4_v5_defconfig
index ca0f13cafe38..b48efd5ff8a7 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -167,6 +167,7 @@ CONFIG_RTC_DRV_PCF8563=y
 CONFIG_RTC_DRV_IMXDI=y
 CONFIG_RTC_DRV_MC13XXX=y
 CONFIG_RTC_DRV_MXC=y
+CONFIG_RTC_DRV_MXC_V2=y
 CONFIG_DMADEVICES=y
 CONFIG_IMX_DMA=y
 CONFIG_IMX_SDMA=y
-- 
2.11.0


[PATCH v2 4/5] ARM: imx_v4_v5_defconfig: enable RTC_DRV_MXC_V2

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn 

Enable SRTC driver for i.MX53 in default config

Signed-off-by: Patrick Bruenn 

---

To: Shawn Guo 
To: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 arch/arm/configs/imx_v4_v5_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/imx_v4_v5_defconfig 
b/arch/arm/configs/imx_v4_v5_defconfig
index ca0f13cafe38..b48efd5ff8a7 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -167,6 +167,7 @@ CONFIG_RTC_DRV_PCF8563=y
 CONFIG_RTC_DRV_IMXDI=y
 CONFIG_RTC_DRV_MC13XXX=y
 CONFIG_RTC_DRV_MXC=y
+CONFIG_RTC_DRV_MXC_V2=y
 CONFIG_DMADEVICES=y
 CONFIG_IMX_DMA=y
 CONFIG_IMX_SDMA=y
-- 
2.11.0


[PATCH v2 0/5] add mxc driver for i.MX53 SRTC

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

To: Alessandro Zummo <a.zu...@towertech.it>
To: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>

Patrick Bruenn (5):
  dt-bindings: rtc: add bindings for i.MX53 SRTC
  ARM: dts: imx53: add srtc node
  rtc: mxc_v2: add driver for i.MX53 SRTC
  ARM: imx_v4_v5_defconfig: enable RTC_DRV_MXC_V2
  rtc: add mxc driver for i.MX53 SRTC

 .../devicetree/bindings/rtc/rtc-mxc_v2.txt |  17 +
 arch/arm/boot/dts/imx53.dtsi   |   4 +-
 arch/arm/configs/imx_v4_v5_defconfig   |   1 +
 drivers/rtc/Kconfig|  10 +
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-mxc_v2.c   | 433 +
 6 files changed, 463 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

-- 
2.11.0


[PATCH v2 1/5] dt-bindings: rtc: add bindings for i.MX53 SRTC

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Document the binding for i.MX53 SRTC implemented by rtc-mxc_v2

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

To: Alessandro Zummo <a.zu...@towertech.it>
To: Alexandre Belloni <alexandre.bell...@free-electrons.com>

Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt

diff --git a/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt 
b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
new file mode 100644
index ..796e7f4995db
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
@@ -0,0 +1,17 @@
+* i.MX53 Real Time Clock controller
+
+Required properties:
+- compatible: should be: "fsl,imx53-rtc"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- clocks: should contain the phandle for the rtc clock
+- interrupts: rtc alarm interrupt
+
+Example:
+
+srtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+};
-- 
2.11.0


[PATCH v2 3/5] rtc: mxc_v2: add driver for i.MX53 SRTC

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Add RTC_DRV_MXC_V2 config option

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

To: Alessandro Zummo <a.zu...@towertech.it>
To: Alexandre Belloni <alexandre.bell...@free-electrons.com>

Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 drivers/rtc/Kconfig | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index b59a31b079a5..440edebf5c71 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1689,6 +1689,16 @@ config RTC_DRV_MXC
   This driver can also be built as a module, if so, the module
   will be called "rtc-mxc".
 
+config RTC_DRV_MXC_V2
+   tristate "Freescale MXC Real Time Clock for i.MX53"
+   depends on ARCH_MXC
+   help
+  If you say yes here you get support for the Freescale MXC
+  SRTC module in i.MX53 processor.
+
+  This driver can also be built as a module, if so, the module
+  will be called "rtc-mxc_v2".
+
 config RTC_DRV_SNVS
tristate "Freescale SNVS RTC support"
select REGMAP_MMIO
-- 
2.11.0


[PATCH v2 0/5] add mxc driver for i.MX53 SRTC

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn 

Neither rtc-imxdi, rtc-mxc nor rtc-snvs are compatible with i.MX53.

This is driver enables support for the low power domain SRTC features:
- 32-bit MSB of non-rollover time counter
- 32-bit alarm register

Based on:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

v2:
- have seperate patches for dt-binding, CONFIG option, imx53.dtsi and driver
- add SPDX-License-Identifier and cleanup copyright notice
- replace __raw_readl/writel() with readl/writel()
- fix PM_SLEEP callbacks
- add CONFIG_RTC_DRV_MXC_V2 to build rtc-mxc_v2.c
- remove misleading or obvious comments and fix style of the remaining
- avoid endless loop while waiting for hw
- implement consistent locking; make spinlock a member of dev struct
- enable clk only for register accesses
- remove all udelay() calls since they are obsolete or redundant
  (we are already waiting for register flags to change)
- init platform_data before registering irq callback
- let set_time() fail, when 32 bit rtc counter exceeded
- make names more consistent
- cleanup and reorder includes
- cleanup and remove unused defines

To: Alessandro Zummo 
To: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 

Patrick Bruenn (5):
  dt-bindings: rtc: add bindings for i.MX53 SRTC
  ARM: dts: imx53: add srtc node
  rtc: mxc_v2: add driver for i.MX53 SRTC
  ARM: imx_v4_v5_defconfig: enable RTC_DRV_MXC_V2
  rtc: add mxc driver for i.MX53 SRTC

 .../devicetree/bindings/rtc/rtc-mxc_v2.txt |  17 +
 arch/arm/boot/dts/imx53.dtsi   |   4 +-
 arch/arm/configs/imx_v4_v5_defconfig   |   1 +
 drivers/rtc/Kconfig|  10 +
 drivers/rtc/Makefile   |   1 +
 drivers/rtc/rtc-mxc_v2.c   | 433 +
 6 files changed, 463 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

-- 
2.11.0


[PATCH v2 1/5] dt-bindings: rtc: add bindings for i.MX53 SRTC

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn 

Document the binding for i.MX53 SRTC implemented by rtc-mxc_v2

Signed-off-by: Patrick Bruenn 

---

To: Alessandro Zummo 
To: Alexandre Belloni 

Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt

diff --git a/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt 
b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
new file mode 100644
index ..796e7f4995db
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-mxc_v2.txt
@@ -0,0 +1,17 @@
+* i.MX53 Real Time Clock controller
+
+Required properties:
+- compatible: should be: "fsl,imx53-rtc"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- clocks: should contain the phandle for the rtc clock
+- interrupts: rtc alarm interrupt
+
+Example:
+
+srtc@53fa4000 {
+   compatible = "fsl,imx53-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+};
-- 
2.11.0


[PATCH v2 3/5] rtc: mxc_v2: add driver for i.MX53 SRTC

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn 

Add RTC_DRV_MXC_V2 config option

Signed-off-by: Patrick Bruenn 

---

To: Alessandro Zummo 
To: Alexandre Belloni 

Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 drivers/rtc/Kconfig | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index b59a31b079a5..440edebf5c71 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1689,6 +1689,16 @@ config RTC_DRV_MXC
   This driver can also be built as a module, if so, the module
   will be called "rtc-mxc".
 
+config RTC_DRV_MXC_V2
+   tristate "Freescale MXC Real Time Clock for i.MX53"
+   depends on ARCH_MXC
+   help
+  If you say yes here you get support for the Freescale MXC
+  SRTC module in i.MX53 processor.
+
+  This driver can also be built as a module, if so, the module
+  will be called "rtc-mxc_v2".
+
 config RTC_DRV_SNVS
tristate "Freescale SNVS RTC support"
select REGMAP_MMIO
-- 
2.11.0


[PATCH v2 2/5] ARM: dts: imx53: add srtc node

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

rtc-mxc_v2 driver will add support for the i.MX53 SRTC

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

To: Shawn Guo <shawn...@kernel.org>
To: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo <a.zu...@towertech.it>
Cc: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne <pombreda...@nexb.com>
Cc: Lothar Waßmann <l...@karo-electronics.de>
---
 arch/arm/boot/dts/imx53.dtsi | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 589a67c5f796..e4ca9d9ba2fe 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -434,12 +434,10 @@
};
 
srtc: srtc@53fa4000 {
-   compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+   compatible = "fsl,imx53-rtc";
reg = <0x53fa4000 0x4000>;
interrupts = <24>;
-   interrupt-parent = <>;
clocks = < IMX5_CLK_SRTC_GATE>;
-   clock-names = "ipg";
};
 
iomuxc: iomuxc@53fa8000 {
-- 
2.11.0


[PATCH v2 2/5] ARM: dts: imx53: add srtc node

2017-12-05 Thread linux-kernel-dev
From: Patrick Bruenn 

rtc-mxc_v2 driver will add support for the i.MX53 SRTC

Signed-off-by: Patrick Bruenn 

---

To: Shawn Guo 
To: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)

Cc: Alessandro Zummo 
Cc: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)

Cc: Philippe Ombredanne 
Cc: Lothar Waßmann 
---
 arch/arm/boot/dts/imx53.dtsi | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 589a67c5f796..e4ca9d9ba2fe 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -434,12 +434,10 @@
};
 
srtc: srtc@53fa4000 {
-   compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+   compatible = "fsl,imx53-rtc";
reg = <0x53fa4000 0x4000>;
interrupts = <24>;
-   interrupt-parent = <>;
clocks = < IMX5_CLK_SRTC_GATE>;
-   clock-names = "ipg";
};
 
iomuxc: iomuxc@53fa8000 {
-- 
2.11.0


[PATCH] rtc: add mxc driver for i.MX53

2017-11-27 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

Neither rtc-imxdi nor rtc-mxc are compatible with i.MX53.
Add a modernized version of mxc_v2 from here:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Changes to that version:
- updated to v4.15-rc1
- removed ioctl()
- removed proc()
- removed manual(redundant) enable_irq flag

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

Open issues:
- driver naming, should it be merged with rtc-mxc.c ?
- document DT binding "fsl,imx53-rtc" accordingly
- Should unused defines be removed or kept for someone else to be
  useful?
- Is the use of __raw_readl/writel() correct? Should it be replaced with
  readl/writel()?
- suspend/resume() seems different to existing rtc-mxc.c, should I apply
  the pattern from rtc-mxc.c?
- On Shawns tree imx53.dtsi has been reverted already[1][2]. Should I split
  the imx53.dtsi change into a separate patch based on his tree? Or can
  we still stop the full revert and just remove the imx25-rtc compatible?
  I am not in a hurry, so we could just wait until the revert landed in
  Linus tree. Whatever you think is best.

[1] https://www.spinics.net/lists/arm-kernel/msg617113.html
[2] commit ee76f7729babd2700afd6f3874449d8084dd85ea

To: Alessandro Zummo <a.zu...@towertech.it>
To: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
Cc: Sascha Hauer <ker...@pengutronix.de> (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King <li...@armlinux.org.uk> (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)
---
 arch/arm/boot/dts/imx53.dtsi |   2 +-
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-mxc_v2.c | 531 +++
 3 files changed, 533 insertions(+), 1 deletion(-)
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 589a67c5f796..3d1a55e11ea8 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -434,7 +434,7 @@
};
 
srtc: srtc@53fa4000 {
-   compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+   compatible = "fsl,imx53-rtc";
reg = <0x53fa4000 0x4000>;
interrupts = <24>;
interrupt-parent = <>;
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index f2f50c11dc38..fb3dc458c185 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_MT6397)+= rtc-mt6397.o
 obj-$(CONFIG_RTC_DRV_MT7622)   += rtc-mt7622.o
 obj-$(CONFIG_RTC_DRV_MV)   += rtc-mv.o
 obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc.o
+obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc_v2.o
 obj-$(CONFIG_RTC_DRV_NUC900)   += rtc-nuc900.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
new file mode 100644
index ..5049b521b38e
--- /dev/null
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -0,0 +1,531 @@
+/*
+ * Copyright (C) 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ */
+
+/*
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+/*
+ * Implementation based on rtc-ds1553.c
+ */
+
+/*!
+ * @defgroup RTC Real Time Clock (RTC) Driver for i.MX53
+ */
+/*!
+ * @file rtc-mxc_v2.c
+ * @brief Real Time Clock interface
+ *
+ * This file contains Real Time Clock interface for Linux.
+ *
+ * @ingroup RTC
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+//#include 
+#define RTC_READ_TIME_47BIT_IOR('p', 0x20, unsigned long long)
+/* blocks until LPSCMR is set, returns difference */
+#define RTC_WAIT_TIME_SET  _IOR('p', 0x21, int64_t)
+
+#define SRTC_LPSCLR_LLPSC_LSH  17  /* start bit for LSB time value */
+
+#define SRTC_LPPDR_INIT   0x41736166   /* 

[PATCH] rtc: add mxc driver for i.MX53

2017-11-27 Thread linux-kernel-dev
From: Patrick Bruenn 

Neither rtc-imxdi nor rtc-mxc are compatible with i.MX53.
Add a modernized version of mxc_v2 from here:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/rtc/rtc-mxc_v2.c?h=imx_2.6.35_11.09.01

Changes to that version:
- updated to v4.15-rc1
- removed ioctl()
- removed proc()
- removed manual(redundant) enable_irq flag

Signed-off-by: Patrick Bruenn 

---

Open issues:
- driver naming, should it be merged with rtc-mxc.c ?
- document DT binding "fsl,imx53-rtc" accordingly
- Should unused defines be removed or kept for someone else to be
  useful?
- Is the use of __raw_readl/writel() correct? Should it be replaced with
  readl/writel()?
- suspend/resume() seems different to existing rtc-mxc.c, should I apply
  the pattern from rtc-mxc.c?
- On Shawns tree imx53.dtsi has been reverted already[1][2]. Should I split
  the imx53.dtsi change into a separate patch based on his tree? Or can
  we still stop the full revert and just remove the imx25-rtc compatible?
  I am not in a hurry, so we could just wait until the revert landed in
  Linus tree. Whatever you think is best.

[1] https://www.spinics.net/lists/arm-kernel/msg617113.html
[2] commit ee76f7729babd2700afd6f3874449d8084dd85ea

To: Alessandro Zummo 
To: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
Cc: Sascha Hauer  (maintainer:ARM/FREESCALE IMX / MXC 
ARM ARCHITECTURE)
Cc: Russell King  (maintainer:ARM PORT)
Cc: linux-arm-ker...@lists.infradead.org (moderated list:ARM/FREESCALE IMX / 
MXC ARM ARCHITECTURE)
---
 arch/arm/boot/dts/imx53.dtsi |   2 +-
 drivers/rtc/Makefile |   1 +
 drivers/rtc/rtc-mxc_v2.c | 531 +++
 3 files changed, 533 insertions(+), 1 deletion(-)
 create mode 100644 drivers/rtc/rtc-mxc_v2.c

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 589a67c5f796..3d1a55e11ea8 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -434,7 +434,7 @@
};
 
srtc: srtc@53fa4000 {
-   compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+   compatible = "fsl,imx53-rtc";
reg = <0x53fa4000 0x4000>;
interrupts = <24>;
interrupt-parent = <>;
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index f2f50c11dc38..fb3dc458c185 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -106,6 +106,7 @@ obj-$(CONFIG_RTC_DRV_MT6397)+= rtc-mt6397.o
 obj-$(CONFIG_RTC_DRV_MT7622)   += rtc-mt7622.o
 obj-$(CONFIG_RTC_DRV_MV)   += rtc-mv.o
 obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc.o
+obj-$(CONFIG_RTC_DRV_MXC)  += rtc-mxc_v2.o
 obj-$(CONFIG_RTC_DRV_NUC900)   += rtc-nuc900.o
 obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
 obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
new file mode 100644
index ..5049b521b38e
--- /dev/null
+++ b/drivers/rtc/rtc-mxc_v2.c
@@ -0,0 +1,531 @@
+/*
+ * Copyright (C) 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ */
+
+/*
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+/*
+ * Implementation based on rtc-ds1553.c
+ */
+
+/*!
+ * @defgroup RTC Real Time Clock (RTC) Driver for i.MX53
+ */
+/*!
+ * @file rtc-mxc_v2.c
+ * @brief Real Time Clock interface
+ *
+ * This file contains Real Time Clock interface for Linux.
+ *
+ * @ingroup RTC
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+//#include 
+#define RTC_READ_TIME_47BIT_IOR('p', 0x20, unsigned long long)
+/* blocks until LPSCMR is set, returns difference */
+#define RTC_WAIT_TIME_SET  _IOR('p', 0x21, int64_t)
+
+#define SRTC_LPSCLR_LLPSC_LSH  17  /* start bit for LSB time value */
+
+#define SRTC_LPPDR_INIT   0x41736166   /* init for glitch detect */
+
+#define SRTC_LPCR_SWR_LP  (1 << 0) /* lp software reset */
+#define SRTC_LPCR_EN_LP   (1 << 3) /* lp enable */
+#define SRTC_LPCR_WAE (1 << 4) /* lp wakeup alarm enable */
+#define SRTC_LPCR_SAE (1 << 5) /* lp security alarm enable */
+#define SRTC_LPCR_SI  (1 << 6) /* 

★ lintaowenxue --“2018世界复合材料展览及会议”将于“3月”在“法国巴黎”举行 (地右P1-L-Me)

2017-11-23 Thread linux-kernel-owner
尊敬的 lintaowen...@163.com 企业领导/公司负责人/业界专家,您好:
  
  
新材料为21世纪三大共性关键技术之一,已成为全球经济迅速增长的源动力和提升核心竞争力的战略焦点。材料作为制造业的基础,特别是新材料研究和产业发展的水平与规模,已经成为衡量一个国家科技进步和综合实力的重要标志。在新材料发展与应用中,复合材料占有相当重要的地位,特别广泛的应用在汽车、交通、风能、航空、航天、兵器、船舶、国防、机械、电子、化工、建筑、农业、渔业、纺织、运动器材等领域,一直是世界各国优先发展和竞争激烈的重要行业。
  
  “JEC世界复合材料展览及会议”(JEC world Composites Show & 
Conferences)创办于1963年,每年举办一届,至2017年总共举办了52届,主办单位是法国JEC复合材料发展促进会/JEC集团,中国总展团展商组织单位为映德国际会展集团中国代表处,在北京、上海等地设有分支机构,负责该展会在中国的推广和招商工作(JEC中国总展团报名热线:4000-680-860转8144、5220)。JEC复合材料展已成为世界上历史最悠久、规模最大的复合材料行业专业展览会,展示和反映了当前复合材料行业的最新技术和应用成果。
  
  为了增进国内外复合材料行业的交流与合作,同时展示我国复合材料产业的发展与成就,帮助境内企业开拓国内外市场,中国国际复材协会、映德国际会展集团(YOND 
EXPO)中国代表处已近十年组织中国企业参与该展会,为中国复合材料集团、中材科技、中钢集团、中国建材集团、中国商飞、北京玻钢院、上海杰事杰新材料集团、重庆国际复合材料、中南控股集团、秦皇岛耀华玻璃钢、烟台氨纶、天马集团、华东理工大学、哈尔滨工业大学、巨石集团、中冶集团、金光集团、江苏恒神纤维材料、重庆大学、上海玻璃钢研究院、中南大学、哈尔滨玻璃钢研究院等众多行业巨头和知名机构提供了优质高效的境外展贸服务。
  
  “JEC world 2018 
第五十三世界复合材料展览及会议”将于“3月06-08日”在“法国巴黎展览会议中心”再度举行,我们诚邀全国各地复合材料及新材料相关单位与业界人士加入咱们的中国总展团前往参展参观。
  
  
  有关参展参观“JEC世界复合材料展”事宜,请联络【中国总展团】组办方—— 
全国统一客服热线:4000-580-850(转5220、8144、)、010—6923-6944; 邮箱/QQ:12809395#qq.com; 
微信: CanZhanXiaoXi(参展消息)、ZhanShangZhiJia(展商之家); 
微博:http://weibo.com/jecshow(展会)、http://weibo.com/yingdehuizhan(公司)。
  
  参加JEC展会是一个复合材料及新材料企业走向国际化的标志和途径!
  
  
  
  
__
  
(百万群发系统|为您发送|如不希望再收到此行业资讯|请回复“TD+JEC”至邮箱1055800...@qq.com)


★ lintaowenxue --“2018世界复合材料展览及会议”将于“3月”在“法国巴黎”举行 (地右P1-L-Me)

2017-11-23 Thread linux-kernel-owner
尊敬的 lintaowen...@163.com 企业领导/公司负责人/业界专家,您好:
  
  
新材料为21世纪三大共性关键技术之一,已成为全球经济迅速增长的源动力和提升核心竞争力的战略焦点。材料作为制造业的基础,特别是新材料研究和产业发展的水平与规模,已经成为衡量一个国家科技进步和综合实力的重要标志。在新材料发展与应用中,复合材料占有相当重要的地位,特别广泛的应用在汽车、交通、风能、航空、航天、兵器、船舶、国防、机械、电子、化工、建筑、农业、渔业、纺织、运动器材等领域,一直是世界各国优先发展和竞争激烈的重要行业。
  
  “JEC世界复合材料展览及会议”(JEC world Composites Show & 
Conferences)创办于1963年,每年举办一届,至2017年总共举办了52届,主办单位是法国JEC复合材料发展促进会/JEC集团,中国总展团展商组织单位为映德国际会展集团中国代表处,在北京、上海等地设有分支机构,负责该展会在中国的推广和招商工作(JEC中国总展团报名热线:4000-680-860转8144、5220)。JEC复合材料展已成为世界上历史最悠久、规模最大的复合材料行业专业展览会,展示和反映了当前复合材料行业的最新技术和应用成果。
  
  为了增进国内外复合材料行业的交流与合作,同时展示我国复合材料产业的发展与成就,帮助境内企业开拓国内外市场,中国国际复材协会、映德国际会展集团(YOND 
EXPO)中国代表处已近十年组织中国企业参与该展会,为中国复合材料集团、中材科技、中钢集团、中国建材集团、中国商飞、北京玻钢院、上海杰事杰新材料集团、重庆国际复合材料、中南控股集团、秦皇岛耀华玻璃钢、烟台氨纶、天马集团、华东理工大学、哈尔滨工业大学、巨石集团、中冶集团、金光集团、江苏恒神纤维材料、重庆大学、上海玻璃钢研究院、中南大学、哈尔滨玻璃钢研究院等众多行业巨头和知名机构提供了优质高效的境外展贸服务。
  
  “JEC world 2018 
第五十三世界复合材料展览及会议”将于“3月06-08日”在“法国巴黎展览会议中心”再度举行,我们诚邀全国各地复合材料及新材料相关单位与业界人士加入咱们的中国总展团前往参展参观。
  
  
  有关参展参观“JEC世界复合材料展”事宜,请联络【中国总展团】组办方—— 
全国统一客服热线:4000-580-850(转5220、8144、)、010—6923-6944; 邮箱/QQ:12809395#qq.com; 
微信: CanZhanXiaoXi(参展消息)、ZhanShangZhiJia(展商之家); 
微博:http://weibo.com/jecshow(展会)、http://weibo.com/yingdehuizhan(公司)。
  
  参加JEC展会是一个复合材料及新材料企业走向国际化的标志和途径!
  
  
  
  
__
  
(百万群发系统|为您发送|如不希望再收到此行业资讯|请回复“TD+JEC”至邮箱1055800...@qq.com)


[PATCH] Documentation: dt: rtc-imxdi: imx53-rtc is not compatible

2017-11-16 Thread linux-kernel-dev
From: Patrick Bruenn <p.bru...@beckhoff.com>

rtc-imxdi driver is not compatible with imx53-rtc like the example
suggested.
Only the raw timestamp register offsets match by accident, which has the
effect, that during startup/shutdown system clock syncronization with
rtc seems to work for imx53, too.
However hwclock and rtctest, will not work as expected on imx53.
To avoid future reverts like [1], we should adjust the documentation.

[1] 
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-November/542312.html

Signed-off-by: Patrick Bruenn <p.bru...@beckhoff.com>

---

To: Alessandro Zummo <a.zu...@towertech.it>
To: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Rob Herring <robh...@kernel.org>
Cc: Mark Rutland <mark.rutl...@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Juergen Borleis <j...@pengutronix.de>
Cc: Noel Vellemans <noel.vellem...@visionbms.com>
Cc: Shawn Guo <shawn...@kernel.org>
---
 Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt 
b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
index 323cf26374cb..af853b0ceac5 100644
--- a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
+++ b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
@@ -1,6 +1,6 @@
 * i.MX25 Real Time Clock controller
 
-This binding supports the following chips: i.MX25, i.MX53
+This binding supports the following chips: i.MX25
 
 Required properties:
 - compatible: should be: "fsl,imx25-rtc"
@@ -14,7 +14,7 @@ Optional properties:
 Example:
 
 rtc@80056000 {
-   compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+   compatible = "fsl,imx25-rtc";
reg = <0x80056000 2000>;
interrupts = <29 56>;
 };
-- 
2.11.0




[PATCH] Documentation: dt: rtc-imxdi: imx53-rtc is not compatible

2017-11-16 Thread linux-kernel-dev
From: Patrick Bruenn 

rtc-imxdi driver is not compatible with imx53-rtc like the example
suggested.
Only the raw timestamp register offsets match by accident, which has the
effect, that during startup/shutdown system clock syncronization with
rtc seems to work for imx53, too.
However hwclock and rtctest, will not work as expected on imx53.
To avoid future reverts like [1], we should adjust the documentation.

[1] 
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-November/542312.html

Signed-off-by: Patrick Bruenn 

---

To: Alessandro Zummo 
To: Alexandre Belloni 
Cc: Rob Herring 
Cc: Mark Rutland  (maintainer:OPEN FIRMWARE AND FLATTENED 
DEVICE TREE BINDINGS)
Cc: linux-...@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM)
Cc: devicet...@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE 
TREE BINDINGS)
Cc: linux-kernel@vger.kernel.org (open list)
Cc: Fabio Estevam 
Cc: Juergen Borleis 
Cc: Noel Vellemans 
Cc: Shawn Guo 
---
 Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt 
b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
index 323cf26374cb..af853b0ceac5 100644
--- a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
+++ b/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
@@ -1,6 +1,6 @@
 * i.MX25 Real Time Clock controller
 
-This binding supports the following chips: i.MX25, i.MX53
+This binding supports the following chips: i.MX25
 
 Required properties:
 - compatible: should be: "fsl,imx25-rtc"
@@ -14,7 +14,7 @@ Optional properties:
 Example:
 
 rtc@80056000 {
-   compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+   compatible = "fsl,imx25-rtc";
reg = <0x80056000 2000>;
interrupts = <29 56>;
 };
-- 
2.11.0




[no subject]

2017-09-05 Thread linux-kernel


73233.doc
Description: MS-Word document


[no subject]

2017-09-05 Thread linux-kernel


73233.doc
Description: MS-Word document


★lingwangbrass--“JEC world 2018 世界复合材料展览及会议”将于“3月06-08日”在“法国巴黎”举行 (地右P1-L-Me)

2017-08-26 Thread linux-kernel-owner
尊敬的 lingwangbr...@hotmail.com 企业领导/公司负责人/业界专家,您好:
  
  
新材料为21世纪三大共性关键技术之一,已成为全球经济迅速增长的源动力和提升核心竞争力的战略焦点。材料作为制造业的基础,特别是新材料研究和产业发展的水平与规模,已经成为衡量一个国家科技进步和综合实力的重要标志。在新材料发展与应用中,复合材料占有相当重要的地位,特别广泛的应用在汽车、交通、风能、航空、航天、兵器、船舶、国防、机械、电子、化工、建筑、农业、渔业、纺织、运动器材等领域,一直是世界各国优先发展和竞争激烈的重要行业。
  
  “JEC世界复合材料展览及会议”(JEC world Composites Show & 
Conferences)创办于1963年,每年举办一届,至2017年总共举办了52届,主办单位是法国JEC复合材料发展促进会/JEC集团,中国总展团展商组织单位为映德国际会展集团中国代表处,在北京、上海等地设有分支机构,负责该展会在中国的推广和招商工作(JEC中国总展团报名热线:4000-680-860转8144、5220)。JEC复合材料展已成为世界上历史最悠久、规模最大的复合材料行业专业展览会,展示和反映了当前复合材料行业的最新技术和应用成果。
  
  为了增进国内外复合材料行业的交流与合作,同时展示我国复合材料产业的发展与成就,帮助境内企业开拓国内外市场,中国国际复材协会、映德国际会展集团(YOND 
EXPO)中国代表处已近十年组织中国企业参与该展会,为中国复合材料集团、中材科技、中钢集团、中国建材集团、中国商飞、北京玻钢院、上海杰事杰新材料集团、重庆国际复合材料、中南控股集团、秦皇岛耀华玻璃钢、烟台氨纶、天马集团、华东理工大学、哈尔滨工业大学、巨石集团、中冶集团、金光集团、江苏恒神纤维材料、重庆大学、上海玻璃钢研究院、中南大学、哈尔滨玻璃钢研究院等众多行业巨头和知名机构提供了优质高效的境外展贸服务。
  
  “JEC world 2018 
第五十三世界复合材料展览及会议”将于“3月06-08日”在“法国巴黎展览会议中心”再度举行,我们诚邀全国各地复合材料及新材料相关单位与业界人士加入咱们的中国总展团前往参展参观。
  
  
  有关参展参观“JEC世界复合材料展”事宜,请联络【中国总展团】组办方—— 
全国统一客服热线:4000-580-850(转5220、8144、)、010—6923-6944; 邮箱/QQ:12809395#qq.com; 
微信: CanZhanXiaoXi(参展消息)、ZhanShangZhiJia(展商之家); 
微博:http://weibo.com/jecshow(展会)、http://weibo.com/yingdehuizhan(公司)。
  
  参加JEC展会是一个复合材料及新材料企业走向国际化的标志和途径!
  
  
  
  
__
  
(百万群发系统|为您发送|如不希望再收到此行业资讯|请回复“TD+JEC”至邮箱1055800...@qq.com)


★lingwangbrass--“JEC world 2018 世界复合材料展览及会议”将于“3月06-08日”在“法国巴黎”举行 (地右P1-L-Me)

2017-08-26 Thread linux-kernel-owner
尊敬的 lingwangbr...@hotmail.com 企业领导/公司负责人/业界专家,您好:
  
  
新材料为21世纪三大共性关键技术之一,已成为全球经济迅速增长的源动力和提升核心竞争力的战略焦点。材料作为制造业的基础,特别是新材料研究和产业发展的水平与规模,已经成为衡量一个国家科技进步和综合实力的重要标志。在新材料发展与应用中,复合材料占有相当重要的地位,特别广泛的应用在汽车、交通、风能、航空、航天、兵器、船舶、国防、机械、电子、化工、建筑、农业、渔业、纺织、运动器材等领域,一直是世界各国优先发展和竞争激烈的重要行业。
  
  “JEC世界复合材料展览及会议”(JEC world Composites Show & 
Conferences)创办于1963年,每年举办一届,至2017年总共举办了52届,主办单位是法国JEC复合材料发展促进会/JEC集团,中国总展团展商组织单位为映德国际会展集团中国代表处,在北京、上海等地设有分支机构,负责该展会在中国的推广和招商工作(JEC中国总展团报名热线:4000-680-860转8144、5220)。JEC复合材料展已成为世界上历史最悠久、规模最大的复合材料行业专业展览会,展示和反映了当前复合材料行业的最新技术和应用成果。
  
  为了增进国内外复合材料行业的交流与合作,同时展示我国复合材料产业的发展与成就,帮助境内企业开拓国内外市场,中国国际复材协会、映德国际会展集团(YOND 
EXPO)中国代表处已近十年组织中国企业参与该展会,为中国复合材料集团、中材科技、中钢集团、中国建材集团、中国商飞、北京玻钢院、上海杰事杰新材料集团、重庆国际复合材料、中南控股集团、秦皇岛耀华玻璃钢、烟台氨纶、天马集团、华东理工大学、哈尔滨工业大学、巨石集团、中冶集团、金光集团、江苏恒神纤维材料、重庆大学、上海玻璃钢研究院、中南大学、哈尔滨玻璃钢研究院等众多行业巨头和知名机构提供了优质高效的境外展贸服务。
  
  “JEC world 2018 
第五十三世界复合材料展览及会议”将于“3月06-08日”在“法国巴黎展览会议中心”再度举行,我们诚邀全国各地复合材料及新材料相关单位与业界人士加入咱们的中国总展团前往参展参观。
  
  
  有关参展参观“JEC世界复合材料展”事宜,请联络【中国总展团】组办方—— 
全国统一客服热线:4000-580-850(转5220、8144、)、010—6923-6944; 邮箱/QQ:12809395#qq.com; 
微信: CanZhanXiaoXi(参展消息)、ZhanShangZhiJia(展商之家); 
微博:http://weibo.com/jecshow(展会)、http://weibo.com/yingdehuizhan(公司)。
  
  参加JEC展会是一个复合材料及新材料企业走向国际化的标志和途径!
  
  
  
  
__
  
(百万群发系统|为您发送|如不希望再收到此行业资讯|请回复“TD+JEC”至邮箱1055800...@qq.com)


[PATCH v5 3/4] ARM: dts: imx53: add alternative UART2 configuration

2017-07-26 Thread linux-kernel-dev
From: Patrick Bruenn 

UART2 on EIM_D26 - EIM_D29 pins supports interchanging RXD/TXD pins
and RTS/CTS pins.
One board using these alternate settings is Beckhoff CX9020. Add the
alternative configuration here, to make it available to others, too.

Signed-off-by: Patrick Bruenn 
---
 arch/arm/boot/dts/imx53-pinfunc.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/imx53-pinfunc.h 
b/arch/arm/boot/dts/imx53-pinfunc.h
index aec406bc65eb..59f9c29e3fe2 100644
--- a/arch/arm/boot/dts/imx53-pinfunc.h
+++ b/arch/arm/boot/dts/imx53-pinfunc.h
@@ -524,6 +524,7 @@
 #define MX53_PAD_EIM_D25__UART1_DSR0x140 0x488 
0x000 0x7 0x0
 #define MX53_PAD_EIM_D26__EMI_WEIM_D_260x144 
0x48c 0x000 0x0 0x0
 #define MX53_PAD_EIM_D26__GPIO3_26 0x144 0x48c 
0x000 0x1 0x0
+#define MX53_PAD_EIM_D26__UART2_RXD_MUX0x144 
0x48c 0x880 0x2 0x0
 #define MX53_PAD_EIM_D26__UART2_TXD_MUX0x144 
0x48c 0x000 0x2 0x0
 #define MX53_PAD_EIM_D26__FIRI_RXD 0x144 0x48c 
0x80c 0x3 0x0
 #define MX53_PAD_EIM_D26__IPU_CSI0_D_1 0x144 0x48c 
0x000 0x4 0x0
@@ -533,6 +534,7 @@
 #define MX53_PAD_EIM_D27__EMI_WEIM_D_270x148 
0x490 0x000 0x0 0x0
 #define MX53_PAD_EIM_D27__GPIO3_27 0x148 0x490 
0x000 0x1 0x0
 #define MX53_PAD_EIM_D27__UART2_RXD_MUX0x148 
0x490 0x880 0x2 0x1
+#define MX53_PAD_EIM_D27__UART2_TXD_MUX0x148 
0x490 0x000 0x2 0x0
 #define MX53_PAD_EIM_D27__FIRI_TXD 0x148 0x490 
0x000 0x3 0x0
 #define MX53_PAD_EIM_D27__IPU_CSI0_D_0 0x148 0x490 
0x000 0x4 0x0
 #define MX53_PAD_EIM_D27__IPU_DI1_PIN130x148 
0x490 0x000 0x5 0x0
@@ -541,6 +543,7 @@
 #define MX53_PAD_EIM_D28__EMI_WEIM_D_280x14c 
0x494 0x000 0x0 0x0
 #define MX53_PAD_EIM_D28__GPIO3_28 0x14c 0x494 
0x000 0x1 0x0
 #define MX53_PAD_EIM_D28__UART2_CTS0x14c 0x494 
0x000 0x2 0x0
+#define MX53_PAD_EIM_D28__UART2_RTS0x14c 0x494 
0x87c 0x2 0x0
 #define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO   0x14c 0x494 
0x82c 0x3 0x1
 #define MX53_PAD_EIM_D28__CSPI_MOSI0x14c 0x494 
0x788 0x4 0x1
 #define MX53_PAD_EIM_D28__I2C1_SDA 0x14c 0x494 
0x818 0x5 0x1
@@ -548,6 +551,7 @@
 #define MX53_PAD_EIM_D28__IPU_DI0_PIN130x14c 
0x494 0x000 0x7 0x0
 #define MX53_PAD_EIM_D29__EMI_WEIM_D_290x150 
0x498 0x000 0x0 0x0
 #define MX53_PAD_EIM_D29__GPIO3_29 0x150 0x498 
0x000 0x1 0x0
+#define MX53_PAD_EIM_D29__UART2_CTS0x150 0x498 
0x000 0x2 0x0
 #define MX53_PAD_EIM_D29__UART2_RTS0x150 0x498 
0x87c 0x2 0x1
 #define MX53_PAD_EIM_D29__IPU_DISPB0_SER_RS0x150 0x498 
0x000 0x3 0x0
 #define MX53_PAD_EIM_D29__CSPI_SS0 0x150 0x498 
0x78c 0x4 0x2
-- 
2.11.0




[PATCH v5 3/4] ARM: dts: imx53: add alternative UART2 configuration

2017-07-26 Thread linux-kernel-dev
From: Patrick Bruenn 

UART2 on EIM_D26 - EIM_D29 pins supports interchanging RXD/TXD pins
and RTS/CTS pins.
One board using these alternate settings is Beckhoff CX9020. Add the
alternative configuration here, to make it available to others, too.

Signed-off-by: Patrick Bruenn 
---
 arch/arm/boot/dts/imx53-pinfunc.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/imx53-pinfunc.h 
b/arch/arm/boot/dts/imx53-pinfunc.h
index aec406bc65eb..59f9c29e3fe2 100644
--- a/arch/arm/boot/dts/imx53-pinfunc.h
+++ b/arch/arm/boot/dts/imx53-pinfunc.h
@@ -524,6 +524,7 @@
 #define MX53_PAD_EIM_D25__UART1_DSR0x140 0x488 
0x000 0x7 0x0
 #define MX53_PAD_EIM_D26__EMI_WEIM_D_260x144 
0x48c 0x000 0x0 0x0
 #define MX53_PAD_EIM_D26__GPIO3_26 0x144 0x48c 
0x000 0x1 0x0
+#define MX53_PAD_EIM_D26__UART2_RXD_MUX0x144 
0x48c 0x880 0x2 0x0
 #define MX53_PAD_EIM_D26__UART2_TXD_MUX0x144 
0x48c 0x000 0x2 0x0
 #define MX53_PAD_EIM_D26__FIRI_RXD 0x144 0x48c 
0x80c 0x3 0x0
 #define MX53_PAD_EIM_D26__IPU_CSI0_D_1 0x144 0x48c 
0x000 0x4 0x0
@@ -533,6 +534,7 @@
 #define MX53_PAD_EIM_D27__EMI_WEIM_D_270x148 
0x490 0x000 0x0 0x0
 #define MX53_PAD_EIM_D27__GPIO3_27 0x148 0x490 
0x000 0x1 0x0
 #define MX53_PAD_EIM_D27__UART2_RXD_MUX0x148 
0x490 0x880 0x2 0x1
+#define MX53_PAD_EIM_D27__UART2_TXD_MUX0x148 
0x490 0x000 0x2 0x0
 #define MX53_PAD_EIM_D27__FIRI_TXD 0x148 0x490 
0x000 0x3 0x0
 #define MX53_PAD_EIM_D27__IPU_CSI0_D_0 0x148 0x490 
0x000 0x4 0x0
 #define MX53_PAD_EIM_D27__IPU_DI1_PIN130x148 
0x490 0x000 0x5 0x0
@@ -541,6 +543,7 @@
 #define MX53_PAD_EIM_D28__EMI_WEIM_D_280x14c 
0x494 0x000 0x0 0x0
 #define MX53_PAD_EIM_D28__GPIO3_28 0x14c 0x494 
0x000 0x1 0x0
 #define MX53_PAD_EIM_D28__UART2_CTS0x14c 0x494 
0x000 0x2 0x0
+#define MX53_PAD_EIM_D28__UART2_RTS0x14c 0x494 
0x87c 0x2 0x0
 #define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO   0x14c 0x494 
0x82c 0x3 0x1
 #define MX53_PAD_EIM_D28__CSPI_MOSI0x14c 0x494 
0x788 0x4 0x1
 #define MX53_PAD_EIM_D28__I2C1_SDA 0x14c 0x494 
0x818 0x5 0x1
@@ -548,6 +551,7 @@
 #define MX53_PAD_EIM_D28__IPU_DI0_PIN130x14c 
0x494 0x000 0x7 0x0
 #define MX53_PAD_EIM_D29__EMI_WEIM_D_290x150 
0x498 0x000 0x0 0x0
 #define MX53_PAD_EIM_D29__GPIO3_29 0x150 0x498 
0x000 0x1 0x0
+#define MX53_PAD_EIM_D29__UART2_CTS0x150 0x498 
0x000 0x2 0x0
 #define MX53_PAD_EIM_D29__UART2_RTS0x150 0x498 
0x87c 0x2 0x1
 #define MX53_PAD_EIM_D29__IPU_DISPB0_SER_RS0x150 0x498 
0x000 0x3 0x0
 #define MX53_PAD_EIM_D29__CSPI_SS0 0x150 0x498 
0x78c 0x4 0x2
-- 
2.11.0




[PATCH v5 2/4] ARM: dts: imx53: add srtc node

2017-07-26 Thread linux-kernel-dev
From: Patrick Bruenn 

The i.MX53 has an integrated secure real time clock. Add it to the dtsi.

Signed-off-by: Patrick Bruenn 
---
 arch/arm/boot/dts/imx53.dtsi | 9 +
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 2e516f4985e4..8bf0d89cdd35 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -433,6 +433,15 @@
clock-names = "ipg", "per";
};
 
+   srtc: srtc@53fa4000 {
+   compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   interrupt-parent = <>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+   clock-names = "ipg";
+   };
+
iomuxc: iomuxc@53fa8000 {
compatible = "fsl,imx53-iomuxc";
reg = <0x53fa8000 0x4000>;
-- 
2.11.0




[PATCH v5 2/4] ARM: dts: imx53: add srtc node

2017-07-26 Thread linux-kernel-dev
From: Patrick Bruenn 

The i.MX53 has an integrated secure real time clock. Add it to the dtsi.

Signed-off-by: Patrick Bruenn 
---
 arch/arm/boot/dts/imx53.dtsi | 9 +
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 2e516f4985e4..8bf0d89cdd35 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -433,6 +433,15 @@
clock-names = "ipg", "per";
};
 
+   srtc: srtc@53fa4000 {
+   compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+   reg = <0x53fa4000 0x4000>;
+   interrupts = <24>;
+   interrupt-parent = <>;
+   clocks = < IMX5_CLK_SRTC_GATE>;
+   clock-names = "ipg";
+   };
+
iomuxc: iomuxc@53fa8000 {
compatible = "fsl,imx53-iomuxc";
reg = <0x53fa8000 0x4000>;
-- 
2.11.0




[PATCH v5 1/4] dt-bindings: arm: Add entry for Beckhoff CX9020

2017-07-26 Thread linux-kernel-dev
From: Patrick Bruenn 

- add vendor prefix bhf for Beckhoff
- add new board binding bhf,cx9020

Signed-off-by: Patrick Bruenn 
---
 Documentation/devicetree/bindings/arm/bhf.txt | 6 ++
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 MAINTAINERS   | 5 +
 3 files changed, 12 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bhf.txt

diff --git a/Documentation/devicetree/bindings/arm/bhf.txt 
b/Documentation/devicetree/bindings/arm/bhf.txt
new file mode 100644
index ..886b503caf9c
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bhf.txt
@@ -0,0 +1,6 @@
+Beckhoff Automation Platforms Device Tree Bindings
+--
+
+CX9020 Embedded PC
+Required root node properties:
+- compatible = "bhf,cx9020", "fsl,imx53";
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
b/Documentation/devicetree/bindings/vendor-prefixes.txt
index daf465bef758..20c2cf57ebc9 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -47,6 +47,7 @@ avic  Shanghai AVIC Optoelectronics Co., Ltd.
 axentiaAxentia Technologies AB
 axis   Axis Communications AB
 bananapi BIPAI KEJI LIMITED
+bhfBeckhoff Automation GmbH & Co. KG
 boeBOE Technology Group Co., Ltd.
 bosch  Bosch Sensortec GmbH
 boundary   Boundary Devices Inc.
diff --git a/MAINTAINERS b/MAINTAINERS
index f66488dfdbc9..e1d3111aea97 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1196,6 +1196,11 @@ F:   arch/arm/boot/dts/sama*.dtsi
 F: arch/arm/include/debug/at91.S
 F: drivers/memory/atmel*
 
+ARM/BECKHOFF SUPPORT
+M: Patrick Bruenn 
+S: Maintained
+F: Documentation/devicetree/bindings/arm/bhf.txt
+
 ARM/CALXEDA HIGHBANK ARCHITECTURE
 M: Rob Herring 
 L: linux-arm-ker...@lists.infradead.org (moderated for non-subscribers)
-- 
2.11.0




[PATCH v5 1/4] dt-bindings: arm: Add entry for Beckhoff CX9020

2017-07-26 Thread linux-kernel-dev
From: Patrick Bruenn 

- add vendor prefix bhf for Beckhoff
- add new board binding bhf,cx9020

Signed-off-by: Patrick Bruenn 
---
 Documentation/devicetree/bindings/arm/bhf.txt | 6 ++
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 MAINTAINERS   | 5 +
 3 files changed, 12 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/bhf.txt

diff --git a/Documentation/devicetree/bindings/arm/bhf.txt 
b/Documentation/devicetree/bindings/arm/bhf.txt
new file mode 100644
index ..886b503caf9c
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bhf.txt
@@ -0,0 +1,6 @@
+Beckhoff Automation Platforms Device Tree Bindings
+--
+
+CX9020 Embedded PC
+Required root node properties:
+- compatible = "bhf,cx9020", "fsl,imx53";
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
b/Documentation/devicetree/bindings/vendor-prefixes.txt
index daf465bef758..20c2cf57ebc9 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -47,6 +47,7 @@ avic  Shanghai AVIC Optoelectronics Co., Ltd.
 axentiaAxentia Technologies AB
 axis   Axis Communications AB
 bananapi BIPAI KEJI LIMITED
+bhfBeckhoff Automation GmbH & Co. KG
 boeBOE Technology Group Co., Ltd.
 bosch  Bosch Sensortec GmbH
 boundary   Boundary Devices Inc.
diff --git a/MAINTAINERS b/MAINTAINERS
index f66488dfdbc9..e1d3111aea97 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1196,6 +1196,11 @@ F:   arch/arm/boot/dts/sama*.dtsi
 F: arch/arm/include/debug/at91.S
 F: drivers/memory/atmel*
 
+ARM/BECKHOFF SUPPORT
+M: Patrick Bruenn 
+S: Maintained
+F: Documentation/devicetree/bindings/arm/bhf.txt
+
 ARM/CALXEDA HIGHBANK ARCHITECTURE
 M: Rob Herring 
 L: linux-arm-ker...@lists.infradead.org (moderated for non-subscribers)
-- 
2.11.0




[PATCH v5 4/4] ARM: dts: imx: add CX9020 Embedded PC device tree

2017-07-26 Thread linux-kernel-dev
From: Patrick Bruenn 

The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- no SATA connector
- CCAT FPGA connected to emi
- enable rtc

Signed-off-by: Patrick Bruenn 
---
 arch/arm/boot/dts/Makefile |   1 +
 arch/arm/boot/dts/imx53-cx9020.dts | 297 +
 2 files changed, 298 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 4b17f35dc9a7..f0ba9be523e0 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -340,6 +340,7 @@ dtb-$(CONFIG_SOC_IMX51) += \
imx51-ts4800.dtb
 dtb-$(CONFIG_SOC_IMX53) += \
imx53-ard.dtb \
+   imx53-cx9020.dtb \
imx53-m53evk.dtb \
imx53-mba53.dtb \
imx53-qsb.dtb \
diff --git a/arch/arm/boot/dts/imx53-cx9020.dts 
b/arch/arm/boot/dts/imx53-cx9020.dts
new file mode 100644
index ..4f54fd4418a3
--- /dev/null
+++ b/arch/arm/boot/dts/imx53-cx9020.dts
@@ -0,0 +1,297 @@
+/*
+ * Copyright 2017 Beckhoff Automation GmbH & Co. KG
+ * based on imx53-qsb.dts
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx53.dtsi"
+
+/ {
+   model = "Beckhoff CX9020 Embedded PC";
+   compatible = "bhf,cx9020", "fsl,imx53";
+
+   chosen {
+   stdout-path = 
+   };
+
+   memory {
+   reg = <0x7000 0x2000>,
+ <0xb000 0x2000>;
+   };
+
+   display-0 {
+   #address-cells =<1>;
+   #size-cells = <0>;
+   compatible = "fsl,imx-parallel-display";
+   interface-pix-fmt = "rgb24";
+   pinctrl-names = "default";
+   pinctrl-0 = <_ipu_disp0>;
+
+   port@0 {
+   reg = <0>;
+
+   display0_in: endpoint {
+   remote-endpoint = <_di0_disp0>;
+   };
+   };
+
+   port@1 {
+   reg = <1>;
+
+   display0_out: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+   };
+
+   dvi-connector {
+   compatible = "dvi-connector";
+   ddc-i2c-bus = <>;
+   digital;
+
+   port {
+   dvi_connector_in: endpoint {
+   remote-endpoint = <_out>;
+   };
+   };
+   };
+
+   dvi-converter {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "ti,tfp410";
+
+   port@0 {
+   reg = <0>;
+
+   tfp410_in: endpoint {
+   remote-endpoint = <_out>;
+   };
+   };
+
+   port@1 {
+   reg = <1>;
+
+   tfp410_out: endpoint {
+   remote-endpoint = <_connector_in>;
+   };
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   pwr-r {
+   gpios = < 22 GPIO_ACTIVE_HIGH>;
+   default-state = "off";
+   };
+
+   pwr-g {
+   gpios = < 24 GPIO_ACTIVE_HIGH>;
+   default-state = "on";
+   };
+
+   pwr-b {
+   gpios = < 23 GPIO_ACTIVE_HIGH>;
+   default-state = "off";
+   };
+
+   sd1-b {
+   linux,default-trigger = "mmc0";
+   gpios = < 20 GPIO_ACTIVE_HIGH>;
+   };
+
+   sd2-b {
+   linux,default-trigger = "mmc1";
+   gpios = < 17 GPIO_ACTIVE_HIGH>;
+   };
+   };
+
+   regulator-3p2v {
+   compatible = "regulator-fixed";
+   regulator-name = "3P2V";
+   regulator-min-microvolt = <320>;
+   regulator-max-microvolt = <320>;
+   regulator-always-on;
+   };
+
+   reg_usb_vbus: regulator-vbus {
+   compatible = "regulator-fixed";
+   regulator-name = "usb_vbus";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   gpio = < 8 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   };
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_esdhc1>;
+   

[PATCH v5 4/4] ARM: dts: imx: add CX9020 Embedded PC device tree

2017-07-26 Thread linux-kernel-dev
From: Patrick Bruenn 

The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- no SATA connector
- CCAT FPGA connected to emi
- enable rtc

Signed-off-by: Patrick Bruenn 
---
 arch/arm/boot/dts/Makefile |   1 +
 arch/arm/boot/dts/imx53-cx9020.dts | 297 +
 2 files changed, 298 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx53-cx9020.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 4b17f35dc9a7..f0ba9be523e0 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -340,6 +340,7 @@ dtb-$(CONFIG_SOC_IMX51) += \
imx51-ts4800.dtb
 dtb-$(CONFIG_SOC_IMX53) += \
imx53-ard.dtb \
+   imx53-cx9020.dtb \
imx53-m53evk.dtb \
imx53-mba53.dtb \
imx53-qsb.dtb \
diff --git a/arch/arm/boot/dts/imx53-cx9020.dts 
b/arch/arm/boot/dts/imx53-cx9020.dts
new file mode 100644
index ..4f54fd4418a3
--- /dev/null
+++ b/arch/arm/boot/dts/imx53-cx9020.dts
@@ -0,0 +1,297 @@
+/*
+ * Copyright 2017 Beckhoff Automation GmbH & Co. KG
+ * based on imx53-qsb.dts
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx53.dtsi"
+
+/ {
+   model = "Beckhoff CX9020 Embedded PC";
+   compatible = "bhf,cx9020", "fsl,imx53";
+
+   chosen {
+   stdout-path = 
+   };
+
+   memory {
+   reg = <0x7000 0x2000>,
+ <0xb000 0x2000>;
+   };
+
+   display-0 {
+   #address-cells =<1>;
+   #size-cells = <0>;
+   compatible = "fsl,imx-parallel-display";
+   interface-pix-fmt = "rgb24";
+   pinctrl-names = "default";
+   pinctrl-0 = <_ipu_disp0>;
+
+   port@0 {
+   reg = <0>;
+
+   display0_in: endpoint {
+   remote-endpoint = <_di0_disp0>;
+   };
+   };
+
+   port@1 {
+   reg = <1>;
+
+   display0_out: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+   };
+
+   dvi-connector {
+   compatible = "dvi-connector";
+   ddc-i2c-bus = <>;
+   digital;
+
+   port {
+   dvi_connector_in: endpoint {
+   remote-endpoint = <_out>;
+   };
+   };
+   };
+
+   dvi-converter {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   compatible = "ti,tfp410";
+
+   port@0 {
+   reg = <0>;
+
+   tfp410_in: endpoint {
+   remote-endpoint = <_out>;
+   };
+   };
+
+   port@1 {
+   reg = <1>;
+
+   tfp410_out: endpoint {
+   remote-endpoint = <_connector_in>;
+   };
+   };
+   };
+
+   leds {
+   compatible = "gpio-leds";
+
+   pwr-r {
+   gpios = < 22 GPIO_ACTIVE_HIGH>;
+   default-state = "off";
+   };
+
+   pwr-g {
+   gpios = < 24 GPIO_ACTIVE_HIGH>;
+   default-state = "on";
+   };
+
+   pwr-b {
+   gpios = < 23 GPIO_ACTIVE_HIGH>;
+   default-state = "off";
+   };
+
+   sd1-b {
+   linux,default-trigger = "mmc0";
+   gpios = < 20 GPIO_ACTIVE_HIGH>;
+   };
+
+   sd2-b {
+   linux,default-trigger = "mmc1";
+   gpios = < 17 GPIO_ACTIVE_HIGH>;
+   };
+   };
+
+   regulator-3p2v {
+   compatible = "regulator-fixed";
+   regulator-name = "3P2V";
+   regulator-min-microvolt = <320>;
+   regulator-max-microvolt = <320>;
+   regulator-always-on;
+   };
+
+   reg_usb_vbus: regulator-vbus {
+   compatible = "regulator-fixed";
+   regulator-name = "usb_vbus";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   gpio = < 8 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   };
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_esdhc1>;
+   cd-gpios = < 1 GPIO_ACTIVE_LOW>;
+   

  1   2   3   4   >