[PATCH linux dev-4.10] ARM: dts: aspeed: romulus: Add aspeed fan tach

Andrew Jeffery andrew at aj.id.au
Tue Oct 31 11:08:10 AEDT 2017


On Mon, 2017-10-30 at 17:21 +0800, Lei YU wrote:
> Romulus uses aspeed fan tach instead of max31785:
> * Pass1's max31785 is always reset by CPLD;
> * Pass2's max31785 is not connected.
> 
> The board has 7 fan taches connected to BMC_FANTACH8~14,
> and controlled by two PWMs.
> 
> This commit also change "enabled" to "okay" for the i2c devices.

I would prefer unrelated changes like the I2C fix are split out into a separate
commit in the future. Don't worry about it now though.

Cheers,

Andrew

> 
> Signed-off-by: Lei YU <mine260309 at gmail.com>
> ---
>  arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 138 +++++++++------------------
>  1 file changed, 47 insertions(+), 91 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index dea556f..86f7927 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -68,6 +68,47 @@
>  
>  #include "ibm-power9-cfam.dtsi"
>  
> +&pwm_tacho {
> +	status = "okay";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>;
> +
> +	fan at 0 {
> +		reg = <0x00>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x08>;
> +	};
> +
> +	fan at 1 {
> +		reg = <0x00>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x09>;
> +	};
> +
> +	fan at 2 {
> +		reg = <0x01>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x0a>;
> +	};
> +
> +	fan at 3 {
> +		reg = <0x01>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x0b>;
> +	};
> +
> +	fan at 4 {
> +		reg = <0x00>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x0c>;
> +	};
> +
> +	fan at 5 {
> +		reg = <0x00>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x0d>;
> +	};
> +
> +	fan at 6 {
> +		reg = <0x01>;
> +		aspeed,fan-tach-ch = /bits/ 8 <0x0e>;
> +	};
> +};
> +
>  &fmc {
>  	status = "okay";
>  	flash at 0 {
> @@ -132,7 +173,7 @@
>  };
>  
>  &i2c1 {
> -	status = "enabled";
> +	status = "okay";
>  
>  	/* CPU1 */
>  };
> @@ -173,27 +214,27 @@
>  
>  &i2c6 {
>  	/* PCIe slot 1 (x8) */
> -	status = "enabled";
> +	status = "okay";
>  };
>  
>  &i2c7 {
>  	/* PCIe slot 2 (x16) */
> -	status = "enabled";
> +	status = "okay";
>  };
>  
>  &i2c8 {
>  	/* PCIe slot 3 (x16) */
> -	status = "enabled";
> +	status = "okay";
>  };
>  
>  &i2c9 {
>  	/* PCIe slot 4 (x16) */
> -	status = "enabled";
> +	status = "okay";
>  };
>  
>  &i2c10 {
>  	/* PCIe slot 5 (x8) */
> -	status = "enabled";
> +	status = "okay";
>  };
>  
>  &i2c11 {
> @@ -211,91 +252,6 @@
>  	status = "okay";
>  
>  	/* Fan Controller */
> -	max31785 at 52 {
> -		compatible = "maxim,max31785";
> -		reg = <0x52>;
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -
> -		fan at 0 {
> -			compatible = "pmbus-fan";
> -			reg = <0>;
> -			tach-pulses = <2>;
> -			maxim,fan-rotor-input = "tach";
> -			maxim,fan-pwm-freq = <25000>;
> -			maxim,fan-dual-tach;
> -			maxim,fan-no-watchdog;
> -			maxim,fan-no-fault-ramp;
> -			maxim,fan-ramp = <2>;
> -			maxim,fan-fault-pin-mon;
> -		};
> -
> -		fan at 1 {
> -			compatible = "pmbus-fan";
> -			reg = <1>;
> -			tach-pulses = <2>;
> -			maxim,fan-rotor-input = "tach";
> -			maxim,fan-pwm-freq = <25000>;
> -			maxim,fan-dual-tach;
> -			maxim,fan-no-watchdog;
> -			maxim,fan-no-fault-ramp;
> -			maxim,fan-ramp = <2>;
> -			maxim,fan-fault-pin-mon;
> -		};
> -
> -		fan at 2 {
> -			compatible = "pmbus-fan";
> -			reg = <2>;
> -			tach-pulses = <2>;
> -			maxim,fan-rotor-input = "tach";
> -			maxim,fan-pwm-freq = <25000>;
> -			maxim,fan-dual-tach;
> -			maxim,fan-no-watchdog;
> -			maxim,fan-no-fault-ramp;
> -			maxim,fan-ramp = <2>;
> -			maxim,fan-fault-pin-mon;
> -		};
> -
> -		fan at 3 {
> -			compatible = "pmbus-fan";
> -			reg = <3>;
> -			tach-pulses = <2>;
> -			maxim,fan-rotor-input = "tach";
> -			maxim,fan-pwm-freq = <25000>;
> -			maxim,fan-dual-tach;
> -			maxim,fan-no-watchdog;
> -			maxim,fan-no-fault-ramp;
> -			maxim,fan-ramp = <2>;
> -			maxim,fan-fault-pin-mon;
> -		};
> -
> -		fan at 4 {
> -			compatible = "pmbus-fan";
> -			reg = <4>;
> -			tach-pulses = <2>;
> -			maxim,fan-rotor-input = "tach";
> -			maxim,fan-pwm-freq = <25000>;
> -			maxim,fan-dual-tach;
> -			maxim,fan-no-watchdog;
> -			maxim,fan-no-fault-ramp;
> -			maxim,fan-ramp = <2>;
> -			maxim,fan-fault-pin-mon;
> -		};
> -
> -		fan at 5 {
> -			compatible = "pmbus-fan";
> -			reg = <5>;
> -			tach-pulses = <2>;
> -			maxim,fan-rotor-input = "tach";
> -			maxim,fan-pwm-freq = <25000>;
> -			maxim,fan-dual-tach;
> -			maxim,fan-no-watchdog;
> -			maxim,fan-no-fault-ramp;
> -			maxim,fan-ramp = <2>;
> -			maxim,fan-fault-pin-mon;
> -		};
> -	};
> -
>  	/* CPLD */
>  	/* Power Supply */
>  	/* Temp Sensor */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20171031/5f725a2f/attachment-0001.sig>


More information about the openbmc mailing list