linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/16] Cleanup of LS1021a device trees
@ 2021-10-01  0:04 Li Yang
  2021-10-01  0:04 ` [PATCH v2 01/16] dt-bindings: arm: fsl: add ls1021a-tsn board Li Yang
                   ` (15 more replies)
  0 siblings, 16 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

This is a series of patches trying to cleanup the LS1021a based device
trees including:
- Add missing nodes
- Update to use SPDX tags
- Fix existing schema check issues in dts
- Update related bindings to deal with some check issues

Changes in V2
- Spin-off the IFC binding related patches into a separate series due to
  its dependency on driver changes
- Added two more fixes about thermal-zones node and flash compatible
- Remove copyright updates
- Updated description in i2c binding patch to clarify the intension
- Added Acked-by tag


Li Yang (16):
  dt-bindings: arm: fsl: add ls1021a-tsn board
  dt-bindings: i2c: imx: update schema to align with original txt
    binding
  ARM: dts: ls1021a: change to use SPDX identifiers
  ARM: dts: ls1021a-qds: Add node for QSPI flash
  ARM: dts: ls1021a: update pcie nodes for dt-schema check
  ARM: dts: ls1021a: fix board compatible to follow binding schema
  ARM: dts: ls1021a: breakup long values in thermal node
  ARM: dts: ls1021a: disable ifc node by default
  ARM: dts: ls1021a: remove regulators simple-bus
  ARM: dts: ls1021a: fix memory node for schema check
  ARM: dts: ls1021a: add #dma-cells to qdma node
  ARM: dts: ls1021a: add #power-domain-cells for power-controller node
  ARM: dts: ls1021a-qds: change fpga to simple-mfd device
  ARM: dts: ls1021a-tsn: remove undocumented property "position" from
    mma8452 node
  ARM: dts: ls1021a: move thermal-zones node out of soc/
  ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for
    flash

 .../devicetree/bindings/arm/fsl.yaml          |   1 +
 .../devicetree/bindings/i2c/i2c-imx.yaml      |  12 +-
 arch/arm/boot/dts/ls1021a-qds.dts             |  86 +++-----
 arch/arm/boot/dts/ls1021a-tsn.dts             |   4 +-
 arch/arm/boot/dts/ls1021a-twr.dts             |  63 +-----
 arch/arm/boot/dts/ls1021a.dtsi                | 204 +++++++-----------
 6 files changed, 124 insertions(+), 246 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v2 01/16] dt-bindings: arm: fsl: add ls1021a-tsn board
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding Li Yang
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang, Rob Herring

Add the missing board in the binding docuemnt.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/arm/fsl.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml
index 60f4862ba15e..65299c0d1272 100644
--- a/Documentation/devicetree/bindings/arm/fsl.yaml
+++ b/Documentation/devicetree/bindings/arm/fsl.yaml
@@ -886,6 +886,7 @@ properties:
           - enum:
               - fsl,ls1021a-moxa-uc-8410a
               - fsl,ls1021a-qds
+              - fsl,ls1021a-tsn
               - fsl,ls1021a-twr
           - const: fsl,ls1021a
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
  2021-10-01  0:04 ` [PATCH v2 01/16] dt-bindings: arm: fsl: add ls1021a-tsn board Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01 13:16   ` Rob Herring
  2021-10-01 13:23   ` Rob Herring
  2021-10-01  0:04 ` [PATCH v2 03/16] ARM: dts: ls1021a: change to use SPDX identifiers Li Yang
                   ` (13 subsequent siblings)
  15 siblings, 2 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

When the binding was converted from txt to yaml, it actually added more
constrains than the original txt binding which was already used in many
in-tree DTSes.  Some of the newly added constrains are either not valid
or not neccessary.

Not all SoCs use ipg as the clock name for i2c.  There is no point in
having SoC integration information defined in i2c binding.  Remove the
clock name requirement in the schema.

The original txt binding didn't require the order of tx and rx for
dmas/dma-names.  Many in tree DTSes are already using the other order.
Both orders should just work fine.  Update the schema to allow both.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
v2:
Updated the patch description

 Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx.yaml b/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
index 3592d49235e0..da55d37a09a4 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
+++ b/Documentation/devicetree/bindings/i2c/i2c-imx.yaml
@@ -54,20 +54,20 @@ properties:
     maxItems: 1
 
   clock-names:
-    const: ipg
+    maxItems: 1
 
   clock-frequency:
     enum: [ 100000, 400000 ]
 
   dmas:
-    items:
-      - description: DMA controller phandle and request line for RX
-      - description: DMA controller phandle and request line for TX
+    minItems: 2
+    maxItems: 2
 
   dma-names:
+    minItems: 2
+    maxItems: 2
     items:
-      - const: rx
-      - const: tx
+      enum: [ "rx", "tx" ]
 
   sda-gpios:
     maxItems: 1
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 03/16] ARM: dts: ls1021a: change to use SPDX identifiers
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
  2021-10-01  0:04 ` [PATCH v2 01/16] dt-bindings: arm: fsl: add ls1021a-tsn board Li Yang
  2021-10-01  0:04 ` [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI flash Li Yang
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Replace the license text with SPDX identifiers.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a-qds.dts | 44 +------------------------------
 arch/arm/boot/dts/ls1021a-twr.dts | 44 +------------------------------
 arch/arm/boot/dts/ls1021a.dtsi    | 44 +------------------------------
 3 files changed, 3 insertions(+), 129 deletions(-)

diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts
index 74a67604876c..e2aa569ff404 100644
--- a/arch/arm/boot/dts/ls1021a-qds.dts
+++ b/arch/arm/boot/dts/ls1021a-qds.dts
@@ -1,49 +1,7 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright 2013-2014 Freescale Semiconductor, Inc.
  * Copyright 2018 NXP
- *
- * 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.
- *
- *     You should have received a copy of the GNU General Public
- *     License along with this file; if not, write to the Free
- *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- *     MA 02110-1301 USA
- *
- * 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/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts
index 5edf001f6138..e162a1599264 100644
--- a/arch/arm/boot/dts/ls1021a-twr.dts
+++ b/arch/arm/boot/dts/ls1021a-twr.dts
@@ -1,49 +1,7 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright 2013-2014 Freescale Semiconductor, Inc.
  * Copyright 2018 NXP
- *
- * 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.
- *
- *     You should have received a copy of the GNU General Public
- *     License along with this file; if not, write to the Free
- *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- *     MA 02110-1301 USA
- *
- * 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/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index 4fce81422943..1168ce677341 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -1,48 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright 2013-2014 Freescale Semiconductor, 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.
- *
- *     You should have received a copy of the GNU General Public
- *     License along with this file; if not, write to the Free
- *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- *     MA 02110-1301 USA
- *
- * 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/interrupt-controller/arm-gic.h>
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI flash
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (2 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 03/16] ARM: dts: ls1021a: change to use SPDX identifiers Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  5:24   ` [EXT] " Kuldeep Singh
  2021-10-01  0:04 ` [PATCH v2 05/16] ARM: dts: ls1021a: update pcie nodes for dt-schema check Li Yang
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Add the missing node for qspi flash.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a-qds.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts
index e2aa569ff404..522e1dc51059 100644
--- a/arch/arm/boot/dts/ls1021a-qds.dts
+++ b/arch/arm/boot/dts/ls1021a-qds.dts
@@ -286,6 +286,21 @@ tbi0: tbi-phy@8 {
 	};
 };
 
+&qspi {
+	num-cs = <2>;
+	status = "okay";
+
+	qflash0: flash@0 {
+		compatible = "jedec,spi-nor";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		spi-max-frequency = <20000000>;
+		reg = <0>;
+		spi-rx-bus-width = <4>;
+		spi-tx-bus-width = <4>;
+	};
+};
+
 &sai2 {
 	status = "okay";
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 05/16] ARM: dts: ls1021a: update pcie nodes for dt-schema check
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (3 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI flash Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 06/16] ARM: dts: ls1021a: fix board compatible to follow binding schema Li Yang
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Break up long values to pass dt-schema checks.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index 1168ce677341..c37495eaf0b0 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -842,8 +842,8 @@ usb3: usb@3100000 {
 
 		pcie@3400000 {
 			compatible = "fsl,ls1021a-pcie";
-			reg = <0x00 0x03400000 0x0 0x00010000   /* controller registers */
-			       0x40 0x00000000 0x0 0x00002000>; /* configuration space */
+			reg = <0x00 0x03400000 0x0 0x00010000>, /* controller registers */
+			      <0x40 0x00000000 0x0 0x00002000>; /* configuration space */
 			reg-names = "regs", "config";
 			interrupts = <GIC_SPI 177 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */
 			fsl,pcie-scfg = <&scfg 0>;
@@ -852,8 +852,8 @@ pcie@3400000 {
 			device_type = "pci";
 			num-viewport = <6>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&msi1>, <&msi2>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
@@ -866,8 +866,8 @@ pcie@3400000 {
 
 		pcie@3500000 {
 			compatible = "fsl,ls1021a-pcie";
-			reg = <0x00 0x03500000 0x0 0x00010000   /* controller registers */
-			       0x48 0x00000000 0x0 0x00002000>; /* configuration space */
+			reg = <0x00 0x03500000 0x0 0x00010000>, /* controller registers */
+			      <0x48 0x00000000 0x0 0x00002000>; /* configuration space */
 			reg-names = "regs", "config";
 			interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
 			fsl,pcie-scfg = <&scfg 1>;
@@ -876,8 +876,8 @@ pcie@3500000 {
 			device_type = "pci";
 			num-viewport = <6>;
 			bus-range = <0x0 0xff>;
-			ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000   /* downstream I/O */
-				  0x82000000 0x0 0x40000000 0x48 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+			ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000>, /* downstream I/O */
+				 <0x82000000 0x0 0x40000000 0x48 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
 			msi-parent = <&msi1>, <&msi2>;
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 7>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 06/16] ARM: dts: ls1021a: fix board compatible to follow binding schema
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (4 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 05/16] ARM: dts: ls1021a: update pcie nodes for dt-schema check Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 07/16] ARM: dts: ls1021a: breakup long values in thermal node Li Yang
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Align the compatible strings with the board binding defined in schema
file.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a-tsn.dts | 1 +
 arch/arm/boot/dts/ls1021a.dtsi    | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/ls1021a-tsn.dts b/arch/arm/boot/dts/ls1021a-tsn.dts
index 9d8f0c2a8aba..ce470ebfb2c0 100644
--- a/arch/arm/boot/dts/ls1021a-tsn.dts
+++ b/arch/arm/boot/dts/ls1021a-tsn.dts
@@ -8,6 +8,7 @@
 
 / {
 	model = "NXP LS1021A-TSN Board";
+	compatible = "fsl,ls1021a-tsn", "fsl,ls1021a";
 
 	sys_mclk: clock-mclk {
 		compatible = "fixed-clock";
diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index c37495eaf0b0..d28b68d231f2 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -9,7 +9,6 @@
 / {
 	#address-cells = <2>;
 	#size-cells = <2>;
-	compatible = "fsl,ls1021a";
 	interrupt-parent = <&gic>;
 
 	aliases {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 07/16] ARM: dts: ls1021a: breakup long values in thermal node
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (5 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 06/16] ARM: dts: ls1021a: fix board compatible to follow binding schema Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 08/16] ARM: dts: ls1021a: disable ifc node by default Li Yang
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Breakup long values to pass the schema check.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 72 +++++++++++++++++-----------------
 1 file changed, 36 insertions(+), 36 deletions(-)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index d28b68d231f2..9622c6509d9e 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -247,42 +247,42 @@ tmu: tmu@1f00000 {
 			reg = <0x0 0x1f00000 0x0 0x10000>;
 			interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
 			fsl,tmu-range = <0xb0000 0x9002c 0x6004e 0x30066>;
-			fsl,tmu-calibration = <0x00000000 0x00000020
-					       0x00000001 0x00000024
-					       0x00000002 0x0000002a
-					       0x00000003 0x00000032
-					       0x00000004 0x00000038
-					       0x00000005 0x0000003e
-					       0x00000006 0x00000043
-					       0x00000007 0x0000004a
-					       0x00000008 0x00000050
-					       0x00000009 0x00000059
-					       0x0000000a 0x0000005f
-					       0x0000000b 0x00000066
-
-					       0x00010000 0x00000023
-					       0x00010001 0x0000002b
-					       0x00010002 0x00000033
-					       0x00010003 0x0000003a
-					       0x00010004 0x00000042
-					       0x00010005 0x0000004a
-					       0x00010006 0x00000054
-					       0x00010007 0x0000005c
-					       0x00010008 0x00000065
-					       0x00010009 0x0000006f
-
-					       0x00020000 0x00000029
-					       0x00020001 0x00000033
-					       0x00020002 0x0000003d
-					       0x00020003 0x00000048
-					       0x00020004 0x00000054
-					       0x00020005 0x00000060
-					       0x00020006 0x0000006c
-
-					       0x00030000 0x00000025
-					       0x00030001 0x00000033
-					       0x00030002 0x00000043
-					       0x00030003 0x00000055>;
+			fsl,tmu-calibration = <0x00000000 0x00000020>,
+					      <0x00000001 0x00000024>,
+					      <0x00000002 0x0000002a>,
+					      <0x00000003 0x00000032>,
+					      <0x00000004 0x00000038>,
+					      <0x00000005 0x0000003e>,
+					      <0x00000006 0x00000043>,
+					      <0x00000007 0x0000004a>,
+					      <0x00000008 0x00000050>,
+					      <0x00000009 0x00000059>,
+					      <0x0000000a 0x0000005f>,
+					      <0x0000000b 0x00000066>,
+
+					      <0x00010000 0x00000023>,
+					      <0x00010001 0x0000002b>,
+					      <0x00010002 0x00000033>,
+					      <0x00010003 0x0000003a>,
+					      <0x00010004 0x00000042>,
+					      <0x00010005 0x0000004a>,
+					      <0x00010006 0x00000054>,
+					      <0x00010007 0x0000005c>,
+					      <0x00010008 0x00000065>,
+					      <0x00010009 0x0000006f>,
+
+					      <0x00020000 0x00000029>,
+					      <0x00020001 0x00000033>,
+					      <0x00020002 0x0000003d>,
+					      <0x00020003 0x00000048>,
+					      <0x00020004 0x00000054>,
+					      <0x00020005 0x00000060>,
+					      <0x00020006 0x0000006c>,
+
+					      <0x00030000 0x00000025>,
+					      <0x00030001 0x00000033>,
+					      <0x00030002 0x00000043>,
+					      <0x00030003 0x00000055>;
 			#thermal-sensor-cells = <1>;
 		};
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 08/16] ARM: dts: ls1021a: disable ifc node by default
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (6 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 07/16] ARM: dts: ls1021a: breakup long values in thermal node Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 09/16] ARM: dts: ls1021a: remove regulators simple-bus Li Yang
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Disable the bus in the SoC dtsi file to be enabled only in board dts
files. Also breakup long values in the ifc node to fix dtbs_check.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
v2:
Dropped the ifc node name change as we are dropping "simple-bus"

 arch/arm/boot/dts/ls1021a-qds.dts | 6 +++---
 arch/arm/boot/dts/ls1021a.dtsi    | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts
index 522e1dc51059..1ff11bff4f2b 100644
--- a/arch/arm/boot/dts/ls1021a-qds.dts
+++ b/arch/arm/boot/dts/ls1021a-qds.dts
@@ -189,9 +189,9 @@ &ifc {
 	#address-cells = <2>;
 	#size-cells = <1>;
 	/* NOR, NAND Flashes and FPGA on board */
-	ranges = <0x0 0x0 0x0 0x60000000 0x08000000
-		  0x2 0x0 0x0 0x7e800000 0x00010000
-		  0x3 0x0 0x0 0x7fb00000 0x00000100>;
+	ranges = <0x0 0x0 0x0 0x60000000 0x08000000>,
+		 <0x2 0x0 0x0 0x7e800000 0x00010000>,
+		 <0x3 0x0 0x0 0x7fb00000 0x00000100>;
 	status = "okay";
 
 	nor@0,0 {
diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index 9622c6509d9e..25f0cdf3fd0c 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -126,6 +126,7 @@ ifc: ifc@1530000 {
 			compatible = "fsl,ifc", "simple-bus";
 			reg = <0x0 0x1530000 0x0 0x10000>;
 			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
 		};
 
 		dcfg: dcfg@1ee0000 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 09/16] ARM: dts: ls1021a: remove regulators simple-bus
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (7 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 08/16] ARM: dts: ls1021a: disable ifc node by default Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 10/16] ARM: dts: ls1021a: fix memory node for schema check Li Yang
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

There is no regulator bus in hardware.  So move the regulator nodes out
and remove the regulators simple-bus.  This also make the dts align with
the simple-bus schema.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a-qds.dts | 19 ++++++-------------
 arch/arm/boot/dts/ls1021a-twr.dts | 19 ++++++-------------
 2 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts
index 1ff11bff4f2b..8177ab861709 100644
--- a/arch/arm/boot/dts/ls1021a-qds.dts
+++ b/arch/arm/boot/dts/ls1021a-qds.dts
@@ -25,19 +25,12 @@ sys_mclk: clock-mclk {
 		clock-frequency = <24576000>;
 	};
 
-	regulators {
-		compatible = "simple-bus";
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		reg_3p3v: regulator@0 {
-			compatible = "regulator-fixed";
-			reg = <0>;
-			regulator-name = "3P3V";
-			regulator-min-microvolt = <3300000>;
-			regulator-max-microvolt = <3300000>;
-			regulator-always-on;
-		};
+	reg_3p3v: regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "3P3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
 	};
 
 	sound {
diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls1021a-twr.dts
index e162a1599264..f5c03871b205 100644
--- a/arch/arm/boot/dts/ls1021a-twr.dts
+++ b/arch/arm/boot/dts/ls1021a-twr.dts
@@ -23,19 +23,12 @@ sys_mclk: clock-mclk {
 		clock-frequency = <24576000>;
 	};
 
-	regulators {
-		compatible = "simple-bus";
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		reg_3p3v: regulator@0 {
-			compatible = "regulator-fixed";
-			reg = <0>;
-			regulator-name = "3P3V";
-			regulator-min-microvolt = <3300000>;
-			regulator-max-microvolt = <3300000>;
-			regulator-always-on;
-		};
+	reg_3p3v: regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "3P3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
 	};
 
 	sound {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 10/16] ARM: dts: ls1021a: fix memory node for schema check
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (8 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 09/16] ARM: dts: ls1021a: remove regulators simple-bus Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 11/16] ARM: dts: ls1021a: add #dma-cells to qdma node Li Yang
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Fix the following error from "make dtbs_check"

memory: False schema does not allow ...

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index 25f0cdf3fd0c..d2a3699ffcd6 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -47,7 +47,7 @@ cpu1: cpu@f01 {
 		};
 	};
 
-	memory {
+	memory@0 {
 		device_type = "memory";
 		reg = <0x0 0x0 0x0 0x0>;
 	};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 11/16] ARM: dts: ls1021a: add #dma-cells to qdma node
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (9 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 10/16] ARM: dts: ls1021a: fix memory node for schema check Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 12/16] ARM: dts: ls1021a: add #power-domain-cells for power-controller node Li Yang
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Add the #dma-cells to align with the dma schema.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index d2a3699ffcd6..b32e6a6b9f6c 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -950,6 +950,7 @@ qdma: dma-controller@8390000 {
 				     <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-names = "qdma-error",
 				"qdma-queue0", "qdma-queue1";
+			#dma-cells = <2>;
 			dma-channels = <8>;
 			block-number = <1>;
 			block-offset = <0x1000>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 12/16] ARM: dts: ls1021a: add #power-domain-cells for power-controller node
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (10 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 11/16] ARM: dts: ls1021a: add #dma-cells to qdma node Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 13/16] ARM: dts: ls1021a-qds: change fpga to simple-mfd device Li Yang
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Add the #power-domain-cells for power-controller node as required by the
schema.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index b32e6a6b9f6c..e8ae095292a3 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -964,6 +964,7 @@ rcpm: power-controller@1ee2140 {
 			compatible = "fsl,ls1021a-rcpm", "fsl,qoriq-rcpm-2.1+";
 			reg = <0x0 0x1ee2140 0x0 0x8>;
 			#fsl,rcpm-wakeup-cells = <2>;
+			#power-domain-cells = <0>;
 		};
 
 		ftm_alarm0: timer0@29d0000 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 13/16] ARM: dts: ls1021a-qds: change fpga to simple-mfd device
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (11 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 12/16] ARM: dts: ls1021a: add #power-domain-cells for power-controller node Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 14/16] ARM: dts: ls1021a-tsn: remove undocumented property "position" from mma8452 node Li Yang
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

The FPGA is not really a bus but more like an MFD device.  Change the
compatible string from "simple-bus" to "simple-mfd".  This also fix a
node name issue with simple-bus schema.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a-qds.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/ls1021a-qds.dts b/arch/arm/boot/dts/ls1021a-qds.dts
index 8177ab861709..4470bf98fe08 100644
--- a/arch/arm/boot/dts/ls1021a-qds.dts
+++ b/arch/arm/boot/dts/ls1021a-qds.dts
@@ -205,7 +205,7 @@ nand@2,0 {
 	fpga: board-control@3,0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "simple-bus";
+		compatible = "simple-mfd";
 		reg = <0x3 0x0 0x0000100>;
 		bank-width = <1>;
 		device-width = <1>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 14/16] ARM: dts: ls1021a-tsn: remove undocumented property "position" from mma8452 node
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (12 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 13/16] ARM: dts: ls1021a-qds: change fpga to simple-mfd device Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 15/16] ARM: dts: ls1021a: move thermal-zones node out of soc/ Li Yang
  2021-10-01  0:04 ` [PATCH v2 16/16] ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash Li Yang
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

