ARM: dts: Remove LPC BMC and Host partitions
authorChia-Wei, Wang <chiawei_wang@aspeedtech.com>
Fri, 19 Mar 2021 06:27:33 +0000 (16:57 +1030)
committerJoel Stanley <joel@jms.id.au>
Fri, 9 Apr 2021 04:09:20 +0000 (13:39 +0930)
The LPC controller has no concept of the BMC and the Host partitions.

A concrete instance is that the HICRB[5:4] are for the I/O port address
configurtaion of KCS channel 1/2. However, the KCS driver cannot access
HICRB for channel 1/2 initialization via syscon regmap interface due to
the parition boundary. (i.e. offset 80h)

In addition, for the HW design backward compatibility, a newly added HW
control bit could be located at any reserved one over the LPC addressing
space. Thereby, this patch removes the lpc-bmc and lpc-host child node
and thus the LPC partitioning.

Note that this change requires the synchronization between device tree
change and the driver change. To prevent the misuse of old devicetrees
with new drivers, or vice versa, the v2 compatible strings are adopted
for the LPC device as listed:

"aspeed,ast2400-lpc-v2"
"aspeed,ast2500-lpc-v2"
"aspeed,ast2600-lpc-v2"

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20210319062752.145730-2-andrew@aj.id.au
Signed-off-by: Joel Stanley <joel@jms.id.au>
arch/arm/boot/dts/aspeed-g4.dtsi
arch/arm/boot/dts/aspeed-g5.dtsi
arch/arm/boot/dts/aspeed-g6.dtsi

