Inter-revision diff: patch 3

Comparing v3 (message) to v1 (message)

--- v3
+++ v1
@@ -1,27 +1,45 @@
-This patch supports the gmac pd to save power consumption.
-Even though some boards not need Ethernet support, the driver
-core can also take care of powering up the pd before probe.
+This patch adds needed gamc information for rk3399,
+also support the gmac pd.
 
-Signed-off-by: Roger Chen <roger.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
-Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
+Signed-off-by: Roger Chen <roger.chen@rock-chips.com>
+Signed-off-by: Caesar Wang <wxt@rock-chips.com>
 ---
 
-Changes in v3:
-- leave into two patches based on patchv2, and fix nits and commit, as
-  comment on https://patchwork.kernel.org/patch/9306339/
-
-Changes in v2:
-- Fixes the order, ss Heiko commnets on
-  https://patchwork.kernel.org/patch/9305991/
-
- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++
- 1 file changed, 10 insertions(+)
+ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 90 ++++++++++++++++++++++++++++++++
+ 1 file changed, 90 insertions(+)
 
 diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
-index 32aebc8..2ab233f 100644
+index 32aebc8..53ac651 100644
 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
 +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
-@@ -611,6 +611,11 @@
+@@ -200,6 +200,26 @@
+ 		};
+ 	};
+ 
++	gmac: eth@fe300000 {
++		compatible = "rockchip,rk3399-gmac";
++		reg = <0x0 0xfe300000 0x0 0x10000>;
++		rockchip,grf = <&grf>;
++		interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
++		interrupt-names = "macirq";
++		clocks = <&cru SCLK_MAC>, <&cru SCLK_MAC_RX>,
++			 <&cru SCLK_MAC_TX>, <&cru SCLK_MACREF>,
++			 <&cru SCLK_MACREF_OUT>, <&cru ACLK_GMAC>,
++			 <&cru PCLK_GMAC>;
++		clock-names = "stmmaceth", "mac_clk_rx",
++			      "mac_clk_tx", "clk_mac_ref",
++			      "clk_mac_refout", "aclk_mac",
++			      "pclk_mac";
++		resets = <&cru SRST_A_GMAC>;
++		reset-names = "stmmaceth";
++		power-domains = <&power RK3399_PD_GMAC>;
++		status = "disabled";
++	};
++
+ 	sdio0: dwmmc@fe310000 {
+ 		compatible = "rockchip,rk3399-dw-mshc",
+ 			     "rockchip,rk3288-dw-mshc";
+@@ -611,6 +631,11 @@
  		status = "disabled";
  	};
  
@@ -33,17 +51,84 @@
  	qos_hdcp: qos@ffa90000 {
  		compatible = "syscon";
  		reg = <0x0 0xffa90000 0x0 0x20>;
-@@ -739,6 +744,11 @@
- 			};
+@@ -704,6 +729,11 @@
+ 			#size-cells = <0>;
  
- 			/* These power domains are grouped by VD_LOGIC */
+ 			/* These power domains are grouped by VD_CENTER */
 +			pd_gmac@RK3399_PD_GMAC {
 +				reg = <RK3399_PD_GMAC>;
 +				clocks = <&cru ACLK_GMAC>;
 +				pm_qos = <&qos_gmac>;
 +			};
- 			pd_vio@RK3399_PD_VIO {
- 				reg = <RK3399_PD_VIO>;
- 				#address-cells = <1>;
+ 			pd_iep@RK3399_PD_IEP {
+ 				reg = <RK3399_PD_IEP>;
+ 				clocks = <&cru ACLK_IEP>,
+@@ -1183,6 +1213,66 @@
+ 			drive-strength = <13>;
+ 		};
+ 
++		gmac {
++			rgmii_pins: rgmii-pins {
++				rockchip,pins =
++					/* mac_txclk */
++					<3 17 RK_FUNC_1 &pcfg_pull_none_13ma>,
++					/* mac_rxclk */
++					<3 14 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_mdio */
++					<3 13 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_txen */
++					<3 12 RK_FUNC_1 &pcfg_pull_none_13ma>,
++					/* mac_clk */
++					<3 11 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_rxdv */
++					<3 9 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_mdc */
++					<3 8 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_rxd1 */
++					<3 7 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_rxd0 */
++					<3 6 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_txd1 */
++					<3 5 RK_FUNC_1 &pcfg_pull_none_13ma>,
++					/* mac_txd0 */
++					<3 4 RK_FUNC_1 &pcfg_pull_none_13ma>,
++					/* mac_rxd3 */
++					<3 3 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_rxd2 */
++					<3 2 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_txd3 */
++					<3 1 RK_FUNC_1 &pcfg_pull_none_13ma>,
++					/* mac_txd2 */
++					<3 0 RK_FUNC_1 &pcfg_pull_none_13ma>;
++			};
++
++			rmii_pins: rmii-pins {
++				rockchip,pins =
++					/* mac_mdio */
++					<3 13 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_txen */
++					<3 12 RK_FUNC_1 &pcfg_pull_none_13ma>,
++					/* mac_clk */
++					<3 11 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_rxer */
++					<3 10 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_rxdv */
++					<3 9 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_mdc */
++					<3 8 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_rxd1 */
++					<3 7 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_rxd0 */
++					<3 6 RK_FUNC_1 &pcfg_pull_none>,
++					/* mac_txd1 */
++					<3 5 RK_FUNC_1 &pcfg_pull_none_13ma>,
++					/* mac_txd0 */
++					<3 4 RK_FUNC_1 &pcfg_pull_none_13ma>;
++			};
++		};
++
+ 		i2c0 {
+ 			i2c0_xfer: i2c0-xfer {
+ 				rockchip,pins =
 -- 
 1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help