Skip to contentSkip to conversation

phy: amlogic: Add support for the G12A Analog MIPI D-PHY

PATCH Superseded Neil Armstrong 3 participants 8 messages Nov 23, 2020 – Dec 8, 2020

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover phy: amlogic: Add support for the G12A Analog MIPI D-PHY

The Amlogic G12A SoCs embeds an Analog MIPI D-PHY to communicate with DSI panels, this adds the bindings.

This Analog D-PHY works with a separate Digital MIPI D-PHY.

This serie adds the Bindings and the PHY driver.

Neil Armstrong (2):
dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings
phy: amlogic: Add G12A Analog MIPI D-PHY driver

 .../phy/amlogic,g12a-mipi-dphy-analog.yaml    |  40 ++++
 drivers/phy/amlogic/Kconfig                   |  12 ++
 drivers/phy/amlogic/Makefile                  |   1 +
 .../amlogic/phy-meson-g12a-mipi-dphy-analog.c | 177 ++++++++++++++++++
 4 files changed, 230 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
 create mode 100644 drivers/phy/amlogic/phy-meson-g12a-mipi-dphy-analog.c
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings

The Amlogic G12A SoCs embeds an Analog MIPI D-PHY to communicate with DSI panels, this adds the bindings.

This Analog D-PHY works with a separate Digital MIPI D-PHY.

---
 .../phy/amlogic,g12a-mipi-dphy-analog.yaml    | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +40 -0
new file mode 100644
index 000000000000..28663552f05b
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Amlogic G12A MIPI analog PHY
+
+maintainers:
+  - Neil Armstrong <[email protected]>
+
+description: |+
+  The Everything-Else Power Domains node should be the child of a syscon
+  node with the required property:
+
+  - compatible: Should be the following:
+                "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
+
+  Refer to the the bindings described in
+  Documentation/devicetree/bindings/mfd/syscon.yaml
+
+properties:
+  compatible:
+    const: amlogic,g12a-mipi-dphy-analog
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    mpphy: phy {
+          compatible = "amlogic,g12a-mipi-dphy-analog";
+          #phy-cells = <0>;
+    };
Signature · 7 lines
2.25.1


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
maintainer
#2 lore raw

Re: [PATCH 1/2] dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings

Quoted 4 lines · Neil Armstrong

The Amlogic G12A SoCs embeds an Analog MIPI D-PHY to communicate with DSI panels, this adds the bindings.

This Analog D-PHY works with a separate Digital MIPI D-PHY.

Pls cc Rob on dt binding patches (hint get_maintainer.pl would tell you do so)

Quoted 55 lines
---
 .../phy/amlogic,g12a-mipi-dphy-analog.yaml    | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +40 -0
new file mode 100644
index 000000000000..28663552f05b
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Amlogic G12A MIPI analog PHY
+
+maintainers:
+  - Neil Armstrong <[email protected]>
+
+description: |+
+  The Everything-Else Power Domains node should be the child of a syscon
+  node with the required property:
+
+  - compatible: Should be the following:
+                "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
+
+  Refer to the the bindings described in
+  Documentation/devicetree/bindings/mfd/syscon.yaml
+
+properties:
+  compatible:
+    const: amlogic,g12a-mipi-dphy-analog
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    mpphy: phy {
+          compatible = "amlogic,g12a-mipi-dphy-analog";
+          #phy-cells = <0>;
+    };
Signature · 1 line
2.25.1
Signature · 6 lines
~Vinod

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
#3 lore raw

Re: [PATCH 1/2] dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings

Hi,

Quoted 8 lines · Vinod Koul
Quoted 4 lines · Neil Armstrong

The Amlogic G12A SoCs embeds an Analog MIPI D-PHY to communicate with DSI panels, this adds the bindings.

This Analog D-PHY works with a separate Digital MIPI D-PHY.

Pls cc Rob on dt binding patches (hint get_maintainer.pl would tell you do so)

It's the case.

Neil

Quoted 48 lines
Quoted 48 lines
---
 .../phy/amlogic,g12a-mipi-dphy-analog.yaml    | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +34 -0
