These series add and enable regulators, gpio-keys, eMMC and other device
nodes support for rk3229-evb board.
Changes from v1:
- Fixed the name and supply for regulator nodes in [PATCH 1/6].
- Deleted some redundant properties of eMMC in [PATCH 4/6].
David Wu (1):
ARM: dts: rockchip: enable io-domain for rk3229-evb
Finley Xiao (1):
ARM: dts: rockchip: add cpu-supply property for cpu node of rk3229-evb
Frank Wang (4):
ARM: dts: rockchip: add regulator nodes for rk3229-evb
ARM: dts: rockchip: enable eMMC for rk3229-evb
ARM: dts: rockchip: enable tsadc for rk3229-evb
ARM: dts: rockchip: add gpio power-key for rk3229-evb
arch/arm/boot/dts/rk3229-evb.dts | 117 +++++++++++++++++++++++++++++++++++++++
1 file changed, 117 insertions(+)
--
2.0.0
This patch adds regulator info for rk3229-evb board.
Signed-off-by: Frank Wang <[email protected]>
---
arch/arm/boot/dts/rk3229-evb.dts | 69 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/arch/arm/boot/dts/rk3229-evb.dts b/arch/arm/boot/dts/rk3229-evb.dts
index 82e8a53..394be63 100644
--- a/arch/arm/boot/dts/rk3229-evb.dts
+++ b/arch/arm/boot/dts/rk3229-evb.dts
@@ -51,6 +51,15 @@
reg = <0x60000000 0x40000000>;
};
+ dc_12v: dc-12v-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "dc_12v";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <12000000>;
+ regulator-max-microvolt = <12000000>;
+ };
+
ext_gmac: ext_gmac {
compatible = "fixed-clock";
clock-frequency = <125000000>;
@@ -67,6 +76,7 @@
regulator-name = "vcc_host";
regulator-always-on;
regulator-boot-on;
+ vin-supply = <&vcc_sys>;
};
vcc_phy: vcc-phy-regulator {
@@ -77,6 +87,57 @@
regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
+ vin-supply = <&vccio_1v8>;
+ };
+
+ vcc_sys: vcc-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_12v>;
+ };
+
+ vccio_1v8: vccio-1v8-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vccio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ vin-supply = <&vcc_sys>;
+ };
+
+ vccio_3v3: vccio-3v3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vccio_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ vin-supply = <&vcc_sys>;
+ };
+
+ vdd_arm: vdd-arm-regulator {
+ compatible = "pwm-regulator";
+ pwms = <&pwm1 0 25000 1>;
+ regulator-name = "vdd_arm";
+ regulator-min-microvolt = <950000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ regulator-boot-on;
+ pwm-supply = <&vcc_sys>;
+ };
+
+ vdd_log: vdd-log-regulator {
+ compatible = "pwm-regulator";
+ pwms = <&pwm2 0 25000 1>;
+ regulator-name = "vdd_log";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ pwm-supply = <&vcc_sys>;
};
};
@@ -104,6 +165,14 @@
};
};
+&pwm1 {
+ status = "okay";
+};
+
+&pwm2 {
+ status = "okay";
+};
+
&uart2 {
status = "okay";
};
--
2.0.0
This patch enables eMMC support for rk3229-evb board.
Signed-off-by: Frank Wang <[email protected]>
---
arch/arm/boot/dts/rk3229-evb.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/rk3229-evb.dts b/arch/arm/boot/dts/rk3229-evb.dts
index 78a3ea1..a51ca01 100644
--- a/arch/arm/boot/dts/rk3229-evb.dts
+++ b/arch/arm/boot/dts/rk3229-evb.dts
@@ -145,6 +145,13 @@
cpu-supply = <&vdd_arm>;
};
+&emmc {
+ cap-mmc-highspeed;
+ disable-wp;
+ non-removable;
+ status = "okay";
+};
+
&gmac {
assigned-clocks = <&cru SCLK_MAC_EXTCLK>, <&cru SCLK_MAC>;
assigned-clock-parents = <&ext_gmac>, <&cru SCLK_MAC_EXTCLK>;
--
2.0.0
From: David Wu <[email protected]>
This patch enables io-domain support for rk3229-evb board.
The power domain of VCCIO3 is selected from maskrom, so we do not
need to configure it.
Signed-off-by: David Wu <[email protected]>
Signed-off-by: Frank Wang <[email protected]>
---
arch/arm/boot/dts/rk3229-evb.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/rk3229-evb.dts b/arch/arm/boot/dts/rk3229-evb.dts
index 17385d8..78a3ea1 100644
--- a/arch/arm/boot/dts/rk3229-evb.dts
+++ b/arch/arm/boot/dts/rk3229-evb.dts
@@ -161,6 +161,14 @@
status = "okay";
};
+&io_domains {
+ status = "okay";
+
+ vccio1-supply = <&vccio_3v3>;
+ vccio2-supply = <&vccio_1v8>;
+ vccio4-supply = <&vccio_3v3>;
+};
+
&pinctrl {
usb {
host_vbus_drv: host-vbus-drv {
--
2.0.0
From: Finley Xiao <[email protected]>
This patch adds the cpu-supply property so that cpu can do dvfs
on rk3229-evb board.
Signed-off-by: Finley Xiao <[email protected]>
---
arch/arm/boot/dts/rk3229-evb.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/rk3229-evb.dts b/arch/arm/boot/dts/rk3229-evb.dts
index 394be63..17385d8 100644
--- a/arch/arm/boot/dts/rk3229-evb.dts
+++ b/arch/arm/boot/dts/rk3229-evb.dts
@@ -141,6 +141,10 @@
};
};
+&cpu0 {
+ cpu-supply = <&vdd_arm>;
+};
+
&gmac {
assigned-clocks = <&cru SCLK_MAC_EXTCLK>, <&cru SCLK_MAC>;
assigned-clock-parents = <&ext_gmac>, <&cru SCLK_MAC_EXTCLK>;
--
2.0.0
This patch enables the tsadc for rk3229-evb board.
The rk3229 evb board uses the CRU to reset the chip since it has not
the PMIC to connect it, and TSHUT is low active on evb board.
Signed-off-by: Frank Wang <[email protected]>
---
arch/arm/boot/dts/rk3229-evb.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/rk3229-evb.dts b/arch/arm/boot/dts/rk3229-evb.dts
index a51ca01..cfcfe2a 100644
--- a/arch/arm/boot/dts/rk3229-evb.dts
+++ b/arch/arm/boot/dts/rk3229-evb.dts
@@ -192,6 +192,11 @@
status = "okay";
};
+&tsadc {
+ rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
+ status = "okay";
+};
+
&uart2 {
status = "okay";
};
--
2.0.0
This patch adds gpio power-key support for rk3229-evb board.
Signed-off-by: Frank Wang <[email protected]>
---
arch/arm/boot/dts/rk3229-evb.dts | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm/boot/dts/rk3229-evb.dts b/arch/arm/boot/dts/rk3229-evb.dts
index cfcfe2a..a051708 100644
--- a/arch/arm/boot/dts/rk3229-evb.dts
+++ b/arch/arm/boot/dts/rk3229-evb.dts
@@ -139,6 +139,24 @@
regulator-boot-on;
pwm-supply = <&vcc_sys>;
};
+
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ autorepeat;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwr_key>;
+
+ power_key: power-key {
+ label = "GPIO Key Power";
+ gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
+ linux,code = <116>;
+ debounce-interval = <100>;
+ wakeup-source;
+ };
+ };
};
&cpu0 {
@@ -177,6 +195,12 @@
};
&pinctrl {
+ keys {
+ pwr_key: pwr-key {
+ rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
usb {
host_vbus_drv: host-vbus-drv {
rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
--
2.0.0
Hi David,
[auto build test ERROR on rockchip/for-next]
[cannot apply to v4.12]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Frank-Wang/ARM-dts-rockchip-add-regulator-nodes-for-rk3229-evb/20170706-094621
base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
config: arm-at91_dt_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm
All errors (new ones prefixed by >>):
>> Error: arch/arm/boot/dts/rk3229-evb.dts:164.1-12 Label or path io_domains not found
FATAL ERROR: Syntax error parsing input tree
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Am Donnerstag, 6. Juli 2017, 14:47:50 CEST schrieb kbuild test robot:
> Hi David,
>
> [auto build test ERROR on rockchip/for-next]
> [cannot apply to v4.12]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Frank-Wang/ARM-dts-rockchip-add-regulator-nodes-for-rk3229-evb/20170706-094621
> base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
> config: arm-at91_dt_defconfig (attached as .config)
> compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=arm
>
> All errors (new ones prefixed by >>):
>
> >> Error: arch/arm/boot/dts/rk3229-evb.dts:164.1-12 Label or path io_domains not found
> FATAL ERROR: Syntax error parsing input tree
This most likely ok, as this patch builds on top of
ARM: dts: rockchip: Add io-domain node for rk3228
https://patchwork.kernel.org/patch/9803973/
which creates the core node referenced here.
Am Mittwoch, 5. Juli 2017, 16:30:16 CEST schrieb Frank Wang:
> This patch adds regulator info for rk3229-evb board.
>
> Signed-off-by: Frank Wang <[email protected]>
applied for 4.14
Thanks for fixing up the regulator tree
Heiko
Am Mittwoch, 5. Juli 2017, 16:30:17 CEST schrieb Frank Wang:
> From: Finley Xiao <[email protected]>
>
> This patch adds the cpu-supply property so that cpu can do dvfs
> on rk3229-evb board.
>
> Signed-off-by: Finley Xiao <[email protected]>
> ---
> arch/arm/boot/dts/rk3229-evb.dts | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/boot/dts/rk3229-evb.dts b/arch/arm/boot/dts/rk3229-evb.dts
> index 394be63..17385d8 100644
> --- a/arch/arm/boot/dts/rk3229-evb.dts
> +++ b/arch/arm/boot/dts/rk3229-evb.dts
> @@ -141,6 +141,10 @@
> };
> };
>
> +&cpu0 {
> + cpu-supply = <&vdd_arm>;
> +};
> +
applied for 4.14 after adding the same for cpu1-cpu3 .
The supply is a property of the cpu-core, so each should have the reference
even though the Linux cpufreq driver taking the regulator from cpu0.
Heiko
Am Mittwoch, 5. Juli 2017, 16:30:19 CEST schrieb Frank Wang:
> This patch enables eMMC support for rk3229-evb board.
>
> Signed-off-by: Frank Wang <[email protected]>
applied for 4.14
Am Mittwoch, 5. Juli 2017, 16:32:24 CEST schrieb Frank Wang:
> This patch enables the tsadc for rk3229-evb board.
>
> The rk3229 evb board uses the CRU to reset the chip since it has not
> the PMIC to connect it, and TSHUT is low active on evb board.
>
> Signed-off-by: Frank Wang <[email protected]>
applied for 4.14
Am Mittwoch, 5. Juli 2017, 16:33:10 CEST schrieb Frank Wang:
> This patch adds gpio power-key support for rk3229-evb board.
>
> Signed-off-by: Frank Wang <[email protected]>
applied for 4.14 with the following changes:
- replaced keycode with KEY_POWER
- and included dt-bindings/input/input.h
- dropped address and size cells
Heiko
Am Mittwoch, 5. Juli 2017, 16:30:18 CEST schrieb Frank Wang:
> From: David Wu <[email protected]>
>
> This patch enables io-domain support for rk3229-evb board.
>
> The power domain of VCCIO3 is selected from maskrom, so we do not
> need to configure it.
>
> Signed-off-by: David Wu <[email protected]>
> Signed-off-by: Frank Wang <[email protected]>
applied for 4.14
Thanks
Heiko