Skip to contentSkip to conversation

ARM: dts: tpc: Device tree description of the TPC board

PATCH Superseded Lukasz Majewski 3 participants 7 messages Mar 2, 2018 – Mar 3, 2018

Subsystems (3)

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: tpc: Device tree description of the TPC board

This commit adds device tree description of K+P's TPC board.

---
 arch/arm/boot/dts/Makefile         |   1 +
 arch/arm/boot/dts/imx6q-kp-tpc.dts |  84 +++++++
 arch/arm/boot/dts/imx6q-kp.dtsi    | 468 +++++++++++++++++++++++++++++++++++++
 3 files changed, 553 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx6q-kp-tpc.dts
 create mode 100644 arch/arm/boot/dts/imx6q-kp.dtsi
arch/arm/boot/dts/Makefile +1 -0
index ade7a38543dc..c148c4cf28f2 100644
@@ -459,6 +459,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
 	imx6q-icore-ofcap10.dtb \
 	imx6q-icore-ofcap12.dtb \
 	imx6q-icore-rqs.dtb \
+	imx6q-kp-tpc.dtb \
 	imx6q-marsboard.dtb \
 	imx6q-mccmon6.dtb \
 	imx6q-nitrogen6x.dtb \
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +84 -0

84 lines not on this page · raw message

arch/arm/boot/dts/imx6q-kp.dtsi new file +468 -0

468 lines not on this page · raw message

Signature · 1 line
2.11.0
maintainer
#1 lore raw

Hi Lukasz,

Quoted 1 line · Lukasz Majewski

This commit adds device tree description of K+P's TPC board.

Can we get a hint what this board is? I assume this one:

Technologic Systems' Full i.MX6 Portfolio Including SBC, COM, and Touch Panel PCs

Anyway, future developers are thankful if they have the information around when they have to work on that file or have to decide if it is to be removed.

Quoted 27 lines
---
 arch/arm/boot/dts/Makefile         |   1 +
 arch/arm/boot/dts/imx6q-kp-tpc.dts |  84 +++++++
 arch/arm/boot/dts/imx6q-kp.dtsi    | 468 +++++++++++++++++++++++++++++++++++++
 3 files changed, 553 insertions(+)
 create mode 100644 arch/arm/boot/dts/imx6q-kp-tpc.dts
 create mode 100644 arch/arm/boot/dts/imx6q-kp.dtsi
arch/arm/boot/dts/Makefile +1 -0
index ade7a38543dc..c148c4cf28f2 100644
@@ -459,6 +459,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
 	imx6q-icore-ofcap10.dtb \
 	imx6q-icore-ofcap12.dtb \
 	imx6q-icore-rqs.dtb \
+	imx6q-kp-tpc.dtb \
 	imx6q-marsboard.dtb \
 	imx6q-mccmon6.dtb \
 	imx6q-nitrogen6x.dtb \
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +0 -0
new file mode 100644
index 000000000000..955462e778c9

arch/arm/boot/dts/imx6q-kp-tpc.dts line 44

Quoted 7 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +7 -0
+/dts-v1/;
+
+#include "imx6q-kp.dtsi"
+
+/ {
+	model = "Freescale i.MX6 Quad K+P TPC Board";
+	compatible = "fsl,imx6q-tpc", "fsl,imx6q";

If it is what I think it is the vendor is not fsl.

Quoted 22 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +22 -0
+};
+
+&lcd_display {
+	display-timings {
+		800x480x60 {
+			clock-frequency = <34209000>;
+			hactive = <800>;
+			vactive = <480>;
+			hback-porch = <85>;
+			hfront-porch = <15>;
+			vback-porch = <34>;
+			vfront-porch = <10>;
+			hsync-len = <28>;
+			vsync-len = <1>;
+			hsync-active = <1>;
+			vsync-active = <1>;
+			de-active = <1>;
+		};
+	};
+};
+
+&ipu1_di0_disp0 {

arch/arm/boot/dts/imx6q-kp-tpc.dts line 76

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +10 -0
+	remote-endpoint = <&lcd_display_in>;
+};
+
+&can1 {
+	status = "disabled";
+};
+
+&can2 {
+	status = "disabled";
+};

These are not enabled in your base dtsi, so no need to disabled it here.

arch/arm/boot/dts/imx6q-kp-tpc.dts line 80

Quoted 4 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +4 -0
+
+&uart1 {
+	status = "okay";
+};

This is already enabled in your base dtsi.

arch/arm/boot/dts/imx6q-kp-tpc.dts line 84

Quoted 4 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +4 -0
+
+&uart2 {
+	status = "disabled";
+};

This is still disabled, no need to enable.

arch/arm/boot/dts/imx6q-kp.dtsi line 97

Quoted 12 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +7 -0
new file mode 100644
index 000000000000..47a10fb1d46b
+
+	memory: memory {
+		reg = <0x10000000 0x40000000>;
+	};
+
+	pwm-buzzer {
+		compatible = "pwm-backlight";

What is it? A backlight or a buzzer?

Quoted 8 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +8 -0
+		pwms = <&pwm2 0 500000>; //2kHz
+		brightness-levels = <
+			0   7  8  9
+			10 11 12 13 14 15 16 17 18 19
+			20 21 22 23 24 25 26 27 28 29
+			30 31 32 33 34 35 36 37 38 39
+			40 41 42 43 44 45 46 47 48 49
+			50 51 52 53 54 55 56 57 58 59

arch/arm/boot/dts/imx6q-kp.dtsi line 115

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +10 -0
+			60 61 62 63 64 65 66 67 68 69
+			70 71 72 73 74 75 76 77 78 79
+			80 81 82 83 84 85 86 87 88 89
+			90 91 92 93 94 95 96 97 98 99
+			100
+			>;
+		default-brightness-level = <0>;
+	};
+
+	regulators {

AFAIK regulators shall no longer be in a separate subnode.

arch/arm/boot/dts/imx6q-kp.dtsi line 122

Quoted 7 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +7 -0
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg_usb_h1_vbus: regulator at 1 {
+			compatible = "regulator-fixed";
+			reg = <1>;

drop the reg property and also the @1 in the name.

arch/arm/boot/dts/imx6q-kp.dtsi line 131

Quoted 9 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +9 -0
+			regulator-name = "usb_h1_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+		};
+
+		reg_audio: regulator at 2 {
+			compatible = "regulator-fixed";
+			reg = <2>;

ditto

arch/arm/boot/dts/imx6q-kp.dtsi line 140

Quoted 9 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +9 -0
+			regulator-name = "sgtl5000-supply";
+			gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
+			enable-active-high;
+			regulator-always-on;
+		};
+
+		reg_3p3v: regulator at 3 {
+			compatible = "regulator-fixed";
+			reg = <4>;

ditto.

(You have to change the node names of course to make them unique again)

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#2 lore raw

Hi Sascha,

Quoted 9 lines

Hi Lukasz,

Quoted 1 line · Lukasz Majewski

This commit adds device tree description of K+P's TPC board.

Can we get a hint what this board is? I assume this one:

Technologic Systems' Full i.MX6 Portfolio Including SBC, COM, and Touch Panel PCs

I just took other imx6q boards as an example - e.g.

420127e5a5b53ff2cb5effaa781aed93709b09bb

Generally, descriptions of DTSes are rather short and simple.

Quoted 4 lines

Anyway, future developers are thankful if they have the information around when they have to work on that file or have to decide if it is to be removed.

IMHO, there is plenty of information around (iMX6 Quad SoC, with components described in dts).

Quoted 29 lines
Quoted 29 lines
---
 arch/arm/boot/dts/Makefile         |   1 +
 arch/arm/boot/dts/imx6q-kp-tpc.dts |  84 +++++++
 arch/arm/boot/dts/imx6q-kp.dtsi    | 468
+++++++++++++++++++++++++++++++++++++ 3 files changed, 553
insertions(+) create mode 100644 arch/arm/boot/dts/imx6q-kp-tpc.dts
 create mode 100644 arch/arm/boot/dts/imx6q-kp.dtsi
arch/arm/boot/dts/Makefile +1 -0
index ade7a38543dc..c148c4cf28f2 100644
@@ -459,6 +459,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
 	imx6q-icore-ofcap10.dtb \
 	imx6q-icore-ofcap12.dtb \
 	imx6q-icore-rqs.dtb \
+	imx6q-kp-tpc.dtb \
 	imx6q-marsboard.dtb \
 	imx6q-mccmon6.dtb \
 	imx6q-nitrogen6x.dtb \
(quoted diff) +0 -0

b/arch/arm/boot/dts/imx6q-kp-tpc.dts new file mode 100644 index 000000000000..955462e778c9

arch/arm/boot/dts/imx6q-kp-tpc.dts new file +1 -0
+/dts-v1/;
Quoted 8 lines

arch/arm/boot/dts/imx6q-kp-tpc.dts line 44

Quoted 6 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +6 -0
+
+#include "imx6q-kp.dtsi"
+
+/ {
+	model = "Freescale i.MX6 Quad K+P TPC Board";
+	compatible = "fsl,imx6q-tpc", "fsl,imx6q";  

If it is what I think it is the vendor is not fsl.

Yes. It is not from fsl.

Quoted 28 lines
Quoted 28 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +27 -0
+};
+
+&lcd_display {
+	display-timings {
+		800x480x60 {
+			clock-frequency = <34209000>;
+			hactive = <800>;
+			vactive = <480>;
+			hback-porch = <85>;
+			hfront-porch = <15>;
+			vback-porch = <34>;
+			vfront-porch = <10>;
+			hsync-len = <28>;
+			vsync-len = <1>;
+			hsync-active = <1>;
+			vsync-active = <1>;
+			de-active = <1>;
+		};
+	};
+};
+
+&ipu1_di0_disp0 {
+	remote-endpoint = <&lcd_display_in>;
+};
+
+&can1 {
+	status = "disabled";
Quoted 8 lines

arch/arm/boot/dts/imx6q-kp-tpc.dts line 76

Quoted 5 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +5 -0
+};
+
+&can2 {
+	status = "disabled";
+};  

These are not enabled in your base dtsi, so no need to disabled it here.

But they can be enabled if needed.

Quoted 8 lines

arch/arm/boot/dts/imx6q-kp-tpc.dts line 80

Quoted 5 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +4 -0
+
+&uart1 {
+	status = "okay";
+};  

This is already enabled in your base dtsi.

Quoted 6 lines

arch/arm/boot/dts/imx6q-kp-tpc.dts line 84

Quoted 4 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +4 -0
+
+&uart2 {
+	status = "disabled";
+};  

This is still disabled, no need to enable.

The goal here is to group those buses in one "logical" item - to allow easy enabling if needed.

Quoted 15 lines

arch/arm/boot/dts/imx6q-kp.dtsi line 97

Quoted 13 lines
(quoted diff) +0 -0

b/arch/arm/boot/dts/imx6q-kp.dtsi new file mode 100644 index 000000000000..47a10fb1d46b

arch/arm/boot/dts/imx6q-kp.dtsi new file +7 -0
+
+	memory: memory {
+		reg = <0x10000000 0x40000000>;
+	};
+
+	pwm-buzzer {
+		compatible = "pwm-backlight";  

What is it? A backlight or a buzzer?

It is a buzzer, which is controlled by PWM.

Quoted 32 lines
Quoted 9 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +8 -0
+		pwms = <&pwm2 0 500000>; //2kHz
+		brightness-levels = <
+			0   7  8  9
+			10 11 12 13 14 15 16 17 18 19
+			20 21 22 23 24 25 26 27 28 29
+			30 31 32 33 34 35 36 37 38 39
+			40 41 42 43 44 45 46 47 48 49
+			50 51 52 53 54 55 56 57 58 59

arch/arm/boot/dts/imx6q-kp.dtsi line 115

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +10 -0
+			60 61 62 63 64 65 66 67 68 69
+			70 71 72 73 74 75 76 77 78 79
+			80 81 82 83 84 85 86 87 88 89
+			90 91 92 93 94 95 96 97 98 99
+			100
+			>;
+		default-brightness-level = <0>;
+	};
+
+	regulators {  

AFAIK regulators shall no longer be in a separate subnode.

arch/arm/boot/dts/imx6q-kp.dtsi line 122

Quoted 7 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +7 -0
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg_usb_h1_vbus: regulator at 1 {
+			compatible = "regulator-fixed";
+			reg = <1>;  

drop the reg property and also the @1 in the name.

Quoted 11 lines

arch/arm/boot/dts/imx6q-kp.dtsi line 131

Quoted 9 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +9 -0
+			regulator-name = "usb_h1_vbus";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+		};
+
+		reg_audio: regulator at 2 {
+			compatible = "regulator-fixed";
+			reg = <2>;  

ditto

Ok.

Quoted 13 lines

arch/arm/boot/dts/imx6q-kp.dtsi line 140

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +9 -0
+			regulator-name = "sgtl5000-supply";
+			gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
+			enable-active-high;
+			regulator-always-on;
+		};
+
+		reg_3p3v: regulator at 3 {
+			compatible = "regulator-fixed";
+			reg = <4>;  

ditto.

Quoted 2 lines

(You have to change the node names of course to make them unique again)

Yes. correct.

Thanks for your review.

Quoted 5 lines

Sascha

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180302/1aca93dd/attachment.sig>

maintainer
#3 lore raw
Quoted 19 lines · Lukasz Majewski

Hi Sascha,

Quoted 9 lines

Hi Lukasz,

Quoted 1 line · Lukasz Majewski

This commit adds device tree description of K+P's TPC board.

Can we get a hint what this board is? I assume this one:

Technologic Systems' Full i.MX6 Portfolio Including SBC, COM, and Touch Panel PCs

I just took other imx6q boards as an example - e.g.

420127e5a5b53ff2cb5effaa781aed93709b09bb

Generally, descriptions of DTSes are rather short and simple.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

Anyway, future developers are thankful if they have the information around when they have to work on that file or have to decide if it is to be removed.

IMHO, there is plenty of information around (iMX6 Quad SoC, with components described in dts).

There may be future changes necessary which may be done by people who do not know which hardware this. For them it will be convenient to be able to search for the hardware and maybe even find a schematics. Anyway, it will just help to have that information around.

Quoted 11 lines
Quoted 10 lines

arch/arm/boot/dts/imx6q-kp-tpc.dts line 76

Quoted 7 lines

+&can1 {

arch/arm/boot/dts/imx6q-kp-tpc.dts new file +6 -0
+	status = "disabled";
+};
+
+&can2 {
+	status = "disabled";
+};  

These are not enabled in your base dtsi, so no need to disabled it here.

Quoted 1 line

But they can be enabled if needed.

Yes, they can, but that still doesn't make these node references necessary. If I read this it seems to me that you explicitly want to disable these nodes. A reader can't know you add them for convenience here.

Quoted 15 lines
Quoted 6 lines
Quoted 6 lines
(quoted diff) +0 -0

b/arch/arm/boot/dts/imx6q-kp.dtsi new file mode 100644 index 000000000000..47a10fb1d46b

arch/arm/boot/dts/imx6q-kp.dtsi new file +1 -0
+
Quoted 8 lines

arch/arm/boot/dts/imx6q-kp.dtsi line 97

Quoted 6 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +6 -0
+	memory: memory {
+		reg = <0x10000000 0x40000000>;
+	};
+
+	pwm-buzzer {
+		compatible = "pwm-backlight";  

What is it? A backlight or a buzzer?

Quoted 1 line

It is a buzzer, which is controlled by PWM.

Then you should bind the pwm-beeper driver to it, not a backlight.

Regards,
Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
reviewer
#4 lore raw
In reply to Lukasz Majewski

Hi Lukasz,

In addition to Sascha's comments:

Quoted 33 lines · Lukasz Majewski
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +27 -0
new file mode 100644
index 000000000000..955462e778c9
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2018
+ * Lukasz Majewski, DENX Software Engineering, lukma at denx.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 licensed under the terms of the GNU General Public
+ *     License version 2.  This program is licensed "as is" without
+ *     any warranty of any kind, whether express or implied.
+ *
+ * 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.
+ *

arch/arm/boot/dts/imx6q-kp-tpc.dts line 37

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +10 -0
+ *     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.
+ */
+

Please consider using SPDX tag instead.

arch/arm/boot/dts/imx6q-kp-tpc.dts line 44

Quoted 7 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +7 -0
+/dts-v1/;
+
+#include "imx6q-kp.dtsi"
+
+/ {
+       model = "Freescale i.MX6 Quad K+P TPC Board";
+       compatible = "fsl,imx6q-tpc", "fsl,imx6q";

Use the board manufacturer symbol instead.

If needed, add an entry for the vendor at Documentation/devicetree/bindings/vendor-prefixes.txt

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +10 -0
+};
+
+&lcd_display {
+       display-timings {
+               800x480x60 {
+                       clock-frequency = <34209000>;
+                       hactive = <800>;
+                       vactive = <480>;
+                       hback-porch = <85>;
+                       hfront-porch = <15>;

arch/arm/boot/dts/imx6q-kp-tpc.dts line 64

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +10 -0
+                       vback-porch = <34>;
+                       vfront-porch = <10>;
+                       hsync-len = <28>;
+                       vsync-len = <1>;
+                       hsync-active = <1>;
+                       vsync-active = <1>;
+                       de-active = <1>;
+               };
+       };
+};

We prefer to use a compatible panel entry instead of keeping the panel timings inside the dts.

Quoted 52 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +20 -0
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&lcd_display_in>;
+};
+
+&can1 {
+       status = "disabled";
+};
+
+&can2 {
+       status = "disabled";
+};
+
+&uart1 {
+       status = "okay";
+};
+
+&uart2 {
+       status = "disabled";
+};
arch/arm/boot/dts/imx6q-kp.dtsi new file +26 -0
new file mode 100644
index 000000000000..47a10fb1d46b
@@ -0,0 +1,468 @@
+/*
+ * Copyright 2018
+ * Lukasz Majewski, DENX Software Engineering, lukma at denx.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 licensed under the terms of the GNU General Public
+ *     License version 2.  This program is licensed "as is" without
+ *     any warranty of any kind, whether express or implied.
+ *
+ * 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.

arch/arm/boot/dts/imx6q-kp.dtsi line 36

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +10 -0
+ *
+ *     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.
+ */

SPDX, please.

arch/arm/boot/dts/imx6q-kp.dtsi line 79

Quoted 6 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +6 -0
+       leds {
+               compatible = "gpio-leds";
+
+               green {
+                       label = "led1";
+                       gpios = <&gpio3 16 0>;

gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;

arch/arm/boot/dts/imx6q-kp.dtsi line 86

Quoted 7 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +7 -0
+                       linux,default-trigger = "gpio";
+                       default-state = "off";
+               };
+
+               red {
+                       label = "led0";
+                       gpios = <&gpio3 23 0>;

GPIO_ACTIVE_HIGH

arch/arm/boot/dts/imx6q-kp.dtsi line 94

Quoted 8 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +8 -0
+                       linux,default-trigger = "gpio";
+                       default-state = "off";
+               };
+       };
+
+       memory: memory {
+               reg = <0x10000000 0x40000000>;
+       };

memory at 10000000 otherwise warnings are seen when building with W=1.

Make sure that building the dtb with W=1 introduces no warnings.

arch/arm/boot/dts/imx6q-kp.dtsi line 211

Quoted 13 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +13 -0
+&i2c1 {
+       clock-frequency = <400000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       goodix_ts at 5d {
+               compatible = "goodix,gt911";
+               reg = <0x5d>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_ts>;
+

No need for these blank lines.

arch/arm/boot/dts/imx6q-kp.dtsi line 213

Quoted 2 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +2 -0
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 2>;

Please use an IRQ flag.

arch/arm/boot/dts/imx6q-kp.dtsi line 214

Quoted 1 line
arch/arm/boot/dts/imx6q-kp.dtsi new file +1 -0
+               irq-gpios = <&gpio1 9 0>;

GPIO_ACTIVE_HIGH

arch/arm/boot/dts/imx6q-kp.dtsi line 215

Quoted 1 line
arch/arm/boot/dts/imx6q-kp.dtsi new file +1 -0
+               reset-gpios = <&gpio5 2 0>;

GPIO_ACTIVE_HIGH.

Quoted 4 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +4 -0
+&i2c2 {
+       clock-frequency = <400000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;

arch/arm/boot/dts/imx6q-kp.dtsi line 237

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +10 -0
+       status = "okay";
+
+       codec: sgtl5000 at a {
+               compatible = "fsl,sgtl5000";
+               #sound-dai-cells = <0>;
+               reg = <0x0a>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_codec>;
+

No need for these blank lines.

arch/arm/boot/dts/imx6q-kp.dtsi line 441

Quoted 8 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +7 -0
+               clocks = <&clks IMX6QDL_CLK_CKO>;
+               VDDA-supply = <&reg_3p3v>;
+               VDDIO-supply = <&reg_3p3v>;
 
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       fsl,uart-has-rtscts;

fsl,uart-has-rtscts has been deprecated. Please use uart-has-rtscts instead.

#5 lore raw

Hi Fabio,

Quoted 3 lines

Hi Lukasz,

In addition to Sascha's comments:

Thanks for your input - please see my reply below.

Quoted 50 lines · Lukasz Majewski
Quoted 48 lines
(quoted diff) +0 -0

b/arch/arm/boot/dts/imx6q-kp-tpc.dts new file mode 100644 index 000000000000..955462e778c9

arch/arm/boot/dts/imx6q-kp-tpc.dts new file +5 -0
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2018
+ * Lukasz Majewski, DENX Software Engineering, lukma at denx.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 licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ *
+ * 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,
Quoted 8 lines
Quoted 6 lines

+ * 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.
+ */
+

Please consider using SPDX tag instead.

Ok.

Quoted 11 lines

arch/arm/boot/dts/imx6q-kp-tpc.dts line 44

Quoted 8 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +7 -0
+/dts-v1/;
+
+#include "imx6q-kp.dtsi"
+
+/ {
+       model = "Freescale i.MX6 Quad K+P TPC Board";
+       compatible = "fsl,imx6q-tpc", "fsl,imx6q";  

Use the board manufacturer symbol instead.

Quoted 2 lines

If needed, add an entry for the vendor at Documentation/devicetree/bindings/vendor-prefixes.txt

I see.

Quoted 16 lines
Quoted 16 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +15 -0
+};
+
+&lcd_display {
+       display-timings {
+               800x480x60 {
+                       clock-frequency = <34209000>;
+                       hactive = <800>;
+                       vactive = <480>;
+                       hback-porch = <85>;
+                       hfront-porch = <15>;
+                       vback-porch = <34>;
+                       vfront-porch = <10>;
+                       hsync-len = <28>;
+                       vsync-len = <1>;
+                       hsync-active = <1>;
Quoted 8 lines

arch/arm/boot/dts/imx6q-kp-tpc.dts line 64

Quoted 5 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +5 -0
+                       vsync-active = <1>;
+                       de-active = <1>;
+               };
+       };
+};  

We prefer to use a compatible panel entry instead of keeping the panel timings inside the dts.

Previously (for other imx6q board) I've added entry to e.g. panel-simple.c file [1] to describe the display.

I thought that adding timings to DTS is more welcome - hence we do not need to add any extra code to Linux when porting new board?

Quoted 67 lines
Quoted 67 lines
arch/arm/boot/dts/imx6q-kp-tpc.dts new file +20 -0
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&lcd_display_in>;
+};
+
+&can1 {
+       status = "disabled";
+};
+
+&can2 {
+       status = "disabled";
+};
+
+&uart1 {
+       status = "okay";
+};
+
+&uart2 {
+       status = "disabled";
+};
(quoted diff) +0 -0

b/arch/arm/boot/dts/imx6q-kp.dtsi new file mode 100644 index 000000000000..47a10fb1d46b

arch/arm/boot/dts/imx6q-kp.dtsi new file +5 -0
@@ -0,0 +1,468 @@
+/*
+ * Copyright 2018
+ * Lukasz Majewski, DENX Software Engineering, lukma at denx.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 licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ *
+ * 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

Quoted 8 lines
Quoted 6 lines
+ *     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.
+ */

SPDX, please.

The other upstreamed imx6q board used dual license - GPLv2 or X11 (which is also called MIT license).

I suppose that this license header shall be replaced with:

SPDX-License-Identifier: (GPL-2.0+ OR MIT)

Am I correct?

Quoted 19 lines

arch/arm/boot/dts/imx6q-kp.dtsi line 79

Quoted 8 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +6 -0
+       leds {
+               compatible = "gpio-leds";
+
+               green {
+                       label = "led1";
+                       gpios = <&gpio3 16 0>;  

gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;

arch/arm/boot/dts/imx6q-kp.dtsi line 86

Quoted 7 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +7 -0
+                       linux,default-trigger = "gpio";
+                       default-state = "off";
+               };
+
+               red {
+                       label = "led0";
+                       gpios = <&gpio3 23 0>;  
Quoted 1 line

GPIO_ACTIVE_HIGH

Ok.

Quoted 10 lines

arch/arm/boot/dts/imx6q-kp.dtsi line 94

Quoted 9 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +8 -0
+                       linux,default-trigger = "gpio";
+                       default-state = "off";
+               };
+       };
+
+       memory: memory {
+               reg = <0x10000000 0x40000000>;
+       };  
Quoted 3 lines

memory at 10000000 otherwise warnings are seen when building with W=1.

Make sure that building the dtb with W=1 introduces no warnings.

Ok. Thanks for pointing this out.

Quoted 16 lines
Quoted 4 lines

+&i2c1 {

arch/arm/boot/dts/imx6q-kp.dtsi new file +2 -0
+       clock-frequency = <400000>;
+       pinctrl-names = "default";

arch/arm/boot/dts/imx6q-kp.dtsi line 211

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +10 -0
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       goodix_ts at 5d {
+               compatible = "goodix,gt911";
+               reg = <0x5d>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_ts>;
+  

No need for these blank lines.

Ok.

Quoted 35 lines

arch/arm/boot/dts/imx6q-kp.dtsi line 213

Quoted 3 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +2 -0
+               interrupt-parent = <&gpio1>;
+               interrupts = <9 2>;  

Please use an IRQ flag.

Quoted 1 line

+ irq-gpios = <&gpio1 9 0>;

GPIO_ACTIVE_HIGH

Quoted 1 line

+ reset-gpios = <&gpio5 2 0>;

GPIO_ACTIVE_HIGH.

Quoted 4 lines

+&i2c2 {

arch/arm/boot/dts/imx6q-kp.dtsi new file +3 -0
+       clock-frequency = <400000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;

arch/arm/boot/dts/imx6q-kp.dtsi line 237

Quoted 10 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +10 -0
+       status = "okay";
+
+       codec: sgtl5000 at a {
+               compatible = "fsl,sgtl5000";
+               #sound-dai-cells = <0>;
+               reg = <0x0a>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_codec>;
+  

No need for these blank lines.

Quoted 3 lines
arch/arm/boot/dts/imx6q-kp.dtsi new file +3 -0
+               clocks = <&clks IMX6QDL_CLK_CKO>;
+               VDDA-supply = <&reg_3p3v>;
+               VDDIO-supply = <&reg_3p3v>;  
Quoted 7 lines

arch/arm/boot/dts/imx6q-kp.dtsi line 441

Quoted 4 lines

+&uart2 {

arch/arm/boot/dts/imx6q-kp.dtsi new file +3 -0
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       fsl,uart-has-rtscts;  

fsl,uart-has-rtscts has been deprecated. Please use uart-has-rtscts
instead.

Ok.

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180303/a3a7b2b7/attachment.sig>

reviewer
#6 lore raw

Hi Lukasz,

Quoted 5 lines · Lukasz Majewski

Previously (for other imx6q board) I've added entry to e.g. panel-simple.c file [1] to describe the display.

I thought that adding timings to DTS is more welcome - hence we do not need to add any extra code to Linux when porting new board?

Adding an entry to panel-simple helps when people want to use this panel into their dts, as they need only to pass a compatible string line instead of passing all the LCD timings.

Quoted 8 lines

The other upstreamed imx6q board used dual license - GPLv2 or X11 (which is also called MIT license).

I suppose that this license header shall be replaced with:

SPDX-License-Identifier: (GPL-2.0+ OR MIT)

Am I correct?

Yes, correct.