]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: dts: ast2500: Add SGPIO to device tree
authorBilly Tsai <billy_tsai@aspeedtech.com>
Wed, 16 Oct 2024 08:59:54 +0000 (16:59 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 29 Oct 2024 18:12:04 +0000 (12:12 -0600)
Add SGPIO DTS node and enable it for AST2500 EVB.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
arch/arm/dts/ast2500-evb.dts
arch/arm/dts/ast2500.dtsi
drivers/pinctrl/aspeed/pinctrl_ast2500.c

index d481eadfeb0fd40ac43fd65b8d555b3e4c848850..9a5037deca2264fd48e7ae4bd2b2f695ed5a8150 100644 (file)
                 reg = <0x4d>;
         };
 };
+
+&sgpio {
+       status = "okay";
+       ngpios = <80>;
+};
index 320d2e5340a24a7b2beef5ae512765bef5d097d8..d677705fe85f094b79ee8ec9f13ad776e3d01368 100644 (file)
                                interrupt-controller;
                        };
 
+                       sgpio: sgpio@1e780200 {
+                               compatible = "aspeed,ast2500-sgpio";
+                               reg = <0x1e780200 0x100>;
+                               interrupts = <40>;
+                               clocks = <&scu ASPEED_CLK_APB>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               #interrupt-cells = <2>;
+                               interrupt-controller;
+                               bus-frequency = <1000000>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_sgpm_default>;
+                               status = "disabled";
+                       };
+
                        timer: timer@1e782000 {
                                /* This timer is a Faraday FTTMR010 derivative */
                                compatible = "aspeed,ast2400-timer";
                function = "WDTRST2";
                groups = "WDTRST2";
        };
+
+       pinctrl_sgpm_default: sgpm_default {
+               function = "SGPM";
+               groups = "SGPM";
+       };
 };
index 9e7c347caf895757db081a589ff01d4f308a45e0..5ecd3f262b92addbfe9e688cf71979c90face021 100644 (file)
@@ -62,6 +62,7 @@ static const struct ast2500_group_config ast2500_groups[] = {
        { "SD2", 5, (1 << 1) },
        { "FWSPICS1", 3, (1 << 24) },
        { "SPI1CS1", 1, (1 << 15) },
+       { "SGPM", 2, (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) },
 };
 
 static int ast2500_pinctrl_get_groups_count(struct udevice *dev)