Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 08/10] ARM: dts: exynos: Fix invalid GIC interrupt flags in exynos5410/exynos542x
From: Javier Martinez Canillas @ 2016-09-18 15:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1474054971-16831-9-git-send-email-krzk@kernel.org>

Hello Krzysztof,

On 09/16/2016 03:42 PM, Krzysztof Kozlowski wrote:
> Interrupt of type IRQ_TYPE_NONE is not allowed for GIC interrupts and
> generates an error:
> 	genirq: Setting trigger mode 0 for irq 16 failed (gic_set_type+0x0/0x68)
> 
> The GIC requires shared interrupts to be edge rising or level high.
> Platform declares support for both.  Choose level high everywhere.
> 
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Reported-by: Alban Browaeys <alban.browaeys@gmail.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---

Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply

* [PATCH 4/7] ARM: dts: exynos: Use human-friendly symbols for interrupt properties in exynos5
From: Javier Martinez Canillas @ 2016-09-18 15:20 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1474062122-22720-5-git-send-email-krzk@kernel.org>

Hello Krzysztof,

On 09/16/2016 05:41 PM, Krzysztof Kozlowski wrote:
> Replace hard-coded values of type of GIC interrupt and its flags with
> respective macros from header to increase code readability
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---

On an Exynos5800 Peach Pi Chromebook and an Exynos5422 Odroid XU4 board:

Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply

* [PATCH V5 2/6] thermal: bcm2835: add thermal driver for bcm2835 soc
From: kernel at martin.sperl.org @ 2016-09-18 16:05 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1999564031.209213.6508fbdb-00c5-486b-a34e-3d60ae68fe88.open-xchange@email.1und1.de>

Hi Stefan!

