drivers: gpio: Add support for Apollo3 SoCs GPIO
This commit adds support for the GPIO which can be found in Apollo3 SoCs Signed-off-by: Hao Luo <hluo@ambiq.com>
This commit is contained in:
parent
faf6fd169c
commit
a64b069785
8 changed files with 438 additions and 21 deletions
|
@ -19,6 +19,51 @@
|
|||
|
||||
aliases {
|
||||
watchdog0 = &wdt0;
|
||||
led0 = &led0;
|
||||
led1 = &led1;
|
||||
led2 = &led2;
|
||||
sw0 = &button0;
|
||||
sw1 = &button1;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led0: led_0 {
|
||||
gpios = <&gpio0_31 10 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 0";
|
||||
};
|
||||
led1: led_1 {
|
||||
gpios = <&gpio0_31 30 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 1";
|
||||
};
|
||||
led2: led_2 {
|
||||
gpios = <&gpio0_31 15 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 2";
|
||||
};
|
||||
led3: led_3 {
|
||||
gpios = <&gpio0_31 14 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 3";
|
||||
};
|
||||
led4: led_4 {
|
||||
gpios = <&gpio0_31 17 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 4";
|
||||
};
|
||||
};
|
||||
|
||||
buttons {
|
||||
compatible = "gpio-keys";
|
||||
button0: button_0 {
|
||||
gpios = <&gpio0_31 16 GPIO_ACTIVE_LOW>;
|
||||
label = "BTN0";
|
||||
};
|
||||
button1: button_1 {
|
||||
gpios = <&gpio0_31 18 GPIO_ACTIVE_LOW>;
|
||||
label = "BTN1";
|
||||
};
|
||||
button2: button_2 {
|
||||
gpios = <&gpio0_31 19 GPIO_ACTIVE_LOW>;
|
||||
label = "BTN2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -45,3 +90,11 @@
|
|||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0_31 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio32_63 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -9,6 +9,7 @@ toolchain:
|
|||
- gnuarmemb
|
||||
supported:
|
||||
- uart
|
||||
- gpio
|
||||
testing:
|
||||
ignore_tags:
|
||||
- net
|
||||
|
|
|
@ -19,6 +19,51 @@
|
|||
|
||||
aliases {
|
||||
watchdog0 = &wdt0;
|
||||
led0 = &led0;
|
||||
led1 = &led1;
|
||||
led2 = &led2;
|
||||
sw0 = &button0;
|
||||
sw1 = &button1;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led0: led_0 {
|
||||
gpios = <&gpio0_31 10 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 0";
|
||||
};
|
||||
led1: led_1 {
|
||||
gpios = <&gpio0_31 30 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 1";
|
||||
};
|
||||
led2: led_2 {
|
||||
gpios = <&gpio0_31 15 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 2";
|
||||
};
|
||||
led3: led_3 {
|
||||
gpios = <&gpio0_31 14 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 3";
|
||||
};
|
||||
led4: led_4 {
|
||||
gpios = <&gpio0_31 17 GPIO_ACTIVE_LOW>;
|
||||
label = "LED 4";
|
||||
};
|
||||
};
|
||||
|
||||
buttons {
|
||||
compatible = "gpio-keys";
|
||||
button0: button_0 {
|
||||
gpios = <&gpio0_31 16 GPIO_ACTIVE_LOW>;
|
||||
label = "BTN0";
|
||||
};
|
||||
button1: button_1 {
|
||||
gpios = <&gpio0_31 18 GPIO_ACTIVE_LOW>;
|
||||
label = "BTN1";
|
||||
};
|
||||
button2: button_2 {
|
||||
gpios = <&gpio0_31 19 GPIO_ACTIVE_LOW>;
|
||||
label = "BTN2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -45,3 +90,15 @@
|
|||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0_31 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio32_63 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio64_95 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -9,6 +9,7 @@ toolchain:
|
|||
- gnuarmemb
|
||||
supported:
|
||||
- uart
|
||||
- gpio
|
||||
testing:
|
||||
ignore_tags:
|
||||
- net
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue