Skip to contentSkip to conversation

LPC18xx DTS changes for 4.4

PATCH Superseded Joachim Eastwood 1 participant 17 messages Oct 1, 2015

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover LPC18xx DTS changes for 4.4

This patch set includes the DTS changes for lpc18xx for v4.4. Mostly additions of new nodes to lpc18xx.dtsi for drivers that when upstream during the last cycle and board updates to the Hitex and Embedded Artists boards.

Ariel D'Alessandro (3):
ARM: dts: lpc18xx: add watchdog node
ARM: dts: lpc18xx: add sct pwm node
ARM: dts: lpc4350-hitex-eval: add i2c0 and devices

Joachim Eastwood (13):
ARM: dts: lpc18xx: add rgu node
ARM: dts: lpc18xx: add spifi node
ARM: dts: lpc18xx: add dmac node
ARM: dts: lpc18xx: add dmamux node
ARM: dts: lpc18xx: add dma to ssp0/1
ARM: dts: lpc18xx: add dma to uart0/1/2/3
ARM: dts: lpc18xx: add i2c nodes
ARM: dts: lpc18xx: add resets entry to device nodes
ARM: dts: lpc4357-ea4357: add spifi and flash device
ARM: dts: lpc4357-ea4357: add ssp0
ARM: dts: lpc4357-ea4357: add i2c0 and devices
ARM: dts: lpc4350-hitex-eval: add spifi and flash device
ARM: dts: lpc4350-hitex-eval: add joystick, buttons and leds

 arch/arm/boot/dts/lpc18xx.dtsi              | 134 +++++++++++++++++++++
 arch/arm/boot/dts/lpc4350-hitex-eval.dts    | 175 ++++++++++++++++++++++++++++
 arch/arm/boot/dts/lpc4357-ea4357-devkit.dts |  95 +++++++++++++++
 3 files changed, 404 insertions(+)
Signature · 1 line
1.8.0
#1 lore raw

PATCH 1/16 ARM: dts: lpc18xx: add rgu node

Add the NXP LPC1850 RGU (Reset Generation Unit) reset controller node to the dtsi for all lpc18xx/43xx devices.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +8 -0
index 2c569a6ddc9a..29a62b600ae5 100644
@@ -178,6 +178,14 @@
 				      "base_ssp0_clk",  "base_sdio_clk";
 		};
 
