Update the device tree for Ampere's Mt.Mitchell BMC
Subsystems (2)
cover Update the device tree for Ampere's Mt.Mitchell BMC
Updates the device tree to support some features on Ampere's Mt.Mitchell BMC.
Chanh Nguyen (4):
ARM: dts: aspeed: mtmitchell: Enable the BMC UART8 and UART9
ARM: dts: aspeed: mtmitchell: Add I2C Fan
ARM: dts: aspeed: mtmitchell: Update ADC sensors for Mt.Mitchell DVT
systems
ARM: dts: aspeed: mtmitchell: Add MCTP
.../boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 138 ++++++++++++------ 1 file changed, 97 insertions(+), 41 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/4 ARM: dts: aspeed: mtmitchell: Enable the BMC UART8 and UART9
The BMC UART8 and UART9 were connected to the Secpro and Mpro console of socket S1 on the Mt.Mitchell system.
--- arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +12 -0
@@ -9,6 +9,10 @@ / { model = "Ampere Mt.Mitchell BMC"; compatible = "ampere,mtmitchell-bmc", "aspeed,ast2600"; + aliases { + serial7 = &uart8; + serial8 = &uart9; + }; chosen { stdout-path = &uart5;
@@ -307,6 +311,14 @@ status = "okay"; }; +&uart8 { + status = "okay"; +}; + +&uart9 { + status = "okay"; +}; + &i2c0 { status = "okay";
Signature · 1 line
2.17.1
PATCH 2/4 ARM: dts: aspeed: mtmitchell: Add I2C Fan
In reply to Chanh NguyenAdd the MAX31790 node as a Fan I2C controller. It controls the TACH and PWM for Fan Mt.Mitchell system.
--- arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +12 -0
@@ -477,6 +477,18 @@ line-name = "bmc-ocp0-en-n"; }; }; + + max31790 at 20 { + compatible = "maxim,max31790"; + reg = <0x20>; + pwm-to-tach = <0 0 0 0 1 1>; + }; + + max31790 at 2f { + compatible = "maxim,max31790"; + reg = <0x2f>; + pwm-to-tach = <0 0 0 0 1 1>; + }; }; &i2c9 {
Signature · 1 line
2.17.1
PATCH 3/4 ARM: dts: aspeed: mtmitchell: Update ADC sensors for Mt.Mitchell DVT systems
In reply to Chanh NguyenChange to use I2C ADC controller (ltc2497) for Mt.Mitchell DVT and later hardware.
--- .../boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 107 +++++++++++------- 1 file changed, 66 insertions(+), 41 deletions(-)
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +66 -41
@@ -65,174 +65,192 @@ adc0mux: adc0mux { compatible = "io-channel-mux"; - io-channels = <&adc0 0>; + io-channels = <&adc_i2c_0 0>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc1mux: adc1mux { compatible = "io-channel-mux"; - io-channels = <&adc0 1>; + io-channels = <&adc_i2c_0 1>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc2mux: adc2mux { compatible = "io-channel-mux"; - io-channels = <&adc0 2>; + io-channels = <&adc_i2c_0 2>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc3mux: adc3mux { compatible = "io-channel-mux"; - io-channels = <&adc0 3>; + io-channels = <&adc_i2c_0 3>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc4mux: adc4mux { compatible = "io-channel-mux"; - io-channels = <&adc0 4>; + io-channels = <&adc_i2c_0 4>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc5mux: adc5mux { compatible = "io-channel-mux"; - io-channels = <&adc0 5>; + io-channels = <&adc_i2c_0 5>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc6mux: adc6mux { compatible = "io-channel-mux"; - io-channels = <&adc0 6>; + io-channels = <&adc_i2c_0 6>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc7mux: adc7mux { compatible = "io-channel-mux"; - io-channels = <&adc0 7>; + io-channels = <&adc_i2c_0 7>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc8mux: adc8mux { compatible = "io-channel-mux"; - io-channels = <&adc1 0>; + io-channels = <&adc_i2c_0 8>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc9mux: adc9mux { compatible = "io-channel-mux"; - io-channels = <&adc1 1>; + io-channels = <&adc_i2c_0 9>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc10mux: adc10mux { compatible = "io-channel-mux"; - io-channels = <&adc1 2>; + io-channels = <&adc_i2c_0 10>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc11mux: adc11mux { compatible = "io-channel-mux"; - io-channels = <&adc1 3>; + io-channels = <&adc_i2c_0 11>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc12mux: adc12mux { compatible = "io-channel-mux"; - io-channels = <&adc1 4>; + io-channels = <&adc_i2c_0 12>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc13mux: adc13mux { compatible = "io-channel-mux"; - io-channels = <&adc1 5>; + io-channels = <&adc_i2c_0 13>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc14mux: adc14mux { compatible = "io-channel-mux"; - io-channels = <&adc1 6>; + io-channels = <&adc_i2c_0 14>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; adc15mux: adc15mux { compatible = "io-channel-mux"; - io-channels = <&adc1 7>; + io-channels = <&adc_i2c_0 15>; #io-channel-cells = <1>; io-channel-names = "parent"; mux-controls = <&gpioI5mux>; + settle-time-us = <10000>; channels = "s0", "s1"; }; iio-hwmon { compatible = "iio-hwmon"; - io-channels = <&adc0mux 0>, <&adc0mux 1>, - <&adc1mux 0>, <&adc1mux 1>, - <&adc2mux 0>, <&adc2mux 1>, - <&adc3mux 0>, <&adc3mux 1>, - <&adc4mux 0>, <&adc4mux 1>, - <&adc5mux 0>, <&adc5mux 1>, - <&adc6mux 0>, <&adc6mux 1>, - <&adc7mux 0>, <&adc7mux 1>, - <&adc8mux 0>, <&adc8mux 1>, - <&adc9mux 0>, <&adc9mux 1>, - <&adc10mux 0>, <&adc10mux 1>, - <&adc11mux 0>, <&adc11mux 1>, - <&adc12mux 0>, <&adc12mux 1>, - <&adc13mux 0>, <&adc13mux 1>, - <&adc14mux 0>, <&adc14mux 1>, - <&adc15mux 0>, <&adc15mux 1>, - <&adc_i2c 0>, <&adc_i2c 1>, - <&adc_i2c 2>, <&adc_i2c 3>, - <&adc_i2c 4>, <&adc_i2c 5>, - <&adc_i2c 6>, <&adc_i2c 7>, - <&adc_i2c 8>, <&adc_i2c 9>, - <&adc_i2c 10>, <&adc_i2c 11>, - <&adc_i2c 12>, <&adc_i2c 13>, - <&adc_i2c 14>, <&adc_i2c 15>; + io-channels = <&adc0mux 0>, <&adc0mux 1>, + <&adc1mux 0>, <&adc1mux 1>, + <&adc2mux 0>, <&adc2mux 1>, + <&adc3mux 0>, <&adc3mux 1>, + <&adc4mux 0>, <&adc4mux 1>, + <&adc5mux 0>, <&adc5mux 1>, + <&adc6mux 0>, <&adc6mux 1>, + <&adc7mux 0>, <&adc7mux 1>, + <&adc8mux 0>, <&adc8mux 1>, + <&adc9mux 0>, <&adc9mux 1>, + <&adc10mux 0>, <&adc10mux 1>, + <&adc11mux 0>, <&adc11mux 1>, + <&adc12mux 0>, <&adc12mux 1>, + <&adc13mux 0>, <&adc13mux 1>, + <&adc14mux 0>, <&adc14mux 1>, + <&adc15mux 0>, <&adc15mux 1>, + <&adc_i2c_1 0>, <&adc_i2c_1 1>, + <&adc_i2c_1 2>, <&adc_i2c_1 3>, + <&adc_i2c_1 4>, <&adc_i2c_1 5>, + <&adc_i2c_1 6>, <&adc_i2c_1 7>, + <&adc_i2c_1 8>, <&adc_i2c_1 9>, + <&adc_i2c_1 10>, <&adc_i2c_1 11>, + <&adc_i2c_1 12>, <&adc_i2c_1 13>, + <&adc_i2c_1 14>, <&adc_i2c_1 15>, + <&adc0 0>, <&adc0 1>, + <&adc0 2>; }; };
@@ -353,7 +371,14 @@ &i2c4 { status = "okay"; - adc_i2c: adc at 16 { + adc_i2c_0: adc at 14 { + compatible = "lltc,ltc2497"; + reg = <0x14>; + vref-supply = <&voltage_mon_reg>; + #io-channel-cells = <1>; + }; + + adc_i2c_1: adc at 16 { compatible = "lltc,ltc2497"; reg = <0x16>; vref-supply = <&voltage_mon_reg>;
Signature · 1 line
2.17.1
PATCH 4/4 ARM: dts: aspeed: mtmitchell: Add MCTP
In reply to Chanh NguyenEnable MCTP driver on I2C3 bus for MCTP transaction
--- arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +7 -0
@@ -366,6 +366,13 @@ &i2c3 { status = "okay"; + bus-frequency = <1000000>; + multi-master; + mctp-controller; + mctp at 10 { + compatible = "mctp-i2c-controller"; + reg = <0x10>; + }; }; &i2c4 {
Signature · 1 line
2.17.1
Re: [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan
In reply to Chanh NguyenQuoted 13 lines · Chanh Nguyen
Add the MAX31790 node as a Fan I2C controller. It controls the TACH and PWM for Fan Mt.Mitchell system.
Signed-off-by Chanh Nguyen <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +0
-0
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 481
Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +2
-0@@ -477,6 +477,18 @@ line-name = "bmc-ocp0-en-n"; }; }; + + max31790 at 20 {
Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 482
Quoted 1 line
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +1
-0+ compatible = "maxim,max31790";
Unfortunately the compatible is undocumented.
Please run scripts/checkpatch.pl and fix reported warnings.
Best regards,
Krzysztof
Re: [PATCH 4/4] ARM: dts: aspeed: mtmitchell: Add MCTP
In reply to Chanh NguyenQuoted 13 lines · Chanh Nguyen
Enable MCTP driver on I2C3 bus for MCTP transaction
Signed-off-by Chanh Nguyen <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +0
-0
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 374
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +6
-0@@ -366,6 +366,13 @@ &i2c3 { status = "okay"; + bus-frequency = <1000000>; + multi-master; + mctp-controller; + mctp at 10 { + compatible = "mctp-i2c-controller"; + reg = <0x10>;
This needs to be reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
Andrew
Re: [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan
In reply to Krzysztof KozlowskiQuoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Chanh Nguyen
Add the MAX31790 node as a Fan I2C controller. It controls the TACH and PWM for Fan Mt.Mitchell system.
Signed-off-by Chanh Nguyen <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Quoted 13 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 481
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +2
-0@@ -477,6 +477,18 @@ line-name = "bmc-ocp0-en-n"; }; }; + + max31790 at 20 {Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
Thank Krzysztof,
I think these node names should be "fan-i2c-0" and "fan-i2c-1". Do you have any other idea ?
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 482
Quoted 2 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +1
-0+ compatible = "maxim,max31790";Unfortunately the compatible is undocumented.
Please run
scripts/checkpatch.pland fix reported warnings.Best regards,
Krzysztof
Yes Krzysztof,
This compatible has not yes documented.
Should I push a document for max31790 to ./Documentation/devicetree/bindings/ or ask to maintainer (Guenter Roeck <[email protected]> or Jean Delvare <[email protected]>) ?
Best regards,
Chanh Ng
Re: [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan
Quoted 25 lines · Chanh Nguyen
Quoted 9 lines · Krzysztof Kozlowski
Quoted 8 lines · Chanh Nguyen
Add the MAX31790 node as a Fan I2C controller. It controls the TACH and PWM for Fan Mt.Mitchell system.
Signed-off-by Chanh Nguyen <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)Quoted 13 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 481
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +2
-0@@ -477,6 +477,18 @@ line-name = "bmc-ocp0-en-n"; }; }; + + max31790 at 20 {Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
Quoted 4 lines
Thank Krzysztof,
I think these node names should be "fan-i2c-0" and "fan-i2c-1". Do you have any other idea ?
i2c-0 is not generic. This should be either fan or fan-controller, depending what this is.
Quoted 12 lines
Quoted 11 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 482
Quoted 3 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +1
-0+ compatible = "maxim,max31790";Unfortunately the compatible is undocumented.
Please run
scripts/checkpatch.pland fix reported warnings.Best regards,
Krzysztof
Quoted 7 lines
Yes Krzysztof,
This compatible has not yes documented.
Should I push a document for max31790 to
./Documentation/devicetree/bindings/or ask to maintainer (Guenter Roeck <[email protected]> or Jean Delvare <[email protected]>) ?
Check on lore.kernel.org if there is ongoing work. If there is no, then please submit new the bindings (in DT schema). Maintainers are not for writing your code, so it's you or some other developer who should do it.
Best regards,
Krzysztof
Re: [PATCH 4/4] ARM: dts: aspeed: mtmitchell: Add MCTP
In reply to Andrew JefferyQuoted 28 lines · Andrew Jeffery
Quoted 13 lines · Chanh Nguyen
Enable MCTP driver on I2C3 bus for MCTP transaction
Signed-off-by Chanh Nguyen <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 7 +++++++ 1 file changed, 7 insertions(+)arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +0
-0arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 374
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +6
-0@@ -366,6 +366,13 @@ &i2c3 { status = "okay"; + bus-frequency = <1000000>; + multi-master; + mctp-controller; + mctp at 10 { + compatible = "mctp-i2c-controller"; + reg = <0x10>;This needs to be
reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
Quoted 1 line
Andrew
Thank Andrew, I will update that in PATCH v2.
Re: [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan
In reply to Krzysztof KozlowskiQuoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Chanh Nguyen
Quoted 22 lines · Krzysztof Kozlowski
Quoted 13 lines · Chanh Nguyen
Add the MAX31790 node as a Fan I2C controller. It controls the TACH and PWM for Fan Mt.Mitchell system.
Signed-off-by Chanh Nguyen <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +0
-0arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 481
Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +2
-0@@ -477,6 +477,18 @@ line-name = "bmc-ocp0-en-n"; }; }; + + max31790 at 20 {Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
Quoted 7 lines
Quoted 4 lines
Thank Krzysztof,
I think these node names should be "fan-i2c-0" and "fan-i2c-1". Do you have any other idea ?
i2c-0 is not generic. This should be either fan or fan-controller, depending what this is.
Thank Krzysztof! I will update node name is "fan-controller" in PATCH v2.
Quoted 20 lines
Quoted 12 lines
Quoted 11 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts line 482
Quoted 3 lines
arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts +1
-0+ compatible = "maxim,max31790";Unfortunately the compatible is undocumented.
Please run
scripts/checkpatch.pland fix reported warnings.Best regards,
KrzysztofQuoted 7 lines
Yes Krzysztof,
This compatible has not yes documented.
Should I push a document for max31790 to
./Documentation/devicetree/bindings/or ask to maintainer (Guenter Roeck <[email protected]> or Jean Delvare <[email protected]>) ?
Quoted 7 lines
Check on lore.kernel.org if there is ongoing work. If there is no, then please submit new the bindings (in DT schema). Maintainers are not for writing your code, so it's you or some other developer who should do it.
Best regards,
Krzysztof
Thank Krzysztof!
I checked on lore.kernel.org but no submit is in-progress for that. I'll submit new the binding document for max31790.
Now, Do I need to remove the "[PATCH 2/4] ARM: dts: aspeed: mtmitchell:
Add I2C Fan" from PATCH v2?
And will push again "ARM: dts: aspeed: mtmitchell: Add I2C Fan" commit once max31790 binding document was available upstream.