From 52d7c42664e6348fbe5fc062590bb8f152b65d94 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Tue, 28 Apr 2015 00:41:09 +0200 Subject: [PATCH 01/12] ARM: dts: lpc18xx: add creg-clk node Add node for the creg clock controller and change the input clock on cgu to use it. Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc18xx.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi index 053a1f54f4bb..0b59eae1608d 100644 --- a/arch/arm/boot/dts/lpc18xx.dtsi +++ b/arch/arm/boot/dts/lpc18xx.dtsi @@ -195,6 +195,12 @@ creg: syscon@40043000 { clocks = <&ccu1 CLK_CPU_CREG>; resets = <&rgu 5>; + creg_clk: clock-controller { + compatible = "nxp,lpc1850-creg-clk"; + clocks = <&xtal32>; + #clock-cells = <1>; + }; + usb0_otg_phy: phy@004 { compatible = "nxp,lpc1850-usb-otg-phy"; clocks = <&ccu1 CLK_USB0>; @@ -213,7 +219,7 @@ cgu: clock-controller@40050000 { compatible = "nxp,lpc1850-cgu"; reg = <0x40050000 0x1000>; #clock-cells = <1>; - clocks = <&xtal>, <&xtal32>, <&enet_rx_clk>, <&enet_tx_clk>, <&gp_clkin>; + clocks = <&xtal>, <&creg_clk 1>, <&enet_rx_clk>, <&enet_tx_clk>, <&gp_clkin>; }; ccu1: clock-controller@40051000 { From 246fee6cb7a1d2a283e1e16e77e783300574d0b5 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Thu, 2 Apr 2015 05:32:34 +0200 Subject: [PATCH 02/12] ARM: dts: lpc18xx: add rtc node Add node for the internal RTC found on all lpc18xx SoCs. Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc18xx.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi index 0b59eae1608d..e27029425d18 100644 --- a/arch/arm/boot/dts/lpc18xx.dtsi +++ b/arch/arm/boot/dts/lpc18xx.dtsi @@ -215,6 +215,14 @@ dmamux: dma-mux@11c { }; }; + rtc: rtc@40046000 { + compatible = "nxp,lpc1850-rtc", "nxp,lpc1788-rtc"; + reg = <0x40046000 0x1000>; + interrupts = <47>; + clocks = <&creg_clk 0>, <&ccu1 CLK_CPU_BUS>; + clock-names = "rtc", "reg"; + }; + cgu: clock-controller@40050000 { compatible = "nxp,lpc1850-cgu"; reg = <0x40050000 0x1000>; From e162f9c2c65f8178420abb70ebbfc19ea0c51b52 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Sun, 28 Feb 2016 20:20:54 +0100 Subject: [PATCH 03/12] ARM: dts: lpc18xx: add adc nodes Add nodes for the two 10-bit ADCs found on all lpc18xx SoCs. Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc18xx.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi index e27029425d18..88d27ae32dfb 100644 --- a/arch/arm/boot/dts/lpc18xx.dtsi +++ b/arch/arm/boot/dts/lpc18xx.dtsi @@ -453,6 +453,24 @@ can0: can@400e2000 { status = "disabled"; }; + adc0: adc@400e3000 { + compatible = "nxp,lpc1850-adc"; + reg = <0x400e3000 0x1000>; + interrupts = <17>; + clocks = <&ccu1 CLK_APB3_ADC0>; + resets = <&rgu 40>; + status = "disabled"; + }; + + adc1: adc@400e4000 { + compatible = "nxp,lpc1850-adc"; + reg = <0x400e4000 0x1000>; + interrupts = <21>; + clocks = <&ccu1 CLK_APB3_ADC1>; + resets = <&rgu 41>; + status = "disabled"; + }; + gpio: gpio@400f4000 { compatible = "nxp,lpc1850-gpio"; reg = <0x400f4000 0x4000>; From 8c938004f529b954db1d8e7b2800d728f4de8667 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Sun, 28 Feb 2016 23:48:18 +0100 Subject: [PATCH 04/12] ARM: dts: lpc18xx: add dac node Add node for the 10-bit DAC found on all lpc18xx SoCs. Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc18xx.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi index 88d27ae32dfb..fdc991bedd37 100644 --- a/arch/arm/boot/dts/lpc18xx.dtsi +++ b/arch/arm/boot/dts/lpc18xx.dtsi @@ -444,6 +444,15 @@ i2c1: i2c@400e0000 { status = "disabled"; }; + dac: dac@400e1000 { + compatible = "nxp,lpc1850-dac"; + reg = <0x400e1000 0x1000>; + interrupts = <0>; + clocks = <&ccu1 CLK_APB3_DAC>; + resets = <&rgu 42>; + status = "disabled"; + }; + can0: can@400e2000 { compatible = "bosch,c_can"; reg = <0x400e2000 0x1000>; From 5f2d9d18b2400590ffa1253a689fc22c87e58302 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Sun, 28 Feb 2016 20:47:20 +0100 Subject: [PATCH 05/12] ARM: dts: lpc4357-ea4357: add adc0 Enable adc0 on EA4357 dev kit. This kit has a 22k potentiometer (R94) connected on ADC0 channel 3. Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc4357-ea4357-devkit.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts b/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts index 079d3cf8c00b..bbc70b94d1c3 100644 --- a/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts +++ b/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts @@ -38,6 +38,13 @@ memory { reg = <0x28000000 0x2000000>; /* 32 MB */ }; + vcc: vcc_fixed { + compatible = "regulator-fixed"; + regulator-name = "3v3-supply"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + /* vmmc is controlled by sdmmc host internally */ vmmc: vmmc_fixed { compatible = "regulator-fixed"; @@ -461,6 +468,11 @@ usb0_pwr_fault { }; }; +&adc0 { + status = "okay"; + vref-supply = <&vcc>; +}; + &i2c0 { status = "okay"; pinctrl-names = "default"; From 31b8f1af5a055a968999e88cdb16622f7bbf38df Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Mon, 29 Feb 2016 07:07:15 +0100 Subject: [PATCH 06/12] ARM: dts: lpc4357-ea4357: add dac Enable the DAC on the EA4357 dev kit. Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc4357-ea4357-devkit.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts b/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts index bbc70b94d1c3..a211b6ef538d 100644 --- a/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts +++ b/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts @@ -495,6 +495,11 @@ eeprom@57 { }; }; +&dac { + status = "okay"; + vref-supply = <&vcc>; +}; + &emc { status = "okay"; pinctrl-names = "default"; From 7e7a3e9c892ab798da2be67fe842b77f3bdee317 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Tue, 1 Mar 2016 16:53:06 +0100 Subject: [PATCH 07/12] ARM: dts: lpc4350-hitex-eval: add adc1 Enable adc1 on LPC4350 Hitex Evalution board. This board has a 10k potensiometer (R26) connected to ADC1 channel 2. Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc4350-hitex-eval.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/boot/dts/lpc4350-hitex-eval.dts b/arch/arm/boot/dts/lpc4350-hitex-eval.dts index 022d495432c1..6d0c698a6d94 100644 --- a/arch/arm/boot/dts/lpc4350-hitex-eval.dts +++ b/arch/arm/boot/dts/lpc4350-hitex-eval.dts @@ -119,9 +119,25 @@ led3 { gpios = <&pca_gpio 3 GPIO_ACTIVE_LOW>; }; }; + + vcc: vcc_fixed { + compatible = "regulator-fixed"; + regulator-name = "3v3io"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; }; &pinctrl { + adc1_pins: adc1-pins { + adc1_pins_cfg { + pins = "pf_9"; + function = "adc"; + input-disable; + bias-disable; + }; + }; + emc_pins: emc-pins { emc_addr0_23_cfg { pins = "p2_9", "p2_10", "p2_11", "p2_12", @@ -325,6 +341,13 @@ uart0_tx_cfg { }; }; +&adc1 { + status = "okay"; + vref-supply = <&vcc>; + pinctrl-names = "default"; + pinctrl-0 = <&adc1_pins>; +}; + &emc { status = "okay"; pinctrl-names = "default"; From fae6bd7090283dccc1487b997e6dea4529cbf839 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Fri, 11 Mar 2016 18:46:33 +0100 Subject: [PATCH 08/12] ARM: dts: armv7-m: add unit name to interrupt-controller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add unit name to nvic to remove the following warning: Warning (unit_address_vs_reg): Node /nv-interrupt-controller has a reg or ranges property, but no unit name Also correct the node name to 'interrupt-controller' while changing the line. Signed-off-by: Joachim Eastwood Acked-by: Uwe Kleine-König Acked-by: Stefan Agner --- arch/arm/boot/dts/armv7-m.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/armv7-m.dtsi b/arch/arm/boot/dts/armv7-m.dtsi index b1ad7cf6ac02..16331aa79775 100644 --- a/arch/arm/boot/dts/armv7-m.dtsi +++ b/arch/arm/boot/dts/armv7-m.dtsi @@ -1,7 +1,7 @@ #include "skeleton.dtsi" / { - nvic: nv-interrupt-controller { + nvic: interrupt-controller@e000e100 { compatible = "arm,armv7m-nvic"; interrupt-controller; #interrupt-cells = <1>; From 472a5a3ddf86725f87432d70462e3ce6dc3996b6 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Sat, 27 Feb 2016 19:39:03 +0100 Subject: [PATCH 09/12] ARM: dts: lpc18xx: remove unit addresses from creg childs DT nodes without reg properties should not have a unit address. This fixes the following warnings from dtc. Warning (unit_address_vs_reg): Node /soc/syscon@40043000/phy@004 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /soc/syscon@40043000/dma-mux@11c has a unit name, but no reg property Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc18xx.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi index fdc991bedd37..fdb736c82045 100644 --- a/arch/arm/boot/dts/lpc18xx.dtsi +++ b/arch/arm/boot/dts/lpc18xx.dtsi @@ -201,13 +201,13 @@ creg_clk: clock-controller { #clock-cells = <1>; }; - usb0_otg_phy: phy@004 { + usb0_otg_phy: phy { compatible = "nxp,lpc1850-usb-otg-phy"; clocks = <&ccu1 CLK_USB0>; #phy-cells = <0>; }; - dmamux: dma-mux@11c { + dmamux: dma-mux { compatible = "nxp,lpc1850-dmamux"; #dma-cells = <3>; dma-requests = <64>; From eeadc20c6a4e700c80d26e10e9e2c49fd551b2d4 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Fri, 11 Mar 2016 19:05:03 +0100 Subject: [PATCH 10/12] ARM: dts: lpc4357-ea4357: fix unit name warnings from dtc Fix the following warnings from dtc by either adding or removing the unit name from the node. Warning (unit_address_vs_reg): Node /soc/flash-controller@40003000/flash@0 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /gpio_joystick/button@0 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /gpio_joystick/button@1 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /gpio_joystick/button@2 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /gpio_joystick/button@3 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /gpio_joystick/button@4 has a unit name, but no reg property Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc4357-ea4357-devkit.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts b/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts index a211b6ef538d..1919be4dab2b 100644 --- a/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts +++ b/arch/arm/boot/dts/lpc4357-ea4357-devkit.dts @@ -62,31 +62,31 @@ gpio_joystick { poll-interval = <100>; autorepeat; - button@0 { + button0 { label = "joy_enter"; linux,code = ; gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>; }; - button@1 { + button1 { label = "joy_left"; linux,code = ; gpios = <&gpio LPC_GPIO(4,9) GPIO_ACTIVE_LOW>; }; - button@2 { + button2 { label = "joy_up"; linux,code = ; gpios = <&gpio LPC_GPIO(4,10) GPIO_ACTIVE_LOW>; }; - button@3 { + button3 { label = "joy_right"; linux,code = ; gpios = <&gpio LPC_GPIO(4,12) GPIO_ACTIVE_LOW>; }; - button@4 { + button4 { label = "joy_down"; linux,code = ; gpios = <&gpio LPC_GPIO(4,13) GPIO_ACTIVE_LOW>; @@ -584,7 +584,7 @@ &spifi { pinctrl-names = "default"; pinctrl-0 = <&spifi_pins>; - flash@0 { + flash { compatible = "jedec,spi-nor"; spi-cpol; spi-cpha; From 3a572c4aa96d6c7831fa1798152241ce24d720c2 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Fri, 11 Mar 2016 19:05:47 +0100 Subject: [PATCH 11/12] ARM: dts: lpc4350-hitex-eval: fix unit name warnings from dtc Fix the following warnings from dtc by either adding or removing the unit name from the node. Warning (unit_address_vs_reg): Node /soc/flash-controller@40003000/flash@0 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /pca_buttons/button@0 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /pca_buttons/button@1 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /pca_buttons/button@2 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /pca_buttons/button@3 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /pca_buttons/button@4 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /pca_buttons/button@5 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /pca_buttons/button@6 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /pca_buttons/button@7 has a unit name, but no reg property Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc4350-hitex-eval.dts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/lpc4350-hitex-eval.dts b/arch/arm/boot/dts/lpc4350-hitex-eval.dts index 6d0c698a6d94..6c9048d4d03c 100644 --- a/arch/arm/boot/dts/lpc4350-hitex-eval.dts +++ b/arch/arm/boot/dts/lpc4350-hitex-eval.dts @@ -45,50 +45,50 @@ pca_buttons { poll-interval = <100>; autorepeat; - button@0 { + button0 { label = "joy:right"; linux,code = ; gpios = <&pca_gpio 8 GPIO_ACTIVE_LOW>; }; - button@1 { + button1 { label = "joy:up"; linux,code = ; gpios = <&pca_gpio 9 GPIO_ACTIVE_LOW>; }; - button@2 { + button2 { label = "joy:enter"; linux,code = ; gpios = <&pca_gpio 10 GPIO_ACTIVE_LOW>; }; - button@3 { + button3 { label = "joy:left"; linux,code = ; gpios = <&pca_gpio 11 GPIO_ACTIVE_LOW>; }; - button@4 { + button4 { label = "joy:down"; linux,code = ; gpios = <&pca_gpio 12 GPIO_ACTIVE_LOW>; }; - button@5 { + button5 { label = "user:sw3"; linux,code = ; gpios = <&pca_gpio 13 GPIO_ACTIVE_LOW>; }; - button@6 { + button6 { label = "user:sw4"; linux,code = ; gpios = <&pca_gpio 14 GPIO_ACTIVE_LOW>; }; - button@7 { + button7 { label = "user:sw5"; linux,code = ; gpios = <&pca_gpio 15 GPIO_ACTIVE_LOW>; @@ -453,7 +453,7 @@ &spifi { pinctrl-names = "default"; pinctrl-0 = <&spifi_pins>; - flash@0 { + flash { compatible = "jedec,spi-nor"; spi-rx-bus-width = <4>; #address-cells = <1>; From 1db7f6201dfce1740e41f87c81389cc2e9c73e99 Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Wed, 24 Feb 2016 23:10:42 +0100 Subject: [PATCH 12/12] dt-bindings: phy-lpc18xx-usb-otg: remove unit address from binding DT bindings should either use a unit address and a reg property or none of them. Since either of them aren't really useful for such a simple device like this one remove the unit address. Signed-off-by: Joachim Eastwood Acked-by: Rob Herring --- Documentation/devicetree/bindings/phy/phy-lpc18xx-usb-otg.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/phy/phy-lpc18xx-usb-otg.txt b/Documentation/devicetree/bindings/phy/phy-lpc18xx-usb-otg.txt index bd61b467e30a..3bb821cd6a7f 100644 --- a/Documentation/devicetree/bindings/phy/phy-lpc18xx-usb-otg.txt +++ b/Documentation/devicetree/bindings/phy/phy-lpc18xx-usb-otg.txt @@ -18,7 +18,7 @@ creg: syscon@40043000 { compatible = "nxp,lpc1850-creg", "syscon", "simple-mfd"; reg = <0x40043000 0x1000>; - usb0_otg_phy: phy@004 { + usb0_otg_phy: phy { compatible = "nxp,lpc1850-usb-otg-phy"; clocks = <&ccu1 CLK_USB0>; #phy-cells = <0>;