+		rgu: reset-controller at 40053000 {
+			compatible = "nxp,lpc1850-rgu";
+			reg = <0x40053000 0x1000>;
+			clocks = <&cgu BASE_SAFE_CLK>, <&ccu1 CLK_CPU_BUS>;
+			clock-names = "delay", "reg";
+			#reset-cells = <1>;
+		};
+
 		uart0: serial at 40081000 {
 			compatible = "nxp,lpc1850-uart", "ns16550a";
 			reg = <0x40081000 0x1000>;
Signature · 1 line
1.8.0
#2 lore raw

PATCH 2/16 ARM: dts: lpc18xx: add spifi node

In reply to Joachim Eastwood

Add the NXP LPC1773 SPIFI (SPI Flash Interface) flash controller node to the dtsi for all lpc18xx/43xx devices.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +11 -0
index 29a62b600ae5..a428a0946be2 100644
@@ -68,6 +68,17 @@
 	};
 
 	soc {
+		spifi: flash-controller at 40003000 {
+			compatible = "nxp,lpc1773-spifi";
+			reg = <0x40003000 0x1000>, <0x14000000 0x4000000>;
+			reg-names = "spifi", "flash";
+			interrupts = <30>;
+			clocks = <&ccu1 CLK_SPIFI>, <&ccu1 CLK_CPU_SPIFI>;
+			clock-names = "spifi", "reg";
+			resets = <&rgu 53>;
+			status = "disabled";
+		};
+
 		mmcsd: mmcsd at 40004000 {
 			compatible = "snps,dw-mshc";
 			reg = <0x40004000 0x1000>;
Signature · 1 line
1.8.0
#3 lore raw

PATCH 3/16 ARM: dts: lpc18xx: add dmac node

In reply to Joachim Eastwood

Add the ARM PL080 DMA controller node to the dtsi for all lpc18xx/43xx devices.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +19 -0
index a428a0946be2..5516c3ee8c5a 100644
@@ -68,6 +68,25 @@
 	};
 
 	soc {
+		dmac: dma-controller at 40002000 {
+			compatible = "arm,pl080", "arm,primecell";
+			arm,primecell-periphid = <0x00041080>;
+			reg = <0x40002000 0x1000>;
+			interrupts = <2>;
+			clocks = <&ccu1 CLK_CPU_DMA>;
+			clock-names = "apb_pclk";
+			resets = <&rgu 19>;
+			#dma-cells = <2>;
+			dma-channels = <8>;
+			dma-requests = <16>;
+			lli-bus-interface-ahb1;
+			lli-bus-interface-ahb2;
+			mem-bus-interface-ahb1;
+			mem-bus-interface-ahb2;
+			memcpy-burst-size = <256>;
+			memcpy-bus-width = <32>;
+		};
+
 		spifi: flash-controller at 40003000 {
 			compatible = "nxp,lpc1773-spifi";
 			reg = <0x40003000 0x1000>, <0x14000000 0x4000000>;
Signature · 1 line
1.8.0
#4 lore raw

PATCH 4/16 ARM: dts: lpc18xx: add dmamux node

In reply to Joachim Eastwood

Add node for the DMA multiplexer placed in front of the PL080 DMA controller on lpc18xx/43xx devices.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +7 -0
index 5516c3ee8c5a..f0d1a099507f 100644
@@ -171,6 +171,13 @@
 				clocks = <&ccu1 CLK_USB0>;
 				#phy-cells = <0>;
 			};
+
+			dmamux: dma-mux at 11c {
+				compatible = "nxp,lpc1850-dmamux";
+				#dma-cells = <3>;
+				dma-requests = <64>;
+				dma-masters = <&dmac>;
+			};
 		};
 
 		cgu: clock-controller at 40050000 {
Signature · 1 line
1.8.0
#5 lore raw

PATCH 5/16 ARM: dts: lpc18xx: add dma to ssp0/1

In reply to Joachim Eastwood

Add dmas entries to the two SSP peripherals on LPC18xx/43xx devices so that DMA can be used to transfer data.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +13 -0
index f0d1a099507f..5b7ca7066161 100644
@@ -249,6 +249,9 @@
 			interrupts = <22>;
 			clocks = <&ccu2 CLK_APB0_SSP0>, <&ccu1 CLK_CPU_SSP0>;
 			clock-names = "sspclk", "apb_pclk";
+			dmas = <&dmamux  9 0 2
+				&dmamux 10 0 2>;
+			dma-names = "rx", "tx";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
@@ -326,6 +329,16 @@
 			interrupts = <23>;
 			clocks = <&ccu2 CLK_APB2_SSP1>, <&ccu1 CLK_CPU_SSP1>;
 			clock-names = "sspclk", "apb_pclk";
+			dmas = <&dmamux 11 2 2
+				&dmamux 12 2 2
+				&dmamux  3 3 2
+				&dmamux  4 3 2
+				&dmamux  5 2 2
+				&dmamux  6 2 2
+				&dmamux 13 2 2
+				&dmamux 14 2 2>;
+			dma-names = "rx", "tx", "tx", "rx",
+				    "tx", "rx", "rx", "tx";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
Signature · 1 line
1.8.0
#6 lore raw

PATCH 6/16 ARM: dts: lpc18xx: add dma to uart0/1/2/3

In reply to Joachim Eastwood

Add dmas entries to the four UART peripherals on LPC18xx/43xx devices so that DMA can be used to transfer data.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +16 -0
index 5b7ca7066161..f97feea5f5da 100644
@@ -230,6 +230,11 @@
 			interrupts = <24>;
 			clocks = <&ccu2 CLK_APB0_UART0>, <&ccu1 CLK_CPU_UART0>;
 			clock-names = "uartclk", "reg";
+			dmas = <&dmamux  1 1 2
+				&dmamux  2 1 2
+				&dmamux 11 2 2
+				&dmamux 12 2 2>;
+			dma-names = "tx", "rx", "tx", "rx";
 			status = "disabled";
 		};
 
@@ -240,6 +245,9 @@
 			interrupts = <25>;
 			clocks = <&ccu2 CLK_APB0_UART1>, <&ccu1 CLK_CPU_UART1>;
 			clock-names = "uartclk", "reg";
+			dmas = <&dmamux 3 1 2
+				&dmamux 4 1 2>;
+			dma-names = "tx", "rx";
 			status = "disabled";
 		};
 
