File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
arch/riscv/boot/dts/spacemit Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 7
7
8
8
#define K1_PADCONF(pin, func) (((pin) << 16) | (func))
9
9
10
+ /* Map GPIO pin to each bank's <index, offset> */
11
+ #define K1_GPIO(x) (x / 32) (x % 32)
12
+
10
13
&pinctrl {
11
14
uart0_2_cfg: uart0-2-cfg {
12
15
uart0-2-pins {
Original file line number Diff line number Diff line change 465
465
status = "disabled";
466
466
};
467
467
468
+ gpio: gpio@d4019000 {
469
+ compatible = "spacemit,k1-gpio";
470
+ reg = <0x0 0xd4019000 0x0 0x100>;
471
+ clocks = <&syscon_apbc CLK_GPIO>,
472
+ <&syscon_apbc CLK_GPIO_BUS>;
473
+ clock-names = "core", "bus";
474
+ gpio-controller;
475
+ #gpio-cells = <3>;
476
+ interrupts = <58>;
477
+ interrupt-parent = <&plic>;
478
+ interrupt-controller;
479
+ #interrupt-cells = <3>;
480
+ gpio-ranges = <&pinctrl 0 0 0 32>,
481
+ <&pinctrl 1 0 32 32>,
482
+ <&pinctrl 2 0 64 32>,
483
+ <&pinctrl 3 0 96 32>;
484
+ };
485
+
468
486
pinctrl: pinctrl@d401e000 {
469
487
compatible = "spacemit,k1-pinctrl";
470
488
reg = <0x0 0xd401e000 0x0 0x400>;
You can’t perform that action at this time.
0 commit comments