linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/5] convert grf.txt to YAML
@ 2021-06-01 16:47 Johan Jonker
  2021-06-01 16:47 ` [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml Johan Jonker
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Johan Jonker @ 2021-06-01 16:47 UTC (permalink / raw)
  To: heiko
  Cc: robh+dt, kishon, vkoul, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel

Changed V7:
  rebase
  add compatible for rk3308 USB grf
    add "rockchip,rk3308-usb2phy-grf" to "usb2phy@[0-9a-f]+$"
    patternProperties too
  add USB support to rk3308.dtsi
    restyle
    limit grf reg size
    change sub nodename
  remove applied patches

Changed V6:
  remove some #phy-cells in rockchip-usb-phy.yaml
  rename nodename for phy-rockchip-inno-usb2
  remove applied patches

Changed V5:
  changed compatibles for rk3066/rk3188
  add rockchip-usb-phy.yaml
  move and restyle grf nodes rk3066/rk3188
  remove applied patches

Changed V4:
  revert separate schemas for each 'if' subset
  add additionalProperties
  move properties to top level

Changed V3:
  remove select
  change unevaluatedProperties
  add separate schemas for each 'if' subset

Changed V2:
  add rockchip,rk3328-grf-gpio.yaml
  rename grf-gpio nodename

Johan Jonker (3):
  dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml
  ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2
  arm64: dts: rockchip: rename nodename for phy-rockchip-inno-usb2

Tobias Schramm (2):
  dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf
  arm64: dts: rockchip: add USB support to rk3308.dtsi

 .../bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +---
 .../devicetree/bindings/soc/rockchip/grf.yaml      |  6 +-
 arch/arm/boot/dts/rk322x.dtsi                      |  4 +-
 arch/arm/boot/dts/rv1108.dtsi                      |  2 +-
 arch/arm64/boot/dts/rockchip/px30.dtsi             |  2 +-
 arch/arm64/boot/dts/rockchip/rk3308.dtsi           | 74 +++++++++++++++++++++-
 arch/arm64/boot/dts/rockchip/rk3328.dtsi           |  2 +-
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           |  4 +-
 8 files changed, 87 insertions(+), 18 deletions(-)

-- 
2.11.0


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

* [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml
  2021-06-01 16:47 [PATCH v7 0/5] convert grf.txt to YAML Johan Jonker
@ 2021-06-01 16:47 ` Johan Jonker
  2021-06-03  5:54   ` Vinod Koul
  2021-06-01 16:47 ` [PATCH v7 2/5] dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf Johan Jonker
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Johan Jonker @ 2021-06-01 16:47 UTC (permalink / raw)
  To: heiko
  Cc: robh+dt, kishon, vkoul, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel

The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"
in phy-provider.yaml has required "#phy-cells" for phy nodes.
The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.
Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent
notifications. Remove unneeded "#phy-cells" from parent node.
Also sort example.

make ARCH=arm dtbs_check
DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
phy/phy-provider.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +++--------
 Documentation/devicetree/bindings/soc/rockchip/grf.yaml       |  4 ++--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml
index a5b027a6e..5bebd86bf 100644
--- a/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml
+++ b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml
@@ -30,9 +30,6 @@ properties:
   "#clock-cells":
     const: 0
 
-  "#phy-cells":
-    const: 0
-
   clocks:
     maxItems: 1
 
@@ -120,7 +117,6 @@ required:
   - reg
   - clock-output-names
   - "#clock-cells"
-  - "#phy-cells"
   - host-port
   - otg-port
 
@@ -131,26 +127,25 @@ examples:
     #include <dt-bindings/clock/rk3399-cru.h>
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/interrupt-controller/irq.h>
-    u2phy0: usb2-phy@e450 {
+    u2phy0: usb2phy@e450 {
       compatible = "rockchip,rk3399-usb2phy";
       reg = <0xe450 0x10>;
       clocks = <&cru SCLK_USB2PHY0_REF>;
       clock-names = "phyclk";
       clock-output-names = "clk_usbphy0_480m";
       #clock-cells = <0>;
-      #phy-cells = <0>;
 
       u2phy0_host: host-port {
-        #phy-cells = <0>;
         interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
         interrupt-names = "linestate";
+        #phy-cells = <0>;
       };
 
       u2phy0_otg: otg-port {
-        #phy-cells = <0>;
         interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
                      <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
                      <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
         interrupt-names = "otg-bvalid", "otg-id", "linestate";
+        #phy-cells = <0>;
       };
     };
diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
index 84bdaf88d..43c288708 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
+++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
@@ -184,7 +184,7 @@ allOf:
         - "#size-cells"
 
       patternProperties:
-        "usb2-phy@[0-9a-f]+$":
+        "usb2phy@[0-9a-f]+$":
           type: object
 
           $ref: "/schemas/phy/phy-rockchip-inno-usb2.yaml#"
@@ -233,7 +233,7 @@ examples:
         #phy-cells = <0>;
       };
 
