Эх сурвалжийг харах

Merge pull request #164 in PROCESSOR-SDK/processor-sdk-linux from v4.19/bbb-cape to processor-sdk-linux-4.19.y

* commit 'd2619a4398c047fd21085d9cd306c3a71a4018e5':
  ti_config_fragments: am33xx_only: enable spidev module
  ARM: dts: am335x-boneblack-iot-cape: add custom device tree
  ARM: dts: am335x-boneblack-spi0: add spi0 configuration
Jacob Stiffler 6 жил өмнө
parent
commit
ed81c3db07

+ 15 - 0
arch/arm/boot/dts/am335x-boneblack-iot-cape.dts

@@ -0,0 +1,15 @@
+/*
+ * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "am335x-boneblack.dts"
+#include "am335x-boneblack-spi0.dtsi"
+
+/ {
+	model = "TI AM335x BeagleBone Black for LPRF";
+	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
+};

+ 50 - 0
arch/arm/boot/dts/am335x-boneblack-spi0.dtsi

@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+&am33xx_pinmux {
+	bb_spi0_pins: pinmux_bb_spi0_pins {
+		pinctrl-single,pins = <
+			0x150 0x30	/* spi0_sclk.spi0_sclk, INPUT_PULLUP | MODE0 */
+			0x154 0x30	/* spi0_d0.spi0_d0, INPUT_PULLUP | MODE0 */
+			0x158 0x10	/* spi0_d1.spi0_d1, OUTPUT_PULLUP | MODE0 */
+			0x15c 0x10	/* spi0_cs0.spi0_cs0, OUTPUT_PULLUP | MODE0 */
+		>;
+	};
+};
+
+&spi0 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&bb_spi0_pins>;
+
+
+	channel@0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		compatible = "spidev";
+
+		reg = <0>;
+		spi-max-frequency = <16000000>;
+		spi-cpha;
+	};
+
+
+	channel@1 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		compatible = "spidev";
+
+		reg = <1>;
+		spi-max-frequency = <16000000>;
+	};
+};

+ 3 - 0
ti_config_fragments/am33xx_only.cfg

@@ -17,3 +17,6 @@ CONFIG_CPUSETS=n
 
 # Increase CMA for HDMI
 CONFIG_CMA_SIZE_MBYTES=48
+
+# Enable spidev module
+CONFIG_SPI_SPIDEV=m