Skip to contentSkip to conversation

arm64: dts: meson-axg-s400: add support for Power Controller & MIPI-DSI PHY

PATCH Applied Neil Armstrong 3 participants 7 messages Nov 20, 2020 – Nov 23, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: meson-axg-s400: add support for Power Controller & MIPI-DSI PHY

This adds the Power Controller and MIPI DSI PHY nodes to AXG, since the corresponding driver and dt-bindings had been applied for next release.

Dependencies:
- Patch 1: [1] applied for 5.11 in meson-clk tree & [2] merged for 5.10
- Patch 2: [3] & [4] both applied for 5.11 in phy tree

[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
[3] https://lore.kernel.org/r/[email protected]
[4] https://lore.kernel.org/r/[email protected]

Neil Armstrong (2):
arm64: dts: meson-axg: add PWRC node
arm64: dts: meson-axg: add MIPI DSI PHY nodes

 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
Signature · 7 lines
2.25.1


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

PATCH 1/2 arm64: dts: meson-axg: add PWRC node

This adds the power controller PWRC node and the corresponding ethernet power domain.

---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +42 -0
index b9efc8469265..288667699ec0 100644
@@ -12,6 +12,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
 #include <dt-bindings/reset/amlogic,meson-axg-reset.h>
+#include <dt-bindings/power/meson-axg-power.h>
 
 / {
 	compatible = "amlogic,meson-axg";
@@ -187,6 +188,7 @@ ethmac: ethernet@ff3f0000 {
 				      "timing-adjustment";
 			rx-fifo-depth = <4096>;
 			tx-fifo-depth = <2048>;
+			power-domains = <&pwrc PWRC_AXG_ETHERNET_MEM_ID>;
 			status = "disabled";
 		};
 
@@ -1117,6 +1119,46 @@ clkc: clock-controller {
 					clocks = <&xtal>;
 					clock-names = "xtal";
 				};
+
+				pwrc: power-controller {
+					compatible = "amlogic,meson-axg-pwrc";
+					#power-domain-cells = <1>;
+					amlogic,ao-sysctrl = <&sysctrl_AO>;
+					resets = <&reset RESET_VIU>,
+						 <&reset RESET_VENC>,
+						 <&reset RESET_VCBUS>,
+						 <&reset RESET_VENCL>,
+						 <&reset RESET_VID_LOCK>;
+					reset-names = "viu", "venc", "vcbus",
+						      "vencl", "vid_lock";
+					clocks = <&clkc CLKID_VPU>,
+						 <&clkc CLKID_VAPB>;
+					clock-names = "vpu", "vapb";
+					/*
+					 * VPU clocking is provided by two identical clock paths
+					 * VPU_0 and VPU_1 muxed to a single clock by a glitch
+					 * free mux to safely change frequency while running.
+					 * Same for VAPB but with a final gate after the glitch free mux.
+					 */
+					assigned-clocks = <&clkc CLKID_VPU_0_SEL>,
+							  <&clkc CLKID_VPU_0>,
+							  <&clkc CLKID_VPU>, /* Glitch free mux */
+							  <&clkc CLKID_VAPB_0_SEL>,
+							  <&clkc CLKID_VAPB_0>,
+							  <&clkc CLKID_VAPB_SEL>; /* Glitch free mux */
+					assigned-clock-parents = <&clkc CLKID_FCLK_DIV4>,
+								 <0>, /* Do Nothing */
+								 <&clkc CLKID_VPU_0>,
+								 <&clkc CLKID_FCLK_DIV4>,
+								 <0>, /* Do Nothing */
+								 <&clkc CLKID_VAPB_0>;
+					assigned-clock-rates = <0>, /* Do Nothing */
+							       <250000000>,
+							       <0>, /* Do Nothing */
+							       <0>, /* Do Nothing */
+							       <250000000>,
+							       <0>; /* Do Nothing */
+				};
 			};
 		};
 
Signature · 7 lines
2.25.1


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

PATCH 2/2 arm64: dts: meson-axg: add MIPI DSI PHY nodes

In reply to Neil Armstrong

This adds the nodes for :
- MIPI DSI+PCIe analog phy
- MIPI D-PHY

---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +19 -0
index 288667699ec0..d811708f8f67 100644
@@ -1159,6 +1159,12 @@ pwrc: power-controller {
 							       <250000000>,
 							       <0>; /* Do Nothing */
 				};
+
+				mipi_pcie_analog_dphy: phy {
+					compatible = "amlogic,axg-mipi-pcie-analog-phy";
+					#phy-cells = <0>;
+					status = "disabled";
+				};
 			};
 		};
 
@@ -1171,6 +1177,19 @@ mailbox: mailbox@ff63c404 {
 			#mbox-cells = <1>;
 		};
 
