diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-02-27 17:39:49 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2015-02-27 17:39:49 +0000 |
commit | eea227c60d593c2fe5692365936703bbebdbd1ad (patch) | |
tree | 75ffdc0a1a19758e3c30b241e7aef13f7ab25ecd /target/linux/brcm63xx/dts | |
parent | 1efb7398e1ae9e967a9b0b1a73edb034b10ee5fc (diff) | |
download | mtk-20170518-eea227c60d593c2fe5692365936703bbebdbd1ad.zip mtk-20170518-eea227c60d593c2fe5692365936703bbebdbd1ad.tar.gz mtk-20170518-eea227c60d593c2fe5692365936703bbebdbd1ad.tar.bz2 |
brcm63xx: probe gpio controllers through DT
Add a generic mmio gpio controller based driver and probe it
through device tree.
Use aliases for base calculation until we converted all users to
device tree or named gpios.
Convert bcm63xx_enet's ephy-reset gpio to use a named gpio.
While at it, remove the duplicate reset gpio defintion for livebox.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 44565
Diffstat (limited to 'target/linux/brcm63xx/dts')
-rw-r--r-- | target/linux/brcm63xx/dts/bcm3368.dtsi | 20 | ||||
-rw-r--r-- | target/linux/brcm63xx/dts/bcm6318.dtsi | 23 | ||||
-rw-r--r-- | target/linux/brcm63xx/dts/bcm63268.dtsi | 23 | ||||
-rw-r--r-- | target/linux/brcm63xx/dts/bcm6328.dtsi | 12 | ||||
-rw-r--r-- | target/linux/brcm63xx/dts/bcm6338.dtsi | 11 | ||||
-rw-r--r-- | target/linux/brcm63xx/dts/bcm6345.dtsi | 11 | ||||
-rw-r--r-- | target/linux/brcm63xx/dts/bcm6348.dtsi | 20 | ||||
-rw-r--r-- | target/linux/brcm63xx/dts/bcm6358.dtsi | 20 | ||||
-rw-r--r-- | target/linux/brcm63xx/dts/bcm6362.dtsi | 23 | ||||
-rw-r--r-- | target/linux/brcm63xx/dts/bcm6368.dtsi | 20 |
10 files changed, 183 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/dts/bcm3368.dtsi b/target/linux/brcm63xx/dts/bcm3368.dtsi index dba73b5..ebf3d1c 100644 --- a/target/linux/brcm63xx/dts/bcm3368.dtsi +++ b/target/linux/brcm63xx/dts/bcm3368.dtsi @@ -5,6 +5,8 @@ aliases { pflash = &pflash; + gpio0 = &gpio0; + gpio1 = &gpio1; }; cpus { @@ -71,5 +73,23 @@ interrupt-parent = <&periph_intc>; interrupts = <24>, <25>, <26>, <27>; }; + + gpio1: gpio-controller@fff8c080 { + compatible = "brcm,6345-gpio"; + reg = <0xfff8c080 4>, <0xfff8c088 4>; + + gpio-controller; + #gpio-cells = <2>; + + ngpios = <8>; + }; + + gpio0: gpio-controller@fff8c084 { + compatible = "brcm,6345-gpio"; + reg = <0xfff8c084 4>, <0xfff8c08c 4>; + + gpio-controller; + #gpio-cells = <2>; + }; }; }; diff --git a/target/linux/brcm63xx/dts/bcm6318.dtsi b/target/linux/brcm63xx/dts/bcm6318.dtsi index 97bdea7..f851a9c 100644 --- a/target/linux/brcm63xx/dts/bcm6318.dtsi +++ b/target/linux/brcm63xx/dts/bcm6318.dtsi @@ -3,6 +3,11 @@ #size-cells = <1>; compatible = "brcm,bcm6318"; + aliases { + gpio0 = &gpio0; + gpio1 = &gpio1; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -51,5 +56,23 @@ interrupt-parent = <&cpu_intc>; interrupts = <2>; }; + + gpio1: gpio-controller@10000080 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x10000080 4>, <0x10000088 4>; + + gpio-controller; + #gpio-cells = <2>; + + ngpios = <18>; + }; + + gpio0: gpio-controller@10000084 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x10000084 4>, <0x1000008c 4>; + + gpio-controller; + #gpio-cells = <2>; + }; }; }; diff --git a/target/linux/brcm63xx/dts/bcm63268.dtsi b/target/linux/brcm63xx/dts/bcm63268.dtsi index bc80d70..0a1f8b1 100644 --- a/target/linux/brcm63xx/dts/bcm63268.dtsi +++ b/target/linux/brcm63xx/dts/bcm63268.dtsi @@ -3,6 +3,11 @@ #size-cells = <1>; compatible = "brcm,bcm63268"; + aliases { + gpio0 = &gpio0; + gpio1 = &gpio1; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -58,5 +63,23 @@ interrupt-parent = <&cpu_intc>; interrupts = <2>, <3>; }; + + gpio1: gpio-controller@100000c0 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x100000c0 4>, <0x100000c8 4>; + + gpio-controller; + #gpio-cells = <2>; + + ngpios = <20>; + }; + + gpio0: gpio-controller@100000c4 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x100000c4 4>, <0x100000cc 4>; + + gpio-controller; + #gpio-cells = <2>; + }; }; }; diff --git a/target/linux/brcm63xx/dts/bcm6328.dtsi b/target/linux/brcm63xx/dts/bcm6328.dtsi index 53f96ff..a0b1316 100644 --- a/target/linux/brcm63xx/dts/bcm6328.dtsi +++ b/target/linux/brcm63xx/dts/bcm6328.dtsi @@ -3,6 +3,10 @@ #size-cells = <1>; compatible = "brcm,bcm6328"; + aliases { + gpio0 = &gpio0; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -51,5 +55,13 @@ interrupt-parent = <&cpu_intc>; interrupts = <2>; }; + + gpio0: gpio-controller@10000084 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x10000084 4>, <0x1000008c 4>; + + gpio-controller; + #gpio-cells = <2>; + }; }; }; diff --git a/target/linux/brcm63xx/dts/bcm6338.dtsi b/target/linux/brcm63xx/dts/bcm6338.dtsi index c1980f4..d578a5b 100644 --- a/target/linux/brcm63xx/dts/bcm6338.dtsi +++ b/target/linux/brcm63xx/dts/bcm6338.dtsi @@ -5,6 +5,7 @@ aliases { pflash = &pflash; + gpio0 = &gpio0; }; cpus { @@ -65,5 +66,15 @@ interrupt-parent = <&cpu_intc>; interrupts = <3>, <4>, <5>, <6>; }; + + gpio0: gpio-controller@fffe0404 { + compatible = "brcm,bcm6345-gpio"; + reg = <0xfffe0404 4>, <0xfffe040c 4>; + + gpio-controller; + #gpio-cells = <2>; + + ngpios = <8>; + }; }; }; diff --git a/target/linux/brcm63xx/dts/bcm6345.dtsi b/target/linux/brcm63xx/dts/bcm6345.dtsi index e8e7016..f702468 100644 --- a/target/linux/brcm63xx/dts/bcm6345.dtsi +++ b/target/linux/brcm63xx/dts/bcm6345.dtsi @@ -5,6 +5,7 @@ aliases { pflash = &pflash; + gpio0 = &gpio0; }; cpus { @@ -65,5 +66,15 @@ interrupt-parent = <&cpu_intc>; interrupts = <3>, <4>, <5>, <6>; }; + + gpio0: gpio-controller@fffe0404 { + compatible = "brcm,bcm6345-gpio"; + reg = <0xfffe0404 4>, <0xfffe0408 4>; + + gpio-controller; + #gpio-cells = <2>; + + ngpios = <16>; + }; }; }; diff --git a/target/linux/brcm63xx/dts/bcm6348.dtsi b/target/linux/brcm63xx/dts/bcm6348.dtsi index 7dd423b..a4d8d9f 100644 --- a/target/linux/brcm63xx/dts/bcm6348.dtsi +++ b/target/linux/brcm63xx/dts/bcm6348.dtsi @@ -5,6 +5,8 @@ aliases { pflash = &pflash; + gpio0 = &gpio0; + gpio1 = &gpio1; }; cpus { @@ -67,5 +69,23 @@ brcm,field-width = <5>; }; + + gpio1: gpio-controller@fffe0400 { + compatible = "brcm,bcm6345-gpio"; + reg = <0xfffe0400 4>, <0xfffe0408 4>; + + gpio-controller; + #gpio-cells = <2>; + + ngpios = <5>; + }; + + gpio0: gpio-controller@fffe0404 { + compatible = "brcm,bcm6345-gpio"; + reg = <0xfffe0404 4>, <0xfffe040c 4>; + + gpio-controller; + #gpio-cells = <2>; + }; }; }; diff --git a/target/linux/brcm63xx/dts/bcm6358.dtsi b/target/linux/brcm63xx/dts/bcm6358.dtsi index 7217b8d..bc3784a 100644 --- a/target/linux/brcm63xx/dts/bcm6358.dtsi +++ b/target/linux/brcm63xx/dts/bcm6358.dtsi @@ -5,6 +5,8 @@ aliases { pflash = &pflash; + gpio0 = &gpio0; + gpio1 = &gpio1; }; cpus { @@ -83,5 +85,23 @@ interrupt-parent = <&periph_intc>; interrupts = <20>, <21>; }; + + gpio1: gpio-controller@fffe0080 { + compatible = "brcm,bcm6345-gpio"; + reg = <0xfffe0080 4>, <0xfffe0088 4>; + + gpio-controller; + #gpio-cells = <2>; + + ngpios = <8>; + }; + + gpio0: gpio-controller@fffe0084 { + compatible = "brcm,bcm6345-gpio"; + reg = <0xfffe0084 4>, <0xfffe008c 4>; + + gpio-controller; + #gpio-cells = <2>; + }; }; }; diff --git a/target/linux/brcm63xx/dts/bcm6362.dtsi b/target/linux/brcm63xx/dts/bcm6362.dtsi index 4e2e41d..6604f5c 100644 --- a/target/linux/brcm63xx/dts/bcm6362.dtsi +++ b/target/linux/brcm63xx/dts/bcm6362.dtsi @@ -3,6 +3,11 @@ #size-cells = <1>; compatible = "brcm,bcm6362"; + aliases { + gpio0 = &gpio0; + gpio1 = &gpio1; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -58,5 +63,23 @@ interrupt-parent = <&cpu_intc>; interrupts = <2>, <3>; }; + + gpio1: gpio-controller@10000080 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x10000080 4>, <0x10000088 4>; + + gpio-controller; + #gpio-cells = <2>; + + ngpios = <16>; + }; + + gpio0: gpio-controller@10000084 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x10000084 4>, <0x1000008c 4>; + + gpio-controller; + #gpio-cells = <2>; + }; }; }; diff --git a/target/linux/brcm63xx/dts/bcm6368.dtsi b/target/linux/brcm63xx/dts/bcm6368.dtsi index 27b9f62..628c2d0 100644 --- a/target/linux/brcm63xx/dts/bcm6368.dtsi +++ b/target/linux/brcm63xx/dts/bcm6368.dtsi @@ -5,6 +5,8 @@ aliases { pflash = &pflash; + gpio0 = &gpio0; + gpio1 = &gpio1; }; cpus { @@ -73,6 +75,24 @@ interrupt-parent = <&cpu_intc>; interrupts = <2>, <3>; }; + + gpio1: gpio-controller@10000080 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x10000080 4>, <0x10000088 4>; + + gpio-controller; + #gpio-cells = <2>; + + ngpios = <6>; + }; + + gpio0: gpio-controller@10000084 { + compatible = "brcm,bcm6345-gpio"; + reg = <0x10000084 4>, <0x1000008c 4>; + + gpio-controller; + #gpio-cells = <2>; + }; }; pflash: nor@18000000 { |