linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes
@ 2022-09-14  8:54 Arınç ÜNAL
  2022-09-14  8:54 ` [PATCH 01/10] dt-bindings: net: drop old mediatek bindings Arınç ÜNAL
                   ` (9 more replies)
  0 siblings, 10 replies; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL

Hello there!

This patch series removes old MediaTek bindings, improves mediatek,mt7530
and mt7621 memory controller bindings and improves mt7621 DTs.

Arınç ÜNAL (10):
  dt-bindings: net: drop old mediatek bindings
  dt-bindings: net: dsa: mediatek,mt7530: change mt7530 switch address
  dt-bindings: net: dsa: mediatek,mt7530: expand gpio-controller
    description
  dt-bindings: memory: mt7621: add syscon as compatible string
  mips: dts: ralink: mt7621: fix some dtc warnings
  mips: dts: ralink: mt7621: remove interrupt-parent from switch node
  mips: dts: ralink: mt7621: change phy-mode of gmac1 to rgmii
  mips: dts: ralink: mt7621: change mt7530 switch address
  mips: dts: ralink: mt7621: fix external phy on GB-PC2
  mips: dts: ralink: mt7621: add GB-PC2 LEDs

 .../mediatek,mt7621-memc.yaml                   |  6 +-
 .../bindings/net/dsa/mediatek,mt7530.yaml       | 34 ++++++-----
 .../bindings/net/mediatek,mt7620-gsw.txt        | 24 --------
 .../bindings/net/ralink,rt2880-net.txt          | 59 --------------------
 .../bindings/net/ralink,rt3050-esw.txt          | 30 ----------
 .../boot/dts/ralink/mt7621-gnubee-gb-pc1.dts    |  8 +--
 .../boot/dts/ralink/mt7621-gnubee-gb-pc2.dts    | 50 +++++++++++++----
 arch/mips/boot/dts/ralink/mt7621.dtsi           | 37 +++++-------
 8 files changed, 80 insertions(+), 168 deletions(-)



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 01/10] dt-bindings: net: drop old mediatek bindings
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-14 15:06   ` Rob Herring
  2022-09-14  8:54 ` [PATCH 02/10] dt-bindings: net: dsa: mediatek,mt7530: change mt7530 switch address Arınç ÜNAL
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL

Remove these old mediatek bindings which are not used.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 .../bindings/net/mediatek,mt7620-gsw.txt      | 24 --------
 .../bindings/net/ralink,rt2880-net.txt        | 59 -------------------
 .../bindings/net/ralink,rt3050-esw.txt        | 30 ----------
 3 files changed, 113 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/net/mediatek,mt7620-gsw.txt
 delete mode 100644 Documentation/devicetree/bindings/net/ralink,rt2880-net.txt
 delete mode 100644 Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt

diff --git a/Documentation/devicetree/bindings/net/mediatek,mt7620-gsw.txt b/Documentation/devicetree/bindings/net/mediatek,mt7620-gsw.txt
deleted file mode 100644
index 358fed2fab43..000000000000
--- a/Documentation/devicetree/bindings/net/mediatek,mt7620-gsw.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Mediatek Gigabit Switch
-=======================
-
-The mediatek gigabit switch can be found on Mediatek SoCs (mt7620, mt7621).
-
-Required properties:
-- compatible: Should be "mediatek,mt7620-gsw" or "mediatek,mt7621-gsw"
-- reg: Address and length of the register set for the device
-- interrupts: Should contain the gigabit switches interrupt
-- resets: Should contain the gigabit switches resets
-- reset-names: Should contain the reset names "gsw"
-
-Example:
-
-gsw@10110000 {
-	compatible = "ralink,mt7620-gsw";
-	reg = <0x10110000 8000>;
-
-	resets = <&rstctrl 23>;
-	reset-names = "gsw";
-
-	interrupt-parent = <&intc>;
-	interrupts = <17>;
-};
diff --git a/Documentation/devicetree/bindings/net/ralink,rt2880-net.txt b/Documentation/devicetree/bindings/net/ralink,rt2880-net.txt
deleted file mode 100644
index 9fe1a0a22e44..000000000000
--- a/Documentation/devicetree/bindings/net/ralink,rt2880-net.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-Ralink Frame Engine Ethernet controller
-=======================================
-
-The Ralink frame engine ethernet controller can be found on Ralink and
-Mediatek SoCs (RT288x, RT3x5x, RT366x, RT388x, rt5350, mt7620, mt7621, mt76x8).
-
-Depending on the SoC, there is a number of ports connected to the CPU port
-directly and/or via a (gigabit-)switch.
-
-* Ethernet controller node
-
-Required properties:
-- compatible: Should be one of "ralink,rt2880-eth", "ralink,rt3050-eth",
-  "ralink,rt3050-eth", "ralink,rt3883-eth", "ralink,rt5350-eth",
-  "mediatek,mt7620-eth", "mediatek,mt7621-eth"
-- reg: Address and length of the register set for the device
-- interrupts: Should contain the frame engines interrupt
-- resets: Should contain the frame engines resets
-- reset-names: Should contain the reset names "fe". If a switch is present
-  "esw" is also required.
-
-
-* Ethernet port node
-
-Required properties:
-- compatible: Should be "ralink,eth-port"
-- reg: The number of the physical port
-- phy-handle: reference to the node describing the phy
-
-Example:
-
-mdio-bus {
-	...
-	phy0: ethernet-phy@0 {
-		phy-mode = "mii";
-		reg = <0>;
-	};
-};
-
-ethernet@400000 {
-	compatible = "ralink,rt2880-eth";
-	reg = <0x00400000 10000>;
-
-	#address-cells = <1>;
-	#size-cells = <0>;
-
-	resets = <&rstctrl 18>;
-	reset-names = "fe";
-
-	interrupt-parent = <&cpuintc>;
-	interrupts = <5>;
-
-	port@0 {
-		compatible = "ralink,eth-port";
-		reg = <0>;
-		phy-handle = <&phy0>;
-	};
-
-};
diff --git a/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt b/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
deleted file mode 100644
index 87e315856efa..000000000000
--- a/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-Ralink Fast Ethernet Embedded Switch
-====================================
-
-The ralink fast ethernet embedded switch can be found on Ralink and Mediatek
-SoCs (RT3x5x, RT5350, MT76x8).
-
-Required properties:
-- compatible: Should be "ralink,rt3050-esw"
-- reg: Address and length of the register set for the device
-- interrupts: Should contain the embedded switches interrupt
-- resets: Should contain the embedded switches resets
-- reset-names: Should contain the reset names "esw"
-
-Optional properties:
-- ralink,portmap: can be used to choose if the default switch setup is
-  llllw or wllll
-- ralink,led_polarity: override the active high/low settings of the leds
-
-Example:
-
-esw@10110000 {
-	compatible = "ralink,rt3050-esw";
-	reg = <0x10110000 8000>;
-
-	resets = <&rstctrl 23>;
-	reset-names = "esw";
-
-	interrupt-parent = <&intc>;
-	interrupts = <17>;
-};
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 02/10] dt-bindings: net: dsa: mediatek,mt7530: change mt7530 switch address
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
  2022-09-14  8:54 ` [PATCH 01/10] dt-bindings: net: drop old mediatek bindings Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-14 15:07   ` Rob Herring
  2022-09-14  8:54 ` [PATCH 03/10] dt-bindings: net: dsa: mediatek,mt7530: expand gpio-controller description Arınç ÜNAL
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL, Sungbo Eo

In the case of muxing phy0 of the MT7530 switch, the switch and the phy
will have the same address on the mdio bus, 0. This causes the ethernet
driver to fail since devices on the mdio bus cannot share an address.

Any address can be used for the switch, therefore, change the switch
address to 0x1f.

Suggested-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 .../bindings/net/dsa/mediatek,mt7530.yaml     | 24 +++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index f9e7b6e20b35..2c73d13adf14 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -294,9 +294,9 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
 
-        switch@0 {
+        switch@1f {
             compatible = "mediatek,mt7530";
-            reg = <0>;
+            reg = <0x1f>;
 
             reset-gpios = <&pio 33 0>;
 
@@ -356,9 +356,9 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
 
-        switch@0 {
+        switch@1f {
             compatible = "mediatek,mt7530";
-            reg = <0>;
+            reg = <0x1f>;
 
             mediatek,mcm;
             resets = <&ethsys MT2701_ETHSYS_MCM_RST>;
@@ -486,9 +486,9 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
 
-        switch@0 {
+        switch@1f {
             compatible = "mediatek,mt7621";
-            reg = <0>;
+            reg = <0x1f>;
 
             mediatek,mcm;
             resets = <&sysc MT7621_RST_MCM>;
@@ -573,9 +573,9 @@ examples:
                 reg = <4>;
             };
 
-            switch@0 {
+            switch@1f {
                 compatible = "mediatek,mt7621";
-                reg = <0>;
+                reg = <0x1f>;
 
                 mediatek,mcm;
                 resets = <&sysc MT7621_RST_MCM>;
@@ -664,9 +664,9 @@ examples:
                 phy-mode = "rgmii";
             };
 
-            switch@0 {
+            switch@1f {
                 compatible = "mediatek,mt7621";
-                reg = <0>;
+                reg = <0x1f>;
 
                 mediatek,mcm;
                 resets = <&sysc MT7621_RST_MCM>;
@@ -745,9 +745,9 @@ examples:
                 phy-mode = "rgmii";
             };
 
-            switch@0 {
+            switch@1f {
                 compatible = "mediatek,mt7621";
-                reg = <0>;
+                reg = <0x1f>;
 
                 mediatek,mcm;
                 resets = <&sysc MT7621_RST_MCM>;
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 03/10] dt-bindings: net: dsa: mediatek,mt7530: expand gpio-controller description
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
  2022-09-14  8:54 ` [PATCH 01/10] dt-bindings: net: drop old mediatek bindings Arınç ÜNAL
  2022-09-14  8:54 ` [PATCH 02/10] dt-bindings: net: dsa: mediatek,mt7530: change mt7530 switch address Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-14 15:08   ` Rob Herring
  2022-09-14  8:54 ` [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string Arınç ÜNAL
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL

Expand the description of the gpio-controller property to include the
controllable pins of the MT7530 switch.

The gpio-controller property is only used for the MT7530 switch. Therefore,
invalidate it for the MT7531 switch.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
index 2c73d13adf14..3ec4fffec780 100644
--- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
@@ -104,7 +104,14 @@ properties:
   gpio-controller:
     type: boolean
     description:
-      If defined, MT7530's LED controller will run on GPIO mode.
+      If defined, LED controller of the MT7530 switch will run on GPIO mode.
+
+      There are 15 controllable pins.
+      port 0 LED 0..2 as GPIO 0..2
+      port 1 LED 0..2 as GPIO 3..5
+      port 2 LED 0..2 as GPIO 6..8
+      port 3 LED 0..2 as GPIO 9..11
+      port 4 LED 0..2 as GPIO 12..14
 
   "#interrupt-cells":
     const: 1
@@ -272,6 +279,7 @@ allOf:
     then:
       $ref: "#/$defs/mt7531-dsa-port"
       properties:
+        gpio-controller: false
         mediatek,mcm: false
 
   - if:
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
                   ` (2 preceding siblings ...)
  2022-09-14  8:54 ` [PATCH 03/10] dt-bindings: net: dsa: mediatek,mt7530: expand gpio-controller description Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-14  9:03   ` Sergio Paracuellos
  2022-09-14 15:14   ` Rob Herring
  2022-09-14  8:54 ` [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings Arınç ÜNAL
                   ` (5 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL

Add syscon as a constant string on the compatible property as it's required
for the SoC to work. Update the example accordingly.

Fixes: 5278e4a181ff ("dt-bindings: memory: add binding for Mediatek's MT7621 SDRAM memory controller")
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 .../bindings/memory-controllers/mediatek,mt7621-memc.yaml   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/memory-controllers/mediatek,mt7621-memc.yaml b/Documentation/devicetree/bindings/memory-controllers/mediatek,mt7621-memc.yaml
index 85e02854f083..6ccdaf99c778 100644
--- a/Documentation/devicetree/bindings/memory-controllers/mediatek,mt7621-memc.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/mediatek,mt7621-memc.yaml
@@ -11,7 +11,9 @@ maintainers:
 
 properties:
   compatible:
-    const: mediatek,mt7621-memc
+    items:
+      - const: mediatek,mt7621-memc
+      - const: syscon
 
   reg:
     maxItems: 1
@@ -25,6 +27,6 @@ additionalProperties: false
 examples:
   - |
     memory-controller@5000 {
-        compatible = "mediatek,mt7621-memc";
+        compatible = "mediatek,mt7621-memc", "syscon";
         reg = <0x5000 0x1000>;
     };
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
                   ` (3 preceding siblings ...)
  2022-09-14  8:54 ` [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-14  9:14   ` Sergio Paracuellos
  2022-09-14  8:54 ` [PATCH 06/10] mips: dts: ralink: mt7621: remove interrupt-parent from switch node Arınç ÜNAL
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL

Fix the dtc warnings below.

/cpus/cpu@0: failed to match any schema with compatible: ['mips,mips1004Kc']
/cpus/cpu@1: failed to match any schema with compatible: ['mips,mips1004Kc']
uartlite@c00: $nodename:0: 'uartlite@c00' does not match '^serial(@.*)?$'
	From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
uartlite@c00: Unevaluated properties are not allowed ('clock-names' was unexpected)
	From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
sdhci@1e130000: $nodename:0: 'sdhci@1e130000' does not match '^mmc(@.*)?$'
	From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
sdhci@1e130000: Unevaluated properties are not allowed ('bus-width', 'cap-mmc-highspeed', 'cap-sd-highspeed', 'disable-wp', 'max-frequency', 'vmmc-supply', 'vqmmc-supply' were unexpected)
	From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
xhci@1e1c0000: $nodename:0: 'xhci@1e1c0000' does not match '^usb(@.*)?'
	From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
xhci@1e1c0000: compatible: ['mediatek,mt8173-xhci'] is too short
	From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
switch0@0: $nodename:0: 'switch0@0' does not match '^(ethernet-)?switch(@.*)?$'
	From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
port@1: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
	From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
port@2: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
	From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
port@3: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
	From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml

- Remove "mips,mips1004Kc" compatible string from the cpu nodes. This
doesn't exist anywhere.
- Change "memc: syscon@5000" to "memc: memory-controller@5000".
- Change "uartlite: uartlite@c00" to "serial0: serial@c00" and remove the
aliases node.
- Remove "clock-names" from the serial0 node. The property doesn't exist on
the 8250.yaml schema.
- Change "sdhci: sdhci@1e130000" to "mmc: mmc@1e130000".
- Change "xhci: xhci@1e1c0000" to "usb: usb@1e1c0000".
- Add "mediatek,mtk-xhci" as the second compatible string on the usb node.
- Change "switch0: switch0@0" to "switch0: switch@0"
- Change "off" to "disabled" for disabled nodes.

Remaining warnings are caused by the lack of json-schema documentation.

/cpuintc: failed to match any schema with compatible: ['mti,cpu-interrupt-controller']
/palmbus@1e000000/wdt@100: failed to match any schema with compatible: ['mediatek,mt7621-wdt']
/palmbus@1e000000/i2c@900: failed to match any schema with compatible: ['mediatek,mt7621-i2c']
/palmbus@1e000000/spi@b00: failed to match any schema with compatible: ['ralink,mt7621-spi']
/ethernet@1e100000: failed to match any schema with compatible: ['mediatek,mt7621-eth']

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 .../boot/dts/ralink/mt7621-gnubee-gb-pc1.dts  |  2 +-
 .../boot/dts/ralink/mt7621-gnubee-gb-pc2.dts  |  2 +-
 arch/mips/boot/dts/ralink/mt7621.dtsi         | 32 +++++++------------
 3 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
index 24eebc5a85b1..6ecb8165efe8 100644
--- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
+++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
@@ -53,7 +53,7 @@ system {
 	};
 };
 
-&sdhci {
+&mmc {
 	status = "okay";
 };
 
diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
index 34006e667780..2e534ea5bab7 100644
--- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
+++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
@@ -37,7 +37,7 @@ key-reset {
 	};
 };
 
-&sdhci {
+&mmc {
 	status = "okay";
 };
 
diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
index ee46ace0bcc1..9302bdc04510 100644
--- a/arch/mips/boot/dts/ralink/mt7621.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
@@ -15,13 +15,11 @@ cpus {
 
 		cpu@0 {
 			device_type = "cpu";
-			compatible = "mips,mips1004Kc";
 			reg = <0>;
 		};
 
 		cpu@1 {
 			device_type = "cpu";
-			compatible = "mips,mips1004Kc";
 			reg = <1>;
 		};
 	};
@@ -33,11 +31,6 @@ cpuintc: cpuintc {
 		compatible = "mti,cpu-interrupt-controller";
 	};
 
-	aliases {
-		serial0 = &uartlite;
-	};
-
-
 	mmc_fixed_3v3: regulator-3v3 {
 		compatible = "regulator-fixed";
 		regulator-name = "mmc_power";
@@ -110,17 +103,16 @@ i2c: i2c@900 {
 			pinctrl-0 = <&i2c_pins>;
 		};
 
-		memc: syscon@5000 {
+		memc: memory-controller@5000 {
 			compatible = "mediatek,mt7621-memc", "syscon";
 			reg = <0x5000 0x1000>;
 		};
 
-		uartlite: uartlite@c00 {
+		serial0: serial@c00 {
 			compatible = "ns16550a";
 			reg = <0xc00 0x100>;
 
 			clocks = <&sysc MT7621_CLK_UART1>;
-			clock-names = "uart1";
 
 			interrupt-parent = <&gic>;
 			interrupts = <GIC_SHARED 26 IRQ_TYPE_LEVEL_HIGH>;
@@ -236,7 +228,7 @@ pinmux {
 		};
 	};
 
-	sdhci: sdhci@1e130000 {
+	mmc: mmc@1e130000 {
 		status = "disabled";
 
 		compatible = "mediatek,mt7620-mmc";
@@ -262,8 +254,8 @@ sdhci: sdhci@1e130000 {
 		interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
 	};
 
-	xhci: xhci@1e1c0000 {
-		compatible = "mediatek,mt8173-xhci";
+	usb: usb@1e1c0000 {
+		compatible = "mediatek,mt8173-xhci", "mediatek,mtk-xhci";
 		reg = <0x1e1c0000 0x1000
 		       0x1e1d0700 0x0100>;
 		reg-names = "mac", "ippc";
@@ -338,7 +330,7 @@ fixed-link {
 		gmac1: mac@1 {
 			compatible = "mediatek,eth-mac";
 			reg = <1>;
-			status = "off";
+			status = "disabled";
 			phy-mode = "rgmii-rxid";
 		};
 
@@ -346,7 +338,7 @@ mdio: mdio-bus {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			switch0: switch0@0 {
+			switch0: switch@0 {
 				compatible = "mediatek,mt7621";
 				reg = <0>;
 				mediatek,mcm;
@@ -362,31 +354,31 @@ ports {
 					#size-cells = <0>;
 
 					port@0 {
-						status = "off";
+						status = "disabled";
 						reg = <0>;
 						label = "lan0";
 					};
 
 					port@1 {
-						status = "off";
+						status = "disabled";
 						reg = <1>;
 						label = "lan1";
 					};
 
 					port@2 {
-						status = "off";
+						status = "disabled";
 						reg = <2>;
 						label = "lan2";
 					};
 
 					port@3 {
-						status = "off";
+						status = "disabled";
 						reg = <3>;
 						label = "lan3";
 					};
 
 					port@4 {
-						status = "off";
+						status = "disabled";
 						reg = <4>;
 						label = "lan4";
 					};
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 06/10] mips: dts: ralink: mt7621: remove interrupt-parent from switch node
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
                   ` (4 preceding siblings ...)
  2022-09-14  8:54 ` [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-14  9:15   ` Sergio Paracuellos
  2022-09-14  8:54 ` [PATCH 07/10] mips: dts: ralink: mt7621: change phy-mode of gmac1 to rgmii Arınç ÜNAL
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL

The interrupt-parent property is inherited from the ethernet node as it's a
parent node of the switch node. Therefore, remove the unnecessary
interrupt-parent property from the switch node.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 arch/mips/boot/dts/ralink/mt7621.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
index 9302bdc04510..e9203fec3fdf 100644
--- a/arch/mips/boot/dts/ralink/mt7621.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
@@ -346,7 +346,6 @@ switch0: switch@0 {
 				reset-names = "mcm";
 				interrupt-controller;
 				#interrupt-cells = <1>;
-				interrupt-parent = <&gic>;
 				interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
 
 				ports {
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 07/10] mips: dts: ralink: mt7621: change phy-mode of gmac1 to rgmii
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
                   ` (5 preceding siblings ...)
  2022-09-14  8:54 ` [PATCH 06/10] mips: dts: ralink: mt7621: remove interrupt-parent from switch node Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-14  9:17   ` Sergio Paracuellos
  2022-09-14  8:54 ` [PATCH 08/10] mips: dts: ralink: mt7621: change mt7530 switch address Arınç ÜNAL
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL

Change phy-mode of gmac1 to rgmii on mt7621.dtsi. Same code path is
followed for delayed rgmii and rgmii phy-mode on mtk_eth_soc.c.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 arch/mips/boot/dts/ralink/mt7621.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
index e9203fec3fdf..50799bb1cc5d 100644
--- a/arch/mips/boot/dts/ralink/mt7621.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
@@ -331,7 +331,7 @@ gmac1: mac@1 {
 			compatible = "mediatek,eth-mac";
 			reg = <1>;
 			status = "disabled";
-			phy-mode = "rgmii-rxid";
+			phy-mode = "rgmii";
 		};
 
 		mdio: mdio-bus {
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 08/10] mips: dts: ralink: mt7621: change mt7530 switch address
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
                   ` (6 preceding siblings ...)
  2022-09-14  8:54 ` [PATCH 07/10] mips: dts: ralink: mt7621: change phy-mode of gmac1 to rgmii Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-15  5:09   ` Sergio Paracuellos
  2022-09-14  8:54 ` [PATCH 09/10] mips: dts: ralink: mt7621: fix external phy on GB-PC2 Arınç ÜNAL
  2022-09-14  8:54 ` [PATCH 10/10] mips: dts: ralink: mt7621: add GB-PC2 LEDs Arınç ÜNAL
  9 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL, Sungbo Eo

In the case of muxing phy0 of the MT7530 switch, the switch and the phy
will have the same address on the mdio bus, 0. This causes the ethernet
driver to fail since devices on the mdio bus cannot share an address.

Any address can be used for the switch, therefore, change the switch
address to 0x1f.

Suggested-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 arch/mips/boot/dts/ralink/mt7621.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
index 50799bb1cc5d..206078bd2284 100644
--- a/arch/mips/boot/dts/ralink/mt7621.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
@@ -338,9 +338,9 @@ mdio: mdio-bus {
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			switch0: switch@0 {
+			switch0: switch@1f {
 				compatible = "mediatek,mt7621";
-				reg = <0>;
+				reg = <0x1f>;
 				mediatek,mcm;
 				resets = <&sysc MT7621_RST_MCM>;
 				reset-names = "mcm";
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 09/10] mips: dts: ralink: mt7621: fix external phy on GB-PC2
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
                   ` (7 preceding siblings ...)
  2022-09-14  8:54 ` [PATCH 08/10] mips: dts: ralink: mt7621: change mt7530 switch address Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-15  5:09   ` Sergio Paracuellos
  2022-09-14  8:54 ` [PATCH 10/10] mips: dts: ralink: mt7621: add GB-PC2 LEDs Arınç ÜNAL
  9 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL

The address of the external phy on the mdio bus is 5. Update the devicetree
for GB-PC2 accordingly.

Fixes: 5bc148649cf3 ("staging: mt7621-dts: fix GB-PC2 devicetree")
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
index 2e534ea5bab7..5f52193a4c37 100644
--- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
+++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
@@ -83,12 +83,12 @@ &pcie {
 
 &gmac1 {
 	status = "okay";
-	phy-handle = <&ethphy7>;
+	phy-handle = <&ethphy5>;
 };
 
 &mdio {
-	ethphy7: ethernet-phy@7 {
-		reg = <7>;
+	ethphy5: ethernet-phy@5 {
+		reg = <5>;
 		phy-mode = "rgmii-rxid";
 	};
 };
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 10/10] mips: dts: ralink: mt7621: add GB-PC2 LEDs
  2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
                   ` (8 preceding siblings ...)
  2022-09-14  8:54 ` [PATCH 09/10] mips: dts: ralink: mt7621: fix external phy on GB-PC2 Arınç ÜNAL
@ 2022-09-14  8:54 ` Arınç ÜNAL
  2022-09-15  5:08   ` Sergio Paracuellos
  9 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14  8:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu
  Cc: netdev, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-mips, Arınç ÜNAL, Petr Louda

Add the missing LEDs for GB-PC2. The ethblack-green, ethblue-green, power
and system LEDs weren't added previously, because they don't exist on the
device schematics. Tests on a GB-PC2 by me and Petr proved otherwise.

The i2c bus cannot be used on GB-PC2 as its pins are wired to LEDs instead,
and GB-PC1 does not use it. Therefore, do not enable it on both devices.

Link: https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf
Tested-by: Petr Louda <petr.louda@outlook.cz>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 .../boot/dts/ralink/mt7621-gnubee-gb-pc1.dts  |  6 ---
 .../boot/dts/ralink/mt7621-gnubee-gb-pc2.dts  | 42 ++++++++++++++++---
 2 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
index 6ecb8165efe8..0128bd8fa7ed 100644
--- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
+++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
@@ -20,12 +20,6 @@ chosen {
 		bootargs = "console=ttyS0,57600";
 	};
 
-	palmbus: palmbus@1e000000 {
-		i2c@900 {
-			status = "okay";
-		};
-	};
-
 	gpio-keys {
 		compatible = "gpio-keys";
 
diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
index 5f52193a4c37..7515555388ae 100644
--- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
+++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
@@ -20,12 +20,6 @@ chosen {
 		bootargs = "console=ttyS0,57600";
 	};
 
-	palmbus: palmbus@1e000000 {
-		i2c@900 {
-			status = "okay";
-		};
-	};
-
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -35,6 +29,42 @@ key-reset {
 			linux,code = <KEY_RESTART>;
 		};
 	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		ethblack-green {
+			label = "green:ethblack";
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+		};
+
+		ethblue-green {
+			label = "green:ethblue";
+			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+		};
+
+		ethyellow-green {
+			label = "green:ethyellow";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+
+		ethyellow-orange {
+			label = "orange:ethyellow";
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+		};
+
+		power {
+			label = "green:power";
+			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-on";
+		};
+
+		system {
+			label = "green:system";
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "disk-activity";
+		};
+	};
 };
 
 &mmc {
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string
  2022-09-14  8:54 ` [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string Arınç ÜNAL
@ 2022-09-14  9:03   ` Sergio Paracuellos
  2022-09-14 15:14   ` Rob Herring
  1 sibling, 0 replies; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-14  9:03 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

On Wed, Sep 14, 2022 at 10:55 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> Add syscon as a constant string on the compatible property as it's required
> for the SoC to work. Update the example accordingly.
>
> Fixes: 5278e4a181ff ("dt-bindings: memory: add binding for Mediatek's MT7621 SDRAM memory controller")
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  .../bindings/memory-controllers/mediatek,mt7621-memc.yaml   | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
    Sergio Paracuellos

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings
  2022-09-14  8:54 ` [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings Arınç ÜNAL
@ 2022-09-14  9:14   ` Sergio Paracuellos
  2022-09-14 10:45     ` Arınç ÜNAL
  0 siblings, 1 reply; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-14  9:14 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

Hi Arinc,

On Wed, Sep 14, 2022 at 10:55 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> Fix the dtc warnings below.
>
> /cpus/cpu@0: failed to match any schema with compatible: ['mips,mips1004Kc']
> /cpus/cpu@1: failed to match any schema with compatible: ['mips,mips1004Kc']
> uartlite@c00: $nodename:0: 'uartlite@c00' does not match '^serial(@.*)?$'
>         From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
> uartlite@c00: Unevaluated properties are not allowed ('clock-names' was unexpected)
>         From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
> sdhci@1e130000: $nodename:0: 'sdhci@1e130000' does not match '^mmc(@.*)?$'
>         From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> sdhci@1e130000: Unevaluated properties are not allowed ('bus-width', 'cap-mmc-highspeed', 'cap-sd-highspeed', 'disable-wp', 'max-frequency', 'vmmc-supply', 'vqmmc-supply' were unexpected)
>         From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> xhci@1e1c0000: $nodename:0: 'xhci@1e1c0000' does not match '^usb(@.*)?'
>         From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> xhci@1e1c0000: compatible: ['mediatek,mt8173-xhci'] is too short
>         From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> switch0@0: $nodename:0: 'switch0@0' does not match '^(ethernet-)?switch(@.*)?$'
>         From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> port@1: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
>         From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
> port@2: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
>         From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
> port@3: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
>         From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
>
> - Remove "mips,mips1004Kc" compatible string from the cpu nodes. This
> doesn't exist anywhere.
> - Change "memc: syscon@5000" to "memc: memory-controller@5000".
> - Change "uartlite: uartlite@c00" to "serial0: serial@c00" and remove the
> aliases node.
> - Remove "clock-names" from the serial0 node. The property doesn't exist on
> the 8250.yaml schema.
> - Change "sdhci: sdhci@1e130000" to "mmc: mmc@1e130000".
> - Change "xhci: xhci@1e1c0000" to "usb: usb@1e1c0000".
> - Add "mediatek,mtk-xhci" as the second compatible string on the usb node.
> - Change "switch0: switch0@0" to "switch0: switch@0"
> - Change "off" to "disabled" for disabled nodes.
>
> Remaining warnings are caused by the lack of json-schema documentation.
>
> /cpuintc: failed to match any schema with compatible: ['mti,cpu-interrupt-controller']
> /palmbus@1e000000/wdt@100: failed to match any schema with compatible: ['mediatek,mt7621-wdt']
> /palmbus@1e000000/i2c@900: failed to match any schema with compatible: ['mediatek,mt7621-i2c']
> /palmbus@1e000000/spi@b00: failed to match any schema with compatible: ['ralink,mt7621-spi']
> /ethernet@1e100000: failed to match any schema with compatible: ['mediatek,mt7621-eth']
>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  .../boot/dts/ralink/mt7621-gnubee-gb-pc1.dts  |  2 +-
>  .../boot/dts/ralink/mt7621-gnubee-gb-pc2.dts  |  2 +-
>  arch/mips/boot/dts/ralink/mt7621.dtsi         | 32 +++++++------------
>  3 files changed, 14 insertions(+), 22 deletions(-)
>
> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
> index 24eebc5a85b1..6ecb8165efe8 100644
> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
> @@ -53,7 +53,7 @@ system {
>         };
>  };
>
> -&sdhci {
> +&mmc {
>         status = "okay";
>  };
>
> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
> index 34006e667780..2e534ea5bab7 100644
> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
> @@ -37,7 +37,7 @@ key-reset {
>         };
>  };
>
> -&sdhci {
> +&mmc {
>         status = "okay";
>  };
>
> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
> index ee46ace0bcc1..9302bdc04510 100644
> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
> @@ -15,13 +15,11 @@ cpus {
>
>                 cpu@0 {
>                         device_type = "cpu";
> -                       compatible = "mips,mips1004Kc";
>                         reg = <0>;
>                 };
>
>                 cpu@1 {
>                         device_type = "cpu";
> -                       compatible = "mips,mips1004Kc";
>                         reg = <1>;
>                 };
>         };

Instead of removing this, since compatible is correct here, I think a
cpus yaml file needs to be added to properly define mips CPU's but
compatible strings using all around the sources are a bit messy. Take
a look of how is this done for arm [0]

> @@ -33,11 +31,6 @@ cpuintc: cpuintc {
>                 compatible = "mti,cpu-interrupt-controller";
>         };
>
> -       aliases {
> -               serial0 = &uartlite;
> -       };
> -
> -
>         mmc_fixed_3v3: regulator-3v3 {
>                 compatible = "regulator-fixed";
>                 regulator-name = "mmc_power";
> @@ -110,17 +103,16 @@ i2c: i2c@900 {
>                         pinctrl-0 = <&i2c_pins>;
>                 };
>
> -               memc: syscon@5000 {
> +               memc: memory-controller@5000 {
>                         compatible = "mediatek,mt7621-memc", "syscon";
>                         reg = <0x5000 0x1000>;
>                 };
>

I think syscon nodes need to use 'syscon' in the node name, but I am
not 100% sure.

> -               uartlite: uartlite@c00 {
> +               serial0: serial@c00 {
>                         compatible = "ns16550a";
>                         reg = <0xc00 0x100>;
>
>                         clocks = <&sysc MT7621_CLK_UART1>;
> -                       clock-names = "uart1";
>
>                         interrupt-parent = <&gic>;
>                         interrupts = <GIC_SHARED 26 IRQ_TYPE_LEVEL_HIGH>;
> @@ -236,7 +228,7 @@ pinmux {
>                 };
>         };
>
> -       sdhci: sdhci@1e130000 {
> +       mmc: mmc@1e130000 {
>                 status = "disabled";
>
>                 compatible = "mediatek,mt7620-mmc";
> @@ -262,8 +254,8 @@ sdhci: sdhci@1e130000 {
>                 interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
>         };
>
> -       xhci: xhci@1e1c0000 {
> -               compatible = "mediatek,mt8173-xhci";
> +       usb: usb@1e1c0000 {
> +               compatible = "mediatek,mt8173-xhci", "mediatek,mtk-xhci";
>                 reg = <0x1e1c0000 0x1000
>                        0x1e1d0700 0x0100>;
>                 reg-names = "mac", "ippc";
> @@ -338,7 +330,7 @@ fixed-link {
>                 gmac1: mac@1 {
>                         compatible = "mediatek,eth-mac";
>                         reg = <1>;
> -                       status = "off";
> +                       status = "disabled";
>                         phy-mode = "rgmii-rxid";
>                 };
>
> @@ -346,7 +338,7 @@ mdio: mdio-bus {
>                         #address-cells = <1>;
>                         #size-cells = <0>;
>
> -                       switch0: switch0@0 {
> +                       switch0: switch@0 {
>                                 compatible = "mediatek,mt7621";
>                                 reg = <0>;
>                                 mediatek,mcm;
> @@ -362,31 +354,31 @@ ports {
>                                         #size-cells = <0>;
>
>                                         port@0 {
> -                                               status = "off";
> +                                               status = "disabled";
>                                                 reg = <0>;
>                                                 label = "lan0";
>                                         };
>
>                                         port@1 {
> -                                               status = "off";
> +                                               status = "disabled";
>                                                 reg = <1>;
>                                                 label = "lan1";
>                                         };
>
>                                         port@2 {
> -                                               status = "off";
> +                                               status = "disabled";
>                                                 reg = <2>;
>                                                 label = "lan2";
>                                         };
>
>                                         port@3 {
> -                                               status = "off";
> +                                               status = "disabled";
>                                                 reg = <3>;
>                                                 label = "lan3";
>                                         };
>
>                                         port@4 {
> -                                               status = "off";
> +                                               status = "disabled";
>                                                 reg = <4>;
>                                                 label = "lan4";
>                                         };
> --
> 2.34.1
>

Best regards,
    Sergio Paracuellos

[0]: https://elixir.bootlin.com/linux/v6.0-rc5/source/Documentation/devicetree/bindings/arm/cpus.yaml

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 06/10] mips: dts: ralink: mt7621: remove interrupt-parent from switch node
  2022-09-14  8:54 ` [PATCH 06/10] mips: dts: ralink: mt7621: remove interrupt-parent from switch node Arınç ÜNAL
@ 2022-09-14  9:15   ` Sergio Paracuellos
  0 siblings, 0 replies; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-14  9:15 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

On Wed, Sep 14, 2022 at 10:56 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> The interrupt-parent property is inherited from the ethernet node as it's a
> parent node of the switch node. Therefore, remove the unnecessary
> interrupt-parent property from the switch node.
>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/mips/boot/dts/ralink/mt7621.dtsi | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 07/10] mips: dts: ralink: mt7621: change phy-mode of gmac1 to rgmii
  2022-09-14  8:54 ` [PATCH 07/10] mips: dts: ralink: mt7621: change phy-mode of gmac1 to rgmii Arınç ÜNAL
@ 2022-09-14  9:17   ` Sergio Paracuellos
  0 siblings, 0 replies; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-14  9:17 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

On Wed, Sep 14, 2022 at 10:56 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> Change phy-mode of gmac1 to rgmii on mt7621.dtsi. Same code path is
> followed for delayed rgmii and rgmii phy-mode on mtk_eth_soc.c.
>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/mips/boot/dts/ralink/mt7621.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings
  2022-09-14  9:14   ` Sergio Paracuellos
@ 2022-09-14 10:45     ` Arınç ÜNAL
  2022-09-15  3:30       ` Sergio Paracuellos
  0 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14 10:45 UTC (permalink / raw)
  To: Sergio Paracuellos, Thomas Bogendoerfer
  Cc: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Greg Kroah-Hartman, Sean Wang, Landen Chao, DENG Qingfang,
	erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

Hi Sergio,

On 14.09.2022 12:14, Sergio Paracuellos wrote:
> Hi Arinc,
> 
> On Wed, Sep 14, 2022 at 10:55 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>>
>> Fix the dtc warnings below.
>>
>> /cpus/cpu@0: failed to match any schema with compatible: ['mips,mips1004Kc']
>> /cpus/cpu@1: failed to match any schema with compatible: ['mips,mips1004Kc']
>> uartlite@c00: $nodename:0: 'uartlite@c00' does not match '^serial(@.*)?$'
>>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
>> uartlite@c00: Unevaluated properties are not allowed ('clock-names' was unexpected)
>>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
>> sdhci@1e130000: $nodename:0: 'sdhci@1e130000' does not match '^mmc(@.*)?$'
>>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>> sdhci@1e130000: Unevaluated properties are not allowed ('bus-width', 'cap-mmc-highspeed', 'cap-sd-highspeed', 'disable-wp', 'max-frequency', 'vmmc-supply', 'vqmmc-supply' were unexpected)
>>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>> xhci@1e1c0000: $nodename:0: 'xhci@1e1c0000' does not match '^usb(@.*)?'
>>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
>> xhci@1e1c0000: compatible: ['mediatek,mt8173-xhci'] is too short
>>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
>> switch0@0: $nodename:0: 'switch0@0' does not match '^(ethernet-)?switch(@.*)?$'
>>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>> port@1: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
>>          From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
>> port@2: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
>>          From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
>> port@3: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
>>          From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
>>
>> - Remove "mips,mips1004Kc" compatible string from the cpu nodes. This
>> doesn't exist anywhere.
>> - Change "memc: syscon@5000" to "memc: memory-controller@5000".
>> - Change "uartlite: uartlite@c00" to "serial0: serial@c00" and remove the
>> aliases node.
>> - Remove "clock-names" from the serial0 node. The property doesn't exist on
>> the 8250.yaml schema.
>> - Change "sdhci: sdhci@1e130000" to "mmc: mmc@1e130000".
>> - Change "xhci: xhci@1e1c0000" to "usb: usb@1e1c0000".
>> - Add "mediatek,mtk-xhci" as the second compatible string on the usb node.
>> - Change "switch0: switch0@0" to "switch0: switch@0"
>> - Change "off" to "disabled" for disabled nodes.
>>
>> Remaining warnings are caused by the lack of json-schema documentation.
>>
>> /cpuintc: failed to match any schema with compatible: ['mti,cpu-interrupt-controller']
>> /palmbus@1e000000/wdt@100: failed to match any schema with compatible: ['mediatek,mt7621-wdt']
>> /palmbus@1e000000/i2c@900: failed to match any schema with compatible: ['mediatek,mt7621-i2c']
>> /palmbus@1e000000/spi@b00: failed to match any schema with compatible: ['ralink,mt7621-spi']
>> /ethernet@1e100000: failed to match any schema with compatible: ['mediatek,mt7621-eth']
>>
>> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
>> ---
>>   .../boot/dts/ralink/mt7621-gnubee-gb-pc1.dts  |  2 +-
>>   .../boot/dts/ralink/mt7621-gnubee-gb-pc2.dts  |  2 +-
>>   arch/mips/boot/dts/ralink/mt7621.dtsi         | 32 +++++++------------
>>   3 files changed, 14 insertions(+), 22 deletions(-)
>>
>> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
>> index 24eebc5a85b1..6ecb8165efe8 100644
>> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
>> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
>> @@ -53,7 +53,7 @@ system {
>>          };
>>   };
>>
>> -&sdhci {
>> +&mmc {
>>          status = "okay";
>>   };
>>
>> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
>> index 34006e667780..2e534ea5bab7 100644
>> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
>> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
>> @@ -37,7 +37,7 @@ key-reset {
>>          };
>>   };
>>
>> -&sdhci {
>> +&mmc {
>>          status = "okay";
>>   };
>>
>> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
>> index ee46ace0bcc1..9302bdc04510 100644
>> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
>> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
>> @@ -15,13 +15,11 @@ cpus {
>>
>>                  cpu@0 {
>>                          device_type = "cpu";
>> -                       compatible = "mips,mips1004Kc";
>>                          reg = <0>;
>>                  };
>>
>>                  cpu@1 {
>>                          device_type = "cpu";
>> -                       compatible = "mips,mips1004Kc";
>>                          reg = <1>;
>>                  };
>>          };
> 
> Instead of removing this, since compatible is correct here, I think a
> cpus yaml file needs to be added to properly define mips CPU's but
> compatible strings using all around the sources are a bit messy. Take
> a look of how is this done for arm [0]

I did investigate the arm bindings beforehand. I've seen that some of 
the strings are also checked by code. I don't see the mips strings used 
anywhere but DTs so I had decided to remove it here. I guess we can make 
a basic binding to list the mips processor cores.

What do you think Thomas?

> 
>> @@ -33,11 +31,6 @@ cpuintc: cpuintc {
>>                  compatible = "mti,cpu-interrupt-controller";
>>          };
>>
>> -       aliases {
>> -               serial0 = &uartlite;
>> -       };
>> -
>> -
>>          mmc_fixed_3v3: regulator-3v3 {
>>                  compatible = "regulator-fixed";
>>                  regulator-name = "mmc_power";
>> @@ -110,17 +103,16 @@ i2c: i2c@900 {
>>                          pinctrl-0 = <&i2c_pins>;
>>                  };
>>
>> -               memc: syscon@5000 {
>> +               memc: memory-controller@5000 {
>>                          compatible = "mediatek,mt7621-memc", "syscon";
>>                          reg = <0x5000 0x1000>;
>>                  };
>>
> 
> I think syscon nodes need to use 'syscon' in the node name, but I am
> not 100% sure.

I've tested this patch series on my GB-PC2, it currently works fine. 
Also, DT binding for MT7621 memory controller uses memory-controller on 
the example so I guess it's fine?

Arınç

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 01/10] dt-bindings: net: drop old mediatek bindings
  2022-09-14  8:54 ` [PATCH 01/10] dt-bindings: net: drop old mediatek bindings Arınç ÜNAL
@ 2022-09-14 15:06   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-09-14 15:06 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Sergio Paracuellos, linux-mediatek, Thomas Bogendoerfer,
	linux-arm-kernel, Jakub Kicinski, Sean Wang, erkin.bozoglu,
	Vivien Didelot, Florian Fainelli, Rob Herring, Landen Chao,
	netdev, DENG Qingfang, Paolo Abeni, Andrew Lunn, Vladimir Oltean,
	devicetree, Matthias Brugger, David S . Miller, Eric Dumazet,
	Greg Kroah-Hartman, linux-mips, Krzysztof Kozlowski,
	linux-kernel

On Wed, 14 Sep 2022 11:54:42 +0300, Arınç ÜNAL wrote:
> Remove these old mediatek bindings which are not used.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  .../bindings/net/mediatek,mt7620-gsw.txt      | 24 --------
>  .../bindings/net/ralink,rt2880-net.txt        | 59 -------------------
>  .../bindings/net/ralink,rt3050-esw.txt        | 30 ----------
>  3 files changed, 113 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/net/mediatek,mt7620-gsw.txt
>  delete mode 100644 Documentation/devicetree/bindings/net/ralink,rt2880-net.txt
>  delete mode 100644 Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
> 

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 02/10] dt-bindings: net: dsa: mediatek,mt7530: change mt7530 switch address
  2022-09-14  8:54 ` [PATCH 02/10] dt-bindings: net: dsa: mediatek,mt7530: change mt7530 switch address Arınç ÜNAL
@ 2022-09-14 15:07   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-09-14 15:07 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: David S . Miller, Sungbo Eo, Eric Dumazet, Vladimir Oltean,
	Sergio Paracuellos, Krzysztof Kozlowski, linux-mips, devicetree,
	netdev, Andrew Lunn, linux-kernel, DENG Qingfang, Vivien Didelot,
	Paolo Abeni, erkin.bozoglu, Matthias Brugger, Landen Chao,
	linux-arm-kernel, Florian Fainelli, Thomas Bogendoerfer,
	Rob Herring, Greg Kroah-Hartman, Jakub Kicinski, Sean Wang,
	linux-mediatek

On Wed, 14 Sep 2022 11:54:43 +0300, Arınç ÜNAL wrote:
> In the case of muxing phy0 of the MT7530 switch, the switch and the phy
> will have the same address on the mdio bus, 0. This causes the ethernet
> driver to fail since devices on the mdio bus cannot share an address.
> 
> Any address can be used for the switch, therefore, change the switch
> address to 0x1f.
> 
> Suggested-by: Sungbo Eo <mans0n@gorani.run>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  .../bindings/net/dsa/mediatek,mt7530.yaml     | 24 +++++++++----------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 03/10] dt-bindings: net: dsa: mediatek,mt7530: expand gpio-controller description
  2022-09-14  8:54 ` [PATCH 03/10] dt-bindings: net: dsa: mediatek,mt7530: expand gpio-controller description Arınç ÜNAL
@ 2022-09-14 15:08   ` Rob Herring
  0 siblings, 0 replies; 29+ messages in thread
From: Rob Herring @ 2022-09-14 15:08 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Paolo Abeni, Vladimir Oltean, Greg Kroah-Hartman,
	David S . Miller, linux-mediatek, Thomas Bogendoerfer,
	linux-mips, Jakub Kicinski, Vivien Didelot, netdev, linux-kernel,
	linux-arm-kernel, Andrew Lunn, Sergio Paracuellos, erkin.bozoglu,
	Eric Dumazet, Matthias Brugger, DENG Qingfang, Florian Fainelli,
	Sean Wang, Rob Herring, Krzysztof Kozlowski, devicetree,
	Landen Chao

On Wed, 14 Sep 2022 11:54:44 +0300, Arınç ÜNAL wrote:
> Expand the description of the gpio-controller property to include the
> controllable pins of the MT7530 switch.
> 
> The gpio-controller property is only used for the MT7530 switch. Therefore,
> invalidate it for the MT7531 switch.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml   | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string
  2022-09-14  8:54 ` [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string Arınç ÜNAL
  2022-09-14  9:03   ` Sergio Paracuellos
@ 2022-09-14 15:14   ` Rob Herring
  2022-09-14 15:18     ` Arınç ÜNAL
  1 sibling, 1 reply; 29+ messages in thread
From: Rob Herring @ 2022-09-14 15:14 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Krzysztof Kozlowski, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu, netdev,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-mips

On Wed, Sep 14, 2022 at 11:54:45AM +0300, Arınç ÜNAL wrote:
> Add syscon as a constant string on the compatible property as it's required
> for the SoC to work. Update the example accordingly.

It's not required. It's required to automagically create a regmap. That 
can be done yourself as well. The downside to adding 'syscon' is it 
requires a DT update. Maybe that's fine for this platform? I don't know.

> 
> Fixes: 5278e4a181ff ("dt-bindings: memory: add binding for Mediatek's MT7621 SDRAM memory controller")
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  .../bindings/memory-controllers/mediatek,mt7621-memc.yaml   | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/memory-controllers/mediatek,mt7621-memc.yaml b/Documentation/devicetree/bindings/memory-controllers/mediatek,mt7621-memc.yaml
> index 85e02854f083..6ccdaf99c778 100644
> --- a/Documentation/devicetree/bindings/memory-controllers/mediatek,mt7621-memc.yaml
> +++ b/Documentation/devicetree/bindings/memory-controllers/mediatek,mt7621-memc.yaml
> @@ -11,7 +11,9 @@ maintainers:
>  
>  properties:
>    compatible:
> -    const: mediatek,mt7621-memc
> +    items:
> +      - const: mediatek,mt7621-memc
> +      - const: syscon
>  
>    reg:
>      maxItems: 1
> @@ -25,6 +27,6 @@ additionalProperties: false
>  examples:
>    - |
>      memory-controller@5000 {
> -        compatible = "mediatek,mt7621-memc";
> +        compatible = "mediatek,mt7621-memc", "syscon";
>          reg = <0x5000 0x1000>;
>      };
> -- 
> 2.34.1
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string
  2022-09-14 15:14   ` Rob Herring
@ 2022-09-14 15:18     ` Arınç ÜNAL
  2022-09-15  3:21       ` Sergio Paracuellos
  0 siblings, 1 reply; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-14 15:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: Krzysztof Kozlowski, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, Sergio Paracuellos, erkin.bozoglu, netdev,
	devicetree, linux-arm-kernel, linux-mediatek, linux-kernel,
	linux-mips

On 14.09.2022 18:14, Rob Herring wrote:
> On Wed, Sep 14, 2022 at 11:54:45AM +0300, Arınç ÜNAL wrote:
>> Add syscon as a constant string on the compatible property as it's required
>> for the SoC to work. Update the example accordingly.
> 
> It's not required. It's required to automagically create a regmap. That
> can be done yourself as well. The downside to adding 'syscon' is it
> requires a DT update. Maybe that's fine for this platform? I don't know.

My GB-PC2 won't boot without syscon on mt7621.dtsi. This string was 
always there on the memory controller node on mt7621.dtsi.

Arınç

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string
  2022-09-14 15:18     ` Arınç ÜNAL
@ 2022-09-15  3:21       ` Sergio Paracuellos
  2022-09-15  6:24         ` Arınç ÜNAL
  0 siblings, 1 reply; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-15  3:21 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Rob Herring, Krzysztof Kozlowski, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

On Wed, Sep 14, 2022 at 5:19 PM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> On 14.09.2022 18:14, Rob Herring wrote:
> > On Wed, Sep 14, 2022 at 11:54:45AM +0300, Arınç ÜNAL wrote:
> >> Add syscon as a constant string on the compatible property as it's required
> >> for the SoC to work. Update the example accordingly.
> >
> > It's not required. It's required to automagically create a regmap. That
> > can be done yourself as well. The downside to adding 'syscon' is it
> > requires a DT update. Maybe that's fine for this platform? I don't know.
>
> My GB-PC2 won't boot without syscon on mt7621.dtsi. This string was
> always there on the memory controller node on mt7621.dtsi.

The string was introduced because the mt7621 clock driver needs to
read some registers creating a regmap from the syscon. The bindings
were added before the clock driver was properly mainlined and at first
the clock driver was using ralink architecture dependent operations
rt_memc_* defined in
'arch/mips/include/asm/mach-ralink/ralink_regs.h'. I forgot to update
the mem controller binding when memc became a syscon so I think this
patch is correct. I also think the sample should use 'syscon' in the
node name instead of memory-controller.

Best regards,
    Sergio Paracuellos
>
> Arınç

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings
  2022-09-14 10:45     ` Arınç ÜNAL
@ 2022-09-15  3:30       ` Sergio Paracuellos
  2022-09-15  5:59         ` Sergio Paracuellos
  0 siblings, 1 reply; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-15  3:30 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Thomas Bogendoerfer, Krzysztof Kozlowski, Rob Herring,
	Matthias Brugger, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

On Wed, Sep 14, 2022 at 12:46 PM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> Hi Sergio,
>
> On 14.09.2022 12:14, Sergio Paracuellos wrote:
> > Hi Arinc,
> >
> > On Wed, Sep 14, 2022 at 10:55 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
> >>
> >> Fix the dtc warnings below.
> >>
> >> /cpus/cpu@0: failed to match any schema with compatible: ['mips,mips1004Kc']
> >> /cpus/cpu@1: failed to match any schema with compatible: ['mips,mips1004Kc']
> >> uartlite@c00: $nodename:0: 'uartlite@c00' does not match '^serial(@.*)?$'
> >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
> >> uartlite@c00: Unevaluated properties are not allowed ('clock-names' was unexpected)
> >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
> >> sdhci@1e130000: $nodename:0: 'sdhci@1e130000' does not match '^mmc(@.*)?$'
> >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> >> sdhci@1e130000: Unevaluated properties are not allowed ('bus-width', 'cap-mmc-highspeed', 'cap-sd-highspeed', 'disable-wp', 'max-frequency', 'vmmc-supply', 'vqmmc-supply' were unexpected)
> >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> >> xhci@1e1c0000: $nodename:0: 'xhci@1e1c0000' does not match '^usb(@.*)?'
> >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> >> xhci@1e1c0000: compatible: ['mediatek,mt8173-xhci'] is too short
> >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> >> switch0@0: $nodename:0: 'switch0@0' does not match '^(ethernet-)?switch(@.*)?$'
> >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> >> port@1: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
> >>          From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
> >> port@2: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
> >>          From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
> >> port@3: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
> >>          From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
> >>
> >> - Remove "mips,mips1004Kc" compatible string from the cpu nodes. This
> >> doesn't exist anywhere.
> >> - Change "memc: syscon@5000" to "memc: memory-controller@5000".
> >> - Change "uartlite: uartlite@c00" to "serial0: serial@c00" and remove the
> >> aliases node.
> >> - Remove "clock-names" from the serial0 node. The property doesn't exist on
> >> the 8250.yaml schema.
> >> - Change "sdhci: sdhci@1e130000" to "mmc: mmc@1e130000".
> >> - Change "xhci: xhci@1e1c0000" to "usb: usb@1e1c0000".
> >> - Add "mediatek,mtk-xhci" as the second compatible string on the usb node.
> >> - Change "switch0: switch0@0" to "switch0: switch@0"
> >> - Change "off" to "disabled" for disabled nodes.
> >>
> >> Remaining warnings are caused by the lack of json-schema documentation.
> >>
> >> /cpuintc: failed to match any schema with compatible: ['mti,cpu-interrupt-controller']
> >> /palmbus@1e000000/wdt@100: failed to match any schema with compatible: ['mediatek,mt7621-wdt']
> >> /palmbus@1e000000/i2c@900: failed to match any schema with compatible: ['mediatek,mt7621-i2c']
> >> /palmbus@1e000000/spi@b00: failed to match any schema with compatible: ['ralink,mt7621-spi']
> >> /ethernet@1e100000: failed to match any schema with compatible: ['mediatek,mt7621-eth']
> >>
> >> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> >> ---
> >>   .../boot/dts/ralink/mt7621-gnubee-gb-pc1.dts  |  2 +-
> >>   .../boot/dts/ralink/mt7621-gnubee-gb-pc2.dts  |  2 +-
> >>   arch/mips/boot/dts/ralink/mt7621.dtsi         | 32 +++++++------------
> >>   3 files changed, 14 insertions(+), 22 deletions(-)
> >>
> >> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
> >> index 24eebc5a85b1..6ecb8165efe8 100644
> >> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
> >> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
> >> @@ -53,7 +53,7 @@ system {
> >>          };
> >>   };
> >>
> >> -&sdhci {
> >> +&mmc {
> >>          status = "okay";
> >>   };
> >>
> >> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
> >> index 34006e667780..2e534ea5bab7 100644
> >> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
> >> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
> >> @@ -37,7 +37,7 @@ key-reset {
> >>          };
> >>   };
> >>
> >> -&sdhci {
> >> +&mmc {
> >>          status = "okay";
> >>   };
> >>
> >> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
> >> index ee46ace0bcc1..9302bdc04510 100644
> >> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
> >> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
> >> @@ -15,13 +15,11 @@ cpus {
> >>
> >>                  cpu@0 {
> >>                          device_type = "cpu";
> >> -                       compatible = "mips,mips1004Kc";
> >>                          reg = <0>;
> >>                  };
> >>
> >>                  cpu@1 {
> >>                          device_type = "cpu";
> >> -                       compatible = "mips,mips1004Kc";
> >>                          reg = <1>;
> >>                  };
> >>          };
> >
> > Instead of removing this, since compatible is correct here, I think a
> > cpus yaml file needs to be added to properly define mips CPU's but
> > compatible strings using all around the sources are a bit messy. Take
> > a look of how is this done for arm [0]
>
> I did investigate the arm bindings beforehand. I've seen that some of
> the strings are also checked by code. I don't see the mips strings used
> anywhere but DTs so I had decided to remove it here. I guess we can make
> a basic binding to list the mips processor cores.

At the very least I do think a compatible string should exist for cpu
nodes :). And because of the mess with MIPS cpu nodes in dts files all
around I think we should only add this 'compatible' as a requirement
and mark 'reg' and 'device_type' as optionals.

>
> What do you think Thomas?
>
> >
> >> @@ -33,11 +31,6 @@ cpuintc: cpuintc {
> >>                  compatible = "mti,cpu-interrupt-controller";
> >>          };
> >>
> >> -       aliases {
> >> -               serial0 = &uartlite;
> >> -       };
> >> -
> >> -
> >>          mmc_fixed_3v3: regulator-3v3 {
> >>                  compatible = "regulator-fixed";
> >>                  regulator-name = "mmc_power";
> >> @@ -110,17 +103,16 @@ i2c: i2c@900 {
> >>                          pinctrl-0 = <&i2c_pins>;
> >>                  };
> >>
> >> -               memc: syscon@5000 {
> >> +               memc: memory-controller@5000 {
> >>                          compatible = "mediatek,mt7621-memc", "syscon";
> >>                          reg = <0x5000 0x1000>;
> >>                  };
> >>
> >
> > I think syscon nodes need to use 'syscon' in the node name, but I am
> > not 100% sure.
>
> I've tested this patch series on my GB-PC2, it currently works fine.
> Also, DT binding for MT7621 memory controller uses memory-controller on
> the example so I guess it's fine?

I know that works fine but when the node is a syscon it is good to
have that syscon in the node name (I don't know if having it is a rule
or something, I guess no). In any case I agree that binding and dts
should match.

Best regards,
    Sergio Paracuellos
>
> Arınç

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 10/10] mips: dts: ralink: mt7621: add GB-PC2 LEDs
  2022-09-14  8:54 ` [PATCH 10/10] mips: dts: ralink: mt7621: add GB-PC2 LEDs Arınç ÜNAL
@ 2022-09-15  5:08   ` Sergio Paracuellos
  0 siblings, 0 replies; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-15  5:08 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS, Petr Louda

On Wed, Sep 14, 2022 at 10:56 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> Add the missing LEDs for GB-PC2. The ethblack-green, ethblue-green, power
> and system LEDs weren't added previously, because they don't exist on the
> device schematics. Tests on a GB-PC2 by me and Petr proved otherwise.
>
> The i2c bus cannot be used on GB-PC2 as its pins are wired to LEDs instead,
> and GB-PC1 does not use it. Therefore, do not enable it on both devices.
>
> Link: https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf
> Tested-by: Petr Louda <petr.louda@outlook.cz>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  .../boot/dts/ralink/mt7621-gnubee-gb-pc1.dts  |  6 ---
>  .../boot/dts/ralink/mt7621-gnubee-gb-pc2.dts  | 42 ++++++++++++++++---
>  2 files changed, 36 insertions(+), 12 deletions(-)

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 08/10] mips: dts: ralink: mt7621: change mt7530 switch address
  2022-09-14  8:54 ` [PATCH 08/10] mips: dts: ralink: mt7621: change mt7530 switch address Arınç ÜNAL
@ 2022-09-15  5:09   ` Sergio Paracuellos
  0 siblings, 0 replies; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-15  5:09 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS, Sungbo Eo

On Wed, Sep 14, 2022 at 10:56 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> In the case of muxing phy0 of the MT7530 switch, the switch and the phy
> will have the same address on the mdio bus, 0. This causes the ethernet
> driver to fail since devices on the mdio bus cannot share an address.
>
> Any address can be used for the switch, therefore, change the switch
> address to 0x1f.
>
> Suggested-by: Sungbo Eo <mans0n@gorani.run>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/mips/boot/dts/ralink/mt7621.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
    Sergio Paracuellos

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 09/10] mips: dts: ralink: mt7621: fix external phy on GB-PC2
  2022-09-14  8:54 ` [PATCH 09/10] mips: dts: ralink: mt7621: fix external phy on GB-PC2 Arınç ÜNAL
@ 2022-09-15  5:09   ` Sergio Paracuellos
  0 siblings, 0 replies; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-15  5:09 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Krzysztof Kozlowski, Rob Herring, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

On Wed, Sep 14, 2022 at 10:56 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> The address of the external phy on the mdio bus is 5. Update the devicetree
> for GB-PC2 accordingly.
>
> Fixes: 5bc148649cf3 ("staging: mt7621-dts: fix GB-PC2 devicetree")
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
    Sergio Paracuellos

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings
  2022-09-15  3:30       ` Sergio Paracuellos
@ 2022-09-15  5:59         ` Sergio Paracuellos
  2022-09-15  6:24           ` Arınç ÜNAL
  0 siblings, 1 reply; 29+ messages in thread
From: Sergio Paracuellos @ 2022-09-15  5:59 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Thomas Bogendoerfer, Krzysztof Kozlowski, Rob Herring,
	Matthias Brugger, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

On Thu, Sep 15, 2022 at 5:30 AM Sergio Paracuellos
<sergio.paracuellos@gmail.com> wrote:
>
> On Wed, Sep 14, 2022 at 12:46 PM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
> >
> > Hi Sergio,
> >
> > On 14.09.2022 12:14, Sergio Paracuellos wrote:
> > > Hi Arinc,
> > >
> > > On Wed, Sep 14, 2022 at 10:55 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
> > >>
> > >> Fix the dtc warnings below.
> > >>
> > >> /cpus/cpu@0: failed to match any schema with compatible: ['mips,mips1004Kc']
> > >> /cpus/cpu@1: failed to match any schema with compatible: ['mips,mips1004Kc']
> > >> uartlite@c00: $nodename:0: 'uartlite@c00' does not match '^serial(@.*)?$'
> > >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
> > >> uartlite@c00: Unevaluated properties are not allowed ('clock-names' was unexpected)
> > >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
> > >> sdhci@1e130000: $nodename:0: 'sdhci@1e130000' does not match '^mmc(@.*)?$'
> > >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > >> sdhci@1e130000: Unevaluated properties are not allowed ('bus-width', 'cap-mmc-highspeed', 'cap-sd-highspeed', 'disable-wp', 'max-frequency', 'vmmc-supply', 'vqmmc-supply' were unexpected)
> > >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > >> xhci@1e1c0000: $nodename:0: 'xhci@1e1c0000' does not match '^usb(@.*)?'
> > >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > >> xhci@1e1c0000: compatible: ['mediatek,mt8173-xhci'] is too short
> > >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > >> switch0@0: $nodename:0: 'switch0@0' does not match '^(ethernet-)?switch(@.*)?$'
> > >>          From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
> > >> port@1: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
> > >>          From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
> > >> port@2: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
> > >>          From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
> > >> port@3: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
> > >>          From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
> > >>
> > >> - Remove "mips,mips1004Kc" compatible string from the cpu nodes. This
> > >> doesn't exist anywhere.
> > >> - Change "memc: syscon@5000" to "memc: memory-controller@5000".
> > >> - Change "uartlite: uartlite@c00" to "serial0: serial@c00" and remove the
> > >> aliases node.
> > >> - Remove "clock-names" from the serial0 node. The property doesn't exist on
> > >> the 8250.yaml schema.
> > >> - Change "sdhci: sdhci@1e130000" to "mmc: mmc@1e130000".
> > >> - Change "xhci: xhci@1e1c0000" to "usb: usb@1e1c0000".
> > >> - Add "mediatek,mtk-xhci" as the second compatible string on the usb node.
> > >> - Change "switch0: switch0@0" to "switch0: switch@0"
> > >> - Change "off" to "disabled" for disabled nodes.
> > >>
> > >> Remaining warnings are caused by the lack of json-schema documentation.
> > >>
> > >> /cpuintc: failed to match any schema with compatible: ['mti,cpu-interrupt-controller']
> > >> /palmbus@1e000000/wdt@100: failed to match any schema with compatible: ['mediatek,mt7621-wdt']
> > >> /palmbus@1e000000/i2c@900: failed to match any schema with compatible: ['mediatek,mt7621-i2c']
> > >> /palmbus@1e000000/spi@b00: failed to match any schema with compatible: ['ralink,mt7621-spi']
> > >> /ethernet@1e100000: failed to match any schema with compatible: ['mediatek,mt7621-eth']
> > >>
> > >> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> > >> ---
> > >>   .../boot/dts/ralink/mt7621-gnubee-gb-pc1.dts  |  2 +-
> > >>   .../boot/dts/ralink/mt7621-gnubee-gb-pc2.dts  |  2 +-
> > >>   arch/mips/boot/dts/ralink/mt7621.dtsi         | 32 +++++++------------
> > >>   3 files changed, 14 insertions(+), 22 deletions(-)
> > >>
> > >> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
> > >> index 24eebc5a85b1..6ecb8165efe8 100644
> > >> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
> > >> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
> > >> @@ -53,7 +53,7 @@ system {
> > >>          };
> > >>   };
> > >>
> > >> -&sdhci {
> > >> +&mmc {
> > >>          status = "okay";
> > >>   };
> > >>
> > >> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
> > >> index 34006e667780..2e534ea5bab7 100644
> > >> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
> > >> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
> > >> @@ -37,7 +37,7 @@ key-reset {
> > >>          };
> > >>   };
> > >>
> > >> -&sdhci {
> > >> +&mmc {
> > >>          status = "okay";
> > >>   };
> > >>
> > >> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
> > >> index ee46ace0bcc1..9302bdc04510 100644
> > >> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
> > >> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
> > >> @@ -15,13 +15,11 @@ cpus {
> > >>
> > >>                  cpu@0 {
> > >>                          device_type = "cpu";
> > >> -                       compatible = "mips,mips1004Kc";
> > >>                          reg = <0>;
> > >>                  };
> > >>
> > >>                  cpu@1 {
> > >>                          device_type = "cpu";
> > >> -                       compatible = "mips,mips1004Kc";
> > >>                          reg = <1>;
> > >>                  };
> > >>          };
> > >
> > > Instead of removing this, since compatible is correct here, I think a
> > > cpus yaml file needs to be added to properly define mips CPU's but
> > > compatible strings using all around the sources are a bit messy. Take
> > > a look of how is this done for arm [0]
> >
> > I did investigate the arm bindings beforehand. I've seen that some of
> > the strings are also checked by code. I don't see the mips strings used
> > anywhere but DTs so I had decided to remove it here. I guess we can make
> > a basic binding to list the mips processor cores.
>
> At the very least I do think a compatible string should exist for cpu
> nodes :). And because of the mess with MIPS cpu nodes in dts files all
> around I think we should only add this 'compatible' as a requirement
> and mark 'reg' and 'device_type' as optionals.

I have just sent a patch to start from containing all compatible
strings I have found in the 'arch/mips/boot/dts' folder:

https://lore.kernel.org/linux-devicetree/20220915055514.463241-1-sergio.paracuellos@gmail.com/T/#u

>
> >
> > What do you think Thomas?
> >
> > >
> > >> @@ -33,11 +31,6 @@ cpuintc: cpuintc {
> > >>                  compatible = "mti,cpu-interrupt-controller";
> > >>          };
> > >>
> > >> -       aliases {
> > >> -               serial0 = &uartlite;
> > >> -       };
> > >> -
> > >> -
> > >>          mmc_fixed_3v3: regulator-3v3 {
> > >>                  compatible = "regulator-fixed";
> > >>                  regulator-name = "mmc_power";
> > >> @@ -110,17 +103,16 @@ i2c: i2c@900 {
> > >>                          pinctrl-0 = <&i2c_pins>;
> > >>                  };
> > >>
> > >> -               memc: syscon@5000 {
> > >> +               memc: memory-controller@5000 {
> > >>                          compatible = "mediatek,mt7621-memc", "syscon";
> > >>                          reg = <0x5000 0x1000>;
> > >>                  };
> > >>
> > >
> > > I think syscon nodes need to use 'syscon' in the node name, but I am
> > > not 100% sure.
> >
> > I've tested this patch series on my GB-PC2, it currently works fine.
> > Also, DT binding for MT7621 memory controller uses memory-controller on
> > the example so I guess it's fine?
>
> I know that works fine but when the node is a syscon it is good to
> have that syscon in the node name (I don't know if having it is a rule
> or something, I guess no). In any case I agree that binding and dts
> should match.
>
> Best regards,
>     Sergio Paracuellos
> >
> > Arınç

Best regards,
    Sergio Paracuellos

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string
  2022-09-15  3:21       ` Sergio Paracuellos
@ 2022-09-15  6:24         ` Arınç ÜNAL
  0 siblings, 0 replies; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-15  6:24 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: Rob Herring, Krzysztof Kozlowski, Matthias Brugger, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Thomas Bogendoerfer, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

On 15.09.2022 06:21, Sergio Paracuellos wrote:
> On Wed, Sep 14, 2022 at 5:19 PM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>>
>> On 14.09.2022 18:14, Rob Herring wrote:
>>> On Wed, Sep 14, 2022 at 11:54:45AM +0300, Arınç ÜNAL wrote:
>>>> Add syscon as a constant string on the compatible property as it's required
>>>> for the SoC to work. Update the example accordingly.
>>>
>>> It's not required. It's required to automagically create a regmap. That
>>> can be done yourself as well. The downside to adding 'syscon' is it
>>> requires a DT update. Maybe that's fine for this platform? I don't know.
>>
>> My GB-PC2 won't boot without syscon on mt7621.dtsi. This string was
>> always there on the memory controller node on mt7621.dtsi.
> 
> The string was introduced because the mt7621 clock driver needs to
> read some registers creating a regmap from the syscon. The bindings
> were added before the clock driver was properly mainlined and at first
> the clock driver was using ralink architecture dependent operations
> rt_memc_* defined in
> 'arch/mips/include/asm/mach-ralink/ralink_regs.h'. I forgot to update
> the mem controller binding when memc became a syscon so I think this
> patch is correct. I also think the sample should use 'syscon' in the
> node name instead of memory-controller.

Will change to syscon in v2.

Arınç

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings
  2022-09-15  5:59         ` Sergio Paracuellos
@ 2022-09-15  6:24           ` Arınç ÜNAL
  0 siblings, 0 replies; 29+ messages in thread
From: Arınç ÜNAL @ 2022-09-15  6:24 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: Thomas Bogendoerfer, Krzysztof Kozlowski, Rob Herring,
	Matthias Brugger, Andrew Lunn, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Greg Kroah-Hartman, Sean Wang, Landen Chao,
	DENG Qingfang, erkin.bozoglu, netdev,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, moderated list:ARM/Mediatek SoC support,
	linux-kernel, open list:MIPS

On 15.09.2022 08:59, Sergio Paracuellos wrote:
> On Thu, Sep 15, 2022 at 5:30 AM Sergio Paracuellos
> <sergio.paracuellos@gmail.com> wrote:
>>
>> On Wed, Sep 14, 2022 at 12:46 PM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>>>
>>> Hi Sergio,
>>>
>>> On 14.09.2022 12:14, Sergio Paracuellos wrote:
>>>> Hi Arinc,
>>>>
>>>> On Wed, Sep 14, 2022 at 10:55 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>>>>>
>>>>> Fix the dtc warnings below.
>>>>>
>>>>> /cpus/cpu@0: failed to match any schema with compatible: ['mips,mips1004Kc']
>>>>> /cpus/cpu@1: failed to match any schema with compatible: ['mips,mips1004Kc']
>>>>> uartlite@c00: $nodename:0: 'uartlite@c00' does not match '^serial(@.*)?$'
>>>>>           From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
>>>>> uartlite@c00: Unevaluated properties are not allowed ('clock-names' was unexpected)
>>>>>           From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/serial/8250.yaml
>>>>> sdhci@1e130000: $nodename:0: 'sdhci@1e130000' does not match '^mmc(@.*)?$'
>>>>>           From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>>>> sdhci@1e130000: Unevaluated properties are not allowed ('bus-width', 'cap-mmc-highspeed', 'cap-sd-highspeed', 'disable-wp', 'max-frequency', 'vmmc-supply', 'vqmmc-supply' were unexpected)
>>>>>           From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>>>> xhci@1e1c0000: $nodename:0: 'xhci@1e1c0000' does not match '^usb(@.*)?'
>>>>>           From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
>>>>> xhci@1e1c0000: compatible: ['mediatek,mt8173-xhci'] is too short
>>>>>           From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
>>>>> switch0@0: $nodename:0: 'switch0@0' does not match '^(ethernet-)?switch(@.*)?$'
>>>>>           From schema: /home/arinc9/Documents/linux/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
>>>>> port@1: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
>>>>>           From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
>>>>> port@2: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
>>>>>           From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
>>>>> port@3: status:0: 'off' is not one of ['okay', 'disabled', 'reserved']
>>>>>           From schema: /home/arinc9/.local/lib/python3.10/site-packages/dtschema/schemas/dt-core.yaml
>>>>>
>>>>> - Remove "mips,mips1004Kc" compatible string from the cpu nodes. This
>>>>> doesn't exist anywhere.
>>>>> - Change "memc: syscon@5000" to "memc: memory-controller@5000".
>>>>> - Change "uartlite: uartlite@c00" to "serial0: serial@c00" and remove the
>>>>> aliases node.
>>>>> - Remove "clock-names" from the serial0 node. The property doesn't exist on
>>>>> the 8250.yaml schema.
>>>>> - Change "sdhci: sdhci@1e130000" to "mmc: mmc@1e130000".
>>>>> - Change "xhci: xhci@1e1c0000" to "usb: usb@1e1c0000".
>>>>> - Add "mediatek,mtk-xhci" as the second compatible string on the usb node.
>>>>> - Change "switch0: switch0@0" to "switch0: switch@0"
>>>>> - Change "off" to "disabled" for disabled nodes.
>>>>>
>>>>> Remaining warnings are caused by the lack of json-schema documentation.
>>>>>
>>>>> /cpuintc: failed to match any schema with compatible: ['mti,cpu-interrupt-controller']
>>>>> /palmbus@1e000000/wdt@100: failed to match any schema with compatible: ['mediatek,mt7621-wdt']
>>>>> /palmbus@1e000000/i2c@900: failed to match any schema with compatible: ['mediatek,mt7621-i2c']
>>>>> /palmbus@1e000000/spi@b00: failed to match any schema with compatible: ['ralink,mt7621-spi']
>>>>> /ethernet@1e100000: failed to match any schema with compatible: ['mediatek,mt7621-eth']
>>>>>
>>>>> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
>>>>> ---
>>>>>    .../boot/dts/ralink/mt7621-gnubee-gb-pc1.dts  |  2 +-
>>>>>    .../boot/dts/ralink/mt7621-gnubee-gb-pc2.dts  |  2 +-
>>>>>    arch/mips/boot/dts/ralink/mt7621.dtsi         | 32 +++++++------------
>>>>>    3 files changed, 14 insertions(+), 22 deletions(-)
>>>>>
>>>>> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
>>>>> index 24eebc5a85b1..6ecb8165efe8 100644
>>>>> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
>>>>> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc1.dts
>>>>> @@ -53,7 +53,7 @@ system {
>>>>>           };
>>>>>    };
>>>>>
>>>>> -&sdhci {
>>>>> +&mmc {
>>>>>           status = "okay";
>>>>>    };
>>>>>
>>>>> diff --git a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
>>>>> index 34006e667780..2e534ea5bab7 100644
>>>>> --- a/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
>>>>> +++ b/arch/mips/boot/dts/ralink/mt7621-gnubee-gb-pc2.dts
>>>>> @@ -37,7 +37,7 @@ key-reset {
>>>>>           };
>>>>>    };
>>>>>
>>>>> -&sdhci {
>>>>> +&mmc {
>>>>>           status = "okay";
>>>>>    };
>>>>>
>>>>> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
>>>>> index ee46ace0bcc1..9302bdc04510 100644
>>>>> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
>>>>> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
>>>>> @@ -15,13 +15,11 @@ cpus {
>>>>>
>>>>>                   cpu@0 {
>>>>>                           device_type = "cpu";
>>>>> -                       compatible = "mips,mips1004Kc";
>>>>>                           reg = <0>;
>>>>>                   };
>>>>>
>>>>>                   cpu@1 {
>>>>>                           device_type = "cpu";
>>>>> -                       compatible = "mips,mips1004Kc";
>>>>>                           reg = <1>;
>>>>>                   };
>>>>>           };
>>>>
>>>> Instead of removing this, since compatible is correct here, I think a
>>>> cpus yaml file needs to be added to properly define mips CPU's but
>>>> compatible strings using all around the sources are a bit messy. Take
>>>> a look of how is this done for arm [0]
>>>
>>> I did investigate the arm bindings beforehand. I've seen that some of
>>> the strings are also checked by code. I don't see the mips strings used
>>> anywhere but DTs so I had decided to remove it here. I guess we can make
>>> a basic binding to list the mips processor cores.
>>
>> At the very least I do think a compatible string should exist for cpu
>> nodes :). And because of the mess with MIPS cpu nodes in dts files all
>> around I think we should only add this 'compatible' as a requirement
>> and mark 'reg' and 'device_type' as optionals.
> 
> I have just sent a patch to start from containing all compatible
> strings I have found in the 'arch/mips/boot/dts' folder:
> 
> https://lore.kernel.org/linux-devicetree/20220915055514.463241-1-sergio.paracuellos@gmail.com/T/#u

Awesome, I'll keep the string on v2.

> 
>>
>>>
>>> What do you think Thomas?
>>>
>>>>
>>>>> @@ -33,11 +31,6 @@ cpuintc: cpuintc {
>>>>>                   compatible = "mti,cpu-interrupt-controller";
>>>>>           };
>>>>>
>>>>> -       aliases {
>>>>> -               serial0 = &uartlite;
>>>>> -       };
>>>>> -
>>>>> -
>>>>>           mmc_fixed_3v3: regulator-3v3 {
>>>>>                   compatible = "regulator-fixed";
>>>>>                   regulator-name = "mmc_power";
>>>>> @@ -110,17 +103,16 @@ i2c: i2c@900 {
>>>>>                           pinctrl-0 = <&i2c_pins>;
>>>>>                   };
>>>>>
>>>>> -               memc: syscon@5000 {
>>>>> +               memc: memory-controller@5000 {
>>>>>                           compatible = "mediatek,mt7621-memc", "syscon";
>>>>>                           reg = <0x5000 0x1000>;
>>>>>                   };
>>>>>
>>>>
>>>> I think syscon nodes need to use 'syscon' in the node name, but I am
>>>> not 100% sure.
>>>
>>> I've tested this patch series on my GB-PC2, it currently works fine.
>>> Also, DT binding for MT7621 memory controller uses memory-controller on
>>> the example so I guess it's fine?
>>
>> I know that works fine but when the node is a syscon it is good to
>> have that syscon in the node name (I don't know if having it is a rule
>> or something, I guess no). In any case I agree that binding and dts
>> should match.

Understood, I'll keep it syscon in v2.

Arınç

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-09-15  6:26 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14  8:54 [PATCH net-next 00/10] dt-bindings and mt7621 devicetree changes Arınç ÜNAL
2022-09-14  8:54 ` [PATCH 01/10] dt-bindings: net: drop old mediatek bindings Arınç ÜNAL
2022-09-14 15:06   ` Rob Herring
2022-09-14  8:54 ` [PATCH 02/10] dt-bindings: net: dsa: mediatek,mt7530: change mt7530 switch address Arınç ÜNAL
2022-09-14 15:07   ` Rob Herring
2022-09-14  8:54 ` [PATCH 03/10] dt-bindings: net: dsa: mediatek,mt7530: expand gpio-controller description Arınç ÜNAL
2022-09-14 15:08   ` Rob Herring
2022-09-14  8:54 ` [PATCH 04/10] dt-bindings: memory: mt7621: add syscon as compatible string Arınç ÜNAL
2022-09-14  9:03   ` Sergio Paracuellos
2022-09-14 15:14   ` Rob Herring
2022-09-14 15:18     ` Arınç ÜNAL
2022-09-15  3:21       ` Sergio Paracuellos
2022-09-15  6:24         ` Arınç ÜNAL
2022-09-14  8:54 ` [PATCH 05/10] mips: dts: ralink: mt7621: fix some dtc warnings Arınç ÜNAL
2022-09-14  9:14   ` Sergio Paracuellos
2022-09-14 10:45     ` Arınç ÜNAL
2022-09-15  3:30       ` Sergio Paracuellos
2022-09-15  5:59         ` Sergio Paracuellos
2022-09-15  6:24           ` Arınç ÜNAL
2022-09-14  8:54 ` [PATCH 06/10] mips: dts: ralink: mt7621: remove interrupt-parent from switch node Arınç ÜNAL
2022-09-14  9:15   ` Sergio Paracuellos
2022-09-14  8:54 ` [PATCH 07/10] mips: dts: ralink: mt7621: change phy-mode of gmac1 to rgmii Arınç ÜNAL
2022-09-14  9:17   ` Sergio Paracuellos
2022-09-14  8:54 ` [PATCH 08/10] mips: dts: ralink: mt7621: change mt7530 switch address Arınç ÜNAL
2022-09-15  5:09   ` Sergio Paracuellos
2022-09-14  8:54 ` [PATCH 09/10] mips: dts: ralink: mt7621: fix external phy on GB-PC2 Arınç ÜNAL
2022-09-15  5:09   ` Sergio Paracuellos
2022-09-14  8:54 ` [PATCH 10/10] mips: dts: ralink: mt7621: add GB-PC2 LEDs Arınç ÜNAL
2022-09-15  5:08   ` Sergio Paracuellos

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).