1# TI CC1200 configuration options
2
3# SPDX-License-Identifier: Apache-2.0
4
5menuconfig IEEE802154_CC1200
6	bool "TI CC1200 Driver support"
7	default y
8	depends on DT_HAS_TI_CC1200_ENABLED
9
10if IEEE802154_CC1200
11
12config IEEE802154_CC1200_RX_STACK_SIZE
13	int "Driver's internal RX thread stack size"
14	default 800
15	help
16	  This option sets the driver's stack size for its internal RX thread.
17	  The default value should be sufficient, but in case it proves to be
18	  a too little one, this option makes it easy to play with the size.
19
20config IEEE802154_CC1200_INIT_PRIO
21	int "CC1200 initialization priority"
22	default 80
23	help
24	  Set the initialization priority number. Do not mess with it unless
25	  you know what you are doing. Beware cc1200 requires gpio and spi to
26	  be ready first (and sometime gpio should be the very first as spi
27	  might need it too). And of course it has to start before the net stack.
28
29config IEEE802154_CC1200_RANDOM_MAC
30	bool "Random MAC address"
31	default y
32	help
33	  Generate a random MAC address dynamically.
34
35if ! IEEE802154_CC1200_RANDOM_MAC
36
37config IEEE802154_CC1200_MAC4
38	hex "MAC Address Byte 4"
39	default 0
40	range 0 0xff
41	help
42	  This is the byte 4 of the MAC address.
43
44config IEEE802154_CC1200_MAC5
45	hex "MAC Address Byte 5"
46	default 0
47	range 0 0xff
48	help
49	  This is the byte 5 of the MAC address.
50
51config IEEE802154_CC1200_MAC6
52	hex "MAC Address Byte 6"
53	default 0
54	range 0 0xff
55	help
56	  This is the byte 6 of the MAC address.
57
58config IEEE802154_CC1200_MAC7
59	hex "MAC Address Byte 7"
60	default 0
61	range 0 0xff
62	help
63	  This is the byte 7 of the MAC address.
64
65endif # IEEE802154_CC1200_RANDOM_MAC
66
67config IEEE802154_CC1200_XOSC
68	int "Value of the Crystal oscillator in kHz"
69	default 40000
70	help
71	  This sets the XOSC value, it must be between 38400 and 40000.
72	  This value should follow what has been set in the RF settings via
73	  SmartRF tool. Do not touch this unless you know what you are doing.
74
75config IEEE802154_CC1200_RF_PRESET
76	bool "Use TI CC1200 RF pre-sets"
77	default y
78
79choice
80	prompt "TI CC1200 RF preset"
81	default IEEE802154_CC1200_RF_SET_0
82	depends on IEEE802154_CC1200_RF_PRESET
83	help
84	  Set the RF preset you want to use.
85
86config IEEE802154_CC1200_RF_SET_0
87	bool "IEEE 802.15.4g SUN MR-FSK, 863MHz band, mode #1 - channel page 9, 34 channels, 50Kbps (ETSI)"
88	help
89	   This is a legacy IEEE 802.15.4g-2012 SUN MR-FSK PHY that does no
90	   longer exist in recent standards (IEEE 802.15.4-2015+).
91
92config IEEE802154_CC1200_RF_SET_1
93	bool "IEEE 802.15.4g SUN MR-FSK 920MHz band, mode #1 - channel page 9, 39 channels, 50Kbps (ARIB)"
94	help
95	   This is a legacy IEEE 802.15.4g-2012 SUN MR-FSK PHY that does no
96	   longer exist in recent standards (IEEE 802.15.4-2015+).
97
98config IEEE802154_CC1200_RF_SET_2
99	bool "IEEE 802.15.4 Non-Standard 2-GFSK 433MHz band - channel page 9, 15 channels, 50Kbps (ETSI)"
100	help
101	   This is a non-standard PHY similar to the IEEE 802.15.4g-2012 SUN
102	   MR-FSK PHY but not in one of the standard bands.
103
104endchoice
105
106config IEEE802154_CC1200_CCA_THRESHOLD
107	int "Value in dbm of the CCA threshold"
108	default -91
109	help
110	  Set the CCA threshold. See datasheet's AGC_CS_THR register for
111	  more information. Do not touch this unless you know what you are doing.
112
113config IEEE802154_CC1200_RSSI_OFFSET
114	int "Value in dbm of the RSSI offset"
115	default -81
116	help
117	  Set the gain adjustment. See datasheet's AGC_GAIN_ADJUST register for
118	  more information. Do not touch this unless you know what you are doing.
119
120# Do no touch below settings unless you know what you are doing
121config IEEE802154_CC1200_SETTLING_CFG
122	hex
123	default 0x03
124
125config IEEE802154_CC1200_PKTCFG0
126	hex
127	default 0x20
128
129config IEEE802154_CC1200_PKTCFG1
130	hex
131	default 0x03
132
133config IEEE802154_CC1200_PKTCFG2
134	hex
135	default 0x00
136
137config IEEE802154_CC1200_RFEND_CFG1
138	hex
139	default 0x3F
140
141config IEEE802154_CC1200_RFEND_CFG0
142	hex
143	default 0x00
144
145endif # IEEE802154_CC1200
146