From: Frank Wunderlich <linux@fw-web.de>
To: u-boot@lists.denx.de
Subject: [PATCH 5/5] dts: r64: add sata- and asm_sel nodes
Date: Mon, 10 Aug 2020 16:58:51 +0200 [thread overview]
Message-ID: <20200810145851.43381-6-linux@fw-web.de> (raw)
In-Reply-To: <20200810145851.43381-1-linux@fw-web.de>
From: Frank Wunderlich <frank-w@public-files.de>
asm_sel is for switching between sata and pcie mode
on r64 there is GPIO90 connected to ASM1480 which
switches RX/TX pairs to PCIe/SATA connector
output-low means sata-controller is active
with 2020-10 now reg is also needed for the phy itself
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
arch/arm/dts/mt7622-bpi-r64.dts | 9 +++++++
arch/arm/dts/mt7622.dtsi | 44 +++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/arch/arm/dts/mt7622-bpi-r64.dts b/arch/arm/dts/mt7622-bpi-r64.dts
index c89e816878..51287cea3a 100644
--- a/arch/arm/dts/mt7622-bpi-r64.dts
+++ b/arch/arm/dts/mt7622-bpi-r64.dts
@@ -235,3 +235,12 @@
full-duplex;
};
};
+
+&gpio {
+ /*gpio 90 for setting mode to sata*/
+ asm_sel {
+ gpio-hog;
+ gpios = <90 GPIO_ACTIVE_HIGH>;
+ output-low;
+ };
+};
diff --git a/arch/arm/dts/mt7622.dtsi b/arch/arm/dts/mt7622.dtsi
index fec071643e..2802909671 100644
--- a/arch/arm/dts/mt7622.dtsi
+++ b/arch/arm/dts/mt7622.dtsi
@@ -10,6 +10,7 @@
#include <dt-bindings/power/mt7629-power.h>
#include <dt-bindings/reset/mt7629-reset.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/phy/phy.h>
/ {
compatible = "mediatek,mt7622";
@@ -270,6 +271,49 @@
};
};
+ sata: sata at 1a200000 {
+ compatible = "mediatek,mtk-ahci";
+// reg = <0 0x1a200000 0 0x1100>;
+ reg = <0x1a200000 0x1100>;
+ resets = <&pciesys MT7622_SATA_AXI_BUS_RST>,
+ <&pciesys MT7622_SATA_PHY_SW_RST>,
+ <&pciesys MT7622_SATA_PHY_REG_RST>;
+ reset-names = "axi", "sw", "reg";
+ mediatek,phy-mode = <&pciesys>;
+ ports-implemented = <0x1>;
+/*
+ interrupts = <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hostc";
+ clocks = <&pciesys CLK_SATA_AHB_EN>,
+ <&pciesys CLK_SATA_AXI_EN>,
+ <&pciesys CLK_SATA_ASIC_EN>,
+ <&pciesys CLK_SATA_RBC_EN>,
+ <&pciesys CLK_SATA_PM_EN>;
+ clock-names = "ahb", "axi", "asic", "rbc", "pm";
+ power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
+ status = "disabled";*/
+ phys = <&sata_port PHY_TYPE_SATA>;
+ phy-names = "sata-phy";
+ status = "okay";
+ };
+
+ sata_phy: sata-phy at 1a243000 {
+ compatible = "mediatek,generic-tphy-v1";
+ reg = <0x1a243000 0x0100>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ status = "okay";
+
+ sata_port: sata-phy at 1a243000 {
+ reg = <0x1a243000 0x0100>;
+ clocks = <&topckgen CLK_TOP_ETH_500M>;
+ clock-names = "ref";
+ #phy-cells = <1>;
+ status = "okay";
+ };
+ };
+
ethsys: syscon at 1b000000 {
compatible = "mediatek,mt7622-ethsys", "syscon";
reg = <0x1b000000 0x1000>;
--
2.25.1
prev parent reply other threads:[~2020-08-10 14:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 14:58 [PATCH 0/5] add SATA/AHCI support for BananaPi R64 Frank Wunderlich
2020-08-10 14:58 ` [PATCH 1/5] arm: dts: mt7622: add SATA reset constants Frank Wunderlich
2020-08-10 14:58 ` [PATCH 2/5] phy: mtk-tphy: add PHY_TYPE_SATA Frank Wunderlich
2020-08-10 14:58 ` [PATCH 3/5] reset: add basic reset controller for pciesys Frank Wunderlich
2020-08-10 14:58 ` [PATCH 4/5] ahci: mediatek: add ahci driver Frank Wunderlich
2020-08-10 14:58 ` Frank Wunderlich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200810145851.43381-6-linux@fw-web.de \
--to=linux@fw-web.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.