> On 18.09.2016, at 13:31, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> 
>> +	rate = clk_get_rate(data->clk);
>> +	if ((rate < 1920000) || (rate > 5000000)) {
>> +		dev_warn(&pdev->dev,
>> +			 "Clock %pCn is running at %pCr Hz, which is outside the recommended range
>> of 1.9 to 5.0 MHz\n",
>> +			 data->clk, data->clk);
> 
> Instead of printing the clock name twice your intension would be to print the
> actual clock rate?
%pCn (and %pC) prints the clock name
%pCr prints the clock rate - I guess I could use ?%lu? and rate instead

So I do not see an issue here - I will reword the text to shorten it.

Everything else I will fix as mentioned.

Martin

^ permalink raw reply

* [GIT PULL 0/3] ARM: exynos: Second round of stuff for v4.9
From: Krzysztof Kozlowski @ 2016-09-18 16:39 UTC (permalink / raw)
  To: linux-arm-kernel

From: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Hi,

I know it is late but it is not a big pull request. Mostly DT cleanup.
One change touching clocksource was acked by Daniel Lezcano (he
mentioned it can go through arm-soc).

Some stuff moved into topic branch. No conflicts expected, no specific
order of pulling.

Best regards,
Krzysztof

^ permalink raw reply

* [GIT PULL 1/3] ARM: soc: exynos: Drivers for v4.9
From: Krzysztof Kozlowski @ 2016-09-18 16:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1474216788-17282-1-git-send-email-krzk@kernel.org>

From: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Hi,

Drivers related changes.


Best regards,
Krzysztof


The following changes since commit 29b4817d4018df78086157ea3a55c1d9424a7cfc:

  Linux 4.8-rc1 (2016-08-07 18:18:00 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git tags/samsung-drivers-4.9-2

for you to fetch changes up to 8bc6bf178b671eb9b9fa806804f3990cb4c332aa:

  dt-bindings: EXYNOS: Add Exynos5433 PMU compatible (2016-09-16 13:21:04 +0200)

----------------------------------------------------------------
Samsung drivers/soc update for v4.9:
1. Allow compile testing of exynos-mct clocksource driver on ARM64.
2. Document Exynos5433 PMU compatible (already used by clkout driver and more
   will be coming soon).

----------------------------------------------------------------
Chanwoo Choi (2):
      clocksource: exynos_mct: Add the support for ARM64
      dt-bindings: EXYNOS: Add Exynos5433 PMU compatible

 Documentation/devicetree/bindings/arm/samsung/pmu.txt | 1 +
 drivers/clocksource/Kconfig                           | 2 +-
 drivers/clocksource/exynos_mct.c                      | 4 ++++
 3 files changed, 6 insertions(+), 1 deletion(-)

^ permalink raw reply

* [GIT PULL 2/3] ARM: dts: exynos: DT for v4.9, second round
From: Krzysztof Kozlowski @ 2016-09-18 16:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1474216788-17282-1-git-send-email-krzk@kernel.org>

From: Krzysztof Kozlowski <k.kozlowski@samsung.com>


The following changes since commit 05b01dd936b46f2c3cfbb10bc89c0ec79c745e5d:

  ARM: dts: exynos: Use 'hpd-gpios' instead of 'hpd-gpio' (2016-08-24 21:09:24 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git tags/samsung-dt-4.9-2

for you to fetch changes up to 5271d002709e8ca27232ab031f35e0df1d0fe4ed:

  ARM: dts: s5p: Add missing unit name to memory nodes for S5PV210 boards (2016-09-16 09:17:00 +0200)

----------------------------------------------------------------
Samsung DeviceTree update for v4.9, second round:
1. Enable HDMI on Arndale Octa board.
2. Update list of clocks for FIMC-IS block on Exynos4x12.
3. Remove skeleton.dtsi thus fixing DT compiler warning:
	"Node /memory has a reg or ranges property, but no unit name"
   This is a tree-wide effort by various people. Javier Martinez Canillas did
   it for Exynos and S5PV210.

----------------------------------------------------------------
Javier Martinez Canillas (9):
      ARM: dts: exynos: Add missing memory node for Exynos5440 boards
      ARM: dts: exynos: Remove skeleton.dtsi usage for Exynos3
      ARM: dts: exynos: Remove skeleton.dtsi usage for Exynos4
      ARM: dts: exynos: Remove skeleton.dtsi usage for Exynos5
      ARM: dts: exynos: Add missing unit name to memory nodes in Exynos3 DTS
      ARM: dts: exynos: Add missing unit name to memory nodes in Exynos4 DTS
      ARM: dts: exynos: Add missing unit name to memory nodes in Exynos5 DTS
      ARM: dts: s5p: Remove skeleton.dtsi inclusion for S5PV210
      ARM: dts: s5p: Add missing unit name to memory nodes for S5PV210 boards

Marek Szyprowski (1):
      ARM: dts: exynos: Add all required FIMC-IS clocks to exynos4x12

Milo Kim (1):
      ARM: dts: exynos: Enable HDMI for Arndale Octa board

 arch/arm/boot/dts/exynos3250-artik5.dtsi           |  3 ++-
 arch/arm/boot/dts/exynos3250-monk.dts              |  3 ++-
 arch/arm/boot/dts/exynos3250-rinato.dts            |  3 ++-
 arch/arm/boot/dts/exynos3250.dtsi                  |  3 ++-
 arch/arm/boot/dts/exynos4.dtsi                     |  3 ++-
 arch/arm/boot/dts/exynos4210-origen.dts            |  3 ++-
 arch/arm/boot/dts/exynos4210-smdkv310.dts          |  3 ++-
 arch/arm/boot/dts/exynos4210-trats.dts             |  3 ++-
 arch/arm/boot/dts/exynos4210-universal_c210.dts    |  3 ++-
 arch/arm/boot/dts/exynos4412-odroidu3.dts          |  3 ++-
 arch/arm/boot/dts/exynos4412-odroidx.dts           |  3 ++-
 arch/arm/boot/dts/exynos4412-odroidx2.dts          |  3 ++-
 arch/arm/boot/dts/exynos4412-origen.dts            |  3 ++-
 arch/arm/boot/dts/exynos4412-smdk4412.dts          |  3 ++-
 arch/arm/boot/dts/exynos4412-tiny4412.dts          |  3 ++-
 arch/arm/boot/dts/exynos4412-trats2.dts            |  3 ++-
 arch/arm/boot/dts/exynos4415.dtsi                  |  3 ++-
 arch/arm/boot/dts/exynos4x12.dtsi                  |  5 ++++-
 arch/arm/boot/dts/exynos5.dtsi                     |  3 ++-
 arch/arm/boot/dts/exynos5250-arndale.dts           |  3 ++-
 arch/arm/boot/dts/exynos5250-smdk5250.dts          |  3 ++-
 arch/arm/boot/dts/exynos5250-snow-common.dtsi      |  3 ++-
 arch/arm/boot/dts/exynos5250-spring.dts            |  3 ++-
 arch/arm/boot/dts/exynos5260-xyref5260.dts         |  3 ++-
 arch/arm/boot/dts/exynos5260.dtsi                  |  4 ++--
 arch/arm/boot/dts/exynos5410-odroidxu.dts          |  3 ++-
 arch/arm/boot/dts/exynos5410-smdk5410.dts          |  3 ++-
 arch/arm/boot/dts/exynos5420-arndale-octa.dts      | 16 +++++++++++++++-
 arch/arm/boot/dts/exynos5420-peach-pit.dts         |  3 ++-
 arch/arm/boot/dts/exynos5420-smdk5420.dts          |  3 ++-
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  3 ++-
 arch/arm/boot/dts/exynos5440-sd5v1.dts             |  6 ++++++
 arch/arm/boot/dts/exynos5440-ssdk5440.dts          |  6 ++++++
 arch/arm/boot/dts/exynos5440.dtsi                  |  3 ++-
 arch/arm/boot/dts/exynos54xx.dtsi                  |  1 -
 arch/arm/boot/dts/exynos5800-peach-pi.dts          |  3 ++-
 arch/arm/boot/dts/s5pv210-aquila.dts               |  2 +-
 arch/arm/boot/dts/s5pv210-goni.dts                 |  2 +-
 arch/arm/boot/dts/s5pv210-smdkc110.dts             |  2 +-
 arch/arm/boot/dts/s5pv210-smdkv210.dts             |  2 +-
 arch/arm/boot/dts/s5pv210-torbreck.dts             |  2 +-
 arch/arm/boot/dts/s5pv210.dtsi                     |  4 +++-
 42 files changed, 101 insertions(+), 41 deletions(-)

^ permalink raw reply

* [GIT PULL 3/3] ARM: dts: exynos: pinctrl cleanup for v4.9
From: Krzysztof Kozlowski @ 2016-09-18 16:39 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1474216788-17282-1-git-send-email-krzk@kernel.org>

From: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Hi,

A separate topic branch with DT cleanup.


Best regards,
Krzysztof


The following changes since commit 29b4817d4018df78086157ea3a55c1d9424a7cfc:

  Linux 4.8-rc1 (2016-08-07 18:18:00 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git tags/samsung-dt-pinctrl-4.9

for you to fetch changes up to d13799237dee34e1b9cd377f0ced7bee24ac810f:

  ARM: dts: s3c64xx: Use macros for pinctrl configuration (2016-09-16 13:32:27 +0200)

----------------------------------------------------------------
Topic branch for Samsung DeviceTree cleanup for 4.9.

Replace in DT sources hard-coded values for pinctrl configuration like pull
up/down, drive strength and function. This makes the DTS easier to read,
especially that some drive strengths values are quite non-obvious.

----------------------------------------------------------------
Krzysztof Kozlowski (17):
      pinctrl: dt-bindings: samsung: Add header with values used for configuration
      pinctrl: dt-bindings: samsung: Update documentation with new macros
      ARM: dts: exynos: Use common macros for pinctrl configuration
      ARM: dts: exynos: Use macros for pinctrl configuration on exynos3250
      ARM: dts: exynos: Use macros for pinctrl configuration on exynos4210
      ARM: dts: exynos: Use macros for pinctrl configuration on exynos4x12
      ARM: dts: exynos: Use macros for pinctrl configuration on exynos4415
      ARM: dts: exynos: Use macros for pinctrl configuration on exynos5250
      ARM: dts: exynos: Use macros for pinctrl configuration on exynos5260
      ARM: dts: exynos: Use macros for pinctrl configuration on exynos5410
      ARM: dts: exynos: Use macros for pinctrl configuration on exynos542x/exynos5800
      ARM: dts: exynos: Fix mismatched value for SD4 pull up/down configuration on exynos4210
      ARM: dts: exynos: Fix mismatched values of SD drive strengh configuration on exynos4415
      ARM: dts: s3c64xx: Use common macros for pinctrl configuration
      ARM: dts: s5pv210: Use macros for pinctrl configuration
      ARM: dts: s3c2416: Use macros for pinctrl configuration
      ARM: dts: s3c64xx: Use macros for pinctrl configuration

 .../bindings/pinctrl/samsung-pinctrl.txt           |  44 +-
 MAINTAINERS                                        |   2 +
 arch/arm/boot/dts/exynos3250-pinctrl.dtsi          | 346 +++++++-------
 arch/arm/boot/dts/exynos4210-pinctrl.dtsi          | 458 +++++++++---------
 arch/arm/boot/dts/exynos4210-smdkv310.dts          |  12 +-
 arch/arm/boot/dts/exynos4210-universal_c210.dts    |   8 +-
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi    |  14 +-
 arch/arm/boot/dts/exynos4412-odroidx.dts           |   2 +-
 arch/arm/boot/dts/exynos4412-origen.dts            |  12 +-
 arch/arm/boot/dts/exynos4412-smdk4412.dts          |  12 +-
 arch/arm/boot/dts/exynos4415-pinctrl.dtsi          | 296 ++++++------
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi          | 525 ++++++++++-----------
 arch/arm/boot/dts/exynos5250-pinctrl.dtsi          | 404 ++++++++--------
 arch/arm/boot/dts/exynos5250-smdk5250.dts          |   6 +-
 arch/arm/boot/dts/exynos5250-snow-common.dtsi      |  76 +--
 arch/arm/boot/dts/exynos5250-snow-rev5.dts         |   6 +-
 arch/arm/boot/dts/exynos5250-snow.dts              |   6 +-
 arch/arm/boot/dts/exynos5250-spring.dts            |  72 +--
 arch/arm/boot/dts/exynos5260-pinctrl.dtsi          | 280 ++++++-----
 arch/arm/boot/dts/exynos5260-xyref5260.dts         |   6 +-
 arch/arm/boot/dts/exynos5410-odroidxu.dts          |  30 +-
 arch/arm/boot/dts/exynos5410-pinctrl.dtsi          | 182 +++----
 arch/arm/boot/dts/exynos5410-smdk5410.dts          |  10 +-
 arch/arm/boot/dts/exynos5420-arndale-octa.dts      |   6 +-
 arch/arm/boot/dts/exynos5420-peach-pit.dts         | 126 ++---
 arch/arm/boot/dts/exynos5420-pinctrl.dtsi          | 356 +++++++-------
 arch/arm/boot/dts/exynos5420-smdk5420.dts          |  18 +-
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  18 +-
 arch/arm/boot/dts/exynos5800-peach-pi.dts          | 126 ++---
 arch/arm/boot/dts/s3c2416-pinctrl.dtsi             |  38 +-
 arch/arm/boot/dts/s3c6410-mini6410.dts             |   4 +-
 arch/arm/boot/dts/s3c64xx-pinctrl.dtsi             | 356 +++++++-------
 arch/arm/boot/dts/s5pv210-aquila.dts               |   4 +-
 arch/arm/boot/dts/s5pv210-pinctrl.dtsi             | 476 +++++++++----------
 include/dt-bindings/pinctrl/samsung.h              |  57 +++
 35 files changed, 2223 insertions(+), 2171 deletions(-)
 create mode 100644 include/dt-bindings/pinctrl/samsung.h

^ permalink raw reply

* [PATCH 1/2] phy-sun4i-usb: Add sun4i_usb_phy_force_session_end() function
From: Hans de Goede @ 2016-09-18 16:50 UTC (permalink / raw)
  To: linux-arm-kernel

The sunxi musb has a bug where sometimes it will generate a babble
error on device disconnect instead of a disconnect irq. When this
happens the musb-controller switches from host mode to device mode
(it clears MUSB_DEVCTL_SESSION and sets MUSB_DEVCTL_BDEVICE) and
gets stuck in this state.

Clearing this requires reporting Vbus low for 200 or more ms, but
on some devices Vbus is simply always high (host-only mode, no Vbus
control). The phy-sun4i-usb code already has code to force a session
end for devices without Vbus control.

This commit adds a sun4i_usb_phy_force_session_end() function exporting
this functionality to the sunxi-musb glue, so that it can force a session
end to fixup the stuck state after a babble error.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/phy/phy-sun4i-usb.c       | 11 +++++++++++
 include/linux/phy/phy-sun4i-usb.h |  7 +++++++
 2 files changed, 18 insertions(+)

diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index 43c0d98..06f4e11a 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -470,6 +470,17 @@ void sun4i_usb_phy_set_squelch_detect(struct phy *_phy, bool enabled)
 }
 EXPORT_SYMBOL_GPL(sun4i_usb_phy_set_squelch_detect);
 
+void sun4i_usb_phy_force_session_end(struct phy *_phy)
+{
+	struct sun4i_usb_phy *phy = phy_get_drvdata(_phy);
+	struct sun4i_usb_phy_data *data = to_sun4i_usb_phy_data(phy);
+
+	data->id_det = -1;
+	data->force_session_end = true;
+	queue_delayed_work(system_wq, &data->detect, 0);
+}
+EXPORT_SYMBOL_GPL(sun4i_usb_phy_force_session_end);
+
 static const struct phy_ops sun4i_usb_phy_ops = {
 	.init		= sun4i_usb_phy_init,
 	.exit		= sun4i_usb_phy_exit,
diff --git a/include/linux/phy/phy-sun4i-usb.h b/include/linux/phy/phy-sun4i-usb.h
index 50aed92..3bb773f 100644
--- a/include/linux/phy/phy-sun4i-usb.h
+++ b/include/linux/phy/phy-sun4i-usb.h
@@ -23,4 +23,11 @@
  */
 void sun4i_usb_phy_set_squelch_detect(struct phy *phy, bool enabled);
 
+/**
+ * sun4i_usb_force_session_end() - Force the current session to end
+ *				   by reporting VBus low for 200+ ms
+ * @phy: reference to a sun4i usb phy
+ */
+void sun4i_usb_phy_force_session_end(struct phy *phy);
+
 #endif
-- 
2.9.3

^ permalink raw reply related

* [PATCH 2/2] musb: sunxi: Force session end on babble errors in host-mode
From: Hans de Goede @ 2016-09-18 16:50 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20160918165018.24547-1-hdegoede@redhat.com>

The sunxi musb has a bug where sometimes it will generate a babble
error on device disconnect instead of a disconnect irq. When this
happens the musb-controller switches from host mode to device mode
(it clears MUSB_DEVCTL_SESSION and sets MUSB_DEVCTL_BDEVICE) and
gets stuck in this state.

Clearing this requires reporting Vbus low for 200 or more ms, but
on some devices Vbus is simply always high (host-only mode, no Vbus
control).

This commit calls sun4i_usb_phy_force_session_end() on babble errors
in host-mode, fixing the musb controller being stuck in this state
on systems without Vbus control; and also fixes the need to unplug
the usb-b -> usb-a cable to get out of this state on systems with
Vbus control.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/usb/musb/sunxi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c
index 1408245..5079d90 100644
--- a/drivers/usb/musb/sunxi.c
+++ b/drivers/usb/musb/sunxi.c
@@ -192,8 +192,18 @@ static irqreturn_t sunxi_musb_interrupt(int irq, void *__hci)
 	 * normally babble never happens treat it as disconnect.
 	 */
 	if ((musb->int_usb & MUSB_INTR_BABBLE) && is_host_active(musb)) {
+		struct sunxi_glue *glue =
+				dev_get_drvdata(musb->controller->parent);
+
+		dev_warn(musb->controller->parent, "babble, treating as disconnect\n");
+
 		musb->int_usb &= ~MUSB_INTR_BABBLE;
 		musb->int_usb |= MUSB_INTR_DISCONNECT;
+		/*
+		 * Fix the musb controller sometimes getting stuck in
+		 * bdevice state after a babble error.
+		 */
+		sun4i_usb_phy_force_session_end(glue->phy);
 	}
 
 	if ((musb->int_usb & MUSB_INTR_RESET) && !is_host_active(musb)) {
-- 
2.9.3

^ permalink raw reply related

* [PATCH] ARM: dts: sun8i: Enable pull-ups for bananapi-m2-plus SD slot
From: Mark Kettenis @ 2016-09-18 17:25 UTC (permalink / raw)
  To: linux-arm-kernel

Board doesn't seem to have external pull-ups and some (but not all) SD cards
don't work without pull-ups.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
---

Tested with an OpenBSD kernel where enabling the pull-ups makes an older 2G
SanDisk card work.  A newer Samsung 32G microSD card doesn't seem to need
this.  Note that u-boot always enables the pull-ups and boots just fine off
said 2G SanDisk card.

 arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
index f3b1d5f..3737556 100644
--- a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
@@ -117,6 +117,10 @@
 	status = "okay";
 };
 
+&mmc0_pins_a {
+	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
 &mmc1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc1_pins_a>;
-- 
2.9.3

^ permalink raw reply related

* [PATCH] ASoC: samsung: make audio interface/controller explicitly
From: kbuild test robot @ 2016-09-18 17:27 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1474207751-9804-2-git-send-email-ayaka@soulik.info>

Hi Randy,

[auto build test ERROR on asoc/for-next]
[also build test ERROR on v4.8-rc6 next-20160916]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Randy-Li/ASoC-samsung-make-audio-interface-controller-explicitly/20160918-222618
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: parisc-allmodconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=parisc 

All error/warnings (new ones prefixed by >>):

>> sound/soc/samsung/i2s.c:106:26: error: field 'clk_data' has incomplete type
     struct clk_onecell_data clk_data;
                             ^~~~~~~~
   sound/soc/samsung/i2s.c: In function 'i2s_unregister_clocks':
>> sound/soc/samsung/i2s.c:1141:4: error: implicit declaration of function 'clk_unregister' [-Werror=implicit-function-declaration]
       clk_unregister(i2s->clk_table[i]);
       ^~~~~~~~~~~~~~
   sound/soc/samsung/i2s.c: In function 'i2s_unregister_clock_provider':
>> sound/soc/samsung/i2s.c:1149:2: error: implicit declaration of function 'of_clk_del_provider' [-Werror=implicit-function-declaration]
     of_clk_del_provider(pdev->dev.of_node);
     ^~~~~~~~~~~~~~~~~~~
   sound/soc/samsung/i2s.c: In function 'i2s_register_clock_provider':
>> sound/soc/samsung/i2s.c:1172:16: error: implicit declaration of function '__clk_get_name' [-Werror=implicit-function-declaration]
      p_names[i] = __clk_get_name(rclksrc);
                   ^~~~~~~~~~~~~~
>> sound/soc/samsung/i2s.c:1172:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      p_names[i] = __clk_get_name(rclksrc);
                 ^
>> sound/soc/samsung/i2s.c:1181:38: error: implicit declaration of function 'clk_register_mux' [-Werror=implicit-function-declaration]
      i2s->clk_table[CLK_I2S_RCLK_SRC] = clk_register_mux(NULL,
                                         ^~~~~~~~~~~~~~~~
>> sound/soc/samsung/i2s.c:1183:5: error: 'CLK_SET_RATE_NO_REPARENT' undeclared (first use in this function)
        CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT,
        ^~~~~~~~~~~~~~~~~~~~~~~~
   sound/soc/samsung/i2s.c:1183:5: note: each undeclared identifier is reported only once for each function it appears in
>> sound/soc/samsung/i2s.c:1183:32: error: 'CLK_SET_RATE_PARENT' undeclared (first use in this function)
        CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT,
                                   ^~~~~~~~~~~~~~~~~~~
>> sound/soc/samsung/i2s.c:1187:38: error: implicit declaration of function 'clk_register_divider' [-Werror=implicit-function-declaration]
      i2s->clk_table[CLK_I2S_RCLK_PSR] = clk_register_divider(NULL,
                                         ^~~~~~~~~~~~~~~~~~~~
>> sound/soc/samsung/i2s.c:1198:34: error: implicit declaration of function 'clk_register_gate' [-Werror=implicit-function-declaration]
     i2s->clk_table[CLK_I2S_CDCLK] = clk_register_gate(NULL, clk_name[0],
                                     ^~~~~~~~~~~~~~~~~
>> sound/soc/samsung/i2s.c:1201:5: error: 'CLK_GATE_SET_TO_DISABLE' undeclared (first use in this function)
        CLK_GATE_SET_TO_DISABLE, i2s->lock);
        ^~~~~~~~~~~~~~~~~~~~~~~
>> sound/soc/samsung/i2s.c:1206:8: error: implicit declaration of function 'of_clk_add_provider' [-Werror=implicit-function-declaration]
     ret = of_clk_add_provider(dev->of_node, of_clk_src_onecell_get,
           ^~~~~~~~~~~~~~~~~~~
>> sound/soc/samsung/i2s.c:1206:42: error: 'of_clk_src_onecell_get' undeclared (first use in this function)
     ret = of_clk_add_provider(dev->of_node, of_clk_src_onecell_get,
                                             ^~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/clk_data +106 sound/soc/samsung/i2s.c

69e7a69a2 sound/soc/samsung/i2s.c Sylwester Nawrocki 2016-08-04   90  	struct snd_dmaengine_dai_dma_data dma_playback;
69e7a69a2 sound/soc/samsung/i2s.c Sylwester Nawrocki 2016-08-04   91  	struct snd_dmaengine_dai_dma_data dma_capture;
69e7a69a2 sound/soc/samsung/i2s.c Sylwester Nawrocki 2016-08-04   92  	struct snd_dmaengine_dai_dma_data idma_playback;
9bdca822c sound/soc/samsung/i2s.c Arnd Bergmann      2015-11-18   93  	dma_filter_fn filter;
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22   94  	u32	quirks;
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22   95  	u32	suspend_i2smod;
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22   96  	u32	suspend_i2scon;
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22   97  	u32	suspend_i2spsr;
a5a56871f sound/soc/samsung/i2s.c Padmavathi Venna   2014-11-07   98  	const struct samsung_i2s_variant_regs *variant_regs;
f36705366 sound/soc/samsung/i2s.c Sylwester Nawrocki 2015-01-14   99  
f36705366 sound/soc/samsung/i2s.c Sylwester Nawrocki 2015-01-14  100  	/* Spinlock protecting access to the device's registers */
f36705366 sound/soc/samsung/i2s.c Sylwester Nawrocki 2015-01-14  101  	spinlock_t spinlock;
f36705366 sound/soc/samsung/i2s.c Sylwester Nawrocki 2015-01-14  102  	spinlock_t *lock;
074b89bb5 sound/soc/samsung/i2s.c Sylwester Nawrocki 2015-01-14  103  
074b89bb5 sound/soc/samsung/i2s.c Sylwester Nawrocki 2015-01-14  104  	/* Below fields are only valid if this is the primary FIFO */
074b89bb5 sound/soc/samsung/i2s.c Sylwester Nawrocki 2015-01-14  105  	struct clk *clk_table[3];
074b89bb5 sound/soc/samsung/i2s.c Sylwester Nawrocki 2015-01-14 @106  	struct clk_onecell_data clk_data;
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22  107  };
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22  108  
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22  109  /* Lock for cross i/f checks */
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22  110  static DEFINE_SPINLOCK(lock);
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22  111  
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22  112  /* If this is the 'overlay' stereo DAI */
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22  113  static inline bool is_secondary(struct i2s_dai *i2s)
1c7ac0180 sound/soc/s3c24xx/i2s.c Jassi Brar         2010-11-22  114  {

:::::: The code at line 106 was first introduced by commit
:::::: 074b89bb5fb7e80e0f98f1b45f276b0386269e3d ASoC: samsung: i2s: Add clock provider for the I2S internal clocks

:::::: TO: Sylwester Nawrocki <s.nawrocki@samsung.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 46238 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160919/baaa6098/attachment-0001.gz>

^ permalink raw reply

* [PATCH v4] ARM: mmp: let clk_disable() return immediately if clk is NULL
From: Masahiro Yamada @ 2016-09-18 17:58 UTC (permalink / raw)
  To: linux-arm-kernel

In many of clk_disable() implementations, it is a no-op for a NULL
pointer input, but this is one of the exceptions.

Making it treewide consistent will allow clock consumers to call
clk_disable() without NULL pointer check.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Changes in v4:
  - Split into per-arch patches

Changes in v3:
  - Return only when clk is NULL.  Do not take care of error pointer.

Changes in v2:
  - Rebase on Linux 4.6-rc1

 arch/arm/mach-mmp/clock.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-mmp/clock.c b/arch/arm/mach-mmp/clock.c
index ac6633d..28fe64c 100644
--- a/arch/arm/mach-mmp/clock.c
+++ b/arch/arm/mach-mmp/clock.c
@@ -67,6 +67,9 @@ void clk_disable(struct clk *clk)
 {
 	unsigned long flags;
 
+	if (!clk)
+		return;
+
 	WARN_ON(clk->enabled == 0);
 
 	spin_lock_irqsave(&clocks_lock, flags);
-- 
1.9.1

^ permalink raw reply related

* [PATCH v4] ARM: w90x900: let clk_disable() return immediately if clk is NULL
From: Masahiro Yamada @ 2016-09-18 17:59 UTC (permalink / raw)
  To: linux-arm-kernel

In many of clk_disable() implementations, it is a no-op for a NULL
pointer input, but this is one of the exceptions.

Making it treewide consistent will allow clock consumers to call
clk_disable() without NULL pointer check.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Wan Zongshun <mcuos.com@gmail.com>
---

Changes in v4:
  - Split into per-arch patches

Changes in v3:
  - Return only when clk is NULL.  Do not take care of error pointer.

Changes in v2:
  - Rebase on Linux 4.6-rc1

 arch/arm/mach-w90x900/clock.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-w90x900/clock.c b/arch/arm/mach-w90x900/clock.c
index 2c371ff..ac6fd1a 100644
--- a/arch/arm/mach-w90x900/clock.c
+++ b/arch/arm/mach-w90x900/clock.c
@@ -46,6 +46,9 @@ void clk_disable(struct clk *clk)
 {
 	unsigned long flags;
 
+	if (!clk)
+		return;
+
 	WARN_ON(clk->enabled == 0);
 
 	spin_lock_irqsave(&clocks_lock, flags);
-- 
1.9.1

^ permalink raw reply related

* [PATCH v4] MIPS: bcm63xx: let clk_disable() return immediately if clk is NULL
From: Masahiro Yamada @ 2016-09-18 18:04 UTC (permalink / raw)
  To: linux-arm-kernel

In many of clk_disable() implementations, it is a no-op for a NULL
pointer input, but this is one of the exceptions.

Making it treewide consistent will allow clock consumers to call
clk_disable() without NULL pointer check.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Changes in v4:
  - Split into per-arch patches

Changes in v3:
  - Return only when clk is NULL.  Do not take care of error pointer.

Changes in v2:
  - Rebase on Linux 4.6-rc1

 arch/mips/bcm63xx/clk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index 6375652..b49fc9c 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -326,6 +326,9 @@ EXPORT_SYMBOL(clk_enable);
 
 void clk_disable(struct clk *clk)
 {
+	if (!clk)
+		return;
+
 	mutex_lock(&clocks_mutex);
 	clk_disable_unlocked(clk);
 	mutex_unlock(&clocks_mutex);
-- 
1.9.1

^ permalink raw reply related

* [PATCH] ASoC: samsung: make audio interface/controller explicitly
From: Krzysztof Kozlowski @ 2016-09-18 18:09 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1bc1a3db-8120-a2ae-0f55-a5c1bb154dc6@soulik.info>

On Sun, Sep 18, 2016 at 11:12:34PM +0800, ayaka wrote:
> 
> 
> On 09/18/2016 10:42 PM, Krzysztof Kozlowski wrote:
> >On Sun, Sep 18, 2016 at 10:09:11PM +0800, Randy Li wrote:
> >>It is simple sound card time, we could assign different codec
> >>to a interface without making a specific driver for it.
> >The description does not convince me and I do not see an example using
> >this. Could you provide one?
> Sorry, the board TOPEET iTop 4412 for exynos 4412 I posted supported codec
> with I2S interface using the simple sound card. Anyway, it is no harm to
> make them explicitly right? 

kbuild gave you the answer...

> Or I have to enabled those codec support for
> SMDK, which is not needed for the other board.

If I understand correctly, the i2s/pcm etc are still needed but not
built in config choosing only simple-audio-card? I tried now such
configuration on Odroid XU and indeed the audio is missing.

The patch looks like needed but:
1. You need to describe the rationale in commit message, why it is
needed.
2. You need to fix it... kbuild pointed build issues.

Other solution would be to add a user-selectable option for generic
sound on Samsung using simple audio card. The option would then select
appropriate SND_SAMSUNG* options, just like specific drivers do. I see
that sh does like this. Personally this approach seems simpler to me -
the defconfig could just choose this generic sound instead of many
SND_SAMSUNG_* sub-options.

Best regards,
Krzysztof

> >
> >Best regards,
> >Krzysztof
> >
> >
> >>Signed-off-by: Randy Li <ayaka@soulik.info>
> >>---
> >>  sound/soc/samsung/Kconfig | 8 ++++----
> >>  1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >>diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
> >>index 7b722b0..b7b3a38 100644
> >>--- a/sound/soc/samsung/Kconfig
> >>+++ b/sound/soc/samsung/Kconfig
> >>@@ -18,18 +18,18 @@ config SND_S3C2412_SOC_I2S
> >>  	select SND_S3C_I2SV2_SOC
> >>  config SND_SAMSUNG_PCM
> >>-	tristate
> >>+	tristate "Samsung PCM interface support"
> >>  config SND_SAMSUNG_AC97
> >>-	tristate
> >>+	tristate "Samsung AC97 controller support"
> >>  	select SND_SOC_AC97_BUS
> >>  config SND_SAMSUNG_SPDIF
> >>-	tristate
> >>+	tristate "Samsung SPDIF transmitter support"
> >>  	select SND_SOC_SPDIF
> >>  config SND_SAMSUNG_I2S
> >>-	tristate
> >>+	tristate "Samsung I2S interface support"
> >>  config SND_SOC_SAMSUNG_NEO1973_WM8753
> >>  	tristate "Audio support for Openmoko Neo1973 Smartphones (GTA02)"
> >>-- 
> >>2.7.4
> >>
> 

^ permalink raw reply

* [PATCH] ARM: mediatek: clean up mach-mediatek/Makefile
From: Masahiro Yamada @ 2016-09-18 18:11 UTC (permalink / raw)
  To: linux-arm-kernel

Kbuild descends into arch/arm/mach-mediatek/Makefile only when
CONFIG_ARCH_MEDIATEK is enabled.  So, obj-$(CONFIG_ARCH_MEDIATEK)
is always equivalent to obj-y in this Makefile.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/arm/mach-mediatek/Makefile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-mediatek/Makefile b/arch/arm/mach-mediatek/Makefile
index 2116460..dadae67 100644
--- a/arch/arm/mach-mediatek/Makefile
+++ b/arch/arm/mach-mediatek/Makefile
@@ -1,4 +1,2 @@
-ifeq ($(CONFIG_SMP),y)
-obj-$(CONFIG_ARCH_MEDIATEK) += platsmp.o
-endif
-obj-$(CONFIG_ARCH_MEDIATEK) += mediatek.o
+obj-$(CONFIG_SMP)	+= platsmp.o
+obj-y			+= mediatek.o
-- 
1.9.1

^ permalink raw reply related

* [PATCH v2] dmaengine: s3c24xx: Add dma_slave_map for s3c2440 devices
From: Sam Van Den Berge @ 2016-09-18 18:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <b8d6e8a9-4807-0dc0-95c8-a4aca89f18e7@samsung.com>

On Fri, Sep 16, 2016 at 01:00:12PM +0200, Sylwester Nawrocki wrote:
> On 09/15/2016 09:41 PM, Sam Van Den Berge wrote:
> > @@ -445,10 +446,44 @@ static struct s3c24xx_dma_channel s3c2440_dma_channels[DMACH_MAX] = {
> >  	[DMACH_USB_EP4] = { S3C24XX_DMA_APB, true, S3C24XX_DMA_CHANREQ(4, 3), },
> >  };
> >  
> > +static const struct dma_slave_map s3c2440_dma_slave_map[] = {
> > +	/* TODO: DMACH_XD0 */
> > +	/* TODO: DMACH_XD1 */
> > +	{ "3c2440-sdi", "rx-tx", (void *)DMACH_SDI },
> 
> Thanks for the patch, still device name needs to be changed here
> to "s3c2440-sdi".

Thanks for spotting this! I guess I was too focused on the "rx-tx" part
that I totally missed the missing leading "s". I will fix this in v3.

Sam.

^ permalink raw reply

* [RFC PATCH v2 1/2] ARM: dts: samsung: add rga-lvds panel in itop elite
From: Krzysztof Kozlowski @ 2016-09-18 19:03 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1474208859-10045-2-git-send-email-ayaka@soulik.info>

On Sun, Sep 18, 2016 at 10:27:38PM +0800, Randy Li wrote:
> It is actually a lvds panel connected through a rga-lvds bridge.
> The touchscreen is communicated with i2c bus but the driver is not
> support now.
> 
> Signed-off-by: Randy Li <ayaka@soulik.info>

Subject: ARM: dts: exynos

> ---
>  arch/arm/boot/dts/exynos4412-itop-elite.dts | 54 +++++++++++++++++++++++++++--
>  1 file changed, 52 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos4412-itop-elite.dts b/arch/arm/boot/dts/exynos4412-itop-elite.dts
> index b08705e..9ef0505 100644
> --- a/arch/arm/boot/dts/exynos4412-itop-elite.dts
> +++ b/arch/arm/boot/dts/exynos4412-itop-elite.dts
> @@ -138,6 +138,36 @@
>  		assigned-clocks = <&clock CLK_MOUT_CAM0>;
>  		assigned-clock-parents = <&clock CLK_XUSBXTI>;
>  	};
> +
> +	vcc_sys_lcd: sys-lcd {

No underscores, use hyphens.

> +		compatible = "regulator-fixed";
> +		regulator-name = "vcc_5v";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		gpio = <&gpl0 4 GPIO_ACTIVE_HIGH>;

Isn't this one of S5M8767 PMIC regulators? If so, then it should be
defined there... On the other hand, the PMIC supports GPIO enable
control only for buck9...

> +	};
> +
> +	panel: panel at 0 {
> +		compatible = "chunghwa,claa070wp03xg";
> +
> +		power-supply = <&vcc_sys_lcd>;
> +		enable-gpios = <&gpl0 2 GPIO_ACTIVE_HIGH>;
> +		backlight = <&bl>;
> +
> +		port {
> +			lcd_ep: endpoint {

lcd-ep

> +				remote-endpoint = <&rga_lvds>;
> +			};
> +		};
> +	};
> +
> +	bl: backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&pwm 1 5000000 PWM_POLARITY_INVERTED>;
> +		brightness-levels = <0 5 12 16 32 64 128 255>;
> +		default-brightness-level = <5>;
> +		power-supply = <&vcc_sys_lcd>;
> +	};
>  };
>  
>  &adc {
> @@ -215,9 +245,9 @@
>  
>  &pwm {
>  	status = "okay";
> -	pinctrl-0 = <&pwm0_out>;
> +	pinctrl-0 = <&pwm0_out &pwm1_out>;
>  	pinctrl-names = "default";
> -	samsung,pwm-outputs = <0>;
> +	samsung,pwm-outputs = <0>, <1>;
>  };
>  
>  &sdhci_2 {
> @@ -238,3 +268,23 @@
>  &serial_2 {
>  	status = "okay";
>  };
> +
> +&i2c_3 {
> +	status = "okay";
> +};
> +
> +&fimd {

Please put these nodes in alphabetical order. I asked about it for
initial DTS and it applies still.

> +	pinctrl-0 = <&lcd_clk &lcd_data24>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +	ports {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		port at 3 {
> +			reg = <3>;
> +			rga_lvds: endpoint {

rga-lvds

Best regards,
Krzysztof

> +				remote-endpoint = <&lcd_ep>;
> +			};
> +		};
> +	};
> +};
> -- 
> 2.7.4
> 

^ permalink raw reply

* [PATCH -next] drm/sun4i: backend: remove redundant dev_err call in sun4i_backend_bind()
From: Maxime Ripard @ 2016-09-18 19:04 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1473909958-30216-1-git-send-email-weiyj.lk@gmail.com>

On Thu, Sep 15, 2016 at 03:25:58AM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> There is a error message within devm_ioremap_resource
> already, so remove the dev_err call to avoid redundant
> error message.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Queued, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160918/257caa2c/attachment.sig>

^ permalink raw reply

* [RFC PATCH v2 1/2] ARM: dts: samsung: add rga-lvds panel in itop elite
From: Krzysztof Kozlowski @ 2016-09-18 19:09 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20160918190348.GA5556@kozik-book>

On Sun, Sep 18, 2016 at 09:03:48PM +0200, Krzysztof Kozlowski wrote:
> On Sun, Sep 18, 2016 at 10:27:38PM +0800, Randy Li wrote:
> > It is actually a lvds panel connected through a rga-lvds bridge.
> > The touchscreen is communicated with i2c bus but the driver is not
> > support now.
> > 
> > Signed-off-by: Randy Li <ayaka@soulik.info>
> 
> Subject: ARM: dts: exynos
> 
> > ---
> >  arch/arm/boot/dts/exynos4412-itop-elite.dts | 54 +++++++++++++++++++++++++++--
> >  1 file changed, 52 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/exynos4412-itop-elite.dts b/arch/arm/boot/dts/exynos4412-itop-elite.dts
> > index b08705e..9ef0505 100644
> > --- a/arch/arm/boot/dts/exynos4412-itop-elite.dts
> > +++ b/arch/arm/boot/dts/exynos4412-itop-elite.dts
> > @@ -138,6 +138,36 @@
> >  		assigned-clocks = <&clock CLK_MOUT_CAM0>;
> >  		assigned-clock-parents = <&clock CLK_XUSBXTI>;
> >  	};
> > +
> > +	vcc_sys_lcd: sys-lcd {
> 
> No underscores, use hyphens.

Ah wait, it's a label, so underscore seems ok. My mistake.

> 
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "vcc_5v";
> > +		regulator-min-microvolt = <5000000>;
> > +		regulator-max-microvolt = <5000000>;
> > +		gpio = <&gpl0 4 GPIO_ACTIVE_HIGH>;
> 
> Isn't this one of S5M8767 PMIC regulators? If so, then it should be
> defined there... On the other hand, the PMIC supports GPIO enable
> control only for buck9...
> 
> > +	};
> > +
> > +	panel: panel at 0 {
> > +		compatible = "chunghwa,claa070wp03xg";
> > +
> > +		power-supply = <&vcc_sys_lcd>;
> > +		enable-gpios = <&gpl0 2 GPIO_ACTIVE_HIGH>;
> > +		backlight = <&bl>;
> > +
> > +		port {
> > +			lcd_ep: endpoint {
> 
> lcd-ep

No need, the same.

Best regards,
Krzysztof

> 
> > +				remote-endpoint = <&rga_lvds>;
> > +			};
> > +		};
> > +	};
> > +
> > +	bl: backlight {
> > +		compatible = "pwm-backlight";
> > +		pwms = <&pwm 1 5000000 PWM_POLARITY_INVERTED>;
> > +		brightness-levels = <0 5 12 16 32 64 128 255>;
> > +		default-brightness-level = <5>;
> > +		power-supply = <&vcc_sys_lcd>;
> > +	};
> >  };
> >  
> >  &adc {
> > @@ -215,9 +245,9 @@
> >  
> >  &pwm {
> >  	status = "okay";
> > -	pinctrl-0 = <&pwm0_out>;
> > +	pinctrl-0 = <&pwm0_out &pwm1_out>;
> >  	pinctrl-names = "default";
> > -	samsung,pwm-outputs = <0>;
> > +	samsung,pwm-outputs = <0>, <1>;
> >  };
> >  
> >  &sdhci_2 {
> > @@ -238,3 +268,23 @@
> >  &serial_2 {
> >  	status = "okay";
> >  };
> > +
> > +&i2c_3 {
> > +	status = "okay";
> > +};
> > +
> > +&fimd {
> 
> Please put these nodes in alphabetical order. I asked about it for
> initial DTS and it applies still.
> 
> > +	pinctrl-0 = <&lcd_clk &lcd_data24>;
> > +	pinctrl-names = "default";
> > +	status = "okay";
> > +	ports {
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +		port at 3 {
> > +			reg = <3>;
> > +			rga_lvds: endpoint {
> 
> rga-lvds
> 
> Best regards,
> Krzysztof
> 
> > +				remote-endpoint = <&lcd_ep>;
> > +			};
> > +		};
> > +	};
> > +};
> > -- 
> > 2.7.4
> > 

^ permalink raw reply

* [PATCH 1/4] drm/sun4i: rgb: Declare RGB encoder and connector as MIPI DPI
From: Maxime Ripard @ 2016-09-18 19:12 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20160915151402.15992-2-wens@csie.org>

Hi,

On Thu, Sep 15, 2016 at 11:13:59PM +0800, Chen-Yu Tsai wrote:
> The 18 or 24 bit parallel RGB LCD panel interface found on Allwinner
> SoCs matches the description of MIPI DPI. Declare the RGB encoder and
> connector as MIPI DPI.

Unfortunately, even it that patch might be true (is there a public
spec for that standard?), this breaks the user-space, so there's no
way we change this.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160918/808e0518/attachment.sig>

^ permalink raw reply

* [PATCH 3/4] drm/sun4i: dotclock: Allow divider = 127
From: Maxime Ripard @ 2016-09-18 19:13 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20160915151402.15992-4-wens@csie.org>

On Thu, Sep 15, 2016 at 11:14:01PM +0800, Chen-Yu Tsai wrote:
> The dot clock divider is 7 bits wide, and the divider range is 1 ~ 127,
> or 6 ~ 127 if phase offsets are used. The 0 register value also
> represents a divider of 1 or bypass.
> 
> Make the end condition of the for loop inclusive of 127 in the
> round_rate callback.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160918/34bb122f/attachment.sig>

^ permalink raw reply

* [PATCH 2/4] drm/sun4i: dotclock: Fix clock rate read back calcation
From: Maxime Ripard @ 2016-09-18 19:14 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20160915151402.15992-3-wens@csie.org>

On Thu, Sep 15, 2016 at 11:14:00PM +0800, Chen-Yu Tsai wrote:
> When reading back the divider set in the register, we mask off the
> bits that aren't part of the divider. Unfortunately the mask used
> here was not converted from the field width.
> 
> Fix this by converting the field width to a proper bit mask.
> 
> Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160918/2de11cb7/attachment-0001.sig>

^ permalink raw reply

* [PATCH v7 1/3] ARM: dts: Add TOPEET itop core board SCP package version
From: Krzysztof Kozlowski @ 2016-09-18 19:15 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1474207279-9662-2-git-send-email-ayaka@soulik.info>

On Sun, Sep 18, 2016 at 10:01:17PM +0800, Randy Li wrote:
> The TOPEET itop is a samsung exnynos 4412 core board, which have
> two package versions. This patch add the support for SCP version.
> 
> Currently supported are USB3503A HSIC, USB OTG, eMMC, rtc and
> PMIC. The future features are in the based board. Also MFC and
> watchdog have been enabled.
> 
> Signed-off-by: Randy Li <ayaka@soulik.info>
> ---
>  arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi | 491 ++++++++++++++++++++++++
>  1 file changed, 491 insertions(+)
>  create mode 100644 arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi
> 
> diff --git a/arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi b/arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi
> new file mode 100644
> index 0000000..1b780cf
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi
> @@ -0,0 +1,491 @@
> +/*
> + * TOPEET's Exynos4412 based itop board device tree source
> + *
> + * Copyright (c) 2016 SUMOMO Computer Association
> + *			https://www.sumomo.mobi
> + *			Randy Li <ayaka@soulik.info>
> + *
> + * Device tree source file for TOPEET iTop Exynos 4412 SCP package core
> + * board which is based on Samsung's Exynos4412 SoC.
> + *
> + * 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 <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/clock/samsung,s2mps11.h>

Please put above includes in alphabetical order, as it may reduce the
conflicts on simultaneous edits.


> +#include "exynos4412.dtsi"
> +#include "exynos4412-ppmu-common.dtsi"
> +#include "exynos-mfc-reserved-memory.dtsi"
> +
> +/ {
> +	memory at 40000000 {
> +		device_type = "memory";
> +		reg = <0x40000000 0x40000000>;
> +	};
> +
> +	firmware at 0203F000 {
> +		compatible = "samsung,secure-firmware";
> +		reg = <0x0203F000 0x1000>;
> +	};
> +
> +	fixed-rate-clocks {
> +		xxti {
> +			compatible = "samsung,clock-xxti";
> +			clock-frequency = <0>;
> +		};
> +
> +		xusbxti {
> +			compatible = "samsung,clock-xusbxti";
> +			clock-frequency = <24000000>;
> +		};
> +	};
> +
> +	thermal-zones {
> +		cpu_thermal: cpu-thermal {
> +			cooling-maps {
> +				map0 {
> +				     /* Corresponds to 800MHz at freq_table */
> +				     cooling-device = <&cpu0 7 7>;
> +				};
> +				map1 {
> +				     /* Corresponds to 200MHz at freq_table */
> +				     cooling-device = <&cpu0 13 13>;
> +			       };
> +		       };
> +		};
> +	};
> +
> +	usb-hub {
> +		compatible = "smsc,usb3503a";
> +		reset-gpios = <&gpm2 4 GPIO_ACTIVE_LOW>;
> +		connect-gpios = <&gpm3 3 GPIO_ACTIVE_HIGH>;
> +		intn-gpios = <&gpx2 3 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&hsic_reset>;
> +	};
> +};
> +
> +&bus_dmc {
> +	devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
> +	vdd-supply = <&buck1_reg>;
> +	status = "okay";
> +};
> +
> +&bus_acp {
> +        devfreq = <&bus_dmc>;
> +        status = "okay";
> +};
> +
> +&bus_c2c {
> +        devfreq = <&bus_dmc>;
> +        status = "okay";
> +};
> +
> +&bus_leftbus {
> +        devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
> +        vdd-supply = <&buck3_reg>;
> +        status = "okay";
> +};
> +
> +&bus_rightbus {
> +        devfreq = <&bus_leftbus>;
> +        status = "okay";
> +};
> +
> +&bus_fsys {
> +        devfreq = <&bus_leftbus>;
> +        status = "okay";
> +};
> +
> +&bus_peri {
> +        devfreq = <&bus_leftbus>;
> +        status = "okay";
> +};
> +
> +&bus_mfc {
> +        devfreq = <&bus_leftbus>;
> +        status = "okay";
> +};
> +
> +&cpu0 {
> +	cpu0-supply = <&buck2_reg>;
> +};
> +
> +&hsotg {
> +	vusb_d-supply = <&ldo15_reg>;
> +	vusb_a-supply = <&ldo12_reg>;
> +};
> +
> +&i2c_1 {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	samsung,i2c-sda-delay = <100>;
> +	samsung,i2c-max-bus-freq = <400000>;
> +	pinctrl-0 = <&i2c1_bus>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +
> +	s5m8767: s5m8767_pmic at 66 {

s5m8767-pmic at 66 (in node names underscores seems to be discouraged).

> +		compatible = "samsung,s5m8767-pmic";
> +		reg = <0x66>;
> +
> +		s5m8767,pmic-buck-default-dvs-idx = <3>;
> +
> +		s5m8767,pmic-buck-dvs-gpios = <&gpb 5 GPIO_ACTIVE_HIGH>,
> +						 <&gpb 6 GPIO_ACTIVE_HIGH>,
> +						 <&gpb 7 GPIO_ACTIVE_HIGH>;
> +
> +		s5m8767,pmic-buck-ds-gpios = <&gpm3 5 GPIO_ACTIVE_HIGH>,
> +						<&gpm3 6 GPIO_ACTIVE_HIGH>,
> +						<&gpm3 7 GPIO_ACTIVE_HIGH>;
> +
> +		/* VDD_ARM */
> +		s5m8767,pmic-buck2-dvs-voltage = <1356250>, <1300000>,
> +						 <1243750>, <1118750>,
> +						 <1068750>, <1012500>,
> +						 <956250>, <900000>;
> +		/* VDD_INT */
> +		s5m8767,pmic-buck3-dvs-voltage = <1000000>, <1000000>,
> +						 <925000>, <925000>,
> +						 <887500>, <887500>,
> +						 <850000>, <850000>;
> +		/* VDD_G3D */
> +		s5m8767,pmic-buck4-dvs-voltage = <1081250>, <1081250>,
> +						 <1025000>, <950000>,
> +						 <918750>, <900000>,
> +						 <875000>, <831250>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ALIVE";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			/* SCP uses 1.5v, POP uses 1.2v */
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDDQ_M12";
> +				regulator-min-microvolt = <1500000>;
> +				regulator-max-microvolt = <1500000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo3_reg: LDO3 {
> +				regulator-name = "VDDIOAP_18";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo4_reg: LDO4 {
> +				regulator-name = "VDDQ_PRE";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};

I missed that previously:
You are missing LDO5. DT describes the hardware and LDO5 is still on the
board. Please add it.


> +
> +			ldo6_reg: LDO6 {
> +				regulator-name = "VDD10_MPLL";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo7_reg: LDO7 {
> +				regulator-name = "VDD10_XPLL";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo8_reg: LDO8 {
> +				regulator-name = "VDD10_MIPI";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo9_reg: LDO9 {
> +				regulator-name = "VDD33_LCD";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo10_reg: LDO10 {
> +				regulator-name = "VDD18_MIPI";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo11_reg: LDO11 {
> +				regulator-name = "VDD18_ABB1";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo12_reg: LDO12 {
> +				regulator-name = "VDD33_UOTG";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo13_reg: LDO13 {
> +				regulator-name = "VDDIOPERI_18";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo14_reg: LDO14 {
> +				regulator-name = "VDD18_ABB02";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo15_reg: LDO15 {
> +				regulator-name = "VDD10_USH";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo16_reg: LDO16 {
> +				regulator-name = "VDD18_HSIC";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo17_reg: LDO17 {
> +				regulator-name = "VDDIOAP_MMC012_28";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			/* Used by HSIC */
> +			ldo18_reg: LDO18 {
> +				regulator-name = "VDDIOPERI_28";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};

Ditto, LDO19.

Best regards,
Krzysztof

> +
> +			ldo20_reg: LDO20 {
> +				regulator-name = "VDD28_CAM";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <2800000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo21_reg: LDO21 {
> +				regulator-name = "VDD28_AF";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <2800000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo22_reg: LDO22 {
> +				regulator-name = "VDDA28_2M";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo23_reg: LDO23 {
> +				regulator-name = "VDD28_TF";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo24_reg: LDO24 {
> +				regulator-name = "VDD33_A31";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo25_reg: LDO25 {
> +				regulator-name = "VDD18_CAM";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo26_reg: LDO26 {
> +				regulator-name = "VDD18_A31";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo27_reg: LDO27 {
> +				regulator-name = "GPS_1V8";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo28_reg: LDO28 {
> +				regulator-name = "DVDD12";
> +				regulator-min-microvolt = <1200000>;
> +				regulator-max-microvolt = <1200000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <850000>;
> +				regulator-max-microvolt	= <1100000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <850000>;
> +				regulator-max-microvolt	= <1456250>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			buck3_reg: BUCK3 {
> +				regulator-name = "vdd_int";
> +				regulator-min-microvolt = <875000>;
> +				regulator-max-microvolt	= <1200000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			buck4_reg: BUCK4 {
> +				regulator-name = "vdd_g3d";
> +				regulator-min-microvolt = <750000>;
> +				regulator-max-microvolt	= <1500000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			buck5_reg: BUCK5 {
> +				regulator-name = "vdd_m12";
> +				regulator-min-microvolt = <750000>;
> +				regulator-max-microvolt	= <1500000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			buck6_reg: BUCK6 {
> +				regulator-name = "vdd12_5m";
> +				regulator-min-microvolt = <750000>;
> +				regulator-max-microvolt	= <1500000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			buck7_reg: BUCK7 {
> +				regulator-name = "pvdd_buck7";
> +				regulator-min-microvolt = <750000>;
> +				regulator-max-microvolt	= <2000000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			buck8_reg: BUCK8 {
> +				regulator-name = "pvdd_buck8";
> +				regulator-min-microvolt = <750000>;
> +				regulator-max-microvolt	= <1500000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			buck9_reg: BUCK9 {
> +				regulator-name = "vddf28_emmc";
> +				regulator-min-microvolt = <750000>;
> +				regulator-max-microvolt	= <3000000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +		};
> +
> +		s5m8767_osc: clocks {
> +			#clock-cells = <1>;
> +			clock-output-names = "s5m8767_ap",
> +					"s5m8767_cp", "s5m8767_bt";
> +		};
> +
> +	};
> +};
> +
> +&mfc {
> +	status = "okay";
> +};
> +
> +&mshc_0 {
> +	pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +	vmmc-supply = <&buck9_reg>;
> +	num-slots = <1>;
> +	broken-cd;
> +	card-detect-delay = <200>;
> +	samsung,dw-mshc-ciu-div = <3>;
> +	samsung,dw-mshc-sdr-timing = <2 3>;
> +	samsung,dw-mshc-ddr-timing = <1 2>;
> +	bus-width = <8>;
> +	cap-mmc-highspeed;
> +};
> +
> +&pinctrl_1 {
> +	hsic_reset: hsic-reset {
> +		samsung,pins = "gpm2-4";
> +		samsung,pin-function = <1>;
> +		samsung,pin-pud = <0>;
> +		samsung,pin-drv = <3>;
> +	};
> +};
> +
> +&rtc {
> +	status = "okay";
> +	clocks = <&clock CLK_RTC>, <&s5m8767_osc S2MPS11_CLK_AP>;
> +	clock-names = "rtc", "rtc_src";
> +};
> +
> +&tmu {
> +	vtmu-supply = <&ldo16_reg>;
> +	status = "okay";
> +};
> +
> +&watchdog {
> +	status = "okay";
> +};
> -- 
> 2.7.4
> 

^ permalink raw reply

* [PATCH 4/4] drm/sun4i: dotclock: Round to closest clock rate
From: Maxime Ripard @ 2016-09-18 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20160915151402.15992-5-wens@csie.org>

Hi,

On Thu, Sep 15, 2016 at 11:14:02PM +0800, Chen-Yu Tsai wrote:
> With display pixel clocks we want to have the closest possible clock
> rate, to minimize timing and refresh rate skews. Whether the actual
> clock rate is higher or lower than the requested rate is less important.
> 
> Also check candidates against the requested rate, rather than the
> ideal parent rate, the varying dividers also influence the difference
> between the requested rate and the rounded rate.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  drivers/gpu/drm/sun4i/sun4i_dotclock.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun4i_dotclock.c b/drivers/gpu/drm/sun4i/sun4i_dotclock.c
> index 3eb99784f371..d401156490f3 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_dotclock.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_dotclock.c
> @@ -90,7 +90,8 @@ static long sun4i_dclk_round_rate(struct clk_hw *hw, unsigned long rate,
>  			goto out;
>  		}
>  
> -		if ((rounded < ideal) && (rounded > best_parent)) {
> +		if (abs(rate - rounded / i) <
> +		    abs(rate - best_parent / best_div)) {

I'm not sure what you're trying to do here. Why is the divider involved?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160918/6b595f6e/attachment.sig>

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox