Re: [PATCH v2 0/7] Add support for Exynos SROM Controller driver
Hi Krzysztof, On Tuesday 25 August 2015 07:48 AM, Krzysztof Kozlowski wrote: On 24.08.2015 17:02, Pankaj Dubey wrote: 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. This patch set also updated exynos4 and exynos5 dtsi files for with device node for srom, and added binding documentation for the same. First two patches are some minor cleanup in mach-exynos. Patchset v1 was posted here[1] [1]: https://lkml.org/lkml/2015/4/29/98 Changes since v1: - Rebased to latest kgene tree. - Addressed review comments from Krzysztof Kozlowski. - Add two new patches for minor cleanup in exynos.c and map.h Pankaj Dubey (7): ARM: EXYNOS: remove unused static mapping of CMU for exynos5 ARM: EXYNOS: code cleanup in map.h drivers: soc: add support for exynos SROM driver ARM: EXYNOS: Remove SROM related register settings from mach-exynos ARM: dts: add SROM device node for exynos4 ARM: dts: add SROM device node for exynos5 Documentation: dt-bindings: add exynos-srom binding information One more thing: please update the existing Exynos entry in maintainers so it would cover drivers/soc/samsung. Thanks for review, and sorry for late reply. I have updated v3 version of this patch series addressing most of your review comments. Please do let me know if still it has any concern. Regarding Pavel's comment of handling any other external peripheral which can be hooked into srom can be handled as feature addition on top of this basic driver based on requirement. Thanks, Pankaj Dubey Best regards, Krzysztof .../bindings/arm/samsung/exynos-srom.txt | 12 ++ arch/arm/boot/dts/exynos4.dtsi | 5 + arch/arm/boot/dts/exynos5.dtsi | 5 + arch/arm/mach-exynos/Kconfig | 2 + arch/arm/mach-exynos/common.h | 2 - arch/arm/mach-exynos/exynos.c | 22 arch/arm/mach-exynos/include/mach/map.h| 8 -- arch/arm/mach-exynos/regs-srom.h | 53 arch/arm/mach-exynos/suspend.c | 20 +-- arch/arm/plat-samsung/include/plat/map-s5p.h | 1 - drivers/soc/Kconfig| 1 + drivers/soc/Makefile | 1 + drivers/soc/samsung/Kconfig| 13 ++ drivers/soc/samsung/Makefile | 1 + drivers/soc/samsung/exynos-srom.c | 143 + drivers/soc/samsung/exynos-srom.h | 51 16 files changed, 236 insertions(+), 104 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-srom.txt delete mode 100644 arch/arm/mach-exynos/regs-srom.h create mode 100644 drivers/soc/samsung/Kconfig create mode 100644 drivers/soc/samsung/Makefile create mode 100644 drivers/soc/samsung/exynos-srom.c create mode 100644 drivers/soc/samsung/exynos-srom.h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 0/7] Add support for Exynos SROM Controller driver
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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 0/7] Add support for Exynos SROM Controller driver
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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 0/7] Add support for Exynos SROM Controller driver
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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v2 0/7] Add support for Exynos SROM Controller driver
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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 0/7] Add support for Exynos SROM Controller driver
On 08/24/15 17:02, Pankaj Dubey wrote: > 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. > > This patch set also updated exynos4 and exynos5 dtsi files for with device > node for srom, and added binding documentation for the same. > > First two patches are some minor cleanup in mach-exynos. > > Patchset v1 was posted here[1] > [1]: https://lkml.org/lkml/2015/4/29/98 > > Changes since v1: > - Rebased to latest kgene tree. > - Addressed review comments from Krzysztof Kozlowski. > - Add two new patches for minor cleanup in exynos.c and map.h > > Pankaj Dubey (7): > ARM: EXYNOS: remove unused static mapping of CMU for exynos5 > ARM: EXYNOS: code cleanup in map.h > drivers: soc: add support for exynos SROM driver > ARM: EXYNOS: Remove SROM related register settings from mach-exynos > ARM: dts: add SROM device node for exynos4 > ARM: dts: add SROM device node for exynos5 > Documentation: dt-bindings: add exynos-srom binding information > > .../bindings/arm/samsung/exynos-srom.txt | 12 ++ > arch/arm/boot/dts/exynos4.dtsi | 5 + > arch/arm/boot/dts/exynos5.dtsi | 5 + > arch/arm/mach-exynos/Kconfig | 2 + > arch/arm/mach-exynos/common.h | 2 - > arch/arm/mach-exynos/exynos.c | 22 > arch/arm/mach-exynos/include/mach/map.h| 8 -- > arch/arm/mach-exynos/regs-srom.h | 53 > arch/arm/mach-exynos/suspend.c | 20 +-- > arch/arm/plat-samsung/include/plat/map-s5p.h | 1 - > drivers/soc/Kconfig| 1 + > drivers/soc/Makefile | 1 + > drivers/soc/samsung/Kconfig| 13 ++ > drivers/soc/samsung/Makefile | 1 + > drivers/soc/samsung/exynos-srom.c | 143 > + > drivers/soc/samsung/exynos-srom.h | 51 > 16 files changed, 236 insertions(+), 104 deletions(-) > create mode 100644 > Documentation/devicetree/bindings/arm/samsung/exynos-srom.txt > delete mode 100644 arch/arm/mach-exynos/regs-srom.h > create mode 100644 drivers/soc/samsung/Kconfig > create mode 100644 drivers/soc/samsung/Makefile > create mode 100644 drivers/soc/samsung/exynos-srom.c > create mode 100644 drivers/soc/samsung/exynos-srom.h > Hi Pankaj, Can you please address comments as per Krzysztof's review?... - Kukjin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2 0/7] Add support for Exynos SROM Controller driver
On 24.08.2015 17:02, Pankaj Dubey wrote: > 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. > > This patch set also updated exynos4 and exynos5 dtsi files for with device > node for srom, and added binding documentation for the same. > > First two patches are some minor cleanup in mach-exynos. > > Patchset v1 was posted here[1] > [1]: https://lkml.org/lkml/2015/4/29/98 > > Changes since v1: > - Rebased to latest kgene tree. > - Addressed review comments from Krzysztof Kozlowski. > - Add two new patches for minor cleanup in exynos.c and map.h > > Pankaj Dubey (7): > ARM: EXYNOS: remove unused static mapping of CMU for exynos5 > ARM: EXYNOS: code cleanup in map.h > drivers: soc: add support for exynos SROM driver > ARM: EXYNOS: Remove SROM related register settings from mach-exynos > ARM: dts: add SROM device node for exynos4 > ARM: dts: add SROM device node for exynos5 > Documentation: dt-bindings: add exynos-srom binding information One more thing: please update the existing Exynos entry in maintainers so it would cover drivers/soc/samsung. Best regards, Krzysztof > > .../bindings/arm/samsung/exynos-srom.txt | 12 ++ > arch/arm/boot/dts/exynos4.dtsi | 5 + > arch/arm/boot/dts/exynos5.dtsi | 5 + > arch/arm/mach-exynos/Kconfig | 2 + > arch/arm/mach-exynos/common.h | 2 - > arch/arm/mach-exynos/exynos.c | 22 > arch/arm/mach-exynos/include/mach/map.h| 8 -- > arch/arm/mach-exynos/regs-srom.h | 53 > arch/arm/mach-exynos/suspend.c | 20 +-- > arch/arm/plat-samsung/include/plat/map-s5p.h | 1 - > drivers/soc/Kconfig| 1 + > drivers/soc/Makefile | 1 + > drivers/soc/samsung/Kconfig| 13 ++ > drivers/soc/samsung/Makefile | 1 + > drivers/soc/samsung/exynos-srom.c | 143 > + > drivers/soc/samsung/exynos-srom.h | 51 > 16 files changed, 236 insertions(+), 104 deletions(-) > create mode 100644 > Documentation/devicetree/bindings/arm/samsung/exynos-srom.txt > delete mode 100644 arch/arm/mach-exynos/regs-srom.h > create mode 100644 drivers/soc/samsung/Kconfig > create mode 100644 drivers/soc/samsung/Makefile > create mode 100644 drivers/soc/samsung/exynos-srom.c > create mode 100644 drivers/soc/samsung/exynos-srom.h > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v2 0/7] Add support for Exynos SROM Controller driver
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. This patch set also updated exynos4 and exynos5 dtsi files for with device node for srom, and added binding documentation for the same. First two patches are some minor cleanup in mach-exynos. Patchset v1 was posted here[1] [1]: https://lkml.org/lkml/2015/4/29/98 Changes since v1: - Rebased to latest kgene tree. - Addressed review comments from Krzysztof Kozlowski. - Add two new patches for minor cleanup in exynos.c and map.h Pankaj Dubey (7): ARM: EXYNOS: remove unused static mapping of CMU for exynos5 ARM: EXYNOS: code cleanup in map.h drivers: soc: add support for exynos SROM driver ARM: EXYNOS: Remove SROM related register settings from mach-exynos ARM: dts: add SROM device node for exynos4 ARM: dts: add SROM device node for exynos5 Documentation: dt-bindings: add exynos-srom binding information .../bindings/arm/samsung/exynos-srom.txt | 12 ++ arch/arm/boot/dts/exynos4.dtsi | 5 + arch/arm/boot/dts/exynos5.dtsi | 5 + arch/arm/mach-exynos/Kconfig | 2 + arch/arm/mach-exynos/common.h | 2 - arch/arm/mach-exynos/exynos.c | 22 arch/arm/mach-exynos/include/mach/map.h| 8 -- arch/arm/mach-exynos/regs-srom.h | 53 arch/arm/mach-exynos/suspend.c | 20 +-- arch/arm/plat-samsung/include/plat/map-s5p.h | 1 - drivers/soc/Kconfig| 1 + drivers/soc/Makefile | 1 + drivers/soc/samsung/Kconfig| 13 ++ drivers/soc/samsung/Makefile | 1 + drivers/soc/samsung/exynos-srom.c | 143 + drivers/soc/samsung/exynos-srom.h | 51 16 files changed, 236 insertions(+), 104 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/samsung/exynos-srom.txt delete mode 100644 arch/arm/mach-exynos/regs-srom.h create mode 100644 drivers/soc/samsung/Kconfig create mode 100644 drivers/soc/samsung/Makefile create mode 100644 drivers/soc/samsung/exynos-srom.c create mode 100644 drivers/soc/samsung/exynos-srom.h -- 2.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/