aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2013-04-04 20:52:14 +0800
committerHaojian Zhuang <haojian.zhuang@linaro.org>2013-04-04 20:52:14 +0800
commitdc4fc275ade4efa522cc0a5e0b2994188e229c8a (patch)
treee129cfa513b63f5c2b57672ffc43fecaabcb79de
parentadf6720b858c5153cecbe4adab4e7a194fd30055 (diff)
ARM: dts: enable pwm in hi4511
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
-rw-r--r--arch/arm/boot/dts/hi3620.dtsi15
-rw-r--r--arch/arm/boot/dts/hi4511.dts50
-rw-r--r--arch/arm/configs/hs_defconfig3
3 files changed, 66 insertions, 2 deletions
diff --git a/arch/arm/boot/dts/hi3620.dtsi b/arch/arm/boot/dts/hi3620.dtsi
index 5bd415d5b91..c2e7ea59ef4 100644
--- a/arch/arm/boot/dts/hi3620.dtsi
+++ b/arch/arm/boot/dts/hi3620.dtsi
@@ -1616,5 +1616,20 @@
clock-names = "ldi", "edc";
status = "disabled";
};
+ pwm0: pwm@fca05000 {
+ compatible = "hisilicon,hi3620-pwm";
+ reg = <0xfca05000 0x1000>;
+ clocks = <&pwmclk0>;
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
+ pwm1: pwm@fca06000 {
+ compatible = "hisilicon,hi3620-pwm";
+ reg = <0xfca06000 0x1000>;
+ clocks = <&pwmclk1>;
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
+
};
};
diff --git a/arch/arm/boot/dts/hi4511.dts b/arch/arm/boot/dts/hi4511.dts
index d5a3079bdd2..52914890529 100644
--- a/arch/arm/boot/dts/hi4511.dts
+++ b/arch/arm/boot/dts/hi4511.dts
@@ -443,6 +443,27 @@
0x0f0 0x1 /* GPIO (IOMG59), audio spk & earphone */
>;
};
+ pwm0_pmx_func: pinmux_pwm0_pins@0 {
+ pinctrl-single,pins = <
+ 0x154 0x0 /* PWM0 (IOMG82) */
+ >;
+ };
+ pwm0_pmx_idle: pinmux_pwm0_pins@1 {
+ pinctrl-single,pins = <
+ 0x154 0x1 /* GPIO149 (IOMG82) */
+ >;
+ };
+ pwm1_pmx_func: pinmux_pwm1_pins@0 {
+ pinctrl-single,pins = <
+ 0x158 0x0 /* PWM1 (IOMG83) */
+ >;
+ };
+ pwm1_pmx_idle: pinmux_pwm1_pins@1 {
+ pinctrl-single,pins = <
+ 0x158 0x1 /* GPIO150 (IOMG83) */
+ >;
+ };
+
};
pmx1: pinmux@fc803800 {
@@ -784,6 +805,22 @@
pinctrl-single,bias-pulldown = <0 2 0 2>;
pinctrl-single,bias-pullup = <1 1 0 1>;
};
+ pwm0_cfg_func: pincfg_pwm0_pins@0 {
+ pinctrl-single,pins = <
+ 0x280 0 /* PWM0 (IOCFG168) */
+ >;
+ pinctrl-single,bias-pulldown = <2 2 0 2>;
+ pinctrl-single,bias-pullup = <0 1 0 1>;
+ pinctrl-single,drive-strength = <0x30 0xf0>;
+ };
+ pwm1_cfg_func: pincfg_pwm1_pins@0 {
+ pinctrl-single,pins = <
+ 0x284 0 /* PWM1 (IOCFG169) */
+ >;
+ pinctrl-single,bias-pulldown = <2 2 0 2>;
+ pinctrl-single,bias-pullup = <0 1 0 1>;
+ pinctrl-single,drive-strength = <0x30 0xf0>;
+ };
};
i2c0: i2c@fcb08000 {
@@ -1421,6 +1458,17 @@
};
};
};
-
+ pwm0: pwm@fca05000 {
+ pinctrl-names = "default", "idle";
+ pinctrl-0 = <&pwm0_pmx_func &pwm0_cfg_func>;
+ pinctrl-1 = <&pwm0_pmx_idle &pwm0_cfg_func>;
+ status = "ok";
+ };
+ pwm1: pwm@fca06000 {
+ pinctrl-names = "default", "idle";
+ pinctrl-0 = <&pwm1_pmx_func &pwm1_cfg_func>;
+ pinctrl-1 = <&pwm1_pmx_idle &pwm1_cfg_func>;
+ status = "ok";
+ };
}; /* end of amba */
};
diff --git a/arch/arm/configs/hs_defconfig b/arch/arm/configs/hs_defconfig
index 94cdfd4807e..86598d765a4 100644
--- a/arch/arm/configs/hs_defconfig
+++ b/arch/arm/configs/hs_defconfig
@@ -1737,7 +1737,8 @@ CONFIG_OF_IOMMU=y
# CONFIG_EXTCON is not set
# CONFIG_MEMORY is not set
# CONFIG_IIO is not set
-# CONFIG_PWM is not set
+CONFIG_PWM=y
+CONFIG_PWM_HI3620=y
# CONFIG_IPACK_BUS is not set
#