@@ -294,6 +302,9 @@
 			interrupts = <26>;
 			clocks = <&ccu2 CLK_APB2_UART2>, <&ccu1 CLK_CPU_UART2>;
 			clock-names = "uartclk", "reg";
+			dmas = <&dmamux 5 1 2
+				&dmamux 6 1 2>;
+			dma-names = "tx", "rx";
 			status = "disabled";
 		};
 
@@ -304,6 +315,11 @@
 			interrupts = <27>;
 			clocks = <&ccu2 CLK_APB2_UART3>, <&ccu1 CLK_CPU_UART3>;
 			clock-names = "uartclk", "reg";
+			dmas = <&dmamux  7 1 2
+				&dmamux  8 1 2
+				&dmamux 13 3 2
+				&dmamux 14 3 2>;
+			dma-names = "tx", "rx", "rx", "tx";
 			status = "disabled";
 		};
 
Signature · 1 line
1.8.0
#7 lore raw

PATCH 7/16 ARM: dts: lpc18xx: add i2c nodes

In reply to Joachim Eastwood

Add NXP LPC1778 I2C controller nodes to the dtsi for all lpc18xx/43xx devices.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +22 -0
index f97feea5f5da..04bea2dc0e66 100644
@@ -287,6 +287,17 @@
 			clocks = <&ccu1 CLK_CPU_SCU>;
 		};
 
+		i2c0: i2c at 400a1000 {
+			compatible = "nxp,lpc1788-i2c";
+			reg = <0x400a1000 0x1000>;
+			interrupts = <18>;
+			clocks = <&ccu1 CLK_APB1_I2C0>;
+			resets = <&rgu 48>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		can1: can at 400a4000 {
 			compatible = "bosch,c_can";
 			reg = <0x400a4000 0x1000>;
@@ -360,6 +371,17 @@
 			status = "disabled";
 		};
 
+		i2c1: i2c at 400e0000 {
+			compatible = "nxp,lpc1788-i2c";
+			reg = <0x400e0000 0x1000>;
+			interrupts = <19>;
+			clocks = <&ccu1 CLK_APB3_I2C1>;
+			resets = <&rgu 49>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		can0: can at 400e2000 {
 			compatible = "bosch,c_can";
 			reg = <0x400e2000 0x1000>;
Signature · 1 line
1.8.0
#8 lore raw

PATCH 8/16 ARM: dts: lpc18xx: add watchdog node

In reply to Joachim Eastwood

From: Ariel D'Alessandro <[email protected]>

Add node for the watchdog timer found on LPC18xx/LPC43xx.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +8 -0
index 04bea2dc0e66..4ea82536a8a0 100644
@@ -223,6 +223,14 @@
 			#reset-cells = <1>;
 		};
 
+		watchdog at 40080000 {
+			compatible = "nxp,lpc1850-wwdt";
+			reg = <0x40080000 0x24>;
+			interrupts = <49>;
+			clocks = <&cgu BASE_SAFE_CLK>, <&ccu1 CLK_CPU_WWDT>;
+			clock-names = "wdtclk", "reg";
+		};
+
 		uart0: serial at 40081000 {
 			compatible = "nxp,lpc1850-uart", "ns16550a";
 			reg = <0x40081000 0x1000>;
Signature · 1 line
1.8.0
#9 lore raw

PATCH 9/16 ARM: dts: lpc18xx: add sct pwm node

In reply to Joachim Eastwood

From: Ariel D'Alessandro <[email protected]>

NXP LPC SoCs family, which includes LPC18xx/LPC43xx, provides a State Configurable Timer (SCT) which can be configured as a Pulse Width Modulator.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +10 -0
index 4ea82536a8a0..19c6f2951129 100644
@@ -68,6 +68,16 @@
 	};
 
 	soc {
+		sct_pwm: pwm at 40000000 {
+			compatible = "nxp,lpc1850-sct-pwm";
+			reg = <0x40000000 0x1000>;
+			clocks =<&ccu1 CLK_CPU_SCT>;
+			clock-names = "pwm";
+			resets = <&rgu 37>;
+			#pwm-cells = <3>;
+			status = "disabled";
+		};
+
 		dmac: dma-controller at 40002000 {
 			compatible = "arm,pl080", "arm,primecell";
 			arm,primecell-periphid = <0x00041080>;
Signature · 1 line
1.8.0
#10 lore raw

PATCH 10/16 ARM: dts: lpc18xx: add resets entry to device nodes

In reply to Joachim Eastwood

Most of the peripherals on LPC18xx/43xx devices have their reset lines hooked up to internal reset controller (RGU). Add reset entries to the device nodes so a driver can use the reset line.

---
 arch/arm/boot/dts/lpc18xx.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/boot/dts/lpc18xx.dtsi +20 -0
index 19c6f2951129..52591d83e8cd 100644
@@ -115,6 +115,7 @@
 			num-slots = <1>;
 			clocks = <&ccu2 CLK_SDIO>, <&ccu1 CLK_CPU_SDIO>;
 			clock-names = "ciu", "biu";
+			resets = <&rgu 20>;
 			status = "disabled";
 		};
 
@@ -123,6 +124,7 @@
 			reg = <0x40006100 0x100>;
 			interrupts = <8>;
 			clocks = <&ccu1 CLK_CPU_USB0>;
+			resets = <&rgu 17>;
 			phys = <&usb0_otg_phy>;
 			phy-names = "usb";
 			has-transaction-translator;
@@ -134,6 +136,7 @@
 			reg = <0x40007100 0x100>;
 			interrupts = <9>;
 			clocks = <&ccu1 CLK_CPU_USB1>;
+			resets = <&rgu 18>;
 			status = "disabled";
 		};
 
@@ -142,6 +145,7 @@
 			reg = <0x40005000 0x1000>;
 			clocks = <&ccu1 CLK_CPU_EMCDIV>, <&ccu1 CLK_CPU_EMC>;
 			clock-names = "mpmcclk", "apb_pclk";
+			resets = <&rgu 21>;
 			#address-cells = <2>;
 			#size-cells = <1>;
 			ranges = <0 0 0x1c000000 0x1000000
@@ -158,6 +162,7 @@
 			interrupt-names = "combined";
 			clocks = <&cgu BASE_LCD_CLK>, <&ccu1 CLK_CPU_LCD>;
 			clock-names = "clcdclk", "apb_pclk";
+			resets = <&rgu 16>;
 			status = "disabled";
 		};
 
@@ -168,6 +173,8 @@
 			interrupt-names	= "macirq";
 			clocks = <&ccu1 CLK_CPU_ETHERNET>;
 			clock-names = "stmmaceth";
+			resets = <&rgu 22>;
+			reset-names = "stmmaceth";
 			status = "disabled";
 		};
 
@@ -175,6 +182,7 @@
 			compatible = "nxp,lpc1850-creg", "syscon", "simple-mfd";
 			reg = <0x40043000 0x1000>;
 			clocks = <&ccu1 CLK_CPU_CREG>;
