Re: [PATCH v2] rtc: s5m: fix to update ctrl register

2015-08-23 Thread Krzysztof Kozlowski
On 21.08.2015 18:43, Joonyoung Shim wrote:
 According to datasheet, the S2MPS13X and S2MPS14X should update write
 buffer via setting WUDR bit to high after ctrl register is written.
 
 If not, ALARM interrupt of rtc-s5m doesn't happen first time when i use
 tools/testing/selftests/timers/rtctest.c test program and hour format is
 used to 12 hour mode in Odroid-XU3 board.
 
 One more issue is the RTC doesn't keep time on Odroid-XU3 board when i
 turn on board after power off even if RTC battery is connected. It can
 be solved as setting WUDR  RUDR bits to high at the same time after
 RTC_CTRL register is written. It's same with condition of only writing
 ALARM registers, so this is for only S2MPS14 and we should set WUDR 
 A_UDR bits to high on S2MPS13.
 
 I can't find any reasonable description about this like fix from
 datasheet, but can find similar codes from rtc driver source of
 hardkernel kernel and vender kernel.

s/vender/vendor/

 
 Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com
 Cc: sta...@vger.kernel.org # v3.16
 ---
 Changelog for v2:
 - update commit description and code to fix time keeping problem
 - update the stable tag with the kernel version
 
  drivers/rtc/rtc-s5m.c | 10 ++
  1 file changed, 10 insertions(+)
 
 diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
 index 8c70d78..646bf45 100644
 --- a/drivers/rtc/rtc-s5m.c
 +++ b/drivers/rtc/rtc-s5m.c
 @@ -635,6 +635,16 @@ static int s5m8767_rtc_init_reg(struct s5m_rtc_info 
 *info)
   case S2MPS13X:
   data[0] = (0  BCD_EN_SHIFT) | (1  MODEL24_SHIFT);
   ret = regmap_write(info-regmap, info-regs-ctrl, data[0]);
 + if (ret  0)
 + break;
 +
 + /*
 +  * Should set WUDR  (RUDR or AUDR) bits to high after writing
 +  * RTC_CTRL register like writing Alarm registers. We can't find
 +  * the description from datasheet but vender code does that

s/vender/vendor/

 +  * really.
 +  */
 + ret = s5m8767_rtc_set_alarm_reg(info);
   break;
  
   default:
 

Reviewed-by: Krzysztof Kozlowski k.kozlow...@samsung.com

Tested on S2MPS14 and S2MPS11:
Tested-by: Krzysztof Kozlowski k.kozlow...@samsung.com

Best regards,
Krzysztof


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v7 28/44] [media] media: use macros to check for V4L2 subdev entities

2015-08-23 Thread Mauro Carvalho Chehab
Instead of relying on media subtype, use the new macros to detect
if an entity is a subdev or an A/V DMA entity.

Please note that most drivers assume that there's just AV_DMA or
V4L2 subdevs. This is not true anymore, as we've added MC support
for DVB, and there are plans to add support for ALSA and FB/DRM
too.

Ok, on the current pipelines supported by those drivers, just V4L
stuff are there, but, assuming that some day a pipeline that also
works with other subsystems will ever added, it is better to add
explicit checks for the AV_DMA stuff.

Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com

diff --git a/drivers/media/platform/exynos4-is/common.c 
b/drivers/media/platform/exynos4-is/common.c
index 0eb34ecb8ee4..1f1b9a56e24e 100644
--- a/drivers/media/platform/exynos4-is/common.c
+++ b/drivers/media/platform/exynos4-is/common.c
@@ -22,8 +22,7 @@ struct v4l2_subdev *fimc_find_remote_sensor(struct 
media_entity *entity)
while (pad-flags  MEDIA_PAD_FL_SINK) {
/* source pad */
pad = media_entity_remote_pad(pad);
-   if (pad == NULL ||
-   media_entity_type(pad-entity) != MEDIA_ENT_T_V4L2_SUBDEV)
+   if (!is_media_entity_v4l2_subdev(pad-entity))
break;
 
sd = media_entity_to_v4l2_subdev(pad-entity);
diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c 
b/drivers/media/platform/exynos4-is/fimc-capture.c
index 0627a93b2f3b..79b43b89266a 100644
--- a/drivers/media/platform/exynos4-is/fimc-capture.c
+++ b/drivers/media/platform/exynos4-is/fimc-capture.c
@@ -1141,8 +1141,7 @@ static int fimc_pipeline_validate(struct fimc_dev *fimc)
}
}
 
-   if (src_pad == NULL ||
-   media_entity_type(src_pad-entity) != 
MEDIA_ENT_T_V4L2_SUBDEV)
+   if (!is_media_entity_v4l2_subdev(src_pad-entity))
break;
 
/* Don't call FIMC subdev operation to avoid nested locking */
@@ -1397,7 +1396,7 @@ static int fimc_link_setup(struct media_entity *entity,
struct fimc_vid_cap *vc = fimc-vid_cap;
struct v4l2_subdev *sensor;
 
-   if (media_entity_type(remote-entity) != MEDIA_ENT_T_V4L2_SUBDEV)
+   if (!is_media_entity_v4l2_subdev(remote-entity))
return -EINVAL;
 
if (WARN_ON(fimc == NULL))
diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c 
b/drivers/media/platform/exynos4-is/fimc-isp-video.c
index 3d9ccbf5f10f..0ea948ad668c 100644
--- a/drivers/media/platform/exynos4-is/fimc-isp-video.c
+++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c
@@ -467,8 +467,7 @@ static int isp_video_pipeline_validate(struct fimc_isp *isp)
 
/* Retrieve format at the source pad */
pad = media_entity_remote_pad(pad);
-   if (pad == NULL ||
-   media_entity_type(pad-entity) != MEDIA_ENT_T_V4L2_SUBDEV)
+   if (!is_media_entity_v4l2_subdev(pad-entity))
break;
 
sd = media_entity_to_v4l2_subdev(pad-entity);
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c 
b/drivers/media/platform/exynos4-is/fimc-lite.c
index b2607da4ad14..df2ac6b0afd1 100644
--- a/drivers/media/platform/exynos4-is/fimc-lite.c
+++ b/drivers/media/platform/exynos4-is/fimc-lite.c
@@ -814,8 +814,7 @@ static int fimc_pipeline_validate(struct fimc_lite *fimc)
}
/* Retrieve format at the source pad */
pad = media_entity_remote_pad(pad);
-   if (pad == NULL ||
-   media_entity_type(pad-entity) != MEDIA_ENT_T_V4L2_SUBDEV)
+   if (!is_media_entity_v4l2_subdev(pad-entity))
break;
 
sd = media_entity_to_v4l2_subdev(pad-entity);
@@ -988,7 +987,6 @@ static int fimc_lite_link_setup(struct media_entity *entity,
 {
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
struct fimc_lite *fimc = v4l2_get_subdevdata(sd);
-   unsigned int remote_ent_type = media_entity_type(remote-entity);
int ret = 0;
 
if (WARN_ON(fimc == NULL))
@@ -1000,7 +998,7 @@ static int fimc_lite_link_setup(struct media_entity 
*entity,
 
switch (local-index) {
case FLITE_SD_PAD_SINK:
-   if (remote_ent_type != MEDIA_ENT_T_V4L2_SUBDEV) {
+   if (!is_media_entity_v4l2_subdev(remote-entity)) {
ret = -EINVAL;
break;
}
@@ -1018,7 +1016,7 @@ static int fimc_lite_link_setup(struct media_entity 
*entity,
case FLITE_SD_PAD_SOURCE_DMA:
if (!(flags  MEDIA_LNK_FL_ENABLED))
atomic_set(fimc-out_path, FIMC_IO_NONE);
-   else if (remote_ent_type == MEDIA_ENT_T_DEVNODE)
+   else if (is_media_v4l2_io(remote-entity))
atomic_set(fimc-out_path, FIMC_IO_DMA);
   

Re: [PATCH v3 06/14] Documentation: drm/bridge: add document for analogix_dp

2015-08-23 Thread Rob Herring
On Wed, Aug 19, 2015 at 9:50 AM, Yakir Yang y...@rock-chips.com wrote:
 Analogix dp driver is split from exynos dp driver, so we just
 make an copy of exynos_dp.txt, and then simplify exynos_dp.txt

 Beside update some exynos dtsi file with the latest change
 according to the devicetree binding documents.

You can't just change the exynos bindings and break compatibility. Is
there some agreement with exynos folks to do this?


 Signed-off-by: Yakir Yang y...@rock-chips.com
 ---
 Changes in v3:
 - Take Heiko suggest, add devicetree binding documents.
 - Take Thierry Reding suggest, remove sync pol  colorimetry properies
   from the new analogix dp driver devicetree binding.
 - Update the exist exynos dtsi file with the latest DP DT properies.

 Changes in v2: None

  .../devicetree/bindings/drm/bridge/analogix_dp.txt | 70 
 ++
  .../devicetree/bindings/video/exynos_dp.txt| 50 ++--
  arch/arm/boot/dts/exynos5250-arndale.dts   | 10 ++--
  arch/arm/boot/dts/exynos5250-smdk5250.dts  | 10 ++--
  arch/arm/boot/dts/exynos5250-snow.dts  | 12 ++--
  arch/arm/boot/dts/exynos5250-spring.dts| 12 ++--
  arch/arm/boot/dts/exynos5420-peach-pit.dts | 12 ++--
  arch/arm/boot/dts/exynos5420-smdk5420.dts  | 10 ++--
  arch/arm/boot/dts/exynos5800-peach-pi.dts  | 12 ++--
  9 files changed, 119 insertions(+), 79 deletions(-)
  create mode 100644 
 Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt

 diff --git a/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt 
 b/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt
 new file mode 100644
 index 000..6127018
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt
 @@ -0,0 +1,70 @@
 +Analogix Display Port bridge bindings
 +
 +Required properties for dp-controller:
 +   -compatible:
 +   platform specific such as:
 +* samsung,exynos5-dp
 +* rockchip,rk3288-dp
 +   -reg:
 +   physical base address of the controller and length
 +   of memory mapped region.
 +   -interrupts:
 +   interrupt combiner values.
 +   -clocks:
 +   from common clock binding: handle to dp clock.
 +   -clock-names:
 +   from common clock binding: Shall be dp.
 +   -interrupt-parent:
 +   phandle to Interrupt combiner node.
 +   -phys:
 +   from general PHY binding: the phandle for the PHY device.
 +   -phy-names:
 +   from general PHY binding: Should be dp.
 +   -analogix,color-space:
 +   input video data format.
 +   COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2
 +   -analogix,color-depth:
 +   number of bits per colour component.
 +   COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3

This seems pretty generic. Just use 6, 8, 10, or 12 for values. And
drop the vendor prefix.

 +   -analogix,link-rate:
 +   max link rate supported by the eDP controller.
 +   LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A,
 +   LINK_RATE_5_40GBPS = 0x14

Same here. I'd rather see something like link-rate-mbps and use the
actual rate.

 +   -analogix,lane-count:
 +   max number of lanes supported by the eDP contoller.
 +   LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4

And drop the vendor prefix here.

 +   -port@[X]: SoC specific port nodes with endpoint definitions as 
 defined
 +   in 
 Documentation/devicetree/bindings/media/video-interfaces.txt,
 +   please refer to the SoC specific binding document:
 +   * Documentation/devicetree/bindings/video/exynos_dp.txt
 +   * 
 Documentation/devicetree/bindings/video/analogix_dp-rockchip.txt
 +
 +Optional properties for dp-controller:
 +   -analogix,hpd-gpio:
 +   Hotplug detect GPIO.
 +   Indicates which GPIO should be used for hotplug
 +   detection

We should align with hpd-gpios used by HDMI connector binding. Or do
we need a DP connector binding that this should be defined in?
Probably so.

The DRM related bindings are such a cluster f*ck with everyone picking
their own way to do things. Just grep hpd in bindings for starters.
That is just the tip.

 +   -video interfaces: Device node can contain video interface port
 +   nodes according to [1].

Isn't this the same as ports above? How are they optional? 0 ports
would be pretty useless.

 +
 +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
 +---
 +
 +Example:
 +
 +   dp-controller {
 +   compatible = samsung,exynos5-dp;
 +   reg = 0x145b 0x1;
 + 

[PATCH v7 10/44] [media] media: rename the function that create pad links

2015-08-23 Thread Mauro Carvalho Chehab
Now that a link can be either between two different graph
objects, we'll need to add more functions to create links.
So, rename the existing one that create links only between
two pads as media_create_pad_link().

No functional changes.

This patch was created via this shell script:
for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type 
f) ; do sed s,media_entity_create_link,media_create_pad_link,g $i a  mv a 
$i; done

Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com
Acked-by: Hans Verkuil hans.verk...@cisco.com
Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com

diff --git a/Documentation/media-framework.txt 
b/Documentation/media-framework.txt
index 6903b2503577..b424de6c3bb3 100644
--- a/Documentation/media-framework.txt
+++ b/Documentation/media-framework.txt
@@ -199,7 +199,7 @@ pre-allocated and grows dynamically as needed.
 
 Drivers create links by calling
 
-   media_entity_create_link(struct media_entity *source, u16 source_pad,
+   media_create_pad_link(struct media_entity *source, u16 source_pad,
 struct media_entity *sink,   u16 sink_pad,
 u32 flags);
 
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 2fdcbb5f000a..65f59f2124b4 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -412,16 +412,16 @@ void dvb_create_media_graph(struct dvb_adapter *adap)
}
 
if (tuner  fe)
-   media_entity_create_link(tuner, 0, fe, 0, 0);
+   media_create_pad_link(tuner, 0, fe, 0, 0);
 
if (fe  demux)
-   media_entity_create_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);
+   media_create_pad_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);
 
if (demux  dvr)
-   media_entity_create_link(demux, 1, dvr, 0, 
MEDIA_LNK_FL_ENABLED);
+   media_create_pad_link(demux, 1, dvr, 0, MEDIA_LNK_FL_ENABLED);
 
if (demux  ca)
-   media_entity_create_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
+   media_create_pad_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
 }
 EXPORT_SYMBOL_GPL(dvb_create_media_graph);
 #endif
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c 
b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index 6d167428727d..c81bfbfea32f 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -1482,11 +1482,11 @@ static int s5c73m3_oif_registered(struct v4l2_subdev 
*sd)
return ret;
}
 
-   ret = media_entity_create_link(state-sensor_sd.entity,
+   ret = media_create_pad_link(state-sensor_sd.entity,
S5C73M3_ISP_PAD, state-oif_sd.entity, OIF_ISP_PAD,
MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
 
-   ret = media_entity_create_link(state-sensor_sd.entity,
+   ret = media_create_pad_link(state-sensor_sd.entity,
S5C73M3_JPEG_PAD, state-oif_sd.entity, OIF_JPEG_PAD,
MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
 
diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
index 30a9ca62e034..d3bff30bcb6f 100644
--- a/drivers/media/i2c/s5k5baf.c
+++ b/drivers/media/i2c/s5k5baf.c
@@ -1756,7 +1756,7 @@ static int s5k5baf_registered(struct v4l2_subdev *sd)
v4l2_err(sd, failed to register subdev %s\n,
 state-cis_sd.name);
else
-   ret = media_entity_create_link(state-cis_sd.entity, PAD_CIS,
+   ret = media_create_pad_link(state-cis_sd.entity, PAD_CIS,
   state-sd.entity, PAD_CIS,
   MEDIA_LNK_FL_IMMUTABLE |
   MEDIA_LNK_FL_ENABLED);
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c 
b/drivers/media/i2c/smiapp/smiapp-core.c
index 308613ea0aed..5aa49eb393a9 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2495,7 +2495,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor 
*sensor)
return rval;
}
 
-   rval = media_entity_create_link(this-sd.entity,
+   rval = media_create_pad_link(this-sd.entity,
this-source_pad,
last-sd.entity,
last-sink_pad,
@@ -2503,7 +2503,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor 
*sensor)
MEDIA_LNK_FL_IMMUTABLE);
if (rval) {
dev_err(client-dev,
-   media_entity_create_link failed\n);
+   media_create_pad_link 

Re: Issues with HW RNG / SSS on Exynos 5422

2015-08-23 Thread Krzysztof Kozlowski
2015-08-16 20:18 GMT+09:00 Heiner Kallweit hkallwe...@gmail.com:
 Am 15.08.2015 um 13:19 schrieb Heiner Kallweit:
 I'm having issues making the hardware RNG work on a Samsung Exynos 5422 
 (Odroid XU4) with kernel 4.2rc6.
 No random number generation is started if I write the appropriate value 
 (0x18) to the hash control register.

 What I did so far:
 Splitted the sss DT node in exynos5420.dtsi into one for the s5p-sss driver 
 and one for the exynos-rng driver.
 (s5p-sss doesn't seem to need the hash registers from offset 0x400)

 sss: sss@1083 {
   icompatible = samsung,exynos4210-secss;
   reg = 0x1083 0x400;
   interrupts = 0 112 0;
   clocks = clock CLK_SSS;
   clock-names = secss;
 };

 rng: rng@10830400 {
   compatible = samsung,exynosrng-secss;
   reg = 0x10830400 0x300;
   clocks = clock CLK_SSS;
   clock-names = secss;
 };

 The DT binding is just for testing and after adding some DT glue logic 
 (of_device_id table) to the exynos-rng driver
 it binds to the rng platform device.
 The clock also seems to be ok with a rate of 266 MHz.
 As is the driver hangs in a loop because the PRNG_DONE in the status 
 register bit never gets set.

Indeed... Status has value 0x3 which means that buffer is not full,
seed setup is done and PRNG engine is idle. I tried this also on
Trats2 board (Exynos 4412) with exactly the same result. No idea.


 I traced it back to the hash control register not accepting value 0x8 (or 
 0x18 incl. the start bit) for the PRNG.
 Writing a value and reading it back works for values from 0 to 5 only.

It's okay. Accepted values for engine are only from 0 to 5. The bit no
4 (start init bit) is automatically cleared by hardware.

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH v7 0/10] Add external dma support for Synopsys MSHC

2015-08-23 Thread Shawn Lin

Synopsys DesignWare mobile storage host controller supports three
types of transfer mode: pio, internal dma and external dma. However,
dw_mmc can only supports pio and internal dma now. Thus some platforms
using dw-mshc integrated with generic dma can't work in dma mode. So we
submit this patch to achieve it.

And the config option, CONFIG_MMC_DW_IDMAC, was added by Will Newton
(commit:f95f3850) for the first version of dw_mmc and never be touched since
then. At that time dt-bindings hadn't been introduced into dw_mmc yet means
we should select CONFIG_MMC_DW_IDMAC to enable internal dma mode at compile
time. Nowadays, device-tree helps us to support a variety of boards with one
kernel. That's why we need to remove it and decide the transfer mode by reading
dw_mmc's HCON reg at runtime.

This RFC patch needs lots of ACKs. I know it's hard, but it does need someone
to make the running.

Patch does the following things:
- remove CONFIG_MMC_DW_IDMAC config option
- add bindings for edmac used by synopsys-dw-mshc
  at runtime
- add edmac support for synopsys-dw-mshc

Patch is based on next of git://git.linaro.org/people/ulf.hansson/mmc

Test emmc throughput on my platform with edmac support and without edmac 
support(pio only)
iozone -L64 -S32 -azecwI -+n -r4k -r64k -r128k -s1g -i0 -i1 -i2 -f datafile -Rb 
out.xls  /mnt/result.txt
(light cpu loading, Direct IO, fixed line size, all pattern recycle, 1GB data 
in total)
 ___
|   external dma mode   |
|---|
|blksz | Random Read | Random Write | Seq Read   | Seq Write|
|---|
|4kB   |  13953kB/s  |8602kB/s  | 13672kB/s  |  9785kB/s|
|---|
|64kB  |  46058kB/s  |   24794kB/s  | 48058kB/s  | 25418kB/s|
|---|
|128kB |  57026kB/s  |   35117kB/s  | 57375kB/s  | 35183kB/s|
|---|
   VS
 ___
|  pio mode |
|---|
|blksz | Random Read  | Random Write | Seq Read  | Seq Write|
|---|
|4kB   |  11720kB/s   |8644kB/s  | 11549kB/s |  9624kB/s|
|---|
|64kB  |  21869kB/s   |   24414kB/s  | 22031kB/s | 27986kB/s|
|---|
|128kB |  23718kB/s   |   34495kB/s  | 24698kB/s | 34637kB/s|
|---|


Changes in v7:
- rebased on Ulf's next
- combine condition state
- elaborate more about DMA_INTERFACE
- define some macro for DMA_INERFACE value
- spilt HCON ops' changes into another patch

Changes in v6:
- add trans_mode condition for IDMAC initialization
  suggested by Heiko
- re-test my patch on rk3188 platform and update commit msg
- update performance of pio vs edmac in cover letter

Changes in v5:
- add the title of cover letter
- fix typo of comment
- add macro for reading HCON register
- add Acked-by: Krzysztof Kozlowski k.kozlow...@samsung.com for 
exynos_defconfig patch
- add Acked-by: Vineet Gupta vgu...@synopsys.com for axs10x_defconfig patch
- add Acked-by: Govindraj Raja govindraj.r...@imgtec.com and
  Acked-by: Ralf Baechle r...@linux-mips.org for pistachio_defconfig patch
- add Acked-by: Joachim Eastwood manab...@gmail.com for lpc18xx_defconfig 
patch
- add Acked-by: Wei Xu xuw...@hisilicon.com for hisi_defconfig patch
- rebase on https://github.com/jh80chung/dw-mmc.git tags/dw-mmc-for-ulf-v4.2 
for merging easily

Changes in v4:
- remove host-trans_mode and use host-use_dma to indicate
  transfer mode.
- remove all bt-bindings' changes since we don't need new properities.
- check transfer mode at runtime by reading HCON reg
- spilt defconfig changes for each sub-architecture
- fix the title of cover letter
- reuse some code for reducing code size

Changes in v3:
- choose transfer mode at runtime
- remove all CONFIG_MMC_DW_IDMAC config option
- add supports-idmac property for some platforms

Changes in v2:
- Fix typo of dev_info msg
- remove unused dmach from declaration of dw_mci_dma_slave

Shawn Lin (10):
  mmc: dw_mmc: Add external dma interface support
  mmc: dw_mmc: use macro for HCON register operations
  Documentation: synopsys-dw-mshc: add bindings for idmac and edmac
  mips: pistachio_defconfig: remove CONFIG_MMC_DW_IDMAC
  arc: axs10x_defconfig: remove CONFIG_MMC_DW_IDMAC
  arm: exynos_defconfig: remove CONFIG_MMC_DW_IDMAC
  arm: hisi_defconfig: remove CONFIG_MMC_DW_IDMAC
  arm: lpc18xx_defconfig: remove CONFIG_MMC_DW_IDMAC
  arm: multi_v7_defconfig: remove CONFIG_MMC_DW_IDMAC
  arm: zx_defconfig: 

[RFC PATCH v7 01/10] mmc: dw_mmc: Add external dma interface support

2015-08-23 Thread Shawn Lin
DesignWare MMC Controller can supports two types of DMA
mode: external dma and internal dma. We get a RK312x platform
integrated dw_mmc and ARM pl330 dma controller. This patch add
edmac ops to support these platforms. I've tested it on RK31xx
platform with edmac mode and RK3288 platform with idmac mode.

Signed-off-by: Shawn Lin shawn@rock-chips.com

---

Changes in v7:
- rebased on Ulf's next
- combine condition state
- elaborate more about DMA_INTERFACE
- define some macro for DMA_INERFACE value
- spilt HCON ops' changes into another patch

Changes in v6:
- add trans_mode condition for IDMAC initialization
  suggested by Heiko
- re-test my patch on rk3188 platform and update commit msg
- update performance of pio vs edmac in cover letter

Changes in v5:
- add the title of cover letter
- fix typo of comment
- add macro for reading HCON register
- add Acked-by: Krzysztof Kozlowski k.kozlow...@samsung.com for 
exynos_defconfig patch
- add Acked-by: Vineet Gupta vgu...@synopsys.com for axs10x_defconfig patch
- add Acked-by: Govindraj Raja govindraj.r...@imgtec.com and
  Acked-by: Ralf Baechle r...@linux-mips.org for pistachio_defconfig patch
- add Acked-by: Joachim Eastwood manab...@gmail.com for lpc18xx_defconfig 
patch
- add Acked-by: Wei Xu xuw...@hisilicon.com for hisi_defconfig patch
- rebase on https://github.com/jh80chung/dw-mmc.git tags/dw-mmc-for-ulf-v4.2 
for merging easily

Changes in v4:
- remove host-trans_mode and use host-use_dma to indicate
  transfer mode.
- remove all bt-bindings' changes since we don't need new properities.
- check transfer mode at runtime by reading HCON reg
- spilt defconfig changes for each sub-architecture
- fix the title of cover letter
- reuse some code for reducing code size

Changes in v3:
- choose transfer mode at runtime
- remove all CONFIG_MMC_DW_IDMAC config option
- add supports-idmac property for some platforms

Changes in v2:
- Fix typo of dev_info msg
- remove unused dmach from declaration of dw_mci_dma_slave

 drivers/mmc/host/Kconfig|  11 +-
 drivers/mmc/host/dw_mmc-pltfm.c |   2 +
 drivers/mmc/host/dw_mmc.c   | 273 
 drivers/mmc/host/dw_mmc.h   |   6 +
 include/linux/mmc/dw_mmc.h  |  23 +++-
 5 files changed, 253 insertions(+), 62 deletions(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 6a0f9c7..539b1a6 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -607,15 +607,7 @@ config MMC_DW
help
  This selects support for the Synopsys DesignWare Mobile Storage IP
  block, this provides host support for SD and MMC interfaces, in both
- PIO and external DMA modes.
-
-config MMC_DW_IDMAC
-   bool Internal DMAC interface
-   depends on MMC_DW
-   help
- This selects support for the internal DMAC block within the Synopsys
- Designware Mobile Storage IP block. This disables the external DMA
- interface.
+ PIO, internal DMA mode and external DMA mode.
 
 config MMC_DW_PLTFM
tristate Synopsys Designware MCI Support as platform device
@@ -644,7 +636,6 @@ config MMC_DW_K3
tristate K3 specific extensions for Synopsys DW Memory Card Interface
depends on MMC_DW
select MMC_DW_PLTFM
-   select MMC_DW_IDMAC
help
  This selects support for Hisilicon K3 SoC specific extensions to the
  Synopsys DesignWare Memory Card Interface driver. Select this option
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index ec6dbcd..7e1d13b 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -59,6 +59,8 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
host-pdata = pdev-dev.platform_data;
 
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+   /* Get registers' physical base address */
+   host-phy_regs = (void *)(regs-start);
host-regs = devm_ioremap_resource(pdev-dev, regs);
if (IS_ERR(host-regs))
return PTR_ERR(host-regs);
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index fcbf552..9c91983 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -56,7 +56,6 @@
 #define DW_MCI_FREQ_MAX2   /* unit: HZ */
 #define DW_MCI_FREQ_MIN40  /* unit: HZ */
 
-#ifdef CONFIG_MMC_DW_IDMAC
 #define IDMAC_INT_CLR  (SDMMC_IDMAC_INT_AI | SDMMC_IDMAC_INT_NI | \
 SDMMC_IDMAC_INT_CES | SDMMC_IDMAC_INT_DU | \
 SDMMC_IDMAC_INT_FBE | SDMMC_IDMAC_INT_RI | \
@@ -102,7 +101,6 @@ struct idmac_desc {
 
 /* Each descriptor can transfer up to 4KB of data in chained mode */
 #define DW_MCI_DESC_DATA_LENGTH0x1000
-#endif /* CONFIG_MMC_DW_IDMAC */
 
 static bool dw_mci_reset(struct dw_mci *host);
 static bool dw_mci_ctrl_reset(struct dw_mci *host, u32 reset);
@@ -407,7 +405,6 @@ static int 

Re: [PATCH v3 06/14] Documentation: drm/bridge: add document for analogix_dp

2015-08-23 Thread Krzysztof Kozlowski
2015-08-24 8:23 GMT+09:00 Rob Herring robherri...@gmail.com:
 On Wed, Aug 19, 2015 at 9:50 AM, Yakir Yang y...@rock-chips.com wrote:
 Analogix dp driver is split from exynos dp driver, so we just
 make an copy of exynos_dp.txt, and then simplify exynos_dp.txt

 Beside update some exynos dtsi file with the latest change
 according to the devicetree binding documents.

 You can't just change the exynos bindings and break compatibility. Is
 there some agreement with exynos folks to do this?

No, there is no agreement. This wasn't even sent to Exynos maintainers.
Additionally the patchset did not look interesting to me because of
misleading subject - Documentation instead of ARM: dts:.

Yakir, please:
1. Provide backward compatibility. Mark old properties as deprecated
but still support them.
2. Separate all DTS changes to a separate patch, unless bisectability
would be hurt. Anyway you should prepare it in a such way that
separation would be possible without breaking bisectability.
3. Use proper subject for the patch changing DTS. This is not
documentation change!
4. Please use script get_maintainers to obtain list of valid
maintainers and CC-them with at least cover letter and patches
requiring their attention.

Best regards,
Krzysztof




 Signed-off-by: Yakir Yang y...@rock-chips.com
 ---
 Changes in v3:
 - Take Heiko suggest, add devicetree binding documents.
 - Take Thierry Reding suggest, remove sync pol  colorimetry properies
   from the new analogix dp driver devicetree binding.
 - Update the exist exynos dtsi file with the latest DP DT properies.

 Changes in v2: None

  .../devicetree/bindings/drm/bridge/analogix_dp.txt | 70 
 ++
  .../devicetree/bindings/video/exynos_dp.txt| 50 ++--
  arch/arm/boot/dts/exynos5250-arndale.dts   | 10 ++--
  arch/arm/boot/dts/exynos5250-smdk5250.dts  | 10 ++--
  arch/arm/boot/dts/exynos5250-snow.dts  | 12 ++--
  arch/arm/boot/dts/exynos5250-spring.dts| 12 ++--
  arch/arm/boot/dts/exynos5420-peach-pit.dts | 12 ++--
  arch/arm/boot/dts/exynos5420-smdk5420.dts  | 10 ++--
  arch/arm/boot/dts/exynos5800-peach-pi.dts  | 12 ++--
  9 files changed, 119 insertions(+), 79 deletions(-)
  create mode 100644 
 Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt

 diff --git a/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt 
 b/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt
 new file mode 100644
 index 000..6127018
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt
 @@ -0,0 +1,70 @@
 +Analogix Display Port bridge bindings
 +
 +Required properties for dp-controller:
 +   -compatible:
 +   platform specific such as:
 +* samsung,exynos5-dp
 +* rockchip,rk3288-dp
 +   -reg:
 +   physical base address of the controller and length
 +   of memory mapped region.
 +   -interrupts:
 +   interrupt combiner values.
 +   -clocks:
 +   from common clock binding: handle to dp clock.
 +   -clock-names:
 +   from common clock binding: Shall be dp.
 +   -interrupt-parent:
 +   phandle to Interrupt combiner node.
 +   -phys:
 +   from general PHY binding: the phandle for the PHY device.
 +   -phy-names:
 +   from general PHY binding: Should be dp.
 +   -analogix,color-space:
 +   input video data format.
 +   COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2
 +   -analogix,color-depth:
 +   number of bits per colour component.
 +   COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3

 This seems pretty generic. Just use 6, 8, 10, or 12 for values. And
 drop the vendor prefix.

 +   -analogix,link-rate:
 +   max link rate supported by the eDP controller.
 +   LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A,
 +   LINK_RATE_5_40GBPS = 0x14

 Same here. I'd rather see something like link-rate-mbps and use the
 actual rate.

 +   -analogix,lane-count:
 +   max number of lanes supported by the eDP contoller.
 +   LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4

 And drop the vendor prefix here.

 +   -port@[X]: SoC specific port nodes with endpoint definitions as 
 defined
 +   in 
 Documentation/devicetree/bindings/media/video-interfaces.txt,
 +   please refer to the SoC specific binding document:
 +   * Documentation/devicetree/bindings/video/exynos_dp.txt
 +   * 
 Documentation/devicetree/bindings/video/analogix_dp-rockchip.txt
 +
 +Optional properties for dp-controller:
 +   -analogix,hpd-gpio:
 +   Hotplug detect GPIO.
 +   Indicates which GPIO should be used for hotplug
 +   

[RFC PATCH v7 04/10] mips: pistachio_defconfig: remove CONFIG_MMC_DW_IDMAC

2015-08-23 Thread Shawn Lin
DesignWare MMC Controller's transfer mode should be decided
at runtime instead of compile-time. So we remove this config
option and read dw_mmc's register to select DMA master.

Signed-off-by: Shawn Lin shawn@rock-chips.com
Acked-by: Govindraj Raja govindraj.r...@imgtec.com
Acked-by: Ralf Baechle r...@linux-mips.org
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/mips/configs/pistachio_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/mips/configs/pistachio_defconfig 
b/arch/mips/configs/pistachio_defconfig
index 1646cce..013c62c 100644
--- a/arch/mips/configs/pistachio_defconfig
+++ b/arch/mips/configs/pistachio_defconfig
@@ -257,7 +257,6 @@ CONFIG_MMC=y
 CONFIG_MMC_BLOCK_MINORS=16
 CONFIG_MMC_TEST=m
 CONFIG_MMC_DW=y
-CONFIG_MMC_DW_IDMAC=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 CONFIG_RTC_CLASS=y
-- 
2.3.7


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH v7 06/10] arm: exynos_defconfig: remove CONFIG_MMC_DW_IDMAC

2015-08-23 Thread Shawn Lin
DesignWare MMC Controller's transfer mode should be decided
at runtime instead of compile-time. So we remove this config
option and read dw_mmc's register to select DMA master.

Signed-off-by: Shawn Lin shawn@rock-chips.com
Acked-by: Krzysztof Kozlowski k.kozlow...@samsung.com
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/configs/exynos_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/configs/exynos_defconfig 
b/arch/arm/configs/exynos_defconfig
index 9504e77..7e4af6e 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -161,7 +161,6 @@ CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_S3C=y
 CONFIG_MMC_SDHCI_S3C_DMA=y
 CONFIG_MMC_DW=y
-CONFIG_MMC_DW_IDMAC=y
 CONFIG_MMC_DW_EXYNOS=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_MAX77686=y
-- 
2.3.7


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH v7 08/10] arm: lpc18xx_defconfig: remove CONFIG_MMC_DW_IDMAC

2015-08-23 Thread Shawn Lin
DesignWare MMC Controller's transfer mode should be decided
at runtime instead of compile-time. So we remove this config
option and read dw_mmc's register to select DMA master.

Signed-off-by: Shawn Lin shawn@rock-chips.com
Acked-by: Joachim Eastwood manab...@gmail.com
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/configs/lpc18xx_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/configs/lpc18xx_defconfig 
b/arch/arm/configs/lpc18xx_defconfig
index 1c47f86..b7e8cda 100644
--- a/arch/arm/configs/lpc18xx_defconfig
+++ b/arch/arm/configs/lpc18xx_defconfig
@@ -119,7 +119,6 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
 CONFIG_MMC=y
 CONFIG_MMC_DW=y
-CONFIG_MMC_DW_IDMAC=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_PCA9532=y
-- 
2.3.7


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH v7 09/10] arm: multi_v7_defconfig: remove CONFIG_MMC_DW_IDMAC

2015-08-23 Thread Shawn Lin
DesignWare MMC Controller's transfer mode should be decided
at runtime instead of compile-time. So we remove this config
option and read dw_mmc's register to select DMA master.

Signed-off-by: Shawn Lin shawn@rock-chips.com
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/configs/multi_v7_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/configs/multi_v7_defconfig 
b/arch/arm/configs/multi_v7_defconfig
index 5fd8df6..a3734b5 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -520,7 +520,6 @@ CONFIG_MMC_ATMELMCI=y
 CONFIG_MMC_MVSDIO=y
 CONFIG_MMC_SDHI=y
 CONFIG_MMC_DW=y
-CONFIG_MMC_DW_IDMAC=y
 CONFIG_MMC_DW_PLTFM=y
 CONFIG_MMC_DW_EXYNOS=y
 CONFIG_MMC_DW_ROCKCHIP=y
-- 
2.3.7


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v7 11/44] [media] media: use entity.graph_obj.mdev instead of .parent

2015-08-23 Thread Mauro Carvalho Chehab
From: Javier Martinez Canillas jav...@osg.samsung.com

The struct media_entity has a .parent field that stores a pointer
to the parent struct media_device. But recently a media_gobj was
embedded into the entities and since struct media_gojb already has
a pointer to a struct media_device in the .mdev field, the .parent
field becomes redundant and can be removed.

This patch replaces all the usage of .parent by .graph_obj.mdev so
that field will become unused and can be removed on a later patch.

No functional changes.

The transformation was made using the following coccinelle spatch:

@@
struct media_entity *me;
@@

- me-parent
+ me-graph_obj.mdev

@@
struct media_entity *link;
@@

- link-source-entity-parent
+ link-source-entity-graph_obj.mdev

@@
struct exynos_video_entity *ve;
@@

- ve-vdev.entity.parent
+ ve-vdev.entity.graph_obj.mdev

Suggested-by: Mauro Carvalho Chehab mche...@osg.samsung.com

Signed-off-by: Javier Martinez Canillas jav...@osg.samsung.com
Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com

diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index 0f3844470147..138b18416460 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -435,8 +435,8 @@ int __must_check media_device_register_entity(struct 
media_device *mdev,
int i;
 
/* Warn if we apparently re-register an entity */
-   WARN_ON(entity-parent != NULL);
-   entity-parent = mdev;
+   WARN_ON(entity-graph_obj.mdev != NULL);
+   entity-graph_obj.mdev = mdev;
 
spin_lock(mdev-lock);
/* Initialize media_gobj embedded at the entity */
@@ -471,7 +471,7 @@ EXPORT_SYMBOL_GPL(media_device_register_entity);
 void media_device_unregister_entity(struct media_entity *entity)
 {
int i;
-   struct media_device *mdev = entity-parent;
+   struct media_device *mdev = entity-graph_obj.mdev;
 
if (mdev == NULL)
return;
@@ -484,7 +484,7 @@ void media_device_unregister_entity(struct media_entity 
*entity)
media_gobj_remove(entity-graph_obj);
list_del(entity-list);
spin_unlock(mdev-lock);
-   entity-parent = NULL;
+   entity-graph_obj.mdev = NULL;
 }
 EXPORT_SYMBOL_GPL(media_device_unregister_entity);
 
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index 35e52cd1fc5a..a23c93369a04 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -332,7 +332,7 @@ EXPORT_SYMBOL_GPL(media_entity_graph_walk_next);
 __must_check int media_entity_pipeline_start(struct media_entity *entity,
 struct media_pipeline *pipe)
 {
-   struct media_device *mdev = entity-parent;
+   struct media_device *mdev = entity-graph_obj.mdev;
struct media_entity_graph graph;
struct media_entity *entity_err = entity;
int ret;
@@ -387,7 +387,7 @@ __must_check int media_entity_pipeline_start(struct 
media_entity *entity,
 
ret = entity-ops-link_validate(link);
if (ret  0  ret != -ENOIOCTLCMD) {
-   dev_dbg(entity-parent-dev,
+   dev_dbg(entity-graph_obj.mdev-dev,
link validation failed for \%s\:%u 
- \%s\:%u, error %d\n,
link-source-entity-name,
link-source-index,
@@ -401,7 +401,7 @@ __must_check int media_entity_pipeline_start(struct 
media_entity *entity,
 
if (!bitmap_full(active, entity-num_pads)) {
ret = -EPIPE;
-   dev_dbg(entity-parent-dev,
+   dev_dbg(entity-graph_obj.mdev-dev,
\%s\:%u must be connected by an enabled 
link\n,
entity-name,
(unsigned)find_first_zero_bit(
@@ -454,7 +454,7 @@ EXPORT_SYMBOL_GPL(media_entity_pipeline_start);
  */
 void media_entity_pipeline_stop(struct media_entity *entity)
 {
-   struct media_device *mdev = entity-parent;
+   struct media_device *mdev = entity-graph_obj.mdev;
struct media_entity_graph graph;
 
mutex_lock(mdev-graph_mutex);
@@ -490,8 +490,8 @@ struct media_entity *media_entity_get(struct media_entity 
*entity)
if (entity == NULL)
return NULL;
 
-   if (entity-parent-dev 
-   !try_module_get(entity-parent-dev-driver-owner))
+   if (entity-graph_obj.mdev-dev 
+   !try_module_get(entity-graph_obj.mdev-dev-driver-owner))
return NULL;
 
return entity;
@@ -511,8 +511,8 @@ void media_entity_put(struct media_entity *entity)
if (entity == NULL)
return;
 
-   if (entity-parent-dev)
-   module_put(entity-parent-dev-driver-owner);
+   if (entity-graph_obj.mdev-dev)
+   

[RFC PATCH v7 03/10] Documentation: synopsys-dw-mshc: add bindings for idmac and edmac

2015-08-23 Thread Shawn Lin
synopsys-dw-mshc supports three types of transfer mode. We add
bindings and description for how to use them at runtime.

Signed-off-by: Shawn Lin shawn@rock-chips.com
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 .../devicetree/bindings/mmc/synopsys-dw-mshc.txt   | 25 ++
 1 file changed, 25 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt 
b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
index 346c609..8636f5a 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
@@ -75,6 +75,12 @@ Optional properties:
 * vmmc-supply: The phandle to the regulator to use for vmmc.  If this is
   specified we'll defer probe until we can find this regulator.
 
+* dmas: List of DMA specifiers with the controller specific format as described
+  in the generic DMA client binding. Refer to dma.txt for details.
+
+* dma-names: request names for generic DMA client binding. Must be rx-tx.
+  Refer to dma.txt for details.
+
 Aliases:
 
 - All the MSHC controller nodes should be represented in the aliases node using
@@ -95,6 +101,23 @@ board specific portions as listed below.
#size-cells = 0;
};
 
+[board specific internal DMA resources]
+
+   dwmmc0@1220 {
+   clock-frequency = 4;
+   clock-freq-min-max = 40 2;
+   num-slots = 1;
+   broken-cd;
+   fifo-depth = 0x80;
+   card-detect-delay = 200;
+   vmmc-supply = buck8;
+   bus-width = 8;
+   cap-mmc-highspeed;
+   cap-sd-highspeed;
+   };
+
+[board specific generic DMA request binding]
+
dwmmc0@1220 {
clock-frequency = 4;
clock-freq-min-max = 40 2;
@@ -106,4 +129,6 @@ board specific portions as listed below.
bus-width = 8;
cap-mmc-highspeed;
cap-sd-highspeed;
+   dmas = pdma 12;
+   dma-names = rx-tx;
};
-- 
2.3.7


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH v7 02/10] mmc: dw_mmc: use macro for HCON register operations

2015-08-23 Thread Shawn Lin
This patch add some macros for HCON register operations
to make code more readable.

Signed-off-by: Shawn Lin shawn@rock-chips.com
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 drivers/mmc/host/dw_mmc.c | 6 +++---
 drivers/mmc/host/dw_mmc.h | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 9c91983..0a3c63c 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2678,7 +2678,7 @@ static void dw_mci_init_dma(struct dw_mci *host)
* Check ADDR_CONFIG bit in HCON to find
* IDMAC address bus width
*/
-   addr_config = (mci_readl(host, HCON)  27)  0x01;
+   addr_config = SDMMC_GET_ADDR_CONFIG(mci_readl(host, HCON));
 
if (addr_config == 1) {
/* host supports IDMAC in 64-bit address mode */
@@ -3060,7 +3060,7 @@ int dw_mci_probe(struct dw_mci *host)
 * Get the host data width - this assumes that HCON has been set with
 * the correct values.
 */
-   i = (mci_readl(host, HCON)  7)  0x7;
+   i = SDMMC_GET_HDATA_WIDTH(mci_readl(host, HCON));
if (!i) {
host-push_data = dw_mci_push_data16;
host-pull_data = dw_mci_pull_data16;
@@ -3142,7 +3142,7 @@ int dw_mci_probe(struct dw_mci *host)
if (host-pdata-num_slots)
host-num_slots = host-pdata-num_slots;
else
-   host-num_slots = ((mci_readl(host, HCON)  1)  0x1F) + 1;
+   host-num_slots = SDMMC_GET_SLOT_NUM(mci_readl(host, HCON));
 
/*
 * Enable interrupts for command done, data over, data empty,
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 811d467..f2a88d4 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -154,6 +154,9 @@
 #define DMA_INTERFACE_GDMA (0x2)
 #define DMA_INTERFACE_NODMA(0x3)
 #define SDMMC_GET_TRANS_MODE(x)(((x)16)  0x3)
+#define SDMMC_GET_SLOT_NUM(x)  x)1)  0x1F) + 1)
+#define SDMMC_GET_HDATA_WIDTH(x)   (((x)7)  0x7)
+#define SDMMC_GET_ADDR_CONFIG(x)   (((x)27)  0x1)
 /* Internal DMAC interrupt defines */
 #define SDMMC_IDMAC_INT_AI BIT(9)
 #define SDMMC_IDMAC_INT_NI BIT(8)
-- 
2.3.7


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH v7 10/10] arm: zx_defconfig: remove CONFIG_MMC_DW_IDMAC

2015-08-23 Thread Shawn Lin
DesignWare MMC Controller's transfer mode should be decided
at runtime instead of compile-time. So we remove this config
option and read dw_mmc's register to select DMA master.

Signed-off-by: Shawn Lin shawn@rock-chips.com
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/configs/zx_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/configs/zx_defconfig b/arch/arm/configs/zx_defconfig
index b200bb0..ab683fb 100644
--- a/arch/arm/configs/zx_defconfig
+++ b/arch/arm/configs/zx_defconfig
@@ -83,7 +83,6 @@ CONFIG_MMC=y
 CONFIG_MMC_UNSAFE_RESUME=y
 CONFIG_MMC_BLOCK_MINORS=16
 CONFIG_MMC_DW=y
-CONFIG_MMC_DW_IDMAC=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT4_FS=y
 CONFIG_EXT4_FS_POSIX_ACL=y
-- 
2.3.7


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH v7 05/10] arc: axs10x_defconfig: remove CONFIG_MMC_DW_IDMAC

2015-08-23 Thread Shawn Lin
DesignWare MMC Controller's transfer mode should be decided
at runtime instead of compile-time. So we remove this config
option and read dw_mmc's register to select DMA master.

Signed-off-by: Shawn Lin shawn@rock-chips.com
Acked-by: Vineet Gupta vgu...@synopsys.com
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arc/configs/axs101_defconfig | 1 -
 arch/arc/configs/axs103_defconfig | 1 -
 arch/arc/configs/axs103_smp_defconfig | 1 -
 3 files changed, 3 deletions(-)

diff --git a/arch/arc/configs/axs101_defconfig 
b/arch/arc/configs/axs101_defconfig
index 562dac6..c92c0ef 100644
--- a/arch/arc/configs/axs101_defconfig
+++ b/arch/arc/configs/axs101_defconfig
@@ -89,7 +89,6 @@ CONFIG_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMC_DW=y
-CONFIG_MMC_DW_IDMAC=y
 # CONFIG_IOMMU_SUPPORT is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT4_FS=y
diff --git a/arch/arc/configs/axs103_defconfig 
b/arch/arc/configs/axs103_defconfig
index 83a6d8d..cfac24e 100644
--- a/arch/arc/configs/axs103_defconfig
+++ b/arch/arc/configs/axs103_defconfig
@@ -95,7 +95,6 @@ CONFIG_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMC_DW=y
-CONFIG_MMC_DW_IDMAC=y
 # CONFIG_IOMMU_SUPPORT is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT4_FS=y
diff --git a/arch/arc/configs/axs103_smp_defconfig 
b/arch/arc/configs/axs103_smp_defconfig
index f1e1c84..9922a11 100644
--- a/arch/arc/configs/axs103_smp_defconfig
+++ b/arch/arc/configs/axs103_smp_defconfig
@@ -96,7 +96,6 @@ CONFIG_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMC_DW=y
-CONFIG_MMC_DW_IDMAC=y
 # CONFIG_IOMMU_SUPPORT is not set
 CONFIG_EXT3_FS=y
 CONFIG_EXT4_FS=y
-- 
2.3.7


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH v7 07/10] arm: hisi_defconfig: remove CONFIG_MMC_DW_IDMAC

2015-08-23 Thread Shawn Lin
DesignWare MMC Controller's transfer mode should be decided
at runtime instead of compile-time. So we remove this config
option and read dw_mmc's register to select DMA master.

Signed-off-by: Shawn Lin shawn@rock-chips.com
Acked-by: Wei Xu xuw...@hisilicon.com
---

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/configs/hisi_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/configs/hisi_defconfig b/arch/arm/configs/hisi_defconfig
index 5997dbc..b2e340b 100644
--- a/arch/arm/configs/hisi_defconfig
+++ b/arch/arm/configs/hisi_defconfig
@@ -69,7 +69,6 @@ CONFIG_NOP_USB_XCEIV=y
 CONFIG_MMC=y
 CONFIG_RTC_CLASS=y
 CONFIG_MMC_DW=y
-CONFIG_MMC_DW_IDMAC=y
 CONFIG_MMC_DW_PLTFM=y
 CONFIG_RTC_DRV_PL031=y
 CONFIG_DMADEVICES=y
-- 
2.3.7


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 06/14] Documentation: drm/bridge: add document for analogix_dp

2015-08-23 Thread Yakir Yang

Hi Krzysztof,

在 08/23/2015 07:43 PM, Krzysztof Kozlowski 写道:

2015-08-24 8:23 GMT+09:00 Rob Herring robherri...@gmail.com:

On Wed, Aug 19, 2015 at 9:50 AM, Yakir Yang y...@rock-chips.com wrote:

Analogix dp driver is split from exynos dp driver, so we just
make an copy of exynos_dp.txt, and then simplify exynos_dp.txt

Beside update some exynos dtsi file with the latest change
according to the devicetree binding documents.

You can't just change the exynos bindings and break compatibility. Is
there some agreement with exynos folks to do this?

No, there is no agreement. This wasn't even sent to Exynos maintainers.


Sorry about this one, actually I have add Exynos maintainers in version 
1  version 2,

but lose some maintainers in version 3, I would fix it in bellow versions.


Additionally the patchset did not look interesting to me because of
misleading subject - Documentation instead of ARM: dts:.

Yakir, please:
1. Provide backward compatibility. Mark old properties as deprecated
but still support them.


Do you mean that I should keep the old properties declare in exynos-dp.txt,
but just mark them as deprecated flag. Let me show same examples, make
me understand your suggest rightly.

1. samsung,ycbcr-coeff is abandoned in latest analogix-dp driver, 
absolutely
I should not carry this to analogix-dp.txt document. But I should 
keep this in

exynos-dp.txt document, and mark them with an little deprecated flag.

[Documentation/devicetree/bindings/video/exynos_dp.txt]
Required properties for dp-controller:
   [...]
-samsung,ycbcr-coeff (DEPRECATED):
YCbCr co-efficients for input video.
COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1

Is it right ?


2. Separate all DTS changes to a separate patch, unless bisectability
would be hurt. Anyway you should prepare it in a such way that
separation would be possible without breaking bisectability.


So I should separate this patch into two parts, one is name Document:,
the other is ARM: dts: .

Honestly, I don't understand what the bisectability means in this case.


3. Use proper subject for the patch changing DTS. This is not
documentation change!


Hmm... when I separate this patch into two parts, I though I can keep
Documentation proper subject in this patch, and the other is the ARM: 
dts

proper subject. Am I right ?


4. Please use script get_maintainers to obtain list of valid
maintainers and CC-them with at least cover letter and patches
requiring their attention.


Yeah, thanks.


Thanks a lot,
- Yakir


Best regards,
Krzysztof





Signed-off-by: Yakir Yang y...@rock-chips.com
---
Changes in v3:
- Take Heiko suggest, add devicetree binding documents.
- Take Thierry Reding suggest, remove sync pol  colorimetry properies
   from the new analogix dp driver devicetree binding.
- Update the exist exynos dtsi file with the latest DP DT properies.

Changes in v2: None

  .../devicetree/bindings/drm/bridge/analogix_dp.txt | 70 ++
  .../devicetree/bindings/video/exynos_dp.txt| 50 ++--
  arch/arm/boot/dts/exynos5250-arndale.dts   | 10 ++--
  arch/arm/boot/dts/exynos5250-smdk5250.dts  | 10 ++--
  arch/arm/boot/dts/exynos5250-snow.dts  | 12 ++--
  arch/arm/boot/dts/exynos5250-spring.dts| 12 ++--
  arch/arm/boot/dts/exynos5420-peach-pit.dts | 12 ++--
  arch/arm/boot/dts/exynos5420-smdk5420.dts  | 10 ++--
  arch/arm/boot/dts/exynos5800-peach-pi.dts  | 12 ++--
  9 files changed, 119 insertions(+), 79 deletions(-)
  create mode 100644 
Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt

diff --git a/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt 
b/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt
new file mode 100644
index 000..6127018
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt
@@ -0,0 +1,70 @@
+Analogix Display Port bridge bindings
+
+Required properties for dp-controller:
+   -compatible:
+   platform specific such as:
+* samsung,exynos5-dp
+* rockchip,rk3288-dp
+   -reg:
+   physical base address of the controller and length
+   of memory mapped region.
+   -interrupts:
+   interrupt combiner values.
+   -clocks:
+   from common clock binding: handle to dp clock.
+   -clock-names:
+   from common clock binding: Shall be dp.
+   -interrupt-parent:
+   phandle to Interrupt combiner node.
+   -phys:
+   from general PHY binding: the phandle for the PHY device.
+   -phy-names:
+   from general PHY binding: Should be dp.
+   -analogix,color-space:
+   input video data format.
+   COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2
+   -analogix,color-depth:
+   number of bits per colour component.
+   COLOR_6 = 0, COLOR_8 

[PATCH 07/18] ARM: EXYNOS: use const and __initconst for smp_operations

2015-08-23 Thread Masahiro Yamada
The smp_operations structure is not over-written, so add const
qualifier and replace __initdata with __initconst.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 arch/arm/mach-exynos/common.h  | 2 +-
 arch/arm/mach-exynos/platsmp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 1534925..e349a03 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -149,7 +149,7 @@ static inline void exynos_pm_init(void) {}
 extern void exynos_cpu_resume(void);
 extern void exynos_cpu_resume_ns(void);
 
-extern struct smp_operations exynos_smp_ops;
+extern const struct smp_operations exynos_smp_ops;
 
 extern void exynos_cpu_power_down(int cpu);
 extern void exynos_cpu_power_up(int cpu);
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 98a2c0c..5bd9559 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -479,7 +479,7 @@ static void exynos_cpu_die(unsigned int cpu)
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
-struct smp_operations exynos_smp_ops __initdata = {
+const struct smp_operations exynos_smp_ops __initconst = {
.smp_init_cpus  = exynos_smp_init_cpus,
.smp_prepare_cpus   = exynos_smp_prepare_cpus,
.smp_secondary_init = exynos_secondary_init,
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/18] ARM: use const and __initconst for smp_operations

2015-08-23 Thread Masahiro Yamada

Currently, SoC code can not add const qualifier to smp_operations
structures although they are never over-written.

01/18 and 02/18 add small changes to the ARM core to fix that.
The rest of this series replace __initdata with const ... __initconst
for each of SoC code.

I split this series into per-SoC so that each sub-arch maintainer
can easily give their Acked-by.  (Is this better?)

Russell, Olof, and Arnd:

How should this series be applied (if it looks good)?
The first two are ARM-tree wide and looks like in the field of Russell.
The rest are highly SoC-related.



Masahiro Yamada (18):
  ARM: add const qualifier to the argument of smp_set_ops()
  ARM: add const qualifier to smp_operations member in structures
  ARM: alpine: use const and __initconst for smp_operations
  ARM: axxia: use const and __initconst for smp_operations
  ARM: BCM: use const and __initconst for smp_operations
  ARM: berlin: use const and __initconst for smp_operations
  ARM: EXYNOS: use const and __initconst for smp_operations
  ARM: hisi: do not export smp_operations structures
  ARM: hisi: use const and __initconst for smp_operations
  ARM: mvebu: use const and __initconst for smp_operations
  ARM: qcom: use const and __initconst for smp_operations
  ARM: rockchip: use const and __initconst for smp_operations
  ARM: socfpga: use const and __initconst for smp_operations
  ARM: sunxi: use const and __initconst for smp_operations
  ARM: uniphier: use const and __initconst for smp_operations
  ARM: zx: use const and __initconst for smp_operations
  ARM: zynq: use const and __initconst for smp_operations
  ARM: mcpm: use const and __initconst for smp_operations

 arch/arm/common/mcpm_platsmp.c  | 2 +-
 arch/arm/include/asm/mach/arch.h| 2 +-
 arch/arm/include/asm/smp.h  | 4 ++--
 arch/arm/kernel/smp.c   | 2 +-
 arch/arm/mach-alpine/platsmp.c  | 2 +-
 arch/arm/mach-axxia/platsmp.c   | 2 +-
 arch/arm/mach-bcm/bcm63xx_smp.c | 2 +-
 arch/arm/mach-bcm/kona_smp.c| 2 +-
 arch/arm/mach-bcm/platsmp-brcmstb.c | 2 +-
 arch/arm/mach-berlin/platsmp.c  | 2 +-
 arch/arm/mach-exynos/common.h   | 2 +-
 arch/arm/mach-exynos/platsmp.c  | 2 +-
 arch/arm/mach-hisi/core.h   | 3 ---
 arch/arm/mach-hisi/platsmp.c| 6 +++---
 arch/arm/mach-mvebu/armada-370-xp.h | 2 +-
 arch/arm/mach-mvebu/platsmp-a9.c| 4 ++--
 arch/arm/mach-mvebu/platsmp.c   | 2 +-
 arch/arm/mach-qcom/platsmp.c| 6 +++---
 arch/arm/mach-rockchip/platsmp.c| 2 +-
 arch/arm/mach-socfpga/platsmp.c | 4 ++--
 arch/arm/mach-sunxi/platsmp.c   | 4 ++--
 arch/arm/mach-uniphier/platsmp.c| 2 +-
 arch/arm/mach-zx/platsmp.c  | 2 +-
 arch/arm/mach-zynq/common.h | 2 +-
 arch/arm/mach-zynq/platsmp.c| 2 +-
 25 files changed, 32 insertions(+), 35 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 06/14] Documentation: drm/bridge: add document for analogix_dp

2015-08-23 Thread Yakir Yang

Hi Rob,

在 08/23/2015 06:23 PM, Rob Herring 写道:

On Wed, Aug 19, 2015 at 9:50 AM, Yakir Yang y...@rock-chips.com wrote:

Analogix dp driver is split from exynos dp driver, so we just
make an copy of exynos_dp.txt, and then simplify exynos_dp.txt

Beside update some exynos dtsi file with the latest change
according to the devicetree binding documents.

You can't just change the exynos bindings and break compatibility. Is
there some agreement with exynos folks to do this?



Yeah, this change only start to introduce in version 3 series, so there is
no agreement or discuss before.




Signed-off-by: Yakir Yang y...@rock-chips.com
---
Changes in v3:
- Take Heiko suggest, add devicetree binding documents.
- Take Thierry Reding suggest, remove sync pol  colorimetry properies
   from the new analogix dp driver devicetree binding.
- Update the exist exynos dtsi file with the latest DP DT properies.

Changes in v2: None

  .../devicetree/bindings/drm/bridge/analogix_dp.txt | 70 ++
  .../devicetree/bindings/video/exynos_dp.txt| 50 ++--
  arch/arm/boot/dts/exynos5250-arndale.dts   | 10 ++--
  arch/arm/boot/dts/exynos5250-smdk5250.dts  | 10 ++--
  arch/arm/boot/dts/exynos5250-snow.dts  | 12 ++--
  arch/arm/boot/dts/exynos5250-spring.dts| 12 ++--
  arch/arm/boot/dts/exynos5420-peach-pit.dts | 12 ++--
  arch/arm/boot/dts/exynos5420-smdk5420.dts  | 10 ++--
  arch/arm/boot/dts/exynos5800-peach-pi.dts  | 12 ++--
  9 files changed, 119 insertions(+), 79 deletions(-)
  create mode 100644 
Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt

diff --git a/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt 
b/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt
new file mode 100644
index 000..6127018
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/bridge/analogix_dp.txt
@@ -0,0 +1,70 @@
+Analogix Display Port bridge bindings
+
+Required properties for dp-controller:
+   -compatible:
+   platform specific such as:
+* samsung,exynos5-dp
+* rockchip,rk3288-dp
+   -reg:
+   physical base address of the controller and length
+   of memory mapped region.
+   -interrupts:
+   interrupt combiner values.
+   -clocks:
+   from common clock binding: handle to dp clock.
+   -clock-names:
+   from common clock binding: Shall be dp.
+   -interrupt-parent:
+   phandle to Interrupt combiner node.
+   -phys:
+   from general PHY binding: the phandle for the PHY device.
+   -phy-names:
+   from general PHY binding: Should be dp.
+   -analogix,color-space:
+   input video data format.
+   COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2
+   -analogix,color-depth:
+   number of bits per colour component.
+   COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3

This seems pretty generic. Just use 6, 8, 10, or 12 for values. And
drop the vendor prefix.


Okay, thanks



+   -analogix,link-rate:
+   max link rate supported by the eDP controller.
+   LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A,
+   LINK_RATE_5_40GBPS = 0x14

Same here. I'd rather see something like link-rate-mbps and use the
actual rate.


Like link-rate-mbps = 162000, so I need of_property_read_u32() for 
this prop.


Okay, done.


+   -analogix,lane-count:
+   max number of lanes supported by the eDP contoller.
+   LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4

And drop the vendor prefix here.


Done


+   -port@[X]: SoC specific port nodes with endpoint definitions as defined
+   in Documentation/devicetree/bindings/media/video-interfaces.txt,
+   please refer to the SoC specific binding document:
+   * Documentation/devicetree/bindings/video/exynos_dp.txt
+   * 
Documentation/devicetree/bindings/video/analogix_dp-rockchip.txt
+
+Optional properties for dp-controller:
+   -analogix,hpd-gpio:
+   Hotplug detect GPIO.
+   Indicates which GPIO should be used for hotplug
+   detection

We should align with hpd-gpios used by HDMI connector binding. Or do
we need a DP connector binding that this should be defined in?
Probably so.

The DRM related bindings are such a cluster f*ck with everyone picking
their own way to do things. Just grep hpd in bindings for starters.
That is just the tip.



Hmm... I don't understand how the HDMI connector binding works, there are no
driver that name with hdmi-connector compatible, does it just an 
sample case

for all HDMI dts node?

But I'm okay with your suggest here, change analogix,hpd-gpio to 
hpd-gpios  ;)



+   -video interfaces: Device node 

Re: [PATCH v3 06/14] Documentation: drm/bridge: add document for analogix_dp

2015-08-23 Thread Krzysztof Kozlowski
On 24.08.2015 11:42, Yakir Yang wrote:
 Hi Krzysztof,
 
 在 08/23/2015 07:43 PM, Krzysztof Kozlowski 写道:
 2015-08-24 8:23 GMT+09:00 Rob Herring robherri...@gmail.com:
 On Wed, Aug 19, 2015 at 9:50 AM, Yakir Yang y...@rock-chips.com wrote:
 Analogix dp driver is split from exynos dp driver, so we just
 make an copy of exynos_dp.txt, and then simplify exynos_dp.txt

 Beside update some exynos dtsi file with the latest change
 according to the devicetree binding documents.
 You can't just change the exynos bindings and break compatibility. Is
 there some agreement with exynos folks to do this?
 No, there is no agreement. This wasn't even sent to Exynos maintainers.
 
 Sorry about this one, actually I have add Exynos maintainers in version
 1  version 2,
 but lose some maintainers in version 3, I would fix it in bellow versions.
 
 Additionally the patchset did not look interesting to me because of
 misleading subject - Documentation instead of ARM: dts:.

 Yakir, please:
 1. Provide backward compatibility. Mark old properties as deprecated
 but still support them.
 
 Do you mean that I should keep the old properties declare in exynos-dp.txt,
 but just mark them as deprecated flag.

That is one of ways how to do this. However more important is that
driver should still support old bindings so such code:

-   if (of_property_read_u32(dp_node, samsung,color-space,
+   if (of_property_read_u32(dp_node, analogix,color-space,

is probably wrong. Will the driver support old DTB in the same way as it
was supporting before the change?

 Let me show same examples, make
 me understand your suggest rightly.

exynos-dp already contains deprecated properties. Other ways of doing
this would be:
Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
Documentation/devicetree/bindings/rtc/s3c-rtc.txt

It depends up to you. The touchscreen looks good because it organizes
old properties in a common section. In case of exynos-dp.txt you can add
at beginning of file information about new bindings and mark everything
deprecated.

 
 1. samsung,ycbcr-coeff is abandoned in latest analogix-dp driver,
 absolutely
 I should not carry this to analogix-dp.txt document. But I should
 keep this in
 exynos-dp.txt document, and mark them with an little deprecated flag.
 
 [Documentation/devicetree/bindings/video/exynos_dp.txt]
 Required properties for dp-controller:
[...]
 -samsung,ycbcr-coeff (DEPRECATED):
 YCbCr co-efficients for input video.
 COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1
 
 Is it right ?

Yes, this is right.

 
 2. Separate all DTS changes to a separate patch, unless bisectability
 would be hurt. Anyway you should prepare it in a such way that
 separation would be possible without breaking bisectability.
 
 So I should separate this patch into two parts, one is name Document:,
 the other is ARM: dts: .

Yes.

 
 Honestly, I don't understand what the bisectability means in this case.

I was referring to bisectability in general. The patchset should be
fully bisectable which means that it does not introduce any issues
during git bisect. This effectively means that at each intermediate
step (after applying each patch, one by one) every existing stuff works
the same as previously without any regression. Including booting with
old DTB.

 
 3. Use proper subject for the patch changing DTS. This is not
 documentation change!
 
 Hmm... when I separate this patch into two parts, I though I can keep
 Documentation proper subject in this patch, and the other is the ARM:
 dts
 proper subject. Am I right ?

Yes, you're right.

 
 4. Please use script get_maintainers to obtain list of valid
 maintainers and CC-them with at least cover letter and patches
 requiring their attention.
 
 Yeah, thanks.

Sure. Now I found older versions of the patchset but previously there
were no changes to the bindings. Again the prefix in subject is
important to easily filter out and find necessary emails.

BTW, I like the patchset because I like in general works which merge
code and reduce duplicate stuff.

Best regards,
Krzysztof


--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html