* [PATCH linux dev-4.10 v2] ARM: dts: aspeed: quanta: Enable pwm fans
@ 2017-06-27 13:44 Patrick Venture
2017-06-28 6:06 ` Joel Stanley
0 siblings, 1 reply; 4+ messages in thread
From: Patrick Venture @ 2017-06-27 13:44 UTC (permalink / raw)
To: venture, joel, openbmc
Signed-off-by: Patrick Venture <venture@google.com>
---
v2: Moved pwm_tacho_fixed_clk to clocks.
---
arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts | 51 ++++++++++++++++++++++++++++
arch/arm/boot/dts/aspeed-g4.dtsi | 5 +++
2 files changed, 56 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts b/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
index e609c53d58f5..3abc2954d26e 100644
--- a/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
@@ -46,6 +46,57 @@
gpios = <&gpio ASPEED_GPIO(B, 3) GPIO_ACTIVE_LOW>;
};
};
+
+ pwm_tacho: pwm-tacho-controller@1e786000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0x1E786000 0x1000>;
+ compatible = "aspeed,ast2500-pwm-tacho";
+ clocks = <&pwm_tacho_fixed_clk>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default
+ &pinctrl_pwm2_default &pinctrl_pwm3_default>;
+
+ fan@0 {
+ reg = <0x00>;
+ aspeed,fan-tach-ch = /bits/ 8 <0x00>;
+ };
+
+ fan@1 {
+ reg = <0x01>;
+ aspeed,fan-tach-ch = /bits/ 8 <0x01>;
+ };
+
+ fan@2 {
+ reg = <0x02>;
+ aspeed,fan-tach-ch = /bits/ 8 <0x02>;
+ };
+
+ fan@3 {
+ reg = <0x03>;
+ aspeed,fan-tach-ch = /bits/ 8 <0x03>;
+ };
+
+ fan@4 {
+ reg = <0x00>;
+ aspeed,fan-tach-ch = /bits/ 8 <0x04>;
+ };
+
+ fan@5 {
+ reg = <0x01>;
+ aspeed,fan-tach-ch = /bits/ 8 <0x05>;
+ };
+
+ fan@6 {
+ reg = <0x02>;
+ aspeed,fan-tach-ch = /bits/ 8 <0x06>;
+ };
+
+ fan@7 {
+ reg = <0x03>;
+ aspeed,fan-tach-ch = /bits/ 8 <0x07>;
+ };
+ };
};
&fmc {
diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index a998a00a2728..9cc959fccfa0 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -36,6 +36,11 @@
};
clocks {
+ pwm_tacho_fixed_clk: fixedclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ };
};
ahb {
--
2.13.1.611.g7e3b11ae1-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH linux dev-4.10 v2] ARM: dts: aspeed: quanta: Enable pwm fans
2017-06-27 13:44 [PATCH linux dev-4.10 v2] ARM: dts: aspeed: quanta: Enable pwm fans Patrick Venture
@ 2017-06-28 6:06 ` Joel Stanley
2017-06-28 14:01 ` Patrick Venture
0 siblings, 1 reply; 4+ messages in thread
From: Joel Stanley @ 2017-06-28 6:06 UTC (permalink / raw)
To: Patrick Venture; +Cc: OpenBMC Maillist
On Tue, Jun 27, 2017 at 11:14 PM, Patrick Venture <venture@google.com> wrote:
> Signed-off-by: Patrick Venture <venture@google.com>
> ---
> v2: Moved pwm_tacho_fixed_clk to clocks.
> ---
> arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts | 51 ++++++++++++++++++++++++++++
> arch/arm/boot/dts/aspeed-g4.dtsi | 5 +++
> 2 files changed, 56 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts b/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
> index e609c53d58f5..3abc2954d26e 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
> @@ -46,6 +46,57 @@
> gpios = <&gpio ASPEED_GPIO(B, 3) GPIO_ACTIVE_LOW>;
> };
> };
> +
> + pwm_tacho: pwm-tacho-controller@1e786000 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + reg = <0x1E786000 0x1000>;
Nit: convention is to use lowecase for hex numbers in the dt.
> + compatible = "aspeed,ast2500-pwm-tacho";
> + clocks = <&pwm_tacho_fixed_clk>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default
> + &pinctrl_pwm2_default &pinctrl_pwm3_default>;
It looks like you're using fans 0..7, but you're only requesting the
pins for the first four fans. Should you be requesting all 8?
Cheers,
Joel
> +
> + fan@0 {
> + reg = <0x00>;
> + aspeed,fan-tach-ch = /bits/ 8 <0x00>;
> + };
> +
> + fan@1 {
> + reg = <0x01>;
> + aspeed,fan-tach-ch = /bits/ 8 <0x01>;
> + };
> +
> + fan@2 {
> + reg = <0x02>;
> + aspeed,fan-tach-ch = /bits/ 8 <0x02>;
> + };
> +
> + fan@3 {
> + reg = <0x03>;
> + aspeed,fan-tach-ch = /bits/ 8 <0x03>;
> + };
> +
> + fan@4 {
> + reg = <0x00>;
> + aspeed,fan-tach-ch = /bits/ 8 <0x04>;
> + };
> +
> + fan@5 {
> + reg = <0x01>;
> + aspeed,fan-tach-ch = /bits/ 8 <0x05>;
> + };
> +
> + fan@6 {
> + reg = <0x02>;
> + aspeed,fan-tach-ch = /bits/ 8 <0x06>;
> + };
> +
> + fan@7 {
> + reg = <0x03>;
> + aspeed,fan-tach-ch = /bits/ 8 <0x07>;
> + };
> + };
> };
>
> &fmc {
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
> index a998a00a2728..9cc959fccfa0 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -36,6 +36,11 @@
> };
>
> clocks {
> + pwm_tacho_fixed_clk: fixedclk {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <24000000>;
> + };
> };
>
> ahb {
> --
> 2.13.1.611.g7e3b11ae1-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH linux dev-4.10 v2] ARM: dts: aspeed: quanta: Enable pwm fans
2017-06-28 6:06 ` Joel Stanley
@ 2017-06-28 14:01 ` Patrick Venture
2017-06-28 22:48 ` Joel Stanley
0 siblings, 1 reply; 4+ messages in thread
From: Patrick Venture @ 2017-06-28 14:01 UTC (permalink / raw)
To: Joel Stanley; +Cc: OpenBMC Maillist
On Tue, Jun 27, 2017 at 11:06 PM, Joel Stanley <joel@jms.id.au> wrote:
> On Tue, Jun 27, 2017 at 11:14 PM, Patrick Venture <venture@google.com> wrote:
>> Signed-off-by: Patrick Venture <venture@google.com>
>> ---
>> v2: Moved pwm_tacho_fixed_clk to clocks.
>> ---
>> arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts | 51 ++++++++++++++++++++++++++++
>> arch/arm/boot/dts/aspeed-g4.dtsi | 5 +++
>> 2 files changed, 56 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts b/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
>> index e609c53d58f5..3abc2954d26e 100644
>> --- a/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
>> +++ b/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
>> @@ -46,6 +46,57 @@
>> gpios = <&gpio ASPEED_GPIO(B, 3) GPIO_ACTIVE_LOW>;
>> };
>> };
>> +
>> + pwm_tacho: pwm-tacho-controller@1e786000 {
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> + reg = <0x1E786000 0x1000>;
>
> Nit: convention is to use lowecase for hex numbers in the dt.
Easy fix will come in next version. :D
>
>> + compatible = "aspeed,ast2500-pwm-tacho";
>> + clocks = <&pwm_tacho_fixed_clk>;
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default
>> + &pinctrl_pwm2_default &pinctrl_pwm3_default>;
>
> It looks like you're using fans 0..7, but you're only requesting the
> pins for the first four fans. Should you be requesting all 8?
The pwm actually drives a pair on this board. So, we have 8 fans, but
only four active pwm controls. I don't know if this is a driver issue
but the fans are paired and work as a pair.
>
> Cheers,
>
> Joel
>
>> +
>> + fan@0 {
>> + reg = <0x00>;
>> + aspeed,fan-tach-ch = /bits/ 8 <0x00>;
>> + };
>> +
>> + fan@1 {
>> + reg = <0x01>;
>> + aspeed,fan-tach-ch = /bits/ 8 <0x01>;
>> + };
>> +
>> + fan@2 {
>> + reg = <0x02>;
>> + aspeed,fan-tach-ch = /bits/ 8 <0x02>;
>> + };
>> +
>> + fan@3 {
>> + reg = <0x03>;
>> + aspeed,fan-tach-ch = /bits/ 8 <0x03>;
>> + };
>> +
>> + fan@4 {
>> + reg = <0x00>;
>> + aspeed,fan-tach-ch = /bits/ 8 <0x04>;
>> + };
>> +
>> + fan@5 {
>> + reg = <0x01>;
>> + aspeed,fan-tach-ch = /bits/ 8 <0x05>;
>> + };
>> +
>> + fan@6 {
>> + reg = <0x02>;
>> + aspeed,fan-tach-ch = /bits/ 8 <0x06>;
>> + };
>> +
>> + fan@7 {
>> + reg = <0x03>;
>> + aspeed,fan-tach-ch = /bits/ 8 <0x07>;
>> + };
>> + };
>> };
>>
>> &fmc {
>> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
>> index a998a00a2728..9cc959fccfa0 100644
>> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
>> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
>> @@ -36,6 +36,11 @@
>> };
>>
>> clocks {
>> + pwm_tacho_fixed_clk: fixedclk {
>> + compatible = "fixed-clock";
>> + #clock-cells = <0>;
>> + clock-frequency = <24000000>;
>> + };
>> };
>>
>> ahb {
>> --
>> 2.13.1.611.g7e3b11ae1-goog
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH linux dev-4.10 v2] ARM: dts: aspeed: quanta: Enable pwm fans
2017-06-28 14:01 ` Patrick Venture
@ 2017-06-28 22:48 ` Joel Stanley
0 siblings, 0 replies; 4+ messages in thread
From: Joel Stanley @ 2017-06-28 22:48 UTC (permalink / raw)
To: Patrick Venture; +Cc: OpenBMC Maillist
On Wed, Jun 28, 2017 at 11:31 PM, Patrick Venture <venture@google.com> wrote:
>>> + compatible = "aspeed,ast2500-pwm-tacho";
>>> + clocks = <&pwm_tacho_fixed_clk>;
>>> + pinctrl-names = "default";
>>> + pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default
>>> + &pinctrl_pwm2_default &pinctrl_pwm3_default>;
>>
>> It looks like you're using fans 0..7, but you're only requesting the
>> pins for the first four fans. Should you be requesting all 8?
>
> The pwm actually drives a pair on this board. So, we have 8 fans, but
> only four active pwm controls. I don't know if this is a driver issue
> but the fans are paired and work as a pair.
Okay. The bindings are a bit confusing at first glance. Sounds like
you've got it under control.
I'll apply your v3.
Cheers,
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-28 22:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-27 13:44 [PATCH linux dev-4.10 v2] ARM: dts: aspeed: quanta: Enable pwm fans Patrick Venture
2017-06-28 6:06 ` Joel Stanley
2017-06-28 14:01 ` Patrick Venture
2017-06-28 22:48 ` Joel Stanley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.