-      u2phy0: usb2-phy@e450 {
+      u2phy0: usb2phy@e450 {
         compatible = "rockchip,rk3399-usb2phy";
         reg = <0xe450 0x10>;
         clocks = <&cru SCLK_USB2PHY0_REF>;
-- 
2.11.0


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

* [PATCH v7 2/5] dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf
  2021-06-01 16:47 [PATCH v7 0/5] convert grf.txt to YAML Johan Jonker
  2021-06-01 16:47 ` [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml Johan Jonker
@ 2021-06-01 16:47 ` Johan Jonker
  2021-06-02 18:17   ` Rob Herring
  2021-06-01 16:47 ` [PATCH v7 3/5] ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2 Johan Jonker
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Johan Jonker @ 2021-06-01 16:47 UTC (permalink / raw)
  To: heiko
  Cc: robh+dt, kishon, vkoul, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel

From: Tobias Schramm <t.schramm@manjaro.org>

The RK3308 has a USB GRF.
This patch adds a compatible string for it.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---

Changed:
  Add "rockchip,rk3308-usb2phy-grf" to "usb2phy@[0-9a-f]+$"
  patternProperties too.
---
 Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
index 43c288708..8c1c46fef 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
+++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
@@ -31,6 +31,7 @@ properties:
               - rockchip,rk3308-core-grf
               - rockchip,rk3308-detect-grf
               - rockchip,rk3308-grf
+              - rockchip,rk3308-usb2phy-grf
               - rockchip,rk3328-grf
               - rockchip,rk3328-usb2phy-grf
               - rockchip,rk3368-grf
@@ -174,6 +175,7 @@ allOf:
             enum:
               - rockchip,px30-usb2phy-grf
               - rockchip,rk3228-grf
+              - rockchip,rk3308-usb2phy-grf
               - rockchip,rk3328-usb2phy-grf
               - rockchip,rk3399-grf
               - rockchip,rv1108-grf
-- 
2.11.0


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

* [PATCH v7 3/5] ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2
  2021-06-01 16:47 [PATCH v7 0/5] convert grf.txt to YAML Johan Jonker
  2021-06-01 16:47 ` [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml Johan Jonker
  2021-06-01 16:47 ` [PATCH v7 2/5] dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf Johan Jonker
@ 2021-06-01 16:47 ` Johan Jonker
  2021-06-01 16:47 ` [PATCH v7 4/5] arm64: " Johan Jonker
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Johan Jonker @ 2021-06-01 16:47 UTC (permalink / raw)
  To: heiko
  Cc: robh+dt, kishon, vkoul, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel

The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"
in phy-provider.yaml has required "#phy-cells" for phy nodes.
The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.
Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent
notifications.

make ARCH=arm dtbs_check
DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
phy/phy-provider.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 arch/arm/boot/dts/rk322x.dtsi | 4 ++--
 arch/arm/boot/dts/rv1108.dtsi | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi
index 5774bc309..cffd7acfb 100644
--- a/arch/arm/boot/dts/rk322x.dtsi
+++ b/arch/arm/boot/dts/rk322x.dtsi
@@ -190,7 +190,7 @@
 			status = "disabled";
 		};
 
-		u2phy0: usb2-phy@760 {
+		u2phy0: usb2phy@760 {
 			compatible = "rockchip,rk3228-usb2phy";
 			reg = <0x0760 0x0c>;
 			clocks = <&cru SCLK_OTGPHY0>;
@@ -217,7 +217,7 @@
 			};
 		};
 
-		u2phy1: usb2-phy@800 {
+		u2phy1: usb2phy@800 {
 			compatible = "rockchip,rk3228-usb2phy";
 			reg = <0x0800 0x0c>;
 			clocks = <&cru SCLK_OTGPHY1>;
diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi
index 884872ca5..9bd0acf3b 100644
--- a/arch/arm/boot/dts/rv1108.dtsi
+++ b/arch/arm/boot/dts/rv1108.dtsi
@@ -265,7 +265,7 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 
-		u2phy: usb2-phy@100 {
+		u2phy: usb2phy@100 {
 			compatible = "rockchip,rv1108-usb2phy";
 			reg = <0x100 0x0c>;
 			clocks = <&cru SCLK_USBPHY>;
-- 
2.11.0


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

* [PATCH v7 4/5] arm64: dts: rockchip: rename nodename for phy-rockchip-inno-usb2
  2021-06-01 16:47 [PATCH v7 0/5] convert grf.txt to YAML Johan Jonker
                   ` (2 preceding siblings ...)
  2021-06-01 16:47 ` [PATCH v7 3/5] ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2 Johan Jonker
@ 2021-06-01 16:47 ` Johan Jonker
  2021-06-01 16:48 ` [PATCH v7 5/5] arm64: dts: rockchip: add USB support to rk3308.dtsi Johan Jonker
  2021-06-03  9:56 ` [PATCH v7 0/5] convert grf.txt to YAML Heiko Stuebner
  5 siblings, 0 replies; 15+ messages in thread
From: Johan Jonker @ 2021-06-01 16:47 UTC (permalink / raw)
  To: heiko
  Cc: robh+dt, kishon, vkoul, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel

The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"
in phy-provider.yaml has required "#phy-cells" for phy nodes.
The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.
Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent
notifications.

make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
phy/phy-provider.yaml

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 arch/arm64/boot/dts/rockchip/px30.dtsi   | 2 +-
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 +-
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi
index 4e243d72e..248ebb61a 100644
--- a/arch/arm64/boot/dts/rockchip/px30.dtsi
+++ b/arch/arm64/boot/dts/rockchip/px30.dtsi
@@ -822,7 +822,7 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 
-		u2phy: usb2-phy@100 {
+		u2phy: usb2phy@100 {
 			compatible = "rockchip,px30-usb2phy";
 			reg = <0x100 0x20>;
 			clocks = <&pmucru SCLK_USBPHY_REF>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index bc0bdc3d8..8c821acb2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -819,7 +819,7 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 
-		u2phy: usb2-phy@100 {
+		u2phy: usb2phy@100 {
 			compatible = "rockchip,rk3328-usb2phy";
 			reg = <0x100 0x10>;
 			clocks = <&xin24m>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index a2eba5357..c1a253507 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1418,7 +1418,7 @@
 			status = "disabled";
 		};
 
-		u2phy0: usb2-phy@e450 {
+		u2phy0: usb2phy@e450 {
 			compatible = "rockchip,rk3399-usb2phy";
 			reg = <0xe450 0x10>;
 			clocks = <&cru SCLK_USB2PHY0_REF>;
@@ -1445,7 +1445,7 @@
 			};
 		};
 
-		u2phy1: usb2-phy@e460 {
+		u2phy1: usb2phy@e460 {
 			compatible = "rockchip,rk3399-usb2phy";
 			reg = <0xe460 0x10>;
 			clocks = <&cru SCLK_USB2PHY1_REF>;
-- 
2.11.0


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

* [PATCH v7 5/5] arm64: dts: rockchip: add USB support to rk3308.dtsi
  2021-06-01 16:47 [PATCH v7 0/5] convert grf.txt to YAML Johan Jonker
                   ` (3 preceding siblings ...)
  2021-06-01 16:47 ` [PATCH v7 4/5] arm64: " Johan Jonker
@ 2021-06-01 16:48 ` Johan Jonker
  2021-06-03  9:56 ` [PATCH v7 0/5] convert grf.txt to YAML Heiko Stuebner
  5 siblings, 0 replies; 15+ messages in thread
From: Johan Jonker @ 2021-06-01 16:48 UTC (permalink / raw)
  To: heiko
  Cc: robh+dt, kishon, vkoul, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel

From: Tobias Schramm <t.schramm@manjaro.org>

The Rockchip RK3308 features an integrated USB 2.0 phy, an USB OTG
controller and OHCI/EHCI interfaces.
This patch adds all of those to the RK3308 dtsi and thereby enables USB
support on the RK3308.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---

Changed:
  restyle
  limit grf reg size
  change sub nodename
---
 arch/arm64/boot/dts/rockchip/rk3308.dtsi | 74 +++++++++++++++++++++++++++++++-
 1 file changed, 73 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
index b815ce73e..a185901ab 100644
--- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
@@ -164,7 +164,7 @@
 
 	grf: grf@ff000000 {
 		compatible = "rockchip,rk3308-grf", "syscon", "simple-mfd";
-		reg = <0x0 0xff000000 0x0 0x10000>;
+		reg = <0x0 0xff000000 0x0 0x08000>;
 
 		reboot-mode {
 			compatible = "syscon-reboot-mode";
@@ -177,6 +177,42 @@
 		};
 	};
 
+	usb2phy_grf: syscon@ff008000 {
+		compatible = "rockchip,rk3308-usb2phy-grf", "syscon", "simple-mfd";
+		reg = <0x0 0xff008000 0x0 0x4000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		u2phy: usb2phy@100 {
+			compatible = "rockchip,rk3308-usb2phy";
+			reg = <0x100 0x10>;
+			assigned-clocks = <&cru USB480M>;
+			assigned-clock-parents = <&u2phy>;
+			clocks = <&cru SCLK_USBPHY_REF>;
+			clock-names = "phyclk";
+			clock-output-names = "usb480m_phy";
+			#clock-cells = <0>;
+			status = "disabled";
+
+			u2phy_otg: otg-port {
+				interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "otg-bvalid", "otg-id",
+						  "linestate";
+				#phy-cells = <0>;
+				status = "disabled";
+			};
+
+			u2phy_host: host-port {
+				interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "linestate";
+				#phy-cells = <0>;
+				status = "disabled";
+			};
+		};
+	};
+
 	detect_grf: syscon@ff00b000 {
 		compatible = "rockchip,rk3308-detect-grf", "syscon", "simple-mfd";
 		reg = <0x0 0xff00b000 0x0 0x1000>;
@@ -579,6 +615,42 @@
 		status = "disabled";
 	};
 
+	usb20_otg: usb@ff400000 {
+		compatible = "rockchip,rk3308-usb", "rockchip,rk3066-usb",
+			     "snps,dwc2";
+		reg = <0x0 0xff400000 0x0 0x40000>;
+		interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru HCLK_OTG>;
+		clock-names = "otg";
+		dr_mode = "otg";
+		g-np-tx-fifo-size = <16>;
+		g-rx-fifo-size = <280>;
+		g-tx-fifo-size = <256 128 128 64 32 16>;
+		phys = <&u2phy_otg>;
+		phy-names = "usb2-phy";
+		status = "disabled";
+	};
+
+	usb_host_ehci: usb@ff440000 {
+		compatible = "generic-ehci";
+		reg = <0x0 0xff440000 0x0 0x10000>;
+		interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru HCLK_HOST>, <&cru HCLK_HOST_ARB>, <&u2phy>;
+		phys = <&u2phy_host>;
+		phy-names = "usb";
+		status = "disabled";
+	};
+
+	usb_host_ohci: usb@ff450000 {
+		compatible = "generic-ohci";
+		reg = <0x0 0xff450000 0x0 0x10000>;
+		interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru HCLK_HOST>, <&cru HCLK_HOST_ARB>, <&u2phy>;
+		phys = <&u2phy_host>;
+		phy-names = "usb";
+		status = "disabled";
+	};
+
 	sdmmc: mmc@ff480000 {
 		compatible = "rockchip,rk3308-dw-mshc", "rockchip,rk3288-dw-mshc";
 		reg = <0x0 0xff480000 0x0 0x4000>;
-- 
2.11.0


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

* Re: [PATCH v7 2/5] dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf
  2021-06-01 16:47 ` [PATCH v7 2/5] dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf Johan Jonker
@ 2021-06-02 18:17   ` Rob Herring
  0 siblings, 0 replies; 15+ messages in thread
From: Rob Herring @ 2021-06-02 18:17 UTC (permalink / raw)
  To: Johan Jonker
  Cc: devicetree, linux-rockchip, vkoul, t.schramm, linux-phy, robh+dt,
	linux-arm-kernel, kishon, heiko, linux-kernel

On Tue, 01 Jun 2021 18:47:57 +0200, Johan Jonker wrote:
> From: Tobias Schramm <t.schramm@manjaro.org>
> 
> The RK3308 has a USB GRF.
> This patch adds a compatible string for it.
> 
> Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
> 
> Changed:
>   Add "rockchip,rk3308-usb2phy-grf" to "usb2phy@[0-9a-f]+$"
>   patternProperties too.
> ---
>  Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 

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

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

* Re: [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml
  2021-06-01 16:47 ` [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml Johan Jonker
@ 2021-06-03  5:54   ` Vinod Koul
  2021-06-03  8:58     ` Heiko Stübner
  0 siblings, 1 reply; 15+ messages in thread
From: Vinod Koul @ 2021-06-03  5:54 UTC (permalink / raw)
  To: Johan Jonker
  Cc: heiko, robh+dt, kishon, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel

On 01-06-21, 18:47, Johan Jonker wrote:
> The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"
> in phy-provider.yaml has required "#phy-cells" for phy nodes.
> The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.
> Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent
> notifications. Remove unneeded "#phy-cells" from parent node.
> Also sort example.
> 
> make ARCH=arm dtbs_check
> DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
> phy/phy-provider.yaml
> 
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> Acked-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +++--------
>  Documentation/devicetree/bindings/soc/rockchip/grf.yaml       |  4 ++--

I dont have grf.yaml, I guess it would be easier to split this into two
or apply this thru rockchip tree. If you prefer latter:

Acked-By: Vinod Koul <vkoul@kernel.org>

-- 
~Vinod

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

* Re: [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml
  2021-06-03  5:54   ` Vinod Koul
@ 2021-06-03  8:58     ` Heiko Stübner
  2021-06-07 13:16       ` Rob Herring
  0 siblings, 1 reply; 15+ messages in thread
From: Heiko Stübner @ 2021-06-03  8:58 UTC (permalink / raw)
  To: Johan Jonker, Vinod Koul
  Cc: robh+dt, kishon, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel

Hi Vinod,

Am Donnerstag, 3. Juni 2021, 07:54:24 CEST schrieb Vinod Koul:
> On 01-06-21, 18:47, Johan Jonker wrote:
> > The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"
> > in phy-provider.yaml has required "#phy-cells" for phy nodes.
> > The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.
> > Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent
> > notifications. Remove unneeded "#phy-cells" from parent node.
> > Also sort example.
> > 
> > make ARCH=arm dtbs_check
> > DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
> > phy/phy-provider.yaml
> > 
> > Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> > Acked-by: Rob Herring <robh@kernel.org>
> > ---
> >  .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +++--------
> >  Documentation/devicetree/bindings/soc/rockchip/grf.yaml       |  4 ++--
> 
> I dont have grf.yaml, I guess it would be easier to split this into two
> or apply this thru rockchip tree. If you prefer latter:
> 
> Acked-By: Vinod Koul <vkoul@kernel.org>

before we do any more rounds, I'll just do that with your Ack, thanks :-)


Heiko




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

* Re: [PATCH v7 0/5] convert grf.txt to YAML
  2021-06-01 16:47 [PATCH v7 0/5] convert grf.txt to YAML Johan Jonker
                   ` (4 preceding siblings ...)
  2021-06-01 16:48 ` [PATCH v7 5/5] arm64: dts: rockchip: add USB support to rk3308.dtsi Johan Jonker
@ 2021-06-03  9:56 ` Heiko Stuebner
  5 siblings, 0 replies; 15+ messages in thread
From: Heiko Stuebner @ 2021-06-03  9:56 UTC (permalink / raw)
  To: Johan Jonker
  Cc: Heiko Stuebner, kishon, t.schramm, linux-phy, linux-arm-kernel,
	linux-rockchip, robh+dt, vkoul, devicetree, linux-kernel

On Tue, 1 Jun 2021 18:47:55 +0200, Johan Jonker wrote:
> Changed V7:
>   rebase
>   add compatible for rk3308 USB grf
>     add "rockchip,rk3308-usb2phy-grf" to "usb2phy@[0-9a-f]+$"
>     patternProperties too
>   add USB support to rk3308.dtsi
>     restyle
>     limit grf reg size
>     change sub nodename
>   remove applied patches
> 
> [...]

Applied, thanks!

[1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml
      commit: e71ccdff376b0bd1bf4d47642b7ec4d791293b96
[2/5] dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf
      commit: da76290fa39dc647bf7a1bac6467e66c8e465e54
[3/5] ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2
      commit: 2fd2300a9c17ee1c48b1b7a7fabbb90fd12a64f1
[4/5] arm64: dts: rockchip: rename nodename for phy-rockchip-inno-usb2
      commit: 8c3d64251ac5c5a3d10364f6b07d3603ac1e7b4a
[5/5] arm64: dts: rockchip: add USB support to rk3308.dtsi
      commit: 9fcf74b274a1dc5bcda37c34470061ef1e1130dd

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

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

* Re: [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml
  2021-06-03  8:58     ` Heiko Stübner
@ 2021-06-07 13:16       ` Rob Herring
  2021-06-07 13:38         ` Johan Jonker
  0 siblings, 1 reply; 15+ messages in thread
From: Rob Herring @ 2021-06-07 13:16 UTC (permalink / raw)
  To: Heiko Stübner, Johan Jonker
  Cc: Vinod Koul, Kishon Vijay Abraham I, Tobias Schramm, linux-phy,
	open list:ARM/Rockchip SoC...,
	devicetree, linux-arm-kernel, linux-kernel

On Thu, Jun 3, 2021 at 3:58 AM Heiko Stübner <heiko@sntech.de> wrote:
>
> Hi Vinod,
>
> Am Donnerstag, 3. Juni 2021, 07:54:24 CEST schrieb Vinod Koul:
> > On 01-06-21, 18:47, Johan Jonker wrote:
> > > The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"
> > > in phy-provider.yaml has required "#phy-cells" for phy nodes.
> > > The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.
> > > Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent
> > > notifications. Remove unneeded "#phy-cells" from parent node.
> > > Also sort example.
> > >
> > > make ARCH=arm dtbs_check
> > > DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
> > > phy/phy-provider.yaml
> > >
> > > Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> > > Acked-by: Rob Herring <robh@kernel.org>
> > > ---
> > >  .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +++--------
> > >  Documentation/devicetree/bindings/soc/rockchip/grf.yaml       |  4 ++--
> >
> > I dont have grf.yaml, I guess it would be easier to split this into two
> > or apply this thru rockchip tree. If you prefer latter:
> >
> > Acked-By: Vinod Koul <vkoul@kernel.org>
>
> before we do any more rounds, I'll just do that with your Ack, thanks :-)

This is generating warnings on linux-next now:

/builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.example.dt.yaml:
syscon@ff770000: usb2phy@e450: '#phy-cells' does not match any of the
regexes: 'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
/builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.example.dt.yaml:
usb2phy@e450: '#phy-cells' does not match any of the regexes:
'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml

Rob

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

* Re: [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml
  2021-06-07 13:16       ` Rob Herring
@ 2021-06-07 13:38         ` Johan Jonker
  2021-06-07 14:18           ` [PATCH] dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml Heiko Stuebner
  0 siblings, 1 reply; 15+ messages in thread
From: Johan Jonker @ 2021-06-07 13:38 UTC (permalink / raw)
  To: Rob Herring, Heiko Stübner
  Cc: Vinod Koul, Kishon Vijay Abraham I, Tobias Schramm, linux-phy,
	open list:ARM/Rockchip SoC...,
	devicetree, linux-arm-kernel, linux-kernel



On 6/7/21 3:16 PM, Rob Herring wrote:
> On Thu, Jun 3, 2021 at 3:58 AM Heiko Stübner <heiko@sntech.de> wrote:
>>
>> Hi Vinod,
>>
>> Am Donnerstag, 3. Juni 2021, 07:54:24 CEST schrieb Vinod Koul:
>>> On 01-06-21, 18:47, Johan Jonker wrote:
>>>> The pattern: "^(|usb-|usb2-|usb3-|pci-|pcie-|sata-)phy(@[0-9a-f,]+)*$"
>>>> in phy-provider.yaml has required "#phy-cells" for phy nodes.
>>>> The "phy-cells" in rockchip-inno-usb2 nodes are located in subnodes.
>>>> Rename the nodename to pattern "usb2phy@[0-9a-f]+$" to prevent
>>>> notifications. Remove unneeded "#phy-cells" from parent node.
>>>> Also sort example.
>>>>
>>>> make ARCH=arm dtbs_check
>>>> DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
>>>> phy/phy-provider.yaml
>>>>
>>>> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
>>>> Acked-by: Rob Herring <robh@kernel.org>
>>>> ---
>>>>  .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml       | 11 +++--------
>>>>  Documentation/devicetree/bindings/soc/rockchip/grf.yaml       |  4 ++--
>>>
>>> I dont have grf.yaml, I guess it would be easier to split this into two
>>> or apply this thru rockchip tree. If you prefer latter:
>>>
>>> Acked-By: Vinod Koul <vkoul@kernel.org>
>>
>> before we do any more rounds, I'll just do that with your Ack, thanks :-)
> 
> This is generating warnings on linux-next now:
> 
> /builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.example.dt.yaml:
> syscon@ff770000: usb2phy@e450: '#phy-cells' does not match any of the
> regexes: 'pinctrl-[0-9]+'
> From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
> /builds/robherring/linux-dt/Documentation/devicetree/bindings/soc/rockchip/grf.example.dt.yaml:
> usb2phy@e450: '#phy-cells' does not match any of the regexes:
> 'pinctrl-[0-9]+'
> From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml
> 
> Rob
> 

Hi Rob, Heiko,

Sorry...
That '#phy-cells' in the grf.yaml example also needs to go.

Is that something Heiko can fix in his git tree or
do I have to resubmit the complete patch or just a fix?
Please advise.

Kind regards,

Johan

===
> 
> examples:
>   - |
>     #include <dt-bindings/clock/rk3399-cru.h>
>     #include <dt-bindings/interrupt-controller/arm-gic.h>
>     #include <dt-bindings/power/rk3399-power.h>
>     grf: syscon@ff770000 {
>       compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
>       reg = <0xff770000 0x10000>;
>       #address-cells = <1>;
>       #size-cells = <1>;
> 
>       mipi_dphy_rx0: mipi-dphy-rx0 {
>         compatible = "rockchip,rk3399-mipi-dphy-rx0";
>         clocks = <&cru SCLK_MIPIDPHY_REF>,
>                  <&cru SCLK_DPHY_RX0_CFG>,
>                  <&cru PCLK_VIO_GRF>;
>         clock-names = "dphy-ref", "dphy-cfg", "grf";
>         power-domains = <&power RK3399_PD_VIO>;
>         #phy-cells = <0>;
>       };
> 
>       u2phy0: usb2phy@e450 {
>         compatible = "rockchip,rk3399-usb2phy";
>         reg = <0xe450 0x10>;
>         clocks = <&cru SCLK_USB2PHY0_REF>;
>         clock-names = "phyclk";
>         #clock-cells = <0>;
>         clock-output-names = "clk_usbphy0_480m";

>         #phy-cells = <0>;

Remove

> 
>         u2phy0_host: host-port {
>           #phy-cells = <0>;
>           interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH 0>;
>           interrupt-names = "linestate";
>          };
> 
>         u2phy0_otg: otg-port {
>           #phy-cells = <0>;
>           interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH 0>,
>                        <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH 0>,
>                        <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 0>;
>           interrupt-names = "otg-bvalid", "otg-id",
>                             "linestate";
>         };
>       };
>     };




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

* [PATCH] dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml
  2021-06-07 13:38         ` Johan Jonker
@ 2021-06-07 14:18           ` Heiko Stuebner
  2021-06-07 15:37             ` Johan Jonker
  0 siblings, 1 reply; 15+ messages in thread
From: Heiko Stuebner @ 2021-06-07 14:18 UTC (permalink / raw)
  To: jbx6244
  Cc: robh+dt, vkoul, kishon, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel, Heiko Stuebner

The recent yaml conversion of the grf and inno-usb2-phy bindings
left the #phy-cells in place in the main usb2phy node inside the
example in grf.yaml, causing new warnings.

Drop it to make the bindingcheck happy.

Fixes: e71ccdff376b ("dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
Like this I guess?

 Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
index 8c1c46fef157..62fa72cfea34 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
+++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
@@ -242,7 +242,6 @@ examples:
         clock-names = "phyclk";
         #clock-cells = <0>;
         clock-output-names = "clk_usbphy0_480m";
-        #phy-cells = <0>;
 
         u2phy0_host: host-port {
           #phy-cells = <0>;
-- 
2.29.2


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

* Re: [PATCH] dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml
  2021-06-07 14:18           ` [PATCH] dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml Heiko Stuebner
@ 2021-06-07 15:37             ` Johan Jonker
  2021-06-10  7:30               ` Heiko Stübner
  0 siblings, 1 reply; 15+ messages in thread
From: Johan Jonker @ 2021-06-07 15:37 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: robh+dt, vkoul, kishon, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel



On 6/7/21 4:18 PM, Heiko Stuebner wrote:
> The recent yaml conversion of the grf and inno-usb2-phy bindings
> left the #phy-cells in place in the main usb2phy node inside the
> example in grf.yaml, causing new warnings.
> 
> Drop it to make the bindingcheck happy.
> 
> Fixes: e71ccdff376b ("dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml")
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---

> Like this I guess?

Hi Heiko,

When I apply this patch locally and give the command below the
notifications are gone.

make ARCH=arm dt_binding_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/soc/rockchip/grf.yaml

Thanks,

Johan

> 
>  Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
> index 8c1c46fef157..62fa72cfea34 100644
> --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
> +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml
> @@ -242,7 +242,6 @@ examples:
>          clock-names = "phyclk";
>          #clock-cells = <0>;
>          clock-output-names = "clk_usbphy0_480m";
> -        #phy-cells = <0>;
>  
>          u2phy0_host: host-port {
>            #phy-cells = <0>;
> 

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

* Re: [PATCH] dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml
  2021-06-07 15:37             ` Johan Jonker
@ 2021-06-10  7:30               ` Heiko Stübner
  0 siblings, 0 replies; 15+ messages in thread
From: Heiko Stübner @ 2021-06-10  7:30 UTC (permalink / raw)
  To: Johan Jonker
  Cc: robh+dt, vkoul, kishon, t.schramm, linux-phy, linux-rockchip,
	devicetree, linux-arm-kernel, linux-kernel

Am Montag, 7. Juni 2021, 17:37:06 CEST schrieb Johan Jonker:
> 
> On 6/7/21 4:18 PM, Heiko Stuebner wrote:
> > The recent yaml conversion of the grf and inno-usb2-phy bindings
> > left the #phy-cells in place in the main usb2phy node inside the
> > example in grf.yaml, causing new warnings.
> > 
> > Drop it to make the bindingcheck happy.
> > 
> > Fixes: e71ccdff376b ("dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml")
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > ---
> 
> > Like this I guess?
> 
> Hi Heiko,
> 
> When I apply this patch locally and give the command below the
> notifications are gone.
> 
> make ARCH=arm dt_binding_check
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/soc/rockchip/grf.yaml

so I've applied the patch on top now in my tree.

Heiko




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

end of thread, other threads:[~2021-06-10  7:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 16:47 [PATCH v7 0/5] convert grf.txt to YAML Johan Jonker
2021-06-01 16:47 ` [PATCH v7 1/5] dt-bindings: phy: rename phy nodename in phy-rockchip-inno-usb2.yaml Johan Jonker
2021-06-03  5:54   ` Vinod Koul
2021-06-03  8:58     ` Heiko Stübner
2021-06-07 13:16       ` Rob Herring
2021-06-07 13:38         ` Johan Jonker
2021-06-07 14:18           ` [PATCH] dt-bindings: soc: rockchip: drop unnecessary #phy-cells from grf.yaml Heiko Stuebner
2021-06-07 15:37             ` Johan Jonker
2021-06-10  7:30               ` Heiko Stübner
2021-06-01 16:47 ` [PATCH v7 2/5] dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf Johan Jonker
2021-06-02 18:17   ` Rob Herring
2021-06-01 16:47 ` [PATCH v7 3/5] ARM: dts: rockchip: rename nodename for phy-rockchip-inno-usb2 Johan Jonker
2021-06-01 16:47 ` [PATCH v7 4/5] arm64: " Johan Jonker
2021-06-01 16:48 ` [PATCH v7 5/5] arm64: dts: rockchip: add USB support to rk3308.dtsi Johan Jonker
2021-06-03  9:56 ` [PATCH v7 0/5] convert grf.txt to YAML Heiko Stuebner

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