+			resets = <&rgu 5>;
 
 			usb0_otg_phy: phy at 004 {
 				compatible = "nxp,lpc1850-usb-otg-phy";
@@ -248,6 +256,7 @@
 			interrupts = <24>;
 			clocks = <&ccu2 CLK_APB0_UART0>, <&ccu1 CLK_CPU_UART0>;
 			clock-names = "uartclk", "reg";
+			resets = <&rgu 44>;
 			dmas = <&dmamux  1 1 2
 				&dmamux  2 1 2
 				&dmamux 11 2 2
@@ -263,6 +272,7 @@
 			interrupts = <25>;
 			clocks = <&ccu2 CLK_APB0_UART1>, <&ccu1 CLK_CPU_UART1>;
 			clock-names = "uartclk", "reg";
+			resets = <&rgu 45>;
 			dmas = <&dmamux 3 1 2
 				&dmamux 4 1 2>;
 			dma-names = "tx", "rx";
@@ -275,6 +285,7 @@
 			interrupts = <22>;
 			clocks = <&ccu2 CLK_APB0_SSP0>, <&ccu1 CLK_CPU_SSP0>;
 			clock-names = "sspclk", "apb_pclk";
+			resets = <&rgu 50>;
 			dmas = <&dmamux  9 0 2
 				&dmamux 10 0 2>;
 			dma-names = "rx", "tx";
@@ -289,6 +300,7 @@
 			interrupts = <12>;
 			clocks = <&ccu1 CLK_CPU_TIMER0>;
 			clock-names = "timerclk";
+			resets = <&rgu 32>;
 		};
 
 		timer1: timer at 40085000 {
@@ -297,6 +309,7 @@
 			interrupts = <13>;
 			clocks = <&ccu1 CLK_CPU_TIMER1>;
 			clock-names = "timerclk";
+			resets = <&rgu 33>;
 		};
 
 		pinctrl: pinctrl at 40086000 {
@@ -321,6 +334,7 @@
 			reg = <0x400a4000 0x1000>;
 			interrupts = <43>;
 			clocks = <&ccu1 CLK_APB1_CAN1>;
+			resets = <&rgu 54>;
 			status = "disabled";
 		};
 
@@ -331,6 +345,7 @@
 			interrupts = <26>;
 			clocks = <&ccu2 CLK_APB2_UART2>, <&ccu1 CLK_CPU_UART2>;
 			clock-names = "uartclk", "reg";
+			resets = <&rgu 46>;
 			dmas = <&dmamux 5 1 2
 				&dmamux 6 1 2>;
 			dma-names = "tx", "rx";
@@ -344,6 +359,7 @@
 			interrupts = <27>;
 			clocks = <&ccu2 CLK_APB2_UART3>, <&ccu1 CLK_CPU_UART3>;
 			clock-names = "uartclk", "reg";
+			resets = <&rgu 47>;
 			dmas = <&dmamux  7 1 2
 				&dmamux  8 1 2
 				&dmamux 13 3 2
@@ -358,6 +374,7 @@
 			interrupts = <14>;
 			clocks = <&ccu1 CLK_CPU_TIMER2>;
 			clock-names = "timerclk";
+			resets = <&rgu 34>;
 		};
 
 		timer3: timer at 400c4000 {
@@ -366,6 +383,7 @@
 			interrupts = <15>;
 			clocks = <&ccu1 CLK_CPU_TIMER3>;
 			clock-names = "timerclk";
+			resets = <&rgu 35>;
 		};
 
 		ssp1: spi at 400c5000 {
@@ -374,6 +392,7 @@
 			interrupts = <23>;
 			clocks = <&ccu2 CLK_APB2_SSP1>, <&ccu1 CLK_CPU_SSP1>;
 			clock-names = "sspclk", "apb_pclk";
+			resets = <&rgu 51>;
 			dmas = <&dmamux 11 2 2
 				&dmamux 12 2 2
 				&dmamux  3 3 2
@@ -405,6 +424,7 @@
 			reg = <0x400e2000 0x1000>;
 			interrupts = <51>;
 			clocks = <&ccu1 CLK_APB3_CAN0>;
+			resets = <&rgu 55>;
 			status = "disabled";
 		};
 
Signature · 1 line
1.8.0
#11 lore raw

PATCH 11/16 ARM: dts: lpc4357-ea4357: add spifi and flash device

In reply to Joachim Eastwood

The EA4357 dev kit has a Spansion S25FL016K SPI-NOR Flash connected to the SPIFI perherial.

---
 arch/arm/boot/dts/lpc4357-ea4357-devkit.dts | 46 +++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
arch/arm/boot/dts/lpc4357-ea4357-devkit.dts +46 -0
index 5f7bdad80963..9fcc0f357c2d 100644
@@ -363,6 +363,32 @@
 		};
 	};
 
+	spifi_pins: spifi-pins {
+		spifi_clk_cfg {
+			pins = "p3_3";
+			function = "spifi";
+			slew-rate = <1>;
+			bias-disable;
+			input-enable;
+			input-schmitt-disable;
+		};
+
+		spifi_mosi_miso_sio2_3_cfg {
+			pins = "p3_7", "p3_6", "p3_5", "p3_4";
+			function = "spifi";
+			slew-rate = <0>;
+			bias-disable;
+			input-enable;
+			input-schmitt-disable;
+		};
+
+		spifi_cs_cfg {
+			pins = "p3_8";
+			function = "spifi";
+			bias-disable;
+		};
+	};
+
 	uart0_pins: uart0-pins {
 		uart0_rx_cfg {
 			pins = "pf_11";
@@ -489,6 +515,26 @@
 	pinctrl-0 = <&sdmmc_pins>;
 };
 
+&spifi {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&spifi_pins>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-cpol;
+		spi-cpha;
+		spi-rx-bus-width = <4>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "data";
+			reg = <0 0x200000>;
+		};
+	};
+};
+
 &uart0 {
 	status = "okay";
 	pinctrl-names = "default";
Signature · 1 line
1.8.0
#12 lore raw

PATCH 12/16 ARM: dts: lpc4357-ea4357: add ssp0

In reply to Joachim Eastwood

The SSP0 can be found on the EA4357 Dev Kit on J15 pin 3-6.

---
 arch/arm/boot/dts/lpc4357-ea4357-devkit.dts | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
arch/arm/boot/dts/lpc4357-ea4357-devkit.dts +24 -0
index 9fcc0f357c2d..4d2d74a064c4 100644
@@ -389,6 +389,23 @@
 		};
 	};
 
+	ssp0_pins: ssp0-pins {
+		ssp0_sck_miso_mosi {
+			pins = "pf_0", "pf_2", "pf_3";
+			function = "ssp0";
+			slew-rate = <1>;
+			bias-pull-down;
+			input-enable;
+			input-schmitt-disable;
+		};
+
+		ssp0_ssel {
+			pins = "pf_1";
+			function = "ssp0";
+			bias-pull-up;
+		};
+	};
+
 	uart0_pins: uart0-pins {
 		uart0_rx_cfg {
 			pins = "pf_11";
@@ -535,6 +552,13 @@
 	};
 };
 
+&ssp0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&ssp0_pins>;
+	num-cs = <1>;
+};
+
 &uart0 {
 	status = "okay";
 	pinctrl-names = "default";
Signature · 1 line
1.8.0
#13 lore raw

PATCH 13/16 ARM: dts: lpc4357-ea4357: add i2c0 and devices

In reply to Joachim Eastwood

Add I2C0 and some of the I2C devices on the EA4357 dev kit.

---
 arch/arm/boot/dts/lpc4357-ea4357-devkit.dts | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm/boot/dts/lpc4357-ea4357-devkit.dts +25 -0
index 4d2d74a064c4..391121d24daa 100644
@@ -332,6 +332,14 @@
 		};
 	};
 