new file mode 100644
index 000000000000..28663552f05b
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Amlogic G12A MIPI analog PHY
+
+maintainers:
+  - Neil Armstrong <[email protected]>
+
+description: |+
+  The Everything-Else Power Domains node should be the child of a syscon
+  node with the required property:
+
+  - compatible: Should be the following:
+                "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
+
+  Refer to the the bindings described in
+  Documentation/devicetree/bindings/mfd/syscon.yaml
+
+properties:
+  compatible:
+    const: amlogic,g12a-mipi-dphy-analog
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - "#phy-cells"
+
+additionalProperties: false
+
Quoted 9 lines
Quoted 8 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +6 -0
+examples:
+  - |
+    mpphy: phy {
+          compatible = "amlogic,g12a-mipi-dphy-analog";
+          #phy-cells = <0>;
+    };
Signature · 1 line
2.25.1

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

maintainer
#4 lore raw

Re: [PATCH 1/2] dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings

In reply to Neil Armstrong
Quoted 20 lines · Neil Armstrong

The Amlogic G12A SoCs embeds an Analog MIPI D-PHY to communicate with DSI panels, this adds the bindings.

This Analog D-PHY works with a separate Digital MIPI D-PHY.

---
 .../phy/amlogic,g12a-mipi-dphy-analog.yaml    | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +3 -0
new file mode 100644
index 000000000000..28663552f05b
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---

Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml line 13

Quoted 10 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +10 -0
+$id: "http://devicetree.org/schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Amlogic G12A MIPI analog PHY
+
+maintainers:
+  - Neil Armstrong <[email protected]>
+
+description: |+
+  The Everything-Else Power Domains node should be the child of a syscon

Everything-Else Power Domains node??

Quoted 30 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +27 -0
+  node with the required property:
+
+  - compatible: Should be the following:
+                "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
+
+  Refer to the the bindings described in
+  Documentation/devicetree/bindings/mfd/syscon.yaml
+
+properties:
+  compatible:
+    const: amlogic,g12a-mipi-dphy-analog
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    mpphy: phy {
+          compatible = "amlogic,g12a-mipi-dphy-analog";
+          #phy-cells = <0>;
+    };
Signature · 1 line
2.25.1

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#5 lore raw

Re: [PATCH 1/2] dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings

Quoted 25 lines · Rob Herring
Quoted 24 lines · Neil Armstrong

The Amlogic G12A SoCs embeds an Analog MIPI D-PHY to communicate with DSI panels, this adds the bindings.

This Analog D-PHY works with a separate Digital MIPI D-PHY.

---
 .../phy/amlogic,g12a-mipi-dphy-analog.yaml    | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +7 -0
new file mode 100644
index 000000000000..28663552f05b
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Amlogic G12A MIPI analog PHY
Quoted 8 lines

Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml line 13

Quoted 6 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +6 -0
+
+maintainers:
+  - Neil Armstrong <[email protected]>
+
+description: |+
+  The Everything-Else Power Domains node should be the child of a syscon

Everything-Else Power Domains node??

Indeed, it's a typo

Quoted 23 lines
Quoted 23 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +22 -0
+  node with the required property:
+
+  - compatible: Should be the following:
+                "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
+
+  Refer to the the bindings described in
+  Documentation/devicetree/bindings/mfd/syscon.yaml
+
+properties:
+  compatible:
+    const: amlogic,g12a-mipi-dphy-analog
+
+  "#phy-cells":
+    const: 0
+
+required:
+  - compatible
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +5 -0
+  - |
+    mpphy: phy {
+          compatible = "amlogic,g12a-mipi-dphy-analog";
+          #phy-cells = <0>;
+    };
Signature · 1 line
2.25.1

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

maintainer
#6 lore raw

Re: [PATCH 1/2] dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings

In reply to Neil Armstrong
Quoted 27 lines · Neil Armstrong

The Amlogic G12A SoCs embeds an Analog MIPI D-PHY to communicate with DSI panels, this adds the bindings.

This Analog D-PHY works with a separate Digital MIPI D-PHY.

---
 .../phy/amlogic,g12a-mipi-dphy-analog.yaml    | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +10 -0
new file mode 100644
index 000000000000..28663552f05b
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/phy/amlogic,g12a-mipi-dphy-analog.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Amlogic G12A MIPI analog PHY
+
+maintainers:
+  - Neil Armstrong <[email protected]>

Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml line 20