Property "postion" is not documented in the mma8452 binding.  Remove it
to resolve the error in "make dtbs_check"

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a-tsn.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/ls1021a-tsn.dts b/arch/arm/boot/dts/ls1021a-tsn.dts
index ce470ebfb2c0..8005efc5c812 100644
--- a/arch/arm/boot/dts/ls1021a-tsn.dts
+++ b/arch/arm/boot/dts/ls1021a-tsn.dts
@@ -137,7 +137,6 @@ &i2c0 {
 	/* 3 axis accelerometer */
 	accelerometer@1e {
 		compatible = "fsl,fxls8471";
-		position = <0>;
 		reg = <0x1e>;
 	};
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 15/16] ARM: dts: ls1021a: move thermal-zones node out of soc/
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (13 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 14/16] ARM: dts: ls1021a-tsn: remove undocumented property "position" from mma8452 node Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  0:04 ` [PATCH v2 16/16] ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash Li Yang
  15 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

This fixes dtbs-check error from simple-bus schema:
soc: thermal-zones: {'type': 'object'} is not allowed for {'cpu-thermal': ..... }
        From schema: /home/leo/.local/lib/python3.8/site-packages/dtschema/schemas/simple-bus.yaml

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 66 +++++++++++++++++-----------------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index e8ae095292a3..40b49eaa1aed 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -287,39 +287,6 @@ tmu: tmu@1f00000 {
 			#thermal-sensor-cells = <1>;
 		};
 
-		thermal-zones {
-			cpu_thermal: cpu-thermal {
-				polling-delay-passive = <1000>;
-				polling-delay = <5000>;
-
-				thermal-sensors = <&tmu 0>;
-
-				trips {
-					cpu_alert: cpu-alert {
-						temperature = <85000>;
-						hysteresis = <2000>;
-						type = "passive";
-					};
-					cpu_crit: cpu-crit {
-						temperature = <95000>;
-						hysteresis = <2000>;
-						type = "critical";
-					};
-				};
-
-				cooling-maps {
-					map0 {
-						trip = <&cpu_alert>;
-						cooling-device =
-							<&cpu0 THERMAL_NO_LIMIT
-							THERMAL_NO_LIMIT>,
-							<&cpu1 THERMAL_NO_LIMIT
-							THERMAL_NO_LIMIT>;
-					};
-				};
-			};
-		};
-
 		dspi0: spi@2100000 {
 			compatible = "fsl,ls1021a-v1.0-dspi";
 			#address-cells = <1>;
@@ -976,4 +943,37 @@ ftm_alarm0: timer0@29d0000 {
 			big-endian;
 		};
 	};
+
+	thermal-zones {
+		cpu_thermal: cpu-thermal {
+			polling-delay-passive = <1000>;
+			polling-delay = <5000>;
+
+			thermal-sensors = <&tmu 0>;
+
+			trips {
+				cpu_alert: cpu-alert {
+					temperature = <85000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+				cpu_crit: cpu-crit {
+					temperature = <95000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&cpu_alert>;
+					cooling-device =
+						<&cpu0 THERMAL_NO_LIMIT
+						THERMAL_NO_LIMIT>,
+						<&cpu1 THERMAL_NO_LIMIT
+						THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+	};
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 16/16] ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash
  2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
                   ` (14 preceding siblings ...)
  2021-10-01  0:04 ` [PATCH v2 15/16] ARM: dts: ls1021a: move thermal-zones node out of soc/ Li Yang
@ 2021-10-01  0:04 ` Li Yang
  2021-10-01  5:14   ` [EXT] " Kuldeep Singh
  15 siblings, 1 reply; 26+ messages in thread
From: Li Yang @ 2021-10-01  0:04 UTC (permalink / raw)
  To: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Li Yang

We cannot list all the possible chips used in different board revisions,
just use the generic "jedec,spi-nor" compatible instead.  This also
fixes dtbs_check error:
['s25fl256s1', 's25fl512s', 'jedec,spi-nor'] is too long

Signed-off-by: Li Yang <leoyang.li@nxp.com>
---
 arch/arm/boot/dts/ls1021a-tsn.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/ls1021a-tsn.dts b/arch/arm/boot/dts/ls1021a-tsn.dts
index 8005efc5c812..ff0ffb22768b 100644
--- a/arch/arm/boot/dts/ls1021a-tsn.dts
+++ b/arch/arm/boot/dts/ls1021a-tsn.dts
@@ -251,7 +251,7 @@ &qspi {
 
 	flash@0 {
 		/* Rev. A uses 64MB flash, Rev. B & C use 32MB flash */
-		compatible = "jedec,spi-nor", "s25fl256s1", "s25fl512s";
+		compatible = "jedec,spi-nor";
 		spi-max-frequency = <20000000>;
 		#address-cells = <1>;
 		#size-cells = <1>;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* RE: [EXT] [PATCH v2 16/16] ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash
  2021-10-01  0:04 ` [PATCH v2 16/16] ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash Li Yang
