ARM: dts: aspeed: Add KCS & lpc ctrl for Facebook
Subsystems (2)
PATCH v4 1/2 ARM: dts: aspeed: Add KCS & lpc ctrl for Facebook
Added kcs device and lpc ctrl device to enable LPC clock in Facebook Tiogapass device tree.
--- .../dts/aspeed-bmc-facebook-tiogapass.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts +30 -0
@@ -21,6 +21,18 @@ memory at 80000000 { reg = <0x80000000 0x20000000>; }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + flash_memory: region at 98000000 { + no-map; + reg = <0x98000000 0x04000000>; /* 64M */ + }; + }; + iio-hwmon { compatible = "iio-hwmon"; oemname0 = "MB_P3V3";
@@ -62,6 +74,12 @@ }; }; +&lpc_ctrl { + status = "okay"; + memory-region = <&flash_memory>; + flash = <&spi1>; +}; + &uart1 { // Host Console status = "okay";
@@ -75,6 +93,18 @@ status = "okay"; }; +&kcs2 { + // BMC KCS channel 2 + status = "okay"; + kcs_addr = <0xca8>; +}; + +&kcs3 { + // BMC KCS channel 3 + status = "okay"; + kcs_addr = <0xca2>; +}; + &mac0 { status = "okay";
Signature · 1 line
2.17.1
PATCH v4 2/2 ARM: dts: aspeed: Add KCS support for LPC BMC
Added kcs device support for lpc BMC.
--- arch/arm/boot/dts/aspeed-g5.dtsi | 33 +++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-)
arch/arm/boot/dts/aspeed-g5.dtsi +32 -1
@@ -330,8 +330,32 @@ ranges = <0x0 0x1e789000 0x1000>; lpc_bmc: lpc-bmc at 0 { - compatible = "aspeed,ast2500-lpc-bmc"; + compatible = "aspeed,ast2500-lpc-bmc", "simple-mfd", "syscon"; reg = <0x0 0x80>; + reg-io-width = <4>; + + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x0 0x80>; + + kcs1: kcs1 at 0 { + compatible = "aspeed,ast2500-kcs-bmc"; + interrupts = <8>; + kcs_chan = <1>; + status = "disabled"; + }; + kcs2: kcs2 at 0 { + compatible = "aspeed,ast2500-kcs-bmc"; + interrupts = <8>; + kcs_chan = <2>; + status = "disabled"; + }; + kcs3: kcs3 at 0 { + compatible = "aspeed,ast2500-kcs-bmc"; + interrupts = <8>; + kcs_chan = <3>; + status = "disabled"; + }; }; lpc_host: lpc-host at 80 {
@@ -343,6 +367,13 @@ #size-cells = <1>; ranges = <0x0 0x80 0x1e0>; + kcs4: kcs4 at 0 { + compatible = "aspeed,ast2500-kcs-bmc"; + interrupts = <8>; + kcs_chan = <4>; + status = "disabled"; + }; + lpc_ctrl: lpc-ctrl at 0 { compatible = "aspeed,ast2500-lpc-ctrl"; reg = <0x0 0x80>;
Signature · 1 line
2.17.1
Joel Stanley
maintainerQuoted 3 lines · Vijay Khemka
Added kcs device and lpc ctrl device to enable LPC clock in Facebook Tiogapass device tree.
As we're going to re-spin, it's a good idea to have the KCS and LPC changes in separate patches. I will take the KCS one straight away, but the LPC one might need more work (see my comments below).
Quoted 14 lines
Signed-off-by Vijay Khemka <[email protected]>--- .../dts/aspeed-bmc-facebook-tiogapass.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts +0
-0@@ -21,6 +21,18 @@ memory at 80000000 { reg = <0x80000000 0x20000000>; };
arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts line 33
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts +10
-0+ + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + flash_memory: region at 98000000 { + no-map; + reg = <0x98000000 0x04000000>; /* 64M */ + };
Are you using this to expose some RAM over LPC? If not, we don't want this here.
It is a flaw in the design of the driver that the reserved memory region is required. We should change the driver to make it optional.
As a workaround, we could add this patch to the tiogapass device tree but make it smaller so you're not losing 64MB of RAM.
Quoted 40 lines
arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts +20
-1+ }; + iio-hwmon { compatible = "iio-hwmon"; oemname0 = "MB_P3V3";@@ -62,6 +74,12 @@ }; }; +&lpc_ctrl { + status = "okay"; + memory-region = <&flash_memory>; + flash = <&spi1>; +}; + &uart1 { // Host Console status = "okay";@@ -75,6 +93,18 @@ status = "okay"; }; +&kcs2 { + // BMC KCS channel 2 + status = "okay"; + kcs_addr = <0xca8>; +}; + +&kcs3 { + // BMC KCS channel 3 + status = "okay"; + kcs_addr = <0xca2>; +}; + &mac0 { status = "okay"; --2.17.1
?On 12/12/18, 5:04 PM, "Joel Stanley" <[email protected]> wrote:
On Thu, 13 Dec 2018 at 07:34, Vijay Khemka <[email protected]> wrote:
>
> Added kcs device and lpc ctrl device to enable LPC clock in Facebook > Tiogapass device tree.
As we're going to re-spin, it's a good idea to have the KCS and LPC changes in separate patches. I will take the KCS one straight away, but the LPC one might need more work (see my comments below).
Thanks Joel,
I will create different patches and resubmit again.
Quoted 14 lines
Signed-off-by Vijay Khemka <[email protected]>--- .../dts/aspeed-bmc-facebook-tiogapass.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts +0
-0@@ -21,6 +21,18 @@ memory at 80000000 { reg = <0x80000000 0x20000000>; };
arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts line 33
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts +10
-0+ + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + flash_memory: region at 98000000 { + no-map; + reg = <0x98000000 0x04000000>; /* 64M */ + };
Are you using this to expose some RAM over LPC? If not, we don't want this here.
No, we are not using currently.
It is a flaw in the design of the driver that the reserved memory region is required. We should change the driver to make it optional.
I agree with you we should make this change in driver.
As a workaround, we could add this patch to the tiogapass device tree but make it smaller so you're not losing 64MB of RAM.
I will make it to 4K.
Quoted 40 lines
arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts +20
-1+ }; + iio-hwmon { compatible = "iio-hwmon"; oemname0 = "MB_P3V3";@@ -62,6 +74,12 @@ }; }; +&lpc_ctrl { + status = "okay"; + memory-region = <&flash_memory>; + flash = <&spi1>; +}; + &uart1 { // Host Console status = "okay";@@ -75,6 +93,18 @@ status = "okay"; }; +&kcs2 { + // BMC KCS channel 2 + status = "okay"; + kcs_addr = <0xca8>; +}; + +&kcs3 { + // BMC KCS channel 3 + status = "okay"; + kcs_addr = <0xca2>; +}; + &mac0 { status = "okay"; --2.17.1