Skip to content

Commit 7f7420f

Browse files
committed
Merge tag 'omap-for-v4.5/fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
Fixes for omaps with the most intrusive stuff being read-only data assembly fixes, the other things are mostly board related: - A series of omap assembly code fixes to fix issues with rodata with ARM_KERNMEM_PERMS enabled. We had several places writing to rodata, which is bad. The fix in most cases is to load the value from data section using a pointer. Let's also enable ARM_KERNMEM_PERMS so DEBUG_RODATA gets selected by default. And while testing things, I also added few more loadable driver modules to the defconfig that I seem to need quite often. - Fix a long standing omap5 RTC mystery and enable RTC where we need to ensure the SoC msecure pin is high so we can write to the RTC registers. - Fix irq types for am437x - A series of minor dts fixes for sbc-am57x and cl-som-am57x - Fixes for torpedo dts to make WLAN behave and to remove a duplicate i2c rate entry This series also includes few minor changes that are not stricly fixes, but would be good to get in during the early -rc cycle: - Remove legacy mailbox platform data that is no longer needed - Add the pdata-quirks needed for the new pwm-omap-dmtimer so people can use it - Enable ti,mbox-send-noirq that's needed by wkup_m3 driver - Enable SPLIT and DWARF4 in omap2plus_defconfig as it makes the initramfs quite a bit smaller * tag 'omap-for-v4.5/fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (23 commits) ARM: dts: am57xx: sbc-am57x: correct Eth PHY settings ARM: dts: am57xx: cl-som-am57x: fix CPSW EMAC pinmux ARM: dts: am57xx: sbc-am57x: fix UART3 pinmux ARM: dts: am57xx: cl-som-am57x: update SPI Flash frequency ARM: dts: am57xx: cl-som-am57x: set HOST mode for USB2 ARM: dts: am57xx: sbc-am57x: fix SB-SOM EEPROM I2C address ARM: dts: LogicPD Torpedo: Revert Duplicative Entries ARM: dts: am437x: pixcir_tangoc: use correct flags for irq types ARM: dts: am4372: fix irq type for arm twd and global timer ARM: dts: Fix wl12xx missing clocks that cause hangs ARM: OMAP: Add PWM dmtimer platform data quirks ARM: omap2plus_defconfig: Enable ARM_KERNMEM_PERMS and few loadable modules ARM: OMAP2+: Fix ppa_zero_params and ppa_por_params for rodata ARM: OMAP2+: Fix l2_inv_api_params for rodata ARM: OMAP2+: Fix save_secure_ram_context for rodata ARM: OMAP2+: Fix l2dis_3630 for rodata ARM: OMAP2+: Fix wait_dll_lock_timed for rodata ARM: OMAP2+: Remove legacy mailbox device instantiation ARM: dts: AM4372: Add ti,mbox-send-noirq to wkup_m3 mailbox ARM: dts: AM33xx: Add ti,mbox-send-noirq to wkup_m3 mailbox ... Signed-off-by: Olof Johansson <olof@lixom.net>
2 parents b83132f + ab342c7 commit 7f7420f

13 files changed

+130
-91
lines changed

arch/arm/boot/dts/am33xx.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@
439439
ti,mbox-num-users = <4>;
440440
ti,mbox-num-fifos = <8>;
441441
mbox_wkupm3: wkup_m3 {
442+
ti,mbox-send-noirq;
442443
ti,mbox-tx = <0 0 0>;
443444
ti,mbox-rx = <0 0 3>;
444445
};

arch/arm/boot/dts/am4372.dtsi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@
7373
global_timer: timer@48240200 {
7474
compatible = "arm,cortex-a9-global-timer";
7575
reg = <0x48240200 0x100>;
76-
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
76+
interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
7777
interrupt-parent = <&gic>;
7878
clocks = <&mpu_periphclk>;
7979
};
8080

8181
local_timer: timer@48240600 {
8282
compatible = "arm,cortex-a9-twd-timer";
8383
reg = <0x48240600 0x100>;
84-
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
84+
interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>;
8585
interrupt-parent = <&gic>;
8686
clocks = <&mpu_periphclk>;
8787
};
@@ -290,6 +290,7 @@
290290
ti,mbox-num-users = <4>;
291291
ti,mbox-num-fifos = <8>;
292292
mbox_wkupm3: wkup_m3 {
293+
ti,mbox-send-noirq;
293294
ti,mbox-tx = <0 0 0>;
294295
ti,mbox-rx = <0 0 3>;
295296
};

arch/arm/boot/dts/am437x-gp-evm.dts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,16 +590,14 @@
590590
pinctrl-names = "default";
591591
pinctrl-0 = <&pixcir_ts_pins>;
592592
reg = <0x5c>;
593-
interrupt-parent = <&gpio3>;
594-
interrupts = <22 0>;
595593

596594
attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
597595

598596
/*
599597
* 0x264 represents the offset of padconf register of
600598
* gpio3_22 from am43xx_pinmux base.
601599
*/
602-
interrupts-extended = <&gpio3 22 IRQ_TYPE_NONE>,
600+
interrupts-extended = <&gpio3 22 IRQ_TYPE_EDGE_FALLING>,
603601
<&am43xx_pinmux 0x264>;
604602
interrupt-names = "tsc", "wakeup";
605603

arch/arm/boot/dts/am43x-epos-evm.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@
491491
pinctrl-0 = <&pixcir_ts_pins>;
492492
reg = <0x5c>;
493493
interrupt-parent = <&gpio1>;
494-
interrupts = <17 0>;
494+
interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
495495

496496
attb-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>;
497497

arch/arm/boot/dts/am57xx-cl-som-am57x.dts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d20.rgmii1_rd3 */
168168
DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d21.rgmii1_rd2 */
169169
DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d22.rgmii1_rd1 */
170-
DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT_PULLUP | MUX_MODE3) /* vin2a_d23.rgmii1_rd0 */
170+
DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d23.rgmii1_rd0 */
171171
>;
172172
};
173173

@@ -492,14 +492,14 @@
492492
pinctrl-names = "default";
493493
pinctrl-0 = <&qspi1_pins>;
494494

495-
spi-max-frequency = <20000000>;
495+
spi-max-frequency = <48000000>;
496496

497497
spi_flash: spi_flash@0 {
498498
#address-cells = <1>;
499499
#size-cells = <1>;
500500
compatible = "spansion,m25p80", "jedec,spi-nor";
501501
reg = <0>; /* CS0 */
502-
spi-max-frequency = <20000000>;
502+
spi-max-frequency = <48000000>;
503503

504504
partition@0 {
505505
label = "uboot";
@@ -559,13 +559,13 @@
559559

560560
&cpsw_emac0 {
561561
phy_id = <&davinci_mdio>, <0>;
562-
phy-mode = "rgmii";
562+
phy-mode = "rgmii-txid";
563563
dual_emac_res_vlan = <0>;
564564
};
565565

566566
&cpsw_emac1 {
567567
phy_id = <&davinci_mdio>, <1>;
568-
phy-mode = "rgmii";
568+
phy-mode = "rgmii-txid";
569569
dual_emac_res_vlan = <1>;
570570
};
571571

@@ -588,7 +588,7 @@
588588
};
589589

590590
&usb2 {
591-
dr_mode = "peripheral";
591+
dr_mode = "host";
592592
};
593593

594594
&mcasp3 {

arch/arm/boot/dts/am57xx-sbc-am57x.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
&dra7_pmx_core {
2626
uart3_pins_default: uart3_pins_default {
2727
pinctrl-single,pins = <
28-
DRA7XX_CORE_IOPAD(0x37f8, PIN_INPUT_SLEW | MUX_MODE2) /* uart2_ctsn.uart3_rxd */
29-
DRA7XX_CORE_IOPAD(0x37fc, PIN_INPUT_SLEW | MUX_MODE1) /* uart2_rtsn.uart3_txd */
28+
DRA7XX_CORE_IOPAD(0x3648, PIN_INPUT_SLEW | MUX_MODE0) /* uart3_rxd */
29+
DRA7XX_CORE_IOPAD(0x364c, PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
3030
>;
3131
};
3232

@@ -108,9 +108,9 @@
108108
pinctrl-0 = <&i2c5_pins_default>;
109109
clock-frequency = <400000>;
110110

111-
eeprom_base: atmel@50 {
111+
eeprom_base: atmel@54 {
112112
compatible = "atmel,24c08";
113-
reg = <0x50>;
113+
reg = <0x54>;
114114
pagesize = <16>;
115115
};
116116

arch/arm/boot/dts/logicpd-torpedo-som.dtsi

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,6 @@
112112
clock-frequency = <400000>;
113113
};
114114

115-
&i2c2 {
116-
clock-frequency = <400000>;
117-
};
118-
119-
&i2c3 {
120-
clock-frequency = <400000>;
121-
};
122-
123115
/*
124116
* Only found on the wireless SOM. For the SOM without wireless, the pins for
125117
* MMC3 can be routed with jumpers to the second MMC slot on the devkit and
@@ -143,6 +135,7 @@
143135
interrupt-parent = <&gpio5>;
144136
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */
145137
ref-clock-frequency = <26000000>;
138+
tcxo-clock-frequency = <26000000>;
146139
};
147140
};
148141

arch/arm/boot/dts/omap5-board-common.dtsi

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,16 @@
130130
};
131131
};
132132

133+
&gpio8 {
134+
/* TI trees use GPIO instead of msecure, see also muxing */
135+
p234 {
136+
gpio-hog;
137+
gpios = <10 GPIO_ACTIVE_HIGH>;
138+
output-high;
139+
line-name = "gpio8_234/msecure";
140+
};
141+
};
142+
133143
&omap5_pmx_core {
134144
pinctrl-names = "default";
135145
pinctrl-0 = <
@@ -213,6 +223,13 @@
213223
>;
214224
};
215225

226+
/* TI trees use GPIO mode; msecure mode does not work reliably? */
227+
palmas_msecure_pins: palmas_msecure_pins {
228+
pinctrl-single,pins = <
229+
OMAP5_IOPAD(0x180, PIN_OUTPUT | MUX_MODE6) /* gpio8_234 */
230+
>;
231+
};
232+
216233
usbhost_pins: pinmux_usbhost_pins {
217234
pinctrl-single,pins = <
218235
OMAP5_IOPAD(0x0c4, PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
@@ -278,6 +295,12 @@
278295
&usbhost_wkup_pins
279296
>;
280297

298+
palmas_sys_nirq_pins: pinmux_palmas_sys_nirq_pins {
299+
pinctrl-single,pins = <
300+
OMAP5_IOPAD(0x068, PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1 */
301+
>;
302+
};
303+
281304
usbhost_wkup_pins: pinmux_usbhost_wkup_pins {
282305
pinctrl-single,pins = <
283306
OMAP5_IOPAD(0x05a, PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
@@ -345,6 +368,8 @@
345368
interrupt-controller;
346369
#interrupt-cells = <2>;
347370
ti,system-power-controller;
371+
pinctrl-names = "default";
372+
pinctrl-0 = <&palmas_sys_nirq_pins &palmas_msecure_pins>;
348373

349374
extcon_usb3: palmas_usb {
350375
compatible = "ti,palmas-usb-vid";
@@ -358,6 +383,14 @@
358383
#clock-cells = <0>;
359384
};
360385

386+
rtc {
387+
compatible = "ti,palmas-rtc";
388+
interrupt-parent = <&palmas>;
389+
interrupts = <8 IRQ_TYPE_NONE>;
390+
ti,backup-battery-chargeable;
391+
ti,backup-battery-charge-high-current;
392+
};
393+
361394
palmas_pmic {
362395
compatible = "ti,palmas-pmic";
363396
interrupt-parent = <&palmas>;

arch/arm/configs/omap2plus_defconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ CONFIG_SOC_AM33XX=y
5050
CONFIG_SOC_AM43XX=y
5151
CONFIG_SOC_DRA7XX=y
5252
CONFIG_ARM_THUMBEE=y
53+
CONFIG_ARM_KERNMEM_PERMS=y
5354
CONFIG_ARM_ERRATA_411920=y
5455
CONFIG_ARM_ERRATA_430973=y
5556
CONFIG_SMP=y
@@ -177,6 +178,7 @@ CONFIG_TI_CPTS=y
177178
CONFIG_AT803X_PHY=y
178179
CONFIG_SMSC_PHY=y
179180
CONFIG_USB_USBNET=m
181+
CONFIG_USB_NET_SMSC75XX=m
180182
CONFIG_USB_NET_SMSC95XX=m
181183
CONFIG_USB_ALI_M5632=y
182184
CONFIG_USB_AN2720=y
@@ -354,6 +356,11 @@ CONFIG_USB_MUSB_DSPS=m
354356
CONFIG_USB_INVENTRA_DMA=y
355357
CONFIG_USB_TI_CPPI41_DMA=y
356358
CONFIG_USB_DWC3=m
359+
CONFIG_USB_SERIAL=m
360+
CONFIG_USB_SERIAL_GENERIC=y
361+
CONFIG_USB_SERIAL_SIMPLE=m
362+
CONFIG_USB_SERIAL_FTDI_SIO=m
363+
CONFIG_USB_SERIAL_PL2303=m
357364
CONFIG_USB_TEST=m
358365
CONFIG_AM335X_PHY_USB=y
359366
CONFIG_USB_GADGET=m
@@ -387,6 +394,7 @@ CONFIG_NEW_LEDS=y
387394
CONFIG_LEDS_CLASS=m
388395
CONFIG_LEDS_GPIO=m
389396
CONFIG_LEDS_PWM=m
397+
CONFIG_LEDS_PCA963X=m
390398
CONFIG_LEDS_TRIGGERS=y
391399
CONFIG_LEDS_TRIGGER_TIMER=m
392400
CONFIG_LEDS_TRIGGER_ONESHOT=m
@@ -449,6 +457,8 @@ CONFIG_NLS_CODEPAGE_437=y
449457
CONFIG_NLS_ISO8859_1=y
450458
CONFIG_PRINTK_TIME=y
451459
CONFIG_DEBUG_INFO=y
460+
CONFIG_DEBUG_INFO_SPLIT=y
461+
CONFIG_DEBUG_INFO_DWARF4=y
452462
CONFIG_MAGIC_SYSRQ=y
453463
CONFIG_SCHEDSTATS=y
454464
CONFIG_TIMER_STATS=y

arch/arm/mach-omap2/devices.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <linux/slab.h>
1919
#include <linux/of.h>
2020
#include <linux/pinctrl/machine.h>
21-
#include <linux/platform_data/mailbox-omap.h>
2221

2322
#include <asm/mach-types.h>
2423
#include <asm/mach/map.h>
@@ -66,32 +65,6 @@ static int __init omap3_l3_init(void)
6665
}
6766
omap_postcore_initcall(omap3_l3_init);
6867

69-
#if defined(CONFIG_OMAP2PLUS_MBOX) || defined(CONFIG_OMAP2PLUS_MBOX_MODULE)
70-
static inline void __init omap_init_mbox(void)
71-
{
72-
struct omap_hwmod *oh;
73-
struct platform_device *pdev;
74-
struct omap_mbox_pdata *pdata;
75-
76-
oh = omap_hwmod_lookup("mailbox");
77-
if (!oh) {
78-
pr_err("%s: unable to find hwmod\n", __func__);
79-
return;
80-
}
81-
if (!oh->dev_attr) {
82-
pr_err("%s: hwmod doesn't have valid attrs\n", __func__);
83-
return;
84-
}
85-
86-
pdata = (struct omap_mbox_pdata *)oh->dev_attr;
87-
pdev = omap_device_build("omap-mailbox", -1, oh, pdata, sizeof(*pdata));
88-
WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n",
89-
__func__, PTR_ERR(pdev));
90-
}
91-
#else
92-
static inline void omap_init_mbox(void) { }
93-
#endif /* CONFIG_OMAP2PLUS_MBOX */
94-
9568
static inline void omap_init_sti(void) {}
9669

9770
#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
@@ -229,7 +202,6 @@ static int __init omap2_init_devices(void)
229202
* please keep these calls, and their implementations above,
230203
* in alphabetical order so they're easier to sort through.
231204
*/
232-
omap_init_mbox();
233205
omap_init_mcspi();
234206
omap_init_sham();
235207
omap_init_aes();

arch/arm/mach-omap2/pdata-quirks.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include <linux/platform_data/pinctrl-single.h>
2424
#include <linux/platform_data/iommu-omap.h>
2525
#include <linux/platform_data/wkup_m3.h>
26+
#include <linux/platform_data/pwm_omap_dmtimer.h>
27+
#include <plat/dmtimer.h>
2628

2729
#include "common.h"
2830
#include "common-board-devices.h"
@@ -449,6 +451,24 @@ void omap_auxdata_legacy_init(struct device *dev)
449451
dev->platform_data = &twl_gpio_auxdata;
450452
}
451453

454+
/* Dual mode timer PWM callbacks platdata */
455+
#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
456+
struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
457+
.request_by_node = omap_dm_timer_request_by_node,
458+
.free = omap_dm_timer_free,
459+
.enable = omap_dm_timer_enable,
460+
.disable = omap_dm_timer_disable,
461+
.get_fclk = omap_dm_timer_get_fclk,
462+
.start = omap_dm_timer_start,
463+
.stop = omap_dm_timer_stop,
464+
.set_load = omap_dm_timer_set_load,
465+
.set_match = omap_dm_timer_set_match,
466+
.set_pwm = omap_dm_timer_set_pwm,
467+
.set_prescaler = omap_dm_timer_set_prescaler,
468+
.write_counter = omap_dm_timer_write_counter,
469+
};
470+
#endif
471+
452472
/*
453473
* Few boards still need auxdata populated before we populate
454474
* the dev entries in of_platform_populate().
@@ -502,6 +522,9 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
502522
OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
503523
&wkup_m3_data),
504524
#endif
525+
#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
526+
OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
527+
#endif
505528
#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
506529
OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
507530
&omap4_iommu_pdata),

0 commit comments

Comments
 (0)