+	i2c0_pins: i2c0-pins {
+		i2c0_pins_cfg {
+			pins = "i2c0_scl", "i2c0_sda";
+			function = "i2c0";
+			input-enable;
+		};
+	};
+
 	sdmmc_pins: sdmmc-pins {
 		sdmmc_clk_cfg {
 			pins = "pc_0";
@@ -453,6 +461,23 @@
 	};
 };
 
+&i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	clock-frequency = <400000>;
+
+	lm75 at 48 {
+		compatible = "nxp,lm75";
+		reg = <0x48>;
+	};
+
+	eeprom at 57 {
+		compatible = "microchip,24c64";
+		reg = <0x57>;
+	};
+};
+
 &emc {
 	status = "okay";
 	pinctrl-names = "default";
Signature · 1 line
1.8.0
#14 lore raw

PATCH 14/16 ARM: dts: lpc4350-hitex-eval: add spifi and flash device

In reply to Joachim Eastwood

The Hitex LPC4350 eval board has a Spansion S25SL064P SPI-NOR Flash connected to the SPIFI perherial.

---
 arch/arm/boot/dts/lpc4350-hitex-eval.dts | 57 ++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
arch/arm/boot/dts/lpc4350-hitex-eval.dts +57 -0
index 32bc7ff4eb2a..c1dd76e5fc45 100644
@@ -186,6 +186,35 @@
 		};
 	};
 
+	spifi_pins: spifi-pins {
+		spifi_clk_cfg {
+			pins = "p3_3";
+			function = "spifi";
+			slew-rate = <1>;
+			bias-disable;
+			input-enable;
+			input-schmitt-disable;
+		};
+
+		spifi_mosi_miso_sio2_3_cfg {
+			pins = "p3_7", "p3_6", "p3_5", "p3_4";
+			function = "spifi";
+			slew-rate = <1>;
+			bias-disable;
+			input-enable;
+			input-schmitt-disable;
+		};
+
+		spifi_cs_cfg {
+			pins = "p3_8";
+			function = "spifi";
+			slew-rate = <1>;
+			bias-disable;
+			input-enable;
+			input-schmitt-disable;
+		};
+	};
+
 	uart0_pins: uart0-pins {
 		uart0_rx_cfg {
 			pins = "pf_11";
@@ -278,6 +307,34 @@
 	pinctrl-0 = <&enet_mii_pins>;
 };
 
+&spifi {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&spifi_pins>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-rx-bus-width = <4>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "bootloader";
+			reg = <0x000000 0x040000>; /* 256 KiB */
+		};
+
+		partition at 1 {
+			label = "kernel";
+			reg = <0x040000 0x2c0000>; /* 2.75 MiB */
+		};
+
+		partition at 2 {
+			label = "rootfs";
+			reg = <0x300000 0x500000>; /* 5 MiB */
+		};
+	};
+};
+
 &uart0 {
 	status = "okay";
 	pinctrl-names = "default";
Signature · 1 line
1.8.0
#15 lore raw

PATCH 15/16 ARM: dts: lpc4350-hitex-eval: add i2c0 and devices

In reply to Joachim Eastwood

From: Ariel D'Alessandro <[email protected]>

Add the I2C0 bus and the some of the I2C devices on the Hitex LPC4350 eval board.

---
 arch/arm/boot/dts/lpc4350-hitex-eval.dts | 33 ++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
arch/arm/boot/dts/lpc4350-hitex-eval.dts +33 -0
index c1dd76e5fc45..5c529f45947b 100644
@@ -186,6 +186,14 @@
 		};
 	};
 
