Linux Audio

Check our new training course

Loading...
v6.2
  1// SPDX-License-Identifier: GPL-2.0-only
  2/*
  3 * Copyright (C) 2015 Microchip Technology Inc.  All rights reserved.
 
 
 
 
 
  4 */
  5
  6/dts-v1/;
  7
  8#include <dt-bindings/gpio/gpio.h>
  9#include <dt-bindings/interrupt-controller/irq.h>
 10
 11#include "pic32mzda.dtsi"
 12
 13/ {
 14	compatible = "microchip,pic32mzda-sk", "microchip,pic32mzda";
 15	model = "Microchip PIC32MZDA Starter Kit";
 16
 17	memory {
 18		device_type = "memory";
 19		reg = <0x08000000 0x08000000>;
 20	};
 21
 22	chosen {
 23		bootargs = "earlyprintk=ttyPIC1,115200n8r console=ttyPIC1,115200n8";
 24	};
 25
 26	leds0 {
 27		compatible = "gpio-leds";
 28		pinctrl-names = "default";
 29		pinctrl-0 = <&user_leds_s0>;
 30
 31		led@1 {
 32			label = "pic32mzda_sk:red:led1";
 33			gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
 34			linux,default-trigger = "heartbeat";
 35		};
 36
 37		led@2 {
 38			label = "pic32mzda_sk:yellow:led2";
 39			gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
 40			linux,default-trigger = "mmc0";
 41		};
 42
 43		led@3 {
 44			label = "pic32mzda_sk:green:led3";
 45			gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
 46			default-state = "on";
 47		};
 48	};
 49
 50	keys0 {
 51		compatible = "gpio-keys";
 52		pinctrl-0 = <&user_buttons_s0>;
 53		pinctrl-names = "default";
 54
 55		button-1 {
 
 
 
 56			label = "ESC";
 57			linux,code = <1>;
 58			gpios = <&gpio1 12 0>;
 59		};
 60
 61		button-2 {
 62			label = "Home";
 63			linux,code = <102>;
 64			gpios = <&gpio1 13 0>;
 65		};
 66
 67		button-3 {
 68			label = "Menu";
 69			linux,code = <139>;
 70			gpios = <&gpio1 14 0>;
 71		};
 72	};
 73};
 74
 75&uart2 {
 76	pinctrl-names = "default";
 77	pinctrl-0 = <&pinctrl_uart2>;
 78	status = "okay";
 79};
 80
 81&uart4 {
 82	pinctrl-names = "default";
 83	pinctrl-0 = <&pinctrl_uart4>;
 84	status = "okay";
 85};
 86
 87&sdhci {
 88	pinctrl-names = "default";
 89	pinctrl-0 = <&pinctrl_sdhc1>;
 90	status = "okay";
 91	assigned-clocks = <&rootclk REF2CLK>, <&rootclk REF4CLK>,
 92		<&rootclk REF5CLK>;
 93	assigned-clock-rates = <50000000>, <25000000>, <40000000>;
 94};
 95
 96&pic32_pinctrl {
 97
 98	pinctrl_sdhc1: sdhc1_pins0 {
 99		pins = "A6", "D4", "G13", "G12", "G14", "A7", "A0";
100		microchip,digital;
101	};
102
103	user_leds_s0: user_leds_s0 {
104		pins = "H0", "H1", "H2";
105		output-low;
106		microchip,digital;
107	};
108
109	user_buttons_s0: user_buttons_s0 {
110		pins = "B12", "B13", "B14";
111		microchip,digital;
112		input-enable;
113		bias-pull-up;
114	};
115
116	pinctrl_uart2: pinctrl_uart2 {
117		uart2-tx {
118			pins = "G9";
119			function = "U2TX";
120			microchip,digital;
121			output-high;
122		};
123		uart2-rx {
124			pins = "B0";
125			function = "U2RX";
126			microchip,digital;
127			input-enable;
128		};
129	};
130
131	pinctrl_uart4: uart4-0 {
132		uart4-tx {
133			pins = "C3";
134			function = "U4TX";
135			microchip,digital;
136			output-high;
137		};
138		uart4-rx {
139			pins = "E8";
140			function = "U4RX";
141			microchip,digital;
142			input-enable;
143		};
144	};
145};
v4.10.11
 
  1/*
  2 * Copyright (C) 2015 Microchip Technology Inc.  All rights reserved.
  3 *
  4 * This program is free software; you can redistribute it and/or modify
  5 * it under the terms of the GNU General Public License version 2 as
  6 * published by the Free Software Foundation.
  7 *
  8 */
  9
 10/dts-v1/;
 11
 12#include <dt-bindings/gpio/gpio.h>
 13#include <dt-bindings/interrupt-controller/irq.h>
 14
 15#include "pic32mzda.dtsi"
 16
 17/ {
 18	compatible = "microchip,pic32mzda-sk", "microchip,pic32mzda";
 19	model = "Microchip PIC32MZDA Starter Kit";
 20
 21	memory {
 22		device_type = "memory";
 23		reg = <0x08000000 0x08000000>;
 24	};
 25
 26	chosen {
 27		bootargs = "earlyprintk=ttyPIC1,115200n8r console=ttyPIC1,115200n8";
 28	};
 29
 30	leds0 {
 31		compatible = "gpio-leds";
 32		pinctrl-names = "default";
 33		pinctrl-0 = <&user_leds_s0>;
 34
 35		led@1 {
 36			label = "pic32mzda_sk:red:led1";
 37			gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
 38			linux,default-trigger = "heartbeat";
 39		};
 40
 41		led@2 {
 42			label = "pic32mzda_sk:yellow:led2";
 43			gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
 44			linux,default-trigger = "mmc0";
 45		};
 46
 47		led@3 {
 48			label = "pic32mzda_sk:green:led3";
 49			gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
 50			default-state = "on";
 51		};
 52	};
 53
 54	keys0 {
 55		compatible = "gpio-keys";
 56		pinctrl-0 = <&user_buttons_s0>;
 57		pinctrl-names = "default";
 58
 59		#address-cells = <1>;
 60		#size-cells = <0>;
 61
 62		button@sw1 {
 63			label = "ESC";
 64			linux,code = <1>;
 65			gpios = <&gpio1 12 0>;
 66		};
 67
 68		button@sw2 {
 69			label = "Home";
 70			linux,code = <102>;
 71			gpios = <&gpio1 13 0>;
 72		};
 73
 74		button@sw3 {
 75			label = "Menu";
 76			linux,code = <139>;
 77			gpios = <&gpio1 14 0>;
 78		};
 79	};
 80};
 81
 82&uart2 {
 83	pinctrl-names = "default";
 84	pinctrl-0 = <&pinctrl_uart2>;
 85	status = "okay";
 86};
 87
 88&uart4 {
 89	pinctrl-names = "default";
 90	pinctrl-0 = <&pinctrl_uart4>;
 91	status = "okay";
 92};
 93
 94&sdhci {
 95	pinctrl-names = "default";
 96	pinctrl-0 = <&pinctrl_sdhc1>;
 97	status = "okay";
 98	assigned-clocks = <&rootclk REF2CLK>, <&rootclk REF4CLK>,
 99		<&rootclk REF5CLK>;
100	assigned-clock-rates = <50000000>, <25000000>, <40000000>;
101};
102
103&pic32_pinctrl {
104
105	pinctrl_sdhc1: sdhc1_pins0 {
106		pins = "A6", "D4", "G13", "G12", "G14", "A7", "A0";
107		microchip,digital;
108	};
109
110	user_leds_s0: user_leds_s0 {
111		pins = "H0", "H1", "H2";
112		output-low;
113		microchip,digital;
114	};
115
116	user_buttons_s0: user_buttons_s0 {
117		pins = "B12", "B13", "B14";
118		microchip,digital;
119		input-enable;
120		bias-pull-up;
121	};
122
123	pinctrl_uart2: pinctrl_uart2 {
124		uart2-tx {
125			pins = "G9";
126			function = "U2TX";
127			microchip,digital;
128			output-high;
129		};
130		uart2-rx {
131			pins = "B0";
132			function = "U2RX";
133			microchip,digital;
134			input-enable;
135		};
136	};
137
138	pinctrl_uart4: uart4-0 {
139		uart4-tx {
140			pins = "C3";
141			function = "U4TX";
142			microchip,digital;
143			output-high;
144		};
145		uart4-rx {
146			pins = "E8";
147			function = "U4RX";
148			microchip,digital;
149			input-enable;
150		};
151	};
152};