index e7a45ba18fc9c7e17887223ec3abbe2e79afb02e..c5aeb3cf3a0961b6760a0fd6d59e0e6705be33bd 100644 (file)
                        };
 
                        lpc: lpc@1e789000 {
-                               compatible = "aspeed,ast2400-lpc", "simple-mfd";
+                               compatible = "aspeed,ast2400-lpc-v2", "simple-mfd", "syscon";
                                reg = <0x1e789000 0x1000>;
+                               reg-io-width = <4>;
 
                                #address-cells = <1>;
                                #size-cells = <1>;
                                ranges = <0x0 0x1e789000 0x1000>;
 
-                               lpc_bmc: lpc-bmc@0 {
-                                       compatible = "aspeed,ast2400-lpc-bmc";
-                                       reg = <0x0 0x80>;
+                               lpc_ctrl: lpc-ctrl@80 {
+                                       compatible = "aspeed,ast2400-lpc-ctrl";
+                                       reg = <0x80 0x10>;
+                                       clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+                                       status = "disabled";
                                };
 
-                               lpc_host: lpc-host@80 {
-                                       compatible = "aspeed,ast2400-lpc-host", "simple-mfd", "syscon";
-                                       reg = <0x80 0x1e0>;
-                                       reg-io-width = <4>;
-
-                                       #address-cells = <1>;
-                                       #size-cells = <1>;
-                                       ranges = <0x0 0x80 0x1e0>;
-
-                                       lpc_ctrl: lpc-ctrl@0 {
-                                               compatible = "aspeed,ast2400-lpc-ctrl";
-                                               reg = <0x0 0x10>;
-                                               clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
-                                               status = "disabled";
-                                       };
-
-                                       lpc_snoop: lpc-snoop@10 {
-                                               compatible = "aspeed,ast2400-lpc-snoop";
-                                               reg = <0x10 0x8>;
-                                               interrupts = <8>;
-                                               clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
-                                               status = "disabled";
-                                       };
-
-                                       lhc: lhc@20 {
-                                               compatible = "aspeed,ast2400-lhc";
-                                               reg = <0x20 0x24 0x48 0x8>;
-                                       };
-
-                                       lpc_reset: reset-controller@18 {
-                                               compatible = "aspeed,ast2400-lpc-reset";
-                                               reg = <0x18 0x4>;
-                                               #reset-cells = <1>;
-                                       };
-
-                                       ibt: ibt@c0  {
-                                               compatible = "aspeed,ast2400-ibt-bmc";
-                                               reg = <0xc0 0x18>;
-                                               interrupts = <8>;
-                                               status = "disabled";
-                                       };
+                               lpc_snoop: lpc-snoop@90 {
+                                       compatible = "aspeed,ast2400-lpc-snoop";
+                                       reg = <0x90 0x8>;
+                                       interrupts = <8>;
+                                       clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+                                       status = "disabled";
+                               };
+
+                               lhc: lhc@a0 {
+                                       compatible = "aspeed,ast2400-lhc";
+                                       reg = <0xa0 0x24 0xc8 0x8>;
+                               };
+
+                               lpc_reset: reset-controller@98 {
+                                       compatible = "aspeed,ast2400-lpc-reset";
+                                       reg = <0x98 0x4>;
+                                       #reset-cells = <1>;
+                               };
+
+                               ibt: ibt@140 {
+                                       compatible = "aspeed,ast2400-ibt-bmc";
+                                       reg = <0x140 0x18>;
+                                       interrupts = <8>;
+                                       status = "disabled";
                                };
                        };
 
index 21930521a986a7a4d13af15f14de483f12430729..d733c1f161c1b998ca98f20e072a63b3b5af6eb7 100644 (file)
                        };
 
                        lpc: lpc@1e789000 {
-                               compatible = "aspeed,ast2500-lpc", "simple-mfd";
+                               compatible = "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon";
                                reg = <0x1e789000 0x1000>;
+                               reg-io-width = <4>;
 
                                #address-cells = <1>;
                                #size-cells = <1>;
                                ranges = <0x0 0x1e789000 0x1000>;
 
-                               lpc_bmc: lpc-bmc@0 {
-                                       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: kcs@24 {
-                                               compatible = "aspeed,ast2500-kcs-bmc-v2";
-                                               reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>;
-                                               interrupts = <8>;
-                                               status = "disabled";
-                                       };
-                                       kcs2: kcs@28 {
-                                               compatible = "aspeed,ast2500-kcs-bmc-v2";
-                                               reg = <0x28 0x1>, <0x34 0x1>, <0x40 0x1>;
-                                               interrupts = <8>;
-                                               status = "disabled";
-                                       };
-                                       kcs3: kcs@2c {
-                                               compatible = "aspeed,ast2500-kcs-bmc-v2";
-                                               reg = <0x2c 0x1>, <0x38 0x1>, <0x44 0x1>;
-                                               interrupts = <8>;
-                                               status = "disabled";
-                                       };
+                               kcs1: kcs@24 {
+                                       compatible = "aspeed,ast2500-kcs-bmc-v2";
+                                       reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>;
+                                       interrupts = <8>;
+                                       status = "disabled";
+                               };
+
+                               kcs2: kcs@28 {
+                                       compatible = "aspeed,ast2500-kcs-bmc-v2";
+                                       reg = <0x28 0x1>, <0x34 0x1>, <0x40 0x1>;
+                                       interrupts = <8>;
+                                       status = "disabled";
+                               };
+
+                               kcs3: kcs@2c {
+                                       compatible = "aspeed,ast2500-kcs-bmc-v2";
+                                       reg = <0x2c 0x1>, <0x38 0x1>, <0x44 0x1>;
+                                       interrupts = <8>;
+                                       status = "disabled";
+                               };
+
+                               kcs4: kcs@114 {
+                                       compatible = "aspeed,ast2500-kcs-bmc-v2";
+                                       reg = <0x114 0x1>, <0x118 0x1>, <0x11c 0x1>;
+                                       interrupts = <8>;
+                                       status = "disabled";
                                };
 
-                               lpc_host: lpc-host@80 {
-                                       compatible = "aspeed,ast2500-lpc-host", "simple-mfd", "syscon";
-                                       reg = <0x80 0x1e0>;
-                                       reg-io-width = <4>;
-
-                                       #address-cells = <1>;
-                                       #size-cells = <1>;
-                                       ranges = <0x0 0x80 0x1e0>;
-
-                                       kcs4: kcs@94 {
-                                               compatible = "aspeed,ast2500-kcs-bmc-v2";
-                                               reg = <0x94 0x1>, <0x98 0x1>, <0x9c 0x1>;
-                                               interrupts = <8>;
-                                               status = "disabled";
-                                       };
-
-                                       lpc_ctrl: lpc-ctrl@0 {
-                                               compatible = "aspeed,ast2500-lpc-ctrl";
-                                               reg = <0x0 0x10>;
-                                               clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
-                                               status = "disabled";
-                                       };
-
-                                       lpc_snoop: lpc-snoop@10 {
-                                               compatible = "aspeed,ast2500-lpc-snoop";
-                                               reg = <0x10 0x8>;
-                                               interrupts = <8>;
-                                               clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
-                                               status = "disabled";
-                                       };
-
-                                       lpc_reset: reset-controller@18 {
-                                               compatible = "aspeed,ast2500-lpc-reset";
-                                               reg = <0x18 0x4>;
-                                               #reset-cells = <1>;
-                                       };
-
-                                       lhc: lhc@20 {
-                                               compatible = "aspeed,ast2500-lhc";
-                                               reg = <0x20 0x24 0x48 0x8>;
-                                       };
-
-
-                                       ibt: ibt@c0 {
-                                               compatible = "aspeed,ast2500-ibt-bmc";
-                                               reg = <0xc0 0x18>;
-                                               interrupts = <8>;
-                                               status = "disabled";
-                                       };
+                               lpc_ctrl: lpc-ctrl@80 {
+                                       compatible = "aspeed,ast2500-lpc-ctrl";
+                                       reg = <0x80 0x10>;
+                                       clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+                                       status = "disabled";
+                               };
+
+                               lpc_snoop: lpc-snoop@90 {
+                                       compatible = "aspeed,ast2500-lpc-snoop";
+                                       reg = <0x90 0x8>;
+                                       interrupts = <8>;
+                                       clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+                                       status = "disabled";
+                               };
+
+                               lpc_reset: reset-controller@98 {
+                                       compatible = "aspeed,ast2500-lpc-reset";
+                                       reg = <0x98 0x4>;
+                                       #reset-cells = <1>;
+                               };
+
+                               lhc: lhc@a0 {
+                                       compatible = "aspeed,ast2500-lhc";
+                                       reg = <0xa0 0x24 0xc8 0x8>;
+                               };
+
+
+                               ibt: ibt@140 {
+                                       compatible = "aspeed,ast2500-ibt-bmc";
+                                       reg = <0x140 0x18>;
+                                       interrupts = <8>;
+                                       status = "disabled";
                                };
                        };
 
index 3ee470c2b7b5625f06fa58b0a046075e6cf9fdf4..f96607b7b4e2a8ec0ed4f12affd7f91236782807 100644 (file)
                        };
 
                        lpc: lpc@1e789000 {
-                               compatible = "aspeed,ast2600-lpc", "simple-mfd";
+                               compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon";
                                reg = <0x1e789000 0x1000>;
+                               reg-io-width = <4>;
 
                                #address-cells = <1>;
                                #size-cells = <1>;
                                ranges = <0x0 0x1e789000 0x1000>;
 
-                               lpc_bmc: lpc-bmc@0 {
-                                       compatible = "aspeed,ast2600-lpc-bmc", "simple-mfd", "syscon";
-                                       reg = <0x0 0x80>;
-                                       reg-io-width = <4>;
-
-                                       #address-cells = <1>;
-                                       #size-cells = <1>;
-                                       ranges = <0x0 0x0 0x80>;
-
-                                       kcs1: kcs@24 {
-                                               compatible = "aspeed,ast2500-kcs-bmc-v2";
-                                               reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>;
-                                               interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
-                                               kcs_chan = <1>;
-                                               status = "disabled";
-                                       };
-                                       kcs2: kcs@28 {
-                                               compatible = "aspeed,ast2500-kcs-bmc-v2";
-                                               reg = <0x28 0x1>, <0x34 0x1>, <0x40 0x1>;
-                                               interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
-                                               status = "disabled";
-                                       };
-                                       kcs3: kcs@2c {
-                                               compatible = "aspeed,ast2500-kcs-bmc-v2";
-                                               reg = <0x2c 0x1>, <0x38 0x1>, <0x44 0x1>;
-                                               interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
-                                               status = "disabled";
-                                       };
+                               kcs1: kcs@24 {
+                                       compatible = "aspeed,ast2500-kcs-bmc-v2";
+                                       reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>;
+                                       interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+                                       kcs_chan = <1>;
+                                       status = "disabled";
+                               };
+
+                               kcs2: kcs@28 {
+                                       compatible = "aspeed,ast2500-kcs-bmc-v2";
+                                       reg = <0x28 0x1>, <0x34 0x1>, <0x40 0x1>;
+                                       interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
+                                       status = "disabled";
+                               };
+
+                               kcs3: kcs@2c {
+                                       compatible = "aspeed,ast2500-kcs-bmc-v2";
+                                       reg = <0x2c 0x1>, <0x38 0x1>, <0x44 0x1>;
+                                       interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
+                                       status = "disabled";
+                               };
+
+                               kcs4: kcs@114 {
+                                       compatible = "aspeed,ast2500-kcs-bmc-v2";
+                                       reg = <0x114 0x1>, <0x118 0x1>, <0x11c 0x1>;
+                                       interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
+                                       status = "disabled";
+                               };
+
+                               lpc_ctrl: lpc-ctrl@80 {
+                                       compatible = "aspeed,ast2600-lpc-ctrl";
+                                       reg = <0x80 0x80>;
+                                       clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+                                       status = "disabled";
+                               };
+
+                               lpc_snoop: lpc-snoop@80 {
+                                       compatible = "aspeed,ast2600-lpc-snoop";
+                                       reg = <0x80 0x80>;
+                                       interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
+                                       status = "disabled";
                                };
 
-                               lpc_host: lpc-host@80 {
-                                       compatible = "aspeed,ast2600-lpc-host", "simple-mfd", "syscon";
-                                       reg = <0x80 0x1e0>;
-                                       reg-io-width = <4>;
-
-                                       #address-cells = <1>;
-                                       #size-cells = <1>;
-                                       ranges = <0x0 0x80 0x1e0>;
-
-                                       kcs4: kcs@94 {
-                                               compatible = "aspeed,ast2500-kcs-bmc-v2";
-                                               reg = <0x94 0x1>, <0x98 0x1>, <0x9c 0x1>;
-                                               interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
-                                               status = "disabled";
-                                       };
-
-                                       lpc_ctrl: lpc-ctrl@0 {
-                                               compatible = "aspeed,ast2600-lpc-ctrl";
-                                               reg = <0x0 0x80>;
-                                               clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
-                                               status = "disabled";
-                                       };
-
-                                       lpc_snoop: lpc-snoop@0 {
-                                               compatible = "aspeed,ast2600-lpc-snoop";
-                                               reg = <0x0 0x80>;
-                                               interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
-                                               clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
-                                               status = "disabled";
-                                       };
-
-                                       lhc: lhc@20 {
-                                               compatible = "aspeed,ast2600-lhc";
-                                               reg = <0x20 0x24 0x48 0x8>;
-                                       };
-
-                                       lpc_reset: reset-controller@18 {
-                                               compatible = "aspeed,ast2600-lpc-reset";
-                                               reg = <0x18 0x4>;
-                                               #reset-cells = <1>;
-                                       };
-
-                                       ibt: ibt@c0 {
-                                               compatible = "aspeed,ast2600-ibt-bmc";
-                                               reg = <0xc0 0x18>;
-                                               interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
-                                               status = "disabled";
-                                       };
+                               lhc: lhc@a0 {
+                                       compatible = "aspeed,ast2600-lhc";
+                                       reg = <0xa0 0x24 0xc8 0x8>;
+                               };
+
+                               lpc_reset: reset-controller@98 {
+                                       compatible = "aspeed,ast2600-lpc-reset";
+                                       reg = <0x98 0x4>;
+                                       #reset-cells = <1>;
+                               };
+
+                               ibt: ibt@140 {
+                                       compatible = "aspeed,ast2600-ibt-bmc";
+                                       reg = <0x140 0x18>;
+                                       interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+                                       status = "disabled";
                                };
                        };