Skip to content

Commit 868f081

Browse files
committed
feat(boards)!: refactor common layouts
Removed the combined .dtsi file for each group of common layouts, and split the position map across the files in each group. This makes reading the position maps slightly more difficult, but it aligns the common layouts with the keyboard-specific ones such as foostan/corne.dtsi in that simply including each header adds the layout, with no need to set status = "okay".
1 parent 73ca365 commit 868f081

35 files changed

+318
-355
lines changed

app/boards/arm/bt60/bt60_v1.dts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
/dts-v1/;
88
#include "bt60.dtsi"
9-
#include <layouts/common/60percent/60percent.dtsi>
9+
#include <layouts/common/60percent/all1u.dtsi>
10+
#include <layouts/common/60percent/ansi.dtsi>
11+
#include <layouts/common/60percent/hhkb.dtsi>
12+
#include <layouts/common/60percent/iso.dtsi>
1013

1114

1215
/ {
@@ -102,21 +105,17 @@
102105
};
103106

104107
&layout_60_ansi {
105-
status = "okay";
106108
transform = <&ansi_transform>;
107109
};
108110

109111
&layout_60_iso {
110-
status = "okay";
111112
transform = <&iso_transform>;
112113
};
113114

114115
&layout_60_all1u {
115-
status = "okay";
116116
transform = <&all_1u_transform>;
117117
};
118118

119119
&layout_60_hhkb {
120-
status = "okay";
121120
transform = <&hhkb_transform>;
122121
};

app/boards/arm/ckp/bt60_v2.dts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
/dts-v1/;
88
#include "ckp.dtsi"
9-
#include <layouts/common/60percent/60percent.dtsi>
9+
#include <layouts/common/60percent/all1u.dtsi>
10+
#include <layouts/common/60percent/ansi.dtsi>
11+
#include <layouts/common/60percent/hhkb.dtsi>
12+
#include <layouts/common/60percent/iso.dtsi>
1013

1114

1215
/ {
@@ -72,21 +75,17 @@
7275
};
7376

7477
&layout_60_ansi {
75-
status = "okay";
7678
transform = <&ansi_transform>;
7779
};
7880

7981
&layout_60_iso {
80-
status = "okay";
8182
transform = <&iso_transform>;
8283
};
8384

8485
&layout_60_all1u {
85-
status = "okay";
8686
transform = <&all_1u_transform>;
8787
};
8888

8989
&layout_60_hhkb {
90-
status = "okay";
9190
transform = <&hhkb_transform>;
9291
};

app/boards/arm/ckp/bt65_v1.dts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
/dts-v1/;
88
#include "ckp.dtsi"
9-
#include <layouts/common/65percent/65percent.dtsi>
9+
#include <layouts/common/65percent/all1u.dtsi>
10+
#include <layouts/common/65percent/ansi.dtsi>
11+
#include <layouts/common/65percent/iso.dtsi>
12+
#include <layouts/common/65percent/hhkb.dtsi>
1013

1114

1215
/ {
@@ -72,21 +75,17 @@
7275
};
7376

7477
&layout_65_ansi {
75-
status = "okay";
7678
transform = <&ansi_transform>;
7779
};
7880

7981
&layout_65_iso {
80-
status = "okay";
8182
transform = <&iso_transform>;
8283
};
8384

8485
&layout_65_all1u {
85-
status = "okay";
8686
transform = <&all_1u_transform>;
8787
};
8888

8989
&layout_65_hhkb {
90-
status = "okay";
9190
transform = <&hhkb_transform>;
9291
};

app/boards/arm/ckp/bt75_v1.dts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
/dts-v1/;
88
#include "ckp.dtsi"
9-
#include <layouts/common/75percent/75percent.dtsi>
9+
#include <layouts/common/75percent/all1u.dtsi>
10+
#include <layouts/common/75percent/ansi.dtsi>
11+
#include <layouts/common/75percent/iso.dtsi>
1012

1113

1214
/ {
@@ -62,16 +64,13 @@
6264
};
6365

6466
&layout_75_ansi {
65-
status = "okay";
6667
transform = <&ansi_transform>;
6768
};
6869

6970
&layout_75_iso {
70-
status = "okay";
7171
transform = <&iso_transform>;
7272
};
7373

7474
&layout_75_all1u {
75-
status = "okay";
7675
transform = <&all_1u_transform>;
7776
};

app/boards/arm/planck/planck_rev6.dts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
#include <st/f3/stm32f303c(b-c)tx-pinctrl.dtsi>
1010
#include <dt-bindings/zmk/matrix_transform.h>
1111

