From 8a41a3203b12e6757c61961d2afe4990b2471def Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Sat, 20 Feb 2021 15:43:19 +0100 Subject: [PATCH] data: add config files for all pinephone versions --- data/meson.build | 13 ++++++++ data/pine64,pinephone-1.0.toml | 54 ++++++++++++++++++++++++++++++++++ data/pine64,pinephone-1.1.toml | 54 ++++++++++++++++++++++++++++++++++ data/pine64,pinephone-1.2.toml | 47 +++++++++++++++++++++++++++++ meson.build | 1 + 5 files changed, 169 insertions(+) create mode 100644 data/meson.build create mode 100644 data/pine64,pinephone-1.0.toml create mode 100644 data/pine64,pinephone-1.1.toml create mode 100644 data/pine64,pinephone-1.2.toml diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..30a1c92 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,13 @@ +# +# Copyright (C) 2020 Arnaud Ferraris +# +# SPDX-License-Identifier: GPL-3.0-or-later +# + +conf_files = [ +'pine64,pinephone-1.0.toml', +'pine64,pinephone-1.1.toml', +'pine64,pinephone-1.2.toml', +] + +install_data(conf_files) diff --git a/data/pine64,pinephone-1.0.toml b/data/pine64,pinephone-1.0.toml new file mode 100644 index 0000000..6509057 --- /dev/null +++ b/data/pine64,pinephone-1.0.toml @@ -0,0 +1,54 @@ +[manager] +need_libusb = true +usb_vid = 0x2c7c +usb_pid = 0x0125 + +# Uncomment the following if you need to change the modem detection timeout on +# resume and/or the time during which suspend is blocked after modem boot +#[suspend] +#boot_timeout = 120 +#recovery_timeout = 9 + +[gpio] +dtr = 358 +pwrkey = 35 +reset = 68 +apready = 231 +disable = 232 + +[at] +uart = "/dev/ttyS2" +configure = [ +# Each command has 4 possible elements: +# * `cmd` : the AT command itself, which will be translated to "AT+`cmd`" +# * `subcmd`: the subcommand in case a single AT command can be used +# to change multiple parameters, such as QCFG (optional) +# * `value` : the commands, argument, usually used to set the value of +# a specific parameter (optional) +# * `expect`: the expected return value; the command is first executed +# without any value in order to query the current state. This +# state is then compared to the `expect` string; if they don't +# match, the command is then executed with value `expect` in +# order to set the parameter to the configured value (optional) +# A command can have `expect` OR `value` configured, but it shouldn't have both + { cmd = "QDAI", expect = "1,1,0,1,0,0,1,1" }, + { cmd = "QCFG", subcmd = "risignaltype", expect = "\"physical\"" }, + { cmd = "QCFG", subcmd = "ims", expect = "1" }, + { cmd = "QCFG", subcmd = "urc/ri/ring", expect = "\"pulse\",2000,1000,5000,\"off\",1" }, + { cmd = "QCFG", subcmd = "urc/ri/smsincoming", expect = "\"pulse\",2000" }, + { cmd = "QCFG", subcmd = "urc/ri/other", expect = "\"off\",1" }, + { cmd = "QCFG", subcmd = "urc/delay", expect = "1" }, + { cmd = "QURCCFG", subcmd = "urcport", expect = "\"usbat\"" }, + { cmd = "QGPS", value = "1" }, + { cmd = "QSCLK", value = "1" }, + { cmd = "QCFG", subcmd = "urc/cache", value = "0" } +] +suspend = [ + { cmd = "QGPSEND" }, + { cmd = "QCFG", subcmd = "urc/cache", value = "1" } +] +resume = [ + { cmd = "QCFG", subcmd = "urc/cache", value = "0" }, + { cmd = "QGPS", value = "1" } +] +reset = [ { cmd = "CFUN", value = "1,1" } ] diff --git a/data/pine64,pinephone-1.1.toml b/data/pine64,pinephone-1.1.toml new file mode 100644 index 0000000..6509057 --- /dev/null +++ b/data/pine64,pinephone-1.1.toml @@ -0,0 +1,54 @@ +[manager] +need_libusb = true +usb_vid = 0x2c7c +usb_pid = 0x0125 + +# Uncomment the following if you need to change the modem detection timeout on +# resume and/or the time during which suspend is blocked after modem boot +#[suspend] +#boot_timeout = 120 +#recovery_timeout = 9 + +[gpio] +dtr = 358 +pwrkey = 35 +reset = 68 +apready = 231 +disable = 232 + +[at] +uart = "/dev/ttyS2" +configure = [ +# Each command has 4 possible elements: +# * `cmd` : the AT command itself, which will be translated to "AT+`cmd`" +# * `subcmd`: the subcommand in case a single AT command can be used +# to change multiple parameters, such as QCFG (optional) +# * `value` : the commands, argument, usually used to set the value of +# a specific parameter (optional) +# * `expect`: the expected return value; the command is first executed +# without any value in order to query the current state. This +# state is then compared to the `expect` string; if they don't +# match, the command is then executed with value `expect` in +# order to set the parameter to the configured value (optional) +# A command can have `expect` OR `value` configured, but it shouldn't have both + { cmd = "QDAI", expect = "1,1,0,1,0,0,1,1" }, + { cmd = "QCFG", subcmd = "risignaltype", expect = "\"physical\"" }, + { cmd = "QCFG", subcmd = "ims", expect = "1" }, + { cmd = "QCFG", subcmd = "urc/ri/ring", expect = "\"pulse\",2000,1000,5000,\"off\",1" }, + { cmd = "QCFG", subcmd = "urc/ri/smsincoming", expect = "\"pulse\",2000" }, + { cmd = "QCFG", subcmd = "urc/ri/other", expect = "\"off\",1" }, + { cmd = "QCFG", subcmd = "urc/delay", expect = "1" }, + { cmd = "QURCCFG", subcmd = "urcport", expect = "\"usbat\"" }, + { cmd = "QGPS", value = "1" }, + { cmd = "QSCLK", value = "1" }, + { cmd = "QCFG", subcmd = "urc/cache", value = "0" } +] +suspend = [ + { cmd = "QGPSEND" }, + { cmd = "QCFG", subcmd = "urc/cache", value = "1" } +] +resume = [ + { cmd = "QCFG", subcmd = "urc/cache", value = "0" }, + { cmd = "QGPS", value = "1" } +] +reset = [ { cmd = "CFUN", value = "1,1" } ] diff --git a/data/pine64,pinephone-1.2.toml b/data/pine64,pinephone-1.2.toml new file mode 100644 index 0000000..1d33fc0 --- /dev/null +++ b/data/pine64,pinephone-1.2.toml @@ -0,0 +1,47 @@ +# Uncomment the following if you need to change the modem detection timeout on +# resume and/or the time during which suspend is blocked after modem boot +#[suspend] +#boot_timeout = 120 +#recovery_timeout = 9 + +[gpio] +dtr = 34 +pwrkey = 35 +reset = 68 +apready = 231 +disable = 232 +status = 233 + +[at] +uart = "/dev/ttyS2" +configure = [ +# Each command has 4 possible elements: +# * `cmd` : the AT command itself, which will be translated to "AT+`cmd`" +# * `subcmd`: the subcommand in case a single AT command can be used +# to change multiple parameters, such as QCFG (optional) +# * `value` : the commands, argument, usually used to set the value of +# a specific parameter (optional) +# * `expect`: the expected return value; the command is first executed +# without any value in order to query the current state. This +# state is then compared to the `expect` string; if they don't +# match, the command is then executed with value `expect` in +# order to set the parameter to the configured value (optional) +# A command can have `expect` OR `value` configured, but it shouldn't have both + { cmd = "QDAI", expect = "1,1,0,1,0,0,1,1" }, + { cmd = "QCFG", subcmd = "risignaltype", expect = "\"physical\"" }, + { cmd = "QCFG", subcmd = "ims", expect = "1" }, + { cmd = "QCFG", subcmd = "apready", expect = "1,0,500" }, + { cmd = "QURCCFG", subcmd = "urcport", expect = "\"usbat\"" }, + { cmd = "QGPS", value = "1" }, + { cmd = "QSCLK", value = "1" }, + { cmd = "QCFG", subcmd = "urc/cache", value = "0" } +] +suspend = [ + { cmd = "QGPSEND" }, + { cmd = "QCFG", subcmd = "urc/cache", value = "1" } +] +resume = [ + { cmd = "QCFG", subcmd = "urc/cache", value = "0" }, + { cmd = "QGPS", value = "1" } +] +reset = [ { cmd = "CFUN", value = "1,1" } ] diff --git a/meson.build b/meson.build index 6bea235..1af6895 100644 --- a/meson.build +++ b/meson.build @@ -56,5 +56,6 @@ mgr_deps = [ dependency('mm-glib'), ] +subdir('data') subdir('src') subdir('udev')