Skip to content

Commit

Permalink
update pinctrl
Browse files Browse the repository at this point in the history
Co-Authored-By: egokb <[email protected]>
  • Loading branch information
egokb and egokb committed Jul 24, 2024
1 parent 9ff18ba commit 301c124
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
12 changes: 8 additions & 4 deletions config/boards/arm/egokb_control/egokb_control.dts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "egokb_control_pinctrl.dtsi"
#include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/matrix_transform.h>

Expand Down Expand Up @@ -83,14 +84,17 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9

&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <30>;
scl-pin = <31>;
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};

&usbd {
Expand Down
39 changes: 39 additions & 0 deletions config/boards/arm/egokb_control/egokb_control_pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2022 The ZMK Contributors
* SPDX-License-Identifier: MIT
*/

&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up;
};
group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>;
};
};

uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable;
};
};

i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 30)>,
<NRF_PSEL(TWIM_SCL, 0, 31)>;
};
};

i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 30)>,
<NRF_PSEL(TWIM_SCL, 0, 31)>;
low-power-enable;
};
};
};

0 comments on commit 301c124

Please sign in to comment.