[PATCH linux dev-4.10] ARM: dts: aspeed: Add ARM system BMC device tree

Andrew Jeffery andrew at aj.id.au
Fri Feb 2 10:40:56 AEDT 2018


On Wed, 17 Jan 2018, at 10:47, Joel Stanley wrote:
> > +                        max31790 at 20 {
> > +                                compatible = "max31790";
> > +                                reg = <0x20>;
> > +                                #address-cells = <1>;
> > +                                #size-cells = <0>;
> > +                               fan-mode = "pwm";
> > +                                fanconfig1 = <0x08>;
> > +                                fanconfig2 = <0x09>;
> > +                                fanconfig3 = <0x08>;
> > +                                fanconfig4 = <0x08>;
> > +                                fanconfig5 = <0x09>;
> > +                                fanconfig6 = <0x08>;
> > +                        };
> 
> Andrew, can you please review the max parts?

This is for the max31790, which is a different part to the max31785 that I have worked on. However, there's no bindings document upstream for the max31790, let alone one that describes the fanconfigX properties.

Looks like we'll need to see some bindings and driver patches before we accept this node as is.

> > +
> > +static void __init do_centriq2400rep_setup(void)
> > +{
> > +       u32 reg;
> > +
> > +       do_common_setup();
> > +       writel(0x00000010, AST_IO(AST_BASE_WDT | 0x2c));
> 
> We have a watchdog driver for modifying the watchdog. Please use that
> instead of this line.
> 
> > +
> > +       writel(0xff000000, AST_IO(AST_BASE_SCU | 0x88));
> 
> This appears to be modifying the multi function pin control. What are
> you trying to do?
> 
> We should be able to use the pinctrl driver to modify these settings.

Right - this is muxing MDIO pins for MAC#1, SPI pins for SPI2, and the FWSPICS#x functions. This can all be done in the respective devicetree nodes via the existing pinmux support as Joel suggests. See [1] and then [2] for the relevant pinctrl configuration nodes. You'll need something like:

&fmc {
    pinctrl-names = "default";
    pinctrl-names = <pinctrl_&pinctrl_fwspics1_default &pinctrl_fwspics2_default>;
};

&spi2 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_spi2ck_default &pinctrl_spi2miso_default &pinctrl_spi2mosi_default &pinctrl_spi2cs0_default>;
};

&mac0 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
};

[1] Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt
[2] arch/arm/boot/dts/aspeed-g5.dtsi

Cheers,

Andrew


More information about the openbmc mailing list