ARM: dts: aspeed: Add ARM system BMC device tree
PATCH v2 1/1 ARM: dts: aspeed: Add ARM system BMC device tree
Add centriq2400-rep dts and modify platform initial
--- .../boot/dts/aspeed-bmc-arm-centriq2400-rep.dts | 350 +++++++++++++++++++++ arch/arm/mach-aspeed/aspeed.c | 22 ++ 2 files changed, 372 insertions(+) create mode 100644 arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +350 -0
@@ -0,0 +1,350 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +#include "aspeed-g5.dtsi" +#include <dt-bindings/gpio/aspeed-gpio.h> + +/ { + model = "Qualcomm Centriq 2400 REP AST2520"; + compatible = "qualcomm,centriq2400-rep-bmc", "aspeed,ast2500"; + + chosen { + stdout-path = &uart5; + bootargs = "console=ttyS4,115200 earlyprintk"; + }; + + memory { + reg = <0x80000000 0x40000000>; + }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, + <&adc 4>, <&adc 5>, <&adc 6>, <&adc 8>; + }; + + iio-hwmon-battery { + compatible = "iio-hwmon"; + io-channels = <&adc 7>; + }; + + leds { + compatible = "gpio-leds"; + + uid_led { + label = "UID_LED"; + gpios = <&gpio ASPEED_GPIO(Q, 5) GPIO_ACTIVE_LOW>; + }; + + ras_error_led { + label = "RAS_ERROR_LED"; + gpios = <&gpio ASPEED_GPIO(F, 6) GPIO_ACTIVE_LOW>; + }; + + system_fault { + label = "System_fault"; + gpios = <&gpio ASPEED_GPIO(A, 1) GPIO_ACTIVE_LOW>; + }; + }; +}; + +&fmc { + status = "okay"; + flash@0 { + status = "okay"; + m25p,fast-read; + lable = "bmc"; +#include "openbmc-flash-layout.dtsi" + }; +}; + +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + flash@0 { + reg = < 0 >; /* chip select number */ + compatible = "jedec,spi-nor"; + status = "okay"; + }; +}; + +&spi2 { + compatible = "aspeed,ast2500-spi-generic"; + reg = <0x1e631000 0xc4 0x38000000 0x02000000>; + interrupts = <59>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + spi2@0 { + reg = < 0 >; + compatible = "centriq,centriq2400-spi-hwmon"; + spi-max-frequency = <16000000>; + status = "okay"; + }; +}; + +&uart3 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd3_default + &pinctrl_rxd3_default>; + current-speed = <115200>; +}; + +&lpc_ctrl { + status = "okay"; + memory-region = <&flash_memory>; + flash = <&spi1>; +}; + +&uart5 { + status = "okay"; +}; + +&mac0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>; +}; + +&i2c0 { + status = "okay"; + + pca9542@70 { + compatible = "pca9542"; + reg = <0x70>; + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + pca9546@77 { + compatible = "pca9546"; + reg = <0x77>; + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + eeprom@52 { + compatible = "atmel,24c02"; + reg = <0x52>; + }; + }; + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + eeprom@57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + }; + }; + }; + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + pca9546@77 { + compatible = "pca9546"; + reg = <0x77>; + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + eeprom@57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + }; + }; + }; + + }; +}; + +&i2c1 { + status = "okay"; + + tmp421@1e { + compatible = "ti,tmp421"; + reg = <0x1e>; + }; + tmp421@2a { + compatible = "ti,tmp421"; + reg = <0x2a>; + }; + tmp421@4e { + compatible = "ti,tmp421"; + reg = <0x4e>; + }; + tmp421@1c { + compatible = "ti,tmp421"; + reg = <0x1c>; + }; +}; + +&i2c2 { + status = "okay"; + ssif { + compatible = "ssif-smbus-slave"; + reg = <0x42>; + }; + +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; +}; + +&i2c5 { + status = "okay"; + + ir38163@42 { + compatible = "ir38163"; + reg = <0x42>; + }; + ir38163@44 { + compatible = "ir38163"; + reg = <0x44>; + }; + ir38163@46 { + compatible = "ir38163"; + reg = <0x46>; + }; + ir38163@48 { + compatible = "ir38163"; + reg = <0x48>; + }; + pxm1310@02 { + compatible = "pxm1310"; + reg = <0x02>; + }; + pxm1310@04 { + compatible = "pxm1310"; + reg = <0x04>; + }; +}; + +&i2c6 { + status = "okay"; + + tmp421@1d { + compatible = "ti,tmp421"; + reg = <0x1d>; + }; + tmp421@1f { + compatible = "ti,tmp421"; + reg = <0x1f>; + }; + tmp421@4d { + compatible = "ti,tmp421"; + reg = <0x4d>; + }; + tmp421@4f { + compatible = "ti,tmp421"; + reg = <0x4f>; + }; + nvt210@4c { + compatible = "nvt210"; + reg = <0x4c>; + }; + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + pagesize = <128>; + }; +}; + +&i2c7 { + status = "okay"; + + adm1278@10 { + compatible = "adi,adm1278"; + reg = <0x10>; + Rsense = <250>; + }; + adm1278@11 { + compatible = "adi,adm1278"; + reg = <0x11>; + Rsense = <250>; + }; +}; + +&i2c8 { + status = "okay"; + + pca9641@70 { + compatible = "nxp,pca9641"; + reg = <0x70>; + #address-cells = <1>; + #size-cells = <0>; + i2c-arb{ + tmp421@1d { + compatible = "tmp421"; + reg = <0x1d>; + }; + adm1278@12 { + compatible = "adi,adm1278"; + reg = <0x12>; + Rsense = <500>; + }; + max31790@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>; + }; + max31790@23 { + compatible = "max31790"; + reg = <0x23>; + #address-cells = <2>; + #size-cells = <0>; + fan-mode = "pwm"; + fanconfig1 = <0x08>; + fanconfig2 = <0x09>; + fanconfig3 = <0x08>; + fanconfig4 = <0x08>; + fanconfig5 = <0x09>; + fanconfig6 = <0x08>; + }; + eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + }; + ds1100@58 { + compatible = "ds1100"; + reg = <0x58>; + }; + }; + }; +}; + +&i2c9 { + status = "okay"; +}; + +&vuart { + status = "okay"; +}; + +&gfx { + status = "okay"; +}; + +&pinctrl { + aspeed,external-nodes = <&gfx &lhc>; +};
arch/arm/mach-aspeed/aspeed.c +22 -0
@@ -29,6 +29,7 @@#define AST_BASE_MAC0 0X1E660000/* MAC 1 */ #define AST_BASE_SCU 0x1E6E2000/* System Control Unit (SCU) */ #define AST_BASE_GPIO 0x1E780000/* GPIO Controller */ +#define AST_BASE_WDT 0x1E785000/* Watchdog Timer */ static struct map_desc aspeed_io_desc[]__initdata __maybe_unused = { {
@@ -232,6 +233,25 @@ static void __init do_mellanox_setup(void)writel (reg,AST_IO (AST_BASE_SCU |0x48 )); } + +static void __init do_centriq2400rep_setup (void ) +{ +u32 reg; + +do_common_setup (); +writel (0x00000010 ,AST_IO (AST_BASE_WDT |0x2c )); + +writel (0xff000000 ,AST_IO (AST_BASE_SCU |0x88 )); + +/* Set GPIOC7 to output high to init host spi driver */ + reg =readl (AST_IO (AST_BASE_GPIO |0x04 )) |BIT (23 ); +writel (reg,AST_IO (AST_BASE_GPIO |0x04 )); + + reg =readl (AST_IO (AST_BASE_GPIO )) |BIT (23 ); +writel (reg,AST_IO (AST_BASE_GPIO )); +} + +#define SCU_PASSWORD 0x1688A8A8static void __init aspeed_init_early (void )
@@ -284,6 +304,8 @@ static void __init aspeed_init_early(void)do_lanyang_setup ();if (of_machine_is_compatible ("mellanox,msn-bmc" ))do_mellanox_setup (); +if (of_machine_is_compatible ("qualcomm,centriq2400-rep-bmc" )) +do_centriq2400rep_setup (); }static void __init aspeed_map_io (void )
Signature · 1 line
2.9.3
Should I remove the device hasn't the driver yet?
-----Original Message-----
From: Chen.KenYY 陳永營 TAO
Sent: Monday, February 05, 2018 11:04 AM
To: [email protected]
Cc: Chen.KenYY 陳永營 TAO; [email protected]
Subject: [PATCH linux dev-4.10 v2] ARM: dts: aspeed: Add ARM system BMC device tree
Add centriq2400-rep dts and modify platform initial
--- .../boot/dts/aspeed-bmc-arm-centriq2400-rep.dts | 350 +++++++++++++++++++++ arch/arm/mach-aspeed/aspeed.c | 22 ++ 2 files changed, 372 insertions(+) create mode 100644 arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +349 -0
@@ -0,0 +1,350 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +#include "aspeed-g5.dtsi" +#include <dt-bindings/gpio/aspeed-gpio.h> + +/ { + model = "Qualcomm Centriq 2400 REP AST2520"; + compatible = "qualcomm,centriq2400-rep-bmc", "aspeed,ast2500"; + + chosen { + stdout-path = &uart5; + bootargs = "console=ttyS4,115200 earlyprintk"; + }; + + memory { + reg = <0x80000000 0x40000000>; + }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, + <&adc 4>, <&adc 5>, <&adc 6>, <&adc 8>; + }; + + iio-hwmon-battery { + compatible = "iio-hwmon"; + io-channels = <&adc 7>; + }; + + leds { + compatible = "gpio-leds"; + + uid_led { + label = "UID_LED"; + gpios = <&gpio ASPEED_GPIO(Q, 5) GPIO_ACTIVE_LOW>; + }; + + ras_error_led { + label = "RAS_ERROR_LED"; + gpios = <&gpio ASPEED_GPIO(F, 6) GPIO_ACTIVE_LOW>; + }; + + system_fault { + label = "System_fault"; + gpios = <&gpio ASPEED_GPIO(A, 1) GPIO_ACTIVE_LOW>; + }; + }; +}; + +&fmc { + status = "okay"; + flash@0 { + status = "okay"; + m25p,fast-read; + lable = "bmc"; +#include "openbmc-flash-layout.dtsi" + }; +}; + +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + flash@0 { + reg = < 0 >; /* chip select number */ + compatible = "jedec,spi-nor"; + status = "okay"; + }; +}; + +&spi2 { + compatible = "aspeed,ast2500-spi-generic"; + reg = <0x1e631000 0xc4 0x38000000 0x02000000>; + interrupts = <59>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + spi2@0 { + reg = < 0 >; + compatible = "centriq,centriq2400-spi-hwmon"; + spi-max-frequency = <16000000>; + status = "okay"; + }; +}; + +&uart3 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd3_default + &pinctrl_rxd3_default>; + current-speed = <115200>; +}; + +&lpc_ctrl { + status = "okay"; + memory-region = <&flash_memory>; + flash = <&spi1>; +}; + +&uart5 { + status = "okay"; +}; + +&mac0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>; }; + +&i2c0 { + status = "okay"; + + pca9542@70 { + compatible = "pca9542"; + reg = <0x70>; + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + pca9546@77 { + compatible = "pca9546"; + reg = <0x77>; + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + eeprom@52 { + compatible = "atmel,24c02"; + reg = <0x52>; + }; + }; + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + eeprom@57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + }; + }; + }; + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + pca9546@77 { + compatible = "pca9546"; + reg = <0x77>; + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + eeprom@57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + }; + }; + }; + + }; +}; + +&i2c1 { + status = "okay"; + + tmp421@1e { + compatible = "ti,tmp421"; + reg = <0x1e>; + }; + tmp421@2a { + compatible = "ti,tmp421"; + reg = <0x2a>; + }; + tmp421@4e { + compatible = "ti,tmp421"; + reg = <0x4e>; + }; + tmp421@1c { + compatible = "ti,tmp421"; + reg = <0x1c>; + }; +}; + +&i2c2 { + status = "okay"; + ssif { + compatible = "ssif-smbus-slave"; + reg = <0x42>; + }; + +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; +}; + +&i2c5 { + status = "okay"; + + ir38163@42 { + compatible = "ir38163"; + reg = <0x42>; + }; + ir38163@44 { + compatible = "ir38163"; + reg = <0x44>; + }; + ir38163@46 { + compatible = "ir38163"; + reg = <0x46>; + }; + ir38163@48 { + compatible = "ir38163"; + reg = <0x48>; + }; + pxm1310@02 { + compatible = "pxm1310"; + reg = <0x02>; + }; + pxm1310@04 { + compatible = "pxm1310"; + reg = <0x04>; + }; +}; + +&i2c6 { + status = "okay"; + + tmp421@1d { + compatible = "ti,tmp421"; + reg = <0x1d>; + }; + tmp421@1f { + compatible = "ti,tmp421"; + reg = <0x1f>; + }; + tmp421@4d { + compatible = "ti,tmp421"; + reg = <0x4d>; + }; + tmp421@4f { + compatible = "ti,tmp421"; + reg = <0x4f>; + }; + nvt210@4c { + compatible = "nvt210"; + reg = <0x4c>; + }; + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + pagesize = <128>; + }; +}; + +&i2c7 { + status = "okay"; + + adm1278@10 { + compatible = "adi,adm1278"; + reg = <0x10>; + Rsense = <250>; + }; + adm1278@11 { + compatible = "adi,adm1278"; + reg = <0x11>; + Rsense = <250>; + }; +}; + +&i2c8 { + status = "okay"; + + pca9641@70 { + compatible = "nxp,pca9641"; + reg = <0x70>; + #address-cells = <1>; + #size-cells = <0>; + i2c-arb{ + tmp421@1d { + compatible = "tmp421"; + reg = <0x1d>; + }; + adm1278@12 { + compatible = "adi,adm1278"; + reg = <0x12>; + Rsense = <500>; + }; + max31790@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>; + }; + max31790@23 { + compatible = "max31790"; + reg = <0x23>; + #address-cells = <2>; + #size-cells = <0>; + fan-mode = "pwm"; + fanconfig1 = <0x08>; + fanconfig2 = <0x09>; + fanconfig3 = <0x08>; + fanconfig4 = <0x08>; + fanconfig5 = <0x09>; + fanconfig6 = <0x08>; + }; + eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + }; + ds1100@58 { + compatible = "ds1100"; + reg = <0x58>; + }; + }; + }; +}; + +&i2c9 { + status = "okay"; +}; + +&vuart { + status = "okay"; +}; + +&gfx { + status = "okay"; +}; + +&pinctrl { + aspeed,external-nodes = <&gfx &lhc>; +};
arch/arm/mach-aspeed/aspeed.c +18 -0
@@ -29,6 +29,7 @@#define AST_BASE_MAC0 0X1E660000/* MAC 1 */ #define AST_BASE_SCU 0x1E6E2000/* System Control Unit (SCU) */ #define AST_BASE_GPIO 0x1E780000/* GPIO Controller */ +#define AST_BASE_WDT 0x1E785000/* Watchdog Timer */ static struct map_desc aspeed_io_desc[]__initdata __maybe_unused = { {
@@ -232,6 +233,25 @@ static void __init do_mellanox_setup(void)writel (reg,AST_IO (AST_BASE_SCU |0x48 )); } + +static void __init do_centriq2400rep_setup (void ) { +u32 reg; + +do_common_setup (); +writel (0x00000010 ,AST_IO (AST_BASE_WDT |0x2c )); + +writel (0xff000000 ,AST_IO (AST_BASE_SCU |0x88 )); + +/* Set GPIOC7 to output high to init host spi driver */ + reg =readl (AST_IO (AST_BASE_GPIO |0x04 )) |BIT (23 ); +writel (reg,AST_IO (AST_BASE_GPIO |0x04 )); + + reg =readl (AST_IO (AST_BASE_GPIO )) |BIT (23 ); +writel (reg,AST_IO (AST_BASE_GPIO )); } + +#define SCU_PASSWORD 0x1688A8A8 static void __init aspeed_init_early(void) @@ -284,6 +304,8 @@ static void __init aspeed_init_early(void) do_lanyang_setup();
if (of_machine_is_compatible("mellanox,msn-bmc"))
do_mellanox_setup();
+ if (of_machine_is_compatible("qualcomm,centriq2400-rep-bmc"))
+ do_centriq2400rep_setup();
}
static void __init aspeed_map_io(void)
--
2.9.3
Joel Stanley
maintainerQuoted 1 line · Chen.KenYY 陳永營 TAO
Should I remove the device hasn't the driver yet?
Yes please. If we don't have bindings to review against (documents inside Documentation/devicetree/bindings) then it's hard to know if the device tree is correct. Please remove any of the nodes that don't have bindings in the openbmc tree.
Quoted 8 lines
-----Original Message-----
From: Chen.KenYY 陳永營 TAO
Sent: Monday, February 05, 2018 11:04 AM
To: [email protected]
Cc: Chen.KenYY 陳永營 TAO; [email protected]
Subject: [PATCH linux dev-4.10 v2] ARM: dts: aspeed: Add ARM system BMC device tree
Can you please target your patch at the dev-4.13 branch?
Quoted 6 lines
Add centriq2400-rep dts and modify platform initial
Signed-off-by Ken Chen <[email protected]>--- .../boot/dts/aspeed-bmc-arm-centriq2400-rep.dts | 350 +++++++++++++++++++++
You have forgotten to add your device tree to the makefile at arch/arm/boot/dts/Makefile
Please look for the other aspeed .dtb rules down the bottom of the file.
Quoted 1 line
arch/arm/mach-aspeed/aspeed.c | 22 ++
Please include modifications to aspeed.c in a different patch.
Quoted 55 lines
2 files changed, 372 insertions(+) create mode 100644 arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dtsarch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +46
-0@@ -0,0 +1,350 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +#include "aspeed-g5.dtsi" +#include <dt-bindings/gpio/aspeed-gpio.h> + +/ { + model = "Qualcomm Centriq 2400 REP AST2520"; + compatible = "qualcomm,centriq2400-rep-bmc", "aspeed,ast2500"; + + chosen { + stdout-path = &uart5; + bootargs = "console=ttyS4,115200 earlyprintk"; + }; + + memory { + reg = <0x80000000 0x40000000>; + }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, + <&adc 4>, <&adc 5>, <&adc 6>, <&adc 8>; + }; + + iio-hwmon-battery { + compatible = "iio-hwmon"; + io-channels = <&adc 7>; + }; + + leds { + compatible = "gpio-leds"; + + uid_led { + label = "UID_LED"; + gpios = <&gpio ASPEED_GPIO(Q, 5) GPIO_ACTIVE_LOW>; + }; + + ras_error_led { + label = "RAS_ERROR_LED"; + gpios = <&gpio ASPEED_GPIO(F, 6) GPIO_ACTIVE_LOW>; + }; + + system_fault { + label = "System_fault"; + gpios = <&gpio ASPEED_GPIO(A, 1) GPIO_ACTIVE_LOW>;
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 56
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +10
-0+ }; + }; +}; + +&fmc { + status = "okay"; + flash@0 { + status = "okay"; + m25p,fast-read; + lable = "bmc";
typo: label.
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 67
Quoted 11 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +11
-0+#include "openbmc-flash-layout.dtsi" + }; +}; + +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + flash@0 { + reg = < 0 >; /* chip select number */ + compatible = "jedec,spi-nor";
You do not need these two properties, as they are inherited from those in aspeed-g5.dtsi. Remove these two lines please.
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 77
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +10
-0+ status = "okay"; + }; +}; + +&spi2 { + compatible = "aspeed,ast2500-spi-generic"; + reg = <0x1e631000 0xc4 0x38000000 0x02000000>; + interrupts = <59>; + #address-cells = <1>; + #size-cells = <0>;
This looks to be a custom driver, As discussed above, please do not include this until we have merged the device tree bindings and driver.
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +9
-0+ status = "okay"; + spi2@0 { + reg = < 0 >; + compatible = "centriq,centriq2400-spi-hwmon"; + spi-max-frequency = <16000000>; + status = "okay"; + }; +}; +
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 96
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +10
-0+&uart3 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd3_default + &pinctrl_rxd3_default>; + current-speed = <115200>; +}; + +&lpc_ctrl {
Do you use /dev/aspeed-lpc-ctrl from userspace in your system? If not, you do not want to enable the lpc_ctrl node.
Quoted 4 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +4
-0+ status = "okay"; + memory-region = <&flash_memory>; + flash = <&spi1>; +};
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 110
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +10
-0+ +&uart5 { + status = "okay"; +}; + +&mac0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>; };
The closing } should be on the next line.
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 118
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +8
-0+ +&i2c0 { + status = "okay"; + + pca9542@70 { + compatible = "pca9542"; + reg = <0x70>; + i2c@0 {
Your whitespace is messed up here. Please use tabs to align the nodes.
Quoted 63 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +63
-0+ #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + pca9546@77 { + compatible = "pca9546"; + reg = <0x77>; + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + eeprom@52 { + compatible = "atmel,24c02"; + reg = <0x52>; + }; + }; + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + eeprom@57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + }; + }; + }; + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + pca9546@77 { + compatible = "pca9546"; + reg = <0x77>; + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + eeprom@57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + }; + }; + }; + + }; +}; + +&i2c1 { + status = "okay"; + + tmp421@1e { + compatible = "ti,tmp421"; + reg = <0x1e>; + }; + tmp421@2a { + compatible = "ti,tmp421"; + reg = <0x2a>; + }; + tmp421@4e { + compatible = "ti,tmp421"; + reg = <0x4e>; + };
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 191
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +10
-0+ tmp421@1c { + compatible = "ti,tmp421"; + reg = <0x1c>; + }; +}; + +&i2c2 { + status = "okay"; + ssif { + compatible = "ssif-smbus-slave";
Remove this node until we have reviewed the bindings.
Quoted 101 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +101
-0+ reg = <0x42>; + }; + +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; +}; + +&i2c5 { + status = "okay"; + + ir38163@42 { + compatible = "ir38163"; + reg = <0x42>; + }; + ir38163@44 { + compatible = "ir38163"; + reg = <0x44>; + }; + ir38163@46 { + compatible = "ir38163"; + reg = <0x46>; + }; + ir38163@48 { + compatible = "ir38163"; + reg = <0x48>; + }; + pxm1310@02 { + compatible = "pxm1310"; + reg = <0x02>; + }; + pxm1310@04 { + compatible = "pxm1310"; + reg = <0x04>; + }; +}; + +&i2c6 { + status = "okay"; + + tmp421@1d { + compatible = "ti,tmp421"; + reg = <0x1d>; + }; + tmp421@1f { + compatible = "ti,tmp421"; + reg = <0x1f>; + }; + tmp421@4d { + compatible = "ti,tmp421"; + reg = <0x4d>; + }; + tmp421@4f { + compatible = "ti,tmp421"; + reg = <0x4f>; + }; + nvt210@4c { + compatible = "nvt210"; + reg = <0x4c>; + }; + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + pagesize = <128>; + }; +}; + +&i2c7 { + status = "okay"; + + adm1278@10 { + compatible = "adi,adm1278"; + reg = <0x10>; + Rsense = <250>; + }; + adm1278@11 { + compatible = "adi,adm1278"; + reg = <0x11>; + Rsense = <250>; + }; +}; + +&i2c8 { + status = "okay"; + + pca9641@70 { + compatible = "nxp,pca9641"; + reg = <0x70>; + #address-cells = <1>; + #size-cells = <0>; + i2c-arb{ + tmp421@1d { + compatible = "tmp421"; + reg = <0x1d>; + }; + adm1278@12 {
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 302
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +10
-0+ compatible = "adi,adm1278"; + reg = <0x12>; + Rsense = <500>; + }; + max31790@20 { + compatible = "max31790"; + reg = <0x20>; + #address-cells = <1>; + #size-cells = <0>; + fan-mode = "pwm";
Whitespace problems here too.
Quoted 92 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +47
-0+ fanconfig1 = <0x08>; + fanconfig2 = <0x09>; + fanconfig3 = <0x08>; + fanconfig4 = <0x08>; + fanconfig5 = <0x09>; + fanconfig6 = <0x08>; + }; + max31790@23 { + compatible = "max31790"; + reg = <0x23>; + #address-cells = <2>; + #size-cells = <0>; + fan-mode = "pwm"; + fanconfig1 = <0x08>; + fanconfig2 = <0x09>; + fanconfig3 = <0x08>; + fanconfig4 = <0x08>; + fanconfig5 = <0x09>; + fanconfig6 = <0x08>; + }; + eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + }; + ds1100@58 { + compatible = "ds1100"; + reg = <0x58>; + }; + }; + }; +}; + +&i2c9 { + status = "okay"; +}; + +&vuart { + status = "okay"; +}; + +&gfx { + status = "okay"; +}; + +&pinctrl { + aspeed,external-nodes = <&gfx &lhc>; +};arch/arm/mach-aspeed/aspeed.c +20
-1@@ -29,6 +29,7 @@#define AST_BASE_MAC0 0X1E660000/* MAC 1 */ #define AST_BASE_SCU 0x1E6E2000/* System Control Unit (SCU) */ #define AST_BASE_GPIO 0x1E780000/* GPIO Controller */ +#define AST_BASE_WDT 0x1E785000/* Watchdog Timer */ static struct map_desc aspeed_io_desc[]__initdata __maybe_unused = { {@@ -232,6 +233,25 @@ static void __init do_mellanox_setup(void)writel (reg,AST_IO (AST_BASE_SCU |0x48 )); } + +static void __init do_centriq2400rep_setup (void ) { +u32 reg; + +do_common_setup (); +writel (0x00000010 ,AST_IO (AST_BASE_WDT |0x2c )); + +writel (0xff000000 ,AST_IO (AST_BASE_SCU |0x88 )); + +/* Set GPIOC7 to output high to init host spi driver */ + reg =readl (AST_IO (AST_BASE_GPIO |0x04 )) |BIT (23 ); +writel (reg,AST_IO (AST_BASE_GPIO |0x04 )); + + reg =readl (AST_IO (AST_BASE_GPIO )) |BIT (23 ); +writel (reg,AST_IO (AST_BASE_GPIO )); } + +#define SCU_PASSWORD 0x1688A8A8 static void __init aspeed_init_early(void) @@ -284,6 +304,8 @@ static void __init aspeed_init_early(void) do_lanyang_setup();if (of_machine_is_compatible ("mellanox,msn-bmc" ))do_mellanox_setup (); +if (of_machine_is_compatible ("qualcomm,centriq2400-rep-bmc" )) +do_centriq2400rep_setup (); }static void __init aspeed_map_io (void ) --2.9.3
2018-02-06 13:46 GMT+08:00 Joel Stanley <[email protected]>:
Quoted 9 lines
Quoted 1 line · Chen.KenYY 陳永營 TAO
Should I remove the device hasn't the driver yet?
Yes please. If we don't have bindings to review against (documents inside
Documentation/devicetree/bindings) then it's hard to know if the device tree is correct. Please remove any of the nodes that don't have bindings in the openbmc tree.
OK, it will be changed.
Quoted 11 lines
Quoted 9 lines
-----Original Message-----
From: Chen.KenYY 陳永營 TAO
Sent: Monday, February 05, 2018 11:04 AM
To: [email protected]
Cc: Chen.KenYY 陳永營 TAO; [email protected]
Subject: [PATCH linux dev-4.10 v2] ARM: dts: aspeed: Add ARM system BMC device treeCan you please target your patch at the dev-4.13 branch?
OK
Quoted 4 lines
Quoted 4 lines
Add centriq2400-rep dts and modify platform initial
Quoted 8 lines
Quoted 3 lines
Signed-off-by Ken Chen <[email protected]>--- .../boot/dts/aspeed-bmc-arm-centriq2400-rep.dts | 350 +++++++++++++++++++++You have forgotten to add your device tree to the makefile at
arch/arm/boot/dts/MakefilePlease look for the other aspeed .dtb rules down the bottom of the file.
OK
Quoted 4 lines
Quoted 2 lines
arch/arm/mach-aspeed/aspeed.c | 22 ++Please include modifications to
aspeed.cin a different patch.
Do you mean the next version patch or I need to separate this code and Makefile with another patch?
Quoted 60 lines
Quoted 60 lines
2 files changed, 372 insertions(+) create mode 100644 arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dtsarch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +50
-0@@ -0,0 +1,350 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +#include "aspeed-g5.dtsi" +#include <dt-bindings/gpio/aspeed-gpio.h> + +/ { + model = "Qualcomm Centriq 2400 REP AST2520"; + compatible = "qualcomm,centriq2400-rep-bmc", "aspeed,ast2500"; + + chosen { + stdout-path = &uart5; + bootargs = "console=ttyS4,115200 earlyprintk"; + }; + + memory { + reg = <0x80000000 0x40000000>; + }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, + <&adc 4>, <&adc 5>, <&adc 6>, <&adc 8>; + }; + + iio-hwmon-battery { + compatible = "iio-hwmon"; + io-channels = <&adc 7>; + }; + + leds { + compatible = "gpio-leds"; + + uid_led { + label = "UID_LED"; + gpios = <&gpio ASPEED_GPIO(Q, 5) GPIO_ACTIVE_LOW>; + }; + + ras_error_led { + label = "RAS_ERROR_LED"; + gpios = <&gpio ASPEED_GPIO(F, 6) GPIO_ACTIVE_LOW>; + }; + + system_fault { + label = "System_fault"; + gpios = <&gpio ASPEED_GPIO(A, 1) GPIO_ACTIVE_LOW>; + }; + }; +}; +
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 56
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +6
-0+&fmc { + status = "okay"; + flash@0 { + status = "okay"; + m25p,fast-read; + lable = "bmc";typo: label.
OK
Quoted 15 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 67
Quoted 12 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +11
-0+#include "openbmc-flash-layout.dtsi" + }; +}; + +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + flash@0 { + reg = < 0 >; /* chip select number */ + compatible = "jedec,spi-nor";You do not need these two properties, as they are inherited from those in
aspeed-g5.dtsi. Remove these two lines please.
OK
Quoted 14 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 77
Quoted 11 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +10
-0+ status = "okay"; + }; +}; + +&spi2 { + compatible = "aspeed,ast2500-spi-generic"; + reg = <0x1e631000 0xc4 0x38000000 0x02000000>; + interrupts = <59>; + #address-cells = <1>; + #size-cells = <0>;This looks to be a custom driver, As discussed above, please do not include this until we have merged the device tree bindings and driver.
OK
Quoted 15 lines
Quoted 15 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +14
-0+ status = "okay"; + spi2@0 { + reg = < 0 >; + compatible = "centriq,centriq2400-spi-hwmon"; + spi-max-frequency = <16000000>; + status = "okay"; + }; +}; + +&uart3 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd3_default
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 96
Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +5
-0+ &pinctrl_rxd3_default>; + current-speed = <115200>; +}; + +&lpc_ctrl {Do you use
/dev/aspeed-lpc-ctrlfrom userspace in your system? If not, you do not want to enable thelpc_ctrlnode.
OK
Quoted 17 lines
Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +4
-0+ status = "okay"; + memory-region = <&flash_memory>; + flash = <&spi1>; +};arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 110
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +10
-0+ +&uart5 { + status = "okay"; +}; + +&mac0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>; };The closing } should be on the next line.
OK
Quoted 11 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 118
Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +8
-0+ +&i2c0 { + status = "okay"; + + pca9542@70 { + compatible = "pca9542"; + reg = <0x70>; + i2c@0 {Your whitespace is messed up here. Please use tabs to align the nodes.
OK
Quoted 68 lines
Quoted 68 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +67
-0+ #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + pca9546@77 { + compatible = "pca9546"; + reg = <0x77>; + i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + eeprom@52 { + compatible = "atmel,24c02"; + reg = <0x52>; + }; + }; + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + eeprom@57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + }; + }; + }; + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + pca9546@77 { + compatible = "pca9546"; + reg = <0x77>; + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + eeprom@57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + }; + }; + }; + + }; +}; + +&i2c1 { + status = "okay"; + + tmp421@1e { + compatible = "ti,tmp421"; + reg = <0x1e>; + }; + tmp421@2a { + compatible = "ti,tmp421"; + reg = <0x2a>; + }; + tmp421@4e { + compatible = "ti,tmp421"; + reg = <0x4e>; + }; + tmp421@1c { + compatible = "ti,tmp421"; + reg = <0x1c>; + };
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 191
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +6
-0+}; + +&i2c2 { + status = "okay"; + ssif { + compatible = "ssif-smbus-slave";Remove this node until we have reviewed the bindings.
OK
Quoted 106 lines
Quoted 106 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +105
-0+ reg = <0x42>; + }; + +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; +}; + +&i2c5 { + status = "okay"; + + ir38163@42 { + compatible = "ir38163"; + reg = <0x42>; + }; + ir38163@44 { + compatible = "ir38163"; + reg = <0x44>; + }; + ir38163@46 { + compatible = "ir38163"; + reg = <0x46>; + }; + ir38163@48 { + compatible = "ir38163"; + reg = <0x48>; + }; + pxm1310@02 { + compatible = "pxm1310"; + reg = <0x02>; + }; + pxm1310@04 { + compatible = "pxm1310"; + reg = <0x04>; + }; +}; + +&i2c6 { + status = "okay"; + + tmp421@1d { + compatible = "ti,tmp421"; + reg = <0x1d>; + }; + tmp421@1f { + compatible = "ti,tmp421"; + reg = <0x1f>; + }; + tmp421@4d { + compatible = "ti,tmp421"; + reg = <0x4d>; + }; + tmp421@4f { + compatible = "ti,tmp421"; + reg = <0x4f>; + }; + nvt210@4c { + compatible = "nvt210"; + reg = <0x4c>; + }; + eeprom@50 { + compatible = "atmel,24c128"; + reg = <0x50>; + pagesize = <128>; + }; +}; + +&i2c7 { + status = "okay"; + + adm1278@10 { + compatible = "adi,adm1278"; + reg = <0x10>; + Rsense = <250>; + }; + adm1278@11 { + compatible = "adi,adm1278"; + reg = <0x11>; + Rsense = <250>; + }; +}; + +&i2c8 { + status = "okay"; + + pca9641@70 { + compatible = "nxp,pca9641"; + reg = <0x70>; + #address-cells = <1>; + #size-cells = <0>; + i2c-arb{ + tmp421@1d { + compatible = "tmp421"; + reg = <0x1d>; + }; + adm1278@12 { + compatible = "adi,adm1278"; + reg = <0x12>; + Rsense = <500>; + };
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts line 302
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +6
-0+ max31790@20 { + compatible = "max31790"; + reg = <0x20>; + #address-cells = <1>; + #size-cells = <0>; + fan-mode = "pwm";Whitespace problems here too.
OK
Quoted 93 lines
Quoted 93 lines
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts new file +47
-0+ fanconfig1 = <0x08>; + fanconfig2 = <0x09>; + fanconfig3 = <0x08>; + fanconfig4 = <0x08>; + fanconfig5 = <0x09>; + fanconfig6 = <0x08>; + }; + max31790@23 { + compatible = "max31790"; + reg = <0x23>; + #address-cells = <2>; + #size-cells = <0>; + fan-mode = "pwm"; + fanconfig1 = <0x08>; + fanconfig2 = <0x09>; + fanconfig3 = <0x08>; + fanconfig4 = <0x08>; + fanconfig5 = <0x09>; + fanconfig6 = <0x08>; + }; + eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + }; + ds1100@58 { + compatible = "ds1100"; + reg = <0x58>; + }; + }; + }; +}; + +&i2c9 { + status = "okay"; +}; + +&vuart { + status = "okay"; +}; + +&gfx { + status = "okay"; +}; + +&pinctrl { + aspeed,external-nodes = <&gfx &lhc>; +};arch/arm/mach-aspeed/aspeed.c +20
-1@@ -29,6 +29,7 @@#define AST_BASE_MAC0 0X1E660000/* MAC 1 */ #define AST_BASE_SCU 0x1E6E2000/* System Control Unit (SCU) */ #define AST_BASE_GPIO 0x1E780000/* GPIO Controller */ +#define AST_BASE_WDT 0x1E785000/* Watchdog Timer */ static struct map_desc aspeed_io_desc[]__initdata __maybe_unused = { {@@ -232,6 +233,25 @@ static void __init do_mellanox_setup(void)writel (reg,AST_IO (AST_BASE_SCU |0x48 )); } + +static void __init do_centriq2400rep_setup (void ) { +u32 reg; + +do_common_setup (); +writel (0x00000010 ,AST_IO (AST_BASE_WDT |0x2c )); + +writel (0xff000000 ,AST_IO (AST_BASE_SCU |0x88 )); + +/* Set GPIOC7 to output high to init host spi driver */ + reg =readl (AST_IO (AST_BASE_GPIO |0x04 )) |BIT (23 ); +writel (reg,AST_IO (AST_BASE_GPIO |0x04 )); + + reg =readl (AST_IO (AST_BASE_GPIO )) |BIT (23 ); +writel (reg,AST_IO (AST_BASE_GPIO )); } + +#define SCU_PASSWORD 0x1688A8A8 static void __init aspeed_init_early(void) @@ -284,6 +304,8 @@ static void __init aspeed_init_early(void) do_lanyang_setup();if (of_machine_is_compatible ("mellanox,msn-bmc" ))do_mellanox_setup (); +if (of_machine_is_compatible ("qualcomm,centriq2400-rep-bmc" )) +do_centriq2400rep_setup (); }static void __init aspeed_map_io (void ) --2.9.3