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