... | ... | ||
---|---|---|---|
11 | &vdd_logic { | 11 | &vdd_logic { |
12 | regulator-init-microvolt = <900000>; | 12 | regulator-init-microvolt = <900000>; |
13 | }; | 13 | }; |
14 | ``` | 14 | ``` |
15 | 15 | ||
16 | Changes in v3: | ||
17 | Adjust regulators order of E20C dts nodes | ||
18 | Use PWM_POLARITY_INVERTED in pwm-regulator | ||
19 | |||
16 | Changes in v2: | 20 | Changes in v2: |
17 | Remove merged bindings patch | 21 | Remove merged bindings patch |
18 | Remove pwm pinctrl in rk3528.dtsi | 22 | Remove pwm pinctrl in rk3528.dtsi |
19 | Enable pwm regulator for Radxa E20C | 23 | Enable pwm regulator for Radxa E20C |
20 | 24 | ||
21 | Chukun Pan (2): | 25 | Chukun Pan (2): |
22 | arm64: dts: rockchip: Add pwm nodes for RK3528 | 26 | arm64: dts: rockchip: Add pwm nodes for RK3528 |
23 | arm64: dts: rockchip: Enable regulators for Radxa E20C | 27 | arm64: dts: rockchip: Enable regulators for Radxa E20C |
24 | 28 | ||
25 | .../boot/dts/rockchip/rk3528-radxa-e20c.dts | 72 +++++++++++++++++ | 29 | .../boot/dts/rockchip/rk3528-radxa-e20c.dts | 73 +++++++++++++++++ |
26 | arch/arm64/boot/dts/rockchip/rk3528.dtsi | 80 +++++++++++++++++++ | 30 | arch/arm64/boot/dts/rockchip/rk3528.dtsi | 80 +++++++++++++++++++ |
27 | 2 files changed, 152 insertions(+) | 31 | 2 files changed, 153 insertions(+) |
28 | 32 | ||
29 | -- | 33 | -- |
30 | 2.25.1 | 34 | 2.25.1 | diff view generated by jsdifflib |
1 | Add pwm nodes for RK3528. The PWM core on RK3528 is the same as | 1 | Add pwm nodes for RK3528. The PWM core on RK3528 is the same as |
---|---|---|---|
2 | RK3328, but the driver does not support interrupts yet. | 2 | RK3328, but the driver does not support interrupts yet. |
3 | 3 | ||
4 | Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> | 4 | Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> |
5 | --- | 5 | --- |
6 | arch/arm64/boot/dts/rockchip/rk3528.dtsi | 80 ++++++++++++++++++++++++ | 6 | arch/arm64/boot/dts/rockchip/rk3528.dtsi | 80 ++++++++++++++++++++++++ |
7 | 1 file changed, 80 insertions(+) | 7 | 1 file changed, 80 insertions(+) |
8 | 8 | ||
9 | diff --git a/arch/arm64/boot/dts/rockchip/rk3528.dtsi b/arch/arm64/boot/dts/rockchip/rk3528.dtsi | 9 | diff --git a/arch/arm64/boot/dts/rockchip/rk3528.dtsi b/arch/arm64/boot/dts/rockchip/rk3528.dtsi |
10 | index XXXXXXX..XXXXXXX 100644 | 10 | index XXXXXXX..XXXXXXX 100644 |
11 | --- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi | 11 | --- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi |
12 | +++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi | 12 | +++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi |
13 | @@ -XXX,XX +XXX,XX @@ uart7: serial@ffa28000 { | 13 | @@ -XXX,XX +XXX,XX @@ uart7: serial@ffa28000 { |
14 | status = "disabled"; | 14 | status = "disabled"; |
15 | }; | 15 | }; |
16 | 16 | ||
17 | + pwm0: pwm@ffa90000 { | 17 | + pwm0: pwm@ffa90000 { |
18 | + compatible = "rockchip,rk3528-pwm", | 18 | + compatible = "rockchip,rk3528-pwm", |
19 | + "rockchip,rk3328-pwm"; | 19 | + "rockchip,rk3328-pwm"; |
20 | + reg = <0x0 0xffa90000 0x0 0x10>; | 20 | + reg = <0x0 0xffa90000 0x0 0x10>; |
21 | + clocks = <&cru CLK_PWM0>, <&cru PCLK_PWM0>; | 21 | + clocks = <&cru CLK_PWM0>, <&cru PCLK_PWM0>; |
22 | + clock-names = "pwm", "pclk"; | 22 | + clock-names = "pwm", "pclk"; |
23 | + #pwm-cells = <3>; | 23 | + #pwm-cells = <3>; |
24 | + status = "disabled"; | 24 | + status = "disabled"; |
25 | + }; | 25 | + }; |
26 | + | 26 | + |
27 | + pwm1: pwm@ffa90010 { | 27 | + pwm1: pwm@ffa90010 { |
28 | + compatible = "rockchip,rk3528-pwm", | 28 | + compatible = "rockchip,rk3528-pwm", |
29 | + "rockchip,rk3328-pwm"; | 29 | + "rockchip,rk3328-pwm"; |
30 | + reg = <0x0 0xffa90010 0x0 0x10>; | 30 | + reg = <0x0 0xffa90010 0x0 0x10>; |
31 | + clocks = <&cru CLK_PWM0>, <&cru PCLK_PWM0>; | 31 | + clocks = <&cru CLK_PWM0>, <&cru PCLK_PWM0>; |
32 | + clock-names = "pwm", "pclk"; | 32 | + clock-names = "pwm", "pclk"; |
33 | + #pwm-cells = <3>; | 33 | + #pwm-cells = <3>; |
34 | + status = "disabled"; | 34 | + status = "disabled"; |
35 | + }; | 35 | + }; |
36 | + | 36 | + |
37 | + pwm2: pwm@ffa90020 { | 37 | + pwm2: pwm@ffa90020 { |
38 | + compatible = "rockchip,rk3528-pwm", | 38 | + compatible = "rockchip,rk3528-pwm", |
39 | + "rockchip,rk3328-pwm"; | 39 | + "rockchip,rk3328-pwm"; |
40 | + reg = <0x0 0xffa90020 0x0 0x10>; | 40 | + reg = <0x0 0xffa90020 0x0 0x10>; |
41 | + clocks = <&cru CLK_PWM0>, <&cru PCLK_PWM0>; | 41 | + clocks = <&cru CLK_PWM0>, <&cru PCLK_PWM0>; |
42 | + clock-names = "pwm", "pclk"; | 42 | + clock-names = "pwm", "pclk"; |
43 | + #pwm-cells = <3>; | 43 | + #pwm-cells = <3>; |
44 | + status = "disabled"; | 44 | + status = "disabled"; |
45 | + }; | 45 | + }; |
46 | + | 46 | + |
47 | + pwm3: pwm@ffa90030 { | 47 | + pwm3: pwm@ffa90030 { |
48 | + compatible = "rockchip,rk3528-pwm", | 48 | + compatible = "rockchip,rk3528-pwm", |
49 | + "rockchip,rk3328-pwm"; | 49 | + "rockchip,rk3328-pwm"; |
50 | + reg = <0x0 0xffa90030 0x0 0x10>; | 50 | + reg = <0x0 0xffa90030 0x0 0x10>; |
51 | + clocks = <&cru CLK_PWM0>, <&cru PCLK_PWM0>; | 51 | + clocks = <&cru CLK_PWM0>, <&cru PCLK_PWM0>; |
52 | + clock-names = "pwm", "pclk"; | 52 | + clock-names = "pwm", "pclk"; |
53 | + #pwm-cells = <3>; | 53 | + #pwm-cells = <3>; |
54 | + status = "disabled"; | 54 | + status = "disabled"; |
55 | + }; | 55 | + }; |
56 | + | 56 | + |
57 | + pwm4: pwm@ffa98000 { | 57 | + pwm4: pwm@ffa98000 { |
58 | + compatible = "rockchip,rk3528-pwm", | 58 | + compatible = "rockchip,rk3528-pwm", |
59 | + "rockchip,rk3328-pwm"; | 59 | + "rockchip,rk3328-pwm"; |
60 | + reg = <0x0 0xffa98000 0x0 0x10>; | 60 | + reg = <0x0 0xffa98000 0x0 0x10>; |
61 | + clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>; | 61 | + clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>; |
62 | + clock-names = "pwm", "pclk"; | 62 | + clock-names = "pwm", "pclk"; |
63 | + #pwm-cells = <3>; | 63 | + #pwm-cells = <3>; |
64 | + status = "disabled"; | 64 | + status = "disabled"; |
65 | + }; | 65 | + }; |
66 | + | 66 | + |
67 | + pwm5: pwm@ffa98010 { | 67 | + pwm5: pwm@ffa98010 { |
68 | + compatible = "rockchip,rk3528-pwm", | 68 | + compatible = "rockchip,rk3528-pwm", |
69 | + "rockchip,rk3328-pwm"; | 69 | + "rockchip,rk3328-pwm"; |
70 | + reg = <0x0 0xffa98010 0x0 0x10>; | 70 | + reg = <0x0 0xffa98010 0x0 0x10>; |
71 | + clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>; | 71 | + clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>; |
72 | + clock-names = "pwm", "pclk"; | 72 | + clock-names = "pwm", "pclk"; |
73 | + #pwm-cells = <3>; | 73 | + #pwm-cells = <3>; |
74 | + status = "disabled"; | 74 | + status = "disabled"; |
75 | + }; | 75 | + }; |
76 | + | 76 | + |
77 | + pwm6: pwm@ffa98020 { | 77 | + pwm6: pwm@ffa98020 { |
78 | + compatible = "rockchip,rk3528-pwm", | 78 | + compatible = "rockchip,rk3528-pwm", |
79 | + "rockchip,rk3328-pwm"; | 79 | + "rockchip,rk3328-pwm"; |
80 | + reg = <0x0 0xffa98020 0x0 0x10>; | 80 | + reg = <0x0 0xffa98020 0x0 0x10>; |
81 | + clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>; | 81 | + clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>; |
82 | + clock-names = "pwm", "pclk"; | 82 | + clock-names = "pwm", "pclk"; |
83 | + #pwm-cells = <3>; | 83 | + #pwm-cells = <3>; |
84 | + status = "disabled"; | 84 | + status = "disabled"; |
85 | + }; | 85 | + }; |
86 | + | 86 | + |
87 | + pwm7: pwm@ffa98030 { | 87 | + pwm7: pwm@ffa98030 { |
88 | + compatible = "rockchip,rk3528-pwm", | 88 | + compatible = "rockchip,rk3528-pwm", |
89 | + "rockchip,rk3328-pwm"; | 89 | + "rockchip,rk3328-pwm"; |
90 | + reg = <0x0 0xffa98030 0x0 0x10>; | 90 | + reg = <0x0 0xffa98030 0x0 0x10>; |
91 | + clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>; | 91 | + clocks = <&cru CLK_PWM1>, <&cru PCLK_PWM1>; |
92 | + clock-names = "pwm", "pclk"; | 92 | + clock-names = "pwm", "pclk"; |
93 | + #pwm-cells = <3>; | 93 | + #pwm-cells = <3>; |
94 | + status = "disabled"; | 94 | + status = "disabled"; |
95 | + }; | 95 | + }; |
96 | + | 96 | + |
97 | saradc: adc@ffae0000 { | 97 | saradc: adc@ffae0000 { |
98 | compatible = "rockchip,rk3528-saradc"; | 98 | compatible = "rockchip,rk3528-saradc"; |
99 | reg = <0x0 0xffae0000 0x0 0x10000>; | 99 | reg = <0x0 0xffae0000 0x0 0x10000>; |
100 | -- | 100 | -- |
101 | 2.25.1 | 101 | 2.25.1 | diff view generated by jsdifflib |
1 | Enable pwm and fixed regulators for Radxa E20C. The pwm regulator is | 1 | Enable pwm and fixed regulators for Radxa E20C. The pwm regulator is |
---|---|---|---|
2 | used to power the CPU and GPU. Note that the LPDDR4 voltage is 1.1V. | 2 | used to power the CPU and GPU. Note that the LPDDR4 voltage is 1.1V. |
3 | 3 | ||
4 | Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> | 4 | Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> |
5 | --- | 5 | --- |
6 | .../boot/dts/rockchip/rk3528-radxa-e20c.dts | 72 +++++++++++++++++++ | 6 | .../boot/dts/rockchip/rk3528-radxa-e20c.dts | 73 +++++++++++++++++++ |
7 | 1 file changed, 72 insertions(+) | 7 | 1 file changed, 73 insertions(+) |
8 | 8 | ||
9 | diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 9 | diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts |
10 | index XXXXXXX..XXXXXXX 100644 | 10 | index XXXXXXX..XXXXXXX 100644 |
11 | --- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 11 | --- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts |
12 | +++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 12 | +++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts |
13 | @@ -XXX,XX +XXX,XX @@ vcc_3v3: regulator-3v3-vcc { | 13 | @@ -XXX,XX +XXX,XX @@ |
14 | vin-supply = <&vcc5v0_sys>; | 14 | |
15 | #include <dt-bindings/input/input.h> | ||
16 | #include <dt-bindings/leds/common.h> | ||
17 | +#include <dt-bindings/pwm/pwm.h> | ||
18 | #include "rk3528.dtsi" | ||
19 | |||
20 | / { | ||
21 | @@ -XXX,XX +XXX,XX @@ led-wan { | ||
22 | }; | ||
15 | }; | 23 | }; |
16 | 24 | ||
17 | + vcc_ddr: regulator-vcc-ddr { | ||
18 | + compatible = "regulator-fixed"; | ||
19 | + regulator-name = "vcc_ddr"; | ||
20 | + regulator-always-on; | ||
21 | + regulator-boot-on; | ||
22 | + regulator-min-microvolt = <1100000>; | ||
23 | + regulator-max-microvolt = <1100000>; | ||
24 | + vin-supply = <&vcc5v0_sys>; | ||
25 | + }; | ||
26 | + | ||
27 | vcc5v0_sys: regulator-5v0-vcc-sys { | ||
28 | compatible = "regulator-fixed"; | ||
29 | regulator-name = "vcc5v0_sys"; | ||
30 | @@ -XXX,XX +XXX,XX @@ vcc5v0_sys: regulator-5v0-vcc-sys { | ||
31 | regulator-min-microvolt = <5000000>; | ||
32 | regulator-max-microvolt = <5000000>; | ||
33 | }; | ||
34 | + | ||
35 | + vdd_0v9: regulator-0v9-vdd { | 25 | + vdd_0v9: regulator-0v9-vdd { |
36 | + compatible = "regulator-fixed"; | 26 | + compatible = "regulator-fixed"; |
37 | + regulator-name = "vdd_0v9"; | 27 | + regulator-name = "vdd_0v9"; |
38 | + regulator-always-on; | 28 | + regulator-always-on; |
39 | + regulator-boot-on; | 29 | + regulator-boot-on; |
40 | + regulator-min-microvolt = <900000>; | 30 | + regulator-min-microvolt = <900000>; |
41 | + regulator-max-microvolt = <900000>; | 31 | + regulator-max-microvolt = <900000>; |
42 | + vin-supply = <&vcc5v0_sys>; | 32 | + vin-supply = <&vcc5v0_sys>; |
43 | + }; | 33 | + }; |
44 | + | 34 | + |
35 | + vcc_ddr: regulator-1v1-vcc-ddr { | ||
36 | + compatible = "regulator-fixed"; | ||
37 | + regulator-name = "vcc_ddr"; | ||
38 | + regulator-always-on; | ||
39 | + regulator-boot-on; | ||
40 | + regulator-min-microvolt = <1100000>; | ||
41 | + regulator-max-microvolt = <1100000>; | ||
42 | + vin-supply = <&vcc5v0_sys>; | ||
43 | + }; | ||
44 | + | ||
45 | vcc_1v8: regulator-1v8-vcc { | ||
46 | compatible = "regulator-fixed"; | ||
47 | regulator-name = "vcc_1v8"; | ||
48 | @@ -XXX,XX +XXX,XX @@ vcc5v0_sys: regulator-5v0-vcc-sys { | ||
49 | regulator-min-microvolt = <5000000>; | ||
50 | regulator-max-microvolt = <5000000>; | ||
51 | }; | ||
52 | + | ||
45 | + vdd_arm: regulator-vdd-arm { | 53 | + vdd_arm: regulator-vdd-arm { |
46 | + compatible = "pwm-regulator"; | 54 | + compatible = "pwm-regulator"; |
47 | + pwms = <&pwm1 0 5000 1>; | 55 | + pwms = <&pwm1 0 5000 PWM_POLARITY_INVERTED>; |
48 | + pwm-supply = <&vcc5v0_sys>; | 56 | + pwm-supply = <&vcc5v0_sys>; |
49 | + regulator-name = "vdd_arm"; | 57 | + regulator-name = "vdd_arm"; |
50 | + regulator-always-on; | 58 | + regulator-always-on; |
51 | + regulator-boot-on; | 59 | + regulator-boot-on; |
52 | + regulator-min-microvolt = <746000>; | 60 | + regulator-min-microvolt = <746000>; |
53 | + regulator-max-microvolt = <1201000>; | 61 | + regulator-max-microvolt = <1201000>; |
54 | + regulator-settling-time-up-us = <250>; | 62 | + regulator-settling-time-up-us = <250>; |
55 | + }; | 63 | + }; |
56 | + | 64 | + |
57 | + vdd_logic: regulator-vdd-logic { | 65 | + vdd_logic: regulator-vdd-logic { |
58 | + compatible = "pwm-regulator"; | 66 | + compatible = "pwm-regulator"; |
59 | + pwms = <&pwm2 0 5000 1>; | 67 | + pwms = <&pwm2 0 5000 PWM_POLARITY_INVERTED>; |
60 | + pwm-supply = <&vcc5v0_sys>; | 68 | + pwm-supply = <&vcc5v0_sys>; |
61 | + regulator-name = "vdd_logic"; | 69 | + regulator-name = "vdd_logic"; |
62 | + regulator-always-on; | 70 | + regulator-always-on; |
63 | + regulator-boot-on; | 71 | + regulator-boot-on; |
64 | + regulator-min-microvolt = <705000>; | 72 | + regulator-min-microvolt = <705000>; |
... | ... | ||
87 | @@ -XXX,XX +XXX,XX @@ wan_led_g: wan-led-g { | 95 | @@ -XXX,XX +XXX,XX @@ wan_led_g: wan-led-g { |
88 | }; | 96 | }; |
89 | }; | 97 | }; |
90 | 98 | ||
91 | +&pwm1 { | 99 | +&pwm1 { |
100 | + pinctrl-names = "default"; | ||
92 | + pinctrl-0 = <&pwm1m0_pins>; | 101 | + pinctrl-0 = <&pwm1m0_pins>; |
93 | + pinctrl-names = "default"; | ||
94 | + status = "okay"; | 102 | + status = "okay"; |
95 | +}; | 103 | +}; |
96 | + | 104 | + |
97 | +&pwm2 { | 105 | +&pwm2 { |
106 | + pinctrl-names = "default"; | ||
98 | + pinctrl-0 = <&pwm2m0_pins>; | 107 | + pinctrl-0 = <&pwm2m0_pins>; |
99 | + pinctrl-names = "default"; | ||
100 | + status = "okay"; | 108 | + status = "okay"; |
101 | +}; | 109 | +}; |
102 | + | 110 | + |
103 | &saradc { | 111 | &saradc { |
104 | vref-supply = <&vcc_1v8>; | 112 | vref-supply = <&vcc_1v8>; |
105 | status = "okay"; | 113 | status = "okay"; |
106 | -- | 114 | -- |
107 | 2.25.1 | 115 | 2.25.1 | diff view generated by jsdifflib |