Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1239480 > unrolled thread

RE: [PATCH v2 0/7] Add support for Exynos SROM Controller driver

Started byPavel Fedin <p.fedin@samsung.com>
First post2015-10-05 13:40 +0200
Last post2015-10-06 02:30 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [PATCH v2 0/7] Add support for Exynos SROM Controller driver Pavel Fedin <p.fedin@samsung.com> - 2015-10-05 13:40 +0200
    Re: [PATCH v2 0/7] Add support for Exynos SROM Controller driver Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-10-05 14:50 +0200
      RE: [PATCH v2 0/7] Add support for Exynos SROM Controller driver Pavel Fedin <p.fedin@samsung.com> - 2015-10-05 15:20 +0200
        Re: [PATCH v2 0/7] Add support for Exynos SROM Controller driver Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-10-06 02:30 +0200

#1239480 — RE: [PATCH v2 0/7] Add support for Exynos SROM Controller driver

FromPavel Fedin <p.fedin@samsung.com>
Date2015-10-05 13:40 +0200
SubjectRE: [PATCH v2 0/7] Add support for Exynos SROM Controller driver
Message-ID<qgchA-64T-23@gated-at.bofh.it>
 Hello!

> This patch set adds support for Exynos SROM controller DT based driver.
> Currently SROM register sets are used only during S2R, so driver
> basically added for taking care of S2R. It will help us in removing
> static mapping from exynos.c and other extra code handline during S2R.

 Very good news, but, your driver seems not to do anything except suspend/resume. But how do i add
some device plugged into it? In order to be operational, its outputs have to be configured. But how
do i do it with your driver? For example, on SMDK boards SROM controller is used to connect SMSC9111
etherner chip.
 Currently i use hardcoded initialization based on of_machine_is_compatible(), but i believe this
would be considered a hack and such a thing cannot be pushed upstream. I guess i have to put all
needed configuration into device tree somehow. But how? Are there any recommentations?

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1239517

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2015-10-05 14:50 +0200
Message-ID<qgdnk-7Bp-21@gated-at.bofh.it>
In reply to#1239480
W dniu 05.10.2015 o 20:36, Pavel Fedin pisze:
>  Hello!
> 
>> This patch set adds support for Exynos SROM controller DT based driver.
>> Currently SROM register sets are used only during S2R, so driver
>> basically added for taking care of S2R. It will help us in removing
>> static mapping from exynos.c and other extra code handline during S2R.
> 
>  Very good news, but, your driver seems not to do anything except suspend/resume. But how do i add
> some device plugged into it? In order to be operational, its outputs have to be configured. But how
> do i do it with your driver? For example, on SMDK boards SROM controller is used to connect SMSC9111
> etherner chip.

That is interesting. What do you mean by that? Although SROM controller
can access external memory (SRAM, ROM) but it is not exactly a bus. How
is the SMSC9111 "connected"? What interface or protocol is used?

>  Currently i use hardcoded initialization based on of_machine_is_compatible(), but i believe this
> would be considered a hack and such a thing cannot be pushed upstream. I guess i have to put all
> needed configuration into device tree somehow. But how? Are there any recommentations?

I am sorry but I cannot figure out what exactly are you talking about.
The Device Tree is the glue to describe the board, the hardware and its
configuration. Please elaborate a little more.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1239546

FromPavel Fedin <p.fedin@samsung.com>
Date2015-10-05 15:20 +0200
Message-ID<qgdQm-8oB-7@gated-at.bofh.it>
In reply to#1239517
 Hello!

> That is interesting. What do you mean by that? Although SROM controller
> can access external memory (SRAM, ROM) but it is not exactly a bus. How
> is the SMSC9111 "connected"? What interface or protocol is used?

 SROM controller actually provides a demultiplexed external address and data bus. This way you could
hook up old good ROM chip to it (hence its name). However, you can plug in there anything else with
the appropriate interface, and SMSC9111 uses exactly that. Just some address + control + data wires.
Therefore, you can think of SROMc as a simple bus.

> I am sorry but I cannot figure out what exactly are you talking about.
> The Device Tree is the glue to describe the board, the hardware and its
> configuration. Please elaborate a little more.

 Yes, exactly that. SROM controller has 4 outputs, and for every of these outputs you have to choose
mode and timings. Once you set them correctly, you can use peripherial behind them. These timings
actually depend on the actual peripherial.

 By this time i remembered that u-boot guys also did something with this. And here are links:
http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/dts/exynos5250-smdk5250.dts;h=8b695442b1a29dec4e3
53ebd3cfee0ff89f218a6;hb=HEAD#l43 - this is how connection is described
http://git.denx.de/?p=u-boot.git;a=blob;f=board/samsung/common/board.c;h=d32c75de50858f131284e28db0c
7ed55883f1cb0;hb=HEAD#l184 - and this is parsing code

 There's only one small problem with their code. "bank" parameter is device-wide, therefore you
cannot configure more than one bank. For SMDK boards it's OK, but in future you may run into problem
with this.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1240046

FromKrzysztof Kozlowski <k.kozlowski@samsung.com>
Date2015-10-06 02:30 +0200
Message-ID<qgoiL-6Ej-13@gated-at.bofh.it>
In reply to#1239546
On 05.10.2015 22:18, Pavel Fedin wrote:
>  Hello!
> 
>> That is interesting. What do you mean by that? Although SROM controller
>> can access external memory (SRAM, ROM) but it is not exactly a bus. How
>> is the SMSC9111 "connected"? What interface or protocol is used?
> 
>  SROM controller actually provides a demultiplexed external address and data bus. This way you could
> hook up old good ROM chip to it (hence its name). However, you can plug in there anything else with
> the appropriate interface, and SMSC9111 uses exactly that. Just some address + control + data wires.
> Therefore, you can think of SROMc as a simple bus.

Ah, okay, thanks for details.

> 
>> I am sorry but I cannot figure out what exactly are you talking about.
>> The Device Tree is the glue to describe the board, the hardware and its
>> configuration. Please elaborate a little more.
> 
>  Yes, exactly that. SROM controller has 4 outputs, and for every of these outputs you have to choose
> mode and timings. Once you set them correctly, you can use peripherial behind them. These timings
> actually depend on the actual peripherial.
> 
>  By this time i remembered that u-boot guys also did something with this. And here are links:
> http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/dts/exynos5250-smdk5250.dts;h=8b695442b1a29dec4e3
> 53ebd3cfee0ff89f218a6;hb=HEAD#l43 - this is how connection is described
> http://git.denx.de/?p=u-boot.git;a=blob;f=board/samsung/common/board.c;h=d32c75de50858f131284e28db0c
> 7ed55883f1cb0;hb=HEAD#l184 - and this is parsing code

I see... Pankaj's driver was not developed for that purpose. You would
have to extend it. For the SROMC driver there shouldn't be much work to
do: just parse additional bindings and configure the controller for
ethernet adapter.

>  There's only one small problem with their code. "bank" parameter is device-wide, therefore you
> cannot configure more than one bank. For SMDK boards it's OK, but in future you may run into problem
> with this.

You are not bound by u-boot bindings anyhow (at least to my
understanding). You can try to re-use them but if some binding is
problematic then just create your own.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web