Quoted 10 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +10 -0
+
+description: |+
+  The Everything-Else Power Domains node should be the child of a syscon
+  node with the required property:
+
+  - compatible: Should be the following:
+                "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
+
+  Refer to the the bindings described in
+  Documentation/devicetree/bindings/mfd/syscon.yaml

This schema should be referenced from the parent schema and if you have child nodes, you shouldn't be using syscon.yaml.

Quoted 9 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +9 -0
+
+properties:
+  compatible:
+    const: amlogic,g12a-mipi-dphy-analog
+
+  "#phy-cells":
+    const: 0
+
+required:

Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml line 39

Quoted 10 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +10 -0
+  - compatible
+  - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    mpphy: phy {
+          compatible = "amlogic,g12a-mipi-dphy-analog";
+          #phy-cells = <0>;

Looks like a dedicated subset of registers, add 'reg' even if Linux doesn't use it (currently).

Quoted 4 lines
Documentation/devicetree/bindings/phy/amlogic,g12a-mipi-dphy-analog.yaml new file +1 -0
+    };
Signature · 1 line
2.25.1

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#7 lore raw

PATCH 2/2 phy: amlogic: Add G12A Analog MIPI D-PHY driver

In reply to Neil Armstrong

The Amlogic G12A SoCs embeds an Analog MIPI D-PHY used to communicate with DSI panels.

---
 drivers/phy/amlogic/Kconfig                   |  12 ++
 drivers/phy/amlogic/Makefile                  |   1 +
 .../amlogic/phy-meson-g12a-mipi-dphy-analog.c | 177 ++++++++++++++++++
 3 files changed, 190 insertions(+)
 create mode 100644 drivers/phy/amlogic/phy-meson-g12a-mipi-dphy-analog.c
drivers/phy/amlogic/Kconfig +12 -0
index db5d0cd757e3..ac898a102bcc 100644
@@ -49,6 +49,18 @@ config PHY_MESON_G12A_USB3_PCIE
 	  in Meson G12A SoCs.
 	  If unsure, say N.
 
+config PHY_MESON_G12A_MIPI_DPHY_ANALOG
+	tristate "Meson G12A MIPI Analog DPHY driver"
+	default ARCH_MESON
+	depends on OF && (ARCH_MESON || COMPILE_TEST)
+	select GENERIC_PHY
+	select REGMAP_MMIO
+	select GENERIC_PHY_MIPI_DPHY
+	help
+	  Enable this to support the Meson MIPI Analog DPHY found in Meson G12A
+	  SoCs.
+	  If unsure, say N.
+
 config PHY_MESON_AXG_PCIE
 	tristate "Meson AXG PCIE PHY driver"
 	default ARCH_MESON
drivers/phy/amlogic/Makefile +1 -0
index 8fa07fbd0d92..2eada0a683ca 100644
@@ -3,6 +3,7 @@ obj-$(CONFIG_PHY_MESON8B_USB2)			+= phy-meson8b-usb2.o
 obj-$(CONFIG_PHY_MESON_GXL_USB2)		+= phy-meson-gxl-usb2.o
 obj-$(CONFIG_PHY_MESON_G12A_USB2)		+= phy-meson-g12a-usb2.o
 obj-$(CONFIG_PHY_MESON_G12A_USB3_PCIE)		+= phy-meson-g12a-usb3-pcie.o
+obj-$(CONFIG_PHY_MESON_G12A_MIPI_DPHY_ANALOG)	+= phy-meson-g12a-mipi-dphy-analog.o
 obj-$(CONFIG_PHY_MESON_AXG_PCIE)		+= phy-meson-axg-pcie.o
 obj-$(CONFIG_PHY_MESON_AXG_MIPI_PCIE_ANALOG)	+= phy-meson-axg-mipi-pcie-analog.o
 obj-$(CONFIG_PHY_MESON_AXG_MIPI_DPHY)		+= phy-meson-axg-mipi-dphy.o
drivers/phy/amlogic/phy-meson-g12a-mipi-dphy-analog.c new file +177 -0

177 lines not on this page · raw message

Signature · 7 lines
2.25.1


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic