add NPCM7xx adc and dts patches to dev-4.19
Subsystems (3)
Tomer Maimon
maintainercover add NPCM7xx adc and dts patches to dev-4.19
Hi Joel,
I hope it is the last patch set
Please add the following NPCM7xx patches to dev-4.19:
1. Modification for NPCM7xx Device tree.
2. Modification for NPCM ADC driver.
The patch sets with GCC 8.2.0 version.
Appreciate your support!
Tomer
Tomer Maimon (3):
dt-binding: iio: Modify NPCM ADC documentation
iio: adc: Modify NPCM ADC driver
dts: npcm7xx: Modify NPCM7xx device tree
.../bindings/iio/adc/nuvoton,npcm-adc.txt | 16 +- arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 199 ++++++++++++--------- arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 165 ++++++++++++----- arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi | 18 +- arch/arm/boot/dts/nuvoton-npcm750.dtsi | 10 +- drivers/iio/adc/npcm_adc.c | 133 +++++++------- 6 files changed, 323 insertions(+), 218 deletions(-)
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 1/3 dt-binding: iio: Modify NPCM ADC documentation
Removing unnecessary spaces in NPCM ADC documentation.
--- .../devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt +8 -8
@@ -3,16 +3,16 @@ Nuvoton NPCM Analog to Digital Converter (ADC) The NPCM ADC is a 10-bit converter for eight channel inputs. Required properties: -- compatible : "nuvoton,npcm750-adc" for the NPCM7XX BMC. -- reg : specifies physical base address and size of the registers. -- interrupts : Contain the ADC interrupt with flags for falling edge. +- compatible: "nuvoton,npcm750-adc" for the NPCM7XX BMC. +- reg: specifies physical base address and size of the registers. +- interrupts: Contain the ADC interrupt with flags for falling edge. Optional properties: -- clocks : phandle of ADC reference clock, in case the clock is not - added the ADC will use the default ADC sample rate. -- vref-supply : The regulator supply ADC reference voltage, in case the - vref-supply is not added the ADC will use internal voltage - reference. +- clocks: phandle of ADC reference clock, in case the clock is not + added the ADC will use the default ADC sample rate. +- vref-supply: The regulator supply ADC reference voltage, in case the + vref-supply is not added the ADC will use internal voltage + reference. Required Node in the NPCM7xx BMC: An additional register is present in the NPCM7xx SOC which is
Signature · 1 line
2.14.1
Re: [linux dev-4.19 1/3] dt-binding: iio: Modify NPCM ADC documentation
Quoted 2 lines · Tomer Maimon
Removing unnecessary spaces in NPCM ADC documentation.
Series merged.
Try to avoid "Modify X" as your commit message, and instead say why you're modifying the file. I tweaked them for you when applying in this case.
Cheers,
Joel
Tomer Maimon
maintainerPATCH 2/3 iio: adc: Modify NPCM ADC driver
In reply to Tomer MaimonModify Nuvoton NPCM BMC ADC driver as follow:
- Return error if clock have not found in the device tree ADC node.
- Modify regulator order for avoid mixing devm and non-devm path.
- Modify probe and remove function to have relative ordering.
- Add NPCM prefix.
- Remove unnecessary parameter initialization.
- Modify read function to avoid racy condition.
- Reading the reference voltage when needed.
--- drivers/iio/adc/npcm_adc.c | 133 ++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 67 deletions(-)
drivers/iio/adc/npcm_adc.c +66 -67
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -// Copyright (c) 2016-2018 Nuvoton Technology corporation. +// Copyright (c) 2019 Nuvoton Technology corporation. #include <linux/clk.h> #include <linux/device.h>
@@ -16,7 +16,6 @@#include <linux/uaccess.h> struct npcm_adc { -u32 vref_mv;bool int_status;u32 adc_sample_hz;struct device *dev;
@@ -28,8 +27,8 @@ struct npcm_adc { };/* NPCM7xx reset module */ -#define IPSRST1_OFFSET 0x020 -#define IPSRST1_ADC_RST BIT(27) +#define NPCM7XX_IPSRST1_OFFSET 0x020 +#define NPCM7XX_IPSRST1_ADC_RST BIT(27)/* ADC registers */ #define NPCM_ADCCON 0x00
@@ -53,15 +52,15 @@ struct npcm_adc {/* ADC General Definition */ #define NPCM_RESOLUTION_BITS 10 -#define ADC_DEFAULT_SAMPLE_RATE 12500000 -#define INT_VREF_MV 2000 +#define NPCM_INT_VREF_MV 2000#define NPCM_ADC_CHAN (ch) { \ .type = IIO_VOLTAGE, \ .indexed = 1, \ .channel = ch, \ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ - .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) | \ + BIT(IIO_CHAN_INFO_SAMP_FREQ), \ }static const struct iio_chan_spec npcm_adc_iio_channels[] = {
@@ -77,7 +76,7 @@ static const struct iio_chan_spec npcm_adc_iio_channels[] = {static irqreturn_t npcm_adc_isr (int irq,void *data) { -u32 regtemp =0 ; +u32 regtemp;struct iio_dev *indio_dev = data;struct npcm_adc *info =iio_priv (indio_dev);
@@ -94,28 +93,29 @@ static irqreturn_t npcm_adc_isr(int irq, void *data)static int npcm_adc_read (struct npcm_adc *info,int *val,u8 channel) {int ret; -u32 regtemp =0 ; +u32 regtemp; -/* Select ADC channal */ +/* Select ADC channel */ regtemp =ioread32 (info->regs +NPCM_ADCCON ); regtemp &= ~NPCM_ADCCON_CH_MASK ; + info->int_status = false;iowrite32 (regtemp |NPCM_ADCCON_CH (channel) |NPCM_ADCCON_ADC_CONV , info->regs +NPCM_ADCCON ); - info->int_status = false; ret =wait_event_interruptible_timeout (info->wq, info->int_status,msecs_to_jiffies (10 ));if (ret ==0 ) { regtemp =ioread32 (info->regs +NPCM_ADCCON );if ((regtemp &NPCM_ADCCON_ADC_CONV ) && info->rst_regmap) {/* if conversion failed - reset ADC module */ -regmap_write (info->rst_regmap,IPSRST1_OFFSET , -IPSRST1_ADC_RST ); +regmap_write (info->rst_regmap,NPCM7XX_IPSRST1_OFFSET , +NPCM7XX_IPSRST1_ADC_RST );msleep (100 ); -regmap_write (info->rst_regmap,IPSRST1_OFFSET ,0x0 ); +regmap_write (info->rst_regmap,NPCM7XX_IPSRST1_OFFSET , +0x0 );msleep (100 ); -/* Enable ADC and start conversion Module */ +/* Enable ADC and start conversion module */ iowrite32 (NPCM_ADC_ENABLE |NPCM_ADCCON_ADC_CONV , info->regs +NPCM_ADCCON );dev_err (info->dev,"RESET ADC Complete\n" );
@@ -135,21 +135,26 @@ static int npcm_adc_read_raw(struct iio_dev *indio_dev, int *val2, long mask) { int ret; +int vref_uv;struct npcm_adc *info =iio_priv (indio_dev);switch (mask) {case IIO_CHAN_INFO_RAW :mutex_lock (&indio_dev->mlock); ret =npcm_adc_read (info, val, chan->channel); +mutex_unlock (&indio_dev->mlock);if (ret) {dev_err (info->dev,"NPCM ADC read failed\n" ); -mutex_unlock (&indio_dev->mlock);return ret; } -mutex_unlock (&indio_dev->mlock);return IIO_VAL_INT ;case IIO_CHAN_INFO_SCALE : - *val = info->vref_mv; +if (info->vref) { + vref_uv =regulator_get_voltage (info->vref); + *val = vref_uv /1000 ; + }else { + *val =NPCM_INT_VREF_MV ; + } *val2 =NPCM_RESOLUTION_BITS ;return IIO_VAL_FRACTIONAL_LOG2 ;case IIO_CHAN_INFO_SAMP_FREQ :
@@ -198,17 +203,16 @@ static int npcm_adc_probe(struct platform_device *pdev) info->adc_clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (info->adc_clk)) { -dev_warn (&pdev->dev,"ADC clock failed: can't read clk, Assuming ADC clock Rate 12.5MHz\n" ); - info->adc_sample_hz =ADC_DEFAULT_SAMPLE_RATE ; - }else { -/* calculate ADC clock sample rate */ - reg_con =ioread32 (info->regs +NPCM_ADCCON ); - div = reg_con &NPCM_ADCCON_DIV_MASK ; - div = div >>NPCM_ADCCON_DIV_SHIFT ; - info->adc_sample_hz =clk_get_rate (info->adc_clk) / - ((div +1 ) *2 ); +dev_warn (&pdev->dev,"ADC clock failed: can't read clk\n" ); +return PTR_ERR (info->adc_clk); } +/* calculate ADC clock sample rate */ + reg_con =ioread32 (info->regs +NPCM_ADCCON ); + div = reg_con &NPCM_ADCCON_DIV_MASK ; + div = div >>NPCM_ADCCON_DIV_SHIFT ; + info->adc_sample_hz =clk_get_rate (info->adc_clk) / ((div +1 ) *2 ); +if (of_device_is_compatible (np,"nuvoton,npcm750-adc" )) { info->rst_regmap =syscon_regmap_lookup_by_compatible ("nuvoton,npcm750-rst" );
@@ -219,6 +223,20 @@ static int npcm_adc_probe(struct platform_device *pdev) } } + irq =platform_get_irq (pdev,0 ); +if (irq <=0 ) { +dev_err (dev,"failed getting interrupt resource\n" ); + ret = -EINVAL ; + goto err_disable_clk; + } + + ret =devm_request_irq (&pdev->dev, irq, npcm_adc_isr,0 , +"NPCM_ADC" , indio_dev); +if (ret <0 ) { +dev_err (dev,"failed requesting interrupt\n" ); + goto err_disable_clk; + } + reg_con =ioread32 (info->regs +NPCM_ADCCON ); info->vref =devm_regulator_get_optional (&pdev->dev,"vref" );if (!IS_ERR (info->vref)) {
@@ -228,41 +246,33 @@ static int npcm_adc_probe(struct platform_device *pdev) goto err_disable_clk; } - ret =regulator_get_voltage (info->vref); -if (ret <0 ) - goto err_disable_vref_reg; - - info->vref_mv = ret /1000 ;iowrite32 (reg_con & ~NPCM_ADCCON_REFSEL , info->regs +NPCM_ADCCON ); }else { -/* Any other error indicates that the regulator does exist */ +/* +* Any error which is not ENODEV indicates the regulator +* has been specified and so is a failure case. +*/ if (PTR_ERR (info->vref) != -ENODEV ) { + ret =PTR_ERR (info->vref); goto err_disable_clk; -return PTR_ERR (info->vref); }/* Use internal reference */ - info->vref_mv =INT_VREF_MV ;iowrite32 (reg_con |NPCM_ADCCON_REFSEL , info->regs +NPCM_ADCCON ); } - irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { -dev_err (dev,"failed getting interrupt resource\n" ); - ret = -EINVAL ; - goto err_disable_vref_reg; - } +init_waitqueue_head (&info->wq); - ret =devm_request_irq (&pdev->dev, irq, npcm_adc_isr,0 , -"NPCM_ADC" , indio_dev); -if (ret <0 ) { -dev_err (dev,"failed requesting interrupt\n" ); - goto err_disable_vref_reg; - } + reg_con =ioread32 (info->regs +NPCM_ADCCON ); + reg_con |=NPCM_ADC_ENABLE ; -init_waitqueue_head (&info->wq); +/* Enable the ADC Module */ +iowrite32 (reg_con, info->regs +NPCM_ADCCON ); + +/* Start ADC conversion */ +iowrite32 (reg_con |NPCM_ADCCON_ADC_CONV , info->regs +NPCM_ADCCON );platform_set_drvdata (pdev, indio_dev); indio_dev->name =dev_name (&pdev->dev);
@@ -275,24 +285,15 @@ static int npcm_adc_probe(struct platform_device *pdev) ret =iio_device_register (indio_dev);if (ret) {dev_err (&pdev->dev,"Couldn't register the device.\n" ); - goto err_disable_vref_reg; + goto err_iio_register; } - reg_con =ioread32 (info->regs +NPCM_ADCCON ); - reg_con |=NPCM_ADC_ENABLE ; - -/* Enable the ADC Module */ -iowrite32 (reg_con, info->regs +NPCM_ADCCON ); - -/* Start ADC conversion */ -iowrite32 (reg_con |NPCM_ADCCON_ADC_CONV , info->regs +NPCM_ADCCON ); - -pr_info ("NPCM ADC driver probed, sample Rate %dHz\n" , - info->adc_sample_hz); +pr_info ("NPCM ADC driver probed\n" );return 0 ; -err_disable_vref_reg: +err_iio_register: +iowrite32 (reg_con & ~NPCM_ADCCON_ADC_EN , info->regs +NPCM_ADCCON );if (!IS_ERR (info->vref))regulator_disable (info->vref); err_disable_clk:
@@ -305,17 +306,15 @@ static int npcm_adc_remove(struct platform_device *pdev) {struct iio_dev *indio_dev =platform_get_drvdata (pdev);struct npcm_adc *info =iio_priv (indio_dev); -u32 regtemp =0 ; +u32 regtemp; regtemp =ioread32 (info->regs +NPCM_ADCCON ); -/* Disable the ADC Module */ -iowrite32 (regtemp & ~NPCM_ADCCON_ADC_EN , info->regs +NPCM_ADCCON ); -iio_device_unregister (indio_dev); -clk_disable_unprepare (info->adc_clk); +iowrite32 (regtemp & ~NPCM_ADCCON_ADC_EN , info->regs +NPCM_ADCCON );if (!IS_ERR (info->vref))regulator_disable (info->vref); +clk_disable_unprepare (info->adc_clk);return 0 ; }
@@ -331,6 +330,6 @@ static struct platform_driver npcm_adc_driver = {module_platform_driver (npcm_adc_driver); -MODULE_DESCRIPTION ("Nuvoton NPCM ADC Sensor Driver" ); +MODULE_DESCRIPTION ("Nuvoton NPCM ADC Driver" );MODULE_AUTHOR ("Tomer Maimon <[email protected]>" );MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.14.1
Tomer Maimon
maintainerPATCH 3/3 dts: npcm7xx: Modify NPCM7xx device tree
In reply to Tomer MaimonModify NPCM7xx device tree FIU, ADC, RST, VCD and SPI nodes Add regulator and HGPIO pins nodes.
--- arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 199 +++++++++++++++----------- arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 165 +++++++++++++++------ arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi | 18 +-- arch/arm/boot/dts/nuvoton-npcm750.dtsi | 10 +- 4 files changed, 249 insertions(+), 143 deletions(-)
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi +119 -80
@@ -5,6 +5,7 @@ #include "skeleton.dtsi" #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h> +#include <dt-bindings/gpio/gpio.h> / { #address-cells = <1>;
@@ -74,7 +75,7 @@ rst: rst@f0801000 { compatible = "nuvoton,npcm750-rst", "syscon", "simple-mfd"; - reg = <0x801000 0x1000>; + reg = <0x801000 0x6C>; }; scu: scu@3fe000 {
@@ -128,7 +129,7 @@ clock-names = "stmmaceth", "clk_gmac"; pinctrl-names = "default"; pinctrl-0 = <&rg1_pins - &rg1mdio_pins>; + &rg1mdio_pins>; status = "disabled"; };
@@ -142,8 +143,9 @@ clock-names = "clk_emc"; pinctrl-names = "default"; pinctrl-0 = <&r1_pins - &r1err_pins - &r1md_pins>; + &r1err_pins + &r1md_pins>; + status = "disabled"; }; ehci1:usb@f0806000 {
@@ -213,52 +215,38 @@ interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; }; - spi0: spi@fb000000 { - compatible = "nuvoton,npcm750-spi"; + fiu0: fiu@fb000000 { + compatible = "nuvoton,npcm750-fiu"; #address-cells = <1>; #size-cells = <0>; reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>; reg-names = "control", "memory"; - chip-max-address-map = <0x8000000>; clocks = <&clk NPCM7XX_CLK_AHB>; clock-names = "clk_ahb"; - spi-nor@0 { - compatible = "jedec,spi-nor"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0>; - }; + status = "disabled"; }; - spi3: spi@c0000000 { - compatible = "nuvoton,npcm750-spi"; + + fiu3: fiu@c0000000 { + compatible = "nuvoton,npcm750-fiu"; #address-cells = <1>; #size-cells = <0>; reg = <0xc0000000 0x1000>, <0xA0000000 0x20000000>; reg-names = "control", "memory"; - chip-max-address-map = <0x8000000>; clocks = <&clk NPCM7XX_CLK_AHB>; clock-names = "clk_ahb"; pinctrl-names = "default"; - pinctrl-0 = <&spi3_pins &spi3quad_pins>; - spi-nor@0 { - compatible = "jedec,spi-nor"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0>; - }; + pinctrl-0 = <&spi3_pins>; + status = "disabled"; }; - pci_rc: axi-pcie@e1000000 { - #address-cells = <3>; - #size-cells = <2>; - #interrupt-cells = <1>; - compatible = "nuvoton,npcm750-pcirc"; - reg = <0xe1000000 0x1000>; - device_type = "pci"; - interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>; - bus-range = <0x00 0xff>; - ranges = <0x02000000 0 0xea000000 - 0xea000000 0 0x02000000>; + fiux: fiu@fb001000 { + compatible = "nuvoton,npcm750-fiu"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0xfb001000 0x1000>, <0xf8000000 0x2000000>; + reg-names = "control", "memory"; + clocks = <&clk NPCM7XX_CLK_AHB>; + clock-names = "clk_ahb"; status = "disabled"; };
@@ -271,17 +259,18 @@ vcd: vcd@f0810000 { compatible = "nuvoton,npcm750-vcd"; reg = <0xf0810000 0x10000>; - phy-memory = <0x3e200000 0x600000>; - de-mode = /bits/ 8 <1>; - interrupts = <0 22 4>; + mem-addr = <0x3e200000>; + mem-size = <0x600000>; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; }; ece: ece@f0820000 { compatible = "nuvoton,npcm750-ece"; reg = <0xf0820000 0x2000>; - phy-memory = <0x3e800000 0x600000>; - interrupts = <0 24 4>; + mem-addr = <0x3e800000>; + mem-size = <0x600000>; + interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; };
@@ -352,13 +341,30 @@ }; }; - pspi: pspi@0 { + spi0: spi@200000 { compatible = "nuvoton,npcm750-pspi"; - reg = <0x200000 0x2000>; - interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; + reg = <0x200000 0x1000>; + pinctrl-names = "default"; + pinctrl-0 = <&pspi1_pins>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk NPCM7XX_CLK_APB5>; clock-names = "clk_apb5"; + status = "disabled"; + }; + + spi1: spi@201000 { + compatible = "nuvoton,npcm750-pspi"; + reg = <0x201000 0x1000>; + pinctrl-names = "default"; + pinctrl-0 = <&pspi2_pins>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk NPCM7XX_CLK_APB5>; + clock-names = "clk_apb5"; + status = "disabled"; }; timer0: timer@8000 {
@@ -438,10 +444,10 @@ adc: adc@c000 { compatible = "nuvoton,npcm750-adc"; - reg = <0xc000 0x1000>; + reg = <0xc000 0x8>; + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk NPCM7XX_CLK_ADC>; - clock-names = "clk_adc"; - vref = <2048>; + status = "disabled"; }; otp:otp@189000 {
@@ -453,7 +459,7 @@ clock-names = "clk_apb4"; }; - pwm_fan:pwm-fan-controller@103000 { + pwm_fan:pwm-fan-controller@103000 { #address-cells = <1>; #size-cells = <0>; compatible = "nuvoton,npcm750-pwm-fan";
@@ -487,9 +493,9 @@ status = "disabled"; }; - i2c0: i2c-bus@80000 { + i2c0: i2c@80000 { reg = <0x80000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
@@ -498,9 +504,9 @@ status = "disabled"; }; - i2c1: i2c-bus@81000 { + i2c1: i2c@81000 { reg = <0x81000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
@@ -509,9 +515,9 @@ status = "disabled"; }; - i2c2: i2c-bus@82000 { + i2c2: i2c@82000 { reg = <0x82000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
@@ -520,9 +526,9 @@ status = "disabled"; }; - i2c3: i2c-bus@83000 { + i2c3: i2c@83000 { reg = <0x83000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
@@ -531,9 +537,9 @@ status = "disabled"; }; - i2c4: i2c-bus@84000 { + i2c4: i2c@84000 { reg = <0x84000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
@@ -542,9 +548,9 @@ status = "disabled"; }; - i2c5: i2c-bus@85000 { + i2c5: i2c@85000 { reg = <0x85000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
@@ -553,9 +559,9 @@ status = "disabled"; }; - i2c6: i2c-bus@86000 { + i2c6: i2c@86000 { reg = <0x86000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
@@ -564,9 +570,9 @@ status = "disabled"; }; - i2c7: i2c-bus@87000 { + i2c7: i2c@87000 { reg = <0x87000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
@@ -575,9 +581,9 @@ status = "disabled"; }; - i2c8: i2c-bus@88000 { + i2c8: i2c@88000 { reg = <0x88000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
@@ -586,9 +592,9 @@ status = "disabled"; }; - i2c9: i2c-bus@89000 { + i2c9: i2c@89000 { reg = <0x89000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
@@ -597,9 +603,9 @@ status = "disabled"; }; - i2c10: i2c-bus@8a000 { + i2c10: i2c@8a000 { reg = <0x8a000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
@@ -608,9 +614,9 @@ status = "disabled"; }; - i2c11: i2c-bus@8b000 { + i2c11: i2c@8b000 { reg = <0x8b000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
@@ -619,9 +625,9 @@ status = "disabled"; }; - i2c12: i2c-bus@8c000 { + i2c12: i2c@8c000 { reg = <0x8c000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
@@ -630,9 +636,9 @@ status = "disabled"; }; - i2c13: i2c-bus@8d000 { + i2c13: i2c@8d000 { reg = <0x8d000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
@@ -641,9 +647,9 @@ status = "disabled"; }; - i2c14: i2c-bus@8e000 { + i2c14: i2c@8e000 { reg = <0x8e000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
@@ -652,9 +658,9 @@ status = "disabled"; }; - i2c15: i2c-bus@8f000 { + i2c15: i2c@8f000 { reg = <0x8f000 0x1000>; - compatible = "nuvoton,npcm750-i2c-bus"; + compatible = "nuvoton,npcm750-i2c"; clocks = <&clk NPCM7XX_CLK_APB2>; bus-frequency = <100000>; interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
@@ -664,7 +670,8 @@ }; gfxi: gfxi@f000e000 { - compatible = "nuvoton,npcm750-gfxi", "syscon", "simple-mfd"; + compatible = "nuvoton,npcm750-gfxi", "syscon", + "simple-mfd"; reg = <0xf000e000 0x100>; };
@@ -1202,5 +1209,37 @@ groups = "clkreq"; function = "clkreq"; }; + hgpio0_pins: hgpio0-pins { + groups = "hgpio0"; + function = "hgpio0"; + }; + hgpio1_pins: hgpio1-pins { + groups = "hgpio1"; + function = "hgpio1"; + }; + hgpio2_pins: hgpio2-pins { + groups = "hgpio2"; + function = "hgpio2"; + }; + hgpio3_pins: hgpio3-pins { + groups = "hgpio3"; + function = "hgpio3"; + }; + hgpio4_pins: hgpio4-pins { + groups = "hgpio4"; + function = "hgpio4"; + }; + hgpio5_pins: hgpio5-pins { + groups = "hgpio5"; + function = "hgpio5"; + }; + hgpio6_pins: hgpio6-pins { + groups = "hgpio6"; + function = "hgpio6"; + }; + hgpio7_pins: hgpio7-pins { + groups = "hgpio7"; + function = "hgpio7"; + }; }; };
arch/arm/boot/dts/nuvoton-npcm750-evb.dts +121 -44
308 lines not on this page · raw message
arch/arm/boot/dts/nuvoton-npcm750-gpio.dtsi +4 -14
@@ -1,15 +1,5 @@ -/* - * DTSi file for the NPCM750 pin controller - * - * Copyright (c) 2014-2017 Nuvoton Technology corporation. - * - * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 - * - * http://www.opensource.org/licenses/gpl-license.html - * http://www.gnu.org/copyleft/gpl.html - */ - +// SPDX-License-Identifier: GPL-2.0 +// Copyright (c) 2018 Nuvoton Technology [email protected] / { pinctrl: pinctrl@f0800000 {
@@ -1107,10 +1097,10 @@ bias-disable; input-enable; }; - gpio132o_pins: gpio132o-pins { + gpio132_pins: gpio132-pins { pins = "GPIO132/SMB10SCL"; bias-disable; - output-high; + input-enable; }; gpio133_pins: gpio133-pins { pins = "GPIO133/SMB10SDA";
arch/arm/boot/dts/nuvoton-npcm750.dtsi +5 -5
@@ -44,7 +44,6 @@ }; }; - ahb { gmac1: eth@f0804000 { device_type = "network";
@@ -56,8 +55,8 @@ clocks = <&clk_rg2refck>, <&clk NPCM7XX_CLK_AHB>; clock-names = "stmmaceth", "clk_gmac"; pinctrl-names = "default"; - /*pinctrl-0 = <&rg2_pins - &rg2mdio_pins>;*/ + pinctrl-0 = <&rg2_pins + &rg2mdio_pins>; status = "disabled"; };
@@ -71,8 +70,9 @@ clock-names = "clk_emc"; pinctrl-names = "default"; pinctrl-0 = <&r2_pins - &r2err_pins - &r2md_pins>; + &r2err_pins + &r2md_pins>; + status = "disabled"; }; udc0:udc@f0830000 {
Signature · 1 line
2.14.1