From 8e4259ba2bdfe210e9963a58c3924e4a0ad49377 Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 17 Sep 2020 17:14:44 -0500 Subject: Add file location to dtso file and add uart0 to overlay for MTCAP --- README | 25 ++++++++++++++++++++++--- mtcap/MTCAP-0.3-gps-pps.dtso | 30 ++++++++++++++++++++++++++++++ mtcap/MTCAP-0.3-gps-uart0.dtso | 30 ++++++++++++++++++++++++++++++ mtcap/MTCAP-0.3-pps.dtso | 20 -------------------- mtcdt/alt-mtcdt-0.0.dtso | 6 ++++++ mtcdt/ap1-xdot-0.0.dtso | 5 +++++ mtcdt/ap2-xdot-0.0.dtso | 6 ++++++ mtcdt/mtcdt-0.0.dtso | 6 ++++++ mtcdt/mtcdt-gpios.0.0.dtso | 6 ++++++ mtrv1/MTRV1-0.0-pps.dtso | 8 ++++++++ mtrv1/MTRV1-0.1-pps.dtso | 21 --------------------- mtrv1/MTRV1-0.2-pps.dtbo | 1 - 12 files changed, 119 insertions(+), 45 deletions(-) create mode 100644 mtcap/MTCAP-0.3-gps-pps.dtso create mode 100644 mtcap/MTCAP-0.3-gps-uart0.dtso delete mode 100644 mtcap/MTCAP-0.3-pps.dtso delete mode 100644 mtrv1/MTRV1-0.1-pps.dtso delete mode 120000 mtrv1/MTRV1-0.2-pps.dtbo diff --git a/README b/README index 1a4debd..6167976 100644 --- a/README +++ b/README @@ -11,9 +11,6 @@ See this for the format of an overlay: https://www.kernel.org/doc/Documentation/devicetree/overlay-notes.txt -Note that as of 10 May 2019, no overlays have been -released. - The biggest flaw in overlays, is the inablitiy to use the phandle described in an alias in the boot time device tree in an overlay, so it appears @@ -23,3 +20,25 @@ is common to reference a "pio" in device tree to use a PIO with GPIO. For example, it does not appear to be possible to use &pioC in the overlay without redefining it. + +The recipe that uses the overlay reads a comment +in the overlay source to determine the destination +and any symlink locations. + +The comment in the file must be as follows for +locations and symlinks: + +/* + * Put: /a/b/c/d.dtbo + * Link: /a/x/y/d.dtbo + * + */ + +The install is looking for a line that +starts with " * Put: " or " * Link: ". +Extra spaces before the path are allowed. +The link will always point at the path +specified by Put. + +The path given is relative to the device +tree overlay location. diff --git a/mtcap/MTCAP-0.3-gps-pps.dtso b/mtcap/MTCAP-0.3-gps-pps.dtso new file mode 100644 index 0000000..40e50b1 --- /dev/null +++ b/mtcap/MTCAP-0.3-gps-pps.dtso @@ -0,0 +1,30 @@ +/* + * DTS file for Multi-Tech Systems MTCAP 0.3 Hardware + * + * Copyright (C) 2019 by Multi-Tech Systems, + * + * Licensed under GPLv2 or later. + */ + +/* + * The example symlink below is purposely mis-spelled to + * disable the link install. + * A symlink line must start with "* Link: " + * Location(s): + * Put: MTCAP/0.3/capability/gps/pps.dtbo + * LiNk: MTCAP/0.4/capability/gps/pps.dtbo + * LiNk: MTCAP/0.5/capability/gps/pps.dtbo + */ + +/dts-v1/; + +/ { + model = "Multi-Tech Systems MTCAP-0.3"; + compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; + fragment@0 { + target-path = "/pps-0"; + __overlay__ { + status = "okay"; + }; + }; /* fragment@0 */ +}; diff --git a/mtcap/MTCAP-0.3-gps-uart0.dtso b/mtcap/MTCAP-0.3-gps-uart0.dtso new file mode 100644 index 0000000..c72b9a3 --- /dev/null +++ b/mtcap/MTCAP-0.3-gps-uart0.dtso @@ -0,0 +1,30 @@ +/* + * DTS file for Multi-Tech Systems MTCAP 0.3 Hardware + * + * Copyright (C) 2019 by Multi-Tech Systems, + * + * Licensed under GPLv2 or later. + */ + +/* + * The example symlink below is purposely mis-spelled to + * disable the link install. + * A symlink line must start with "* Link: " + * Location(s): + * Put: MTCAP/0.3/capability/gps/uart0.dtbo + * LiNk: MTCAP/0.4/capability/gps/uart0.dtbo + * LiNk: MTCAP/0.5/capability/gps/uart0.dtbo + */ + +/dts-v1/; + +/ { + model = "Multi-Tech Systems MTCAP-0.3"; + compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; + fragment@1 { + target-path = "/ahb/apb/serial@f8040000"; + __overlay__ { + status = "okay"; + }; + }; /* fragment@1 */ +}; diff --git a/mtcap/MTCAP-0.3-pps.dtso b/mtcap/MTCAP-0.3-pps.dtso deleted file mode 100644 index 6b89e65..0000000 --- a/mtcap/MTCAP-0.3-pps.dtso +++ /dev/null @@ -1,20 +0,0 @@ -/* - * DTS file for Multi-Tech Systems MTCAP 0.3 Hardware - * - * Copyright (C) 2019 by Multi-Tech Systems, - * - * Licensed under GPLv2 or later. - */ - -/dts-v1/; - -/ { - model = "Multi-Tech Systems MTCAP-0.3"; - compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; - fragment@0 { - target-path = "/pps-0"; - __overlay__ { - status = "okay"; - }; - }; /* fragment@0 */ -}; diff --git a/mtcdt/alt-mtcdt-0.0.dtso b/mtcdt/alt-mtcdt-0.0.dtso index 3e585d2..3f51855 100644 --- a/mtcdt/alt-mtcdt-0.0.dtso +++ b/mtcdt/alt-mtcdt-0.0.dtso @@ -1,6 +1,12 @@ /* * DTS overlay for MTCDT 0.0 hardware version. */ + +/* + * Location(s): + * Put: MTCDT/0.0/alt-mtcdt.dtbo + */ + /dts-v1/; /plugin/; diff --git a/mtcdt/ap1-xdot-0.0.dtso b/mtcdt/ap1-xdot-0.0.dtso index 969f8b1..d127e60 100644 --- a/mtcdt/ap1-xdot-0.0.dtso +++ b/mtcdt/ap1-xdot-0.0.dtso @@ -4,6 +4,11 @@ /dts-v1/; /plugin/; +/* + * Location(s): + * Put: MTCDT/0.0/ap1-xdot.dtbo + */ + #include #include #include diff --git a/mtcdt/ap2-xdot-0.0.dtso b/mtcdt/ap2-xdot-0.0.dtso index 908e6ad..0e53309 100644 --- a/mtcdt/ap2-xdot-0.0.dtso +++ b/mtcdt/ap2-xdot-0.0.dtso @@ -1,6 +1,12 @@ /* * DTS overlay for MTCDT 0.0 hardware version. */ + +/* + * Location(s): + * Put: MTCDT/0.0/ap2-xdot.dtbo + */ + /dts-v1/; /plugin/; diff --git a/mtcdt/mtcdt-0.0.dtso b/mtcdt/mtcdt-0.0.dtso index 4d98fa4..e88d0d2 100644 --- a/mtcdt/mtcdt-0.0.dtso +++ b/mtcdt/mtcdt-0.0.dtso @@ -1,6 +1,12 @@ /* * DTS overlay for MTCDT 0.0 hardware version. */ + +/* + * Location(s): + * Put: MTCDT/0.0/mtcdt.dtbo + */ + /dts-v1/; /plugin/; diff --git a/mtcdt/mtcdt-gpios.0.0.dtso b/mtcdt/mtcdt-gpios.0.0.dtso index 24b1332..6234b30 100644 --- a/mtcdt/mtcdt-gpios.0.0.dtso +++ b/mtcdt/mtcdt-gpios.0.0.dtso @@ -3,6 +3,12 @@ * Uses [name]-gpios from: * https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio.txt */ + +/* + * Location(s): + * Put: MTCDT/0.0/gpios.dtbo + */ + /dts-v1/; /plugin/; diff --git a/mtrv1/MTRV1-0.0-pps.dtso b/mtrv1/MTRV1-0.0-pps.dtso index b3e1591..966ede6 100644 --- a/mtrv1/MTRV1-0.0-pps.dtso +++ b/mtrv1/MTRV1-0.0-pps.dtso @@ -6,6 +6,14 @@ * Licensed under GPLv2 or later. */ +/* + * A symlink line must start with "* Link: " + * Location(s): + * Put: MTRV1/0.0/capability/gps/gnss.dtbo + * Link: MTRV1/0.4/capability/gps/gnss.dtbo + * Link: MTRV1/0.5/capability/gps/gnss.dtbo + */ + /dts-v1/; /plugin/; diff --git a/mtrv1/MTRV1-0.1-pps.dtso b/mtrv1/MTRV1-0.1-pps.dtso deleted file mode 100644 index ad90ba8..0000000 --- a/mtrv1/MTRV1-0.1-pps.dtso +++ /dev/null @@ -1,21 +0,0 @@ -/* - * DTS file for Multi-Tech Systems MTRv1 Hardware - * - * Copyright (C) 2019 by Multi-Tech Systems, - * - * Licensed under GPLv2 or later. - */ - -/dts-v1/; -/plugin/; - -/ { - model = "Multi-Tech Systems MTRV1-0.1"; - compatible = "atmel,at91sam9g25ek", "atmel,at91sam9x5ek", "atmel,at91sam9x5", "atmel,at91sam9"; - fragment@0 { - target-path = "/pps-1"; - __overlay__ { - status = "okay"; - }; - }; /* fragment@0 */ -}; diff --git a/mtrv1/MTRV1-0.2-pps.dtbo b/mtrv1/MTRV1-0.2-pps.dtbo deleted file mode 120000 index c4639fc..0000000 --- a/mtrv1/MTRV1-0.2-pps.dtbo +++ /dev/null @@ -1 +0,0 @@ -MTRV1-0.1-pps.dtbo \ No newline at end of file -- cgit v1.2.3