Skip to contentSkip to conversation

phy: add PHY_MODE_LVDS

PATCH In review Heiko Stuebner 2 participants 4 messages Oct 23, 2019 – Oct 29, 2019

Subsystems (3)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

PATCH 1/3 phy: add PHY_MODE_LVDS

There are combo phys out there that can be switched between doing dsi and lvds. So add a mode definition for it.

---
 include/linux/phy/phy.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/phy/phy.h +2 -1
index 15032f145063..56d3a100006a 100644
@@ -38,7 +38,8 @@ enum phy_mode {
 	PHY_MODE_PCIE,
 	PHY_MODE_ETHERNET,
 	PHY_MODE_MIPI_DPHY,
-	PHY_MODE_SATA
+	PHY_MODE_SATA,
+	PHY_MODE_LVDS,
 };
 
 /**
Signature · 1 line
2.23.0
author maintainer
#1 lore raw

PATCH 2/3 dt-bindings: phy: add yaml binding for rockchip,px30-dsi-dphy

This adds a yaml binding for the external dsi phy found on Rockchip socs of the px30, rk3128 and rk3368 variants.

---
 .../bindings/phy/rockchip,px30-dsi-dphy.yaml  | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/rockchip,px30-dsi-dphy.yaml
Documentation/devicetree/bindings/phy/rockchip,px30-dsi-dphy.yaml new file +75 -0
new file mode 100644
index 000000000000..c2e1a998a766
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/rockchip,px30-dsi-dphy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip MIPI DPHY with additional LVDS/TTL modes
+
+maintainers:
+  - Heiko Stuebner <[email protected]>
+
+properties:
+  "#phy-cells":
+    const: 0
+
+  "#clock-cells":
+    const: 0
+
+  compatible:
+    enum:
+      - rockchip,px30-dsi-dphy
+      - rockchip,rk3128-dsi-dphy
+      - rockchip,rk3368-dsi-dphy
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: PLL reference clock
+      - description: Module clock
+
+  clock-names:
+    items:
+      - const: ref
+      - const: pclk
+
+  power-domains:
+    maxItems: 1
+    description: phandle to the associated power domain
+
+  resets:
+    items:
+      - description: exclusive PHY reset line
+
+  reset-names:
+    items:
+      - const: apb
+
+required:
+  - "#phy-cells"
+  - "#clock-cells"
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - resets
+  - reset-names
+
+additionalProperties: false
+
+examples:
+  - |
+    dsi_dphy: phy@ff2e0000 {
+        compatible = "rockchip,px30-video-phy";
+        reg = <0x0 0xff2e0000 0x0 0x10000>;
+        clocks = <&pmucru 13>, <&cru 12>;
+        clock-names = "ref", "pclk";
+        #clock-cells = <0>;
+        resets = <&cru 12>;
+        reset-names = "apb";
+        #phy-cells = <0>;
+    };
+
+...
Signature · 1 line
2.23.0
maintainer Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] dt-bindings: phy: add yaml binding for rockchip,px30-dsi-dphy

Quoted 15 lines · Heiko Stuebner

This adds a yaml binding for the external dsi phy found on Rockchip socs of the px30, rk3128 and rk3368 variants.

---
 .../bindings/phy/rockchip,px30-dsi-dphy.yaml  | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/rockchip,px30-dsi-dphy.yaml
Documentation/devicetree/bindings/phy/rockchip,px30-dsi-dphy.yaml new file +0 -0
new file mode 100644
index 000000000000..c2e1a998a766

Documentation/devicetree/bindings/phy/rockchip,px30-dsi-dphy.yaml line 1

Quoted 1 line
Documentation/devicetree/bindings/phy/rockchip,px30-dsi-dphy.yaml new file +1 -0
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: GPL-2.0

(GPL-2.0-only OR BSD-2-Clause) for new bindings.

Otherwise,

author maintainer
#3 lore raw

PATCH 3/3 phy/rockchip: Add support for Innosilicon MIPI/LVDS/TTL PHY

In reply to Heiko Stuebner

From: Wyon Bi <[email protected]>

The Innosilicon Video Combo PHY not only supports MIPI DSI, but also LVDS and TTL functions with small die size and low pin count. Customers can choose according to their own applications.

[removed TTL mode for now, as it required a hook back into the dsi host]
---
 drivers/phy/rockchip/Kconfig                  |   8 +
 drivers/phy/rockchip/Makefile                 |   1 +
 .../phy/rockchip/phy-rockchip-inno-dsidphy.c  | 805 ++++++++++++++++++
 3 files changed, 814 insertions(+)
 create mode 100644 drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
drivers/phy/rockchip/Kconfig +8 -0
index c454c90cd99e..dbd2de4d28b1 100644
@@ -35,6 +35,14 @@ config PHY_ROCKCHIP_INNO_USB2
 	help
 	  Support for Rockchip USB2.0 PHY with Innosilicon IP block.
 
+config PHY_ROCKCHIP_INNO_DSIDPHY
+	tristate "Rockchip Innosilicon MIPI/LVDS/TTL PHY driver"
+	depends on (ARCH_ROCKCHIP || COMPILE_TEST) && OF
+	select GENERIC_PHY
+	help
+	  Enable this to support the Rockchip MIPI/LVDS/TTL PHY with
+	  Innosilicon IP block.
+
 config PHY_ROCKCHIP_PCIE
 	tristate "Rockchip PCIe PHY Driver"
 	depends on (ARCH_ROCKCHIP && OF) || COMPILE_TEST
drivers/phy/rockchip/Makefile +1 -0
index fd21cbaf40dd..9f59a81e4e0d 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PHY_ROCKCHIP_DP)		+= phy-rockchip-dp.o
 obj-$(CONFIG_PHY_ROCKCHIP_EMMC)		+= phy-rockchip-emmc.o
+obj-$(CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY)	+= phy-rockchip-inno-dsidphy.o
 obj-$(CONFIG_PHY_ROCKCHIP_INNO_HDMI)	+= phy-rockchip-inno-hdmi.o
 obj-$(CONFIG_PHY_ROCKCHIP_INNO_USB2)	+= phy-rockchip-inno-usb2.o
 obj-$(CONFIG_PHY_ROCKCHIP_PCIE)		+= phy-rockchip-pcie.o
drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c new file +805 -0

805 lines not on this page · raw message

Signature · 1 line
2.23.0