summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-10-06 11:28:30 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2017-10-06 12:10:33 +0200
commit698779e3e898610800088b1ce6c6a2a25803b91c (patch)
treea2808f31ff1f655b5e055ae061814d70bcf87439 /firmware/target/hosted
parent3f1e4a0b1aa3c77d27a85fefb00c9c575eab715b (diff)
downloadrockbox-698779e3e898610800088b1ce6c6a2a25803b91c.tar.gz
rockbox-698779e3e898610800088b1ce6c6a2a25803b91c.tar.bz2
rockbox-698779e3e898610800088b1ce6c6a2a25803b91c.zip
sonynwz: add nvp nodes for NW-A40/ZX300, various fixes for tools
We still miss the model IDS for those device so scsitool won't be able to recognize them automatically. Change-Id: I17ae0f0d95c011cea8e289def63c7673b6c4b667
Diffstat (limited to 'firmware/target/hosted')
-rw-r--r--firmware/target/hosted/sonynwz/nwz-db.c147
-rw-r--r--firmware/target/hosted/sonynwz/nwz-db.h4
2 files changed, 150 insertions, 1 deletions
diff --git a/firmware/target/hosted/sonynwz/nwz-db.c b/firmware/target/hosted/sonynwz/nwz-db.c
index 2aef1e3a49..96c9c6e84f 100644
--- a/firmware/target/hosted/sonynwz/nwz-db.c
+++ b/firmware/target/hosted/sonynwz/nwz-db.c
@@ -224,6 +224,7 @@ static int nvp_index_0ac81d[NWZ_NVP_COUNT] =
[NWZ_NVP_BPR] = 35,
[NWZ_NVP_BTC] = NWZ_NVP_INVALID,
[NWZ_NVP_BTI] = 1,
+ [NWZ_NVP_CLG] = NWZ_NVP_INVALID,
[NWZ_NVP_CLV] = 68,
[NWZ_NVP_CNG] = 3,
[NWZ_NVP_CTR] = NWZ_NVP_INVALID,
@@ -308,6 +309,7 @@ static int nvp_index_0ac81d[NWZ_NVP_COUNT] =
[NWZ_NVP_PRK] = NWZ_NVP_INVALID,
[NWZ_NVP_PSK] = NWZ_NVP_INVALID,
[NWZ_NVP_PTS] = 75,
+ [NWZ_NVP_PWD] = NWZ_NVP_INVALID,
[NWZ_NVP_RBT] = NWZ_NVP_INVALID,
[NWZ_NVP_RND] = 28,
[NWZ_NVP_RTC] = 34,
@@ -335,6 +337,131 @@ static int nvp_index_0ac81d[NWZ_NVP_COUNT] =
[NWZ_NVP_VRT] = NWZ_NVP_INVALID,
};
+static int nvp_index_139d65[NWZ_NVP_COUNT] =
+{
+ [NWZ_NVP_APD] = 78,
+ [NWZ_NVP_APP] = NWZ_NVP_INVALID,
+ [NWZ_NVP_BFD] = 21,
+ [NWZ_NVP_BFP] = 20,
+ [NWZ_NVP_BLF] = 79,
+ [NWZ_NVP_BML] = 22,
+ [NWZ_NVP_BOK] = NWZ_NVP_INVALID,
+ [NWZ_NVP_BPR] = 19,
+ [NWZ_NVP_BTC] = 85,
+ [NWZ_NVP_BTI] = 72,
+ [NWZ_NVP_CLG] = 15,
+ [NWZ_NVP_CLV] = 68,
+ [NWZ_NVP_CNG] = 23,
+ [NWZ_NVP_CTR] = 90,
+ [NWZ_NVP_DBA] = NWZ_NVP_INVALID,
+ [NWZ_NVP_DBG] = 0,
+ [NWZ_NVP_DBI] = 88,
+ [NWZ_NVP_DBS] = NWZ_NVP_INVALID,
+ [NWZ_NVP_DBV] = 25,
+ [NWZ_NVP_DCC] = NWZ_NVP_INVALID,
+ [NWZ_NVP_DG0] = NWZ_NVP_INVALID,
+ [NWZ_NVP_DG1] = NWZ_NVP_INVALID,
+ [NWZ_NVP_DOR] = NWZ_NVP_INVALID,
+ [NWZ_NVP_E00] = 36,
+ [NWZ_NVP_E01] = 37,
+ [NWZ_NVP_E02] = 38,
+ [NWZ_NVP_E03] = 39,
+ [NWZ_NVP_E04] = 40,
+ [NWZ_NVP_E05] = 41,
+ [NWZ_NVP_E06] = 42,
+ [NWZ_NVP_E07] = 43,
+ [NWZ_NVP_E08] = 44,
+ [NWZ_NVP_E09] = 45,
+ [NWZ_NVP_E10] = 46,
+ [NWZ_NVP_E11] = 47,
+ [NWZ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VP_APD] = 78,
@@ -347,6 +474,7 @@ static int nvp_index_28dc2c[NWZ_NVP_COUNT] =
[NWZ_NVP_BPR] = 19,
[NWZ_NVP_BTC] = 85,
[NWZ_NVP_BTI] = 72,
+ [NWZ_NVP_CLG] = NWZ_NVP_INVALID,
[NWZ_NVP_CLV] = 68,
[NWZ_NVP_CNG] = 23,
[NWZ_NVP_CTR] = NWZ_NVP_INVALID,
@@ -431,6 +559,7 @@ static int nvp_index_28dc2c[NWZ_NVP_COUNT] =
[NWZ_NVP_PRK] = NWZ_NVP_INVALID,
[NWZ_NVP_PSK] = 18,
[NWZ_NVP_PTS] = 77,
+ [NWZ_NVP_PWD] = NWZ_NVP_INVALID,
[NWZ_NVP_RBT] = NWZ_NVP_INVALID,
[NWZ_NVP_RND] = 27,
[NWZ_NVP_RTC] = 6,
@@ -470,6 +599,7 @@ static int nvp_index_398250[NWZ_NVP_COUNT] =
[NWZ_NVP_BPR] = 19,
[NWZ_NVP_BTC] = 85,
[NWZ_NVP_BTI] = 72,
+ [NWZ_NVP_CLG] = NWZ_NVP_INVALID,
[NWZ_NVP_CLV] = 68,
[NWZ_NVP_CNG] = 23,
[NWZ_NVP_CTR] = 90,
@@ -554,6 +684,7 @@ static int nvp_index_398250[NWZ_NVP_COUNT] =
[NWZ_NVP_PRK] = 4,
[NWZ_NVP_PSK] = 18,
[NWZ_NVP_PTS] = NWZ_NVP_INVALID,
+ [NWZ_NVP_PWD] = NWZ_NVP_INVALID,
[NWZ_NVP_RBT] = 70,
[NWZ_NVP_RND] = NWZ_NVP_INVALID,
[NWZ_NVP_RTC] = 6,
@@ -593,6 +724,7 @@ static int nvp_index_4edba7[NWZ_NVP_COUNT] =
[NWZ_NVP_BPR] = 35,
[NWZ_NVP_BTC] = NWZ_NVP_INVALID,
[NWZ_NVP_BTI] = 1,
+ [NWZ_NVP_CLG] = NWZ_NVP_INVALID,
[NWZ_NVP_CLV] = 68,
[NWZ_NVP_CNG] = 3,
[NWZ_NVP_CTR] = NWZ_NVP_INVALID,
@@ -677,6 +809,7 @@ static int nvp_index_4edba7[NWZ_NVP_COUNT] =
[NWZ_NVP_PRK] = NWZ_NVP_INVALID,
[NWZ_NVP_PSK] = NWZ_NVP_INVALID,
[NWZ_NVP_PTS] = 75,
+ [NWZ_NVP_PWD] = NWZ_NVP_INVALID,
[NWZ_NVP_RBT] = NWZ_NVP_INVALID,
[NWZ_NVP_RND] = 28,
[NWZ_NVP_RTC] = 34,
@@ -716,6 +849,7 @@ static int nvp_index_6485c8[NWZ_NVP_COUNT] =
[NWZ_NVP_BPR] = 19,
[NWZ_NVP_BTC] = 85,
[NWZ_NVP_BTI] = 72,
+ [NWZ_NVP_CLG] = NWZ_NVP_INVALID,
[NWZ_NVP_CLV] = 68,
[NWZ_NVP_CNG] = 23,
[NWZ_NVP_CTR] = NWZ_NVP_INVALID,
@@ -800,6 +934,7 @@ static int nvp_index_6485c8[NWZ_NVP_COUNT] =
[NWZ_NVP_PRK] = NWZ_NVP_INVALID,
[NWZ_NVP_PSK] = 18,
[NWZ_NVP_PTS] = 77,
+ [NWZ_NVP_PWD] = NWZ_NVP_INVALID,
[NWZ_NVP_RBT] = NWZ_NVP_INVALID,
[NWZ_NVP_RND] = 27,
[NWZ_NVP_RTC] = 6,
@@ -839,6 +974,7 @@ static int nvp_index_92faee[NWZ_NVP_COUNT] =
[NWZ_NVP_BPR] = 19,
[NWZ_NVP_BTC] = 85,
[NWZ_NVP_BTI] = 72,
+ [NWZ_NVP_CLG] = NWZ_NVP_INVALID,
[NWZ_NVP_CLV] = 68,
[NWZ_NVP_CNG] = 23,
[NWZ_NVP_CTR] = NWZ_NVP_INVALID,
@@ -923,6 +1059,7 @@ static int nvp_index_92faee[NWZ_NVP_COUNT] =
[NWZ_NVP_PRK] = NWZ_NVP_INVALID,
[NWZ_NVP_PSK] = 18,
[NWZ_NVP_PTS] = 77,
+ [NWZ_NVP_PWD] = NWZ_NVP_INVALID,
[NWZ_NVP_RBT] = NWZ_NVP_INVALID,
[NWZ_NVP_RND] = 27,
[NWZ_NVP_RTC] = 6,
@@ -962,6 +1099,7 @@ static int nvp_index_f505c8[NWZ_NVP_COUNT] =
[NWZ_NVP_BPR] = 35,
[NWZ_NVP_BTC] = 27,
[NWZ_NVP_BTI] = 1,
+ [NWZ_NVP_CLG] = NWZ_NVP_INVALID,
[NWZ_NVP_CLV] = 68,
[NWZ_NVP_CNG] = 3,
[NWZ_NVP_CTR] = NWZ_NVP_INVALID,
@@ -1046,6 +1184,7 @@ static int nvp_index_f505c8[NWZ_NVP_COUNT] =
[NWZ_NVP_PRK] = NWZ_NVP_INVALID,
[NWZ_NVP_PSK] = 86,
[NWZ_NVP_PTS] = 75,
+ [NWZ_NVP_PWD] = NWZ_NVP_INVALID,
[NWZ_NVP_RBT] = NWZ_NVP_INVALID,
[NWZ_NVP_RND] = 28,
[NWZ_NVP_RTC] = 34,
@@ -1085,6 +1224,7 @@ struct nwz_nvp_info_t nwz_nvp[NWZ_NVP_COUNT] =
[NWZ_NVP_BPR] = { "bpr", 2048, "bluetooth address | bluetooth parameter" },
[NWZ_NVP_BTC] = { "btc", 4, "battery calibration" },
[NWZ_NVP_BTI] = { "bti", 262144, "boot image" },
+ [NWZ_NVP_CLG] = { "clg", 0, "" },
[NWZ_NVP_CLV] = { "clv", 4, "color variation" },
[NWZ_NVP_CNG] = { "cng", 704, "aad key | aad/empr key" },
[NWZ_NVP_CTR] = { "ctr", 0, "" },
@@ -1169,6 +1309,7 @@ struct nwz_nvp_info_t nwz_nvp[NWZ_NVP_COUNT] =
[NWZ_NVP_PRK] = { "prk", 0, "" },
[NWZ_NVP_PSK] = { "psk", 512, "bluetooth pskey" },
[NWZ_NVP_PTS] = { "pts", 4, "wifi protected setup" },
+ [NWZ_NVP_PWD] = { "pwd", 0, "" },
[NWZ_NVP_RBT] = { "rbt", 0, "" },
[NWZ_NVP_RND] = { "rnd", 64, "random data | wmt key" },
[NWZ_NVP_RTC] = { "rtc", 16, "rtc alarm" },
@@ -1205,6 +1346,8 @@ static unsigned long models_nw_a20[] = { 0x1d000001, 0x1d000002, 0x1d000004,
static unsigned long models_nw_a30[] = { 0x22000004, 0x22000005, 0x22000006 };
+static unsigned long models_nw_a40[] = { };
+
static unsigned long models_nwz_a720[] = { 0x3030001, 0x3030002, 0x3030004,
0x3020001, 0x3020002, 0x3020004 };
@@ -1294,6 +1437,8 @@ static unsigned long models_nwz_x1000[] = { 0x5000002, 0x5000004, 0x5000005,
static unsigned long models_nw_zx100[] = { 0x1c000007, 0x1c000001, 0x1c000002,
0x1c000004, 0x1c000005, 0x1c000006 };
+static unsigned long models_nw_zx300[] = { };
+
static unsigned long models_nwz_noname[] = { 0x5010002, 0x5010004, 0x5010005 };
struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT] =
@@ -1301,6 +1446,7 @@ struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT] =
{ "nwz-a10", "NWZ-A10 Series", 10, models_nwz_a10, &nvp_index_92faee },
{ "nw-a20", "NW-A20 Series", 6, models_nw_a20, &nvp_index_92faee },
{ "nw-a30", "NW-A30 Series", 3, models_nw_a30, &nvp_index_398250 },
+ { "nw-a40", "NW-A40 Series", 0, models_nw_a40, &nvp_index_139d65 },
{ "nwz-a720", "NWZ-A720 Series", 6, models_nwz_a720, 0 },
{ "nwz-a810", "NWZ-A810 Series", 3, models_nwz_a810, 0 },
{ "nwz-a820", "NWZ-A820 Series", 6, models_nwz_a820, 0 },
@@ -1333,5 +1479,6 @@ struct nwz_series_info_t nwz_series[NWZ_SERIES_COUNT] =
{ "nw-wm1", "NW-WM1 Series", 2, models_nw_wm1, &nvp_index_398250 },
{ "nwz-x1000", "NWZ-X1000 Series", 9, models_nwz_x1000, &nvp_index_4edba7 },
{ "nw-zx100", "NW-ZX100 Series", 6, models_nw_zx100, &nvp_index_92faee },
+ { "nw-zx300", "NW-ZX300 Series", 0, models_nw_zx300, &nvp_index_139d65 },
{ "nwz-noname", "NONAME", 3, models_nwz_noname, 0 },
};
diff --git a/firmware/target/hosted/sonynwz/nwz-db.h b/firmware/target/hosted/sonynwz/nwz-db.h
index cb130f96a2..d032e27d04 100644
--- a/firmware/target/hosted/sonynwz/nwz-db.h
+++ b/firmware/target/hosted/sonynwz/nwz-db.h
@@ -35,6 +35,7 @@ enum nwz_nvp_node_t
NWZ_NVP_BPR, /* bluetooth address | bluetooth parameter */
NWZ_NVP_BTC, /* battery calibration */
NWZ_NVP_BTI, /* boot image */
+ NWZ_NVP_CLG, /* */
NWZ_NVP_CLV, /* color variation */
NWZ_NVP_CNG, /* aad key | aad/empr key */
NWZ_NVP_CTR, /* */
@@ -119,6 +120,7 @@ enum nwz_nvp_node_t
NWZ_NVP_PRK, /* */
NWZ_NVP_PSK, /* bluetooth pskey */
NWZ_NVP_PTS, /* wifi protected setup */
+ NWZ_NVP_PWD, /* */
NWZ_NVP_RBT, /* */
NWZ_NVP_RND, /* random data | wmt key */
NWZ_NVP_RTC, /* rtc alarm */
@@ -152,7 +154,7 @@ enum nwz_nvp_node_t
/* Number of models */
#define NWZ_MODEL_COUNT 186
/* Number of series */
-#define NWZ_SERIES_COUNT 36
+#define NWZ_SERIES_COUNT 38
/* NVP node info */
struct nwz_nvp_info_t