@ 2021-10-01  5:14   ` Kuldeep Singh
  0 siblings, 0 replies; 26+ messages in thread
From: Kuldeep Singh @ 2021-10-01  5:14 UTC (permalink / raw)
  To: Leo Li, Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Leo Li

> -----Original Message-----
> From: Li Yang <leoyang.li@nxp.com>
> Sent: Friday, October 1, 2021 5:34 AM
> To: Shawn Guo <shawnguo@kernel.org>; Rob Herring
> <robh+dt@kernel.org>; devicetree@vger.kernel.org; Oleksij Rempel
> <linux@rempel-privat.de>; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Cc: Leo Li <leoyang.li@nxp.com>
> Subject: [EXT] [PATCH v2 16/16] ARM: dts: ls1021a-tsn: use generic
> "jedec,spi-nor" compatible for flash
> 
> Caution: EXT Email
> 
> We cannot list all the possible chips used in different board revisions, just
> use the generic "jedec,spi-nor" compatible instead.  This also fixes
> dtbs_check error:
> ['s25fl256s1', 's25fl512s', 'jedec,spi-nor'] is too long
> 
> Signed-off-by: Li Yang <leoyang.li@nxp.com>

Reviewed-by: Kuldeep Singh <kuldeep.singh@nxp.com>

> ---
>  arch/arm/boot/dts/ls1021a-tsn.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/ls1021a-tsn.dts b/arch/arm/boot/dts/ls1021a-
> tsn.dts
> index 8005efc5c812..ff0ffb22768b 100644
> --- a/arch/arm/boot/dts/ls1021a-tsn.dts
> +++ b/arch/arm/boot/dts/ls1021a-tsn.dts
> @@ -251,7 +251,7 @@ &qspi {
> 
>         flash@0 {
>                 /* Rev. A uses 64MB flash, Rev. B & C use 32MB flash */
> -               compatible = "jedec,spi-nor", "s25fl256s1", "s25fl512s";
> +               compatible = "jedec,spi-nor";
>                 spi-max-frequency = <20000000>;
>                 #address-cells = <1>;
>                 #size-cells = <1>;
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [EXT] [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI flash
  2021-10-01  0:04 ` [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI flash Li Yang
@ 2021-10-01  5:24   ` Kuldeep Singh
  2021-10-01 20:08     ` Li Yang
  0 siblings, 1 reply; 26+ messages in thread
From: Kuldeep Singh @ 2021-10-01  5:24 UTC (permalink / raw)
  To: Leo Li, Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel
  Cc: Leo Li

Hi Leo,

> -----Original Message-----
> From: Li Yang <leoyang.li@nxp.com>
> Sent: Friday, October 1, 2021 5:34 AM
> To: Shawn Guo <shawnguo@kernel.org>; Rob Herring
> <robh+dt@kernel.org>; devicetree@vger.kernel.org; Oleksij Rempel
> <linux@rempel-privat.de>; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Cc: Leo Li <leoyang.li@nxp.com>
> Subject: [EXT] [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI
> flash
> 
> Caution: EXT Email
> 
> Add the missing node for qspi flash.
> 
> Signed-off-by: Li Yang <leoyang.li@nxp.com>
> ---
>  arch/arm/boot/dts/ls1021a-qds.dts | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/ls1021a-qds.dts
> b/arch/arm/boot/dts/ls1021a-qds.dts
> index e2aa569ff404..522e1dc51059 100644
> --- a/arch/arm/boot/dts/ls1021a-qds.dts
> +++ b/arch/arm/boot/dts/ls1021a-qds.dts
> @@ -286,6 +286,21 @@ tbi0: tbi-phy@8 {
>         };
>  };
> 
> +&qspi {
> +       num-cs = <2>;

Please drop "num-cs" property as it is not used by qspi driver.

> +       status = "okay";
> +
> +       qflash0: flash@0 {

Can we have flash chip name instead of qflash?
There is no hard requirement, it will help in aligning node properties with other board properties such as LX2160A-RDB, LS1046A-RDB etc.

With above fixed,
Reviewed-by: Kuldeep Singh <kuldeep.singh@nxp.com>

> +               compatible = "jedec,spi-nor";
> +               #address-cells = <1>;
> +               #size-cells = <1>;
> +               spi-max-frequency = <20000000>;
> +               reg = <0>;
> +               spi-rx-bus-width = <4>;
> +               spi-tx-bus-width = <4>;
> +       };
> +};
> +
>  &sai2 {
>         status = "okay";
>  };
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding
  2021-10-01  0:04 ` [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding Li Yang
@ 2021-10-01 13:16   ` Rob Herring
  2021-10-01 13:23   ` Rob Herring
  1 sibling, 0 replies; 26+ messages in thread
From: Rob Herring @ 2021-10-01 13:16 UTC (permalink / raw)
  To: Li Yang
  Cc: devicetree, Oleksij Rempel, linux-kernel, Rob Herring,
	linux-arm-kernel, Shawn Guo

On Thu, 30 Sep 2021 19:04:03 -0500, Li Yang wrote:
> When the binding was converted from txt to yaml, it actually added more
> constrains than the original txt binding which was already used in many
> in-tree DTSes.  Some of the newly added constrains are either not valid
> or not neccessary.
> 
> Not all SoCs use ipg as the clock name for i2c.  There is no point in
> having SoC integration information defined in i2c binding.  Remove the
> clock name requirement in the schema.
> 
> The original txt binding didn't require the order of tx and rx for
> dmas/dma-names.  Many in tree DTSes are already using the other order.
> Both orders should just work fine.  Update the schema to allow both.
> 
> Signed-off-by: Li Yang <leoyang.li@nxp.com>
> ---
> v2:
> Updated the patch description
> 
>  Documentation/devicetree/bindings/i2c/i2c-imx.yaml | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1535099


i2c@21a4000: clock-frequency:0:0: 50000 is not one of [100000, 400000]
	arch/arm/boot/dts/imx6dl-alti6p.dt.yaml

i2c@21f8000: clock-frequency:0:0: 50000 is not one of [100000, 400000]
	arch/arm/boot/dts/imx6dl-alti6p.dt.yaml

i2c@30a20000: clock-frequency:0:0: 387000 is not one of [100000, 400000]
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dt.yaml
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dt.yaml

i2c@30a30000: clock-frequency:0:0: 387000 is not one of [100000, 400000]
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dt.yaml
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dt.yaml

i2c@30a40000: clock-frequency:0:0: 387000 is not one of [100000, 400000]
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dt.yaml
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dt.yaml

i2c@30a50000: clock-frequency:0:0: 387000 is not one of [100000, 400000]
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r2.dt.yaml
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dt.yaml
	arch/arm64/boot/dts/freescale/imx8mq-librem5-r4.dt.yaml


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding
  2021-10-01  0:04 ` [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding Li Yang
  2021-10-01 13:16   ` Rob Herring
@ 2021-10-01 13:23   ` Rob Herring
  2021-10-01 17:37     ` Li Yang
  1 sibling, 1 reply; 26+ messages in thread
From: Rob Herring @ 2021-10-01 13:23 UTC (permalink / raw)
  To: Li Yang
  Cc: Shawn Guo, devicetree, Oleksij Rempel, linux-arm-kernel, linux-kernel

On Thu, Sep 30, 2021 at 7:04 PM Li Yang <leoyang.li@nxp.com> wrote:
>
> When the binding was converted from txt to yaml, it actually added more
> constrains than the original txt binding which was already used in many
> in-tree DTSes.  Some of the newly added constrains are either not valid
> or not neccessary.

IMO, both of these should be fixed in the dts files.

> Not all SoCs use ipg as the clock name for i2c.  There is no point in
> having SoC integration information defined in i2c binding.  Remove the
> clock name requirement in the schema.

Any name you want is not fine. Your choices are remove clock-names,
add all the names used, or change everyone to use 'ipg'.

> The original txt binding didn't require the order of tx and rx for
> dmas/dma-names.  Many in tree DTSes are already using the other order.
> Both orders should just work fine.  Update the schema to allow both.

Doesn't sound like a case where defining the order is challenging.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding
  2021-10-01 13:23   ` Rob Herring
@ 2021-10-01 17:37     ` Li Yang
  2021-10-08 22:20       ` Rob Herring
  0 siblings, 1 reply; 26+ messages in thread
From: Li Yang @ 2021-10-01 17:37 UTC (permalink / raw)
  To: Rob Herring
  Cc: Shawn Guo,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Oleksij Rempel, linux-arm-kernel, linux-kernel

On Fri, Oct 1, 2021 at 8:24 AM Rob Herring <robh+dt@kernel.org> wrote:
>
> On Thu, Sep 30, 2021 at 7:04 PM Li Yang <leoyang.li@nxp.com> wrote:
> >
> > When the binding was converted from txt to yaml, it actually added more
> > constrains than the original txt binding which was already used in many
> > in-tree DTSes.  Some of the newly added constrains are either not valid
> > or not neccessary.
>
> IMO, both of these should be fixed in the dts files.
>
> > Not all SoCs use ipg as the clock name for i2c.  There is no point in
> > having SoC integration information defined in i2c binding.  Remove the
> > clock name requirement in the schema.
>
> Any name you want is not fine. Your choices are remove clock-names,
> add all the names used, or change everyone to use 'ipg'.

I understand that the name should be important as clocks are
referenced by name.  But since the i2c controller only has one clock ,
the name is never referenced in the driver.

If we really want to define the name, IMO, it should be from the
perspective of the i2c controller like "clkin" or "i2c" instead of the
"ipg" from the perspective of SoC integration which could be changing
with a different integration.  I can list both "i2c" and "ipg" for now
as a workaround though.

>
> > The original txt binding didn't require the order of tx and rx for
> > dmas/dma-names.  Many in tree DTSes are already using the other order.
> > Both orders should just work fine.  Update the schema to allow both.
>
> Doesn't sound like a case where defining the order is challenging.

No, it is not challenging.  But as dma channel is only referenced by
name instead of index.  I don't see too much benefit in enforcing the
order other than easier to create the schema.

>
> Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [EXT] [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI flash
  2021-10-01  5:24   ` [EXT] " Kuldeep Singh
@ 2021-10-01 20:08     ` Li Yang
  2021-10-04  5:53       ` Kuldeep Singh
  0 siblings, 1 reply; 26+ messages in thread
From: Li Yang @ 2021-10-01 20:08 UTC (permalink / raw)
  To: Kuldeep Singh
  Cc: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel

On Fri, Oct 1, 2021 at 12:30 AM Kuldeep Singh <kuldeep.singh@nxp.com> wrote:
>
> Hi Leo,
>
> > -----Original Message-----
> > From: Li Yang <leoyang.li@nxp.com>
> > Sent: Friday, October 1, 2021 5:34 AM
> > To: Shawn Guo <shawnguo@kernel.org>; Rob Herring
> > <robh+dt@kernel.org>; devicetree@vger.kernel.org; Oleksij Rempel
> > <linux@rempel-privat.de>; linux-arm-kernel@lists.infradead.org; linux-
> > kernel@vger.kernel.org
> > Cc: Leo Li <leoyang.li@nxp.com>
> > Subject: [EXT] [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI
> > flash
> >
> > Caution: EXT Email
> >
> > Add the missing node for qspi flash.
> >
> > Signed-off-by: Li Yang <leoyang.li@nxp.com>
> > ---
> >  arch/arm/boot/dts/ls1021a-qds.dts | 15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/ls1021a-qds.dts
> > b/arch/arm/boot/dts/ls1021a-qds.dts
> > index e2aa569ff404..522e1dc51059 100644
> > --- a/arch/arm/boot/dts/ls1021a-qds.dts
> > +++ b/arch/arm/boot/dts/ls1021a-qds.dts
> > @@ -286,6 +286,21 @@ tbi0: tbi-phy@8 {
> >         };
> >  };
> >
> > +&qspi {
> > +       num-cs = <2>;
>
> Please drop "num-cs" property as it is not used by qspi driver.
>
> > +       status = "okay";
> > +
> > +       qflash0: flash@0 {
>
> Can we have flash chip name instead of qflash?
> There is no hard requirement, it will help in aligning node properties with other board properties such as LX2160A-RDB, LS1046A-RDB etc.

Thanks for the review.  I find that there is no reference to the label
at all.  I don't know why we added it in the first place.  Probably we
can just remove it?

>
> With above fixed,
> Reviewed-by: Kuldeep Singh <kuldeep.singh@nxp.com>
>
> > +               compatible = "jedec,spi-nor";
> > +               #address-cells = <1>;
> > +               #size-cells = <1>;
> > +               spi-max-frequency = <20000000>;
> > +               reg = <0>;
> > +               spi-rx-bus-width = <4>;
> > +               spi-tx-bus-width = <4>;
> > +       };
> > +};
> > +
> >  &sai2 {
> >         status = "okay";
> >  };
> > --
> > 2.25.1
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [EXT] [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI flash
  2021-10-01 20:08     ` Li Yang
@ 2021-10-04  5:53       ` Kuldeep Singh
  0 siblings, 0 replies; 26+ messages in thread
From: Kuldeep Singh @ 2021-10-04  5:53 UTC (permalink / raw)
  To: Leo Li
  Cc: Shawn Guo, Rob Herring, devicetree, Oleksij Rempel,
	linux-arm-kernel, linux-kernel

> -----Original Message-----
> From: Li Yang <leoyang.li@nxp.com>
> Sent: Saturday, October 2, 2021 1:38 AM
> To: Kuldeep Singh <kuldeep.singh@nxp.com>
> Cc: Shawn Guo <shawnguo@kernel.org>; Rob Herring <robh+dt@kernel.org>;
> devicetree@vger.kernel.org; Oleksij Rempel <linux@rempel-privat.de>; linux-
> arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [EXT] [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for
> QSPI flash
> 
> Caution: EXT Email
> 
> On Fri, Oct 1, 2021 at 12:30 AM Kuldeep Singh <kuldeep.singh@nxp.com>
> wrote:
> >
> > Hi Leo,
> >
> > > -----Original Message-----
> > > From: Li Yang <leoyang.li@nxp.com>
> > > Sent: Friday, October 1, 2021 5:34 AM
> > > To: Shawn Guo <shawnguo@kernel.org>; Rob Herring
> > > <robh+dt@kernel.org>; devicetree@vger.kernel.org; Oleksij Rempel
> > > <linux@rempel-privat.de>; linux-arm-kernel@lists.infradead.org;
> > > linux- kernel@vger.kernel.org
> > > Cc: Leo Li <leoyang.li@nxp.com>
> > > Subject: [EXT] [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for
> > > QSPI flash
> > >
> > > Caution: EXT Email
> > >
> > > Add the missing node for qspi flash.
> > >
> > > Signed-off-by: Li Yang <leoyang.li@nxp.com>
> > > ---
> > >  arch/arm/boot/dts/ls1021a-qds.dts | 15 +++++++++++++++
> > >  1 file changed, 15 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/ls1021a-qds.dts
> > > b/arch/arm/boot/dts/ls1021a-qds.dts
> > > index e2aa569ff404..522e1dc51059 100644
> > > --- a/arch/arm/boot/dts/ls1021a-qds.dts
> > > +++ b/arch/arm/boot/dts/ls1021a-qds.dts
> > > @@ -286,6 +286,21 @@ tbi0: tbi-phy@8 {
> > >         };
> > >  };
> > >
> > > +&qspi {
> > > +       num-cs = <2>;
> >
> > Please drop "num-cs" property as it is not used by qspi driver.
> >
> > > +       status = "okay";
> > > +
> > > +       qflash0: flash@0 {
> >
> > Can we have flash chip name instead of qflash?
> > There is no hard requirement, it will help in aligning node properties with
> other board properties such as LX2160A-RDB, LS1046A-RDB etc.
> 
> Thanks for the review.  I find that there is no reference to the label at all.  I
> don't know why we added it in the first place.  Probably we can just remove it?

I believe yes, though I haven't checked it but I think it's safe to remove label and keep only flash@0.

Regards
Kuldeep

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding
  2021-10-01 17:37     ` Li Yang
@ 2021-10-08 22:20       ` Rob Herring
  2021-10-09  3:08         ` Li Yang
  0 siblings, 1 reply; 26+ messages in thread
From: Rob Herring @ 2021-10-08 22:20 UTC (permalink / raw)
  To: Li Yang
  Cc: Shawn Guo,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Oleksij Rempel, linux-arm-kernel, linux-kernel

On Fri, Oct 01, 2021 at 12:37:54PM -0500, Li Yang wrote:
> On Fri, Oct 1, 2021 at 8:24 AM Rob Herring <robh+dt@kernel.org> wrote:
> >
> > On Thu, Sep 30, 2021 at 7:04 PM Li Yang <leoyang.li@nxp.com> wrote:
> > >
> > > When the binding was converted from txt to yaml, it actually added more
> > > constrains than the original txt binding which was already used in many
> > > in-tree DTSes.  Some of the newly added constrains are either not valid
> > > or not neccessary.
> >
> > IMO, both of these should be fixed in the dts files.
> >
> > > Not all SoCs use ipg as the clock name for i2c.  There is no point in
> > > having SoC integration information defined in i2c binding.  Remove the
> > > clock name requirement in the schema.
> >
> > Any name you want is not fine. Your choices are remove clock-names,
> > add all the names used, or change everyone to use 'ipg'.
> 
> I understand that the name should be important as clocks are
> referenced by name.  But since the i2c controller only has one clock ,
> the name is never referenced in the driver.

Then just remove 'clock-names' from the dts file.

> If we really want to define the name, IMO, it should be from the
> perspective of the i2c controller like "clkin" or "i2c" instead of the
> "ipg" from the perspective of SoC integration which could be changing
> with a different integration.  I can list both "i2c" and "ipg" for now
> as a workaround though.

$modulename for $foo-names always looks made up and pointless to me.

> 
> >
> > > The original txt binding didn't require the order of tx and rx for
> > > dmas/dma-names.  Many in tree DTSes are already using the other order.
> > > Both orders should just work fine.  Update the schema to allow both.
> >
> > Doesn't sound like a case where defining the order is challenging.
> 
> No, it is not challenging.  But as dma channel is only referenced by
> name instead of index.  I don't see too much benefit in enforcing the
> order other than easier to create the schema.

Easier is nice, and that's the 'DT way' is the other reason.

Rob

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding
  2021-10-08 22:20       ` Rob Herring
@ 2021-10-09  3:08         ` Li Yang
  0 siblings, 0 replies; 26+ messages in thread
From: Li Yang @ 2021-10-09  3:08 UTC (permalink / raw)
  To: Rob Herring
  Cc: Shawn Guo,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Oleksij Rempel, linux-arm-kernel, linux-kernel

On Fri, Oct 8, 2021 at 5:20 PM Rob Herring <robh@kernel.org> wrote:
>
> On Fri, Oct 01, 2021 at 12:37:54PM -0500, Li Yang wrote:
> > On Fri, Oct 1, 2021 at 8:24 AM Rob Herring <robh+dt@kernel.org> wrote:
> > >
> > > On Thu, Sep 30, 2021 at 7:04 PM Li Yang <leoyang.li@nxp.com> wrote:
> > > >
> > > > When the binding was converted from txt to yaml, it actually added more
> > > > constrains than the original txt binding which was already used in many
> > > > in-tree DTSes.  Some of the newly added constrains are either not valid
> > > > or not neccessary.
> > >
> > > IMO, both of these should be fixed in the dts files.
> > >
> > > > Not all SoCs use ipg as the clock name for i2c.  There is no point in
> > > > having SoC integration information defined in i2c binding.  Remove the
> > > > clock name requirement in the schema.
> > >
> > > Any name you want is not fine. Your choices are remove clock-names,
> > > add all the names used, or change everyone to use 'ipg'.
> >
> > I understand that the name should be important as clocks are
> > referenced by name.  But since the i2c controller only has one clock ,
> > the name is never referenced in the driver.
>
> Then just remove 'clock-names' from the dts file.

Had thought the clock-names are mandatory, but it turns out not.
Removing it should be great.

>
> > If we really want to define the name, IMO, it should be from the
> > perspective of the i2c controller like "clkin" or "i2c" instead of the
> > "ipg" from the perspective of SoC integration which could be changing
> > with a different integration.  I can list both "i2c" and "ipg" for now
> > as a workaround though.
>
> $modulename for $foo-names always looks made up and pointless to me.
>
> >
> > >
> > > > The original txt binding didn't require the order of tx and rx for
> > > > dmas/dma-names.  Many in tree DTSes are already using the other order.
> > > > Both orders should just work fine.  Update the schema to allow both.
> > >
> > > Doesn't sound like a case where defining the order is challenging.
> >
> > No, it is not challenging.  But as dma channel is only referenced by
> > name instead of index.  I don't see too much benefit in enforcing the
> > order other than easier to create the schema.
>
> Easier is nice, and that's the 'DT way' is the other reason.

Ok.

Regards,
Leo

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2021-10-09  3:08 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01  0:04 [PATCH v2 00/16] Cleanup of LS1021a device trees Li Yang
2021-10-01  0:04 ` [PATCH v2 01/16] dt-bindings: arm: fsl: add ls1021a-tsn board Li Yang
2021-10-01  0:04 ` [PATCH v2 02/16] dt-bindings: i2c: imx: update schema to align with original txt binding Li Yang
2021-10-01 13:16   ` Rob Herring
2021-10-01 13:23   ` Rob Herring
2021-10-01 17:37     ` Li Yang
2021-10-08 22:20       ` Rob Herring
2021-10-09  3:08         ` Li Yang
2021-10-01  0:04 ` [PATCH v2 03/16] ARM: dts: ls1021a: change to use SPDX identifiers Li Yang
2021-10-01  0:04 ` [PATCH v2 04/16] ARM: dts: ls1021a-qds: Add node for QSPI flash Li Yang
2021-10-01  5:24   ` [EXT] " Kuldeep Singh
2021-10-01 20:08     ` Li Yang
2021-10-04  5:53       ` Kuldeep Singh
2021-10-01  0:04 ` [PATCH v2 05/16] ARM: dts: ls1021a: update pcie nodes for dt-schema check Li Yang
2021-10-01  0:04 ` [PATCH v2 06/16] ARM: dts: ls1021a: fix board compatible to follow binding schema Li Yang
2021-10-01  0:04 ` [PATCH v2 07/16] ARM: dts: ls1021a: breakup long values in thermal node Li Yang
2021-10-01  0:04 ` [PATCH v2 08/16] ARM: dts: ls1021a: disable ifc node by default Li Yang
2021-10-01  0:04 ` [PATCH v2 09/16] ARM: dts: ls1021a: remove regulators simple-bus Li Yang
2021-10-01  0:04 ` [PATCH v2 10/16] ARM: dts: ls1021a: fix memory node for schema check Li Yang
2021-10-01  0:04 ` [PATCH v2 11/16] ARM: dts: ls1021a: add #dma-cells to qdma node Li Yang
2021-10-01  0:04 ` [PATCH v2 12/16] ARM: dts: ls1021a: add #power-domain-cells for power-controller node Li Yang
2021-10-01  0:04 ` [PATCH v2 13/16] ARM: dts: ls1021a-qds: change fpga to simple-mfd device Li Yang
2021-10-01  0:04 ` [PATCH v2 14/16] ARM: dts: ls1021a-tsn: remove undocumented property "position" from mma8452 node Li Yang
2021-10-01  0:04 ` [PATCH v2 15/16] ARM: dts: ls1021a: move thermal-zones node out of soc/ Li Yang
2021-10-01  0:04 ` [PATCH v2 16/16] ARM: dts: ls1021a-tsn: use generic "jedec,spi-nor" compatible for flash Li Yang
2021-10-01  5:14   ` [EXT] " Kuldeep Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).