12-
#include <layouts/common/ortho_4x12/ortho_4x12.dtsi>
12+
#include <layouts/common/ortho_4x12/1x2u.dtsi>
13+
#include <layouts/common/ortho_4x12/2x2u.dtsi>
14+
#include <layouts/common/ortho_4x12/all1u.dtsi>
1315

1416

1517
/ {
@@ -142,16 +144,13 @@ zephyr_udc0: &usb {
142144
};
143145

144146
&layout_ortho_4x12_all1u {
145-
status = "okay";
146147
transform = <&layout_grid_transform>;
147148
};
148149

149150
&layout_ortho_4x12_1x2u {
150-
status = "okay";
151151
transform = <&layout_mit_transform>;
152152
};
153153

154154
&layout_ortho_4x12_2x2u {
155-
status = "okay";
156155
transform = <&layout_2x2u_transform>;
157156
};

app/boards/arm/preonic/preonic_rev3.dts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
#include <st/f3/stm32f303c(b-c)tx-pinctrl.dtsi>
1010
#include <dt-bindings/zmk/matrix_transform.h>
1111

12-
#include <layouts/common/ortho_5x12/ortho_5x12.dtsi>
12+
#include <layouts/common/ortho_5x12/1x2u.dtsi>
13+
#include <layouts/common/ortho_5x12/2x2u.dtsi>
14+
#include <layouts/common/ortho_5x12/all1u.dtsi>
1315

1416
/ {
1517
model = "Preonic PCD, rev3";
@@ -134,16 +136,13 @@ zephyr_udc0: &usb {
134136
};
135137

136138
&layout_ortho_5x12_all1u {
137-
status = "okay";
138139
transform = <&layout_grid_transform>;
139140
};
140141

141142
&layout_ortho_5x12_1x2u {
142-
status = "okay";
143143
transform = <&layout_mit_transform>;
144144
};
145145

146146
&layout_ortho_5x12_2x2u {
147-
status = "okay";
148147
transform = <&layout_2x2u_transform>;
149148
};

app/dts/layouts/common/60percent/60percent.dtsi

Lines changed: 0 additions & 72 deletions
This file was deleted.

app/dts/layouts/common/60percent/all1u.dtsi

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <layouts/common/60percent/position_map.dtsi>
12
#include <physical_layouts.dtsi>
23

34
/ {
@@ -74,4 +75,17 @@
7475
, <&key_physical_attrs 100 100 1400 400 0 0 0>
7576
;
7677
};
77-
};
78+
};
79+
80+
&layouts_common_60_percent_position_map {
81+
layout_60_all1u {
82+
physical-layout = <&layout_60_all1u>;
83+
positions
84+
= < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14>
85+
, <15 16 17 18 19 20 21 22 23 24 25 26 27 28>
86+
, <29 30 31 32 33 34 35 36 37 38 39 40 41>
87+
, <42 43 44 45 46 47 48 49 50 51 52 53 54 55 56>
88+
, <57 58 59 60 61 62 64 63 65>
89+
;
90+
};
91+
};

app/dts/layouts/common/60percent/ansi.dtsi

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <layouts/common/60percent/position_map.dtsi>
12
#include <physical_layouts.dtsi>
23

34
/ {
@@ -69,4 +70,17 @@
6970
, <&key_physical_attrs 125 100 1375 400 0 0 0>
7071
;
7172
};
72-
};
73+
};
74+
75+
&layouts_common_60_percent_position_map {
76+
layout_60_ansi {
77+
physical-layout = <&layout_60_ansi>;
78+
positions
79+
= < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 61>
80+
, <14 15 16 17 18 19 20 21 22 23 24 25 26 27>
81+
, <28 29 30 31 32 33 34 35 36 37 38 39 40>
82+
, <41 62 42 43 44 45 46 47 48 49 50 51 52 63 64>
83+
, <53 54 55 56 57 58 60 59 65>
84+
;
85+
};
86+
};

app/dts/layouts/common/60percent/hhkb.dtsi

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <layouts/common/60percent/position_map.dtsi>
12
#include <physical_layouts.dtsi>
23

34
/ {
@@ -68,4 +69,17 @@
6869
, <&key_physical_attrs 150 100 1350 400 0 0 0>
6970
;
7071
};
71-
};
72+
};
73+
74+
&layouts_common_60_percent_position_map {
75+
layout_60_hhkb {
76+
physical-layout = <&layout_60_hhkb>;
77+
positions
78+
= < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 60>
79+
, <14 15 16 17 18 19 20 21 22 23 24 25 26 27>
80+
, <28 29 30 31 32 33 34 35 36 37 38 39 40>
81+
, <41 61 42 43 44 45 46 47 48 49 50 51 52 62 63>
82+
, <53 54 55 56 57 58 59 64 65>
83+
;
84+
};
85+
};

0 commit comments

Comments
 (0)