+	i2c0_pins: i2c0-pins {
+		i2c0_pins_cfg {
+			pins = "i2c0_scl", "i2c0_sda";
+			function = "i2c0";
+			input-enable;
+		};
+	};
+
 	spifi_pins: spifi-pins {
 		spifi_clk_cfg {
 			pins = "p3_3";
@@ -300,6 +308,31 @@
 	clock-frequency = <25000000>;
 };
 
+&i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	clock-frequency = <400000>;
+
+	/* NXP SE97BTP with temperature sensor + eeprom */
+	sensor at 18 {
+		compatible = "nxp,jc42";
+		reg = <0x18>;
+	};
+
+	eeprom at 50 {
+		compatible = "nxp,24c02";
+		reg = <0x50>;
+	};
+
+	pca_gpio: gpio at 24 {
+		compatible = "nxp,pca9673";
+		reg = <0x24>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+};
+
 &mac {
 	status = "okay";
 	phy-mode = "mii";
Signature · 1 line
1.8.0
#16 lore raw

PATCH 16/16 ARM: dts: lpc4350-hitex-eval: add joystick, buttons and leds

In reply to Joachim Eastwood

Add the joystick, buttons and LEDs connected to the I2C I/O expander.

---
 arch/arm/boot/dts/lpc4350-hitex-eval.dts | 85 ++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)
arch/arm/boot/dts/lpc4350-hitex-eval.dts +85 -0
index 5c529f45947b..022d495432c1 100644
@@ -15,6 +15,9 @@
 #include "lpc18xx.dtsi"
 #include "lpc4350.dtsi"
 
+#include "dt-bindings/input/input.h"
+#include "dt-bindings/gpio/gpio.h"
+
 / {
 	model = "Hitex LPC4350 Evaluation Board";
 	compatible = "hitex,lpc4350-eval-board", "nxp,lpc4350";
@@ -34,6 +37,88 @@
 		device_type = "memory";
 		reg = <0x28000000 0x800000>; /* 8 MB */
 	};
+
+	pca_buttons {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <100>;
+		autorepeat;
+
+		button at 0 {
+			label = "joy:right";
+			linux,code = <KEY_RIGHT>;
+			gpios = <&pca_gpio 8 GPIO_ACTIVE_LOW>;
+		};
+
+		button at 1 {
+			label = "joy:up";
+			linux,code = <KEY_UP>;
+			gpios = <&pca_gpio 9 GPIO_ACTIVE_LOW>;
+		};
+
+
+		button at 2 {
+			label = "joy:enter";
+			linux,code = <KEY_ENTER>;
+			gpios = <&pca_gpio 10 GPIO_ACTIVE_LOW>;
+		};
+
+		button at 3 {
+			label = "joy:left";
+			linux,code = <KEY_LEFT>;
+			gpios = <&pca_gpio 11 GPIO_ACTIVE_LOW>;
+		};
+
+		button at 4 {
+			label = "joy:down";
+			linux,code = <KEY_DOWN>;
+			gpios = <&pca_gpio 12 GPIO_ACTIVE_LOW>;
+		};
+
+		button at 5 {
+			label = "user:sw3";
+			linux,code = <KEY_F1>;
+			gpios = <&pca_gpio 13 GPIO_ACTIVE_LOW>;
+		};
+
+		button at 6 {
+			label = "user:sw4";
+			linux,code = <KEY_F2>;
+			gpios = <&pca_gpio 14 GPIO_ACTIVE_LOW>;
+		};
+
+		button at 7 {
+			label = "user:sw5";
+			linux,code = <KEY_F3>;
+			gpios = <&pca_gpio 15 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	pca_leds {
+		compatible = "gpio-leds";
+
+		led0 {
+			label = "ext:led0";
+			gpios = <&pca_gpio 0 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "heartbeat";
+		};
+
+		led1 {
+			label = "ext:led1";
+			gpios = <&pca_gpio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		led2 {
+			label = "ext:led2";
+			gpios = <&pca_gpio 2 GPIO_ACTIVE_LOW>;
+		};
+
+		led3 {
+			label = "ext:led3";
+			gpios = <&pca_gpio 3 GPIO_ACTIVE_LOW>;
+		};
+	};
 };
 
 &pinctrl {
Signature · 1 line
1.8.0