Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 5/5] arm64: dts: rockchip: add reset property for dwc3 controllers on rk3399.
From: Enric Balletbo i Serra @ 2017-12-15 11:00 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171215110005.7564-1-enric.balletbo@collabora.com>

After commit '06c47e6286d usb: dwc3: of-simple: Add support to get resets
for the device' you can add the reset property to the dwc3 node, the reset
is required for the controller to work properly, otherwise bind / unbind
stress testing of the USB controller on rk3399 we'd often end up with lots
of failures that looked like this:

  phy phy-ff800000.phy.9: phy poweron failed --> -110
  dwc3 fe900000.dwc3: failed to initialize core
  dwc3: probe of fe900000.dwc3 failed with error -110

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Changes since v1:
 - This patch did not exists in the series.
Changes since v2:
 - Introduced this patch

 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index c18ff88..83f0f71 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -402,6 +402,8 @@
 		clock-names = "ref_clk", "suspend_clk",
 			      "bus_clk", "aclk_usb3_rksoc_axi_perf",
 			      "aclk_usb3", "grf_clk";
+		resets = <&cru SRST_A_USB3_OTG0>;
+		reset-names = "usb3-otg";
 		status = "disabled";
 
 		usbdrd_dwc3_0: dwc3 {
@@ -433,6 +435,8 @@
 		clock-names = "ref_clk", "suspend_clk",
 			      "bus_clk", "aclk_usb3_rksoc_axi_perf",
 			      "aclk_usb3", "grf_clk";
+		resets = <&cru SRST_A_USB3_OTG1>;
+		reset-names = "usb3-otg";
 		status = "disabled";
 
 		usbdrd_dwc3_1: dwc3 {
-- 
2.9.3

^ permalink raw reply related

* [PATCH v2 1/3] media: V3s: Add support for Allwinner CSI.
From: Yong @ 2017-12-15 11:01 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171215105047.ist7epuida2uao74@flea.lan>

Hi Maxime,

On Fri, 15 Dec 2017 11:50:47 +0100
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> Hi Yong,
> 
> On Mon, Dec 04, 2017 at 05:45:11PM +0800, Yong wrote:
> > I just noticed that you are using the second iteration?
> > Have you received my third iteration?
> 
> Sorry for the late reply, and for not coming back to you yet about
> that test. No, this is still in your v2. I've definitely received your
> v3, I just didn't have time to update to it yet.
> 
> But don't worry, my mail was mostly to know if you had tested that
> setup on your side to try to nail down the issue on my end, not really
> a review or comment that would prevent your patch from going in.

I mean,
The v2 exactly has a bug which may cause the CSI writing frame to 
a wrong memory address.

BTW, should I send a new version. I have made some improve sine v3.

> 
> Maxime
> 
> -- 
> Maxime Ripard, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com


Thanks,
Yong

^ permalink raw reply

* [PATCH] KVM: arm/arm64: don't set vtimer->cnt_ctl in kvm_arch_timer_handler
From: Christoffer Dall @ 2017-12-15 11:15 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <83d52c86-0c09-0a18-34e3-55eb213f8083@arm.com>

On Fri, Dec 15, 2017 at 10:33:48AM +0000, Marc Zyngier wrote:
> On 15/12/17 10:10, Christoffer Dall wrote:
> > On Fri, Dec 15, 2017 at 09:09:05AM +0000, Marc Zyngier wrote:
> >> On 15/12/17 02:27, Jia He wrote:
> >>>
> >>>
> >>
> >> [...]
> >>
> >>>> @@ -367,6 +368,7 @@ static void vtimer_save_state(struct kvm_vcpu *vcpu)
> >>>>   
> >>>>   	/* Disable the virtual timer */
> >>>>   	write_sysreg_el0(0, cntv_ctl);
> >>>> +	isb();
> >>> My only concern is whether this isb() is required here?
> >>> Sorryif this is a stupid question.I understand little about arm arch 
> >>> memory barrier. But seems isb will flush all the instruction prefetch.Do 
> >>> you think if an timer interrupt irq arrives, arm will use the previous 
> >>> instruction prefetch?
> >>
> >>
> >> This barrier has little to do with prefetch. It just guarantees that the
> >> code after the isb() is now running with a disabled virtual timer.
> >> Otherwise, a CPU can freely reorder the write_sysreg() until the next
> >> context synchronization event.
> >>
> >> An interrupt coming between the write and the barrier will also act as a
> >> context synchronization event. For more details, see the ARMv8 ARM (the
> >> glossary has a section on the concept).
> >>
> > 
> > So since an ISB doesn't guarantee that the timer will actually be
> > disabled, is it a waste of energy to have it, or should we keep it as a
> > best effort kind of thing?
> 
> nit: the ISB does offer that guarantee. It is just that the guarantee
> doesn't extend to an interrupt that has already been signalled.

right, I should have said that it doesn't guarantee that an already
signalled interrupt will have been retired prior to enabling interrupts
on the CPU again.

> 
> The main issue I have with not having an ISB is that it makes it harder
> to think of when the disabling actually happens. The disabling could be
> delayed for a very long time, and would make things harder to debug if
> they were going wrong.
> 

Yes, it definitely indicates the intention of the code and the flow, and
the fact that we have to work around delayed signals in the ISR is then
something we can describe with a comment there.

I'll add an ISB in the other version of the patch I sent before.

Thanks,
-Christoffer

^ permalink raw reply

* [PATCH 25/25] arm: ste: dts: Remove leading 0x and 0s from bindings notation
From: Mathieu Malaterre @ 2017-12-15 11:16 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171215111620.20379-1-malat@debian.org>

Improve the DTS files by removing all the leading "0x" and zeros to fix the
following dtc warnings:

Warning (unit_address_format): Node /XXX unit name should not have leading "0x"

and

Warning (unit_address_format): Node /XXX unit name should not have leading 0s

Converted using the following command:

find . -type f \( -iname *.dts -o -iname *.dtsi \) -exec sed -i -e "s/@\([0-9a-fA-FxX\.;:#]+\)\s*{/@\L\1 {/g" -e "s/@0x\(.*\) {/@\1 {/g" -e "s/@0+\(.*\) {/@\1 {/g" {} +^C

For simplicity, two sed expressions were used to solve each warnings separately.

To make the regex expression more robust a few other issues were resolved,
namely setting unit-address to lower case, and adding a whitespace before the
the opening curly brace:

https://elinux.org/Device_Tree_Linux#Linux_conventions

This will solve as a side effect warning:

Warning (simple_bus_reg): Node /XXX@<UPPER> simple-bus unit address format error, expected "<lower>"

This is a follow up to commit 4c9847b7375a ("dt-bindings: Remove leading 0x from bindings notation")

Reported-by: David Daney <ddaney@caviumnetworks.com>
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/arm/boot/dts/ste-dbx5x0.dtsi          |   2 +-
 arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 130 ++++++++++++++---------------
 arch/arm/boot/dts/ste-u300.dts             |  50 +++++------
 3 files changed, 91 insertions(+), 91 deletions(-)

diff --git a/arch/arm/boot/dts/ste-dbx5x0.dtsi b/arch/arm/boot/dts/ste-dbx5x0.dtsi
index 2310a4e97768..cff985f9fb77 100644
--- a/arch/arm/boot/dts/ste-dbx5x0.dtsi
+++ b/arch/arm/boot/dts/ste-dbx5x0.dtsi
@@ -474,7 +474,7 @@
 			clocks = <&prcc_pclk 5 0>;
 		};
 
-		dma: dma-controller at 801C0000 {
+		dma: dma-controller at 801c0000 {
 			compatible = "stericsson,db8500-dma40", "stericsson,dma40";
 			reg = <0x801C0000 0x1000 0x40010000 0x800>;
 			reg-names = "base", "lcpa";
diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
index 68aab50a73ab..2970719ed22c 100644
--- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
+++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi
@@ -195,7 +195,7 @@
 		 * MXTAL "Main Chrystal" is a chrystal oscillator @19.2 MHz
 		 * that is parent of TIMCLK, PLL1 and PLL2
 		 */
-		mxtal: mxtal at 19.2M {
+		mxtal: mxtal at 19.2m {
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
 			clock-frequency = <19200000>;
@@ -207,7 +207,7 @@
 		 * divided by 8. This clock is used by the timers and
 		 * watchdog. See page 105 ff.
 		 */
-		timclk: timclk at 2.4M {
+		timclk: timclk at 2.4m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			clock-div = <8>;
@@ -245,21 +245,21 @@
 			pll-id = <2>;
 			clocks = <&mxtal>;
 		};
-		clk216: clk216 at 216M {
+		clk216: clk216 at 216m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			clock-div = <4>;
 			clock-mult = <1>;
 			clocks = <&pll2>;
 		};
-		clk108: clk108 at 108M {
+		clk108: clk108 at 108m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			clock-div = <2>;
 			clock-mult = <1>;
 			clocks = <&clk216>;
 		};
-		clk72: clk72 at 72M {
+		clk72: clk72 at 72m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			/* The data sheet does not say how this is derived */
@@ -267,7 +267,7 @@
 			clock-mult = <1>;
 			clocks = <&pll2>;
 		};
-		clk48: clk48 at 48M {
+		clk48: clk48 at 48m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			/* The data sheet does not say how this is derived */
@@ -275,7 +275,7 @@
 			clock-mult = <1>;
 			clocks = <&pll2>;
 		};
-		clk27: clk27 at 27M {
+		clk27: clk27 at 27m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			clock-div = <4>;
@@ -284,7 +284,7 @@
 		};
 
 		/* This apparently exists as well */
-		ulpiclk: ulpiclk at 60M {
+		ulpiclk: ulpiclk at 60m {
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
 			clock-frequency = <60000000>;
@@ -295,193 +295,193 @@
 		 * peripheral clocking, clock gates.
 		 */
 
-		hclkdma0: hclkdma0 at 48M {
+		hclkdma0: hclkdma0 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <0>;
 			clocks = <&hclk>;
 		};
-		hclksmc: hclksmc at 48M {
+		hclksmc: hclksmc at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <1>;
 			clocks = <&hclk>;
 		};
-		hclksdram: hclksdram at 48M {
+		hclksdram: hclksdram at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <2>;
 			clocks = <&hclk>;
 		};
-		hclkdma1: hclkdma1 at 48M {
+		hclkdma1: hclkdma1 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <3>;
 			clocks = <&hclk>;
 		};
-		hclkclcd: hclkclcd at 48M {
+		hclkclcd: hclkclcd at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <4>;
 			clocks = <&hclk>;
 		};
-		pclkirda: pclkirda at 48M {
+		pclkirda: pclkirda at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <5>;
 			clocks = <&pclk>;
 		};
-		pclkssp: pclkssp at 48M {
+		pclkssp: pclkssp at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <6>;
 			clocks = <&pclk>;
 		};
-		pclkuart0: pclkuart0 at 48M {
+		pclkuart0: pclkuart0 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <7>;
 			clocks = <&pclk>;
 		};
-		pclksdi: pclksdi at 48M {
+		pclksdi: pclksdi at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <8>;
 			clocks = <&pclk>;
 		};
-		pclki2c0: pclki2c0 at 48M {
+		pclki2c0: pclki2c0 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <9>;
 			clocks = <&pclk>;
 		};
-		pclki2c1: pclki2c1 at 48M {
+		pclki2c1: pclki2c1 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <10>;
 			clocks = <&pclk>;
 		};
-		pclkuart1: pclkuart1 at 48M {
+		pclkuart1: pclkuart1 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <11>;
 			clocks = <&pclk>;
 		};
-		pclkmsp0: pclkmsp0 at 48M {
+		pclkmsp0: pclkmsp0 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <12>;
 			clocks = <&pclk>;
 		};
-		hclkusb: hclkusb at 48M {
+		hclkusb: hclkusb at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <13>;
 			clocks = <&hclk>;
 		};
-		hclkdif: hclkdif at 48M {
+		hclkdif: hclkdif at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <14>;
 			clocks = <&hclk>;
 		};
-		hclksaa: hclksaa at 48M {
+		hclksaa: hclksaa at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <15>;
 			clocks = <&hclk>;
 		};
-		hclksva: hclksva at 48M {
+		hclksva: hclksva at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <16>;
 			clocks = <&hclk>;
 		};
-		pclkhsi: pclkhsi at 48M {
+		pclkhsi: pclkhsi at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <17>;
 			clocks = <&pclk>;
 		};
-		pclkxti: pclkxti at 48M {
+		pclkxti: pclkxti at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <18>;
 			clocks = <&pclk>;
 		};
-		pclkuart2: pclkuart2 at 48M {
+		pclkuart2: pclkuart2 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <19>;
 			clocks = <&pclk>;
 		};
-		pclkmsp1: pclkmsp1 at 48M {
+		pclkmsp1: pclkmsp1 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <20>;
 			clocks = <&pclk>;
 		};
-		pclkmsp2: pclkmsp2 at 48M {
+		pclkmsp2: pclkmsp2 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <21>;
 			clocks = <&pclk>;
 		};
-		pclkowm: pclkowm at 48M {
+		pclkowm: pclkowm at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <22>;
 			clocks = <&pclk>;
 		};
-		hclkhpi: hclkhpi at 48M {
+		hclkhpi: hclkhpi at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <23>;
 			clocks = <&hclk>;
 		};
-		pclkske: pclkske at 48M {
+		pclkske: pclkske at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <24>;
 			clocks = <&pclk>;
 		};
-		pclkhsem: pclkhsem at 48M {
+		pclkhsem: pclkhsem at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <25>;
 			clocks = <&pclk>;
 		};
-		hclk3d: hclk3d at 48M {
+		hclk3d: hclk3d at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <26>;
 			clocks = <&hclk>;
 		};
-		hclkhash: hclkhash at 48M {
+		hclkhash: hclkhash at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <27>;
 			clocks = <&hclk>;
 		};
-		hclkcryp: hclkcryp at 48M {
+		hclkcryp: hclkcryp at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <28>;
 			clocks = <&hclk>;
 		};
-		pclkmshc: pclkmshc at 48M {
+		pclkmshc: pclkmshc at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <29>;
 			clocks = <&pclk>;
 		};
-		hclkusbm: hclkusbm at 48M {
+		hclkusbm: hclkusbm at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <30>;
 			clocks = <&hclk>;
 		};
-		hclkrng: hclkrng at 48M {
+		hclkrng: hclkrng at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <31>;
@@ -495,153 +495,153 @@
 			clock-id = <36>;
 			clocks = <&clk72 &clk48>;
 		};
-		irdaclk: irdaclk at 48M {
+		irdaclk: irdaclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <37>;
 			clocks = <&clk48>;
 		};
-		sspiclk: sspiclk at 48M {
+		sspiclk: sspiclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <38>;
 			clocks = <&clk48>;
 		};
-		uart0clk: uart0clk at 48M {
+		uart0clk: uart0clk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <39>;
 			clocks = <&clk48>;
 		};
-		sdiclk: sdiclk at 48M {
+		sdiclk: sdiclk at 48m {
 			/* Also called MCCLK in some documents */
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <40>;
 			clocks = <&clk48>;
 		};
-		i2c0clk: i2c0clk at 48M {
+		i2c0clk: i2c0clk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <41>;
 			clocks = <&clk48>;
 		};
-		i2c1clk: i2c1clk at 48M {
+		i2c1clk: i2c1clk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <42>;
 			clocks = <&clk48>;
 		};
-		uart1clk: uart1clk at 48M {
+		uart1clk: uart1clk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <43>;
 			clocks = <&clk48>;
 		};
-		mspclk0: mspclk0 at 48M {
+		mspclk0: mspclk0 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <44>;
 			clocks = <&clk48>;
 		};
-		usbclk: usbclk at 48M {
+		usbclk: usbclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <45>;
 			clocks = <&clk48>; /* 48 MHz not ULPI */
 		};
-		difclk: difclk at 72M {
+		difclk: difclk at 72m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <46>;
 			clocks = <&clk72>;
 		};
-		ipi2cclk: ipi2cclk at 48M {
+		ipi2cclk: ipi2cclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <47>;
 			clocks = <&clk48>; /* Guess */
 		};
-		ipbmcclk: ipbmcclk at 48M {
+		ipbmcclk: ipbmcclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <48>;
 			clocks = <&clk48>; /* Guess */
 		};
-		hsiclkrx: hsiclkrx at 216M {
+		hsiclkrx: hsiclkrx at 216m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <49>;
 			clocks = <&clk216>;
 		};
-		hsiclktx: hsiclktx at 108M {
+		hsiclktx: hsiclktx at 108m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <50>;
 			clocks = <&clk108>;
 		};
-		uart2clk: uart2clk at 48M {
+		uart2clk: uart2clk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <51>;
 			clocks = <&clk48>;
 		};
-		mspclk1: mspclk1 at 48M {
+		mspclk1: mspclk1 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <52>;
 			clocks = <&clk48>;
 		};
-		mspclk2: mspclk2 at 48M {
+		mspclk2: mspclk2 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <53>;
 			clocks = <&clk48>;
 		};
-		owmclk: owmclk at 48M {
+		owmclk: owmclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <54>;
 			clocks = <&clk48>; /* Guess */
 		};
-		skeclk: skeclk at 48M {
+		skeclk: skeclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <56>;
 			clocks = <&clk48>; /* Guess */
 		};
-		x3dclk: x3dclk at 48M {
+		x3dclk: x3dclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <58>;
 			clocks = <&clk48>; /* Guess */
 		};
-		pclkmsp3: pclkmsp3 at 48M {
+		pclkmsp3: pclkmsp3 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <59>;
 			clocks = <&pclk>;
 		};
-		mspclk3: mspclk3 at 48M {
+		mspclk3: mspclk3 at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <60>;
 			clocks = <&clk48>;
 		};
-		mshcclk: mshcclk at 48M {
+		mshcclk: mshcclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <61>;
 			clocks = <&clk48>; /* Guess */
 		};
-		usbmclk: usbmclk at 48M {
+		usbmclk: usbmclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <62>;
 			/* Stated as "48 MHz not ULPI clock" */
 			clocks = <&clk48>;
 		};
-		rngcclk: rngcclk at 48M {
+		rngcclk: rngcclk at 48m {
 			#clock-cells = <0>;
 			compatible = "st,nomadik-src-clock";
 			clock-id = <63>;
diff --git a/arch/arm/boot/dts/ste-u300.dts b/arch/arm/boot/dts/ste-u300.dts
index 62ecb6a2fa39..08edee80f022 100644
--- a/arch/arm/boot/dts/ste-u300.dts
+++ b/arch/arm/boot/dts/ste-u300.dts
@@ -39,88 +39,88 @@
 			compatible = "fixed-clock";
 			clock-frequency = <32768>;
 		};
-		pll13: pll13 at 13M {
+		pll13: pll13 at 13m {
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
 			clock-frequency = <13000000>;
 		};
 		/* Slow bridge clocks under PLL13 */
-		slow_clk: slow_clk at 13M {
+		slow_clk: slow_clk at 13m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <0>; /* Slow */
 			clock-id = <0>;
 			clocks = <&pll13>;
 		};
-		uart0_clk: uart0_clk at 13M {
+		uart0_clk: uart0_clk at 13m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <0>; /* Slow */
 			clock-id = <1>;
 			clocks = <&slow_clk>;
 		};
-		gpio_clk: gpio_clk at 13M {
+		gpio_clk: gpio_clk at 13m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <0>; /* Slow */
 			clock-id = <4>;
 			clocks = <&slow_clk>;
 		};
-		rtc_clk: rtc_clk at 13M {
+		rtc_clk: rtc_clk at 13m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <0>; /* Slow */
 			clock-id = <6>;
 			clocks = <&slow_clk>;
 		};
-		apptimer_clk: app_tmr_clk at 13M {
+		apptimer_clk: app_tmr_clk at 13m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <0>; /* Slow */
 			clock-id = <7>;
 			clocks = <&slow_clk>;
 		};
-		acc_tmr_clk at 13M {
+		acc_tmr_clk at 13m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <0>; /* Slow */
 			clock-id = <8>;
 			clocks = <&slow_clk>;
 		};
-		pll208: pll208 at 208M {
+		pll208: pll208 at 208m {
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
 			clock-frequency = <208000000>;
 		};
-		app208: app_208_clk at 208M {
+		app208: app_208_clk at 208m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			clock-div = <1>;
 			clock-mult = <1>;
 			clocks = <&pll208>;
 		};
-		cpu_clk at 208M {
+		cpu_clk at 208m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <2>; /* Rest */
 			clock-id = <3>;
 			clocks = <&app208>;
 		};
-		app104: app_104_clk at 104M {
+		app104: app_104_clk at 104m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			clock-div = <2>;
 			clock-mult = <1>;
 			clocks = <&pll208>;
 		};
-		semi_clk at 104M {
+		semi_clk at 104m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <2>; /* Rest */
 			clock-id = <9>;
 			clocks = <&app104>;
 		};
-		app52: app_52_clk at 52M {
+		app52: app_52_clk at 52m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			clock-div = <4>;
@@ -128,49 +128,49 @@
 			clocks = <&pll208>;
 		};
 		/* AHB subsystem clocks */
-		ahb_clk: ahb_subsys_clk at 52M {
+		ahb_clk: ahb_subsys_clk at 52m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <2>; /* Rest */
 			clock-id = <10>;
 			clocks = <&app52>;
 		};
-		intcon_clk at 52M {
+		intcon_clk at 52m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <2>; /* Rest */
 			clock-id = <12>;
 			clocks = <&ahb_clk>;
 		};
-		emif_clk at 52M {
+		emif_clk at 52m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <2>; /* Rest */
 			clock-id = <5>;
 			clocks = <&ahb_clk>;
 		};
-		dmac_clk: dmac_clk at 52M {
+		dmac_clk: dmac_clk at 52m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <2>; /* Rest */
 			clock-id = <4>;
 			clocks = <&app52>;
 		};
-		fsmc_clk: fsmc_clk at 52M {
+		fsmc_clk: fsmc_clk at 52m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <2>; /* Rest */
 			clock-id = <6>;
 			clocks = <&app52>;
 		};
-		xgam_clk: xgam_clk at 52M {
+		xgam_clk: xgam_clk at 52m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <2>; /* Rest */
 			clock-id = <8>;
 			clocks = <&app52>;
 		};
-		app26: app_26_clk at 26M {
+		app26: app_26_clk at 26m {
 			#clock-cells = <0>;
 			compatible = "fixed-factor-clock";
 			clock-div = <2>;
@@ -178,28 +178,28 @@
 			clocks = <&app52>;
 		};
 		/* Fast bridge  clocks */
-		fast_clk: fast_clk at 26M {
+		fast_clk: fast_clk at 26m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <1>; /* Fast */
 			clock-id = <0>;
 			clocks = <&app26>;
 		};
-		i2c0_clk: i2c0_clk at 26M {
+		i2c0_clk: i2c0_clk at 26m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <1>; /* Fast */
 			clock-id = <1>;
 			clocks = <&fast_clk>;
 		};
-		i2c1_clk: i2c1_clk at 26M {
+		i2c1_clk: i2c1_clk at 26m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <1>; /* Fast */
 			clock-id = <2>;
 			clocks = <&fast_clk>;
 		};
-		mmc_pclk: mmc_p_clk at 26M {
+		mmc_pclk: mmc_p_clk at 26m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <1>; /* Fast */
@@ -211,7 +211,7 @@
 			compatible = "stericsson,u300-syscon-mclk";
 			clocks = <&mmc_pclk>;
 		};
-		spi_clk: spi_p_clk at 26M {
+		spi_clk: spi_p_clk at 26m {
 			#clock-cells = <0>;
 			compatible = "stericsson,u300-syscon-clk";
 			clock-type = <1>; /* Fast */
-- 
2.11.0

^ permalink raw reply related

* [PATCH] arm: dts: Remove leading 0x and 0s from bindings notation
From: Mathieu Malaterre @ 2017-12-15 11:19 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAJKOXPeLiPfoUfpPU-sAAOuD057kTzRE-g4bFq4afFOOtRRZOg@mail.gmail.com>

On Fri, Dec 15, 2017 at 9:59 AM, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Thu, Dec 14, 2017 at 5:53 PM, Mathieu Malaterre <malat@debian.org> wrote:
>> Improve the DTS files by removing all the leading "0x" and zeros to fix the
>> following dtc warnings:
>>
>> Warning (unit_address_format): Node /XXX unit name should not have leading "0x"
>>
>> and
>>
>> Warning (unit_address_format): Node /XXX unit name should not have leading 0s
>>
>> Converted using the following command:
>>
>> find . -type f \( -iname *.dts -o -iname *.dtsi \) -exec sed -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" -e "s/@0+([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" {} +
>>
>> For simplicity, two sed expressions were used to solve each warnings separately.
>>
>> To make the regex expression more robust a few other issues were resolved,
>> namely setting unit-address to lower case, and adding a whitespace before the
>> the opening curly brace:
>>
>> https://elinux.org/Device_Tree_Linux#Linux_conventions
>>
>> This is a follow up to commit 4c9847b7375a ("dt-bindings: Remove leading 0x from bindings notation")
>>
>> Reported-by: David Daney <ddaney@caviumnetworks.com>
>> Suggested-by: Rob Herring <robh@kernel.org>
>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>> ---
>>  arch/arm/boot/dts/am3517.dtsi                 |  4 +--
>>  arch/arm/boot/dts/arm-realview-eb.dtsi        | 18 +++++++-------
>>  arch/arm/boot/dts/arm-realview-pb1176.dts     | 18 +++++++-------
>>  arch/arm/boot/dts/arm-realview-pb11mp.dts     | 18 +++++++-------
>>  arch/arm/boot/dts/arm-realview-pbx.dtsi       | 18 +++++++-------
>>  arch/arm/boot/dts/artpec6.dtsi                |  2 +-
>>  arch/arm/boot/dts/at91sam9261.dtsi            |  2 +-
>>  arch/arm/boot/dts/at91sam9261ek.dts           |  2 +-
>>  arch/arm/boot/dts/at91sam9263.dtsi            |  2 +-
>>  arch/arm/boot/dts/at91sam9263ek.dts           |  2 +-
>>  arch/arm/boot/dts/at91sam9g25ek.dts           |  2 +-
>>  arch/arm/boot/dts/at91sam9g45.dtsi            |  2 +-
>>  arch/arm/boot/dts/at91sam9m10g45ek.dts        |  2 +-
>>  arch/arm/boot/dts/atlas7.dtsi                 | 12 ++++-----
>>  arch/arm/boot/dts/bcm11351.dtsi               |  2 +-
>>  arch/arm/boot/dts/bcm21664.dtsi               |  2 +-
>>  arch/arm/boot/dts/bcm283x.dtsi                |  2 +-
>>  arch/arm/boot/dts/da850-lcdk.dts              |  4 +--
>>  arch/arm/boot/dts/dm8148-evm.dts              |  8 +++---
>>  arch/arm/boot/dts/dm8168-evm.dts              |  8 +++---
>>  arch/arm/boot/dts/dra62x-j5eco-evm.dts        |  8 +++---
>>  arch/arm/boot/dts/exynos5420.dtsi             | 36 +++++++++++++--------------
>>  arch/arm/boot/dts/exynos5422-odroid-core.dtsi |  2 +-
>>  arch/arm/boot/dts/imx7d.dtsi                  |  2 +-
>>  arch/arm/boot/dts/keystone-k2e-netcp.dtsi     |  2 +-
>>  arch/arm/boot/dts/keystone-k2hk-netcp.dtsi    |  2 +-
>>  arch/arm/boot/dts/keystone-k2l-netcp.dtsi     |  2 +-
>>  arch/arm/boot/dts/omap3-cm-t3x.dtsi           |  8 +++---
>>  arch/arm/boot/dts/omap3-evm-37xx.dts          |  8 +++---
>>  arch/arm/boot/dts/omap3-lilly-a83x.dtsi       |  8 +++---
>>  arch/arm/boot/dts/s3c2416.dtsi                |  2 +-
>
> For Exynos and S3C:
> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

As discussed with Krzysztof, I've split the ARM patch into subarch.
Please drop this one.

Thanks

^ permalink raw reply

* [RFC PATCH 2/5] perf jevents: add support for arch recommended events
From: John Garry @ 2017-12-15 11:22 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171209073104.GB14297@krava>

>> Actually having a scalable JSON standard format for pmu events, which allows
>> us to define common events per architecture / vendor and reference them per
>> platform JSON could be useful.
>>
>> Here we're dealing with trade-off between duplication (simplicity) vs
>> complexity (or over-engineering).
>
> understood, but as I said we already are ok with duplicates,
> if it's reasonable size as is for x86 now..  how much amount
> are we talking about for arm?
>

Hi Jirka,

When you say reasonable size for x86, I ran a string duplication finder 
on the x86 JSONs and the results show a huge amount of duplication. 
Please check this:
https://gist.githubusercontent.com/johnpgarry/68bc87e823ae2ce0f7b475b4e55e5795/raw/f4cea138999d8b34151b9586d733592e01774d7a/x86%2520JSON%2520duplication

Extract:
"Found a 65 line (311 tokens) duplication in the following files:
Starting at line 100 of 
/linux/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json
Starting at line 100 of 
/linux/tools/perf/pmu-events/arch/x86/ivytown/ivt-metrics.json
Starting at line 100 of 
/linux/tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json
Starting at line 100 of 
/linux/tools/perf/pmu-events/arch/x86/skylakex/skx-metrics.json
Starting at line 76 of 
/linux/tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json
Starting at line 100 of 
/linux/tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json
Starting at line 76 of 
/linux/tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json
Starting at line 100 of 
/linux/tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json"

Won't this all potentially have a big maintainence cost?

For example, I saw multiple JSON update patches which look identical:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/tools/perf/pmu-events/arch/x86?h=v4.15-rc3&id=7347bba5552f479d4292ffd008d18d41a965f021

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/tools/perf/pmu-events/arch/x86?h=v4.15-rc3&id=984d91f4c62f64026cbfef51f609971025934cec

I just don't know how this schema scales with more archs and more 
platforms supported. It's just early days now...

Regards,
John

> jirka
>
> .
>

^ permalink raw reply

* arm64: unhandled level 0 translation fault
From: Dave Martin @ 2017-12-15 11:23 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAMuHMdXx-8+g5Xf0UtuYu71+K8Pz9CyQe=ifzzOWVRB1KpMGcg@mail.gmail.com>

On Thu, Dec 14, 2017 at 07:08:27PM +0100, Geert Uytterhoeven wrote:
> Hi Dave,
> 
> On Thu, Dec 14, 2017 at 4:24 PM, Dave P Martin <Dave.Martin@arm.com> wrote:
> > On Thu, Dec 14, 2017 at 02:34:50PM +0000, Geert Uytterhoeven wrote:
> >> On Tue, Dec 12, 2017 at 11:20 AM, Geert Uytterhoeven
> >> <geert@linux-m68k.org> wrote:
> >> > During userspace (Debian jessie NFS root) boot on arm64:
> >> >
> >> > rpcbind[1083]: unhandled level 0 translation fault (11) at 0x00000008,
> >> > esr 0x92000004, in dash[aaaaadf77000+1a000]
> >> > CPU: 0 PID: 1083 Comm: rpcbind Not tainted
> >> > 4.15.0-rc3-arm64-renesas-02176-g14f9a1826e48e355 #51
> >> > Hardware name: Renesas Salvator-X 2nd version board based on r8a7795 ES2.0+ (DT)
> >>
> >> This is a quad Cortex A57.
> >>
> >> > pstate: 80000000 (Nzcv daif -PAN -UAO)
> >> > pc : 0xaaaaadf8a51c
> >> > lr : 0xaaaaadf8ac08
> >> > sp : 0000ffffcffeac00
> >> > x29: 0000ffffcffeac00 x28: 0000aaaaadfa1000
> >> > x27: 0000ffffcffebf7c x26: 0000ffffcffead20
> >> > x25: 0000aaaacea1c5f0 x24: 0000000000000000
> >> > x23: 0000aaaaadfa1000 x22: 0000aaaaadfa1000
> >> > x21: 0000000000000000 x20: 0000000000000008
> >> > x19: 0000000000000000 x18: 0000ffffcffeb500
> >> > x17: 0000ffffa22babfc x16: 0000aaaaadfa1ae8
> >> > x15: 0000ffffa2363588 x14: ffffffffffffffff
> >> > x13: 0000000000000020 x12: 0000000000000010
> >> > x11: 0101010101010101 x10: 0000aaaaadfa1000
> >> > x9 : 00000000ffffff81 x8 : 0000aaaaadfa2000
> >> > x7 : 0000000000000000 x6 : 0000000000000000
> >> > x5 : 0000aaaaadfa2338 x4 : 0000aaaaadfa2000
> >> > x3 : 0000aaaaadfa2338 x2 : 0000000000000000
> >> > x1 : 0000aaaaadfa28b0 x0 : 0000aaaaadfa4c30
> >> >
> >> > Sometimes it happens with other processes, but the main address, esr, and
> >> > pstate values are always the same.
> >> >
> >> > I regularly run arm64/for-next/core (through bi-weekly renesas-drivers
> >> > releases, so the last time was two weeks ago), but never saw the issue
> >> > before until today, so probably v4.15-rc1 is OK.
> >> > Unfortunately it doesn't happen during every boot, which makes it
> >> > cumbersome to bisect.
> >> >
> >> > My first guess was UNMAP_KERNEL_AT_EL0, but even after disabling that,
> >> > and even without today's arm64/for-next/core merged in, I still managed to
> >> > reproduce the issue, so I believe it was introduced in v4.15-rc2 or
> >> > v4.15-rc3.
> >> >
> >> > Once, when the kernel message above wasn't shown, I got an error from
> >> > userspace, which may be related:
> >> > *** Error in `/bin/sh': free(): invalid pointer: 0x0000aaaadd970988 ***
> >>
> >> With more boots (10 instead of 6) to declare a kernel good, I bisected this
> >> to commit 9de52a755cfb6da5 ("arm64: fpsimd: Fix failure to restore FPSIMD
> >> state after signals").
> >>
> >> Reverting that commit on top of v4.15-rc3 fixed the issue for me.
> >
> > Good work on the bisect -- I'll need to have a think about this...
> >
> > That patch fixes a genuine problem so we can't just revert it.
> >
> > What if you revert _just this function_ back to what it was in v4.14?
> 
> With fpsimd_update_current_state() reverted to v4.14, and
> 
> -               __this_cpu_write(fpsimd_last_state, st);
> +               __this_cpu_write(fpsimd_last_state.st, st);
> 
> to make it build, the problem seems to be fixed, too.
> 
> Thanks!
> 
> Gr{oetje,eeting}s,
> 
>                         Geert

Interesting if I apply that to v4.14 and then flatten the new code for CONFIG_ARM64_SVE=n, I get:

Working:

void fpsimd_update_current_state(struct fpsimd_state *state)
{
	local_bh_disable();

	fpsimd_load_state(state);
	if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE)) {
		struct fpsimd_state *st = &current->thread.fpsimd_state;

		__this_cpu_write(fpsimd_last_state.st, st);
		st->cpu = smp_processor_id();
	}

	local_bh_enable();
}

Broken:

void fpsimd_update_current_state(struct fpsimd_state *state)
{
	struct fpsimd_last_state_struct *last;
	struct fpsimd_state *st;

	local_bh_disable();

	current->thread.fpsimd_state = *state;
	fpsimd_load_state(&current->thread.fpsimd_state);

	if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE)) {
		last = this_cpu_ptr(&fpsimd_last_state);
		st = &current->thread.fpsimd_state;

		last->st = st;
		last->sve_in_use = test_thread_flag(TIF_SVE);
		st->cpu = smp_processor_id();
	}

	local_bh_enable();
}

Can you try my flattened "broken" version by itself and see if that does
reproduce the bug?  If not, my flattening may be making bad assumptions...


Assuming the "broken" version reproduces the bug, I can't yet see exactly
where the breakage comes from.

The two important differences here seem to be

1) Staging the state via current->thread.fpsimd_state instead of loading
directly:

-	fpsimd_load_state(state);
+	current->thread.fpsimd_state = *state;
+	fpsimd_load_state(&current->thread.fpsimd_state);

and

2) Using this_cpu_ptr() + assignment instead of __this_cpu_write() when
reassociating the task's fpsimd context with the cpu:

 {
+	struct fpsimd_last_state_struct *last;
+	struct fpsimd_state *st;

[...]

 	if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE)) {
-		struct fpsimd_state *st = &current->thread.fpsimd_state;
-
-		__this_cpu_write(fpsimd_last_state.st, st);
-		st->cpu = smp_processor_id();
+		last = this_cpu_ptr(&fpsimd_last_state);
+		st = &current->thread.fpsimd_state;
+
+		last->st = st;
+		last->sve_in_use = test_thread_flag(TIF_SVE);
+		st->cpu = smp_processor_id();
 	}


I can't see why either of these breaks anything yet.

Can you try them independently and see whether you can isolate the
breakage to one of them?

Cheers
---Dave

^ permalink raw reply

* [PATCH 1/3] dt-bindings: chosen: Add clocksource and clockevent selection
From: Mark Rutland @ 2017-12-15 11:32 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171213185313.20017-2-alexandre.belloni@free-electrons.com>

Hi,

On Wed, Dec 13, 2017 at 07:53:11PM +0100, Alexandre Belloni wrote:
> The clocksource and clockevent timer are probed early in the boot process.
> At that time it is difficult for linux to know whether a particular timer
> can be used as the clocksource or the clockevent or by another driver,
> especially when they are all identical or have similar features.

I think that to solve this problem, we need to stop treating
clocksources and clockevent devices as completely separate device types,
and instead treat them as particular cases of a more general clock
device.

That way, a driver can register a single device, with flags saying
whether it is:

* a clocksource only
* a clockevent device only
* both a clocksource and clockevent device
* both, but mutually exclusive at runtime

... and thus drivers don't have to make an impossible decision up-front
as to how the device should be used.

As more devices get registered, the core timekeeping code can improve on
its choices and re-assign devices.

That doesn't solve the case where a clock device may use resources we
want for something else, but I think we can solve that separately.

Thanks,
Mark.

> Until now, multiple strategies have been used to solve that:
>  - use Kconfig option as MXC_USE_EPIT or ATMEL_TCB_CLKSRC_BLOCK
>  - use a kernel parameter as the "clocksource" early_param in mach-omap2
>  - registering the first seen timer as a clockevent and the second one as
>  a clocksource as in rk_timer_init or dw_apb_timer_init
> 
> Add a linux,clocksource and a linux,clockevent node in chosen with a timer
> property pointing to the timer to use. Other properties, like the targeted
> precision may be added later.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  Documentation/devicetree/bindings/chosen.txt | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/chosen.txt b/Documentation/devicetree/bindings/chosen.txt
> index e3b13ea7d2ae..c7ee3ecb5276 100644
> --- a/Documentation/devicetree/bindings/chosen.txt
> +++ b/Documentation/devicetree/bindings/chosen.txt
> @@ -120,3 +120,23 @@ e.g.
>  While this property does not represent a real hardware, the address
>  and the size are expressed in #address-cells and #size-cells,
>  respectively, of the root node.
> +
> +linux,clocksource and linux,clockevent
> +--------------------------------------
> +
> +Those nodes have a timer property. This property is a phandle to the timer to be
> +chosen as the clocksource or clockevent. This is only useful when the platform
> +has multiple identical timers and it is not possible to let linux make the
> +correct choice.
> +
> +/ {
> +	chosen {
> +		linux,clocksource {
> +			timer = <&timer0>;
> +		};
> +
> +		linux,clockevent {
> +			timer = <&timer1>;
> +		};
> +	};
> +};
> -- 
> 2.15.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH v2 1/5] extcon: usbc-cros-ec: add support to notify USB type cables.
From: Lee Jones @ 2017-12-15 11:38 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <5A3388E5.9030100@samsung.com>

On Fri, 15 Dec 2017, Chanwoo Choi wrote:

> On 2017? 12? 15? 17:20, Chanwoo Choi wrote:
> > On 2017? 12? 15? 17:14, Lee Jones wrote:
> >>> On 2017? 12? 13? 19:32, Enric Balletbo i Serra wrote:
> >>>> From: Benson Leung <bleung@chromium.org>
> >>>>
> >>>> Extend the driver to notify host and device type cables and the presence
> >>>> of power.
> >>>>
> >>>> Signed-off-by: Benson Leung <bleung@chromium.org>
> >>>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> >>>> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
> >>>> ---
> >>>> Changes since v1:
> >>>>  - Use the BIT macro. Requested by Lee Jones.
> >>>>  - Add the Reviewed-by: Chanwoo Choi.
> >>>>
> >>>>  drivers/extcon/extcon-usbc-cros-ec.c | 142 ++++++++++++++++++++++++++++++++++-
> >>>>  include/linux/mfd/cros_ec_commands.h |  17 +++++
> >>>>  2 files changed, 155 insertions(+), 4 deletions(-)
> >>
> >>> Looks good to me. After reviewing the Lee Jones,
> >>> I'll take it on next branch.
> >>
> >> If you take it, you need to send me a pull-request to an immutable
> >> branch.
> >>
> >> Acked-by: Lee Jones <lee.jones@linaro.org>
> >>
> > 
> > Sure. I'll send the immutable branch. Thanks.
> > 
> 
> Dear Lee,
> 
> I make the immutable branch (ib-extcon-mfd-4.16)
> and send the following pull request.

Nicely done.  Pulled, thanks.

-- 
Lee Jones
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply

* [PATCH 1/3] dt-bindings: chosen: Add clocksource and clockevent selection
From: Mark Rutland @ 2017-12-15 11:40 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171214210120.6b436e0d@bbrezillon>

Hi,

On Thu, Dec 14, 2017 at 09:01:20PM +0100, Boris Brezillon wrote:
> On Wed, 13 Dec 2017 16:57:50 -0600
> Rob Herring <robh+dt@kernel.org> wrote:
> > On Wed, Dec 13, 2017 at 12:53 PM, Alexandre Belloni
> > <alexandre.belloni@free-electrons.com> wrote:

> > > The clocksource and clockevent timer are probed early in the boot process.
> > > At that time it is difficult for linux to know whether a particular timer
> > > can be used as the clocksource or the clockevent or by another driver,
> > > especially when they are all identical or have similar features.  
> > 
> > If all identical, then it shouldn't matter. "similar" means some
> > difference. Describe those differences.
> 
> We had this discussion already. Those timers might be connected to
> external pins and may serve the role of PWM generators or capture
> devices. We can also chain timers and provide a clocksource with a
> better resolution or one that wraps less often. 

Could you elaborate on the chaining case? I haven't encountered that,
and at the moment I'm not sure I follow how that works.

> > >  - registering the first seen timer as a clockevent and the second one as
> > >  a clocksource as in rk_timer_init or dw_apb_timer_init
> > >
> > > Add a linux,clocksource and a linux,clockevent node in chosen with a timer
> > > property pointing to the timer to use. Other properties, like the targeted
> > > precision may be added later.  
> > 
> > Open ended expansion of this does not help convince me it is needed.
> 
> It's not an open ended expansion, we're just trying to find a way to
> describe which timer blocks should be used as free running timers
> (clksource) and which one should be used as programmable timers
> (clkevent). Automatically selecting timer blocks to assign to the
> clkevent or clocksource is not so easy (as has been explained earlier)
> because at the time the system registers its clksource/clkevent devices
> we might not have all the necessary information to know which timer
> blocks will be reserved for other usage later on. The use case I have
> in mind is DT overlays, where one of the overlay is using a timer as a
> PWM generator. If the clkevent or clksource has already claimed the
> timer connected to the pins the overlay is using, then we're screwed,
> and there's no way the system can know that ahead of time except by
> pre-assigning a timer to the clksource or clkevent feature.

I guess that might work for the boot-time overlay case, where the user
knows ahead-of-time that there will be a conflict for resources, but
that doesn't help with the dynamic overlay case, since the user can't
know what conflicts there will be.

Can we attempt to unregister the clock device in that case, when the PWM
is requested? If the timekeeping core can select another device, then
we're free to use this one as a PWM. If not, then we're stuck anyway.

Thanks,
Mark.

^ permalink raw reply

* [PATCH 0/2] Use SPDX-License-Identifier for rockchip devicetree files
From: Klaus Goger @ 2017-12-15 11:44 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series replaces all the license text in rockchip devicetree
files text with a proper SPDX-License-Identifier.
It follows the guidelines submitted[1] by Thomas Gleixner that are not
yet merged.

These series also fixes the issue with contradicting statements in most
licenses. The introduction text claims to be GPL or X11[2] but the
following verbatim copy of the license is actually a MIT[3] license.
The X11 license includes a advertise clause and trademark information
related to the X Consortium. As these X Consortium specfic points are
irrelevant for us we stick with the actuall license text.

[1] https://patchwork.kernel.org/patch/10091607/
[2] https://spdx.org/licenses/X11.html
[3] https://spdx.org/licenses/MIT.html


Klaus Goger (2):
  arm64: dts: rockchip: use SPDX-License-Identifier
  ARM: dts: rockchip: use SPDX-License-Identifier

 arch/arm/boot/dts/rk3036-evb.dts                   | 40 +---------------------
 arch/arm/boot/dts/rk3036-kylin.dts                 | 40 +---------------------
 arch/arm/boot/dts/rk3036.dtsi                      | 40 +---------------------
 arch/arm/boot/dts/rk3066a-bqcurie2.dts             | 39 +--------------------
 arch/arm/boot/dts/rk3066a-marsboard.dts            | 39 +--------------------
 arch/arm/boot/dts/rk3066a-mk808.dts                | 39 +--------------------
 arch/arm/boot/dts/rk3066a-rayeager.dts             | 39 +--------------------
 arch/arm/boot/dts/rk3066a.dtsi                     | 39 +--------------------
 arch/arm/boot/dts/rk3188-px3-evb.dts               | 39 +--------------------
 arch/arm/boot/dts/rk3188-radxarock.dts             | 39 +--------------------
 arch/arm/boot/dts/rk3188.dtsi                      | 39 +--------------------
 arch/arm/boot/dts/rk3228-evb.dts                   | 40 +---------------------
 arch/arm/boot/dts/rk3229-evb.dts                   | 40 +---------------------
 arch/arm/boot/dts/rk3229.dtsi                      | 39 +--------------------
 arch/arm/boot/dts/rk322x.dtsi                      | 40 +---------------------
 arch/arm/boot/dts/rk3288-evb-act8846.dts           | 40 +---------------------
 arch/arm/boot/dts/rk3288-evb-rk808.dts             | 40 +---------------------
 arch/arm/boot/dts/rk3288-evb.dtsi                  | 40 +---------------------
 arch/arm/boot/dts/rk3288-fennec.dts                | 40 +---------------------
 arch/arm/boot/dts/rk3288-firefly-beta.dts          | 39 +--------------------
 arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi  | 39 +--------------------
 arch/arm/boot/dts/rk3288-firefly-reload.dts        | 39 +--------------------
 arch/arm/boot/dts/rk3288-firefly.dts               | 39 +--------------------
 arch/arm/boot/dts/rk3288-firefly.dtsi              | 39 +--------------------
 arch/arm/boot/dts/rk3288-miqi.dts                  | 39 +--------------------
 arch/arm/boot/dts/rk3288-phycore-rdk.dts           | 39 +--------------------
 arch/arm/boot/dts/rk3288-phycore-som.dtsi          | 39 +--------------------
 arch/arm/boot/dts/rk3288-popmetal.dts              | 39 +--------------------
 arch/arm/boot/dts/rk3288-r89.dts                   | 39 +--------------------
 arch/arm/boot/dts/rk3288-rock2-som.dtsi            | 40 +---------------------
 arch/arm/boot/dts/rk3288-rock2-square.dts          | 40 +---------------------
 arch/arm/boot/dts/rk3288-tinker.dts                | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron-analog-audio.dtsi  |  5 +--
 arch/arm/boot/dts/rk3288-veyron-brain.dts          | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi    | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron-jaq.dts            | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron-jerry.dts          | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron-mickey.dts         | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron-minnie.dts         | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron-pinky.dts          | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron-sdmmc.dtsi         | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron-speedy.dts         | 39 +--------------------
 arch/arm/boot/dts/rk3288-veyron.dtsi               | 39 +--------------------
 arch/arm/boot/dts/rk3288-vyasa.dts                 | 39 +--------------------
 arch/arm/boot/dts/rk3288.dtsi                      | 40 +---------------------
 arch/arm/boot/dts/rk3xxx.dtsi                      | 39 +--------------------
 arch/arm/boot/dts/rv1108-evb.dts                   | 40 +---------------------
 arch/arm/boot/dts/rv1108.dtsi                      | 40 +---------------------
 arch/arm64/boot/dts/rockchip/rk3328-evb.dts        | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts     | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3328.dtsi           | 39 +--------------------
 .../arm64/boot/dts/rockchip/rk3368-evb-act8846.dts | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi       | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts    | 39 +--------------------
 .../boot/dts/rockchip/rk3368-orion-r68-meta.dts    | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts    | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3368-r88.dts        | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3368.dtsi           | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3399-evb.dts        | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3399-firefly.dts    | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts  | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi       | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi   | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi       | 39 +--------------------
 .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi      | 39 +--------------------
 .../dts/rockchip/rk3399-sapphire-excavator.dts     | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi  | 39 +--------------------
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           | 39 +--------------------
 69 files changed, 69 insertions(+), 2603 deletions(-)

-- 
2.11.0

^ permalink raw reply

* [PATCH 1/2] arm64: dts: rockchip: use SPDX-License-Identifier
From: Klaus Goger @ 2017-12-15 11:44 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171215114427.32059-1-klaus.goger@theobroma-systems.com>

Update all 64bit rockchip devicetree files to use SPDX-License-Identifiers.

All devicetrees claim to be either GPL or X11 while the actual license
text is MIT. Therefore we use MIT for the SPDX tag as X11 is clearly
wrong.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
---

 arch/arm64/boot/dts/rockchip/rk3328-evb.dts        | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts     | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3328.dtsi           | 39 +---------------------
 .../arm64/boot/dts/rockchip/rk3368-evb-act8846.dts | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi       | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts    | 39 +---------------------
 .../boot/dts/rockchip/rk3368-orion-r68-meta.dts    | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts    | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3368-r88.dts        | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3368.dtsi           | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3399-evb.dts        | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3399-firefly.dts    | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts  | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi       | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi   | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi       | 39 +---------------------
 .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi      | 39 +---------------------
 .../dts/rockchip/rk3399-sapphire-excavator.dts     | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi  | 39 +---------------------
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           | 39 +---------------------
 21 files changed, 21 insertions(+), 798 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts
index 3d551e3e6c23..8302d86d35c4 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-evb.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This library is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This library is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index d4f80786e7c2..720a63336dd0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2017 PINE64
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This library is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This library is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index 41d61840fb99..900f16e11ef4 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This library is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This library is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include <dt-bindings/clock/rk3328-cru.h>
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-evb-act8846.dts b/arch/arm64/boot/dts/rockchip/rk3368-evb-act8846.dts
index 8a5275f0539b..160f2c7e9559 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-evb-act8846.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-evb-act8846.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2015 Caesar Wang <wxt@rock-chips.com>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi b/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi
index a37220a9387c..4de089149c50 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368-evb.dtsi
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2015 Caesar Wang <wxt@rock-chips.com>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include <dt-bindings/input/input.h>
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
index 5e4d3a7015f5..6b9b1ac1994c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2016 Andreas F?rber
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
index d3f6c8e0d206..96147d93dd1d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2016 Matthias Brugger <mbrugger@suse.com>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
index 13a9e22f5d2d..fc1bf078a41f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-px5-evb.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-r88.dts b/arch/arm64/boot/dts/rockchip/rk3368-r88.dts
index b3510d56517a..7452bedf1a7e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-r88.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3368-r88.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2015 Heiko Stuebner <heiko@sntech.de>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
index aa4d07046a7b..389258a64551 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2015 Heiko Stuebner <heiko@sntech.de>
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This library is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This library is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include <dt-bindings/clock/rk3368-cru.h>
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
index 56533c344ef2..959ddc3c7df5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
index 4f28628aa091..6af809579067 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
index 0384e3121f18..384959738d95 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
@@ -1,45 +1,8 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Google Gru-Kevin Rev 6+ board device tree source
  *
  * Copyright 2016-2017 Google, Inc
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- *  Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
index 5772c52fbfd3..c586aeab6e72 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
@@ -1,45 +1,8 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Google Gru (and derivatives) board device tree source
  *
  * Copyright 2016-2017 Google, Inc
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- *  Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include <dt-bindings/input/input.h>
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
index d8a120f945c8..69cc9b05baa5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2016-2017 Fuzhou Rockchip Electronics Co., Ltd
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This library is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This library is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 / {
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
index 81617bcf2522..d6f1095abb04 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2016-2017 Fuzhou Rockchip Electronics Co., Ltd
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This library is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This library is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 / {
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts
index 9a7486058455..f5d91b27fe5e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 910628d18add..961b12fde3ee 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include <dt-bindings/pwm/pwm.h>
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
index b7bd88fb3ae3..80dee4887d69 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
index 0f873c897d0d..b133565cedd6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include "dt-bindings/pwm/pwm.h"
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index d340b58ab184..4049b37e6b96 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This library is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This library is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 #include <dt-bindings/clock/rk3399-cru.h>
-- 
2.11.0

^ permalink raw reply related

* [RFC PATCH 2/2] ASoC: select sysclk clock from mlck clock provider in wm8994 driver
From: Charles Keepax @ 2017-12-15 11:46 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171214173624.GM9788@sirena.org.uk>

On Thu, Dec 14, 2017 at 05:36:24PM +0000, Mark Brown wrote:
> On Thu, Dec 14, 2017 at 05:53:58PM +0100, Olivier Moysan wrote:
> > When defined in device tree, MCLK1 and MCLK2 are used
> > as sysclk for aif1 and aif2 interfaces respectively.
> 
> That's not a valid assumption as far as I remember?  The AIFs can use
> either MCLK depending on the system configuration I think.
> 

Indeed yes the code added here is literally just above the code
that selects that, it should be fairly simple to update the patch
to take this into account.

Thanks,
Charles

^ permalink raw reply

* [RFC PATCH 1/2] ASoC: add support of mclk clock providers in wm8894 driver
From: Charles Keepax @ 2017-12-15 11:51 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171214173025.GL9788@sirena.org.uk>

On Thu, Dec 14, 2017 at 05:30:25PM +0000, Mark Brown wrote:
> On Thu, Dec 14, 2017 at 05:53:57PM +0100, Olivier Moysan wrote:
> 
> > +	pdata->mclk1 = devm_clk_get(wm8994->dev, "MCLK1");
> > +	if (IS_ERR(pdata->mclk1))
> > +		pdata->mclk1 = NULL;
> 
> These should special case -EPROBE_DEFER so we defer properly if we need
> to (and ideally log an error in case there was a MCLK and we legit ran
> into an error).

We probably want the special case on there being no clock at all
which should silently proceed as this code does and then actual
errors and PROBE_DEFERs can log and fail.

Thanks,
Charles

^ permalink raw reply

* mail-list subscription issue
From: Richard Weinberger @ 2017-12-15 11:55 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <HE1PR04MB124114706E7256D3908D1514970B0@HE1PR04MB1241.eurprd04.prod.outlook.com>

+ dwmw2

On Fri, Dec 15, 2017 at 7:24 AM, Prabhakar Kushwaha
<prabhakar.kushwaha@nxp.com> wrote:
> Hello
>
> We are not able to subscribe to mailto:linux-arm-kernel at lists.infradead.org.
> We also tried on linux-mtd at lists.infradead.org.
>
> We even tried with personal mail id but no success.
> Seems specific to infradead.org.
>
> Any pointers?

More details would help.
Do you get a error message?

-- 
Thanks,
//richard

^ permalink raw reply

* [PATCH] ARM: dts: am437x-gp-evm: Add phandle for the backlight for the panel
From: Peter Ujfalusi @ 2017-12-15 12:09 UTC (permalink / raw)
  To: linux-arm-kernel

With the backlight phandle the driver can manage the backlight on/off in
sync with the panel enable/disable.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/am437x-gp-evm.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
index afb8eb0a0a16..c3b1a3fb5a2e 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -55,7 +55,7 @@
 		enable-active-high;
 	};
 
-	backlight {
+	lcd_bl: backlight {
 		compatible = "pwm-backlight";
 		pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
 		brightness-levels = <0 51 53 56 62 75 101 152 255>;
@@ -86,6 +86,8 @@
 		compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
 		label = "lcd";
 
+		backlight = <&lcd_bl>;
+
 		panel-timing {
 			clock-frequency = <33000000>;
 			hactive = <800>;
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related

* [PATCH] ARM: dts: am437x-sk-evm: Add phandle for the backlight for the panel
From: Peter Ujfalusi @ 2017-12-15 12:09 UTC (permalink / raw)
  To: linux-arm-kernel

With the backlight phandle the driver can manage the backlight on/off in
sync with the panel enable/disable.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 arch/arm/boot/dts/am437x-sk-evm.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
index 2c6bf0684f50..3fa3b226995d 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -35,7 +35,7 @@
 		clock-frequency = <32768>;
 	};
 
-	backlight {
+	lcd_bl: backlight {
 		compatible = "pwm-backlight";
 		pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
 		brightness-levels = <0 51 53 56 62 75 101 152 255>;
@@ -132,6 +132,8 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&lcd_pins>;
 
+		backlight = <&lcd_bl>;
+
 		enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
 
 		panel-timing {
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related

* [PATCH] ARM: dts: am43xx-epos-evm: Add phandle for the backlight for the panel
From: Peter Ujfalusi @ 2017-12-15 12:09 UTC (permalink / raw)
  To: linux-arm-kernel

With the backlight phandle the driver can manage the backlight on/off in
sync with the panel enable/disable.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 arch/arm/boot/dts/am43x-epos-evm.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index a04d79ec212a..fdb1e2bbab9c 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -48,6 +48,8 @@
 		compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
 		label = "lcd";
 
+		backlight = <&lcd_bl>;
+
 		panel-timing {
 			clock-frequency = <33000000>;
 			hactive = <800>;
@@ -107,7 +109,7 @@
 			0x03030069>;	/* LEFT */
 	};
 
-	backlight {
+	lcd_bl: backlight {
 		compatible = "pwm-backlight";
 		pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
 		brightness-levels = <0 51 53 56 62 75 101 152 255>;
-- 
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply related

* [PATCH 0/4 v5] Support bridge timings
From: Linus Walleij @ 2017-12-15 12:10 UTC (permalink / raw)
  To: linux-arm-kernel

This patch set is in response to Laurent's mail:
https://www.spinics.net/lists/dri-devel/msg155618.html

So in summary:
- The connector is apparently not the right abstraction to carry
  the detailed timings specification between DRI drivers and bridge
  drivers.

- Instead put detailed timing data into the bridge itself as an
  optional information pointer.

- Add fields to specify triggering edge on the clock, setup
  and hold time for the bridge.

- Augment the dumb VGA driver with this data, supporting a few
  ADV and TI variants.

- Augment the PL111 driver to use this data to figure out if it
  needs to clock out display data on the negative edge rather
  than the positive edge because the current clocking out on the
  positive edge obviously partly misses the setup->hold window,
  as can be observed in annoying green flicker.

Linus Walleij (4):
  drm/bridge: Add bindings for TI THS8134
  drm/bridge: Provide a way to embed timing info in bridges
  drm/bridge: Add timing support to dumb VGA DAC
  drm/pl111: Support handling bridge timings

 .../bridge/{ti,ths8135.txt => ti,ths813x.txt}      | 13 +++--
 drivers/gpu/drm/bridge/dumb-vga-dac.c              | 61 ++++++++++++++++++++--
 drivers/gpu/drm/pl111/Kconfig                      |  1 +
 drivers/gpu/drm/pl111/pl111_display.c              | 35 +++++++++++--
 drivers/gpu/drm/pl111/pl111_drv.c                  | 20 +++----
 include/drm/drm_bridge.h                           | 20 +++++++
 6 files changed, 130 insertions(+), 20 deletions(-)
 rename Documentation/devicetree/bindings/display/bridge/{ti,ths8135.txt => ti,ths813x.txt} (69%)

-- 
2.14.3

^ permalink raw reply

* [PATCH 1/4 v5] drm/bridge: Add bindings for TI THS8134
From: Linus Walleij @ 2017-12-15 12:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171215121047.3650-1-linus.walleij@linaro.org>

This adds device tree bindings for the Texas Instruments
THS8134, THS8134A and THS8134B VGA DACs by extending and
renaming the existing bindings for THS8135.

These DACs are used for the VGA outputs on the ARM reference
designs such as Integrator, Versatile and RealView.

Cc: devicetree at vger.kernel.org
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v2->v5:
- Dropped the "ti,ths813x" as it turns out we need precise info
  about the sub-variant anyways as they all very in timings.
- Refine the THS8134 variants, it turns out ths8134, ths8134a
  and ths8134b are three different variants of ths8134.
ChangeLog v1->v2:
- Introduce specific-to-general compatible string:
  compatible = "ti,ths8134a", "ti,ths813x";
  so drivers can handle the whole family the same way.
- Collected Rob's ACK.
---
 .../display/bridge/{ti,ths8135.txt => ti,ths813x.txt}       | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
 rename Documentation/devicetree/bindings/display/bridge/{ti,ths8135.txt => ti,ths813x.txt} (69%)

diff --git a/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt b/Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt
similarity index 69%
rename from Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt
rename to Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt
index 6ec1a880ac18..49f155467f00 100644
--- a/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt
+++ b/Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt
@@ -1,11 +1,16 @@
-THS8135 Video DAC
------------------
+THS8134 and THS8135 Video DAC
+-----------------------------
 
-This is the binding for Texas Instruments THS8135 Video DAC bridge.
+This is the binding for Texas Instruments THS8134, THS8134A, THS8134B and
+THS8135 Video DAC bridge.
 
 Required properties:
 
-- compatible: Must be "ti,ths8135"
+- compatible: Must be one of
+  "ti,ths8134"
+  "ti,ths8134", "ti,ths8134a"
+  "ti,ths8134", "ti,ths8134b"
+  "ti,ths8135"
 
 Required nodes:
 
-- 
2.14.3

^ permalink raw reply related

* [PATCH 2/4 v5] drm/bridge: Provide a way to embed timing info in bridges
From: Linus Walleij @ 2017-12-15 12:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171215121047.3650-1-linus.walleij@linaro.org>

After some discussion and failed patch sets trying to convey
the right timing information between the display engine and
a bridge using the connector, I try instead to use an optional
timing information container in the bridge itself, so that
display engines can retrieve it from any bridge and use it to
determine how to drive outputs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog ->v5:
- New patch
---
 include/drm/drm_bridge.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index 682d01ba920c..3bf34f7c90d4 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -30,6 +30,7 @@
 
 struct drm_bridge;
 struct drm_panel;
+struct drm_bridge_timings;
 
 /**
  * struct drm_bridge_funcs - drm_bridge control functions
@@ -222,6 +223,22 @@ struct drm_bridge_funcs {
 	void (*enable)(struct drm_bridge *bridge);
 };
 
+/**
+ * struct drm_bridge_timings - timing information for the bridge
+ * @sampling_edge: whether the bridge samples the digital input signal from the
+ * display engine on the positive or negative edge of the clock - false means
+ * negative edge, true means positive edge.
+ * @setup_time_ps: the time in picoseconds the input data lines must be stable
+ * before the clock edge
+ * @hold_time_ps: the time in picoseconds taken for the bridge to sample the
+ * input signal after the rising or falling edge
+ */
+struct drm_bridge_timings {
+	bool sampling_edge;
+	u32 setup_time_ps;
+	u32 hold_time_ps;
+};
+
 /**
  * struct drm_bridge - central DRM bridge control structure
  * @dev: DRM device this bridge belongs to
@@ -229,6 +246,8 @@ struct drm_bridge_funcs {
  * @next: the next bridge in the encoder chain
  * @of_node: device node pointer to the bridge
  * @list: to keep track of all added bridges
+ * @timings: the timing specification for the bridge, if any (may
+ * be NULL)
  * @funcs: control functions
  * @driver_private: pointer to the bridge driver's internal context
  */
@@ -240,6 +259,7 @@ struct drm_bridge {
 	struct device_node *of_node;
 #endif
 	struct list_head list;
+	const struct drm_bridge_timings *timings;
 
 	const struct drm_bridge_funcs *funcs;
 	void *driver_private;
-- 
2.14.3

^ permalink raw reply related

* [PATCH 3/4 v5] drm/bridge: Add timing support to dumb VGA DAC
From: Linus Walleij @ 2017-12-15 12:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171215121047.3650-1-linus.walleij@linaro.org>

This extends the dumb VGA DAC bridge to handle the THS8134A
and THS8134B VGA DACs in addition to those already handled.

We assign the proper timing data to the pointer inside the
bridge struct so display controllers that need to align their
timings to the bridge can pick it up and work from there.

Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v4->v5:
- Rewrite the support using the new concept of defining
  fine-granular sampling (setup+hold) timing definitions
  stored in the bridge timings struct.
ChangeLog v3->v4:
- Actually have the code syntactically correct and compiling :(
  (Kconfig mistake.)
  (...)
  AS      usr/initramfs_data.o
  AR      usr/built-in.o
  CC      drivers/gpu/drm/bridge/dumb-vga-dac.o
  AR      drivers/gpu/drm/bridge/built-in.o
  AR      drivers/gpu/drm/built-in.o
  AR      drivers/gpu/built-in.o
  AR      drivers/built-in.o
  (...)
ChangeLog v2->v3:
- Move const specifier.
- Cut one line of code assigning bus flags.
- Preserve the "ti,ths8135" compatible for elder device trees.
ChangeLog v1->v2:
- Alphabetize includes
- Use a u32 with the bus polarity flags and just encode the
  polarity using the DRM define directly.
- Rename vendor_data to vendor_info.
- Simplify assignment of the flag as it is just a simple
  u32 now.
- Probe all TI variants on the "ti,ths813x" wildcard for now,
  we only need to know that the device is in this family to
  set the clock edge flag right.
---
 drivers/gpu/drm/bridge/dumb-vga-dac.c | 61 +++++++++++++++++++++++++++++++++--
 1 file changed, 58 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/bridge/dumb-vga-dac.c b/drivers/gpu/drm/bridge/dumb-vga-dac.c
index de5e7dee7ad6..34788783a90f 100644
--- a/drivers/gpu/drm/bridge/dumb-vga-dac.c
+++ b/drivers/gpu/drm/bridge/dumb-vga-dac.c
@@ -11,6 +11,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/of_device.h>
 #include <linux/of_graph.h>
 #include <linux/regulator/consumer.h>
 
@@ -176,11 +177,13 @@ static struct i2c_adapter *dumb_vga_retrieve_ddc(struct device *dev)
 static int dumb_vga_probe(struct platform_device *pdev)
 {
 	struct dumb_vga *vga;
+	const struct drm_bridge_timings *timings;
 
 	vga = devm_kzalloc(&pdev->dev, sizeof(*vga), GFP_KERNEL);
 	if (!vga)
 		return -ENOMEM;
 	platform_set_drvdata(pdev, vga);
+	timings = of_device_get_match_data(&pdev->dev);
 
 	vga->vdd = devm_regulator_get_optional(&pdev->dev, "vdd");
 	if (IS_ERR(vga->vdd)) {
@@ -204,6 +207,7 @@ static int dumb_vga_probe(struct platform_device *pdev)
 
 	vga->bridge.funcs = &dumb_vga_bridge_funcs;
 	vga->bridge.of_node = pdev->dev.of_node;
+	vga->bridge.timings = timings;
 
 	drm_bridge_add(&vga->bridge);
 
@@ -222,10 +226,61 @@ static int dumb_vga_remove(struct platform_device *pdev)
 	return 0;
 }
 
+/*
+ * We assume the ADV7123 DAC is the "default" for historical reasons
+ * Information taken from the ADV7123 datasheet, revision D.
+ * NOTE: the ADV7123EP seems to have other timings and need a new timings
+ * set if used.
+ */
+static const struct drm_bridge_timings default_dac_timings = {
+	/* Timing specifications, datasheet page 7 */
+	.sampling_edge = true,
+	.setup_time_ps = 500,
+	.hold_time_ps = 1500,
+};
+
+/*
+ * Information taken from the THS8134, THS8134A, THS8134B datasheet named
+ * "SLVS205D", dated May 1990, revised March 2000.
+ */
+static const struct drm_bridge_timings ti_ths8134_dac_timings = {
+	/* From timing diagram, datasheet page 9 */
+	.sampling_edge = true,
+	/* From datasheet, page 12 */
+	.setup_time_ps = 3000,
+	/* I guess this means latched input */
+	.hold_time_ps = 0,
+};
+
+/*
+ * Information taken from the THS8135 datasheet named "SLAS343B", dated
+ * May 2001, revised April 2013.
+ */
+static const struct drm_bridge_timings ti_ths8135_dac_timings = {
+	/* From timing diagram, datasheet page 14 */
+	.sampling_edge = true,
+	/* From datasheet, page 16 */
+	.setup_time_ps = 2000,
+	.hold_time_ps = 500,
+};
+
 static const struct of_device_id dumb_vga_match[] = {
-	{ .compatible = "dumb-vga-dac" },
-	{ .compatible = "adi,adv7123" },
-	{ .compatible = "ti,ths8135" },
+	{
+		.compatible = "dumb-vga-dac",
+		.data = &default_dac_timings,
+	},
+	{
+		.compatible = "adi,adv7123",
+		.data = &default_dac_timings,
+	},
+	{
+		.compatible = "ti,ths8135",
+		.data = &ti_ths8135_dac_timings,
+	},
+	{
+		.compatible = "ti,ths8134",
+		.data = &ti_ths8134_dac_timings,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, dumb_vga_match);
-- 
2.14.3

^ permalink raw reply related

* [PATCH 4/4 v5] drm/pl111: Support handling bridge timings
From: Linus Walleij @ 2017-12-15 12:10 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20171215121047.3650-1-linus.walleij@linaro.org>

If the bridge has a too strict setup time for the incoming
signals, we may not be fast enough and then we need to
compensate by outputting the signal on the inverse clock
edge so it is for sure stable when the bridge samples it.

Since bridges in difference to panels does not expose their
connectors, make the connector optional in the display
setup code.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v4->v5:
- Use the new bridge timings setup method.
---
 drivers/gpu/drm/pl111/Kconfig         |  1 +
 drivers/gpu/drm/pl111/pl111_display.c | 35 +++++++++++++++++++++++++++++++----
 drivers/gpu/drm/pl111/pl111_drv.c     | 20 +++++++++++---------
 3 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/pl111/Kconfig b/drivers/gpu/drm/pl111/Kconfig
index e5e2abd66491..82cb3e60ddc8 100644
--- a/drivers/gpu/drm/pl111/Kconfig
+++ b/drivers/gpu/drm/pl111/Kconfig
@@ -8,6 +8,7 @@ config DRM_PL111
 	select DRM_GEM_CMA_HELPER
 	select DRM_BRIDGE
 	select DRM_PANEL_BRIDGE
+	select DRM_DUMB_VGA_DAC
 	select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE
 	help
 	  Choose this option for DRM support for the PL111 CLCD controller.
diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c
index 06c4bf756b69..7fe4040aea46 100644
--- a/drivers/gpu/drm/pl111/pl111_display.c
+++ b/drivers/gpu/drm/pl111/pl111_display.c
@@ -94,6 +94,7 @@ static void pl111_display_enable(struct drm_simple_display_pipe *pipe,
 	const struct drm_display_mode *mode = &cstate->mode;
 	struct drm_framebuffer *fb = plane->state->fb;
 	struct drm_connector *connector = priv->connector;
+	struct drm_bridge *bridge = priv->bridge;
 	u32 cntl;
 	u32 ppl, hsw, hfp, hbp;
 	u32 lpp, vsw, vfp, vbp;
@@ -143,11 +144,37 @@ static void pl111_display_enable(struct drm_simple_display_pipe *pipe,
 	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
 		tim2 |= TIM2_IVS;
 
-	if (connector->display_info.bus_flags & DRM_BUS_FLAG_DE_LOW)
-		tim2 |= TIM2_IOE;
+	if (connector) {
+		if (connector->display_info.bus_flags & DRM_BUS_FLAG_DE_LOW)
+			tim2 |= TIM2_IOE;
 
-	if (connector->display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE)
-		tim2 |= TIM2_IPC;
+		if (connector->display_info.bus_flags &
+		    DRM_BUS_FLAG_PIXDATA_NEGEDGE)
+			tim2 |= TIM2_IPC;
+	}
+
+	if (bridge) {
+		const struct drm_bridge_timings *btimings = bridge->timings;
+
+		/*
+		 * Here is when things get really fun. Sometimes the bridge
+		 * timings are such that the signal out from PL11x is not
+		 * stable before the receiving bridge (such as a dumb VGA DAC
+		 * or similar) samples it. If that happens, we compensate by
+		 * the only method we have: output the data on the opposite
+		 * edge of the clock so it is for sure stable when it gets
+		 * sampled.
+		 *
+		 * The PL111 manual does not contain proper timining diagrams
+		 * or data for these details, but we know from experiments
+		 * that the setup time is more than 3000 picoseconds (3 ns).
+		 * If we have a bridge that requires the signal to be stable
+		 * earlier than 3000 ps before the clock pulse, we have to
+		 * output the data on the opposite edge to avoid flicker.
+		 */
+		if (btimings && btimings->setup_time_ps >= 3000)
+			tim2 ^= TIM2_IPC;
+	}
 
 	tim2 |= cpl << 16;
 	writel(tim2, priv->regs + CLCD_TIM2);
diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
index 201d57d5cb54..101a9c7db6ff 100644
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@ -107,11 +107,17 @@ static int pl111_modeset_init(struct drm_device *dev)
 			ret = PTR_ERR(bridge);
 			goto out_config;
 		}
-		/*
-		 * TODO: when we are using a different bridge than a panel
-		 * (such as a dumb VGA connector) we need to devise a different
-		 * method to get the connector out of the bridge.
-		 */
+	} else if (bridge) {
+		dev_info(dev->dev, "Using non-panel bridge\n");
+	} else {
+		dev_err(dev->dev, "No bridge, exiting\n");
+		return -ENODEV;
+	}
+
+	priv->bridge = bridge;
+	if (panel) {
+		priv->panel = panel;
+		priv->connector = panel->connector;
 	}
 
 	ret = pl111_display_init(dev);
@@ -125,10 +131,6 @@ static int pl111_modeset_init(struct drm_device *dev)
 	if (ret)
 		return ret;
 
-	priv->bridge = bridge;
-	priv->panel = panel;
-	priv->connector = panel->connector;
-
 	ret = drm_vblank_init(dev, 1);
 	if (ret != 0) {
 		dev_err(dev->dev, "Failed to init vblank\n");
-- 
2.14.3

^ permalink raw reply related

* [PATCH] arm: dts: Remove leading 0x and 0s from bindings notation
From: Mathieu Malaterre @ 2017-12-15 12:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CA+7wUsz9FO5ytY3a6RONu+kGm1NKjK8z378UzxjUWmk2tBhi7A@mail.gmail.com>

On Fri, Dec 15, 2017 at 12:19 PM, Mathieu Malaterre <malat@debian.org> wrote:
> On Fri, Dec 15, 2017 at 9:59 AM, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>> On Thu, Dec 14, 2017 at 5:53 PM, Mathieu Malaterre <malat@debian.org> wrote:
>>> Improve the DTS files by removing all the leading "0x" and zeros to fix the
>>> following dtc warnings:
>>>
>>> Warning (unit_address_format): Node /XXX unit name should not have leading "0x"
>>>
>>> and
>>>
>>> Warning (unit_address_format): Node /XXX unit name should not have leading 0s
>>>
>>> Converted using the following command:
>>>
>>> find . -type f \( -iname *.dts -o -iname *.dtsi \) -exec sed -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" -e "s/@0+([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" {} +
>>>
>>> For simplicity, two sed expressions were used to solve each warnings separately.
>>>
>>> To make the regex expression more robust a few other issues were resolved,
>>> namely setting unit-address to lower case, and adding a whitespace before the
>>> the opening curly brace:
>>>
>>> https://elinux.org/Device_Tree_Linux#Linux_conventions
>>>
>>> This is a follow up to commit 4c9847b7375a ("dt-bindings: Remove leading 0x from bindings notation")
>>>
>>> Reported-by: David Daney <ddaney@caviumnetworks.com>
>>> Suggested-by: Rob Herring <robh@kernel.org>
>>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>>> ---
>>>  arch/arm/boot/dts/am3517.dtsi                 |  4 +--
>>>  arch/arm/boot/dts/arm-realview-eb.dtsi        | 18 +++++++-------
>>>  arch/arm/boot/dts/arm-realview-pb1176.dts     | 18 +++++++-------
>>>  arch/arm/boot/dts/arm-realview-pb11mp.dts     | 18 +++++++-------
>>>  arch/arm/boot/dts/arm-realview-pbx.dtsi       | 18 +++++++-------
>>>  arch/arm/boot/dts/artpec6.dtsi                |  2 +-
>>>  arch/arm/boot/dts/at91sam9261.dtsi            |  2 +-
>>>  arch/arm/boot/dts/at91sam9261ek.dts           |  2 +-
>>>  arch/arm/boot/dts/at91sam9263.dtsi            |  2 +-
>>>  arch/arm/boot/dts/at91sam9263ek.dts           |  2 +-
>>>  arch/arm/boot/dts/at91sam9g25ek.dts           |  2 +-
>>>  arch/arm/boot/dts/at91sam9g45.dtsi            |  2 +-
>>>  arch/arm/boot/dts/at91sam9m10g45ek.dts        |  2 +-
>>>  arch/arm/boot/dts/atlas7.dtsi                 | 12 ++++-----
>>>  arch/arm/boot/dts/bcm11351.dtsi               |  2 +-
>>>  arch/arm/boot/dts/bcm21664.dtsi               |  2 +-
>>>  arch/arm/boot/dts/bcm283x.dtsi                |  2 +-
>>>  arch/arm/boot/dts/da850-lcdk.dts              |  4 +--
>>>  arch/arm/boot/dts/dm8148-evm.dts              |  8 +++---
>>>  arch/arm/boot/dts/dm8168-evm.dts              |  8 +++---
>>>  arch/arm/boot/dts/dra62x-j5eco-evm.dts        |  8 +++---
>>>  arch/arm/boot/dts/exynos5420.dtsi             | 36 +++++++++++++--------------
>>>  arch/arm/boot/dts/exynos5422-odroid-core.dtsi |  2 +-
>>>  arch/arm/boot/dts/imx7d.dtsi                  |  2 +-
>>>  arch/arm/boot/dts/keystone-k2e-netcp.dtsi     |  2 +-
>>>  arch/arm/boot/dts/keystone-k2hk-netcp.dtsi    |  2 +-
>>>  arch/arm/boot/dts/keystone-k2l-netcp.dtsi     |  2 +-
>>>  arch/arm/boot/dts/omap3-cm-t3x.dtsi           |  8 +++---
>>>  arch/arm/boot/dts/omap3-evm-37xx.dts          |  8 +++---
>>>  arch/arm/boot/dts/omap3-lilly-a83x.dtsi       |  8 +++---
>>>  arch/arm/boot/dts/s3c2416.dtsi                |  2 +-
>>
>> For Exynos and S3C:
>> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> As discussed with Krzysztof, I've split the ARM patch into subarch.
> Please drop this one.

Hum...looks like my internet provider just blacklisted me for too many
recipient in the mail. I'll do my best to resolve this, and send the
rest of the  series.

-M

^ permalink raw reply

* [PATCH] arm64: rockchip: enable Rockchip IO domain support
From: Klaus Goger @ 2017-12-15 12:20 UTC (permalink / raw)
  To: linux-arm-kernel

Make sure the IO domain support is active. This requires to enable
Adaptive Voltage Scaling class support too.

Without Rockchip IO domain support the internal level shifter on the RK3399
will be misconfigured if used in the other voltage domain then the default.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>

---

 arch/arm64/Kconfig.platforms | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 2401373565ff..7c0b0ab12f18 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -150,6 +150,8 @@ config ARCH_ROCKCHIP
 	select GPIOLIB
 	select PINCTRL
 	select PINCTRL_ROCKCHIP
+	select POWER_AVS
+	select ROCKCHIP_IODOMAIN
 	select ROCKCHIP_TIMER
 	help
 	  This enables support for the ARMv8 based Rockchip chipsets,
-- 
2.11.0

^ permalink raw reply related


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