Re: [PATCH 1/1] ARM: exynos_defconfig: Disable IOMMU support

2015-03-09 Thread Javier Martinez Canillas
Hello Inki,

On 03/10/2015 03:50 AM, Inki Dae wrote:
> On 2015년 03월 07일 00:07, Javier Martinez Canillas wrote:

 Another thing that may be useful to detect these issues early is to have
 exynos-drm-next be pulled by linux-next since otherwise the integration
 is not tested until the changes are picked by the DRM maintainer.

>> 
>> I know that I may sound like a broken record but could you please make
>> sure that your tree is included in linux-next?
> 
> Got it. I got several requests before. I have created a new branch -
> exynos-drm/for-next - based on top of drm-next, which would have same
> patch set as existing exynos-drm-next.
> 
> I will request Stephen Rothwell to merge remote-tracking branch,
> 'exynos-drm/for-next'.
>

Great new, thanks a lot.
 
> Thanks,
> Inki Dae
> 

Best regards,
Javier
--
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 1/1] ARM: exynos_defconfig: Disable IOMMU support

2015-03-09 Thread Inki Dae
On 2015년 03월 07일 00:07, Javier Martinez Canillas wrote:
> Hello Inki,
> 
> On 03/06/2015 02:32 PM, Inki Dae wrote:
>>>
>>> Another interesting data point is that the error in next-20150303 for
>>> these 2 boards was the NULL pointer dereference in exynos_plane_destroy
>>> that I got with 4.0-rc2 (when IOMMU is disabled) in Snow and Peach Pit.
>>
>> I think the NULL pointer dereference issue may be fixed with below patch
>> I merged to exynos-drm-fixes just a while ago,
>> https://lkml.org/lkml/2015/2/17/434
>>
>> Could you test it with this patch again?
>>
> 
> Thanks, I tested v4.0-rc2 + the patch to disable IOMMU + the patch you
> mentioned and the crash does not happen anymore in Peach Pit and Snow.
> 
>>>
>>> Another thing that may be useful to detect these issues early is to have
>>> exynos-drm-next be pulled by linux-next since otherwise the integration
>>> is not tested until the changes are picked by the DRM maintainer.
>>>
> 
> I know that I may sound like a broken record but could you please make
> sure that your tree is included in linux-next?

Got it. I got several requests before. I have created a new branch -
exynos-drm/for-next - based on top of drm-next, which would have same
patch set as existing exynos-drm-next.

I will request Stephen Rothwell to merge remote-tracking branch,
'exynos-drm/for-next'.

Thanks,
Inki Dae

> 
> That way the fix could be tested by all the machines that are testing
> linux-next daily since right now Exynos will still be broken until you
> send a pull request to the DRM maintainer.
> 
> So it would be nice to get the changes as soon as possible into -next
> to avoid a recurrent error to mask other possible new issues.
> 
> Best regards,
> Javier
> --
> 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
> 

--
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 v2] thermal: exynos: Add the support for Exynos5433 TMU

2015-03-09 Thread Chanwoo Choi
This patch adds the support for Exynos5433's TMU (Thermal Management Unit).
Exynos5433 has a little different register bit fields as following description:
- Support the eight trip points for rising/falling interrupt by using two 
registers
- Read the calibration type (1-point or 2-point) and sensor id from TRIMINFO 
register
- Use a little different register address

Cc: Zhang Rui 
Cc: Eduardo Valentin 
Cc: Lukasz Majewski 
Signed-off-by: Chanwoo Choi 
---
Changes from v1:
(https://lkml.org/lkml/2015/2/26/234)
- Add exynos5433_tmu_control() instead of using exynos7_tmu_control() on both
 Exynos5433 and Exynos7.
- Separate the patches related to devicetree and then send send Exnos5433's tmu
  patches[1] with other Exynos5433 devicetree patches.
  [1] https://lkml.org/lkml/2015/3/9/1036

 drivers/thermal/samsung/exynos_tmu.c | 187 ++-
 drivers/thermal/samsung/exynos_tmu.h |   1 +
 2 files changed, 186 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c 
b/drivers/thermal/samsung/exynos_tmu.c
index 1d30b09..531f4b17 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -97,6 +97,32 @@
 #define EXYNOS4412_MUX_ADDR_VALUE  6
 #define EXYNOS4412_MUX_ADDR_SHIFT  20
 
+/* Exynos5433 specific registers */
+#define EXYNOS5433_TMU_REG_CONTROL10x024
+#define EXYNOS5433_TMU_SAMPLING_INTERVAL   0x02c
+#define EXYNOS5433_TMU_COUNTER_VALUE0  0x030
+#define EXYNOS5433_TMU_COUNTER_VALUE1  0x034
+#define EXYNOS5433_TMU_REG_CURRENT_TEMP1   0x044
+#define EXYNOS5433_THD_TEMP_RISE3_00x050
+#define EXYNOS5433_THD_TEMP_RISE7_40x054
+#define EXYNOS5433_THD_TEMP_FALL3_00x060
+#define EXYNOS5433_THD_TEMP_FALL7_40x064
+#define EXYNOS5433_TMU_REG_INTEN   0x0c0
+#define EXYNOS5433_TMU_REG_INTPEND 0x0c8
+#define EXYNOS5433_TMU_EMUL_CON0x110
+#define EXYNOS5433_TMU_PD_DET_EN   0x130
+
+#define EXYNOS5433_TRIMINFO_SENSOR_ID_SHIFT16
+#define EXYNOS5433_TRIMINFO_CALIB_SEL_SHIFT23
+#define EXYNOS5433_TRIMINFO_SENSOR_ID_MASK \
+   (0xf << EXYNOS5433_TRIMINFO_SENSOR_ID_SHIFT)
+#define EXYNOS5433_TRIMINFO_CALIB_SEL_MASK BIT(23)
+
+#define EXYNOS5433_TRIMINFO_ONE_POINT_TRIMMING 0
+#define EXYNOS5433_TRIMINFO_TWO_POINT_TRIMMING 1
+
+#define EXYNOS5433_PD_DET_EN   1
+
 /*exynos5440 specific registers*/
 #define EXYNOS5440_TMU_S0_7_TRIM   0x000
 #define EXYNOS5440_TMU_S0_7_CTRL   0x020
@@ -484,6 +510,101 @@ out:
return ret;
 }
 
