From 19ce828cbc08003ec35076f704f258bbecb1f721 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Thu, 13 Nov 2014 15:22:36 +0800 Subject: [PATCH 1/8] clk: rockchip: add clock ID for usbphy480m_src There are 3 different parent clock from different usbphy, all of them are fixed 480MHz, it is not able to auto select by clock core to the 2nd and the 3rd parent. For different use case for different board, we may need to select different usbphy clock out as parent manually. Add the clock ID for it so that we can use in dts. Signed-off-by: Kever Yang Signed-off-by: Heiko Stuebner --- include/dt-bindings/clock/rk3288-cru.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/clock/rk3288-cru.h b/include/dt-bindings/clock/rk3288-cru.h index f60ce72a2b2c..d6b59aeed553 100644 --- a/include/dt-bindings/clock/rk3288-cru.h +++ b/include/dt-bindings/clock/rk3288-cru.h @@ -80,6 +80,7 @@ #define SCLK_SDIO0_SAMPLE 119 #define SCLK_SDIO1_SAMPLE 120 #define SCLK_EMMC_SAMPLE 121 +#define SCLK_USBPHY480M_SRC 122 #define DCLK_VOP0 190 #define DCLK_VOP1 191 From 19da34b40e779992442e66d42f3e9bcbfc1c5874 Mon Sep 17 00:00:00 2001 From: Huang Lin Date: Thu, 18 Dec 2014 16:13:45 -0800 Subject: [PATCH 2/8] clk: rockchip: add clock IDs for the PVTM clocks Process-Voltage-Temperature Monitor has two clocks, PVTM_CORE and PVTM_GPU. Signed-off-by: Huang Lin Signed-off-by: Dmitry Torokhov Signed-off-by: Heiko Stuebner --- include/dt-bindings/clock/rk3288-cru.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dt-bindings/clock/rk3288-cru.h b/include/dt-bindings/clock/rk3288-cru.h index d6b59aeed553..69baf6e9b0fe 100644 --- a/include/dt-bindings/clock/rk3288-cru.h +++ b/include/dt-bindings/clock/rk3288-cru.h @@ -81,6 +81,8 @@ #define SCLK_SDIO1_SAMPLE 120 #define SCLK_EMMC_SAMPLE 121 #define SCLK_USBPHY480M_SRC 122 +#define SCLK_PVTM_CORE 123 +#define SCLK_PVTM_GPU 124 #define DCLK_VOP0 190 #define DCLK_VOP1 191 From b82465c95e7ed48317481e37dbae4d1aa92f2b71 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Tue, 20 Jan 2015 21:05:51 +0100 Subject: [PATCH 3/8] clk: rockchip: add id for watchdog pclk on rk3288 Adds a new id for the pclk supplying the watchdog on rk3288 socs. Signed-off-by: Heiko Stuebner Reviewed-by: Doug Anderson --- include/dt-bindings/clock/rk3288-cru.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/clock/rk3288-cru.h b/include/dt-bindings/clock/rk3288-cru.h index 69baf6e9b0fe..1e626335acf3 100644 --- a/include/dt-bindings/clock/rk3288-cru.h +++ b/include/dt-bindings/clock/rk3288-cru.h @@ -157,6 +157,7 @@ #define PCLK_PUBL0 365 #define PCLK_DDRUPCTL1 366 #define PCLK_PUBL1 367 +#define PCLK_WDT 368 /* hclk gates */ #define HCLK_GPS 448 From 39d05162a530b8e58119952dd60c7204e8512f0d Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Tue, 20 Jan 2015 21:12:16 +0100 Subject: [PATCH 4/8] ARM: dts: rockchip: add rk3288 watchdog clock Add the clock property for the watchdog on rk3288 socs. Signed-off-by: Heiko Stuebner Reviewed-by: Doug Anderson Tested-by: Doug Anderson --- arch/arm/boot/dts/rk3288.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 37847c14b449..1e75a0f556d4 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -560,6 +560,7 @@ wdt: watchdog@ff800000 { compatible = "rockchip,rk3288-wdt", "snps,dw-wdt"; reg = <0xff800000 0x100>; + clocks = <&cru PCLK_WDT>; interrupts = ; status = "disabled"; }; From 5bbb50d5a2fbe439c5eb77511a9d65df55acd105 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Thu, 29 Jan 2015 22:21:01 +0100 Subject: [PATCH 5/8] ARM: dts: rockchip: add cpu and gpu regulators to rk3288-evb-act8846 The evaluation board using the act8846 as main pmic uses two additional regulators to provide the cpu and gpu voltage. Add these and also add the link to cpu supply from vdd_cpu. Signed-off-by: Heiko Stuebner Tested-by: Daniel Lezcano --- arch/arm/boot/dts/rk3288-evb-act8846.dts | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-evb-act8846.dts b/arch/arm/boot/dts/rk3288-evb-act8846.dts index a76dd44adb53..9db02bbe4156 100644 --- a/arch/arm/boot/dts/rk3288-evb-act8846.dts +++ b/arch/arm/boot/dts/rk3288-evb-act8846.dts @@ -17,7 +17,32 @@ compatible = "rockchip,rk3288-evb-act8846", "rockchip,rk3288"; }; +&cpu0 { + cpu0-supply = <&vdd_cpu>; +}; + &i2c0 { + vdd_cpu: syr827@40 { + compatible = "silergy,syr827"; + fcs,suspend-voltage-selector = <1>; + reg = <0x40>; + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_gpu: syr828@41 { + compatible = "silergy,syr828"; + fcs,suspend-voltage-selector = <1>; + reg = <0x41>; + regulator-name = "vdd_gpu"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + hym8563@51 { compatible = "haoyu,hym8563"; reg = <0x51>; From 9fffa7ad0d0dc139ff45fab66f3e5ef98414f277 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Thu, 29 Jan 2015 22:35:47 +0100 Subject: [PATCH 6/8] ARM: dts: rockchip: housekeeping off i2c0 on rk3288-evb boards Use the same transfer speed on both the rk808 and act8846 variants and remove the status=okay from the rk808 one which is already set in the shared rk3288-evb.dtsi . Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3288-evb-act8846.dts | 2 ++ arch/arm/boot/dts/rk3288-evb-rk808.dts | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3288-evb-act8846.dts b/arch/arm/boot/dts/rk3288-evb-act8846.dts index 9db02bbe4156..d7b8bbc0c25f 100644 --- a/arch/arm/boot/dts/rk3288-evb-act8846.dts +++ b/arch/arm/boot/dts/rk3288-evb-act8846.dts @@ -22,6 +22,8 @@ }; &i2c0 { + clock-frequency = <400000>; + vdd_cpu: syr827@40 { compatible = "silergy,syr827"; fcs,suspend-voltage-selector = <1>; diff --git a/arch/arm/boot/dts/rk3288-evb-rk808.dts b/arch/arm/boot/dts/rk3288-evb-rk808.dts index d453ddd4b476..3f7aa9e2e76a 100644 --- a/arch/arm/boot/dts/rk3288-evb-rk808.dts +++ b/arch/arm/boot/dts/rk3288-evb-rk808.dts @@ -23,7 +23,6 @@ &i2c0 { clock-frequency = <400000>; - status = "okay"; rk808: pmic@1b { compatible = "rockchip,rk808"; From 863b76b2b5da45cdf8819c4db468adfd2f0292f0 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 28 Jan 2015 12:27:16 +0100 Subject: [PATCH 7/8] ARM: dts: rockchip: enable vops and hdmi output on rk3288-firefly and -evb This enables the recently added display nodes on the firefly and evb, letting the boards output graphic data over the hdmi port. This includes enabling of i2c5 on the evb that is used for ddc probing and setting the lcd-regulators to always on until the hdmi driver learns about using them. Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3288-evb.dtsi | 24 ++++++++++++++++++++++++ arch/arm/boot/dts/rk3288-firefly.dtsi | 22 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi index 3e067dd65d0c..6857730ca0c1 100644 --- a/arch/arm/boot/dts/rk3288-evb.dtsi +++ b/arch/arm/boot/dts/rk3288-evb.dtsi @@ -104,6 +104,10 @@ status = "okay"; }; +&hdmi { + status = "okay"; +}; + &sdmmc { bus-width = <4>; cap-mmc-highspeed; @@ -120,6 +124,10 @@ status = "okay"; }; +&i2c5 { + status = "okay"; +}; + &wdt { status = "okay"; }; @@ -187,3 +195,19 @@ &usb_host1 { status = "okay"; }; + +&vopb { + status = "okay"; +}; + +&vopb_mmu { + status = "okay"; +}; + +&vopl { + status = "okay"; +}; + +&vopl_mmu { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi index 7f0ba9b24869..6dcc5e9d9480 100644 --- a/arch/arm/boot/dts/rk3288-firefly.dtsi +++ b/arch/arm/boot/dts/rk3288-firefly.dtsi @@ -179,6 +179,10 @@ status = "okay"; }; +&hdmi { + status = "okay"; +}; + &i2c0 { clock-frequency = <400000>; status = "okay"; @@ -265,6 +269,7 @@ regulator-name = "vdd10_lcd"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; + regulator-always-on; }; vcca_18: REG7 { @@ -303,6 +308,7 @@ regulator-name = "vcc18_lcd"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; }; }; }; @@ -462,6 +468,22 @@ status = "okay"; }; +&vopb { + status = "okay"; +}; + +&vopb_mmu { + status = "okay"; +}; + +&vopl { + status = "okay"; +}; + +&vopl_mmu { + status = "okay"; +}; + &wdt { status = "okay"; }; From c25d8cbcd840b2c9774a285ea728e72dd56aea2e Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 28 Jan 2015 17:23:10 +0100 Subject: [PATCH 8/8] ARM: dts: rockchip: move the hdmi ddc-i2c-bus property to the actual boards Currently the hdmi driver is using one of the soc i2c busses for ddc probing and while documentation always specifies i2c5 as hdmi-i2c it could very well be any other bus as well. Therefore this is a property of the board and should be specified there. Signed-off-by: Heiko Stuebner --- arch/arm/boot/dts/rk3288-evb.dtsi | 1 + arch/arm/boot/dts/rk3288-firefly.dtsi | 1 + arch/arm/boot/dts/rk3288.dtsi | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi index 6857730ca0c1..86ede5893ab6 100644 --- a/arch/arm/boot/dts/rk3288-evb.dtsi +++ b/arch/arm/boot/dts/rk3288-evb.dtsi @@ -105,6 +105,7 @@ }; &hdmi { + ddc-i2c-bus = <&i2c5>; status = "okay"; }; diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi index 6dcc5e9d9480..e6f873abbe0d 100644 --- a/arch/arm/boot/dts/rk3288-firefly.dtsi +++ b/arch/arm/boot/dts/rk3288-firefly.dtsi @@ -180,6 +180,7 @@ }; &hdmi { + ddc-i2c-bus = <&i2c5>; status = "okay"; }; diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 1e75a0f556d4..1141850d0acb 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -646,7 +646,6 @@ compatible = "rockchip,rk3288-dw-hdmi"; reg = <0xff980000 0x20000>; reg-io-width = <4>; - ddc-i2c-bus = <&i2c5>; rockchip,grf = <&grf>; interrupts = ; clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>;