Hello,
the following patch series adds the common platform code for configuration
of the MIPI CSIS and MIPI DSIM PHYs on S5PV210 and S5PV310 SoCs.
The spinlock is used to avoid races while the common PHY control register
is accessed from within MIPI DSIM and MIPI CSIS drivers.
The common PHY enable bit is cleared only when both CSIS and DSIM devices
are not in use.
The patch series contains:
[PATCH/RFC 1/3] ARM: S5P: Add a platform callback for MIPI CSIS PHY control
[PATCH/RFC 2/3] ARM: S5PV310: Add a platform helper for MIPI DSIM/CSIS setup
[PATCH/RFC 3/3] ARM: S5PV210: Add a platform helper for MIPI DSIM/CSIS setup
Rebased onto kgene-for-next branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
Regards,
Sylwester
--
Sylwester Nawrocki
Samsung Poland R&D Center
The phy_enable callback in struct s5p_platform_mipi_csis is added
to allow the CSIS driver to control its PHY enable and reset signals.
This allows to use same MIPI CSIS driver across various SoCs.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/plat-s5p/dev-csis0.c | 2 +-
arch/arm/plat-s5p/dev-csis1.c | 2 +-
arch/arm/plat-s5p/include/plat/csis.h | 28 --------------------
arch/arm/plat-s5p/include/plat/mipi_csis.h | 39 ++++++++++++++++++++++++++++
4 files changed, 41 insertions(+), 30 deletions(-)
delete mode 100644 arch/arm/plat-s5p/include/plat/csis.h
create mode 100644 arch/arm/plat-s5p/include/plat/mipi_csis.h
@@ -1,28 +0,0 @@-/*- * Copyright (C) 2010 Samsung Electronics- *- * S5P series MIPI CSI slave device support- *- * This program is free software; you can redistribute it and/or modify- * it under the terms of the GNU General Public License version 2 as- * published by the Free Software Foundation.- */--#ifndef PLAT_S5P_CSIS_H_-#define PLAT_S5P_CSIS_H_ __FILE__--/**- * struct s5p_platform_mipi_csis - platform data for MIPI-CSIS- * @clk_rate: bus clock frequency- * @lanes: number of data lanes used- * @alignment: data alignment in bits- * @hs_settle: HS-RX settle time- */-struct s5p_platform_mipi_csis {- unsigned long clk_rate;- u8 lanes;- u8 alignment;- u8 hs_settle;-};--#endif /* PLAT_S5P_CSIS_H_ */
MIPI_PHYn_CONTROL registers are shared between MIPI DSIM
and MIPI CSIS drivers so a spinlock is used to protect multiple
access to these registers. Also a proper state of a common
PHY enable bit is maintained in order to avoid a DSIM
and CSIS driver conflict.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s5pv310/Kconfig | 6 ++
arch/arm/mach-s5pv310/Makefile | 2 +
arch/arm/mach-s5pv310/include/mach/map.h | 7 +--
arch/arm/mach-s5pv310/include/mach/regs-pmu.h | 6 ++
arch/arm/mach-s5pv310/setup-mipi.c | 62 +++++++++++++++++++++++++
5 files changed, 79 insertions(+), 4 deletions(-)
create mode 100644 arch/arm/mach-s5pv310/setup-mipi.c
Hello,
the following patch series adds the common platform code for configuration
of the MIPI CSIS and MIPI DSIM PHYs on S5PV210 and S5PV310 SoCs.
The spinlock is used to avoid races while the common PHY control register
is accessed from within MIPI DSIM and MIPI CSIS drivers.
The common PHY enable bit is cleared only when both CSIS and DSIM devices
are not in use.
The patch series contains:
[PATCH/RFC 1/3] ARM: S5P: Add a platform callback for MIPI CSIS PHY control
[PATCH/RFC 2/3] ARM: S5PV310: Add a platform helper for MIPI DSIM/CSIS setup
[PATCH/RFC 3/3] ARM: S5PV210: Add a platform helper for MIPI DSIM/CSIS setup
From: Kukjin Kim <hidden> Date: 2011-01-12 22:34:52
Sylwester Nawrocki wrote:
On 01/04/2011 04:09 PM, Sylwester Nawrocki wrote:
quoted
Hello,
the following patch series adds the common platform code for configuration
of the MIPI CSIS and MIPI DSIM PHYs on S5PV210 and S5PV310 SoCs.
The spinlock is used to avoid races while the common PHY control register
is accessed from within MIPI DSIM and MIPI CSIS drivers.
The common PHY enable bit is cleared only when both CSIS and DSIM devices
are not in use.
The patch series contains:
[PATCH/RFC 1/3] ARM: S5P: Add a platform callback for MIPI CSIS PHY control
[PATCH/RFC 2/3] ARM: S5PV310: Add a platform helper for MIPI DSIM/CSIS
setup
quoted
[PATCH/RFC 3/3] ARM: S5PV210: Add a platform helper for MIPI DSIM/CSIS
setup
quoted
Any comments on this one?
Hi,
It's 38 merge window now. So I want to wait until after this merge window.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim [off-list ref], Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
From: Kukjin Kim <hidden> Date: 2011-01-13 01:29:44
Sylwester Nawrocki wrote:
quoted hunk
The phy_enable callback in struct s5p_platform_mipi_csis is added
to allow the CSIS driver to control its PHY enable and reset signals.
This allows to use same MIPI CSIS driver across various SoCs.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/plat-s5p/dev-csis0.c | 2 +-
arch/arm/plat-s5p/dev-csis1.c | 2 +-
arch/arm/plat-s5p/include/plat/csis.h | 28 --------------------
arch/arm/plat-s5p/include/plat/mipi_csis.h | 39
++++++++++++++++++++++++++++
4 files changed, 41 insertions(+), 30 deletions(-)
delete mode 100644 arch/arm/plat-s5p/include/plat/csis.h
create mode 100644 arch/arm/plat-s5p/include/plat/mipi_csis.h
@@ -1,28 +0,0 @@-/*- * Copyright (C) 2010 Samsung Electronics- *- * S5P series MIPI CSI slave device support- *- * This program is free software; you can redistribute it and/or modify- * it under the terms of the GNU General Public License version 2 as- * published by the Free Software Foundation.- */--#ifndef PLAT_S5P_CSIS_H_-#define PLAT_S5P_CSIS_H_ __FILE__--/**- * struct s5p_platform_mipi_csis - platform data for MIPI-CSIS- * @clk_rate: bus clock frequency- * @lanes: number of data lanes used- * @alignment: data alignment in bits- * @hs_settle: HS-RX settle time- */-struct s5p_platform_mipi_csis {- unsigned long clk_rate;- u8 lanes;- u8 alignment;- u8 hs_settle;-};--#endif /* PLAT_S5P_CSIS_H_ */
I think should be separated like following.
If required, ...
1. change copyright
2. rename csis.h to mipi_csis.h
3. add phy enable feature
Thanks.
Best regards,
Kgene.
--
Kukjin Kim [off-list ref], Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
From: Kukjin Kim <hidden> Date: 2011-01-13 01:33:45
Sylwester Nawrocki wrote:
quoted hunk
MIPI_PHYn_CONTROL registers are shared between MIPI DSIM
and MIPI CSIS drivers so a spinlock is used to protect multiple
access to these registers. Also a proper state of a common
PHY enable bit is maintained in order to avoid a DSIM
and CSIS driver conflict.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s5pv310/Kconfig | 6 ++
arch/arm/mach-s5pv310/Makefile | 2 +
arch/arm/mach-s5pv310/include/mach/map.h | 7 +--
arch/arm/mach-s5pv310/include/mach/regs-pmu.h | 6 ++
arch/arm/mach-s5pv310/setup-mipi.c | 62
+++++++++++++++++++++++++
5 files changed, 79 insertions(+), 4 deletions(-)
create mode 100644 arch/arm/mach-s5pv310/setup-mipi.c
Basically, it's not good that each machine(SoC) has each own setup-mipi...
Because it is very similar(almost same)...means can move it in plat-s5p with
following.
1. # of MIPI PHY can be calculated by platform device id
2. can use same definition of MIPI PHY control address with same name
re-mapping.
And hmm...need to re-think about this after this merge window...
Thanks.
Best regards,
Kgene.
--
Kukjin Kim [off-list ref], Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
Hi Kukjin,
thank you for the update.
On 01/13/2011 10:29 AM, Kukjin Kim wrote:
Sylwester Nawrocki wrote:
quoted
The phy_enable callback in struct s5p_platform_mipi_csis is added
to allow the CSIS driver to control its PHY enable and reset signals.
This allows to use same MIPI CSIS driver across various SoCs.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/plat-s5p/dev-csis0.c | 2 +-
arch/arm/plat-s5p/dev-csis1.c | 2 +-
arch/arm/plat-s5p/include/plat/csis.h | 28 --------------------
arch/arm/plat-s5p/include/plat/mipi_csis.h | 39
++++++++++++++++++++++++++++
4 files changed, 41 insertions(+), 30 deletions(-)
delete mode 100644 arch/arm/plat-s5p/include/plat/csis.h
create mode 100644 arch/arm/plat-s5p/include/plat/mipi_csis.h
...
I think should be separated like following.
If required, ...
1. change copyright
2. rename csis.h to mipi_csis.h
I don't want to bother with a separate patches for that, just prefer
to drop the above changes.
3. add phy enable feature
OK, I would reduce the patch to that change only.
Regards,
--
Sylwester Nawrocki
Samsung Poland R&D Center
MIPI_PHYn_CONTROL registers are shared between MIPI DSIM
and MIPI CSIS drivers so a spinlock is used to protect multiple
access to these registers. Also a proper state of a common
PHY enable bit is maintained in order to avoid a DSIM
and CSIS driver conflict.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
...
Basically, it's not good that each machine(SoC) has each own setup-mipi...
Because it is very similar(almost same)...means can move it in plat-s5p with
following.
1. # of MIPI PHY can be calculated by platform device id
2. can use same definition of MIPI PHY control address with same name
re-mapping.
Yes, I agree with that. Originally I had it done it plat-s5p, I will
prepare a merged version. The main difference between s5pv210 and s5pv310
indeed was the register naming and placement in PMU or CLK subsystem, so the
register address definitions were in regs-clk.h or regs-pmu.h. So there
just will have to be included different header files depending on on SoC
architecture.
Regards,
--
Sylwester Nawrocki
Samsung Poland R&D Center
MIPI_PHYn_CONTROL registers are shared between MIPI DSIM
and MIPI CSIS drivers so a spinlock is used to protect multiple
access to these registers. Also a proper state of a common
PHY enable bit is maintained in order to avoid a DSIM
and CSIS driver conflict.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s5pv310/Kconfig | 6 ++
arch/arm/mach-s5pv310/Makefile | 2 +
arch/arm/mach-s5pv310/include/mach/map.h | 7 +--
arch/arm/mach-s5pv310/include/mach/regs-pmu.h | 6 ++
arch/arm/mach-s5pv310/setup-mipi.c | 62
+++++++++++++++++++++++++
5 files changed, 79 insertions(+), 4 deletions(-)
create mode 100644 arch/arm/mach-s5pv310/setup-mipi.c
Basically, it's not good that each machine(SoC) has each own setup-mipi...
Because it is very similar(almost same)...means can move it in plat-s5p with
following.
1. # of MIPI PHY can be calculated by platform device id
2. can use same definition of MIPI PHY control address with same name
re-mapping.
There one serious problem with that approach though, we cannot make a common
kernel binary for multiple archs. When each mach-s5p* has it's own setup code
the is no issue as those files would be compiled with their respective headers.
How do we solve that problem with common code in plat-s5p? Any comments, ideas?
Regards,
Sylwester
--
Sylwester Nawrocki
Samsung Poland R&D Center