+static int exynos5433_tmu_initialize(struct platform_device *pdev)
+{
+   struct exynos_tmu_data *data = platform_get_drvdata(pdev);
+   struct exynos_tmu_platform_data *pdata = data->pdata;
+   struct thermal_zone_device *tz = data->tzd;
+   unsigned int status, trim_info;
+   unsigned int rising_threshold = 0, falling_threshold = 0;
+   unsigned long temp, temp_hist;
+   int ret = 0, threshold_code, i, sensor_id, cal_type;
+
+   status = readb(data->base + EXYNOS_TMU_REG_STATUS);
+   if (!status) {
+   ret = -EBUSY;
+   goto out;
+   }
+
+   trim_info = readl(data->base + EXYNOS_TMU_REG_TRIMINFO);
+   sanitize_temp_error(data, trim_info);
+
+   /* Read the temperature sensor id */
+   sensor_id = (trim_info & EXYNOS5433_TRIMINFO_SENSOR_ID_MASK)
+   >> EXYNOS5433_TRIMINFO_SENSOR_ID_SHIFT;
+   dev_info(&pdev->dev, "Temperature sensor ID: 0x%x\n", sensor_id);
+
+   /* Read the calibration mode */
+   writel(trim_info, data->base + EXYNOS_TMU_REG_TRIMINFO);
+   cal_type = (trim_info & EXYNOS5433_TRIMINFO_CALIB_SEL_MASK)
+   >> EXYNOS5433_TRIMINFO_CALIB_SEL_SHIFT;
+
+   switch (cal_type) {
+   case EXYNOS5433_TRIMINFO_ONE_POINT_TRIMMING:
+   pdata->cal_type = TYPE_ONE_POINT_TRIMMING;
+   break;
+   case EXYNOS5433_TRIMINFO_TWO_POINT_TRIMMING:
+   pdata->cal_type = TYPE_TWO_POINT_TRIMMING;
+   break;
+   default:
+   pdata->cal_type = TYPE_ONE_POINT_TRIMMING;
+   break;
+   };
+
+   dev_info(&pdev->dev, "Calibration type is %d-point calibration\n",
+   cal_type ?  2 : 1);
+
+   /* Write temperature code for rising and falling threshold */
+   for (i = 0; i < of_thermal_get_ntrips(tz); i++) {
+   int rising_reg_offset, falling_reg_offset;
+   int j = 0;
+
+   switch (i) {
+   case 0:
+   case 1:
+   case 2:
+   case 3:
+   rising_reg_offset = EXYNOS5433_THD_TEMP_RISE3_0;
+   falling_reg_offset = EXYNOS5433_THD_TEMP_FALL3_0;
+   j = i;
+   break;
+ 

[PATCHv v6 1/9] arm64: dts: exynos: Add dts files for 64-bit Exynos5433 SoC

2015-03-09 Thread Chanwoo Choi
This patch adds new Exynos5433 dtsi to support 64-bit Exynos5433 SoC based on
Octal core CPUs (quad Cortex-A57 and quad Cortex-A53). And Exynos5433 supports
PSCI (Power State Coordination Interface) v0.1.

This patch includes following dt node to support Exynos5433 SoC:
1. Octa core for big.LITTLE architecture
- Cortex-A53 LITTLE Quad-core
- Cortex-A57 big Quad-core
- Support PSCI v0.1

2. clock controller node:
- CMU_TOP   : clocks for IMEM/FSYS/G3D/GSCL/HEVC/MSCL/G2D/MFC/PERIC/PERIS
- CMU_CPIF  : clocks for LLI (Low Latency Interface)
- CMU_MIF   : clocks for DRAM Memory Controller
- CMU_PERIC : clocks for UART/I2C/SPI/I2S/PCM/SPDIF/PWM/SLIMBUS
- CMU_PERIS : clocks for PMU/TMU/MCT/WDT/RTC/SECKEY/TZPC
- CMU_FSYS  : clocks for USB/UFS/SDMMC/TSI/PDMA
- CMU_G2D   : clocks for G2D/MDMA
- CMU_DISP  : clocks for DECON/HDMI/DSIM/MIXER
- CMU_AUD   : clocks for Cortex-A5/BUS/AUDIO
- CMU_BUS{0|1|2} : clocks for global data buses and global peripheral buses
- CMU_G3D   : clocks for 3D Graphics Engine
- CMU_GSCL  : clocks for GSCALER
- CMU_APOLLO: clocks for Cortex-A53 Quad-core processor.
- CMU_ATLAS : clocks for Cortex-A57 Quad-core processor,
  CoreSight and L2 cache controller.
- CMU_MSCL  : clocks for M2M (Memory to Memory) scaler and JPEG IPs.
- CMU_MFC   : clocks for MFC (Multi-Format Codec) IP.
- CMU_HEVC  : clocks for HEVC(High Efficiency Video Codec) decoder IP.
- CMU_ISP   : clocks for FIMC-ISP/DRC/SCLC/DIS/3DNR IPs.
- CMU_CAM0  : clocks for MIPI_CSIS{0|1}/FIMC_LITE_{A|B|D}/FIMC_3AA{0|1} IPs.
- CMU_CAM1  : clocks for COrtex-A5/MIPI_CSIS2/FIMC_LITE_C/FIMC-FD IPs.

3. pinctrl node for GPIO:
- alive/aud/cpif/ese/finger/fsys/imem/nfc/peric/touch pad

4. HS (High-Speed) I2C device
5. Serial device
6. ARCH timer (arm,armv8-timer)
7. Interrupt controller (arm,gic-400)

Cc: Kukjin Kim 
Cc: Mark Rutland 
Cc: Marc Zyngier 
Cc: Arnd Bergmann 
Cc: Olof Johansson 
Cc: Catalin Marinas 
Cc: Will Deacon 
Signed-off-by: Chanwoo Choi 
Acked-by: Inki Dae 
---
 arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi | 698 +
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 669 
 2 files changed, 1367 insertions(+)
 create mode 100644 arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/exynos/exynos5433.dtsi

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi
new file mode 100644
index 000..c56bbf8
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi
@@ -0,0 +1,698 @@
+/*
+ * Samsung's Exynos5433 SoC pin-mux and pin-config device tree source
+ *
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Samsung's Exynos5433 SoC pin-mux and pin-config options are listed as device
+ * tree nodes are listed in this file.
+ *
+ * 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.
+*/
+
+&pinctrl_alive {
+   gpa0: gpa0 {
+   gpio-controller;
+   #gpio-cells = <2>;
+
+   interrupt-controller;
+   interrupt-parent = <&gic>;
+   interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
+<0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>;
+   #interrupt-cells = <2>;
+   };
+
+   gpa1: gpa1 {
+   gpio-controller;
+   #gpio-cells = <2>;
+
+   interrupt-controller;
+   interrupt-parent = <&gic>;
+   interrupts = <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
+<0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
+   #interrupt-cells = <2>;
+   };
+
+   gpa2: gpa2 {
+   gpio-controller;
+   #gpio-cells = <2>;
+
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpa3: gpa3 {
+   gpio-controller;
+   #gpio-cells = <2>;
+
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+};
+
+&pinctrl_aud {
+   gpz0: gpz0 {
+   gpio-controller;
+   #gpio-cells = <2>;
+
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   gpz1: gpz1 {
+   gpio-controller;
+   #gpio-cells = <2>;
+
+   interrupt-controller;
+   #interrupt-cells = <2>;
+   };
+
+   i2s0_bus: i2s0-bus {
+   samsung,pins = "gpz0-0", "gpz0-1", "gpz0-2", "gpz0-3",
+   "gpz0-4", "gpz0-5", "gpz0-6";
+   samsung,pin-function = <2>;
+   samsung,pin-pud = <1>;
+   samsung,pin-drv = <0>;
+   };
+
+   pcm0_bus: pcm0-bus {
+   samsung,pins = "gpz1-0", "gpz1-1", "gpz1-2", "gpz1-3";
+   samsung,pin-function = <3>;
+  

[PATCH v6 3/9] arm64: dts: exynos: Add SPI/PDMA dt node for Exynos5433

2015-03-09 Thread Chanwoo Choi
This patch adds SPI (Serial Peripheral Interface) dt node for Exynos5433 SoC.
SPI transfers serial data by using various peripherals. SPI includes
8-bit/16-bit/32-bit shift registers to transmit and receive data. PDMA is used
for SPI communication.

Cc: Kukjin Kim 
Cc: Mark Rutland 
Cc: Marc Zyngier 
Cc: Arnd Bergmann 
Cc: Olof Johansson 
Cc: Catalin Marinas 
Cc: Will Deacon 
Signed-off-by: Chanwoo Choi 
Acked-by: Inki Dae 
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 114 +
 1 file changed, 114 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index 5807f71..cc166c0 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -399,6 +399,35 @@
interrupts = <1 9 0xf04>;
};
 
+   amba {
+   compatible = "arm,amba-bus";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+
+   pdma0: pdma@1561 {
+   compatible = "arm,pl330", "arm,primecell";
+   reg = <0x1561 0x1000>;
+   interrupts = <0 228 0>;
+   clocks = <&cmu_fsys CLK_PDMA0>;
+   clock-names = "apb_pclk";
+   #dma-cells = <1>;
+   #dma-channels = <8>;
+   #dma-requests = <32>;
+   };
+
+   pdma1: pdma@1560 {
+   compatible = "arm,pl330", "arm,primecell";
+   reg = <0x1560 0x1000>;
+   interrupts = <0 246 0>;
+   clocks = <&cmu_fsys CLK_PDMA1>;
+   clock-names = "apb_pclk";
+   #dma-cells = <1>;
+   #dma-channels = <8>;
+   #dma-requests = <32>;
+   };
+   };
+
serial_0: serial@14c1 {
compatible = "samsung,exynos5433-uart";
reg = <0x14c1 0x100>;
@@ -499,6 +528,91 @@
interrupts = <0 442 0>;
};
 
+   spi_0: spi@14d2 {
+   compatible = "samsung,exynos7-spi";
+   reg = <0x14d2 0x100>;
+   interrupts = <0 432 0>;
+   dmas = <&pdma0 9>, <&pdma0 8>;
+   dma-names = "tx", "rx";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   clocks = <&cmu_peric CLK_PCLK_SPI0>,
+<&cmu_top CLK_SCLK_SPI0_PERIC>;
+   clock-names = "spi", "spi_busclk0";
+   samsung,spi-src-clk = <0>;
+   pinctrl-names = "default";
+   pinctrl-0 = <&spi0_bus>;
+   status = "disabled";
+   };
+
+   spi_1: spi@14d3 {
+   compatible = "samsung,exynos7-spi";
+   reg = <0x14d3 0x100>;
+   interrupts = <0 433 0>;
+   dmas = <&pdma0 11>, <&pdma0 10>;
+   dma-names = "tx", "rx";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   clocks = <&cmu_peric CLK_PCLK_SPI1>,
+<&cmu_top CLK_SCLK_SPI1_PERIC>;
+   clock-names = "spi", "spi_busclk0";
+   samsung,spi-src-clk = <0>;
+   pinctrl-names = "default";
+   pinctrl-0 = <&spi1_bus>;
+   status = "disabled";
+   };
+
+   spi_2: spi@14d4 {
+   compatible = "samsung,exynos7-spi";
+   reg = <0x14d4 0x100>;
+   interrupts = <0 434 0>;
+   dmas = <&pdma0 13>, <&pdma0 12>;
+   dma-names = "tx", "rx";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   clocks = <&cmu_peric CLK_PCLK_SPI2>,
+<&cmu_top CLK_SCLK_SPI2_PERIC>;
+   clock-names = "spi", "spi_busclk0";
+   samsung,spi-src-clk = <0>;
+   pinctrl-names = "default";
+   pinctrl-0 = <&spi2_bus>;
+   status = "disabled";
+   };
+
+   spi_3: spi@14d5 {
+   compatible = "samsung,exynos7-spi";
+   reg = <0x14d5 0x100>;
+   interrupts = <0 447 0>;

[PATCH v6 2/9] arm64: dts: exynos: Add MSHC dt node for Exynos5433

2015-03-09 Thread Chanwoo Choi
From: Jaehoon Chung 

This patch adds MSHC (Mobile Storage Host Controller) dt node for Exynos5433
SoC. MSHC is an interface between the system the SD/MMC card.

Cc: Kukjin Kim 
Cc: Mark Rutland 
Cc: Marc Zyngier 
Cc: Arnd Bergmann 
Cc: Olof Johansson 
Cc: Catalin Marinas 
Cc: Will Deacon 
Signed-off-by: Jaehoon Chung 
Signed-off-by: Chanwoo Choi 
Acked-by: Inki Dae 
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 38 ++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index 7c3488a..5807f71 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -655,6 +655,44 @@
status = "disabled";
};
 
+   mshc_0: mshc@1554 {
+   compatible = "samsung,exynos7-dw-mshc-smu";
+   interrupts = <0 225 0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x1554 0x2000>;
+   clocks = <&cmu_fsys CLK_ACLK_MMC0>,
+<&cmu_fsys CLK_SCLK_MMC0>;
+   clock-names = "biu", "ciu";
+   fifo-depth = <0x40>;
+   status = "disabled";
+   };
+
+   mshc_1: mshc@1555 {
+   compatible = "samsung,exynos7-dw-mshc-smu";
+   interrupts = <0 226 0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x1555 0x2000>;
+   clocks = <&cmu_fsys CLK_ACLK_MMC1>,
+<&cmu_fsys CLK_SCLK_MMC1>;
+   clock-names = "biu", "ciu";
+   fifo-depth = <0x40>;
+   status = "disabled";
+   };
+
+   mshc_2: mshc@1556 {
+   compatible = "samsung,exynos7-dw-mshc-smu";
+   interrupts = <0 227 0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x1556 0x2000>;
+   clocks = <&cmu_fsys CLK_ACLK_MMC2>,
+<&cmu_fsys CLK_SCLK_MMC2>;
+   clock-names = "biu", "ciu";
+   fifo-depth = <0x40>;
+   status = "disabled";
+   };
};
 
timer {
-- 
1.8.5.5

--
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 v6 4/9] arm64: dts: exynos: Add PMU dt node for Exynos5433

2015-03-09 Thread Chanwoo Choi
This patch adds PMU (Power Management Unit) dt node for Exynos5433 SoC and
set the source clock for CLKOUT register as xxti .

Cc: Kukjin Kim 
Signed-off-by: Chanwoo Choi 
[ideal.song: Add the setting of CLKOUT register]
Signed-off-by: Inha Song 
Acked-by: Inki Dae 
---
 Documentation/devicetree/bindings/arm/samsung/pmu.txt | 1 +
 arch/arm64/boot/dts/exynos/exynos5433.dtsi| 8 
 2 files changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt 
b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
index 67b2113..a87fc43 100644
--- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
@@ -10,6 +10,7 @@ Properties:
   - "samsung,exynos5260-pmu" - for Exynos5260 SoC.
   - "samsung,exynos5410-pmu" - for Exynos5410 SoC,
   - "samsung,exynos5420-pmu" - for Exynos5420 SoC.
+  - "samsung,exynos5433-pmu" - for Exynos5433 SoC.
   - "samsung,exynos7-pmu" - for Exynos7 SoC.
second value must be always "syscon".
 
diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index cc166c0..fa27bb8 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -807,6 +807,14 @@
fifo-depth = <0x40>;
status = "disabled";
};
+
+   pmu_system_controller: system-controller@105c {
+   compatible = "samsung,exynos5433-pmu", "syscon";
+   reg = <0x105c 0x5008>;
+   #clock-cells = <1>;
+   clock-names = "clkout16";
+   clocks = <&xxti>;
+   };
};
 
timer {
-- 
1.8.5.5

--
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 v6 7/9] arm64: dts: exynos: Add I2S dt node for Exynos5433 SoC

2015-03-09 Thread Chanwoo Choi
From: Inha Song 

This patch adds I2S device tree node for Exynos5433 SoC.
In Exynos5433 SoC, I2S0 is used for audio interface.

Signed-off-by: Inha Song 
Signed-off-by: Chanwoo Choi 
Acked-by: Inki Dae 
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 17 +
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index 23d9018..fea4e32 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -475,6 +475,23 @@
status = "disabled";
};
 
+   i2s0: i2s0@1144 {
+   compatible = "samsung,exynos7-i2s";
+   reg = <0x1144 0x100>;
+   dmas = <&adma 0 &adma 2>;
+   dma-names = "tx", "rx";
+   interrupts = <0 70 0>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   clocks = <&cmu_aud CLK_PCLK_AUD_I2S>,
+<&cmu_aud CLK_SCLK_AUD_I2S>,
+<&cmu_aud CLK_SCLK_I2S_BCLK>;
+   clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
+   pinctrl-names = "default";
+   pinctrl-0 = <&i2s0_bus>;
+   status = "disabled";
+   };
+
pinctrl_alive: pinctrl@1058 {
compatible = "samsung,exynos5433-pinctrl";
reg = <0x1058 0x1000>;
-- 
1.8.5.5

--
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 v6 9/9] arm64: dts: exynos: Add thermal-zones dt node for Exynos5433 SoC

2015-03-09 Thread Chanwoo Choi
This patch adds the thermal-zones devicetree node for Exynos5433 SoC.
The thermal-zones has five thermal-zones and then each thermal-zone contains
each thermal-sensor to monitor the temperature of own IP. The {atlas0|apollo}_
thermal zone have the eight trip-points for interrupt method to detect the
over-temperature.

Cc: Kukjin Kim 
Signed-off-by: Chanwoo Choi 
Acked-by: Inki Dae 
Reviewed-by: Lukasz Majewski 
---
 arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi | 231 +
 arch/arm64/boot/dts/exynos/exynos5433.dtsi |   1 +
 2 files changed, 232 insertions(+)
 create mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi
new file mode 100644
index 000..7ff7b0e
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi
@@ -0,0 +1,231 @@
+/*
+ * Device tree sources for Exynos5433 thermal zone
+ *
+ * Copyright (c) 2015 Chanwoo Choi 
+ *
+ * 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.
+ */
+
+#include 
+
+/ {
+thermal-zones {
+   atlas0_thermal: atlas0-thermal {
+   thermal-sensors = <&tmu_atlas0>;
+   polling-delay-passive = <0>;
+   polling-delay = <0>;
+   trips {
+   atlas0_alert_0: atlas0-alert-0 {
+   temperature = <8>;  /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas0_alert_1: atlas0-alert-1 {
+   temperature = <85000>;  /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas0_alert_2: atlas0-alert-2 {
+   temperature = <9>;  /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas0_alert_3: atlas0-alert-3 {
+   temperature = <95000>;  /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas0_alert_4: atlas0-alert-4 {
+   temperature = <10>; /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas0_alert_5: atlas0-alert-5 {
+   temperature = <105000>; /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas0_alert_6: atlas0-alert-6 {
+   temperature = <11>; /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   };
+   };
+
+   atlas1_thermal: atlas1-thermal {
+   thermal-sensors = <&tmu_atlas1>;
+   polling-delay-passive = <0>;
+   polling-delay = <0>;
+   trips {
+   atlas1_alert_0: atlas1-alert-0 {
+   temperature = <8>;  /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas1_alert_1: atlas1-alert-1 {
+   temperature = <85000>;  /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas1_alert_2: atlas1-alert-2 {
+   temperature = <9>;  /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas1_alert_3: atlas1-alert-3 {
+   temperature = <95000>;  /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   type = "active";
+   };
+   atlas1_alert_4: atlas1-alert-4 {
+   temperature = <10>; /* millicelsius */
+   hysteresis = <1>;   /* millicelsius */
+   

[PATCH v6 6/9] arm64: dts: exynos: Add ADMA dt node for Exynos5433 SoC

2015-03-09 Thread Chanwoo Choi
From: Inha Song 

This patch adds ADMA (Advanced DMA) device tree node for Exynos5433 SoC.
In Exynos5433 SoC, ADMA is used for I2S audio interface.

Cc: Kukjin Kim 
Signed-off-by: Inha Song 
Acked-by: Inki Dae 
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index 99aa51e..23d9018 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -426,6 +426,17 @@
#dma-channels = <8>;
#dma-requests = <32>;
};
+
+   adma: adma@1142 {
+   compatible = "arm,pl330", "arm,primecell";
+   reg = <0x1142 0x1000>;
+   interrupts = <0 73 0>;
+   clocks = <&cmu_aud CLK_ACLK_DMAC>;
+   clock-names = "apb_pclk";
+   #dma-cells = <1>;
+   #dma-channels = <8>;
+   #dma-requests = <32>;
+   };
};
 
serial_0: serial@14c1 {
-- 
1.8.5.5

--
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 v6 5/9] arm64: dts: exynos: Add RTC and ADC dt node for Exynos5433 SoC

2015-03-09 Thread Chanwoo Choi
This patch adds RTC (Real Time Clock) dt node for Exynos5433 SoC and adds
ADC dt node for Exynos5433 SoC. The c1b501564c98a94b4(iio: adc: exynos_adc:
Add support for exynos7) commit supports the ADC for Exynos7. Exynos5433's ADC
IP is the same with Exynos7's ADC IP. Exynos5433 has a little different from
ADCv2 on ADC_CON2 register. Exynos5433 don't contain OSEL/ESEL /HIGHF of 
ADC_CON2.

Cc: Kukjin Kim 
Signed-off-by: Chanwoo Choi 
Acked-by: Inki Dae 
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index fa27bb8..99aa51e 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -815,6 +815,24 @@
clock-names = "clkout16";
clocks = <&xxti>;
};
+
+   rtc: rtc@1059 {
+   compatible = "samsung,exynos3250-rtc";
+   reg = <0x1059 0x100>;
+   interrupts = <0 385 0>, <0 386 0>;
+   status = "disabled";
+   };
+
+   adc: adc@14d1 {
+   compatible = "samsung,exynos7-adc";
+   reg = <0x14d1 0x100>;
+   interrupts = <0 438 0>;
+   clock-names = "adc";
+   clocks = <&cmu_peric CLK_PCLK_ADCIF>;
+   #io-channel-cells = <1>;
+   io-channel-ranges;
+   status = "disabled";
+   };
};
 
timer {
-- 
1.8.5.5

--
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 v6 0/9] arm64: Add the support for new Exynos5433 SoC

2015-03-09 Thread Chanwoo Choi
This patchset adds new 64-bit Exynos5433 Samsung SoC which contains quad
Cortex-A57 and quad Cortex-A53. It is desigend with the 20nm low power process.

Depends on:
- This patch-set has the dependency on following four patch-set.
The Exynos5433 clock controller patch-set[1][2] was merged by Michael Turquette.
and Exynos5433's pinctrl patch[3] was merged by Linus Walleij. Exynos5433's TMU
patch[4] will be refactoring without feature update.

[1] [PATCH v5 00/13] clk: samsung: Add the support for exynos5433 clocks
- https://lkml.org/lkml/2015/2/2/368
[2] [PATCH v3 0/9] clk: samsung: Add clocks for remaining domains of Exynos5433
- https://lkml.org/lkml/2015/2/2/784
[3] [PATCH v4] pinctrl: exynos: Add support for Exynos5433
- https://lkml.org/lkml/2015/2/23/728
[4] [PATCH 0/3] thermal: exynos: Add support for Exynos5433 TMU
- https://lkml.org/lkml/2015/2/26/234

Changelog:

Changes from v5:
(https://lkml.org/lkml/2015/3/5/27)
- Move 'timer' dt node under root node by Mark Rutland's comment

Changes from v4:
(https://lkml.org/lkml/2015/2/24/2)
- Rebased it on Linux 4.0-rc2
- Remove CONFIG_ARCH_EXYNOS5433 configuration by Arnd Bergmann's comment
- Move 'aliases' dt node from SoC dtsi to board dts file by Arnd Bergmann's 
comment
- Add Exynos5433 TMU patches which got the Lukasz Majewski's reviewed message

Changes from v3:
(https://lkml.org/lkml/2015/2/12/65)
- Rebased it on Linux 4.0-rc1.
- Remove ARM_GIC and ARM_AMBA dependency because CONFIG_ARM64 already included 
them.

Changes from v2:
(https://lkml.org/lkml/2014/12/2/134)
: Fix the range of GICC memory map (0x1000 -> 0x2000)
: Fix address space of 'range' property under 'soc' node
: Add ADMA / I2S dt node for sound playback/capture
- Select ARM_AMBA/ARM_GIC/HAVE_S3C_RTC for Exynos5433 in arch/arm64/Kconfig
- Send separate patch-set for Exynos5433 clock controller[1][2] and pinctrl[3]

Changes from v1:
(https://lkml.org/lkml/2014/11/27/92)
- Merge two patches (patch2, patch3) to solve incomplete description
- Exynos5433 Clock driver
 : Fix wrong register and code clean by using space instead of tab
 : Add CLK_IGNORE_UNUSED flag to pclk_sysreg_* clock for accessing system 
control register
 : Remove duplicate definition on the patch for CMU_BUS{0|1|2} domain
- Exynos5433 SoC DTS
 : Remove un-supported properties of arch_timer
 : Remove 'clock-frequency' property from 'cpus' dt node
 : Fix interrupt type from edge rising triggering to level high triggering
   because Cortex-A53/A57 use level triggering.
 : Fix defult address-size/size-celss from 1 to 2 because Exynos5433 is 64-bit 
SoC
 : Modify 'fin_pll' dt node to remove un-needed and ugly code
 : Move 'chipid' dt node under 'soc'
 : Use lowercase on all case in exynos5433.dtsi
 : Add PSCI dt node for secondary cpu boot
 : Add 'samsung,exynos5433' compatible to MCT dt node
- Divide pinctrl patch from this patchset
- Add new following patches:
  : clocksource: exynos_mct: Add the support for Exynos 64bit SoC
  : arm64: Enable Exynos5433 SoC in the defconfig

Chanwoo Choi (6):
  arm64: dts: exynos: Add dts files for 64-bit Exynos5433 SoC
  arm64: dts: exynos: Add SPI/PDMA dt node for Exynos5433
  arm64: dts: exynos: Add PMU dt node for Exynos5433
  arm64: dts: exynos: Add RTC and ADC dt node for Exynos5433 SoC
  arm64: dts: exynos: Add TMU sensor dt node for Exynos5433 SoC
  arm64: dts: exynos: Add thermal-zones dt node for Exynos5433 SoC

Inha Song (2):
  arm64: dts: exynos: Add ADMA dt node for Exynos5433 SoC
  arm64: dts: exynos: Add I2S dt node for Exynos5433 SoC

Jaehoon Chung (1):
  arm64: dts: exynos: Add MSHC dt node for Exynos5433

 .../devicetree/bindings/arm/samsung/pmu.txt|   1 +
 arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi | 698 +++
 .../dts/exynos/exynos5433-tmu-sensor-conf.dtsi |  22 +
 arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi | 231 +
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 931 +
 5 files changed, 1883 insertions(+)
 create mode 100644 arch/arm64/boot/dts/exynos/exynos5433-pinctrl.dtsi
 create mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi
 create mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu.dtsi
 create mode 100644 arch/arm64/boot/dts/exynos/exynos5433.dtsi

-- 
1.8.5.5

--
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 v6 8/9] arm64: dts: exynos: Add TMU sensor dt node for Exynos5433 SoC

2015-03-09 Thread Chanwoo Choi
This patch adds the TMU (Thermal Management Unit) sensor devicetree node for
Exynos5433. The Exynos5433 includes the five temperature sensors as following:
- two temperature sensor for Cortex-A57 (ATLAS)
- one temperature sensor for Cortex-A53 (APOLLO)
- one temperature sensor for G3D IP
- one temperature sensor for ISP IP

Cc: Kukjin Kim 
Signed-off-by: Chanwoo Choi 
Acked-by: Inki Dae 
Reviewed-by: Lukasz Majewski 
---
 .../dts/exynos/exynos5433-tmu-sensor-conf.dtsi | 22 +
 arch/arm64/boot/dts/exynos/exynos5433.dtsi | 55 ++
 2 files changed, 77 insertions(+)
 create mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi
new file mode 100644
index 000..396e60f
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi
@@ -0,0 +1,22 @@
+/*
+ * Device tree sources for Exynos5433 TMU sensor configuration
+ *
+ * Copyright (c) 2015 Chanwoo Choi 
+ *
+ * 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.
+ */
+
+#include 
+
+#thermal-sensor-cells = <0>;
+samsung,tmu_gain = <8>;
+samsung,tmu_reference_voltage = <16>;
+samsung,tmu_noise_cancel_mode = <4>;
+samsung,tmu_efuse_value = <75>;
+samsung,tmu_min_efuse_value = <40>;
+samsung,tmu_max_efuse_value = <150>;
+samsung,tmu_first_point_trim = <25>;
+samsung,tmu_second_point_trim = <85>;
+samsung,tmu_default_temp_offset = <50>;
diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi 
b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index fea4e32..22f36f5 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -836,6 +836,61 @@
status = "disabled";
};
 
+   tmu_atlas0: tmu@1006 {
+   compatible = "samsung,exynos5433-tmu";
+   reg = <0x1006 0x200>;
+   interrupts = <0 95 0>;
+   clocks = <&cmu_peris CLK_PCLK_TMU0_APBIF>,
+<&cmu_peris CLK_SCLK_TMU0>;
+   clock-names = "tmu_apbif", "tmu_sclk";
+   #include "exynos5433-tmu-sensor-conf.dtsi"
+   status = "disabled";
+   };
+
+   tmu_atlas1: tmu@10068000 {
+   compatible = "samsung,exynos5433-tmu";
+   reg = <0x10068000 0x200>;
+   interrupts = <0 96 0>;
+   clocks = <&cmu_peris CLK_PCLK_TMU0_APBIF>,
+<&cmu_peris CLK_SCLK_TMU0>;
+   clock-names = "tmu_apbif", "tmu_sclk";
+   #include "exynos5433-tmu-sensor-conf.dtsi"
+   status = "disabled";
+   };
+
+   tmu_g3d: tmu@1007 {
+   compatible = "samsung,exynos5433-tmu";
+   reg = <0x1007 0x200>;
+   interrupts = <0 99 0>;
+   clocks = <&cmu_peris CLK_PCLK_TMU1_APBIF>,
+<&cmu_peris CLK_SCLK_TMU1>;
+   clock-names = "tmu_apbif", "tmu_sclk";
+   #include "exynos5433-tmu-sensor-conf.dtsi"
+   status = "disabled";
+   };
+
+   tmu_apollo: tmu@10078000 {
+   compatible = "samsung,exynos5433-tmu";
+   reg = <0x10078000 0x200>;
+   interrupts = <0 115 0>;
+   clocks = <&cmu_peris CLK_PCLK_TMU1_APBIF>,
+<&cmu_peris CLK_SCLK_TMU1>;
+   clock-names = "tmu_apbif", "tmu_sclk";
+   #include "exynos5433-tmu-sensor-conf.dtsi"
+   status = "disabled";
+   };
+
+   tmu_isp: tmu@1007c000 {
+   compatible = "samsung,exynos5433-tmu";
+   reg = <0x1007c000 0x200>;
+   interrupts = <0 94 0>;
+   clocks = <&cmu_peris CLK_PCLK_TMU1_APBIF>,
+<&cmu_peris CLK_SCLK_TMU1>;
+   clock-names = "tmu_apbif", "tmu_sclk";
+   #include "exynos5433-tmu-sensor-conf.dtsi"
+   status = "disabled";
+   };
+
pmu_system_controller: system-controller@105c {
compatible = "samsung,exynos5433-pmu", "syscon";
reg = <0x105c 0x5008>;
-- 
1.8.5.5

--
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 v5 1/9] arm64: dts: exynos: Add dts files for 64-bit Exynos5433 SoC

2015-03-09 Thread Chanwoo Choi
Hi Mark,

On 03/06/2015 09:18 PM, Chanwoo Choi wrote:
> Hi,
> 
> On 03/06/2015 08:40 PM, Mark Rutland wrote:

[snip]

>>
 I take it CPUs boot at EL2?
>>
>> Do the CPUs boot at EL1 or EL2?
>
> Unfortunately, I cannot check the secure firmware for Exynos5433 SoC.
> I think that a few SoC provider probably would know it.

 I guess I asked the wrong question.

 Do CPUs enter the kernel at EL2 or at EL1?
>>>
>>> Could you give me a tip how to check the kernel at EL2 or EL1?
>>
>> Hmm... I thought we logged this but it looks like we don't.
>>
>> You could hack in a check of is_hyp_mode_available() and
>> is_hyp_mode_mismatched(). That will tell you if EL2/hyp is available,
>> and whether all CPUs enter at the same mode (mandatory per the boot
>> protocol).
> 
> OK, I'll try it.

I check the return value of is_hyp_mode_available() to catch whether EL1 or 
EL2. 

The is_hyp_mode_available() returns 'false' during kernel booting.
- __boot_cpu_mode[0]: 0xe11 (BOOT_CPU_MODE_EL1)
- __boot_cpu_mode[1]: 0x0

Best Regards,
Chanwoo Choi



--
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] devfreq: event: Add 'const' keyword for devfreq_event_ops structure

2015-03-09 Thread Chanwoo Choi
This patch adds the 'const' keyword for devfreq_event_ops structure
because the ops of devfreq_event_desc structure shold not be changed
after initialization.

Cc: Myungjoo Ham 
Cc: Kyungmin Park 
Signed-off-by: Chanwoo Choi 
---
 drivers/devfreq/event/exynos-ppmu.c | 2 +-
 include/linux/devfreq-event.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/devfreq/event/exynos-ppmu.c 
b/drivers/devfreq/event/exynos-ppmu.c
index ad83473..7d99d13 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -194,7 +194,7 @@ static int exynos_ppmu_get_event(struct devfreq_event_dev 
*edev,
return 0;
 }
 
-static struct devfreq_event_ops exynos_ppmu_ops = {
+static const struct devfreq_event_ops exynos_ppmu_ops = {
.disable = exynos_ppmu_disable,
.set_event = exynos_ppmu_set_event,
.get_event = exynos_ppmu_get_event,
diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h
index 602fbbf..0a83a1e 100644
--- a/include/linux/devfreq-event.h
+++ b/include/linux/devfreq-event.h
@@ -91,7 +91,7 @@ struct devfreq_event_desc {
const char *name;
void *driver_data;
 
-   struct devfreq_event_ops *ops;
+   const struct devfreq_event_ops *ops;
 };
 
 #if defined(CONFIG_PM_DEVFREQ_EVENT)
-- 
1.8.5.5

--
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] pinctrl: exynos: Remove eint_gpio_init call-back for exynos7 alive pinctrl block

2015-03-09 Thread Abhilash Kesavan
Hi Tomasz,

On Mon, Mar 9, 2015 at 3:54 PM, Tomasz Figa  wrote:
> Hi Abhilash, Linus,
>
> 2015-03-02 1:21 GMT+09:00 Abhilash Kesavan :
>> The alive pin controller on exynos7 does not support external gpio
>> interrupts. Hence, remove the eint_gpio_init call-back for it. This
>> fixes the following error message seen during exynos7 boot-up:
>> "samsung-pinctrl 1058.pinctrl: irq number not available"
>
> As long as "external gpio interrupts" refer to non-wake-up-capable
> GPIO interrupts I'm fine with this patch.

Yes, that was the intention. Thanks for the review.

Regards,
Abhilash
>
> Acked-by: Tomasz Figa 
>
> Thanks Linus for pinging and sorry for delay.
>
> Best regards,
> Tomasz
--
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


[PATCHv3 2/2] media: s5p-jpeg: add 5420 family support

2015-03-09 Thread Andrzej Pietrasiewicz
JPEG IP found in Exynos5420 is similar to what is in Exynos3250, but
there are some subtle differences which this patch takes into account.

Signed-off-by: Andrzej Pietrasiewicz 
---
 .../bindings/media/exynos-jpeg-codec.txt   |  2 +-
 drivers/media/platform/s5p-jpeg/jpeg-core.c| 59 +++---
 drivers/media/platform/s5p-jpeg/jpeg-core.h| 12 +++--
 3 files changed, 51 insertions(+), 22 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt 
b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
index bf52ed4..4ef4563 100644
--- a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
+++ b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
@@ -4,7 +4,7 @@ Required properties:
 
 - compatible   : should be one of:
  "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg",
- "samsung,exynos3250-jpeg";
+ "samsung,exynos3250-jpeg", "samsung,exynos5420-jpeg";
 - reg  : address and length of the JPEG codec IP register set;
 - interrupts   : specifies the JPEG codec IP interrupt;
 - clock-names   : should contain:
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c 
b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index 12f7452..8b0ca2e 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -621,6 +621,7 @@ static int s5p_jpeg_to_user_subsampling(struct s5p_jpeg_ctx 
*ctx)
return V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY;
return ctx->subsampling;
case SJPEG_EXYNOS3250:
+   case SJPEG_EXYNOS5420:
if (ctx->subsampling > 3)
return V4L2_JPEG_CHROMA_SUBSAMPLING_411;
return exynos3250_decoded_subsampling[ctx->subsampling];
@@ -1142,13 +1143,13 @@ static void jpeg_bound_align_image(struct s5p_jpeg_ctx 
*ctx,
w_step = 1 << walign;
h_step = 1 << halign;
 
-   if (ctx->jpeg->variant->version == SJPEG_EXYNOS3250) {
+   if (ctx->jpeg->variant->hw3250_compat) {
/*
 * Rightmost and bottommost pixels are cropped by the
-* Exynos3250 JPEG IP for RGB formats, for the specific
-* width and height values respectively. This assignment
-* will result in v4l_bound_align_image returning dimensions
-* reduced by 1 for the aforementioned cases.
+* Exynos3250/compatible JPEG IP for RGB formats, for the
+* specific width and height values respectively. This
+* assignment will result in v4l_bound_align_image returning
+* dimensions reduced by 1 for the aforementioned cases.
 */
if (w_step == 4 && ((width & 3) == 1)) {
wmax = width;
@@ -1384,12 +1385,12 @@ static int s5p_jpeg_s_fmt(struct s5p_jpeg_ctx *ct, 
struct v4l2_format *f)
 
/*
 * Prevent downscaling to YUV420 format by more than 2
-* for Exynos3250 SoC as it produces broken raw image
+* for Exynos3250/compatible SoC as it produces broken raw image
 * in such cases.
 */
if (ct->mode == S5P_JPEG_DECODE &&
f_type == FMT_TYPE_CAPTURE &&
-   ct->jpeg->variant->version == SJPEG_EXYNOS3250 &&
+   ct->jpeg->variant->hw3250_compat &&
pix->pixelformat == V4L2_PIX_FMT_YUV420 &&
ct->scale_factor > 2) {
scale_rect.width = ct->out_q.w / 2;
@@ -1569,12 +1570,12 @@ static int s5p_jpeg_s_selection(struct file *file, void 
*fh,
if (s->target == V4L2_SEL_TGT_COMPOSE) {
if (ctx->mode != S5P_JPEG_DECODE)
return -EINVAL;
-   if (ctx->jpeg->variant->version == SJPEG_EXYNOS3250)
+   if (ctx->jpeg->variant->hw3250_compat)
ret = exynos3250_jpeg_try_downscale(ctx, rect);
} else if (s->target == V4L2_SEL_TGT_CROP) {
if (ctx->mode != S5P_JPEG_ENCODE)
return -EINVAL;
-   if (ctx->jpeg->variant->version == SJPEG_EXYNOS3250)
+   if (ctx->jpeg->variant->hw3250_compat)
ret = exynos3250_jpeg_try_crop(ctx, rect);
}
 
@@ -1604,8 +1605,9 @@ static int s5p_jpeg_adjust_subs_ctrl(struct s5p_jpeg_ctx 
*ctx, int *ctrl_val)
case SJPEG_S5P:
return 0;
case SJPEG_EXYNOS3250:
+   case SJPEG_EXYNOS5420:
/*
-* The exynos3250 device can produce JPEG image only
+* The exynos3250/compatible device can produce JPEG image only
 * of 4:4:4 subsampling when given RGB32 source image.
 */
if (ctx->out_q.fmt->fourcc == V4L2_PIX_FMT_RGB32)
@@ -1624,7 +1626,7 @@ static int s5p_jpeg_adjust_subs_ctrl(struct s5p_jpeg_ctx 
*ctx, int *ctrl_val)
}
 
/*
-

[PATCHv3 0/2] Support for JPEG IP on Exynos542x

2015-03-09 Thread Andrzej Pietrasiewicz
This short series adds support for JPEG IP on Exynos542x SoC.
The first patch adds necessary device tree nodes and the second
one does JPEG IP support proper. The JPEG IP on Exynos542x is
similar to what is on Exynos3250, there just slight differences.

v2..v3:
- added commit message to patch 1/2

v1..v2:
- implemented changes resulting from Jacek's review
- removed iommu entries in device tree nodes as iommu is
not available at this moment
- added hw3250_compat and htbl_reinit flags to s5p_jpeg_variant,
which simplifies the code a bit

Andrzej Pietrasiewicz (2):
  ARM: dts: exynos5420: add nodes for jpeg codec
  media: s5p-jpeg: add 5420 family support

 .../bindings/media/exynos-jpeg-codec.txt   |  2 +-
 arch/arm/boot/dts/exynos5420.dtsi  | 16 ++
 drivers/media/platform/s5p-jpeg/jpeg-core.c| 59 +++---
 drivers/media/platform/s5p-jpeg/jpeg-core.h| 12 +++--
 4 files changed, 67 insertions(+), 22 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


[PATCHv3 1/2] ARM: dts: exynos5420: add nodes for jpeg codec

2015-03-09 Thread Andrzej Pietrasiewicz
Add nodes for jpeg codec in Exynos5420 SoC.

Signed-off-by: Andrzej Pietrasiewicz 
---
 arch/arm/boot/dts/exynos5420.dtsi | 16 
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi 
b/arch/arm/boot/dts/exynos5420.dtsi
index 73c1851..f8f583c 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -775,6 +775,22 @@
iommus = <&sysmmu_gscl1>;
};
 
+   jpeg_0: jpeg@11F5 {
+   compatible = "samsung,exynos5420-jpeg";
+   reg = <0x11F5 0x1000>;
+   interrupts = <0 89 0>;
+   clock-names = "jpeg";
+   clocks = <&clock CLK_JPEG>;
+   };
+
+   jpeg_1: jpeg@11F6 {
+   compatible = "samsung,exynos5420-jpeg";
+   reg = <0x11F6 0x1000>;
+   interrupts = <0 168 0>;
+   clock-names = "jpeg";
+   clocks = <&clock CLK_JPEG2>;
+   };
+
pmu_system_controller: system-controller@1004 {
compatible = "samsung,exynos5420-pmu", "syscon";
reg = <0x1004 0x5000>;
-- 
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] pinctrl: exynos: Remove eint_gpio_init call-back for exynos7 alive pinctrl block

2015-03-09 Thread Tomasz Figa
Hi Abhilash, Linus,

2015-03-02 1:21 GMT+09:00 Abhilash Kesavan :
> The alive pin controller on exynos7 does not support external gpio
> interrupts. Hence, remove the eint_gpio_init call-back for it. This
> fixes the following error message seen during exynos7 boot-up:
> "samsung-pinctrl 1058.pinctrl: irq number not available"

As long as "external gpio interrupts" refer to non-wake-up-capable
GPIO interrupts I'm fine with this patch.

Acked-by: Tomasz Figa 

Thanks Linus for pinging and sorry for delay.

Best regards,
Tomasz
--
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: [PATCHv2 1/2] ARM: dts: exynos5420: add nodes for jpeg codec

2015-03-09 Thread Kamil Debski
Hi Andrzej,

From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
ow...@vger.kernel.org] On Behalf Of Andrzej Pietrasiewicz
Sent: Friday, March 06, 2015 11:33 AM

Thank you for your patch.

Regardless how simple the patch is, there should be some description. In the
v2
of the patch set please add a description. One sentence should be enough.

Best wishes,
-- 
Kamil Debski
Samsung R&D Institute Poland

> Signed-off-by: Andrzej Pietrasiewicz 
> ---
>  arch/arm/boot/dts/exynos5420.dtsi | 16 
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos5420.dtsi
> b/arch/arm/boot/dts/exynos5420.dtsi
> index 73c1851..f8f583c 100644
> --- a/arch/arm/boot/dts/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/exynos5420.dtsi
> @@ -775,6 +775,22 @@
>   iommus = <&sysmmu_gscl1>;
>   };
> 
> + jpeg_0: jpeg@11F5 {
> + compatible = "samsung,exynos5420-jpeg";
> + reg = <0x11F5 0x1000>;
> + interrupts = <0 89 0>;
> + clock-names = "jpeg";
> + clocks = <&clock CLK_JPEG>;
> + };
> +
> + jpeg_1: jpeg@11F6 {
> + compatible = "samsung,exynos5420-jpeg";
> + reg = <0x11F6 0x1000>;
> + interrupts = <0 168 0>;
> + clock-names = "jpeg";
> + clocks = <&clock CLK_JPEG2>;
> + };
> +
>   pmu_system_controller: system-controller@1004 {
>   compatible = "samsung,exynos5420-pmu", "syscon";
>   reg = <0x1004 0x5000>;
> --
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media"
> in the body of a message to majord...@vger.kernel.org More majordomo
> info at  http://vger.kernel.org/majordomo-info.html

--
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] pinctrl: exynos: Remove eint_gpio_init call-back for exynos7 alive pinctrl block

2015-03-09 Thread Linus Walleij
On Sun, Mar 1, 2015 at 5:21 PM, Abhilash Kesavan  wrote:

> The alive pin controller on exynos7 does not support external gpio
> interrupts. Hence, remove the eint_gpio_init call-back for it. This
> fixes the following error message seen during exynos7 boot-up:
> "samsung-pinctrl 1058.pinctrl: irq number not available"
>
> Signed-off-by: Abhilash Kesavan 

Tomasz, can you look at this patch?

Yours,
Linus Walleij
--
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: [GIT PULL 2/2] Samsung fixes-2 for v4.0

2015-03-09 Thread Lukasz Majewski
Hi Kukjin,

> Lukasz Majewski wrote:
> > 
> > Hi Eduardo,
> > 
> > > On Fri, Mar 06, 2015 at 07:16:53PM +0900, Kukjin Kim wrote:
> > > > Arnd Bergmann wrote:
> > > > >
> > > > + Eduardo
> > > >
> > > > Hi Arnd,
> > > >
> > > > > On Tuesday 03 March 2015 04:00:14 Kukjin Kim wrote:
> > > > > > Please pull Samsung tmu and hdmi regression fixes for v4.0
> > > > > > and I know this is quite big for fixes but I couldn't
> > > > > > handle this series for previous merge window because of
> > > > > > dependency with driver side...sorry for that and please
> > > > > > pull so that we could support them in v4.0 on exynos
> > > > > > platforms.
> > > > >
> > > > > What kind of dependency do you have there? It really should
> > > > > not be necessary to wait for driver changes, unless you do an
> > > > > incompatible DT binding change, which you should avoid.
> > > > >
> > > > For TMU patches, I've asked Eduardo to provide topic branch for
> > > > 'include/dt-bindings/thermal/thermal_exynos.h' has been added
> > > > via thermal tree because if I can't apply the patch in Samsung
> > > > tree for arm-soc, kernel build breakage will be happened. But I
> > > > couldn't get Eduardo's topic branch.
> > >
> > >
> > > Specifically, the developer, while migrating the driver to
> > > support DT and OF thermal, decided to create a header with
> > > constants. The header is used by DT files and the driver code.
> > > The header was the dependency.
> > 
> > Just my 2 cents :-).
> > 
> > The above situation is the justification for adding the whole patch
> > set to one repository when all ACKs are collected for it.
> > 
> I don't think so, even your series can be upstreamed though, other
> useless merge conflicts would be happened so we decided all of DT
> should be handled in arch side not driver side. So please don't argue
> about that.

Ok, I will not :-)

> 
> - Kukjin
> 



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
--
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: [GIT PULL 2/2] Samsung fixes-2 for v4.0

2015-03-09 Thread Kukjin Kim
Lukasz Majewski wrote:
> 
> Hi Eduardo,
> 
> > On Fri, Mar 06, 2015 at 07:16:53PM +0900, Kukjin Kim wrote:
> > > Arnd Bergmann wrote:
> > > >
> > > + Eduardo
> > >
> > > Hi Arnd,
> > >
> > > > On Tuesday 03 March 2015 04:00:14 Kukjin Kim wrote:
> > > > > Please pull Samsung tmu and hdmi regression fixes for v4.0 and
> > > > > I know this is quite big for fixes but I couldn't handle this
> > > > > series for previous merge window because of dependency with
> > > > > driver side...sorry for that and please pull so that we could
> > > > > support them in v4.0 on exynos platforms.
> > > >
> > > > What kind of dependency do you have there? It really should not be
> > > > necessary to wait for driver changes, unless you do an
> > > > incompatible DT binding change, which you should avoid.
> > > >
> > > For TMU patches, I've asked Eduardo to provide topic branch for
> > > 'include/dt-bindings/thermal/thermal_exynos.h' has been added via
> > > thermal tree because if I can't apply the patch in Samsung tree for
> > > arm-soc, kernel build breakage will be happened. But I couldn't get
> > > Eduardo's topic branch.
> >
> >
> > Specifically, the developer, while migrating the driver to support DT
> > and OF thermal, decided to create a header with constants. The header
> > is used by DT files and the driver code. The header was the
> > dependency.
> 
> Just my 2 cents :-).
> 
> The above situation is the justification for adding the whole patch set
> to one repository when all ACKs are collected for it.
> 
I don't think so, even your series can be upstreamed though, other useless
merge conflicts would be happened so we decided all of DT should be handled
in arch side not driver side. So please don't argue about that.

- Kukjin

--
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: [GIT PULL 2/2] Samsung fixes-2 for v4.0

2015-03-09 Thread Lukasz Majewski
Hi Eduardo,

> On Fri, Mar 06, 2015 at 07:16:53PM +0900, Kukjin Kim wrote:
> > Arnd Bergmann wrote:
> > > 
> > + Eduardo
> > 
> > Hi Arnd,
> > 
> > > On Tuesday 03 March 2015 04:00:14 Kukjin Kim wrote:
> > > > Please pull Samsung tmu and hdmi regression fixes for v4.0 and
> > > > I know this is quite big for fixes but I couldn't handle this
> > > > series for previous merge window because of dependency with
> > > > driver side...sorry for that and please pull so that we could
> > > > support them in v4.0 on exynos platforms.
> > > 
> > > What kind of dependency do you have there? It really should not be
> > > necessary to wait for driver changes, unless you do an
> > > incompatible DT binding change, which you should avoid.
> > > 
> > For TMU patches, I've asked Eduardo to provide topic branch for
> > 'include/dt-bindings/thermal/thermal_exynos.h' has been added via
> > thermal tree because if I can't apply the patch in Samsung tree for
> > arm-soc, kernel build breakage will be happened. But I couldn't get
> > Eduardo's topic branch.
> 
> 
> Specifically, the developer, while migrating the driver to support DT
> and OF thermal, decided to create a header with constants. The header
> is used by DT files and the driver code. The header was the
> dependency.

Just my 2 cents :-).

The above situation is the justification for adding the whole patch set
to one repository when all ACKs are collected for it.

> 
> 
> BR,
> 
> Eduardo Valentin
> 
> > 
> > http://www.spinics.net/lists/linux-samsung-soc/msg41877.html
> > 
> > 
> > For HDMI patches, I thought the DT changes have a dependency with
> > "drm/exynos: add support for 'hdmi' clock" so waited for its
> > applying then in drm tree. But I couldn't send it to arm-soc after
> > that...
> > 
> > http://www.spinics.net/lists/linux-samsung-soc/msg42173.html
> > 
> > 
> > I asked about the situation (late DT changes?) when I sent a
> > pull-request, then I couldn't get a access my kernel.org because of
> > biz. trip to China :(
> > 
> > http://www.spinics.net/lists/linux-samsung-soc/msg42235.html
> > 
> > 
> > > I've pulled it into fixes, but won't forward it until I hear a
> > > good explanation.
> > > 
> > As you know, basically I tried to make a clear branch for
> > pull-request but in that case, I couldn't find a solution. Sorry
> > for the inconvenience.
> > 
> > I hope v4.0 can support them properly.
> > 
> > Thanks,
> > Kukjin
> > 



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
--
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