Context |
Check |
Description |
bjorn/pre-ci_am |
success
|
Success
|
bjorn/build-rv32-defconfig |
success
|
build-rv32-defconfig
|
bjorn/build-rv64-clang-allmodconfig |
success
|
build-rv64-clang-allmodconfig
|
bjorn/build-rv64-gcc-allmodconfig |
success
|
build-rv64-gcc-allmodconfig
|
bjorn/build-rv64-nommu-k210-defconfig |
success
|
build-rv64-nommu-k210-defconfig
|
bjorn/build-rv64-nommu-k210-virt |
success
|
build-rv64-nommu-k210-virt
|
bjorn/checkpatch |
success
|
checkpatch
|
bjorn/dtb-warn-rv64 |
success
|
dtb-warn-rv64
|
bjorn/header-inline |
success
|
header-inline
|
bjorn/kdoc |
success
|
kdoc
|
bjorn/module-param |
success
|
module-param
|
bjorn/verify-fixes |
success
|
verify-fixes
|
bjorn/verify-signedoff |
success
|
verify-signedoff
|
@@ -7,6 +7,9 @@
#define K1_PADCONF(pin, func) (((pin) << 16) | (func))
+/* Map GPIO pin to each bank's <index, offset> */
+#define K1_GPIO(x) (x / 32) (x % 32)
+
&pinctrl {
uart0_2_cfg: uart0-2-cfg {
uart0-2-pins {
@@ -404,6 +404,21 @@ uart9: serial@d4017800 {
status = "disabled";
};
+ gpio: gpio@d4019000 {
+ compatible = "spacemit,k1-gpio";
+ reg = <0x0 0xd4019000 0x0 0x100>;
+ gpio-controller;
+ #gpio-cells = <3>;
+ interrupts = <58>;
+ interrupt-parent = <&plic>;
+ interrupt-controller;
+ #interrupt-cells = <3>;
+ gpio-ranges = <&pinctrl 0 0 32>,
+ <&pinctrl 0 32 32>,
+ <&pinctrl 0 64 32>,
+ <&pinctrl 0 96 32>;
+ };
+
pinctrl: pinctrl@d401e000 {
compatible = "spacemit,k1-pinctrl";
reg = <0x0 0xd401e000 0x0 0x400>;
Populate the GPIO node in the device tree for SpacemiT K1 SoC. Each of 32 pins will act as one bank and map pins to pinctrl controller. Signed-off-by: Yixun Lan <dlan@gentoo.org> --- arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 3 +++ arch/riscv/boot/dts/spacemit/k1.dtsi | 15 +++++++++++++++ 2 files changed, 18 insertions(+)