+		mipi_dphy: phy@ff640000 {
+			compatible = "amlogic,axg-mipi-dphy";
+			reg = <0x0 0xff640000 0x0 0x100>;
+			clocks = <&clkc CLKID_MIPI_DSI_PHY>;
+			clock-names = "pclk";
+			resets = <&reset RESET_MIPI_PHY>;
+			reset-names = "phy";
+			phys = <&mipi_pcie_analog_dphy>;
+			phy-names = "analog";
+			#phy-cells = <0>;
+			status = "disabled";
+		};
+
 		audio: bus@ff642000 {
 			compatible = "simple-bus";
 			reg = <0x0 0xff642000 0x0 0x2000>;
Signature · 7 lines
2.25.1


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
maintainer
#4 lore raw
In reply to Neil Armstrong
Quoted 6 lines · Neil Armstrong

This adds the Power Controller and MIPI DSI PHY nodes to AXG, since the corresponding driver and dt-bindings had been applied for next release.

Dependencies:
- Patch 1: [1] applied for 5.11 in meson-clk tree & [2] merged for 5.10
- Patch 2: [3] & [4] both applied for 5.11 in phy tree

Thanks for describing the dependencies in detail.

Looks like only [1] is needed a build time. Could you give me a immutable tag from the clk tree (or clk-meson) I could use in my dt64 branch to ensure my dt64 branch is buildable.

Thanks,

Kevin

Quoted 5 lines

[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
[3] https://lore.kernel.org/r/[email protected]
[4] https://lore.kernel.org/r/[email protected]

Quoted 9 lines

Neil Armstrong (2):
arm64: dts: meson-axg: add PWRC node
arm64: dts: meson-axg: add MIPI DSI PHY nodes

 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
Signature · 1 line
2.25.1

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

#5 lore raw

Hi,

Quoted 9 lines · Kevin Hilman
Quoted 6 lines · Neil Armstrong

This adds the Power Controller and MIPI DSI PHY nodes to AXG, since the corresponding driver and dt-bindings had been applied for next release.

Dependencies:
- Patch 1: [1] applied for 5.11 in meson-clk tree & [2] merged for 5.10
- Patch 2: [3] & [4] both applied for 5.11 in phy tree

Quoted 5 lines

Thanks for describing the dependencies in detail.

Looks like only [1] is needed a build time. Could you give me a immutable tag from the clk tree (or clk-meson) I could use in my dt64 branch to ensure my dt64 branch is buildable.

Here you go:

The following changes since commit 3650b228f83adda7e5ee532e2b90429c03f7b9ec:

Linux 5.10-rc1 (2020-10-25 15:14:11 -0700)

are available in the Git repository at:

git://github.com/BayLibre/clk-meson.git tags/clk-meson-v5.11-headers-1

for you to fetch changes up to cd3caa573ebd1f32727962cf7dead43f5144d080:

dt-bindings: clk: axg-clkc: add MIPI DSI Host clock binding (2020-11-23 09:06:34 +0100)

----------------------------------------------------------------
Amlogic clock headers updates for v5.11

* Add axg's video clocks

----------------------------------------------------------------
Neil Armstrong (2):
dt-bindings: clk: axg-clkc: add Video Clocks
dt-bindings: clk: axg-clkc: add MIPI DSI Host clock binding

 include/dt-bindings/clock/axg-clkc.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Thanks,
Neil

Quoted 20 lines

Thanks,

Kevin

Quoted 14 lines

[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
[3] https://lore.kernel.org/r/[email protected]
[4] https://lore.kernel.org/r/[email protected]

Neil Armstrong (2):
arm64: dts: meson-axg: add PWRC node
arm64: dts: meson-axg: add MIPI DSI PHY nodes

 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
Signature · 1 line
2.25.1
maintainer Applied
#6 lore raw
In reply to Neil Armstrong
Quoted 8 lines · Neil Armstrong

This adds the Power Controller and MIPI DSI PHY nodes to AXG, since the corresponding driver and dt-bindings had been applied for next release.

Dependencies:
- Patch 1: [1] applied for 5.11 in meson-clk tree & [2] merged for 5.10
- Patch 2: [3] & [4] both applied for 5.11 in phy tree

[...]

Applied, thanks!

[1/2] arm64: dts: meson-axg: add PWRC node

      commit: 2a51ac31449a19bfb815f21f246134d6518ff781
[2/2] arm64: dts: meson-axg: add MIPI DSI PHY nodes
      commit: 413b63ddf2f85e84b0824770cf9f42ea768adcb4

Best regards,

Signature · 6 lines
Kevin Hilman <[email protected]>

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